amide-1.0.5/0000755000175000017500000000000012271346313012446 5ustar loeningloeningamide-1.0.5/stamp-h.in0000644000175000017500000000001207474555053014354 0ustar loeningloeningtimestamp amide-1.0.5/man/0000775000175000017500000000000012271346313013223 5ustar loeningloeningamide-1.0.5/man/Makefile.am0000664000175000017500000000013510061110634015244 0ustar loeningloeningAUTOMAKE_OPTIONS = gnu man_MANS = \ amide.1 EXTRA_DIST = $(man_MANS) DISTCLEANFILES = *~ amide-1.0.5/man/evince0000664000175000017500000000000012026700462014402 0ustar loeningloeningamide-1.0.5/man/Makefile.in0000664000175000017500000004261712271346301015277 0ustar loeningloening# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/libfame.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/amide_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMIDE_CHECK_OBSOLETE_CFLAGS = @AMIDE_CHECK_OBSOLETE_CFLAGS@ AMIDE_DEBUG_CFLAGS = @AMIDE_DEBUG_CFLAGS@ AMIDE_GTK_CFLAGS = @AMIDE_GTK_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_CFLAGS = @AMIDE_GTK_EXTRA_GCONF_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_LIBS = @AMIDE_GTK_EXTRA_GCONF_LIBS@ AMIDE_GTK_EXTRA_GVFS_CFLAGS = @AMIDE_GTK_EXTRA_GVFS_CFLAGS@ AMIDE_GTK_EXTRA_GVFS_LIBS = @AMIDE_GTK_EXTRA_GVFS_LIBS@ AMIDE_GTK_LIBS = @AMIDE_GTK_LIBS@ AMIDE_LIBDCMDATA_CFLAGS = @AMIDE_LIBDCMDATA_CFLAGS@ AMIDE_LIBDCMDATA_LIBS = @AMIDE_LIBDCMDATA_LIBS@ AMIDE_LIBECAT_LIBS = @AMIDE_LIBECAT_LIBS@ AMIDE_LIBVOLPACK_LIBS = @AMIDE_LIBVOLPACK_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HELP_DIR = @HELP_DIR@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFAME_CFLAGS = @LIBFAME_CFLAGS@ LIBFAME_CONFIG = @LIBFAME_CONFIG@ LIBFAME_LIBS = @LIBFAME_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ OPTIMIZATION_CFLAGS = @OPTIMIZATION_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMEDCON_CFLAGS = @XMEDCON_CFLAGS@ XMEDCON_CONFIG = @XMEDCON_CONFIG@ XMEDCON_LIBS = @XMEDCON_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ intltool__v_merge_options_ = @intltool__v_merge_options_@ intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ libgnomecanvas_greater_than_230_CFLAGS = @libgnomecanvas_greater_than_230_CFLAGS@ libgnomecanvas_greater_than_230_LIBS = @libgnomecanvas_greater_than_230_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = gnu man_MANS = \ amide.1 EXTRA_DIST = $(man_MANS) DISTCLEANFILES = *~ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am uninstall-man \ uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: amide-1.0.5/man/amide.10000644000175000017500000000204112026700444014354 0ustar loeningloening.ad l .TH AMIDE 1 2012-09-20 AMIDE .SH "NAME" amide \- AMIDE's a Medical Image Data Examiner .SH "SYNOPSIS" .IX Header "SYNOPSIS" amide \fIinfile\fR ... .SH "DESCRIPTION" .IX Header "DESCRIPTION" AMIDE is a program intended for viewing and analyzing 3D medical imaging data sets. In addition to the program's own internal format (XML Image Format=XIF), the program can read in a variety of standard medical file formats using the MedCon medical imaging conversion library. For a list of the file formats that MedCon supports, please see its manual page. For additional information on AMIDE, please view the AMIDE help documentation, or go to the AMIDE web page: <\fBhttp://amide.sourceforge.net\fR>. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIgpl\fR\|(7), \&\fImedcon\fR\|(1), \fIxmedcon\fR\|(1) .SH "BUGS" .IX Header "BUGS" Bugs can be reported to the amide user's list (amide-users@lists.sourceforge.net). .SH "AUTHOR" .IX Header "AUTHOR" AMIDE was written by Andreas Loening. For a list of additional contributors, please see the AUTHORS file. amide-1.0.5/configure.ac0000664000175000017500000003553712271346247014761 0ustar loeningloeningdnl =============================================================================== dnl Configure script for AMIDE dnl =============================================================================== AC_PREREQ(2.59) AC_INIT([amide],[1.0.5],[amide-users@lists.sourceforge.net]) AC_CONFIG_SRCDIR(src/amide.c) AC_CONFIG_HEADERS(amide_config.h) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE AM_MAINTAINER_MODE([enable]) AC_PROG_CC AC_PROG_CXX AM_PROG_LIBTOOL AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H)) AC_CHECK_SIZEOF(long,8) AC_CHECK_SIZEOF(long long,8) AC_CHECK_FUNCS(strptime) dnl ================= translation ======================================= AM_GLIB_GNU_GETTEXT GETTEXT_PACKAGE=amide AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define the gettext package to be used]) ALL_LINGUAS="zh_CN zh_TW" AC_PROG_INTLTOOL dnl m4 required for compiling AC_PATH_PROGS(M4, gnum4 gm4 m4, NOT_FOUND) if test $M4 = "NOT_FOUND"; then echo "Could not find m4 on this system, please install to compile AMIDE." exit 1 fi dnl disabled 2010.02.20, hopefully this is no longer an issue dnl ===================================================================== dnl pick our optimization level, OSX's version of gcc doesn't handle -O6 dnl also, need the -headerpad_max_install_name to allow switching dnl the library paths with strings that have longer lengths dnl case "$host_os" in dnl darwin*) CFLAGS="-g -O2 -Wall" dnl LDFLAGS="-headerpad_max_install_names";; dnl *) CFLAGS="-g -O6 -Wall" dnl CXXFLAGS="-g -O6 -Wall";; dnl esac dnl added 2014.01.24 dnl make sure an optimization level is set. On jhbuild (os x) the CFLAGS gets dnl overwritten, so we're using this to make sure some optimization is on dnl when compiling. This is especially important to speeding up the dnl reslicing algorithm OPTIMIZATION_CFLAGS="-O2" echo "setting optimization level to $OPTIMIZATION_CFLAGS" AC_SUBST(OPTIMIZATION_CFLAGS) dnl 2013.11.02 - remove check for ancient versions of gcc from 13 years ago dnl if test $CC = "gcc"; then dnl echo -n "checking version of gcc... " dnl CC_VERSION=`$CC -dumpversion` dnl if (test $CC_VERSION = "2.96" || test $$CC_VERSION = "2.95.4"); then dnl echo $CC_VERSION dnl echo "******************************************************************" dnl echo "This version of gcc is a beta compiler and often incorrectly" dnl echo "compiles this program. Please upgrade to the current version of" dnl echo "gcc (3.2.1 as of this writing) or downgrade to 2.95.3" dnl echo "******************************************************************" dnl echo -n "continue anyway? (y/n) " dnl read continue_with_bad_gcc dnl if test $continue_with_bad_gcc = "y"; then dnl echo "removing optimizations to reduce potential of compiler error" dnl CFLAGS="-g -O0" dnl else dnl exit 1 dnl fi dnl else dnl echo "$CC_VERSION, good" dnl fi dnl fi ############################################################## ### Checks for optional libraries ############################################################## dnl check for various libraries and programs that we might need AM_PATH_GSL(1.1.1, FOUND_LIBGSL=yes, FOUND_LIBGSL=no) AC_CHECK_LIB(ecat, matrix_open, FOUND_LIBECAT=yes, FOUND_LIBECAT=no, -L/sw/lib) AC_CHECK_LIB(volpack, vpGetErrorString, FOUND_VOLPACK=yes, FOUND_VOLPACK=no, -lm -L/sw/lib -L/usr/local/lib) AM_PATH_XMEDCON(0.10.0, FOUND_XMEDCON=yes, FOUND_XMEDCON=no) dnl switch to C++ for DCMTK library stuff - also, if pthread is on the platform, probably need that dnl autoconf doesn't have a nice macro for checking for c++ libraries, therefore the below: AC_CHECK_LIB(pthread, pthread_mutex_init, THREAD_LIBS="-lpthread", THREAD_LIBS="") AMIDE_LIBDCMDATA_LIBS="-L/usr/local/dicom/lib -L/usr/lib64/dcmtk -L/usr/lib/dcmtk -ldcmdata -loflog -lofstd -lz $THREAD_LIBS" AMIDE_LIBDCMDATA_CFLAGS="-I/usr/local/dicom/include" saved_libs="${LIBS}" LIBS="${LIBS} ${AMIDE_LIBDCMDATA_LIBS}" saved_cxxflags="${CXXFLAGS}" CXXFLAGS="${CXXFLAGS} ${AMIDE_LIBDCMDATA_CFLAGS} -DHAVE_CONFIG_H" FOUND_DCMDATA=no AC_LANG_CPLUSPLUS AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [DicomDirInterface dcm_dir; dcm_dir.writeDicomDir(); ])], [FOUND_DCMDATA=yes], [AC_MSG_WARN([libdcmdata was not found.])]) LIBS="${saved_libs}" CXXFLAGS="${saved_cxxflags}" dnl trying to phase out libfame use in favor of ffmpeg PKG_CHECK_MODULES(FFMPEG, [ libavcodec >= 51.45.0, libavutil ], FOUND_FFMPEG=yes, FOUND_FFMPEG=no); dnl Let people compile without debugging information AC_ARG_ENABLE( amide_debug, [ --enable-amide-debug Compile with debugging messages and gdb debugging support [default=yes]], enable_amide_debug="$enableval", enable_amide_debug=yes) if test $enable_amide_debug = yes; then echo "compiling with AMIDE debugging messages" AMIDE_DEBUG_CFLAGS="-ggdb -Wall" AC_SUBST(AMIDE_DEBUG_CFLAGS) AC_DEFINE(AMIDE_DEBUG, 1, Define to compile AMIDE with debugging information) else echo "compiling without AMIDE debugging messages" fi dnl compile with warnings for obsolete Glib/GTK stuff AC_ARG_ENABLE( amide_check_obsolete, [ --enable-amide-check-obsolete Compile with checks for old GLib/GTK functions [default=no]], enable_amide_check_obsolete="$enableval", enable_amide_check_obsolete=no) if test $enable_amide_check_obsolete = yes; then echo "compiling with checks for obsolete GLib/GTK functions" AMIDE_CHECK_OBSOLETE_CFLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGDK_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES" AC_SUBST(AMIDE_CHECK_OBSOLETE_CFLAGS) AC_DEFINE(AMIDE_CHECK_OBSOLETE, 1, Define to compile with checks for obsolete GLib/GTK functions) else echo "compiling without checks for obsolete GLib/GTK functions" fi dnl check if we're building on windows dnl if you need to know OS in .c code, use G_PLATFORM_WIN32 AC_MSG_CHECKING([for native Win32]) case "$host" in *-*-mingw*) native_win32=yes ;; *) native_win32=no ;; esac AC_MSG_RESULT([$native_win32]) AM_CONDITIONAL(AMIDE_OS_WIN32, test "$native_win32" = yes) dnl specify that we're building Mac OS X with native GTK support AC_ARG_ENABLE( native_gtk_osx, [ --enable-native-gtk-osx Compile with native GTK support on Mac OS X [default=no]], enable_native_gtk_osx="$enableval", enable_native_gtk_osx=no) case "$host" in *-apple-*) on_a_macintosh=yes ;; *) on_a_macintosh=no ;; esac if (test $enable_native_gtk_osx = yes) && (test $on_a_macintosh = yes); then echo "compiling with native GTK support on Mac OS X" AC_DEFINE(AMIDE_NATIVE_GTK_OSX, 1, Define to compile with native GTK support on Mac OS X) fi if (test $enable_native_gtk_osx = no) && (test $on_a_macintosh = yes); then echo "compiling with X11 GTK support (non-native) on Mac OS X" fi if (test $enable_native_gtk_osx = yes) && (test $on_a_macintosh = no); then echo "ignoring --enable-native-gtk-osx option, as OS other than Mac OS X" fi dnl let people compile without the GNU Scientific Library AC_ARG_ENABLE( libgsl, [ --enable-libgsl Compile with the GNU Scientific Library [default=yes]], enable_libgsl="$enableval", enable_libgsl=yes) if (test $enable_libgsl = yes) && (test $FOUND_LIBGSL = yes); then echo "compiling with GNU Scientific Library support" AC_DEFINE(AMIDE_LIBGSL_SUPPORT, 1, Define to compile with the GNU Scientific Library) else echo "compiling without the GNU Scientific Library" fi dnl Let people compile without having libecat (z_matrix_70) AC_ARG_ENABLE( libecat, [ --enable-libecat Compile with the libecat/CTI library [default=yes]], enable_libecat="$enableval", enable_libecat=yes) if (test $enable_libecat = yes) && (test $FOUND_LIBECAT = yes); then echo "compiling with libecat/CTI file support" AMIDE_LIBECAT_LIBS="-lecat" AC_SUBST(AMIDE_LIBECAT_LIBS) AC_DEFINE(AMIDE_LIBECAT_SUPPORT, 1, Define to compile with libecat) else echo "compiling without libecat/CTI file support" fi dnl Let people compile without having libmdc AC_ARG_ENABLE( libmdc, [ --enable-libmdc Compile with the xmedcon/libmdc library [default=yes]], enable_libmdc="$enableval", enable_libmdc=yes) if (test $enable_libmdc = yes) && (test $FOUND_XMEDCON = yes); then echo "compiling with xmedcon/libmdc file support" AC_DEFINE(AMIDE_LIBMDC_SUPPORT, 1, Define to compile with (X)MedCon) dnl 2007.10.28 - new xmedcon's should be using glib2/gtk2, dont' have to overwrite XMEDCON_LIBS dnl XMEDCON_LIBS="-L/usr/local/lib -L/usr/local/xmedcon/lib -lmdc" AC_SUBST(XMEDCON_LIBS) else echo "compiling without xmedcon/libmdc file support" fi dnl Let people compile without rendering/libvolpack AC_ARG_ENABLE( libvolpack, [ --enable-libvolpack Compile in libvolpack rendering support [default=yes]], enable_libvolpack="$enableval", enable_libvolpack=yes) if (test $enable_libvolpack = yes) && (test $FOUND_VOLPACK = yes); then echo "compiling with libvolpack rendering support " AMIDE_LIBVOLPACK_LIBS="-lvolpack" AC_SUBST(AMIDE_LIBVOLPACK_LIBS) AC_DEFINE(AMIDE_LIBVOLPACK_SUPPORT, 1, Define to compile with VolPack) else echo "compiling without libvolpack rendering support" fi dnl Let people compile without mpeg movie generation/ffmpeg AC_ARG_ENABLE( ffmpeg, [ --enable-ffmpeg Compile in ffmpeg (libavcodec) mpeg encoding support [default=yes]], enable_ffmpeg="$enableval", enable_ffmpeg=yes) if (test $enable_ffmpeg = yes) && (test $FOUND_FFMPEG = yes); then echo "compiling with ffmpeg (libavcodec) mpeg encoding support " AC_DEFINE(AMIDE_FFMPEG_SUPPORT, 1, Define to compile with ffmpeg) AC_SUBST(FFMPEG_LIBS) AC_SUBST(FFMPEG_CFLAGS) else echo "compiling without ffmpeg (libavcodec) mpeg encoding support" dnl Let people compile with libfame mpeg movie generation if not using ffmpeg AM_PATH_LIBFAME(0.9.1, FOUND_LIBFAME=yes, FOUND_LIBFAME=no) dnl AC_CHECK_LIB(libfame, fame_init, FOUND_LIBFAME=yes, FOUND_LIBFAME=no) AC_ARG_ENABLE( libfame, [ --enable-libfame Compile in libfame mpeg encoding support if not using ffmpeg [default=no]], enable_libfame="$enableval", enable_libfame=no) if (test $enable_libfame = yes) && (test $FOUND_LIBFAME = yes); then echo "compiling with libfame mpeg encoding support " AC_DEFINE(AMIDE_LIBFAME_SUPPORT, 1, Define to compile with Libfame) else echo "compiling without libfame mpeg encoding support" fi fi dnl Let people compile without the DCMTK library AC_ARG_ENABLE( libdcmdata, [ --enable-libdcmdata Compile in DCMTK support for DICOM files [default=yes]], enable_libdcmdata="$enableval", enable_libdcmdata=yes) if (test $enable_libdcmdata = yes) && (test $FOUND_DCMDATA = yes); then echo "compiling with DCMTK support for DICOM files" AC_SUBST(AMIDE_LIBDCMDATA_LIBS) AC_SUBST(AMIDE_LIBDCMDATA_CFLAGS) AC_DEFINE(AMIDE_LIBDCMDATA_SUPPORT, 1, Define to compile with DCMTK) else echo "compiling without DCMTK support for DICOM files" fi ############################### # Check for gtk/gnome stuff ############################## PKG_CHECK_MODULES(AMIDE_GTK,[ glib-2.0 >= 2.16.0 gobject-2.0 >= 2.16.0 gtk+-2.0 >= 2.16.0 libxml-2.0 >= 2.4.12 libgnomecanvas-2.0 >= 2.0.0 ]) ## add in gconf if not on win32 or macos x ## gconf stuff is encapsulated in amide_gconf.c if (test $native_win32 = no) && (test $enable_native_gtk_osx = no); then PKG_CHECK_MODULES(AMIDE_GTK_EXTRA_GCONF,[ gconf-2.0 >= 2.14.0 ]) AMIDE_GTK_LIBS="$AMIDE_GTK_LIBS $AMIDE_GTK_EXTRA_GCONF_LIBS" AMIDE_GTK_CFLAGS="$AMIDE_GTK_CFLAGS $AMIDE_GTK_EXTRA_GCONF_CFLAGS" fi ## add in gnome-vfs if not on win32 or gtk-osx ## gnome-vfs is only used by amide_gnome.c and only on unix if (test $native_win32 = no) && (test $enable_native_gtk_osx = no); then PKG_CHECK_MODULES(AMIDE_GTK_EXTRA_GVFS,[ gnome-vfs-2.0 >= 2.16.0 ]) AMIDE_GTK_LIBS="$AMIDE_GTK_LIBS $AMIDE_GTK_EXTRA_GVFS_LIBS" AMIDE_GTK_CFLAGS="$AMIDE_GTK_CFLAGS $AMIDE_GTK_EXTRA_GVFS_CFLAGS" fi AC_SUBST(AMIDE_GTK_LIBS) AC_SUBST(AMIDE_GTK_CFLAGS) dnl glib-genmarshal AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) dnl This is installed from GTK+ 2.0's gdk-pixbuf AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource) test -z "$GDK_PIXBUF_CSOURCE" && AC_MSG_ERROR([ *** You need the gdk-pixbuf-csource tool which is installed *** from GTK+ 2's gdk-pixbuf. *** *** Either the location where you installed your GTK+ 2 is *** not in your PATH or something is screwed up with your *** GTK+ 2 installation ]) dnl libgnomecanvas anti-aliasing has been buggy in the past. I originally thought dnl this never would be fixed. Was unclear if the issues were in libgnomecanvas dnl or libart. In any case, as of libgnomecanvas 2.30.3 things seem stable, dnl so I'm re-enabling support for now dnl dnl record if our version of libgnomecanvas can handle anti-aliasing PKG_CHECK_MODULES(libgnomecanvas_greater_than_230, [libgnomecanvas-2.0 >= 2.3.0], enable_antialiasing=yes, enable_antialiasing=no) if test $enable_antialiasing = yes; then echo "compiling with libgnomecanvas antialiasing support" AC_DEFINE(AMIDE_LIBGNOMECANVAS_AA, 1, Define to compile AMIDE with an antialiased canvas) else echo "compiling without libgnomecanvas antialiasing support" AC_DEFINE(AMIDE_LIBGNOMECANVAS_AA, 0, Define to compile AMIDE with an antialiased canvas) fi ################################################################ # Checks for gtk-doc and docbook-tools, from gtk's configure.in ################################################################ dnl if we define --enable-gtk-doc, we build the library documentation GTK_DOC_CHECK([1.10]) dnl the following is for the application documentation AC_ARG_ENABLE(doc, [ --disable-doc Do not build documentation.],,) if test "x${enable_doc}" = "x" ; then enable_doc=yes fi AC_MSG_CHECKING(whether documentation should be built) if test ${enable_doc} = no; then AC_MSG_RESULT([no]) else AC_MSG_RESULT([yes]) fi AM_CONDITIONAL(DISABLE_DOC, test ${enable_doc} = no) if test ${enable_doc} = yes; then dnl building documentatin GNOME_DOC_INIT else dnl not building documentation ENABLE_SK_TRUE="#" ENABLE_SK_FALSE="" HAVE_GNOME_DOC_UTILS_TRUE="#" HAVE_GNOME_DOC_UTILS_FALSE="" fi AC_CHECK_PROG(DB2HTML, db2html, true, false) AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) AC_CONFIG_FILES([ Makefile pixmaps/Makefile src/Makefile win32/Makefile macosx/Makefile macosx/amide.plist doc/Makefile doc/reference/Makefile doc/reference/version.xml help/Makefile etc/Makefile etc/amide-$VERSION-1.info:etc/amide.info.in etc/amide-$VERSION-1.iss:etc/amide.iss.in etc/amide.spec man/Makefile po/Makefile.in]) AC_OUTPUT dnl help/C/Makefile dnl help/es/Makefile dnl Move the spec file so it won't get eaten by make distclean if [ test -f etc/amide.spec ]; then echo "Moving SPEC file to base directory" mv etc/amide.spec ./ fi amide-1.0.5/etc/0000755000175000017500000000000012271346313013221 5ustar loeningloeningamide-1.0.5/etc/amide.info.in0000644000175000017500000000171711536763271015601 0ustar loeningloeningPackage: amide Version: @VERSION@ Revision: 1 Source: http://osdn.dl.sourceforge.net/sourceforge/amide/%n-%v.tgz Source-MD5: Depends: volpack, xmedcon (>= 0.10.5), libavcodec1-shlibs, libxml2-shlibs, gsl-shlibs, libgnomecanvas2, atk1-shlibs, linc1-shlibs, yelp, dcmtk (>= 3.6.0), gnome-vfs2, gtk+2-shlibs (>= 2.16) BuildDepends: gtk-doc, libgnomecanvas2-dev, gconf2-dev, gnome-vfs2-dev, libart2, libjpeg, gsl, linc1, atk1, libxml2, libavcodec1-dev, dcmtk, gnome-vfs2-dev, gtk+2-dev (>=2.16) #Patch: %f.patch InstallScript: make install PREFIX=%p DESTDIR=%d ConfigureParams: --enable-gtk-doc=yes --enable-libecat=no --enable-amide-debug=no PKG_CONFIG_PATH=/sw/lib/pkgconfig #DocFiles: README COPYING AUTHORS Description: program for viewing and analyzing medical image data sets DescDetail: << AMIDE is a tool for viewing and analyzing medical image data sets. << License: GPL Homepage: http://amide.sourceforge.net/ Maintainer: Andy Loening amide-1.0.5/etc/amide.spec.in0000644000175000017500000000473311722021604015561 0ustar loeningloeningName: amide Version: @VERSION@ Release: 2%{?dist} Summary: Program for viewing and analyzing medical image data sets License: GPLv2+ Group: Applications/Engineering URL: http://amide.sourceforge.net Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Packager: Andy Loening Requires: xmedcon >= 0.10.0 Requires: gsl Requires: volpack Requires: ffmpeg-libs >= 0.4.9 Requires: dcmtk >= 3.6.0 Requires: gtk2 >= 2.16 Requires: gnome-vfs2 Requires: libgnomecanvas BuildRequires: xmedcon-devel BuildRequires: volpack-devel BuildRequires: libxml2-devel BuildRequires: gnome-doc-utils BuildRequires: libgnomecanvas-devel BuildRequires: ffmpeg-devel >= 0.4.9 BuildRequires: gsl-devel BuildRequires: dcmtk-devel BuildRequires: perl-XML-Parser BuildRequires: glib2-devel BuildRequires: gtk2-devel >= 2.10 BuildRequires: gnome-vfs2-devel %description AMIDE is a tool for viewing and analyzing medical image data sets. It's capabilities include the simultaneous handling of multiple data sets imported from a variety of file formats, image fusion, 3D region of interest drawing and analysis, volume rendering, and rigid body alignments. %prep %setup -q %build %configure \ --enable-libecat=no \ --enable-amide-debug=no \ --disable-scrollkeeper make %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT desktop-file-install --vendor gnome --delete-original \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ --add-category X-Red-Hat-Extra \ $RPM_BUILD_ROOT%{_datadir}/applications/* %clean rm -rf $RPM_BUILD_ROOT %post update-desktop-database %{_datadir}/applications %postun update-desktop-database %{_datadir}/applications %files %defattr(-, root, root) %doc AUTHORS COPYING ChangeLog NEWS README todo %{_bindir}/* %{_datadir}/pixmaps %{_datadir}/gnome %{_datadir}/omf %{_datadir}/applications %{_datadir}/locale %{_mandir}/* %changelog * Fri Feb 24 2011 Andy Loening - cutout gtk-doc building and scrollkeeper * Sun Dec 16 2007 Andy Loening - small tweak for new gnome-doc help files * Tue Nov 05 2002 Andy Loening - get it to work with scrollkeeper * Sun Dec 19 2000 Andy Loening - wrote this fool thing amide-1.0.5/etc/Makefile.am0000644000175000017500000000053507722451067015270 0ustar loeningloeningEXTRA_DIST = \ amide.spec.in \ amide.spec \ amide-$(VERSION)-1.info \ amide.desktop.in Applicationsdir = $(datadir)/applications/ Applications_in_files = amide.desktop.in Applications_DATA = $(Applications_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ DISTCLEANFILES = \ $(Applications_DATA) \ *~ \ amide-*.info \ amide-*.iss amide-1.0.5/etc/amide.desktop.in0000644000175000017500000000035511722016321016274 0ustar loeningloening[Desktop Entry] Encoding=UTF-8 _GenericName=Medical Image Examiner _Name=Amide _Comment=analysis tool for medical images Exec=amide Icon=amide_logo Terminal=false Type=Application Categories=Graphics;Education;Science;MedicalSoftware; amide-1.0.5/etc/amide.iss.in0000700000175000017500000000560112270275020015413 0ustar loeningloening; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! [Setup] AppName=@PACKAGE@ AppVerName=@PACKAGE@-@VERSION@-1 AppPublisher=@PACKAGE_BUGREPORT@ AppPublisherURL=http://amide.sourceforge.net AppCopyright=Copyright (C) 2000-2014 Andreas Loening AppSupportURL=http://amide.sourceforge.net AppUpdatesURL=http://amide.sourceforge.net DefaultDirName={pf}\@PACKAGE@ DefaultGroupName=@PACKAGE@ AllowNoIcons=yes LicenseFile=C:\Documents and Settings\loening\Desktop\@PACKAGE@-@VERSION@\COPYING OutputBaseFileName=@PACKAGE@-@VERSION@-1_install OutputDir=Inno_Output ChangesAssociations=yes [Tasks] Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:" [Registry] ; This adds the dll's in the bin directory to amide.exe's path Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\@PACKAGE@.exe"; Flags: uninsdeletekeyifempty Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\@PACKAGE@.exe"; ValueType: string; ValueData: "{app}\bin\@PACKAGE@.exe"; Flags: uninsdeletevalue Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\@PACKAGE@.exe"; ValueType: string; ValueName: "Path"; ValueData: "{app};{app}\bin"; Flags: uninsdeletevalue ; This allows .xif files to get sent to AMIDE Root: HKCR; Subkey: ".xif"; ValueType: string; ValueName: ""; ValueData: "AmideXmlImageFormat"; Flags: uninsdeletevalue Root: HKCR; Subkey: "AmideXmlImageFormat"; ValueType: string; ValueName: ""; ValueData: "amide"; Flags: uninsdeletekey Root: HKCR; Subkey: "AmideXmlImageFormat\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\AMIDE.EXE,1" Root: HKCR; Subkey: "AmideXmlImageFormat\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\bin\AMIDE.EXE"" ""%1""" [Files] Source: "C:\Documents and Settings\loening\Desktop\@PACKAGE@-@VERSION@\bin\*"; DestDir: "{app}\bin"; Flags: ignoreversion ; Source: "C:\Documents and Settings\loening\Desktop\@PACKAGE@-@VERSION@\help\*"; DestDir: "{app}\help\"; Flags: ignoreversion recursesubdirs Source: "C:\Documents and Settings\loening\Desktop\@PACKAGE@-@VERSION@\etc\*"; DestDir: "{app}\etc"; Flags: ignoreversion recursesubdirs Source: "C:\Documents and Settings\loening\Desktop\@PACKAGE@-@VERSION@\lib\*"; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs ; Source: "C:\Documents and Settings\loening\Desktop\@PACKAGE@-@VERSION@\man\*"; DestDir: "{app}\man"; Flags: ignoreversion recursesubdirs Source: "C:\Documents and Settings\loening\Desktop\@PACKAGE@-@VERSION@\share\*"; DestDir: "{app}\share"; Flags: ignoreversion recursesubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] Name: "{group}\amide"; Filename: "{app}\bin\amide.exe"; Name: "{userdesktop}\amide"; Filename: "{app}\bin\amide.exe"; Tasks: desktopicon amide-1.0.5/etc/Makefile.in0000664000175000017500000004213312271346300015267 0ustar loeningloening# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = etc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs $(srcdir)/amide.info.in \ $(srcdir)/amide.iss.in $(srcdir)/amide.spec.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/libfame.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/amide_config.h CONFIG_CLEAN_FILES = amide.spec CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(Applicationsdir)" DATA = $(Applications_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMIDE_CHECK_OBSOLETE_CFLAGS = @AMIDE_CHECK_OBSOLETE_CFLAGS@ AMIDE_DEBUG_CFLAGS = @AMIDE_DEBUG_CFLAGS@ AMIDE_GTK_CFLAGS = @AMIDE_GTK_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_CFLAGS = @AMIDE_GTK_EXTRA_GCONF_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_LIBS = @AMIDE_GTK_EXTRA_GCONF_LIBS@ AMIDE_GTK_EXTRA_GVFS_CFLAGS = @AMIDE_GTK_EXTRA_GVFS_CFLAGS@ AMIDE_GTK_EXTRA_GVFS_LIBS = @AMIDE_GTK_EXTRA_GVFS_LIBS@ AMIDE_GTK_LIBS = @AMIDE_GTK_LIBS@ AMIDE_LIBDCMDATA_CFLAGS = @AMIDE_LIBDCMDATA_CFLAGS@ AMIDE_LIBDCMDATA_LIBS = @AMIDE_LIBDCMDATA_LIBS@ AMIDE_LIBECAT_LIBS = @AMIDE_LIBECAT_LIBS@ AMIDE_LIBVOLPACK_LIBS = @AMIDE_LIBVOLPACK_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HELP_DIR = @HELP_DIR@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFAME_CFLAGS = @LIBFAME_CFLAGS@ LIBFAME_CONFIG = @LIBFAME_CONFIG@ LIBFAME_LIBS = @LIBFAME_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ OPTIMIZATION_CFLAGS = @OPTIMIZATION_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMEDCON_CFLAGS = @XMEDCON_CFLAGS@ XMEDCON_CONFIG = @XMEDCON_CONFIG@ XMEDCON_LIBS = @XMEDCON_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ intltool__v_merge_options_ = @intltool__v_merge_options_@ intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ libgnomecanvas_greater_than_230_CFLAGS = @libgnomecanvas_greater_than_230_CFLAGS@ libgnomecanvas_greater_than_230_LIBS = @libgnomecanvas_greater_than_230_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ amide.spec.in \ amide.spec \ amide-$(VERSION)-1.info \ amide.desktop.in Applicationsdir = $(datadir)/applications/ Applications_in_files = amide.desktop.in Applications_DATA = $(Applications_in_files:.desktop.in=.desktop) DISTCLEANFILES = \ $(Applications_DATA) \ *~ \ amide-*.info \ amide-*.iss all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu etc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): amide.spec: $(top_builddir)/config.status $(srcdir)/amide.spec.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-ApplicationsDATA: $(Applications_DATA) @$(NORMAL_INSTALL) @list='$(Applications_DATA)'; test -n "$(Applicationsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(Applicationsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(Applicationsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(Applicationsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(Applicationsdir)" || exit $$?; \ done uninstall-ApplicationsDATA: @$(NORMAL_UNINSTALL) @list='$(Applications_DATA)'; test -n "$(Applicationsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(Applicationsdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(Applicationsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-ApplicationsDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-ApplicationsDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-ApplicationsDATA install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-ApplicationsDATA uninstall-am @INTLTOOL_DESKTOP_RULE@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: amide-1.0.5/config.sub0000755000175000017500000010531512235260752014440 0ustar loeningloening#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-04-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or1k-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: amide-1.0.5/po/0000775000175000017500000000000012271346313013066 5ustar loeningloeningamide-1.0.5/po/zh_CN.po0000664000175000017500000031370412235251135014434 0ustar loeningloening# Simplified Chinese translation for Amide. # Copyright (C) . # # Wales Wang , 2003. # #: ../src/amitk_study.c:984 ../src/amitk_study.c:1053 msgid "" msgstr "" "Project-Id-Version: Amide 0.7.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-08-05 00:29+0200\n" "PO-Revision-Date: 2003-06-16 14:21+0800\n" "Last-Translator: Wales Wang \n" "Language-Team: zh_CN \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../etc/amide.desktop.in.h:1 msgid "A Medical Image Data Examiner" msgstr "高级医学图åƒå¯Ÿçœ‹å™¨" #: ../etc/amide.desktop.in.h:2 msgid "Amide" msgstr "高级医学图åƒå¯Ÿçœ‹å™¨" #: ../etc/amide.desktop.in.h:3 msgid "Medical Image Examiner" msgstr "医学图åƒå¯Ÿçœ‹å™¨" #: ../src/alignment.c:164 #, c-format msgid "Cannot perform an alignment with %d points, need at least 3" msgstr "所作的 %1$d åƒç´ å…³è”无法实行,至少为3" #: ../src/alignment.c:209 #, c-format msgid "points lists not completely used in %s at %d" msgstr "%1$s åƒç´ åˆ—表中 %2$d 未完全用完" #: ../src/alignment.c:225 ../src/fads.c:148 ../src/fads.c:292 #, c-format msgid "SV decomp returned error: %s" msgstr "SV è§£ç å‡ºé”™: %1$s " #: ../src/alignment.c:231 #, c-format msgid "transpose returned error: %s" msgstr "转æ¢å‡ºé”™: %1$s " #: ../src/alignment.c:237 #, c-format msgid "LU decomp returned error: %s" msgstr "LU è§£ç å‡ºé”™: %1$s " #: ../src/amide.c:44 #, fuzzy msgid "transverse" msgstr "横断é¢(_T)" #: ../src/amide.c:45 #, fuzzy msgid "coronal" msgstr "头断é¢(_C)" #: ../src/amide.c:46 #, fuzzy msgid "sagittal" msgstr "ç«–æ–­é¢(_S)" #: ../src/amide.c:50 #, fuzzy msgid "_Study" msgstr "新项目(_N)" #: ../src/amide.c:51 #, fuzzy msgid "Selected _Data Sets" msgstr "选择数æ®é›†" #: ../src/amide.c:52 msgid "Selected _ROIs" msgstr "" #: ../src/amide.c:53 msgid "Selected _Alignment Points" msgstr "" #: ../src/amide.c:58 ../src/tb_roi_analysis.c:104 msgid "Min" msgstr "最å°" #: ../src/amide.c:59 ../src/tb_roi_analysis.c:105 msgid "Max" msgstr "最大" #: ../src/amide.c:62 ../src/amitk_object_dialog.c:750 #: ../src/amitk_threshold.c:1304 msgid "Center" msgstr "中心" #: ../src/amide.c:63 ../src/amitk_threshold.c:1305 msgid "Width" msgstr "" #. N_("Bone"), #. N_("Soft Tissue") #: ../src/amide.c:70 msgid "Abdomen" msgstr "" #: ../src/amide.c:71 msgid "Brain" msgstr "" #: ../src/amide.c:72 msgid "Extremities" msgstr "" #: ../src/amide.c:73 msgid "Liver" msgstr "" #: ../src/amide.c:74 msgid "Lung" msgstr "" #: ../src/amide.c:75 msgid "Pelvis, soft tissue" msgstr "" #: ../src/amide.c:76 msgid "Skull Base" msgstr "" #: ../src/amide.c:77 msgid "Spine A" msgstr "" #: ../src/amide.c:78 msgid "Spine B" msgstr "" #: ../src/amide.c:79 msgid "Thorax, soft tissue" msgstr "" #: ../src/amide.c:405 #, fuzzy, c-format msgid "%s does not exist" msgstr "%1$s 图åƒåˆ†æžé¡¹ç›®ä¸å­˜åœ¨" #: ../src/amide.c:409 #, c-format msgid "Failed to load in as XIF file: %s" msgstr "" #: ../src/amide.c:428 #, fuzzy, c-format msgid "%s is not an AMIDE study or importable file type" msgstr "%1$s 䏿˜¯ä¸€ä¸ªå¯æ”¯æŒçš„图åƒåˆ†æžé¡¹ç›®æˆ–文件" #: ../src/amide.c:430 #, fuzzy, c-format msgid "%s is not an AMIDE XIF Directory" msgstr "%1$s 䏿˜¯ä¸€ä¸ªå¯æ”¯æŒçš„图åƒåˆ†æžé¡¹ç›®æˆ–文件" #: ../src/amitk_canvas.c:73 msgid "A" msgstr "" #: ../src/amitk_canvas.c:73 msgid "P" msgstr "" #: ../src/amitk_canvas.c:73 msgid "L" msgstr "" #: ../src/amitk_canvas.c:73 msgid "R" msgstr "" #: ../src/amitk_canvas.c:73 msgid "S" msgstr "" #: ../src/amitk_canvas.c:73 msgid "I" msgstr "" #: ../src/amitk_canvas.c:728 msgid "ROI Depth Selection" msgstr "ROI深度选择" #: ../src/amitk_canvas.c:742 msgid "Please pick depth of ROI (mm):" msgstr "请选择 ROI 深度 (mm)" #: ../src/amitk_canvas.c:844 msgid "Parent of isocontour not currently displayed, can't draw isocontour" msgstr "" #: ../src/amitk_canvas.c:861 msgid "No data set found to draw isocontour on" msgstr "" #: ../src/amitk_canvas.c:878 #, c-format msgid "designated voxel not in data set %s" msgstr "" #. pop up dialog to let user pick isocontour values, etc. and for any warning messages #: ../src/amitk_canvas.c:892 msgid "Isocontour Value Selection" msgstr "" #: ../src/amitk_canvas.c:914 #, c-format msgid "" "Multiple data frames are currently being shown from: %s\n" "The isocontour will only be drawn over frame %d" msgstr "" #: ../src/amitk_canvas.c:926 #, c-format msgid "" "Multiple gates are currently being shown from: %s\n" "The isocontour will only be drawn over gate %d" msgstr "" #. the spin buttons #: ../src/amitk_canvas.c:946 #, fuzzy msgid "Min:" msgstr "最å°" #: ../src/amitk_canvas.c:962 #, fuzzy msgid "Max:" msgstr "最大" #. radio buttons to choose the isocontour type #: ../src/amitk_canvas.c:981 msgid "Above Min" msgstr "" #: ../src/amitk_canvas.c:982 msgid "Below Max" msgstr "" #: ../src/amitk_canvas.c:983 msgid "Between Min/Max" msgstr "" #: ../src/amitk_canvas.c:1049 msgid "Parent of roi not currently displayed, can't draw freehand roi" msgstr "" #: ../src/amitk_canvas.c:1066 msgid "No data set found to draw freehand roi on" msgstr "" #. pop up dialog to let user pick isocontour values, etc. and for any warning messages #: ../src/amitk_canvas.c:1078 msgid "Freehand ROI Parameters" msgstr "" #: ../src/amitk_canvas.c:1097 #, c-format msgid "Voxel Size %s" msgstr "" #: ../src/amitk_canvas.c:1659 ../src/amitk_canvas.c:2220 #: ../src/amitk_canvas.c:2270 ../src/amitk_canvas.c:2278 #, fuzzy msgid "The active data set is not visible" msgstr "æ— å½“å‰æ•°æ®é›†å¯åˆ é™¤" #: ../src/amitk_canvas.c:3226 msgid "Canvas has no style?\n" msgstr "ç•Œé¢æ²¡æœ‰é£Žæ ¼?\n" #: ../src/amitk_color_table.c:38 msgid "black/white linear" msgstr "黑/白线性" #: ../src/amitk_color_table.c:39 msgid "white/black linear" msgstr "白/黑线性" #: ../src/amitk_color_table.c:40 msgid "black/white/black" msgstr "黑/白/黑" #: ../src/amitk_color_table.c:41 msgid "white/black/white" msgstr "白/黑/白" #: ../src/amitk_color_table.c:42 msgid "red temperature" msgstr "红色温度" #: ../src/amitk_color_table.c:43 msgid "inverse red temp." msgstr "红色逆温度" #: ../src/amitk_color_table.c:44 msgid "blue temperature" msgstr "è“色温度" #: ../src/amitk_color_table.c:45 msgid "inv. blue temp." msgstr "è“色逆温度" #: ../src/amitk_color_table.c:46 msgid "green temperature" msgstr "绿色温度" #: ../src/amitk_color_table.c:47 msgid "inv. green temp." msgstr "绿色逆温度" #: ../src/amitk_color_table.c:48 msgid "hot metal" msgstr "热金属色" #: ../src/amitk_color_table.c:49 msgid "inv. hot metal" msgstr "热逆金属色" #: ../src/amitk_color_table.c:50 #, fuzzy msgid "hot metal contour" msgstr "热金属色" #: ../src/amitk_color_table.c:51 #, fuzzy msgid "inv. hot metal c." msgstr "热逆金属色" #: ../src/amitk_color_table.c:52 msgid "hot blue" msgstr "热è“色" #: ../src/amitk_color_table.c:53 msgid "inverse hot blue" msgstr "热逆è“色" #: ../src/amitk_color_table.c:54 msgid "hot green" msgstr "热绿色" #: ../src/amitk_color_table.c:55 msgid "inverse hot green" msgstr "热逆绿色" #: ../src/amitk_color_table.c:56 msgid "spectrum" msgstr "光谱" #: ../src/amitk_color_table.c:57 msgid "inverse spectrum" msgstr "逆光谱" #: ../src/amitk_color_table.c:58 msgid "NIH + white" msgstr "NIH + 白色" #: ../src/amitk_color_table.c:59 msgid "inv. NIH + white" msgstr "NIH + 逆白色" #: ../src/amitk_color_table.c:60 msgid "NIH" msgstr "NIH" #: ../src/amitk_color_table.c:61 msgid "inverse NIH" msgstr "逆 NIH" #: ../src/amitk_data_set.c:89 msgid "interpolate using nearest neighbhor (fast)" msgstr "" #: ../src/amitk_data_set.c:90 msgid "interpolate using trilinear interpolation (slow)" msgstr "" #. place holder for AMITK_IMPORT_METHOD_GUESS #: ../src/amitk_data_set.c:96 msgid "_Raw Data" msgstr "原始数æ®(_R)" #: ../src/amitk_data_set.c:98 msgid "_DICOM via dcmtk" msgstr "" #: ../src/amitk_data_set.c:101 msgid "_ECAT 6/7 via libecat" msgstr "ECAT 6/7 通过 libecat(_E)" #: ../src/amitk_data_set.c:111 msgid "Import file as raw data" msgstr "å¯¼å…¥åŽŸå§‹æ•°æ®æ–‡ä»¶" #: ../src/amitk_data_set.c:113 msgid "Import a CTI 6.4 or 7.0 file using the libecat library" msgstr "使用libecat库导入CTI 6.4 或 7.0 æ•°æ®æ–‡ä»¶" #: ../src/amitk_data_set.c:116 #, fuzzy msgid "Import a DICOM file or directory file using the DCMTK library" msgstr "使用libecat库导入CTI 6.4 或 7.0 æ•°æ®æ–‡ä»¶" #: ../src/amitk_data_set.c:119 #, fuzzy msgid "Import via the (X)medcon library (libmdc)" msgstr "使用(X)medcon(libmdc)库导入" #: ../src/amitk_data_set.c:124 #, fuzzy msgid "Raw Data" msgstr "原始数æ®(_R)" #: ../src/amitk_data_set.c:132 #, fuzzy msgid "Export file as raw data" msgstr "å¯¼å…¥åŽŸå§‹æ•°æ®æ–‡ä»¶" #: ../src/amitk_data_set.c:134 #, fuzzy msgid "Export via the (X)medcon library (libmdc)" msgstr "使用(X)medcon(libmdc)库导入" #: ../src/amitk_data_set.c:139 msgid "Direct" msgstr "直接" #: ../src/amitk_data_set.c:140 msgid "%ID/g" msgstr "" #: ../src/amitk_data_set.c:141 msgid "SUV" msgstr "" #: ../src/amitk_data_set.c:145 msgid "MBq" msgstr "" #: ../src/amitk_data_set.c:146 msgid "mCi" msgstr "" #: ../src/amitk_data_set.c:147 msgid "uCi" msgstr "" #: ../src/amitk_data_set.c:148 msgid "nCi" msgstr "" #: ../src/amitk_data_set.c:152 msgid "Kg" msgstr "公斤" #: ../src/amitk_data_set.c:153 msgid "g" msgstr "" #: ../src/amitk_data_set.c:154 msgid "lbs" msgstr "磅" #: ../src/amitk_data_set.c:155 msgid "ounces" msgstr "盎å¸" #: ../src/amitk_data_set.c:159 msgid "MBq/cc/Image Units" msgstr "MBq/cc/åƒç´ " #: ../src/amitk_data_set.c:160 msgid "Image Units/(MBq/CC)" msgstr "åƒç´ /(MBq/CC)" #: ../src/amitk_data_set.c:161 msgid "mCi/cc/Image Units" msgstr "mCi/cc/åƒç´ " #: ../src/amitk_data_set.c:162 msgid "Image Units/(mCi/cc)" msgstr "åƒç´ /(mCi/cc)" #: ../src/amitk_data_set.c:163 msgid "uCi/cc/Image Units" msgstr "uCi/cc/åƒç´ " #: ../src/amitk_data_set.c:164 msgid "Image Units/(uCi/cc)" msgstr "åƒç´ /(uCi/cc)" #: ../src/amitk_data_set.c:165 msgid "nCi/cc/Image Units" msgstr "nCi/cc/åƒç´ " #: ../src/amitk_data_set.c:166 msgid "Image Units/(nCi/cc)" msgstr "åƒç´ /(nCi/cc)" #: ../src/amitk_data_set.c:170 msgid "Single Scale Factor" msgstr "" #: ../src/amitk_data_set.c:171 msgid "Per Frame Scale Factor" msgstr "" #: ../src/amitk_data_set.c:172 msgid "Per Plane Scale Factor" msgstr "" #: ../src/amitk_data_set.c:173 msgid "Single Scale Factor with Intercept" msgstr "" #: ../src/amitk_data_set.c:174 msgid "Per Frame Scale Factor with Intercept" msgstr "" #: ../src/amitk_data_set.c:175 msgid "Per Plane Scale Factor with Intercept" msgstr "" #: ../src/amitk_data_set.c:897 ../src/libmdc_interface.c:444 msgid "" "Voxel size X was read as 0, setting to 1 mm. This may be an " "internationalization error." msgstr "" #: ../src/amitk_data_set.c:901 ../src/libmdc_interface.c:448 msgid "" "Voxel size Y was read as 0, setting to 1 mm. This may be an " "internationalization error." msgstr "" #: ../src/amitk_data_set.c:905 ../src/libmdc_interface.c:452 msgid "" "Voxel size Z was read as 0, setting to 1 mm. This may be an " "internationalization error." msgstr "" #: ../src/amitk_data_set.c:944 msgid "" "internal scaling factor returned NULL... either file is corrupt, or AMIDE " "has a bug" msgstr "" #: ../src/amitk_data_set.c:1011 msgid "wrong type found on internal scaling, converting to double" msgstr "" #: ../src/amitk_data_set.c:1016 #, fuzzy msgid "Couldn't allocate memory space for the new scaling factors" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set.c:1308 #, fuzzy msgid "couldn't allocate memory space for the data set structure to hold data" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set.c:1316 msgid "raw_data_read_file failed returning NULL data set" msgstr "" #: ../src/amitk_data_set.c:1323 #, fuzzy msgid "couldn't allocate memory space for the frame duration info" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set.c:1419 #, c-format msgid "" "File has incorrect permissions for reading\n" "Can I try changing access permissions on:\n" " %s?" msgstr "" #: ../src/amitk_data_set.c:1431 ../src/amitk_data_set.c:1438 msgid "failed to change read permissions, you're probably not the owner" msgstr "" #: ../src/amitk_data_set.c:1445 msgid "" "failed to change read permissions on raw data file, you're probably not the " "owner" msgstr "" #. unrecognized file type #: ../src/amitk_data_set.c:1499 #, c-format msgid "" "Extension %s not recognized on file: %s\n" "Guessing File Type" msgstr "" #: ../src/amitk_data_set.c:1640 #, fuzzy msgid "Couldn't allocate memory space for row_data" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set.c:1646 #, fuzzy, c-format msgid "couldn't open file for writing: %s" msgstr "æ— æ³•è¯»å– %1$s 的值,代定为%2$d" #: ../src/amitk_data_set.c:1652 #, c-format msgid "" "Exporting Raw Data for:\n" " %s" msgstr "" #: ../src/amitk_data_set.c:1676 ../src/libmdc_interface.c:1106 #, c-format msgid "Error in generating resliced data, %dx%d != %dx%d" msgstr "" #: ../src/amitk_data_set.c:1701 #, c-format msgid "incomplete save of raw data, wrote %lx (bytes), file: %s" msgstr "" #: ../src/amitk_data_set.c:1797 #, fuzzy msgid "Generating new data set" msgstr "旋转数æ®é›†" #: ../src/amitk_data_set.c:1811 #, fuzzy msgid "Could not allocate memory space for volume" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set.c:1844 #, fuzzy msgid "Failed to allocate export data set" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set.c:2340 ../src/amitk_data_set.c:2361 #: ../src/amitk_data_set.c:2383 ../src/amitk_data_set.c:2405 msgid "unknown" msgstr "未知" #: ../src/amitk_data_set.c:3904 #, c-format msgid "" "Generating projections of:\n" " %s" msgstr "" #: ../src/amitk_data_set.c:3935 #, c-format msgid "" "couldn't allocate memory space for the projection, wanted %dx%dx%dx%dx%d " "elements" msgstr "" #. set a new name for this guy #: ../src/amitk_data_set.c:4159 #, c-format msgid "%s, cropped" msgstr "" #: ../src/amitk_data_set.c:4170 ../src/amitk_data_set.c:4177 #, fuzzy msgid "" "couldn't allocate memory space for the cropped internal scaling structure" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set.c:4183 #, c-format msgid "" "Generating cropped version of:\n" " %s" msgstr "" #: ../src/amitk_data_set.c:4363 #, fuzzy msgid "couldn't allocate memory space for the cropped raw data set structure" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set.c:4491 msgid "Filtering: Failed to allocate wavetable and workspace" msgstr "" #: ../src/amitk_data_set.c:4498 #, fuzzy msgid "couldn't allocate memory space for the subset structure" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set.c:4518 #, fuzzy msgid "Couldn't allocate memory space for the subset data" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set.c:4527 ../src/amitk_data_set.c:4709 #, fuzzy, c-format msgid "Filtering Data Set: %s" msgstr "过滤处ç†å½“剿•°æ®é›†(_F)" #: ../src/amitk_data_set.c:4680 msgid "data set z dimension to small for kernel, setting kernel dimension to 1" msgstr "" #: ../src/amitk_data_set.c:4684 msgid "data set y dimension to small for kernel, setting kernel dimension to 1" msgstr "" #: ../src/amitk_data_set.c:4688 msgid "data set x dimension to small for kernel, setting kernel dimension to 1" msgstr "" #: ../src/amitk_data_set.c:4701 #, fuzzy msgid "couldn't allocate memory space for the internal raw data" msgstr "无法为时间数æ®åˆ†é…空间" #. set a new name for this guy #: ../src/amitk_data_set.c:4888 #, c-format msgid "%s, %s filtered" msgstr "" #: ../src/amitk_data_set.c:4896 #, fuzzy msgid "couldn't allocate memory space for the filtered raw data set structure" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set.c:4923 msgid "failed to calculate 3D gaussian kernel" msgstr "" #: ../src/amitk_data_set.c:5341 #, fuzzy msgid "couldn't allocate memory space for the output_ds data set structure" msgstr "无法为时间数æ®åˆ†é…空间" #. set a new name for this guy #: ../src/amitk_data_set.c:5357 #, c-format msgid "Result: %s %s %s" msgstr "" #: ../src/amitk_data_set.c:5392 #, fuzzy msgid "couldn't generate slices from the data set..." msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_data_set_variable_type.c:56 #, c-format msgid "" "Calculating Max/Min Values for:\n" " %s" msgstr "" #: ../src/amitk_data_set_variable_type.c:136 msgid "" "couldn't allocate memory space for the data set structure to hold " "distribution data" msgstr "" #: ../src/amitk_data_set_variable_type.c:144 #, c-format msgid "" "Generating distribution data for:\n" " %s" msgstr "" #: ../src/amitk_data_set_variable_type.c:259 #, fuzzy, c-format msgid "couldn't allocate memory space for the slice, wanted %dx%dx%d elements" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_filter.c:61 #, fuzzy msgid "couldn't allocate memory space for the kernel structure" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_filter.c:73 #, fuzzy msgid "Couldn't allocate memory space for the kernel data" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_object.c:602 msgid "AMIDE xml file doesn't appear to have a root." msgstr "" #: ../src/amitk_object_dialog.c:156 #, c-format msgid "Copy of %s" msgstr "" #: ../src/amitk_object_dialog.c:236 msgid "Basic Info" msgstr "基本信æ¯" #: ../src/amitk_object_dialog.c:244 msgid "Data Set Name:" msgstr "" #: ../src/amitk_object_dialog.c:246 #, fuzzy msgid "Name:" msgstr "时间:" #. widgets to change the object's type #: ../src/amitk_object_dialog.c:266 msgid "Type:" msgstr "" #. widgets to change the date of the scan name #: ../src/amitk_object_dialog.c:331 msgid "Scan Date:" msgstr "" #. widgets to change the object's modality #: ../src/amitk_object_dialog.c:344 msgid "Modality:" msgstr "" #. widget to change the interpolation #: ../src/amitk_object_dialog.c:373 msgid "Interpolation Type" msgstr "" #. widgets to change the subject name associated with the data #: ../src/amitk_object_dialog.c:426 msgid "Subject Name:" msgstr "" #. widgets to change the id associated with the data #: ../src/amitk_object_dialog.c:440 msgid "Subject ID:" msgstr "" #. widgets to change the subject's date of birth #: ../src/amitk_object_dialog.c:453 msgid "Subject DOB:" msgstr "" #. widgets to change the subject's orientation #: ../src/amitk_object_dialog.c:467 msgid "Subject Orientation:" msgstr "" #. widget to change the scaling factor #: ../src/amitk_object_dialog.c:507 msgid "Conversion Type:" msgstr "" #: ../src/amitk_object_dialog.c:541 msgid "Scaling Factor:" msgstr "" #. injected dose #: ../src/amitk_object_dialog.c:568 msgid "Injected Dose:" msgstr "" #. subject weight #: ../src/amitk_object_dialog.c:613 msgid "Subject Weight:" msgstr "" #. cylinder factor #: ../src/amitk_object_dialog.c:658 msgid "Cylinder Factor:" msgstr "" #. widgets to change the study's creation date #: ../src/amitk_object_dialog.c:708 msgid "Creation Date:" msgstr "" #: ../src/amitk_object_dialog.c:748 msgid "View Center" msgstr "察看中心" #: ../src/amitk_object_dialog.c:757 msgid "View Center (mm from origin)" msgstr "" #: ../src/amitk_object_dialog.c:759 msgid "Center Location (mm from origin)" msgstr "" #: ../src/amitk_object_dialog.c:814 msgid "Voxel Size" msgstr "" #: ../src/amitk_object_dialog.c:818 msgid "Voxel Size (mm)" msgstr "" #: ../src/amitk_object_dialog.c:872 msgid "Dimensions" msgstr "尺寸" #. widgets to change the dimensions of the objects (in object's space) #: ../src/amitk_object_dialog.c:877 msgid "Dimensions (mm) wrt to ROI" msgstr "" #: ../src/amitk_object_dialog.c:922 msgid "Rotate" msgstr "旋转" #: ../src/amitk_object_dialog.c:937 msgid "Colormap/Threshold" msgstr "" #. start making the page to adjust time values #: ../src/amitk_object_dialog.c:954 msgid "Time" msgstr "æ—¶é—´" #. scan start time..... #: ../src/amitk_object_dialog.c:962 msgid "Scan Start Time (s)" msgstr "" #. frame duration(s).... #: ../src/amitk_object_dialog.c:988 ../src/tb_roi_analysis.c:95 msgid "Frame" msgstr "" #: ../src/amitk_object_dialog.c:993 ../src/tb_roi_analysis.c:96 msgid "Duration (s)" msgstr "" #: ../src/amitk_object_dialog.c:1052 ../src/ui_preferences_dialog.c:376 msgid "ROI/View Preferences" msgstr "" #. AMITK_IS_DATA_SET #: ../src/amitk_object_dialog.c:1054 msgid "Windowing Preferences" msgstr "" #: ../src/amitk_object_dialog.c:1139 msgid "Immutables" msgstr "ä¸å¯å˜çš„" #: ../src/amitk_object_dialog.c:1145 msgid "Max-Min Voxel Dim" msgstr "" #: ../src/amitk_object_dialog.c:1161 msgid "Isocontour Min Specified Value" msgstr "" #: ../src/amitk_object_dialog.c:1174 msgid "Isocontour Max Specified Value" msgstr "" #: ../src/amitk_object_dialog.c:1215 msgid "Memory Used (GB):" msgstr "" #: ../src/amitk_object_dialog.c:1218 msgid "Memory Used (MB):" msgstr "" #: ../src/amitk_object_dialog.c:1221 msgid "Memory Used (KB):" msgstr "" #: ../src/amitk_object_dialog.c:1225 msgid "Memory Used (bytes):" msgstr "" #. widget to tell you the internal data format #: ../src/amitk_object_dialog.c:1244 msgid "Data Format:" msgstr "" #. widget to tell you the scaling format #: ../src/amitk_object_dialog.c:1267 msgid "Scale Format:" msgstr "" #. widgets to display the data set dimensions #: ../src/amitk_object_dialog.c:1290 msgid "Data Set Dimensions (voxels)" msgstr "" #: ../src/amitk_object_dialog.c:2404 #, c-format msgid "Modification Dialog: %s\n" msgstr "" #: ../src/amitk_point.c:90 #, c-format msgid "Couldn't read value for %s, substituting [%5.3f %5.3f %5.3f]" msgstr "" #: ../src/amitk_point.c:180 #, fuzzy, c-format msgid "Couldn't read value for %s, substituting [%d %d %d %d %d]" msgstr "æ— æ³•è¯»å– %1$s 的值,代定为%2$d" #: ../src/amitk_point.c:188 #, fuzzy, c-format msgid "Couldn't read gate value for %s, substituting %d" msgstr "æ— æ³•è¯»å– %1$s 的值,代定为%2$d" #: ../src/amitk_point.c:192 #, c-format msgid "Couldn't read frame value for %s, substituting %d" msgstr "" #: ../src/amitk_progress_dialog.c:165 msgid "Progress Dialog" msgstr "è¿›åº¦å¯¹è¯æ¡†" #: ../src/amitk_raw_data.c:51 ../src/amitk_raw_data.c:130 msgid "Unsigned Byte (8 bit)" msgstr "" #: ../src/amitk_raw_data.c:52 ../src/amitk_raw_data.c:131 msgid "Signed Byte (8 bit)" msgstr "" #: ../src/amitk_raw_data.c:53 msgid "Unsigned Short (16 bit)" msgstr "" #: ../src/amitk_raw_data.c:54 msgid "Signed Short (16 bit)" msgstr "" #: ../src/amitk_raw_data.c:55 msgid "Unsigned Integer (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:56 msgid "Signed Integer (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:57 msgid "Float (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:58 msgid "Double (64 bit)" msgstr "" #: ../src/amitk_raw_data.c:132 msgid "Unsigned Short, Little Endian (16 bit)" msgstr "" #: ../src/amitk_raw_data.c:133 msgid "Signed Short, Little Endian (16 bit)" msgstr "" #: ../src/amitk_raw_data.c:134 msgid "Unsigned Integer, Little Endian (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:135 msgid "Signed Integer, Little Endian (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:136 msgid "Float, Little Endian (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:137 msgid "Double, Little Endian (64 bit)" msgstr "" #: ../src/amitk_raw_data.c:138 msgid "Unsigned Short, Big Endian (16 bit)" msgstr "" #: ../src/amitk_raw_data.c:139 msgid "Signed Short, Big Endian (16 bit)" msgstr "" #: ../src/amitk_raw_data.c:140 msgid "Unsigned Integer, Big Endian (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:141 msgid "Signed Integer, Big Endian (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:142 msgid "Float, Big Endian (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:143 msgid "Double, Big Endian (64 bit)" msgstr "" #: ../src/amitk_raw_data.c:144 msgid "Unsigned Integer, PDP (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:145 msgid "Signed Integer, PDP (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:146 msgid "Float, PDP/VAX (32 bit)" msgstr "" #: ../src/amitk_raw_data.c:147 msgid "ASCII (8 bit)" msgstr "" #: ../src/amitk_raw_data.c:350 #, c-format msgid "Reading: %s" msgstr "" #: ../src/amitk_raw_data.c:359 #, fuzzy msgid "couldn't allocate memory space for the raw data set structure" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_raw_data.c:367 ../src/amitk_raw_data.c:372 #, c-format msgid "couldn't open raw data file %s" msgstr "" #. EOF is usually -1 #: ../src/amitk_raw_data.c:385 #, c-format msgid "" "could not step forward %d elements in raw data file:\n" "\treturned error: %d" msgstr "" #: ../src/amitk_raw_data.c:391 #, c-format msgid "could not seek forward %ld bytes in raw data file" msgstr "" #: ../src/amitk_raw_data.c:400 #, fuzzy, c-format msgid "couldn't malloc %zd bytes for file buffer\n" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/amitk_raw_data.c:423 #, c-format msgid "read wrong # of elements from raw data, expected %zd, got %zd" msgstr "" #. EOF = -1 (usually) #: ../src/amitk_raw_data.c:447 #, c-format msgid "" "could not read ascii file after %d elements, file or parameters are erroneous" msgstr "" #: ../src/amitk_raw_data.c:813 #, c-format msgid "couldn't save raw data file: %s" msgstr "" #: ../src/amitk_raw_data.c:841 #, c-format msgid "" "incomplete save of raw data, wrote %zd (bytes), needed %zd (bytes), file: %s" msgstr "" #: ../src/amitk_raw_data.c:915 #, c-format msgid "Raw data xml file doesn't appear to have a root: %s" msgstr "" #: ../src/amitk_raw_data.c:956 ../src/xml.c:672 ../src/xml.c:678 msgid "File to large to read on 32bit platform." msgstr "" #: ../src/amitk_roi.c:44 msgid "_Ellipsoid" msgstr "" #: ../src/amitk_roi.c:45 msgid "Elliptic _Cylinder" msgstr "" #: ../src/amitk_roi.c:46 msgid "_Box" msgstr "" #: ../src/amitk_roi.c:47 msgid "_2D Isocontour" msgstr "" #: ../src/amitk_roi.c:48 msgid "_3D Isocontour" msgstr "" #: ../src/amitk_roi.c:49 msgid "_2D Freehand" msgstr "" #: ../src/amitk_roi.c:50 msgid "_3D Freehand" msgstr "" #: ../src/amitk_roi.c:54 msgid "Add a new elliptical ROI" msgstr "" #: ../src/amitk_roi.c:55 msgid "Add a new elliptic cylinder ROI" msgstr "" #: ../src/amitk_roi.c:56 msgid "Add a new box shaped ROI" msgstr "" #: ../src/amitk_roi.c:57 msgid "Add a new 2D Isocontour ROI" msgstr "" #: ../src/amitk_roi.c:58 msgid "Add a new 3D Isocontour ROI" msgstr "" #: ../src/amitk_roi.c:59 #, fuzzy msgid "Add a new 2D Freehand ROI" msgstr "新增ROI文件" #: ../src/amitk_roi.c:60 #, fuzzy msgid "Add a new 3D Freehand ROI" msgstr "新增ROI文件" #: ../src/amitk_roi_variable_type.c:59 ../src/amitk_roi_variable_type.c:71 msgid "Out of Memory" msgstr "" #. and a display of the current axis #: ../src/amitk_space_edit.c:144 msgid "i" msgstr "" #: ../src/amitk_space_edit.c:147 msgid "j" msgstr "" #: ../src/amitk_space_edit.c:150 msgid "k" msgstr "" #: ../src/amitk_space_edit.c:185 msgid "data set axis:" msgstr "" #. button to apply entries #: ../src/amitk_space_edit.c:191 msgid "apply manual entries" msgstr "" #. button to reset the axis #: ../src/amitk_space_edit.c:199 msgid "reset to identity" msgstr "" #. our AIR buttons #: ../src/amitk_space_edit.c:215 #, fuzzy msgid "AIR Files:" msgstr "文件" #: ../src/amitk_space_edit.c:220 msgid "Apply .AIR" msgstr "" #: ../src/amitk_space_edit.c:227 #, fuzzy msgid "Export .AIR" msgstr "导出视图(_E)" #. first double check that we really want to do this #: ../src/amitk_space_edit.c:361 msgid "" "Do you really wish to manual set the axis?\n" "This may flip left/right relationships" msgstr "" #. first double check that we really want to do this #: ../src/amitk_space_edit.c:391 msgid "" "Do you really wish to reset the axis to identity?\n" "This may flip left/right relationships" msgstr "" #. first double check that we really want to do this #: ../src/amitk_space_edit.c:415 msgid "" "Do you really wish to invert?\n" "This will flip left/right relationships" msgstr "" #: ../src/amitk_study.c:42 msgid "blend all data sets" msgstr "" #: ../src/amitk_study.c:43 msgid "overlay active data set on blended data sets" msgstr "" #: ../src/amitk_study.c:47 msgid "single view" msgstr "" #: ../src/amitk_study.c:48 msgid "linked view, 2 way" msgstr "" #: ../src/amitk_study.c:49 msgid "linked view, 3 way" msgstr "" #: ../src/amitk_study.c:53 msgid "All objects are shown in a single view" msgstr "" #: ../src/amitk_study.c:54 msgid "Objects are shown between 2 linked views" msgstr "" #: ../src/amitk_study.c:55 msgid "Objects are shown between 3 linked views" msgstr "" #: ../src/amitk_study.c:489 #, c-format msgid "inappropriate zoom (%5.3f) for study, reseting to 1.0" msgstr "" #: ../src/amitk_study.c:924 ../src/amitk_study.c:1025 #: ../src/amitk_study.c:1157 #, fuzzy, c-format msgid "Couldn't open file %s\n" msgstr "ä¸èƒ½è½¬æ¢æ–‡ä»¶å" #: ../src/amitk_study.c:985 msgid "The above warnings may arise because portions of the XIF" msgstr "" #: ../src/amitk_study.c:986 msgid "file were corrupted." msgstr "" #: ../src/amitk_study.c:1019 msgid "Couldn't change directories in loading study" msgstr "" #: ../src/amitk_study.c:1037 msgid "" "File is corrupt. The file may have been incompletely saved. You can " "attempt recovering the file by using the recover function under the file " "menu." msgstr "" #: ../src/amitk_study.c:1054 msgid "The above warnings most likely indicate changes to the" msgstr "" #: ../src/amitk_study.c:1055 msgid "XIF file format, please resave the data as soon as possible." msgstr "" #: ../src/amitk_study.c:1067 ../src/amitk_study.c:1171 msgid "Couldn't return to previous directory in load study" msgstr "" #: ../src/amitk_study.c:1107 ../src/amitk_study.c:1119 #, c-format msgid "Couldn't unlink file: %s" msgstr "" #: ../src/amitk_study.c:1113 #, c-format msgid "Couldn't remove directory: %s" msgstr "" #: ../src/amitk_study.c:1124 #, c-format msgid "Unrecognized file type for file: %s, couldn't delete" msgstr "" #: ../src/amitk_study.c:1138 #, c-format msgid "Couldn't create amide directory: %s" msgstr "" #: ../src/amitk_study.c:1152 msgid "Couldn't change directories in writing study, study not saved" msgstr "" #: ../src/amitk_threshold.c:49 msgid "per slice" msgstr "" #: ../src/amitk_threshold.c:50 msgid "per frame" msgstr "" #: ../src/amitk_threshold.c:51 msgid "interpolated between frames" msgstr "" #: ../src/amitk_threshold.c:52 msgid "global" msgstr "" #: ../src/amitk_threshold.c:56 msgid "" "threshold the images based on the max and min values in the current slice" msgstr "" #: ../src/amitk_threshold.c:57 msgid "" "threshold the images based on the max and min values in the current frame" msgstr "" #: ../src/amitk_threshold.c:58 msgid "" "threshold the images based on max and min values interpolated from the " "reference frame thresholds" msgstr "" #: ../src/amitk_threshold.c:59 msgid "" "threshold the images based on the max and min values of the entire data set" msgstr "" #: ../src/amitk_threshold.c:63 #, fuzzy msgid "Min/Max" msgstr "最å°" #: ../src/amitk_threshold.c:64 #, fuzzy msgid "Center/Width" msgstr "中心" #: ../src/amitk_threshold.c:68 msgid "threshold by setting min and max values - Nuclear Medicine Style" msgstr "" #: ../src/amitk_threshold.c:69 msgid "theshold by setting a window center and width - Radiology Style" msgstr "" #: ../src/amitk_threshold.c:302 msgid "Percent" msgstr "" #: ../src/amitk_threshold.c:366 msgid "Color Table:" msgstr "" #: ../src/amitk_threshold.c:368 #, c-format msgid "Color Table %d:" msgstr "" #: ../src/amitk_threshold.c:388 msgid "enable color table" msgstr "" #: ../src/amitk_threshold.c:389 msgid "" "if not enabled, the primary color table will be used for this set of views" msgstr "" #. threshold type selection #: ../src/amitk_threshold.c:404 msgid "Threshold Type" msgstr "" #. threshold type selection #: ../src/amitk_threshold.c:447 ../src/ui_preferences_dialog.c:486 msgid "Threshold Style" msgstr "" #. color table selector #: ../src/amitk_threshold.c:506 msgid "ref. frame 0:" msgstr "" #. show/hide taken care of by threshold_update_layout #: ../src/amitk_threshold.c:511 msgid "ref. frame 1:" msgstr "" #: ../src/amitk_threshold.c:541 msgid "distribution" msgstr "" #: ../src/amitk_threshold.c:549 msgid "full" msgstr "" #. show/hide taken care of by threshold_update_layout #: ../src/amitk_threshold.c:555 msgid "scaled" msgstr "" #: ../src/amitk_threshold.c:766 msgid "Threshold has no style?\n" msgstr "" #: ../src/amitk_threshold.c:1309 msgid "Max Threshold" msgstr "" #: ../src/amitk_threshold.c:1310 msgid "Min Threshold" msgstr "" #: ../src/amitk_threshold.c:1367 msgid "Absolute" msgstr "" #. reset the title #: ../src/amitk_threshold.c:2182 ../src/amitk_threshold.c:2238 #, c-format msgid "Data Set: %s\n" msgstr "" #: ../src/amitk_threshold.c:2217 ../src/amitk_threshold.c:2358 msgid "Threshold Dialog" msgstr "" #: ../src/amitk_xif_sel.c:541 msgid "Filename" msgstr "文件å" #: ../src/amitk_xif_sel.c:542 msgid "The currently selected filename" msgstr "当å‰é€‰ä¸­æ–‡ä»¶å" #: ../src/amitk_xif_sel.c:548 msgid "Show file operations" msgstr "显示文件æ“作" #: ../src/amitk_xif_sel.c:549 msgid "Whether buttons for creating/manipulating files should be displayed" msgstr "" #: ../src/amitk_xif_sel.c:556 msgid "Select multiple" msgstr "多选" #: ../src/amitk_xif_sel.c:557 msgid "Whether to allow multiple files to be selected" msgstr "" #: ../src/amitk_xif_sel.c:712 msgid "Folders" msgstr "目录" #: ../src/amitk_xif_sel.c:716 msgid "Fol_ders" msgstr "目录(_d)" #: ../src/amitk_xif_sel.c:748 #, fuzzy msgid "XIF Files" msgstr "文件" #: ../src/amitk_xif_sel.c:752 #, fuzzy msgid "XIF _Files" msgstr "文件(_F)" #: ../src/amitk_xif_sel.c:834 ../src/amitk_xif_sel.c:2237 #, c-format msgid "Folder unreadable: %s" msgstr "" #: ../src/amitk_xif_sel.c:936 #, c-format msgid "Error getting dropped filename: %s\n" msgstr "" #: ../src/amitk_xif_sel.c:965 #, c-format msgid "" "The file \"%s\" resides on another machine (called %s) and may not be " "available to this program.\n" "Are you sure that you want to select it?" msgstr "" #: ../src/amitk_xif_sel.c:1018 #, c-format msgid "Error getting filename: %s\n" msgstr "" #: ../src/amitk_xif_sel.c:1096 msgid "_New Folder" msgstr "创建目录(_N)" #: ../src/amitk_xif_sel.c:1106 msgid "De_lete File" msgstr "删除文件(_l)" #: ../src/amitk_xif_sel.c:1116 msgid "_Rename File" msgstr "é‡å‘½å文件(_R)" #: ../src/amitk_xif_sel.c:1412 #, c-format msgid "" "The folder name \"%s\" contains symbols that are not allowed in filenames" msgstr "" #: ../src/amitk_xif_sel.c:1414 #, c-format msgid "" "Error creating folder \"%s\": %s\n" "%s" msgstr "" #: ../src/amitk_xif_sel.c:1415 ../src/amitk_xif_sel.c:1652 msgid "You probably used symbols not allowed in filenames." msgstr "" #: ../src/amitk_xif_sel.c:1423 #, c-format msgid "Error creating folder \"%s\": %s\n" msgstr "" #: ../src/amitk_xif_sel.c:1456 msgid "New Folder" msgstr "新目录" #: ../src/amitk_xif_sel.c:1471 msgid "_Folder name:" msgstr "目录å(_F)" #: ../src/amitk_xif_sel.c:1496 msgid "C_reate" msgstr "新建(_r)" #: ../src/amitk_xif_sel.c:1541 #, c-format msgid "The filename \"%s\" contains symbols that are not allowed in filenames" msgstr "" #: ../src/amitk_xif_sel.c:1544 #, c-format msgid "" "Error deleting file \"%s\": %s\n" "%s" msgstr "" #: ../src/amitk_xif_sel.c:1546 ../src/amitk_xif_sel.c:1666 msgid "It probably contains symbols not allowed in filenames." msgstr "" #: ../src/amitk_xif_sel.c:1555 #, c-format msgid "Error deleting file \"%s\": %s" msgstr "" #: ../src/amitk_xif_sel.c:1598 #, c-format msgid "Really delete file \"%s\" ?" msgstr "" #: ../src/amitk_xif_sel.c:1602 msgid "Delete File" msgstr "删除文件" #: ../src/amitk_xif_sel.c:1648 ../src/amitk_xif_sel.c:1662 #, c-format msgid "The file name \"%s\" contains symbols that are not allowed in filenames" msgstr "" #: ../src/amitk_xif_sel.c:1650 #, c-format msgid "" "Error renaming file to \"%s\": %s\n" "%s" msgstr "" #: ../src/amitk_xif_sel.c:1664 #, c-format msgid "" "Error renaming file \"%s\": %s\n" "%s" msgstr "" #: ../src/amitk_xif_sel.c:1674 #, c-format msgid "Error renaming file \"%s\" to \"%s\": %s" msgstr "" #: ../src/amitk_xif_sel.c:1720 msgid "Rename File" msgstr "é‡å‘½å文件" #: ../src/amitk_xif_sel.c:1735 #, c-format msgid "Rename file \"%s\" to:" msgstr "" #: ../src/amitk_xif_sel.c:1765 msgid "_Rename" msgstr "" #: ../src/amitk_xif_sel.c:2217 msgid "_Selection: " msgstr "" #: ../src/amitk_xif_sel.c:3113 #, c-format msgid "" "The filename \"%s\" couldn't be converted to UTF-8 (try setting the " "environment variable G_BROKEN_FILENAMES): %s" msgstr "" #: ../src/amitk_xif_sel.c:3116 msgid "Invalid Utf-8" msgstr "无效的 UTF-8 字符" #: ../src/amitk_xif_sel.c:3991 msgid "Name too long" msgstr "å字太长" #: ../src/amitk_xif_sel.c:3993 msgid "Couldn't convert filename" msgstr "ä¸èƒ½è½¬æ¢æ–‡ä»¶å" #: ../src/dcmtk_interface.cc:131 ../src/dcmtk_interface.cc:1299 #, c-format msgid "could not find dataset in DICOM file %s\n" msgstr "" #: ../src/dcmtk_interface.cc:141 #, c-format msgid "Modality %s is not understood. Ignoring File %s" msgstr "" #: ../src/dcmtk_interface.cc:172 #, c-format msgid "could not find # of columns - Failed to load file %s\n" msgstr "" #: ../src/dcmtk_interface.cc:178 #, c-format msgid "could not find # of rows - Failed to load file %s\n" msgstr "" #: ../src/dcmtk_interface.cc:208 #, c-format msgid "could not find # of bits allocated - Failed to load file %s\n" msgstr "" #: ../src/dcmtk_interface.cc:214 #, c-format msgid "could not find pixel representation - Failed to load file %s\n" msgstr "" #: ../src/dcmtk_interface.cc:233 #, c-format msgid "unsupported # of bits allocated (%d) - Failed to load file %s\n" msgstr "" #: ../src/dcmtk_interface.cc:240 #, c-format msgid "" "Couldn't allocate space for the data set structure to hold DCMTK data - " "Failed to load file %s" msgstr "" #: ../src/dcmtk_interface.cc:253 #, c-format msgid "Could not find the pixel size, setting to 1 mm for File %s" msgstr "" #: ../src/dcmtk_interface.cc:265 #, c-format msgid "Could not find the slice thickness, setting to 1 mm for File %s" msgstr "" #: ../src/dcmtk_interface.cc:498 #, c-format msgid "error reading in pixel data - DCMTK error: %s - Failed to read file" msgstr "" #: ../src/dcmtk_interface.cc:768 #, c-format msgid "" "Cannot evenly divide the number of slices by the number of frames for data " "set %s - ignoring dynamic data" msgstr "" #: ../src/dcmtk_interface.cc:777 #, c-format msgid "" "Cannot evenly divide the number of slices by the number of gates for data " "set %s - ignoring gated data" msgstr "" #: ../src/dcmtk_interface.cc:818 msgid "couldn't allocate space for the frame duration info" msgstr "" #: ../src/dcmtk_interface.cc:898 #, c-format msgid "" "Detected discontinous frames in data set %s - frame start times will be " "incorrect" msgstr "" #: ../src/dcmtk_interface.cc:901 #, c-format msgid "" "Slice thickness (%5.3f mm) not equal to slice spacing (%5.3f mm) in data set " "%s - will use slice spacing for thickness" msgstr "" #: ../src/dcmtk_interface.cc:1031 msgid "Importing File(s) Through DCMTK" msgstr "" #: ../src/dcmtk_interface.cc:1048 msgid "no support for multislice files within DICOM directory format" msgstr "" #: ../src/dcmtk_interface.cc:1306 msgid "Scanning Files to find additional DICOM Slices" msgstr "" #: ../src/dcmtk_interface.cc:1380 msgid "" "Multiple data sets were found in the same directory as the specified file. " "In addition to the dataset corresponding to the specified file, would you " "like to load in these additional datasets?" msgstr "" #: ../src/dcmtk_interface.cc:1577 msgid "" "Could not find a DICOM Data Dictionary. Reading may fail. Consider " "defining the environmental variable DCMDICTPATH to the dicom.dic file." msgstr "" #: ../src/dcmtk_interface.cc:1582 #, c-format msgid "could not read DICOM file %s, dcmtk returned %s" msgstr "" #: ../src/libecat_interface.c:35 msgid "Unknown Data Type" msgstr "" #. UnknownMatDataType #: ../src/libecat_interface.c:36 msgid "Byte" msgstr "" #. ByteData #: ../src/libecat_interface.c:37 msgid "Short (16 bit), Little Endian" msgstr "" #. VAX_Ix2 #: ../src/libecat_interface.c:38 msgid "Integer (32 bit), Little Endian" msgstr "" #. VAX_Ix4 #: ../src/libecat_interface.c:39 msgid "VAX Float (32 bit)" msgstr "" #. VAX_Rx4 #: ../src/libecat_interface.c:40 msgid "IEEE Float (32 bit)" msgstr "" #. IeeeFloat #: ../src/libecat_interface.c:41 msgid "Short (16 bit), Big Endian" msgstr "" #. SunShort #: ../src/libecat_interface.c:42 msgid "Integer (32 bit), Big Endian" msgstr "" #: ../src/libecat_interface.c:87 #, c-format msgid "Can't open file %s using libecat" msgstr "" #: ../src/libecat_interface.c:111 #, c-format msgid "Don't know how to handle this CTI file type: %d" msgstr "" #: ../src/libecat_interface.c:121 #, c-format msgid "Libecat can't get header info at matrix %x in file %s" msgstr "" #: ../src/libecat_interface.c:143 #, c-format msgid "No support for importing CTI files with data type of: %d (%s)" msgstr "" #: ../src/libecat_interface.c:175 #, fuzzy msgid "" "Couldn't allocate memory space for the data set structure to hold CTI data" msgstr "无法为时间数æ®åˆ†é…空间" #. handle corrupted cti files #: ../src/libecat_interface.c:281 msgid "" "Detected corrupted CTI file, will try to continue by guessing voxel_size" msgstr "" #: ../src/libecat_interface.c:284 msgid "" "Detected zero voxel size in CTI file, will try to continue by guessing " "voxel_size" msgstr "" #. handle corrupted cti files #: ../src/libecat_interface.c:294 msgid "Detected corrupted CTI file, will try to continue by guessing offset" msgstr "" #: ../src/libecat_interface.c:323 #, c-format msgid "" "Importing CTI File:\n" " %s" msgstr "" #: ../src/libecat_interface.c:428 #, c-format msgid "" "Libecat returned %d blank planes... corrupted data file? Use data with " "caution." msgstr "" #: ../src/libmdc_interface.c:53 msgid "(_X)MedCon Guess" msgstr "" #: ../src/libmdc_interface.c:54 msgid "_GIF 87a/89a" msgstr "" #: ../src/libmdc_interface.c:55 msgid "Acr/_Nema 2.0" msgstr "" #: ../src/libmdc_interface.c:56 msgid "_Concorde/microPET" msgstr "" #: ../src/libmdc_interface.c:57 msgid "ECAT _6 via (X)MedCon" msgstr "" #: ../src/libmdc_interface.c:58 msgid "ECAT _7 via (X)MedCon" msgstr "" #: ../src/libmdc_interface.c:59 msgid "_InterFile 3.3" msgstr "" #: ../src/libmdc_interface.c:60 msgid "_Analyze (SPM)" msgstr "" #: ../src/libmdc_interface.c:61 msgid "_DICOM 3.0 via (X)MedCon" msgstr "" #: ../src/libmdc_interface.c:62 msgid "_NIFTI via (X)MedCon" msgstr "" #: ../src/libmdc_interface.c:66 msgid "let (X)MedCon/libmdc guess file type" msgstr "" #: ../src/libmdc_interface.c:67 msgid "Import a file stored as GIF" msgstr "" #: ../src/libmdc_interface.c:68 msgid "Import a Acr/Nema 2.0 file" msgstr "" #: ../src/libmdc_interface.c:69 msgid "Import a file from the Concorde microPET" msgstr "" #: ../src/libmdc_interface.c:70 msgid "Import a CTI/ECAT 6 file through (X)MedCon" msgstr "" #: ../src/libmdc_interface.c:71 msgid "Import a CTI/ECAT 7 file through (X)MedCon" msgstr "" #: ../src/libmdc_interface.c:72 msgid "Import a InterFile 3.3 file" msgstr "" #: ../src/libmdc_interface.c:73 msgid "Import an Analyze file" msgstr "" #: ../src/libmdc_interface.c:74 msgid "Import a DICOM 3.0 file through (X)MedCon" msgstr "" #: ../src/libmdc_interface.c:75 msgid "Import a NIFTI file through (X)MedCon" msgstr "" #: ../src/libmdc_interface.c:89 msgid "Acr/Nema 2.0" msgstr "" #: ../src/libmdc_interface.c:90 msgid "Concorde/microPET" msgstr "" #: ../src/libmdc_interface.c:91 msgid "ECAT 6 via (X)MedCon" msgstr "" #: ../src/libmdc_interface.c:92 msgid "InterFile 3.3" msgstr "" #: ../src/libmdc_interface.c:93 msgid "Analyze (SPM)" msgstr "" #: ../src/libmdc_interface.c:94 msgid "DICOM 3.0" msgstr "" #: ../src/libmdc_interface.c:95 msgid "NIFTI" msgstr "" #: ../src/libmdc_interface.c:99 msgid "Export a Acr/Nema 2.0 file" msgstr "" #: ../src/libmdc_interface.c:100 msgid "Export a Concorde format file" msgstr "" #: ../src/libmdc_interface.c:101 msgid "Export a CTI/ECAT 6 file" msgstr "" #: ../src/libmdc_interface.c:102 msgid "Export a InterFile 3.3 file" msgstr "" #: ../src/libmdc_interface.c:103 msgid "Export an Analyze file" msgstr "" #: ../src/libmdc_interface.c:104 msgid "Export a DICOM 3.0 file" msgstr "" #: ../src/libmdc_interface.c:105 #, fuzzy msgid "Export a NIFTI file" msgstr "导入文件" #: ../src/libmdc_interface.c:288 #, c-format msgid "Can't open file %s with libmdc/(X)MedCon" msgstr "" #: ../src/libmdc_interface.c:295 #, c-format msgid "Can't read file %s with libmdc/(X)MedCon" msgstr "" #. 9 #. 8 #. 11 #. 12 #. 13 #. 1 #: ../src/libmdc_interface.c:376 #, c-format msgid "" "Importing data type %d file through (X)MedCon unsupported in AMIDE, trying " "anyway" msgstr "" #: ../src/libmdc_interface.c:390 ../src/libmdc_interface.c:612 #, c-format msgid "Couldn't read plane %d in %s with libmdc/(X)MedCon" msgstr "" #: ../src/libmdc_interface.c:396 #, fuzzy, c-format msgid "libmdc returned error: %s" msgstr "SV è§£ç å‡ºé”™: %1$s " #: ../src/libmdc_interface.c:435 msgid "" "Couldn't allocate memory space for the data set structure to hold (X)MedCon " "data" msgstr "" #: ../src/libmdc_interface.c:561 msgid "" "(X)MedCon returned no duration information. Frame durations will be " "incorrect" msgstr "" #: ../src/libmdc_interface.c:570 #, c-format msgid "" "Importing File Through (X)MedCon:\n" " %s" msgstr "" #: ../src/libmdc_interface.c:742 msgid "(X)MedCon couldn't convert to a float... out of memory?" msgstr "" #: ../src/libmdc_interface.c:778 #, c-format msgid "" "(X)MedCon returned %d blank planes... corrupted data file? Use data with " "caution." msgstr "" #: ../src/libmdc_interface.c:890 #, c-format msgid "Unsupported export file format: %d\n" msgstr "" #: ../src/libmdc_interface.c:1041 #, c-format msgid "" "Exporting File Through (X)MedCon:\n" " %s" msgstr "" #: ../src/tb_export_data_set.c:111 #, fuzzy msgid "couldn't allocate memory space for tb_export_t" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/tb_export_data_set.c:222 ../src/tb_export_data_set.c:381 msgid "No Data Sets are current visible" msgstr "" #. the rest of this function runs the file selection dialog box #: ../src/tb_export_data_set.c:253 ../src/ui_study_cb.c:507 #, fuzzy msgid "Export to File" msgstr "导入文件" #: ../src/tb_export_data_set.c:571 #, fuzzy, c-format msgid "%s: Export Data Set Dialog" msgstr "弹出数æ®é›†å¯¹è¯æ¡†" #: ../src/tb_export_data_set.c:592 #, fuzzy msgid "Exporting Data Sets" msgstr "è£å‡å½“剿•°æ®é›†(_C)" #: ../src/tb_export_data_set.c:599 #, fuzzy msgid "Export:" msgstr "导出视图(_E)" #. tooltip N_("Export the data set in its original orientation (unresliced)") #: ../src/tb_export_data_set.c:604 #, c-format msgid "Original Orientation - %s" msgstr "" #. tooltip N_("Export the data set in its current orientation (resliced)") #: ../src/tb_export_data_set.c:615 #, c-format msgid "Resliced Orientation - %s" msgstr "" #: ../src/tb_export_data_set.c:627 msgid "All Visible Data Sets (resliced)" msgstr "" #: ../src/tb_export_data_set.c:652 msgid "export format:" msgstr "" #. widgets to change the voxel size of the data set #: ../src/tb_export_data_set.c:717 msgid "voxel size (mm) [x,y,z]:" msgstr "" #. gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_buttons[0]),FALSE); #. gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(spin_buttons[0]), FALSE); #. gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin_buttons[0]), GTK_UPDATE_ALWAYS); #: ../src/tb_export_data_set.c:741 msgid "bounding box:" msgstr "" #: ../src/tb_math.c:36 msgid "" "There is only one data set in this study. There needs to be at least two " "data sets to perform mathematical operations" msgstr "" #: ../src/tb_math.c:40 msgid "" "Welcome to the data set math wizard, used for performaing mathematical " "operations between medical image data sets.\n" "\n" "Note - you will get more pleasing results if the data sets in question are " "set to trilinear interpolation mode." msgstr "" #: ../src/tb_math.c:207 msgid "" "A new data set will be created with the math operation, press Finish to " "calculate this data set, or Cancel to quit." msgstr "" #: ../src/tb_math.c:296 msgid "Math operation failed - results not added to study" msgstr "" #: ../src/tb_math.c:385 #, fuzzy msgid "couldn't allocate memory space for tb_math_t" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/tb_math.c:472 msgid "Data Set 1:" msgstr "" #: ../src/tb_math.c:495 msgid "Data Set 2:" msgstr "" #: ../src/tb_math.c:511 #, fuzzy msgid "Operation Selection" msgstr "ROI深度选择" #: ../src/tb_math.c:529 msgid "Math Operation" msgstr "" #: ../src/tb_math.c:544 ../src/tb_alignment.c:667 msgid "Conclusion" msgstr "" #: ../src/tb_profile.c:218 #, fuzzy msgid "couldn't allocate memory space for tb_profile_t" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/tb_profile.c:251 #, c-format msgid "# Profiles on Study: %s\tGenerated on: %s" msgstr "" #: ../src/tb_profile.c:256 #, c-format msgid "" "#\n" "# Profile on: %s\n" msgstr "" #: ../src/tb_profile.c:260 msgid "# Gaussian Fit: b + p * e^(-0.5*(x-c)^2/s^2)\n" msgstr "" #: ../src/tb_profile.c:261 #, c-format msgid "#\titerations used %d, status %s\n" msgstr "" #: ../src/tb_profile.c:264 ../src/tb_profile.c:269 ../src/tb_profile.c:835 #: ../src/tb_profile.c:838 msgid "(fixed)" msgstr "" #: ../src/tb_profile.c:280 msgid "# x\tvalue\n" msgstr "" #: ../src/tb_profile.c:328 #, fuzzy msgid "Export Profile" msgstr "导出视图(_E)" #: ../src/tb_profile.c:378 #, c-format msgid "couldn't open: %s for writing profiles" msgstr "" #. write out the gaussian equation #: ../src/tb_profile.c:790 msgid "fit = b + p * e^(-0.5*(x-c)^2/s^2)" msgstr "" #: ../src/tb_profile.c:824 #, c-format msgid "" "\n" "\n" "gaussian fit on: %s\n" "iterations used %d, status %s\n" "b = %.5g +/- %.5g %s\n" "p = %.5g +/- %.5g\n" "c = %.5g +/- %.5g mm %s\n" "s = %.5g +/- %.5g\n" "fwhm = %.5g +/- %.5g mm\n" "fwtm = %.5g +/- %.5g mm" msgstr "" #. start setting up the widget we'll display the info from #: ../src/tb_profile.c:1192 #, c-format msgid "%s Profile Tool: Study %s" msgstr "" #. which view do we want the profile on #: ../src/tb_profile.c:1226 msgid "Line Profile on:" msgstr "" #. changing the angle #: ../src/tb_profile.c:1257 msgid "Angle (degrees):" msgstr "" #: ../src/ui_gate_dialog.c:43 #, fuzzy msgid "Gate #" msgstr "帧 #" #: ../src/ui_gate_dialog.c:340 #, fuzzy, c-format msgid "%s: Gate Dialog" msgstr "%1$sï¼šæ—¶é—´å¯¹è¯æ¡†" #: ../src/ui_gate_dialog.c:361 #, fuzzy msgid "Start Gate" msgstr "开始(ç§’)" #: ../src/ui_gate_dialog.c:378 msgid "End Gate" msgstr "" #: ../src/analysis.c:221 #, fuzzy, c-format msgid "couldn't allocate memory space for data array for frame %d/gate %d" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/analysis.c:291 #, fuzzy, c-format msgid "couldn't allocate memory space for roi analysis of frame %d/gate %d" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/analysis.c:426 #, fuzzy msgid "couldn't allocate memory space for roi analysis of frames" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/analysis.c:457 #, c-format msgid "ROI: %s appears not to have been drawn" msgstr "" #: ../src/analysis.c:513 #, fuzzy msgid "couldn't allocate memory space for roi analysis of volumes" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/analysis.c:585 #, fuzzy msgid "couldn't allocate memory space for roi analyses" msgstr "无法为时间数æ®åˆ†é…空间" #. N_("Steepest Descent"), #: ../src/fads.c:40 msgid "Fletcher-Reeves conjugate gradient" msgstr "" #: ../src/fads.c:41 msgid "Polak-Ribiere conjugate gradient" msgstr "" #: ../src/fads.c:47 msgid "Principle Component Analysis" msgstr "" #: ../src/fads.c:48 msgid "Penalized Least Squares Factor Analysis" msgstr "" #: ../src/fads.c:49 msgid "2 compartment model" msgstr "" #: ../src/fads.c:53 msgid "Priniciple Component Analysis based on singular value decomposition." msgstr "" #: ../src/fads.c:56 msgid "" "Principle component analysis with positivity constraints and a penalized " "least squares objective, an adaptation of Sitek, et al., IEEE Trans. Med. " "Imag., 2002. If beta is set to zero, this is normal factor analysis, " "similar to Di Paola, et al., IEEE Trans. Nuc. Sci., 1982" msgstr "" #: ../src/fads.c:62 msgid "Standard 2 compartment model" msgstr "" #: ../src/fads.c:109 msgid "need dynamic data set in order to perform factor analysis" msgstr "" #: ../src/fads.c:115 ../src/fads.c:120 ../src/fads.c:271 #, c-format msgid "Failed to allocate %dx%d array" msgstr "" #: ../src/fads.c:125 ../src/fads.c:276 #, c-format msgid "Failed to allocate %d vector" msgstr "" #: ../src/fads.c:157 #, c-format msgid "Failed to allocate %d factor array" msgstr "" #: ../src/fads.c:266 #, c-format msgid "failed to alloc matrix, size %dx%d" msgstr "" #: ../src/fads.c:311 ../src/fads.c:338 #, c-format msgid "failed to alloc matrix size %dx%d" msgstr "" #: ../src/fads.c:325 #, c-format msgid "failed to alloc vector size %d" msgstr "" #: ../src/fads.c:400 ../src/fads.c:1209 ../src/fads.c:2180 msgid "failed to allocate new_ds" msgstr "" #: ../src/fads.c:431 #, c-format msgid "couldn't open: %s for writing PCA analyses" msgstr "" #: ../src/fads.c:943 msgid "failed forward error malloc" msgstr "" #: ../src/fads.c:950 msgid "failed weight malloc" msgstr "" #: ../src/fads.c:957 msgid "failed equality constraint alpha malloc" msgstr "" #: ../src/fads.c:963 msgid "failed equality constraint blood curve malloc" msgstr "" #: ../src/fads.c:969 ../src/fads.c:1940 msgid "failed malloc for equality lagrange multiplier - alpha" msgstr "" #: ../src/fads.c:977 ../src/fads.c:1948 msgid "failed malloc for equality lagrange multiplier - blood curve" msgstr "" #: ../src/fads.c:985 ../src/fads.c:1956 msgid "failed malloc for inequality lagrange multiplier - alpha" msgstr "" #: ../src/fads.c:994 msgid "failed malloc for inequailty lagrange multiplier - factors" msgstr "" #: ../src/fads.c:1011 ../src/fads.c:2003 msgid "failed to allocate multidimensional minimizer" msgstr "" #: ../src/fads.c:1082 #, c-format msgid "" "Calculating Penalized Least Squares Factor Analysis:\n" " %s" msgstr "" #: ../src/fads.c:1225 #, c-format msgid "factor %d" msgstr "" #: ../src/fads.c:1243 ../src/fads.c:2218 #, c-format msgid "couldn't open: %s for writing fads analyses" msgstr "" #: ../src/fads.c:1892 msgid "failed to allocate intermediate data storage for tissue components" msgstr "" #: ../src/fads.c:1898 msgid "failed to allocate intermediate data storage for forward error" msgstr "" #: ../src/fads.c:1904 msgid "failed to allocate frame start array" msgstr "" #: ../src/fads.c:1910 msgid "failed to allocate frame end array" msgstr "" #: ../src/fads.c:1916 msgid "failed to allocate frame midpt array" msgstr "" #: ../src/fads.c:1928 msgid "failed malloc for equality constraint on alpha" msgstr "" #: ../src/fads.c:1934 msgid "failed malloc for equality constraint on blood curve" msgstr "" #: ../src/fads.c:1964 msgid "failed malloc for inequailty lagrange multiplier - blood curve" msgstr "" #: ../src/fads.c:1972 msgid "failed malloc for inequailty lagrange multiplier - k12" msgstr "" #: ../src/fads.c:1980 msgid "failed malloc for inequailty lagrange multiplier - k21" msgstr "" #: ../src/fads.c:2011 msgid "failed to allocate initial vector" msgstr "" #: ../src/fads.c:2041 #, c-format msgid "" "Calculating Two Compartment Factor Analysis:\n" " %s" msgstr "" #: ../src/fads.c:2161 #, c-format msgid "Minimum found after %d iterations\n" msgstr "" #: ../src/fads.c:2163 msgid "terminated minization \n" msgstr "" #: ../src/fads.c:2165 #, c-format msgid "No minimum found after %d iterations, exited with: %s\n" msgstr "" #: ../src/fads.c:2199 #, c-format msgid "tissue type %d: k12 %g k21 %g" msgstr "" #: ../src/fads.c:2201 msgid "blood fraction" msgstr "" #: ../src/image.c:181 msgid "couldn't allocate memory for rgba_data for roi image" msgstr "" #: ../src/image.c:223 msgid "couldn't allocate memory for rgb_data for blank image" msgstr "" #: ../src/image.c:255 msgid "couldn't allocate memory for image from 8 bit data" msgstr "" #: ../src/image.c:304 msgid "" "couldn't allocate memory for rgba16_data for transferring rendering to image" msgstr "" #: ../src/image.c:381 msgid "couldn't allocate memory for char_data for rendering image" msgstr "" #: ../src/image.c:428 msgid "couldn't allocate memory for rgba_data for bar_graph" msgstr "" #: ../src/image.c:503 msgid "couldn't allocate memory for rgb_data for color_strip" msgstr "" #: ../src/image.c:558 msgid "couldn't allocate memory for rgba_data for projection image" msgstr "" #: ../src/image.c:609 msgid "couldn't allocate memory for rgba_data for slice image" msgstr "" #: ../src/mpeg_encode.c:109 #, fuzzy msgid "couldn't allocate memory space for context_t" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/mpeg_encode.c:121 #, fuzzy msgid "couldn't allocate memory space for fame parameters" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/mpeg_encode.c:128 msgid "Unable to allocate memory space for mpeg encoding buffer" msgstr "" #: ../src/mpeg_encode.c:135 msgid "Unable to allocate yuv struct" msgstr "" #: ../src/mpeg_encode.c:143 msgid "Unable to allocate yuv buffer" msgstr "" #: ../src/mpeg_encode.c:162 msgid "unable to open output file for mpeg encoding" msgstr "" #: ../src/raw_data_import.c:290 msgid "read offset (entries):" msgstr "" #: ../src/raw_data_import.c:293 msgid "read offset (bytes):" msgstr "" #: ../src/raw_data_import.c:307 msgid "total entries to read through:" msgstr "" #: ../src/raw_data_import.c:322 msgid "total bytes to read through:" msgstr "" #: ../src/raw_data_import.c:415 #, c-format msgid "%s: Raw Data Import Dialog\n" msgstr "" #. widgets to change the roi's name #: ../src/raw_data_import.c:429 msgid "name:" msgstr "" #. widgets to change the object's modality #: ../src/raw_data_import.c:467 msgid "modality:" msgstr "" #. widgets to change the raw data file's data format #: ../src/raw_data_import.c:509 msgid "data format:" msgstr "" #. how many bytes we can read from the file #: ../src/raw_data_import.c:550 msgid "file size (bytes):" msgstr "" #. labels for the x, y, and z components #: ../src/raw_data_import.c:597 ../src/ui_render.c:1007 msgid "x" msgstr "" #: ../src/raw_data_import.c:600 ../src/ui_render.c:981 msgid "y" msgstr "" #: ../src/raw_data_import.c:603 ../src/ui_render.c:989 msgid "z" msgstr "" #: ../src/raw_data_import.c:606 msgid "gates" msgstr "" #: ../src/raw_data_import.c:609 msgid "frames" msgstr "" #. widgets to change the dimensions of the data set #: ../src/raw_data_import.c:616 msgid "dimensions (# voxels)" msgstr "" #. widgets to change the voxel size of the data set #: ../src/raw_data_import.c:637 msgid "voxel size (mm)" msgstr "" #. scale factor to apply to the data #: ../src/raw_data_import.c:660 msgid "scale factor" msgstr "" #: ../src/raw_data_import.c:697 #, fuzzy msgid "" "Couldn't allocate memory space for raw_data_info structure for raw data " "import" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/raw_data_import.c:709 #, c-format msgid "Couldn't get stat's on file %s for raw data import" msgstr "" #: ../src/render.c:46 msgid "Highest Quality and Slowest" msgstr "" #: ../src/render.c:47 msgid "High Quality and Medium Speed" msgstr "" #: ../src/render.c:48 msgid "Medium Quality and Fast" msgstr "" #: ../src/render.c:49 msgid "Low Quality and Fastest" msgstr "" #: ../src/render.c:52 msgid "Opacity" msgstr "" #: ../src/render.c:53 msgid "Grayscale" msgstr "" #: ../src/render.c:150 #, fuzzy msgid "couldn't allocate memory space for rendering context" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/render.c:201 msgid "" "\"Per Slice\" thresholding illogical for conversion to volume rendering, " "using \"Global\" thresholding " msgstr "" #: ../src/render.c:214 #, fuzzy msgid "couldn't allocate memory space for density ramp x" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/render.c:219 #, fuzzy msgid "couldn't allocate memory space for density ramp y" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/render.c:230 #, fuzzy msgid "couldn't allocate memory space for gradient ramp x" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/render.c:235 #, fuzzy msgid "couldn't allocate memory space for gradient ramp y" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/render.c:254 msgid "Error Setting the Rendering Density Ramp" msgstr "" #: ../src/render.c:264 msgid "Error Setting the Rendering Gradient Ramp" msgstr "" #: ../src/render.c:272 #, c-format msgid "Error Setting the Rendering Voxel Size (%s): %s" msgstr "" #: ../src/render.c:282 #, c-format msgid "Error Specifying the Rendering Voxel Fields (%s, NORMAL): %s" msgstr "" #: ../src/render.c:289 #, c-format msgid "Error Specifying the Rendering Voxel Fields (%s, DENSITY): %s" msgstr "" #: ../src/render.c:297 #, c-format msgid "Error Specifying the Rendering Voxel Fields (%s, GRADIENT): %s" msgstr "" #: ../src/render.c:307 #, c-format msgid "Error Setting the Rendering Classifier Table (%s, DENSITY): %s" msgstr "" #: ../src/render.c:317 #, c-format msgid "Error Setting the Classifier Table (%s, GRADIENT): %s" msgstr "" #: ../src/render.c:415 #, c-format msgid "Error Setting the Context Size (%s): %s" msgstr "" #: ../src/render.c:428 #, fuzzy, c-format msgid "Could not allocate memory space for density data for %s" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/render.c:440 #, c-format msgid "Could not allocate memory space for rendering context volume for %s" msgstr "" #: ../src/render.c:452 #, c-format msgid "Converting for rendering: %s" msgstr "" #: ../src/render.c:654 #, c-format msgid "Error Computing the Rendering Normals (%s): %s" msgstr "" #: ../src/render.c:682 #, c-format msgid "Error Setting Rendering Octree Threshold (%s, DENSITY): %s" msgstr "" #: ../src/render.c:688 #, c-format msgid "Error Setting Rendering Octree Threshold (%s, GRADIENT): %s" msgstr "" #: ../src/render.c:695 #, c-format msgid "Error Generating Octree (%s): %s" msgstr "" #: ../src/render.c:722 #, c-format msgid "Error Setting the Rendering Material (%s, SHINYNESS): %s" msgstr "" #: ../src/render.c:732 #, c-format msgid "Error Setting the Rendering Shader (%s): %s" msgstr "" #: ../src/render.c:740 #, c-format msgid "Error Shading Table for Rendering (%s): %s" msgstr "" #: ../src/render.c:775 #, c-format msgid "Error Setting The Item To Rotate (%s): %s" msgstr "" #: ../src/render.c:780 #, c-format msgid "Error Rotating Rendering (%s): %s" msgstr "" #: ../src/render.c:858 #, c-format msgid "Error Setting Rendering Max Ray Opacity (%s): %s" msgstr "" #: ../src/render.c:864 #, c-format msgid "Error Setting the Min Voxel Opacity (%s): %s" msgstr "" #: ../src/render.c:893 #, fuzzy, c-format msgid "Could not allocate memory space for Rendering Image for %s" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/render.c:901 #, c-format msgid "Error Switching the Rendering Image Pixel Return Type (%s): %s" msgstr "" #: ../src/render.c:913 #, c-format msgid "Error Setting the Rendering Depth Cue (%s): %s" msgstr "" #: ../src/render.c:930 #, c-format msgid "Error Enabling Rendering Depth Cueing (%s): %s" msgstr "" #: ../src/render.c:960 #, c-format msgid "Error Classifying the Volume (%s): %s" msgstr "" #: ../src/render.c:966 #, c-format msgid "Error Rendering the Classified Volume (%s): %s" msgstr "" #: ../src/render.c:972 #, c-format msgid "Error Rendering the Volume (%s): %s" msgstr "" #: ../src/tb_alignment.c:39 msgid "" "There is only one data set in this study. There needs to be at least two " "data sets to perform an alignment" msgstr "" #: ../src/tb_alignment.c:43 msgid "" "In order to perform an alignment, each data set musthave at least three " "objects with the same name asthe corresponding three objects in the other " "data set\n" "Please see the help documentation for a longerexplanation as to how " "alignments can be done." msgstr "" #: ../src/tb_alignment.c:51 msgid "" "Welcome to the data set alignment wizard, used for aligning one medical " "image data set with another. \n" "Currently, only registration using fiducial marks has been implemented " "inside of AMIDE." msgstr "" #: ../src/tb_alignment.c:294 #, c-format msgid "" "The alignment has been calculated, press Finish to apply, or Cancel to " "quit.\n" "\n" "The calculated fiducial reference error is: %5.5f mm/point" msgstr "" #: ../src/tb_alignment.c:502 #, fuzzy msgid "couldn't allocate memory space for tb_alignment_t" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/tb_alignment.c:589 msgid "Align Data Set: (moving)" msgstr "" #: ../src/tb_alignment.c:612 msgid "Align Data Set: (fixed)" msgstr "" #: ../src/tb_alignment.c:628 msgid "Fiducial Marks Selection" msgstr "" #: ../src/tb_alignment.c:654 msgid "Points for Alignment" msgstr "" #: ../src/tb_alignment.c:680 msgid "Alignment Error" msgstr "" #: ../src/tb_crop.c:41 msgid "Data Set Cropping Wizard" msgstr "" #: ../src/tb_crop.c:44 msgid "" "When the apply button is hit, a new data set will be created\n" "and placed into the study's tree, consisting of the appropriately\n" "cropped data\n" msgstr "" #. the zoom selection #: ../src/tb_crop.c:185 msgid "zoom" msgstr "" #: ../src/tb_crop.c:206 #, fuzzy msgid "gate" msgstr "旋转" #: ../src/tb_crop.c:227 msgid "frame" msgstr "" #: ../src/tb_crop.c:283 #, c-format msgid "%s range:" msgstr "" #: ../src/tb_crop.c:311 msgid "(mm)" msgstr "" #. widget to tell you the internal data format #: ../src/tb_crop.c:376 msgid "Current Data Format:" msgstr "" #. widget to tell you the scaling format #: ../src/tb_crop.c:389 msgid "Current Scale Format:" msgstr "" #. widget to tell you the internal data format #: ../src/tb_crop.c:408 msgid "Output Data Format:" msgstr "" #. widget to tell you the scaling format #: ../src/tb_crop.c:437 msgid "Output Scale Format:" msgstr "" #: ../src/tb_crop.c:1081 #, fuzzy msgid "couldn't allocate memory space for tb_crop_t" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/tb_crop.c:1125 ../src/tb_filter.c:539 ../src/ui_study_cb.c:55 msgid "No data set is currently marked as active" msgstr "" #: ../src/tb_fads.c:41 msgid "Factor Analysis Wizard" msgstr "" #: ../src/tb_fads.c:46 msgid "" "This page allows the computation of the singular value decomposition for the " "data set in question. These values can give you an idea of how many " "important factors the data set has.\n" "\n" "This process can be extremely slow, so skip this page if you already know " "the answer." msgstr "" #: ../src/tb_fads.c:54 msgid "" "When the apply button is hit, the appropriate factor analysis data " "structures will be created, and placed underneath the given data set in the " "study tree\n" msgstr "" #: ../src/tb_fads.c:59 msgid "" "Welcome to the factor analysis of dynamic structures wizard.\n" "None of this code has been validated, and it's probably wrong,so use at your " "own risk" msgstr "" #: ../src/tb_fads.c:66 msgid "" "Welcome to the factor analysis of dynamic structures wizard.\n" "This wizard only works with dynamic studies" msgstr "" #: ../src/tb_fads.c:154 #, c-format msgid "" "%s\n" "Method Picked: %s" msgstr "" #: ../src/tb_fads.c:188 msgid "Filename for Factor Data" msgstr "" #. do I need to compute factors? #: ../src/tb_fads.c:277 msgid "Compute Singular Values?" msgstr "" #. ask for the fads method to use #: ../src/tb_fads.c:313 msgid "FADS Method:" msgstr "" #. ask for the minimizer algorithm to use #: ../src/tb_fads.c:367 msgid "Minimization Algorithm:" msgstr "" #. max # of iterations #: ../src/tb_fads.c:398 msgid "Max. # of iterations:" msgstr "" #. stopping criteria #: ../src/tb_fads.c:413 msgid "Stopping Criteria:" msgstr "" #. stopping criteria #: ../src/tb_fads.c:430 msgid "Beta:" msgstr "" #. how many factors to solve for? #: ../src/tb_fads.c:445 msgid "# of Factors to use" msgstr "" #. k12 criteria #: ../src/tb_fads.c:462 msgid "initial k12 (1/s):" msgstr "" #. k21 criteria #: ../src/tb_fads.c:479 msgid "initial K21 (1/s):" msgstr "" #. A table to add blood sample measurements #: ../src/tb_fads.c:504 msgid "Add Blood Sample" msgstr "" #: ../src/tb_fads.c:544 msgid "Remove Blood Sample" msgstr "" #: ../src/tb_fads.c:794 msgid "failed malloc for frames array" msgstr "" #: ../src/tb_fads.c:799 msgid "failed malloc for vals array" msgstr "" #: ../src/tb_fads.c:935 #, fuzzy msgid "couldn't allocate memory space for tb_fads_t" msgstr "无法为时间数æ®åˆ†é…空间" #. mm #. mm #: ../src/tb_filter.c:46 msgid "Data Set Filtering Wizard" msgstr "" #: ../src/tb_filter.c:49 msgid "" "When the apply button is hit, a new data set will be created and placed into " "the study's tree, consisting of the appropriately filtered data\n" msgstr "" #: ../src/tb_filter.c:55 msgid "The Gaussian filter is an effective smoothing filter" msgstr "" #: ../src/tb_filter.c:60 msgid "" "Median filter work relatively well at preserving edges while\n" "removing speckle noise.\n" "\n" "This filter is the 3D median filter, so the neighborhood used for\n" "determining the median will be KSxKSxKS, KS=kernel size" msgstr "" #: ../src/tb_filter.c:67 msgid "" "Median filters work relatively well at preserving edges while\n" "removing speckle noise.\n" "\n" "This filter is the 1D median filter, so the neighboorhood used for\n" "determining the median will be of the given kernel size, and the\n" "data set will be filtered 3x (once for each direction)." msgstr "" #: ../src/tb_filter.c:76 msgid "" "This filter requires support from the GNU Scientific Library (GSL).\n" "This version of AMIDE has not be compiled with GSL support enabled." msgstr "" #: ../src/tb_filter.c:211 msgid "Which Filter" msgstr "" #. the kernel selection #: ../src/tb_filter.c:258 ../src/tb_filter.c:314 msgid "Kernel Size" msgstr "" #: ../src/tb_filter.c:275 msgid "FWHM (mm)" msgstr "" #: ../src/tb_filter.c:513 #, fuzzy msgid "couldn't allocate memory space for tb_filter_t" msgstr "无法为时间数æ®åˆ†é…空间" #. the rest of this function runs the file selection dialog box #: ../src/tb_fly_through.c:329 ../src/ui_render_movie.c:258 msgid "Output MPEG As" msgstr "" #: ../src/tb_fly_through.c:498 #, c-format msgid "encoding of frame %d failed" msgstr "" #: ../src/tb_fly_through.c:644 #, fuzzy msgid "couldn't allocate memory space for tb_fly_through_t" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/tb_fly_through.c:705 msgid "Fly Through Generation" msgstr "" #: ../src/tb_fly_through.c:727 msgid "Current Position (mm):" msgstr "" #: ../src/tb_fly_through.c:737 msgid "Start Position (mm):" msgstr "" #: ../src/tb_fly_through.c:752 msgid "End Position (mm):" msgstr "" #: ../src/tb_fly_through.c:767 msgid "Movie Duration (sec):" msgstr "" #: ../src/tb_fly_through.c:785 msgid "Fly through movie generation" msgstr "" #: ../src/tb_fly_through.c:796 msgid "Set Start Position" msgstr "" #: ../src/tb_fly_through.c:801 msgid "Set End Position" msgstr "" #. do we want to make a movie over time or over frames #: ../src/tb_fly_through.c:859 ../src/ui_render_movie.c:722 msgid "Dynamic Movie:" msgstr "" #. the radio buttons #: ../src/tb_fly_through.c:870 ../src/ui_render_movie.c:733 msgid "No" msgstr "" #: ../src/tb_fly_through.c:877 ../src/ui_render_movie.c:738 msgid "over time" msgstr "" #: ../src/tb_fly_through.c:881 ../src/ui_render_movie.c:742 msgid "over frames" msgstr "" #: ../src/tb_fly_through.c:893 ../src/ui_render_movie.c:752 msgid "over frames smoothed" msgstr "" #: ../src/tb_fly_through.c:899 ../src/ui_render_movie.c:756 msgid "over gates" msgstr "" #. widgets to specify the start and end times #: ../src/tb_fly_through.c:919 ../src/ui_render_movie.c:768 msgid "Start Time (s)" msgstr "" #: ../src/tb_fly_through.c:922 ../src/ui_render_movie.c:771 msgid "Start Frame" msgstr "" #: ../src/tb_fly_through.c:949 ../src/ui_render_movie.c:798 msgid "End Time (s)" msgstr "" #: ../src/tb_fly_through.c:952 ../src/ui_render_movie.c:801 msgid "End Frame" msgstr "" #: ../src/tb_fly_through.c:980 ../src/ui_render_movie.c:830 msgid "Display time on image" msgstr "" #: ../src/tb_roi_analysis.c:93 msgid "ROI" msgstr "" #: ../src/tb_roi_analysis.c:94 ../src/ui_time_dialog.c:62 msgid "Data Set" msgstr "" #: ../src/tb_roi_analysis.c:97 #, fuzzy msgid "Midpt (s)" msgstr "结æŸ(ç§’)" #: ../src/tb_roi_analysis.c:98 #, fuzzy msgid "Gate" msgstr "旋转" #. N_("Total"), #: ../src/tb_roi_analysis.c:100 msgid "Median" msgstr "" #: ../src/tb_roi_analysis.c:101 msgid "Mean" msgstr "" #: ../src/tb_roi_analysis.c:102 msgid "Var" msgstr "" #: ../src/tb_roi_analysis.c:103 msgid "Std Dev" msgstr "" #: ../src/tb_roi_analysis.c:106 msgid "Size (mm^3)" msgstr "" #: ../src/tb_roi_analysis.c:107 msgid "Frac. Voxels" msgstr "" #: ../src/tb_roi_analysis.c:108 msgid "Voxels" msgstr "" #: ../src/tb_roi_analysis.c:169 msgid "Export Statistics" msgstr "" #: ../src/tb_roi_analysis.c:171 msgid "Export ROI Raw Data Values" msgstr "" #: ../src/tb_roi_analysis.c:176 msgid "roi_raw_data" msgstr "" #: ../src/tb_roi_analysis.c:176 #, fuzzy msgid "analysis" msgstr "è¦ç´ åˆ†æž(_F)" #: ../src/tb_roi_analysis.c:235 #, fuzzy, c-format msgid "couldn't open: %s for writing roi data" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/tb_roi_analysis.c:241 #, c-format msgid "# %s: ROI Analysis File - generated on %s" msgstr "" #: ../src/tb_roi_analysis.c:243 #, c-format msgid "# Study:\t%s\n" msgstr "" #: ../src/tb_roi_analysis.c:247 #, c-format msgid "# ROI:\t%s\tType:\t%s" msgstr "" #: ../src/tb_roi_analysis.c:252 #, c-format msgid "\tIsocontour Above Value:\t%g" msgstr "" #: ../src/tb_roi_analysis.c:254 #, c-format msgid "\tIsocontour Below Value:\t%g" msgstr "" #. AMITK_ROI_ISOCONTOUR_RANGE_BETWEEN_MIN_MAX #: ../src/tb_roi_analysis.c:256 #, c-format msgid "\tIsocontour Between Values:\t%g %g" msgstr "" #: ../src/tb_roi_analysis.c:265 #, c-format msgid "# Calculation done with all voxels in ROI\n" msgstr "" #: ../src/tb_roi_analysis.c:268 #, c-format msgid "# Calculation done on %5.3f percentile of voxels in ROI\n" msgstr "" #: ../src/tb_roi_analysis.c:271 #, c-format msgid "" "# Calculation done on voxels >= %5.3f percent of maximum value in ROI\n" msgstr "" #: ../src/tb_roi_analysis.c:274 #, c-format msgid "# Calculation done on voxels >= %g in ROI\n" msgstr "" #: ../src/tb_roi_analysis.c:286 #, c-format msgid "# Data Set:\t%s\tScaling Factor:\t%g\n" msgstr "" #: ../src/tb_roi_analysis.c:293 #, c-format msgid "# Output Data Units: %s\n" msgstr "" #: ../src/tb_roi_analysis.c:295 #, c-format msgid "# Injected Dose: %g [%s]\n" msgstr "" #: ../src/tb_roi_analysis.c:299 #, c-format msgid "# Cylinder Factor: %g [%s]\n" msgstr "" #: ../src/tb_roi_analysis.c:310 #, c-format msgid "# Subject Weight: %g [%s]\n" msgstr "" #: ../src/tb_roi_analysis.c:397 #, c-format msgid "# Stats for Study: %s\tGenerated on: %s" msgstr "" #: ../src/tb_roi_analysis.c:574 msgid "ROI Statistics" msgstr "" #. tell us the type #: ../src/tb_roi_analysis.c:586 msgid "type:" msgstr "" #: ../src/tb_roi_analysis.c:790 msgid "No Data Sets selected for calculating analyses" msgstr "" #: ../src/tb_roi_analysis.c:802 msgid "No ROI's selected for calculating analyses" msgstr "" #. start setting up the widget we'll display the info from #: ../src/tb_roi_analysis.c:816 #, c-format msgid "%s Roi Analysis: Study %s" msgstr "" #: ../src/tb_roi_analysis.c:1004 #, c-format msgid "%s: ROI Analysis Initialization Dialog" msgstr "" #: ../src/tb_roi_analysis.c:1023 msgid "Calculate:" msgstr "" #: ../src/tb_roi_analysis.c:1026 msgid "All ROIS:" msgstr "" #: ../src/tb_roi_analysis.c:1029 msgid "Selected ROIS:" msgstr "" #: ../src/tb_roi_analysis.c:1034 msgid "On All Data Sets:" msgstr "" #: ../src/tb_roi_analysis.c:1052 msgid "On Selected Data Sets:" msgstr "" #. do we want to calculate over a subfraction #: ../src/tb_roi_analysis.c:1091 msgid "Calculate over all voxels (normal):" msgstr "" #. do we want to calculate over a subfraction #: ../src/tb_roi_analysis.c:1102 #, c-format msgid "Calculate over % highest voxels:" msgstr "" #. do we want to calculate over a percentage of max #: ../src/tb_roi_analysis.c:1126 #, c-format msgid "Calculate for voxels >= % of Max:" msgstr "" #. do we want to calculate over a percentage of max #: ../src/tb_roi_analysis.c:1150 msgid "Calculate for voxels >= Value:" msgstr "" #. do we want more accurate quantitation #: ../src/tb_roi_analysis.c:1190 msgid "More Accurate Quantitation (Slow)" msgstr "" #: ../src/ui_common.c:87 msgid "Solid" msgstr "" #: ../src/ui_common.c:88 msgid "On/Off" msgstr "" #: ../src/ui_common.c:89 msgid "Double Dash" msgstr "" #: ../src/ui_common.c:122 ../src/ui_common.c:200 #, c-format msgid "Inappropriate filename: %s" msgstr "" #: ../src/ui_common.c:137 #, c-format msgid "Overwrite file: %s" msgstr "" #: ../src/ui_common.c:303 msgid "AMIDE's a Medical Image Data Examiner\n" msgstr "" #: ../src/ui_common.c:305 msgid "Email bug reports to: " msgstr "" #: ../src/ui_common.c:308 msgid "Compiled with support for the following libraries:\n" msgstr "" #: ../src/ui_common.c:311 msgid "libecat: CTI File library by Merence Sibomona\n" msgstr "" #: ../src/ui_common.c:314 msgid "libgsl: GNU Scientific Library by the GSL Team (version " msgstr "" #: ../src/ui_common.c:317 msgid "libmdc: Medical Imaging File library by Erik Nolf (version " msgstr "" #: ../src/ui_common.c:320 msgid "" "libdcmdata: OFFIS DICOM Toolkit DCMTK (C) 1993-2004, OFFIS e.V. (version " msgstr "" #: ../src/ui_common.c:323 msgid "libvolpack: Volume Rendering library by Philippe Lacroute (version " msgstr "" #: ../src/ui_common.c:326 msgid "libfame: Fast Assembly Mpeg Encoding library by the FAME Team (version " msgstr "" #: ../src/ui_common.c:332 msgid "Copyright (c) 2000-2007 Andy Loening" msgstr "" #. widgets to change the roi's size #: ../src/ui_common.c:541 msgid "ROI Width (pixels)" msgstr "" #. widgets to change the roi's line style #. Anti-aliased canvas doesn't yet support this #. also need to remove #ifndef for relevant lines in amitk_canvas_object.c #: ../src/ui_common.c:598 msgid "ROI Line Style:" msgstr "" #. do we want to fill in isocontour roi's #: ../src/ui_common.c:629 msgid "Draw Isocontours/Freehands Filled:" msgstr "" #: ../src/ui_common.c:649 msgid "Canvas Layout:" msgstr "" #: ../src/ui_common.c:684 msgid "Multiple Canvases Layout:" msgstr "" #. do we want the size of the canvas to not resize #: ../src/ui_common.c:735 msgid "Maintain view size constant:" msgstr "" #. widgets to change the amount of empty space in the center of the target #: ../src/ui_common.c:748 msgid "Target Empty Area (pixels)" msgstr "" #: ../src/ui_common.c:952 msgid "Request Dialog" msgstr "" #: ../src/ui_preferences_dialog.c:42 msgid "" "These preferences are used only for new studies. \n" "Use the study modification dialog to change these \n" "parameters for the current study." msgstr "" #: ../src/ui_preferences_dialog.c:47 msgid "" "These preferences are used only for new data sets. \n" "Use the data set modification dialog to change these \n" "parameters for the current data set." msgstr "" #: ../src/ui_preferences_dialog.c:349 #, c-format msgid "%s: Preferences Dialog" msgstr "" #: ../src/ui_preferences_dialog.c:465 msgid "Thresholding" msgstr "" #: ../src/ui_preferences_dialog.c:529 msgid "Default Color Tables" msgstr "" #. color table selector #: ../src/ui_preferences_dialog.c:536 #, c-format msgid "default %s color table:" msgstr "" #: ../src/ui_preferences_dialog.c:573 msgid "Miscellaneous" msgstr "" #: ../src/ui_preferences_dialog.c:577 msgid "Send Warning Messages to Console:" msgstr "" #: ../src/ui_preferences_dialog.c:593 msgid "Don't Prompt for \"Save Changes\" on Exit:" msgstr "" #: ../src/ui_preferences_dialog.c:608 msgid "Save .XIF file as directory:" msgstr "" #: ../src/ui_preferences_dialog.c:624 msgid "Default Directory on Startup:" msgstr "" #: ../src/ui_render.c:386 ../src/ui_render_movie.c:546 #: ../src/ui_study_cb.c:448 msgid "Canvas failed to return a valid image\n" msgstr "" #: ../src/ui_render.c:392 ../src/ui_series.c:206 ../src/ui_study_cb.c:250 #: ../src/ui_study_cb.c:458 #, c-format msgid "Failure Saving File: %s" msgstr "" #: ../src/ui_render.c:415 ../src/ui_series.c:228 msgid "Export File" msgstr "" #: ../src/ui_render.c:519 msgid "_Export Rendering" msgstr "" #: ../src/ui_render.c:520 msgid "Export the rendered image" msgstr "" #: ../src/ui_render.c:524 msgid "_Create Movie" msgstr "" #: ../src/ui_render.c:525 msgid "Create a movie out of a sequence of renderings" msgstr "" #: ../src/ui_render.c:535 msgid "_Rendering Parameters" msgstr "" #: ../src/ui_render.c:536 msgid "Adjust parameters pertinent to the rendered image" msgstr "" #: ../src/ui_render.c:569 msgid "Monoscopic rendering" msgstr "" #: ../src/ui_render.c:571 msgid "Stereoscopic rendering" msgstr "" #: ../src/ui_render.c:577 msgid "Opacity and density transfer functions" msgstr "" #. add the zoom widget to our toolbar #: ../src/ui_render.c:597 ../src/ui_study_menus.c:520 msgid "zoom:" msgstr "" #: ../src/ui_render.c:610 msgid "specify how much to magnify the rendering" msgstr "" #: ../src/ui_render.c:705 #, fuzzy msgid "couldn't allocate memory space for ui_render_t" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/ui_render.c:928 msgid "Rendering Window" msgstr "" #. button to reset the axis #: ../src/ui_render.c:1018 msgid "Reset Axis" msgstr "" #: ../src/ui_render.c:1107 #, c-format msgid "%s: Rendering Initialization Dialog" msgstr "" #. do we want to strip values #: ../src/ui_render.c:1142 msgid "Set values greater than max. threshold to zero?" msgstr "" #. do we want to converse memory #: ../src/ui_render.c:1150 msgid "Accelerate Rendering? Increases memory use ~3x" msgstr "" #. do we want the initial opacities to be only density dependent #: ../src/ui_render.c:1158 msgid "Initial opacity functions only density dependent?" msgstr "" #: ../src/ui_render_dialog.c:350 #, fuzzy msgid "couldn't allocate memory space for ramp x" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/ui_render_dialog.c:355 #, fuzzy msgid "couldn't allocate memory space for ramp y" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/ui_render_dialog.c:446 msgid "Failed to Allocate Memory for Ramp" msgstr "" #: ../src/ui_render_dialog.c:496 #, c-format msgid "%s: Rendering Parameters Dialog" msgstr "" #. widgets to change the quality versus speed of rendering #: ../src/ui_render_dialog.c:519 msgid "Speed versus Quality" msgstr "" #. allow rendering to be click and drag #: ../src/ui_render_dialog.c:552 msgid "update without button release" msgstr "" #. widget for the stereo eye angle #: ../src/ui_render_dialog.c:567 msgid "Stereo Angle" msgstr "" #. widget for the stereo eye width #: ../src/ui_render_dialog.c:581 msgid "Eye Width (mm)" msgstr "" #. the depth cueing enabling button #: ../src/ui_render_dialog.c:603 msgid "enable/disable depth cueing" msgstr "" #: ../src/ui_render_dialog.c:611 msgid "Front Factor" msgstr "" #: ../src/ui_render_dialog.c:624 msgid "Density" msgstr "" #: ../src/ui_render_dialog.c:669 #, c-format msgid "%s: Transfer Function Dialog" msgstr "" #. widgets to change the returned pixel type of the rendering #: ../src/ui_render_dialog.c:695 msgid "Return Type" msgstr "" #. color table selector #: ../src/ui_render_dialog.c:725 msgid "color table:" msgstr "" #: ../src/ui_render_dialog.c:757 msgid "" "Density\n" "Dependent\n" "Opacity" msgstr "" #. gradient classification #: ../src/ui_render_dialog.c:759 msgid "" "Gradient\n" "Dependent\n" "Opacity" msgstr "" #. GTK no longer has a way to detect automatically when the GtkCurve has been changed, #. user will now have to explicitly change #: ../src/ui_render_dialog.c:783 msgid "Apply Curve Changes" msgstr "" #: ../src/ui_render_movie.c:399 #, fuzzy msgid "couldn't allocate memory space for ui_render_movie_t" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/ui_render_movie.c:641 #, c-format msgid "%s: Rendering Movie Generation Dialog" msgstr "" #. widgets to specify how many frames #: ../src/ui_render_movie.c:669 msgid "Movie Duration (sec)" msgstr "" #: ../src/ui_render_movie.c:694 #, c-format msgid "Rotations on %s" msgstr "" #: ../src/ui_render_movie.c:845 msgid "Rendered Movie Progress" msgstr "" #: ../src/ui_series.c:57 msgid "over Space" msgstr "" #: ../src/ui_series.c:58 msgid "over Time" msgstr "" #: ../src/ui_series.c:59 msgid "over Gates" msgstr "" #: ../src/ui_series.c:63 #, fuzzy msgid "Look at a series of images over a spatial dimension" msgstr "从一个轴å‘é¡ºåºæŸ¥çœ‹å‰–é¢å›¾" #: ../src/ui_series.c:64 msgid "Look at a series of images over time" msgstr "ä»Žæ—¶é—´é¡ºåºæŸ¥çœ‹å‰–é¢å›¾" #: ../src/ui_series.c:65 #, fuzzy msgid "Look at a series of images over gates" msgstr "ä»Žæ—¶é—´é¡ºåºæŸ¥çœ‹å‰–é¢å›¾" #: ../src/ui_series.c:200 msgid "ui_series canvas failed to return a valid image\n" msgstr "" #: ../src/ui_series.c:341 msgid "No data sets to threshold\n" msgstr "" #: ../src/ui_series.c:405 #, fuzzy msgid "_Export Series" msgstr "导出视图(_E)" #: ../src/ui_series.c:406 #, fuzzy msgid "Export the series view to a JPEG image file" msgstr "将数æ®é›†çš„一幅视图导出" #: ../src/ui_series.c:444 msgid "Set the thresholds and colormaps for the data sets in the series view" msgstr "" #: ../src/ui_series.c:577 #, fuzzy msgid "couldn't allocate memory space for ui_series_t" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/ui_series.c:693 msgid "Slicing for series" msgstr "" #: ../src/ui_series.c:700 #, fuzzy msgid "couldn't allocate memory space for pointers to image GnomeCanvasItem's" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/ui_series.c:705 #, fuzzy msgid "" "couldn't allocate memory space for pointers to caption GnomeCanvasItem's" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/ui_series.c:710 #, fuzzy msgid "couldn't allocate memory space for pointers to GnomeCanavasItem lists" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/ui_series.c:990 #, c-format msgid "Series: %s (%s - %s)" msgstr "" #: ../src/ui_series.c:1007 msgid "Need selected objects to create a series" msgstr "" #: ../src/ui_series.c:1078 msgid "Need selected data sets to generate a series of slices over time" msgstr "" #: ../src/ui_series.c:1086 #, fuzzy msgid "unable to allocate memory space for frames" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/ui_series.c:1095 msgid "unable to allocate memory for frame durations" msgstr "" #: ../src/ui_series.c:1369 #, c-format msgid "%s: Series Initialization Dialog" msgstr "" #. what series type do we want #: ../src/ui_series.c:1389 #, fuzzy msgid "Series Type:" msgstr "åºåˆ—图(_S)" #. what view type do we want #: ../src/ui_series.c:1422 msgid "View Type:" msgstr "" #. internal variables #: ../src/ui_study.c:46 msgid "new" msgstr "" #: ../src/ui_study.c:49 msgid "m1" msgstr "" #: ../src/ui_study.c:49 #, fuzzy msgid "shift-m1" msgstr "平移" #: ../src/ui_study.c:50 msgid "m2" msgstr "" #: ../src/ui_study.c:50 #, fuzzy msgid "shift-m2" msgstr "平移" #: ../src/ui_study.c:51 msgid "m3" msgstr "" #: ../src/ui_study.c:51 #, fuzzy msgid "shift-m3" msgstr "平移" #: ../src/ui_study.c:51 #, fuzzy msgid "ctrl-m3" msgstr "Shift-Ctrl-3" #: ../src/ui_study.c:62 msgid "ctrl-x" msgstr "" #: ../src/ui_study.c:63 #, fuzzy msgid "shift-ctrl-m3" msgstr "Shift-Ctrl-3" #. BLANK #. CANVAS_FIDUCIAL_MARK #: ../src/ui_study.c:71 ../src/ui_study.c:83 msgid "move view" msgstr "移动视图" #: ../src/ui_study.c:71 msgid "shift data set" msgstr "移动数æ®é›†" #: ../src/ui_study.c:72 ../src/ui_study.c:84 msgid "move view, min. depth" msgstr "è‡³å°æ·±åº¦ç§»åŠ¨è§†å›¾" #: ../src/ui_study.c:73 ../src/ui_study.c:85 msgid "change depth" msgstr "æ”¹å˜æ·±åº¦" #: ../src/ui_study.c:73 msgid "rotate data set" msgstr "旋转数æ®é›†" #: ../src/ui_study.c:73 ../src/ui_study.c:129 msgid "add fiducial mark" msgstr "增加基准标志" #. DATA SET #. CANVAS_ROI #. STUDY #. CANVAS_ISOCONTOUR_ROI #: ../src/ui_study.c:75 ../src/ui_study.c:79 ../src/ui_study.c:87 #: ../src/ui_study.c:91 ../src/ui_study.c:121 msgid "shift" msgstr "平移" #: ../src/ui_study.c:76 msgid "scale" msgstr "缩放" #: ../src/ui_study.c:77 ../src/ui_study.c:125 msgid "rotate" msgstr "旋转" #: ../src/ui_study.c:77 ../src/ui_study.c:89 ../src/ui_study.c:93 msgid "set data set inside roi to zero" msgstr "" #: ../src/ui_study.c:78 ../src/ui_study.c:90 ../src/ui_study.c:94 msgid "set data set outside roi to zero" msgstr "" #: ../src/ui_study.c:85 msgid "rotate study" msgstr "旋转项目" #: ../src/ui_study.c:88 ../src/ui_study.c:92 msgid "enter draw mode" msgstr "" #: ../src/ui_study.c:89 msgid "start isocontour change" msgstr "" #. CANVAS_FREEHAND_ROI #: ../src/ui_study.c:95 msgid "draw point" msgstr "" #: ../src/ui_study.c:95 msgid "draw large point" msgstr "" #: ../src/ui_study.c:96 msgid "leave draw mode" msgstr "" #: ../src/ui_study.c:97 #, fuzzy msgid "erase point" msgstr "选择点" #: ../src/ui_study.c:97 msgid "erase large point" msgstr "" #. CANVAS_DRAWING_MODE #: ../src/ui_study.c:99 #, fuzzy msgid "move line" msgstr "移动视图" #: ../src/ui_study.c:101 #, fuzzy msgid "rotate line" msgstr "旋转" #. CANVAS_LINE_PROFILE #: ../src/ui_study.c:103 msgid "draw - edge-to-edge" msgstr "" #: ../src/ui_study.c:104 msgid "draw - center out" msgstr "" #. CANVAS_NEW_ROI #: ../src/ui_study.c:107 msgid "pick isocontour start point" msgstr "" #. CANVAS_NEW_ISOCONTOUR_ROI #: ../src/ui_study.c:111 msgid "pick freehand drawing start point" msgstr "" #. CANVAS_NEW_FREEHAND_ROI #. CANVAS CHANGE ISOCONTOUR #. CANVAS SHIFT OBJECT #: ../src/ui_study.c:115 ../src/ui_study.c:119 ../src/ui_study.c:123 msgid "cancel" msgstr "å–æ¶ˆ" #: ../src/ui_study.c:117 msgid "pick new isocontour" msgstr "" #. CANVAS ROTATE OBJECT #: ../src/ui_study.c:127 msgid "select data set" msgstr "选择数æ®é›†" #: ../src/ui_study.c:128 ../src/ui_study.c:140 msgid "make active" msgstr "激活" #: ../src/ui_study.c:129 msgid "pop up data set dialog" msgstr "弹出数æ®é›†å¯¹è¯æ¡†" #: ../src/ui_study.c:129 ../src/ui_study.c:141 ../src/ui_study.c:145 msgid "add roi" msgstr "增加 ROI" #: ../src/ui_study.c:130 msgid "delete data set" msgstr "删除数æ®é›†" #. TREE_DATA_SET #: ../src/ui_study.c:131 msgid "select roi" msgstr "选择 ROI" #: ../src/ui_study.c:132 msgid "center view on roi" msgstr "以 ROI 为中心的视图" #: ../src/ui_study.c:133 msgid "pop up roi dialog" msgstr "弹出 ROI å¯¹è¯æ¡†" #: ../src/ui_study.c:134 msgid "delete roi" msgstr "删除 ROI" #. TREE_ROI #: ../src/ui_study.c:135 msgid "select point" msgstr "选择点" #: ../src/ui_study.c:136 msgid "center view on point" msgstr "以点为中心的视图" #: ../src/ui_study.c:137 msgid "pop up point dialog" msgstr "å¼¹å‡ºç‚¹å¯¹è¯æ¡†" #: ../src/ui_study.c:138 msgid "delete mark" msgstr "" #: ../src/ui_study.c:141 msgid "pop up study dialog" msgstr "" #: ../src/ui_study.c:507 #, c-format msgid "" "Adding fiducial mark for data set: %s\n" "Enter the mark's name:" msgstr "" #: ../src/ui_study.c:553 #, c-format msgid "" "Adding ROI to: %s\n" "Enter ROI Name:" msgstr "" #: ../src/ui_study.c:610 #, c-format msgid "%d-%d" msgstr "" #: ../src/ui_study.c:614 msgid "N/A" msgstr "" #: ../src/ui_study.c:629 #, c-format msgid "%g-%g s" msgstr "" #: ../src/ui_study.c:709 #, c-format msgid "[x,y,z] = [% 5.2f,% 5.2f,% 5.2f] mm" msgstr "" #: ../src/ui_study.c:712 #, c-format msgid "value = % 5.3g" msgstr "" #: ../src/ui_study.c:714 msgid "value = none" msgstr "" #: ../src/ui_study.c:716 msgid "shift (x,y,z) =" msgstr "" #: ../src/ui_study.c:717 ../src/ui_study.c:726 #, c-format msgid "[% 5.2f,% 5.2f,% 5.2f] mm" msgstr "" #: ../src/ui_study.c:721 #, c-format msgid "theta = % 5.3f degrees" msgstr "" #: ../src/ui_study.c:725 msgid "view center (x,y,z) =" msgstr "" #: ../src/ui_study.c:924 #, c-format msgid "Study: %s %s" msgstr "" #: ../src/ui_study.c:928 #, c-format msgid "Study: %s (%s) %s" msgstr "" #: ../src/ui_study_cb.c:57 msgid "" "This wizard requires compiled in support from the GNU Scientific Library " "(libgsl), which this copy of AMIDE does not have." msgstr "" #: ../src/ui_study_cb.c:76 #, c-format msgid "%s: Pick Object(s) to Import" msgstr "" #: ../src/ui_study_cb.c:151 #, c-format msgid "error loading study: %s" msgstr "读入 %1$s 图åƒåˆ†æžé¡¹ç›®å‡ºé”™" #: ../src/ui_study_cb.c:179 msgid "Open AMIDE XIF File" msgstr "" #: ../src/ui_study_cb.c:271 msgid "Save File" msgstr "ä¿å­˜æ–‡ä»¶" #: ../src/ui_study_cb.c:353 #, c-format msgid "Could not import data sets from file %s\n" msgstr "" #: ../src/ui_study_cb.c:373 msgid "Import File" msgstr "导入文件" #: ../src/ui_study_cb.c:476 #, fuzzy msgid "There's currently no active data set to export" msgstr "æ— å½“å‰æ•°æ®é›†å¯åˆ é™¤" #: ../src/ui_study_cb.c:583 #, fuzzy, c-format msgid "error recovering study: %s" msgstr "读入 %1$s 图åƒåˆ†æžé¡¹ç›®å‡ºé”™" #: ../src/ui_study_cb.c:608 msgid "Recover AMIDE XIF File" msgstr "" #: ../src/ui_study_cb.c:714 msgid "no active data set to erase from" msgstr "æ— å½“å‰æ•°æ®é›†å¯åˆ é™¤" #: ../src/ui_study_cb.c:723 #, c-format msgid "" "Do you really wish to erase the data set %s\n" " to the ROI: %s\n" " on the data set: %s\n" "This step is irreversible\n" "The minimum threshold value: %5.3f\n" " will be used to fill in the volume" msgstr "" #: ../src/ui_study_cb.c:724 msgid "exterior" msgstr "外部" #: ../src/ui_study_cb.c:724 msgid "interior" msgstr "内部" #: ../src/ui_study_cb.c:836 #, c-format msgid "Do you really want to delete: %s%s" msgstr "您是å¦ç¡®å®šåˆ é™¤ï¼š%1$s%2$s" #: ../src/ui_study_cb.c:839 #, fuzzy msgid "" "\n" "and its children" msgstr "" "\n" "它还是个孩å­" #: ../src/ui_study_cb.c:1351 msgid "" "There are unsaved changes to the study.\n" "Are you sure you wish to quit?" msgstr "" "当å‰é¡¹ç›®çš„å˜åŒ–还未ä¿å­˜ã€‚\n" "您是å¦ç¡®å®šæŽ¨å‡ºï¼Ÿ" #: ../src/ui_study_menus.c:172 ../src/ui_study_menus.c:251 msgid "_Transverse" msgstr "横断é¢(_T)" #: ../src/ui_study_menus.c:173 msgid "" "Export the current transaxial view to an image file (JPEG/TIFF/PNG/etc.)" msgstr "å¯¼å‡ºå½“å‰æ¨ªæ–­é¢è§†å›¾åˆ°ä¸€ä¸ªå›¾åƒæ–‡ä»¶(JPEG/TIFF/PNG ç­‰)" #: ../src/ui_study_menus.c:175 ../src/ui_study_menus.c:254 msgid "_Coronal" msgstr "头断é¢(_C)" #: ../src/ui_study_menus.c:176 msgid "Export the current coronal view to an image file (JPEG/TIFF/PNG/etc.)" msgstr "导出当å‰å¤´æ–­é¢è§†å›¾åˆ°ä¸€ä¸ªå›¾åƒæ–‡ä»¶(JPEG/TIFF/PNG ç­‰)" #: ../src/ui_study_menus.c:178 ../src/ui_study_menus.c:257 msgid "_Sagittal" msgstr "ç«–æ–­é¢(_S)" #: ../src/ui_study_menus.c:179 msgid "Export the current sagittal view to an image file (JPEG/TIFF/PNG/etc.)" msgstr "导出当å‰ç«–æ–­é¢è§†å›¾åˆ°ä¸€ä¸ªå›¾åƒæ–‡ä»¶(JPEG/TIFF/PNG ç­‰)" #: ../src/ui_study_menus.c:186 msgid "_New Study" msgstr "新项目(_N)" #: ../src/ui_study_menus.c:187 msgid "Create a new study viewer window" msgstr "创建一个新项目的查看窗" #: ../src/ui_study_menus.c:192 msgid "_Import File (guess)" msgstr "导入文件(猜测格å¼ï¼‰(_I)" #: ../src/ui_study_menus.c:193 msgid "Import an image data file into this study, guessing at the file type" msgstr "å‘当å‰é¡¹ç›®å¯¼å…¥ä¸€ä¸ªå›¾åƒæ•°æ®æ–‡ä»¶ï¼ŒçŒœæµ‹æ•°æ®æ ¼å¼" #: ../src/ui_study_menus.c:196 msgid "Import File (_specify)" msgstr "导入文件(指定格å¼ï¼‰(_s)" #: ../src/ui_study_menus.c:197 #, fuzzy msgid "Import an image data file into this study, specifying the import type" msgstr "å‘当å‰é¡¹ç›®å¯¼å…¥ä¸€ä¸ªå›¾åƒæ•°æ®æ–‡ä»¶ï¼ŒæŒ‡å®šå¯¼å…¥æ–¹å¼" #: ../src/ui_study_menus.c:199 msgid "Import _Object from Study" msgstr "" #: ../src/ui_study_menus.c:200 msgid "Import an object, such as an ROI, from a preexisting .xif file" msgstr "" #: ../src/ui_study_menus.c:204 msgid "_Export View" msgstr "导出视图(_E)" #: ../src/ui_study_menus.c:205 #, fuzzy msgid "Export one of the views to a picture file" msgstr "将数æ®é›†çš„一幅视图导出" #: ../src/ui_study_menus.c:207 msgid "Export _Data Set" msgstr "" #: ../src/ui_study_menus.c:208 msgid "Export data set(s) to medical image formats" msgstr "" #: ../src/ui_study_menus.c:212 #, fuzzy msgid "_Recover Study" msgstr "新项目(_N)" #: ../src/ui_study_menus.c:213 msgid "Try to recover a corrupted XIF flat file" msgstr "" #: ../src/ui_study_menus.c:225 msgid "Add _ROI" msgstr "增加ROI文件(_R)" #: ../src/ui_study_menus.c:226 msgid "Add a new ROI" msgstr "新增ROI文件" #: ../src/ui_study_menus.c:228 msgid "Add _Fiducial Mark" msgstr "增加基准标志(_F)" #: ../src/ui_study_menus.c:229 msgid "Add a new fiducial mark to the active data set" msgstr "ç»™å½“å‰æ•°æ®é›†å¢žåŠ æ–°çš„åŸºå‡†æ ‡å¿—" #: ../src/ui_study_menus.c:238 msgid "_Series" msgstr "åºåˆ—图(_S)" #: ../src/ui_study_menus.c:239 msgid "Look at a series of images" msgstr "按åºåˆ—查看剖é¢å›¾" #: ../src/ui_study_menus.c:242 msgid "_Volume Rendering" msgstr "体视图生æˆ(_V)" #: ../src/ui_study_menus.c:243 msgid "perform a volume rendering on the currently selected objects" msgstr "生æˆå½“å‰é€‰å®šå¯¹è±¡çš„三维立体é€è§†å›¾" #: ../src/ui_study_menus.c:252 msgid "Generate a fly through using transaxial slices" msgstr "便¨ªå‘产生é€å¸§å¯Ÿçœ‹åŠ¨ç”»" #: ../src/ui_study_menus.c:255 msgid "Generate a fly through using coronal slices" msgstr "ä¾å¤´å‘产生é€å¸§å¯Ÿçœ‹åŠ¨ç”»" #: ../src/ui_study_menus.c:258 msgid "Generate a fly through using sagittal slices" msgstr "ä¾ç«–å‘产生é€å¸§å¯Ÿçœ‹åŠ¨ç”»" #: ../src/ui_study_menus.c:266 msgid "_Alignment Wizard" msgstr "排列å‘导(_A)" #: ../src/ui_study_menus.c:267 msgid "guides you throw the processing of alignment" msgstr "逿­¥æŒ‡å¯¼ä½ åšæŽ’åˆ—å¤„ç†" #: ../src/ui_study_menus.c:270 msgid "_Crop Active Data Set" msgstr "è£å‡å½“剿•°æ®é›†(_C)" #: ../src/ui_study_menus.c:271 msgid "allows you to crop the active data set" msgstr "è£å‡å½“剿•°æ®é›†" #: ../src/ui_study_menus.c:274 msgid "_Factor Analysis" msgstr "è¦ç´ åˆ†æž(_F)" #: ../src/ui_study_menus.c:275 msgid "allows you to do factor analysis of dynamic data on the active data set" msgstr "坹当剿•°æ®é›†çš„åŠ¨æ€æ•°æ®åšè¦ç´ åˆ†æž" #: ../src/ui_study_menus.c:278 msgid "_Filter Active Data Set" msgstr "过滤处ç†å½“剿•°æ®é›†(_F)" #: ../src/ui_study_menus.c:279 msgid "allows you to filter the active data set" msgstr "过滤处ç†å½“剿•°æ®é›†" #: ../src/ui_study_menus.c:283 msgid "Generate _Fly Through" msgstr "产生é€å¸§å¯Ÿçœ‹åŠ¨ç”»(_F)" #: ../src/ui_study_menus.c:284 msgid "generate an mpeg fly through of the data sets" msgstr "从数æ®é›†ä¸­äº§ç”Ÿé€å¸§å¯Ÿçœ‹åŠ¨ç”»" #: ../src/ui_study_menus.c:287 msgid "Generate Line _Profile" msgstr "" #: ../src/ui_study_menus.c:288 msgid "allows generating a line profile between two fiducial marks" msgstr "" #: ../src/ui_study_menus.c:291 msgid "Perform _Math on Data Sets" msgstr "" #: ../src/ui_study_menus.c:292 #, fuzzy msgid "allows doing simple math operations between data sets" msgstr "过滤处ç†å½“剿•°æ®é›†" #: ../src/ui_study_menus.c:295 msgid "Calculate _ROI Statistics" msgstr "计算ROI的统计信æ¯(_R)" #: ../src/ui_study_menus.c:296 msgid "caculate ROI statistics" msgstr "计算ROI的统计信æ¯" #: ../src/ui_study_menus.c:306 msgid "_Tools" msgstr "工具(_T)" #: ../src/ui_study_menus.c:411 msgid "Leave crosshairs on canvases" msgstr "å°†å字线留在背景上" #: ../src/ui_study_menus.c:429 msgid "Set the thresholds and colormaps for the active data set" msgstr "设定数æ®é›†çš„伪彩色表和æžé™" #: ../src/ui_study_menus.c:541 msgid "specify how much to magnify the images" msgstr "指定图åƒçš„æ”¾å¤§çއ" #. add the field of view widget to our toolbar #: ../src/ui_study_menus.c:548 msgid "fov (%):" msgstr "" #: ../src/ui_study_menus.c:567 #, fuzzy msgid "specify how much of the image field of view to display" msgstr "指定图åƒçš„æ”¾å¤§çއ" #. add the slice thickness selector #: ../src/ui_study_menus.c:574 msgid "thickness (mm):" msgstr "厚度(毫米):" #: ../src/ui_study_menus.c:593 msgid "specify how thick to make the slices (mm)" msgstr "指定切片的厚度(毫米)" #. gate #: ../src/ui_study_menus.c:599 #, fuzzy msgid "gate:" msgstr "时间:" #: ../src/ui_study_menus.c:609 #, fuzzy msgid "the gate range over which to view the data" msgstr "时间范围超出数æ®çš„视图(ç§’)" #. frame selector #: ../src/ui_study_menus.c:615 msgid "time:" msgstr "时间:" #: ../src/ui_study_menus.c:625 msgid "the time range over which to view the data (s)" msgstr "时间范围超出数æ®çš„视图(ç§’)" #: ../src/ui_time_dialog.c:59 ../src/ui_time_dialog.c:485 msgid "Start (s)" msgstr "开始(ç§’)" #: ../src/ui_time_dialog.c:60 ../src/ui_time_dialog.c:504 msgid "End (s)" msgstr "结æŸ(ç§’)" #: ../src/ui_time_dialog.c:61 msgid "Frame #" msgstr "帧 #" #: ../src/ui_time_dialog.c:242 msgid "can't count frames or allocate memory!" msgstr "无法计算帧数或者分é…内存" #: ../src/ui_time_dialog.c:459 #, c-format msgid "%s: Time Dialog" msgstr "%1$sï¼šæ—¶é—´å¯¹è¯æ¡†" #: ../src/xml.c:172 #, c-format msgid "Couldn't read time value for %s, substituting %5.3f" msgstr "æ— æ³•è¯»å– %1$s 的时间值,代定为%2$5.3f" #: ../src/xml.c:201 ../src/xml.c:242 #, fuzzy msgid "Couldn't allocate memory space for time data" msgstr "无法为时间数æ®åˆ†é…空间" #: ../src/xml.c:233 msgid "XIF File appears corrupted, setting frame durations to 1" msgstr "" #: ../src/xml.c:240 #, fuzzy, c-format msgid "Couldn't read value for %s, substituting 1" msgstr "æ— æ³•è¯»å– %1$s 的值,代定为%2$d" #: ../src/xml.c:287 #, c-format msgid "Couldn't read value for %s, substituting %5.3f" msgstr "æ— æ³•è¯»å– %1$s 的值,代定为%2$5.3f" #: ../src/xml.c:349 #, c-format msgid "Couldn't read value for %s, substituting FALSE" msgstr "æ— æ³•è¯»å– %1$s 的值,代定为“å‡â€" #: ../src/xml.c:385 #, c-format msgid "Couldn't read value for %s, substituting %d" msgstr "æ— æ³•è¯»å– %1$s 的值,代定为%2$d" #: ../src/xml.c:426 #, fuzzy, c-format msgid "Couldn't read value for %s, substituting 0x%llx 0x%llx" msgstr "æ— æ³•è¯»å– %1$s 的值,代定为%2$d" #: ../src/xml.c:663 #, c-format msgid "Couldn't Parse AMIDE xml file %s" msgstr "" #: ../src/xml.c:687 #, c-format msgid "Could not seek to location %lx in file." msgstr "" #: ../src/xml.c:693 #, c-format msgid "Only read %x bytes from file, expected %x" msgstr "" #~ msgid "No data sets selected\n" #~ msgstr "未选定数æ®é›†\n" #~ msgid "Look at a series of transaxial views in a single frame" #~ msgstr "察看一帧的横断é¢å›¾ç³»åˆ—" #~ msgid "Look at a series of coronal views in a single frame" #~ msgstr "察看一帧的头断é¢å›¾ç³»åˆ—" #~ msgid "Look at a series of sagittal views in a single frame" #~ msgstr "察看一帧的竖断é¢å›¾ç³»åˆ—" #~ msgid "Look at a times series of a single transaxial view" #~ msgstr "察看一个横断é¢è§†å›¾çš„æ—¶é—´åºåˆ—" #~ msgid "Look at a time series of a single coronal view" #~ msgstr "察看一个头断é¢è§†å›¾çš„æ—¶é—´ç³»åˆ—" #~ msgid "Look at a time series of a a signal sagittal view" #~ msgstr "察看一个竖断é¢è§†å›¾çš„æ—¶é—´ç³»åˆ—" #~ msgid "_Space" #~ msgstr "空间(_S)" #~ msgid "_Time" #~ msgstr "æ—¶é—´(_T)" #~ msgid "Couldn't read value for %s, substituting zero" #~ msgstr "æ— æ³•è¯»å– %1$s 的值,代定为“零â€" amide-1.0.5/po/Makefile.in.in0000644000175000017500000001530410657234431015544 0ustar loeningloening# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize # # - Modified by Rodney Dawes for use with intltool # # We have the following line for use by intltoolize: # INTLTOOL_MAKEFILE GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ datarootdir = @datarootdir@ libdir = @libdir@ DATADIRNAME = @DATADIRNAME@ itlocaledir = $(prefix)/$(DATADIRNAME)/locale subdir = po install_sh = @install_sh@ # Automake >= 1.8 provides @mkdir_p@. # Until it can be supposed, use the safe fallback: mkdir_p = $(install_sh) -d INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot ALL_LINGUAS = @ALL_LINGUAS@ PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi) USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi) USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES) EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS POTFILES = \ # This comment gets stripped out CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) .SUFFIXES: .SUFFIXES: .po .pox .gmo .mo .msg .cat .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && gencat $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(GETTEXT_PACKAGE).pot: $(POTFILES) $(GENPOT) install: install-data install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all $(mkdir_p) $(DESTDIR)$(itlocaledir) linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $$dir; \ if test -r $$lang.gmo; then \ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ else \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $(srcdir)/$$lang.gmo as" \ "$$dir/$(GETTEXT_PACKAGE).mo"; \ fi; \ if test -r $$lang.gmo.m; then \ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ if test -r $(srcdir)/$$lang.gmo.m ; then \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $(srcdir)/$$lang.gmo.m as" \ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ true; \ fi; \ fi; \ done # Empty stubs to satisfy archaic automake needs dvi info tags TAGS ID: # Define this as empty until I found a useful application. installcheck: uninstall: linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ done check: all $(GETTEXT_PACKAGE).pot rm -f missing notexist srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m if [ -r missing -o -r notexist ]; then \ exit 1; \ fi mostlyclean: rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp rm -f .intltool-merge-cache clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES stamp-it rm -f *.mo *.msg *.cat *.cat.m *.gmo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f Makefile.in.in distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ extra_dists="$(EXTRA_DISTFILES)"; \ for file in $$extra_dists; do \ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ done; \ for file in $$dists; do \ test -f $$file || file="$(srcdir)/$$file"; \ ln $$file $(distdir) 2> /dev/null \ || cp -p $$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ echo "$$lang:"; \ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ if $$result; then \ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.gmo failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done Makefile POTFILES: stamp-it @if test ! -f $@; then \ rm -f stamp-it; \ $(MAKE) stamp-it; \ fi stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: amide-1.0.5/po/POTFILES.in0000664000175000017500000000167610657234431014660 0ustar loeningloeningetc/amide.desktop.in src/alignment.c src/amide.c src/amitk_canvas.c src/amitk_color_table.c src/amitk_data_set.c src/amitk_data_set_variable_type.c src/amitk_filter.c src/amitk_object.c src/amitk_object_dialog.c src/amitk_point.c src/amitk_progress_dialog.c src/amitk_raw_data.c src/amitk_roi.c src/amitk_roi_variable_type.c src/amitk_space_edit.c src/amitk_study.c src/amitk_threshold.c src/amitk_xif_sel.c src/dcmtk_interface.cc src/libecat_interface.c src/libmdc_interface.c src/tb_export_data_set.c src/tb_math.c src/tb_profile.c src/ui_gate_dialog.c src/analysis.c src/fads.c src/image.c src/mpeg_encode.c src/raw_data_import.c src/render.c src/tb_alignment.c src/tb_crop.c src/tb_fads.c src/tb_filter.c src/tb_fly_through.c src/tb_roi_analysis.c src/ui_common.c src/ui_preferences_dialog.c src/ui_render.c src/ui_render_dialog.c src/ui_render_movie.c src/ui_series.c src/ui_study.c src/ui_study_cb.c src/ui_study_menus.c src/ui_time_dialog.c src/xml.c amide-1.0.5/po/zh_TW.po0000664000175000017500000041301012235251134014454 0ustar loeningloening# Traditional Chinese translation for Amide. # Copyright (C) Andreas Loening (msgids) # This file is distributed under the same license as the amide package. # Wales Wang , 2003. # Wei-Lun Chao , 2011. # #: ../src/amitk_study.c:967 ../src/amitk_study.c:1036 msgid "" msgstr "" "Project-Id-Version: amide 1.0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-11-12 15:17+0800\n" "PO-Revision-Date: 2011-11-12 15:20+0800\n" "Last-Translator: Wei-Lun Chao \n" "Language-Team: Chinese (traditional) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../etc/amide.desktop.in.h:1 msgid "A Medical Image Data Examiner" msgstr "醫學影åƒè³‡æ–™å¯©è¦–器" #: ../etc/amide.desktop.in.h:2 msgid "Amide" msgstr "Amide" #: ../etc/amide.desktop.in.h:3 msgid "Medical Image Examiner" msgstr "醫學影åƒå¯©è¦–器" #: ../src/alignment_mutual_information.c:308 #, c-format msgid "Maximizing the mutual information" msgstr "將交互資訊放到最大" #: ../src/alignment_procrustes.c:165 #, c-format msgid "Cannot perform an alignment with %d points, need at least 3" msgstr "無法以 %d 點åƒç´ æ–½è¡Œå°é½Šï¼Œéœ€è¦è‡³å°‘ 3 點" #: ../src/alignment_procrustes.c:210 #, c-format msgid "points lists not completely used in %s at %d" msgstr "%s åƒç´ æ¸…單中 %d 未完全用完" #: ../src/alignment_procrustes.c:226 ../src/fads.c:148 ../src/fads.c:292 #, c-format msgid "SV decomp returned error: %s" msgstr "SV 解碼發生錯誤: %s" #: ../src/alignment_procrustes.c:232 #, c-format msgid "transpose returned error: %s" msgstr "轉æ›ç™¼ç”ŸéŒ¯èª¤: %s" #: ../src/alignment_procrustes.c:238 #, c-format msgid "LU decomp returned error: %s" msgstr "LU 解碼發生錯誤: %s" #: ../src/amide.c:47 msgid "_Study" msgstr "檢驗(_S)" #: ../src/amide.c:48 msgid "Selected _Data Sets" msgstr "所é¸è³‡æ–™é›†(_D)" #: ../src/amide.c:49 msgid "Selected _ROIs" msgstr "æ‰€é¸ _ROIs" #: ../src/amide.c:50 msgid "Selected _Alignment Points" msgstr "所é¸å°é½Šé»ž(_A)" #: ../src/amide.c:115 msgid "This version of AMIDE has been compiled without the following functionality:" msgstr "這個版本的 AMIDE 已被編譯而排除下列功能:" #: ../src/amide.c:118 msgid "Line profiles, factor analysis, some filtering, and some alignment (missing libgsl)." msgstr "曲線輪廓ã€å› ç´ åˆ†æžã€æŸäº›ç¯©é¸å™¨ï¼Œä»¥åŠæŸäº›å°é½Šæ€§ (缺少 libgsl)。" #: ../src/amide.c:121 msgid "Reading of most medical imaging formats except raw and DICOM (missing libmdc)." msgstr "讀å–大多數醫學æˆåƒæ ¼å¼ï¼Œé™¤äº† raw å’Œ DICOM (缺少 libmdc)。" #: ../src/amide.c:124 msgid "Reading of most DICOM files (missing libdcmdata/dcmtk)." msgstr "讀å–大多數 DICOM 檔案 (缺少 libdcmdata/dcmtk)。" #: ../src/amide.c:127 msgid "Volume rendering (missing libvolpack)." msgstr "é«”ç©æ½¤ç®— (缺少 libvolpack)。" #: ../src/amide.c:130 msgid "Saving MPEG output (missing ffmpeg and missing libfame)." msgstr "儲存 MPEG 輸出 (缺少 ffmpeg 和缺少 libfame)。" #: ../src/amide.c:182 msgid "[FILE1] [FILE2] ..." msgstr "[檔案一] [檔案二]…" #: ../src/amide.c:242 #, c-format msgid "%s does not exist" msgstr "%s ä¸å­˜åœ¨" #: ../src/amide.c:246 #, c-format msgid "Failed to load in as XIF file: %s" msgstr "載入為 XIF 檔案時失敗:%s" #: ../src/amide.c:270 #, c-format msgid "%s is not an AMIDE study or importable file type" msgstr "%s 䏿˜¯ä¸€å€‹ AMIDE 檢驗或是å¯åŒ¯å…¥çš„æª”案類型" #: ../src/amide.c:272 #, c-format msgid "%s is not an AMIDE XIF Directory" msgstr "%s 䏿˜¯ä¸€å€‹ AMIDE XIF 目錄" #: ../src/amide_gnome.c:85 #, c-format msgid "Unknown internal error while displaying this location." msgstr "顯示這個ä½ç½®æ™‚ç™¼ç”Ÿä¸æ˜Žå…§éƒ¨éŒ¯èª¤ã€‚" #: ../src/amide_gnome.c:92 #, c-format msgid "The specified location is invalid." msgstr "指定的ä½ç½®ç„¡æ•ˆã€‚" #: ../src/amide_gnome.c:99 #, c-format msgid "There was an error parsing the default action command associated with this location." msgstr "剖æžèˆ‡é€™å€‹ä½ç½®ç›¸é—œè¯çš„é è¨­å‹•作命令時出ç¾äº†éŒ¯èª¤ã€‚" #: ../src/amide_gnome.c:107 #, c-format msgid "There was an error launching the default action command associated with this location." msgstr "啟動與這個ä½ç½®ç›¸é—œè¯çš„é è¨­å‹•作命令時出ç¾äº†éŒ¯èª¤ã€‚" #: ../src/amide_gnome.c:115 #, c-format msgid "There is no default action associated with this location." msgstr "沒有任何與這個ä½ç½®ç›¸é—œè¯çš„é è¨­å‹•作命令。" #: ../src/amide_gnome.c:122 #, c-format msgid "The default action does not support this protocol." msgstr "é è¨­çš„å‹•ä½œä¸æ”¯æ´é€™å€‹å”定。" #: ../src/amide_gnome.c:129 #, c-format msgid "The request was cancelled." msgstr "è¦æ±‚è¢«å–æ¶ˆäº†ã€‚" #: ../src/amide_gnome.c:139 #, c-format msgid "The host \"%s\" could not be found." msgstr "找ä¸åˆ°ä¸»æ©Ÿã€Œ%sã€ã€‚" #: ../src/amide_gnome.c:145 #, c-format msgid "The host could not be found." msgstr "找ä¸åˆ°ä¸»æ©Ÿã€‚" #: ../src/amide_gnome.c:156 #, c-format msgid "The location or file could not be found." msgstr "找ä¸åˆ°ä½ç½®æˆ–檔案。" #: ../src/amide_gnome.c:163 #, c-format msgid "The login has failed." msgstr "登入已失敗。" #: ../src/amide_gnome.c:354 #, c-format msgid "Unable to find the app or global HELP domain" msgstr "無法找到應用軟體或全域說明功能" #: ../src/amide_gnome.c:391 #, c-format msgid "Unable to find the help files in any of the following directories, or these are not valid directories: %s : Please check your installation" msgstr "在下列任何目錄中無法找到說明檔案,或者是這些無效目錄:%s: 請檢查您的安è£" #: ../src/amitk_canvas.c:72 msgid "A" msgstr "A" #: ../src/amitk_canvas.c:72 msgid "P" msgstr "P" #: ../src/amitk_canvas.c:72 msgid "L" msgstr "L" #: ../src/amitk_canvas.c:72 msgid "R" msgstr "R" #: ../src/amitk_canvas.c:72 msgid "S" msgstr "S" #: ../src/amitk_canvas.c:72 msgid "I" msgstr "I" #: ../src/amitk_canvas.c:727 msgid "ROI Depth Selection" msgstr "ROI æ·±åº¦é¸æ“‡" #: ../src/amitk_canvas.c:741 msgid "Please pick depth of ROI (mm):" msgstr "è«‹æ€å– ROI 的深度 (å…¬é‡):" #: ../src/amitk_canvas.c:843 msgid "Parent of isocontour not currently displayed, can't draw isocontour" msgstr "ç›®å‰ä¸¦æœªé¡¯ç¤ºè¼ªå»“é¢çš„上層,無法繪製輪廓é¢" #: ../src/amitk_canvas.c:860 msgid "No data set found to draw isocontour on" msgstr "找ä¸åˆ°ä»»ä½•資料集用以繪製輪廓é¢" #: ../src/amitk_canvas.c:877 #, c-format msgid "designated voxel not in data set %s" msgstr "指定的體素ä¸å­˜åœ¨æ–¼è³‡æ–™é›† %s" #. pop up dialog to let user pick isocontour values, etc. and for any warning messages #: ../src/amitk_canvas.c:891 msgid "Isocontour Value Selection" msgstr "è¼ªå»“é¢æ•¸å€¼é¸æ“‡" #: ../src/amitk_canvas.c:913 #, c-format msgid "" "Multiple data frames are currently being shown from: %s\n" "The isocontour will only be drawn over frame %d" msgstr "" "多é‡è³‡æ–™å½±æ ¼ç›®å‰é¡¯ç¤ºè‡ªï¼š%s\n" "輪廓é¢å°‡åªè¢«ç¹ªè£½æ–¼å½±æ ¼ %d" #: ../src/amitk_canvas.c:925 #, c-format msgid "" "Multiple gates are currently being shown from: %s\n" "The isocontour will only be drawn over gate %d" msgstr "" "多é‡é–˜å£ç›®å‰é¡¯ç¤ºè‡ªï¼š%s\n" "輪廓é¢å°‡åªè¢«ç¹ªè£½æ–¼é–˜å£ %d" #. the spin buttons #: ../src/amitk_canvas.c:945 msgid "Min:" msgstr "最å°ï¼š" #: ../src/amitk_canvas.c:961 msgid "Max:" msgstr "最大:" #. radio buttons to choose the isocontour type #: ../src/amitk_canvas.c:980 msgid "Above Min" msgstr "最å°ä»¥ä¸Š" #: ../src/amitk_canvas.c:981 msgid "Below Max" msgstr "最大以下" #: ../src/amitk_canvas.c:982 msgid "Between Min/Max" msgstr "在最å°/最大之間" #: ../src/amitk_canvas.c:1048 msgid "Parent of roi not currently displayed, can't draw freehand roi" msgstr "ç›®å‰ä¸¦æœªé¡¯ç¤º roi 的上層,無法手繪 roi" #: ../src/amitk_canvas.c:1065 msgid "No data set found to draw freehand roi on" msgstr "找ä¸åˆ°ä»»ä½•資料集用以手繪 roi" #. pop up dialog to let user pick isocontour values, etc. and for any warning messages #: ../src/amitk_canvas.c:1077 msgid "Freehand ROI Parameters" msgstr "手繪 ROI åƒæ•¸" #: ../src/amitk_canvas.c:1096 #, c-format msgid "Voxel Size %s" msgstr "é«”ç´ å¤§å° %s" #: ../src/amitk_canvas.c:1658 ../src/amitk_canvas.c:2219 #: ../src/amitk_canvas.c:2269 ../src/amitk_canvas.c:2277 msgid "The active data set is not visible" msgstr "作用中資料集是ä¸å¯è¦‹çš„" #: ../src/amitk_canvas.c:3225 msgid "Canvas has no style?\n" msgstr "畫布沒有任何樣å¼ï¼Ÿ\n" #: ../src/amitk_color_table.c:37 msgid "black/white linear" msgstr "黑/白線性" #: ../src/amitk_color_table.c:38 msgid "white/black linear" msgstr "白/黑線性" #: ../src/amitk_color_table.c:39 msgid "black/white/black" msgstr "黑/白/黑" #: ../src/amitk_color_table.c:40 msgid "white/black/white" msgstr "白/黑/白" #: ../src/amitk_color_table.c:41 msgid "red temperature" msgstr "紅色溫度" #: ../src/amitk_color_table.c:42 msgid "inverse red temp." msgstr "紅色逆溫度" #: ../src/amitk_color_table.c:43 msgid "blue temperature" msgstr "è—色溫度" #: ../src/amitk_color_table.c:44 msgid "inv. blue temp." msgstr "è—色逆溫度" #: ../src/amitk_color_table.c:45 msgid "green temperature" msgstr "綠色溫度" #: ../src/amitk_color_table.c:46 msgid "inv. green temp." msgstr "綠色逆溫度" #: ../src/amitk_color_table.c:47 msgid "hot metal" msgstr "熱金屬色" #: ../src/amitk_color_table.c:48 msgid "inv. hot metal" msgstr "熱逆金屬色" #: ../src/amitk_color_table.c:49 msgid "hot metal contour" msgstr "熱金屬輪廓" #: ../src/amitk_color_table.c:50 msgid "inv. hot metal c." msgstr "熱逆金屬輪廓" #: ../src/amitk_color_table.c:51 msgid "hot blue" msgstr "熱è—色" #: ../src/amitk_color_table.c:52 msgid "inverse hot blue" msgstr "熱逆è—色" #: ../src/amitk_color_table.c:53 msgid "hot green" msgstr "熱綠色" #: ../src/amitk_color_table.c:54 msgid "inverse hot green" msgstr "熱逆綠色" #: ../src/amitk_color_table.c:55 msgid "spectrum" msgstr "光譜" #: ../src/amitk_color_table.c:56 msgid "inverse spectrum" msgstr "逆光譜" #: ../src/amitk_color_table.c:57 msgid "NIH + white" msgstr "NIH + 白色" #: ../src/amitk_color_table.c:58 msgid "inv. NIH + white" msgstr "NIH + 逆白色" #: ../src/amitk_color_table.c:59 msgid "NIH" msgstr "NIH" #: ../src/amitk_color_table.c:60 msgid "inverse NIH" msgstr "逆 NIH" #: ../src/amitk_common.c:41 ../src/tb_roi_analysis.c:94 msgid "Min" msgstr "最å°" #: ../src/amitk_common.c:42 ../src/tb_roi_analysis.c:95 msgid "Max" msgstr "最大" #: ../src/amitk_common.c:45 ../src/amitk_object_dialog.c:705 #: ../src/amitk_threshold.c:1288 msgid "Center" msgstr "中心" #: ../src/amitk_common.c:46 ../src/amitk_threshold.c:1289 msgid "Width" msgstr "寬度" #. N_("Bone"), #. N_("Soft Tissue") #: ../src/amitk_common.c:53 msgid "Abdomen" msgstr "腹部" #: ../src/amitk_common.c:54 msgid "Brain" msgstr "腦部" #: ../src/amitk_common.c:55 msgid "Extremities" msgstr "四肢" #: ../src/amitk_common.c:56 msgid "Liver" msgstr "è‚臟" #: ../src/amitk_common.c:57 msgid "Lung" msgstr "肺臟" #: ../src/amitk_common.c:58 msgid "Pelvis, soft tissue" msgstr "骨盆,軟組織" #: ../src/amitk_common.c:59 msgid "Skull Base" msgstr "顱底" #: ../src/amitk_common.c:60 msgid "Spine A" msgstr "脊柱 A" #: ../src/amitk_common.c:61 msgid "Spine B" msgstr "脊柱 B" #: ../src/amitk_common.c:62 msgid "Thorax, soft tissue" msgstr "胸腔,軟組織" #: ../src/amitk_data_set.c:87 ../src/ui_study.c:402 msgid "interpolate using nearest neighbor (fast)" msgstr "使用最近的鄰點添寫 (快速)" #: ../src/amitk_data_set.c:88 ../src/ui_study.c:403 msgid "interpolate using trilinear interpolation (slow)" msgstr "ä½¿ç”¨ä¸‰ç·šå…§æ’æ³•添寫 (ç·©æ…¢)" #. place holder for AMITK_IMPORT_METHOD_GUESS #: ../src/amitk_data_set.c:94 msgid "_Raw Data" msgstr "原始資料(_R)" #: ../src/amitk_data_set.c:96 msgid "_DICOM via dcmtk" msgstr "_DICOM é€éŽ dcmtk" #: ../src/amitk_data_set.c:99 msgid "_ECAT 6/7 via libecat" msgstr "_ECAT 6/7 é€éŽ libecat" #: ../src/amitk_data_set.c:109 msgid "Import file as raw data" msgstr "匯入原始資料檔案" #: ../src/amitk_data_set.c:111 msgid "Import a DICOM file or directory file using the DCMTK library" msgstr "使用 DCMTK 函å¼åº«åŒ¯å…¥ DICOM 資料檔案" #: ../src/amitk_data_set.c:114 msgid "Import a CTI 6.4 or 7.0 file using the libecat library" msgstr "使用 libecat 函å¼åº«åŒ¯å…¥ CTI 6.4 或 7.0 資料檔案" #: ../src/amitk_data_set.c:117 msgid "Import via the (X)medcon library (libmdc)" msgstr "使用 (X)medcon 函å¼åº« (libmdc) 匯入" #: ../src/amitk_data_set.c:122 msgid "Raw Data" msgstr "原始資料" #: ../src/amitk_data_set.c:124 msgid "DICOM via dcmtk" msgstr "DICOM é€éŽ dcmtk" #: ../src/amitk_data_set.c:133 msgid "Export file as raw data" msgstr "匯出原始資料檔案" #: ../src/amitk_data_set.c:135 msgid "Export a DICOM file or directory file using the DCMTK library" msgstr "使用 DCMTK 函å¼åº«åŒ¯å‡º DICOM 檔案或目錄檔案" #: ../src/amitk_data_set.c:138 msgid "Export via the (X)medcon library (libmdc)" msgstr "使用 (X)medcon 函å¼åº« (libmdc) 匯出" #: ../src/amitk_data_set.c:143 msgid "Direct" msgstr "直接" #: ../src/amitk_data_set.c:144 msgid "%ID/cc" msgstr "%ID/cc" #: ../src/amitk_data_set.c:145 msgid "SUV" msgstr "SUV" #: ../src/amitk_data_set.c:149 msgid "MBq" msgstr "MBq" #: ../src/amitk_data_set.c:150 msgid "mCi" msgstr "mCi" #: ../src/amitk_data_set.c:151 msgid "uCi" msgstr "uCi" #: ../src/amitk_data_set.c:152 msgid "nCi" msgstr "nCi" #: ../src/amitk_data_set.c:156 msgid "Kg" msgstr "公斤" #: ../src/amitk_data_set.c:157 msgid "g" msgstr "公克" #: ../src/amitk_data_set.c:158 msgid "lbs" msgstr "英磅" #: ../src/amitk_data_set.c:159 msgid "ounces" msgstr "盎å¸" #: ../src/amitk_data_set.c:163 msgid "MBq/cc/Image Units" msgstr "MBq/cc/å½±åƒå–®ä½" #: ../src/amitk_data_set.c:164 msgid "mCi/cc/Image Units" msgstr "mCi/cc/å½±åƒå–®ä½" #: ../src/amitk_data_set.c:165 msgid "uCi/cc/Image Units" msgstr "uCi/cc/å½±åƒå–®ä½" #: ../src/amitk_data_set.c:166 msgid "nCi/cc/Image Units" msgstr "nCi/cc/å½±åƒå–®ä½" #: ../src/amitk_data_set.c:167 msgid "Image Units/(MBq/cc)" msgstr "å½±åƒå–®ä½/(MBq/cc)" #: ../src/amitk_data_set.c:168 msgid "Image Units/(mCi/cc)" msgstr "å½±åƒå–®ä½/(mCi/cc)" #: ../src/amitk_data_set.c:169 msgid "Image Units/(uCi/cc)" msgstr "å½±åƒå–®ä½/(uCi/cc)" #: ../src/amitk_data_set.c:170 msgid "Image Units/(nCi/cc)" msgstr "å½±åƒå–®ä½/(nCi/cc)" #: ../src/amitk_data_set.c:174 msgid "Single Scale Factor" msgstr "單一伸縮因å­" #: ../src/amitk_data_set.c:175 msgid "Per Frame Scale Factor" msgstr "å„影格伸縮因å­" #: ../src/amitk_data_set.c:176 msgid "Per Plane Scale Factor" msgstr "å„å¹³é¢ä¼¸ç¸®å› å­" #: ../src/amitk_data_set.c:177 msgid "Single Scale Factor with Intercept" msgstr "單一伸縮因å­ä¸¦æˆªå–" #: ../src/amitk_data_set.c:178 msgid "Per Frame Scale Factor with Intercept" msgstr "å„影格伸縮因å­ä¸¦æˆªå–" #: ../src/amitk_data_set.c:179 msgid "Per Plane Scale Factor with Intercept" msgstr "å„å¹³é¢ä¼¸ç¸®å› å­ä¸¦æˆªå–" #: ../src/amitk_data_set.c:943 ../src/libmdc_interface.c:415 msgid "Voxel size X was read as 0, setting to 1 mm. This may be an internationalization error." msgstr "é«”ç´ å¤§å° X 讀出值為 0, 設定為 1 å…¬é‡ã€‚ 這也許是軟體國際化的錯誤。" #: ../src/amitk_data_set.c:947 ../src/libmdc_interface.c:419 msgid "Voxel size Y was read as 0, setting to 1 mm. This may be an internationalization error." msgstr "é«”ç´ å¤§å° Y 讀出值為 0, 設定為 1 å…¬é‡ã€‚ 這也許是軟體國際化的錯誤。" #: ../src/amitk_data_set.c:951 ../src/libmdc_interface.c:423 msgid "Voxel size Z was read as 0, setting to 1 mm. This may be an internationalization error." msgstr "é«”ç´ å¤§å° Z 讀出值為 0, 設定為 1 å…¬é‡ã€‚ 這也許是軟體國際化的錯誤。" #: ../src/amitk_data_set.c:990 msgid "internal scaling factor returned NULL... either file is corrupt, or AMIDE has a bug" msgstr "內部縮放因å­å›žå‚³ç©ºå€¼â€¦ è‹¥éžæª”案æå£žï¼Œå°±æ˜¯ AMIDE 有程å¼éŒ¯èª¤" #: ../src/amitk_data_set.c:1057 msgid "wrong type found on internal scaling, converting to double" msgstr "於內部縮放伸縮找到錯誤類型,轉æ›åˆ°é›™ç²¾ç¢ºåº¦" #: ../src/amitk_data_set.c:1062 msgid "Couldn't allocate memory space for the new scaling factors" msgstr "無法é…置記憶體空間給新的縮放因å­" #: ../src/amitk_data_set.c:1367 msgid "couldn't allocate memory space for the data set structure to hold data" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦è³‡æ–™é›†çµæ§‹ä»¥å­˜æ”¾è³‡æ–™" #: ../src/amitk_data_set.c:1375 msgid "raw_data_read_file failed returning NULL data set" msgstr "raw_data_read_file 失敗並回傳空值資料集" #: ../src/amitk_data_set.c:1382 msgid "couldn't allocate memory space for the frame duration info" msgstr "無法é…置記憶體空間給影格的時間資訊" #: ../src/amitk_data_set.c:1478 #, c-format msgid "" "File has incorrect permissions for reading\n" "Can I try changing access permissions on:\n" " %s?" msgstr "" "檔案的讀å–許å¯ä¸æ­£ç¢º\n" "我å¯ä»¥å˜—試變更存å–è¨±å¯æ–¼ï¼š\n" " %s?" #: ../src/amitk_data_set.c:1490 ../src/amitk_data_set.c:1497 msgid "failed to change read permissions, you're probably not the owner" msgstr "變更讀å–è¨±å¯æ™‚å¤±æ•—ï¼Œæ‚¨æˆ–è¨±ä¸¦éžæ“有者" #: ../src/amitk_data_set.c:1504 msgid "failed to change read permissions on raw data file, you're probably not the owner" msgstr "變更原始資料檔案的讀å–è¨±å¯æ™‚å¤±æ•—ï¼Œæ‚¨æˆ–è¨±ä¸¦éžæ“有者" #. unrecognized file type #: ../src/amitk_data_set.c:1558 #, c-format msgid "" "Extension %s not recognized on file: %s\n" "Guessing File Type" msgstr "" "延伸檔å %s 無法辨識於檔案:%s\n" "正在猜測檔案類型" #: ../src/amitk_data_set.c:1630 #, c-format msgid "Data Set %s has erroneous voxel size of %gx%gx%g, setting to 1.0x1.0x1.0" msgstr "資料集 %s æœ‰éŒ¯èª¤çš„é«”ç´ å¤§å° %gx%gx%g,設定為 1.0x1.0x1.0" #: ../src/amitk_data_set.c:1709 msgid "Couldn't allocate memory space for row_data" msgstr "無法é…置記憶體空間給原始資料(_D)" #: ../src/amitk_data_set.c:1715 #, c-format msgid "couldn't open file for writing: %s" msgstr "無法開啟檔案以供寫入:%s" #: ../src/amitk_data_set.c:1721 #, c-format msgid "" "Exporting Raw Data for:\n" " %s" msgstr "" "匯出原始資料給:\n" " %s" #: ../src/amitk_data_set.c:1749 ../src/dcmtk_interface.cc:2384 #: ../src/libmdc_interface.c:1120 #, c-format msgid "Error in generating resliced data, %dx%d != %dx%d" msgstr "ç”¢ç”Ÿé‡æ–°åˆ‡ç‰‡çš„資料時發生錯誤,%dx%d != %dx%d" #: ../src/amitk_data_set.c:1792 #, c-format msgid "incomplete save of raw data, wrote %lx (bytes), file: %s" msgstr "原始資料儲存ä¸å®Œæ•´ï¼Œå·²å¯«å…¥ %lx (ä½å…ƒçµ„),檔案:%s" #: ../src/amitk_data_set.c:1900 #, c-format msgid "Generating new data set" msgstr "產生新資料集" #: ../src/amitk_data_set.c:1914 msgid "Could not allocate memory space for volume" msgstr "無法é…置記憶體空間給體ç©" #: ../src/amitk_data_set.c:1947 msgid "Failed to allocate export data set" msgstr "é…置匯出資料集時失敗" #: ../src/amitk_data_set.c:2464 ../src/amitk_data_set.c:2485 #: ../src/amitk_data_set.c:2507 ../src/amitk_data_set.c:2529 msgid "unknown" msgstr "䏿˜Ž" #: ../src/amitk_data_set.c:2973 #, c-format msgid "" "Calculating Max/Min Values for:\n" " %s" msgstr "" "計算最大/最å°å€¼ç”¨æ–¼ï¼š\n" " %s" #: ../src/amitk_data_set.c:4145 #, c-format msgid "" "Generating projections of:\n" " %s" msgstr "" "產生資料投影自:\n" " %s" #: ../src/amitk_data_set.c:4176 #, c-format msgid "couldn't allocate memory space for the projection, wanted %dx%dx%dx%dx%d elements" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦è³‡æ–™æŠ•å½±ï¼Œéœ€è¦ %dx%dx%dx%dx%d 元素" #. set a new name for this guy #: ../src/amitk_data_set.c:4400 #, c-format msgid "%s, cropped" msgstr "%s,已è£å‰ª" #: ../src/amitk_data_set.c:4411 ../src/amitk_data_set.c:4418 msgid "couldn't allocate memory space for the cropped internal scaling structure" msgstr "無法é…置記憶體空間給è£å‰ªéŽçš„å…§éƒ¨ç¸®æ”¾ä¼¸ç¸®çµæ§‹" #: ../src/amitk_data_set.c:4424 #, c-format msgid "" "Generating cropped version of:\n" " %s" msgstr "" "產生è£å‰ªç‰ˆæœ¬è‡ªï¼š\n" " %s" #: ../src/amitk_data_set.c:4604 msgid "couldn't allocate memory space for the cropped raw data set structure" msgstr "無法é…置記憶體空間給è£å‰ªéŽçš„åŽŸå§‹è³‡æ–™é›†çµæ§‹" #: ../src/amitk_data_set.c:4732 msgid "Filtering: Failed to allocate wavetable and workspace" msgstr "篩é¸ï¼šç„¡æ³•é…置音效表和工作å€" #: ../src/amitk_data_set.c:4739 msgid "couldn't allocate memory space for the subset structure" msgstr "無法é…置記憶體空間給å­é›†çµæ§‹" #: ../src/amitk_data_set.c:4759 msgid "Couldn't allocate memory space for the subset data" msgstr "無法é…置記憶體空間給å­é›†è³‡æ–™" #: ../src/amitk_data_set.c:4768 ../src/amitk_data_set.c:4950 #, c-format msgid "Filtering Data Set: %s" msgstr "篩é¸è³‡æ–™é›†ï¼š %s" #: ../src/amitk_data_set.c:4921 msgid "data set z dimension to small for kernel, setting kernel dimension to 1" msgstr "資料集 z 維度å°å…§æ ¸è€Œè¨€å¤ªå°ï¼Œè¨­å®šå…§æ ¸ç¶­åº¦åˆ° 1" #: ../src/amitk_data_set.c:4925 msgid "data set y dimension to small for kernel, setting kernel dimension to 1" msgstr "資料集 y 維度å°å…§æ ¸è€Œè¨€å¤ªå°ï¼Œè¨­å®šå…§æ ¸ç¶­åº¦åˆ° 1" #: ../src/amitk_data_set.c:4929 msgid "data set x dimension to small for kernel, setting kernel dimension to 1" msgstr "資料集 x 維度å°å…§æ ¸è€Œè¨€å¤ªå°ï¼Œè¨­å®šå…§æ ¸ç¶­åº¦åˆ° 1" #: ../src/amitk_data_set.c:4942 msgid "couldn't allocate memory space for the internal raw data" msgstr "無法é…置記憶體空間給內部原始資料" #. set a new name for this guy #: ../src/amitk_data_set.c:5129 #, c-format msgid "%s, %s filtered" msgstr "%s,%s 已篩é¸" #: ../src/amitk_data_set.c:5137 msgid "couldn't allocate memory space for the filtered raw data set structure" msgstr "無法é…置記憶體空間給篩é¸éŽçš„åŽŸå§‹è³‡æ–™é›†çµæ§‹" #: ../src/amitk_data_set.c:5164 msgid "failed to calculate 3D gaussian kernel" msgstr "計算立體 gaussian 內核時失敗" #: ../src/amitk_data_set.c:5585 #, c-format msgid "Can't handle 'by frame' operations with data sets with unequal frame numbers, will use all frames of %s and the first gate of %s" msgstr "å…·å‚™ä¸å°ç­‰å½±æ ¼æ•¸é‡çš„資料集,無法「ä¾å½±æ ¼ã€è¨ˆç®—處ç†ï¼Œå°‡ä½¿ç”¨ %s çš„æ‰€æœ‰å½±æ ¼ä»¥åŠ %s 的第一個影格" #: ../src/amitk_data_set.c:5589 #, c-format msgid "Output data set will have the same number of frames as %s" msgstr "輸出資料集將具有與 %s 相åŒçš„影格數é‡" #: ../src/amitk_data_set.c:5598 #, c-format msgid "Can't handle studies with different numbers of gates, will use all gates of %s and the first gate of %s " msgstr "無法處ç†å…·å‚™ä¸åŒé–˜å£æ•¸é‡çš„æª¢é©—,將使用 %s 的所有閘å£ä»¥åŠ %s 的第一個閘å£" #: ../src/amitk_data_set.c:5606 #, c-format msgid "couldn't allocate %d MB for the output_ds data set structure" msgstr "無法é…ç½® %d MB 給 output_ds è³‡æ–™é›†çµæ§‹" #. set a new name for this guy #: ../src/amitk_data_set.c:5623 #, c-format msgid "Result: %s %s %s" msgstr "çµæžœï¼š%s %s %s" #: ../src/amitk_data_set.c:5630 #, c-format msgid "Performing math operation" msgstr "施行數學é‹ç®—" #: ../src/amitk_data_set.c:5684 msgid "couldn't generate slices from the data set..." msgstr "無法產生切片自資料集…" #: ../src/amitk_data_set_variable_type.c:110 msgid "couldn't allocate memory space for the data set structure to hold distribution data" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦è³‡æ–™é›†çµæ§‹ä»¥å­˜æ”¾ç™¼å¸ƒè³‡æ–™" #: ../src/amitk_data_set_variable_type.c:118 #, c-format msgid "" "Generating distribution data for:\n" " %s" msgstr "" "產生發布資料自:\n" " %s" #: ../src/amitk_data_set_variable_type.c:233 #, c-format msgid "couldn't allocate memory space for the slice, wanted %dx%dx%d elements" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦åˆ‡ç‰‡ï¼Œéœ€è¦ %dx%dx%d 元素" #: ../src/amitk_filter.c:61 msgid "couldn't allocate memory space for the kernel structure" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦å…§æ ¸çµæ§‹" #: ../src/amitk_filter.c:73 msgid "Couldn't allocate memory space for the kernel data" msgstr "無法é…置記憶體空間給內核資料" #: ../src/amitk_object.c:633 msgid "AMIDE xml file doesn't appear to have a root." msgstr "AMIDE xml 檔案ä¸å…·å‚™æ ¹é …目。" #: ../src/amitk_object_dialog.c:157 #, c-format msgid "Copy of %s" msgstr "%s 的複本" #: ../src/amitk_object_dialog.c:238 msgid "Basic Info" msgstr "基本資訊" #: ../src/amitk_object_dialog.c:246 msgid "Data Set Name:" msgstr "資料集å稱:" #: ../src/amitk_object_dialog.c:248 msgid "Name:" msgstr "å稱:" #. widgets to change the object's type #: ../src/amitk_object_dialog.c:268 msgid "Type:" msgstr "類型:" #. widgets to change the date of the scan name #: ../src/amitk_object_dialog.c:319 msgid "Scan Date:" msgstr "æŽƒææ—¥æœŸï¼š" #. widgets to change the object's modality #: ../src/amitk_object_dialog.c:332 msgid "Modality:" msgstr "造影:" #. widget to change the interpolation #: ../src/amitk_object_dialog.c:348 msgid "Interpolation Type" msgstr "å…§æ’æ³•類型" #. widgets to change the subject name associated with the data #: ../src/amitk_object_dialog.c:416 msgid "Subject Name:" msgstr "主題å稱:" #. widgets to change the id associated with the data #: ../src/amitk_object_dialog.c:430 msgid "Subject ID:" msgstr "主題識別號:" #. widgets to change the subject's date of birth #: ../src/amitk_object_dialog.c:443 msgid "Subject DOB:" msgstr "主題 DOB:" #. widgets to change the subject's orientation #: ../src/amitk_object_dialog.c:458 msgid "Subject Orientation:" msgstr "主題方å‘:" #. widgets to change the subject's sex (much easier in the virtual world than in real life) #: ../src/amitk_object_dialog.c:473 msgid "Subject Sex:" msgstr "主題性別:" #. widget to change the scaling factor #: ../src/amitk_object_dialog.c:501 msgid "Conversion Type:" msgstr "轉æ›é¡žåž‹ï¼š" #: ../src/amitk_object_dialog.c:535 msgid "Scaling Factor:" msgstr "縮放因å­ï¼š" #. injected dose #: ../src/amitk_object_dialog.c:562 msgid "Injected Dose:" msgstr "注射劑é‡ï¼š" #. subject weight #: ../src/amitk_object_dialog.c:594 msgid "Subject Weight:" msgstr "主題é‡é‡ï¼š" #. cylinder factor #: ../src/amitk_object_dialog.c:626 msgid "Cylinder Factor:" msgstr "柱é¢å› å­ï¼š" #. widgets to change the study's creation date #: ../src/amitk_object_dialog.c:663 msgid "Creation Date:" msgstr "建立日期:" #: ../src/amitk_object_dialog.c:703 msgid "View Center" msgstr "檢視中心" #: ../src/amitk_object_dialog.c:712 msgid "View Center (mm from origin)" msgstr "檢視中心 (å¾žåŽŸé»žèµ·ç®—å…¬é‡æ•¸)" #: ../src/amitk_object_dialog.c:714 msgid "Center Location (mm from origin)" msgstr "中心ä½ç½® (å¾žåŽŸé»žèµ·ç®—å…¬é‡æ•¸)" #: ../src/amitk_object_dialog.c:779 msgid "Voxel Size" msgstr "體素大å°" #: ../src/amitk_object_dialog.c:783 msgid "Voxel Size (mm)" msgstr "é«”ç´ å¤§å° (å…¬é‡)" #: ../src/amitk_object_dialog.c:837 msgid "Dimensions" msgstr "維度" #. widgets to change the dimensions of the objects (in object's space) #: ../src/amitk_object_dialog.c:842 msgid "Dimensions (mm) wrt to ROI" msgstr "維度 (å…¬é‡) wrt 到 ROI" #: ../src/amitk_object_dialog.c:887 msgid "Rotate" msgstr "旋轉" #: ../src/amitk_object_dialog.c:902 msgid "Colormap/Threshold" msgstr "é¡è‰²å°ç…§è¡¨/臨界值" #. start making the page to adjust time values #: ../src/amitk_object_dialog.c:919 msgid "Time" msgstr "時間" #. scan start time..... #: ../src/amitk_object_dialog.c:927 msgid "Scan Start Time (s)" msgstr "掃æèµ·å§‹æ™‚é–“ (ç§’)" #. frame duration(s).... #: ../src/amitk_object_dialog.c:953 ../src/tb_roi_analysis.c:85 msgid "Frame" msgstr "影格" #: ../src/amitk_object_dialog.c:958 ../src/tb_roi_analysis.c:86 msgid "Duration (s)" msgstr "æŒçºŒæ™‚é–“ (s)" #: ../src/amitk_object_dialog.c:1017 ../src/ui_preferences_dialog.c:328 msgid "ROI/View Preferences" msgstr "ROI/檢視å好設定" #. AMITK_IS_DATA_SET #: ../src/amitk_object_dialog.c:1019 msgid "Windowing Preferences" msgstr "視窗å好設定" #: ../src/amitk_object_dialog.c:1104 msgid "Immutables" msgstr "ä¸å¯è®Šçš„" #: ../src/amitk_object_dialog.c:1110 msgid "Max-Min Voxel Dim" msgstr "最大-最å°çš„體素維度" #: ../src/amitk_object_dialog.c:1126 msgid "Isocontour Min Specified Value" msgstr "è¼ªå»“é¢æœ€å°æŒ‡å®šå€¼" #: ../src/amitk_object_dialog.c:1139 msgid "Isocontour Max Specified Value" msgstr "è¼ªå»“é¢æœ€å¤§æŒ‡å®šå€¼" #: ../src/amitk_object_dialog.c:1180 msgid "Memory Used (GB):" msgstr "已用記憶體 (GB):" #: ../src/amitk_object_dialog.c:1183 msgid "Memory Used (MB):" msgstr "已用記憶體 (MB):" #: ../src/amitk_object_dialog.c:1186 msgid "Memory Used (KB):" msgstr "已用記憶體 (KB):" #: ../src/amitk_object_dialog.c:1190 msgid "Memory Used (bytes):" msgstr "已用記憶體 (ä½å…ƒçµ„):" #. widget to tell you the internal data format #: ../src/amitk_object_dialog.c:1209 msgid "Data Format:" msgstr "資料格å¼ï¼š" #. widget to tell you the scaling format #: ../src/amitk_object_dialog.c:1232 msgid "Scale Format:" msgstr "伸縮格å¼ï¼š" #. widgets to display the data set dimensions #: ../src/amitk_object_dialog.c:1255 msgid "Data Set Dimensions (voxels)" msgstr "資料集維度 (體素)" #. MRI parameters #: ../src/amitk_object_dialog.c:1290 msgid "MRI Parameters" msgstr "MRI åƒæ•¸" #. inversion time #: ../src/amitk_object_dialog.c:1299 msgid "Inversion Time (ms):" msgstr "å逆時間 (ms):" #. echo time #: ../src/amitk_object_dialog.c:1317 msgid "Echo Time (ms):" msgstr "回應時間 (ms):" #: ../src/amitk_object_dialog.c:2381 #, c-format msgid "Modification Dialog: %s\n" msgstr "修改å°è©±æ¡†ï¼š%s\n" #: ../src/amitk_point.c:90 #, c-format msgid "Couldn't read value for %s, substituting [%5.3f %5.3f %5.3f]" msgstr "ç„¡æ³•è®€å– %s 的數值,正在替代 [%5.3f %5.3f %5.3f]" #: ../src/amitk_point.c:180 #, c-format msgid "Couldn't read value for %s, substituting [%d %d %d %d %d]" msgstr "ç„¡æ³•è®€å– %s 的數值,正在替代 [%d %d %d %d %d]" #: ../src/amitk_point.c:188 #, c-format msgid "Couldn't read gate value for %s, substituting %d" msgstr "ç„¡æ³•è®€å– %s 的數值,正在替代 %d" #: ../src/amitk_point.c:192 #, c-format msgid "Couldn't read frame value for %s, substituting %d" msgstr "ç„¡æ³•è®€å– %s 的影格值,正在替代 %d" #: ../src/amitk_preferences.c:57 msgid "None" msgstr "ç„¡" #: ../src/amitk_preferences.c:58 msgid "Specified Directory" msgstr "指定目錄" #: ../src/amitk_preferences.c:59 msgid "Working Directory" msgstr "工作目錄" #: ../src/amitk_progress_dialog.c:165 msgid "Progress Dialog" msgstr "進度å°è©±æ¡†" #: ../src/amitk_raw_data.c:62 ../src/amitk_raw_data.c:141 msgid "Unsigned Byte (8 bit)" msgstr "無正負號ä½å…ƒçµ„ (8 ä½å…ƒ)" #: ../src/amitk_raw_data.c:63 ../src/amitk_raw_data.c:142 msgid "Signed Byte (8 bit)" msgstr "帶正負號ä½å…ƒçµ„ (8 ä½å…ƒ)" #: ../src/amitk_raw_data.c:64 msgid "Unsigned Short (16 bit)" msgstr "無正負號短整數 (16 ä½å…ƒ)" #: ../src/amitk_raw_data.c:65 msgid "Signed Short (16 bit)" msgstr "帶正負號短整數 (16 ä½å…ƒ)" #: ../src/amitk_raw_data.c:66 msgid "Unsigned Integer (32 bit)" msgstr "無正負號整數 (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:67 msgid "Signed Integer (32 bit)" msgstr "帶正負號整數 (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:68 msgid "Float (32 bit)" msgstr "浮點數 (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:69 msgid "Double (64 bit)" msgstr "å€ç²¾åº¦æµ®é»žæ•¸ (64 ä½å…ƒ)" #: ../src/amitk_raw_data.c:143 msgid "Unsigned Short, Little Endian (16 bit)" msgstr "無正負號短整數,低ä½åœ¨å‰ (16 ä½å…ƒ)" #: ../src/amitk_raw_data.c:144 msgid "Signed Short, Little Endian (16 bit)" msgstr "帶正負號短整數,低ä½åœ¨å‰ (16 ä½å…ƒ)" #: ../src/amitk_raw_data.c:145 msgid "Unsigned Integer, Little Endian (32 bit)" msgstr "無正負號整數,低ä½åœ¨å‰ (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:146 msgid "Signed Integer, Little Endian (32 bit)" msgstr "帶正負號整數,低ä½åœ¨å‰ (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:147 msgid "Float, Little Endian (32 bit)" msgstr "浮點數,低ä½åœ¨å‰ (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:148 msgid "Double, Little Endian (64 bit)" msgstr "å€ç²¾åº¦æµ®é»žæ•¸ï¼Œä½Žä½åœ¨å‰ (64 ä½å…ƒ)" #: ../src/amitk_raw_data.c:149 msgid "Unsigned Short, Big Endian (16 bit)" msgstr "無正負號短整數,高ä½åœ¨å‰ (16 ä½å…ƒ)" #: ../src/amitk_raw_data.c:150 msgid "Signed Short, Big Endian (16 bit)" msgstr "帶正負號短整數,高ä½åœ¨å‰ (16 ä½å…ƒ)" #: ../src/amitk_raw_data.c:151 msgid "Unsigned Integer, Big Endian (32 bit)" msgstr "無正負號整數,高ä½åœ¨å‰ (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:152 msgid "Signed Integer, Big Endian (32 bit)" msgstr "帶正負號整數,高ä½åœ¨å‰ (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:153 msgid "Float, Big Endian (32 bit)" msgstr "浮點數,高ä½åœ¨å‰ (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:154 msgid "Double, Big Endian (64 bit)" msgstr "å€ç²¾åº¦æµ®é»žæ•¸ï¼Œé«˜ä½åœ¨å‰ (64 ä½å…ƒ)" #: ../src/amitk_raw_data.c:155 msgid "Unsigned Integer, PDP (32 bit)" msgstr "無正負號整數,PDP (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:156 msgid "Signed Integer, PDP (32 bit)" msgstr "帶正負號整數,PDP (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:157 msgid "Float, PDP/VAX (32 bit)" msgstr "浮點數,PDP/VAX (32 ä½å…ƒ)" #: ../src/amitk_raw_data.c:158 msgid "ASCII (8 bit)" msgstr "ASCII (8 ä½å…ƒ)" #: ../src/amitk_raw_data.c:361 #, c-format msgid "Reading: %s" msgstr "讀å–:%s" #: ../src/amitk_raw_data.c:370 msgid "couldn't allocate memory space for the raw data set structure" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦åŽŸå§‹è³‡æ–™é›†çµæ§‹" #: ../src/amitk_raw_data.c:378 ../src/amitk_raw_data.c:383 #, c-format msgid "couldn't open raw data file %s" msgstr "無法開啟原始資料檔案 %s" #. EOF is usually -1 #: ../src/amitk_raw_data.c:396 #, c-format msgid "could not step forward %d elements in raw data file:\n\treturned error: %d" msgstr "無法在原始資料檔案中é€ä¸€è®€å– %d 項元素:\n\t回傳的錯誤:%d" #: ../src/amitk_raw_data.c:402 #, c-format msgid "could not seek forward %ld bytes in raw data file" msgstr "無法在原始資料檔案中é€ä¸€å°‹æŒ‡ %ld ä½å…ƒçµ„" #: ../src/amitk_raw_data.c:411 #, c-format msgid "couldn't malloc %zd bytes for file buffer\n" msgstr "無法é…ç½® %zd ä½å…ƒçµ„給檔案緩è¡å€\n" #: ../src/amitk_raw_data.c:434 #, c-format msgid "read wrong # of elements from raw data, expected %zd, got %zd" msgstr "從原始資料讀å–了錯誤的元素數é‡ï¼Œé æœŸ %zd å»å¾—到 %zd" #. EOF = -1 (usually) #: ../src/amitk_raw_data.c:458 #, c-format msgid "could not read ascii file after %d elements, file or parameters are erroneous" msgstr "æ–¼ %d å…ƒç´ ä¹‹å¾Œç„¡æ³•è®€å– ASCII æª”æ¡ˆï¼Œæª”æ¡ˆæˆ–åƒæ•¸æœ‰èª¤" #: ../src/amitk_raw_data.c:829 #, c-format msgid "couldn't save raw data file: %s" msgstr "無法儲存原始資料檔案:%s" #: ../src/amitk_raw_data.c:857 #, c-format msgid "incomplete save of raw data, wrote %zd (bytes), needed %zd (bytes), file: %s" msgstr "原始資料的儲存ä¸å®Œæ•´ï¼Œå·²å¯«å…¥ %zd (ä½å…ƒçµ„)ï¼Œæ‰€éœ€è¦ %zd (ä½å…ƒçµ„),檔案:%s" #: ../src/amitk_raw_data.c:931 #, c-format msgid "Raw data xml file doesn't appear to have a root: %s" msgstr "原始資料 xml 檔案似乎沒有根項目:%s" #: ../src/amitk_raw_data.c:972 ../src/xml.c:672 ../src/xml.c:678 msgid "File to large to read on 32bit platform." msgstr "æª”æ¡ˆå°æ–¼åœ¨ 32 ä½å…ƒå¹³è‡ºä¸Šè®€å–而言éŽå¤§ã€‚" #: ../src/amitk_roi.c:44 msgid "_Ellipsoid" msgstr "橢圓體(_E)" #: ../src/amitk_roi.c:45 msgid "Elliptic _Cylinder" msgstr "橢圓柱é¢(_C)" #: ../src/amitk_roi.c:46 msgid "_Box" msgstr "方框(_B)" #: ../src/amitk_roi.c:47 msgid "_2D Isocontour" msgstr "å¹³é¢è¼ªå»“(_2)" #: ../src/amitk_roi.c:48 msgid "_3D Isocontour" msgstr "立體輪廓(_3)" #: ../src/amitk_roi.c:49 msgid "_2D Freehand" msgstr "平颿‰‹ç¹ª(_2)" #: ../src/amitk_roi.c:50 msgid "_3D Freehand" msgstr "立體手繪(_3)" #: ../src/amitk_roi.c:54 msgid "Add a new elliptical ROI" msgstr "加入新的橢圓 ROI" #: ../src/amitk_roi.c:55 msgid "Add a new elliptic cylinder ROI" msgstr "åŠ å…¥æ–°çš„æ©¢åœ“æŸ±é¢ ROI" #: ../src/amitk_roi.c:56 msgid "Add a new box shaped ROI" msgstr "加入新的方框 ROI" #: ../src/amitk_roi.c:57 msgid "Add a new 2D Isocontour ROI" msgstr "加入新的平é¢è¼ªå»“ ROI" #: ../src/amitk_roi.c:58 msgid "Add a new 3D Isocontour ROI" msgstr "加入新的立體輪廓 ROI" #: ../src/amitk_roi.c:59 msgid "Add a new 2D Freehand ROI" msgstr "åŠ å…¥æ–°çš„å¹³é¢æ‰‹ç¹ª ROI" #: ../src/amitk_roi.c:60 msgid "Add a new 3D Freehand ROI" msgstr "加入新的立體手繪 ROI" #: ../src/amitk_roi_variable_type.c:59 ../src/amitk_roi_variable_type.c:71 msgid "Out of Memory" msgstr "記憶體ä¸è¶³" #. and a display of the current axis #: ../src/amitk_space_edit.c:145 msgid "i" msgstr "i" #: ../src/amitk_space_edit.c:148 msgid "j" msgstr "j" #: ../src/amitk_space_edit.c:151 msgid "k" msgstr "k" #: ../src/amitk_space_edit.c:186 msgid "data set axis:" msgstr "資料集軸線:" #. button to apply entries #: ../src/amitk_space_edit.c:192 msgid "apply manual entries" msgstr "套用手動項目" #. button to reset the axis #: ../src/amitk_space_edit.c:200 msgid "reset to identity" msgstr "é‡ç½®ç‚ºç›¸åŒ" #. our AIR buttons #: ../src/amitk_space_edit.c:216 msgid "AIR Files:" msgstr "AIR 檔案:" #: ../src/amitk_space_edit.c:221 msgid "Apply .AIR" msgstr "套用 .AIR" #: ../src/amitk_space_edit.c:228 msgid "Export .AIR" msgstr "匯出 .AIR" #. first double check that we really want to do this #: ../src/amitk_space_edit.c:362 msgid "" "Do you really wish to manual set the axis?\n" "This may flip left/right relationships" msgstr "" "您真的希望手動設定軸線嗎?\n" "這也許會翻轉左/å³é—œä¿‚" #. first double check that we really want to do this #: ../src/amitk_space_edit.c:392 msgid "" "Do you really wish to reset the axis to identity?\n" "This may flip left/right relationships" msgstr "" "您真的希望é‡ç½®è»¸ç·šç‚ºç›¸åŒå—Žï¼Ÿ\n" "這也許會翻轉左/å³é—œä¿‚" #. first double check that we really want to do this #: ../src/amitk_space_edit.c:416 msgid "" "Do you really wish to invert?\n" "This will flip left/right relationships" msgstr "" "您真的希望å轉嗎?\n" "這將會翻轉左/å³é—œä¿‚" #: ../src/amitk_study.c:469 #, c-format msgid "inappropriate zoom (%5.3f) for study, reseting to 1.0" msgstr "ä¸é©ç•¶çš„縮放 (%5.3f) 用於檢驗,é‡ç½®ç‚º 1.0" #: ../src/amitk_study.c:907 ../src/amitk_study.c:1008 #: ../src/amitk_study.c:1135 #, c-format msgid "Couldn't open file %s\n" msgstr "無法開啟檔案 %s\n" #: ../src/amitk_study.c:968 msgid "The above warnings may arise because portions of the XIF" msgstr "以上的警告也許會因為部分 XIF 而發生" #: ../src/amitk_study.c:969 msgid "file were corrupted." msgstr "檔案已æå£žã€‚" #: ../src/amitk_study.c:1002 msgid "Couldn't change directories in loading study" msgstr "無法在載入檢驗時變更目錄" #: ../src/amitk_study.c:1020 msgid "File is corrupt. The file may have been incompletely saved. You can attempt recovering the file by using the recover function under the file menu." msgstr "檔案æå£žã€‚檔案儲存也許ä¸å®Œæ•´ã€‚您å¯ä»¥è—‰ç”±ä½¿ç”¨æª”案é¸å–®ä¹‹ä¸‹çš„回復功能來嘗試回復檔案。" #: ../src/amitk_study.c:1037 msgid "The above warnings most likely indicate changes to the" msgstr "以上的警告很有å¯èƒ½æŒ‡å‡ºè®Šæ›´ç™¼ç”Ÿæ–¼" #: ../src/amitk_study.c:1038 msgid "XIF file format, please resave the data as soon as possible." msgstr "XIF 檔案格å¼ï¼Œè«‹å„˜å¿«é‡æ–°å„²å­˜è³‡æ–™ã€‚" #: ../src/amitk_study.c:1050 ../src/amitk_study.c:1149 msgid "Couldn't return to previous directory in load study" msgstr "無法在載入檢驗時回到上一個目錄" #: ../src/amitk_study.c:1089 ../src/amitk_study.c:1101 #, c-format msgid "Couldn't unlink file: %s" msgstr "ç„¡æ³•å–æ¶ˆéˆçµæª”案:%s" #: ../src/amitk_study.c:1095 #, c-format msgid "Couldn't remove directory: %s" msgstr "無法移除目錄:%s" #: ../src/amitk_study.c:1106 #, c-format msgid "Unrecognized file type for file: %s, couldn't delete" msgstr "無法辨識的檔案類型之於檔案:%s,無法刪除" #: ../src/amitk_study.c:1116 #, c-format msgid "Couldn't create amide directory: %s" msgstr "無法建立 amide 目錄:%s" #: ../src/amitk_study.c:1130 msgid "Couldn't change directories in writing study, study not saved" msgstr "無法在寫入檢驗時變更目錄,檢驗並未儲存" #: ../src/amitk_threshold.c:49 msgid "per slice" msgstr "å„切片" #: ../src/amitk_threshold.c:50 msgid "per frame" msgstr "å„影格" #: ../src/amitk_threshold.c:51 msgid "interpolated between frames" msgstr "已在影格之間添寫" #: ../src/amitk_threshold.c:52 msgid "global" msgstr "全域" #: ../src/amitk_threshold.c:56 msgid "Min/Max" msgstr "最å°/最大" #: ../src/amitk_threshold.c:57 msgid "Center/Width" msgstr "中心/寬度" #: ../src/amitk_threshold.c:64 msgid "threshold the images based on the max and min values in the current slice" msgstr "臨界處ç†å½±åƒï¼ŒåŸºæ–¼ç›®å‰åˆ‡ç‰‡ä¸­çš„æœ€å¤§å’Œæœ€å°å€¼" #: ../src/amitk_threshold.c:65 msgid "threshold the images based on the max and min values in the current frame" msgstr "臨界處ç†å½±åƒï¼ŒåŸºæ–¼ç›®å‰å½±æ ¼ä¸­çš„æœ€å¤§å’Œæœ€å°å€¼" #: ../src/amitk_threshold.c:66 msgid "threshold the images based on max and min values interpolated from the reference frame thresholds" msgstr "臨界處ç†å½±åƒï¼ŒåŸºæ–¼å¾žåƒè€ƒå½±æ ¼è‡¨ç•Œå€¼æ‰€æ·»å¯«çš„æœ€å¤§å’Œæœ€å°å€¼" #: ../src/amitk_threshold.c:67 msgid "threshold the images based on the max and min values of the entire data set" msgstr "臨界處ç†å½±åƒï¼ŒåŸºæ–¼ç›®å‰å½±æ ¼ä¸­çš„æœ€å¤§å’Œæœ€å°å€¼" #: ../src/amitk_threshold.c:71 msgid "threshold by setting min and max values - Nuclear Medicine Style" msgstr "ä¾ç…§æœ€å°å’Œæœ€å¤§è¨­å®šè‡¨ç•Œå€¼ - æ ¸å­é†«å­¸æ¨£å¼" #: ../src/amitk_threshold.c:72 msgid "theshold by setting a window center and width - Radiology Style" msgstr "由視窗中心和寬度設定臨界值 - 放射線科樣å¼" #: ../src/amitk_threshold.c:328 msgid "Percent" msgstr "百分比" #: ../src/amitk_threshold.c:392 msgid "Color Table:" msgstr "é¡è‰²è¡¨æ ¼ï¼š" #: ../src/amitk_threshold.c:394 #, c-format msgid "Color Table %d:" msgstr "é¡è‰²è¡¨æ ¼ %d:" #: ../src/amitk_threshold.c:415 ../src/amitk_threshold.c:419 msgid "if not enabled, the primary color table will be used for this set of views" msgstr "如果未啟用,主è¦çš„é¡è‰²è¡¨æ ¼å°‡ç”¨æ–¼é€™å€‹æª¢è¦–集åˆ" #: ../src/amitk_threshold.c:418 msgid "enable color table" msgstr "啟用é¡è‰²è¡¨æ ¼" #. threshold type selection #: ../src/amitk_threshold.c:435 msgid "Threshold Type" msgstr "臨界值類型" #. threshold type selection #: ../src/amitk_threshold.c:496 ../src/ui_preferences_dialog.c:433 msgid "Threshold Style" msgstr "臨界值樣å¼" #. color table selector #: ../src/amitk_threshold.c:558 msgid "ref. frame 0:" msgstr "åƒè€ƒå½±æ ¼ 0:" #. show/hide taken care of by threshold_update_layout #: ../src/amitk_threshold.c:563 msgid "ref. frame 1:" msgstr "åƒè€ƒå½±æ ¼ 1:" #: ../src/amitk_threshold.c:587 msgid "distribution" msgstr "發布" #: ../src/amitk_threshold.c:595 msgid "full" msgstr "全螢幕" #. show/hide taken care of by threshold_update_layout #: ../src/amitk_threshold.c:601 msgid "scaled" msgstr "伸縮" #: ../src/amitk_threshold.c:743 msgid "Threshold has no style?\n" msgstr "臨界值沒有任何樣å¼ï¼Ÿ\n" #: ../src/amitk_threshold.c:1293 msgid "Max Threshold" msgstr "最大臨界值" #: ../src/amitk_threshold.c:1294 msgid "Min Threshold" msgstr "最å°è‡¨ç•Œå€¼" #: ../src/amitk_threshold.c:1351 msgid "Absolute" msgstr "絕å°" #. reset the title #: ../src/amitk_threshold.c:2133 ../src/amitk_threshold.c:2173 #, c-format msgid "Data Set: %s\n" msgstr "資料集:%s\n" #: ../src/amitk_threshold.c:2152 ../src/amitk_threshold.c:2293 msgid "Threshold Dialog" msgstr "臨界值å°è©±æ¡†" #: ../src/analysis.c:217 #, c-format msgid "couldn't allocate memory space for data array for frame %d/gate %d" msgstr "無法é…置記憶體空間給影格 %d/é–˜å£ %d 的資料陣列" #: ../src/analysis.c:287 #, c-format msgid "couldn't allocate memory space for roi analysis of frame %d/gate %d" msgstr "無法é…置記憶體空間給影格 %d/é–˜å£ %d çš„ roi 分æž" #: ../src/analysis.c:424 msgid "couldn't allocate memory space for roi analysis of frames" msgstr "無法é…置記憶體空間給影格的 roi 分æž" #: ../src/analysis.c:455 #, c-format msgid "ROI: %s appears not to have been drawn" msgstr "ROI:%s 似乎未被繪出" #: ../src/analysis.c:511 msgid "couldn't allocate memory space for roi analysis of volumes" msgstr "無法é…置記憶體空間給體ç©çš„ roi 分æž" #: ../src/analysis.c:583 msgid "couldn't allocate memory space for roi analyses" msgstr "無法é…置記憶體空間給 roi 分æž" #: ../src/dcmtk_interface.cc:140 ../src/dcmtk_interface.cc:1474 #, c-format msgid "could not find dataset in DICOM file %s\n" msgstr "在 DICOM 檔案 %s 中找ä¸åˆ°è³‡æ–™é›†\n" #: ../src/dcmtk_interface.cc:150 #, c-format msgid "Modality %s is not understood. Ignoring File %s" msgstr "æˆåƒæ–¹å¼ %s 無法ç†è§£ã€‚ 忽略檔案 %s" #: ../src/dcmtk_interface.cc:182 #, c-format msgid "could not find # of columns - Failed to load file %s\n" msgstr "找ä¸åˆ°æ¬„數 - 無法載入檔案 %s\n" #: ../src/dcmtk_interface.cc:188 #, c-format msgid "could not find # of rows - Failed to load file %s\n" msgstr "找ä¸åˆ°åˆ—數 - 無法載入檔案 %s\n" #: ../src/dcmtk_interface.cc:235 #, c-format msgid "could not find # of bits allocated - Failed to load file %s\n" msgstr "找ä¸åˆ°é…置的ä½å…ƒæ•¸ - 無法載入檔案 %s\n" #: ../src/dcmtk_interface.cc:241 #, c-format msgid "could not find pixel representation - Failed to load file %s\n" msgstr "找ä¸åˆ°åƒç´ è¡¨ç¤ºæ–¹å¼ - 無法載入檔案 %s\n" #: ../src/dcmtk_interface.cc:261 #, c-format msgid "unsupported # of bits allocated (%d) - Failed to load file %s\n" msgstr "ä¸å—支æ´çš„é…ç½®ä½å…ƒæ•¸ (%d) - 無法載入檔案 %s\n" #: ../src/dcmtk_interface.cc:268 #, c-format msgid "Couldn't allocate space for the data set structure to hold DCMTK data - Failed to load file %s" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦è³‡æ–™é›†çµæ§‹ä»¥å­˜æ”¾ DCMTK 資料 - 無法載入檔案 %s" #: ../src/dcmtk_interface.cc:286 #, c-format msgid "Could not find the pixel size, setting to 1 mm for File %s" msgstr "找ä¸åˆ°åƒç´ å¤§å°ï¼Œè¨­å®šç‚º 1 å…¬é‡ç”¨æ–¼æª”案 %s" #: ../src/dcmtk_interface.cc:298 #, c-format msgid "Could not find the slice thickness, setting to 1 mm for File %s" msgstr "找ä¸åˆ°åˆ‡ç‰‡ç²—細,設定為 1 å…¬é‡ç”¨æ–¼æª”案 %s" #: ../src/dcmtk_interface.cc:612 #, c-format msgid "error reading in pixel data - DCMTK error: %s - Failed to read file %s" msgstr "讀入åƒç´ è³‡æ–™ - DCMTK 錯誤時發生錯誤:%s - ç„¡æ³•è®€å–æª”案 %s" #: ../src/dcmtk_interface.cc:890 #, c-format msgid "Cannot evenly divide the number of slices by the number of frames for data set %s - ignoring dynamic data" msgstr "無法由影格數é‡å¹³è¡¡åŠƒåˆ†è³‡æ–™é›† %s ä¸­çš„åˆ‡ç‰‡æ•¸é‡ - 忽略動態資料" #: ../src/dcmtk_interface.cc:899 #, c-format msgid "Cannot evenly divide the number of slices by the number of gates for data set %s - ignoring gated data" msgstr "ç„¡æ³•ç”±é–˜å£æ•¸é‡å¹³è¡¡åŠƒåˆ†è³‡æ–™é›† %s ä¸­çš„åˆ‡ç‰‡æ•¸é‡ - 忽略閘å£è³‡æ–™" #: ../src/dcmtk_interface.cc:945 msgid "couldn't allocate space for the frame duration info" msgstr "無法é…置記憶體空間給影格æŒçºŒæ™‚間資訊" #: ../src/dcmtk_interface.cc:1028 #, c-format msgid "Detected discontinous frames in data set %s - frame start times will be incorrect" msgstr "在資料集 %s 䏭嵿¸¬åˆ°ä¸é€£çºŒçš„影格 - å½±æ ¼èµ·å§‹æ™‚é–“å°‡ä¸æ­£ç¢º" #: ../src/dcmtk_interface.cc:1031 #, c-format msgid "Slice thickness (%5.3f mm) not equal to slice spacing (%5.3f mm) in data set %s - will use slice spacing for thickness" msgstr "在資料集 %3$s 中切片粗細 (%1$5.3f å…¬é‡) ä¸ç­‰æ–¼åˆ‡ç‰‡é–“éš” (%2$5.3f å…¬é‡) - 將切片間隔åšç‚ºåˆ‡ç‰‡ç²—細使用" #: ../src/dcmtk_interface.cc:1217 msgid "Importing File(s) Through DCMTK" msgstr "é€éŽ DCMTK 匯入檔案" #. can handle multiple dicom files each with a single slice, or one dicom file with multiple slices, #. can't handle multiple files each with multiple slices #: ../src/dcmtk_interface.cc:1236 msgid "no support for multislice files within DICOM directory format" msgstr "在 DICOM 目錄格å¼ä¹‹å…§ä¸æ”¯æ´å¤šé‡åˆ‡ç‰‡æª”案" #: ../src/dcmtk_interface.cc:1482 msgid "Scanning Files to find additional DICOM Slices" msgstr "æŽƒææª”案以尋找é¡å¤–çš„ DICOM 切片" #: ../src/dcmtk_interface.cc:1553 msgid "Multiple data sets were found in the same directory as the specified file. In addition to the dataset corresponding to the specified file, would you like to load in these additional datasets?" msgstr "在相åŒç›®éŒ„中找到了多é‡è³‡æ–™é›†åšç‚ºæŒ‡å®šçš„æª”案。在相應於指定檔案的資料集以外,您也想è¦è¼‰å…¥é€™äº›é¡å¤–資料集?" #: ../src/dcmtk_interface.cc:1746 msgid "Could not find a DICOM Data Dictionary. Reading may fail. Consider defining the environmental variable DCMDICTPATH to the dicom.dic file." msgstr "找ä¸åˆ° DICOM 資料辭典。 讀å–也許會失敗。 請考慮定義環境變數 DCMDICTPATH 為 dicom.dic 檔案。" #: ../src/dcmtk_interface.cc:1751 #, c-format msgid "could not read DICOM file %s, dcmtk returned %s" msgstr "ç„¡æ³•è®€å– DICOM 檔案 %s,dcmtk 回傳了 %s" #: ../src/dcmtk_interface.cc:1991 #, c-format msgid "File already exists with name: %s" msgstr "檔案已存在且å為:%s" #: ../src/dcmtk_interface.cc:1997 ../src/dcmtk_interface.cc:2040 #, c-format msgid "Couldn't create directory: %s" msgstr "無法建立目錄:%s" #: ../src/dcmtk_interface.cc:2006 #, c-format msgid "Existing DICOMDIR file %s is not a regular file" msgstr "ç¾æœ‰ DICOMDIR 檔案 %s ä¸¦éžæ¨™æº–檔案" #: ../src/dcmtk_interface.cc:2011 #, c-format msgid "Existing DICOMDIR file %s exists but is not appendable, error %s" msgstr "ç¾æœ‰ DICOMDIR 檔案 %s 存在但是無法附加,錯誤 %s" #: ../src/dcmtk_interface.cc:2017 #, c-format msgid "Could not create DICOMDIR file %s, error %s" msgstr "無法建立 DICOMDIR 檔案 %s,錯誤 %s" #: ../src/dcmtk_interface.cc:2073 ../src/libmdc_interface.c:981 #, c-format msgid "dimensions of output data set will be %dx%dx%d, voxel size of %fx%fx%f" msgstr "輸出資料集的維度將是 %dx%dx%d,體素大å°ç‚º %fx%fx%f" #: ../src/dcmtk_interface.cc:2329 #, c-format msgid "" "Exporting File Through DCMTK:\n" " %s" msgstr "" "é€éŽ DCMTK 匯出檔案:\n" " %s" #: ../src/dcmtk_interface.cc:2372 msgid "Could not malloc transfer buffer" msgstr "無法é…置記憶體給轉é€ç·©è¡å€" #: ../src/dcmtk_interface.cc:2471 #, c-format msgid "couldn't write out file %s, error %s" msgstr "無法寫出檔案 %s,錯誤 %s" #: ../src/dcmtk_interface.cc:2478 #, c-format msgid "couldn't append file %s to DICOMDIR %s, error %s" msgstr "無法附加檔案 %s 到 DICOMDIR %s,錯誤 %s" #: ../src/dcmtk_interface.cc:2514 #, c-format msgid "Failed to write DICOMDIR file, error %s\n" msgstr "寫入 DICOMDIR 檔案時失敗,錯誤 %s\n" #. N_("Steepest Descent"), #: ../src/fads.c:40 msgid "Fletcher-Reeves conjugate gradient" msgstr "Fletcher-Reeves 共軛梯度" #: ../src/fads.c:41 msgid "Polak-Ribiere conjugate gradient" msgstr "Polak-Ribiere 共軛梯度" #: ../src/fads.c:47 msgid "Principle Component Analysis" msgstr "主æˆåˆ†åˆ†æž" #: ../src/fads.c:48 msgid "Penalized Least Squares Factor Analysis" msgstr "å—罰最å°å¹³æ–¹å› ç´ åˆ†æž" #: ../src/fads.c:49 msgid "2 compartment model" msgstr "二室模型" #: ../src/fads.c:53 msgid "Priniciple Component Analysis based on singular value decomposition." msgstr "基於單值分解的主æˆåˆ†åˆ†æžã€‚" #: ../src/fads.c:56 msgid "Principle component analysis with positivity constraints and a penalized least squares objective, an adaptation of Sitek, et al., IEEE Trans. Med. Imag., 2002. If beta is set to zero, this is normal factor analysis, similar to Di Paola, et al., IEEE Trans. Nuc. Sci., 1982" msgstr "主æˆåˆ†åˆ†æžå…·å‚™æ­£å‘é™åˆ¶å’Œå—罰最å°å¹³æ–¹ç›®çš„,是åƒè€ƒä¿®æ”¹è‡ª Sitek, et al., IEEE Trans. Med. Imag., 2002. If beta is set to zero, this is normal factor analysis, similar to Di Paola, et al., IEEE Trans. Nuc. Sci., 1982" #: ../src/fads.c:62 msgid "Standard 2 compartment model" msgstr "標準二室模型" #: ../src/fads.c:109 msgid "need dynamic data set in order to perform factor analysis" msgstr "需è¦å‹•態資料集以便施行因素分æž" #: ../src/fads.c:115 ../src/fads.c:120 ../src/fads.c:271 #, c-format msgid "Failed to allocate %dx%d array" msgstr "é…ç½® %dx%d 陣列時失敗" #: ../src/fads.c:125 ../src/fads.c:276 #, c-format msgid "Failed to allocate %d vector" msgstr "é…ç½® %d å‘釿™‚失敗" #: ../src/fads.c:157 #, c-format msgid "Failed to allocate %d factor array" msgstr "é…ç½® %d å› å­é™£åˆ—時失敗" #: ../src/fads.c:266 #, c-format msgid "failed to alloc matrix, size %dx%d" msgstr "é…置矩陣時失敗,大å°ç‚º %dx%d" #: ../src/fads.c:311 ../src/fads.c:338 #, c-format msgid "failed to alloc matrix size %dx%d" msgstr "é…ç½®çŸ©é™£å¤§å° %dx%d 時失敗" #: ../src/fads.c:325 #, c-format msgid "failed to alloc vector size %d" msgstr "é…ç½®å‘é‡å¤§å° %d 時失敗" #: ../src/fads.c:398 ../src/fads.c:1207 ../src/fads.c:2178 msgid "failed to allocate new_ds" msgstr "é…ç½® new_ds 時失敗" #: ../src/fads.c:429 #, c-format msgid "couldn't open: %s for writing PCA analyses" msgstr "無法開啟:%s 以寫入主æˆåˆ†åˆ†æž" #: ../src/fads.c:941 msgid "failed forward error malloc" msgstr "轉寄錯誤é…置失敗" #: ../src/fads.c:948 msgid "failed weight malloc" msgstr "權é‡é…置失敗" #: ../src/fads.c:955 msgid "failed equality constraint alpha malloc" msgstr "å°ç­‰é™åˆ¶ alpha é…置失敗" #: ../src/fads.c:961 msgid "failed equality constraint blood curve malloc" msgstr "å°ç­‰é™åˆ¶è¡€æ¶²æ›²ç·šé…置失敗" #: ../src/fads.c:967 ../src/fads.c:1938 msgid "failed malloc for equality lagrange multiplier - alpha" msgstr "å°ç­‰ lagrange å€å¢žå™¨é…置失敗 - alpha" #: ../src/fads.c:975 ../src/fads.c:1946 msgid "failed malloc for equality lagrange multiplier - blood curve" msgstr "å°ç­‰ lagrange å€å¢žå™¨é…置失敗 - 血液曲線" #: ../src/fads.c:983 ../src/fads.c:1954 msgid "failed malloc for inequality lagrange multiplier - alpha" msgstr "ä¸å°ç­‰ lagrange å€å¢žå™¨é…置失敗 - alpha" #: ../src/fads.c:992 msgid "failed malloc for inequailty lagrange multiplier - factors" msgstr "ä¸å°ç­‰ lagrange å€å¢žå™¨é…置失敗 - å› å­" #: ../src/fads.c:1009 ../src/fads.c:2001 msgid "failed to allocate multidimensional minimizer" msgstr "é…ç½®å¤šç¶­åº¦å€æ¸›å™¨æ™‚失敗" #: ../src/fads.c:1080 #, c-format msgid "" "Calculating Penalized Least Squares Factor Analysis:\n" " %s" msgstr "" "計算å—罰最å°å¹³æ–¹å› ç´ åˆ†æžï¼š\n" " %s" #: ../src/fads.c:1223 #, c-format msgid "factor %d" msgstr "å› å­ %d" #: ../src/fads.c:1241 ../src/fads.c:2216 #, c-format msgid "couldn't open: %s for writing fads analyses" msgstr "無法開啟:%s 用於寫入 fads 分æž" #: ../src/fads.c:1890 msgid "failed to allocate intermediate data storage for tissue components" msgstr "é…ç½®ä¸­ä»‹è³‡æ–™å„²å­˜é«”çµ¦çµ„ç¹”çµ„æˆæ™‚失敗" #: ../src/fads.c:1896 msgid "failed to allocate intermediate data storage for forward error" msgstr "é…置中介資料儲存體給轉寄錯誤時失敗" #: ../src/fads.c:1902 msgid "failed to allocate frame start array" msgstr "é…置影格啟始陣列時失敗" #: ../src/fads.c:1908 msgid "failed to allocate frame end array" msgstr "é…ç½®å½±æ ¼çµæŸé™£åˆ—時失敗" #: ../src/fads.c:1914 msgid "failed to allocate frame midpt array" msgstr "é…置影格中段陣列時失敗" #: ../src/fads.c:1926 msgid "failed malloc for equality constraint on alpha" msgstr "é…置記憶體給 alpha å°ç­‰é™åˆ¶æ™‚失敗" #: ../src/fads.c:1932 msgid "failed malloc for equality constraint on blood curve" msgstr "é…置記憶體給血液曲線å°ç­‰é™åˆ¶æ™‚失敗" #: ../src/fads.c:1962 msgid "failed malloc for inequailty lagrange multiplier - blood curve" msgstr "é…置記憶體給ä¸å°ç­‰ lagrange å€å¢žå™¨æ™‚失敗 - 血液曲線" #: ../src/fads.c:1970 msgid "failed malloc for inequailty lagrange multiplier - k12" msgstr "é…置記憶體給ä¸å°ç­‰ lagrange å€å¢žå™¨æ™‚失敗 - k12" #: ../src/fads.c:1978 msgid "failed malloc for inequailty lagrange multiplier - k21" msgstr "é…置記憶體給ä¸å°ç­‰ lagrange å€å¢žå™¨æ™‚失敗 - k21" #: ../src/fads.c:2009 msgid "failed to allocate initial vector" msgstr "é…ç½®åˆå§‹å‘釿™‚失敗" #: ../src/fads.c:2039 #, c-format msgid "" "Calculating Two Compartment Factor Analysis:\n" " %s" msgstr "" "計算二室因素分æžï¼š\n" " %s" #: ../src/fads.c:2159 #, c-format msgid "Minimum found after %d iterations\n" msgstr "%d 次å覆é‹ç®—之後找到最å°å€¼\n" #: ../src/fads.c:2161 #, c-format msgid "terminated minization \n" msgstr "最å°åŒ–已終止\n" #: ../src/fads.c:2163 #, c-format msgid "No minimum found after %d iterations, exited with: %s\n" msgstr "%d 次å覆é‹ç®—之後找ä¸åˆ°æœ€å°å€¼ï¼Œé›¢é–‹ç‹€æ…‹ï¼š%s\n" #: ../src/fads.c:2197 #, c-format msgid "tissue type %d: k12 %g k21 %g" msgstr "組織類型 %d:k12 %g k21 %g" #: ../src/fads.c:2199 #, c-format msgid "blood fraction" msgstr "血液æˆåˆ†" #: ../src/image.c:180 msgid "couldn't allocate memory for rgba_data for roi image" msgstr "無法é…置記憶體給 rgba_data 用於 roi å½±åƒ" #: ../src/image.c:222 msgid "couldn't allocate memory for rgb_data for blank image" msgstr "無法é…置記憶體給 rgb_data 用於空白影åƒ" #: ../src/image.c:254 msgid "couldn't allocate memory for image from 8 bit data" msgstr "無法é…置記憶體給八ä½å…ƒè³‡æ–™çš„å½±åƒ" #: ../src/image.c:303 msgid "couldn't allocate memory for rgba16_data for transferring rendering to image" msgstr "無法é…置記憶體給 rgba16_data ç”¨æ–¼è½‰æ›æ½¤ç®—為影åƒ" #: ../src/image.c:380 msgid "couldn't allocate memory for char_data for rendering image" msgstr "無法é…置記憶體給 char_data 用於潤算影åƒ" #: ../src/image.c:427 msgid "couldn't allocate memory for rgba_data for bar_graph" msgstr "無法é…置記憶體給 rgba_data 用於 bar_graph" #: ../src/image.c:502 msgid "couldn't allocate memory for rgb_data for color_strip" msgstr "無法é…置記憶體給 rgb_data 用於 color_strip" #: ../src/image.c:557 msgid "couldn't allocate memory for rgba_data for projection image" msgstr "無法é…置記憶體給 rgba_data 用於投影影åƒ" #: ../src/image.c:608 msgid "couldn't allocate memory for rgba_data for slice image" msgstr "無法é…置記憶體給 rgba_data 用於切片影åƒ" #: ../src/libecat_interface.c:35 msgid "Unknown Data Type" msgstr "䏿˜Žè³‡æ–™é¡žåž‹" #. UnknownMatDataType #: ../src/libecat_interface.c:36 msgid "Byte" msgstr "ä½å…ƒçµ„" #. ByteData #: ../src/libecat_interface.c:37 msgid "Short (16 bit), Little Endian" msgstr "短整數 (16 ä½å…ƒ),低ä½åœ¨å‰" #. VAX_Ix2 #: ../src/libecat_interface.c:38 msgid "Integer (32 bit), Little Endian" msgstr "整數 (32 ä½å…ƒ),低ä½åœ¨å‰" #. VAX_Ix4 #: ../src/libecat_interface.c:39 msgid "VAX Float (32 bit)" msgstr "VAX 浮點數 (32 ä½å…ƒ)" #. VAX_Rx4 #: ../src/libecat_interface.c:40 msgid "IEEE Float (32 bit)" msgstr "IEEE 浮點數 (32 ä½å…ƒ)" #. IeeeFloat #: ../src/libecat_interface.c:41 msgid "Short (16 bit), Big Endian" msgstr "短整數 (16 ä½å…ƒ),高ä½åœ¨å‰" #. SunShort #: ../src/libecat_interface.c:42 msgid "Integer (32 bit), Big Endian" msgstr "整數 (32 ä½å…ƒ),高ä½åœ¨å‰" #: ../src/libecat_interface.c:87 #, c-format msgid "Can't open file %s using libecat" msgstr "無法利用 libecat 開啟檔案 %s" #: ../src/libecat_interface.c:111 #, c-format msgid "Don't know how to handle this CTI file type: %d" msgstr "ä¸çŸ¥é“如何處ç†é€™å€‹ CTI 檔案類型:%d" #: ../src/libecat_interface.c:121 #, c-format msgid "Libecat can't get header info at matrix %x in file %s" msgstr "Libecat 無法å–得矩陣 %x 的標頭資訊於檔案 %s" #: ../src/libecat_interface.c:143 #, c-format msgid "No support for importing CTI files with data type of: %d (%s)" msgstr "䏿”¯æ´åŒ¯å…¥å…·æœ‰è³‡æ–™é¡žåž‹ï¼š%d (%s) çš„ CTI 檔案" #: ../src/libecat_interface.c:175 msgid "Couldn't allocate memory space for the data set structure to hold CTI data" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦è³‡æ–™é›†çµæ§‹ä»¥å­˜æ”¾ CTI 資料" #. handle corrupted cti files #: ../src/libecat_interface.c:281 msgid "Detected corrupted CTI file, will try to continue by guessing voxel_size" msgstr "嵿¸¬åˆ°æå£žçš„ CTI 檔案,將會嘗試藉由猜測體素大å°ä»¥ç¹¼çºŒ" #: ../src/libecat_interface.c:284 msgid "Detected zero voxel size in CTI file, will try to continue by guessing voxel_size" msgstr "在 CTI æª”æ¡ˆä¸­åµæ¸¬åˆ°é›¶å€¼é«”素大å°ï¼Œå°‡æœƒå˜—試藉由猜測體素大å°ä»¥ç¹¼çºŒ" #. handle corrupted cti files #: ../src/libecat_interface.c:294 msgid "Detected corrupted CTI file, will try to continue by guessing offset" msgstr "嵿¸¬åˆ°æå£žçš„ CTI 檔案,將會嘗試藉由猜測å移值以繼續" #: ../src/libecat_interface.c:323 #, c-format msgid "" "Importing CTI File:\n" " %s" msgstr "" "匯入 CTI 檔案:\n" " %s" #: ../src/libecat_interface.c:428 #, c-format msgid "Libecat returned %d blank planes... corrupted data file? Use data with caution." msgstr "Libecat 回傳 %d 個空白平é¢â€¦ 資料檔案已æå£žï¼Ÿ 使用資料請å°å¿ƒã€‚" #: ../src/libmdc_interface.c:53 msgid "(_X)MedCon Guess" msgstr "(_X)MedCon 猜測" #: ../src/libmdc_interface.c:54 msgid "_GIF 87a/89a" msgstr "_GIF 87a/89a" #: ../src/libmdc_interface.c:55 msgid "Acr/_Nema 2.0" msgstr "Acr/_Nema 2.0" #: ../src/libmdc_interface.c:56 msgid "_Concorde/microPET" msgstr "_Concorde/microPET" #: ../src/libmdc_interface.c:57 msgid "ECAT _6 via (X)MedCon" msgstr "ECAT _6 é€éŽ (X)MedCon" #: ../src/libmdc_interface.c:58 msgid "ECAT _7 via (X)MedCon" msgstr "ECAT _7 é€éŽ (X)MedCon" #: ../src/libmdc_interface.c:59 msgid "_InterFile 3.3" msgstr "_InterFile 3.3" #: ../src/libmdc_interface.c:60 msgid "_Analyze (SPM)" msgstr "_Analyze (SPM)" #: ../src/libmdc_interface.c:61 msgid "_DICOM 3.0 via (X)MedCon" msgstr "_DICOM 3.0 é€éŽ (X)MedCon" #: ../src/libmdc_interface.c:62 msgid "_NIFTI via (X)MedCon" msgstr "_NIFTI é€éŽ (X)MedCon" #: ../src/libmdc_interface.c:66 msgid "let (X)MedCon/libmdc guess file type" msgstr "讓 (X)MedCon/libmdc 猜測檔案類型" #: ../src/libmdc_interface.c:67 msgid "Import a file stored as GIF" msgstr "匯入儲存為 GIF 的檔案" #: ../src/libmdc_interface.c:68 msgid "Import a Acr/Nema 2.0 file" msgstr "匯入 Acr/Nema 2.0 檔案" #: ../src/libmdc_interface.c:69 msgid "Import a file from the Concorde microPET" msgstr "從 Concorde microPET 匯入檔案" #: ../src/libmdc_interface.c:70 msgid "Import a CTI/ECAT 6 file through (X)MedCon" msgstr "é€éŽ (X)MedCon 匯入 CTI/ECAT 6 檔案" #: ../src/libmdc_interface.c:71 msgid "Import a CTI/ECAT 7 file through (X)MedCon" msgstr "é€éŽ (X)MedCon 匯入 CTI/ECAT 7 檔案" #: ../src/libmdc_interface.c:72 msgid "Import a InterFile 3.3 file" msgstr "匯入 InterFile 3.3 檔案" #: ../src/libmdc_interface.c:73 msgid "Import an Analyze file" msgstr "匯入 Analyze 檔案" #: ../src/libmdc_interface.c:74 msgid "Import a DICOM 3.0 file through (X)MedCon" msgstr "é€éŽ (X)MedCon 匯入 DICOM 3.0 檔案" #: ../src/libmdc_interface.c:75 msgid "Import a NIFTI file through (X)MedCon" msgstr "é€éŽ (X)MedCon 匯入 NIFTI 檔案" #: ../src/libmdc_interface.c:89 msgid "Acr/Nema 2.0" msgstr "Acr/Nema 2.0" #: ../src/libmdc_interface.c:90 msgid "Concorde/microPET" msgstr "Concorde/microPET" #: ../src/libmdc_interface.c:91 msgid "ECAT 6 via (X)MedCon" msgstr "é€éŽ (X)MedCon 匯入 ECAT 6 檔案" #: ../src/libmdc_interface.c:92 msgid "InterFile 3.3" msgstr "InterFile 3.3" #: ../src/libmdc_interface.c:93 msgid "Analyze (SPM)" msgstr "Analyze (SPM)" #: ../src/libmdc_interface.c:94 msgid "DICOM 3.0 via (X)MedCon" msgstr "DICOM 3.0 é€éŽ (X)MedCon" #: ../src/libmdc_interface.c:95 msgid "NIFTI" msgstr "NIFTI" #: ../src/libmdc_interface.c:99 msgid "Export a Acr/Nema 2.0 file" msgstr "匯出 Acr/Nema 2.0 檔案" #: ../src/libmdc_interface.c:100 msgid "Export a Concorde format file" msgstr "匯出 Concorde æ ¼å¼æª”案" #: ../src/libmdc_interface.c:101 msgid "Export a CTI/ECAT 6 file" msgstr "匯出 CTI/ECAT 6 檔案" #: ../src/libmdc_interface.c:102 msgid "Export a InterFile 3.3 file" msgstr "匯出 InterFile 3.3 檔案" #: ../src/libmdc_interface.c:103 msgid "Export an Analyze file" msgstr "匯出 Analyze 檔案" #: ../src/libmdc_interface.c:104 msgid "Export a DICOM 3.0 file" msgstr "匯出 DICOM 3.0 檔案" #: ../src/libmdc_interface.c:105 msgid "Export a NIFTI file" msgstr "匯出 NIFTI 檔案" #: ../src/libmdc_interface.c:255 #, c-format msgid "Can't open file %s with libmdc/(X)MedCon" msgstr "無法以 libmdc/(X)MedCon 開啟檔案 %s" #: ../src/libmdc_interface.c:262 #, c-format msgid "Can't read file %s with libmdc/(X)MedCon" msgstr "無法以 libmdc/(X)MedCon è®€å–æª”案 %s" #. 9 #. 8 #. 11 #. 12 #. 13 #. 1 #: ../src/libmdc_interface.c:347 #, c-format msgid "Importing data type %d file through (X)MedCon unsupported in AMIDE, trying anyway" msgstr "é€éŽ (X)MedCon 匯入資料類型 %d 的檔案並ä¸å— AMIDE 支æ´ï¼Œç„¡è«–如何還是試試看" #: ../src/libmdc_interface.c:361 ../src/libmdc_interface.c:607 #, c-format msgid "Couldn't read plane %d in %s with libmdc/(X)MedCon" msgstr "無法以 libmdc/(X)MedCon è®€å– %2$s 中的 %1$d å¹³é¢" #: ../src/libmdc_interface.c:367 #, c-format msgid "libmdc returned error: %s" msgstr "libmdc 回傳了錯誤:%s" #: ../src/libmdc_interface.c:406 msgid "Couldn't allocate memory space for the data set structure to hold (X)MedCon data" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦è³‡æ–™é›†çµæ§‹ä»¥å­˜æ”¾ (X)MedCon 資料" #: ../src/libmdc_interface.c:543 msgid "(X)MedCon returned no duration information. Frame durations will be incorrect" msgstr "(X)MedCon 沒有回傳任何æŒçºŒæ™‚間資訊。 影格æŒçºŒæ™‚é–“å°‡æœƒä¸æ­£ç¢º" #: ../src/libmdc_interface.c:563 #, c-format msgid "" "Importing File Through (X)MedCon:\n" " %s" msgstr "" "é€éŽ (X)MedCon 匯入檔案:\n" " %s" #: ../src/libmdc_interface.c:737 msgid "(X)MedCon couldn't convert to a float... out of memory?" msgstr "(X)MedCon 無法轉æ›ç‚ºæµ®é»žæ•¸â€¦ 記憶體ä¸è¶³ï¼Ÿ" #: ../src/libmdc_interface.c:773 #, c-format msgid "(X)MedCon returned %d blank planes... corrupted data file? Use data with caution." msgstr "(X)MedCon 回傳了 %d 空白平é¢â€¦ 資料檔案已æå£žï¼Ÿ 使用資料請å°å¿ƒã€‚" #: ../src/libmdc_interface.c:893 #, c-format msgid "Unsupported export file format: %d\n" msgstr "䏿”¯æ´çš„匯出檔案格å¼ï¼š%d\n" #: ../src/libmdc_interface.c:1040 msgid "couldn't malloc DYNAMIC_DATA structs" msgstr "無法é…置記憶體給 DYNAMIC_DATA çµæ§‹" #: ../src/libmdc_interface.c:1046 msgid "couldn't malloc img_data structs" msgstr "無法é…置記憶體給 img_data çµæ§‹" #: ../src/libmdc_interface.c:1052 #, c-format msgid "" "Exporting File Through (X)MedCon:\n" " %s" msgstr "" "é€éŽ (X)MedCon 匯出檔案:\n" " %s" #: ../src/libmdc_interface.c:1111 #, c-format msgid "couldn't alloc %d bytes for plane" msgstr "無法é…ç½® %d ä½å…ƒçµ„給平é¢" #: ../src/libmdc_interface.c:1158 #, c-format msgid "couldn't pixel fiddle, error: %s" msgstr "無法åƒç´ åŒ–ç„¡æ„義資料,錯誤:%s" #: ../src/libmdc_interface.c:1165 #, c-format msgid "couldn't write out file %s, error %d" msgstr "無法寫出檔案 %s,錯誤 %d" #: ../src/mpeg_encode.c:325 ../src/mpeg_encode.c:516 msgid "Unable to allocate yuv struct" msgstr "無法é…ç½® yuv çµæ§‹" #: ../src/mpeg_encode.c:335 ../src/mpeg_encode.c:524 msgid "Unable to allocate yuv buffer" msgstr "無法é…ç½® yuv ç·©è¡å€" #: ../src/mpeg_encode.c:491 msgid "couldn't allocate memory space for context_t" msgstr "無法é…置記憶體空間給 context_t" #: ../src/mpeg_encode.c:503 msgid "couldn't allocate memory space for fame parameters" msgstr "無法é…置記憶體空間給 fame åƒæ•¸" #: ../src/mpeg_encode.c:510 msgid "Unable to allocate memory space for mpeg encoding buffer" msgstr "無法é…置記憶體空間給 mpeg 編碼緩è¡å€" #: ../src/mpeg_encode.c:543 msgid "unable to open output file for mpeg encoding" msgstr "無法開啟輸出檔案給 mpeg 編碼" #: ../src/raw_data_import.c:242 msgid "read offset (entries):" msgstr "讀å–åç§» (é …ç›®):" #: ../src/raw_data_import.c:245 msgid "read offset (bytes):" msgstr "讀å–åç§» (ä½å…ƒçµ„):" #: ../src/raw_data_import.c:259 msgid "total entries to read through:" msgstr "é€éŽè®€å–的項目總計:" #: ../src/raw_data_import.c:274 msgid "total bytes to read through:" msgstr "é€éŽè®€å–çš„ä½å…ƒçµ„總計:" #: ../src/raw_data_import.c:349 #, c-format msgid "%s: Raw Data Import Dialog\n" msgstr "%s:原始資料匯入å°è©±æ¡†\n" #. widgets to change the roi's name #: ../src/raw_data_import.c:363 msgid "name:" msgstr "å稱:" #. widgets to change the object's modality #: ../src/raw_data_import.c:401 msgid "modality:" msgstr "造影:" #. widgets to change the raw data file's data format #: ../src/raw_data_import.c:425 msgid "data format:" msgstr "資料格å¼ï¼š" #. how many bytes we can read from the file #: ../src/raw_data_import.c:446 msgid "file size (bytes):" msgstr "æª”æ¡ˆå¤§å° (ä½å…ƒçµ„):" #. labels for the x, y, and z components #: ../src/raw_data_import.c:493 ../src/ui_render.c:972 msgid "x" msgstr "x" #: ../src/raw_data_import.c:496 ../src/ui_render.c:946 msgid "y" msgstr "y" #: ../src/raw_data_import.c:499 ../src/ui_render.c:954 msgid "z" msgstr "z" #: ../src/raw_data_import.c:502 msgid "gates" msgstr "é–˜å£" #: ../src/raw_data_import.c:505 msgid "frames" msgstr "影格" #. widgets to change the dimensions of the data set #: ../src/raw_data_import.c:512 msgid "dimensions (# voxels)" msgstr "維度 (# 體素)" #. widgets to change the voxel size of the data set #: ../src/raw_data_import.c:533 msgid "voxel size (mm)" msgstr "é«”ç´ å¤§å° (å…¬é‡)" #. scale factor to apply to the data #: ../src/raw_data_import.c:556 msgid "scale factor" msgstr "伸縮因å­" #: ../src/raw_data_import.c:593 msgid "Couldn't allocate memory space for raw_data_info structure for raw data import" msgstr "無法é…置記憶體空間給 raw_data_info çµæ§‹ç”¨æ–¼åŽŸå§‹è³‡æ–™åŒ¯å…¥" #: ../src/raw_data_import.c:605 #, c-format msgid "Couldn't get stat's on file %s for raw data import" msgstr "無法å–得檔案 %s 的狀態用於原始資料匯入" #: ../src/render.c:46 msgid "Highest Quality and Slowest" msgstr "最高å“質且最慢" #: ../src/render.c:47 msgid "High Quality and Medium Speed" msgstr "高å“質且中等速度" #: ../src/render.c:48 msgid "Medium Quality and Fast" msgstr "中等å“質且快速" #: ../src/render.c:49 msgid "Low Quality and Fastest" msgstr "低å“質且最快" #: ../src/render.c:52 msgid "Opacity" msgstr "æ¿åº¦" #: ../src/render.c:53 msgid "Grayscale" msgstr "ç°éšŽ" #: ../src/render.c:150 msgid "couldn't allocate memory space for rendering context" msgstr "無法é…置記憶體空間給潤算狀態組åˆ" #: ../src/render.c:201 msgid "\"Per Slice\" thresholding illogical for conversion to volume rendering, using \"Global\" thresholding " msgstr "「å„切片ã€ç”¨æ–¼è½‰æ›åˆ°é«”ç©æ½¤ç®—的臨界值ä¸åˆé‚輯,正在使用「全域ã€è‡¨ç•Œå€¼ " #: ../src/render.c:214 msgid "couldn't allocate memory space for density ramp x" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦å¯†åº¦æ–œé¢ x" #: ../src/render.c:219 msgid "couldn't allocate memory space for density ramp y" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦å¯†åº¦æ–œé¢ y" #: ../src/render.c:230 msgid "couldn't allocate memory space for gradient ramp x" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦æ¢¯åº¦æ–œé¢ x" #: ../src/render.c:235 msgid "couldn't allocate memory space for gradient ramp y" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦æ¢¯åº¦æ–œé¢ y" #: ../src/render.c:254 msgid "Error Setting the Rendering Density Ramp" msgstr "è¨­å®šæ½¤ç®—å¯†åº¦æ–œé¢æ™‚發生錯誤" #: ../src/render.c:264 msgid "Error Setting the Rendering Gradient Ramp" msgstr "è¨­å®šæ½¤ç®—æ¢¯åº¦æ–œé¢æ™‚發生錯誤" #: ../src/render.c:272 #, c-format msgid "Error Setting the Rendering Voxel Size (%s): %s" msgstr "è¨­å®šæ½¤ç®—é«”ç´ å¤§å° (%s) 時發生錯誤:%s" #: ../src/render.c:282 #, c-format msgid "Error Specifying the Rendering Voxel Fields (%s, NORMAL): %s" msgstr "æŒ‡å®šæ½¤ç®—é«”ç´ æ¬„ä½ (%s,一般) 時發生錯誤:%s" #: ../src/render.c:289 #, c-format msgid "Error Specifying the Rendering Voxel Fields (%s, DENSITY): %s" msgstr "æŒ‡å®šæ½¤ç®—é«”ç´ æ¬„ä½ (%s,密度) 時發生錯誤:%s" #: ../src/render.c:297 #, c-format msgid "Error Specifying the Rendering Voxel Fields (%s, GRADIENT): %s" msgstr "æŒ‡å®šæ½¤ç®—é«”ç´ æ¬„ä½ (%s,梯度) 時發生錯誤:%s" #: ../src/render.c:307 #, c-format msgid "Error Setting the Rendering Classifier Table (%s, DENSITY): %s" msgstr "設定潤算分類表格 (%s,密度) 時發生錯誤:%s" #: ../src/render.c:317 #, c-format msgid "Error Setting the Classifier Table (%s, GRADIENT): %s" msgstr "設定分類表格 (%s,梯度) 時發生錯誤:%s" #: ../src/render.c:415 #, c-format msgid "Error Setting the Context Size (%s): %s" msgstr "設定狀態組åˆå¤§å° (%s) 時發生錯誤:%s" #: ../src/render.c:428 #, c-format msgid "Could not allocate memory space for density data for %s" msgstr "無法é…置記憶體空間給密度資料用於 %s" #: ../src/render.c:440 #, c-format msgid "Could not allocate memory space for rendering context volume for %s" msgstr "無法é…置記憶體空間給潤算狀態組åˆé«”ç©ç”¨æ–¼ %s" #: ../src/render.c:452 #, c-format msgid "Converting for rendering: %s" msgstr "æ­£åœ¨è½‰æ›æ½¤ç®—:%s" #: ../src/render.c:654 #, c-format msgid "Error Computing the Rendering Normals (%s): %s" msgstr "計算潤算法線 (%s) 時發生錯誤:%s" #: ../src/render.c:682 #, c-format msgid "Error Setting Rendering Octree Threshold (%s, DENSITY): %s" msgstr "設定潤算八元樹臨界值 (%s,密度) 時發生錯誤:%s" #: ../src/render.c:688 #, c-format msgid "Error Setting Rendering Octree Threshold (%s, GRADIENT): %s" msgstr "設定潤算八元樹臨界值 (%s,梯度) 時發生錯誤:%s" #: ../src/render.c:695 #, c-format msgid "Error Generating Octree (%s): %s" msgstr "產生八元樹 (%s) 時發生錯誤:%s" #: ../src/render.c:722 #, c-format msgid "Error Setting the Rendering Material (%s, SHINYNESS): %s" msgstr "è¨­å®šæ½¤ç®—ææ–™ (%s,光度) 時發生錯誤:%s" #: ../src/render.c:732 #, c-format msgid "Error Setting the Rendering Shader (%s): %s" msgstr "設定潤算陰影 (%s) 時發生錯誤:%s" #: ../src/render.c:740 #, c-format msgid "Error Shading Table for Rendering (%s): %s" msgstr "加潤算陰影表格 (%s) 時發生錯誤:%s" #: ../src/render.c:775 #, c-format msgid "Error Setting The Item To Rotate (%s): %s" msgstr "設定項目為旋轉 (%s) 時發生錯誤:%s" #: ../src/render.c:780 #, c-format msgid "Error Rotating Rendering (%s): %s" msgstr "旋轉潤算 (%s) 時發生錯誤:%s" #: ../src/render.c:858 #, c-format msgid "Error Setting Rendering Max Ray Opacity (%s): %s" msgstr "設定潤算最大光線æ¿åº¦ (%s) 時發生錯誤:%s" #: ../src/render.c:864 #, c-format msgid "Error Setting the Min Voxel Opacity (%s): %s" msgstr "設定最å°é«”ç´ æ¿åº¦ (%s) 時發生錯誤:%s" #: ../src/render.c:893 #, c-format msgid "Could not allocate memory space for Rendering Image for %s" msgstr "無法é…置記憶體空間給潤算影åƒç”¨æ–¼ %s" #: ../src/render.c:901 #, c-format msgid "Error Switching the Rendering Image Pixel Return Type (%s): %s" msgstr "äº¤æ›æ½¤ç®—å½±åƒåƒç´ å‚³å›žé¡žåž‹ (%s) 時發生錯誤:%s" #: ../src/render.c:913 #, c-format msgid "Error Setting the Rendering Depth Cue (%s): %s" msgstr "設定潤算深度暗示 (%s) 時發生錯誤:%s" #: ../src/render.c:930 #, c-format msgid "Error Enabling Rendering Depth Cueing (%s): %s" msgstr "啟用潤算景深暗示 (%s) 時發生錯誤:%s" #: ../src/render.c:960 #, c-format msgid "Error Classifying the Volume (%s): %s" msgstr "åˆ†é¡žé«”ç© (%s) 時發生錯誤:%s" #: ../src/render.c:966 #, c-format msgid "Error Rendering the Classified Volume (%s): %s" msgstr "æ½¤ç®—åˆ†é¡žçš„é«”ç© (%s) 時發生錯誤:%s" #: ../src/render.c:972 #, c-format msgid "Error Rendering the Volume (%s): %s" msgstr "æ½¤ç®—é«”ç© (%s) 時發生錯誤:%s" #: ../src/tb_alignment.c:39 msgid "There is only one data set in this study. There needs to be at least two data sets to perform an alignment" msgstr "åœ¨é€™å€‹æª¢é©—ä¸­åªæœ‰ä¸€å€‹è³‡æ–™é›†ã€‚ 至少需è¦å…©å€‹è³‡æ–™é›†æ‰èƒ½æ–½è¡Œå°é½Šæ“作" #: ../src/tb_alignment.c:43 msgid "" "In order to perform an alignment, each data set must have at least three objects with the same name as the corresponding three objects in the other data set.\n\n" "Please see the help documentation for a longer explanation as to how alignments can be done." msgstr "" "為了施行å°é½Šï¼Œæ¯å€‹è³‡æ–™é›†è‡³å°‘è¦æœ‰ä¸‰å€‹èˆ‡å…¶ä»–資料集中相應物件åŒå的物件。\n\n" "è«‹åƒçœ‹èªªæ˜Žæ–‡ä»¶ä¸­ï¼Œé—œæ–¼å¦‚何完æˆå°é½Šæ“作的詳細解釋。" #: ../src/tb_alignment.c:51 msgid "" "Welcome to the data set alignment wizard, used for aligning one medical image data set with another. \n\n" "Currently, only rigid body registration using either fiducial marks, or maximization of mutual information has been implemented inside of AMIDE. This program was built without libgsl support, as such registration utilizing fiducial marks is not supported.\n\n" "The mutual information algorithm is run on the currently displayed slices, not the whole data sets." msgstr "" "歡迎使用資料集å°é½Šç²¾éˆï¼Œç”¨æ–¼å°‡ä¸€å€‹é†«å­¸å½±åƒè³‡æ–™é›†èˆ‡å¦å¤–一個å°é½Šã€‚\n\n" "ç›®å‰åªæœ‰ä½¿ç”¨åŸºæº–標記或交互資訊最大化的 rigid 內文註冊,已被 AMIDE å¯¦ä½œæ–¼å…§éƒ¨ã€‚é€™å€‹ç¨‹å¼æ˜¯ built 而無需 libgsl 支æ´ï¼Œå› ç‚ºæ­¤é¡žè¨»å†Šåˆ©ç”¨åŸºæº–標記未被支æ´ã€‚\n\n" "交互資訊演算法是é‹è¡Œåœ¨ä¹‹ä¸Šç›®å‰é¡¯ç¤ºçš„åˆ‡ç‰‡ï¼Œä¸æ˜¯æ•´å€‹è³‡æ–™é›†ã€‚" #: ../src/tb_alignment.c:101 msgid "Fiducial Markers" msgstr "基準標記" #: ../src/tb_alignment.c:103 msgid "Mutual Information" msgstr "交互資訊" #: ../src/tb_alignment.c:212 msgid "couldn't allocate memory space for tb_alignment_t" msgstr "無法é…置記憶體空間給 tb_alignment_t" #: ../src/tb_alignment.c:498 msgid "Align Data Set: (moving)" msgstr "å°é½Šè³‡æ–™é›†ï¼š(移動)" #: ../src/tb_alignment.c:521 msgid "Align Data Set: (fixed)" msgstr "å°é½Šè³‡æ–™é›†ï¼š(固定)" #: ../src/tb_alignment.c:560 msgid "Points for Alignment" msgstr "用於å°é½Šçš„點數" #: ../src/tb_alignment.c:634 #, c-format msgid "" "The alignment has been calculated, press Finish to apply, or Cancel to quit.\n\n" "The calculated fiducial reference error is:\n\t %5.2f mm/point" msgstr "" "å°é½Šå·²ç¶“計算,按下完æˆä»¥å¥—ç”¨ï¼Œæˆ–æŒ‰ä¸‹å–æ¶ˆä»¥é›¢é–‹ã€‚\n\n" "計算出的基準åƒè€ƒéŒ¯èª¤æ˜¯ï¼š\n\t%5.5f å…¬é‡/點" #: ../src/tb_alignment.c:648 #, c-format msgid "" "The alignment has been calculated, press Finish to apply, or Cancel to quit.\n\n" "The calculated mutual information metric is:\n\t %5.2f" msgstr "" "å°é½Šå·²è¨ˆç®—,按下完æˆä»¥å¥—ç”¨ï¼Œæˆ–å–æ¶ˆä»¥é›¢é–‹ã€‚\n\n" "已計算的交互資訊度é‡è³‡è¨Šæ˜¯ï¼š\n\t%5.2f" #: ../src/tb_alignment.c:708 msgid "Data Set Alignment Wizard" msgstr "資料集å°é½Šç²¾éˆ" #: ../src/tb_alignment.c:717 msgid "Alignment Type Selection" msgstr "å°é½Šåž‹æ…‹é¸æ“‡" #: ../src/tb_alignment.c:725 ../src/tb_math.c:543 msgid "Data Set Selection" msgstr "è³‡æ–™é›†é¸æ“‡" #: ../src/tb_alignment.c:731 msgid "Fiducial Marks Selection" msgstr "åŸºæº–æ¨™è¨˜é¸æ“‡" #: ../src/tb_alignment.c:739 msgid "Alignment Error" msgstr "å°é½ŠéŒ¯èª¤" #: ../src/tb_alignment.c:747 ../src/tb_math.c:560 msgid "Conclusion" msgstr "çµè«–" #: ../src/tb_crop.c:41 msgid "" "When the apply button is hit, a new data set will be created\n" "and placed into the study's tree, consisting of the appropriately\n" "cropped data\n" msgstr "" "當套用按鈕被點擊時,新的資料集將被建立\n" "並且放入檢驗樹,而由é©ç•¶è£å‰ªçš„資料\n" "所構æˆ\n" #. the zoom selection #: ../src/tb_crop.c:195 msgid "zoom" msgstr "縮放" #: ../src/tb_crop.c:215 msgid "gate" msgstr "é–˜å£" #: ../src/tb_crop.c:236 msgid "frame" msgstr "影格" #: ../src/tb_crop.c:291 #, c-format msgid "%s range:" msgstr "%s 範åœï¼š" #: ../src/tb_crop.c:319 msgid "(mm)" msgstr "(å…¬é‡)" #. widget to tell you the internal data format #: ../src/tb_crop.c:390 msgid "Current Data Format:" msgstr "ç›®å‰çš„資料格å¼ï¼š" #. widget to tell you the scaling format #: ../src/tb_crop.c:403 msgid "Current Scale Format:" msgstr "ç›®å‰çš„伸縮格å¼ï¼š" #. widget to tell you the internal data format #: ../src/tb_crop.c:422 msgid "Output Data Format:" msgstr "輸出資料格å¼ï¼š" #. widget to tell you the scaling format #: ../src/tb_crop.c:435 msgid "Output Scale Format:" msgstr "輸出伸縮格å¼ï¼š" #: ../src/tb_crop.c:992 msgid "couldn't allocate memory space for tb_crop_t" msgstr "無法é…置記憶體空間給 tb_crop_t" #: ../src/tb_crop.c:1033 ../src/tb_filter.c:429 ../src/ui_study_cb.c:56 msgid "No data set is currently marked as active" msgstr "ç›®å‰æ²’有資料集被標記為作用中" #: ../src/tb_crop.c:1076 msgid "Data Set Cropping Wizard" msgstr "資料集è£å‰ªç²¾éˆ" #: ../src/tb_export_data_set.c:111 msgid "couldn't allocate memory space for tb_export_t" msgstr "無法é…置記憶體空間給 tb_export_t" #: ../src/tb_export_data_set.c:216 ../src/tb_export_data_set.c:373 msgid "No Data Sets are current visible" msgstr "ç›®å‰æ²’有任何å¯è¦‹çš„資料集" #. the rest of this function runs the file selection dialog box #: ../src/tb_export_data_set.c:249 ../src/ui_study_cb.c:535 msgid "Export to File" msgstr "匯出至檔案" #: ../src/tb_export_data_set.c:535 #, c-format msgid "%s: Export Data Set Dialog" msgstr "%s:匯出資料集å°è©±æ¡†" #: ../src/tb_export_data_set.c:557 msgid "Exporting Data Sets" msgstr "匯出資料集" #: ../src/tb_export_data_set.c:564 msgid "Export:" msgstr "匯出:" #. tooltip N_("Export the data set in its original orientation (unresliced)") #: ../src/tb_export_data_set.c:569 #, c-format msgid "Original Orientation - %s" msgstr "åŽŸä¾†çš„æ–¹å‘ - %s" #. tooltip N_("Export the data set in its current orientation (resliced)") #: ../src/tb_export_data_set.c:580 #, c-format msgid "Resliced Orientation - %s" msgstr "釿–°åˆ‡ç‰‡æ–¹å‘ - %s" #: ../src/tb_export_data_set.c:592 msgid "All Visible Data Sets (resliced)" msgstr "所有å¯è¦‹çš„資料集 (釿–°åˆ‡ç‰‡)" #: ../src/tb_export_data_set.c:617 msgid "export format:" msgstr "匯出格å¼ï¼š" #. widgets to change the voxel size of the data set #: ../src/tb_export_data_set.c:661 msgid "voxel size (mm) [x,y,z]:" msgstr "é«”ç´ å¤§å° (å…¬é‡) [x,y,z]:" #. gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_buttons[0]),FALSE); #. gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(spin_buttons[0]), FALSE); #. gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin_buttons[0]), GTK_UPDATE_ALWAYS); #: ../src/tb_export_data_set.c:686 msgid "bounding box:" msgstr "邊界方框:" #: ../src/tb_fads.c:41 msgid "Factor Analysis Wizard" msgstr "因素分æžç²¾éˆ" #: ../src/tb_fads.c:46 msgid "" "This page allows the computation of the singular value decomposition for the data set in question. These values can give you an idea of how many important factors the data set has.\n\n" "This process can be extremely slow, so skip this page if you already know the answer." msgstr "" "這個é é¢å…許用於所æè³‡æž“集的單值分解計算。 這些值å¯ä»¥çµ¦æ‚¨æœ‰å¤šå°‘é‡è¦å› å­è³‡æ–™é›†çš„æ¦‚念。\n\n" "這個程åºå¯èƒ½æœƒæ¥µåº¦ç·©æ…¢ï¼Œå› æ­¤å¦‚果您已經知é“答案就跳éŽé€™å€‹é é¢ã€‚" #: ../src/tb_fads.c:54 msgid "When the apply button is hit, the appropriate factor analysis data structures will be created, and placed underneath the given data set in the study tree\n" msgstr "當套用按鈕被點擊時,é©ç•¶çš„因素分æžè³‡æ–™çµæ§‹å°‡è¢«å»ºç«‹ï¼Œè€Œä¸”被置放於在檢驗樹中給定的資料集之下\n" #: ../src/tb_fads.c:59 msgid "" "Welcome to the factor analysis of dynamic structures wizard. \n\n" "None of this code has been validated, and it's probably wrong, so use at your own risk" msgstr "" "æ­¡è¿Žä½¿ç”¨å‹•æ…‹çµæ§‹ç²¾éˆçš„因素分æžã€‚\n\n" "沒有任何編碼曾被驗證éŽï¼Œå› æ­¤æˆ–許是錯誤的,使用時請自負風險" #: ../src/tb_fads.c:66 msgid "" "Welcome to the factor analysis of dynamic structures wizard. \n\n" "This wizard only works with dynamic studies" msgstr "" "æ­¡è¿Žä½¿ç”¨å‹•æ…‹çµæ§‹ç²¾éˆçš„因素分æžã€‚\n\n" "這個精éˆåªé©ç”¨æ–¼å‹•態檢驗" #: ../src/tb_fads.c:154 #, c-format msgid "" "%s\n" "Method Picked: %s" msgstr "" "%s\n" "æ€å–的方法:%s" #: ../src/tb_fads.c:187 msgid "Filename for Factor Data" msgstr "å› å­è³‡æ–™æª”å" #: ../src/tb_fads.c:389 msgid "failed malloc for frames array" msgstr "é…置記憶體給影格陣列時失敗" #: ../src/tb_fads.c:394 msgid "failed malloc for vals array" msgstr "é…置記憶體給 vals 陣列時失敗" #: ../src/tb_fads.c:523 msgid "couldn't allocate memory space for tb_fads_t" msgstr "無法é…置記憶體空間給 tb_fads_t" #. do I need to compute factors? #: ../src/tb_fads.c:650 msgid "Compute Singular Values?" msgstr "計算單值?" #. ask for the fads method to use #: ../src/tb_fads.c:686 msgid "FADS Method:" msgstr "FADS 方法:" #. ask for the minimizer algorithm to use #: ../src/tb_fads.c:720 msgid "Minimization Algorithm:" msgstr "最å°åŒ–演算法:" #. max # of iterations #: ../src/tb_fads.c:735 msgid "Max. # of iterations:" msgstr "å覆é‹ç®—最大次數:" #. stopping criteria #: ../src/tb_fads.c:750 msgid "Stopping Criteria:" msgstr "åœæ­¢æº–則:" #. stopping criteria #: ../src/tb_fads.c:767 msgid "Beta:" msgstr "測試:" #. how many factors to solve for? #: ../src/tb_fads.c:782 msgid "# of Factors to use" msgstr "è¦ä½¿ç”¨çš„å› å­æ•¸é‡" #. k12 criteria #: ../src/tb_fads.c:797 msgid "initial k12 (1/s):" msgstr "åˆå§‹ k12 (1/s):" #. k21 criteria #: ../src/tb_fads.c:814 msgid "initial K21 (1/s):" msgstr "åˆå§‹ K21 (1/s):" #. A table to add blood sample measurements #: ../src/tb_fads.c:837 msgid "Add Blood Sample" msgstr "加入血液樣本" #: ../src/tb_fads.c:877 msgid "Remove Blood Sample" msgstr "移除血液樣本" #. mm #. mm #: ../src/tb_filter.c:46 msgid "Data Set Filtering Wizard" msgstr "資料集篩é¸ç²¾éˆ" #: ../src/tb_filter.c:49 msgid "When the apply button is hit, a new data set will be created and placed into the study's tree, consisting of the appropriately filtered data\n" msgstr "當套用按鈕被點擊時,新的資料集將被建立並被放入檢驗樹,而由é©ç•¶ç¯©é¸éŽçš„資料所構æˆ\n" #: ../src/tb_filter.c:55 msgid "The Gaussian filter is an effective smoothing filter" msgstr "Gaussian 篩é¸å™¨æ˜¯ä¸€ç¨®æœ‰æ•ˆçš„平滑篩é¸å™¨" #: ../src/tb_filter.c:60 msgid "" "Median filter work relatively well at preserving edges while\n" "removing speckle noise.\n\n" "This filter is the 3D median filter, so the neighborhood used for\n" "determining the median will be KSxKSxKS, KS=kernel size" msgstr "" "我的篩é¸å™¨ä½œç”¨ç›¸å°çš„地得ä¸éŒ¯æ–¼ä¿ç•™é‚Šç·£ç•¶\n" "移除斑點雜訊。\n\n" "這個篩é¸å™¨æ˜¯ 3D 我的篩é¸å™¨ï¼Œå› è€Œ neighborhood 用於\n" "決定我的將是 KSxKSxKS,KS=內核大å°" #: ../src/tb_filter.c:67 msgid "" "Median filters work relatively well at preserving edges while\n" "removing speckle noise.\n\n" "This filter is the 1D median filter, so the neighboorhood used for\n" "determining the median will be of the given kernel size, and the\n" "data set will be filtered 3x (once for each direction)." msgstr "" "中值篩é¸å™¨å°±ä¿ç•™é‚Šç·£å€¼åŒæ™‚移除斑點雜訊\n" "來說相å°è¡¨ç¾ä¸éŒ¯ã€‚\n\n" "這個篩é¸å™¨æ˜¯ 1D 中值篩é¸å™¨ï¼Œå› æ­¤ç”¨æ–¼\n" "決定中值的鄰值將是給定的內核大å°ï¼Œè€Œ\n" "資料集將被篩é¸ä¸‰æ¬¡ (æ¯å€‹æ–¹å‘一次)。" #: ../src/tb_filter.c:76 msgid "" "This filter requires support from the GNU Scientific Library (GSL).\n" "This version of AMIDE has not been compiled with GSL support enabled." msgstr "" "這個篩é¸å™¨éœ€è¦ä¾†è‡ª GNU 科學函å¼åº« (GSL) 的支æ´ã€‚\n" "這個版本的 AMIDE 編譯時並未啟用 GSL 支æ´ã€‚" #: ../src/tb_filter.c:282 msgid "couldn't allocate memory space for tb_filter_t" msgstr "無法é…置記憶體空間給 tb_filter_t" #: ../src/tb_filter.c:315 msgid "Which Filter" msgstr "何種篩é¸å™¨" #. the kernel selection #: ../src/tb_filter.c:343 ../src/tb_filter.c:394 msgid "Kernel Size" msgstr "內核大å°" #: ../src/tb_filter.c:360 msgid "FWHM (mm)" msgstr "FWHM (å…¬é‡)" #. the rest of this function runs the file selection dialog box #: ../src/tb_fly_through.c:308 ../src/ui_render_movie.c:236 msgid "Output MPEG As" msgstr "輸出 MPEG 為" #: ../src/tb_fly_through.c:479 #, c-format msgid "encoding of frame %d failed" msgstr "影格 %d 編碼時失敗" #: ../src/tb_fly_through.c:630 msgid "couldn't allocate memory space for tb_fly_through_t" msgstr "無法é…置記憶體空間給 tb_fly_through_t" #: ../src/tb_fly_through.c:694 msgid "Fly Through Generation" msgstr "產生掃視" #: ../src/tb_fly_through.c:697 msgid "_Generate Fly Through" msgstr "產生掃視(_G)" #: ../src/tb_fly_through.c:716 msgid "Current Position (mm):" msgstr "ç¾è¡Œä½ç½® (å…¬é‡):" #: ../src/tb_fly_through.c:726 msgid "Start Position (mm):" msgstr "é–‹å§‹ä½ç½® (å…¬é‡):" #: ../src/tb_fly_through.c:741 msgid "End Position (mm):" msgstr "çµæŸä½ç½® (å…¬é‡):" #: ../src/tb_fly_through.c:756 msgid "Movie Duration (sec):" msgstr "影片æŒçºŒæ™‚é–“ (sec):" #: ../src/tb_fly_through.c:774 msgid "Fly through movie generation" msgstr "產生掃視影片" #: ../src/tb_fly_through.c:785 msgid "Set Start Position" msgstr "設定開始ä½ç½®" #: ../src/tb_fly_through.c:790 msgid "Set End Position" msgstr "è¨­å®šçµæŸä½ç½®" #. do we want to make a movie over time or over frames #: ../src/tb_fly_through.c:848 ../src/ui_render_movie.c:702 msgid "Dynamic Movie:" msgstr "動態影片:" #. the radio buttons #: ../src/tb_fly_through.c:859 ../src/ui_render_movie.c:713 msgid "No" msgstr "å¦" #: ../src/tb_fly_through.c:866 ../src/ui_render_movie.c:718 msgid "over time" msgstr "經由時間" #: ../src/tb_fly_through.c:870 ../src/ui_render_movie.c:722 msgid "over frames" msgstr "經由影格" #: ../src/tb_fly_through.c:882 ../src/ui_render_movie.c:732 msgid "over frames smoothed" msgstr "經由影格平滑化" #: ../src/tb_fly_through.c:888 ../src/ui_render_movie.c:736 msgid "over gates" msgstr "經由閘å£" #. widgets to specify the start and end times #: ../src/tb_fly_through.c:908 ../src/ui_render_movie.c:748 msgid "Start Time (s)" msgstr "開始時間 (ç§’)" #: ../src/tb_fly_through.c:911 ../src/ui_render_movie.c:751 msgid "Start Frame" msgstr "開始影格" #: ../src/tb_fly_through.c:938 ../src/ui_render_movie.c:778 msgid "End Time (s)" msgstr "çµæŸæ™‚é–“ (ç§’)" #: ../src/tb_fly_through.c:941 ../src/ui_render_movie.c:781 msgid "End Frame" msgstr "çµæŸå½±æ ¼" #: ../src/tb_fly_through.c:969 ../src/ui_render_movie.c:810 msgid "Display time on image" msgstr "在影åƒä¸Šé¡¯ç¤ºæ™‚é–“" #: ../src/tb_math.c:37 msgid "There is only one data set in this study. There needs to be at least two data sets to perform mathematical operations" msgstr "åœ¨é€™å€‹æª¢é©—ä¸­åªæœ‰ä¸€å€‹è³‡æ–™é›†ã€‚ 需è¦è‡³å°‘兩個資料集以施行數學計算" #: ../src/tb_math.c:41 msgid "" "Welcome to the data set math wizard, used for performing mathematical operations between medical image data sets.\n\n" "Note - you will get more pleasing results if the data sets in question are set to trilinear interpolation mode." msgstr "" "歡迎使用資料集數學精éˆï¼Œç”¨æ–¼åœ¨é†«å­¸å½±åƒè³‡æ–™é›†ä¹‹é–“施行數學計算。\n\n" "註記 - å¦‚æžœç”¨åˆ°çš„è³‡æ–™é›†è¢«è¨­å®šç‚ºä¸‰ç·šæ€§å…§æ’æ¨¡å¼ï¼Œæ‚¨å°‡æœƒå¾—åˆ°æ›´ä½³çš„çµæžœã€‚" #: ../src/tb_math.c:277 #, c-format msgid "A new data set will be created with the math operation, press Finish to calculate this data set, or Cancel to quit." msgstr "新的資料集將以數學é‹ç®—建立,按下完æˆå°‡æœƒè¨ˆç®—é€™å€‹è³‡æ–™é›†ï¼Œæˆ–æ˜¯æŒ‰ä¸‹å–æ¶ˆä»¥é›¢é–‹ã€‚" #: ../src/tb_math.c:309 msgid "Math operation failed - results not added to study" msgstr "數學é‹ç®—失敗 - çµæžœæœªåŠ å…¥æª¢é©—" #: ../src/tb_math.c:386 msgid "couldn't allocate memory space for tb_math_t" msgstr "無法é…置記憶體空間給 tb_math_t" #: ../src/tb_math.c:419 msgid "Data Set 1:" msgstr "資料集 1:" #: ../src/tb_math.c:442 msgid "Data Set 2:" msgstr "資料集 2:" #: ../src/tb_math.c:474 msgid "Math Operation" msgstr "數學é‹ç®—" #: ../src/tb_math.c:533 msgid "Data Set Math Wizard" msgstr "資料集數學精éˆ" #: ../src/tb_math.c:550 msgid "Operation Selection" msgstr "é‹ç®—鏿“‡" #: ../src/tb_profile.c:223 msgid "couldn't allocate memory space for tb_profile_t" msgstr "無法é…置記憶體空間給 tb_profile_t" #: ../src/tb_profile.c:257 #, c-format msgid "# Profiles on Study: %s\tGenerated on: %s" msgstr "# 檢驗輪廓檔:%s\t產生於:%s" #: ../src/tb_profile.c:262 #, c-format msgid "" "#\n" "# Profile on: %s\n" msgstr "" "#\n" "# 輪廓檔於:%s\n" #: ../src/tb_profile.c:266 msgid "# Gaussian Fit: b + p * e^(-0.5*(x-c)^2/s^2)\n" msgstr "# Gaussian 擬åˆï¼šb + p * e^(-0.5*(x-c)^2/s^2)\n" #: ../src/tb_profile.c:267 #, c-format msgid "#\titerations used %d, status %s\n" msgstr "#\tå覆é‹ç®—已用 %d,狀態 %s\n" #: ../src/tb_profile.c:270 ../src/tb_profile.c:275 ../src/tb_profile.c:823 #: ../src/tb_profile.c:826 msgid "(fixed)" msgstr "(固定)" #: ../src/tb_profile.c:286 msgid "# x\tvalue\n" msgstr "# x\t數值\n" #. the rest of this function runs the file selection dialog box #: ../src/tb_profile.c:315 msgid "Export Profile" msgstr "匯出輪廓檔" #: ../src/tb_profile.c:366 #, c-format msgid "couldn't open: %s for writing profiles" msgstr "無法開啟:%s 以寫入輪廓檔" #. write out the gaussian equation #: ../src/tb_profile.c:778 msgid "fit = b + p * e^(-0.5*(x-c)^2/s^2)" msgstr "æ“¬åˆ = b + p * e^(-0.5*(x-c)^2/s^2)" #: ../src/tb_profile.c:812 #, c-format msgid "" "\n\n" "gaussian fit on: %s\n" "iterations used %d, status %s\n" "b = %.5g +/- %.5g %s\n" "p = %.5g +/- %.5g\n" "c = %.5g +/- %.5g mm %s\n" "s = %.5g +/- %.5g\n" "fwhm = %.5g +/- %.5g mm\n" "fwtm = %.5g +/- %.5g mm" msgstr "" "\n\n" "gaussian æ“¬åˆæ–¼ï¼š%s\n" "å覆é‹ç®—已用 %d,狀態 %s\n" "b = %.5g +/- %.5g %s\n" "p = %.5g +/- %.5g\n" "c = %.5g +/- %.5g å…¬é‡ %s\n" "s = %.5g +/- %.5g\n" "fwhm = %.5g +/- %.5g å…¬é‡\n" "fwtm = %.5g +/- %.5g å…¬é‡" #. start setting up the widget we'll display the info from #: ../src/tb_profile.c:1181 #, c-format msgid "%s Profile Tool: Study %s" msgstr "%s 輪廓檔工具:檢驗 %s" #. which view do we want the profile on #: ../src/tb_profile.c:1215 msgid "Line Profile on:" msgstr "曲線輪廓於:" #. changing the angle #: ../src/tb_profile.c:1246 msgid "Angle (degrees):" msgstr "角度 (度):" #: ../src/tb_roi_analysis.c:83 msgid "ROI" msgstr "ROI" #: ../src/tb_roi_analysis.c:84 ../src/ui_time_dialog.c:62 msgid "Data Set" msgstr "資料集" #: ../src/tb_roi_analysis.c:87 msgid "Midpt (s)" msgstr "Midpt (ç§’)" #: ../src/tb_roi_analysis.c:88 msgid "Gate" msgstr "é–˜å£" #. N_("Total"), #: ../src/tb_roi_analysis.c:90 msgid "Median" msgstr "中值" #: ../src/tb_roi_analysis.c:91 msgid "Mean" msgstr "å¹³å‡" #: ../src/tb_roi_analysis.c:92 msgid "Var" msgstr "Var" #: ../src/tb_roi_analysis.c:93 msgid "Std Dev" msgstr "Std Dev" #: ../src/tb_roi_analysis.c:96 msgid "Size (mm^3)" msgstr "å¤§å° (å…¬é‡^3)" #: ../src/tb_roi_analysis.c:97 msgid "Frac. Voxels" msgstr "體素æˆåˆ†" #: ../src/tb_roi_analysis.c:98 msgid "Voxels" msgstr "體素" #: ../src/tb_roi_analysis.c:139 msgid "Export Statistics" msgstr "匯出統計資訊" #: ../src/tb_roi_analysis.c:139 msgid "Export ROI Raw Data Values" msgstr "匯出 ROI 原始資料值" #: ../src/tb_roi_analysis.c:152 msgid "roi_raw_data" msgstr "roi_raw_data" #: ../src/tb_roi_analysis.c:152 msgid "analysis" msgstr "分æž" #: ../src/tb_roi_analysis.c:197 #, c-format msgid "couldn't open: %s for writing roi data" msgstr "無法開啟:%s 用於寫入 roi 資料" #: ../src/tb_roi_analysis.c:203 #, c-format msgid "# %s: ROI Analysis File - generated on %s" msgstr "# %s:ROI åˆ†æžæª”案 - 產生於 %s" #: ../src/tb_roi_analysis.c:205 #, c-format msgid "# Study:\t%s\n" msgstr "# 檢驗:\t%s\n" #: ../src/tb_roi_analysis.c:209 #, c-format msgid "# ROI:\t%s\tType:\t%s" msgstr "# ROI:\t%s\t類型:\t%s" #: ../src/tb_roi_analysis.c:214 #, c-format msgid "\tIsocontour Above Value:\t%g" msgstr "\t數值之上的輪廓é¢ï¼š\t%g" #: ../src/tb_roi_analysis.c:216 #, c-format msgid "\tIsocontour Below Value:\t%g" msgstr "\t數值之下的輪廓é¢ï¼š\t%g" #. AMITK_ROI_ISOCONTOUR_RANGE_BETWEEN_MIN_MAX #: ../src/tb_roi_analysis.c:218 #, c-format msgid "\tIsocontour Between Values:\t%g %g" msgstr "\t數值之間的輪廓é¢ï¼š\t%g %g" #: ../src/tb_roi_analysis.c:227 #, c-format msgid "# Calculation done with all voxels in ROI\n" msgstr "# 在 ROI 中的所有體素已經計算完畢\n" #: ../src/tb_roi_analysis.c:230 #, c-format msgid "# Calculation done on %5.3f percentile of voxels in ROI\n" msgstr "# 在 ROI 中的 %5.3f 體素已經計算完畢\n" #: ../src/tb_roi_analysis.c:233 #, c-format msgid "# Calculation done on voxels >= %5.3f percent of maximum value in ROI\n" msgstr "# 在 ROI 中 >= %5.3f 最大值的體素已經計算完畢\n" #: ../src/tb_roi_analysis.c:236 #, c-format msgid "# Calculation done on voxels >= %g in ROI\n" msgstr "# 在 ROI 中 >= %g 的體素已經計算完畢\n" #: ../src/tb_roi_analysis.c:248 #, c-format msgid "# Data Set:\t%s\tScaling Factor:\t%g\n" msgstr "# 資料集:\t%s\t縮放因å­ï¼š\t%g\n" #: ../src/tb_roi_analysis.c:255 #, c-format msgid "# Output Data Units: %s\n" msgstr "# 輸出資料單ä½ï¼š%s\n" #: ../src/tb_roi_analysis.c:257 #, c-format msgid "# Injected Dose: %g [%s]\n" msgstr "# 注射劑é‡ï¼š%g [%s]\n" #: ../src/tb_roi_analysis.c:261 #, c-format msgid "# Cylinder Factor: %g [%s]\n" msgstr "# 柱é¢å› å­ï¼š%g [%s]\n" #: ../src/tb_roi_analysis.c:272 #, c-format msgid "# Subject Weight: %g [%s]\n" msgstr "# 主題é‡é‡ï¼š%g [%s]\n" #: ../src/tb_roi_analysis.c:359 #, c-format msgid "# Stats for Study: %s\tGenerated on: %s" msgstr "# 檢驗統計資訊:%s\t產生於:%s" #: ../src/tb_roi_analysis.c:535 msgid "ROI Statistics" msgstr "ROI 統計資訊" #. tell us the type #: ../src/tb_roi_analysis.c:547 msgid "type:" msgstr "類型:" #: ../src/tb_roi_analysis.c:749 msgid "couldn't allocate memory space for tb_roi_analysis_t" msgstr "無法é…置記憶體空間給 tb_roi_analysis_t" #: ../src/tb_roi_analysis.c:793 msgid "No Data Sets selected for calculating analyses" msgstr "未é¸å–任何資料集用於計算分æž" #: ../src/tb_roi_analysis.c:805 msgid "No ROI's selected for calculating analyses" msgstr "未é¸å–任何 ROI 用於計算分æž" #. start setting up the widget we'll display the info from #: ../src/tb_roi_analysis.c:819 #, c-format msgid "%s Roi Analysis: Study %s" msgstr "%s Roi 分æžï¼šæª¢é©— %s" #: ../src/tb_roi_analysis.c:959 #, c-format msgid "%s: ROI Analysis Initialization Dialog" msgstr "%s:ROI 分æžåˆå§‹åŒ–å°è©±æ¡†" #: ../src/tb_roi_analysis.c:979 msgid "Calculate:" msgstr "計算:" #: ../src/tb_roi_analysis.c:982 msgid "All ROIS:" msgstr "所有 ROIS:" #: ../src/tb_roi_analysis.c:985 msgid "Selected ROIS:" msgstr "å·²é¸ ROIS:" #: ../src/tb_roi_analysis.c:990 msgid "On All Data Sets:" msgstr "於所有資料集:" #: ../src/tb_roi_analysis.c:1008 msgid "On Selected Data Sets:" msgstr "於已é¸è³‡æ–™é›†ï¼š" #. do we want to calculate over a subfraction #: ../src/tb_roi_analysis.c:1047 msgid "Calculate over all voxels (normal):" msgstr "å°æ‰€æœ‰é«”素進行計算 (一般):" #. do we want to calculate over a subfraction #: ../src/tb_roi_analysis.c:1058 #, c-format msgid "Calculate over % highest voxels:" msgstr "å°æœ€é«˜é«”素百分比進行計算:" #. do we want to calculate over a percentage of max #: ../src/tb_roi_analysis.c:1082 #, c-format msgid "Calculate for voxels >= % of Max:" msgstr "å°é«”ç´  >= 最大值百分比進行計算:" #. do we want to calculate over a percentage of max #: ../src/tb_roi_analysis.c:1106 msgid "Calculate for voxels >= Value:" msgstr "å°é«”ç´  >= æŸå€¼é€²è¡Œè¨ˆç®—:" #. do we want more accurate quantitation #: ../src/tb_roi_analysis.c:1146 msgid "More Accurate Quantitation (Slow)" msgstr "更多正確é‡åŒ– (æ…¢)" #. Help menu #: ../src/ui_common.c:72 msgid "_Contents" msgstr "內容(_C)" #: ../src/ui_common.c:72 msgid "Open the AMIDE manual" msgstr "開啟 AMIDE 手冊" #: ../src/ui_common.c:73 msgid "About AMIDE" msgstr "關於 AMIDE" #: ../src/ui_common.c:87 msgid "Solid" msgstr "純色" #: ../src/ui_common.c:88 msgid "On/Off" msgstr "é–‹/é—œ" #: ../src/ui_common.c:89 msgid "Double Dash" msgstr "雙破折號" #: ../src/ui_common.c:116 msgid "AMIDE's a Medical Image Data Examiner\n" msgstr "AMIDE 醫學影åƒè³‡æ–™å¯©è¦–器\n" #: ../src/ui_common.c:118 msgid "Email bug reports to: " msgstr "將錯誤以電å­éƒµä»¶å›žå ±çµ¦ï¼š" #: ../src/ui_common.c:121 msgid "Compiled with support for the following libraries:\n" msgstr "編譯時已支æ´ä¸‹åˆ—函å¼åº«ï¼š\n" #: ../src/ui_common.c:124 msgid "libecat: CTI File library by Merence Sibomona\n" msgstr "libecat:CTI 檔案函å¼åº«ä¾†è‡ª Merence Sibomona\n" #: ../src/ui_common.c:127 msgid "libgsl: GNU Scientific Library by the GSL Team (version " msgstr "libgsl:GNU 科學函å¼åº«ä¾†è‡ª GSL 團隊 (版本 " #: ../src/ui_common.c:130 msgid "libmdc: Medical Imaging File library by Erik Nolf (version " msgstr "libmdcï¼šé†«å­¸å½±åƒæª”案函å¼åº«ä¾†è‡ª Erik Nolf (版本 " #: ../src/ui_common.c:133 msgid "libdcmdata: OFFIS DICOM Toolkit DCMTK (C) 1993-2004, OFFIS e.V. (version " msgstr "libdcmdata:OFFIS DICOM 工具組 DCMTK ©1993-2004, OFFIS e.V. (版本 " #: ../src/ui_common.c:136 msgid "libvolpack: Volume Rendering library by Philippe Lacroute (version " msgstr "libvolpackï¼šé«”ç©æ½¤ç®—函å¼åº«ä¾†è‡ª Philippe Lacroute (版本 " #: ../src/ui_common.c:139 msgid "libavcodec: media encoding library by the FFMPEG Team (version " msgstr "libavcodec:媒體編碼函å¼åº«ä¾†è‡ª FFMPEG 團隊 (版本 " #: ../src/ui_common.c:142 msgid "libfame: Fast Assembly Mpeg Encoding library by the FAME Team (version " msgstr "libfame:快速組譯 Mpeg 編碼函å¼åº«ä¾†è‡ª FAME 團隊 (版本 " #. widgets to change the roi's size #: ../src/ui_common.c:397 msgid "ROI Width (pixels)" msgstr "ROI 寬度 (åƒç´ )" #. widgets to change the roi's line style #. Anti-aliased canvas doesn't yet support this #. also need to remove #ifndef for relevant lines in amitk_canvas_object.c #: ../src/ui_common.c:454 msgid "ROI Line Style:" msgstr "ROI ç·šæ¢æ¨£å¼ï¼š" #. do we want to fill in isocontour roi's #: ../src/ui_common.c:471 msgid "Draw Isocontours/Freehands Filled:" msgstr "繪製輪廓é¢/手繪填滿:" #: ../src/ui_common.c:491 msgid "Canvas Layout:" msgstr "畫布版é¢é…置:" #: ../src/ui_common.c:520 msgid "Multiple Canvases Layout:" msgstr "多é‡ç•«å¸ƒç‰ˆé¢é…置:" #. do we want the size of the canvas to not resize #: ../src/ui_common.c:562 msgid "Maintain view size constant:" msgstr "ä¿æŒæª¢è¦–大å°å¸¸æ•¸ï¼š" #. widgets to change the amount of empty space in the center of the target #: ../src/ui_common.c:575 msgid "Target Empty Area (pixels)" msgstr "目標清空å€åŸŸ (åƒç´ )" #: ../src/ui_common.c:764 msgid "Request Dialog" msgstr "è¦æ±‚å°è©±æ¡†" #: ../src/ui_gate_dialog.c:43 msgid "Gate #" msgstr "é–˜å£ #" #: ../src/ui_gate_dialog.c:340 #, c-format msgid "%s: Gate Dialog" msgstr "%s:閘å£å°è©±æ¡†" #: ../src/ui_gate_dialog.c:361 msgid "Start Gate" msgstr "é–‹å§‹é–˜å£" #: ../src/ui_gate_dialog.c:378 msgid "End Gate" msgstr "çµæŸé–˜å£" #: ../src/ui_preferences_dialog.c:39 msgid "" "These preferences are used only for new studies. \n" "Use the study modification dialog to change these \n" "parameters for the current study." msgstr "" "這些å好設定åªç”¨æ–¼æ–°çš„æª¢é©—。\n" "使用檢驗修改å°è©±æ¡†ä»¥å°ç›®å‰æª¢é©—\n" "è®Šæ›´é€™äº›åƒæ•¸ã€‚" #: ../src/ui_preferences_dialog.c:44 msgid "" "These preferences are used only for new data sets. \n" "Use the data set modification dialog to change these \n" "parameters for the current data set." msgstr "" "這些å好設定åªç”¨æ–¼æ–°çš„資料集。\n" "使用資料集修改å°è©±æ¡†ä»¥å°ç›®å‰è³‡æ–™é›†\n" "è®Šæ›´é€™äº›åƒæ•¸ã€‚" #: ../src/ui_preferences_dialog.c:302 #, c-format msgid "%s: Preferences Dialog" msgstr "%s:å好設定å°è©±æ¡†" #: ../src/ui_preferences_dialog.c:412 msgid "Thresholding" msgstr "臨界處ç†" #: ../src/ui_preferences_dialog.c:476 msgid "Default Color Tables" msgstr "é è¨­é¡è‰²è¡¨æ ¼" #. color table selector #: ../src/ui_preferences_dialog.c:483 #, c-format msgid "default %s color table:" msgstr "é è¨­ %s é¡è‰²è¡¨æ ¼ï¼š" #: ../src/ui_preferences_dialog.c:513 msgid "Miscellaneous" msgstr "雜項" #: ../src/ui_preferences_dialog.c:517 msgid "Send Warning Messages to Console:" msgstr "發é€è­¦å‘Šè¨Šæ¯åˆ°ä¸»æŽ§è‡ºï¼š" #: ../src/ui_preferences_dialog.c:532 msgid "Prompt for \"Save Changes\" on Exit:" msgstr "離開時æç¤ºã€Œå„²å­˜è®Šæ›´ã€ï¼š" #: ../src/ui_preferences_dialog.c:547 msgid "Which Default Directory:" msgstr "何項é è¨­ç›®éŒ„:" #: ../src/ui_preferences_dialog.c:565 msgid "Specified Directory:" msgstr "指定目錄:" #: ../src/ui_preferences_dialog.c:570 msgid "Default Directory:" msgstr "é è¨­ç›®éŒ„:" #: ../src/ui_render.c:369 msgid "Export File" msgstr "匯出檔案" #: ../src/ui_render.c:408 ../src/ui_series.c:255 ../src/ui_study_cb.c:394 #: ../src/ui_study_cb.c:611 #, c-format msgid "Failure Saving File: %s" msgstr "儲存檔案失敗:%s" #: ../src/ui_render.c:411 ../src/ui_render_movie.c:526 #: ../src/ui_study_cb.c:602 msgid "Canvas failed to return a valid image\n" msgstr "畫布無法回傳有效影åƒ\n" #. Toplevel #: ../src/ui_render.c:475 ../src/ui_series.c:369 ../src/ui_study.c:333 msgid "_File" msgstr "檔案(_F)" #: ../src/ui_render.c:476 ../src/ui_study.c:334 msgid "_Edit" msgstr "編輯(_E)" #: ../src/ui_render.c:477 ../src/ui_series.c:370 ../src/ui_study.c:337 msgid "_Help" msgstr "求助(_H)" #. File menu #: ../src/ui_render.c:480 msgid "_Export Rendering" msgstr "匯出潤算(_E)" #: ../src/ui_render.c:480 msgid "Export the rendered image" msgstr "匯出潤算的影åƒ" #: ../src/ui_render.c:482 msgid "_Create Movie" msgstr "建立影片(_C)" #: ../src/ui_render.c:482 msgid "Create a movie out of a sequence of renderings" msgstr "建立超出潤算åºåˆ—的影片" #: ../src/ui_render.c:484 msgid "Close the rendering dialog" msgstr "關閉潤算å°è©±æ¡†" #. Edit menu #: ../src/ui_render.c:487 msgid "_Rendering Parameters" msgstr "æ½¤ç®—åƒæ•¸(_R)" #: ../src/ui_render.c:487 msgid "Adjust parameters pertinent to the rendered image" msgstr "èª¿æ•´èˆ‡æ½¤ç®—å½±åƒæœ‰é—œçš„åƒæ•¸" #. Toolbar items #: ../src/ui_render.c:490 msgid "X-fer" msgstr "X-fer" #: ../src/ui_render.c:490 msgid "Opacity and density transfer functions" msgstr "æ¿åº¦å’Œå¯†åº¦è½‰æ›å‡½å¼" #: ../src/ui_render.c:494 msgid "Mono" msgstr "å¹³é¢" #: ../src/ui_render.c:494 msgid "Monoscopic rendering" msgstr "å¹³é¢å½±åƒæ½¤ç®—" #: ../src/ui_render.c:495 msgid "Stereo" msgstr "ç«‹é«”" #: ../src/ui_render.c:495 msgid "Stereoscopic rendering" msgstr "ç«‹é«”å½±åƒæ½¤ç®—" #. add the zoom widget to our toolbar #: ../src/ui_render.c:570 ../src/ui_study.c:675 msgid "zoom:" msgstr "縮放:" #: ../src/ui_render.c:581 msgid "specify how much to magnify the rendering" msgstr "指定放大潤算多少" #: ../src/ui_render.c:673 msgid "couldn't allocate memory space for ui_render_t" msgstr "無法é…置記憶體空間給 ui_render_t" #: ../src/ui_render.c:894 msgid "Rendering Window" msgstr "潤算視窗" #. button to reset the axis #: ../src/ui_render.c:983 msgid "Reset Axis" msgstr "é‡ç½®è»¸ç·š" #: ../src/ui_render.c:1039 #, c-format msgid "%s: Rendering Initialization Dialog" msgstr "%s:潤算åˆå§‹åŒ–å°è©±æ¡†" #. do we want to strip values #: ../src/ui_render.c:1075 msgid "Set values greater than max. threshold to zero?" msgstr "設定大於最大臨界值者為零?" #. do we want to converse memory #: ../src/ui_render.c:1083 msgid "Accelerate Rendering? Increases memory use ~3x" msgstr "加速潤算? 增加記憶體使用約三å€" #. do we want the initial opacities to be only density dependent #: ../src/ui_render.c:1091 msgid "Initial opacity functions only density dependent?" msgstr "åˆå§‹æ¿åº¦å‡½å¼åªç›¸ä¾æ–¼å¯†åº¦ï¼Ÿ" #: ../src/ui_render_dialog.c:323 msgid "couldn't allocate memory space for ramp x" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦æ–œé¢ x" #: ../src/ui_render_dialog.c:328 msgid "couldn't allocate memory space for ramp y" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦æ–œé¢ y" #: ../src/ui_render_dialog.c:419 msgid "Failed to Allocate Memory for Ramp" msgstr "é…ç½®è¨˜æ†¶é«”çµ¦æ–œé¢æ™‚失敗" #: ../src/ui_render_dialog.c:465 #, c-format msgid "%s: Rendering Parameters Dialog" msgstr "%sï¼šæ½¤ç®—åƒæ•¸å°è©±æ¡†" #. widgets to change the quality versus speed of rendering #: ../src/ui_render_dialog.c:488 msgid "Speed versus Quality" msgstr "速度å°å“質" #. allow rendering to be click and drag #: ../src/ui_render_dialog.c:505 msgid "update without button release" msgstr "更新而ä¸éœ€æ”¾é–‹æŒ‰éˆ•" #. widget for the stereo eye angle #: ../src/ui_render_dialog.c:520 msgid "Stereo Angle" msgstr "立體角度" #. widget for the stereo eye width #: ../src/ui_render_dialog.c:534 msgid "Eye Width (mm)" msgstr "眼寬 (å…¬é‡)" #. the depth cueing enabling button #: ../src/ui_render_dialog.c:556 msgid "enable/disable depth cueing" msgstr "啟用/åœç”¨æ™¯æ·±æš—示 " #: ../src/ui_render_dialog.c:564 msgid "Front Factor" msgstr "æ­£é¢å› å­" #: ../src/ui_render_dialog.c:577 msgid "Density" msgstr "密度" #: ../src/ui_render_dialog.c:618 #, c-format msgid "%s: Transfer Function Dialog" msgstr "%s:轉æ›å‡½å¼å°è©±æ¡†" #. widgets to change the returned pixel type of the rendering #: ../src/ui_render_dialog.c:644 msgid "Return Type" msgstr "回傳類型" #. color table selector #: ../src/ui_render_dialog.c:659 msgid "color table:" msgstr "é¡è‰²è¡¨æ ¼ï¼š" #: ../src/ui_render_dialog.c:686 msgid "" "Density\n" "Dependent\n" "Opacity" msgstr "" "密度\n" "相ä¾\n" "æ¿åº¦" #. gradient classification #: ../src/ui_render_dialog.c:688 msgid "" "Gradient\n" "Dependent\n" "Opacity" msgstr "" "梯度\n" "相ä¾\n" "æ¿åº¦" #. GTK no longer has a way to detect automatically when the GtkCurve has been changed, #. user will now have to explicitly change #: ../src/ui_render_dialog.c:712 msgid "Apply Curve Changes" msgstr "套用曲線變更" #: ../src/ui_render_movie.c:380 msgid "couldn't allocate memory space for ui_render_movie_t" msgstr "無法é…置記憶體空間給 ui_render_movie_t" #: ../src/ui_render_movie.c:621 #, c-format msgid "%s: Rendering Movie Generation Dialog" msgstr "%s:潤算影片產生å°è©±æ¡†" #: ../src/ui_render_movie.c:627 msgid "_Generate Movie" msgstr "產生影片(_G)" #. widgets to specify how many frames #: ../src/ui_render_movie.c:649 msgid "Movie Duration (sec)" msgstr "影片æŒçºŒæ™‚é–“ (ç§’)" #: ../src/ui_render_movie.c:674 #, c-format msgid "Rotations on %s" msgstr "旋轉於 %s" #: ../src/ui_render_movie.c:825 msgid "Rendered Movie Progress" msgstr "潤算影片進度" #: ../src/ui_series.c:47 msgid "over Space" msgstr "經由空間" #: ../src/ui_series.c:48 msgid "over Time" msgstr "經由時間" #: ../src/ui_series.c:49 msgid "over Gates" msgstr "經由閘å£" #: ../src/ui_series.c:53 msgid "Look at a series of images over a spatial dimension" msgstr "經由空間維度查看系列影åƒ" #: ../src/ui_series.c:54 msgid "Look at a series of images over time" msgstr "經由時間維度查看系列影åƒ" #: ../src/ui_series.c:55 msgid "Look at a series of images over gates" msgstr "ç¶“ç”±é–˜å£æŸ¥çœ‹ç³»åˆ—å½±åƒ" #: ../src/ui_series.c:184 msgid "Export to Image" msgstr "匯出為影åƒ" #: ../src/ui_series.c:250 msgid "ui_series canvas failed to return a valid image" msgstr "ui_series 畫布無法回傳有效影åƒ" #: ../src/ui_series.c:309 msgid "No data sets to threshold\n" msgstr "沒有任何資料集å¯ä»¥è‡¨ç•Œè™•ç†\n" #. File menu #: ../src/ui_series.c:373 msgid "_Export Series" msgstr "匯出系列(_E)" #: ../src/ui_series.c:373 msgid "Export the series to a JPEG image file" msgstr "匯出系列為 JPEG åœ–åƒæª”案" #: ../src/ui_series.c:374 msgid "Close the series dialog" msgstr "關閉系列å°è©±æ¡†" #. Toolbar items #: ../src/ui_series.c:377 msgid "Threshold" msgstr "臨界值" #: ../src/ui_series.c:377 msgid "Set the thresholds and colormaps for the data sets in the series view" msgstr "設定用於系列檢視中資料集的臨界值和é¡è‰²å°ç…§è¡¨" #: ../src/ui_series.c:556 msgid "couldn't allocate memory space for ui_series_t" msgstr "無法é…置記憶體空間給 ui_series_t" #: ../src/ui_series.c:674 #, c-format msgid "Slicing for series" msgstr "用於系列檢視的切片" #: ../src/ui_series.c:681 msgid "couldn't allocate memory space for pointers to image GnomeCanvasItem's" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦å½±åƒ GnomeCanvasItem 的指標" #: ../src/ui_series.c:686 msgid "couldn't allocate memory space for pointers to caption GnomeCanvasItem's" msgstr "無法é…ç½®è¨˜æ†¶é«”ç©ºé–“çµ¦é¡Œè¦ GnomeCanvasItem 的指標" #: ../src/ui_series.c:691 msgid "couldn't allocate memory space for pointers to GnomeCanavasItem lists" msgstr "無法é…置記憶體空間給 GnomeCanavasItem 清單的指標" #: ../src/ui_series.c:965 #, c-format msgid "Series: %s (%s - %s)" msgstr "系列:%s (%s - %s)" #: ../src/ui_series.c:987 msgid "Need selected objects to create a series" msgstr "需è¦å·²é¸ç‰©ä»¶ä»¥å»ºç«‹ç³»åˆ—" #: ../src/ui_series.c:1057 msgid "Need selected data sets to generate a series of slices over time" msgstr "需è¦å·²é¸è³‡æ–™é›†ä»¥ç”¢ç”Ÿç¶“由時的切片系列" #: ../src/ui_series.c:1065 msgid "unable to allocate memory space for frames" msgstr "無法é…置記憶體空間給影格" #: ../src/ui_series.c:1074 msgid "unable to allocate memory for frame durations" msgstr "無法é…置記憶體給影格æŒçºŒæ™‚é–“" #: ../src/ui_series.c:1328 #, c-format msgid "%s: Series Initialization Dialog" msgstr "%s:系列åˆå§‹åŒ–å°è©±æ¡†" #. what series type do we want #: ../src/ui_series.c:1352 msgid "Series Type:" msgstr "系列類型:" #. what view type do we want #: ../src/ui_series.c:1390 msgid "View Type:" msgstr "檢視類型:" #. internal variables #: ../src/ui_study.c:46 msgid "new" msgstr "æ–°" #: ../src/ui_study.c:49 msgid "m1" msgstr "m1" #: ../src/ui_study.c:49 msgid "shift-m1" msgstr "shift-m1" #: ../src/ui_study.c:50 msgid "m2" msgstr "m2" #: ../src/ui_study.c:50 msgid "shift-m2" msgstr "shift-m2" #: ../src/ui_study.c:51 msgid "m3" msgstr "m3" #: ../src/ui_study.c:51 ../src/ui_study.c:63 msgid "shift-m3" msgstr "shift-m3" #: ../src/ui_study.c:51 msgid "ctrl-m3" msgstr "ctrl-m3" #: ../src/ui_study.c:62 msgid "ctrl-x" msgstr "ctrl-x" #. BLANK #. CANVAS_FIDUCIAL_MARK #: ../src/ui_study.c:71 ../src/ui_study.c:83 msgid "move view" msgstr "移動檢視" #: ../src/ui_study.c:71 msgid "shift data set" msgstr "平移資料集" #: ../src/ui_study.c:72 ../src/ui_study.c:84 msgid "move view, min. depth" msgstr "ç§»å‹•æª¢è¦–ï¼Œæœ€å°æ·±åº¦" #: ../src/ui_study.c:73 ../src/ui_study.c:85 msgid "change depth" msgstr "變更深度" #: ../src/ui_study.c:73 msgid "rotate data set" msgstr "旋轉資料集" #: ../src/ui_study.c:73 ../src/ui_study.c:129 msgid "add fiducial mark" msgstr "加入基準標記" #. DATA SET #. CANVAS_ROI #. STUDY #. CANVAS_ISOCONTOUR_ROI #: ../src/ui_study.c:75 ../src/ui_study.c:79 ../src/ui_study.c:87 #: ../src/ui_study.c:91 ../src/ui_study.c:121 msgid "shift" msgstr "平移" #: ../src/ui_study.c:76 msgid "scale" msgstr "伸縮" #: ../src/ui_study.c:77 ../src/ui_study.c:125 msgid "rotate" msgstr "旋轉" #: ../src/ui_study.c:77 ../src/ui_study.c:89 ../src/ui_study.c:93 msgid "set data set inside roi to zero" msgstr "設定 roi 內部資料集為零" #: ../src/ui_study.c:78 ../src/ui_study.c:90 ../src/ui_study.c:94 msgid "set data set outside roi to zero" msgstr "設定 roi 外部資料集為零" #: ../src/ui_study.c:85 msgid "rotate study" msgstr "旋轉檢驗" #: ../src/ui_study.c:88 ../src/ui_study.c:92 msgid "enter draw mode" msgstr "輸入繪製模å¼" #: ../src/ui_study.c:89 msgid "start isocontour change" msgstr "開始輪廓é¢è®Šæ›´" #. CANVAS_FREEHAND_ROI #: ../src/ui_study.c:95 msgid "draw point" msgstr "繪製點" #: ../src/ui_study.c:95 msgid "draw large point" msgstr "繪製大點" #: ../src/ui_study.c:96 msgid "leave draw mode" msgstr "離開繪製模å¼" #: ../src/ui_study.c:97 msgid "erase point" msgstr "清除點" #: ../src/ui_study.c:97 msgid "erase large point" msgstr "清除大點" #. CANVAS_DRAWING_MODE #: ../src/ui_study.c:99 msgid "move line" msgstr "移動線æ¢" #: ../src/ui_study.c:101 msgid "rotate line" msgstr "旋轉線æ¢" #. CANVAS_LINE_PROFILE #: ../src/ui_study.c:103 msgid "draw - edge-to-edge" msgstr "繪製 - 邊緣到邊緣" #: ../src/ui_study.c:104 msgid "draw - center out" msgstr "繪製 - 從中心å‘外" #. CANVAS_NEW_ROI #: ../src/ui_study.c:107 msgid "pick isocontour start point" msgstr "æ€å–輪廓é¢é–‹å§‹é»ž" #. CANVAS_NEW_ISOCONTOUR_ROI #: ../src/ui_study.c:111 msgid "pick freehand drawing start point" msgstr "æ€å–手繪開始點" #. CANVAS_NEW_FREEHAND_ROI #. CANVAS CHANGE ISOCONTOUR #. CANVAS SHIFT OBJECT #: ../src/ui_study.c:115 ../src/ui_study.c:119 ../src/ui_study.c:123 msgid "cancel" msgstr "å–æ¶ˆ" #: ../src/ui_study.c:117 msgid "pick new isocontour" msgstr "æ€å–新的輪廓é¢" #. CANVAS ROTATE OBJECT #: ../src/ui_study.c:127 msgid "select data set" msgstr "é¸å–資料集" #: ../src/ui_study.c:128 ../src/ui_study.c:140 msgid "make active" msgstr "使其作用" #: ../src/ui_study.c:129 msgid "pop up data set dialog" msgstr "彈出資料集å°è©±æ¡†" #: ../src/ui_study.c:129 ../src/ui_study.c:141 ../src/ui_study.c:145 msgid "add roi" msgstr "加入 roi" #: ../src/ui_study.c:130 msgid "delete data set" msgstr "刪除資料集" #. TREE_DATA_SET #: ../src/ui_study.c:131 msgid "select roi" msgstr "é¸å– roi" #: ../src/ui_study.c:132 msgid "center view on roi" msgstr "以 ROI 為中心的檢視" #: ../src/ui_study.c:133 msgid "pop up roi dialog" msgstr "彈出 roi å°è©±æ¡†" #: ../src/ui_study.c:134 msgid "delete roi" msgstr "刪除 roi" #. TREE_ROI #: ../src/ui_study.c:135 msgid "select point" msgstr "é¸å–點" #: ../src/ui_study.c:136 msgid "center view on point" msgstr "以點為中心的檢視" #: ../src/ui_study.c:137 msgid "pop up point dialog" msgstr "彈出點å°è©±æ¡†" #: ../src/ui_study.c:138 msgid "delete mark" msgstr "刪除標記" #: ../src/ui_study.c:141 msgid "pop up study dialog" msgstr "彈出檢驗å°è©±æ¡†" #: ../src/ui_study.c:335 msgid "_View" msgstr "檢視(_V)" #: ../src/ui_study.c:336 msgid "_Tools" msgstr "工具(_T)" #. submenus #: ../src/ui_study.c:340 msgid "Import File (_specify)" msgstr "匯入檔案 (指定類型)(_S)" #. N_("Import an image data file into this study, specifying the import type"), #: ../src/ui_study.c:342 msgid "_Export View" msgstr "匯出檢視(_E)" #. N_("Export one of the views to a picture file") #: ../src/ui_study.c:344 msgid "Add _ROI" msgstr "加入 _ROI" #: ../src/ui_study.c:347 msgid "Generate _Fly Through" msgstr "產生掃視(_F)" #. FileMenu #: ../src/ui_study.c:352 msgid "_New Study" msgstr "新檢驗(_N)" #: ../src/ui_study.c:352 msgid "Create a new study viewer window" msgstr "建立新的檢驗檢視器視窗" #: ../src/ui_study.c:353 msgid "_Open Study" msgstr "開啟檢驗(_O)" #: ../src/ui_study.c:353 msgid "Open a previously saved study (XIF file)" msgstr "開啟之å‰å„²å­˜çš„æª¢é©— (XIF 檔案)" #: ../src/ui_study.c:354 msgid "Save Study As" msgstr "儲存檢驗為" #: ../src/ui_study.c:354 msgid "Save current study (as a XIF file)" msgstr "儲存目å‰çš„æª¢é©— (å­˜æˆ XIF 檔案)" #: ../src/ui_study.c:355 msgid "Import File (guess)" msgstr "匯入檔案 (猜測類型)" #: ../src/ui_study.c:355 msgid "Import an image data file into this study, guessing at the file type" msgstr "匯入影åƒè³‡æ–™æª”案到這個檢驗,並猜測檔案類型" #: ../src/ui_study.c:356 msgid "Import _Object from Study" msgstr "從檢驗匯入物件(_O)" #: ../src/ui_study.c:356 msgid "Import an object, such as an ROI, from a preexisting study (XIF file)" msgstr "åŒ¯å…¥åƒæ˜¯ ROI 的物件自既有的檢驗 (XIF 檔案)" #: ../src/ui_study.c:357 msgid "Export _Data Set" msgstr "匯出資料集(_D)" #: ../src/ui_study.c:357 msgid "Export data set(s) to a medical image format" msgstr "åŒ¯å‡ºè³‡æ–™é›†ç‚ºé†«å­¸å½±åƒæ ¼å¼" #: ../src/ui_study.c:358 msgid "_Recover Study" msgstr "回復檢驗(_R)" #: ../src/ui_study.c:358 msgid "Try to recover a corrupted XIF file" msgstr "嘗試回復已æå£žçš„ XIF 檔案" #: ../src/ui_study.c:359 msgid "Open XIF Directory" msgstr "開啟 XIF 目錄" #: ../src/ui_study.c:359 msgid "Open a study stored in XIF directory format" msgstr "開啟以 XIF 目錄格å¼å„²å­˜çš„æª¢é©—" #: ../src/ui_study.c:360 msgid "Save As XIF Drectory" msgstr "å¦å­˜ç‚º XIF 目錄" #: ../src/ui_study.c:360 msgid "Save a study in XIF directory format" msgstr "以 XIF 目錄格å¼å„²å­˜æª¢é©—" #: ../src/ui_study.c:361 msgid "Import from XIF Directory" msgstr "從 XIF 目錄匯入" #: ../src/ui_study.c:361 msgid "Import an object, such as an ROI, from a preexisting XIF directory" msgstr "åŒ¯å…¥åƒæ˜¯ ROI 的物件自既有的 XIF 目錄" #: ../src/ui_study.c:362 msgid "Close the current study" msgstr "關閉目å‰çš„æª¢é©—" #: ../src/ui_study.c:363 msgid "Quit AMIDE" msgstr "離開 AMIDE" #. ExportView Submenu #: ../src/ui_study.c:366 ../src/ui_study.c:391 msgid "_Transverse" msgstr "橫切é¢(_T)" #: ../src/ui_study.c:366 msgid "Export the current transaxial view to an image file (JPEG/TIFF/PNG/etc.)" msgstr "匯出目å‰çš„æ©«åˆ‡é¢æª¢è¦–åˆ°å½±åƒæª”案 (JPEG/TIFF/PNG/...)" #: ../src/ui_study.c:367 ../src/ui_study.c:392 msgid "_Coronal" msgstr "冠切é¢(_C)" #: ../src/ui_study.c:367 msgid "Export the current coronal view to an image file (JPEG/TIFF/PNG/etc.)" msgstr "匯出目å‰çš„å† åˆ‡é¢æª¢è¦–åˆ°å½±åƒæª”案 (JPEG/TIFF/PNG/...)" #: ../src/ui_study.c:368 ../src/ui_study.c:393 msgid "_Sagittal" msgstr "縱切é¢(_S)" #: ../src/ui_study.c:368 msgid "Export the current sagittal view to an image file (JPEG/TIFF/PNG/etc.)" msgstr "匯出目å‰çš„ç¸±åˆ‡é¢æª¢è¦–åˆ°å½±åƒæª”案 (JPEG/TIFF/PNG/...)" #. EditMenu #: ../src/ui_study.c:371 msgid "Add _Fiducial Mark" msgstr "加入基準標記(_F)" #: ../src/ui_study.c:371 msgid "Add a new fiducial mark to the active data set" msgstr "加入新的基準標記到作用資料集" #. ViewMenu #: ../src/ui_study.c:375 msgid "_Series" msgstr "系列(_S)" #: ../src/ui_study.c:375 msgid "Look at a series of images" msgstr "查看影åƒç³»åˆ—" #: ../src/ui_study.c:377 msgid "_Volume Rendering" msgstr "é«”ç©æ½¤ç®—中(_V)" #: ../src/ui_study.c:377 msgid "perform a volume rendering on the currently selected objects" msgstr "å°ç›®å‰å·²é¸ç‰©ä»¶æ–½è¡Œé«”ç©æ½¤ç®—" #. ToolsMenu #: ../src/ui_study.c:381 msgid "_Alignment Wizard" msgstr "å°é½Šç²¾éˆ(_A)" #: ../src/ui_study.c:381 msgid "guides you throw the processing of alignment" msgstr "逿­¥æŒ‡å¼•您å°é½Šçš„程åº" #: ../src/ui_study.c:382 msgid "_Crop Active Data Set" msgstr "è£å‰ªä½œç”¨è³‡æ–™é›†(_C)" #: ../src/ui_study.c:382 msgid "allows you to crop the active data set" msgstr "å…許您è£å‰ªä½œç”¨è³‡æ–™é›†" #: ../src/ui_study.c:383 msgid "_Factor Analysis" msgstr "因素分æž(_F)" #: ../src/ui_study.c:383 msgid "allows you to do factor analysis of dynamic data on the active data set" msgstr "å…許您於作用資料集進行動態資料的因素分æž" #: ../src/ui_study.c:384 msgid "_Filter Active Data Set" msgstr "篩é¸ä½œç”¨è³‡æ–™é›†(_F)" #: ../src/ui_study.c:384 msgid "allows you to filter the active data set" msgstr "å…許您篩é¸ä½œç”¨è³‡æ–™é›†" #: ../src/ui_study.c:385 msgid "Generate Line _Profile" msgstr "產生曲線輪廓(_P)" #: ../src/ui_study.c:385 msgid "allows generating a line profile between two fiducial marks" msgstr "å…許在兩個基準標記之間產生曲線輪廓" #: ../src/ui_study.c:386 msgid "Perform _Math on Data Sets" msgstr "於資料集施行數學é‹ç®—(_M)" #: ../src/ui_study.c:386 msgid "allows doing simple math operations between data sets" msgstr "å…許在資料集之間進行簡單的數學計算" #: ../src/ui_study.c:387 msgid "Calculate _ROI Statistics" msgstr "計算 _ROI 統計資訊" #: ../src/ui_study.c:387 msgid "caculate ROI statistics" msgstr "計算 ROI 統計資訊" #: ../src/ui_study.c:391 msgid "Generate a fly through using transaxial slices" msgstr "使用橫切é¢åˆ‡ç‰‡ç”¢ç”ŸæŽƒè¦–" #: ../src/ui_study.c:392 msgid "Generate a fly through using coronal slices" msgstr "使用冠切é¢åˆ‡ç‰‡ç”¢ç”ŸæŽƒè¦–" #: ../src/ui_study.c:393 msgid "Generate a fly through using sagittal slices" msgstr "使用縱切é¢åˆ‡ç‰‡ç”¢ç”ŸæŽƒè¦–" #. Toolbar items #: ../src/ui_study.c:397 msgid "_Threshold" msgstr "臨界值(_T)" #: ../src/ui_study.c:397 msgid "Set the thresholds and colormaps for the active data set" msgstr "設定作用資料集的臨界值和é¡è‰²å°ç…§è¡¨" #: ../src/ui_study.c:402 msgid "Near." msgstr "é„°è¿‘" #: ../src/ui_study.c:403 msgid "Tri." msgstr "三線" #: ../src/ui_study.c:407 msgid "Blend" msgstr "漸變" #: ../src/ui_study.c:407 msgid "blend all data sets" msgstr "æ··åˆæ‰€æœ‰è³‡æ–™é›†" #: ../src/ui_study.c:408 msgid "Overlay" msgstr "外罩" #: ../src/ui_study.c:408 msgid "overlay active data set on blended data sets" msgstr "將作用資料集外罩於混和資料集" #: ../src/ui_study.c:412 msgid "Single" msgstr "單一" #: ../src/ui_study.c:412 msgid "All objects are shown in a single view" msgstr "所有物件顯示在單一檢視中" #: ../src/ui_study.c:413 msgid "2-way" msgstr "é›™å‘" #: ../src/ui_study.c:413 msgid "Objects are shown between 2 linked views" msgstr "物件顯示在 2 éˆçµæª¢è¦–之間" #: ../src/ui_study.c:414 msgid "3-way" msgstr "三å‘" #: ../src/ui_study.c:414 msgid "Objects are shown between 3 linked views" msgstr "物件顯示在 3 éˆçµæª¢è¦–之間" #: ../src/ui_study.c:420 msgid "Target" msgstr "目標" #: ../src/ui_study.c:420 msgid "Leave crosshairs on views" msgstr "ä¿ç•™å字準線於檢視" #: ../src/ui_study.c:421 msgid "Transverse" msgstr "橫切é¢" #: ../src/ui_study.c:421 msgid "Enable transverse view" msgstr "å•Ÿç”¨æ©«åˆ‡é¢æª¢è¦–" #: ../src/ui_study.c:422 msgid "Coronal" msgstr "冠切é¢" #: ../src/ui_study.c:422 msgid "Enable coronal view" msgstr "å•Ÿç”¨å† åˆ‡é¢æª¢è¦–" #: ../src/ui_study.c:423 msgid "Sagittal" msgstr "縱切é¢" #: ../src/ui_study.c:423 msgid "Enable sagittal view" msgstr "å•Ÿç”¨ç¸±åˆ‡é¢æª¢è¦–" #: ../src/ui_study.c:691 msgid "specify how much to magnify the images" msgstr "指定影åƒè¦æ”¾å¤§å¤šå°‘" #. add the field of view widget to our toolbar #: ../src/ui_study.c:697 msgid "fov (%):" msgstr "æª¢è¦–ç¯„åœ (%):" #: ../src/ui_study.c:712 msgid "specify how much of the image field of view to display" msgstr "指定è¦é¡¯ç¤ºå¤šå°‘çš„å½±åƒæª¢è¦–範åœ" #. add the slice thickness selector #: ../src/ui_study.c:718 msgid "thickness (mm):" msgstr "厚度 (å…¬é‡):" #: ../src/ui_study.c:731 msgid "specify how thick to make the slices (mm)" msgstr "指定切片è¦å¤šåŽš (å…¬é‡)" #. gate #. note, can't use gtk_tool_button, as no way to set the relief in gtk 2.10, and the default #. is no relief so you can't tell that it's a button.... - #: ../src/ui_study.c:739 msgid "gate:" msgstr "é–˜å£ï¼š" #: ../src/ui_study.c:745 msgid "the gate range over which to view the data" msgstr "檢視資料所經由的閘å£ç¯„åœ" #. frame selector #: ../src/ui_study.c:752 msgid "time:" msgstr "時間:" #: ../src/ui_study.c:758 msgid "the time range over which to view the data (s)" msgstr "æª¢è¦–è³‡æ–™æ‰€ç¶“ç”±çš„æ™‚é–“ç¯„åœ (ç§’)" #: ../src/ui_study.c:949 #, c-format msgid "" "Adding fiducial mark for data set: %s\n" "Enter the mark's name:" msgstr "" "加入基準標記於資料集:%s\n" "輸入標記å稱:" #: ../src/ui_study.c:995 #, c-format msgid "" "Adding ROI to: %s\n" "Enter ROI Name:" msgstr "" "加入 ROI 到:%s\n" "輸入 ROI å稱:" #: ../src/ui_study.c:1052 #, c-format msgid "%d-%d" msgstr "%d-%d" #: ../src/ui_study.c:1056 #, c-format msgid "N/A" msgstr "無法æä¾›" #: ../src/ui_study.c:1069 #, c-format msgid "%g-%g s" msgstr "%g-%g ç§’" #: ../src/ui_study.c:1150 #, c-format msgid "[x,y,z] = [% 5.2f,% 5.2f,% 5.2f] mm" msgstr "[x,y,z] = [% 5.2f,% 5.2f,% 5.2f] å…¬é‡" #: ../src/ui_study.c:1153 #, c-format msgid "value = % 5.3g" msgstr "數值 = % 5.3g" #: ../src/ui_study.c:1155 #, c-format msgid "value = none" msgstr "數值 = ç„¡" #: ../src/ui_study.c:1157 #, c-format msgid "shift (x,y,z) =" msgstr "平移 (x,y,z) =" #: ../src/ui_study.c:1158 ../src/ui_study.c:1167 #, c-format msgid "[% 5.2f,% 5.2f,% 5.2f] mm" msgstr "[% 5.2f,% 5.2f,% 5.2f] å…¬é‡" #: ../src/ui_study.c:1162 #, c-format msgid "theta = % 5.3f degrees" msgstr "theta = % 5.3f 度" #: ../src/ui_study.c:1166 #, c-format msgid "view center (x,y,z) =" msgstr "檢視中心 (x,y,z) =" #: ../src/ui_study.c:1364 #, c-format msgid "Study: %s %s" msgstr "檢驗:%s %s" #: ../src/ui_study.c:1368 #, c-format msgid "Study: %s (%s) %s" msgstr "檢驗:%s (%s) %s" #: ../src/ui_study_cb.c:58 msgid "This wizard requires compiled in support from the GNU Scientific Library (libgsl), which this copy of AMIDE does not have." msgstr "這個精éˆéœ€è¦ç·¨è­¯æ™‚å°±æ”¯æ´ GNU 科學函å¼åº« (libgsl),而此份 AMIDE 並沒有。" #: ../src/ui_study_cb.c:77 #, c-format msgid "%s: Pick Object(s) to Import" msgstr "%s:æ€å–物件以匯入" #: ../src/ui_study_cb.c:149 msgid "XIF Files" msgstr "XIF 檔案" #: ../src/ui_study_cb.c:156 msgid "All Files" msgstr "所有檔案" #. get the name of the file to import #: ../src/ui_study_cb.c:169 msgid "Recover AMIDE XIF FILE" msgstr "回復 AMIDE XIF 檔案" #: ../src/ui_study_cb.c:169 msgid "Open AMIDE XIF File" msgstr "開啟 AMIDE XIF 檔案" #: ../src/ui_study_cb.c:189 ../src/ui_study_cb.c:373 #, c-format msgid "Inappropriate filename: %s" msgstr "ä¸é©ç•¶æª”å:%s" #: ../src/ui_study_cb.c:199 #, c-format msgid "error recovering study: %s" msgstr "回復檢驗時發生錯誤:%s" #: ../src/ui_study_cb.c:202 #, c-format msgid "error loading study: %s" msgstr "載入檢驗時發生錯誤:%s" #: ../src/ui_study_cb.c:299 #, c-format msgid "Overwrite file: %s" msgstr "覆寫檔案:%s" #. get the name of the file to import #: ../src/ui_study_cb.c:322 msgid "Save AMIDE XIF File" msgstr "儲存 AMIDE XIF 檔案" #. get the name of the file to import #: ../src/ui_study_cb.c:430 msgid "Import File" msgstr "匯入檔案" #: ../src/ui_study_cb.c:447 #, c-format msgid "Inappropriate Filename: %s" msgstr "ä¸é©ç•¶æª”å:%s" #: ../src/ui_study_cb.c:479 #, c-format msgid "Could not import data sets from file %s\n" msgstr "無法匯入資料集自檔案 %s\n" #: ../src/ui_study_cb.c:498 msgid "There's currently no active data set to export" msgstr "ç›®å‰æ²’有作用中資料集å¯ä¾›åŒ¯å‡º" #: ../src/ui_study_cb.c:700 msgid "no active data set to erase from" msgstr "沒有作用中資料集å¯ä¾›æ¸…除" #: ../src/ui_study_cb.c:709 #, c-format msgid "" "Do you really wish to erase the data set %s\n" " to the ROI: %s\n" " on the data set: %s\n" "This step is irreversible\n" "The minimum threshold value: %5.3f\n" " will be used to fill in the volume" msgstr "" "æ‚¨çœŸçš„å¸Œæœ›è¦æ¸…除資料集 %s\n" " 到 ROI:%s\n" " 於資料集:%s\n" "這個步驟是ä¸å¯å›žå¾©çš„\n" "最å°è‡¨ç•Œå€¼ï¼š%5.3f\n" " 將被用來填入體ç©" #: ../src/ui_study_cb.c:710 msgid "exterior" msgstr "外部" #: ../src/ui_study_cb.c:710 msgid "interior" msgstr "內部" #: ../src/ui_study_cb.c:822 #, c-format msgid "Do you really want to delete: %s%s" msgstr "您真的è¦åˆªé™¤ï¼š%s%s" #: ../src/ui_study_cb.c:825 msgid "" "\n" "and its children" msgstr "" "\n" "以åŠå®ƒçš„å­é …" #: ../src/ui_study_cb.c:1321 msgid "" "There are unsaved changes to the study.\n" "Are you sure you wish to quit?" msgstr "" "有些檢驗的變更尚未儲存。\n" "您確定想è¦é›¢é–‹å—Žï¼Ÿ" #: ../src/ui_time_dialog.c:59 ../src/ui_time_dialog.c:485 msgid "Start (s)" msgstr "é–‹å§‹ (ç§’)" #: ../src/ui_time_dialog.c:60 ../src/ui_time_dialog.c:504 msgid "End (s)" msgstr "çµæŸ (ç§’)" #: ../src/ui_time_dialog.c:61 msgid "Frame #" msgstr "影格 #" #: ../src/ui_time_dialog.c:242 msgid "can't count frames or allocate memory!" msgstr "無法計數影格或é…置記憶體ï¼" #: ../src/ui_time_dialog.c:459 #, c-format msgid "%s: Time Dialog" msgstr "%s:時間å°è©±æ¡†" #: ../src/xml.c:172 #, c-format msgid "Couldn't read time value for %s, substituting %5.3f" msgstr "ç„¡æ³•è®€å– %s 的時間值,替代為 %5.3f" #: ../src/xml.c:201 ../src/xml.c:242 msgid "Couldn't allocate memory space for time data" msgstr "無法é…置記憶體空間給時間資料" #: ../src/xml.c:233 msgid "XIF File appears corrupted, setting frame durations to 1" msgstr "XIF æª”æ¡ˆå‡ºç¾æå£žï¼Œè¨­å®šå½±æ ¼æŒçºŒæ™‚間為 1" #: ../src/xml.c:240 #, c-format msgid "Couldn't read value for %s, substituting 1" msgstr "ç„¡æ³•è®€å– %s 的值,替代為 1" #: ../src/xml.c:287 #, c-format msgid "Couldn't read value for %s, substituting %5.3f" msgstr "ç„¡æ³•è®€å– %s 的值,替代為 %5.3f" #: ../src/xml.c:349 #, c-format msgid "Couldn't read value for %s, substituting FALSE" msgstr "ç„¡æ³•è®€å– %s 的值,替代為 FALSE" #: ../src/xml.c:385 #, c-format msgid "Couldn't read value for %s, substituting %d" msgstr "ç„¡æ³•è®€å– %s 的值,替代為 %d" #: ../src/xml.c:426 #, c-format msgid "Couldn't read value for %s, substituting 0x%llx 0x%llx" msgstr "ç„¡æ³•è®€å– %s 的值,替代為 0x%llx 0x%llx" #: ../src/xml.c:663 #, c-format msgid "Couldn't Parse AMIDE xml file %s" msgstr "ç„¡æ³•å‰–æž AMIDE xml 檔案 %s" #: ../src/xml.c:687 #, c-format msgid "Could not seek to location %lx in file." msgstr "無法尋指到檔案中的ä½ç½® %lx。" #: ../src/xml.c:693 #, c-format msgid "Only read %x bytes from file, expected %x" msgstr "åªå¾žæª”案讀å–了 %x ä½å…ƒçµ„ï¼Œé æœŸç‚º %x" amide-1.0.5/intltool-extract.in0000644000175000017500000005500610657234431016323 0ustar loeningloening#!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Extractor # # Copyright (C) 2000-2001, 2003 Free Software Foundation. # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Intltool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Kenneth Christiansen # Darin Adler # ## Release information my $PROGRAM = "intltool-extract"; my $PACKAGE = "intltool"; my $VERSION = "0.35.5"; ## Loaded modules use strict; use File::Basename; use Getopt::Long; ## Scalars used by the option stuff my $TYPE_ARG = "0"; my $LOCAL_ARG = "0"; my $HELP_ARG = "0"; my $VERSION_ARG = "0"; my $UPDATE_ARG = "0"; my $QUIET_ARG = "0"; my $SRCDIR_ARG = "."; my $FILE; my $OUTFILE; my $gettext_type = ""; my $input; my %messages = (); my %loc = (); my %count = (); my %comments = (); my $strcount = 0; my $XMLCOMMENT = ""; ## Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; ## Always print first $| = 1; ## Handle options GetOptions ( "type=s" => \$TYPE_ARG, "local|l" => \$LOCAL_ARG, "help|h" => \$HELP_ARG, "version|v" => \$VERSION_ARG, "update" => \$UPDATE_ARG, "quiet|q" => \$QUIET_ARG, "srcdir=s" => \$SRCDIR_ARG, ) or &error; &split_on_argument; ## Check for options. ## This section will check for the different options. sub split_on_argument { if ($VERSION_ARG) { &version; } elsif ($HELP_ARG) { &help; } elsif ($LOCAL_ARG) { &place_local; &extract; } elsif ($UPDATE_ARG) { &place_normal; &extract; } elsif (@ARGV > 0) { &place_normal; &message; &extract; } else { &help; } } sub place_normal { $FILE = $ARGV[0]; $OUTFILE = "$FILE.h"; my $dirname = dirname ($OUTFILE); if (! -d "$dirname" && $dirname ne "") { system ("mkdir -p $dirname"); } } sub place_local { $FILE = $ARGV[0]; $OUTFILE = fileparse($FILE, ()); if (!-e "tmp/") { system("mkdir tmp/"); } $OUTFILE = "./tmp/$OUTFILE.h" } sub determine_type { if ($TYPE_ARG =~ /^gettext\/(.*)/) { $gettext_type=$1 } } ## Sub for printing release information sub version{ print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Copyright (C) 2000, 2003 Free Software Foundation, Inc. Written by Kenneth Christiansen, 2000. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } ## Sub for printing usage information sub help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... [FILENAME] Generates a header file from an XML source file. It grabs all strings between <_translatable_node> and its end tag in XML files. Read manpage (man ${PROGRAM}) for more info. --type=TYPE Specify the file type of FILENAME. Currently supports: "gettext/glade", "gettext/ini", "gettext/keys" "gettext/rfc822deb", "gettext/schemas", "gettext/scheme", "gettext/xml", "gettext/quoted" -l, --local Writes output into current working directory (conflicts with --update) --update Writes output into the same directory the source file reside (conflicts with --local) --srcdir Root of the source tree -v, --version Output version information and exit -h, --help Display this help and exit -q, --quiet Quiet mode Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub error{ print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub message { print "Generating C format header file for translation.\n" unless $QUIET_ARG; } sub extract { &determine_type; &convert; open OUT, ">$OUTFILE"; binmode (OUT) if $^O eq 'MSWin32'; &msg_write; close OUT; print "Wrote $OUTFILE\n" unless $QUIET_ARG; } sub convert { ## Reading the file { local (*IN); local $/; #slurp mode open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!"; $input = ; } &type_ini if $gettext_type eq "ini"; &type_keys if $gettext_type eq "keys"; &type_xml if $gettext_type eq "xml"; &type_glade if $gettext_type eq "glade"; &type_scheme if $gettext_type eq "scheme"; &type_schemas if $gettext_type eq "schemas"; &type_rfc822deb if $gettext_type eq "rfc822deb"; &type_quoted if $gettext_type eq "quoted"; } sub entity_decode_minimal { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; return $_; } sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; s/<//g; return $_; } sub escape_char { return '\"' if $_ eq '"'; return '\n' if $_ eq "\n"; return '\\\\' if $_ eq '\\'; return $_; } sub escape { my ($string) = @_; return join "", map &escape_char, split //, $string; } sub type_ini { ### For generic translatable desktop files ### while ($input =~ /^(#(.+)\n)?^_.*=(.*)$/mg) { if (defined($2)) { $comments{$3} = $2; } $messages{$3} = []; } } sub type_keys { ### For generic translatable mime/keys files ### while ($input =~ /^\s*_\w+=(.*)$/mg) { $messages{$1} = []; } } sub type_xml { ### For generic translatable XML files ### my $tree = readXml($input); parseTree(0, $tree); } sub print_var { my $var = shift; my $vartype = ref $var; if ($vartype =~ /ARRAY/) { my @arr = @{$var}; print "[ "; foreach my $el (@arr) { print_var($el); print ", "; } print "] "; } elsif ($vartype =~ /HASH/) { my %hash = %{$var}; print "{ "; foreach my $key (keys %hash) { print "$key => "; print_var($hash{$key}); print ", "; } print "} "; } else { print $var; } } # Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment) sub getAttributeString { my $sub = shift; my $do_translate = shift || 1; my $language = shift || ""; my $translate = shift; my $result = ""; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; ## differences from intltool-merge.in.in if ($key =~ /^_/) { $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT; $messages{entity_decode($string)} = []; $$translate = 2; } ## differences end here from intltool-merge.in.in $result .= " $key=$quote$string$quote"; } return $result; } # Verbatim copy from intltool-merge.in.in sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } # Based on traverse() in intltool-merge.in.in sub traverse { my $fh = shift; # unused, to allow us to sync code between -merge and -extract my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if ($nodename && "$nodename" eq "1") { $XMLCOMMENT = $content; } elsif ($nodename) { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup && $translate != 2) { $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT; $messages{$lookup} = []; } elsif ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } } else { $XMLCOMMENT = ""; my $count = scalar(@all); if ($count > 0) { my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } } $XMLCOMMENT = ""; } } # Verbatim copy from intltool-merge.in.in, $fh for compatibility sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_comment { my $expat = shift; my $data = $expat->original_string(); my $clist = $expat->{Curlist}; my $pos = $#$clist; $data =~ s/^$//s; push @$clist, 1 => $data; } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } # Verbatim copy from intltool-merge.in.in sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } # Copied from intltool-merge.in.in and added comment handler. sub readXml { my $xmldoc = shift || return; my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); ## differences from intltool-merge.in.in $xp->setHandlers(Comment => \&intltool_tree_comment); ## differences end here from intltool-merge.in.in my $tree = $xp->parse($xmldoc); #print_var($tree); # Hello thereHowdydo # would be: # [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, # [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub type_schemas { ### For schemas XML files ### # FIXME: We should handle escaped < (less than) while ($input =~ / \s* (\s*(?:\s*)?(.*?)\s*<\/default>\s*)? (\s*(?:\s*)?(.*?)\s*<\/short>\s*)? (\s*(?:\s*)?(.*?)\s*<\/long>\s*)? <\/locale> /sgx) { my @totranslate = ($3,$6,$9); my @eachcomment = ($2,$5,$8); foreach (@totranslate) { my $currentcomment = shift @eachcomment; next if !$_; s/\s+/ /g; $messages{entity_decode_minimal($_)} = []; $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment)); } } } sub type_rfc822deb { ### For rfc822-style Debian configuration files ### my $lineno = 1; my $type = ''; while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg) { my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5); while ($pre =~ m/\n/g) { $lineno ++; } $lineno += length($newline); my @str_list = rfc822deb_split(length($underscore), $text); for my $str (@str_list) { $strcount++; $messages{$str} = []; $loc{$str} = $lineno; $count{$str} = $strcount; my $usercomment = ''; while($pre =~ s/(^|\n)#([^\n]*)$//s) { $usercomment = "\n" . $2 . $usercomment; } $comments{$str} = $tag . $usercomment; } $lineno += ($text =~ s/\n//g); } } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } sub type_quoted { while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) { my $message = $1; my $before = $`; $message =~ s/\\\"/\"/g; $before =~ s/[^\n]//g; $messages{$message} = []; $loc{$message} = length ($before) + 2; } } sub type_glade { ### For translatable Glade XML files ### my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message"; while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) { # Glade sometimes uses tags that normally mark translatable things for # little bits of non-translatable content. We work around this by not # translating strings that only includes something like label4 or window1. $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/; } while ($input =~ /(..[^<]*)<\/items>/sg) { for my $item (split (/\n/, $1)) { $messages{entity_decode($item)} = []; } } ## handle new glade files while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) { $messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/; if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) { $comments{entity_decode($3)} = entity_decode($2) ; } } while ($input =~ /]*)"\s+description="([^>]+)"\/>/sg) { $messages{entity_decode_minimal($2)} = []; } } sub type_scheme { my ($line, $i, $state, $str, $trcomment, $char); for $line (split(/\n/, $input)) { $i = 0; $state = 0; # 0 - nothing, 1 - string, 2 - translatable string while ($i < length($line)) { if (substr($line,$i,1) eq "\"") { if ($state == 2) { $comments{$str} = $trcomment if ($trcomment); $messages{$str} = []; $str = ''; $state = 0; $trcomment = ""; } elsif ($state == 1) { $str = ''; $state = 0; $trcomment = ""; } else { $state = 1; $str = ''; if ($i>0 && substr($line,$i-1,1) eq '_') { $state = 2; } } } elsif (!$state) { if (substr($line,$i,1) eq ";") { $trcomment = substr($line,$i+1); $trcomment =~ s/^;*\s*//; $i = length($line); } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) { $trcomment = ""; } } else { if (substr($line,$i,1) eq "\\") { $char = substr($line,$i+1,1); if ($char ne "\"" && $char ne "\\") { $str = $str . "\\"; } $i++; } $str = $str . substr($line,$i,1); } $i++; } } } sub msg_write { my @msgids; if (%count) { @msgids = sort { $count{$a} <=> $count{$b} } keys %count; } else { @msgids = sort keys %messages; } for my $message (@msgids) { my $offsetlines = 1; $offsetlines++ if $message =~ /%/; if (defined ($comments{$message})) { while ($comments{$message} =~ m/\n/g) { $offsetlines++; } } print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n" if defined $loc{$message}; print OUT "/* ".$comments{$message}." */\n" if defined $comments{$message}; print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/; my @lines = split (/\n/, $message, -1); for (my $n = 0; $n < @lines; $n++) { if ($n == 0) { print OUT "char *s = N_(\""; } else { print OUT " \""; } print OUT escape($lines[$n]); if ($n < @lines - 1) { print OUT "\\n\"\n"; } else { print OUT "\");\n"; } } } } amide-1.0.5/win32/0000775000175000017500000000000012271346313013412 5ustar loeningloeningamide-1.0.5/win32/amide_file_logo16x16.png0000664000175000017500000000470110006537344017726 0ustar loeningloening‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÔ²•¹ NIDATxœ­—]ŒTåÇï9gΜÙùÞe™uY`wÝ%«°ÃŠd•MVÑ[ 4ÆÖ½)~ƒWÕÞX¯jÕ‹^5Ú†4&&JLÛDš´X5`, Z@RdÅÎQØ)ÌÇÎ çÌÎ÷ùêŲ+P¨5áIÞœ‹7ÏûüŸÿû<Ïù¿‚[`[ÆôÑF­üS!êÞë÷'›?¾xäã=åù*·@­ròw–e¬•ùå  ØTª™ð"`^ï+Ý ¦ùQÞuçpñ@°2²Ôù8¿‘¯|+ä‹§Þ½xéou˺dG»zÁÇ\ù·yM]Ó"!£*r°\==U«•?¹Þ÷–0P«U‹Ífã×Ý+öÌ|×àÂÔÛ‡…S*(„Phíë¶í×û~—è6^ùþ—I’¯Ûb[uJ•¿×+•Ëçšõ„«µ|ïÇmÁø,´mûÐwð°cýúõÛÛÛÛ LNNR.—i4D"\×%¾·a¡`a”þªÉ²ü£™ô¾†n¿Ç¸²Gé w.íþA*}þ(`-þ¿j üixxø»víˆD"(ŠB>ŸÇq|>¡PEQBôŽ#¬N\g ½þýý}íMK¿×//‘4OYÈ(REKÍ&ú·1 ‡Ÿ|òÉ!¿ßÏÔÔõz@ @$A’$4MC×ulÛFÓBˆú(Ô¨ZŸã÷G —ÒÕy;^Ç¡šu‘€%Õwú}õ•Zyr!¸Iæ‡wîÜ9‹Å°,‹z½N0$‹ÅX¾|9Á`Ã0H&“¨Ä9°OEBB*’ä ‰¸&®}ƒD“3—~ÿVrúÔn z3^غuëP8&ŸÏ éêêâ¾ûî# "I¦i¢iñxœ±±1~õó ’HHWFØ.¸’¥$¡°½”jÞBÆAÆBÆÄ#)x%µûÄäÒ‘p8¼3’Édؼy3333¼òÊ+œ>}MÓ°, !µZ½{÷²öÎu”¬ãø•¥Wš/4×![þŠR­HÛ’6‚Á ÿ®¡UZ‰*{¾IÕu¸8÷5_d­Y`àÑ;î¸c‡¦i,Y²„çž{ŽÙÙYöîÝ‹$IȲŒišD£QÊå2ét_@cpà .U>'qñ‰‹GÈšIlŸA$!¢ë:MµÄÈWSæ8[8É©™Ãèžç²g0 cr6lÀëõòÔSOá÷û±,‹jµ:_麎eYd³YLÓD–eNœ81W惪ªôöö’Éd˜žž&•JaYó÷í·ß楗^¢X,’Íféëë£ÑhÍfÿ©h𶽝¯D"Á±cÇèêêâСC˜¦‰aض‚r¹Œßï'‹á÷û‘e™f³IGG«W¯fff†\.‡,ËØ¶eY¸®ËîÝ»Ãëõâ8@I’>P€¡ŽŽ*• —.]âwÞappÙÙY,ËB–eÚÚÚp]I’ðù|4›M„!p‡F£ëº\¾|I’¨ªJ½^GQÖ­[‡×ëE×ut]ÇuÝv§à™ÖÖVjµ®ë2<<Ìðð0‡ãÇ#„ ¥¥˲ˆD"´µµ-Ò4r¹L±Xäã?¦\.ãº.Š¢Ðl6¥R)î¹ç.^¼H6›Åï÷“Ëåt·´´ „ÀãñàõÎëÊ…:èééáÁÄãñà÷ûés‡ .Ë嘛›£Z­bš&–ea®ë.NÂýû÷ÓÓÓÃgŸ}†$I¤ÓiÊåò\QDÌÎ΢ë:û÷ïgrr’O?ýŸÏÇÖ­[Y¾|9±XŒööv|>ªª¢( ===¬]»–-[¶P¯×‘$ ×uƒË²ÌºuëØµkªª‰D0 `/ÌënUU7ʲ¼x?ƒƒƒ 222‚ªª!PUç›^^ø7ȲL(bnnŽt:×ëÅu]¼^/>Ÿ—_~™ÑÑQ‰DQΜ9ƒišO/ŽbÇqp]!®ë’N§aÕªULNNR,q]w±–e¡ª*¦i"IkÖ¬¡X,R*•p‡R©ÄÊ•+éïïà½÷Þ#—ËQ,©T*¯S Ly<žgFGG™››CÁ… ¥µµUU™žž&ŸÏ/Òë8Î5KA£Ñ “ÉÐh4Èçóär9Z[[éììäõ×_'‘HpöìY2™Ìð8ód@/•J;–-[ÖF©V«Ôj5¦§§éïï'—ËQ*• J–åkÚϲ,šÍ&‰D‚£GR,)—Ëô÷÷3>>ŽeYœ;wŽT*Źsç&€¸J’-Œâìùóçµm›®®.fgg1 Ã0èììÀãñ IFƒZ­FµZ¥ÙlbÛ6FƒO>ù„B¡@(bÓ¦MÜÿý(Š‚®ë¼û»#ßáLþüFp˜b׊IEND®B`‚amide-1.0.5/win32/resource.h0000664000175000017500000000006310006522756015412 0ustar loeningloening#define AMIDE_ICON 104 #define AMIDE_FILE_ICON 105 amide-1.0.5/win32/amide_file_logo128x128.png0000664000175000017500000002762710006537301020103 0ustar loeningloening‰PNG  IHDR€€Ã>aËbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÔ5z-^ IDATxœíyõy÷?Ý=÷ÎìΣ•´«!BX ccÙVLB°1EÂQNðU.¿¯±“zƒ±ÛÇ.ìÊ[>EìJlNù¥ê5Æ&6‡q Ø%$¡E·VZíjïcçîî÷ž_OwO÷LÏîJ@^}U£íééûy~Ïï¹[â šâ¿5#esZ Z.)ª^Yâ£ëhÕ2Áð|å+w½Y]âƒû‚ôZœô€»¾’Ž9Âê© i #ÎÆ€RîÕõjíW}ÉΣéód2ó¯äæõ‘5k&ýðGï\²ƒûÀpÁ7¾~<úâöΕJÁeÒú›*-e@«}– :Pæ ò³‰¡U*¾óÄ“wZ“4ÅpÁµvàdÒ˾\.ÉIH ÀÒ3€Y$i_^Q†¾«±ïÏ<ûÄÌ):‘ Óq’7þç§žÞ°kWå¯Ë¥Lf€q ¨#Vˆ¹öW², &ÑûxAtt]U«ó×#©ÿx~‘·â Î+ÿÿ££'®ÔÔÌ€AøãL0!JŒ ˆ/þŠe…ú£Õ1¢ZÛ¿èòÉ×þ*@ÇÚj%øgoº`s‚Ó ¡ÏHÊ¥©ˆ¦'dˆ`¾ŠA‡¤N\+ÁÝ$€ùBrTkͲN@,‡^¹X~å/†=ì^Âà¾S‚3 à€¡é0«c<"ëG¦ÎJm;+¸_­í[u|ÄTa=W‚xlÅÚD¼ûòL&#ìÎ?`ˆ‰%Çp@ÕËJ_€:¡ñƒ42 GÂ.þUË~b_aY`9F°‚x"¹†÷k€“ÀÁ¥¼O3:€š:}R×ö—`ƒhVñ/þŠOȱ©ýËáÚr¸ö‰8ö Ó8#@’®øÊ³;::–ÝÀ ÎXrœ‘ ˜ý½NzªËaXfùÍj‘Ä. „8·ÎûVeÑ:÷‹Q/ÌKC:t ®ˆuttl˜ŸŸŸ0$Àüß,ÊRðŽsÏÝ”-ONŽO½|•,ŽÀ!IÓ†1>‡Ñ´hú0’4‹$ǹbd 1/PÄtne 1Hæ¿‚TUfg§÷Ô0Sû,©#âŒ#ÈÑhôC ý…$qÐ „A’B¡ }½kèí¾*|0k¥º0ô©Ô>Yà0 taH•`m»PA¢l.ƒ†„œ¤Rý]úÕƒÏüdnnv/pxºvÀ%à àjµº' þ¢Z­îSUmNÓ´ ]׆5M;R©T§3S‡;:"áwwAJª+VSQNË?L6÷ËÉpx2$Këè@B±ÈÉòSŠÄl T-¥Óéà É(gàô¡R©”UU=©i꼦©UUgTUWUulpàòb_ïçΓ¤ó» eN(‹‚øƨÞËôô/>¾û…®®‘Ð`Ä Áš¨ Ùdµ¦1ÈÈÌËŠ’©drSG*•JÃl8ÎF£ÎX­‘F€‰ÚrPS©?ˆFÏë©!«…‚H(•‡(Gçu]›Ë¾ 1[õ†i)£ ×t ‰@-d©P°¿¯£#~Ű–”fg 54Œùw/pëêZ‘‘¹´·\êH›ˆ©›b]B2äóûÈd§ÇTU9qä°¢ôdeJ5Â,D7¨>5H@‚H°§³¯§0 v`h›+—òæÎ0€?T1ܲ¿ßrÑg¦{û.\®ëHÂ|“Ðjó·Š¡ÈUAFSG´jµz\Ó´9M«ª•ê‘W`´&ê~1úëÓ‡1DP¤•RGxŪX,ÖarlXÊ;ÃíAû·ô龿 —ŠÉ³Ñ%“èjí»¡á—+/33w$­iúIjQ¤±“;÷ÉR±jl/ÕF¼á!L ™.f™N¢¡îå]É’$Å€N I°$8Ãmbd„d8¤¿­\ªF%ÑetdTd4d¦Ðª¯2ŸŸŸTÕê¨ØfndRRæOJÌÔö“M&¨ÿ“Ñkl%XìŒõ­ƒq ÏລºŸ3 Ð&öîVûòÙê•RÍÏo%:fÐôŒOí,kš6¢iš0Ýôry.W(ìÛ+1¨5bä7D¿Xc¨Ša$úˆDº×F"‘8ÆèïÃÐ43 ÐþåºÒ—RÞ53[YçFtÁ:è¯ÎMÍW«Õaë1 ÅL.žØPÔœ\Ë/¯ÝúÍp wGVu/ëYy¶$I è_Š{z#3€~º?·}4Rݳç©ï骪8‰ŽiÃkÀ•ÊNTU›«T*Ç,׬éº>_ÑÆwCGŸ—8QÛ^èýu϶¥di¹‹u] (JÃ3ÙÇÐïÄN‚œvÄã+(Í_âJt©þ5–÷qxäùª¦©û-×*L„Ù™ÙÃÏ¡ó´$•Ê‹ÐjFµ‰A&ˆLË:×$»’+0ËäbïéÀ¯Á8ÃMx]hÿ`U5(•JÛ,»ë®Á™éÙ±Ãñxòå` }Ìðìj¢ñEÌé!NˆåÄbçcØŽ}Á¢ðz û"øç>÷9ÅðÄɲŒ¦iìØ±ÃuÛÿüÏÿlû"n¸ásYQÂLžøKæ¦UÓ/.Õ ”àäôsTÊE4Mø’埦"ñ®Ü\ñ€ÄÊõ2 Ë&ºãøÔÌÄ(HIú’ýëÇNŽÆ*•J#V=†ÁX Â뉚ý›ßü&’T#ÓÓÓæ²ÑffŒìê7½éM ¿õôô°nÝ:Êå2###¬[W·®æçë¡÷#GŽÐ׳…|6nŠj ¦—^'Ú!ÒÙƒŠ®i|÷Š…h4Gb;õBöJ]MÆŒýëyæJb½‚D7}±u]ÝÝÇΘ8™Vcä ¼¡ %á[aË–-¦xê©§|Ÿxff†uëÖ±sçN.½ôRžÞ=;O «[Ðô²™ì©¡ªï@—rœ{î¹ÆãݵkWÃ1ïû—Û«+–­çâsþrX£wáê7CHõ¤Q¡ HzB‰xÇÆÉIi·®ë] á Ìx­À•øßþö·(—Ëž;öööòôÓOS*•(—Ë„B¡]À‹/¾Єøqâ«ÈÍn@¯™@’èX¾ŸàøÉ(Vò$åúô|á…‰Dxá…lÇžš=ÎtæÈšîØ&$IÉÈ”jO]Q !K½ò`÷Yý“S“Ë3™L88Æ¥Àk©6ÿÛßþ¶I|7<õÔSæÿíokÎÿ‹ŸcȬG¦Ó¢øY=€B{/£3ŒÎ¡PÈ6]ɲL àÏÿüÏmÇ­TJd '@>‚$,f¤Z;¯µüD¸Ž{ I}]ñxb†5ÐSû» ¼ é¨·â¹çžs=À£>JWW—ù]ŒþD"a›»›!‰P,ˆÅbär9×íJ„ja-•J´F|ãœâ_f–¹üvæ‹“CA²Ù,H’„¢(D"dY榛n"‹qÿý÷06½—Áž (ƒÓ€p&ÙQŸ b„ƒýÑ•=«VÏÎÎt …4p°Ó×;pº%€oâ7ÃÊ•îÑlvI“eQXªˆÐÙ£~uà8…ü!ªjY®?VÁñxœééi&'âß«¯¾š[o½•Ùôóå“À$%$Êæ”âî"E<Ø»"‹ 1ŒÔñátJ€âß{¯¡W*FÂd3m^@?‹™ë8@(ò=ú’À ™™1,Îñ(Qa?F¦øÏd2ȲL<'Nîûýû÷›×óÍ7¡Bdcøu”†Ñ_g'¡sÄ ‡»{º“=+fgghš–À0 'Ú½÷ÓÅ6âß{ェU£Þ> ò_ÿõ_‹>IGG+W®dß¾}€!æÁP&ÝæúH$B¥R1¯Ã‰p¨‡®Èù”srMû·ÚæV¥;C.·‹Ù¹IóœÉd’îînÂá0ªjL!ýýý6i%…*(JM­PwÿØagŠ( i¥œŠ®Õ°­ÕìkæÑ³N;NX}Âg_­hì|¡”Ic”@]0˜ÀýÖvÓ³'«Õæwñ]wñbß:œU„X¦‰nV/_·~tb¤«P(Ìc¤ŸÀ¨qo‰Sªú!¾Sƒ jÓ¦½ P*¹»È/½ôÒ†u›7of×®]œÞЮ)²‘Ú•¯ùù@«˜¯ÿÒ¸®=Ñn_§c›Zd©aŸzÚh’˜Ü—èîêÞ8;;{ç싶KÁ £¿– ÀöíÛ[ mîÀªT*M§cÇꉷ+V¬°ýægÔ ÌgË<÷ä<Ù™,Fˆ]wŒF½¦­—ÐÉ¡6´Ž³]üÒŠðu¦’P Ä@Õ¬ ·ýõÚQ"J` {õÀÄÔD*g„6ßÅè¨QeuÙÎÏÏÓÑaô7nàR©d®X¿~=6x×=ŽÐ×××4ì;66†®ë\sÍ5m݈ªjÊ1~B(}eÇH1ú"e}˜CÓÏ0—Ÿ&1,ÓÍ«ë¤R©¶Î-püøqÀxN‰ø .;+Fœ$õ>DnžA±6NGhY犞ÕsssCår9†Ñ[èp³sž`tt”W^y0°l6kzöæççùéOÊ·¾õ->ûÙÏšë­9}"455e®óóo—øÙL‰£Ë”òrMù+{Ìçyææ÷3—Ÿfpp€ÎÎN.¾øâ¶Ïç…G}”r¹Œ,Ë”kÁ§zª] €Uù “StH—E#ÑËåò Flà”1€§ÐćºFoÅOúSsÙJ|€­[·òè£x†iONç•?ÌÔæÛ"um_·8g4ªL3[cùò~®¼òʆ`–5l!¸ùæ›ù×ýWa=R™N¬šE£>aXIz;WÒ]‘ÉfFt]ïÁðNã…2€øV/•ø"Hc%|3Xu«B vÇN¥RA×uÛC¢¸”KUîÍ15 ñKœÿ%J•Qæò3lÞ¼™d2ÉÛÞö6À°xdYFQ”E3ÁyçDZcÇ8YfU¬“(ý5ß¿S¨Ã¸ÞzÄå¡ëB¡Ð¾R©Ôƒ‘:¾ä `âÖ[o%“É4õÛÏÌÌðÛßþÖ÷17mÚÄÈÈétÚ5Ž#¸=ì…<üùl…½;'k"V´â±mjǦD¹2‰®ë,_ÞožK’$B¡Éd’®®®E3ÁîÝ»™žžF–Då’&2ìpʉ0aºéŠõ"IÒÀí&aep! à:ÄDÄnýúõ Ÿvˆ/ÐÛÛk&ˆßÑ£Gyì±Ç¸úê«ùÅ/~ẟ˜>üB×uNŽ9°[ˆý²EãvúêUuúûûéëë3׊œ¿ 6pöÙg7 <ùÁŽ;X³f zUbøÅÑ’Œ¡S¢»oA¯ýÒÉêäÆzF8ùƒ;x÷û.åœsÎq=·w®‚ÎØp†æÐžiNžˆš2(; CÁ³Þݱ$¤@7ý‘K¸rÍÙH2”+Å'þæêÝ×µL >K…µk×299é™:æ*dI®XF‡5›Ï€ó»õõPÖßí‘þU&_ÉPªV(•J *•Š™äêÒ–Ì1CÑ“mzH³v4ö*ešL£ë1¢…ëü0À:›#£iápØsô»íÓ ï~÷»mßE‡d1ŒÐŒèØ– BÛV(1Íñ‰Ã¨ªJ<7}$Õj•`0hS–ãñ8ñx9 Ö¦¥ª™|â—ènéãÞÐPcOù·èº–Á'ÚV…—ëùçŸ7½Öi@|¿ûî»]÷ÿùÏnË¿×uH$‚ªªmÕûoß¾Ý7£˜×LSP‡‰)«Î‘gÛ(ô›MvE¬B•qF CLæ&Qã ¦N&“èºnJ«ž3E¯äé`€]t‘pjüí;–íÙÉe¦9\ØÁÎ}/£ëúÑÚJ[ ð¹Ï}Îæóf €`/â|÷»ß5—;;;™5¿»t×®]lÞ¼¨G­UÄn1ÁH^x!ŸýìgùÖ·¾ÀÚ-üúÁ‡Y“<Îè1ºPˆ"8´Îܱ7„Ò(S ­Ž3ž>À¡© yâñ¸ˆF£hš†$I .ÀŒ:Áðü!ºÕ#$cˉúˆ'HÉ&“ÚVû_¥È<éÊ$'²94y€JµDµZý`; µb€‰ÿ;ï¼Ó“ ²Ù¬ÐÝÝÝž©Û»ví²ÙÏ"ÇoïÞ½®Û iòòË/ÛBµ¸éýÝÏã?ެî¢'ÖM²³E FX®­G[M´«eNΜd®2C&c´{‹Åb&žwÞyFFF`ÌkEE—u^9¹IÚK,£¯£—®ŽîºDl»ûŽËyÆfÇÈT²¤³éšebÏ·%*• ;wz7¢˜™™á–[ná¶Ûn[R…¯ƒA&&&Ì<„o~ó›<òÈ#\{íµ¬_¿ž»îº‹ë®»Ž¡¡WùÿxŒññQ£?`}Ò"É B«/•JȲL$bÕªUŒ#I’™Ý$Ë2›7oæða,X,F_ªÏþ <ùäìÚµ‹±Â(TL7“mûL¦žò_(ˆF£ FW21í€áe¬T+„Ãa …|ChÐ}3Àßþíßš™9¢ŽÏ ·Ývàž÷ÿö·¿Ýóø~ëÿ¬$‰îînÒétK‚‰Òµ×^˶mÛØºu+©Tû÷ïwF~øÃ6¬JЃÌëŸóÎ;Ïv}Š¢F›FOž4Jù>øÁëX¿þl~ÿûßÛ˜Øy~g0 ꉵnñI’Ìt3´f ÐTü_tÑE µZ…}š~”¹½{÷6¸Q7nÜÈŠ+6@(ZâáÝqÇ F_ÀÿøÇæþûØÇÈf³d³Y3¹à¾ûîC–å†ä1êƒÁ`Cö±u›ÑÑQ–-[fëä V‰Êh+–/_ÎîÝ»Y»v-º®7äYˆëYµj•¹Î[pS¤="µU à[T*‰›6m"N m­Ùž|òI¿‡Z0†††x×»ÞÀ¯ýk 1 Ü ÑB8®œéåGå¹çžcjj MÓ8qâ`Œp1¢­°&~zY,Š¢صk², Yµj•¹½[q¬›6m⥗^¢Z­2>>N>Ÿ7} º®óÌ3Ï4|º]—‡ô™f›é;&ûúÓŸê#8N›µ\.ûîúñÖ·¾uAÉ΀ӾoU{088h^¯•TU%•JQ(Èf³ Êå2hzëׯoX·oß>³aå3Ï>n ü¦µúIÚe‘äâ ¬uÖYìÙ³‡`0èlzöÙgyßûÞç'£º>Ì@áD±b):zYa}PÎ{~ËåˆÇã„Ãa›Oá’K.¡T*™¢>“ɘLivv–D"a ]Ÿþù ¹¦´[Q*•‡Ã¼úª½-µ ¥õ¾Úa‚fó¼ÝÎmÞóž÷ø:¶í<.ëZ:.½ôR¦§§*|›Á­[wÉÛHéN$M3‘EYŒf«í,”Wëþ‘H„‰‰ S‚tuu™ pà 74ø5ÄqÒ†¾ÄèM%ÁÞË8 ñ±}Œï}ï{¶ý:::˜››óÃdæÈZPBˆS|âŸh«ý›ÚÍç·Ïêb ‡Ã¾û 8cóÖýDw2áªvú5îÃùü³IDAT»ï> Ñ²¨T*M `ÍÍ*›­Ä»îqùå—óï|‡O~ò“æ:1'“I³·BKhU¹ 4ˆÀv De0tu|xM‚èNŲ££ÃÕçîbU(‹^fÝŸþ韺®ïï7ÞÙätˆ fèèèhˆ•Xae`q~UU‘e™¹¹9Ïý>ô¡ñþ÷¿ßtüˆ„‘œ“Éd|§)|õ«_m¨¾õ²÷¯»î:ÀhÜdÅ¥—^Ê–-[\ l=v;e`Ë–-3—ûûûm¨`0E$1Åt³ùT4£r6Ìd2¾*–á¾¾>¦¦¦H¥Rôõõ±{÷ndYnªSˆn¦í¶Æ’âé§Ÿ6×]|ñž%jSpñ/Ö j§†@×B I’Èçó®I„“­7µz¿p&—,ÅýOMMÙœU‚ Ó4sd5ÃÍ7ßL"‘h˜Æ&''mfu+8'«EÿšqöŽ;¸îºëFx3ñxºP©TŒ"L—$¯iĉÉÉI³.P–e³bHQ”¦ù +V¬X0ñî¿ÿ~&&&̶¸Îö¸~™·m%ð]ïz—é†mápØæœˆÅb¶7}”Ëeòù¼k;§BÔ BŒ.¦±4*wdzzÚìàu]333‹.õƒ[o½0|Â3)<Îlì|ÐúÕvqK’®ª*³³³®má¶lÙ–-[xä‘GÌØ|:6¹ßÅkÕËÇBj…2ns¹õXnÒHˆh§ûvåÊ•d³YÏð®$I ×éõ2Š¥@¡P°yÛ}FVXTîŸ ¾W ¶_|‘w¼ã€{«§§ÑŠ®®.2™ŒmN+‹®ï j¦Dy=œ®®.[ +„8::ê™ÔÑêb*¨T*æòBÊØp»×v™ÍSÜvÛmfó%«2õØcy¬Yÿ=kÁøW‚œsr$¡¯¯Ï3Àª—»Ø‹&&êmö…X:pK’d­©Tª­©ÉMOÊår拱zzz˜šš²Uû[U–h‹ç‚\ÙQ˜3Vé¦Yf³ÙE7kòj %Îé•û/Ìίýë >·púø‰kèºnŽ27—¯Wsk¯\J!Ŭ#wÆ æK/¼Ðêy‹#V^ð”ÂÑ\f¹\Ž®®.¾÷½ïñÇüÇMOæv,«dpK®ÙO~ò“<öØcŒ›Š4úÀP~¶mÛÆ#`6|Z,:ò#‘ˆ)axà*•JÃÇ/6nÜÈ~ô£–Û-ÙK£œ£Ê/òùü¢¼‚‹y{è¶mÛØ¶ÍxÃ{?ýýý|øÃæƒü ç>V=Á‹ ~ F›š‹_O +üýßÿ}Ó …‚«ÆÜ,í[8yÊå²ùYáŇæÊOâ…óuvvšLP(ÌÏüü¼Yä ‰Åb¾Í­fˆF£æÈ¯V«¦Uâ…ú§ÄK©ä†¸Þ¿«{²©'Ъ‘öôôðÄOÐÙÙÉäädÛuy®'¸âŠ+¸îºëæ3ëûüÜ”-7â[E¯¢(MGèÆ õœ9§¾|ùrŽqm®µäPUÕ|·à<ÐtÛ¯}ík€áŸfg>Ÿ· J?â<À­èCŒ”l6K$ñTüî¼óNn¼ñƆõ>ø 7ÝtSÃúk¯½h$¨ÔƒÁ¦¾‚¥€5yÒ9²½î·»»»mSÏ Š¢4¸ÝRï¾öµ¯‘Ëåèéé!—Ë!˲ù7•J™¡rgr­ (‹fþU¼óïlºŸ•€¢•Úìì¬Íû•ËåL °6pVˆ‘®iZ[¡højVÖµH’dÖ¸9~„gÕO¦vnîqš”;Ênüà? â8¹[<@·¹ï‰'žà™gžq=Q,ãÁ䡇jê2ŽF£æ+”$I’4ú­s¢øîVõºuëšnkÕ Z¡¿¿ß6_ûQøÄóºçž{\ÇãFsér™Ã‡óýï¿å1š>‘îînS!Ù¹s§+ÑK¥’é …B¾²(4±B’¤¶³aZa±Ú´_&æh8np”uww›Š«W‚F+·/N47Ç“¦i„B!Ïv<^XèUårÙ¡_þò—rH[¹•ÓæuS8ý6¢ …B¶O»¸þúëyÏ{ÞÓÖ[ÌZ<•JµýNÏ|æ3®Ù‰ï|ç;ÎUM“< T*Ù>@ƒ™aeÕr3!#‘HƒF¾eË®¿þz›^¼-L@,‹iÇù`[=h/„B!ßI‚ù.¿ürSaµÂz-íV8§R)¾ð…/øÚö /drr’ÉÉI[RŠ€0­ÛÅ’ö tjîVXß fÅW\Áo~óó»sdÌÍͱ|ùrt]ojÖ‰‡ïe— +FH1_ûyh¢|Œ¼§¹h}k¹(2תªê‚Jßp•ŒŽŽ6„Ž]2µZrù’¿>¾P(˜9v~>½óï¤X,’J¥”©d2i¤ž ´›¾uÑEîî^±.•J™×ÝL1üøÇ?î뜧¢ï²À’J/b{~+ÄÈ÷ãFõІ‰ò‘˜B– ¢wp³PèB\Ë~L7ñîñqŠ^k ‚õ¯˜*¦¦¦Ì­[·Ú^é†V¿· g¡¥µuŒ“qýè,Ï?ÿ¼9BñL`Õ5ƒ fƒ!‰´å«÷‰—"¹IÛÁî¹çÓ“§i‘H„õë×ÓßßïÛ6oÕÃÏ EQ|‰÷Vº€W\¡ñEš›¨%˜™™!‹™aV¿ŠW04N¬’ðî»ï&N›‰¨bÙ*‘éìì4?`H^¤s`Quh^;7 «ËòСCLOO›-æ~k;Ô•¤±±1Ó¢°Žt·È¡Ἀmõí{ù Ä5 ±j}ÐÎ99‹ÙÎeÕöìÙÃöíÛ[ƒˆ}ªÕªMøÈG>b”„ûÛz®D"ÁÃ?Ìèè¨mÚÅ9¿üå/ÝN·è"ͧÑF¼ÓO@”%‹>66Fww7‘HÄ$~±XdëÖ­d³Y³÷p“ær9OQì”Ùl¶!°ãÌM°ê¢Øí\ù|ÞÆÀB¤ïÙ³§­>ˆ‚ ¢Ñ(7Ýt“ Åb‘ááá†:áÀ/Þö‘Ó·$¨^ Ð` Üu×]|ô£5¿»¥iAóB¡9»‰øx<îûC‰DÂÕç/ö·>3,ÌèÉN†µw~Ð΋ ½ zÿ9 õiæ†nðÜßúR+3¸óæ7¿™+¯¼ÒsÿfФuêx­FýRŸ¨­Ø¯`†¿ú«¿rý]TÇ´+„ hU*ݺvº­¸ÁÉ»wïæÍo~3€¯>V&8x𠊢°råJÓ‘ôZŽúSy¶˜ÁÙSÀéÈi·Ê6›ÍÚÚ½ˆã ±+šY¶‹»ï¾Ûö"¬v@@X-¯¶=íÄ?Õ'õÍ ‚¼Ü¹ÖðÍb𪪺&R,5ü”]¹1Àe—]æµùkB|8…o§ñ¦<âšk®0߆ᅥ(›~-ðz$¼À©d'¬7ëÊ ï}ï{ÖŒà‘7øz€`Ö·¼å-^›¼æÄ‡ÓËV4eÁÖÈo$4!:¼N/ðzºÏ)ÂZ8âŽâñxCÎâ©À[Á¾žžµ‰×ãE-º…æRtá´b‘½_ÏØÄëùâNËkëO^ÏÏÕ†7Ê…¾ž™áò ]ñF½ø¥bˆ7êý/þ»<? ñßå^Ïà –ÿ’w.ŸíѸIEND®B`‚amide-1.0.5/win32/amide_file_logo64x64.png0000664000175000017500000001404710006537320017732 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÔ hAÄ´IDATxœÍ›yl\Çç?õ^_l6É&Ù¤(Š¢xê´Eú’íØÑ–âqãÍ¥,ÆÈ$p’AbÃf½0‚@ ’ýc×€Ø$€½ÉîúOÙÁ¶Ûp"z'’%‘Š)‘±D‰:x5f7û|ý®ýãu»IÊ–<òÀ?âýŽzU¿oýîª'øÑ?|'Y\¡`aØ×Ô¦`¤2Ëéås¯¿±gñãô)>N£O‚þã#ãíË© ¿Éç²·ºnF¿VÀÀç›8/Ä›_|眺Þ~}×Ûà“¢ÌòÜ?沩;àP4@/p»t °¬|·ë.?µsÇ®GGÇÎX×Ó¯vÃ8ø7’eoƒË€€0)5¥ÿÕ¥ëAwn8‡‡æGÒ§€ËW>K¦.›¿ëŸ¿eÏÍ¿1¯ë3ùêðÃužZlgÛú¡ë½>A‹ÀB~¿N¥Ï\0 c ˜º–~?5X–yÞ²¬ã–eeLÓ¼ÐÓõßští®-ó~ÀdyùöLü•ß7ÖßÕ#hAÃEÃFÃB>ÝåJ~qiæ2pšKyUúÔØ€2º¼Úܼ{,ü«.@ !H’LžŒÏÍÍžÔDvI'€FOt4ji¬Û¶3l6\KgŸF\àÒ_öÔ2níFO¼-4,kˆäòå\×)f2gN L4høÑð#Ð û;›¢±^ ûZ:û4À¯þ§+Ò)óK8–¦c¡c¡a“\~½h…¿îâÒÉšHØòOGG ‹bCC÷n Ï¥|(}R.îÇ9ûvµ“ZšLÃfEæH.¿7oYVpɳÿêׯ {ú¯•ÔD QMCͶ]Á`p3°é£z##ÁÒqH^hoo§££!333êÁ‹/®û‚ææfš›› ‡öâÚa4,ÀEàP4ÿD"yeS©±tfáÿ|éW +s»(EôZ‰¥*½+khºijf²¸€B®K7€Ã”1ýÀðÀ „`qq‘|>O&“ÁçóºÊçóÄb^°æóùèììÄ0 ŠÅ"ÅbÓ´Š¿!›´%¡˜¤³¯SWW‹Ï§d2™àNŽýòž®äp›Â`#!bljÜ~ëÔÌä ^TµüIpèééáÁ¤³³Û¶I&“LNN299‰®ëäókã˲8wî–µ¾74ô`dzÑX&YLŸ¤¹¹MÓÐu¡¡!¦çFÿ®{ãµUû $-žh ok‹DŽvf2™NàÏ7€óôôôðÄOžhOLL`Û6Žã ëº:ÖíÜçCÓ´ tç&L;€ÀFà pÉÞÅvÓ‹5TWWÓÚÚÊÎ;b6ñÑM7º'hõŽÐææ®Ýc™÷OÜh€#[·n塇¢§§‡±±12™ …BA=ÔÒÒ@"‘ ™LRUUE¡P@ˆ• \Ó4ŠÅbÙ¹3{+šëe{`Ì¢ë:†a‡)‹,..²sçN¡–/Ì€»± Aêºo:çm·,+,Ü€#Û¶mãÉ'Ÿ$ŸÏ“L&Éd2èºNuu5UUU«DºA]K¥R´´´ ë:çÏŸÀï÷B lAKwá’4:ˆ"uÕ›©m]ÓˆD"D"4MÃuþÂ5(,€bI .ØÛR_ÛØ5ŸˆwÝ€#]]]8p€|>¯¬y0Àu]"‘™L¦¢a4eÛ¶mÜvÛm躎‚ßýîw¼÷Þ{´µµÑÛÛKqù_+¢‰$à÷t«C÷YÂpEp]pÉ,¸Ø¦…ÆŒbÝ;>±Io‹uôÍ'â½xj`|\(éüg?ûYÚÛÛó¡Pˆºº:Òé4ÅbÛ¶Ù³gà¹ÁÖÖV4M£P(`B¥û÷ï§¿¿ŸÚÚZ"‘Ïý¸ˆ&âr@ €N‘’Q4q("(”øñl…Vª ­¨@¡¹¦»O×O´Ú¶Ý‚WmùXøÖ·¾E,cjjŠååeš›› ƒ˜¦©¤ ¿¿Ÿ[n¹E5t]/‘nPªGMM ;vìPϽsdŒÄlyHæËŒ›wÝÌ’‘ôÞ]Í­àxÒØŽÅšnŽÇgOâU\*¤kà00pàÀºººH§ÓLNN …˜œœ<=ïíí¥®®ŽÝ»wW4.7zuuu´¶¶R[[[q}ütœY4L5Ó^l'YtJ©ï‡1MY,àý4‰®Xo<>Û¼Ë*5¸uuu±ÿ~\×ell M[é^Ó4LÓ¤«« @¹?I d³Y6nÜÀöíÛ×tNL¡±TƤA®8JÆ™Æq &×#¿ð öзxÆSRÅÆÈöÎpødG.—ëÆ®€ÃŸûÜçX\\$™L’Ï穪ª"ŸÏÓ××G4eß¾}Äãq|>¦i²°°@8ƶmLÓ X,r÷Ýw¯ÛɹÑe–æ²hJƒv1ìóœ™ÿ6µµ‰DðûýøýþuÛ†Áðð0í±Ël¯ûO , A¾%²©±í–s¹³º€C›6yùÄ|@6›E×uvìØÁW¿úUnºé¦&ÎãÂ… ¤R)Űã8ضgœ×íÄu\Þys×Εü>hX,æG¸çÞÏÐÒÒB4­ºõ(‹qîýq ‰N+¦ü"F[}÷mç§Æ;Ç©–®€C “Éà8ÞàvíÚÅO~ò“5·´´ÍfI§Ó$ &''™ŸŸW6àj³¿œ*ræø鲨¿ˆå&Ù¼ùfÂá0›6mbÇŽ BSSvÑF›¶ަl…§:A6Tõ6…Cx<“Kÿëµ0 ôõõáº.¶m‰Dؼy3û÷ï_·Á¯~õ+ž{î9À³ð2B ëú ˆOå9õ§—Ç3¤y4Œ2C ·åAìÅ ä–]Œº ÇŽS¶eÏž=Üyç¸.LO¤8gØÙf"žCwt¼Ü`%&ˆún⯺¿ÚS° ÿë¶Þ}߈u‡þËOÿîªhmmU~; ÑÜÜL__ߺ Ž=J(" Q]]­®K x饗8xð gSü×ÇGÈ¥ Šhd=·&œR?"¿¹1ϵΞ^fÆäÂìõÞ'Ÿ|€[»äÅÿ~Û´ êR!Á”FU£³vàöåÍ£—sÿtU hkk£­­ Û¶ñûýX–Åââ"›7o®xðøñã<ÿüó  Ù¾};~¿ŸÙÙي熇‡§MO'ÐHƒi¬[få]¹R@$М…LÇq”üüç?Çqþfk-¶©©Ä‰Ã^ÌàkjUI¹Qÿ…øô^_O©Üwß}lØàÕMÓÄu]Z[[¹xñ"óóójßøÆ78~ü8>ŸŸÏGMM ¡PˆŽŽt]'—Ë‘J¥8zô(ÃÃÃ¥i) ‰%4ÍB.Z‰yo‰C.йªâ+0XÎ'I&“˜¦‰¦iB¡Kó³h¥’™¬¯œ[¥´Ú*È£¥ôlðåõ$àÀ–-[˜žž®ˆëï¸ã²Ù,Ùl–ááaNœ8¦ihš¦"Ár2 Cy€ïÿû9rM+â2‡F}©Ú»b±+\À&ë\bviŸÏ‡ëº„B!t]÷’,wš*7„ Xj·"ë“CƹÌxz( ´¬``ïÞ½8ŽÃ•+W/cÛºu+­­­êÁÿøÇX–…ÏçC×uå£/\¸À–-[H§ÓÊ€‚g êêêxùå—Ù~Ëv.Y¯â/D©· Ján9i¸8®C]‡Ïük„ŒŽŽáº®ëÇ™UñHMMÊKfU{wu©æx¾_Ó4ª««I&“<ûì³ôööR]]Muu5o¿ý¶ÒgMÓÖÄû¹\޶¶6R©Û¶mctt!¶móç?ÿ™£GòÖ[oQUU¥¢Ç‹/’ÉdTÉËçóÑÖÖF$!àóùX\\D×ue/_¾ÌÒÒÇçk_ûmmmÔ×׳aÃòù<ÕÕÕ$ t]§©©IõWà?—KÀÀ¾}ûB‡ |éK_ªÈîÀËè ÃP¢ïóùÔì‹E …ÓÓÓÜvÛmüñT"ý¸WÌp¡©© ×uñûýD"ÕGoo¯ó‰‰ à ™L’Íf±m»¢úž[üö·¿Í­·ÞJ&“!‘HpìØ1u¿¥¥E\Fÿo »víR:¼°°PQ²’ä8†aT0,Ÿ“,--ñöÛo …*ŒWcc#@˲Ð4\.G  ££CÙ‹X,Fmm-Á`¥¥%òù<¶mãº.Ùl¶Â–Ó/ùKî¿ÿ~¢Ñ(555¼þú븮K}}=‘H„šššÕMfÊ8Ðݽ²¢”Éd8{ö욎~ö³Ÿ©ß2á)/tH’3pGe‚åS×u1MŸÏGCCííí444P,yÿý÷¹xñâš÷ÊwHBà8/¿ü2÷Üs“““¤Ói>ÿùÏ355E8&³´´TþŠÁªP¸³³Sý>wî©TŠééiº»»¹÷Þ{=ÈffBຮRy.—dZF„ÒgKƥݩ´œÍ@ À¶mÛÔÞ{ï=¦iªö†aÉd”DHzúé§¹çž{hkk`Ó¦Mœ<é•Ó…BaêH:::Èf³LMyËë®ëòë_ÿZ36æe“–eU$I’Âá°{yî8Åb‘t:M}}½Éu]|>†aP(*’$Á ‡ÃX–¥l…išär9e7Ê퇤ÑÑQêêê0 ƒxòù<¹\!„2z«•¤ë:Á``0¸&Z½ùf¯œVWWG0DÁÜÜœ¼}X½ƒRù«¡¡ššòù<ÓÓÓ¤R)å×kkkƒóóóhšÆÙ³gÙ»w/<òÁ`PÍ–LËs„r·'‘V2!O'&&*$E>{5BðÒK/ñÔSOQ[[«ö<÷Üs*Y ƒtwwK[4üoÙ^“h aY–e©e.Ó4q‡d2ÉåË—U§äÙgŸeïÞ½JTe‘BFÖ#iV/‰KêééaãÆTU­lí „Ãaå2C¡@@-Þu×]j)N®6ýö·¿Uíe´)Õ–2ñ—T )„ N«ß¶m«’ ×uikk£³³“@  ôTÆ÷rVÃáp…û’bÖå?ü0===k¨ªª¢¦¦F‰|uu5Ñh”/ùËkÞ3;;« ž”´Ó§OËۇ˟­˜ªòY)7"–e111ÁîÝ»Ñ4Må $“I†‡‡innÆqeµåŒ­ŽÀ³ØRJV'[¹\N¹ã……… 5Ìårض­ÀÛ²e [¶l©hâÄ Þ}÷]•„Ãa&&&äí­kÝB{4­8×uññqÆÇÇ×”·£Ñ(µµµÊÉàHº¸t:]±hu,¾ºžà÷û ‡Ã´µµáóùT(  …Ð4T*ÅÂÂ?üðš±—‰:¹\ŽÓ§OKY5û°²UVPÚëÓÞÞNUUÙlVÅ>Ÿ¥¥%’É$ÝÝÝjOR0$ŸÏ“N§™››Sy·œ)9‹ò¿«Ü(J¤ÈÊš‚ßïWû âñ8sss¸®‹aƒA6lØÀèè(ñxœÇ{Œ‘‘lÛÆ²,.\¸P_ü=pq5R—£FÕ nùΞ=»&’( ÌÏÏW3¹\®â™õ<ÁêŒNF€²½*“ÉpéÒ%‰–e©úÀÖ­[• þýïOMM ±XŒîînâñ¸Šjû( ~Ö`ðÊ•+LMMẮòÏrÐrv^xá…5/ùË_þRÞJZ}MÖòôY²‚ì÷û9vìï¼óSSSŒ3;;«˜–Õ ï}ï{tvv*• …BJM‰„*ÝóP¹[¼aÿþý$ 2™Œ Fä 5MãÅ_T>\˜ò"¦œmi¥žKÆÇ!ŸÏcš¦ÚUbš&†aN§9~ü8‹‹•ß@I0ï¼óN¾ùÍo‹ÅÔæŒóçÏsæÌÂá0³³³¼ùæ›×Äüj)©Âøø8@€¦¦&|>ù|žD"A¡P ¶¶!###Ü}÷Ý*«“”Á‡ßïW",#L¹MFŠ·¼/=‡‚3gÎpæÌ™5Òãº._ùÊWèëëS!°Lu“IoÑdff¦<øHæaíâè}À‘ééi¦§§innæÀ477ãóùÔŽIÙlVm}+7z’dŧœ™ÕQ¬¨FyEºQÛ¶¹ûî»éèè ³³³" ”m§¦¦xíµ×ävÜAÖÐÇýrô0°R-q÷îÝ<úè£*T^½7X×uöîÝ{]ÌÌÌT,'eßùÎw’—®ÉÐ}݈OgS’Œþþ~¾þõ¯Óßß_á«n‘¹½òÊ+¼úê«êüäÉ“œO-ìå²ÃÒÄ\åCèéC×ÍOR༻íèñ`°î˜%*Tsõ¶xêÍ 'Žï½{U{ÎE£ã­àÛÍ÷Yék£w_è¿!—ÂúºÑÞ1ãy»ÏdÒJꡈ|ItÔw=äZ•0(!…_ùj#éÉíóKÓ/ZÊväñäsa¼F‰‹ÄòD›üžWŸ†XsÉ—÷-8/RŽ—Ó3‹Ÿm9ßL(‰ÞV”ž+Ö †pr6šËÛÍ…_·ØX(Wtwgö7ÞÕ)G¥ñIEND®B`‚amide-1.0.5/win32/Makefile.am0000664000175000017500000000130710711276252015450 0ustar loeningloeningif AMIDE_OS_WIN32 BUILT_SOURCES = \ amide.ico \ amide_file.ico \ amiderc.o amide.ico: amide_logo16x16.png amide_logo32x32.png amide_logo64x64.png amide_logo128x128.png png2ico.exe amide.ico amide_logo16x16.png amide_logo32x32.png amide_logo64x64.png amide_logo128x128.png amide_file.ico: amide_file_logo16x16.png amide_file_logo32x32.png amide_file_logo64x64.png amide_file_logo128x128.png png2ico.exe amide_file.ico amide_file_logo16x16.png amide_file_logo32x32.png amide_file_logo64x64.png amide_file_logo128x128.png amiderc.o: amiderc.rc amide.ico amide_file.ico windres -i amiderc.rc -o amiderc.o endif CLEANFILES = amiderc.o amide.ico amide_file.ico DISTCLEANFILES = *~ amide-1.0.5/win32/amide_logo128x128.png0000664000175000017500000002562010006537426017103 0ustar loeningloening‰PNG  IHDR€€Ã>aËbKGDÿÿÿ ½§“ pHYs  ­#½utIMEÔí‰ÿ IDATxœí}y¬eÉY߯êìwy÷½×¯÷ezº==ÃÌØcì™Ä€ƒ V¢D 1QHQ K"e!‰ø#FaR6P„¥ÈágP°"‚18¶11³÷Ìôòúíw={U}ù£n½sî¹çÞ·ôÛpú׺}ï»uÏVßWßV_}<Á<Á<Á<Á<Á<Á<Á<Á<Á<Á7?Øi^ü§ê¿Ûša(Ï+¥Ruš·T”„RBضØä–þÛ÷ÃéißÕQãDàg~úw¬áAbysƒ:iʹÅW_=Źj T:‚fêD@”C©,KÓü^Ó¶Ô»p±¿mYjý¿¾ò™Ñ©ÞÜÁ>áë5< à|,ËØsqÌÏ÷˜ÅÅŽ³ÃæÚ@.‰Ù6­xÀ¯øÚ©ÝÚâD$Àg~âó @ûµWƒO¦©õWrá¾eÙGÃhÔ7ÆîXÛÇ ž ; "å(ˆg:|á«ÄŸÅ3¯ŠÙ*À¼8 Û£|OuŒÀJ¿ € »npËËÏ»Ž{/y—ˆ4§ß›q²3…0tŸÄ-w&Ç$Ñ-Ô3PÏu˜e;Tí CxŽÂ.˜g0šc,h)0Çn-»ÎèºçyOK%m)¥5þÁZìå{vÑ)âø%Àøß¤È7É1ÍÕϳ$Á~$@ݨ¯ŽtÃæ|ÆHf`Ýu€0>\ò|ÿV’&¡”R@ÛÏxÀΜ=u?P"ŽÂFò1=ÂË/ “įc`o0ïU j”ßÍyÍßeÛ jxÚãg À¹»àyÞUÎù›0\¡Ýw]tª8H"l¹ÐjÀt^ݨ¯“uÁ~™Àϲ,ö+YfˆÚ|XV£øíKž7\BDRÊ@À"€!´¿{&a÷®_»Õ"JVD>|  %­;댾êè¯c€yLca¾Ô¨³#ªöj~SE•yrpžÙ<Ë£õ<ÏB!D‚"ÐB>Î$NÀëDâK@ò7ŠHZ@ zrÐÇ´ˆ6ïeBõD6(¬*öËq€²ø7Ç•ãa³_`|œ ††cqçªeY[¶Ç¶4~Ø3‹cgÆò‘’ÉÛ„ô‹y7¥Ú¹mÛ-X¼ ÆšÐLàAK£Ê„/DmÁ0.&™˜$¾y¯ŸÀä|C$˜‡ªqÈ8`ðæÛ¶ã\¶mçñƒxãnŽo:«ÜÈ™À±«€û÷ßRçÏ/¥€ÈFáv+M»Wˆ¶R=®d—IÙ…”;¥×Öøµ )·AÔ‚sÂý*3Œù⿬¿Ë!àyÈY6†fªâW l€× £µ›ÐSÒ@¡R̸ÆÄ(/CG%6)˜‹³Œåù(ÍòQœ$É&ŠÉÀúø&ÎN4%,MÓ ¾äûþm¥Ô‹J©0Ænì4%8c`4hY–"ËR„áˆ7Ï<ç8¾§ H“"¾únĽ¶ÔµÞF’¾)×νÐs/t8—¶vÝ53±]ª›Xª3.Ë1,Ë[ñ\ÿ*cìDä@ŸÜX¼gN œtNà.’$y:J¶à:€óÐc NÀ²¶e}çMÆžwåñ·FŸ×ËÒ} €uììÜÇpto‹sþÖëñ‡=·½ÀpZ­˜K›ã1ÿuÁ$€ížÛªÇ_ ‚ÆE€qh®2ì9h‘Ó;\ND̃¦`z„¸¨±ÀVÎÝi?{çS·,ëÛÞ¬´&ùvVÔд)è(䀷1=@šŽV‰è­f»a[-ŸóÀתÚƒ56î¦MÀBüÓ.c¿%0p–ƒAÄR%ÛJÉTJiŒ¿||#ƒ#é¹#±'„ì Úgî¢È1‰ÆSApµÑYøÐÓ–u.Т߀¡°ÊïVéo@©$éCH•$D4PRn¥iþ®”鎖4&x}T’Íœ·0°øà¬Ûjžïß¶m»B?t ÕÁ™Âi3€„‹;¶ ÅãÚTOäœ[Ò².úJݸ ¸þäáU?~:2¨GæRlb8|€<úDÔ“J…£0zOHÚf±J„‰ÎÆŸÍ5Êß± ‰ÃÁà!ƒßp÷¶m; Œ1£Lã´¥îNÍ¨àЉ‚ Z!»œ……‹-Ç¹î ‡óJY¥û­ê} 6·×HBv1 ‡"ß"¢¥”º½åE»Ïx3†’^›ãBU|‚ɤ’Â> cЃeîB³³’¥ÉB…~žç´èZ€¶¶1{*8+ BK3]¸4~y×®¾|'nµ³ÔrôO' ÏJŸ«í j|ê@H) ¥ÜTJn!r¡TÒÒm ð,¦·J×R¥ï˳‡æ>´1ÈY“¹Ö¢ã9£sž7XÊó<„f€e %Ý™`€ÓVe„îxÀ[ÐÎú;çÏÜk6®Ÿ/~VXä“:0- ôè—ª ©ŠíÑ®!&D¿/åöЗ )êsÊfátœ•®ª É8:pœÆEÏó. p:ÐLpfúýÌÜH=ïxô­‹y¾tËŒÀI+(˜¡ÚFІ÷’tQ¼‘Ñ ˆ(3 £Í^®=E²Èåd»¤e5Ä/þñš°‘  >lÛ½âyþåñÚOœôtNgET¡~þ_¼ê¸ôÛÿ­w5MÔ"«ŒòiÑ?ù™í®?Ø@šn#ŠÃD)ù€ˆâòèùno§Ó²CÆ”ÊíÉ)kš"ò¤0 ç¹^ fU‰vsÐ-Ç‚3Éq,žr|kË)”;mÝWG{UBH0 lA)¥ÔΘê „È’í‡k ì¡e±m†ØnΡÐöÓºÍ06kY {¹ÑðÛW<ß[B^ *Î$¬­†O%Qö²g|–è7sÿ=è³PgH˜ùúŒÛñk¶=øS†û` ¨}“Ÿ LÊãùÎ-ë¢eYK( Mbä©âL2ÀƒûùSÛÛâ%9“#(Ô·)0ô§«è ©òͱï_‡7\”CsÌ@ªÑÿò/—®–“?fþrrH¹M»ƒ oø­K­FkŶmB´™ ‘¯*¥†5—+3ÀÀú(Zß^nu¸e H‰†Ž ”SÊ fÛ_$Ç„†}8íNê…çÝ&Àa ã [.¥œ%Ìè7…ŠÄÛï|M9n¾e;ùï3ìtµ1h¼É<•z‚W B“¯ CÀµÀ9¿4f“.ÖÆ)NŸø—?ÿU[*µ¸µ•}8Kå5ýmUìΊþ™¶D[ãûHÒnJD=¥T¿û/\NÛÍÉl'ß±ü÷€¨kÜÁékMß[½‡ ”×5Ø–ßjø­ Žãøœórž@gü~â836@ž«†ãàr¯›ßRJ'ýí?úgÚBÝÃfï.Âx«¯”ZÅtµC| ÍèŒ$~`ïHA_±€ 8+M ×ÛÓÄ/¤˜öü|¯,YKKÃÑ`A1TJÅÐjïtb̉W;3 »“]r|IJЪ×÷u³}ÓÑ?`   ¤h[JùNõLêÿM«(æç3)Ø–ëùwë:ž•ëW§¢'TÂîÀLLm¸¬ã7‚Öû<Ï3Öÿ©.!;3 °µ™]ÄG¨Y/Þ êT‚ÿÀ« d¹"Õ“RnQ]í93úSèô³ÝÂÏ}þ_©4¦Äqñçñ{Z8¤(‡œgߦ,ÄÂpÁ€#pǹaÛv¯*Ñóf܉NŸ ø§ÿè÷½~_\ ćˆ¨1k¤Íþ Õ:âl•¤JFJQ_)eŠ”Qf€5î—íİøÀðí"*X±œðLƣܼêBFúå€Ác®ã:Þ×q8çÆ01“b8+6ÀÕ,¡çz=ù>¥h7õk~ºWµmQü«ÛU–§ëDªnI¶ÑÿZdtQ£wm×"ßPRÜ5¡å] Á&ËÌLÏA($—ñX¼Á;ÁR ²l1 ÂN† 5pâKÈ΄ØØˆŸcL½¤r›íóÏŠ(0ô¡¨‹\dJJ¹®”ª[€Qþ„кŠQ,‹‘e±-˲ïÛŽ}Ÿ±8K&Æ×2¯iâ×Å ô=30¸àhÀe ÜæÞ²mÛåt±ôäЉº„g‚ºÛây)Õûê]+# ª]ŽåDPØ¡¯ˆ(SJm*¥ª 0̦†OŒà7ë—ñ›¿õˉíØl‡ý)Ø0Ñ?3«Š§c@ò®æ :`hÀBŽíŸ÷}ÿL Ñn<œ ]ΨçÓDÝÞ®ŸnÏlAàº@HDÝjæÏ„b¡àžËµm7|dÙÃ/3lFÚÈ1™+€Ò} ôÝäqÑb“F=¯y±Õj_7Ø(l³BêDpª6À?ü™ßi¸ú¿ÿWr%Ï©=Ëÿ—ÛRkèöVÑí„J©‡DT·³GÙøëx4þ<Œã‘ú2 > ˆ1³k°«æœcâ/3ؼÔKKK7Â0|”eY-n@3飹'>"œªØXKÏm¬¥'E—•¤ÒŒØ^Ñ?Ó& EóÒ´‡$‰C)åƒ(Æ °†=Œ-Ëa="¼É-v—ó¼§µÆÄª5L«¦u*Á¤8¬7›ܶm»…¢îÜ N0_ðT ß“û=ù)0uq®^µÍò¶@HˆˆæI€rì,0·¦ïç¿ð«)glÝõí?â<{€±Ðóª˜=?€qK9O€ÁàÌm:ŽsǶì…Ò±‰œmN•6×hys¾Sd´|¸è_…-DôIJD¥ÔvMô¯ú ¥ÀþÀÒ,ý*¨÷€¡Ôf ÍÊ(3CÙ…Õ¶€mn»ÝY ¶mÛ¦â…Y@r'@ŸSc€ŸøÛ¯\n4q[ä´D§~„Ô©½ê'Ï7°Ý{„${cã/G½Á`J¶™¨û ˜ø hb–]À‡Ôü]Œ€Y'b³_°݆Û\q]wEq©E|³3Àh(žuõé€Êt eš)4=BÑC·»ƒ4M¶‰h»æRåà.r€º}_øâçò/|ñso3÷󆀤jñÈÙ¢V\—ƒÁ……,À³ƒóžçCî@3Á7/ìl¥/e©x¹JX=§/1h™Ìûc,˜˜ÒVjKJ9‹LÞ_ ­û\¤Á ü÷lÏþ:X*ô=…$ʘŠ“éåe×?€m»çÇ5#¾h8œ¸ø“?þŸ-­ÿû~Kvs2“§\Ó¯²îŽMªݹ|缸¼|}¸Ý_Ûê wæRhý¨z} ‹×ÞMBþu‘Zœ±Ç¢OU§æÍèè6#í4Ý…N„+ÃÆ`1I¥”ò¡ç®A—:¶R³'Îá(óÜ’Ò¿.r6΋7ºl»•*q°:Aehñ¯ª ‹ïÏ<÷š¿Ø‰V,^ú-cÄÀ$çvlÛ~+ðÝ«?]\y®"½ Œ÷40ëÏ "ç Ì’ç!Ó<ì§ ]o2ŸKèz¯¡ˆ øVÛo8Ã%Ïó.fY)¥ÌÂ+8æZÃ'Îi"š>bYêRÑ}št¤'ÔÍàÕŸYE êì€3;N+¸º@Ï»¾ý´çáÆ Æ­Üæ^亭m¹)‰1âë¿ C`üù o…ÛÅŽ'“ÞY˜n3Ã-8,hÙ¶s•sþ“KÈîí£[g€~7nøˆRî%fLf6fÒÛ²iil·bîøÇ“ªŽ©Æà‰2ÀÿÈ¿qïݵ—Ó”½¨$VŠhZ6~i¢O®Ç/-ÅäŠiã8#òm%aCR©ìFuê¸ì>–ÛêCÌÓm…9Áv7»<Œî/ÿUØ|.ox¯³6Âe!òA–e)Šiâ.¾ ‰óÆÜ§²Äšˆ·õÜz6‘?IüÉ9õ¢½ðÊßïgî`z´›w6÷{ ˆ$'(§‰ÍÂþ˜AK—·ì{©Ù÷ûW¢$êeY6@Q_°m 9N”¢0{Ö²¬ïf,ðu¿IÁ´Ne#ߨ²Ãe¤ÚVç…W“J&c lW•KÊ«Ò÷Óól×`¬d>ÍÂ,;À,!ã`÷”¢Ë­x­Ú8ƹe€Ñ€ž’B|H‹ýe`»£ÉŒfM„r=¾Éÿ¦*TnÞËÁ¦2±Ê‘¨2Áä1e”Ï7³ÚŠ»,Ÿ×ƒÎ|»Ñh]ŽEØF¦4ºÉXÄ1d üè§îßÅ )ø@ºÅ²ºH£F•À“uø&m€2ñËŸª„&Gó$ÔK½GtÙ* ŠÙçÓsœ|!X\Ìòx©ïõ[Y–©Ò²‹Ðåôþì1´¢{ŠQã†Ì­%Lë}=ú'rè'F»‘å_&x]—V¸IÑ?rV5mõ8èˆßÿïµ1ÈÑÄ"[‚p“ ÃÎðéíí­?•RšÐðeèz·G8‰àý`€ÃôÛ̬¢2WᔡLøª-0‰:ñ_Çõ*¡|ܬ+ÌoÛÿï«Þ…^Cˆq¥Qï@/yÅ2“3p¤8ölÀËJâ}º+ÌÆÌe—¬¬ªâßß´—ßëþ2ç›6⦠^?ê£ß }>paÙnÛó¼ó¶m{J)w¬ÐáaSJ÷Hpì ð#í—Ùƒ»hä>°gõ¨+?Ó#£ÐÛlŠ °û^/þ«>?0_T«Ç|ƒn?mó®E(–icÐóšï,õû½¶”2Bcð2´Þ|8çÒÂIH€‹+—¬—×úm%-å[ËuþëŒ.3ZuË´ñ‡Ò1¬tL¹­ž¦¯5‰ã%øäÃÕç#ÀyÍ y-ÏóH1‚VKÐvÀ‘áØ ó 2W/34ÚlWü›°o5ZWFA¼ª?ýWÕ­ª³êÚ¦qpâÓŒû¨º¥Ó'š>§®c£—5}ßn¹I´Çñ&Š%dÞÔace€ûá_²Öî‰ËJÒ˵˳~ócéu£¶Î'/3Ç;Ú'[jU›Á »Ç˜Ð°Î|/ð7Šgj8EP!B ûà±ÇÀ^V} a†ô\Ø,€…ô¢.&7À4óóŒÖòµšh±6ïóî²mÛ+ЙLå=Þ;ÐCÎÀ±2@‹çä3Åö°FLoÈ\O|½ì+—Û“5HŒ#FŽ tÔß7Êö Ûeyð­6{ µÆ =¶ùR`6tPȇ&\Û¿àyþ%`ðŠ˜€ÙP#ÆcnFy¼ ÏI)îãÿ±_5ÞÊl¦‰»DwñÚê×wÛO–ðóÁÀÐh4p®³‚§Ú3õMu±êïëÏ¢ÿ7ÀÄ|x^p¹Õjîlnî–5yM4ŽÇÂ?ö7ÁÐ~çUvKIç²öéî/3l]Ø(/àÊM Ä6IE¤^#:{;qÇIä÷­îR¿¹sµÃ;އÎnÛ|óoŒ- iuXæFÍÅÅÅka®åyCßÄΤ‘lxŽT㊒V«Ðåeñ?Ï4£€a¼‰AÜËÇ‹>Þ$¢#õƒyN,Ë.KˆóéF¯_2¢1ßè4R @ÀšÈx³øÁõ4Mûyž;Ð:æPF}œC×rÀe^ñ–eÝE1E¼0~/o`t`  vøyŸ"©®_ÿ…î/"aæ]3‹D„}äzö3"¢˜ïöœša ¥Ì¥#®¬mÆ…78è<ÃdTPƒ€Ûn4;K×Ó4]L’dS‘¢XA´í!êù|aÈßù¡_ìpî>•§ÞR¬Ívõùtà§Þ¿Ö£_ªƒ¤‡Ld9@}"º‡z¨Nõø‹ˆD&²h”ŽÞKÕ /Ö>ïìŒYî 6mÖ´¬N£á5Î{ž×A±¨` Ú%<ôüÔ‘K€<—-Ë~Fæî"@N1í+Ç–=0{TI‘BÊÃ>²<ÇÕ¾ëʽ—‰_^³}âÈDª6‡k¯{ŽsÑ±š—‰¢Rûõªm:&à Ú̳ü‹Žã¬Aë~#ªÛ›GÎI”Ý"b/ö8A»*fMÆhµÀ @H!åƒAYžnÑ,CÇŒz³ìËXš'Ž\䨨ÙèÞìÜzÞ‡_Qm‰4²‰Ï ,xðà2~ž1nJΛM©«´Ü‘3@<ôo‰Üz‘ÆêÅøÿõ9t“ = 9$ (%¡Íb€ÂZÔ¡ÑMèU4³'ŽD„\äà–û8¿ÍTvðYÜ3L·ëRŒ5X»ÑYŒU´8 !„$"¼ ýü®4zd ð™¿õk6€åw^o‹7°B2—·_©€UŒ,Ë’L°.íÌø¡)÷6„Þ„Éì>zj¡´¾Ælï&2\¸U˜Yû»¥IÉa¦ˆ]04±à.2È—¢v¸Òtó\äeá4:Dù­ Ö™S‡íÒ§\Y«<Ó7 Ã\î*Ïó£\æÝ<Ϫվ¸¨2À‘%J7®ðã^~-ÎòO®¥“u,Û*v\u?hó/*™}6n}¹y>P¿þÊ/‰ð÷øW8_dôŒÈÔËY*¿··•¼œ%òêä3O?ßtìmÎO-›-Û僎ý õ â+Êî¯HÿãoÏî‹ý¨ Ú×üô +~0ϲÛRbišpåϬ´~®Ú>5jÓ¤L ĸ‡Ó×R’yYÂnˆ4ýãዌ㿽–î¨ÜÁÀwo®†5‰ïb ¥¨Y_&vVÌ^E4;9d¿ÌU´É\žwÔ÷€èƒÌ¿å.ã³¾†9YÄ{Ö¥}úÂ'[ƒnú‰x¤þR–ªÉKz7/sa#ÞÌËèý‚ø“u~KOΊäŠé½8Yé˜êäÑîþ= ¤Õ/+ê7†ñ»ˆÂîý·WߪÛ&æ@ø?ò¯[a/»³³–ühÉï’BÝ$EH‹öÒ}TDµ~/Ú&Gþä1umÓ…²ç_k÷ˆ–4 1Dš_¿õÔÍè{oTËæØG(8ÆÍp_ž‰Éœš±É¹ý l·òjÍl Œ;>߇:¶Ÿ@áA˜eã&dÖåW£± ¤d UüB.ÒJDtó¥—^zìäÉh”]ÈÒü£ñ0ÿ‘Ë›“¶JuN¾ê‰TEÝtxõ5ïZÀt_JÝ–™úÄ í¿ÐKz3w(ÝSŒº}À‡ ÍkZRi„›Eå¯qwؼN˜Õ1ZoN¯ .Ž*Ú@IÙBJÙsù³ÐnÑc¹…á »%> F úгR¯»ë¾òïë·šc÷ÿS×"»!¥ÿÔÃï‹1ÚÆŒtò½mЇÁµtÔÑŒÈbeÏ”w`‚—ÛªQŠLþ_@'rçà^’&7‡éà“¢n|…ˆ}””Óœ¬ìQÏ u£~º}VÛ¬ç®o«¿V’5·;ïdÿüŒíÇLKï.Ê»j7W/Þ ®Å¬ìa ˜h"0‚Fáþ¨º¨‚€x9•Ȳ€]Ó¦Rá‰Ì#dýwó6ï¹æ7R‘7 ‡·Giÿièh¡„î ££÷ÃÆ‡O¡“*¡ö=Fû¼ïßV_ø@$ì(_Œ¢h úAGÞ€–5úit¹ºr-‚Ìڃ¹s{ŸoJ:I_KÒä%è¥å t_¬a¼UÞž PLáŽ>VÜØÉ|¶U^;@È#™+„XpŪÚEh»À”üÞ“é볊E˜ßÁ«ÏõøÐÕϨBf¢„‹Ð6Áú>$€¹]Óã¬'×É¿ü½&> !)C"%-"2iSt0Ýÿð´ÜŒç4/æ±_>¯m/¦8(Œµ[|ÃLù(’IáÞ ÀÊ7U^«o8u6鎇àÀ´‹¤S„H%!¤€)̯”—Nуž5«õ‹'¯Wb-ñ>šøzM©ˆvóÌM_˜9ê¨=ÊŠ]4ëtâÑ2Ãl¿¹:zRDe}ììì Ï… Cšõ¡‡D BB3Â0E¨LQÈIO@ßãi¼ "ͱª$ò mÌèðPrnº4›&0KŸ¦ ^¸l{ysg‰R½Ôœ!D¤úæ¤iª”’C"ŠQPÍ,¨ð¡Ë­´°`V6ØC(ºr½é“™›¨»ŸÃºlG BŠ;XbµÿP !zÐ|µ/šÎïÉ È IÄ,/Àà`Öê—½ÀƒQg(éd …m¡—lb H))ÆYD#CÖ¬ªñ Ë®ík£feGÛJÑ«¹ì-XM0($i9HU?²~´Ïr9%¤èc+{„ÑvúÝ\)¹^Ù@‹A?½«ñ\ä|[èö²^$¤h_q¯³EKÕµJ™œÄ™ÄÁ ^Y3ŸÙnõ÷m㑼ÕîC †}AD#"µJD½Ò©Šå»>ö¹+WOm¬æJüшF/¶±Ð^dKpÑ?{! êžþh£ U•b‚#EÛêtßCoÔ@)½MDÝÒ Åß“úi7ðùµî£Fžçß7"´KÜ6|Ö€ ÖÄZ¸zñ•`´h“È‘!AD#ŒâQý¤‹(Ž u‰èãÑ_7TÊОPPïDYøJ?ìÝÊÁwl±Í+Í  ÏiÀç xhÀ… 6øÔ¼Úq2AAAB C††qýxý¨‹0 ‘çùP)zHDcuX½1 û‘›ÑFàwºƒnK)…T¤/ Å 8ísM» ×`YX‰ª 8Ïæ‘ ¤’<Â(!B„0E¥i*ˆh‹ˆî*¥ÞÄüܸ}Sæw¿ü»½‹/þ €ÿ’çyÊÀ>æe½kžãZžåÃgvÏöáðÒ¦g5ÆâQ‚@$g"!¡Ãdˆ0DZ"¢"z@¤Þ&¢fÇ=ؾ;ÃuÝkþ<€ŸØ MÆo6›N³Ùä¾ïƒ—êú]tý~‘çF ‡Àn†‰ñna4^;Ø­9…)L4‚€¼àOr®ë~Àì4c¶eYV«ÕâA0×uíù« RR¢ßïcŽ@TŠV™Rò•R¯*¥Ì:ƺã ` ^p`—œ³,þ8ç—,nMŽ­#~þ]&BÐ:ô.¡£ñfQý±¨«ãöê~oxõ ×w]wÀy€ð@/xֲ쫖Åœq~œÏ_†ÙÓ 9¤”9õ$Dèi‘¯FÐËéfm ¹[«gßI¡ãòå6\×} E"ZÌ2¸‰ÂØ: H"êQ %¢³»ÜŒ c9jM}–e;Ðkðàºî}¥Ô="Ú”R^ƒŽ²Ãò¤ú@Df÷ÌŒˆ¢13Ì=¥-t•œeÙ6ôî[€gÆŸ'뢜 T‰ŸBïöXåV³,»?>§½Åk:@RXÂgf€”ÂöQ¬ ˆÇ'3¡Æyp\3oô› #MºÒ#<æšú12hf €ÝÂ@ÆÝ¬ÃI2Ŭ`ý ô½¿û¸{Õ3èÀʬˆPõfè˜^ÕëçØä• wÝX‡f€£(¸¬ ;ÒÔë)»—削êç“x”ƒ¦@S=Öp÷q%¡˜gO,£ØþÜF‘IqRÜ_ùFÔ%к{À*Ž®ÎnmP¶QiÈQL@•Ÿý4TB5RdTàZe¯a?“A{@Awj=Ên¢˜v4*¡ŸÇq|>¡PEQBôŽ#¬N\g ½þýý}íMK¿×//‘4OYÈ(REKÍ&ú·1 ‡Ÿ|òÉ!¿ßÏÔÔõz@ @$A’$4MC×ulÛFÓBˆú(Ô¨ZŸã÷G —ÒÕy;^Ç¡šu‘€%Õwú}õ•Zyr!¸Iæ‡wîÜ9‹Å°,‹z½N0$‹ÅX¾|9Á`Ã0H&“¨Ä9°OEBB*’ä ‰¸&®}ƒD“3—~ÿVrúÔn z3^غuëP8&ŸÏ éêêâ¾ûî# "I¦i¢iñxœ±±1~õó ’HHWFØ.¸’¥$¡°½”jÞBÆAÆBÆÄ#)x%µûÄäÒ‘p8¼3’Édؼy3333¼òÊ+œ>}MÓ°, !µZ½{÷²öÎu”¬ãø•¥Wš/4×![þŠR­HÛ’6‚Á ÿ®¡UZ‰*{¾IÕu¸8÷5_d­Y`àÑ;î¸c‡¦i,Y²„çž{ŽÙÙYöîÝ‹$IȲŒišD£QÊå2ét_@cpà .U>'qñ‰‹GÈšIlŸA$!¢ë:MµÄÈWSæ8[8É©™Ãèžç²g0 cr6lÀëõòÔSOá÷û±,‹jµ:_麎eYd³YLÓD–eNœ81W惪ªôöö’Éd˜žž&•JaYó÷í·ß楗^¢X,’Íféëë£ÑhÍfÿ©h𶽝¯D"Á±cÇèêêâСC˜¦‰aض‚r¹Œßï'‹á÷û‘e™f³IGG«W¯fff†\.‡,ËØ¶eY¸®ËîÝ»Ãëõâ8@I’>P€¡ŽŽ*• —.]âwÞappÙÙY,ËB–eÚÚÚp]I’ðù|4›M„!p‡F£ëº\¾|I’¨ªJ½^GQÖ­[‡×ëE×ut]ÇuÝv§à™ÖÖVjµ®ë2<<Ìðð0‡ãÇ#„ ¥¥˲ˆD"´µµ-Ò4r¹L±Xäã?¦\.ãº.Š¢Ðl6¥R)î¹ç.^¼H6›Åï÷“Ëåt·´´ „ÀãñàõÎëÊ…:èééáÁÄãñà÷ûés‡ .Ë嘛›£Z­bš&–ea®ë.NÂýû÷ÓÓÓÃgŸ}†$I¤ÓiÊåò\QDÌÎ΢ë:û÷ïgrr’O?ýŸÏÇÖ­[Y¾|9±XŒööv|>ªª¢( ===¬]»–-[¶P¯×‘$ ×uƒË²ÌºuëØµkªª‰D0 `/ÌënUU7ʲ¼x?ƒƒƒ 222‚ªª!PUç›^^ø7ȲL(bnnŽt:×ëÅu]¼^/>Ÿ—_~™ÑÑQ‰DQΜ9ƒišO/ŽbÇqp]!®ë’N§aÕªULNNR,q]w±–e¡ª*¦i"IkÖ¬¡X,R*•p‡R©ÄÊ•+éïïà½÷Þ#—ËQ,©T*¯S Ly<žgFGG™››CÁ… ¥µµUU™žž&ŸÏ/Òë8Î5KA£Ñ “ÉÐh4Èçóär9Z[[éììäõ×_'‘HpöìY2™Ìð8ód@/•J;–-[ÖF©V«Ôj5¦§§éïï'—ËQ*• J–åkÚϲ,šÍ&‰D‚£GR,)—Ëô÷÷3>>ŽeYœ;wŽT*Źsç&€¸J’-Œâìùóçµm›®®.fgg1 Ã0èììÀãñ IFƒZ­FµZ¥ÙlbÛ6FƒO>ù„B¡@(bÓ¦MÜÿý(Š‚®ë¼û»#ßáLþüFp˜b׊IEND®B`‚amide-1.0.5/win32/amide_logo64x64.png0000664000175000017500000001043010006537445016733 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs  ­#½utIMEÔ!RÁèé¥IDATxœí›[ˆdÇyÇuÎéÓ×éî¹ÏîjWZݥغ>D’‰l9!ƒò`„0q伨ŽlD.Æ&$~ ¹A1Â@Œ1LB^¬D¶cb;q"y9²´Ò^´;;;³»sëéû¹VUêœéÓÓ³³Ó3XßPœ3§OU×÷¯¯¾k5¼GïÑ{ôý “8H§ßúÍï‰õuŠWV˜*•8é8Ñ‚&>ül´$ ½F£]˜šn®¿üOŸë~нil>ÿ¹di©p‹×w_h·ù¸çq D(@'í ¤€¾ÂïU&–¾EïþÉ«¯ýõú!¼!9ãvxóÍ~Á÷ùcßsžUÊs  ø ÅU0 Ên ‰í«Ö‘Ûít>/¬ÍîÃýüŸ¾þ“WûãÎs¿46Åâê“Í­ù§•ê:°ô1̃aÌJš`i{I‹é§µvµ ])õ·Àéqç¹_²ÆíÐë­=¢u£l˜ï!ÀNš“¹îÖì¤d¦Å@”¼S;Ú÷zÏwùñÙ»1-Jö1Œ§¢eÔJîÓÕ߉¯ÚÑlL§RArµªË•Ÿq]w) ߯a¿i4>:ˆ}ÑU¶l´¥”¹£Yb XÀ¶=»P*• Ãж€·Æó^4öPjs–"BºR)¹¤¹ÉÕIî]Œgïó™g¹ÌûYÝQĶ&˵Úì=¶mÏÇÒÁXÝì¿2LÇŽkDáæG”j/X–Ä€c$3LîmÌ¥À¤@í´¼‚a¦ƒí`!„J5œNwã¼”±¬`öàM¡±˜™žè¶;«ËÍÖ…÷ûþ…é~ÿ¼ÕßÏ;ÒK¸®f€ ˆt{¤L* ‡+Õa4p¨ä*°­N)=¯·‰a~•æ= Àêê5íyýÅ þÙ÷{§{ýFÜ÷6û}o}ÝóÖVûÞÕUèyÅâCU˜³†-ƒ…YÙU¢øK‘%&l˜@`eä@#Ð ¶%­X®«v§q6a|‘›¤ ÇV‚A„Ày` c£ª€¥”í‹O=÷ž4«1P€2™÷++¯¶J%çìÜÌä£BÌ9f»ÆA! ¹J¥iYÖp+P<ì¤o&¼{Þ{Jkud”qú}ï|EÑÛZk ÛÝX.¿%h!ÐXÛÌ›?cS1% …ÚݶmW[0vöPtÓøâÞ˜Ü܈Ÿ–±ª¦LDßü¯ÔE¶ÚW¶¤”kI7E~¿Ý¹zʲ|O%EFôEŒ µÂ‘£õêÔ-exëaç}Ó8ýÓÖ­Q?†–ÛûßJÚ¶øGg´RñšRª‘tÓZ«~mœ²Å峂þŽdî- 8Öl®R®Þ/„(cÌ¡{˜yß¾ü»oØZ[zžýü+%«§âHMŠ$Ï7ê-±ºyÖ“R.bÄL"`À69ù` ºÿjщQ‚bؘmU¦ ÇfëõúIŒ¸ã < €‹çÃY¿/?Vb”q…ÀGrŽ(ê´ã8^Lºi 6Fv¼o}ï뾛߶¬õ«‚ ѻ猫^¬NÔH\ã9à €rY?æ{úVkHãg`›æ[øaÿRêú2Ðþ+»ÏÈÿ1:^„Éx†²yf³-,Q·gKG޹®;`f\ À‹Ÿù;§ÛJm¿ÂL86ÞŸP¡"Äv¤¤>—écÒZWv÷Ûÿö÷ýReî»GšÈp´Ì’n‹ ÎÔt¥<± „¨c+Ëu Í ÐÜòîüòûLæÆ3ÊO¤µ+™h…É_fg>‘Ë9s´°œ°T˜ºmnæî£ŽåFZ+”Ò(-A)Њ0’s~§‡)» Š®bèª<{¶0Yš¾g«Ù8+¥¼ãWì;iz >óü_Y—Þ ?…!$¦6 “ü4~œúβ«nB„B'î­ö¡.·iTA¶dBk4Z€¶E&ï9šK׸ÆDyêÎ|¾Pï÷{SŸàÿ€Ö–7úÓO)¥Ë‚.à“ftÙ_σ%P"—°—°™:LƒkZ0Is‚>;óžbÇÕP‰ÉÜBu¢táî~¿·܆Išî‹ÆàSÏ}…«Kê%Ã3ÕI&Ÿ2œæò²;Wddê+˜r˜Ø®ÉäÿlÁtÔ½Ïa‹º=Y›¾g½±öšR*M— Y˜ëÑØøýж­Êdœ›4ôGËb"3M‘qŽÌJ§ §Ùßa?Ìä^Ï-U1—?:¥²|¢ÝnmGÙ'c[Æ57ïõxΘ"?±Õ1f?›ê±>Æ–›f>÷“çé;fåÓ 2jó¯ÿ<Û§ˆcOT*•Êq!D“5Þ—g86õië”,Ýn19ÿË'Œ˜_ʰÃb< •³ö}·6è»IÓa“·¦íÙÒü®ëN&ì+]6Öøô'_Ê]:cýŠ@Mh¼då³fiý9†ézâ}ýωRS+~#ÍYLP)L¬”*óA\0Þæž%´±hoú·Êxò1´Ì-=Ôy­·ð¢Ëø4‰·«B#‹’5AÙ9†#f€Â.z!¿@Ížsª¥Ú=›[›g1±Á9R}Ú7ŸþÕ¯ˆåwãûµRwˆäGæTOrçÑ ÞâÍÅÿìiô¾”ÐÈqëÎ#wM«¥”<µß±÷")c'þ5áC"1·éA¬¬klžU˜¶çJÕjõžuLÖøæÐmºGCŸ[(²Ê@üC:ê}¿ÛÕZÖZ§ÞØ¡ÎÎI)…ŽÄy­;÷1WL]ýÝ}—œ=Y˜¯/ÜÛl6߈ãx*·®7þ¾pròIæÙV~zÇ~ôØj-Dþ²Rj5y˜žžða;é?6­4–NÝR¿íñ¼3oš0gè 9ê¢nOq]w6ŽãYnŸÿµ¯»Þé}T ,õÑ5š€0òt˳™®Ѽ‰9q Ièy=Ü\å¡Õs`‰Qð³¢H%?;9S›=¶ì]¾¤´:‰9Pì6öž|é…oV£PÖ:Íèa9 baÄ_ /p©—ç;ý(j a×”’j£¹²¦”¼ü7&:}ù…¯Uƒ ª KˆÕåõïl­Ï‚cgSFˆ.eqºk2z@Åö%Ûq"©âÓË«v=q:bŽïÅoŠKç½™ÀÓŸí4£§,› ¡™Š#u\ëÀöd‹ (즶ÒÅÞVyBü0ïŠ?*VÛËó­—n(¿ýÉ¿´ã@?°¹ê}¢ß µ-& µÎÇ¡ú9ÐB$Þãî¾Dªr‚(Òá†eÙ¡#roÖfŠßP–ÿ²¤ÓýÆ+/m¿?"×–{ÇÛ ùÕÀSÖJU¬]"2RœZ±= ›JÞÆ™O}•|®r”@ÞÇk÷7âËŸÞÙ‹ùßyþ/ìæš÷ôÖZðg*V·k­]•aJ5¹Y†w:cn./rGСõ‰Îzð¤åö¾*ó[@FG\áÕËë ¼ðÃZÅES¤è`Âë6d3µ"Ë|ZÁõ±èo»¾ ´ÌÇqç‰Ž×øÜƒ>XØ €­õþ|§á½(#y¯ÖÊ®. 2ÎÓôùõªR Э&TêJçò³ß9"‘¿9vQ$çy¶Å] ï¹Ñûô $«’Ì„¢\¬¬­Ü†‰ÕwõΚWÛ Z9O rɘYe›Iš\÷³ï $&’¹©ÅÕK~€IÇÇ»CfŸû¤•!F •;ƒ†>Ëžò’h$m¯}g³Ù|x cšF¶°–žƒŽ ;Wp¸Ô–&R²Ÿ d³ÁS–”ÖN«Ó|ø(p/P‘Ãt´ƒ­ƒ1éÿ¥=ºA×RJ-ïĪ?À˜Æ ™CÒéÊï\él€µ»ìE E­U89qš@¿ephi”ö—°ØÖÆ4ÃU[@k­1ÇéŽ%íìPÆá£Â ·8P€Œˆú~I#é°ì¿¥bv1GØf€÷ ź×zqݹÅÔ1ÇÛö–‚ÝŸ+À££/q©qNGQtUkÝÃè&?@[ÛìGþëEª—˜J Rk©ÿ?ã t¸ìŸæÜµ3QÇç“]`~Ô z¿»¼¶üÕò…ǦËs¹ª3…cNoíÀà{%½¸ÍF°ÊjãŠîô;W”’¯3p‡-H4]†ººµ²Ô\úó8ˆÿp¢T¿³–›U§†kíi<®Ë|¨Zq“ÕöÖZ«Qúï(¥.fæßMÂq]÷.à³ î-—Ë•ŠÅn'К®ÖꢔòõL…Já®$“Èi­§¤”¿‰«w¦ên<­{É™y.1?7ùðÓ=¾?Çñ/O`¬FºÆ"­uøZëìïŽÒòüæuc0 £d¢ÿÃ@k¦e§±'Âà×ýdÜŽ^Ã0ÀTÁœ*0pÜòýéÀmàíEƒ ³R}ÌQ”ƒxt¿“HUwœŒ³Š Žz{uJè2FW(ŒýUÅ~)]€ãÚ.oìgA!i9Ž¢DÓS!û=ïoa€?Ìc$â EÝS/¸„ùùÍžùŸ ú_÷]îFOÁIEND®B`‚amide-1.0.5/win32/amiderc.rc0000664000175000017500000000013310006522756015342 0ustar loeningloening#include "resource.h" AMIDE_ICON ICON "amide.ico" AMIDE_FILE_ICON ICON "amide_file.ico" amide-1.0.5/win32/README0000664000175000017500000000046710012573002014265 0ustar loeningloening The .iss file is for the Inno Setup Compiler (version 3.0.7) 1. to generate amide.ico, download png2ico.exe, and run png2ico.exe amide.ico amide_logo* png2ico.exe amide_file.ico amide_file* 2. make amiderc.o windres amiderc.rc amiderc.o cp amiderc.o ../src and then include amiderc.o in src/Makefile amide-1.0.5/win32/amide_logo32x32.png0000664000175000017500000000331710006537465016731 0ustar loeningloening‰PNG  IHDR szzôbKGDÿÿÿ ½§“ pHYs  ­#½utIMEÔ1Ovø\IDATxœå–]lWÇçÎî쇽^å£qj;mœF´µBB-ªµU*QT(ÐP!¡ô'$xä^PT $D_*/ðдPPR僘”¸IkZ{ïz¿fggæÞËÃÌšMdÇiÃwu¥™½sïùÍ™sÎÿÀÿû^:rœéKäÓi½CTàÞôki4ê7³RzýoêÚháôio²íç^ ‚ænÛÅl×ÙètzæGûxè»S?en hÏ'¢ ¨&FS€êÐ@˜ä^œ0lY­–œM6j£cþ]„z€^ Ð5{“ÿÝJýYÈ~˜¼ã7Ðúâ%k“ƒ-±z€¾d’û 8@Ž|~ô€ã8¹[p6ZÈd½såÊTïjõìp­v:ÀÎùÙìƒ9(JüÖmŒ½`DúEp,BDJI¾åÏÌúíÖ4°ò‘ªÕUÏóšoø~ýb˯~08øX˜q¹76žÆ˜·™[øÉéþ¾‰­J¶: ƒ I‰È5*Õ«ÓÀôf~‚dà/À±bß“w ÉÏóÎëz½rÚèê¼""ƒÂEáRìÙ5áºîâou[­ç¿p¦¡dðnA£Ð(ª4çß×ZW<ïÊy!DH£H¡P¸ÎHa ¸å>à®ÿ sþg¬ŽúB„ÑïQ­ÏOz¥rñMGVj !ž E[ŠwîÝÌÆ¦/~é­T»}V¡‰=ây§Â ð/ºZ_8žvª'ƒÐ©)z2£ã¹\nØz[Íf{_“±ë#„ÕÆÙcL hXkþå8Í_*ê(,J,J ílËl™î¹-€Ò¢ÿ¬Xí*"£§m¥6w‰8@çzÊiþÑQ+‘…AŠ}ðµ|„Ï1@@Ý{Ë¢ð=â:< ˜lOPrÔâï~ì@áPpÇ·‹Å# j‡ŸÐþXìz’ÕÆ»³Æ˜:qž8vü“r̯‘íÄÒ2”ÚÞ?¶ØÍÊ»¡}ý…ŸrùŸíÏ+éˆN!Åîßš·Ï¥”ëå³Ã±ÖZkÀš\3(dÍZ†Áüø¾Têâ¾(ŠNÍ[XxßÒaîIE%9.Ó?LÀ°ÆÐðW÷ÇR&õ!€äé@QHïè¼o¹\.Þ2€ïe±Æ»CQ%®Ø)Aˆã/NÉŽXý×h7€úåŽþñýËåÒ^’˜é¶³n |íðQ±:ý‚¢‘ä~›8Í*(Ê(VQÔZ(a׌L’’ $Å`~lO6“Š·ä¥ÙöN«3+ZÉÛD”ê'u¹5Û°7é3a(¿Ý)|2§ºÔ¸×Ù‘îßzÿüÒì=À™M‚Vî¦]TD€E³ÌLéoš^ýõįëõd„ÞèHaÿ!«:ÂFŠ»&Js{­µSÄQ½>À·¾üŠºrÁNQ_û¦UoŽ–ßœ²ÖúÀU`y#€•êµsìô?¥DîìÆÁÌØho¾w¢Þ¬oIÎH¼–ŒÃ‡~îÖÊú;Ù¬/aW²‚ .…ÕvíÍ( WtðòÞ=wþáÕcG¯3üíϽ\Xšo&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = win32 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/libfame.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/amide_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMIDE_CHECK_OBSOLETE_CFLAGS = @AMIDE_CHECK_OBSOLETE_CFLAGS@ AMIDE_DEBUG_CFLAGS = @AMIDE_DEBUG_CFLAGS@ AMIDE_GTK_CFLAGS = @AMIDE_GTK_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_CFLAGS = @AMIDE_GTK_EXTRA_GCONF_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_LIBS = @AMIDE_GTK_EXTRA_GCONF_LIBS@ AMIDE_GTK_EXTRA_GVFS_CFLAGS = @AMIDE_GTK_EXTRA_GVFS_CFLAGS@ AMIDE_GTK_EXTRA_GVFS_LIBS = @AMIDE_GTK_EXTRA_GVFS_LIBS@ AMIDE_GTK_LIBS = @AMIDE_GTK_LIBS@ AMIDE_LIBDCMDATA_CFLAGS = @AMIDE_LIBDCMDATA_CFLAGS@ AMIDE_LIBDCMDATA_LIBS = @AMIDE_LIBDCMDATA_LIBS@ AMIDE_LIBECAT_LIBS = @AMIDE_LIBECAT_LIBS@ AMIDE_LIBVOLPACK_LIBS = @AMIDE_LIBVOLPACK_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HELP_DIR = @HELP_DIR@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFAME_CFLAGS = @LIBFAME_CFLAGS@ LIBFAME_CONFIG = @LIBFAME_CONFIG@ LIBFAME_LIBS = @LIBFAME_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ OPTIMIZATION_CFLAGS = @OPTIMIZATION_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMEDCON_CFLAGS = @XMEDCON_CFLAGS@ XMEDCON_CONFIG = @XMEDCON_CONFIG@ XMEDCON_LIBS = @XMEDCON_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ intltool__v_merge_options_ = @intltool__v_merge_options_@ intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ libgnomecanvas_greater_than_230_CFLAGS = @libgnomecanvas_greater_than_230_CFLAGS@ libgnomecanvas_greater_than_230_LIBS = @libgnomecanvas_greater_than_230_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @AMIDE_OS_WIN32_TRUE@BUILT_SOURCES = \ @AMIDE_OS_WIN32_TRUE@ amide.ico \ @AMIDE_OS_WIN32_TRUE@ amide_file.ico \ @AMIDE_OS_WIN32_TRUE@ amiderc.o CLEANFILES = amiderc.o amide.ico amide_file.ico DISTCLEANFILES = *~ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu win32/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu win32/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all check install install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am @AMIDE_OS_WIN32_TRUE@amide.ico: amide_logo16x16.png amide_logo32x32.png amide_logo64x64.png amide_logo128x128.png @AMIDE_OS_WIN32_TRUE@ png2ico.exe amide.ico amide_logo16x16.png amide_logo32x32.png amide_logo64x64.png amide_logo128x128.png @AMIDE_OS_WIN32_TRUE@amide_file.ico: amide_file_logo16x16.png amide_file_logo32x32.png amide_file_logo64x64.png amide_file_logo128x128.png @AMIDE_OS_WIN32_TRUE@ png2ico.exe amide_file.ico amide_file_logo16x16.png amide_file_logo32x32.png amide_file_logo64x64.png amide_file_logo128x128.png @AMIDE_OS_WIN32_TRUE@amiderc.o: amiderc.rc amide.ico amide_file.ico @AMIDE_OS_WIN32_TRUE@ windres -i amiderc.rc -o amiderc.o # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: amide-1.0.5/gnome-doc-utils.make0000644000175000017500000006120212235260723016314 0ustar loeningloening# gnome-doc-utils.make - make magic for building documentation # Copyright (C) 2004-2005 Shaun McCance # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. ################################################################################ ## @@ Generating Header Files ## @ DOC_H_FILE ## The name of the header file to generate DOC_H_FILE ?= ## @ DOC_H_DOCS ## The input DocBook files for generating the header file DOC_H_DOCS ?= $(DOC_H_FILE): $(DOC_H_DOCS); @rm -f $@.tmp; touch $@.tmp; echo 'const gchar* documentation_credits[] = {' >> $@.tmp list='$(DOC_H_DOCS)'; for doc in $$list; do \ xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ xsltproc --path "$$xmlpath" $(_credits) $$doc; \ done | sort | uniq \ | awk 'BEGIN{s=""}{n=split($$0,w,"<");if(s!=""&&s!=substr(w[1],1,length(w[1])-1)){print s};if(n>1){print $$0;s=""}else{s=$$0}};END{if(s!=""){print s}}' \ | sed -e 's/\\/\\\\/' -e 's/"/\\"/' -e 's/\(.*\)/\t"\1",/' >> $@.tmp echo ' NULL' >> $@.tmp echo '};' >> $@.tmp echo >> $@.tmp list='$(DOC_H_DOCS)'; for doc in $$list; do \ xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ docid=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \ | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \ echo $$xmlpath; \ ids=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \ for id in $$ids; do \ echo '#define HELP_'`echo $$docid`'_'`echo $$id \ | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \ done; \ echo >> $@.tmp; \ done; cp $@.tmp $@ && rm -f $@.tmp dist-check-gdu: if !HAVE_GNOME_DOC_UTILS @echo "*** GNOME Doc Utils must be installed in order to make dist" @false endif .PHONY: dist-doc-header dist-doc-header: $(DOC_H_FILE) @if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \ $(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)"; doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header) .PHONY: clean-doc-header _clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header) clean-local: $(_clean_doc_header) distclean-local: $(_clean_doc_header) mostlyclean-local: $(_clean_doc_header) maintainer-clean-local: $(_clean_doc_header) clean-doc-header: rm -f $(DOC_H_FILE) all: $(DOC_H_FILE) ################################################################################ ## @@ Generating Documentation Files ## @ DOC_MODULE ## The name of the document being built DOC_MODULE ?= ## @ DOC_ID ## The unique identifier for a Mallard document DOC_ID ?= ## @ DOC_PAGES ## Page files in a Mallard document DOC_PAGES ?= ## @ DOC_ENTITIES ## Files included with a SYSTEM entity DOC_ENTITIES ?= ## @ DOC_INCLUDES ## Files included with XInclude DOC_INCLUDES ?= ## @ DOC_FIGURES ## Figures and other external data DOC_FIGURES ?= ## @ DOC_FORMATS ## The default formats to be built and installed DOC_FORMATS ?= docbook _DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS)) ## @ DOC_LINGUAS ## The languages this document is translated into DOC_LINGUAS ?= _DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)), \ $(filter $(LINGUAS),$(DOC_LINGUAS)), \ $(DOC_LINGUAS)) _DOC_ABS_SRCDIR = @abs_srcdir@ ################################################################################ ## Variables for Bootstrapping _xml2po ?= `which xml2po` _xml2po_mode = $(if $(DOC_ID),mallard,docbook) _db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils` _db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils` _chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl _credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl _ids ?= $(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl if ENABLE_SK _ENABLE_SK = true _skpkgdatadir ?= `scrollkeeper-config --pkgdatadir` _sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir` _skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml endif ################################################################################ ## Support for automake silent-rules GDU_V_XML2PO=$(GDU__v_XML2PO_$(V)) GDU__v_XML2PO_=$(GDU__v_XML2PO_$(AM_DEFAULT_VERBOSITY)) GDU__v_XML2PO_0=@echo " XML2PO" $@; GDU_V_MSGFMT=$(GDU__v_MSGFMT_$(V)) GDU__v_MSGFMT_=$(GDU__v_MSGFMT_$(AM_DEFAULT_VERBOSITY)) GDU__v_MSGFMT_0=@echo " MSGFMT" $@; GDU_V_DB2OMF=$(GDU__v_DB2OMF_$(V)) GDU__v_DB2OMF_=$(GDU__v_DB2OMF_$(AM_DEFAULT_VERBOSITY)) GDU__v_DB2OMF_0=@echo " DB2OMF" $@; GDU_V_DB2HTM=$(GDU__v_DB2HTM_$(V)) GDU__v_DB2HTM_=$(GDU__v_DB2HTM_$(AM_DEFAULT_VERBOSITY)) GDU__v_DB2HTM_0=@echo " DB2HTM" $@; ################################################################################ ## @@ Rules for OMF Files db2omf_args = \ --stringparam db2omf.basename $(DOC_MODULE) \ --stringparam db2omf.format $(3) \ --stringparam db2omf.dtd \ $(shell xmllint --format $(2) | grep -h PUBLIC | head -n 1 \ | sed -e 's/.*PUBLIC \(\"[^\"]*\"\).*/\1/') \ --stringparam db2omf.lang $(notdir $(patsubst %/$(notdir $(2)),%,$(2))) \ --stringparam db2omf.omf_dir "$(OMF_DIR)" \ --stringparam db2omf.help_dir "$(HELP_DIR)" \ --stringparam db2omf.omf_in "$(_DOC_OMF_IN)" \ $(if $(_ENABLE_SK), \ --stringparam db2omf.scrollkeeper_cl "$(_skcontentslist)") \ $(_db2omf) $(2) ## @ _DOC_OMF_IN ## The OMF input file _DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(_DOC_ABS_SRCDIR)/$(DOC_MODULE).omf.in)) ## @ _DOC_OMF_DB ## The OMF files for DocBook output _DOC_OMF_DB = $(if $(_DOC_OMF_IN), \ $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-$(lc).omf)) $(_DOC_OMF_DB) : $(_DOC_OMF_IN) $(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ echo "The file '$(_skcontentslist)' does not exist." >&2; \ echo "Please check your ScrollKeeper installation." >&2; \ exit 1; } $(GDU_V_DB2OMF)xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; } ## @ _DOC_OMF_HTML ## The OMF files for HTML output _DOC_OMF_HTML = $(if $(_DOC_OMF_IN), \ $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-html-$(lc).omf)) $(_DOC_OMF_HTML) : $(_DOC_OMF_IN) $(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml if ENABLE_SK @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ echo "The file '$(_skcontentslist)' does not exist" >&2; \ echo "Please check your ScrollKeeper installation." >&2; \ exit 1; } endif $(GDU_V_DB2OMF)xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; } ## @ _DOC_OMF_ALL ## All OMF output files to be built # FIXME _DOC_OMF_ALL = \ $(if $(filter docbook,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_DB)) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_HTML)) .PHONY: omf omf: $(_DOC_OMF_ALL) ################################################################################ ## @@ C Locale Documents ## @ _DOC_C_MODULE ## The top-level documentation file in the C locale _DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml) ## @ _DOC_C_PAGES ## Page files in a Mallard document in the C locale _DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page)) ## @ _DOC_C_ENTITIES ## Files included with a SYSTEM entity in the C locale _DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent)) ## @ _DOC_C_XINCLUDES ## Files included with XInclude in the C locale _DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc)) ## @ _DOC_C_DOCS ## All documentation files in the C locale _DOC_C_DOCS = \ $(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \ $(_DOC_C_PAGES) $(_DOC_C_MODULE) ## @ _DOC_C_DOCS_NOENT ## All documentation files in the C locale, ## except files included with a SYSTEM entity _DOC_C_DOCS_NOENT = \ $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \ $(_DOC_C_PAGES) ## @ _DOC_C_FIGURES ## All figures and other external data in the C locale _DOC_C_FIGURES = $(if $(DOC_FIGURES), \ $(foreach fig,$(DOC_FIGURES),C/$(fig)), \ $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C/figures/*.png))) ## @ _DOC_C_HTML ## All HTML documentation in the C locale # FIXME: probably have to shell escape to determine the file names _DOC_C_HTML = $(foreach f, \ $(shell xsltproc --xinclude \ --stringparam db.chunk.basename "$(DOC_MODULE)" \ $(_chunks) "C/$(DOC_MODULE).xml"), \ C/$(f).xhtml) ############################################################################### ## @@ Other Locale Documentation ## @ _DOC_POFILES ## The .po files used for translating the document _DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po)) .PHONY: po po: $(_DOC_POFILES) ## @ _DOC_MOFILES ## The .mo files used for translating the document _DOC_MOFILES = $(patsubst %.po,%.mo,$(_DOC_POFILES)) .PHONY: mo mo: $(_DOC_MOFILES) ## @ _DOC_LC_MODULES ## The top-level documentation files in all other locales _DOC_LC_MODULES = $(if $(DOC_MODULE), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml)) ## @ _DOC_LC_PAGES ## Page files in a Mallard document in all other locales _DOC_LC_PAGES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES), \ $(lc)/$(notdir $(page)) )) ## @ _DOC_LC_XINCLUDES ## Files included with XInclude in all other locales _DOC_LC_INCLUDES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \ $(lc)/$(notdir $(inc)) )) ## @ _DOC_LC_HTML ## All HTML documentation in all other locales # FIXME: probably have to shell escape to determine the file names _DOC_LC_HTML = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_DOC_C_HTML), \ $(lc)/$(notdir $(doc)) )) ## @ _DOC_LC_DOCS ## All documentation files in all other locales _DOC_LC_DOCS = \ $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) $(_DOC_LC_PAGES) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML)) ## @ _DOC_LC_FIGURES ## All figures and other external data in all other locales _DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS), \ $(patsubst C/%,$(lc)/%,$(_DOC_C_FIGURES)) ) _DOC_SRC_FIGURES = \ $(foreach fig,$(_DOC_C_FIGURES), $(foreach lc,C $(_DOC_REAL_LINGUAS), \ $(wildcard $(srcdir)/$(lc)/$(patsubst C/%,%,$(fig))) )) $(_DOC_POFILES): @if ! test -d $(dir $@); then \ echo "mkdir $(dir $@)"; \ mkdir "$(dir $@)"; \ fi @if test ! -f $@ -a -f $(srcdir)/$@; then \ echo "cp $(srcdir)/$@ $@"; \ cp "$(srcdir)/$@" "$@"; \ fi; @docs=; \ list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \ docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \ done; \ if ! test -f $@; then \ echo "(cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \ else \ echo "(cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \ fi $(_DOC_MOFILES): %.mo: %.po $(AM_V_at)if ! test -d $(dir $@); then mkdir "$(dir $@)"; fi $(GDU_V_MSGFMT)msgfmt -o $@ $< # FIXME: fix the dependancy # FIXME: hook xml2po up $(_DOC_LC_DOCS) : $(_DOC_MOFILES) $(_DOC_LC_DOCS) : $(_DOC_C_DOCS) $(AM_V_at)if ! test -d $(dir $@); then mkdir $(dir $@); fi $(GDU_V_XML2PO)if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \ mo="$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo"; \ if [ -f "$${mo}" ]; then mo="../$${mo}"; else mo="$(_DOC_ABS_SRCDIR)/$${mo}"; fi; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -t "$${mo}" \ "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp) ## @ _DOC_POT ## A pot file _DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot,$(if $(DOC_ID),$(DOC_ID).pot)) .PHONY: pot pot: $(_DOC_POT) $(_DOC_POT): $(_DOC_C_DOCS_NOENT) $(GDU_V_XML2PO)$(_xml2po) -m $(_xml2po_mode) -e -o $@ $^ ################################################################################ ## @@ All Documentation ## @ _DOC_HTML_ALL ## All HTML documentation, only if it's built _DOC_HTML_ALL = $(if $(filter html HTML,$(_DOC_REAL_FORMATS)), \ $(_DOC_C_HTML) $(_DOC_LC_HTML)) _DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml) $(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(GDU_V_DB2HTM)xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@) ################################################################################ ## All all: \ $(_DOC_C_DOCS) $(_DOC_LC_DOCS) \ $(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) $(_DOC_POFILES) ################################################################################ ## Clean .PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML) clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML) clean-doc-lc: rm -f $(_DOC_LC_DOCS) rm -f $(_DOC_MOFILES) @list='$(_DOC_POFILES)'; for po in $$list; do \ if ! test "$$po" -ef "$(srcdir)/$$po"; then \ echo "rm -f $$po"; \ rm -f "$$po"; \ fi; \ done # .xml2.po.mo cleaning is obsolete as of 0.18.1 and could be removed in 0.20.x @for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc/.xml2po.mo"; then \ echo "rm -f $$lc/.xml2po.mo"; \ rm -f "$$lc/.xml2po.mo"; \ fi; \ done clean-doc-dir: clean-doc-lc @for lc in C $(_DOC_REAL_LINGUAS); do \ for dir in `find $$lc -depth -type d`; do \ if ! test $$dir -ef $(srcdir)/$$dir; then \ echo "rmdir $$dir"; \ rmdir "$$dir"; \ fi; \ done; \ done _clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf) _clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk) _clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc) _clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir) clean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) distclean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) mostlyclean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) maintainer-clean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) ################################################################################ ## Dist .PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk doc-dist-hook: \ $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \ $(if $(_DOC_C_FIGURES),dist-doc-figs) \ $(if $(_DOC_OMF_IN),dist-doc-omf) # $(if $(_DOC_DSK_IN),dist-doc-dsk) dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES) @for lc in C $(_DOC_REAL_LINGUAS); do \ echo " $(mkinstalldirs) $(distdir)/$$lc"; \ $(mkinstalldirs) "$(distdir)/$$lc"; \ done @list='$(_DOC_C_DOCS)'; \ for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$docdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$docdir"; \ $(mkinstalldirs) "$(distdir)/$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \ $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \ done @list='$(_DOC_LC_DOCS)'; \ for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$docdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$docdir"; \ $(mkinstalldirs) "$(distdir)/$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \ $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \ done @list='$(_DOC_POFILES)'; \ for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$docdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$docdir"; \ $(mkinstalldirs) "$(distdir)/$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \ $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \ done dist-doc-figs: $(_DOC_SRC_FIGURES) @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \ for fig in $$list; do \ if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$fig"; then \ figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$figdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$figdir"; \ $(mkinstalldirs) "$(distdir)/$$figdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \ $(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \ fi; \ done; dist-doc-omf: @if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))" dist-doc-dsk: @if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))" ################################################################################ ## Check .PHONY: check-doc-docs check-doc-omf check: \ $(if $(DOC_MODULE),check-doc-docs) \ $(if $(DOC_ID),check-doc-pages) \ $(if $(_DOC_OMF_IN),check-doc-omf) check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) @for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc"; \ then d=; \ xmlpath="$$lc"; \ else \ d="$(srcdir)/"; \ xmlpath="$$lc:$(srcdir)/$$lc"; \ fi; \ echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \ xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \ done check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES) for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc"; \ then d=; \ xmlpath="$$lc"; \ else \ d="$(srcdir)/"; \ xmlpath="$$lc:$(srcdir)/$$lc"; \ fi; \ for page in $(DOC_PAGES); do \ echo "xmllint --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \ xmllint --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \ done; \ done check-doc-omf: $(_DOC_OMF_ALL) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ done ################################################################################ ## Install .PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk _doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE)) install-data-local: \ $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \ $(if $(_DOC_HTML_ALL),install-doc-html) \ $(if $(_DOC_C_FIGURES),install-doc-figs) \ $(if $(_DOC_OMF_IN),install-doc-omf) # $(if $(_DOC_DSK_IN),install-doc-dsk) install-doc-docs: @for lc in C $(_DOC_REAL_LINGUAS); do \ echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \ $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \ done @list='$(_DOC_C_DOCS)'; for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ if ! test -d "$$docdir"; then \ echo "$(mkinstalldirs) $$docdir"; \ $(mkinstalldirs) "$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ done @list='$(_DOC_LC_DOCS)'; for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ if ! test -d "$$docdir"; then \ echo "$(mkinstalldirs) $$docdir"; \ $(mkinstalldirs) "$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ done install-doc-figs: @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \ for lc in C $(_DOC_REAL_LINGUAS); do \ figsymlink=false; \ if test -f "$$lc/$$fig"; then \ figfile="$$lc/$$fig"; \ elif test -f "$(srcdir)/$$lc/$$fig"; then \ figfile="$(srcdir)/$$lc/$$fig"; \ else \ figsymlink=true; \ fi; \ figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \ if ! test -d "$$figdir"; then \ echo "$(mkinstalldirs) $$figdir"; \ $(mkinstalldirs) "$$figdir"; \ fi; \ figbase=`echo $$fig | sed -e 's/^.*\///'`; \ if $$figsymlink; then \ echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \ ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \ else \ echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ fi; \ done; \ done install-doc-html: echo install-html install-doc-omf: $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \ done @if test "x$(_ENABLE_SK)" = "xtrue"; then \ echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ fi; install-doc-dsk: echo install-dsk ################################################################################ ## Uninstall .PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk uninstall-local: \ $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \ $(if $(_DOC_HTML_ALL),uninstall-doc-html) \ $(if $(_DOC_C_FIGURES),uninstall-doc-figs) \ $(if $(_DOC_OMF_IN),uninstall-doc-omf) # $(if $(_DOC_DSK_IN),uninstall-doc-dsk) uninstall-doc-docs: @list='$(_DOC_C_DOCS)'; for doc in $$list; do \ echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ done @list='$(_DOC_LC_DOCS)'; for doc in $$list; do \ echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ done uninstall-doc-figs: @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \ echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ done; uninstall-doc-omf: @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ if test "x$(_ENABLE_SK)" = "xtrue"; then \ echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ fi; \ echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ done amide-1.0.5/pixmaps/0000755000175000017500000000000012271346313014127 5ustar loeningloeningamide-1.0.5/pixmaps/roi_box.png0000664000175000017500000000202010715443727016302 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME× !,oÛ^nIDATxÚíÛO¨UUÇñÏÓ×+K¤öT£´E…‘ƒrR*%"‚z`å Õ$!0¨‘DE ‚ ˆ¨ú6Ȩ‘%X•,.ôÒ¤?¯wœ-½äü?çž÷.o/8\8gïµ÷úÞ}öZ÷žß¡};;0þ=v`´íÀbŽÌáÀgï`E[Á/ CøÌc¢à×bÿßG¤að›ñ,g\ÿ¯êÞNÄ8V j€ð(þ) |Õ,Þ¬° *ÛjìÉqx‡f À¬xT²Mèå8Û‹ðJÇb;þ¨±”^ò÷ç 0×°,´ïÀb¼œà_؉/ë8oå 0…»ëÓ€µ83·ŸpMh»·€Ëñm·Â}gÜ„£9sûkf´¯`wTuàŒŒþƒ°O†•—6¯¿± KŽëWÀ¼T°qì,¨¥à,|œ3¯#¸9£o)Tu½ Š ¨A¸¿äÌmÎÏéŸ àØ·¸7â ,Ípð]¨®¾*Qa>W„º¡©m íXʵ~¾“usè®a­åqGÉ83o³Ãò¶Àâ’ _t&€É! þíPókÀ°ÿF¨Lµ +•Màž›Öv\ŠñyMkð@Êù^Èõ­Yå½ }¶‘×gÌíéšþRWÀóÜ"€ ˆ"€ ˆ"€ ˆ"€ ˆ"€ ˆ"€ ˜?6:`ÿÏItöùÿ[!ó À3mmÈ[B¥4,Æ­mÿ™³ÎÜÿ÷ñPˆµZ€ý ß$›>tMIEND®B`‚amide-1.0.5/pixmaps/roi_freehand_3d.png0000664000175000017500000000145310256361757017667 0ustar loeningloening‰PNG  IHDRàw=øbKGDÿÿÿ ½§“ pHYs  šœtIMEÕ‡4c¸IDATHÇÕ•ÝKÓQÇ?¥Ù̶|¥i‚Ò‹fþ ‰_C¥ Œz»)ê"è/©èº ÓpBo‚$Sð"0- ¡U¦•™osmKË‘n;]ôÓæt³í®~ç<çw¾Ÿó<çy„7!Ÿ™(Mf^ øŸ45>îYšîšd“ßï>ô Ýì>?ш¦3o‘$‰«TÓmcxð ¦…Yƒâ3úÿ®+ l5—.~zZ{ FKÅöt’Ê.ù7Ú§_WÀ"IóWöÔ< >â ¹÷þKpXU±æ@ øÇ†‡¼C}½úñ©iò\Ó˜òòH;sâCs¿ÃÝØÀ¿ž€&”Þl6Ðêô ¹ù,&¦’’™AgWýwà¼ÿ’àµÂ%zmõŽwŠ–Úá¸"ìv»Ä>S’°À†h6]¦—eïœ39xÕj oÂÙ|f_lôíu"˜Þ=Ò$QY^Ü ”™ÑПÀ"Ë2IqÎ;÷ßÐjë¯\±Ò«1ØÝ¸‚Þëþû’B£U¡ÏtÑn®reY&a³‰Ÿã·êîÐ30ÙØ"\qéú«cùùùtµ40êÌ!^¿‹øì³TUߤ¤ÐØ lî~ÞME^“'ÍÏÅÇïEp8°*3 žîàÁD€nÊ.^¡Ç.¾ÒKèêl¨%DÝ¥$ €¡þVpö’€9ö³–°Ïþ= t€|ihD(°Íÿ”ÚŽôÆy„3½šIEND®B`‚amide-1.0.5/pixmaps/target.png0000664000175000017500000000045510715155512016131 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME×  €K‘ºIDATxÚíÚA ƒ0ПÒ´¥gðü=Jê ìÆEWR yfaxFdŒIMz’ý¨õdÝú±®W4vÉä&Ê55·ÁkzÀýOoN«èmúG åü¬îyžlí%É#"""^ƒUÙ‹ëÛ„JÊ0”äU4 µ¹U,}`°Ù*zóA˜'oÄúJдZ×wIEND®B`‚amide-1.0.5/pixmaps/align_pt.png0000664000175000017500000000225610715444231016440 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs  šœtIME× ð c;IDATxÚí›ÏKTQÇ?£/Lbh%³Áp×økéB´E…Õ&H!†Výc.jQ ­¦¢#P'(¢P´…-¤„i?ÈvA)8cœs_<¦Þ}÷Î<ß{úæ Dçw¾çÞû=×sîínG¤K&«î?€ÀÅ¿¨°þPØAýB€`8ŸWØvÖQqÿ @XÆçƒv†%…I<ýÏl_ô|Á«e¤ûïV>W|0-úM‘ªÏÌãŠ0“*G•sUÝ_Ò<èê0d<£|Z0ðIghÌÀ€«Ï€®„¤³g~‘FÅÂØñà¡…¿•FRïh0¶Ü>Ä{€Û £o^ó†O ðó ›‘ŒN©M`8FPÃÊ_ÇmÓÉ‚¡á `(ðCêÝ&>.4“¾',Èå·Øé´ÃÀF^½ÓÔ¿‰fs«MzÙ|lå€ëÀ ;Ëê»W|l ¨wÙ¤ë¦÷,]*ÕF ÖÛ0èy¾(?-vµ¼ {ƒà7•¯®ß]a“ΆAòÀË‘Òâ0e`o# R2X_U¾•õS”dœitÃÒ- Mù1}+2O¶Ba‘éSu{[ðë>9>Ô#2º,0<7 ÖgêßjÞÓ nØZy¦¾ W€^CÿNÓp? HRL.Õ%»ÑŸ·÷êHŠ3¦‡¥ç0ìÙ™?h§ÅÇ‚j‚0{ˆKy³A•£Ô_˜Hõ•™Ô_šJõµ¹Ô_œLõÕÙT_žÎP¿>ÿxLºdýÊ`rfšÄ)IEND®B`‚amide-1.0.5/pixmaps/window_skull_base.png0000664000175000017500000000275410336316713020363 0ustar loeningloening‰PNG  IHDRoª¯ pHYs  šœtIMEÕ !õ$MS‹IDAT8Ë}•ÏOMÇgw»ÝíÚmËömu‹P mŠÔ@cðWŒhHŒõ`D¼qõ@@M<È?`bb"&L=àÍŦÔÁš¨TZ Ú´nÐݶ,uÙÖÝ.ï¡F}_Íû½Ì<ÉÌgžÉwžy ð‡ Òétííí§OŸÞ½{·Íf#†át:‰Dfgg†)‹àAPWW×¥K—B¡$IÛ¨^¯¿xñb``àÀ*•êïAŽ?þàÁƒjµºý¿*‹×®]ëêê‚ è/ ÞÞÞ›7onmm5V‹¢ø;QQY–†<ÏŽŽZ­Ö_y4Š¢\.×øø8EQår9¿}ûvqq±^¯Ûíöׯ_ÏÏÏG"‘d2 AEQÆãñ|þüùÓ§OÛÛÛ?@0 {½Þ7ntvvnnn>{ölee…eÙJ¥’ËåÌfóôôt±X”$I„µµµD"±sçN«ÕJD4Íçó?@N§sddÄï÷C477·ºº*I†a(ŠÊ² Ãp&“Á0¬qrÃQ÷îÝÛÖÖV,#‘H­VƒgΜ‚a`4M&AŠ¢À0,IR8nà‚h¤OÄÏùØØØáLj^¯¯Õj?îîî¶X,6›Íápà8.‚,Ë8Ž“$©Õj‡Z­¦(Êl6ïÛ·O«ÕT*U½^‡Ã*AH’Ìf³W®\ñù|´ÙlÍÍÍ.—+¬­­‘$ٸΉ'ôz½,Ë¿¿ I’\.W¥R¥RéÞ½{$I.--]¿~}ff†çy€Õj­T*Š¢ ‚¢¨¢(€ííí`0¸¼¼ÜÃáp¡P iAQ”çyŸÏ‹ÅzzzÖ××%Iòx<;vìØ³gOkkëÊÊŠÛí¾páBSSàÉ“' …Ba˜ÖÖÖt:=;; ¡]»v577³,ëóùéííeYvxx˜¦iÀׯ_µZ-A²,›L¦z½þðáCAÜn÷ÄÄD.—“e™¦é……„$É#GŽœ}j±XÇqñxœã8š¦;::‰Äýû÷†ùWãøk#°Ûíåryhhèüùó“““íííû÷ïoii™ššºsçN©TúsË?ÊgÿW$–ûIEND®B`‚amide-1.0.5/pixmaps/window_extremities.png0000664000175000017500000000114010336316713020565 0ustar loeningloening‰PNG  IHDRÅb$bKGDÿ‡Ì¿ pHYs  šœtIMEÕ &ð@qèñIDAT(Ï=ÁËjQàßùÏ™3פ‰I'IÓT›ÞDt¡VÜ)¢ñ•|ß@êF}W¢"Å µÅPm.3MrΜ˸óûžE¡€µv³Ê÷?ÿÊÒSeõÉ1A©åRª2Ú‚©Ežkô™-KÂJ-— evw„av"פv ˜ÒY€26F¼r,ºß*ÁaŒÂfÝ’£N•œŒ˜9ÇT6¹ÇDjZ˺ðä@Œ±¡ŸÏó¼,VÄ }f*pÀD +Éd$^õÃìm'©@°•2Öh2NÍ5ü…Ì‚Žåทž(Σ¿¡Çüßñë'×>—NƒÀu´r¬}7[ë>’›:.z·¶úÒëªÙUsûp{cOK Ž—»#òܾŸÜï{toôÂY$s±Ë¹Û™BÇägõUÂqÑ»U£‘[å:%¼ÍL‘ÕA“·øY0LJÞ¬…ÂX7Á1q÷'±7Ë£¸Ã\ ¢6o‚ßWZvÙ$éŸYú®^%18Òó”òRÍú×çŒß‰ÜóÿñžÅTýÑþƒˆ%ÌŽ/™=_â ö£†ó9&ÐWFñ#x“6ý„sé(fY³xžiƒ¬„‘¹5ÜÈHŸJ2«Móà.fæ‘pýÝ?š hà)6´±f Nã~d$ŒvXüdZû'ç)¼™~ìÀ5¼ÏH¸Ó„gi“Ë7Y†Ãé8¾ÅÞ6×L¹3ØZ w[Ò©œN'd ˆ€m¸‡ÁZi0‚õmÌ]‚+8TBn5ÉèÅ[)XTp¢Àº˜í`þÎôÊì„WxÒá}¡PÛ4 Œá3Æ dŒw˜1\¤–êÿÞÍWƉt¿Î{=-/!óê9Ï6§ÿÝ2‡‡-j>š×C-6­—Ôc-æ•Ôõ󆢚. ! „€B@! „€B@! „€B@! „€°èiþ> &ÿû€JI™})'ïYTZdÔZ ˜]éÓè%ñ-Z AAäóµ7Ìg¤IEND®B`‚amide-1.0.5/pixmaps/threshold_style_min_max.png0000664000175000017500000000064510335260557021574 0ustar loeningloening‰PNG  IHDRoª¯ pHYs99Ù“FtIMEÕ ú‡ºCDIDAT8Ëc|öìxùò¥¡¡!*عs§®®.œûéÓ§Ù³g#«ab œ;w.11qùòåhâ$ô÷ïß 6„‡‡?~S–…HS¾ÿÞÚÚ:oÞ<\ ˆ2èÉ“'ÉÉÉOž<Á£‹AŒŒŒh" ¿ÿ‡‹ˆˆˆ0ˆ‰‰‰MpþüùZZZø]Å QQQtE,„C‹AXœ=\ |a4k$´sçÎ?þüÿÿYƒƒÃÆÆŸAŒŒŒÈ">|¨¬¬455µµµ… .]ºtÿþý¤åþŒŒ ‹¸¸8YYÙ„„ˆàÆÉ)!edd6lØpøðá¼¼¼7oÞ`UClQËÉÉÙØØ¨©©éææöøñcò‹Zff怀99¹ØØØ/^_øC€‘‘ÑÌ™3#""ÐÄŠÆdÈ ÞæIEND®B`‚amide-1.0.5/pixmaps/compartmental_models.fig.bak0000664000175000017500000000133107635416514021574 0ustar loeningloening#FIG 3.2 Landscape Center Inches Letter 100.00 Single -2 1200 2 6 2250 1725 2550 2100 4 0 0 50 0 18 20 0.0000 4 285 210 2250 2025 k\001 4 0 0 50 0 18 9 0.0000 4 120 180 2355 2070 12\001 -6 6 1950 825 2250 1200 4 0 0 50 0 18 20 0.0000 4 285 210 1950 1125 k\001 4 0 0 50 0 18 9 0.0000 4 120 180 2062 1178 21\001 -6 1 3 0 2 0 7 50 0 -1 0.000 1 0.0000 1500 1500 300 300 1500 1500 1800 1500 1 3 0 2 0 7 50 0 -1 0.000 1 0.0000 2687 1513 300 300 2687 1513 2987 1513 2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 1 0 2 0 0 3.00 60.00 120.00 1725 1275 2475 1275 2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 1 0 2 0 0 3.00 60.00 120.00 2700 1800 2700 2250 4 0 0 50 0 18 20 0.0000 4 270 195 2625 1575 2\001 4 0 0 50 0 18 20 0.0000 4 270 195 1425 1575 1\001 amide-1.0.5/pixmaps/view_sagittal.png0000664000175000017500000000127310715156044017505 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME× œ3ñ&HIDATxÚí›?hSAÇ?©¶IéÐ¥4ƒ,’Ò­d HK§NÑE§N]ÚA\ƒS']ºÔÅNq0.…¢íÐI‰‚Њ 4K‡ê¢â‡^!<îš¼¼ËË]ßï ïïû}î~÷»;ÞKŸF,PÒêÚ5àKÓ3[@ ¨pN4Ü6€# ÑFùTG@ÆWÇSÀ,°Û¦Ó¦r ¬}°Ññ`ùêKoèV[8s¨ºxU…Æéñ^‹÷jÀU×,*ÿ(¹3Zò’º¿ ü0Øù\pÕùCÅ_“!m] ÜsÀMe_«–íT ª÷4Û¬º àY ¢?UžªM Xkê³hkÙ°Ó5ÉGR’@²õ@ ²MmIEND®B`‚amide-1.0.5/pixmaps/window_bone.png0000664000175000017500000000204110336316713017147 0ustar loeningloening‰PNG  IHDRàw=ø pHYs  ÒÝ~ütIMEÔ2;Ñb åÀIDATxœµ”½K+]ÆŸ³{6›e% Ä?*h‘(Š¢ bc+¶V‚í´Haeñ VVAÄ?@”Ø ˆ‚bc!~€Cظ*Á˜l²Ùy‹{77ɽ¾\ÞÓœ™3¿9Ï ÃþG¾¨ª*EpÎ!Šâ—ÞñzÆ<úûû100€¡¡!ÀÉÉ ºººÍfqww‡ËËKœŸŸ#™L¢T*ÕÌE?Î9-..’®ëôööFš¦‘adY™¦I–e‘ištuuE©TвÙ,% ¡_óUfff¨ž™¦Iš¦Õõ/,,Tª$º¹¹Áêê*4Mƒªª…,ËH§ÓØÙÙÁìì,8çH§ÓØßßG,ƒËåÂÅÅE}‰E"jjjª¨@EŠD"ôðð@ÏÏÏ´··G†aÐîî.õõõUU<99I¡P¨R"Æmoo“aÔÝÝ]KGÚÚÚ*÷!“ÉÇ㩊NOOéõõ•Ün÷'@’$ŠÇãôíÛ7E±& ¹¹™...ˆˆhvv¶f §§§'òz½•M¤ªj݇ÈçóQ0$‡ÃQ7†1F¡Pˆl6Û'@QZYY!»Ýþ[ÀWŽ(ŠFiiiéC ÐÜÜ544ü5@–eº½½¥õõuáû˜ÆãqœÁ4Íšcö_Ì0 lnnâðð–eßòûý]ýÇimm%Y–¿O€òiooH’Y–!Ë2$I‚$IàœCþ¼;;;188¢Ï%Mhyy™’É$µµµ‘ßï§ŽŽòù|ät:Éív“ªª$ByRêU~~NÑh´üƒòª¸¿¿GSSq}} Q‘ÍfaY$I‚Ýn‡eYÈçó°Ùl0 £æòù<666Ê~öƒ ÆÂá0ŽŽŽ ë:ÞßßÁC±X„¢((•J( ( `ŒUHð³É²ŒB¡Pö— Š"¼^/R©r¹,Ë*',•Ju׳ À„sÎy𫟈*î9ç`ŒŠÅbe<€*ˆ?ÛÛÛár¹Ëå`š&ìv;‚Á zzz i À(ŠÃðð0²Ù, Ã@>Ÿÿ=<ZZZà÷ûát:¡( &&&°¶¶†©©)躎ÇÇG„ÃaLOO#‹!‘H NWIXËåÀ9A’$ôööb~~---Œ1àåå»»»8>>†®ë5ûSÕƒZÆCcc#\.ˆš¦!“Éüéà_ßëõdYÞÜÜL¥R”RJ)BBˆ1îv»¿È6 chh¨Û횦™ÉdüšK¥Òòòr$X]]åyþàÁƒårYQ”íííl6KpçÎV«KKKþ|”TU ‡ÃårùðáÃ{÷îF£étzxxXÓ´t:-Š¢¦ižçùão·Û?~ü@J©a–eA},ËÊçóÍfÓq!¥tÿþý¶monnúÝÙ¶]¯×Y–µm[’¤^¯÷kE(¥ccc¡PÈg×uÝ={öH’”Ïç‹Å¢eY,Ë~ùò%‹moo7›Íp8üøñãÅÅÅû÷ï˲ü{ûmÛ>sæLµZåy!D)eYÖ0Œ}ûöE"„лwï4MÐu]×uI’¶¶¶J¥R<óæMµZý}FÖÖÖxžO§Ó¦iŠ¢Èó|2™L§Ó’$•Ë奥¥l6ûíÛ·@ Ðh4|eYîëë+ ”ÒßBÕj5‘Hˆ¢è“IaYÖ÷+•Цi?þTÅu]Ã0xžavv–a˜OŸ>ý}jY–Íår«««=êëë“eÙ?Þ…BáÕ«W†aƒAÏóB¡Æx||üæÍ›£££®ëþ}j1Æsss 333¯_¿žŸŸyÿþý¥K— „Žã\¹råÁƒGŽ9~ü¸ªªÓÓÓ;*êõúäääøøøéÓ§‡††.^¼¨ëú7LÓìïï§”J’ä8Îüüü‚?õÿßþ(øàRï̺lIEND®B`‚amide-1.0.5/pixmaps/window_thorax_soft_tissue.png0000664000175000017500000000251110336316713022162 0ustar loeningloening‰PNG  IHDRoª¯ pHYs  šœtIMEÕ f³Ö[èIDAT8Ë­”OhOÇßή›][³vØ`”¦tÛ“’Ä’‚ÉA±<Ô*¥7)‚ADzñÐ^$ЃXÄ‹E("E ÑZEÅô`±&ÆÒÚ?6MJ¢iÚ¤›N³;¿Ãôùùó‡—ß; 37¾óÞ›ð?÷ËÙétvttÔÔÔ‚ IÏó‹E×õÉÉÉ©©©ùùyÃ0þ çÎ ƒ „žç@¿ßïÞ=Œq:Îçó’$ÍÎÎŽŒŒBªwùêÎï÷ :u*‹=zôÈf³y½Þ\.·k×.EQDQÄÛív‡ÃáóùE¡”&‰_…Ùl¶7nPJƒÁ óˆ¢866Ç)¥”ÒH$B)}ðàAOOO(¢”Ž{<ž_A¡PèÖ­[ !EQ$II’Ö××é߇UUõz½µµµ@€R:44TWWÇÚÛÛUUM§ÓÇŽëíí ƒV«µ\. ÷ãÇ;wîô÷÷ |ÿþÝçóÕ××wvvþišær¹Z[[Nç¡C‡Z[[=iš ë:‹>räˆÛíÞ½{·ßï‡Ã„™™™¶¶6UU·A‡£¥¥åúõë@Àív···Ÿ8q¢³³!ät:(jšf±X!„1îëë“eùðáÃMMMÛ Qãñø³gÏ:::Xš$I:sæÌÞ½{{{{`jjêäÉ“º®W*„pçñx&&&ZZZìvûvùëëë5M[]]íîîžçB‚ 466Þ¿||Üjµ2Q!›Í&Çq0::ªiÚôôt< —Ë?~<™LRJ9Žc«,Ë~¿ÿöíÛËËËŠ¢D"‘/_¾‹E›Íær¹LÓ,•J„‹ÅR*•¶ŸV(0ÆŠ¢°WEɲ,˲ÕjÅb;wî<þ|WW×ÒÒ“S.—eYîêêJ§Ó @±X|ÿþ}6›€J¥"Š"¥Ô4MADQL¥R™LcÜØØˆ1žžž.‹<ÏÏÍÍe³Ùùùù|>ÿó‹ìÙ³'=z”ˆçùÕÕÕ¥¥%Q½^/ÆØ0 ŒñÚÚÚׯ_'&& …BMMÍëׯK¥’ÀžFQU5‘H¸Ýî­­-VšB¡ðñãG»Ý~àÀÃ08Ž3 cvv6‘H¼xñbnn®»»;“Éär¹íÀË—//]ºtõêÕL&S©TJ¥ÒÇŸ|ØØØØ·o_(zþüyµc~‚Êåòµk×¢ÑèÈÈÈŽ; ¶¶6†!ËòÚÚÚÛ·oÇÆÆîÞ½ër¹GGGYšommmº®SJß½{÷æÍ›ê0"„lllô÷÷_¾|™RzåÊVÙÿþ€1>xðàÙ³g777u]O&“MMM¡žžž|>ŸJ¥†‡‡Ÿ>}ºµµõÐoçùºº:Ó4 !Åbñßi?j^„L`äIEND®B`‚amide-1.0.5/pixmaps/view_transverse.png0000664000175000017500000000234410715155761020076 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME×  (µGqIDATxÚí™}hÖUÇ?{ܲiSS›3Ó1g¾à\*ý¡•Jšˆš"ø‚’s†¨È`V`þg/a nA¾¡þ£›AQ¾+è0Ý’éŒÚKMŔ̹æÓ;ü¸Ýûûýîó<[ÏæýÂeÏî=÷ÞsÎ=÷œsÏ;¤uò~“€±ÀTO_>pM~×Ç€sÀÝî¢ä§u@ðˆ†h¿û€‘]YðÀÛÀBëÚ_ÀN`DWþyàD‚«í7`uGR²1¨ |h.ÒŽ-òûI SCߘÜ~ú”Ä  ÕpŠÛD1&ç;(®øXÃWÿƒómö †[€-­­‡˜|A %'é@®„¨€faÌ‹Làð‚Ò(ŽÆÉß3Àn1/¢À˲§q 4áõ2p;ì¦À[Â|›Fû÷€ýÀ|ÏœMºÀ™K‰ŸjÖÿÙã/† O‹i>ò‚üÒ3?vÏ·4c³-ï|\NëEðŠãTyX,~ Éó¯@‘‰‰Ü8cöuMßË“ÿ^³Æ6…f¤X_ÐÞaZ±ÊÀ ÖgŸ†ë5˜f†…ð¯‹oÑY˜j²{-„¼í3öXä]¸Ü@ô!0ŒÇS°ñû–§Æg­/Ú1éôU`…ðœ+—ÕÚZ¹¾Œ“Ã;Ø ,öaºÌ‡‰Kø)ó¢†þkm-0İÇ`CH]‰ÜWuàÍqz¿fÞ7–IÊ h“ò¢Èd ØëYM”¨‰£ÂkÀ€Åڀ͆þ¨…ÒÆ#J4@ü…Š=âáýÐ +/FE4„- Jïõ»ñÒE$cR- ^ØÎÍO’jãÑ0Sù¬0F$¢õNå…!æÎO¡+07Äc+"9ÇüÉ«†<~°Ïb35YY,çîgÁxn@¨ú*sÊ ´e{}nÊYÒ*Í`µæu—,Ôä Þ6Ïòônú¬uL¡Í H×wƒ”9Ù"ü#Í3ýÅÑC†õ·6ÿ¬&¢|d8ÅC–ÂW%`…Àù€Eš%Ž<*54‡5Yœ²$å=•±Åš×è¡ÍëmáPW©E×4Ÿ\ÿ%`)ð„2V')e“§¯øV〾OÛœ@Én)°]®Šê;¶zþϦ¯iÖù8(Jì0”4_%NÖÙ†RXTz*ÕªÂiÀ{>å³Ïhÿ6„`£˜¸n­ @ïΪ Û¢ÔöV2³V Mû$.«˜¼¢¹J1œÞ#Ôv:Ö‘¼ÏbÞZC]iÀhÚ?s'*x#°Ö²Î˜2è , ýÆ#KÁoŠOɦ›`š”ºðº^ª;Kº“à)† ­Áåþýû¼xñÇC4E–ç¡P(p÷î]¦§§ùüù3}}}D"$I" ‹ÅxöìÙOD"Á… hmmåâÅ‹èºÎÔÔ;;;d2fgg9yò$ííí”J%nݺÅãÇÙßßgww—ññqÆÇÇéììdss“S§N177÷Ó¢d2‰ßï'™L¢( 333,,,ÏçBà8KKKþŸŸŸ'011Á™3g0 ƒ;wî4Ú8›ÍbÃÃÃ(²,FY^^& ‘N§yþü9Á`Y–éêê"°¾¾Î§OŸ°m›ùùyz{{©Õj”J%r¹¦iòöí[’É$BöööBñù|ÄãqlÛ&‘Hà÷ûéî­ Û¶ÙÜÜÄçóa ø‡ÃìììËåhkk#‰Ç9räG¥¹¹™¾¾>”X,ÆÐÐ[[[477cš&»»»Ø¶M Àëõâ8n·I’p¹\ô÷÷S(xóæ MÓ(—Ëd³Y«««Ø¶®ë(@Ó4ÙÜÜdccEQ$‰NŸ>M$AQlÛÆqvvvX[[cyy¹¶m#IÅb‘b±HµZ¥Z­R©TPz{{)‹ÔëuÖÖÖatt”ÑÑQº»»‘e!’$5² àË—/ƒÁFu¡Pˆááa²Ù,Š¢‡©V«(ÝÝݨªŠ$IèºN0$•J5,ù;¼^/Çgee¿ßO>ŸÇ0 ÆÆÆ‡Ã,..ÒÚÚŠªªT«UdMÓÐ4 ˲Èd2˜¦Ù< ²,£iÇŽCÁÖÖß¿GÓ4ŠÅ"¯^½¢V«±¸¸ˆ,ËÈ¢iÛÛÛ¼|ùÛ¶%w˲°m›J¥B:Æ0 zzzH$÷á÷ûQU•ÕÕU\²,ÿÑÖÖFKK ,//‡ …BH’Ô0N–e*• ¯_¿f}}ÁÁA®]»†eY¬¬¬àv»™››ãáÇ^¯·!"Ër#‹jµ~¿ŸT*ÅØØªª’N§ùúõ+ÓÓÓär¹_*€$Itttˆ7nˆÙÙYñãÇñ;ض-êõºBÇqD.—ׯ_²,‹¾/‡ü*—.]"•J100@KK ^¯UUaw0𘙙áÇ¿Ìê*p€ƒ˜njj¢¥¥…p8Œã8|ûör¹L¹\fooïwÛø°ð¿Œ¥A“IEND®B`‚amide-1.0.5/pixmaps/icons.fig0000664000175000017500000003144110715443557015747 0ustar loeningloening#FIG 3.2 Produced by xfig version 3.2.5 Landscape Center Inches Letter 100.00 Single -2 1200 2 5 1 0 3 0 7 50 0 -1 0.000 0 1 0 0 1650.000 5925.000 1350 6150 1650 6300 1950 6150 5 1 0 3 0 7 50 0 -1 0.000 0 1 0 0 1650.000 6525.000 1350 7050 1725 7125 1950 7050 5 1 0 1 0 7 50 0 -1 0.000 0 0 0 0 1650.000 7575.000 1350 7050 1575 6975 1950 7050 5 1 0 2 0 7 50 -1 -1 0.000 0 0 1 0 10200.000 1387.500 9900 825 10200 750 10500 825 1 1 1.00 60.00 120.00 5 1 0 2 0 7 50 -1 -1 0.000 0 0 1 0 11325.000 937.500 11175 825 11325 750 11475 825 1 1 1.00 60.00 120.00 5 1 0 2 0 7 50 -1 -1 0.000 0 0 1 0 11775.000 937.500 11625 825 11775 750 11925 825 1 1 1.00 60.00 120.00 5 1 0 2 0 7 50 -1 -1 0.000 0 0 1 0 10237.500 1237.500 10500 1275 10425 1425 10200 1500 1 1 1.00 60.00 120.00 5 1 0 2 0 7 50 -1 -1 0.000 0 1 1 0 9937.500 2175.000 9825 2025 9750 2175 9825 2325 1 1 1.00 60.00 120.00 5 1 0 2 0 7 50 -1 -1 0.000 0 1 1 0 9937.500 2625.000 9825 2475 9750 2625 9825 2775 1 1 1.00 60.00 120.00 6 6525 4125 7125 4575 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 6787.283 4347.597 6655 4215 6600 4350 6660 4485 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 6610.926 4350.000 6614 4286 6675 4350 6614 4414 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 6707.739 4350.000 6610 4421 6587 4346 6610 4279 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 6600 4200 7050 4350 6600 4500 -6 6 5700 4125 6300 4575 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 5962.283 4347.597 5830 4215 5775 4350 5835 4485 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 5785.926 4350.000 5789 4286 5850 4350 5789 4414 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 5882.739 4350.000 5785 4421 5762 4346 5785 4279 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 5775 4200 6225 4350 5775 4500 -6 6 6750 4425 7350 4875 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 7012.283 4647.597 6880 4515 6825 4650 6885 4785 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 6835.926 4650.000 6839 4586 6900 4650 6839 4714 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 6932.739 4650.000 6835 4721 6812 4646 6835 4579 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 6825 4500 7275 4650 6825 4800 -6 6 7650 4050 8250 4500 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 7912.283 4272.597 7780 4140 7725 4275 7785 4410 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 7735.926 4275.000 7739 4211 7800 4275 7739 4339 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 7832.739 4275.000 7735 4346 7712 4271 7735 4204 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 7725 4125 8175 4275 7725 4425 -6 6 7800 4350 8400 4800 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 8062.283 4572.597 7930 4440 7875 4575 7935 4710 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 7885.926 4575.000 7889 4511 7950 4575 7889 4639 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 7982.739 4575.000 7885 4646 7862 4571 7885 4504 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 7875 4425 8325 4575 7875 4725 -6 6 7950 4650 8550 5100 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 8212.283 4872.597 8080 4740 8025 4875 8085 5010 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 8035.926 4875.000 8039 4811 8100 4875 8039 4939 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 8132.739 4875.000 8035 4946 8012 4871 8035 4804 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 8025 4725 8475 4875 8025 5025 -6 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 1125 3150 34 34 1125 3150 1159 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 900 3150 34 34 900 3150 934 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 1725 3225 34 34 1725 3225 1759 3225 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 1950 3150 34 34 1950 3150 1984 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2175 3150 34 34 2175 3150 2209 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 675 3975 34 34 675 3975 709 3975 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 900 3900 34 34 900 3900 934 3900 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 1125 3900 34 34 1125 3900 1159 3900 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2775 3225 34 34 2775 3225 2809 3225 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3000 3150 34 34 3000 3150 3034 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3225 3150 34 34 3225 3150 3259 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2850 3150 34 34 2850 3150 2884 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3075 3075 34 34 3075 3075 3109 3075 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3300 3075 34 34 3300 3075 3334 3075 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2775 3975 34 34 2775 3975 2809 3975 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3075 3825 34 34 3075 3825 3109 3825 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3225 3900 34 34 3225 3900 3259 3900 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3300 3825 34 34 3300 3825 3334 3825 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 675 3221 34 34 675 3221 709 3221 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3000 3900 34 34 3000 3900 3034 3900 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2850 3900 34 34 2850 3900 2884 3900 1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 1650 6150 300 150 1650 6150 1950 6000 1 1 0 3 0 7 50 0 -1 0.000 1 0.0000 1652 5704 300 150 1652 5704 1952 5854 1 4 0 3 0 7 50 0 -1 0.000 1 0.0000 1650 7050 300 300 1350 7050 1950 7050 1 2 0 3 0 7 50 0 -1 0.000 1 0.0000 7200 1200 150 150 7050 1050 7350 1350 1 2 0 3 0 7 50 0 -1 0.000 1 0.0000 6975 1200 75 75 6900 1125 7050 1275 1 2 0 3 0 7 50 0 -1 0.000 1 0.0000 7425 1200 75 75 7350 1125 7500 1275 1 2 0 1 0 0 50 0 20 0.000 1 0.0000 7237 1200 37 75 7200 1200 7274 1200 1 1 0 3 0 7 50 0 -1 0.000 1 0.0000 7950 975 150 75 7950 975 8100 1050 1 2 0 3 0 7 50 0 -1 0.000 1 0.0000 8662 975 112 75 8550 975 8774 975 1 3 0 3 0 5 49 -1 20 0.000 1 0.0000 6450 7800 106 106 6450 7800 6556 7800 2 1 0 3 0 7 50 0 -1 0.000 2 0 -1 0 0 5 1800 1050 1950 900 2250 900 2250 1350 2100 1500 2 2 0 3 0 7 50 0 -1 0.000 2 0 -1 0 0 5 1800 1050 2100 1050 2100 1500 1800 1500 1800 1050 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 2 2100 1050 2250 900 2 1 0 1 0 7 50 0 -1 0.000 1 0 -1 0 0 2 1950 1350 1950 900 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 750 2700 900 2700 900 2850 750 2850 750 2700 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 1800 2700 1950 2700 1950 2850 1800 2850 1800 2700 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 750 3450 900 3450 900 3600 750 3600 750 3450 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2850 2700 3000 2700 3000 2850 2850 2850 2850 2700 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2850 3450 3000 3450 3000 3600 2850 3600 2850 3450 2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2 900 3300 900 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2 675 3300 675 3225 2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1125 3300 1125 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1950 3300 1950 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 1725 3300 1725 3225 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 2175 3300 2175 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 2775 3300 2775 3225 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 2850 3225 2850 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3000 3300 3000 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3075 3225 3075 3075 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3225 3300 3225 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3300 3225 3300 3075 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 675 4050 675 3975 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 900 4050 900 3900 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 1125 4050 1125 3900 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 2775 4050 2775 3975 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 2850 3975 2850 3900 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3000 4050 3000 3900 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3075 3975 3075 3825 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3225 4050 3225 3900 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3300 3975 3300 3825 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 825 2775 900 3150 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 4 1950 3150 1950 3000 1725 3000 1725 3225 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 1875 2775 1840 2999 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 2925 2775 2920 2959 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 4 2775 3225 2775 3000 3000 3000 3000 3150 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 4 2850 3150 2850 2925 3075 2925 3075 3075 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 2895 2994 2965 2924 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 2925 3900 2925 3525 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 2850 3900 3075 3825 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 2775 3975 3000 3900 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 675 3975 900 3900 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 825 3930 825 3525 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 5250 750 5700 750 5700 1500 5250 1500 5250 750 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 5850 750 6300 750 6300 1500 5850 1500 5850 750 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 4650 1950 5100 1950 5100 2400 4650 2400 4650 1950 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 5250 1950 6000 1950 6000 2400 5250 2400 5250 1950 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 4650 2550 5100 2550 5100 3300 4650 3300 4650 2550 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 4650 900 5100 900 5100 1350 4650 1350 4650 900 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1950 5700 1950 6150 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1350 5700 1350 6150 2 1 0 1 0 7 50 0 -1 0.000 1 0 -1 0 0 3 1800 1500 1950 1350 2250 1350 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 150 1050 450 1050 450 1500 150 1500 150 1050 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 750 1050 1050 1050 1050 1500 750 1500 750 1050 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 900 975 900 900 1200 900 1200 1350 1125 1350 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3 900 975 900 1350 1125 1350 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 825 1050 825 975 1125 975 1125 1425 1050 1425 2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 3 825 1050 825 1425 1050 1425 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2850 900 3000 900 3000 1200 2850 1200 2850 900 2 1 2 2 0 7 50 0 -1 1.000 0 0 -1 0 0 2 2775 1500 3000 1200 2 1 2 3 0 7 50 0 -1 1.000 0 0 -1 0 0 2 2775 1125 3000 900 2 1 2 2 0 7 50 0 -1 1.000 0 0 -1 0 0 2 2550 1125 2850 900 2 1 2 1 0 7 50 0 -1 1.000 0 0 -1 0 0 2 2550 1500 2850 1200 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2550 1125 2775 1125 2775 1500 2550 1500 2550 1125 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 7800 1125 8100 1125 8100 1500 7800 1500 7800 1125 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 7725 1125 7800 1125 7800 1425 7725 1425 7725 1125 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 8100 1125 8175 1125 8175 1425 8100 1425 8100 1125 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 7875 1050 8025 1050 8025 1125 7875 1125 7875 1050 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 8550 1125 8775 1125 8775 1500 8550 1500 8550 1125 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 8625 1125 8700 1125 8700 1425 8625 1425 8625 1125 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 8625 1050 8700 1050 8700 1125 8625 1125 8625 1050 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 3 6300 6075 6675 6075 6675 5700 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 3 6825 5700 6825 6075 7200 6075 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 3 6300 6225 6675 6225 6675 6600 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 3 6825 6600 6825 6225 7200 6225 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3300 7650 4200 7650 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3300 7950 4200 7950 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3300 8250 4200 8250 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3300 7800 4200 7800 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3300 8100 4200 8100 2 1 0 1 0 2 49 -1 20 0.000 0 0 -1 0 0 6 3300 8400 3600 8325 3750 8175 3900 7800 4200 7575 4200 8400 2 1 0 4 0 7 48 -1 -1 0.000 0 0 -1 0 0 3 3300 7500 3300 8400 4200 8400 2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 3 1 1.00 60.00 120.00 3 1 1.00 60.00 120.00 6225 7575 6675 8025 2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 3 1 1.00 60.00 120.00 3 1 1.00 60.00 120.00 6225 8025 6675 7575 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 11100 900 11250 900 11250 1425 11100 1425 11100 900 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 11475 900 11625 900 11625 1425 11475 1425 11475 900 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 11850 900 12000 900 12000 1425 11850 1425 11850 900 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9750 900 10125 900 10125 1200 9750 1200 9750 900 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 10275 900 10650 900 10650 1200 10275 1200 10275 900 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9750 1350 10125 1350 10125 1650 9750 1650 9750 1350 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9900 2100 9900 1950 10425 1950 10425 2100 9900 2100 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9900 2475 9900 2325 10425 2325 10425 2475 9900 2475 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9900 2850 9900 2700 10425 2700 10425 2850 9900 2850 3 2 0 3 0 7 50 0 -1 0.000 0 0 0 16 3465 6105 3375 6097 3232 6142 3300 6247 3135 6255 3090 5992 3180 5872 3172 5632 3270 5467 3450 5527 3825 5617 3795 5730 3697 5970 3705 6097 3532 6112 3457 6097 0.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 0.000 3 2 0 3 0 7 50 0 -1 0.000 0 0 0 16 4470 6187 4380 6179 4237 6224 4305 6329 4140 6337 4095 6074 4185 5954 4177 5714 4275 5549 4455 5609 4830 5699 4800 5812 4702 6052 4710 6179 4537 6194 4462 6179 0.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 0.000 4 0 0 50 0 14 24 0.0000 4 225 240 4770 1223 T\001 4 0 0 50 0 14 24 0.0000 4 225 240 5347 1222 C\001 4 0 0 50 0 14 24 0.0000 4 225 240 5977 1215 S\001 4 0 0 50 0 14 24 0.0000 4 225 240 5513 2280 S\001 4 0 0 50 0 14 24 0.0000 4 225 240 4763 2288 T\001 4 0 0 50 0 14 24 0.0000 4 225 240 4747 3030 C\001 4 0 18 50 0 14 24 0.0000 4 255 480 4222 6030 3D\001 amide-1.0.5/pixmaps/study.png0000664000175000017500000000216410007546376016020 0ustar loeningloening‰PNG  IHDRoª¯ pHYs  d_‘tIMEÔ*7M8ôIDATxœ­•ÏOGÇßÌÎîÎÌÚ€Q¢ìt¡"M®L¥D‚*âÇ¡9ðW4Dú'4'ri‰ä5!—: äDHA¡u±ÉBÙÊ›~{wg½»Óâ´’H¿§÷ž4½÷æ½tofþáSœ ‚Àu])å‡Aív;‚  Ãÿ-<þí[‡õú@{{{SSS÷îß·, òù¼ã8Y–U­VÑ¿ƒ¤”Oçæ^YÖââb;¢(*­­ !>àœBÞù¾oYÖWƒƒŒ1]Ó¢(ò}_Ó´R¤”ãccœ1EQÞyžW¯×¿»qãÒ¥K”1O)e r]·P(´ÛíR©$„Ãð—|þ·Ba ¿¯®lllÔj5 a¶ÛmMUûLÓà|qq±^¯?|ôèèèhµXœ¾}{kkëÇ;wêõºmÛù|þÁƒº®ïîîNOO/,,üt÷nþÉ !„P±Xœ˜˜8sæÌüü|£ÑxöìY¹\nµZ„ÏóÂ0$„¬‹„f³I)Bø¾E‘çyc º®'“ÉŸ> ÃcL)%„$‰îîî/.^ìììÌd2”ÒÍÍÍÉÉÉ‘‘ÆX:N¥Rccc===_c ”ö÷õíìì,--Àääd6›ýþæÍL&£igLUUUÓ4M;Øß¿|ùr&“1 ƒ1–L&E‘Rš¦‰c<>>NYYYªë©T*N#„„”1!„¢( !®çuuvRJ9cqîÛÕ*gŒsŽÀ¶ío®]Û?8ÃÐqFi|©ŽãpÆ<ÏSU#E‘¢(¾F"1fŒýiÛ½½½! /^¼h6›W¯^¢H8®«¿¹.ãÜu]UUBQ@ãø˜sŽ2 ã•e™¦y2GFãm³©ë:¥#$„ „ÔjµÊö¶çºDQ^ïîRJ Š¢V«U.—c`pnÛö… €ÀÛfó×åeÊXWWÆ8‚R©´üòåèè(QÕJ¥²óúu«Õò}ß0ŒÙÇ×ÖÖR©$ Ã0b›€âéÜœ‚ñ·×¯ç|}}cÜ›N;ŽóÇæ¦¦iš¦9ŽsþüùååeÆØN­&¥ä†Ñsî\œ,‘Rªªª( ç|xh(ÞÉD"‘Íf?ïï?<o­¯ …O•·¶‚ h4'Éžôe6«ªj.—‹]ô)ß‘”¡“·û/°)Ú`&7NIEND®B`‚amide-1.0.5/pixmaps/window_brain.png0000664000175000017500000000320110336316713017316 0ustar loeningloening‰PNG  IHDRàw=øbKGDÿÿÿ ½§“ pHYs.#.#x¥?vtIMEÕ 4#¸Ù„þIDATHÇ…–ËkSíÆûžì\5i“ôjhk%^ EÛDA¢ªѱýÎàHiˆ ¢ƒB ÅJØ HÅØÒ -µš6iÌNÒ콓÷ æ=ßw΂ïh­õ¬õ¬õ¼ ø“$‰cÇŽ144Dww7mmmr¹‹‹‹d2Þ¿OµZ噸Ó%IW®\Ÿ?B±¹¹)Þ½{'¦§§E.—ÏŸ?¯^½bwwWÆÆÆ~G ( ™L†R©D&“AUUÇ¡^¯S(øøñ#Íà–e±´´DOOÁ`ǃ,ËèºN$¡¿¿Ÿ‘‘~üø púôiÒé4óó󘦉뺨ªŠ,Ë‹EVVVX]]åÀøý~²Ù,FƒžžLÓd}}Ó4QU•½½=FGG¹~ý:>DV…7n IËËË!pI’PU•ÁÁA®]»†ªª|ÿþÅÅE‰wïÞ¥«« MÓˆF£ø|>ÖÖÖ˜œœÄ²,Î;‡$IÈ^¯—Ë—/S(h4X–…a†ßïÇu]’É$Ó4Q…––@ǃ®ëÔëu<O“étMÓ‡††ˆF£ÌÍÍ!I~¿Y–{—ËeFFF8qâ½½½ôöö¢( B<^¯—OŸ>±oß>z{{) ´´´ …GGG¨×ëlll`Û6õz½I3ÇqÐu£GR­VI$´··cÛöo³BÇéîîÆëõ¢( ‰DYUU„x½Þf¢ååeªÕ*Åb‘jµŠY–Y__§R© I¶m“Ëå(•JÔj5:;;‘$ ÇqX]]E×uŽ9‚‡)•J b±®ëÒ××GµZ¥R©à÷ûÑ4_˨ë:š¦áóùp]—B¡@kk+†a`Û6²,Óh4H&“ÈŽãÏçÑ4 MÓ¨ÕjX–ÅÎÎNsŠÅ"óóó\ºt‰ŽŽ²Ù,Õj•Z­†Ïçk¢p]—`0ÈþýûB°µµ…¼´´DGG‘H!õzEQØÜÜdaa¡Ùç`0È‹/˜šš"™Lbš&Á`r¹L­VÃï÷cÛ6¥R EQe™—/_¢¾}ûEQˆÇãlnn …(•J>|Ó4±m›p8Œ,ˤÓiº»»›ì* D"4MÃ4M Ã@Ó4‰Ùl–íímä/_¾099Iggg󘦉,ËÍ}øEÕT*…ªªX–…¢(„ÃáæIqY–éìì$‹155…®ëÈFƒññqŽ?N8ÆëõâóùPǃmÛÄb1r¹ß¾}Ã0 Ç¡V«¡iÁ`UUñûý¤R)òù<8Žƒ"„øÇÚÚKKK\½z•ŽŽŽ&…(Š‚$IH’€×ë%‹Q­Vq¿ß×ë%•J188ˆ‚û÷ï333ƒëºÿÖƒh4ÊÙ³gyöì®ë²²²ÂÚÚ®ë6O¯ªª„Ãa~þüÙ .I$‘HP.—¹}û6oÞ¼Á²¬ßG’$EáÔ©SŒ300@±X$—˱³³ƒëº˜¦I<§T*áº.¡PˆÖÖVt]çõë×Ü»w *•Êß‹¾a"ˆ;wîˆùùyÑh4šþ§Õëu1==-.\¸ |>ŸÐuýÿ‹þ/4¿†ÛÖÖÆ™3g&•J±··ÇÂÂ>|`nnŽíímlÛ¦V«ýå—åŸñ[ä›:Ю”IEND®B`‚amide-1.0.5/pixmaps/window_spine_a.png0000664000175000017500000000203710336316713017647 0ustar loeningloening‰PNG  IHDRoª¯ pHYs  šœtIMEÕ `öÚ5¾IDAT8ËTËK:_¹wÆqÔquLEŒ/-¢ô³×"[н Mmúsú*hצ¨E‹FE(* ÄJÈ^ŽáäcÔœ™ÆÑßBøòý¥ ŸÝ½pçžs>EþEE¹¸¸°ÛíAìíí‘$é÷û#‘„°¿¿ÿå奻»ûã㣣££X,þ‹…Èÿ' nmmŽŽ*Š"IR.—ãyÞf³µ¶¶ªªJÓ´N§[ZZ ‡Ã¿€Ø¯óÙÙ†aÅbñððÐb±È²Ìqœ$I4M ‚àóù–——šÁj¯TUÅq??9Ž+—ËMy„ ÈÑÑ„ðõõ•¦iA2™ I’ÏÏÏÉdÒjµÖ…ÔOçùr¹L’¤Ýn§iš¦é¶¶6–eËå2Д"EçææDQŒF£þüÑjµF£±êq¡P(•JN§3‹ýBÕi˲kkkEétºÎÎN·ÛMQŠ¢4MW*†aÚÛÛƒÁ`cEÕú±,ûøø‡ãñ8A‰DBÇ{{{766šzZ4M¥RZ­6NG£Qáððpµîƒ¢¨›››Z¬ÿââ¢Åb‘$I’$ƒÁàñxL&“ÙlÆ0,‘HD"‘···¦â¿½½½¼¼ ‡Ã’$iµZŠ¢Aàyþýýa˜±±±ÓÓÓ¦ˆ®®®¼^/EQ Ã0 ƒaXWW—(Š‚(Š’ÉdP­T* ˆ4ÇãI¥RÙlvppÐ`0@{zzTUå8îüü<ŸÏWßÀ£@ 0??/‚N§›œœ´Z­.—Ëd2¡(J2™E±ºÏ š=00Éd¦§§!„ù|^«ÕÆb±‡‡ƒÁà÷ûEQœššú]ãZ"Š¢VWWWVVÖ××K¥’,Ë‹%ŸÏ˲ìt:Ýn÷ìì,Çqétúï&`VÇ£|>?11ãøøøx*•b¦úéªÚÒÒÂqÜÐÐÐööö_‚ „€$ÉÚ]lnn†B¡P($Âõõu:ŽÇãOOO»»»^¯—eÙj,$Ibø ¿hOzÔIEND®B`‚amide-1.0.5/pixmaps/window_lung.png0000664000175000017500000000260110336316713017173 0ustar loeningloening‰PNG  IHDRoª¯ pHYs  šœtIMEÕ u8ö  IDAT8ËM”ÏkMÇç×îd×lh¨5?¬k-顭ЂA/sEÿ oâ? Ø³Šˆ'/‚Š6[±½ˆIcŒ6?Ü&ÝÍdw2»3ûæ}Ã;§ÙÝ™çyöû|¾¬×ëÓÓÓ†a „”RJ)„„H’Dïÿ¿Ñ+Š")%BèÇ>„A „LÓ„ê@BŒ±”€J’dT?Žƒ*¥„€ýý}(¥Ô' „¾ï×j5@¡P˜œœB¤R) CBBh0@-Ë"„`Œ•RI’!à8¡ëºÏž=;88 „PJ/^¼¸¸¸H‘RB¢(êt:›››q†‘ÉdÎ;733£ï*¥ .Õ÷ýÃÃCýáÈ‘#¦iÞ¾}Û²,a’$AlllpÎ-ËÂsÎ)¥år¹X, „HJ)¥|òäÉß¿ ÃÐÇqA§ÓÑ¿CiµZŒ±0 “$±m›ÁóçÏ}ßWJRjss³Z­8ç£ÑH)E)ÅÿüùSgSJ•J¥›7of³Ù|>¯£ÄqìºîË—/ÿ탔r{{[JÉ9PJƒ H§Óšƒq¿(¥ÇŽ[ZZr'“É„a¨ ÜÝÝm4I’ n·Ûívã8ø¾ïº®Öc¬O4 ÆØéÓ§wvv´²¦i !>þ !DûûûQA£(ŒF£ »ÝnµZ}ûö-cLë]«ÕªÕj¡PÈf³œs„çBØjµ „äÏŸ?q[–ÇqÇJ)Ó4¥”–eår¹J¥’N§gff¢(züøñôôtµZm6›QA@)B4›Í$IP£ÑB8ŽCÑ-㜟={öÊ•+ÛÛÛׯ__XX0M“s^*•¾ÿ~çÎÃ0Â0FŒ1¥”çy½^´Z-„cLªñ[XXX[[;þ<ÆXÛʲ¬k×®)¥êõz¥RéõzB)%„!äº.aŒ !|ß׺j?~<Š"Ã0ôJ©v X,®¯¯·Ûm×uu£µÃP6›•Rš¦iÛ¶&èĉ•JEk¯/'I‚1Öº>xð`kk«Ýnkë*¥R©T±XDóóó¦i†aÈ9׌ڶ½³³ÓétÆÇÈ·oß|ß§”úý¾ïûqÏÏϧR)´²²¢”Òž²m›Rúë×/Îù?ÆøŒcíííMMM¹®›ËåB”RáÜÜç9sfbb‚1¦9–RNMMAøoiác{{{A8Ž“N§1ƆaÌÍÍ…aˆâ8^]]B¸®ëyÞp8üýû7ç¼^¯eŠã8I’¯_¿2Æ8çÃá°Ñhø¾/¥œ=zôè`0@Q]¾|Ù¶mÃ0 „BŒ1!d8¾{÷N¡yùôéÓû÷ïs¹ÜÁÁçyžç†aÛv¹\&„<}ú߸q£P(œ:uêË—/ºÇŒ±Ñh”$I³Ùì÷û¥RéÍ›7¯_¿¦”ƒÁ` ý!¼zõêÒÒ’çy÷îÝÎ㬭­åóù•••ÝÝÝÁ` ¥ÄkQjµšã8?~t»Ý 4„€r¹|éÒ%!Ä‹/^½z…ëõúòòr>ŸÏf³ëëëý~¿Ýn+¥ôH[]]]^^ž­Õj¾ï#„ Ã(‹·nݺp႞÷ïß÷<žï÷œ¾‰“3.‡øý–$+#c$Oömàäm,–<Þ™-’^ÖpêfÁºÌ¤müq{r°:s0ßw&“ðUæÒIøŽ?ïà1|‘9’§~×pzOà³ÌÀ|É™{x+2@òðþºÇñqæ`,>Çý<‹2NÂלZÌ3x/s0Ÿrn /`yæÒë„O8û0/â¹ÿ™H?"Wpféy„l¤ËáC<ÊËxû“02Hþ3p?ÉKx#sé±Oñ*ÞÌ$ÀX|@<Ç+xçú¼±Óe›¸7GÌúŠAÇ"b/q˜ØU[ìÕ9d,«§2½Ñ{àYï‚©Áâ`/v¼")a;®Ç]g[PÑT?Áˆàª`Iðcp"Ýÿê!þ"–Sûß©wå[Ë8NòŠ¢ÖÝ?-éb¬äÍÏ€·= V»« œ¦ƒ®n^˜^[è L­SO{ªgLEÞÊ1oå*qÊx<ŠÒ`û°‚±Á¤àPF㢓xž¸›]˜,¹[µ„~\‡žËð¬dš>ðÄEƒpSÞ·aue°1ÄuÄjöÛ3 ~¼“ÃK‰™Ù\Fakƹ/ ‡“*=MlɸÓi:,ïLºœ-R³&´&§³3Î Ç;E°¤2кڅþ"Ø–¦ ð"³›ˆƒÄ{Ù¢‡jÀº:ã j@îÿk1_Jư;ùôCæ¶%­üÜlSÕÍÄ•’Æã|£_Ktíéö æ;ƒßjU‹}é“3ñ<­Á‰Ä#ÄVâ8û3Ú‚ƒ¿²a1©¶ s²œ‡¯Ð‰OpGš¿bñ±Y2xÉ(ô©`UpOpnÍó²ÆºÁMç^Z¯µÚ€÷qžI¸óm6ßG{A?y ›ñY‡*ò¯É8þpv¨†¨;nµX ~.’ŒÍg3j$s*ì­hk1§fð*Nå·–IµϨ{?Žiý÷|$yöÖôåoÁ©t쯑×èÓq4#n?ƒvƒ›$tJú³|ð$ VÍQÉ”UÑ,IÓX¨¢Á¸–x€•l÷ð@ÔMV#¸3l‘’Eµè‚.ŠrAB Ai‘nBhݲ‹¢µŠ "Š ²¯l‘]„ÒW%n*. ’ŠˆŠ7l~ßâ3ù•Nã̹̌~›3çÌ9ÏóþßóžË ð/ÅÊ[²‚ìh2V|FY–π̟dÕ/§éh²“>hMþŸ€×ˆ»ˆ4´éIŸ´¥î‚^ÿ!@ˆûˆL¼|Iï^d‚¤!"RC’atÈ^¤‚áà â1" @NÃçY Ç àÿ.@ˆÄZ´¹ Ÿ ´¯µü™!ž!2àO°k‚ðg€ž-¹!Z9èò>è̵.¿<B<Ý'øã¼;äþtÐó0ðË ÄK„ïâ´ò€w>ÐË¿ÀG'@ˆ6Ä:t›â~еÔ|ô„x‹ÈF@7ðù@w6èm„ð± ¢±!Ô <„/Þmµ/>vBt†® Ý@¡ð…@·Ô¹Lx{áGä!àƒË•P|Èù£€·O€U ¹èŠ\€/zr£lyûÑØˆ€>`‹ƒð[€¾ îàí Dbs¨;;_ |Ø êŠÞB¼Gä# (µ¾èͽ·Þ9–„|Jl€/¾Øï¬KB!>Ûb€ß|.´ÞyB| UÂ7`{ðÛo 6û#@ˆDQH¶e¶ü·"Pðî ¢Q‚€~ "ø  ¿Ôë¼»¬îPŒ€ , |0PìPÙ{'@ˆOˆÒ„]‹ÀïJAŸ†÷F€_[0ì^¿Ü úâ¼w„è UÂ`g0?JA}.Á{+@ˆïˆ2 Ãe ï.Â/êÉkŒ€K¡÷xy—‚«¼X¼àꡢ¤>¸Ê«ÅÝ.ÐaËËQ¿Iy9ÚêHúk€ß|dÙ¹Ó€K&ýýf]N oxâ_À+Äz´güoepÐü¶ô*é¼1/Pwì@CCÂ[2Ûø@o’F@›™t±oYÞÊȈÙ6s9âWÀsÓò{÷¢áá¿Ã[6ûø"øÆ¿ÚkÐht4rx+££fß5U‚³ž˜Ïg••‘•}¸îPY‰²AOFÀSÓç÷ïGããÑÃ[7ÿ• z÷™y‡£±±Øá­Œ™ÿL=Š[-fbUU•½ð %TU¡¬%æüx+à"9‚¦¦ì‡·25eŽ‘z7î™ÙdÕÕδüb•P]Ö‚îy.àŽêŽE33ÎÃ[™™1Ç\ºã™€ÛˆÕèøq41ἕ‰ sìÕ Û® ¸eæ;†&'݇·29iÎ!tË57ÍŽ'N ÙYïà­ÌΚstÓq7Ì8_SãmË/V 55æ>á†c®™Yä'O¢ùùø·2?oÎ-tÍv׫Pm­³ã¼÷ µµhèº-ˆ«æj_WçîPËYWgF‡« @L®˜êëã³ìÃu‡úzsîW¢@\6-êšžNx+ÓÓæÜWƒ./R á\4?64$øïih0,#Ðllãcœ·ã>¡±Ñ<@5‡ðqÁ uMM‰Õç#¹&45™!òèç¢ΛgΠ@ yà­† Ðù?B)ièìY47—|ðVææ cZ :bY8xš›Y˹sà~ X©Ë„–ÚütaéIEND®B`‚amide-1.0.5/pixmaps/Makefile.am0000644000175000017500000000252311723016711016162 0ustar loeningloening pixmapdir = $(datadir)/pixmaps pixmap_DATA = \ amide_logo.png \ amide_file_logo.png EXTRA_DIST = $(pixmap_DATA) pixbuf_csource=$(GDK_PIXBUF_CSOURCE) BUILT_SOURCES = \ align_pt.h \ amide_logo.h \ fuse_type_blend.h \ fuse_type_overlay.h \ interpolation_nearest_neighbor.h \ interpolation_trilinear.h \ layout_linear.h \ layout_orthogonal.h \ panels_linear_x.h \ panels_linear_y.h \ panels_mixed.h \ roi_box.h \ roi_cylinder.h \ roi_ellipsoid.h \ roi_isocontour_2d.h \ roi_isocontour_3d.h \ roi_freehand_2d.h \ roi_freehand_3d.h \ study.h \ target.h \ threshold_style_min_max.h \ threshold_style_center_width.h \ thresholding.h \ thresholding_per_slice.h \ thresholding_per_frame.h \ thresholding_interpolate_frames.h \ thresholding_global.h \ three_compartment.h \ transfer_function.h \ two_compartment.h \ view_transverse.h \ view_coronal.h \ view_sagittal.h \ view_single.h \ view_linked.h \ view_linked3.h \ window_abdomen.h \ window_brain.h \ window_extremities.h \ window_liver.h \ window_lung.h \ window_pelvis_soft_tissue.h \ window_skull_base.h \ window_spine_a.h \ window_spine_b.h \ window_thorax_soft_tissue.h ## window_bone_icon.h \ ## window_soft_tissue_icon.h \ .png.h: $(pixbuf_csource) --raw --extern --name=$(subst .png,,$<) $< > $@ CLEANFILES = $(BUILT_SOURCES) DISTCLEANFILES = *~ amide-1.0.5/pixmaps/roi_ellipsoid.png0000664000175000017500000000333510715444000017471 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs  šœtIME×  ‰šçjIDATxÚÝ›hUeÇ?ÛKçjæXÍårBd¨ , ÂlHN–-Ì”¡’  (e‘±"( ²‚° iÕtó«Ìˆ4+#ËPÓt:µ555ΦëóÜ|}÷¾÷žsï9÷ž»/ØÎyÏû>ÏsÞççûÜ,RƒñÀ0àq @{V ´j÷š³ÀNà_2À4 8\z¸N-À`dØ™ÎJ€õòE{}¾ÎÛ€éÀ€°1ÿ(ðCLÛ®3À*`h²„g%ùþ(à` q1þpZ»×*v Š[´ÿcáo`ðYªmEX üçK]ñP»˜{Œ ÔËñvÄ—sû‚"`{‚¾V¹>¬— <4]1Ö< TÍüà…€ë⾦9­_¬i¢á*°È bñÀeËÂ'Ä:§ ÅÀVaØDO£O»ïT‹‘1-V+z›,Ú,t5ù%„æÛŧ%À®;!/Y7mûÃÀèÅ!¹€™„°9ko2xmÀ]!Dë,†Ñ³wˆX\Ýá2¯ Á´®yݱk-:?šð#Ød ÿ0ÜmxkŠð‘9(±x‡gݼ¼Óâê2 â„KÀ¸xY]!ÈDf¤ÊÚ’ÀlCJ{=Åžß 4á>›Þè›É|Ì5ðUchrSûŠÐKmÃô^«!¥Í¡`©áãVª¦¬¤ÿ ÈÒ¿‡ò…çh/\ôÉõÝ Œ¿§÷¸|ïð½üýðg’t´ß+÷*€ü¨fi/ìê%"6ãnÙ^Ã5ôHEÇ­Þæi8+Fù˜¨g§x)·Ø¢  (ËÁ9´ayÀLàA™£\yÖ üì>‘{R»sÉE–±85ÂÛ7•1_¿JàÖ"AN,|!à6å^9"]ÿË,“Ü!n¥AÔ¤WÂæÝÀË8'?ù8•Ý |ÌràKÅp_šæ 6ì×øÜð–vó,7WX³ÉÀ8%í^àð®HpT[ì½bèN ­“…vk¼v"RPoîW^X¢¥Å[€†‰Ã‚ñÀ Ü(šn¢xÞ°Ûûà°ø]þÿY¶wɤ¤ €GD„—ÅÀKn; HŸS‰1Àû8g‹]n°/ͺj-5Cv`?myG$˜É_¹¤ô6;@½º$ð¨Ôˆ—Ä*%Ôí"þ¹b\èYTäÓ‘1šj€ŸðvÔîIº¨·Xš¦Keíz¡%Ñ^ƒ>h“D¡ÅP‹Õ½ÑŽs0¹Z‚“±>í’ˆ2ßjY£]ÖtËä I‰ßÖŸeOJ©â~àG`"0X&å%¯qÀœš<8=.ßËæ+˜˜€à®Høº”ú:%È«Œi¶å³ .>'um0‰^$.Òèbð£QÓIíA}Œ„d(ðŒx†ã!`ø¼dž¯“$•6a†áÝŠèÃän0˜¼|ŠÓt9@f¯É¿Ij\áÁo0¸÷1YJÒ³AÜ<„sìì÷JR¬ÔФ"äÊúǯnÉëÁyI§£Ø¡}G¬j£.+G÷r ôqý*ÉoTþV胶¶Ha?ȲÅË©¼uKÕé&L7èܺ~ €I¾6Ùrè3qªC™ˆƒªlƒWoÍ`æçI@¤‡ð‘Xní}[Lf óÅÀÃ}*Þ‹³0÷•dóÌýBnÊý °Ivásóa€xÚ@ÿ Ú\oŸ£†IÖ‡¸"E…%Sœïu¢jÌ­¨u!ÂLK(ÞD‚'Ýk,1ùúªC……ùc$QÙΓ¸×L„Á0FDçM۾ËÞÇ*26Y„ІӕNWWg¡í–^ D…`Û Wqº±§!È9b¡©ÃOæUuØŒ½Gÿ ÎéìÀ™Î–ؾÁá©:?!HÉWKa"VIj©¡$åGJÛ§`ÒDŠŽòFÓ·óJ¿.K‘e‰. ‘2Ö1p×c¬uEü¼gW—ÌiïpœS¼JüNÒ.àIDöÄ[ _ûV—™h£”äö¦ËÃi?Mu1tŸ›Ä&UÈâÆÑÔÉ™î–ø£ŠpÍÝ„aÜ8œìðéèáìŠ ¯ ;>òq®ÊEŸM?Ÿ7!úóùÄ× ŠÀÿ–²ÿ.ËTاIEND®B`‚amide-1.0.5/pixmaps/window_spine_b.png0000664000175000017500000000201310336316713017642 0ustar loeningloening‰PNG  IHDRoª¯ pHYs  šœtIMEÕ :QïSêªIDAT8Ë”MH:]Æo£Ž6¨Mãcb˜_C.‚"?6RBmÚ´ Wm¢]›ZAË–ÑBjSm¤MTH!XÚN‰BKMÅGócÆÉqþ !^z­|V.÷áwŸsîÿÑÊÊÊââb(R(AX­VN÷ôô”Éd|>ŸÁ`ØÙÙ™˜˜ˆÇãà©T*žç£Ñh>ŸÏd2¡P¨T*ñ<_*•†I$~¿Ÿçyžç{^‡¾*§ÓI’d0Äq|{{ûìì,‹íîîúý~“É$‰777=„_Õùù¹Ãá¨Õjn·AN§FS©”Çã‰DõzÇqÀÜÜ\O#ÁWÅóŸgYöúúš¢(³Ùl·ÛI’üƒ¨«V«U*•jµšÙlfY†aŽãòùüãããëëk*•ú)âF†Õj5FÓl6!R©T0 7›M¹\.8Žûãi]Y,©TJ’¤Ùl^^^&B¡Pð<ã8Çqjµ:‘Ht:ߺÖÕìììÒÒÒèèh.—Óh4z½> Q% -Ëôô´D"é‹ÇñÕÕÕ£££l6›N§¢Ñ(EQ‡Ãáóù‰ÄsÔÕåå%@,cV¯×õz½Ëår:AÜßßW«Õ~ÃfæâââååeppeY‚ºW«UŠ¢†††~2úNÄó|:fF&“u:¹\®Óé ˆçyAú5‚axrrR¡P8N•J¥T*µZ­Á`@Q”¦i­VÛïÓ¼^ïÔÔ”ËåÂqœ ljD”Je¥R) (Š"Òl6ÿ&òz½&“iaaeÙ±±1@&“y{{cÆív£(* û":99±ÛíÙl6ƒÁ‘‘™LV*•hšÆ0Œ ˆ¾æèùùycc£Ýnçr¹ÏÏOÇ×ÖÖl6Š¢Édòöö¶/"š¦ïîîÖ××Y–m·Ûår9 ]]]1 CQÔðð°\.ï õ=#Žãhš®×ë Ãt7Y£Ñ‚a˜¦éŸþG"@P­VÅb±H$ÂqÃ0ÀÖÖV,ÛÛÛËårív»/£ÃÃÃ@ Ðh4¬V«Á`0R©T§Ó *‹‰¤gû¾áœžž‹EÀÌÌL&“±Ùl­V«{Z,777³Ùl2™,—Ë¿æçç@<D"F£‘eÙJ¥?>>nµZÿ_Iÿ¢Ò, MBîIEND®B`‚amide-1.0.5/pixmaps/layout_linear.png0000664000175000017500000000142710715156342017514 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME× WËKû¤IDATxÚíØ_h—UÇñW³%Åe…¦èÍ`D¥°;¡ ƒÄ L‰!oL°nõ¦µ¼åU† ¡Ì. ¿w“¨54Xé(La)á Óuóü¿ßÏíyž ¶}ßpøßyÎù>ßçó|Ïùžó$I’$I’$I’$I’TF7Æ**Ý5v«ÐîXË|KÎÀ=΢«DmhrýUüVÀn>š)Fp¾ÄØf\Ä`» Ç+9ðv…ö>ÆíÙ&À‡Ú;>ç'Ü*`cq,*³> ¼…ï ØXƒŸçb|Ë\»‹_KÞûq¼õ¯ñL¬ú¿Tð\íØ…VœÄˆîo&vl–z™ze°6•`;.ã}¼ô%^¯àá·àžÀìŧöÍXŸÂAüõÍX„|GñžÄ³±¡y´¢¨ÞØ„N¼€ßun&À ÜÀ0þŠ0Æq}eA»p*"ì¿hûç°´–࡚ÿ7q¢ÆïI¯·1T§}×JDÀóñö'²-/Ká à‡ØŸ\šjlDoöë1¿ :ø0þ­Ó~£pø*RôôcýT€{uÚÆ’Eh²ox úBàwñ2VÅlg¦ƒ>¼ `-«qkKÚ_ݦùÂFÑu¿Óà |N=Ïp&æTQ>‰ù~GbqêÀÖÕ‘’ŒâµðùRØn ѧ,ÀX„S‘ ÊðO8µ'„XÛðø"6Ye8¹¿=¢¡Ç¥Âû ð'Þœ†i0Š}Qªæ`ü~7™Îóþ{@~©©)qž¬›¯ÐY¡½¿g£‡rÌEpZiÅ‹%Æ6£m}ê±v&ØgýéàóœI’$I’$I’$I’$ÉÔøIm£Âlò&áIEND®B`‚amide-1.0.5/pixmaps/panels_mixed.png0000664000175000017500000000155710715442050017313 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs  šœtIME× 4w™rüIDATxÚíÛ]ˆVEðß~)á²¥fi ™«H’a jHA´ ~D±â… K·JäMÁÒe â…µ°]„7ÝÈ^D ]¬â}Pi7jHa Q‘¹ên3Òòâ¾ìû¾ç{æÃûž3sæyæÿÌ33gæ9mòÅr<…•èÅbÌÇê)ʃk¸‚óøßâBÌ?Šï±_I±ýø—q-¦Û±®OñW¼w‹²P¸-ƒ:ÅìÄ Ìž”7­8Š?ñU¼:^×b=:± à,ü»”ýoâ‹{eí58Œj,vƒxe gN$æê]zÇöedÈi¡=6l4 ¿£ÈYìÁ’X&k<‡uÜd Š `h’Ðë8‚ "ÿ1<·ñ>Žäå¨ÏÏx-o%ž‰#ô8¢—˰oáI Mƒ/,ó.M‘·4.ž ÅDÁi Ž.EëÓ^u謹>‡ñä,Åà >ó{Wiu-³f*èΉèCM¸À¡œtéN.PÓ‰€D@" H$‰€D@" ¨jw„ŽËgGèñ&žéÃÓy½–€gKdœ 8 ´asÁ2ÏãbWé•P:fX{ +7…ø…ÊaDØï£ŠïÂß‘€ÕU$àùØø+x ‘•à‡+ú¹æ–5úâï)!|gÚ(Óñx³x¿Åú_­âJp›púü޵ò24§¬ñ²š#é Ñ#mÁû¸Õhe:oÃþÐlx]s¿»À.l¢Uû…¸âÊð:>ŠÿðuU^‡Û±;vý.¼«Åh’2BègX'|k0<©®÷ZU¬³¤VîÁvìBæ Qãk1ÿb¯­Þ2ÊÔVáü1Å"j'³\ë—¡tbƒ¾©Î¸ôkìò³Pî5¶F?ïÀ—–ÙxL“Ê}—uãËÒ†êä­ˆ„¯ÌDêáǘäô™¶Å‰€D@µQ; Ììä̾_¸”\ P-ü‚ú°¿bˆIEND®B`‚amide-1.0.5/pixmaps/compartmental_models.eps0000664000175000017500000001350210007551116021046 0ustar loeningloening%!PS-Adobe-2.0 EPSF-2.0 %%Title: compartmental_models.fig %%Creator: fig2dev Version 3.2 Patchlevel 4 %%CreationDate: Mon Feb 2 14:42:22 2004 %%For: loening@prop (Andy Loening) %%BoundingBox: 0 0 187 185 %%Magnification: 1.0000 %%EndComments /$F2psDict 200 dict def $F2psDict begin $F2psDict /mtrx matrix put /col-1 {0 setgray} bind def /col0 {0.000 0.000 0.000 srgb} bind def /col1 {0.000 0.000 1.000 srgb} bind def /col2 {0.000 1.000 0.000 srgb} bind def /col3 {0.000 1.000 1.000 srgb} bind def /col4 {1.000 0.000 0.000 srgb} bind def /col5 {1.000 0.000 1.000 srgb} bind def /col6 {1.000 1.000 0.000 srgb} bind def /col7 {1.000 1.000 1.000 srgb} bind def /col8 {0.000 0.000 0.560 srgb} bind def /col9 {0.000 0.000 0.690 srgb} bind def /col10 {0.000 0.000 0.820 srgb} bind def /col11 {0.530 0.810 1.000 srgb} bind def /col12 {0.000 0.560 0.000 srgb} bind def /col13 {0.000 0.690 0.000 srgb} bind def /col14 {0.000 0.820 0.000 srgb} bind def /col15 {0.000 0.560 0.560 srgb} bind def /col16 {0.000 0.690 0.690 srgb} bind def /col17 {0.000 0.820 0.820 srgb} bind def /col18 {0.560 0.000 0.000 srgb} bind def /col19 {0.690 0.000 0.000 srgb} bind def /col20 {0.820 0.000 0.000 srgb} bind def /col21 {0.560 0.000 0.560 srgb} bind def /col22 {0.690 0.000 0.690 srgb} bind def /col23 {0.820 0.000 0.820 srgb} bind def /col24 {0.500 0.190 0.000 srgb} bind def /col25 {0.630 0.250 0.000 srgb} bind def /col26 {0.750 0.380 0.000 srgb} bind def /col27 {1.000 0.500 0.500 srgb} bind def /col28 {1.000 0.630 0.630 srgb} bind def /col29 {1.000 0.750 0.750 srgb} bind def /col30 {1.000 0.880 0.880 srgb} bind def /col31 {1.000 0.840 0.000 srgb} bind def end save newpath 0 185 moveto 0 0 lineto 187 0 lineto 187 185 lineto closepath clip newpath -71.1 239.8 translate 1 -1 scale /cp {closepath} bind def /ef {eofill} bind def /gr {grestore} bind def /gs {gsave} bind def /sa {save} bind def /rs {restore} bind def /l {lineto} bind def /m {moveto} bind def /rm {rmoveto} bind def /n {newpath} bind def /s {stroke} bind def /sh {show} bind def /slc {setlinecap} bind def /slj {setlinejoin} bind def /slw {setlinewidth} bind def /srgb {setrgbcolor} bind def /rot {rotate} bind def /sc {scale} bind def /sd {setdash} bind def /ff {findfont} bind def /sf {setfont} bind def /scf {scalefont} bind def /sw {stringwidth} bind def /tr {translate} bind def /tnt {dup dup currentrgbcolor 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} bind def /shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul 4 -2 roll mul srgb} bind def /DrawEllipse { /endangle exch def /startangle exch def /yrad exch def /xrad exch def /y exch def /x exch def /savematrix mtrx currentmatrix def x y tr xrad yrad sc 0 0 1 startangle endangle arc closepath savematrix setmatrix } def /$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def /$F2psEnd {$F2psEnteredState restore end} def $F2psBegin 10 setmiterlimit 0 slj 0 slc 0.06000 0.06000 sc % % Fig objects follow % % % here starts figure with depth 50 /Helvetica-Bold ff 300.00 scf sf 2325 3750 m gs 1 -1 sc (k) col0 sh gr /Helvetica-Bold ff 135.00 scf sf 2430 3795 m gs 1 -1 sc (12) col0 sh gr /Helvetica-Bold ff 300.00 scf sf 2250 2025 m gs 1 -1 sc (k) col0 sh gr /Helvetica-Bold ff 135.00 scf sf 2355 2070 m gs 1 -1 sc (12) col0 sh gr /Helvetica-Bold ff 300.00 scf sf 1950 1125 m gs 1 -1 sc (k) col0 sh gr /Helvetica-Bold ff 135.00 scf sf 2062 1178 m gs 1 -1 sc (21) col0 sh gr /Helvetica-Bold ff 300.00 scf sf 1950 2850 m gs 1 -1 sc (k) col0 sh gr /Helvetica-Bold ff 135.00 scf sf 2062 2903 m gs 1 -1 sc (21) col0 sh gr % Ellipse 15.000 slw n 2687 1513 300 300 0 360 DrawEllipse gs col0 s gr % Ellipse n 1575 3225 300 300 0 360 DrawEllipse gs col0 s gr % Ellipse n 1500 1500 300 300 0 360 DrawEllipse gs col0 s gr % Ellipse n 2775 3225 300 300 0 360 DrawEllipse gs col0 s gr % Ellipse n 3975 3225 300 300 0 360 DrawEllipse gs col0 s gr % Polyline gs clippath 2565 3030 m 2565 2970 l 2364 2970 l 2484 3000 l 2364 3030 l cp eoclip n 1800 3000 m 2550 3000 l gs col0 s gr gr % arrowhead 30.000 slw n 2364 3030 m 2484 3000 l 2364 2970 l col0 s % Polyline 15.000 slw gs clippath 2745 3990 m 2805 3990 l 2805 3789 l 2775 3909 l 2745 3789 l cp eoclip n 2775 3525 m 2775 3975 l gs col0 s gr gr % arrowhead 30.000 slw n 2745 3789 m 2775 3909 l 2805 3789 l col0 s % Polyline 15.000 slw gs clippath 2490 1305 m 2490 1245 l 2289 1245 l 2409 1275 l 2289 1305 l cp eoclip n 1725 1275 m 2475 1275 l gs col0 s gr gr % arrowhead 30.000 slw n 2289 1305 m 2409 1275 l 2289 1245 l col0 s % Polyline 15.000 slw gs clippath 2670 2265 m 2730 2265 l 2730 2064 l 2700 2184 l 2670 2064 l cp eoclip n 2700 1800 m 2700 2250 l gs col0 s gr gr % arrowhead 30.000 slw n 2670 2064 m 2700 2184 l 2730 2064 l col0 s % Polyline 15.000 slw gs clippath 3765 3030 m 3765 2970 l 3564 2970 l 3684 3000 l 3564 3030 l cp eoclip n 3000 3000 m 3750 3000 l gs col0 s gr gr % arrowhead 30.000 slw n 3564 3030 m 3684 3000 l 3564 2970 l col0 s % Polyline 15.000 slw gs clippath 2985 3420 m 2985 3480 l 3186 3480 l 3066 3450 l 3186 3420 l cp eoclip n 3750 3450 m 3000 3450 l gs col0 s gr gr % arrowhead 30.000 slw n 3186 3420 m 3066 3450 l 3186 3480 l col0 s /Helvetica-Bold ff 300.00 scf sf 2700 3300 m gs 1 -1 sc (2) col0 sh gr /Helvetica-Bold ff 300.00 scf sf 1500 3300 m gs 1 -1 sc (1) col0 sh gr /Helvetica-Bold ff 300.00 scf sf 2625 1575 m gs 1 -1 sc (2) col0 sh gr /Helvetica-Bold ff 300.00 scf sf 1425 1575 m gs 1 -1 sc (1) col0 sh gr /Helvetica-Bold ff 300.00 scf sf 3900 3300 m gs 1 -1 sc (3) col0 sh gr /Helvetica-Bold ff 300.00 scf sf 3300 3675 m gs 1 -1 sc (k) col0 sh gr /Helvetica-Bold ff 135.00 scf sf 3405 3720 m gs 1 -1 sc (23) col0 sh gr /Helvetica-Bold ff 300.00 scf sf 3300 2850 m gs 1 -1 sc (k) col0 sh gr /Helvetica-Bold ff 135.00 scf sf 3412 2903 m gs 1 -1 sc (32) col0 sh gr % here ends figure; $F2psEnd rs showpage amide-1.0.5/pixmaps/roi_cylinder.png0000664000175000017500000000265410715444046017333 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs  šœtIME× R)bp9IDATxÚí›[lTEÆ…RŶ QÛºF*Å’Ôƒ7|Àbb ^|Ðø`âƒ1Ñà¥ÐÊá}àACŒh PÔ6ÁÐK ŠE#RQ Ôno«°>Ì·éñôœíéîÌölØ/™ìæìfæ›oæÌÌÿ2e¸C90¨š€¹Àò€ÿ]œô=>Îÿ§\,³\ß|àà6u¶ÑR½@—ÄøèNTOíÀ.@ùx¸{*;~-ðú$;Ýœñ•#φ#Öwèž.(Ô+0Ø<š¥Ñ ±.uðS=ÿJ¿M„: \ÜÜ \¡†Ÿ7\Žú½À‰ÑHé]Ô;h»¸ج5 lVì.Ëç5zþÿ6‹ øúÍ»C8l6ø\@#§$ʬ)^„5óR>~'ël4ðL@ç?®$^¸8îãùk¾3ó& é«t§¦`±H#ïå»'×bšVooeïêyœÑ°PߟKE }•| TPX¡ãs†ûÞ\*yÜ'Àƒöøø‡Nó0Üìùž~*2RùVàUoÔÑáÆ%zó^TWqžÁ¿÷XDܯ†<Ü;m^(‚ÎÏÑŽ•÷à…ëbÜùYÀ[³7› Þ\³Î/S&íB€T@¥•ßßT¢h•q–v%À›ÀÛ!•ïšE¤H-À|'Á¼Ø.ƒb#ÆS$Ä/‰;Ú µÀ Æ`£š™½¶ÈàMÿsY¦\ð–vµÀE*QQ®ÿÏÂø?'»¯0¼æY›" Ëû{P"¬ž–üçRàá€ç{‰æLÈ‹‚!Y©›€c®BÛ³x«|}Æ%ž)ßËS•ˆp¶:¼øøZå½{+0‘&ì^Î_û€ïl<6·°~à}•Ìöt;c¡±yÀ²ˆuùCc§%²u¸ÜÃ4b±FÜÝ[%J”( P $@Iw(„3ãbYhsN‚UúLúž·cÂî#ÀßÅ&@=&Aj¡| 0ŽÊd€µ6¨ÏJßó—%Nð#&1êàLÆI쨗£â` &‰©CVâqŒ[zXÞ›(¸˜)¢NB>"{âð&9âˆËÙ1‘9\¬>QçË#´7AÔ Õݪ¶†Õöªt暎ñvÈ|E£^h,QÛýâÒ,nN˜-ïK㦪ÁB^+.Iq›íJ€ezÿº vƒM5–ŠÛ!qµ*ÀLãì§×ÚD™8žáÿ œV"C;ˆon3ÄÕj`¤‹âIÉìD êQ¸ È"E4÷{Ɉ*ÀâóQœëuÀHcÜÓm1ß¼;Ac¡»b“F#ãï´­>Î#˜tûœ°-`;\ãίà»-_k±“ñ"-1ì| ãSç;mX¼+ Kï”É:Õ˜).~~ÃânŽÐÆòÅ„I¢A‚¸m°ÙÐt`+á¡¶øL1Mmö‡pÚê3­m/ÍŒ¿?àMMyŒsó#¢Jm áG§ÛuBî¨T!¶W[4n–/aÂäaé1N.KMdï"<ƒcÓßÌXžÀd¼=kÔécdÏÙ•¢ÌÂkQ < <5Áô‘(I‚/0Twy¾gÛ¾Få{ø,Ùà…DŽ =¸Ë êQ5q>ŠV«178{-tºWu­f,buew‰jL€¤I‡’J̕ذ³C7æfJ&G¨pEð?ôF¢uì¨?ËIEND®B`‚amide-1.0.5/pixmaps/interpolation_nearest_neighbor.png0000664000175000017500000000167310007536147023134 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs-ˆ~@L2tIMEÔ7ÿ;!îHIDATxœí›KHQÇ7³…QdQ®,z’‹²ÚÂ]E.Z…¸±E+WA”´ŒpYá¦RAZ¸J]D›(ZíÂèeÑô©eRAžsÇéÜ™ë<¾ïÚ½?8óúþßý3óÍœsæB‰â&“@Œ³ÀÖâ|Î%Gœû€I`‘N`‰†h!Qô,M!æ `8ã6;RÐÇ_Úó<¯•R Чd€vÚ¤n€ -Ú lH[o¡¤ñðs 8™m÷o4óFúX-¬Š„·<íÓz B€§‘I£l»+°¾¨rVëš¡¹>5)h«Úìc²ËÎbï ÚË¿ˆW=íF Á bÀw EÊpŠiÎeª ¼4`fÁŒÂ6Ëqe*ÙKaà®™+†›´óq‘,‚ß<í#‚ºHÐáiïÔ D«;¼Ö@¹’¶* {ê@•vN xd`˜’ÒËé[à‰§}JXÛŠ´ýžö:am+šc‚µÅXË <öÂåÚ9‰^øÌz6-“Ô·¡q zÚgôç¡aÀ#Íœh0 üζ)èëc`Ä-„Ú¹¨OgU -º=íJ9zŒ)éê ÌdëÀ¨v>*Ï0­™‡ftßË ìWÌC­î£°€ …^ \ÂùV©ípÕ]†®mÎûÀp>fÜ‹À/æO¹ µ1ã&N_ ˜ŸYÆç’ý ìŠó ðû¼ãrNŒzœÂg¦ÿ5À]ã`ÿñ®±;m'I|"ã§šì8ÀC`¸7ÿöˆqƒÎ«$Ç ¬†cÀ PqȾ?ê4ùΔ›)àKĸ©pû¥: ì³ÇX[ÜžxéBÎ÷¿Ï€+À–˜ñZ°'z3fÜ÷–˜Àž8A‡p†²üEåhŒ˜¹ hŠ“(v?Ü{<ì³W ´E˱°3àBÀ1€ulñf@Ðþ ÉüçH•0îì{K~Œ(h è ÷ó³ x—l:ò„ðçÙêçp=ùtä‰:0c¢G}TX›¢7 ŸÎP/°Æ·ícLÝç@§eû«˜q{U¾mÿÅ­Z"-þW Ðí[HIEND®B`‚amide-1.0.5/pixmaps/threshold_style_center_width.png0000664000175000017500000000106010335260566022613 0ustar loeningloening‰PNG  IHDRoª¯ pHYs99Ù“FtIMEÕ &Ò…ÝÏIDAT8Ë¥”1è9aÇï^¿áÜ ƒË‚ÝÅàJ¼«Ù†áD &ŠÉÆ`4\Y¤Î$e:ãM’$e3I¹DI(î¸ß ä÷º?îþÏvßûöéû>Ïû>øz½Æžj»Ýú|>ìo‰¢èõzŸ§Ó©Ñh …gÀtÖt:M&“ívÑu€®×« ‘Hd4½þýù’r¹\*• Ïóÿ2|’$)•JI’ôÆ£ÂqQJ¥’,Ëv»ý¡Øl¶ €ÅbAÄf³IÓôûÔ Š¢PÓÏçh€4bÿÇãN§S­V ‚n·Ûp8¬ÕjŠ¢ìv;ƒ‰&“ ÇqûýžeY†ar¹œî-‹t:MD,óx<¯3ý6Ññx\.—Fš$¢(*ŸÏÏçsŽãxž¿Mãö!¯_–åÙl†˜hš&Iiv¿ß785„Bxÿ‡DªªžÏgÄD’$à/¤(ŠŠ¢¨ªú, ßp·Z­ÏÊáp(‹~¿Bø[­V¯×Ó÷ú3™L ˆÇãN§3‘HÜÅn·kdC:AƒA6›}}úV­Ùl.—Ën·; ­V+ã«Ã0“ɇ].˲›ÍÆøò¿Ã0õz="ú/xºÿeT5IEND®B`‚amide-1.0.5/pixmaps/view_linked3.png0000664000175000017500000000353010715154722017225 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME×  giöåIDATxÚå›}lSׯ¬Ø CEiQ2–’鼄v¥š&ÄÇK·©Õ6©0*euªv[»1ÔA ™dE´nhDÅ¨ØØÆúÇ %²,ÐÔ"šŒÂLR E´-n¾úµnKÈGãØÎ³?îµå|];%[lç•®ÅWöy~çøœ÷}î›Û°Ž·€uæïï#Ì¢¸2¯ÿ¿ì³@yŒø±×¿cÀw€ÌtpppÅ„€¿¾ÌK7+€A@ÔÞ½{UTTdãcàeà¡4q_-<¨Çÿ‰Âá°$) ª¹¹YUUU‰Àø%ðMà³)(^O¤ìliß>i`@£" éÊ•+Ú½{w<š0¾ž"0du€{K==š0Âá°ššš´k×.ZÁx8”$ñ×D[ ÑÞáé§7FFFtéÒ%UVVÊáphΜ9“Áè6a¬K²ÓD Á?Ì<'Hv»ÔÕ¥)…ÏçÓŽ;TPP`£ËÜ@¿šyFdÆ1¼]¯¼¢O>ŸOZºt©ŒNà‡I #fPuÓ 6Ξ=«åË—Oáµÿ‡Ò¹Ö/g™8ÀÓòx½^¼^/gΜ!Lvëõ™\2fû{æl|W0]­­S›é¾¾>8qB¥¥¥²ÙlV'Ä[À6 ¦÷—!ö†À'GÅoØ ŒÄÝÛÛ«ÚÚZ9NeddÄ],æ$Ë)p'¨glŸ/ݸa-úÔ©S*++Sff¦•è&`'pw‰áyèèy¿¼èžžy<•••iþüùñDÿp$±èQl°á9(UQÑ& íõzåt:µ`Á‚xË{P”"¢ÇÅBÀhÏž=:}ú´œN§²²²&¸#›¥Œß¶t4Pm@ ‡Ã¯ì}øµ ã3éà@ÙÙÙê2Í‚––mß¾]Ë–-‹ç5÷ŒT }Žý>ÔêÕ-jjï]»vM‰À8|#Õ¼[/Ì+UUM\+„B!]½z5jˆXÀè§ åƒúÆM UW[W‹ÃÃú|ù²\.—–,Yb£xÉÜ3’-Ö~Cð낵‚?Z ‰z‡@@r¹\ÊË˳‚ñ.P| ãÉÕŒð‚Ÿ48OÐ…pøðÔm²¡¡¡¨‰ºxñb+~à ÆÓ«Ðfˆ½7f`¿ˆxæ™[ó ‡††tñâE¹\.åææNâí[Q6çðÿȾ«€¿˜éÿ·£/æäLý ÍÍÍx<jkkéêêšìÖwðû™ü TËý Aé¬Ügû1I„³5Š¤Â‡ÿo('Ç£ÆÆY— ƃŒ~@GmÅP4ž´páÂYWG ‘¶ ‘GIXbÇLßðð`º¸C‰š¢™ý…c!Evû”n¾LÄÏþañ5y/æ¼Ï MÆá0+ÎÕ“ñ¥ÕžqæÃ–ýû÷ËçóiçÎñŽÊ÷̲·8 VÆûàYݹúûƒÑd) êÂ… r¹\ñ2ÄNÆÚ„¡õðIBÉáÞ|sâ~ÃóçÏkÛ¶mñj„vàE`uŠl :7¶`²Û%Ǻ߰¡¡A[·nM¤J|X™¤G«ÖÂpSð²`0 á®»¤>J¬l®¯¯Wyy¹•;±Êj€¯$IÉ  Ÿ‚g²@Ð…àvOÝ.«¯¯×–-[´hÑ¢D`|y†Ki½fˆý~Ìà*£ÊÊnÍ;lhhÐæÍ›ãÁ¸–6Ä èÇÓ mmmÚ¸q£„i÷>ãG^ÌŸò¦åý~?uuuœËtnIz6ΑÍÀæ9jÞ$ߤý]Iï™xÀOÕŸ?Àbi©/G—>š°X6?,›£¤RIEND®B`‚amide-1.0.5/pixmaps/compartmental_models.fig0000664000175000017500000000353407635420153021041 0ustar loeningloening#FIG 3.2 Landscape Center Inches Letter 100.00 Single -2 1200 2 6 2325 3450 2625 3825 4 0 0 50 0 18 20 0.0000 4 285 210 2325 3750 k\001 4 0 0 50 0 18 9 0.0000 4 120 180 2430 3795 12\001 -6 6 2250 1725 2550 2100 4 0 0 50 0 18 20 0.0000 4 285 210 2250 2025 k\001 4 0 0 50 0 18 9 0.0000 4 120 180 2355 2070 12\001 -6 6 1950 825 2250 1200 4 0 0 50 0 18 20 0.0000 4 285 210 1950 1125 k\001 4 0 0 50 0 18 9 0.0000 4 120 180 2062 1178 21\001 -6 6 1950 2550 2250 2925 4 0 0 50 0 18 20 0.0000 4 285 210 1950 2850 k\001 4 0 0 50 0 18 9 0.0000 4 120 180 2062 2903 21\001 -6 1 3 0 2 0 7 50 0 -1 0.000 1 0.0000 2687 1513 300 300 2687 1513 2987 1513 1 3 0 2 0 7 50 0 -1 0.000 1 0.0000 1575 3225 300 300 1575 3225 1875 3225 1 3 0 2 0 7 50 0 -1 0.000 1 0.0000 1500 1500 300 300 1500 1500 1800 1500 1 3 0 2 0 7 50 0 -1 0.000 1 0.0000 2775 3225 300 300 2775 3225 3075 3225 1 3 0 2 0 7 50 0 -1 0.000 1 0.0000 3975 3225 300 300 3975 3225 4275 3225 2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 1 0 2 0 0 3.00 60.00 120.00 1800 3000 2550 3000 2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 1 0 2 0 0 3.00 60.00 120.00 2775 3525 2775 3975 2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 1 0 2 0 0 3.00 60.00 120.00 1725 1275 2475 1275 2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 1 0 2 0 0 3.00 60.00 120.00 2700 1800 2700 2250 2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 1 0 2 0 0 3.00 60.00 120.00 3000 3000 3750 3000 2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 1 0 2 0 0 3.00 60.00 120.00 3750 3450 3000 3450 4 0 0 50 0 18 20 0.0000 4 270 195 2700 3300 2\001 4 0 0 50 0 18 20 0.0000 4 270 195 1500 3300 1\001 4 0 0 50 0 18 20 0.0000 4 270 195 2625 1575 2\001 4 0 0 50 0 18 20 0.0000 4 270 195 1425 1575 1\001 4 0 0 50 0 18 20 0.0000 4 270 195 3900 3300 3\001 4 0 0 50 0 18 20 0.0000 4 285 210 3300 3675 k\001 4 0 0 50 0 18 9 0.0000 4 120 180 3405 3720 23\001 4 0 0 50 0 18 20 0.0000 4 285 210 3300 2850 k\001 4 0 0 50 0 18 9 0.0000 4 120 180 3412 2903 32\001 amide-1.0.5/pixmaps/two_compartment.png0000664000175000017500000000470610007552015020061 0ustar loeningloening‰PNG  IHDR—on<ÅZ pHYs``zxEtIMEÔ11š·8 eIDATxœíÏmÛ>Çéà·3;33‚2‚<‚<‚Ó H×Þä¨$P@B.Ú‹ôT ü;¼äE‘lY)‘Vù9´®šÐÏüòñïãóæt:‘g³Ùàë|œ ÜÙ6Àc¯âð*®¯âX­ŠEQÜßßo6›Ífóðð ”²mÑŒlV0©ëÎQ•RUUB8çRJJ©5ûæg…¾¨”z||üw$$ëS$,Š‚ü3’õõ¨œsRZ–å¿ !YŸ/‚„„¥T–evYŒµùbÆXY– c…µù"cl¿ßÃ몪v»]{–am¾˜ç9çüÓ§O0G¥”æyγgÝ"œnŸîÇ‘R¶>¦"Ïsü_J©={ͳNO§“~ùò…ÂkªkÑ`㬭GÅ“eÙãã#¼Æåü/üü >8²¶Ù "„Ã^ƒ„AXµhNìv Ç1!$‚º®áÉú>øª>LpÇ0 ›½Š·zaëùúTüÏB'¾0œþœV4£i²†9ªGË•REQTU%Ðöcp’ „ ”rÎêéaŠ/VUu8²,k4WÙ¨+!„1&„B¬y¢?¨«¢(Z±#PoŒ1­mÂQ£hÇè[AÄq\–eÏÏK)£(û(¥aöÿüʨë:ŽãVó¥”B³nõRœóý~Û„£ª¢”Z"Žc\{ $Ïó(Š(¥”Ò(ŠÆþúÂÄqœ¦©Ž‘RJ ä‘R^*0ÏsF"ÆØØ*º®bY– @ /ºK]×QA{Üï÷:EÍJÓ?¢(¥h«¹í{Ò4…5.¥4Žã¡_µ‰RÊ^âUʲÄŸƒNÙ=¨hY–Ðy2ÆÒ4Õ±«h`Q}³›$I¶ÛíL1H­Â:ÎýùóçËËË?^^^~ÿþÝýÎ9 l0'„dYöôôãîßj’eÙóós–eQáÑ÷Y.ª¸Ýn“$ Ãv@æ ( 8vR:¥"!äïß¿u]ÿúõëû÷ïþüéþLR8ça‡ùšûn·{~~Ãp¿ß_,ü¬‡Âèe°½D]לsˆW›û½ÑgëŠRAk&yv«Ö,qÃÊûRg~FEp¾(Šæ3«I]×ý&.L+àê¬r4÷fjyž÷ÔR[Å<ÏçnY]ÀÄî¶µ-8ç=Ê!ÐÜ›l÷ÔÒ-ºÅ€>Vš{š¦gk郊°0·Õ³Á»»3@öQçœóåßúðÖòã]E,zô ·îi„ah±¹Ã.OóÝßU4bY]×ý³ß~ ¡9Í]J U µ› £>r×€œúK a²Š§Ó Î@4͘!clÚïö,¾GU~Ëå>lÙ%u qÖušû¥½=døŒ>莯uÝ|4;î¶Ó´¢ Ovv¯<‚ÉͽyD1yu]7ëmÔZ º=xMNo“æi'[=íkBi)OþõYÑiîÍý3ìlš› £îÀ/Âd•œÞ¦øÓ,›CEØùud+§ ,צ5÷Ó…›=ϯƒ)=iþC#*B+[`w,𳇍>lÎêÇúºßkpŸ©qȈŠ'íqz&àÞl™Í)áØq†B)å󏩿š=@UUÍ 1}Š¢hÉ5×iC€Z*Šâ/»†k†ÏÇ«׌LcL)õzgʵ¶ïš=ˆ©kÉI’`F,J)†ÛL³ç?Ì+bÄ8ƒ¸æ‹a«¯¢Rj»Ýø'çÇL¦ª*¥”k¾¨¹ÞŸ©]¾«(„h:»Íý¡É…€1Þ”£”N^û<úU&&}?™Ò¼Z`$´mÅŒœ¥wÃ_{TƘ#CQUUEQ˜Ý®4…̳mÈ+Y–AõºÒ‚àp8¸°jt¶;%oV9’võCsߴƸ̕0Ô.pgé†#5q?’ÑT° &­æþ!ªØîÙl+®ËYt"MÑŠ£oGø¸Mº!ÏnSz‹Qz£Š¸Mhñ¶õžj îFøp½jáèll\žÔ´€ÑÇJ ;¶šû™'ˆ×[¬Nñ~å2og +-ïÒ›žTÁ˜hÀ)cÌýá°Ë£@O7y1Þf:Íä°ÆIÓ¼ÐÖ|J8#\@ÈþæÞ5е<ÇÜ}ÖV² ä¬ýÖÕæ~%öš€Ù´_˜Éý¥á@ E !æh‘C ¿Á÷zô3PM©tC€»OÒ5°¹Ão¦ÇÚï÷ˤ7»-ò<Ç pš óÆ6÷q·)¤”xÚW™¥”—•Rj¦¼E0£‘ä•kʘº®Á·Z‘}ö³]©“öóvé&’í©V}N˜…èæ ‡ä»˜œX)…é¦AB£ÎãlRg¨“º®Ç#¥ÏtcAÀÉר7òÙß?pöËŽôëð'!¤ªª²,Ç#tž «N´˜Wñ3©Ø¾ËÔ[ø{kÀ«¸¼ŠkÀ«x¢(îïïá^u ¯â”ROOO˜ý`ŽœÒúxû€K£°vVBâUì$Ä»ÎJH¼Š= „”R—%$^Åð>†RÊ‘¨þKxáÚ×}´ð*^NRáuUUN ©w³6š5gIxÐF)ýúõ+&Ü«ëZ…cÞ &ј٦ ZÝöÝM ÏáèMJ ÿcon˜UÑ÷¨W€£ïîóÖ—aÚMŒ°æï7EEÝ9*DÐB’$!͚֯rêup©fš†š·¥ <|BT­­ÑRWçÛÞü¸èI’$I‘Q¶mñãâT`gçp8`ÇiXøF߃ù™L9µg¸ðùógò)8ù ߣ. ºÝñx$oIWô}Ñ«¸(¸ôüöí>ô*Þ $øbó‰^Å¥ézžWñöhif$ãWqiZ²IëU´@SHï‹·JÓÿ¼Š· *g* ¬WÑ(ž©Üè^E;`#¥yí€wÿ”æÏ4ì „0˜Üû¢0`ÇÿX&%§iÐ%~IEND®B`‚amide-1.0.5/pixmaps/view_coronal.png0000664000175000017500000000153110715156013017323 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME× 'óŽÊæIDATxÚí›=hAÇwžJ¢wà ")ÔBIEAÁ"¢(ö-¢…‚ ØYD°°A1(±?@A±‰§ä ^ ˆA1z!~ä,öÖeîcïfv7ÞûÃÀ.;;oæ7ûæ½ýJá^‹m²}ÈøŽ­FõcÀ8ðÖuçRŽÚ]*ƒÝì:hc ƒ@ž9 ùÀi™½²Å2 \ºNZÓ:LX¸©\:’ä9à°˜W£îGà‹oTÖY¥uØü ôãžõp½ÊlM—c².«Ñ^Zêí.…*m–Ç à`…΀>`¥ûe4Ù¹çàÛC§$ ØT8$—¾ßÖo`g\¶ñÍ}Àð¦È6ª5ýpÖ1€! ±V/­Fõ!°ßlp ,L €’ø ?"œ®ÔgÈ*§â\‡ ë@Þ—ûÛRp˜1„Âuqè–ĦlXon~ª ¸|ªÏ%!<#¥R[ï€×À àð¦J[¶Ø ¬U¨›z€ïI¸8 |‹à>`¶ÜMBÔæi±2Mú-q7pKVg[/‡«¸C"µ x +÷´”zûKêÎÈù=.CkÆ!€¼äî¯Ä=Ôaó‰d{/åü§.g)ñUq3i—išW­<`Ђ˜î7pî.¼£Ï›ìCo3Êÿû$·¼ ´<€°Q`ïÉ.Àê@:úSBWçßþð^¶;U6“”~ß±À±bD“V¤ò#±~CŸÕ€P @( €P @( €P @(„9: üíÞÓ³ÖFÐç"ÿ~¦[Âû@ ¼Oh²aÆöÕXÖ` nµ&B]@„P-¸P娼ßââÖ0ð0ÃI|;¬.`ÛÂ(œˆ Ï¹¤èÎkP `Né/ g1¿4ÆÅIEND®B`‚amide-1.0.5/pixmaps/roi_freehand_2d.png0000664000175000017500000000146010256361732017655 0ustar loeningloening‰PNG  IHDRàw=øbKGDÿÿÿ ½§“ pHYs  šœtIMEÕä2ẽIDATHÇÕ•ÛK“aÇ?fšfiš0é Ù…ƒ$ÞD¥ Œ:Ýuô„‚Tt¡]HÐi8¡“ ‰Ä¼LË…PÈ*ÓÊÌÓ´mim¤Ûž.z]s黿]?x.Þçû¼¿ï÷ùXÛd@„-#Q𴯾ð?ni~:b{Qšáœb“ßï:t¿3Ø |¾+¤ª¦Yc¿Ìl6³èv–j{­Œ ½&mq>AÁ½Ê¿ 4€µöÒÅOê®¡ÓÆP¹=ƒ¤Š£ËøF Fåö ÊÌf3·3ç@j<îE±…Ü}÷94¬Òzs üã#ÃÞá~ýÄô ùÎÒòóI?s┄V›ÃÕ ØYÀ‰@®Þh4ˆÑéãóL,%¦’’•IwO6‡«pÞIðjáýÖFÇÛE[]‰p ^v»]b_Z’(2 Ñ8 ª—eïÂ\rè‹ÅÀÀä\ð˜|ëSßÙ BÕ»F[ ª*Š»r +õ¡7(“e™¤ØÀ ðö½7´[m€s½ê%@ õ6¯PïuýŽ}I¡Á¢¨ÏtÑ:×y²,¿9€› wèœê¬*%.ÔÊ_3™Lô´516—Kœ~q9g©®©§¤ÐÐ jçË&NŸÂðà·L†Dm@ð¦€`)$öR‚ÕªHZž¦7‚>%,“Šs¿Šjµp­À$`+`PéXeˆHS Š·þ?´_K ÄšD ÒIEND®B`‚amide-1.0.5/pixmaps/layout_orthogonal.png0000664000175000017500000000162610715156402020414 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME× .l¥k3#IDATxÚíÚ]ˆUUð߈M"† ~Ѓ9=ä'ˆ†O¥ÕC/BÑ(‚ˆˆâ%*A%QÌCOQ3…ãŠéƒZšæÍö¸÷ν^Ï=s?ö‚ÃùØ›µÏùŸ½Öúï½<¨ãñœ‡e Îã=ò1E›ËÔ¢ëkø>ݘ_¡O_Oâw/Ŭ±›±ép&#å}U˜À_“üãÏ$(a¥¤OTèó/îåô¾Oá}¼„¿ñ1îcvÖªt"è«Â“ÊÉàþÃoø5ú’ë©Õ*Í€¹q€ýñ~C<ç^<“Óßß‹X^ä¬_Ág¸Q/ØQ4 ¢û·£™ä!kq|\¤ú Ÿbu½x>†Çrr sà^E†Šž?0%šG¦\ÊËÉP1?+Ù†“ø£¸€ã¬8ù8Š+ñ€ÎqNl L[<`1vã;\‰ €wêÉîÕØ–µ¼Cîf¬Äìh~ƒ”©µ(m&"´ [Jø…SŒ'[€¬ÇºøÞX‚üŒÛõ ƒp:F„yñ~8NÇrá¾ÄÅhÿ b”z#ÚtÝ8,zv?çÿGp ob:ãX…H• ›À>(ºþ<+¥m¿LËáq;9}è\SEŸÎŒÆªUºK1Á´)ÚŽÒQâ/e)£ãèòŠº„dälç–÷Ûñ'^Òa„"„}²©)lh0 /cn–hÿ‹Z€®8C~(Ó¾¿]Â`KïâNÀ0î 9ø¶à¶PмO—éÓ‹×Z™¬Šmßx¸l¡P5ÖÖѬ< "´QØ+,à'¡4®Í£¿„h*ª¡Â…ŠÌ÷ðbäÇpB¨i‹µÀY|˜Vƒ €@ H$-$ÅLp©lRäÝͺlË ‘¶7ÿÒ²lBIŽIEND®B`‚amide-1.0.5/pixmaps/transfer_function.png0000664000175000017500000000163510715150551020373 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs  šœtIME× m+†*IDATxÚíÛÏoUÆñÏ-©½·´·ZT~¨!H¡6ÚlA–R@1²Pº"1±;ÁÀ ]¹3ag¢©&¦Qƒ†Ä¥º#. VCASå7ÇE¯ØàõVê™33¾7'7™LæÍó=ïyæÌ93niJJÿ(;€Îk¯`’šà œhè-€{uøÒØM½¥Ðݺ\0!¸R.Ëðºº`JþÐÌ—6ZQ¢GÅFlóúþ~B(|{µÑëó-†À=XR€vB­Qò7n@Þ= ŸuÃtáð8¦M~o!¾ ^ÓcÖ‡‚k ˆ/€LzÌugþ…ð‚Å÷^Ì܆ø¨`Âfœü—/0€N|»á90¢â/ ~þâç¨üIa^Lâr”ò»Œy[ݳm¸ÖÕ¹'„fÏïã×å¿é]uÏ´ÿÂyÛõ-0³[äÈËšàAGU’êšØ+`Àr?ùº½Ÿ³ Øi“» '— ö 8å½6÷~ŽæCú]ôCrbG¶Üêd“ÄZwYbúæ"fBÐl"ôt$¡ûm6`G²IšØ…KØëx:‰bê5›ˆùåÄ_pXwÒæGœÛã+pÄx:Éb°Ó°Õv•ÀqÇÌmm¤1™à:]fý˜ ùEn‚/:¢ÛÊôÆ`¥e~­&BÕŒ&BOxĆ´Ì¯€ï2ª€¥ö7ê åˆÁWá’ó)˜_¤&ø’çÜ¡7ýıw0»äY=%Ê7êxÃS2}-+« ¨ã´í‚ )÷~‹¢}øÊhFâ3ЇSFñRCôâ Îe(~íñ)\Il¡sØF£?cûm±=þ~isº*Þ2¤ßdâS¾ T1ekÞêÈ¡Ôð©­B[÷ös †OlœL|ÂÖãI|nPHtm?¡­±Å~;p@ÕJ©Ù‹çIcm¿Ý " ÅZ bé±Ê5ã#[pŸÜDgÓ{5Ý·ÛÔ·èT5Ž1lƺyg^Ù(¿:÷×l"Tª(û—£¿•½”þÛá?§?òzx§ žIEND®B`‚amide-1.0.5/pixmaps/thresholding_global.png0000664000175000017500000000202010715160110020631 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME× !,oÛ^nIDATxÚíÛO¨UUÇñÏÓ×+K¤öT£´E…‘ƒrR*%"‚z`å Õ$!0¨‘DE ‚ ˆ¨ú6Ȩ‘%X•,.ôÒ¤?¯wœ-½äü?çž÷.o/8\8gïµ÷úÞ}öZ÷žß¡};;0þ=v`´íÀbŽÌáÀgï`E[Á/ CøÌc¢à×bÿßG¤að›ñ,g\ÿ¯êÞNÄ8V j€ð(þ) |Õ,Þ¬° *ÛjìÉqx‡f À¬xT²Mèå8Û‹ðJÇb;þ¨±”^ò÷ç 0×°,´ïÀb¼œà_؉/ë8oå 0…»ëÓ€µ83·ŸpMh»·€Ëñm·Â}gÜ„£9sûkf´¯`wTuàŒŒþƒ°O†•—6¯¿± KŽëWÀ¼T°qì,¨¥à,|œ3¯#¸9£o)Tu½ Š ¨A¸¿äÌmÎÏéŸ àØ·¸7â ,Ípð]¨®¾*Qa>W„º¡©m íXʵ~¾“usè®a­åqGÉ83o³Ãò¶Àâ’ _t&€É! þíPókÀ°ÿF¨Lµ +•Màž›Öv\ŠñyMkð@Êù^Èõ­Yå½ }¶‘×gÌíéšþRWÀóÜ"€ ˆ"€ ˆ"€ ˆ"€ ˆ"€ ˆ"€ ˜?6:`ÿÏItöùÿ[!ó À3mmÈ[B¥4,Æ­mÿ™³ÎÜÿ÷ñPˆµZ€ý ß$›>tMIEND®B`‚amide-1.0.5/pixmaps/roi_isocontour_2d.png0000664000175000017500000000270310715444143020304 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs  šœtIME× %PIDATxÚå›ilTUÇSºŠ¶ù PI¤j4j ZË•¸#RWL%1j4±ðňKÄ%bŠ[\pôK5îÅ%mÒ[­»HUD£Ál±Vii¡õÃ;/ž¹Î›¹3ïßÿÉKæÍÜ{æžÿ;÷Üsν/A8LÎŽŽÊw€÷ÉcŒV»¡× p]¾*¿Ø ¸¾~ É+Ôý†¢ÀãÀz`Ÿúí/à> (r]ùY@ŸRn/Ðn´ë°ˆï'€ó€Ñ.ð…Rf°4 Ý8àà÷4Ócðp;pPwåÇæ+pµEŸJ` ð“…¿è•Uc°˜ ŒÚŠ%,Û-äóbö–}G5Àlq •À‹~Ûn øØ)÷mbýû“€MÀIò¹¸$ÄVŠSœ#2§æ c—LÉ~EÐ×À7Ãa%ã ó?7BÙÅ@)p!ð0ÐtYL™TW?ÐÜL’€ëÕŸt%Ã<-K£€€§€ ¢Ü^c‰Ítµ‹‚°jVB7üÇÎx p*p­D¢ëÅüÓ±¸,×W*óͶ4¦«Ô¡âSL³ê4ç™Ö)QÏ­aBp‘8ÅTáùéÙ{HuþıÀ-,’q›1Ç¿Q&1Öq]ÂðŠ,áƒêû‘â­ðbîNÃ÷[üA·­€NÕéJÇ”/ˆ)€«lL2²¿³#`‘¼/˨õJPe07Á!åËŒ±?Ô°€üDqo.BÆIµÇgñR‡–?í¼[³Húþ…7• Wª¼³ óõà.'¹Ò[ãÏ«1ÿ †v€[?så+Œ•ë¶(„6(-1'`•òfÌ]òi(Á«'úxÉ&|Ï'jeåòñ¤M§|" ^}þ¯¼ …(¿ÀÈó£þ™r, 1%àK5ƯÈbO!“Œ–¬ÊGw •_„Wj×aooTÂçÐì˜)_lXèV"®Z·)áí1|ú3Œ°wIX“-ÀkÀÀ%¼>†<«Æ×Öa‘º„ÔCr}0CrÅçî(C^óZÓÀG±*¬ÀïH.úæÿjL—¾j¼ßb·ãˆi$}¹8oÃrdL x[÷é°Â+a{$­Œ3 ó¿"Œ ðÎùùØüàXð[XŽQß59 ð‰Æ}kX\ÃÁÆýÿ7ÊûÂê¢Ï,w€€CRÄ*+ÂÔ‚8b¯ãîÃ;Η†³ØQ(éô\e¶’ª¶È€Ãàà9`¦Ü—ó%œÏš€müs\­x9 %+ÓØ“å~J‹k>6[dšíÒÇG…0Ù(ŠÜŸ+›•)=jÑ>·óŽ<Ñ¡a¾ºÄz:•™[Þós5Ó\p3°Ò²í` ò²Ý«+Ë࿞É5gÉ…€•x'/4úðjq>:ðNr¶JQ¥Gý6o¯¾BüÃ$’ËÙ¶è^Ö† Þ*ö—¿-À‘ígï©~ÝÀjà±áèx[pé–¼ªOý ™‘`™šOÛ ®ªš9ø)8Ž•Zú8 û]ày1N—³BÞ1xÿÉ9¸é)<ðfàVà ×IXm(„³dš˜KU‹u„´¨!ùTUuš¶€OS°8ÖUJð^lò•i«§k_+«ÂÅôqõ†26o†Ì%ù¸úB— AòVSÞ9!c%nèÀ{‘A“6Ãugh>Ñ!¼÷ýΑë.‚_kÙD¼ pc–ÉʯD°/'$€Ó$ÔM÷’ÒFà‚ ¡¬Ó˜†·ç¶S)¾oS²:ü¢ ñË—IEND®B`‚amide-1.0.5/pixmaps/thresholding_per_slice.png0000664000175000017500000000113310715160063021351 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME× !ÞзJèIDATxÚíš=KA†$EÁHL!¨ b£6ÑJ¬¬´°ÐÆJüŠÚ§°°¶ b%‚½Zh#Z; mASA´pñ¸!—½|Ü;0ÅNöngŸÛ™Ù% µ•,ðÝLÚFÄE¢ Ò8»ÀSçº ôºÄ–Ó ð±sJ‚B`X© ß¤Å¾<‡<·=à®V/›k¶ún|V¨ :.ƒ£^Iqàøt<‡N£NÅ–2–þGæ÷™>bF9 ` TÐ/e±wYžï(yn Æ>€·Z¾°ÙÊ[V! 2(Î÷À–Ç6aŽ”E9Ê='€mà¦J߆ʔYçòÀ¡ÇöåpïÓ§(óÀ9pR¥oé0(€€€€€€€€€€@„$ÖÂs›âïʼnDÔl4 Ø>ª|6n±/Ó%íd#†ÀE€‰¥è󱿗%íq ;È@~— r>ý<}v¯ž4Á.HT¤­œV€³(WW~ÿæ×>ÀÕ H#}´Ø—€Ù’vg½, [Új+vä-åÑ•tÃà @¸ö±ß_þ“‡V= ]ëÊŽC lÖÙ·þ°jöËÒ €êå”.Çû`ÁzIEND®B`‚amide-1.0.5/pixmaps/view_single.png0000664000175000017500000000201610715154611017150 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME× 9êõjb›IDATxÚíšßk›U‡Ÿ4Ö…uŠÑÚ‘þ¸(Š»Û•7BQëtJ0KAJÑÞäªÔý ^ì¢ÑŠZX°Z ¥8KѪƒ…ŽÒ‹ ê…+þ¤•µݰmZ–7oÊÛ,Ó4o»-=ç/ä½ÈËù<¼9ù¾ç°X,‹Åb±˜‰¿èÚ\¢ÀIàdЧ°îúxxÌt¤y·„w]Þž:ŠákÇ_eÔΡ£" ©ÌðŵŒo-Õ, ø HW(BÀßÀWÀkÕ,£?{!àð-ð"Ð\mN?yà®?ï—€SÕ `Ø  )™Lj~~^‘HDmmm^dü| ¼<ñ0†Æ™Øv=00 7ÙlVsssŠÅbjnnö*ãs~zŸÂ ‚ ‡ÃÊårºÙlV©TJ===jhhð"ã`èy@Ù…÷þo›‚ŒÎŸ¿©TJe±²²¢d2©x<®úúz/2–€/€wîgøS MØl ´[ÇŽIá°´µ¥²Y]]Õôô´úûûUSSS©ˆ¼óךº[ÀîÐ¥êÄ éÊí›õõuMNNª¯¯ÏËSqÇ™›>qæŒ Ýù? ÕÖJ³³ªˆ|>¯\.§‰‰ Åãqùý~ù|¾Jeä€ÔïUÀP9á HÛÛ:FGGÕÛÛ«@ P©ŒB ¯Ç÷þñ½w ~t>—–pö¬œD"¡îînƒA/"6÷ôÑr\ØnÖu³7é’ê꤫Wuh «««K^d¬:sÆó@ð^>Þ.Vt“VÁµ’Šú£CaccC###ŠD"jjjòún2<<éà µ%x¥Ä—#‚í»´´è¾²¶¶¦ññquvvzí@sš®P‘€ëÿñ¥¿¸€âtjjJ^d\¯Zn2™ŒfffÔÞÞ®P(´/ 5¦/‹×VëÀ———YXX`hhˆÅÅE–––*¹Í" _MŸ/˜þ75½:~w+|Ó)#Zaã_†ìë°]q-‰Ý†ï¶Šƒ²$ 3ðòEȨP§OéòåEwy¸íÐàà )Ëâ»$܃kmmU:6fcç4È/îÁF£Qc¶Æ œ+Þ"3es´°=>Ü2i{ÜøÆ‘1þ~L <(é+qý¥óˆÿàü¶·žÜb±X,‹Åb9Bü ^òŽ·$>†IEND®B`‚amide-1.0.5/pixmaps/window_pelvis_soft_tissue.png0000664000175000017500000000247010336316713022163 0ustar loeningloening‰PNG  IHDRoª¯ pHYs  šœtIMEÕ  Ó¨×IDAT8Ë­T]‹ÓZÝÙ;;Ùi;Mš66ÓÚvú5Ú"3èˆ êµŒâðÏø_ý‚W£^ ^¨ØaZ'È4uÚhcÒ6MÓ&éNÞ‹¼x¼¸®6<ìÅzÖzXü!0ÿo€1VE’¤ívëy^Ç‹ÅÂuÝAT,kµZ³Ù! CJé­[·>þÌ0Ìb±Fý~?‚¿ýbÿzA†ªªÇÕëõR©Äó< •J=|øp½^_¹rÅ0 UU+•ŠaçççËåòˆBõz½P(*•J»ÝƯV«R©Ôjµ:Ž(Š<Ïo6›ñx¼»»›Ëå6›ÍÑё뺖e„ðæÍ›„z½~ïÞ=UUyž¢èþýû™LæììÌ÷ý/^PJ ÃxòäÉp8äy¾V«!„lÛÎf³’$9ŽƒTU%„>>^­Vý~_„(Šâ8Æw:UU¿|ùB‘e¹ÙlB,ËÚÙÙÙl¶R©är9ŽãX–…Z–õôéS„çy¶m·ÛíÇo6›ÅbÁq\±X,•J¾ïGQÄq\«Õº{÷.Æ&Ü ÃDQA²!cŒ1>88p]w>Ÿ¯×ë0 Ã0äyþøø˜eÙ Â0(Š‚b1Æß÷!„,˲,[­V§Ó©ªªº®üøñõë×…BA×õÝÝÝápxçÎß÷Ëåòïß¿mÛN§Ó”RA`E¢(Bxžçy~gg!”J¥¦Ói¯×s]7›Í~ýúµßïO&“Á`€êõzív›a˜B¡@!„d2˜hÃÇqìºîµk×f³™$Iß¿·m[EÇq ØL&qkšfš¦,ËFƒa˜  „‚ äóy!DÅq¼Ùl$Ij4„W¯^%ÄqìyÞþþ~:þöíÛË—/[­V.—Ûßßßl6 Ã0 ƒ1†ÛíB!$„š¦ !|÷îÝh4ªV«€B¡Ðn·?;;3M³X,AP,9ŽËçóÇÍf3À`0X¯×Fc|yyihš&Ë2BèÓ§ON'“ÉPJE!„d³Ùr¹¬(J:ö<ïçÏŸ‰X×u?|øÀ0Œ,Ëý~6›±€ét꺮aoß¾ÕuÝuÝ0 !„Ýn·Ûí^½zUÓ´n·+Âr¹ô<Âq\¯×;<<Ìçóš¦ý·Ø¢(zþüùÉÉÉû÷ïS†I¥Ra†±··W­Vu]ÿñãÇx<žÏçÉf2˲Òéô¯_¿þ©ü$ÝÀó|¦iþ­ªyžÃ0Š"ðñú<¡è\B6IEND®B`‚amide-1.0.5/pixmaps/roi_isocontour_3d.png0000664000175000017500000000377510715444113020314 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs  šœtIME× /-¶7ŠIDATxÚÝ›ylUÆ-T,ZË⎈ÊVp)*ˆb QÀ5¬­D‰Fã(bLÜ‚FpÀ D[TÔR·­ÖT­¸T*`pC0  TKi)þqÏÈéeÞ›yó†Ò×/¹é}oîÜ7ç›sÏvo³H=€‹~Àñ@W`ðð °™6ŠÎ€ Ô»´›Ûªð€ê$‚{íG S[~°Ót°˜ ”Z×6§¶á‡õJ¸ÀËb…{;—³u!ÈðÚJ`0¸ô‰[°¬c*€òùY`bšÚt0èaŽŸÅðn¾kÅ;ÅŽc¬73,ƹó$€šÌªlG²¶xGlS^œÜ®~¤º–[wà|Yv DûR%c«¸äq<ÐçjâÒ}`²€\iÅ<Ì‘{m"·€3£þøÁb¡½ '´BÕA–ÑÕ@¹«x­x$Šg­&©ŽË€xå`𷟇§2Ùuó¸*Ke«EB¥$sB%4[+2Œ€ òZß7†äWÅÜ}¾¿—À8. ;A­ºiL† ?P¼€Î_6_iÍNÒž,®ÇÚD]È—o|õ°Ä1IϾÂL ôk$¶øÖÔ> J˶ÂO?ÁoŸv‡ S€9ŽI[Ãä…x˜ì'|IáÂIdôR_ouÛØ˜…!éAŸû‡‹‘ Âo’•8&A ƒ+Uÿà¥D“yßeÝx8úþp˜ô—Èvv #0ViÌ®Âs 0Aí`*°Ì…[BæcÕç–ÍÐ.ÉD[€‹$6G|ç<ïbl/2B.np ªÌÊ ª–׋&T–ÿû?Š Q9b[úÊ׋€OD]½–-ÁM.0¼V•™¤)&—J¿Q­ê¨éðd)R ádo© …Y"9Šù)ÎîyìqLjšŒsàUŸ1oÈrÚôtL¤ç‡•jY–e¯AÐsbA‘·5>3ÑÃr§‘áÀÇ’•‚Ù{HT‘ºÈ²I3ƒæ"`³”µ<œòíç+ÍÙ¼ƒeIiÊå ÆÜ¤úë€ÅA“†ñõ!…î"o)!…€yŽIYIS v¸&‚;èïBžcJòŽ ð0ƒæ×#]¤ˆaãù£(ð1à—)›V¶vgåµI~¸ŽæO© §µ@M X}~QÜxËàÀÏt”8 xLU¦íe&ѼbüFØÃp¾êW†$c¥cìé¹pT ‚Èßjåb»÷«1å¯ ¹bÔ<ü™â¿¦ú}c  Ÿ——8ð¯ôo¢ðEÀ]˜Ý$€gó|H®ááK"Ô-³,?þþ5ôzàTüíµ*{×?d¦NŠ)cEEwcË/»&ayEžÁÛÞÁžµ]”ù!d÷V+®Âl×GÖ€i$Þ@˜ÅžÉG“øÚ£Ä”¦Ñ8ŽPÒÎÉýP<< 4mˆ~›IBS‡Ö€?ä-ƒ)%$ýeR_K¤¢£$I*T ÐFy YNÃé¯0.Ä3–«==Ðk˜} /ç™ÝErUX™+¹ôhBœörà- þÙËÁÏ©€)½MOg²+Tõ´–h[Ö-‰šW|ψ:Q¶`xiä†VN@®• ý–.:Ï_D뇎*׊ÍJ‹€”óÿ}ŒnVÑf{œdºZ®3/]z[ÖµµãsÕï#avZ5½q8"È“àG?wá}µèÈÁœù;R m±´ÎiλMŠ 5ê»Ó1Çg"…«1[]žGXâ<'ÐüôÈPq­'aŠ•6^Ç9W?¤ø{ù’?è¼a©ÊSÆûJ•f‡$n°ä©~ŒÒjåùt³OŸ6²ds#ÒˆÙÕiØ $Eƒ£”Å'׌Y)íkÌ^_ƒdt+¤ÆpæÂ9iÚ‚ “†P’.º„œìlÿLÉÙ3žë§d-W¨q~y½‡Åªl• œÂî]f?ôPö •­–J‰nWÖz²R§ÕIÜI‘¥zƒÈpd+Uòp"»ËÏAèGA¾eYýÃÓÉì>â¶'E²2„ùJ°d £ð?Žzo¦0J S§Êc~ÿ±ö1%ìŒDžµ Pë^˜-©‹„;3Y ž´„ óïnƒ­{ÎÍdÆŽò„ù>A,ßSBÆßDLÿ¤°/QÌžÿ}q‡dZ—`6 'I¢ —ćŒ“µÙ†3£ÐQŒ¦¡«1'±No q€ÆKŽm ^‰9µ™—éþßÙ¢¸%àIEND®B`‚amide-1.0.5/pixmaps/thresholding_interpolate_frames.png0000664000175000017500000000273010715160133023271 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME× "ï'0ôeIDATxÚíš{ˆTUÇ?³;mí»u«µ‡›–k[b¹†¯D‘¢„”h•Rî@ý¡T$ô°ˆ ŒêŸBÈd‹$´,ËÞAdaÑÓ•ÈLvÓ2#«5 ݬI³vúã|‡½,3;3wι÷êì.{÷rçœ{>çw~ç÷8]™¤\_e”¸D@y©¨æ_WÑaÏv¯¦F}–Oãõl p8‹áêÈÑÞIÀJ` P ¬þĆ*WèïùÀNà/à=[àÀ}zïw`®§­Þ¨øènÐÿ3krlƒY´h>Шû…ðaà1  Ø4ëeRÕý‚° ? €‹€¿.õ0èþnŒ €nuºXÿ·/ÊúЪ+=àÀ ¡gÀ݇ Vkò.©á8`«fåbŸž`ÀXàO )õOøUà?õé•@ÄcQRËp›žO’J–û°˜Ää3•R~Dp­à‡`*°xÞ3+iÕ/ĹÉ ê)à"f}`ûÙÖpvíYP Ü©uð‚yÓ¢-9FÑåY>x3°NŽTà®×ºûEë`Ðnið5ÀKÀ§ÚÊüÄÖ\¥-íRO¤vxÇAâ¢X•cû À ž'¬»EÚßmHL´8^õ…Ç¡¨“¹Ûã®&4ëïKMmg¥n•{¼UîrZóœˆ/gxy2pª¶¶õl°O*êBvþ'ÚÚº‚ŠÐR¹zdÙßÒÖ:'( ˆŠÄ”Ę#ŸbL©e…ëdsÉ­D²i@Øæ°ßñrx¼Ò lšz6ßÉw%=ŠC—’/ÅÀonRø]¨T-féZCŽr ¥n“ÀÀ£˜¼Ÿ_I`Òð»€Û½£ÀLþöǃëÉ T×Yìk8&Y›¯gå …`ð&¯X¬Ü<‡)™©@Ï͔ĉ €=rO±ÔÇR-£ýºoˆº¬NÃä‹‘6̃‡0Ùêü¾Bòa-^⯘Zá `´´*^hBäHÃäÁ¤ÔVIý—ù͹0SêhÀà &{ݬg-ùþ8HË0u…”ehðicÚVȃp¦B\)xìµ`š¶ºj­óvàe—"`‚¶¢Mž³e6ë·ÝÀÝ~?ЀZ¦2`6p¢E#x2¦[.õß9‹ ˜"ÊgdN} øA†t¶´ª‘þZed4à2úBÚÞ˜ÚA SL-Jl¨•ïõøß6ý€‰˜CÔKÕô² @ƒÖc;æðR•çÛõî,f­‹0Y±v!\!š%Æ1¥³›0Çl+£  xƒÂJYùhœCH?bŽÄZ?†a*ÇóÆ#äàT÷?¯c¹<ï7%–>ÇSƒiÞÖV÷¸²DËà SÀØc°.£Ázàfe‡RÀ#.CÓ|Œ¾^ËÃÊûÐ* ?]ïV"sT˜ÎžÕšlðìÁ.,TÜÞN"• ÀJ¥©¦”©Áœùv@ü(€írjêåà@F¨O;Ë8P•A >Æàgå:Wô{o†¤s:ägiÛ.’(’‹½´¸S?À•l ºÃ¡êp©øÒr†[ZIEND®B`‚amide-1.0.5/pixmaps/amide_file_logo.png0000664000175000017500000002762710006536745017757 0ustar loeningloening‰PNG  IHDR€€Ã>aËbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÔ npO IDATxœíyõy÷?Ý=÷ÎìΣ•´«!BX ccÙVLB°1EÂQNðU.¿¯±“zƒ±ÛÇ.ìÊ[>EìJlNù¥ê5Æ&6‡q Ø%$¡E·VZíjïcçîî÷ž_OwO÷LÏîJ@^}U£íééûy~Ïï¹[â šâ¿5#esZ Z.)ª^Yâ£ëhÕ2Áð|å+w½Y]âƒû‚ôZœô€»¾’Ž9Âê© i #ÎÆ€RîÕõjíW}ÉΣéód2ó¯äæõ‘5k&ýðGï\²ƒûÀpÁ7¾~<úâöΕJÁeÒú›*-e@«}– :Pæ ò³‰¡U*¾óÄ“wZ“4ÅpÁµvàdÒ˾\.ÉIH ÀÒ3€Y$i_^Q†¾«±ïÏ<ûÄÌ):‘ Óq’7þç§žÞ°kWå¯Ë¥Lf€q ¨#Vˆ¹öW², &ÑûxAtt]U«ó×#©ÿx~‘·â Î+ÿÿ££'®ÔÔÌ€AøãL0!JŒ ˆ/þŠe…ú£Õ1¢ZÛ¿èòÉ×þ*@ÇÚj%øgoº`s‚Ó ¡ÏHÊ¥©ˆ¦'dˆ`¾ŠA‡¤N\+ÁÝ$€ùBrTkͲN@,‡^¹X~å/†=ì^Âà¾S‚3 à€¡é0«c<"ëG¦ÎJm;+¸_­í[u|ÄTa=W‚xlÅÚD¼ûòL&#ìÎ?`ˆ‰%Çp@ÕËJ_€:¡ñƒ42 GÂ.þUË~b_aY`9F°‚x"¹†÷k€“ÀÁ¥¼O3:€š:}R×ö—`ƒhVñ/þŠOȱ©ýËáÚr¸ö‰8ö Ó8#@’®øÊ³;::–ÝÀ ÎXrœ‘ ˜ý½NzªËaXfùÍj‘Ä. „8·ÎûVeÑ:÷‹Q/ÌKC:t ®ˆuttl˜ŸŸŸ0$Àüß,ÊRðŽsÏÝ”-ONŽO½|•,ŽÀ!IÓ†1>‡Ñ´hú0’4‹$ǹbd 1/PÄtne 1Hæ¿‚TUfg§÷Ô0Sû,©#âŒ#ÈÑhôC ý…$qÐ „A’B¡ }½kèí¾*|0k¥º0ô©Ô>Yà0 taH•`m»PA¢l.ƒ†„œ¤Rý]úÕƒÏüdnnv/pxºvÀ%à àjµº' þ¢Z­îSUmNÓ´ ]׆5M;R©T§3S‡;:"áwwAJª+VSQNË?L6÷ËÉpx2$Këè@B±ÈÉòSŠÄl T-¥Óéà É(gàô¡R©”UU=©i꼦©UUgTUWUulpàòb_ïçΓ¤ó» eN(‹‚øƨÞËôô/>¾û…®®‘Ð`Ä Áš¨ Ùdµ¦1ÈÈÌËŠ’©drSG*•JÃl8ÎF£ÎX­‘F€‰ÚrPS©?ˆFÏë©!«…‚H(•‡(Gçu]›Ë¾ 1[õ†i)£ ×t ‰@-d©P°¿¯£#~Ű–”fg 54Œùw/pëêZ‘‘¹´·\êH›ˆ©›b]B2äóûÈd§ÇTU9qä°¢ôdeJ5Â,D7¨>5H@‚H°§³¯§0 v`h›+—òæÎ0€?T1ܲ¿ßrÑg¦{û.\®ëHÂ|“Ðjó·Š¡ÈUAFSG´jµz\Ó´9M«ª•ê‘W`´&ê~1úëÓ‡1DP¤•RGxŪX,ÖarlXÊ;ÃíAû·ô龿 —ŠÉ³Ñ%“èjí»¡á—+/33w$­iúIjQ¤±“;÷ÉR±jl/ÕF¼á!L ™.f™N¢¡îå]É’$Å€N I°$8Ãmbd„d8¤¿­\ªF%ÑetdTd4d¦Ðª¯2ŸŸŸTÕê¨ØfndRRæOJÌÔö“M&¨ÿ“Ñkl%XìŒõ­ƒq ÏລºŸ3 Ð&öîVûòÙê•RÍÏo%:fÐôŒOí,kš6¢iš0Ýôry.W(ìÛ+1¨5bä7D¿Xc¨Ša$úˆDº×F"‘8ÆèïÃÐ43 ÐþåºÒ—RÞ53[YçFtÁ:è¯ÎMÍW«Õaë1 ÅL.žØPÔœ\Ë/¯ÝúÍp wGVu/ëYy¶$I è_Š{z#3€~º?·}4Rݳç©ï骪8‰ŽiÃkÀ•ÊNTU›«T*Ç,׬éº>_ÑÆwCGŸ—8QÛ^èýu϶¥di¹‹u] (JÃ3ÙÇÐïÄN‚œvÄã+(Í_âJt©þ5–÷qxäùª¦©û-×*L„Ù™ÙÃÏ¡ó´$•Ê‹ÐjFµ‰A&ˆLË:×$»’+0ËäbïéÀ¯Á8ÃMx]hÿ`U5(•JÛ,»ë®Á™éÙ±Ãñxòå` }Ìðìj¢ñEÌé!NˆåÄbçcØŽ}Á¢ðz û"øç>÷9ÅðÄɲŒ¦iìØ±ÃuÛÿüÏÿlû"n¸ásYQÂLžøKæ¦UÓ/.Õ ”àäôsTÊE4Mø’埦"ñ®Ü\ñ€ÄÊõ2 Ë&ºãøÔÌÄ(HIú’ýëÇNŽÆ*•J#V=†ÁX Â뉚ý›ßü&’T#ÓÓÓæ²ÑffŒìê7½éM ¿õôô°nÝ:Êå2###¬[W·®æçë¡÷#GŽÐ׳…|6nŠj ¦—^'Ú!ÒÙƒŠ®i|÷Š…h4Gb;õBöJ]MÆŒýëyæJb½‚D7}±u]ÝÝÇΘ8™Vcä ¼¡ %á[aË–-¦xê©§|Ÿxff†uëÖ±sçN.½ôRžÞ=;O «[Ðô²™ì©¡ªï@—rœ{î¹ÆãݵkWÃ1ïû—Û«+–­çâsþrX£wáê7CHõ¤Q¡ HzB‰xÇÆÉIi·®ë] á Ìx­À•øßþö·(—Ëž;öööòôÓOS*•(—Ë„B¡]À‹/¾Єøqâ«ÈÍn@¯™@’èX¾ŸàøÉ(Vò$åúô|á…‰Dxá…lÇžš=ÎtæÈšîØ&$IÉÈ”jO]Q !K½ò`÷Yý“S“Ë3™L88Æ¥Àk©6ÿÛßþ¶I|7<õÔSæÿíokÎÿ‹ŸcȬG¦Ó¢øY=€B{/£3ŒÎ¡PÈ6]ɲL àÏÿüÏmÇ­TJd '@>‚$,f¤Z;¯µüD¸Ž{ I}]ñxb†5ÐSû» ¼ é¨·â¹çžs=À£>JWW—ù]ŒþD"a›»›!‰P,ˆÅbär9×íJ„ja-•J´F|ãœâ_f–¹üvæ‹“CA²Ù,H’„¢(D"dY榛n"‹qÿý÷06½—Áž (ƒÓ€p&ÙQŸ b„ƒýÑ•=«VÏÎÎt …4p°Ó×;pº%€oâ7ÃÊ•îÑlvI“eQXªˆÐÙ£~uà8…ü!ªjY®?VÁñxœééi&'âß«¯¾š[o½•Ùôóå“À$%$Êæ”âî"E<Ø»"‹ 1ŒÔñátJ€âß{¯¡W*FÂd3m^@?‹™ë8@(ò=ú’À ™™1,Îñ(Qa?F¦øÏd2ȲL<'Nîûýû÷›×óÍ7¡Bdcøu”†Ñ_g'¡sÄ ‡»{º“=+fgghš–À0 'Ú½÷ÓÅ6âß{ェU£Þ> ò_ÿõ_‹>IGG+W®dß¾}€!æÁP&ÝæúH$B¥R1¯Ã‰p¨‡®Èù”srMû·ÚæV¥;C.·‹Ù¹IóœÉd’îînÂá0ªjL!ýýý6i%…*(JM­PwÿØagŠ( i¥œŠ®Õ°­ÕìkæÑ³N;NX}Âg_­hì|¡”Ic”@]0˜ÀýÖvÓ³'«Õæwñ]wñbß:œU„X¦‰nV/_·~tb¤«P(Ìc¤ŸÀ¨qo‰Sªú!¾Sƒ jÓ¦½ P*¹»È/½ôÒ†u›7of×®]œÞЮ)²‘Ú•¯ùù@«˜¯ÿÒ¸®=Ñn_§c›Zd©aŸzÚh’˜Ü—èîêÞ8;;{ç싶KÁ £¿– ÀöíÛ[ mîÀªT*M§cÇꉷ+V¬°ýægÔ ÌgË<÷ä<Ù™,Fˆ]wŒF½¦­—ÐÉ¡6´Ž³]üÒŠðu¦’P Ä@Õ¬ ·ýõÚQ"J` {õÀÄÔD*g„6ßÅè¨QeuÙÎÏÏÓÑaô7nàR©d®X¿~=6x×=ŽÐ×××4ì;66†®ë\sÍ5m݈ªjÊ1~B(}eÇH1ú"e}˜CÓÏ0—Ÿ&1,ÓÍ«ë¤R©¶Î-püøqÀxN‰ø .;+Fœ$õ>DnžA±6NGhY犞ÕsssCår9†Ñ[èp³sž`tt”W^y0°l6kzöæççùéOÊ·¾õ->ûÙÏšë­9}"455e®óóo—øÙL‰£Ë”òrMù+{Ìçyææ÷3—Ÿfpp€ÎÎN.¾øâ¶Ïç…G}”r¹Œ,Ë”kÁ§zª] €Uù “StH—E#ÑËåò Flà”1€§ÐćºFoÅOúSsÙJ|€­[·òè£x†iONç•?ÌÔæÛ"um_·8g4ªL3[cùò~®¼òʆ`–5l!¸ùæ›ù×ýWa=R™N¬šE£>aXIz;WÒ]‘ÉfFt]ïÁðNã…2€øV/•ø"Hc%|3Xu«B vÇN¥RA×uÛC¢¸”KUîÍ15 ñKœÿ%J•Qæò3lÞ¼™d2ÉÛÞö6À°xdYFQ”E3ÁyçDZcÇ8YfU¬“(ý5ß¿S¨Ã¸ÞzÄå¡ëB¡Ð¾R©Ôƒ‘:¾ä `âÖ[o%“É4õÛÏÌÌðÛßþÖ÷17mÚÄÈÈétÚ5Ž#¸=ì…<üùl…½;'k"V´â±mjǦD¹2‰®ë,_ÞožK’$B¡Éd’®®®E3ÁîÝ»™žžF–Då’&2ìpʉ0aºéŠõ"IÒÀí&aep! à:ÄDÄnýúõ Ÿvˆ/ÐÛÛk&ˆßÑ£Gyì±Ç¸úê«ùÅ/~ẟ˜>üB×uNŽ9°[ˆý²EãvúêUuúûûéëë3׊œ¿ 6pöÙg7 <ùÁŽ;X³f zUbøÅÑ’Œ¡S¢»oA¯ýÒÉêäÆzF8ùƒ;x÷û.åœsÎq=·w®‚ÎØp†æÐžiNžˆš2(; CÁ³Þݱ$¤@7ý‘K¸rÍÙH2”+Å'þæêÝ×µL >K…µk×299é™:æ*dI®XF‡5›Ï€ó»õõPÖßí‘þU&_ÉPªV(•J *•Š™äêÒ–Ì1CÑ“mzH³v4ö*ešL£ë1¢…ëü0À:›#£iápØsô»íÓ ï~÷»mßE‡d1ŒÐŒèØ– BÛV(1Íñ‰Ã¨ªJ<7}$Õj•`0hS–ãñ8ñx9 Ö¦¥ª™|â—ènéãÞÐPcOù·èº–Á'ÚV…—ëùçŸ7½Öi@|¿ûî»]÷ÿùÏnË¿×uH$‚ªªmÕûoß¾Ý7£˜×LSP‡‰)«Î‘gÛ(ô›MvE¬B•qF CLæ&Qã ¦N&“èºnJ«ž3E¯äé`€]t‘pjüí;–íÙÉe¦9\ØÁÎ}/£ëúÑÚJ[ ð¹Ï}Îæóf €`/â|÷»ß5—;;;™5¿»t×®]lÞ¼¨G­UÄn1ÁH^x!ŸýìgùÖ·¾ÀÚ-üúÁ‡Y“<Îè1ºPˆ"8´Îܱ7„Ò(S ­Ž3ž>À¡© yâñ¸ˆF£hš†$I .ÀŒ:Áðü!ºÕ#$cˉúˆ'HÉ&“ÚVû_¥È<éÊ$'²94y€JµDµZý`; µb€‰ÿ;ï¼Ó“ ²Ù¬ÐÝÝÝž©Û»ví²ÙÏ"ÇoïÞ½®Û iòòË/ÛBµ¸éýÝÏã?ެî¢'ÖM²³E FX®­G[M´«eNΜd®2C&c´{‹Åb&žwÞyFFF`ÌkEE—u^9¹IÚK,£¯£—®ŽîºDl»ûŽËyÆfÇÈT²¤³éšebÏ·%*• ;wz7¢˜™™á–[ná¶Ûn[R…¯ƒA&&&Ì<„o~ó›<òÈ#\{íµ¬_¿ž»îº‹ë®»Ž¡¡WùÿxŒññQ£?`}Ò"É B«/•JȲL$bÕªUŒ#I’™Ý$Ë2›7oæða,X,F_ªÏþ <ùäìÚµ‹±Â(TL7“mûL¦žò_(ˆF£ FW21í€áe¬T+„Ãa …|ChÐ}3Àßþíßš™9¢ŽÏ ·Ývàž÷ÿö·¿Ýóø~ëÿ¬$‰îînÒétK‚‰Òµ×^˶mÛØºu+©Tû÷ïwF~øÃ6¬JЃÌëŸóÎ;Ïv}Š¢F›FOž4Jù>øÁëX¿þl~ÿûßÛ˜Øy~g0 ꉵnñI’Ìt3´f ÐTü_tÑE µZ…}š~”¹½{÷6¸Q7nÜÈŠ+6@(ZâáÝqÇ F_ÀÿøÇæþûØÇÈf³d³Y3¹à¾ûîC–å†ä1êƒÁ`Cö±u›ÑÑQ–-[fëä V‰Êh+–/_ÎîÝ»Y»v-º®7äYˆëYµj•¹Î[pS¤="µU à[T*‰›6m"N m­Ùž|òI¿‡Z0†††x×»ÞÀ¯ýk 1 Ü ÑB8®œéåGå¹çžcjj MÓ8qâ`Œp1¢­°&~zY,Š¢صk², Yµj•¹½[q¬›6m⥗^¢Z­2>>N>Ÿ7} º®óÌ3Ï4|º]—‡ô™f›é;&ûúÓŸê#8N›µ\.ûîúñÖ·¾uAÉ΀ӾoU{088h^¯•TU%•JQ(Èf³ Êå2hzëׯoX·oß>³aå3Ï>n ü¦µúIÚe‘äâ ¬uÖYìÙ³‡`0èlzöÙgyßûÞç'£º>Ì@áD±b):zYa}PÎ{~ËåˆÇã„Ãa›Oá’K.¡T*™¢>“ɘLivv–D"a ]Ÿþù ¹¦´[Q*•‡Ã¼úª½-µ ¥õ¾Úa‚fó¼ÝÎmÞóž÷ø:¶í<.ëZ:.½ôR¦§§*|›Á­[wÉÛHéN$M3‘EYŒf«í,”Wëþ‘H„‰‰ S‚tuu™ pà 74ø5ÄqÒ†¾ÄèM%ÁÞË8 ñ±}Œï}ï{¶ý:::˜››óÃdæÈZPBˆS|âŸh«ý›ÚÍç·Ïêb ‡Ã¾û 8cóÖýDw2áªvú5îÃùü³IDAT»ï> Ñ²¨T*M `ÍÍ*›­Ä»îqùå—óï|‡O~ò“æ:1'“I³·BKhU¹ 4ˆÀv De0tu|xM‚èNŲ££ÃÕçîbU(‹^fÝŸþ韺®ïï7ÞÙätˆ fèèèhˆ•Xae`q~UU‘e™¹¹9Ïý>ô¡ñþ÷¿ßtüˆ„‘œ“Éd|§)|õ«_m¨¾õ²÷¯»î:ÀhÜdÅ¥—^Ê–-[\ l=v;e`Ë–-3—ûûûm¨`0E$1Åt³ùT4£r6Ìd2¾*–á¾¾>¦¦¦H¥Rôõõ±{÷ndYnªSˆn¦í¶Æ’âé§Ÿ6×]|ñž%jSpñ/Ö j§†@×B I’Èçó®I„“­7µz¿p&—,ÅýOMMÙœU‚ Ó4sd5ÃÍ7ßL"‘h˜Æ&''mfu+8'«EÿšqöŽ;¸îºëFx3ñxºP©TŒ"L—$¯iĉÉÉI³.P–e³bHQ”¦ù +V¬X0ñî¿ÿ~&&&̶¸Îö¸~™·m%ð]ïz—é†mápØæœˆÅb¶7}”Ëeòù¼k;§BÔ BŒ.¦±4*wdzzÚìàu]333‹.õƒ[o½0|Â3)<Îlì|ÐúÕvqK’®ª*³³³®má¶lÙ–-[xä‘GÌØ|:6¹ßÅkÕËÇBj…2ns¹õXnÒHˆh§ûvåÊ•d³YÏð®$I ×éõ2Š¥@¡P°yÛ}FVXTîŸ ¾W ¶_|‘w¼ã€{«§§ÑŠ®®.2™ŒmN+‹®ï j¦Dy=œ®®.[ +„8::ê™ÔÑêb*¨T*æòBÊØp»×v™ÍSÜvÛmfó%«2õØcy¬Yÿ=kÁøW‚œsr$¡¯¯Ï3Àª—»Ø‹&&êmö…X:pK’d­©Tª­©ÉMOÊår拱zzz˜šš²Uû[U–h‹ç‚\ÙQ˜3Vé¦Yf³ÙE7kòj %Îé•û/Ìίýë >·púø‰kèºnŽ27—¯Wsk¯\J!Ŭ#wÆ æK/¼Ðêy‹#V^ð”ÂÑ\f¹\Ž®®.¾÷½ïñÇüÇMOæv,«dpK®ÙO~ò“<öØcŒ›Š4úÀP~¶mÛÆ#`6|Z,:ò#‘ˆ)axà*•JÃÇ/6nÜÈ~ô£–Û-ÙK£œ£Ê/òùü¢¼‚‹y{è¶mÛØ¶ÍxÃ{?ýýý|øÃæƒü ç>V=Á‹ ~ F›š‹_O +üýßÿ}Ó …‚«ÆÜ,í[8yÊå²ùYáŇæÊOâ…óuvvšLP(ÌÏüü¼Yä ‰Åb¾Í­fˆF£æÈ¯V«¦Uâ…ú§ÄK©ä†¸Þ¿«{²©'Ъ‘öôôðÄOÐÙÙÉäädÛuy®'¸âŠ+¸îºëæ3ëûüÜ”-7â[E¯¢(MGèÆ õœ9§¾|ùrŽqm®µäPUÕ|·à<ÐtÛ¯}ík€áŸfg>Ÿ· J?â<À­èCŒ”l6K$ñTüî¼óNn¼ñƆõ>ø 7ÝtSÃúk¯½h$¨ÔƒÁ¦¾‚¥€5yÒ9²½î·»»»mSÏ Š¢4¸ÝRï¾öµ¯‘Ëåèéé!—Ë!˲ù7•J™¡rgr­ (‹fþU¼óïlºŸ•€¢•Úìì¬Íû•ËåL °6pVˆ‘®iZ[¡højVÖµH’dÖ¸9~„gÕO¦vnîqš”;Ênüà? â8¹[<@·¹ï‰'žà™gžq=Q,ãÁ䡇jê2ŽF£æ+”$I’4ú­s¢øîVõºuëšnkÕ Z¡¿¿ß6_ûQøÄóºçž{\ÇãFsér™Ã‡óýï¿å1š>‘îînS!Ù¹s§+ÑK¥’é …B¾²(4±B’¤¶³aZa±Ú´_&æh8np”uww›Š«W‚F+·/N47Ç“¦i„B!Ïv<^XèUårÙ¡_þò—rH[¹•ÓæuS8ý6¢ …B¶O»¸þúëyÏ{ÞÓÖ[ÌZ<•JµýNÏ|æ3®Ù‰ï|ç;ÎUM“< T*Ù>@ƒ™aeÕr3!#‘HƒF¾eË®¿þz›^¼-L@,‹iÇù`[=h/„B!ßI‚ù.¿ürSaµÂz-íV8§R)¾ð…/øÚö /drr’ÉÉI[RŠ€0­ÛÅ’ö tjîVXß fÅW\Áo~óó»sdÌÍͱ|ùrt]ojÖ‰‡ïe— +FH1_ûyh¢|Œ¼§¹h}k¹(2תªê‚Jßp•ŒŽŽ6„Ž]2µZrù’¿>¾P(˜9v~>½óï¤X,’J¥”©d2i¤ž ´›¾uÑEîî^±.•J™×ÝL1üøÇ?î뜧¢ï²À’J/b{~+ÄÈ÷ãFõІ‰ò‘˜B– ¢wp³PèB\Ë~L7ñîñqŠ^k ‚õ¯˜*¦¦¦Ì­[·Ú^é†V¿· g¡¥µuŒ“qýè,Ï?ÿ¼9BñL`Õ5ƒ fƒ!‰´å«÷‰—"¹IÛÁî¹çÓ“§i‘H„õë×ÓßßïÛ6oÕÃÏ EQ|‰÷Vº€W\¡ñEš›¨%˜™™!‹™aV¿ŠW04N¬’ðî»ï&N›‰¨bÙ*‘éìì4?`H^¤s`Quh^;7 «ËòСCLOO›-æ~k;Ô•¤±±1Ó¢°Žt·È¡Ἀmõí{ù Ä5 ±j}ÐÎ99‹ÙÎeÕöìÙÃöíÛ[ƒˆ}ªÕªMøÈG>b”„ûÛz®D"ÁÃ?Ìèè¨mÚÅ9¿üå/ÝN·è"ͧÑF¼ÓO@”%‹>66Fww7‘HÄ$~±XdëÖ­d³Y³÷p“ær9OQì”Ùl¶!°ãÌM°ê¢Øí\ù|ÞÆÀB¤ïÙ³§­>ˆ‚ ¢Ñ(7Ýt“ Åb‘ááá†:áÀ/Þö‘Ó·$¨^ Ð` Üu×]|ô£5¿»¥iAóB¡9»‰øx<îûC‰DÂÕç/ö·>3,ÌèÉN†µw~Ð΋ ½ zÿ9 õiæ†nðÜßúR+3¸óæ7¿™+¯¼ÒsÿfФuêx­FýRŸ¨­Ø¯`†¿ú«¿rý]TÇ´+„ hU*ݺvº­¸ÁÉ»wïæÍo~3€¯>V&8x𠊢°råJÓ‘ôZŽúSy¶˜ÁÙSÀéÈi·Ê6›ÍÚÚ½ˆã ±+šY¶‹»ï¾Ûö"¬v@@X-¯¶=íÄ?Õ'õÍ ‚¼Ü¹ÖðÍb𪪺&R,5ü”]¹1Àe—]æµùkB|8…o§ñ¦<âšk®0߆ᅥ(›~-ðz$¼À©d'¬7ëÊ ï}ï{ÖŒà‘7øz€`Ö·¼å-^›¼æÄ‡ÓËV4eÁÖÈo$4!:¼N/ðzºÏ)ÂZ8âŽâñxCÎâ©À[Á¾žžµ‰×ãE-º…æRtá´b‘½_ÏØÄëùâNËkëO^ÏÏÕ†7Ê…¾ž™áò ]ñF½ø¥bˆ7êý/þ»<? ñßå^Ïà –ÿ’w.ŸíѸIEND®B`‚amide-1.0.5/pixmaps/amide_logo.txt0000664000175000017500000000034710006532331016764 0ustar loeningloeningMade the logo in GIMP as follows New image, 90x90 with transparent background Text: Letter A - courier (bitstream) bold, size 130 Script-Fu -> Alpha to Logo -> Gradient Bevel Then reapplied gradient to get the blue/purple colors amide-1.0.5/pixmaps/window_abdomen.png0000664000175000017500000000217710336316713017643 0ustar loeningloening‰PNG  IHDRoª¯ pHYs  šœtIMEÕ ¼)a¶IDAT8ËÝTKH2m>Mc*†L*aj&ÝËœn‚1B©%D‘Ñ‚6µ±Û*hÕªZE´[B&bIPV‹’Ê213jº!YH6XŒþ‹‰¾¯¯ýóŸÕá=ïyxÎíø¯YÆÏ'‘HTYYÉãñ„BaCCƒL&ëèèp»ÝkkkKKK±X,™LþÌÊüùd0¦¦¦p×h4¦¬¬ŒÃá (JMÓ333™™™ÿ”ŸŸo6›µZmmm-†a¹¹¹YYY"‘222Òét]]‡Ã!âêê* þž‹|y‹l6Ûìììõõõóóóëëk<g¢|>Ÿ¦i`JÛÞÞ–J¥………UTTßÜÜI’:Îçó%‰“““¯¯ñxœÇã===Åb±ÛÛÛúúz>Ÿÿ hllìôô”ñ‡‡‡1 …Bptt‰dkkËår‘$ÙØØKKKÓÓÓ߀„B!`† —Ëmkk+))a³ÙãããP]] EEE[[[ÙÙÙz½ž©ƒËå2(èt: ÃD"Ñòò²Ýnyya³Ù]]]2™ì÷vbV]] ‚ {{{£££‰$ÿb”——g2™fff¸\®V«u»ÝÉd2~||ü1ãùùy¿ßïp8¹¼¼ôz½A0-GÎF£±¶¶Öï÷Àõõuww7ã8Ž/Ç#—Ëív;EQápØétÊåòËËËLhnnÖh4,ëíííþþ^¯×;N‹˜Â™µ0›Í6›-•J­®®VUUá8NÓt"‘àp8§§§ŸŒz{{‡††òòò/..@ (•J…Bát:A(R*•^¯7''§­­M D"±XF™ @Àårµ´´ÀÄİÙl…B ûûûU*I’Ñh4 –——ONNF«Õ* išN¥RMMM###Ÿ'rssƒ Hqq1Š¢çççeeeûûû¯¯¯8޳X,š¦WVV677;;;ÛÛÛS©EQb±8‰…¹¹9’$Qf뫪ªkjj0 +--}xx`d ¯¯¢(µZ}xx¨V«[[[ ™L2pvv¦V«www-d8&bjjjccƒ™ ìììPÅãñ˜®õööâ8Ž ˆL&óûýñx<>??»þX,fµZM&†a>Ÿo}}˜+ýøøxO§Ó …boo¢¨@ àñx, A³³³Ì}Ýßß»»»ÇÇG“ÉÔÓÓóôô”H$jétÇñžžE1 »»»ËÉÉy{{3 Œfü]!¿L*•òùüšš•Jurr²ººšH$¾¢l6û¯Rùÿ³°WÙÞ“.¤¢IEND®B`‚amide-1.0.5/pixmaps/panels_linear_y.png0000664000175000017500000000137510715442131020005 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDÿÿÿ ½§“ pHYs  šœtIME× 49&Ä™HŠIDATxÚí›MHTQ€¿Q³·¢4ð ZôƒàBÚ)þá& l“‹,* ܸIpá2p)ˆ2¸p!¢¢WâÂUØ¢Ðr“A¹)#"-,[8ÚâÇàŒ¯±çïy¹Ü¹Ãùî¹çÜsÏø?òØÏÒ'­ä \ÔÈ `ÌIà‘Aà›Iq`Û €x¸ÐLç4ú€z`(¾]š,  å€m./€§@L€&à&ð¸ˆò·€Uƒ:E‚Ð'k‡ô=+5RìÉìÙ– ø±€»2ûsÀFŠ>³ÀŠ­{…!Ùªu³Wµï7óš¬ÚÌ¿ØõxÔ—Ú¼I )»@‰&ÅÀÇ$O´YA ðË`^c(¬õ@ˆg4B¨ó@¸­uST/&mQ(’Áwä`ä:ð[Úª%MÎFyÄ BE6˜*A*·a ¥.°ž¢} 7¨Ó) ÿ¸Ô»Æ OªCX & „BöIåñk@·á0x˜¹‘& Z}GÈfpëƒí—@h>ß=íï€ÛýE;n‰l¨Ðæ,/?eMuhŒÏDù¡³Øugÿ(¿lãìûQ¨EÞâÕ¨”÷ J%QwlT.×GŸ>¥8À­°{CT•DÅñ%¬ùšÒá×IŸË$\<`§x)Ku|uÔ†’ÒËáúœØtد•Lxüœ¶@žO'x·ŽØŠ[º ¼MÑ øbÐä#À• Žš¦„jo °¶0òG,a¸cK^ð¯JÄ€6à=–\œÌd µ÷Xì¹fjv‚™ŽY`8 »„ž}À •¿¨’‘ÔŸõpIEND®B`‚amide-1.0.5/pixmaps/Makefile.in0000664000175000017500000004374012271346301016203 0ustar loeningloening# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = pixmaps DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/libfame.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/amide_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pixmapdir)" DATA = $(pixmap_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMIDE_CHECK_OBSOLETE_CFLAGS = @AMIDE_CHECK_OBSOLETE_CFLAGS@ AMIDE_DEBUG_CFLAGS = @AMIDE_DEBUG_CFLAGS@ AMIDE_GTK_CFLAGS = @AMIDE_GTK_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_CFLAGS = @AMIDE_GTK_EXTRA_GCONF_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_LIBS = @AMIDE_GTK_EXTRA_GCONF_LIBS@ AMIDE_GTK_EXTRA_GVFS_CFLAGS = @AMIDE_GTK_EXTRA_GVFS_CFLAGS@ AMIDE_GTK_EXTRA_GVFS_LIBS = @AMIDE_GTK_EXTRA_GVFS_LIBS@ AMIDE_GTK_LIBS = @AMIDE_GTK_LIBS@ AMIDE_LIBDCMDATA_CFLAGS = @AMIDE_LIBDCMDATA_CFLAGS@ AMIDE_LIBDCMDATA_LIBS = @AMIDE_LIBDCMDATA_LIBS@ AMIDE_LIBECAT_LIBS = @AMIDE_LIBECAT_LIBS@ AMIDE_LIBVOLPACK_LIBS = @AMIDE_LIBVOLPACK_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HELP_DIR = @HELP_DIR@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFAME_CFLAGS = @LIBFAME_CFLAGS@ LIBFAME_CONFIG = @LIBFAME_CONFIG@ LIBFAME_LIBS = @LIBFAME_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ OPTIMIZATION_CFLAGS = @OPTIMIZATION_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMEDCON_CFLAGS = @XMEDCON_CFLAGS@ XMEDCON_CONFIG = @XMEDCON_CONFIG@ XMEDCON_LIBS = @XMEDCON_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ intltool__v_merge_options_ = @intltool__v_merge_options_@ intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ libgnomecanvas_greater_than_230_CFLAGS = @libgnomecanvas_greater_than_230_CFLAGS@ libgnomecanvas_greater_than_230_LIBS = @libgnomecanvas_greater_than_230_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pixmapdir = $(datadir)/pixmaps pixmap_DATA = \ amide_logo.png \ amide_file_logo.png EXTRA_DIST = $(pixmap_DATA) pixbuf_csource = $(GDK_PIXBUF_CSOURCE) BUILT_SOURCES = \ align_pt.h \ amide_logo.h \ fuse_type_blend.h \ fuse_type_overlay.h \ interpolation_nearest_neighbor.h \ interpolation_trilinear.h \ layout_linear.h \ layout_orthogonal.h \ panels_linear_x.h \ panels_linear_y.h \ panels_mixed.h \ roi_box.h \ roi_cylinder.h \ roi_ellipsoid.h \ roi_isocontour_2d.h \ roi_isocontour_3d.h \ roi_freehand_2d.h \ roi_freehand_3d.h \ study.h \ target.h \ threshold_style_min_max.h \ threshold_style_center_width.h \ thresholding.h \ thresholding_per_slice.h \ thresholding_per_frame.h \ thresholding_interpolate_frames.h \ thresholding_global.h \ three_compartment.h \ transfer_function.h \ two_compartment.h \ view_transverse.h \ view_coronal.h \ view_sagittal.h \ view_single.h \ view_linked.h \ view_linked3.h \ window_abdomen.h \ window_brain.h \ window_extremities.h \ window_liver.h \ window_lung.h \ window_pelvis_soft_tissue.h \ window_skull_base.h \ window_spine_a.h \ window_spine_b.h \ window_thorax_soft_tissue.h CLEANFILES = $(BUILT_SOURCES) DISTCLEANFILES = *~ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .h .png $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pixmaps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pixmapDATA: $(pixmap_DATA) @$(NORMAL_INSTALL) @list='$(pixmap_DATA)'; test -n "$(pixmapdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pixmapdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pixmapdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pixmapdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pixmapdir)" || exit $$?; \ done uninstall-pixmapDATA: @$(NORMAL_UNINSTALL) @list='$(pixmap_DATA)'; test -n "$(pixmapdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pixmapdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(pixmapdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pixmapDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pixmapDATA .MAKE: all check install install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pixmapDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am uninstall-pixmapDATA .png.h: $(pixbuf_csource) --raw --extern --name=$(subst .png,,$<) $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: amide-1.0.5/pixmaps/view_linked.png0000664000175000017500000000300410715154666017145 0ustar loeningloening‰PNG  IHDR@@ªiqÞbKGDã›4FÅ¥Ô pHYs  šœtIME× *wPý‘IDATxÚíš[l“uÆlã°–1Ø8«lèPð¬›(Ê…™Ýqa² ;ÀJǃ#Šsà@P<@@¹"áÒÄC—,°ÁÆ8´jDáE……1à‚;/Ú²¶cåûF¿µÝö$_Ò«~ßóë×ÿÿ}Ÿ÷CÒ VrÐçlà p7p¸<Ø`¼(èº|<5ÌŽ…¾~Þò*€$ 3€àë7à=àÉâYà„A~¶O ÙþÅOÉÉÉ*,,Ô”)SŒÂøxx<‘ì ª­­U@^¯WÕÕÕš4i’Q?o&÷‹Ù0W°M99EêMG+W®ÔĉÂ8l‰cóJuÂ%RV–ÔØ¨ˆ:zô¨ªªª4a£0~ÞŽ7kÆÃ¯²2ÒáǵbÅ eff…ñ°x0Öæ‡.õ¤º:™Ò¡C‡TYY©ŒŒ £0¾ê€Y±ðJ·ÙO;{HI‘NRŸÔÖÖ¦ŠŠ 7Î(Œ³À›ÀÌþàòíÜåˆé‚Ë!œNݱZ[[µlÙ2¥§§…qXÜo%¿É a7Ïž®¨ª¥¥Eååå3fŒQ§J |vÃTKëÀZºt©ÒÒÒŒ€˜M÷)ñ° —ËÅ7úuôÿÊ_„‘žaùÐÒÒ"§ÓiæoФZ´þt£d;@AAtL·¶¶ª¼¼ÜìB¸ÎÂ…0xÜ*X(8Þc+ܽ»ï¦<¨ŠŠ ;Ö¨évÿVø@ü¦E*‚@š?¿oû¿Ébèl,‹¡{3Ÿ“#]½j¼^¾|¹ÙrxC<”ÃYðŸ 3Ä|I‰tåJdÓGŽQUU•Æo¶!z(΢?²`S'¸”œ¼]n÷åˆ] É–ø'Ko]`­ “ C‘\Á?wtê$Òhb7,€Vîz¹Ûh› ©Ç˜–&utôÍôÞ½{UZZªQ£F5}¿fÅàopëk×.óEÐ’%KÌAkcPÝ„°½7óëÖ™+ƒMô'×c\ß WNÃù›ÆgΔ¼ÞȦ÷ïß/‡Ã¡Ñ£G5ý¿º/Nó€ç¡Pvûœy@p+ìt:ͶµqÜ ÷ž]ó÷Â0ÄD2tß!‰D CBÔ02oÞ<³‡$ÖÓ?‡$,Ó ÀÇ&Ѻˆ™ GâZ$nÃ7)ŽtHb#ñwH"ªÚAÏCq;³BÏáŒn&£CÒ§þ`šZz#k±IEND®B`‚amide-1.0.5/pixmaps/icons.fig.bak0000664000175000017500000003140010376546362016477 0ustar loeningloening#FIG 3.2 Landscape Center Inches Letter 100.00 Single -2 1200 2 5 1 0 3 0 7 50 0 -1 0.000 0 1 0 0 1650.000 5925.000 1350 6150 1650 6300 1950 6150 5 1 0 3 0 7 50 0 -1 0.000 0 1 0 0 1650.000 6525.000 1350 7050 1725 7125 1950 7050 5 1 0 1 0 7 50 0 -1 0.000 0 0 0 0 1650.000 7575.000 1350 7050 1575 6975 1950 7050 5 1 0 2 0 7 50 -1 -1 0.000 0 0 1 0 10200.000 1387.500 9900 825 10200 750 10500 825 1 1 1.00 60.00 120.00 5 1 0 2 0 7 50 -1 -1 0.000 0 0 1 0 11325.000 937.500 11175 825 11325 750 11475 825 1 1 1.00 60.00 120.00 5 1 0 2 0 7 50 -1 -1 0.000 0 0 1 0 11775.000 937.500 11625 825 11775 750 11925 825 1 1 1.00 60.00 120.00 5 1 0 2 0 7 50 -1 -1 0.000 0 0 1 0 10237.500 1237.500 10500 1275 10425 1425 10200 1500 1 1 1.00 60.00 120.00 5 1 0 2 0 7 50 -1 -1 0.000 0 1 1 0 9937.500 2175.000 9825 2025 9750 2175 9825 2325 1 1 1.00 60.00 120.00 5 1 0 2 0 7 50 -1 -1 0.000 0 1 1 0 9937.500 2625.000 9825 2475 9750 2625 9825 2775 1 1 1.00 60.00 120.00 6 6525 4125 7125 4575 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 6787.283 4347.597 6655 4215 6600 4350 6660 4485 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 6610.926 4350.000 6614 4286 6675 4350 6614 4414 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 6707.739 4350.000 6610 4421 6587 4346 6610 4279 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 6600 4200 7050 4350 6600 4500 -6 6 5700 4125 6300 4575 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 5962.283 4347.597 5830 4215 5775 4350 5835 4485 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 5785.926 4350.000 5789 4286 5850 4350 5789 4414 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 5882.739 4350.000 5785 4421 5762 4346 5785 4279 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 5775 4200 6225 4350 5775 4500 -6 6 6750 4425 7350 4875 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 7012.283 4647.597 6880 4515 6825 4650 6885 4785 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 6835.926 4650.000 6839 4586 6900 4650 6839 4714 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 6932.739 4650.000 6835 4721 6812 4646 6835 4579 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 6825 4500 7275 4650 6825 4800 -6 6 7650 4050 8250 4500 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 7912.283 4272.597 7780 4140 7725 4275 7785 4410 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 7735.926 4275.000 7739 4211 7800 4275 7739 4339 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 7832.739 4275.000 7735 4346 7712 4271 7735 4204 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 7725 4125 8175 4275 7725 4425 -6 6 7800 4350 8400 4800 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 8062.283 4572.597 7930 4440 7875 4575 7935 4710 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 7885.926 4575.000 7889 4511 7950 4575 7889 4639 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 7982.739 4575.000 7885 4646 7862 4571 7885 4504 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 7875 4425 8325 4575 7875 4725 -6 6 7950 4650 8550 5100 5 1 0 2 0 7 50 0 -1 0.000 0 1 0 0 8212.283 4872.597 8080 4740 8025 4875 8085 5010 5 1 0 3 1 0 49 0 20 0.000 0 0 0 0 8035.926 4875.000 8039 4811 8100 4875 8039 4939 5 1 0 2 1 7 50 0 -1 0.000 0 0 0 0 8132.739 4875.000 8035 4946 8012 4871 8035 4804 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 3 8025 4725 8475 4875 8025 5025 -6 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 1125 3150 34 34 1125 3150 1159 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 900 3150 34 34 900 3150 934 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 1725 3225 34 34 1725 3225 1759 3225 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 1950 3150 34 34 1950 3150 1984 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2175 3150 34 34 2175 3150 2209 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 675 3975 34 34 675 3975 709 3975 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 900 3900 34 34 900 3900 934 3900 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 1125 3900 34 34 1125 3900 1159 3900 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2775 3225 34 34 2775 3225 2809 3225 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3000 3150 34 34 3000 3150 3034 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3225 3150 34 34 3225 3150 3259 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2850 3150 34 34 2850 3150 2884 3150 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3075 3075 34 34 3075 3075 3109 3075 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3300 3075 34 34 3300 3075 3334 3075 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2775 3975 34 34 2775 3975 2809 3975 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3075 3825 34 34 3075 3825 3109 3825 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3225 3900 34 34 3225 3900 3259 3900 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3300 3825 34 34 3300 3825 3334 3825 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 675 3221 34 34 675 3221 709 3221 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3000 3900 34 34 3000 3900 3034 3900 1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2850 3900 34 34 2850 3900 2884 3900 1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 1650 6150 300 150 1650 6150 1950 6000 1 1 0 3 0 7 50 0 -1 0.000 1 0.0000 1652 5704 300 150 1652 5704 1952 5854 1 4 0 3 0 7 50 0 -1 0.000 1 0.0000 1650 7050 300 300 1350 7050 1950 7050 1 2 0 3 0 7 50 0 -1 0.000 1 0.0000 7200 1200 150 150 7050 1050 7350 1350 1 2 0 3 0 7 50 0 -1 0.000 1 0.0000 6975 1200 75 75 6900 1125 7050 1275 1 2 0 3 0 7 50 0 -1 0.000 1 0.0000 7425 1200 75 75 7350 1125 7500 1275 1 2 0 1 0 0 50 0 20 0.000 1 0.0000 7237 1200 37 75 7200 1200 7274 1200 1 1 0 3 0 7 50 0 -1 0.000 1 0.0000 7950 975 150 75 7950 975 8100 1050 1 2 0 3 0 7 50 0 -1 0.000 1 0.0000 8662 975 112 75 8550 975 8774 975 1 3 0 3 0 5 49 -1 20 0.000 1 0.0000 6450 7800 106 106 6450 7800 6556 7800 2 1 0 3 0 7 50 0 -1 0.000 2 0 -1 0 0 5 1800 1050 1950 900 2250 900 2250 1350 2100 1500 2 2 0 3 0 7 50 0 -1 0.000 2 0 -1 0 0 5 1800 1050 2100 1050 2100 1500 1800 1500 1800 1050 2 1 0 3 0 7 50 0 -1 0.000 1 0 -1 0 0 2 2100 1050 2250 900 2 1 0 1 0 7 50 0 -1 0.000 1 0 -1 0 0 2 1950 1350 1950 900 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 750 2700 900 2700 900 2850 750 2850 750 2700 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 1800 2700 1950 2700 1950 2850 1800 2850 1800 2700 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 750 3450 900 3450 900 3600 750 3600 750 3450 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2850 2700 3000 2700 3000 2850 2850 2850 2850 2700 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2850 3450 3000 3450 3000 3600 2850 3600 2850 3450 2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2 900 3300 900 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2 675 3300 675 3225 2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1125 3300 1125 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1950 3300 1950 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 1725 3300 1725 3225 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 2175 3300 2175 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 2775 3300 2775 3225 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 2850 3225 2850 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3000 3300 3000 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3075 3225 3075 3075 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3225 3300 3225 3150 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3300 3225 3300 3075 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 675 4050 675 3975 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 900 4050 900 3900 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 1125 4050 1125 3900 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 2775 4050 2775 3975 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 2850 3975 2850 3900 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3000 4050 3000 3900 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3075 3975 3075 3825 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3225 4050 3225 3900 2 1 0 4 0 7 50 0 -1 0.000 0 0 7 0 0 2 3300 3975 3300 3825 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 825 2775 900 3150 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 4 1950 3150 1950 3000 1725 3000 1725 3225 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 1875 2775 1840 2999 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 2925 2775 2920 2959 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 4 2775 3225 2775 3000 3000 3000 3000 3150 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 4 2850 3150 2850 2925 3075 2925 3075 3075 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 2895 2994 2965 2924 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 2925 3900 2925 3525 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 2850 3900 3075 3825 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 2775 3975 3000 3900 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 675 3975 900 3900 2 1 0 2 4 7 50 0 -1 0.000 0 0 7 0 0 2 825 3930 825 3525 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 5250 750 5700 750 5700 1500 5250 1500 5250 750 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 5850 750 6300 750 6300 1500 5850 1500 5850 750 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 4650 1950 5100 1950 5100 2400 4650 2400 4650 1950 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 5250 1950 6000 1950 6000 2400 5250 2400 5250 1950 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 4650 2550 5100 2550 5100 3300 4650 3300 4650 2550 2 2 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 5 4650 900 5100 900 5100 1350 4650 1350 4650 900 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1950 5700 1950 6150 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 2 1350 5700 1350 6150 2 1 0 1 0 7 50 0 -1 0.000 1 0 -1 0 0 3 1800 1500 1950 1350 2250 1350 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 150 1050 450 1050 450 1500 150 1500 150 1050 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 750 1050 1050 1050 1050 1500 750 1500 750 1050 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 900 975 900 900 1200 900 1200 1350 1125 1350 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3 900 975 900 1350 1125 1350 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 825 1050 825 975 1125 975 1125 1425 1050 1425 2 1 0 2 0 7 50 0 -1 0.000 0 0 -1 0 0 3 825 1050 825 1425 1050 1425 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2850 900 3000 900 3000 1200 2850 1200 2850 900 2 1 2 2 0 7 50 0 -1 1.000 0 0 -1 0 0 2 2775 1500 3000 1200 2 1 2 3 0 7 50 0 -1 1.000 0 0 -1 0 0 2 2775 1125 3000 900 2 1 2 2 0 7 50 0 -1 1.000 0 0 -1 0 0 2 2550 1125 2850 900 2 1 2 1 0 7 50 0 -1 1.000 0 0 -1 0 0 2 2550 1500 2850 1200 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 2550 1125 2775 1125 2775 1500 2550 1500 2550 1125 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 7800 1125 8100 1125 8100 1500 7800 1500 7800 1125 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 7725 1125 7800 1125 7800 1425 7725 1425 7725 1125 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 8100 1125 8175 1125 8175 1425 8100 1425 8100 1125 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 7875 1050 8025 1050 8025 1125 7875 1125 7875 1050 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 8550 1125 8775 1125 8775 1500 8550 1500 8550 1125 2 2 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 5 8625 1125 8700 1125 8700 1425 8625 1425 8625 1125 2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5 8625 1050 8700 1050 8700 1125 8625 1125 8625 1050 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 3 6300 6075 6675 6075 6675 5700 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 3 6825 5700 6825 6075 7200 6075 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 3 6300 6225 6675 6225 6675 6600 2 1 0 3 0 7 50 0 -1 0.000 0 0 -1 0 0 3 6825 6600 6825 6225 7200 6225 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3300 7650 4200 7650 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3300 7950 4200 7950 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3300 8250 4200 8250 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3300 7800 4200 7800 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 3300 8100 4200 8100 2 1 0 1 0 2 49 -1 20 0.000 0 0 -1 0 0 6 3300 8400 3600 8325 3750 8175 3900 7800 4200 7575 4200 8400 2 1 0 4 0 7 48 -1 -1 0.000 0 0 -1 0 0 3 3300 7500 3300 8400 4200 8400 2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 3 1 1.00 60.00 120.00 3 1 1.00 60.00 120.00 6225 7575 6675 8025 2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 3 1 1.00 60.00 120.00 3 1 1.00 60.00 120.00 6225 8025 6675 7575 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 11100 900 11250 900 11250 1425 11100 1425 11100 900 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 11475 900 11625 900 11625 1425 11475 1425 11475 900 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 11850 900 12000 900 12000 1425 11850 1425 11850 900 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9750 900 10125 900 10125 1200 9750 1200 9750 900 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 10275 900 10650 900 10650 1200 10275 1200 10275 900 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9750 1350 10125 1350 10125 1650 9750 1650 9750 1350 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9900 2100 9900 1950 10425 1950 10425 2100 9900 2100 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9900 2475 9900 2325 10425 2325 10425 2475 9900 2475 2 2 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 9900 2850 9900 2700 10425 2700 10425 2850 9900 2850 3 2 0 3 0 7 50 0 -1 0.000 0 0 0 16 3465 6105 3375 6097 3232 6142 3300 6247 3135 6255 3090 5992 3180 5872 3172 5632 3270 5467 3450 5527 3825 5617 3795 5730 3697 5970 3705 6097 3532 6112 3457 6097 0.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 0.000 3 2 0 3 0 7 50 0 -1 0.000 0 0 0 16 4470 6187 4380 6179 4237 6224 4305 6329 4140 6337 4095 6074 4185 5954 4177 5714 4275 5549 4455 5609 4830 5699 4800 5812 4702 6052 4710 6179 4537 6194 4462 6179 0.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 0.000 4 0 0 50 0 14 24 0.0000 4 225 225 4770 1223 T\001 4 0 0 50 0 14 24 0.0000 4 225 225 5347 1222 C\001 4 0 0 50 0 14 24 0.0000 4 225 225 5977 1215 S\001 4 0 0 50 0 14 24 0.0000 4 225 225 5513 2280 S\001 4 0 0 50 0 14 24 0.0000 4 225 225 4763 2288 T\001 4 0 0 50 0 14 24 0.0000 4 225 225 4747 3030 C\001 4 0 18 50 0 2 26 0.0000 4 345 600 4237 6067 3D\001 amide-1.0.5/pixmaps/amide_logo.png0000664000175000017500000001266610006532102016734 0ustar loeningloening‰PNG  IHDRZZ8¨AbKGDW0x Å´: pHYs  d_‘tIMEÔ-†ýNÌCIDATxœí{l$É]Ç?5ž‡gÆã×îÚ»wžÍ(·›ärA€½€”E(þ`A" å!r Þ P^(ðWî”—"‘@gBþ¸\” Q@»½#ËÞ­w7»öz×ãÇúýçÕÝÅÕ5]Ýž?¦ÇDhRy¦kº«ª¿ý«_ý^]†ûtŸîÓ}ºO÷é>ݧûôÿˆD§ÿ“ïŒììØcŽ]Eâtª—$¶U!ž¨\þÒ—ß9×áÎŽD¡}iü»#‹‹Œçge®PˆeUó5@ºgÈW·CØŠ@Ù³«O|ã™Ç?ܡΎD¡ýøŸyéG©ç …TVÕT€ª[¤Q:I6 ìiº“ùË/þÏß\ìp‡¦Ð€¾8ö¯³ÅAäM·”Ë8«Ðâç4#óÚ.¼þ§ˆt]¿ôÒ_|ò v„¢a4òû¿÷ÅÜõkN¶QeÅÑZ6›ÜAc– É@9¨Œnû6űqà§èH,//ç÷n¡@.¡d³íévEq]Ô(=ÖCuZo%€ÙG^}þ=aÜc» GÛÖ6jºFQ2ÙvÑÖå~6âæƒp´æj ¦þÞè:Mi ‡ânñ}ÀŠ þã¨÷Ø.…ÂÑRÚx‹Ÿƒ¯ ˆEsh¬A‰¥Ñ﮲÷! <°@š¾¡_N%S¯^¼5Œû= …ÂÑJO®¡ž›D¬K£5W›Ü½·E‹MnÖÑ1®×¤†Èôæi·´»ãž8\n÷žK¡í8%`8Us´.ZÆÁ6A6¹öŠ ]ôbgmècÝîyi C*•z ð0<Æ=–ºö?eÊŽœ©U×Þ¢nL/`Au}ðHàœf$84™Ì4Œôõñj_¥º=].— xŠýR÷~P EF QšPëÍ- Z˨{ªŸú»lP›òÚ|hNWƒOMšû{ Ç_ãžÔœ ã¾C¡pt>?µ}úôàöÚÆô[º¢ËD»e”ª·Šb]·’çq É^PM0%žH±Œcðs²ù)_…ûË.–³Ô»µµù‚{b X@qñP¨¾ŽD"1b\²ºˆD½½} Ÿºü"ðÐÇÞç-ñä®6«×Ýï Ô2€*Ë=§†^86êAÿ„™ü¿´¹¹9¬×€çüÿV Gk²mûÛ¶žŒF£×lÛÞ!¤”k W@®H)WÊåÒÊêÚìÊà€“âWº÷ÊuÍÍ À¬óÀ0}¸@A ]ÞU ¨âfÇ}Ä·¥»•{ÝÅâÎ5<…üF˜÷ߊBÑ:‚T.—'€9à`%|³'y×'aÄ=Òú7xÚFê:ÃÍ©«X–õì#¯ÞyK„W¡Dm­¨ÆMu0êr8@7¦¿oàÂÒÒ½ˆ[‘Îw¼÷fÊbØ„nà÷,iä›Þø±Q8oœj.Š1¼Å ”ï$,Ëš,—*“0ƒâÜ‚.„1#D½(èww!è¥'‘exhX/ŠàáÞ¿: ôjÁY (PlÁ/œ÷Ÿª]èÁ"këWq'/¥ÜÞÜ.^Võž §®èõ­·/èAÐG,žu;I¢ôêc¡N JtÌ „ì"°zöìëåÚÚ°¡^ù­@%[·ª‰0ÇúÆR:×–—gç"]C[‚J[ýàzL/]ÞV&ùÉSÙd2Ù‡g)à¡cthP`ÿðc`ò }à\sp='’ªÛB¸vE­V›Ô J¹t æX'+cGÔHÏØQm+ñã ½½½¦NýÈ1`p,@kzx~kóÑßh ®®s€<«“8ŽÌK)·uCË+¯\ì õj\m96<… ‡žžÌ¨{b¥ötœŽh>õ—×G7Ö­lspͺ ‚iÖ7ÖpûšÙÎܹ®hjSPDÔ-ÀHì½€ëöcÒœL ÷õ÷÷gQâ#<Úé{?V ggwrûs³'+f¨V«Ao›ƒ¸÷̺âCÀÅÜZ¸&9 j“¼ ÅÑç:}ïÇ ôÌt-×\i<€<·îþÛ¶'ÍHÀ^^½ú¢ €öÚ Z Îö€>'… ÃÀÀày÷­SwT96 ?þÑÉÜÚZ-Û\³n Ûv°m¿Øpɺ3ûòËñxf^°pÕt¿C‘ÿ€ãÙ¾á¡á (]²¿b:ÐS77sûƒ«ë¶À¦¶á’ƒÒÉËéLå_×TñÌm¿ÐФŽMñÑG,»€ç¸>ݱ›çþÉõj®5¸¦ª7ÃTþû8Nc±rxÜK÷ˆ'q£;ÞLѧy`{6¢<‰ ÍÐÀé Éd²ŸcЩèÿÅ˹ýÁ5ÇX–ÕHlH”uY.ýŸ™ëÉœ¼,Ø@»Q5ØÂˆÖÃÀµ“ ™:uššäÇôÕ—·Æ÷W×ÌP­V‰°«+Éâ„àŽ«}€§3ãÜÏÝJZR9Ï1˜äú¯>õÒÈìÝòØÁŒ‰`’k3/4Õ6P çue2Ð9~Êâm5ân·NÄAdÊMò×u‡Ž}o±”Û\i4jµZPwÖbc¸¢+¿öô“séžÌeÁ*ž¬vý¹]ÿ¢Mò IN300x‘‡¹:ôìÝrC#Å®' XÜÀ‘r˲¬`ú­ƒ =íûˆw&³ªõºº–!$ Âñ‚ñxLëÔÚ$]„tè}äùÑùÙêXkpÍÅñ&7n_Ƕ­F‹ {òŸÉè„j«¦dµ°A8 ¼Ô±½š‡ô‘`X,¦Mò06ú®µZgÖÍRâ&RÊ-Û¶‰JnH±DaBpA Ï,7c‡&Ø^ A§N ¡ðÐÑßPÅGÇ€þ³Kß-l9Ùƒ)SÜœ¾ÙLw¶PÜ|½YÑ„˜PfxÉ*U¬±è0¹;ô2}€ááºIžÞš:ôÌÔ)Ûò´U”|žiÖßÓßþÊ\²'1Ë(“\§(Ú›»ª—Ä‚4ÐK<£C:uÇ€ÎÏÈ&w3Ícž-9ÝLlØ(±±¹o§‘ Á<:뫱“É\#Ž Å‰Áz˜K‹ÐLòŽýÁ?z&·?¸ZÏ­!ÈsûöŽã4Ó6Ô‹)ûз¿÷µ A/ÊpiÅÍf ò 2œ`8æúÙ£b¤Ž}÷vqÜn/r\”@XHI+±Q¢…Ø0©;“ž€"‚Ø>ÜlºPµÿ?C*•6uê¾£b¤ÐþÐû'FÖVbcç–QšYÕÕs׈p íA^ûÐòm‰ —Ξûµ Áϡֳ®à¹[º`'d8“y k„¹z )Ìz¦ÒÆÚnNq,hBçn8_ÊW x˜t²»÷7ßø[¹T2Yÿ!œ®H¬”ìXÇ’ïEJ¤Qé ê¤ã‰*»A/ʈÜñÚ ¿NÅ=¤9A<žx Ê!®Ã\{t÷ÃRè@¯.s‚@‚ØEif<ãÁŒJ tV’];Û·»Nß®áÒ š÷¾¢YgæB³§NÔÓ =j ¸ÎÙS&9¤8¿¼¼ô-üa®CBá£P“ßÿî¿ÉÏô? j(—§Ž¬€¶È<«MÔ§®&ÏãÖ¼Ît}zuÞqÅÍÖ> ¡Y§Ój¤£v÷®,®‹Åe¼|á$û‹/Ì'ƒãØP¹(IB0ÉCzcÕÉ)¨¢\tf¿W{±½àzìWéàžØÑ³À×6®£I[Áºà±0ÎK HsúôVWWCË< Mt¼çŸ]]迤¦ß&¸É-ÍMpï½Aá‚'ê/dÚõca$™ _²¹þý ba?Í#qè¥h©Z(lçñ¦Ëí£âGooìæà” DO´™¢#¸bMž®íåèyPðu·ýÅÂ~瘋¨Чpç<êm®¶MòÐ8z(õ;Ï ’(µ·àr©0¸Ùãn þÅÑänO.ï]TÛá\m6¨„@ˆ2]ìÛÜÚü‘eYúM'Éßæ Å`y÷Û¿ƒÄ]$ð…‘ê Z Q/–ql!¨¡ŒSTèwÊeHàÂ[Æ Bh­%ôrš3ôõõ™&¹ñnÎá(ѱ½^Îy@–]Îó“w“p0-ààu þü@ ^kž“¢‹ ==™Ñ¥¥¥çÐïg‘Úï{ççGæ¦Ó_D]n.âÉS?'y:´÷Þ¡0ÊaêZŸSF¿Ó¨},¢Î²Âå\ÓýoÎ|AP%/wïT SîË  ðCo'Ô6G·ª9eòª ˆ¨oáÝ„wì;–¨²Ä,¬ Öý A”(‘!É0‚S¨Ù¯TJQ·=òÏ%>½0—6É”:Ö6Ð[ëCl¨õÂ3kÁ[¼$j¡¼ÍÝøv»ÝІ‡‡yíàc&8‰÷Ša<„n=œ’¤ˆDºL“¼÷0ýèLΛ~:ãÞÓ6üª’EÍuÜ;ŽÓ(· ¬¡d ¹õc¨dÅ£ÿ«ßì…ƒcõÈÔ©uTëìЫ²››}¥R©†æ:PôåH@?þ®¿ËÝx©âŠ oW°½ ¡'±ãÄI§Ó[ë²vQ@ÿ(ã9( Ÿ9ÿ¥õ»»o†8ž§08Vu¥öó ae«xó‡Ï Å,aýçüÕÑrÅÊF»º˜Ÿ){ Þ»`8{öXI"<Ä…í¹ÂPåB2Ù¤íÈ_þÆPá;ËAéãüÛÑJ¹–•R‹E±m›»«x›`L|¨¿ ÎH*q^<Ò;›J¦ªñX÷ÃßyñkÏqºQ?>úÀ;þñÓÓ“ÅK~ MKo½úg¼4΋€PÛøâÛŠu×Öú‡bÿwO·½që'ÿÊèR~çÒÂL!çk£ñûs?LÚë+iÞVÿ™ÄD÷€¼ô¹þDSÓ¼)ÐýÐWG&Xx¾¸mgw"lcMýçB×™¹ƒÍ\¢+¾‘ï*_ü§g>¤­‰?üÎ/ŽO]Ùx¢5¸æø[ùµƒ÷³?àݧ oÿ‡g?ßÐkªÞÝþÉæ»ÛVÖ‹†(y¬’ ¨(J­ÞI]gö¹Íw¢j¨WŠ+xnO3Ú’À®–³÷o<ÕlL­èOßý™Ñé+ëOxc ¶¯ýߦO<~Ð×9ëµµ·®²ºõé·ýêÛFöŽ®Ðk K9op%.Q®PzF½håÖ¯©•\Àõ~Ï»([ A’]{ôÑGG ôòüÎ¥ƒ»7M­p}mYÙ¹ÂÜx£ñ5] ¨'Që”v>eáû0®kÔVPÑFV:#Êúúújû‰Sa¹¤í7ó^,4¾.HIæææ~½Ñ/-´Ž*ÊdÕ±? ™ë§£;ñM@‡ØØ¬¯¯¿¥…lÿÙ|Œþñ w h H§ÀõSa§ð(ð»¨éú®FÒ‚£m zHÎ=J[Yà%ÊT*•êí¨”aðßì£B ¼:ͶÕo×w7ê’³( “¨]_iÎÑBƒíIYѶöÃOžª(¨P(mƒ²2(U% \ži:V< ÿ/ÀUdaðBÚ»Þ‰k¾GëÅ+†‹ÌÑß+'MÑQe‡5@m ¦uÂ^TÚÓ9Z5Ž ¶ÞR÷ÙIp5I`ÛL"¥³åB;ŸjÀŦZ‡ ŒÚÏH%*úÓtKðí§féæ9^ê€çB-#Xe±¶@µZEJ9‡7•Ô;jûì’Iì\Öû¢*èÚBÛT`ži®\YwìzÛ·›rt%²Ÿ-ÞÍþ|òÔ)Ôi¦òüÖøØ_4ÊÀ·¬kÜšº…”ŽéFUzvˤðgnbÝYËFÎ’¢èCÀÜ·¹Ñ}P2g‚ƒÛÌ3ÍÕ»WpÇ|ãWÏÊ®¦½ž;w.·°°øT?§‡O3 —>”|×EÔåhÖékjØfE.3¿0Ïö¶Ú›Ê¶­‰€¿ÚBÙùwØGN?eլ܉'éKõÒÏ =¤‰“h1¢ÃtdQ¦ÄkäW󬬬à8ö¤eí ÑI@¶ì9OÈ ÐßßOD(‰#åѦ#ª• ‹‹Þh'O8Ž4¿õ*søæ~mÇãñOƒ¸ÐÕÕʼnÁAÒ==m¹>N$V­ÆÜüfS¶m=kÛv£ÖÀ>Ð#vÏ:Žó‰¶FÙ€¤”פ”[ ÖTCí<|÷ íÆãñœã8o£C{°ºòx»EüSïÉ_:ì\úÞ¶åíÎÃƒŽ¼,¢6(|å×ÿ6Êg¬÷N>Ž1kR¥1­öIo VÅ$ÆJc[(µ§ÀáA•¨õqµ¸ø)LàƒãWùqjãëï6%LB`)÷ÿFÑúcåhYBYWˇ+¨Ô­ðv™5Çæ˜Í±kq¡£FËÀŽòDBíÒ’Aq·¶Þ ޶PâBsòÚ¾¼ eÎ÷¡ò´Åápµ»Žâë³t÷_‘´ÓÉÏ ¶&|æc;$QFM¹#gØ7¡ÇP€Ñø?æ´CZÔédðRˆmß§ûôSFÿ ´ìÑ“i^IEND®B`‚amide-1.0.5/pixmaps/three_compartment.png0000664000175000017500000000615510007551776020374 0ustar loeningloening‰PNG  IHDRýpZyá­ pHYs``zxEtIMEÔ1"ž$öæ IDATxœíOŽ›>ÇÍh.@v¿­#Ôeë9³iw•¨zr²ë6é*© G€#À¦©À‹JUÅoñf<ž„$Äüñ3ø³¨:!/_žígûÙvêº&Fá8Žxmœñ™§ž7º °X4`ýÞ2G¬ß[æˆõ{Ë™ˆßçy¾X,Çqçþþžs®Û"³™¾žµi_U¥®0ƪªÒk¡YÌSOãý¾ª*ÆØ´Ò ÌSO³ý~&iPæ©§S›6U!ϳ0Æò<'„¸®[…ëºúì2•yêiv¿!„sž¦©^c&À|ô4»¾—¡”E1²1`žzš]ßSJ7› ¼.Ër½^ëµÇtf¤§îÆÕÈÆgYV×µtƒ¨T·†1O=Íö{¸’$‰¸^óŒcžzNÁïëºöœçù~¿'/y|yžsÎ]×…nø×÷}‘Ò=g¬VíA+•ú~¿ß§iºßï­‘M—-†q_ÑhΫU{FÕꪨ( CX‹@) ðÍ4u–ea¤’ëºb,lòX­Ú3¾Vmý>Š"øŽ Ô²2D¯†î0›Í&‚(ŠÔ²­VíÑ¥Õe¿Ï² ÚÏóºg¥E9çÔñn!·­”ÒöÏÕjeŠVü>Žcˆ´ÄüE/$IÂs]7ŽãoÛÇ©>mž«ÕÊ ­Îõk·Ûíz½ö<¬l×_h çüË—/išn6›0 ×ëµX܉§§§ªªþüùSUÕß¿ÿ€RêycÌó}¬VíÁ¬Õ #J)žà4M!…H·! X­ÚƒY«çøÞ÷}<¹¬ûýó©V«öàÕ š¶¾?É|7PÈÅQ°´ÀqÐs¾Z­D¼‡mOÕëÐ]ðp!+#jz×u‡˜°$øê{qQžUøñã‘B ,Ë`ýž•\ Øúþ$óÜ8F>QôçÏŸ„²,a;bq³Ù­Ÿî‚‡‹S*QJ‡ø.´õ}ý² \ ò™EÞ¼Ñ †¬ß¿áÀ×åÆ{_%ƒÄïϱ¾ïû²—·Zj4¬ß¿Aöû¡7ðû=ø·Ø‡#Ë2a°éÁ‚Á¦Áq£/ïºúéÓ'Ñ™«ªJl*íyžÂ¶0Èý^Ôôâ D8àýÅ~£aýþ ÁîAʤ|1IÜPpä~¼’C.ê¾ïcÞü"6ù yÈišŠãTÅu˜Ä…š>u­’Hòç‰ǼÌÁ2¶ívK‰ãœ—Ä|舥½ÍY+Ö8ÜÑþn˜ãœis«³ÌÎjµÚívAˆ‰}‹)Ø8G‘Ýn·Ûí|ß·No"¶¾W²öû½è ×íúµiš¦i ý_¿~¥iêyžíÝŽî@k^À 'yI€ùúõ+¼5zLÐDì8æØ, Î9c,Ïó»»»ÇÇGÈ÷Ôm×¼°ñýØ@HaÒã㣸bë÷cs|ÞÁ ' X±~?6ǵ»­ïÇÇÆ÷€^Ûà^ ¶¾×€\ÁÛÊ^ Öï5 ô6¸×‚õ{ Øú^;6¾×„ø6¸×…­ïõ ÎcÒmÈL±~¯q‚nCfŠõ{=Øú^/6¾×Ær¹,ŠB·3ÅÖ÷Ú÷$³ŒÌÿ”û,%Âû]íIEND®B`‚amide-1.0.5/ltmain.sh0000644000175000017500000105152212271016651014273 0ustar loeningloening # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.2 TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 amide-1.0.5/intltool-update.in0000644000175000017500000006732710657234431016144 0ustar loeningloening#!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Updater # # Copyright (C) 2000-2003 Free Software Foundation. # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 published by the Free Software Foundation. # # Intltool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Kenneth Christiansen # Maciej Stachowiak # Darin Adler ## Release information my $PROGRAM = "intltool-update"; my $VERSION = "0.35.5"; my $PACKAGE = "intltool"; ## Loaded modules use strict; use Getopt::Long; use Cwd; use File::Copy; use File::Find; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $DIST_ARG = 0; my $POT_ARG = 0; my $HEADERS_ARG = 0; my $MAINTAIN_ARG = 0; my $REPORT_ARG = 0; my $VERBOSE = 0; my $GETTEXT_PACKAGE = ""; my $OUTPUT_FILE = ""; my @languages; my %varhash = (); my %po_files_by_lang = (); # Regular expressions to categorize file types. # FIXME: Please check if the following is correct my $xml_support = "xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required) "ui|". # Bonobo specific - User Interface desc. files "lang|". # ? "glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required) "scm(?:\\.in)*|". # ? (Note: .in is not required) "oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files "etspec|". # ? "server(?:\\.in)+|". # Bonobo specific "sheet(?:\\.in)+|". # ? "schemas(?:\\.in)+|". # GConf specific "pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer. "kbd(?:\\.in)+"; # GOK specific. my $ini_support = "icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec "desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "caves(?:\\.in)+|". # GNOME Games specific "directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "soundlist(?:\\.in)+|". # GNOME specific "keys(?:\\.in)+|". # GNOME Mime database specific "theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec "service(?:\\.in)+"; # DBus specific my $buildin_gettext_support = "c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py"; ## Always flush buffer when printing $| = 1; ## Sometimes the source tree will be rooted somewhere else. my $SRCDIR = $ENV{"srcdir"} || "."; my $POTFILES_in; $POTFILES_in = "<$SRCDIR/POTFILES.in"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "dist|d" => \$DIST_ARG, "pot|p" => \$POT_ARG, "headers|s" => \$HEADERS_ARG, "maintain|m" => \$MAINTAIN_ARG, "report|r" => \$REPORT_ARG, "verbose|x" => \$VERBOSE, "gettext-package|g=s" => \$GETTEXT_PACKAGE, "output-file|o=s" => \$OUTPUT_FILE, ) or &Console_WriteError_InvalidOption; &Console_Write_IntltoolHelp if $HELP_ARG; &Console_Write_IntltoolVersion if $VERSION_ARG; my $arg_count = ($DIST_ARG > 0) + ($POT_ARG > 0) + ($HEADERS_ARG > 0) + ($MAINTAIN_ARG > 0) + ($REPORT_ARG > 0); &Console_Write_IntltoolHelp if $arg_count > 1; my $PKGNAME = FindPackageName (); # --version and --help don't require a module name my $MODULE = $GETTEXT_PACKAGE || $PKGNAME || "unknown"; if ($POT_ARG) { &GenerateHeaders; &GeneratePOTemplate; } elsif ($HEADERS_ARG) { &GenerateHeaders; } elsif ($MAINTAIN_ARG) { &FindLeftoutFiles; } elsif ($REPORT_ARG) { &GenerateHeaders; &GeneratePOTemplate; &Console_Write_CoverageReport; } elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/) { my $lang = $ARGV[0]; ## Report error if the language file supplied ## to the command line is non-existent &Console_WriteError_NotExisting("$SRCDIR/$lang.po") if ! -s "$SRCDIR/$lang.po"; if (!$DIST_ARG) { print "Working, please wait..." if $VERBOSE; &GenerateHeaders; &GeneratePOTemplate; } &POFile_Update ($lang, $OUTPUT_FILE); &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE); } else { &Console_Write_IntltoolHelp; } exit; ######### sub Console_Write_IntltoolVersion { print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler. Copyright (C) 2000-2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } sub Console_Write_IntltoolHelp { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... LANGCODE Updates PO template files and merge them with the translations. Mode of operation (only one is allowed): -p, --pot generate the PO template only -s, --headers generate the header files in POTFILES.in -m, --maintain search for left out files from POTFILES.in -r, --report display a status report for the module -d, --dist merge LANGCODE.po with existing PO template Extra options: -g, --gettext-package=NAME override PO template name, useful with --pot -o, --output-file=FILE write merged translation to FILE -x, --verbose display lots of feedback --help display this help and exit --version output version information and exit Examples of use: ${PROGRAM} --pot just create a new PO template ${PROGRAM} xy create new PO template and merge xy.po with it Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } sub echo_n { my $str = shift; my $ret = `echo "$str"`; $ret =~ s/\n$//; # do we need the "s" flag? return $ret; } sub POFile_DetermineType ($) { my $type = $_; my $gettext_type; my $xml_regex = "(?:" . $xml_support . ")"; my $ini_regex = "(?:" . $ini_support . ")"; my $buildin_regex = "(?:" . $buildin_gettext_support . ")"; if ($type =~ /\[type: gettext\/([^\]].*)]/) { $gettext_type=$1; } elsif ($type =~ /schemas(\.in)+$/) { $gettext_type="schemas"; } elsif ($type =~ /glade2?(\.in)*$/) { $gettext_type="glade"; } elsif ($type =~ /scm(\.in)*$/) { $gettext_type="scheme"; } elsif ($type =~ /keys(\.in)+$/) { $gettext_type="keys"; } # bucket types elsif ($type =~ /$xml_regex$/) { $gettext_type="xml"; } elsif ($type =~ /$ini_regex$/) { $gettext_type="ini"; } elsif ($type =~ /$buildin_regex$/) { $gettext_type="buildin"; } else { $gettext_type="unknown"; } return "gettext\/$gettext_type"; } sub TextFile_DetermineEncoding ($) { my $gettext_code="ASCII"; # All files are ASCII by default my $filetype=`file $_ | cut -d ' ' -f 2`; if ($? eq "0") { if ($filetype =~ /^(ISO|UTF)/) { chomp ($gettext_code = $filetype); } elsif ($filetype =~ /^XML/) { $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8 } } return $gettext_code; } sub isNotValidMissing { my ($file) = @_; return if $file =~ /^\{arch\}\/.*$/; return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/; } sub FindLeftoutFiles { my (@buf_i18n_plain, @buf_i18n_xml, @buf_i18n_xml_unmarked, @buf_i18n_ini, @buf_potfiles, @buf_potfiles_ignore, @buf_allfiles, @buf_allfiles_sorted, @buf_potfiles_sorted, @buf_potfiles_ignore_sorted ); ## Search and find all translatable files find sub { push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; }, ".."; open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n"; @buf_potfiles = grep !/^(#|\s*$)/, ; close POTFILES; foreach (@buf_potfiles) { s/^\[.*]\s*//; } print "Searching for missing translatable files...\n" if $VERBOSE; ## Check if we should ignore some found files, when ## comparing with POTFILES.in foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") { (-s "$SRCDIR/$ignore") or next; if ("$ignore" eq "POTFILES.ignore") { print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n". "content of this file to POTFILES.skip.\n"; } print "Found $ignore: Ignoring files...\n" if $VERBOSE; open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n"; while () { push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/; } close FILE; @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore); } foreach my $file (@buf_i18n_plain) { my $in_comment = 0; my $in_macro = 0; open FILE, "<$file"; while () { # Handle continued multi-line comment. if ($in_comment) { next unless s-.*\*/--; $in_comment = 0; } # Handle continued macro. if ($in_macro) { $in_macro = 0 unless /\\$/; next; } # Handle start of macro (or any preprocessor directive). if (/^\s*\#/) { $in_macro = 1 if /^([^\\]|\\.)*\\$/; next; } # Handle comments and quoted text. while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy { my $match = $1; if ($match eq "/*") { if (!s-/\*.*?\*/--) { s-/\*.*--; $in_comment = 1; } } elsif ($match eq "//") { s-//.*--; } else # ' or " { if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-) { warn "mismatched quotes at line $. in $file\n"; s-$match.*--; } } } if (/\w\.GetString *\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } ## N_ Q_ and _ are the three macros defined in gi8n.h if (/[NQ]?_ *\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml) { open FILE, "<$file"; while () { # FIXME: share the pattern matching code with intltool-extract if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_ini) { open FILE, "<$file"; while () { if (/_(.*)=/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml_unmarked) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } } @buf_allfiles_sorted = sort (@buf_allfiles); @buf_potfiles_sorted = sort (@buf_potfiles); my %in2; foreach (@buf_potfiles_sorted) { $in2{$_} = 1; } foreach (@buf_potfiles_ignore_sorted) { $in2{$_} = 1; } my @result; foreach (@buf_allfiles_sorted) { if (!exists($in2{$_})) { push @result, $_ } } my @buf_potfiles_notexist; foreach (@buf_potfiles_sorted) { chomp (my $dummy = $_); if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy")) { push @buf_potfiles_notexist, $_; } } ## Save file with information about the files missing ## if any, and give information about this procedure. if (@result + @buf_potfiles_notexist > 0) { if (@result) { print "\n" if $VERBOSE; unlink "missing"; open OUT, ">missing"; print OUT @result; close OUT; warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n". "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n"; print STDERR @result, "\n"; warn "If some of these files are left out on purpose then please add them to\n". "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n". "of left out files has been written in the current directory.\n"; } if (@buf_potfiles_notexist) { unlink "notexist"; open OUT, ">notexist"; print OUT @buf_potfiles_notexist; close OUT; warn "\n" if ($VERBOSE or @result); warn "\e[1mThe following files do not exist anymore:\e[0m\n\n"; warn @buf_potfiles_notexist, "\n"; warn "Please remove them from POTFILES.in. A file \e[1m'notexist'\e[0m\n". "containing this list of absent files has been written in the current directory.\n"; } } ## If there is nothing to complain about, notify the user else { print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE; } } sub Console_WriteError_InvalidOption { ## Handle invalid arguments print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit 1; } sub isIntltoolExtractInPath { my ($file) = @_; # If either a file exists, or when run it returns 0 exit status return 1 if ((-x $file) or (system("$file >/dev/null") == 0)); return 0; } sub GenerateHeaders { my $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} || "intltool-extract"; ## Generate the .h header files, so we can allow glade and ## xml translation support if (! isIntltoolExtractInPath("$EXTRACT")) { print STDERR "\n *** The intltool-extract script wasn't found!" ."\n *** Without it, intltool-update can not generate files.\n"; exit; } else { open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n"; while () { chomp; next if /^\[\s*encoding/; ## Find xml files in POTFILES.in and generate the ## files with help from the extract script my $gettext_type= &POFile_DetermineType ($1); if (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[[^\[].*]\s*//; my $filename = "../$_"; if ($VERBOSE) { system ($EXTRACT, "--update", "--srcdir=$SRCDIR", "--type=$gettext_type", $filename); } else { system ($EXTRACT, "--update", "--type=$gettext_type", "--srcdir=$SRCDIR", "--quiet", $filename); } } } close FILE; } } # # Generate .pot file from POTFILES.in # sub GeneratePOTemplate { my $XGETTEXT = $ENV{"XGETTEXT"} || "@INTLTOOL_XGETTEXT@"; my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || ''; chomp $XGETTEXT; if (! -x $XGETTEXT) { print STDERR " *** xgettext is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } print "Building $MODULE.pot...\n" if $VERBOSE; open INFILE, $POTFILES_in; unlink "POTFILES.in.temp"; open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing"); my $gettext_support_nonascii = 0; # checks for GNU gettext >= 0.12 my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`; if ($? == 0) { $gettext_support_nonascii = 1; } else { # urge everybody to upgrade gettext print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n". " strings. That means you should install a version of gettext\n". " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n". " or have to let non-ASCII strings untranslated. (If there is any)\n"; } my $encoding = "ASCII"; my $forced_gettext_code; my @temp_headers; my $encoding_problem_is_reported = 0; while () { next if (/^#/ or /^\s*$/); chomp; my $gettext_code; if (/^\[\s*encoding:\s*(.*)\s*\]/) { $forced_gettext_code=$1; } elsif (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[.*]\s*//; print OUTFILE "../$_.h\n"; push @temp_headers, "../$_.h"; $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code); } else { print OUTFILE "$SRCDIR/../$_\n"; $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code); } next if (! $gettext_support_nonascii); if (defined $forced_gettext_code) { $encoding=$forced_gettext_code; } elsif (defined $gettext_code and "$encoding" ne "$gettext_code") { if ($encoding eq "ASCII") { $encoding=$gettext_code; } elsif ($gettext_code ne "ASCII") { # Only report once because the message is quite long if (! $encoding_problem_is_reported) { print STDERR "WARNING: You should use the same file encoding for all your project files,\n". " but $PROGRAM thinks that most of the source files are in\n". " $encoding encoding, while \"$_\" is (likely) in\n". " $gettext_code encoding. If you are sure that all translatable strings\n". " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n". " line to POTFILES.in:\n\n". " [encoding: UTF-8]\n\n". " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n". "(such warning message will only be reported once.)\n"; $encoding_problem_is_reported = 1; } } } } close OUTFILE; close INFILE; unlink "$MODULE.pot"; my @xgettext_argument=("$XGETTEXT", "--add-comments", "--directory\=\.", "--output\=$MODULE\.pot", "--files-from\=\.\/POTFILES\.in\.temp"); my $XGETTEXT_KEYWORDS = &FindPOTKeywords; push @xgettext_argument, $XGETTEXT_KEYWORDS; my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress; push @xgettext_argument, "--msgid-bugs-address\=$MSGID_BUGS_ADDRESS" if $MSGID_BUGS_ADDRESS; push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii); push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS; my $xgettext_command = join ' ', @xgettext_argument; # intercept xgettext error message print "Running $xgettext_command\n" if $VERBOSE; my $xgettext_error_msg = `$xgettext_command 2>\&1`; my $command_failed = $?; unlink "POTFILES.in.temp"; print "Removing generated header (.h) files..." if $VERBOSE; unlink foreach (@temp_headers); print "done.\n" if $VERBOSE; if (! $command_failed) { if (! -e "$MODULE.pot") { print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE; } else { print "Wrote $MODULE.pot\n" if $VERBOSE; } } else { if ($xgettext_error_msg =~ /--from-code/) { # replace non-ASCII error message with a more useful one. print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n". " string marked for translation. Please make sure that all strings marked\n". " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n". " following line to POTFILES.in and rerun $PROGRAM:\n\n". " [encoding: UTF-8]\n\n"; } else { print STDERR "$xgettext_error_msg"; if (-e "$MODULE.pot") { # is this possible? print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n". " Please consult error message above if there is any.\n"; } else { print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n". " error message above if there is any.\n"; } } exit (1); } } sub POFile_Update { -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n"; my $MSGMERGE = $ENV{"MSGMERGE"} || "@INTLTOOL_MSGMERGE@"; my ($lang, $outfile) = @_; print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE; my $infile = "$SRCDIR/$lang.po"; $outfile = "$SRCDIR/$lang.po" if ($outfile eq ""); # I think msgmerge won't overwrite old file if merge is not successful system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot"); } sub Console_WriteError_NotExisting { my ($file) = @_; ## Report error if supplied language file is non-existing print STDERR "$PROGRAM: $file does not exist!\n"; print STDERR "Try '$PROGRAM --help' for more information.\n"; exit; } sub GatherPOFiles { my @po_files = glob ("./*.po"); @languages = map (&POFile_GetLanguage, @po_files); foreach my $lang (@languages) { $po_files_by_lang{$lang} = shift (@po_files); } } sub POFile_GetLanguage ($) { s/^(.*\/)?(.+)\.po$/$2/; return $_; } sub Console_Write_TranslationStatus { my ($lang, $output_file) = @_; my $MSGFMT = $ENV{"MSGFMT"} || "@INTLTOOL_MSGFMT@"; $output_file = "$SRCDIR/$lang.po" if ($output_file eq ""); system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file); } sub Console_Write_CoverageReport { my $MSGFMT = $ENV{"MSGFMT"} || "@INTLTOOL_MSGFMT@"; &GatherPOFiles; foreach my $lang (@languages) { print "$lang: "; &POFile_Update ($lang, ""); } print "\n\n * Current translation support in $MODULE \n\n"; foreach my $lang (@languages) { print "$lang: "; system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po"); } } sub SubstituteVariable { my ($str) = @_; # always need to rewind file whenever it has been accessed seek (CONF, 0, 0); # cache each variable. varhash is global to we can add # variables elsewhere. while () { if (/^(\w+)=(.*)$/) { ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/; } } if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/) { my $rest = $3; my $untouched = $1; my $sub = ""; # Ignore recursive definitions of variables $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/; return SubstituteVariable ("$untouched$sub$rest"); } # We're using Perl backticks ` and "echo -n" here in order to # expand any shell escapes (such as backticks themselves) in every variable return echo_n ($str); } sub CONF_Handle_Open { my $base_dirname = getcwd(); $base_dirname =~ s@.*/@@; my ($conf_in, $src_dir); if ($base_dirname =~ /^po(-.+)?$/) { if (-f "Makevars") { my $makefile_source; local (*IN); open (IN, ") { if (/^top_builddir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; if (-f "$src_dir" . "/configure.ac") { $conf_in = "$src_dir" . "/configure.ac" . "\n"; } else { $conf_in = "$src_dir" . "/configure.in" . "\n"; } last; } } close IN; $conf_in || die "Cannot find top_builddir in Makevars."; } elsif (-f "../configure.ac") { $conf_in = "../configure.ac"; } elsif (-f "../configure.in") { $conf_in = "../configure.in"; } else { my $makefile_source; local (*IN); open (IN, ") { if (/^top_srcdir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; $conf_in = "$src_dir" . "/configure.in" . "\n"; last; } } close IN; $conf_in || die "Cannot find top_srcdir in Makefile."; } open (CONF, "<$conf_in"); } else { print STDERR "$PROGRAM: Unable to proceed.\n" . "Make sure to run this script inside the po directory.\n"; exit; } } sub FindPackageName { my $version; my $domain = &FindMakevarsDomain; my $name = $domain || "untitled"; &CONF_Handle_Open; my $conf_source; { local (*IN); open (IN, "<&CONF") || return $name; seek (IN, 0, 0); local $/; # slurp mode $conf_source = ; close IN; } # priority for getting package name: # 1. GETTEXT_PACKAGE # 2. first argument of AC_INIT (with >= 2 arguments) # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument) # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m # the \s makes this not work, why? if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); } if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); } # \s makes this not work, why? $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m; # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables. $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g; $name = $domain if $domain; $name = SubstituteVariable ($name); $name =~ s/^["'](.*)["']$/$1/; return $name if $name; } sub FindPOTKeywords { my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_"; my $varname = "XGETTEXT_OPTIONS"; my $make_source; { local (*IN); open (IN, "; close IN; } $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m; return $keywords; } sub FindMakevarsDomain { my $domain = ""; my $makevars_source; { local (*IN); open (IN, "; close IN; } $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m; $domain =~ s/^\s+//; $domain =~ s/\s+$//; return $domain; } sub FindMakevarsBugAddress { my $address = ""; my $makevars_source; { local (*IN); open (IN, "; close IN; } $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m; $address =~ s/^\s+//; $address =~ s/\s+$//; return $address; } amide-1.0.5/src/0000755000175000017500000000000012271346313013235 5ustar loeningloeningamide-1.0.5/src/amitk_dial.h0000664000175000017500000000473411300202464015504 0ustar loeningloening/* amitk_dial.h, adapted from gtkdial.h */ /* GTK - The GIMP Toolkit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __AMITK_DIAL_H__ #define __AMITK_DIAL_H__ #include G_BEGIN_DECLS #define AMITK_DIAL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, amitk_dial_get_type (), AmitkDial) #define AMITK_DIAL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, amitk_dial_get_type (), AmitkDialClass) #define AMITK_IS_DIAL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, amitk_dial_get_type ()) typedef struct _AmitkDial AmitkDial; typedef struct _AmitkDialClass AmitkDialClass; struct _AmitkDial { GtkWidget widget; /* update policy (GTK_UPDATE_[CONTINUOUS/DELAYED/DISCONTINUOUS]) */ guint policy : 2; /* Button currently pressed or 0 if none */ guint8 button; /* Dimensions of dial components */ gint radius; gint pointer_width; /* ID of update timer, or 0 if none */ guint32 timer; /* Current angle */ gfloat angle; gfloat last_angle; /* Old values from adjustment stored so we know when something changes */ gfloat old_value; gfloat old_lower; gfloat old_upper; /* The adjustment object that stores the data for this dial */ GtkAdjustment *adjustment; }; struct _AmitkDialClass { GtkWidgetClass parent_class; }; GtkWidget* amitk_dial_new (GtkAdjustment *adjustment); GType amitk_dial_get_type (void); GtkAdjustment* amitk_dial_get_adjustment (AmitkDial *dial); void amitk_dial_set_update_policy (AmitkDial *dial, GtkUpdateType policy); void amitk_dial_set_adjustment (AmitkDial *dial, GtkAdjustment *adjustment); G_END_DECLS #endif /* __AMITK_DIAL_H__ */ amide-1.0.5/src/fads.h0000664000175000017500000000536112270274532014334 0ustar loeningloening/* fads.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef AMIDE_LIBGSL_SUPPORT #ifndef __FADS_H__ #define __FADS_H__ /* header files that are always needed with this file */ #include "amitk_data_set.h" typedef enum { FADS_TYPE_PCA, FADS_TYPE_PLS, FADS_TYPE_TWO_COMPARTMENT, NUM_FADS_TYPES } fads_type_t; typedef enum { /* FADS_MINIMIZER_STEEPEST_DESCENT, */ FADS_MINIMIZER_CONJUGATE_FR, FADS_MINIMIZER_CONJUGATE_PR, /* FADS_MINIMIZER_VECTOR_BFGS, */ NUM_FADS_MINIMIZERS } fads_minimizer_algorithm_t; extern gchar * fads_minimizer_algorithm_name[]; extern gchar * fads_type_name[]; extern gchar * fads_type_explanation[]; extern const guint8 * fads_type_icon[]; void fads_svd_factors(AmitkDataSet * data_set, gint * pnum_factors, gdouble ** pfactors); void fads_pca(AmitkDataSet * data_set, gint num_factors, gchar * output_filename, AmitkUpdateFunc update_func, gpointer update_data); void fads_pls(AmitkDataSet * data_set, gint num_factors, fads_minimizer_algorithm_t minimizer_algorithm, gint max_iterations, gdouble stopping_criteria, gboolean sum_factors_equal_one, gdouble beta, gchar * output_filename, gint num_blood_curve_constraints, gint * blood_curve_constraint_frame, gdouble * blood_curve_constraint_val, GArray * initial_curves, AmitkUpdateFunc update_func, gpointer update_data); void fads_two_comp(AmitkDataSet * data_set, fads_minimizer_algorithm_t minimizer_algorithm, gint max_iterations, gint tissue_types, gdouble k12, gdouble k21, gdouble stopping_criteria, gboolean sum_factors_equal_one, gchar * output_filename, gint num_blood_curve_constraints, gint * blood_curve_constraint_frame, gdouble * blood_curve_constraint_val, AmitkUpdateFunc update_func, gpointer update_data); #endif /* __FADS_H__ */ #endif /* AMIDE_LIBGSL_SUPPORT */ amide-1.0.5/src/amitk_roi.h0000664000175000017500000001436312270274551015400 0ustar loeningloening/* amitk_roi.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_ROI_H__ #define __AMITK_ROI_H__ #include "amitk_volume.h" #include "amitk_data_set.h" G_BEGIN_DECLS #define AMITK_TYPE_ROI (amitk_roi_get_type ()) #define AMITK_ROI(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), AMITK_TYPE_ROI, AmitkRoi)) #define AMITK_ROI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_ROI, AmitkRoiClass)) #define AMITK_IS_ROI(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), AMITK_TYPE_ROI)) #define AMITK_IS_ROI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_ROI)) #define AMITK_ROI_GET_CLASS(object) (G_TYPE_CHECK_GET_CLASS ((object), AMITK_TYPE_ROI, AmitkRoiClass)) #define AMITK_ROI_TYPE(roi) (AMITK_ROI(roi)->type) #define AMITK_ROI_SPECIFY_COLOR(roi) (AMITK_ROI(roi)->specify_color) #define AMITK_ROI_COLOR(roi) (AMITK_ROI(roi)->color) #define AMITK_ROI_ISOCONTOUR_MIN_VALUE(roi) (AMITK_ROI(roi)->isocontour_min_value) #define AMITK_ROI_ISOCONTOUR_MAX_VALUE(roi) (AMITK_ROI(roi)->isocontour_max_value) #define AMITK_ROI_ISOCONTOUR_RANGE(roi) (AMITK_ROI(roi)->isocontour_range) #define AMITK_ROI_VOXEL_SIZE(roi) (AMITK_ROI(roi)->voxel_size) #define AMITK_ROI_UNDRAWN(roi) (!AMITK_VOLUME_VALID(roi)) #define AMITK_ROI_TYPE_ISOCONTOUR(roi) ((AMITK_ROI_TYPE(roi) == AMITK_ROI_TYPE_ISOCONTOUR_2D) || \ (AMITK_ROI_TYPE(roi) == AMITK_ROI_TYPE_ISOCONTOUR_3D)) #define AMITK_ROI_TYPE_FREEHAND(roi) ((AMITK_ROI_TYPE(roi) == AMITK_ROI_TYPE_FREEHAND_2D) || \ (AMITK_ROI_TYPE(roi) == AMITK_ROI_TYPE_FREEHAND_3D)) /* for iterative algorithms, how many subvoxels should we break the problem up into */ #define AMITK_ROI_GRANULARITY 4 /* # subvoxels in one dimension, so 1/64 is grain size */ //#define AMITK_ROI_GRANULARITY 10 - takes way to long typedef enum { AMITK_ROI_TYPE_ELLIPSOID, AMITK_ROI_TYPE_CYLINDER, AMITK_ROI_TYPE_BOX, AMITK_ROI_TYPE_ISOCONTOUR_2D, AMITK_ROI_TYPE_ISOCONTOUR_3D, AMITK_ROI_TYPE_FREEHAND_2D, AMITK_ROI_TYPE_FREEHAND_3D, AMITK_ROI_TYPE_NUM } AmitkRoiType; typedef enum { AMITK_ROI_ISOCONTOUR_RANGE_ABOVE_MIN, AMITK_ROI_ISOCONTOUR_RANGE_BELOW_MAX, AMITK_ROI_ISOCONTOUR_RANGE_BETWEEN_MIN_MAX, AMITK_ROI_ISOCONTOUR_RANGE_NUM } AmitkRoiIsocontourRange; typedef struct _AmitkRoiClass AmitkRoiClass; typedef struct _AmitkRoi AmitkRoi; struct _AmitkRoi { AmitkVolume parent; AmitkRoiType type; gboolean specify_color; /* if false, program guesses a good color to use */ rgba_t color; /* isocontour and freehand specific stuff */ AmitkPoint voxel_size; AmitkRawData * map_data; /* raw data */ gboolean center_of_mass_calculated; AmitkPoint center_of_mass; /* isocontour specific stuff */ amide_data_t isocontour_min_value; /* note, min and max are what were specified for the isocontour */ amide_data_t isocontour_max_value; /* what the user draws may lie outside of this range */ AmitkRoiIsocontourRange isocontour_range; }; struct _AmitkRoiClass { AmitkVolumeClass parent_class; void (* roi_changed) (AmitkRoi * roi); void (* roi_type_changed) (AmitkRoi * roi); }; /* Application-level methods */ GType amitk_roi_get_type (void); AmitkRoi * amitk_roi_new (AmitkRoiType type); GSList * amitk_roi_get_intersection_line (const AmitkRoi * roi, const AmitkVolume * canvas_slice, const amide_real_t pixel_dim); GSList * amitk_roi_free_points_list (GSList * list); AmitkDataSet * amitk_roi_get_intersection_slice (const AmitkRoi * roi, const AmitkVolume * canvas_slice, const amide_real_t pixel_dim #ifndef AMIDE_LIBGNOMECANVAS_AA , const gboolean fill_map_roi #endif ); void amitk_roi_set_specify_color (AmitkRoi * roi, gboolean specify_color); void amitk_roi_set_color (AmitkRoi * roi, rgba_t color); void amitk_roi_set_voxel_size (AmitkRoi * roi, AmitkPoint voxel_size); void amitk_roi_calc_far_corner (AmitkRoi * roi); void amitk_roi_set_isocontour (AmitkRoi * roi, AmitkDataSet * ds, AmitkVoxel start_voxel, amide_data_t isocontour_min_value, amide_data_t isocontour_max_value, AmitkRoiIsocontourRange isocontour_range); void amitk_roi_manipulate_area (AmitkRoi * roi, gboolean erase, AmitkVoxel erase_voxel, gint area_size); AmitkPoint amitk_roi_get_center_of_mass (AmitkRoi * roi); void amitk_roi_set_type (AmitkRoi * roi, AmitkRoiType new_type); void amitk_roi_calculate_on_data_set (const AmitkRoi * roi, const AmitkDataSet * ds, const guint frame, const guint gate, const gboolean inverse, const gboolean accurate, void (* calculation)(), gpointer data); void amitk_roi_erase_volume (const AmitkRoi * roi, AmitkDataSet * ds, const gboolean outside, AmitkUpdateFunc update_func, gpointer update_data); const gchar * amitk_roi_type_get_name (const AmitkRoiType roi_type); amide_real_t amitk_rois_get_max_min_voxel_size (GList * objects); /* external variables */ extern gchar * amitk_roi_menu_names[]; extern gchar * amitk_roi_menu_explanation[]; G_END_DECLS #endif /* __AMITK_ROI_H__ */ amide-1.0.5/src/amitk_window_edit.h0000664000175000017500000000447012270274536017124 0ustar loeningloening/* amitk_window_edit.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2005-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_WINDOW_EDIT_H__ #define __AMITK_WINDOW_EDIT_H__ /* includes we always need with this widget */ #include #include G_BEGIN_DECLS #define AMITK_TYPE_WINDOW_EDIT (amitk_window_edit_get_type ()) #define AMITK_WINDOW_EDIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AMITK_TYPE_WINDOW_EDIT, AmitkWindowEdit)) #define AMITK_WINDOW_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_WINDOW_EDIT, AmitkWindowEditClass)) #define AMITK_IS_WINDOW_EDIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AMITK_TYPE_WINDOW_EDIT)) #define AMITK_IS_WINDOW_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_WINDOW_EDIT)) typedef struct _AmitkWindowEdit AmitkWindowEdit; typedef struct _AmitkWindowEditClass AmitkWindowEditClass; struct _AmitkWindowEdit { GtkTable table; GtkWidget * limit_label[AMITK_LIMIT_NUM]; GtkWidget * window_spin[AMITK_WINDOW_NUM][AMITK_LIMIT_NUM]; /* used if a data_set is specified */ AmitkDataSet * data_set; GtkWidget * insert_button[AMITK_WINDOW_NUM]; /* only used if no data_set specified */ AmitkPreferences * preferences; }; struct _AmitkWindowEditClass { GtkVBoxClass parent_class; }; GType amitk_window_edit_get_type (void); GtkWidget* amitk_window_edit_new (AmitkDataSet * data_set, AmitkPreferences * preferences); G_END_DECLS #endif /* __AMITK_WINDOW_EDIT_H__ */ amide-1.0.5/src/tb_math.c0000664000175000017500000006747112270274025015037 0ustar loeningloening/* tb_math.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2006-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amide.h" #include "amitk_progress_dialog.h" #include "tb_math.h" #define SPIN_BUTTON_X_SIZE 100 #define LABEL_WIDTH 375 static gchar * data_set_error_page_text = N_("There are no data sets in this study to perform " "mathematical operations on."); static gchar * start_page_text = N_("Welcome to the data set math wizard, used for " "performing mathematical operations on and between medical " "image data sets.\n" "\n" "Note - If performing an operation between two data sets, you " "will likely get more pleasing results if the data sets in " "question are set to trilinear interpolation mode."); typedef enum { COLUMN_DATA_SET_NAME, COLUMN_DATA_SET_POINTER, NUM_DATA_SET_COLUMNS } data_set_column_t; typedef enum { COLUMN_OPERATION_NAME, COLUMN_OPERATION_NUMBER, NUM_OPERATION_COLUMNS } point_column_t; typedef enum { INTRO_PAGE, OPERATION_PAGE, DATA_SETS_PAGE, PARAMETERS_PAGE, CONCLUSION_PAGE, NUM_PAGES } which_page_t; /* data structures */ typedef struct tb_math_t { GtkWidget * dialog; GtkWidget * page[NUM_PAGES]; GtkWidget * progress_dialog; GtkWidget * scrolled_ds1; GtkWidget * list_ds1; GtkWidget * scrolled_ds2; GtkWidget * list_ds2; GtkWidget * list_operation; GtkWidget * parameter0_label; GtkWidget * parameter0_spin; GtkWidget * parameter1_label; GtkWidget * parameter1_spin; GtkWidget * by_frames_check_button; GtkWidget * maintain_ds1_dim_check_button; AmitkStudy * study; gint ds_count; AmitkDataSet * ds1; AmitkDataSet * ds2; gint operation; amide_data_t parameter0; amide_data_t parameter1; gboolean by_frames; gboolean maintain_ds1_dim; guint reference_count; } tb_math_t; static void operation_update_model(tb_math_t * math); static void data_sets_update_model(tb_math_t * math); static void parameters_update_page(tb_math_t * math); static void operation_selection_changed_cb(GtkTreeSelection * selection, gpointer data); static void data_set_selection_changed_cb(GtkTreeSelection * selection, gpointer data); static void parameter0_spinner_cb(GtkSpinButton * spin_button, gpointer data); static void parameter1_spinner_cb(GtkSpinButton * spin_button, gpointer data); static void by_frames_cb(GtkWidget * widget, gpointer data); static void maintain_ds1_dim_cb(GtkWidget * widget, gpointer data); static tb_math_t * tb_math_free(tb_math_t * math); static tb_math_t * tb_math_init(void); static void prepare_page_cb(GtkAssistant * wizard, GtkWidget * page, gpointer data); static void apply_cb(GtkAssistant * assistant, gpointer data); static void close_cb(GtkAssistant * assistant, gpointer data); static GtkWidget * create_operation_page(tb_math_t * tb_math); static GtkWidget * create_data_sets_page(tb_math_t * tb_math); static GtkWidget * create_parameters_page(tb_math_t * tb_math); static void operation_update_model(tb_math_t * tb_math) { GtkTreeIter iter; GtkTreeModel * model; gint i_operation; GtkTreeSelection *selection; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_math->list_operation)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tb_math->list_operation)); gtk_list_store_clear(GTK_LIST_STORE(model)); /* make sure the list is clear */ /* put in the unary operations */ for (i_operation=0; i_operation < AMITK_OPERATION_UNARY_NUM; i_operation++) { gtk_list_store_append (GTK_LIST_STORE(model), &iter); /* Acquire an iterator */ gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_OPERATION_NAME, amitk_operation_unary_get_name(i_operation), COLUMN_OPERATION_NUMBER, i_operation, -1); if (i_operation == tb_math->operation) gtk_tree_selection_select_iter (selection, &iter); } /* put in the binary operations if we have more then one data set */ if (tb_math->ds_count > 1) { for (i_operation=AMITK_OPERATION_UNARY_NUM; i_operation < AMITK_OPERATION_UNARY_NUM+AMITK_OPERATION_BINARY_NUM; i_operation++) { gtk_list_store_append (GTK_LIST_STORE(model), &iter); /* Acquire an iterator */ gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_OPERATION_NAME, amitk_operation_binary_get_name(i_operation-AMITK_OPERATION_UNARY_NUM), COLUMN_OPERATION_NUMBER, i_operation, -1); if (i_operation == tb_math->operation) gtk_tree_selection_select_iter (selection, &iter); } } return; } static void data_sets_update_model(tb_math_t * tb_math) { GtkTreeIter iter; GtkTreeModel * model; GtkTreeSelection *selection; GList * data_sets; GList * temp_data_sets; gint count; /* update data set 1 */ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_math->list_ds1)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tb_math->list_ds1)); gtk_list_store_clear(GTK_LIST_STORE(model)); /* make sure the list is clear */ data_sets = amitk_object_get_children_of_type(AMITK_OBJECT(tb_math->study), AMITK_OBJECT_TYPE_DATA_SET, TRUE); count = 0; temp_data_sets = data_sets; while (temp_data_sets != NULL) { gtk_list_store_append (GTK_LIST_STORE(model), &iter); /* Acquire an iterator */ gtk_list_store_set (GTK_LIST_STORE(model), &iter, COLUMN_DATA_SET_NAME, AMITK_OBJECT_NAME(temp_data_sets->data), COLUMN_DATA_SET_POINTER, temp_data_sets->data, -1); if ( ((tb_math->ds1 == NULL) && (count == 0)) || (tb_math->ds1 == temp_data_sets->data)) gtk_tree_selection_select_iter (selection, &iter); count++; temp_data_sets = temp_data_sets->next; } /* update the data set 2 */ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_math->list_ds2)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tb_math->list_ds2)); gtk_list_store_clear(GTK_LIST_STORE(model)); /* make sure the list is clear */ if (tb_math->operation < AMITK_OPERATION_UNARY_NUM) { gtk_widget_hide(tb_math->scrolled_ds2); } else { /* binary operation */ gtk_widget_show(tb_math->scrolled_ds2); temp_data_sets = data_sets; count = 0; while (temp_data_sets != NULL) { gtk_list_store_append (GTK_LIST_STORE(model), &iter); /* Acquire an iterator */ gtk_list_store_set (GTK_LIST_STORE(model), &iter, COLUMN_DATA_SET_NAME, AMITK_OBJECT_NAME(temp_data_sets->data), COLUMN_DATA_SET_POINTER, temp_data_sets->data, -1); if (((tb_math->ds2 == NULL) && (tb_math->ds1 != temp_data_sets->data)) || (tb_math->ds2 == temp_data_sets->data)) if (count == 1) gtk_tree_selection_select_iter (selection, &iter); count++; temp_data_sets = temp_data_sets->next; } } if (data_sets != NULL) data_sets = amitk_objects_unref(data_sets); return; } static void parameters_update_page(tb_math_t * tb_math) { if (tb_math->operation == AMITK_OPERATION_UNARY_RESCALE) { gtk_label_set_text(GTK_LABEL(tb_math->parameter0_label), _("Set to 0 below:")); gtk_widget_show(tb_math->parameter0_label); gtk_widget_show(tb_math->parameter0_spin); gtk_label_set_text(GTK_LABEL(tb_math->parameter1_label), _("Set to 1 above:")); gtk_widget_show(tb_math->parameter1_label); gtk_widget_show(tb_math->parameter1_spin); gtk_widget_hide(tb_math->by_frames_check_button); gtk_widget_hide(tb_math->maintain_ds1_dim_check_button); } else if (tb_math->operation < AMITK_OPERATION_UNARY_NUM){ /* other unary operations */ gtk_widget_hide(tb_math->parameter0_label); gtk_widget_hide(tb_math->parameter0_spin); gtk_widget_hide(tb_math->parameter1_label); gtk_widget_hide(tb_math->parameter1_spin); gtk_widget_hide(tb_math->by_frames_check_button); gtk_widget_hide(tb_math->maintain_ds1_dim_check_button); } else if (tb_math->operation == (AMITK_OPERATION_UNARY_NUM+AMITK_OPERATION_BINARY_DIVISION)) { gtk_label_set_text(GTK_LABEL(tb_math->parameter0_label), _("Set to 0 if Divisor below:")); gtk_widget_show(tb_math->parameter0_label); gtk_widget_show(tb_math->parameter0_spin); gtk_widget_hide(tb_math->parameter1_label); gtk_widget_hide(tb_math->parameter1_spin); gtk_widget_show(tb_math->by_frames_check_button); gtk_widget_show(tb_math->maintain_ds1_dim_check_button); } else if (tb_math->operation == (AMITK_OPERATION_UNARY_NUM+AMITK_OPERATION_BINARY_T2STAR)) { gtk_label_set_text(GTK_LABEL(tb_math->parameter0_label), _("Data Set 1 echo time (ms):")); gtk_widget_show(tb_math->parameter0_label); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_math->parameter0_spin), AMITK_DATA_SET_ECHO_TIME(tb_math->ds1)); gtk_widget_show(tb_math->parameter0_spin); gtk_label_set_text(GTK_LABEL(tb_math->parameter1_label), _("Data Set 2 echo time (ms):")); gtk_widget_show(tb_math->parameter1_label); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_math->parameter1_spin), AMITK_DATA_SET_ECHO_TIME(tb_math->ds2)); gtk_widget_show(tb_math->parameter1_spin); gtk_widget_show(tb_math->by_frames_check_button); gtk_widget_show(tb_math->maintain_ds1_dim_check_button); } else{ /* other binary operations */ gtk_widget_hide(tb_math->parameter0_label); gtk_widget_hide(tb_math->parameter0_spin); gtk_widget_hide(tb_math->parameter1_label); gtk_widget_hide(tb_math->parameter1_spin); gtk_widget_show(tb_math->by_frames_check_button); gtk_widget_show(tb_math->maintain_ds1_dim_check_button); } return; } static void operation_selection_changed_cb(GtkTreeSelection * selection, gpointer data) { tb_math_t * tb_math = data; gint operation; GtkTreeIter iter; GtkTreeModel * model; if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get(model, &iter, COLUMN_OPERATION_NUMBER, &operation, -1); tb_math->operation = operation; } return; } static void data_set_selection_changed_cb(GtkTreeSelection * selection, gpointer data) { tb_math_t * tb_math = data; AmitkDataSet * ds; gboolean which_ds; gboolean can_continue; GtkTreeIter iter; GtkTreeModel * model; which_ds = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(selection), "which_ds")); if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get(model, &iter, COLUMN_DATA_SET_POINTER, &ds, -1); g_return_if_fail(AMITK_IS_DATA_SET(ds)); switch(which_ds) { case 0: if (tb_math->ds1 != NULL) amitk_object_unref(tb_math->ds1); tb_math->ds1 = amitk_object_ref(ds); break; case 1: if (tb_math->ds2 != NULL) amitk_object_unref(tb_math->ds2); tb_math->ds2 = amitk_object_ref(ds); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } } if (tb_math->operation < AMITK_OPERATION_UNARY_NUM) can_continue = (tb_math->ds1 != NULL); else /* binary operation */ can_continue = ((tb_math->ds1 != NULL) && (tb_math->ds2 != NULL) && (tb_math->ds1 != tb_math->ds2)); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_math->dialog), tb_math->page[DATA_SETS_PAGE], can_continue); return; } static void parameter0_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_math_t * tb_math = data; tb_math->parameter0 = gtk_spin_button_get_value(spin_button); return; } static void parameter1_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_math_t * tb_math = data; tb_math->parameter1 = gtk_spin_button_get_value(spin_button); return; } static void by_frames_cb(GtkWidget * widget, gpointer data) { tb_math_t * tb_math = data; tb_math->by_frames = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); return; } static void maintain_ds1_dim_cb(GtkWidget * widget, gpointer data) { tb_math_t * tb_math = data; tb_math->maintain_ds1_dim = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); return; } static void prepare_page_cb(GtkAssistant * wizard, GtkWidget * page, gpointer data) { tb_math_t * tb_math = data; which_page_t which_page; gchar * temp_string; which_page = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(page), "which_page")); switch(which_page) { case OPERATION_PAGE: operation_update_model(tb_math); break; case DATA_SETS_PAGE: data_sets_update_model(tb_math); // gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_math->dialog), page, // (tb_math->ds1 != NULL) && (tb_math->ds2 != NULL) && (tb_math->ds1 != tb_math->ds2)); break; case PARAMETERS_PAGE: parameters_update_page(tb_math); break; case CONCLUSION_PAGE: temp_string = g_strdup_printf(_("A new data set will be created with the math operation, press Finish to calculate this data set, or Cancel to quit.")); gtk_label_set_text(GTK_LABEL(page), temp_string); g_free(temp_string); break; default: break; } return; } /* function called when the finish button is hit */ static void apply_cb(GtkAssistant * assistant, gpointer data) { tb_math_t * tb_math = data; AmitkDataSet * output_ds; /* sanity check */ g_return_if_fail(tb_math->ds1 != NULL); /* apply the math */ if (tb_math->operation < AMITK_OPERATION_UNARY_NUM) { output_ds = amitk_data_sets_math_unary(tb_math->ds1, tb_math->operation, tb_math->parameter0, tb_math->parameter1, amitk_progress_dialog_update, tb_math->progress_dialog); } else { g_return_if_fail(tb_math->ds2 != NULL); /* sanity check */ output_ds = amitk_data_sets_math_binary(tb_math->ds1, tb_math->ds2, tb_math->operation-AMITK_OPERATION_UNARY_NUM, tb_math->parameter0, tb_math->parameter1, tb_math->by_frames, tb_math->maintain_ds1_dim, amitk_progress_dialog_update, tb_math->progress_dialog); } if (output_ds != NULL) { amitk_object_add_child(AMITK_OBJECT(tb_math->study), AMITK_OBJECT(output_ds)); amitk_object_unref(output_ds); } else { g_warning(_("Math operation failed - results not added to study")); } return; } /* function called to cancel the dialog */ static void close_cb(GtkAssistant * assistant, gpointer data) { tb_math_t * tb_math = data; GtkWidget * dialog = tb_math->dialog; tb_math = tb_math_free(tb_math); /* trash collection */ gtk_widget_destroy(dialog); return; } /* destroy a math data structure */ static tb_math_t * tb_math_free(tb_math_t * tb_math) { gboolean return_val; g_return_val_if_fail(tb_math != NULL, NULL); /* sanity checks */ g_return_val_if_fail(tb_math->reference_count > 0, NULL); /* remove a reference count */ tb_math->reference_count--; /* things to do if we've removed all reference's */ if (tb_math->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing tb_math\n"); #endif if (tb_math->study != NULL) { tb_math->study = amitk_object_unref(tb_math->study); tb_math->study = NULL; } if (tb_math->ds1 != NULL) { amitk_object_unref(tb_math->ds1); tb_math->ds1 = NULL; } if (tb_math->ds2 != NULL) { amitk_object_unref(tb_math->ds2); tb_math->ds2 = NULL; } if (tb_math->progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(tb_math->progress_dialog), "delete_event", NULL, &return_val); tb_math->progress_dialog = NULL; } g_free(tb_math); tb_math = NULL; } return tb_math; } /* allocate and initialize a math data structure */ static tb_math_t * tb_math_init(void) { tb_math_t * tb_math; /* alloc space for the data structure for passing ui info */ if ((tb_math = g_try_new(tb_math_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for tb_math_t")); return NULL; } tb_math->reference_count = 1; tb_math->dialog = NULL; tb_math->study = NULL; tb_math->ds_count=0; tb_math->ds1 = NULL; tb_math->ds2 = NULL; tb_math->operation = AMITK_OPERATION_BINARY_ADD; tb_math->parameter0 = 0.0; tb_math->parameter1 = 0.0; tb_math->by_frames = FALSE; tb_math->maintain_ds1_dim = FALSE; return tb_math; } static GtkWidget * create_operation_page(tb_math_t * tb_math) { GtkWidget * table; GtkListStore * store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *selection; table = gtk_table_new(3,2,FALSE); store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT); tb_math->list_operation = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref(store); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes(_("Math Operation"), renderer, "text", COLUMN_OPERATION_NAME, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tb_math->list_operation), column); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_math->list_operation)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(operation_selection_changed_cb), tb_math); gtk_table_attach(GTK_TABLE(table),tb_math->list_operation, 0,1,0,1, GTK_FILL|GTK_EXPAND, GTK_FILL | GTK_EXPAND,X_PADDING, Y_PADDING); return table; } static GtkWidget * create_data_sets_page(tb_math_t * tb_math) { GtkWidget * table; GtkWidget * vseparator; GtkListStore * store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *selection; table = gtk_table_new(3,3,FALSE); /* the first data set */ store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); tb_math->list_ds1 = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref(store); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes(_("Data Set 1:"), renderer, "text", COLUMN_DATA_SET_NAME, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tb_math->list_ds1), column); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_math->list_ds1)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); g_object_set_data(G_OBJECT(selection), "which_ds", GINT_TO_POINTER(0)); g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(data_set_selection_changed_cb), tb_math); tb_math->scrolled_ds1 = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(tb_math->scrolled_ds1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(tb_math->scrolled_ds1), tb_math->list_ds1); gtk_table_attach(GTK_TABLE(table),tb_math->scrolled_ds1, 0,1,0,1, GTK_FILL|GTK_EXPAND, GTK_FILL | GTK_EXPAND,X_PADDING, Y_PADDING); vseparator = gtk_vseparator_new(); gtk_table_attach(GTK_TABLE(table), vseparator, 1,2,0,2, 0, GTK_FILL, X_PADDING, Y_PADDING); /* the second data set */ store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); tb_math->list_ds2 = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref(store); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes(_("Data Set 2:"), renderer, "text", COLUMN_DATA_SET_NAME, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tb_math->list_ds2), column); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_math->list_ds2)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); g_object_set_data(G_OBJECT(selection), "which_ds", GINT_TO_POINTER(1)); g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(data_set_selection_changed_cb), tb_math); tb_math->scrolled_ds2 = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(tb_math->scrolled_ds2), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(tb_math->scrolled_ds2), tb_math->list_ds2); gtk_table_attach(GTK_TABLE(table),tb_math->scrolled_ds2, 2,3,0,1, GTK_FILL|GTK_EXPAND, GTK_FILL | GTK_EXPAND,X_PADDING, Y_PADDING); return table; } static GtkWidget * create_parameters_page(tb_math_t * tb_math) { GtkWidget * table; gint table_row = 0; table = gtk_table_new(3,2,FALSE); tb_math->parameter0_label = gtk_label_new(NULL); /* label set in parameter_page_update function */ gtk_table_attach(GTK_TABLE(table), tb_math->parameter0_label, 0,1, table_row,table_row+1, FALSE, FALSE, X_PADDING, Y_PADDING); tb_math->parameter0_spin = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_math->parameter0_spin), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_math->parameter0_spin), tb_math->parameter0); gtk_widget_set_size_request(tb_math->parameter0_spin, SPIN_BUTTON_X_SIZE, -1); g_signal_connect(G_OBJECT(tb_math->parameter0_spin), "value_changed", G_CALLBACK(parameter0_spinner_cb), tb_math); g_signal_connect(G_OBJECT(tb_math->parameter0_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(table), tb_math->parameter0_spin, 1,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; tb_math->parameter1_label = gtk_label_new(NULL); /* label set in parameter_page_update function */ gtk_table_attach(GTK_TABLE(table), tb_math->parameter1_label, 0,1, table_row,table_row+1, FALSE, FALSE, X_PADDING, Y_PADDING); tb_math->parameter1_spin = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_math->parameter1_spin), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_math->parameter1_spin), tb_math->parameter1); gtk_widget_set_size_request(tb_math->parameter1_spin, SPIN_BUTTON_X_SIZE, -1); g_signal_connect(G_OBJECT(tb_math->parameter1_spin), "value_changed", G_CALLBACK(parameter1_spinner_cb), tb_math); g_signal_connect(G_OBJECT(tb_math->parameter1_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(table), tb_math->parameter1_spin, 1,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; tb_math->by_frames_check_button = gtk_check_button_new_with_label (_("Do binary operation frame-by-frame (default is by time)")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb_math->by_frames_check_button), tb_math->by_frames); g_signal_connect(G_OBJECT(tb_math->by_frames_check_button), "toggled", G_CALLBACK(by_frames_cb),tb_math); gtk_table_attach(GTK_TABLE(table), tb_math->by_frames_check_button,0,2,table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; tb_math->maintain_ds1_dim_check_button = gtk_check_button_new_with_label(_("Maintain data set 1 dimensions (default is superset of both data sets)")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb_math->maintain_ds1_dim_check_button), tb_math->maintain_ds1_dim); g_signal_connect(G_OBJECT(tb_math->maintain_ds1_dim_check_button), "toggled", G_CALLBACK(maintain_ds1_dim_cb),tb_math); gtk_table_attach(GTK_TABLE(table), tb_math->maintain_ds1_dim_check_button,0,2,table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; return table; } /* function that sets up an image math dialog */ void tb_math(AmitkStudy * study, GtkWindow * parent) { tb_math_t * tb_math; GdkPixbuf * logo; GList * data_sets; gint i; g_return_if_fail(AMITK_IS_STUDY(study)); tb_math = tb_math_init(); tb_math->study = amitk_object_ref(AMITK_OBJECT(study)); tb_math->dialog = gtk_assistant_new(); gtk_window_set_transient_for(GTK_WINDOW(tb_math->dialog), parent); gtk_window_set_destroy_with_parent(GTK_WINDOW(tb_math->dialog), TRUE); g_signal_connect(G_OBJECT(tb_math->dialog), "cancel", G_CALLBACK(close_cb), tb_math); g_signal_connect(G_OBJECT(tb_math->dialog), "close", G_CALLBACK(close_cb), tb_math); g_signal_connect(G_OBJECT(tb_math->dialog), "apply", G_CALLBACK(apply_cb), tb_math); g_signal_connect(G_OBJECT(tb_math->dialog), "prepare", G_CALLBACK(prepare_page_cb), tb_math); tb_math->progress_dialog = amitk_progress_dialog_new(GTK_WINDOW(tb_math->dialog)); /* --------------- initial page ------------------ */ /* figure out how many data sets there are */ data_sets = amitk_object_get_children_of_type(AMITK_OBJECT(tb_math->study), AMITK_OBJECT_TYPE_DATA_SET, TRUE); tb_math->ds_count = amitk_data_sets_count(data_sets, TRUE); if (data_sets != NULL) data_sets = amitk_objects_unref(data_sets); tb_math->page[INTRO_PAGE]= gtk_label_new((tb_math->ds_count >= 1) ? _(start_page_text) : _(data_set_error_page_text)); gtk_widget_set_size_request(tb_math->page[INTRO_PAGE],LABEL_WIDTH, -1); gtk_label_set_line_wrap(GTK_LABEL(tb_math->page[INTRO_PAGE]), TRUE); gtk_assistant_append_page(GTK_ASSISTANT(tb_math->dialog), tb_math->page[INTRO_PAGE]); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_math->dialog), tb_math->page[INTRO_PAGE], _("Data Set Math Wizard")); gtk_assistant_set_page_type(GTK_ASSISTANT(tb_math->dialog), tb_math->page[INTRO_PAGE], GTK_ASSISTANT_PAGE_INTRO); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_math->dialog), tb_math->page[INTRO_PAGE], tb_math->ds_count >= 1); /*------------------ pick your operation page ------------------ */ tb_math->page[OPERATION_PAGE] = create_operation_page(tb_math); gtk_assistant_append_page(GTK_ASSISTANT(tb_math->dialog), tb_math->page[OPERATION_PAGE]); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_math->dialog), tb_math->page[OPERATION_PAGE], _("Operation Selection")); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_math->dialog),tb_math->page[OPERATION_PAGE], TRUE); /* we always have one selected */ /*------------------ pick your data set page ------------------ */ tb_math->page[DATA_SETS_PAGE] = create_data_sets_page(tb_math); gtk_assistant_append_page(GTK_ASSISTANT(tb_math->dialog), tb_math->page[DATA_SETS_PAGE]); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_math->dialog), tb_math->page[DATA_SETS_PAGE], _("Data Set Selection")); /*------------------ additional parameters ------------------ */ tb_math->page[PARAMETERS_PAGE] = create_parameters_page(tb_math); gtk_assistant_append_page(GTK_ASSISTANT(tb_math->dialog), tb_math->page[PARAMETERS_PAGE]); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_math->dialog), tb_math->page[PARAMETERS_PAGE], _("Parameter Selection")); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_math->dialog),tb_math->page[PARAMETERS_PAGE], TRUE); /* ---------------- conclusion page ---------------------------------- */ tb_math->page[CONCLUSION_PAGE] = gtk_label_new(""); gtk_widget_set_size_request(tb_math->page[CONCLUSION_PAGE],LABEL_WIDTH, -1); gtk_label_set_line_wrap(GTK_LABEL(tb_math->page[CONCLUSION_PAGE]), TRUE); gtk_assistant_append_page(GTK_ASSISTANT(tb_math->dialog), tb_math->page[CONCLUSION_PAGE]); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_math->dialog), tb_math->page[CONCLUSION_PAGE], _("Conclusion")); gtk_assistant_set_page_type(GTK_ASSISTANT(tb_math->dialog), tb_math->page[CONCLUSION_PAGE], GTK_ASSISTANT_PAGE_CONFIRM); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_math->dialog), tb_math->page[CONCLUSION_PAGE], TRUE); /* always set to complete here */ logo = gtk_widget_render_icon(GTK_WIDGET(tb_math->dialog), "amide_icon_logo", GTK_ICON_SIZE_DIALOG, 0); for (i=0; idialog), tb_math->page[i], logo); g_object_set_data(G_OBJECT(tb_math->page[i]),"which_page", GINT_TO_POINTER(i)); } g_object_unref(logo); gtk_widget_show_all(tb_math->dialog); return; } amide-1.0.5/src/amide_intl.h0000664000175000017500000000126310365353577015533 0ustar loeningloening#ifndef __AMIDE_INTL_H__ #define __AMIDE_INTL_H__ #include "amide_config.h" #ifdef ENABLE_NLS #include #undef _ #define _(String) dgettext(GETTEXT_PACKAGE,String) #ifdef gettext_noop #define N_(String) gettext_noop(String) #else #define N_(String) (String) #endif #else /* NLS is disabled */ #undef _ #define _(String) (String) #undef N_ #define N_(String) (String) #undef textdomain #define textdomain(String) (String) #undef gettext #define gettext(String) (String) #undef dgettext #define dgettext(Domain,String) (String) #undef dcgettext #define dcgettext(Domain,String,Type) (String) #undef bindtextdomain #define bindtextdomain(Domain,Directory) (Domain) #endif #endif amide-1.0.5/src/tb_profile.h0000664000175000017500000000204112270274476015543 0ustar loeningloening/* tb_profile.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* includes always needed with this */ #include "amitk_study.h" /* external functions */ void tb_profile(AmitkStudy * study, AmitkPreferences * preferences, GtkWindow * parent); amide-1.0.5/src/ui_common.c0000664000175000017500000010251612270274442015377 0ustar loeningloening/* ui_common.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include "amide.h" #include "amide_gnome.h" #include "ui_common.h" #include "amitk_space.h" #include "amitk_color_table.h" #include "amitk_preferences.h" #include "amitk_threshold.h" #include "amitk_tree_view.h" #ifdef AMIDE_LIBGSL_SUPPORT #include #endif #ifdef AMIDE_LIBVOLPACK_SUPPORT #include #endif #ifdef AMIDE_LIBMDC_SUPPORT #include #endif #ifdef AMIDE_FFMPEG_SUPPORT #include #endif #ifdef AMIDE_LIBFAME_SUPPORT #include #endif #ifdef AMIDE_LIBDCMDATA_SUPPORT #include #endif #define AXIS_WIDTH 120 #define AXIS_HEADER 20 #define AXIS_MARGIN 10 #define ORTHOGONAL_AXIS_HEIGHT 100 #define LINEAR_AXIS_HEIGHT 140 #define AXIS_TEXT_MARGIN 10 #define AXIS_ARROW_LENGTH 8 #define AXIS_ARROW_EDGE 7 #define AXIS_ARROW_WIDTH 6 static void manual_cb(GtkAction *action, gpointer * caller); static void about_cb(GtkAction *action, gpointer * caller); /* our help menu... */ GtkActionEntry ui_common_help_menu_items[UI_COMMON_HELP_MENU_NUM] = { /* Help menu */ {"HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1", N_("Open the AMIDE manual"), G_CALLBACK (manual_cb) }, {"HelpAbout", GTK_STOCK_ABOUT, NULL, NULL, N_("About AMIDE"), G_CALLBACK (about_cb) }, }; /* an array to hold the preloaded cursors */ GdkCursor * ui_common_cursor[NUM_CURSORS]; /* internal variables */ static gboolean ui_common_cursors_initialized = FALSE; static gchar * last_path_used=NULL; static ui_common_cursor_t current_cursor; #ifndef AMIDE_LIBGNOMECANVAS_AA static gchar * line_style_names[] = { N_("Solid"), N_("On/Off"), N_("Double Dash") }; #endif static void manual_cb(GtkAction *action, gpointer * caller) { amide_call_help(NULL); } /* the about dialog */ static void about_cb(GtkAction *action, gpointer * caller) { const gchar *authors[] = { "Andreas Loening ", NULL }; const gchar *translators = { "Spanish Manual Translation: Pablo Sau \n" "Chinese (Simplified) Interface Translation: wormwang@holdfastgroup.com\n" "Chinese (Traditional) Interface Translation: William Chao " }; gchar * comments; comments = g_strjoin("", _("AMIDE's a Medical Image Data Examiner\n"), "\n", _("Email bug reports to: "), PACKAGE_BUGREPORT,"\n", "\n", #if (AMIDE_LIBECAT_SUPPORT || AMIDE_LIBGSL_SUPPORT || AMIDE_LIBMDC_SUPPORT || AMIDE_LIBDCMDATA_SUPPORT || AMIDE_LIBVOLPACK_SUPPORT || AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) _("Compiled with support for the following libraries:\n"), #endif #ifdef AMIDE_LIBECAT_SUPPORT _("libecat: CTI File library by Merence Sibomona\n"), #endif #ifdef AMIDE_LIBGSL_SUPPORT _("libgsl: GNU Scientific Library by the GSL Team (version "),GSL_VERSION,")\n", #endif #ifdef AMIDE_LIBMDC_SUPPORT _("libmdc: Medical Imaging File library by Erik Nolf (version "),MDC_VERSION,")\n", #endif #ifdef AMIDE_LIBDCMDATA_SUPPORT _("libdcmdata: OFFIS DICOM Toolkit DCMTK (C) OFFIS e.V. (version "),dcmtk_version,")\n", #endif #ifdef AMIDE_LIBVOLPACK_SUPPORT _("libvolpack: Volume Rendering library by Philippe Lacroute (version "),VP_VERSION,")\n", #endif #ifdef AMIDE_FFMPEG_SUPPORT _("libavcodec: media encoding library by the FFMPEG Team (version "),AV_STRINGIFY(LIBAVCODEC_VERSION), ")\n", #endif #ifdef AMIDE_LIBFAME_SUPPORT _("libfame: Fast Assembly Mpeg Encoding library by the FAME Team (version "), LIBFAME_VERSION, ")\n", #endif NULL); gtk_show_about_dialog(NULL, "name", PACKAGE, "version", VERSION, "copyright", "Copyright (c) 2000-2014 Andreas Loening", "license", "GNU General Public License, Version 2", "authors", authors, "comments", comments, /* "documenters", documenters, */ /* "artists", artists, */ /* "logo", uses default window icon we've already set*/ "translator-credits", translators, /* "translator-credits, _("translator-credits"), */ /* this would mark the string for translation by the translator*/ "website", "http://amide.sourceforge.net", NULL); g_free(comments); return; } /* returns TRUE for OK */ gboolean ui_common_check_filename(const gchar * filename) { if ((strcmp(filename, ".") == 0) || (strcmp(filename, "..") == 0) || (strcmp(filename, "") == 0) || (strcmp(filename, "\\") == 0) || (strcmp(filename, "/") == 0)) { return FALSE; } else return TRUE; } void ui_common_set_last_path_used(const gchar * path) { if (last_path_used != NULL) g_free(last_path_used); last_path_used = g_strdup(path); return; } /* Returns a suggested path to save a file in. Returned path needs to be free'd */ gchar * ui_common_suggest_path(void) { gchar * dir_string; if (last_path_used != NULL) dir_string = g_path_get_dirname(last_path_used); else dir_string = g_strdup(".");; return dir_string; } /* function which brings up an about box */ void ui_common_about_cb(GtkWidget * button, gpointer data) { about_cb(NULL, NULL); } void ui_common_draw_view_axis(GnomeCanvas * canvas, gint row, gint column, AmitkView view, AmitkLayout layout, gint axis_width, gint axis_height) { const gchar * x_axis_label; gdouble x_axis_label_x_location; gdouble x_axis_label_y_location; GtkAnchorType x_axis_label_anchor; GnomeCanvasPoints * x_axis_line_points; const gchar * y_axis_label; gdouble y_axis_label_x_location; gdouble y_axis_label_y_location; GtkAnchorType y_axis_label_anchor; GnomeCanvasPoints * y_axis_line_points; x_axis_line_points = gnome_canvas_points_new(2); x_axis_line_points->coords[0] = column*axis_width + AXIS_MARGIN; /* x1 */ y_axis_line_points = gnome_canvas_points_new(2); y_axis_line_points->coords[0] = column*axis_width + AXIS_MARGIN; /* x1 */ switch(view) { case AMITK_VIEW_CORONAL: /* the x axis */ x_axis_line_points->coords[1] = row*axis_height + AXIS_HEADER; /* y1 */ x_axis_line_points->coords[2] = column*axis_width + axis_width-AXIS_MARGIN; /* x2 */ x_axis_line_points->coords[3] = row*axis_height + AXIS_HEADER; /* y2 */ /* the x label */ x_axis_label = amitk_axis_get_name(AMITK_AXIS_X); x_axis_label_x_location = column*axis_width + axis_width-AXIS_MARGIN-AXIS_TEXT_MARGIN; x_axis_label_y_location = row*axis_height + AXIS_HEADER+AXIS_TEXT_MARGIN; x_axis_label_anchor = GTK_ANCHOR_NORTH_EAST; /* the z axis */ y_axis_line_points->coords[1] = row*axis_height + AXIS_HEADER; /* y1 */ y_axis_line_points->coords[2] = column*axis_width + AXIS_MARGIN; /* x2 */ y_axis_line_points->coords[3] = row*axis_height + axis_height-AXIS_MARGIN; /* y2 */ /* the z label */ y_axis_label = amitk_axis_get_name(AMITK_AXIS_Z); y_axis_label_x_location = column*axis_width + AXIS_MARGIN+AXIS_TEXT_MARGIN; y_axis_label_y_location = row*axis_height + axis_height-AXIS_MARGIN-AXIS_TEXT_MARGIN; y_axis_label_anchor = GTK_ANCHOR_NORTH_WEST; break; case AMITK_VIEW_SAGITTAL: /* the y axis */ x_axis_line_points->coords[3] = row*axis_height + AXIS_HEADER; /* y2 */ if (layout == AMITK_LAYOUT_ORTHOGONAL) { x_axis_line_points->coords[1] = row*axis_height + axis_height-AXIS_MARGIN; /* y1 */ x_axis_line_points->coords[2] = column*axis_width + AXIS_MARGIN; /* x2 */ } else { /* AMITK_LAYOUT_LINEAR */ x_axis_line_points->coords[1] = row*axis_height + AXIS_HEADER; /* y1 */ x_axis_line_points->coords[2] = column*axis_width + axis_width-AXIS_MARGIN; /* x2 */ } /* the y label */ x_axis_label = amitk_axis_get_name(AMITK_AXIS_Y); x_axis_label_y_location = row*axis_height + AXIS_HEADER+AXIS_TEXT_MARGIN; if (layout == AMITK_LAYOUT_ORTHOGONAL) { x_axis_label_x_location = column*axis_width + AXIS_MARGIN+AXIS_TEXT_MARGIN; x_axis_label_anchor = GTK_ANCHOR_NORTH_WEST; } else {/* AMITK_LAYOUT_LINEAR */ x_axis_label_x_location = column*axis_width + axis_width-AXIS_MARGIN-AXIS_TEXT_MARGIN; x_axis_label_anchor = GTK_ANCHOR_NORTH_EAST; } /* the z axis */ y_axis_line_points->coords[3] = row*axis_height + axis_height-AXIS_MARGIN; /* y2 */ if (layout == AMITK_LAYOUT_ORTHOGONAL) { y_axis_line_points->coords[1] = row*axis_height + axis_height-AXIS_MARGIN; /* y1 */ y_axis_line_points->coords[2] = column*axis_width + axis_width-AXIS_MARGIN; /* x2 */ } else { /* AMITK_LAYOUT_LINEAR */ y_axis_line_points->coords[1] = row*axis_height + AXIS_HEADER; /* y1 */ y_axis_line_points->coords[2] = column*axis_width + AXIS_MARGIN; /* x2 */ } /* the z label */ y_axis_label = amitk_axis_get_name(AMITK_AXIS_Z); y_axis_label_y_location = row*axis_height + axis_height-AXIS_MARGIN-AXIS_TEXT_MARGIN; if (layout == AMITK_LAYOUT_ORTHOGONAL) { y_axis_label_x_location = column*axis_width + axis_width-AXIS_MARGIN-AXIS_TEXT_MARGIN; y_axis_label_anchor = GTK_ANCHOR_SOUTH_EAST; } else { y_axis_label_x_location = column*axis_width + AXIS_MARGIN+AXIS_TEXT_MARGIN; y_axis_label_anchor = GTK_ANCHOR_NORTH_WEST; } break; case AMITK_VIEW_TRANSVERSE: default: /* the x axis */ x_axis_line_points->coords[1] = row*axis_height + axis_height-AXIS_MARGIN; /* y1 */ x_axis_line_points->coords[2] = column*axis_width + axis_width-AXIS_MARGIN; /* x2 */ x_axis_line_points->coords[3] = row*axis_height + axis_height-AXIS_MARGIN; /* y2 */ /* the x label */ x_axis_label = amitk_axis_get_name(AMITK_AXIS_X); x_axis_label_x_location = column*axis_width + axis_width-AXIS_MARGIN-AXIS_TEXT_MARGIN; x_axis_label_y_location = row*axis_height + axis_height-AXIS_MARGIN-AXIS_TEXT_MARGIN; x_axis_label_anchor = GTK_ANCHOR_SOUTH_EAST; /* the y axis */ y_axis_line_points->coords[1] = row*axis_height + axis_height-AXIS_MARGIN; /* y1 */ y_axis_line_points->coords[2] = column*axis_width + AXIS_MARGIN; /* x2 */ y_axis_line_points->coords[3] = row*axis_height + AXIS_HEADER; /* y2 */ /* the y label */ y_axis_label = amitk_axis_get_name(AMITK_AXIS_Y); y_axis_label_x_location = column*axis_width + AXIS_MARGIN+AXIS_TEXT_MARGIN; y_axis_label_y_location = row*axis_height + AXIS_HEADER+AXIS_TEXT_MARGIN; y_axis_label_anchor = GTK_ANCHOR_NORTH_WEST; break; } /* the view label */ gnome_canvas_item_new(gnome_canvas_root(canvas), gnome_canvas_text_get_type(), "anchor", GTK_ANCHOR_NORTH, "text", amitk_view_get_name(view), "x", (gdouble) (column+0.5)*axis_width, "y", (gdouble) (row+0.5)*axis_height, "fill_color", "black", "font_desc", amitk_fixed_font_desc, NULL); /* the x axis */ gnome_canvas_item_new(gnome_canvas_root(canvas), gnome_canvas_line_get_type(), "points", x_axis_line_points, "fill_color", "black", "width_pixels", 3, "last_arrowhead", TRUE, "arrow_shape_a", (gdouble) AXIS_ARROW_LENGTH, "arrow_shape_b", (gdouble) AXIS_ARROW_EDGE, "arrow_shape_c", (gdouble) AXIS_ARROW_WIDTH, NULL); /* the x label */ gnome_canvas_item_new(gnome_canvas_root(canvas), gnome_canvas_text_get_type(), "anchor", x_axis_label_anchor,"text", x_axis_label, "x", x_axis_label_x_location, "y", x_axis_label_y_location, "fill_color", "black", "font_desc", amitk_fixed_font_desc, NULL); /* the y axis */ gnome_canvas_item_new(gnome_canvas_root(canvas), gnome_canvas_line_get_type(), "points", y_axis_line_points, "fill_color", "black", "width_pixels", 3, "last_arrowhead", TRUE, "arrow_shape_a", (gdouble) AXIS_ARROW_LENGTH, "arrow_shape_b", (gdouble) AXIS_ARROW_EDGE, "arrow_shape_c", (gdouble) AXIS_ARROW_WIDTH, NULL); gnome_canvas_points_unref(x_axis_line_points); gnome_canvas_points_unref(y_axis_line_points); /* the y label */ gnome_canvas_item_new(gnome_canvas_root(canvas),gnome_canvas_text_get_type(), "anchor", y_axis_label_anchor, "text", y_axis_label, "x", y_axis_label_x_location,"y", y_axis_label_y_location, "fill_color", "black", "font_desc", amitk_fixed_font_desc, NULL); return; } void ui_common_update_sample_roi_item(GnomeCanvasItem * roi_item, gint roi_width, #ifdef AMIDE_LIBGNOMECANVAS_AA gdouble transparency #else GdkLineStyle line_style #endif ) { rgba_t outline_color; rgba_t fill_color; outline_color = amitk_color_table_outline_color(AMITK_COLOR_TABLE_NIH, TRUE); fill_color = outline_color; #ifdef AMIDE_LIBGNOMECANVAS_AA fill_color.a *= transparency; #endif gnome_canvas_item_set(roi_item, "width_pixels", roi_width, "fill_color_rgba", amitk_color_table_rgba_to_uint32(fill_color), #ifdef AMIDE_LIBGNOMECANVAS_AA "outline_color_rgba", amitk_color_table_rgba_to_uint32(outline_color), #else "line_style", line_style, #endif NULL); return; } void ui_common_study_preferences_widgets(GtkWidget * packing_table, gint table_row, GtkWidget ** proi_width_spin, GnomeCanvasItem ** proi_item, #ifdef AMIDE_LIBGNOMECANVAS_AA GtkWidget ** proi_transparency_spin, #else GtkWidget ** pline_style_menu, GtkWidget ** pfill_roi_button, #endif GtkWidget ** playout_button1, GtkWidget ** playout_button2, GtkWidget ** ppanel_layout_button1, GtkWidget ** ppanel_layout_button2, GtkWidget ** ppanel_layout_button3, GtkWidget ** pmaintain_size_button, GtkWidget ** ptarget_size_spin) { GtkWidget * label; GtkObject * adjustment; GtkWidget * roi_canvas; GnomeCanvasPoints * roi_line_points; GtkWidget * image; GtkWidget * hseparator; #ifndef AMIDE_LIBGNOMECANVAS_AA GdkLineStyle i_line_style; #endif /* widgets to change the roi's size */ label = gtk_label_new(_("ROI Width (pixels)")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); adjustment = gtk_adjustment_new(AMITK_PREFERENCES_MIN_ROI_WIDTH, AMITK_PREFERENCES_MIN_ROI_WIDTH, AMITK_PREFERENCES_MAX_ROI_WIDTH,1.0, 1.0, 0.0); *proi_width_spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjustment), 1.0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(*proi_width_spin),FALSE); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(*proi_width_spin), TRUE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(*proi_width_spin), TRUE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(*proi_width_spin), GTK_UPDATE_ALWAYS); gtk_table_attach(GTK_TABLE(packing_table), *proi_width_spin, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(*proi_width_spin); /* a little canvas indicator thingie to show the user who the new preferences will look */ #ifdef AMIDE_LIBGNOMECANVAS_AA roi_canvas = gnome_canvas_new_aa(); #else roi_canvas = gnome_canvas_new(); #endif gtk_widget_set_size_request(roi_canvas, 100, 100); gnome_canvas_set_scroll_region(GNOME_CANVAS(roi_canvas), 0.0, 0.0, 100.0, 100.0); gtk_table_attach(GTK_TABLE(packing_table), roi_canvas, 2,3,table_row,table_row+2, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(roi_canvas); /* the box */ roi_line_points = gnome_canvas_points_new(5); roi_line_points->coords[0] = 25.0; /* x1 */ roi_line_points->coords[1] = 25.0; /* y1 */ roi_line_points->coords[2] = 75.0; /* x2 */ roi_line_points->coords[3] = 25.0; /* y2 */ roi_line_points->coords[4] = 75.0; /* x3 */ roi_line_points->coords[5] = 75.0; /* y3 */ roi_line_points->coords[6] = 25.0; /* x4 */ roi_line_points->coords[7] = 75.0; /* y4 */ roi_line_points->coords[8] = 25.0; /* x4 */ roi_line_points->coords[9] = 25.0; /* y4 */ *proi_item = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(roi_canvas)), #ifdef AMIDE_LIBGNOMECANVAS_AA gnome_canvas_polygon_get_type(), #else gnome_canvas_line_get_type(), #endif "points", roi_line_points, NULL); gnome_canvas_points_unref(roi_line_points); table_row++; #ifdef AMIDE_LIBGNOMECANVAS_AA /* widget to change the transparency level */ /* only works for anti-aliased canvases */ /* widgets to change the roi's size */ label = gtk_label_new(_("ROI Transparency")); gtk_table_attach(GTK_TABLE(packing_table), label, 0, 1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); *proi_transparency_spin = gtk_spin_button_new_with_range(0.0,1.0,AMITK_PREFERENCES_DEFAULT_CANVAS_ROI_TRANSPARENCY); gtk_spin_button_set_increments(GTK_SPIN_BUTTON(*proi_transparency_spin),0.1,0.1); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(*proi_transparency_spin),FALSE); gtk_table_attach(GTK_TABLE(packing_table), *proi_transparency_spin, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(*proi_transparency_spin); table_row++; #else /* widgets to change the roi's line style */ /* Anti-aliased canvas doesn't yet support this */ /* also need to remove #ifndef for relevant lines in amitk_canvas_object.c and other locations */ label = gtk_label_new(_("ROI Line Style:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); *pline_style_menu = gtk_combo_box_new_text(); for (i_line_style=0; i_line_style<=GDK_LINE_DOUBLE_DASH; i_line_style++) gtk_combo_box_append_text(GTK_COMBO_BOX(*pline_style_menu), line_style_names[i_line_style]); gtk_widget_set_size_request (*pline_style_menu, 125, -1); gtk_table_attach(GTK_TABLE(packing_table), *pline_style_menu, 1,2, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(*pline_style_menu); table_row++; /* do we want to fill in isocontour roi's */ label = gtk_label_new(_("Draw Isocontours/Freehands Filled:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); *pfill_roi_button = gtk_check_button_new(); gtk_table_attach(GTK_TABLE(packing_table), *pfill_roi_button, 1,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(*pfill_roi_button); table_row++; #endif hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 0, 3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; gtk_widget_show(hseparator); label = gtk_label_new(_("Canvas Layout:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); /* the radio buttons */ *playout_button1 = gtk_radio_button_new(NULL); image = gtk_image_new_from_stock("amide_icon_layout_linear",GTK_ICON_SIZE_DIALOG); gtk_button_set_image(GTK_BUTTON(*playout_button1), image); gtk_table_attach(GTK_TABLE(packing_table), *playout_button1, 1,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(*playout_button1), "layout", GINT_TO_POINTER(AMITK_LAYOUT_LINEAR)); gtk_widget_show(*playout_button1); *playout_button2 = gtk_radio_button_new(NULL); gtk_radio_button_set_group(GTK_RADIO_BUTTON(*playout_button2), gtk_radio_button_get_group(GTK_RADIO_BUTTON(*playout_button1))); image = gtk_image_new_from_stock("amide_icon_layout_orthogonal",GTK_ICON_SIZE_DIALOG); gtk_button_set_image(GTK_BUTTON(*playout_button2), image); gtk_table_attach(GTK_TABLE(packing_table), *playout_button2, 2,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(*playout_button2), "layout", GINT_TO_POINTER(AMITK_LAYOUT_ORTHOGONAL)); gtk_widget_show(*playout_button2); table_row++; label = gtk_label_new(_("Multiple Canvases Layout:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); /* the radio buttons */ *ppanel_layout_button1 = gtk_radio_button_new(NULL); image = gtk_image_new_from_stock("amide_icon_panels_mixed", GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_button_set_image(GTK_BUTTON(*ppanel_layout_button1), image); gtk_table_attach(GTK_TABLE(packing_table), *ppanel_layout_button1, 1,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(*ppanel_layout_button1), "panel_layout", GINT_TO_POINTER(AMITK_PANEL_LAYOUT_MIXED)); gtk_widget_show(*ppanel_layout_button1); *ppanel_layout_button2 = gtk_radio_button_new(NULL); gtk_radio_button_set_group(GTK_RADIO_BUTTON(*ppanel_layout_button2), gtk_radio_button_get_group(GTK_RADIO_BUTTON(*ppanel_layout_button1))); image = gtk_image_new_from_stock("amide_icon_panels_linear_x", GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_button_set_image(GTK_BUTTON(*ppanel_layout_button2), image); gtk_table_attach(GTK_TABLE(packing_table), *ppanel_layout_button2, 2,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(*ppanel_layout_button2), "panel_layout", GINT_TO_POINTER(AMITK_PANEL_LAYOUT_LINEAR_X)); gtk_widget_show(*ppanel_layout_button2); *ppanel_layout_button3 = gtk_radio_button_new(NULL); gtk_radio_button_set_group(GTK_RADIO_BUTTON(*ppanel_layout_button3), gtk_radio_button_get_group(GTK_RADIO_BUTTON(*ppanel_layout_button1))); image = gtk_image_new_from_stock("amide_icon_panels_linear_y", GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_button_set_image(GTK_BUTTON(*ppanel_layout_button3), image); gtk_table_attach(GTK_TABLE(packing_table), *ppanel_layout_button3, 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(*ppanel_layout_button3), "panel_layout", GINT_TO_POINTER(AMITK_PANEL_LAYOUT_LINEAR_Y)); gtk_widget_show(*ppanel_layout_button3); table_row++; /* do we want the size of the canvas to not resize */ label = gtk_label_new(_("Maintain view size constant:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); *pmaintain_size_button = gtk_check_button_new(); gtk_table_attach(GTK_TABLE(packing_table), *pmaintain_size_button, 1,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(*pmaintain_size_button); table_row++; /* widgets to change the amount of empty space in the center of the target */ label = gtk_label_new(_("Target Empty Area (pixels)")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); adjustment = gtk_adjustment_new(AMITK_PREFERENCES_MIN_TARGET_EMPTY_AREA, AMITK_PREFERENCES_MIN_TARGET_EMPTY_AREA, AMITK_PREFERENCES_MAX_TARGET_EMPTY_AREA, 1.0, 1.0, 0.0); *ptarget_size_spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjustment), 1.0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(*ptarget_size_spin),FALSE); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(*ptarget_size_spin), TRUE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(*ptarget_size_spin), TRUE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(*ptarget_size_spin), GTK_UPDATE_ALWAYS); gtk_table_attach(GTK_TABLE(packing_table), *ptarget_size_spin, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(*ptarget_size_spin); return; } GtkWidget * ui_common_create_view_axis_indicator(AmitkLayout layout) { GtkWidget * axis_indicator; AmitkView i_view; #ifdef AMIDE_LIBGNOMECANVAS_AA axis_indicator = gnome_canvas_new_aa(); #else axis_indicator = gnome_canvas_new(); #endif switch(layout) { case AMITK_LAYOUT_ORTHOGONAL: gtk_widget_set_size_request(axis_indicator, 2.0*AXIS_WIDTH, 2.0*ORTHOGONAL_AXIS_HEIGHT); gnome_canvas_set_scroll_region(GNOME_CANVAS(axis_indicator), 0.0, 0.0, 2.0*AXIS_WIDTH, 2.0*ORTHOGONAL_AXIS_HEIGHT); ui_common_draw_view_axis(GNOME_CANVAS(axis_indicator), 0, 0, AMITK_VIEW_TRANSVERSE, layout, AXIS_WIDTH, ORTHOGONAL_AXIS_HEIGHT); ui_common_draw_view_axis(GNOME_CANVAS(axis_indicator), 1, 0, AMITK_VIEW_CORONAL, layout, AXIS_WIDTH, ORTHOGONAL_AXIS_HEIGHT); ui_common_draw_view_axis(GNOME_CANVAS(axis_indicator), 0, 1, AMITK_VIEW_SAGITTAL, layout, AXIS_WIDTH, ORTHOGONAL_AXIS_HEIGHT); break; case AMITK_LAYOUT_LINEAR: default: gtk_widget_set_size_request(axis_indicator, 3.0*AXIS_WIDTH, LINEAR_AXIS_HEIGHT); gnome_canvas_set_scroll_region(GNOME_CANVAS(axis_indicator), 0.0, 0.0, 3.0*AXIS_WIDTH, LINEAR_AXIS_HEIGHT); for (i_view=0;i_view< AMITK_VIEW_NUM;i_view++) ui_common_draw_view_axis(GNOME_CANVAS(axis_indicator), 0, i_view, i_view, layout, AXIS_WIDTH, LINEAR_AXIS_HEIGHT); break; } return GTK_WIDGET(axis_indicator); } /* This data is in X bitmap format, and can be created with the 'bitmap' utility. */ #define small_dot_width 3 #define small_dot_height 3 static gchar small_dot_bits[] = {0x00, 0x02, 0x00}; /* load in the cursors */ static void ui_common_cursor_init(void) { GdkPixmap *source, *mask; GdkColor fg = { 0, 0, 0, 0 }; /* black. */ GdkColor bg = { 0, 0, 0, 0 }; /* black */ GdkCursor * small_dot; source = gdk_bitmap_create_from_data(NULL, small_dot_bits, small_dot_width, small_dot_height); mask = gdk_bitmap_create_from_data(NULL, small_dot_bits, small_dot_width, small_dot_height); small_dot = gdk_cursor_new_from_pixmap (source, mask, &fg, &bg, 2,2); g_object_unref (source); g_object_unref (mask); /* load in the cursors */ ui_common_cursor[UI_CURSOR_DEFAULT] = NULL; ui_common_cursor[UI_CURSOR_ROI_MODE] = gdk_cursor_new(GDK_DRAFT_SMALL); ui_common_cursor[UI_CURSOR_ROI_RESIZE] = small_dot; /* was GDK_SIZING */ ui_common_cursor[UI_CURSOR_ROI_ROTATE] = small_dot; /* was GDK_EXCHANGE */ ui_common_cursor[UI_CURSOR_ROI_DRAW] = gdk_cursor_new(GDK_PENCIL); ui_common_cursor[UI_CURSOR_OBJECT_SHIFT] = small_dot; /* was GDK_FLEUR */ ui_common_cursor[UI_CURSOR_ROI_ISOCONTOUR] = gdk_cursor_new(GDK_DRAFT_SMALL); ui_common_cursor[UI_CURSOR_ROI_ERASE] = gdk_cursor_new(GDK_DRAFT_SMALL); ui_common_cursor[UI_CURSOR_DATA_SET_MODE] = gdk_cursor_new(GDK_CROSSHAIR); ui_common_cursor[UI_CURSOR_FIDUCIAL_MARK_MODE] = gdk_cursor_new(GDK_DRAFT_SMALL); ui_common_cursor[UI_CURSOR_RENDERING_ROTATE_XY] = gdk_cursor_new(GDK_FLEUR); ui_common_cursor[UI_CURSOR_RENDERING_ROTATE_Z] = gdk_cursor_new(GDK_EXCHANGE); ui_common_cursor[UI_CURSOR_WAIT] = gdk_cursor_new(GDK_WATCH); ui_common_cursors_initialized = TRUE; return; } /* replaces the current cursor with the specified cursor */ void ui_common_place_cursor_no_wait(ui_common_cursor_t which_cursor, GtkWidget * widget) { GdkCursor * cursor; /* make sure we have cursors */ if (!ui_common_cursors_initialized) ui_common_cursor_init(); /* sanity checks */ if (widget == NULL) return; if (!GTK_WIDGET_REALIZED(widget)) return; if (which_cursor != UI_CURSOR_WAIT) current_cursor = which_cursor; cursor = ui_common_cursor[which_cursor]; gdk_window_set_cursor(gtk_widget_get_parent_window(widget), cursor); return; } void ui_common_remove_wait_cursor(GtkWidget * widget) { ui_common_place_cursor_no_wait(current_cursor, widget); } /* replaces the current cursor with the specified cursor */ void ui_common_place_cursor(ui_common_cursor_t which_cursor, GtkWidget * widget) { /* call the actual function */ ui_common_place_cursor_no_wait(which_cursor, widget); /* do any events pending, this allows the cursor to get displayed */ while (gtk_events_pending()) gtk_main_iteration(); return; } static void entry_activate(GtkEntry * entry, gpointer data) { GtkWidget * dialog = data; gchar ** return_str_ptr; return_str_ptr = g_object_get_data(G_OBJECT(dialog), "return_str_ptr"); if(*return_str_ptr != NULL) g_free(*return_str_ptr); *return_str_ptr= g_strdup(gtk_entry_get_text(entry)); gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog), GTK_RESPONSE_OK, strlen(*return_str_ptr)); return; } static void init_response_cb (GtkDialog * dialog, gint response_id, gpointer data) { gint return_val; switch(response_id) { case GTK_RESPONSE_OK: case GTK_RESPONSE_CLOSE: g_signal_emit_by_name(G_OBJECT(dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(dialog)); break; default: break; } return; } /* a simple request dialog */ GtkWidget * ui_common_entry_dialog(GtkWindow * parent, gchar * prompt, gchar **return_str_ptr) { GtkWidget * dialog; GtkWidget * table; guint table_row; GtkWidget * entry; GtkWidget * label; GtkWidget * image; dialog = gtk_dialog_new_with_buttons (_("Request Dialog"), parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); g_object_set_data(G_OBJECT(dialog), "return_str_ptr", return_str_ptr); g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(init_response_cb), NULL); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog), GTK_RESPONSE_OK,FALSE); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); table = gtk_table_new(3,2,FALSE); table_row=0; gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table); image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_QUESTION,GTK_ICON_SIZE_DIALOG); gtk_table_attach(GTK_TABLE(table), image, 0,1, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); label = gtk_label_new(prompt); gtk_table_attach(GTK_TABLE(table), label, 1,2, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); table_row++; entry = gtk_entry_new(); gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE); gtk_table_attach(GTK_TABLE(table), entry, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(entry_activate), dialog); table_row++; gtk_widget_show_all(dialog); return dialog; } void ui_common_init_dialog_response_cb (GtkDialog * dialog, gint response_id, gpointer data) { gint return_val; switch(response_id) { case AMITK_RESPONSE_EXECUTE: case GTK_RESPONSE_CLOSE: g_signal_emit_by_name(G_OBJECT(dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(dialog)); break; default: break; } return; } GList * ui_common_init_dialog_selected_objects(GtkWidget * dialog) { GList * objects; AmitkTreeView * tree_view; tree_view = g_object_get_data(G_OBJECT(dialog), "tree_view"); objects = amitk_tree_view_get_multiple_selection_objects(tree_view); return objects; } void ui_common_toolbar_insert_widget(GtkWidget * toolbar, GtkWidget * widget, const gchar * tooltip, gint position) { GtkToolItem * toolbar_item; toolbar_item = gtk_tool_item_new(); gtk_container_add(GTK_CONTAINER(toolbar_item), widget); if (tooltip != NULL) gtk_tool_item_set_tooltip_text(toolbar_item,tooltip); gtk_tool_item_set_homogeneous(toolbar_item, FALSE); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolbar_item, position); return; } void ui_common_toolbar_append_widget(GtkWidget * toolbar, GtkWidget * widget, const gchar * tooltip) { ui_common_toolbar_insert_widget(toolbar, widget, tooltip, -1); return; } void ui_common_toolbar_append_separator(GtkWidget * toolbar) { GtkToolItem * toolbar_item; toolbar_item = gtk_separator_tool_item_new(); gtk_tool_item_set_homogeneous(toolbar_item, FALSE); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolbar_item, -1); return; } /* internal variables */ static GList * windows = NULL; /* keep track of open windows */ void amide_register_window(gpointer * widget) { g_return_if_fail(widget != NULL); windows = g_list_append(windows, widget); return; } /* keep track of open windows */ void amide_unregister_window(gpointer * widget) { g_return_if_fail(widget != NULL); windows = g_list_remove(windows, widget); if (windows == NULL) gtk_main_quit(); return; } /* this should cleanly exit the program */ void amide_unregister_all_windows(void) { gboolean return_val; gint number_to_leave=0; while (g_list_nth(windows, number_to_leave) != NULL) { /* this works, because each delete event should call amide_unregister_window */ g_signal_emit_by_name(G_OBJECT(windows->data), "delete_event", NULL, &return_val); if (return_val == TRUE) number_to_leave++; } return; } void amide_call_help(const gchar * link_id) { #ifndef OLD_WIN32_HACKS GError *error=NULL; amide_gnome_help_display(PACKAGE, link_id, &error); if (error != NULL) { g_warning("couldn't open help file, error: %s", error->message); g_error_free(error); } #else g_warning("Help is unavailable in the Windows version. Please see the help documentation online at http://amide.sf.net, or in the AMIDE install folder"); #endif return; } amide-1.0.5/src/tb_roi_analysis.h0000664000175000017500000000235312270274475016604 0ustar loeningloening/* tb_roi_analysis_dialog.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __TB_ROI_ANALYSIS_DIALOG_H__ #define __TB_ROI_ANALYSIS_DIALOG_H__ /* header files always needed with this one */ #include "amitk_study.h" /* external functions */ void tb_roi_analysis(AmitkStudy * study, AmitkPreferences * preferences, GtkWindow * parent); GtkWidget * tb_roi_analysis_init_dialog(GtkWindow * parent); #endif /* __TB_ROI_ANALYSIS_DIALOG_H__ */ amide-1.0.5/src/amitk_point.h0000664000175000017500000003434412271013461015731 0ustar loeningloening/* amitk_point.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_POINT_H__ #define __AMITK_POINT_H__ #ifndef _GNU_SOURCE #define _GNU_SOURCE /* use GNU extensions, i.e. NaN */ #endif #include #include "amitk_common.h" #include "amitk_type.h" #include "xml.h" G_BEGIN_DECLS typedef enum { AMITK_VIEW_TRANSVERSE, AMITK_VIEW_CORONAL, AMITK_VIEW_SAGITTAL, AMITK_VIEW_NUM } AmitkView; typedef enum { AMITK_AXIS_X, AMITK_AXIS_Y, AMITK_AXIS_Z, AMITK_AXIS_NUM } AmitkAxis; typedef enum { AMITK_DIM_X, AMITK_DIM_Y, AMITK_DIM_Z, AMITK_DIM_G, AMITK_DIM_T, AMITK_DIM_NUM } AmitkDim; typedef enum { AMITK_LENGTH_UNIT_MM, AMITK_LENGTH_UNIT_CM, AMITK_LENGTH_UNIT_M, AMITK_LENGTH_UNIT_INCHES, AMITK_LENGTH_UNIT_FEET, AMITK_LENGTH_UNIT_NUM } AmitkLengthUnit; #define AMITK_TYPE_POINT (amitk_point_get_type ()) #define AMITK_TYPE_VOXEL (amitk_voxel_get_type ()) #define AMITK_TYPE_PIXEL (amitk_pixel_get_type ()) #define AMITK_TYPE_CANVAS_POINT (amitk_canvas_point_get_type ()) #define AMITK_TYPE_AXES (amitk_axes_get_type ()) typedef struct _AmitkPoint AmitkPoint; typedef struct _AmitkVoxel AmitkVoxel; typedef struct _AmitkPixel AmitkPixel; typedef struct _AmitkCanvasPoint AmitkCanvasPoint; /* realpoint is a point in real (float) 3D space */ struct _AmitkPoint { amide_real_t x; amide_real_t y; amide_real_t z; }; GType amitk_point_get_type (void); AmitkPoint * amitk_point_copy(const AmitkPoint * point); void amitk_point_free (AmitkPoint * point); AmitkPoint amitk_point_read_xml(xmlNodePtr nodes, gchar * descriptor, gchar **perror_buf); void amitk_point_write_xml(xmlNodePtr node, gchar * descriptor, AmitkPoint point); /* voxel point is a point in voxel (integer) 4D space */ struct _AmitkVoxel { amide_intpoint_t x; amide_intpoint_t y; amide_intpoint_t z; amide_intpoint_t g; amide_intpoint_t t; }; GType amitk_voxel_get_type (void); AmitkVoxel * amitk_voxel_copy(const AmitkVoxel * voxel); void amitk_voxel_free (AmitkVoxel * voxel); AmitkVoxel amitk_voxel_read_xml(xmlNodePtr nodes, gchar * descriptor, gchar ** perror_buf); void amitk_voxel_write_xml(xmlNodePtr node, gchar * descriptor, AmitkVoxel voxel); /* pixel point is a point in pixel (integer) 2D space */ struct _AmitkPixel { amide_intpoint_t x; amide_intpoint_t y; }; GType amitk_pixel_get_type (void); AmitkPixel * amitk_pixel_copy(const AmitkPixel * pixel); void amitk_pixel_free (AmitkPixel * pixel); /* canvas point is a point in canvas (real) 2D space */ struct _AmitkCanvasPoint { amide_real_t x; amide_real_t y; }; GType amitk_canvas_point_get_type (void); AmitkCanvasPoint * amitk_canvas_point_copy(const AmitkCanvasPoint * point); void amitk_canvas_point_free (AmitkCanvasPoint * point); /* axes is an orthogonal set of axes in 3D space */ typedef AmitkPoint AmitkAxes[AMITK_AXIS_NUM]; GType amitk_axes_get_type(void); AmitkAxes * amitk_axes_copy(const AmitkAxes * axes); void amitk_axes_free (AmitkAxes * axes); void amitk_axes_copy_in_place(AmitkAxes dest_axes, const AmitkAxes src_axes); void amitk_axes_transpose(AmitkAxes axes); void amitk_axes_mult(const AmitkAxes const_axes1, const AmitkAxes const_axes2, AmitkAxes dest_axes); void amitk_axes_make_orthonormal(AmitkAxes axes); void amitk_axes_rotate_on_vector(AmitkAxes axes, AmitkPoint vector, amide_real_t theta); AmitkPoint amitk_axes_get_orthogonal_axis(const AmitkAxes axes, const AmitkView which_view, const AmitkLayout which_layout, const AmitkAxis which_axis); AmitkPoint amitk_axes_get_normal_axis (const AmitkAxes axes, const AmitkView which_view); /* corners of a box */ typedef AmitkPoint AmitkCorners[2]; GType amitk_corners_get_type (void); void amitk_corners_free (AmitkCorners * corners); AmitkCorners * amitk_corners_copy(const AmitkCorners * corners); /* Constants */ /* some reference values to remember when setting epsilon DBL_EPSILON 2.2204460492503131e-16 SQRT_DBL_EPSILON 1.4901161193847656e-08 FLT_EPSILON 1.1920928955078125e-07 SQRT_FLT_EPSILON 3.4526698300124393e-04 */ #define EPSILON 1.4901161193847656e-08 /* what's close enough to be equal.... */ #define CLOSE 0.0001 /* within 0.01% */ #define EMPTY 0.0 /* convert a gaussian's sigma value to FWHM, FWHM = sigma*2*sqrt(ln 4)*/ #define SIGMA_TO_FWHM 2.354820045 /* convert a guassian's sigma value to FWTM, FWTM = sigma*2*sqrt(ln 100)*/ #define SIGMA_TO_FWTM 4.291932053 /* Macros */ /* returns the boolean value of fp1==fp2 (within a factor of EPSILON) */ #define REAL_EQUAL(x,y) (fabs(x-y)/MAX(MAX(fabs(x),fabs(y)),DBL_MIN) < EPSILON) #define EQUAL_ZERO(fp1) (REAL_EQUAL((fp1), 0.0)) /* are two things pretty close */ #define REAL_CLOSE(x,y) (fabs(x-y)/MAX(MAX(fabs(x),fabs(y)),DBL_MIN) < CLOSE) /* returns the boolean value of point1==point2 (within a factor of EPSILON */ #define POINT_EQUAL(point1,point2) (REAL_EQUAL(((point1).x),((point2).x)) && \ REAL_EQUAL(((point1).y),((point2).y)) && \ REAL_EQUAL(((point1).z),((point2).z))) /* returns the boolean value of point1==point2 (within a factor of CLOSE */ #define POINT_CLOSE(point1,point2) (REAL_CLOSE(((point1).x),((point2).x)) && \ REAL_CLOSE(((point1).y),((point2).y)) && \ REAL_CLOSE(((point1).z),((point2).z))) #define VOXEL_EQUAL(voxel1,voxel2) (((voxel1).x == (voxel2).x) && \ ((voxel1).y == (voxel2).y) && \ ((voxel1).z == (voxel2).z) && \ ((voxel1).g == (voxel2).g) && \ ((voxel1).t == (voxel2).t)) /* figure out the real point that corresponds to the voxel coordinates */ #define VOXEL_TO_POINT(vox, vox_size, real) (((real).x = (((amide_real_t) (vox).x)+0.5) * (vox_size).x), \ ((real).y = (((amide_real_t) (vox).y)+0.5) * (vox_size).y), \ ((real).z = (((amide_real_t) (vox).z)+0.5) * (vox_size).z)) /* Macro to fill in a voxelpoint from a real coordinate. This does no error checking, the real coordinates have to be non-negative for this to work properly. The implementation use to use the "floor" function instead of casting to type amide_intpoint_t, but the floor function is really slow and this macro tends to get used a lot in tight loops. Casting to int should be equivalent for positive values. */ #define POINT_TO_VOXEL(real, vox_size, frame, gate, vox) (((vox).x = (amide_intpoint_t) ((real).x/(vox_size).x)), \ ((vox).y = (amide_intpoint_t) ((real).y/(vox_size).y)), \ ((vox).z = (amide_intpoint_t) ((real).z/(vox_size).z)), \ ((vox).g = (gate)), \ ((vox).t = (frame))) /* a version of the above that assumes vox.t and vox.g have already been set */ #define POINT_TO_VOXEL_COORDS_ONLY(real, vox_size, vox) (((vox).x = (amide_intpoint_t) ((real).x/(vox_size).x)), \ ((vox).y = (amide_intpoint_t) ((real).y/(vox_size).y)), \ ((vox).z = (amide_intpoint_t) ((real).z/(vox_size).z))) /* corner of the voxel in real coordinates */ #define VOXEL_CORNER(vox, vox_size, corner) (((corner).x = (((amide_real_t) (vox).x)) * (vox_size).x), \ ((corner).y = (((amide_real_t) (vox).y)) * (vox_size).y), \ ((corner).z = (((amide_real_t) (vox).z)) * (vox_size).z)) /* returned the maximum of point1 */ #define POINT_MAX(point1) (MAX( MAX((point1).x, (point1).y), (point1).z)) /* returns point1 dot point2" */ #define POINT_DOT_PRODUCT(point1,point2) ((point1).x*(point2).x+(point1).y*(point2).y+(point1).z*(point2).z) /* returns sqrt(point1 dot point1) */ #define POINT_MAGNITUDE(point) (sqrt(POINT_DOT_PRODUCT((point), (point)))) /* returns point2 = abs(point1)" */ #define POINT_ABS(point1,point2) ((point2).x = fabs((point1).x), \ (point2).y = fabs((point1).y), \ (point2).z = fabs((point1).z)) /* does point3=point1+point2 for realpoint structures */ #define POINT_ADD(point1,point2,point3) (((point3).x = (point1).x+(point2).x), \ ((point3).y = (point1).y+(point2).y), \ ((point3).z = (point1).z+(point2).z)) /* does point3=point1-point2 for realpoint structures */ #define POINT_SUB(point1,point2,point3) (((point3).x = (point1).x-(point2).x), \ ((point3).y = (point1).y-(point2).y), \ ((point3).z = (point1).z-(point2).z)) /* does point3=point1.*point2 for realpoint structures */ #define POINT_MULT(point1,point2,point3) (((point3).x = (point1).x*(point2).x), \ ((point3).y = (point1).y*(point2).y), \ ((point3).z = (point1).z*(point2).z)) /* does point3=point1./point2 for realpoint structures */ #define POINT_DIV(point1,point2,point3) (((point3).x = (point1).x/(point2).x), \ ((point3).y = (point1).y/(point2).y), \ ((point3).z = (point1).z/(point2).z)) /* does point3=fabs(point1-point2) for realpoint structures */ #define POINT_DIFF(point1,point2,point3) (((point3).x = fabs((point1).x-(point2).x)), \ ((point3).y = fabs((point1).y-(point2).y)), \ ((point3).z = fabs((point1).z-(point2).z))) /* does point3=cm*point1 for realpoint structures */ #define POINT_CMULT(cm,point1,point3) (((point3).x = (cm)*(point1).x), \ ((point3).y = (cm)*(point1).y), \ ((point3).z = (cm)*(point1).z)) #define POINT_CROSS_PRODUCT(point1, point2, point3) (((point3).x = (point1).y*(point2).z-(point1).z*(point2).y), \ ((point3).y = (point1).z*(point2).x-(point1).x*(point2).z), \ ((point3).z = (point1).x*(point2).y-(point1).y*(point2).x)) /* does point3=cm*point1+dm*point2 for realpoint structures */ #define POINT_MADD(cm,point1,dm,point2,point3) (((point3).x = cm*(point1).x+dm*(point2).x), \ ((point3).y = cm*(point1).y+dm*(point2).y), \ ((point3).z = cm*(point1).z+dm*(point2).z)) /* external functions */ /* note! the equivalent defines above are faster and should be used in any time critical spots */ AmitkPoint point_abs(const AmitkPoint point1); AmitkPoint point_neg(const AmitkPoint point1); AmitkPoint point_add(const AmitkPoint point1, const AmitkPoint point2); AmitkPoint point_sub(const AmitkPoint point1, const AmitkPoint point2); AmitkPoint point_mult(const AmitkPoint point1, const AmitkPoint point2); AmitkPoint point_div(const AmitkPoint point1, const AmitkPoint point2); AmitkPoint point_diff(const AmitkPoint point1, const AmitkPoint point2); AmitkPoint point_cmult(const amide_real_t cmult, const AmitkPoint point1); AmitkPoint point_cross_product(const AmitkPoint point1, const AmitkPoint point2); amide_real_t point_dot_product(const AmitkPoint point1, const AmitkPoint point2); amide_real_t point_mag(const AmitkPoint point1); amide_real_t point_min_dim(const AmitkPoint point1); amide_real_t point_max_dim(const AmitkPoint point1); AmitkCanvasPoint canvas_point_diff(const AmitkCanvasPoint point1,const AmitkCanvasPoint point2); AmitkCanvasPoint canvas_point_sub(const AmitkCanvasPoint point1,const AmitkCanvasPoint point2); AmitkCanvasPoint canvas_point_add(const AmitkCanvasPoint point1,const AmitkCanvasPoint point2); AmitkCanvasPoint canvas_point_cmult(const amide_real_t cmult, const AmitkCanvasPoint point1); amide_real_t canvas_point_dot_product(const AmitkCanvasPoint point1, const AmitkCanvasPoint point2); amide_real_t canvas_point_mag(const AmitkCanvasPoint point1); AmitkPoint canvas_point_2_point(AmitkPoint volume_corner, gint width, gint height, gdouble x_offset,gdouble y_offset, AmitkCanvasPoint canvas_cpoint); AmitkCanvasPoint point_2_canvas_point(AmitkPoint volume_corner, gint width,gint height, gdouble x_offset, gdouble y_offset, AmitkPoint canvas_point); AmitkVoxel voxel_add(const AmitkVoxel voxel1,const AmitkVoxel voxel2); AmitkVoxel voxel_sub(const AmitkVoxel voxel1,const AmitkVoxel voxel2); gboolean voxel_equal(const AmitkVoxel voxel1, const AmitkVoxel voxel2); amide_real_t voxel_max_dim(const AmitkVoxel voxel1); void voxel_print(gchar * message, const AmitkVoxel voxel); amide_intpoint_t voxel_get_dim(const AmitkVoxel voxel, const AmitkDim which_dim); void voxel_set_dim(AmitkVoxel * voxel, const AmitkDim which_dim, amide_intpoint_t value); gboolean point_in_box(const AmitkPoint p, const AmitkPoint box_corner); gboolean point_in_elliptic_cylinder(const AmitkPoint p, const AmitkPoint center, const amide_real_t height, const AmitkPoint radius); gboolean point_in_ellipsoid(const AmitkPoint p, const AmitkPoint center, const AmitkPoint radius); void point_print(gchar * message, const AmitkPoint point); AmitkPoint point_rotate_on_vector(const AmitkPoint in, const AmitkPoint vector, const amide_real_t theta); amide_real_t point_get_component(const AmitkPoint point, const AmitkAxis which_axis); void point_set_component(AmitkPoint * point, const AmitkAxis which_axis, const amide_real_t value); extern const AmitkPoint zero_point; #define ONE_POINT {1.0,1.0,1.0} extern const AmitkPoint one_point; extern const AmitkPoint ten_point; extern const AmitkVoxel zero_voxel; #define ONE_VOXEL {1,1,1,1,1} extern const AmitkVoxel one_voxel; extern const AmitkAxes base_axes; const gchar * amitk_view_get_name(const AmitkView view); const gchar * amitk_dim_get_name(const AmitkDim dim); const gchar * amitk_axis_get_name(const AmitkAxis axis); const gchar * amitk_length_unit_get_name(const AmitkLengthUnit length_unit); G_END_DECLS #endif /* __AMITK_POINT_H__ */ amide-1.0.5/src/amitk_threshold.h0000664000175000017500000001577612270274543016615 0ustar loeningloening/* amitk_threshold.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* adapated from gtkcolorsel.h */ #ifndef __AMITK_THRESHOLD_H__ #define __AMITK_THRESHOLD_H__ /* includes we always need with this widget */ #include #include #include "amitk_data_set.h" #include "amitk_study.h" G_BEGIN_DECLS /* ------------- Threshold---------- */ #define AMITK_TYPE_THRESHOLD (amitk_threshold_get_type ()) #define AMITK_THRESHOLD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AMITK_TYPE_THRESHOLD, AmitkThreshold)) #define AMITK_THRESHOLD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_THESHOLD, AmitkThresholdClass)) #define AMITK_IS_THRESHOLD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AMITK_TYPE_THRESHOLD)) #define AMITK_IS_THRESHOLD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_THRESHOLD)) typedef struct _AmitkThreshold AmitkThreshold; typedef struct _AmitkThresholdClass AmitkThresholdClass; typedef enum { AMITK_THRESHOLD_SCALE_FULL, AMITK_THRESHOLD_SCALE_SCALED, AMITK_THRESHOLD_SCALE_NUM_SCALES } AmitkThresholdScale; typedef enum { AMITK_THRESHOLD_ARROW_FULL_MIN, AMITK_THRESHOLD_ARROW_FULL_CENTER, AMITK_THRESHOLD_ARROW_FULL_MAX, AMITK_THRESHOLD_ARROW_SCALED_MIN, AMITK_THRESHOLD_ARROW_SCALED_CENTER, AMITK_THRESHOLD_ARROW_SCALED_MAX, AMITK_THRESHOLD_ARROW_NUM_ARROWS } AmitkThresholdArrow; typedef enum { AMITK_THRESHOLD_ENTRY_MAX_ABSOLUTE, AMITK_THRESHOLD_ENTRY_MAX_PERCENT, AMITK_THRESHOLD_ENTRY_MIN_ABSOLUTE, AMITK_THRESHOLD_ENTRY_MIN_PERCENT, AMITK_THRESHOLD_ENTRY_NUM_ENTRIES } AmitkThresholdEntry; typedef enum { AMITK_THRESHOLD_LINE_MAX, AMITK_THRESHOLD_LINE_CENTER, AMITK_THRESHOLD_LINE_MIN, AMITK_THRESHOLD_LINE_NUM_LINES } AmitkThresholdLine; typedef enum { AMITK_THRESHOLD_BOX_LAYOUT, AMITK_THRESHOLD_LINEAR_LAYOUT } AmitkThresholdLayout; struct _AmitkThreshold { GtkVBox vbox; gboolean minimal; /* true if we just want the color table menu and the color scale */ AmitkViewMode view_mode; GtkWidget * color_scales[2]; GtkWidget * histogram; GtkWidget * histogram_label; GnomeCanvasItem * color_scale_image[2][AMITK_THRESHOLD_SCALE_NUM_SCALES]; GnomeCanvasItem * histogram_image; GnomeCanvasItem * arrow[2][AMITK_THRESHOLD_ARROW_NUM_ARROWS]; GnomeCanvasItem * connector_line[2][AMITK_THRESHOLD_LINE_NUM_LINES]; GtkWidget * spin_button[2][AMITK_THRESHOLD_ENTRY_NUM_ENTRIES]; GtkWidget * color_table_label[AMITK_VIEW_MODE_NUM]; GtkWidget * color_table_hbox[AMITK_VIEW_MODE_NUM]; GtkWidget * color_table_menu[AMITK_VIEW_MODE_NUM]; GtkWidget * color_table_independent[AMITK_VIEW_MODE_NUM]; GtkWidget * threshold_ref_frame_menu[2]; GtkWidget * percent_label[2]; GtkWidget * absolute_label[2]; GtkWidget * ref_frame_label[2]; GtkWidget * full_label[2]; GtkWidget * scaled_label[2]; GtkWidget * type_button[AMITK_THRESHOLDING_NUM]; GtkWidget * window_label; GtkWidget * window_vbox; GtkWidget * style_button[AMITK_THRESHOLD_STYLE_NUM]; GtkWidget * min_max_label[AMITK_LIMIT_NUM]; gdouble initial_y[2]; amide_data_t initial_min[2]; amide_data_t initial_max[2]; amide_data_t threshold_max[2]; amide_data_t threshold_min[2]; GtkWidget * progress_dialog; AmitkDataSet * data_set; /* what data set this threshold corresponds to */ }; struct _AmitkThresholdClass { GtkVBoxClass parent_class; }; GType amitk_threshold_get_type (void); GtkWidget* amitk_threshold_new (AmitkDataSet * data_set, AmitkThresholdLayout layout, GtkWindow * parent, gboolean minimal); void amitk_threshold_new_data_set (AmitkThreshold * threshold, AmitkDataSet * new_data_set); void amitk_threshold_style_widgets (GtkWidget ** radio_buttons, GtkWidget * hbox); /* ---------- ThresholdDialog------------- */ #define AMITK_TYPE_THRESHOLD_DIALOG (amitk_threshold_dialog_get_type ()) #define AMITK_THRESHOLD_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AMITK_TYPE_THRESHOLD_DIALOG, AmitkThresholdDialog)) #define AMITK_THRESHOLD_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_THESHOLD_DIALOG, AmitkThresholdDialogClass)) #define AMITK_IS_THRESHOLD_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AMITK_TYPE_THRESHOLD_DIALOG)) #define AMITK_IS_THRESHOLD_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_THRESHOLD_DIALOG)) typedef struct _AmitkThresholdDialog AmitkThresholdDialog; typedef struct _AmitkThresholdDialogClass AmitkThresholdDialogClass; struct _AmitkThresholdDialog { GtkDialog dialog; GtkWidget *data_set_label; GtkWidget *vbox; GtkWidget *threshold; }; struct _AmitkThresholdDialogClass { GtkDialogClass parent_class; }; GType amitk_threshold_dialog_get_type (void); GtkWidget* amitk_threshold_dialog_new (AmitkDataSet * data_set, GtkWindow * parent); void amitk_threshold_dialog_new_data_set (AmitkThresholdDialog * threshold_dialog, AmitkDataSet * new_data_set); AmitkDataSet * amitk_threshold_dialog_data_set (AmitkThresholdDialog * threshold_dialog); /*---------- ThresholdDialogs--------------- */ #define AMITK_TYPE_THRESHOLDS_DIALOG (amitk_thresholds_dialog_get_type ()) #define AMITK_THRESHOLDS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AMITK_TYPE_THRESHOLDS_DIALOG, AmitkThresholdsDialog)) #define AMITK_THRESHOLDS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_THESHOLDS_DIALOG, AmitkThresholdsDialogClass)) #define AMITK_IS_THRESHOLDS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AMITK_TYPE_THRESHOLDS_DIALOG)) #define AMITK_IS_THRESHOLDS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_THRESHOLDS_DIALOG)) typedef struct _AmitkThresholdsDialog AmitkThresholdsDialog; typedef struct _AmitkThresholdsDialogClass AmitkThresholdsDialogClass; struct _AmitkThresholdsDialog { GtkDialog dialog; GtkWidget *notebook; GList * thresholds; }; struct _AmitkThresholdsDialogClass { GtkDialogClass parent_class; }; GType amitk_thresholds_dialog_get_type (void); GtkWidget* amitk_thresholds_dialog_new (GList * objects, GtkWindow * parent); G_END_DECLS #endif /* __AMITK_THRESHOLD_H__ */ amide-1.0.5/src/ui_gate_dialog.c0000664000175000017500000004001012270274032016327 0ustar loeningloening/* ui_gate_dialog.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2004-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amide.h" #include "amitk_common.h" #include "ui_gate_dialog.h" typedef enum { COLUMN_GATE, COLUMN_GATE_TIME, NUM_COLUMNS } column_type_t; static gboolean column_use_my_renderer[NUM_COLUMNS] = { FALSE, TRUE }; enum { ENTRY_START, ENTRY_END, NUM_ENTRIES }; static gchar * column_names[] = { N_("Gate #"), N_("Gate Time (s)") }; typedef struct ui_gate_dialog_t { AmitkDataSet * ds; GtkWidget * tree_view; GtkWidget * start_spin; GtkWidget * end_spin; GtkWidget * autoplay_check_button; guint idle_handler_id; gboolean valid; gint start_gate; gint end_gate; } ui_gate_dialog_t; static void selection_for_each_func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); static void autoplay_cb(GtkWidget * widget, gpointer data); static gboolean autoplay_update_while_idle(gpointer data); static void selection_changed_cb (GtkTreeSelection *selection, gpointer data); static gboolean delete_event_cb(GtkWidget* dialog, GdkEvent * event, gpointer data); static void change_spin_cb(GtkSpinButton * spin_button, gpointer data); static void update_model(GtkListStore * store, GtkTreeSelection *selection, AmitkDataSet * ds); static void update_selections(GtkTreeModel * model, GtkTreeSelection *selection, GtkWidget * dialog, ui_gate_dialog_t * gd); static void update_entries(GtkWidget * dialog); static void data_set_gate_changed_cb(AmitkDataSet * ds, gpointer dialog); static void remove_data_set(GtkWidget * dialog); static void selection_for_each_func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { gint i_gate; ui_gate_dialog_t * gd = data; gtk_tree_model_get(model, iter, COLUMN_GATE, &i_gate, -1); if (!gd->valid) { gd->start_gate = i_gate; gd->end_gate = i_gate; gd->valid = TRUE; } else { if (i_gate < gd->start_gate) gd->start_gate = i_gate; else if (i_gate > gd->end_gate) gd->end_gate = i_gate; } return; } static void autoplay_cb(GtkWidget * widget, gpointer data) { ui_gate_dialog_t * gd=data; guint interval; gboolean autoplay; autoplay = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gd->autoplay_check_button)); if (gd->ds == NULL) { autoplay = FALSE; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gd->autoplay_check_button), FALSE); } if (autoplay) { interval = 1000.0 / AMITK_DATA_SET_NUM_GATES(gd->ds); /* try to cycle through in 1000 ms */ if (interval < 200) interval= 200; /* set 200 ms as lowest repetition rate) */ if (gd->idle_handler_id == 0) gd->idle_handler_id = g_timeout_add_full(G_PRIORITY_DEFAULT_IDLE,interval,autoplay_update_while_idle, gd, NULL); } else { if (gd->idle_handler_id != 0) { g_source_remove(gd->idle_handler_id); gd->idle_handler_id=0; } } return; } static gboolean autoplay_update_while_idle(gpointer data) { ui_gate_dialog_t * gd=data; if (gd->ds == NULL) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gd->autoplay_check_button), FALSE); return FALSE; } gd->start_gate = 1 + AMITK_DATA_SET_VIEW_START_GATE(gd->ds); if (gd->start_gate >= AMITK_DATA_SET_NUM_GATES(gd->ds)) gd->start_gate = 0; gd->end_gate = gd->start_gate; amitk_data_set_set_view_start_gate(gd->ds, gd->start_gate); amitk_data_set_set_view_end_gate(gd->ds, gd->end_gate); return TRUE; } /* reset out start and duration based on what just got selected */ static void selection_changed_cb (GtkTreeSelection *selection, gpointer data) { GtkWidget * dialog = data; ui_gate_dialog_t * gd; gd = g_object_get_data(G_OBJECT(dialog), "gd"); if (gd->ds == NULL) return; /* run the following function on each selected row */ gd->valid = FALSE; gtk_tree_selection_selected_foreach(selection, selection_for_each_func, gd); amitk_data_set_set_view_start_gate(gd->ds, gd->start_gate); amitk_data_set_set_view_end_gate(gd->ds, gd->end_gate); return; } /* function called to destroy the gate dialog */ static gboolean delete_event_cb(GtkWidget* dialog, GdkEvent * event, gpointer data) { ui_gate_dialog_t * gd = data; GtkTreeSelection *selection; /* explicitly disconnect signals, sometimes GTK throws some of these on delete (after unref'ing study */ g_signal_handlers_disconnect_by_func(G_OBJECT(gd->start_spin), G_CALLBACK(change_spin_cb), dialog); g_signal_handlers_disconnect_by_func(G_OBJECT(gd->end_spin), G_CALLBACK(change_spin_cb), dialog); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (gd->tree_view)); g_signal_handlers_disconnect_by_func(G_OBJECT(selection), G_CALLBACK(selection_changed_cb), dialog); /* trash collection */ if (gd->idle_handler_id != 0) { g_source_remove(gd->idle_handler_id); gd->idle_handler_id=0; } remove_data_set(dialog); g_free(gd); return FALSE; } /* function called when a numerical spin button has been changed */ static void change_spin_cb(GtkSpinButton * spin_button, gpointer data) { gint temp_val; gint which_widget; GtkWidget * dialog = data; ui_gate_dialog_t * gd; // GtkTreeSelection *selection; // GtkTreeModel * model; which_widget = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(spin_button), "type")); gd = g_object_get_data(G_OBJECT(dialog), "gd"); if (gd->ds == NULL) return; temp_val = gtk_spin_button_get_value_as_int(spin_button); switch(which_widget) { case ENTRY_START: amitk_data_set_set_view_start_gate(gd->ds, temp_val); break; case ENTRY_END: amitk_data_set_set_view_end_gate(gd->ds, temp_val); break; default: g_error("unexpected case in %s at line %d",__FILE__, __LINE__); break; } // model = gtk_tree_view_get_model(GTK_TREE_VIEW(gd->tree_view)); // selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(gd->tree_view)); // update_selections(model, selection, dialog, gd); update_entries(dialog); return; } static void update_model(GtkListStore * store, GtkTreeSelection *selection, AmitkDataSet * ds) { GtkTreeIter iter; guint i_gate; gtk_list_store_clear(store); /* make sure the list is clear */ if (ds == NULL) return; /* start generating our list of options */ for (i_gate=0; i_gate < AMITK_DATA_SET_NUM_GATES(ds); i_gate++) { /* setup the corresponding list entry */ gtk_list_store_append (store, &iter); /* Acquire an iterator */ gtk_list_store_set(store, &iter, COLUMN_GATE, i_gate, COLUMN_GATE_TIME, amitk_data_set_get_gate_time(ds,i_gate), -1); } return; } static void update_selections(GtkTreeModel * model, GtkTreeSelection *selection, GtkWidget * dialog, ui_gate_dialog_t * gd) { GtkTreeIter iter; gint iter_gate; gboolean select; if (gd->ds == NULL) return; /* Block signals to this list widget. I need to do this, as I'll be selecting rows, causing the emission of "changed" signals */ g_signal_handlers_block_by_func(G_OBJECT(selection), G_CALLBACK(selection_changed_cb), dialog); if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get(model, &iter, COLUMN_GATE, &iter_gate,-1); /* figure out if this row is suppose to be selected */ select = FALSE; if (AMITK_DATA_SET_VIEW_START_GATE(gd->ds) > AMITK_DATA_SET_VIEW_END_GATE(gd->ds)) { if ((iter_gate >= AMITK_DATA_SET_VIEW_START_GATE(gd->ds)) || (iter_gate <= AMITK_DATA_SET_VIEW_END_GATE(gd->ds))) select = TRUE; } else { if ((iter_gate >= AMITK_DATA_SET_VIEW_START_GATE(gd->ds)) && (iter_gate <= AMITK_DATA_SET_VIEW_END_GATE(gd->ds))) select = TRUE; } if (select) gtk_tree_selection_select_iter(selection, &iter); else gtk_tree_selection_unselect_iter(selection, &iter); } while(gtk_tree_model_iter_next(model, &iter)); } /* done updating the list, we can reconnect signals now */ g_signal_handlers_unblock_by_func(G_OBJECT(selection), G_CALLBACK(selection_changed_cb), dialog); return; } static void update_entries(GtkWidget * dialog) { ui_gate_dialog_t * gd; gint value; gd = g_object_get_data(G_OBJECT(dialog), "gd"); g_signal_handlers_block_by_func(G_OBJECT(gd->start_spin), G_CALLBACK(change_spin_cb), dialog); value = (gd->ds != NULL) ? AMITK_DATA_SET_VIEW_START_GATE(gd->ds) : 0; gtk_spin_button_set_value(GTK_SPIN_BUTTON(gd->start_spin), value); g_signal_handlers_unblock_by_func(G_OBJECT(gd->start_spin), G_CALLBACK(change_spin_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(gd->end_spin), G_CALLBACK(change_spin_cb), dialog); value = (gd->ds != NULL) ? AMITK_DATA_SET_VIEW_END_GATE(gd->ds) : 0; gtk_spin_button_set_value(GTK_SPIN_BUTTON(gd->end_spin), value); g_signal_handlers_unblock_by_func(G_OBJECT(gd->end_spin), G_CALLBACK(change_spin_cb), dialog); return; } static void data_set_gate_changed_cb(AmitkDataSet * ds, gpointer data) { GtkWidget * dialog = data; ui_gate_dialog_t * gd; GtkTreeSelection *selection; GtkTreeModel * model; gd = g_object_get_data(G_OBJECT(dialog), "gd"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(gd->tree_view)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(gd->tree_view)); update_selections(model, selection, dialog, gd); update_entries(dialog); } static void remove_data_set(GtkWidget * dialog) { ui_gate_dialog_t * gd; gd = g_object_get_data(G_OBJECT(dialog), "gd"); if (gd->ds == NULL) return; g_signal_handlers_disconnect_by_func(G_OBJECT(gd->ds), G_CALLBACK(data_set_gate_changed_cb), dialog); amitk_object_unref(gd->ds); gd->ds = NULL; return; } void ui_gate_dialog_set_active_data_set(GtkWidget * dialog, AmitkDataSet * ds) { ui_gate_dialog_t * gd; GtkTreeSelection *selection; GtkTreeModel * model; g_return_if_fail(dialog != NULL); gd = g_object_get_data(G_OBJECT(dialog), "gd"); remove_data_set(dialog); if (ds != NULL) if (AMITK_IS_DATA_SET(ds)) { gd->ds = amitk_object_ref(ds); g_signal_connect(G_OBJECT(ds), "view_gates_changed", G_CALLBACK(data_set_gate_changed_cb), dialog); } model = gtk_tree_view_get_model(GTK_TREE_VIEW(gd->tree_view)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(gd->tree_view)); update_model(GTK_LIST_STORE(model), selection,gd->ds); update_selections(model, selection, dialog, gd); update_entries(dialog); return; } /* create the gate selection dialog */ GtkWidget * ui_gate_dialog_create(AmitkDataSet * ds, GtkWindow * parent) { GtkWidget * dialog; gchar * temp_string = NULL; GtkWidget * packing_table; GtkWidget * label; GtkWidget * scrolled; guint table_row = 0; ui_gate_dialog_t * gd; GtkListStore * store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *selection; GtkWidget * hseparator; column_type_t i_column; temp_string = g_strdup_printf(_("%s: Gate Dialog"),PACKAGE); dialog = gtk_dialog_new_with_buttons(temp_string, parent, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, NULL); g_free(temp_string); gtk_window_set_resizable(GTK_WINDOW(dialog), TRUE); gd = g_try_new(ui_gate_dialog_t, 1); g_return_val_if_fail(gd != NULL, NULL); gd->ds = NULL; gd->ds = amitk_object_ref(ds); gd->idle_handler_id=0; g_object_set_data(G_OBJECT(dialog), "gd", gd); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(dialog), "delete_event", G_CALLBACK(delete_event_cb), gd); /* start making the widgets for this dialog box */ packing_table = gtk_table_new(5,4,FALSE); table_row=0; gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), packing_table); label = gtk_label_new(_("Start Gate")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gd->start_spin = gtk_spin_button_new_with_range(0, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(gd->start_spin), TRUE); g_object_set_data(G_OBJECT(gd->start_spin), "type", GINT_TO_POINTER(ENTRY_START)); g_signal_connect(G_OBJECT(gd->start_spin), "value_changed", G_CALLBACK(change_spin_cb), dialog); g_signal_connect(G_OBJECT(gd->start_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), gd->start_spin,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("End Gate")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gd->end_spin = gtk_spin_button_new_with_range(0, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(gd->end_spin), TRUE); g_object_set_data(G_OBJECT(gd->end_spin), "type", GINT_TO_POINTER(ENTRY_END)); g_signal_connect(G_OBJECT(gd->end_spin), "value_changed", G_CALLBACK(change_spin_cb), dialog); g_signal_connect(G_OBJECT(gd->end_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), gd->end_spin,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 0, 4, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* the scroll widget which the list will go into */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,350,200); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_table_attach(GTK_TABLE(packing_table), scrolled, 0,2, table_row, table_row+1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); table_row++; /* and the list itself */ store = gtk_list_store_new(NUM_COLUMNS, G_TYPE_INT, AMITK_TYPE_TIME); gd->tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref(store); for (i_column=0; i_columntree_view), column); } selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (gd->tree_view)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE); g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK (selection_changed_cb), dialog); gtk_container_add(GTK_CONTAINER(scrolled),gd->tree_view); /* check button for autoplay */ gd->autoplay_check_button = gtk_check_button_new_with_label (_("Auto play")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gd->autoplay_check_button), FALSE); g_signal_connect(G_OBJECT(gd->autoplay_check_button), "toggled", G_CALLBACK(autoplay_cb),gd); gtk_table_attach(GTK_TABLE(packing_table), gd->autoplay_check_button,0,2,table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* fill in the list/update entries */ ui_gate_dialog_set_active_data_set(dialog, ds); /* and show all our widgets */ gtk_widget_show_all(dialog); return dialog; } amide-1.0.5/src/amide_gnome.c0000664000175000017500000002502512270273645015661 0ustar loeningloening/* amide_gnome.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2007-2014 Andy Loening * * Author: Andy Loening * Code directly copied from libgnome */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* this file contains gnome functions that I still need but will hopefully have replacements at some point in the future */ #include #include #include #include "amitk_common.h" #include "amide_gnome.h" #if !defined(G_OS_WIN32) && !defined(AMIDE_NATIVE_GTK_OSX) #include #include //#else //#include #endif typedef enum { AMIDE_GNOME_URL_ERROR_PARSE, AMIDE_GNOME_URL_ERROR_LAUNCH, AMIDE_GNOME_URL_ERROR_URL, AMIDE_GNOME_URL_ERROR_NO_DEFAULT, AMIDE_GNOME_URL_ERROR_NOT_SUPPORTED, AMIDE_GNOME_URL_ERROR_VFS, AMIDE_GNOME_URL_ERROR_CANCELLED } AmideGnomeURLError; #define AMIDE_GNOME_URL_ERROR (amide_gnome_url_error_quark ()) GQuark amide_gnome_url_error_quark (void) { static GQuark error_quark = 0; if (error_quark == 0) error_quark = g_quark_from_static_string ("amide-gnome-url-error-quark"); return error_quark; } static gboolean amide_gnome_url_show_with_env (const char *url, char **envp, GError **error) { #if !defined(G_OS_WIN32) && !defined(AMIDE_NATIVE_GTK_OSX) GnomeVFSResult result; GnomeVFSURI *vfs_uri; g_return_val_if_fail (url != NULL, FALSE); result = gnome_vfs_url_show_with_env (url, envp); switch (result) { case GNOME_VFS_OK: return TRUE; case GNOME_VFS_ERROR_INTERNAL: g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_VFS, _("Unknown internal error while displaying this location.")); break; case GNOME_VFS_ERROR_BAD_PARAMETERS: g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_URL, _("The specified location is invalid.")); break; case GNOME_VFS_ERROR_PARSE: g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_PARSE, _("There was an error parsing the default action command associated " "with this location.")); break; case GNOME_VFS_ERROR_LAUNCH: g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_LAUNCH, _("There was an error launching the default action command associated " "with this location.")); break; case GNOME_VFS_ERROR_NO_DEFAULT: g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_NO_DEFAULT, _("There is no default action associated with this location.")); break; case GNOME_VFS_ERROR_NOT_SUPPORTED: g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_NOT_SUPPORTED, _("The default action does not support this protocol.")); break; case GNOME_VFS_ERROR_CANCELLED: g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_CANCELLED, _("The request was cancelled.")); break; case GNOME_VFS_ERROR_HOST_NOT_FOUND: { vfs_uri = gnome_vfs_uri_new (url); if (gnome_vfs_uri_get_host_name (vfs_uri) != NULL) { g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_VFS, _("The host \"%s\" could not be found."), gnome_vfs_uri_get_host_name (vfs_uri)); } else { g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_VFS, _("The host could not be found.")); } gnome_vfs_uri_unref (vfs_uri); } break; case GNOME_VFS_ERROR_INVALID_URI: case GNOME_VFS_ERROR_NOT_FOUND: g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_VFS, _("The location or file could not be found.")); break; case GNOME_VFS_ERROR_LOGIN_FAILED: g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_VFS, _("The login has failed.")); break; default: g_set_error (error, AMIDE_GNOME_URL_ERROR, AMIDE_GNOME_URL_ERROR_VFS, "%s", gnome_vfs_result_to_string (result)); } return FALSE; #else char *argv[] = { NULL, NULL, NULL }; /* TODO : handle translations when we generate them */ argv[0] = (char *)"hh"; argv[1] = url; g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, error); return TRUE; #endif } static gboolean amide_gnome_help_display_uri_with_env (const char *help_uri, char **envp, GError **error) { GError *real_error; gboolean retval; real_error = NULL; retval = amide_gnome_url_show_with_env (help_uri, envp, &real_error); if (real_error != NULL) g_propagate_error (error, real_error); return retval; } static char * locate_help_file (const char *path, const char *doc_name) { int i, j; char *exts[] = { "", ".xml", ".docbook", ".sgml", ".html", NULL }; const char * const * lang_list = g_get_language_names (); for (j = 0;lang_list[j] != NULL; j++) { const char *lang = lang_list[j]; /* This has to be a valid language AND a language with * no encoding postfix. The language will come up without * encoding next */ if (lang == NULL || strchr (lang, '.') != NULL) continue; for (i = 0; exts[i] != NULL; i++) { char *name; char *full; name = g_strconcat (doc_name, exts[i], NULL); full = g_build_filename (path, lang, name, NULL); g_free (name); if (g_file_test (full, G_FILE_TEST_EXISTS)) return full; g_free (full); } } return NULL; } /* returns an array of strings (strings can be potentially null) - array and strings need to be free'd */ static gchar ** amide_gnome_program_locate_help_file (const gchar *file_name, gboolean only_if_exists) { gchar *buf; gchar ** retvals; gchar ** dirs; const gchar * const * global_dirs; gint i; gint j; gint count=0; gint slots; g_return_val_if_fail (file_name != NULL, NULL); global_dirs = g_get_system_data_dirs(); while (global_dirs[count] != NULL) count++; /* count */ /* allocate the array of strings - extra spot for AMIDE_DATADIR, plus an extra spot if on win32, plus one at end for NULL termination */ #if defined (G_PLATFORM_WIN32) slots = count+3; #else slots = count+2; #endif dirs = g_try_new0(gchar *,slots); retvals = g_try_new0(gchar *,slots); g_return_val_if_fail((dirs != NULL) && (retvals != NULL), NULL); j=0; /* copy over the directories */ dirs[j] = g_strdup(AMIDE_DATADIR); /* first entry */ j++; /* FIXME, below function is now deprecated #if defined (G_PLATFORM_WIN32) dirs[j] = g_win32_get_package_installation_subdirectory(NULL, NULL,"share"); j++; #endif */ i=0; while (global_dirs[i] != NULL) { /* rest of the entries */ dirs[j] = g_strdup(global_dirs[i]); i++; j++; } /* Potentially add an absolute path */ if (g_path_is_absolute (file_name)) if (!only_if_exists || g_file_test (file_name, G_FILE_TEST_EXISTS)) { retvals[0] = g_strdup(file_name); return retvals; /* we're already done */ } /* use the prefix */ if (AMIDE_DATADIR == NULL) { g_warning (G_STRLOC ": Directory properties not set correctly. " "Cannot locate application specific files."); return retvals; } i=0; j=0; while (dirs[i] != NULL) { buf = g_strdup_printf ("%s%s%s%s%s%s%s", dirs[i], G_DIR_SEPARATOR_S,"gnome",G_DIR_SEPARATOR_S, "help", G_DIR_SEPARATOR_S,file_name); if (!only_if_exists || g_file_test (buf, G_FILE_TEST_EXISTS)) { retvals[j] = buf; j++; } else g_free(buf); i++; } i=0; while (dirs[i] != NULL) { g_free(dirs[i]); i++; } g_free(dirs); return retvals; } typedef enum { AMIDE_GNOME_HELP_ERROR_INTERNAL, AMIDE_GNOME_HELP_ERROR_NOT_FOUND } AmideGnomeHelpError; #define AMIDE_GNOME_HELP_ERROR (amide_gnome_help_error_quark ()) GQuark amide_gnome_help_error_quark (void) { static GQuark error_quark = 0; if (error_quark == 0) error_quark = g_quark_from_static_string ("amide-gnome-help-error-quark"); return error_quark; } gboolean amide_gnome_help_display (const char *file_name, const char *link_id, GError **error) { gchar ** help_paths; gchar *file=NULL; struct stat help_st; gchar *uri=NULL; gboolean retval; const char *doc_id = PACKAGE; gint i; gchar * temp_str=NULL; g_return_val_if_fail (file_name != NULL, FALSE); retval = FALSE; help_paths = amide_gnome_program_locate_help_file (doc_id,FALSE); if (help_paths == NULL) { g_set_error (error, AMIDE_GNOME_HELP_ERROR, AMIDE_GNOME_HELP_ERROR_INTERNAL, _("Unable to find the app or global HELP domain")); goto out; } /* Try to access the help paths, first the app-specific help path * and then falling back to the global help path if the first one fails. */ i=0; while ((help_paths[i] != NULL) && (file == NULL)) { if (g_stat (help_paths[i], &help_st) == 0) { if (!S_ISDIR (help_st.st_mode)) goto error; file = locate_help_file (help_paths[i], file_name); } i++; } if (file == NULL) goto error; /* Now that we have a file name, try to display it in the help browser */ if (link_id) uri = g_strconcat ("ghelp://", file, "?", link_id, NULL); else uri = g_strconcat ("ghelp://", file, NULL); retval = amide_gnome_help_display_uri_with_env (uri, NULL, error); goto out; error: i=0; while (help_paths[i] != NULL) { amitk_append_str(&temp_str, "%s;", help_paths[i]); i++; } g_set_error (error, AMIDE_GNOME_HELP_ERROR, AMIDE_GNOME_HELP_ERROR_NOT_FOUND, _("Unable to find the help files in any of the following directories, " " or these are not valid directories: %s " ": Please check your installation"), temp_str); g_free(temp_str); out: if (help_paths != NULL) { i=0; while (help_paths[i] != NULL) { g_free(help_paths[i]); i++; } g_free(help_paths); } if (file != NULL) g_free (file); if (uri != NULL) g_free (uri); return retval; } amide-1.0.5/src/ui_series.h0000644000175000017500000000271112270274465015405 0ustar loeningloening/* ui_series.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __UI_SERIES_H__ #define __UI_SERIES_H__ /* header files that are always needed with this file */ #include #include "amitk_study.h" #define UI_SERIES_L_MARGIN 2.0 #define UI_SERIES_R_MARGIN UI_SERIES_L_MARGIN #define UI_SERIES_TOP_MARGIN 2.0 #define UI_SERIES_BOTTOM_MARGIN 15.0 /* external functions */ void ui_series_create(AmitkStudy * study, AmitkObject * active_object, GList * selected_objects, AmitkPreferences * preferences); GtkWidget * ui_series_init_dialog_create(AmitkStudy * study, GtkWindow * parent); #endif /* UI_SERIES_H */ amide-1.0.5/src/dcmtk_interface.cc0000664000175000017500000030165312270274750016704 0ustar loeningloening/* dcmtk_interface.cc * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2005-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #ifdef AMIDE_LIBDCMDATA_SUPPORT #ifdef HAVE_STRPTIME #define __USE_XOPEN_EXTENDED #endif #ifdef OLD_WIN32_HACKS #include #endif #include "dcmtk_interface.h" #include #include #include "amitk_data_set_DOUBLE_0D_SCALING.h" #include /* make sure we get g_mkdir on mingw32 */ /* dcmtk redefines a lot of things that they shouldn't... */ #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING #undef PACKAGE_TARNAME #undef PACKAGE_VERSION #define HAVE_CONFIG_H /* the autoconf compiled version of DCMTK has a config header file */ #include /* for class DicomDirInterface */ #include const gchar * dcmtk_version = OFFIS_DCMTK_VERSION; /* based on dcmftest.cc - part of dcmtk */ gboolean dcmtk_test_dicom(const gchar * filename) { FILE * file; gchar signature[4]; gboolean is_dicom; g_return_val_if_fail(filename != NULL, FALSE); if ((file = fopen(filename, "rb")) == NULL) return FALSE; if ((fseek(file, DCM_PreambleLen, SEEK_SET) < 0) || (fread(signature, 1, DCM_MagicLen, file) != DCM_MagicLen)) { is_dicom = FALSE; } else if (strncmp(signature, DCM_Magic, DCM_MagicLen) != 0) { is_dicom = FALSE; } else { is_dicom = TRUE; } fclose(file); return is_dicom; } static AmitkDataSet * read_dicom_file(const gchar * filename, gchar ** pstudyname, AmitkPreferences * preferences, gint *pnum_frames, gint *pnum_gates, gint *pnum_slices, AmitkUpdateFunc update_func, gpointer update_data, gchar **perror_buf) { DcmFileFormat dcm_format; // DcmMetaInfo * dcm_metainfo; DcmDataset * dcm_dataset; OFCondition result; Uint16 return_uint16=0; Sint32 return_sint32=0; Sint16 return_sint16=0; Float64 return_float64=0.0; Uint16 bits_allocated; Uint16 pixel_representation; const char * return_str=NULL; const char * scan_date=NULL; const char * scan_time=NULL; gchar * temp_str; gboolean valid; AmitkPoint voxel_size = one_point; AmitkDataSet * ds=NULL; AmitkModality modality; AmitkVoxel dim; AmitkVoxel i; AmitkFormat format; gboolean continue_work=TRUE; gboolean found_value; const void * buffer=NULL; void * ds_pointer; /* long unsigned num_bytes; */ gint format_size; AmitkPoint new_offset; AmitkAxes new_axes; AmitkPoint direction; amide_time_t acquisition_start_time=-1.0; amide_time_t dose_time=-1.0; amide_time_t decay_time=-1.0; gdouble decay_value; gdouble half_life=-1.0; gint hours, minutes, seconds; struct tm time_structure; /* note - dcmtk always uses POSIX locale - look to setlocale stuff in libmdc_interface.c if this ever comes up*/ result = dcm_format.loadFile(filename); if (result.bad()) { g_warning("could not read DICOM file %s, dcmtk returned %s",filename, result.text()); goto error; } // dcm_metainfo = dcm_format.getMetaInfo(); // if (dcm_metainfo == NULL) { // g_warning("could not find metainfo in DICOM file %s\n", filename); // } dcm_dataset = dcm_format.getDataset(); // dcm_dataset = &(dcm_dir.getDataset()); if (dcm_dataset == NULL) { g_warning(_("could not find dataset in DICOM file %s\n"), filename); goto error; } modality = AMITK_MODALITY_OTHER; if (dcm_dataset->findAndGetString(DCM_Modality, return_str).good()) { if (return_str != NULL) { /* first, process modalities we know we don't read */ if ((g_ascii_strcasecmp(return_str, "PR") == 0)) { amitk_append_str_with_newline(perror_buf, _("Modality %s is not understood. Ignoring File %s"), return_str, filename); goto error; } /* now to modalities we think we understand */ if ((g_ascii_strcasecmp(return_str, "CR") == 0) || (g_ascii_strcasecmp(return_str, "CT") == 0) || (g_ascii_strcasecmp(return_str, "DF") == 0) || (g_ascii_strcasecmp(return_str, "DS") == 0) || (g_ascii_strcasecmp(return_str, "DX") == 0) || (g_ascii_strcasecmp(return_str, "MG") == 0) || (g_ascii_strcasecmp(return_str, "PX") == 0) || (g_ascii_strcasecmp(return_str, "RF") == 0) || (g_ascii_strcasecmp(return_str, "RG") == 0) || (g_ascii_strcasecmp(return_str, "XA") == 0) || (g_ascii_strcasecmp(return_str, "XA") == 0)) modality = AMITK_MODALITY_CT; else if ((g_ascii_strcasecmp(return_str, "MA") == 0) || (g_ascii_strcasecmp(return_str, "MR") == 0) || (g_ascii_strcasecmp(return_str, "MS") == 0)) modality = AMITK_MODALITY_MRI; else if ((g_ascii_strcasecmp(return_str, "ST") == 0) || (g_ascii_strcasecmp(return_str, "NM") == 0)) modality = AMITK_MODALITY_SPECT; else if ((g_ascii_strcasecmp(return_str, "PT") == 0)) modality = AMITK_MODALITY_PET; } } /* get basic data */ if (dcm_dataset->findAndGetUint16(DCM_Columns, return_uint16).bad()) { g_warning(_("could not find # of columns - Failed to load file %s\n"), filename); goto error; } dim.x = return_uint16; if (dcm_dataset->findAndGetUint16(DCM_Rows, return_uint16).bad()) { g_warning(_("could not find # of rows - Failed to load file %s\n"), filename); goto error; } dim.y = return_uint16; /* number of slices */ /* note, number of "Frames" is the number of frames of data within the single DICOM file that do not have repeated header information, it does not refer necessarily to the number of time frames as is the convention for nuclear medicine. The DICOM tag NumberOfSlices is the number of slices in the study, not the number in the particular DICOM file, so it's not what we want to be using. */ if (dcm_dataset->findAndGetString(DCM_NumberOfFrames, return_str, OFTrue).bad()) { /* note, I've never actually seen a DICOM file that uses the DCM_Planes tag, it's now retired */ if (dcm_dataset->findAndGetUint16(DCM_RETIRED_Planes, return_uint16).bad()) dim.z = 1; else dim.z = return_uint16; } else { if (return_str != NULL) { if (sscanf(return_str, "%d", &(return_sint32)) != 1) g_warning("could not process NumberOfFrames - Failed to load file %s\n", filename); dim.z = return_sint32; if (dim.z < 1) g_warning("in correct NumberOf Frames (%d) - Failed to load file %s\n", dim.z, filename); } } dim.t = 1; /* no support for multiple time frame of data in a single file */ dim.g = 1; /* no support for multiple gates in a single file */ /* TimeSlices can also indicate # of bed positions, so only use for number of frames if this is explicitly a DYNAMIC data set */ if (dcm_dataset->findAndGetString(DCM_SeriesType, return_str, OFTrue).good()) if (return_str != NULL) if (strstr(return_str, "DYNAMIC") != NULL) if (dcm_dataset->findAndGetUint16(DCM_NumberOfTimeSlices, return_uint16).good()) *pnum_frames = return_uint16; if (dcm_dataset->findAndGetString(DCM_SeriesType, return_str, OFTrue).good()) if (return_str != NULL) if (strstr(return_str, "GATED\\IMAGE") != NULL) if (dcm_dataset->findAndGetUint16(DCM_NumberOfTimeSlots, return_uint16).good()) *pnum_gates = return_uint16; /* some files use NumberOfTemporalPositions */ if (*pnum_gates == 1) if (dcm_dataset->findAndGetSint32(DCM_NumberOfTemporalPositions, return_sint32).good()) if (return_sint32 > 0) *pnum_gates = return_sint32; /* record how many slices in each volume. Used if there is an inconsistent between the number of gates and total number of images */ /* 0x0021,0x104f corresponds to LocationsInAcquisition */ if (dcm_dataset->findAndGetSint16(DcmTagKey(0x0021, 0x104f), return_sint16).good()) if (return_sint16 > 0) *pnum_slices = return_sint16; if (dcm_dataset->findAndGetUint16(DCM_BitsAllocated, return_uint16).bad()) { g_warning(_("could not find # of bits allocated - Failed to load file %s\n"), filename); goto error; } bits_allocated = return_uint16; if (dcm_dataset->findAndGetUint16(DCM_PixelRepresentation, return_uint16).bad()) { g_warning(_("could not find pixel representation - Failed to load file %s\n"), filename); goto error; } pixel_representation = return_uint16; switch(bits_allocated) { case 8: if (pixel_representation) format = AMITK_FORMAT_SBYTE; else format = AMITK_FORMAT_UBYTE; break; case 16: if (pixel_representation) format = AMITK_FORMAT_SSHORT; else format = AMITK_FORMAT_USHORT; break; case 32: /* DICOM doesn't actually support anything but 8 and 16bit */ if (pixel_representation) format = AMITK_FORMAT_SINT; else format = AMITK_FORMAT_UINT; break; default: g_warning(_("unsupported # of bits allocated (%d) - Failed to load file %s\n"), bits_allocated, filename); goto error; } /* malloc data set */ ds = amitk_data_set_new_with_data(preferences, modality, format, dim, AMITK_SCALING_TYPE_0D_WITH_INTERCEPT); if (ds == NULL) { g_warning(_("Couldn't allocate space for the data set structure to hold DCMTK data - Failed to load file %s"), filename); goto error; } /* get the series number */ if (dcm_dataset->findAndGetSint32(DCM_SeriesNumber, return_sint32).good()) amitk_data_set_set_series_number(ds, return_sint32); /* get the dicom image type, we don't do anything with this, but we store it in case we're going to export this data set as DICOM data */ if (dcm_dataset->findAndGetString(DCM_ImageType, return_str).good()) amitk_data_set_set_dicom_image_type(ds, return_str); /* function can handle NULL strings */ /* get the voxel size */ if (dcm_dataset->findAndGetFloat64(DCM_PixelSpacing, return_float64,0).good()) { voxel_size.y = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_PixelSpacing, return_float64,1).good()) voxel_size.x = return_float64; else { voxel_size.x = voxel_size.y; } } else { amitk_append_str_with_newline(perror_buf, _("Could not find the pixel size, setting to 1 mm for File %s"), filename); } /* try to figure out the correct z thickness */ voxel_size.z = -1; if (dcm_dataset->findAndGetFloat64(DCM_SpacingBetweenSlices, return_float64).good()) voxel_size.z = return_float64; if (voxel_size.z <= 0.0) { if (dcm_dataset->findAndGetFloat64(DCM_SliceThickness, return_float64).good()) { voxel_size.z = return_float64; } else { amitk_append_str_with_newline(perror_buf, _("Could not find the slice thickness, setting to 1 mm for File %s"), filename); voxel_size.z = 1; } } /* store this number, occasionally used in sorting */ if (dcm_dataset->findAndGetSint32(DCM_InstanceNumber, return_sint32).good()) ds->instance_number = return_sint32; /* DICOM coordinates are LPH+, meaning that x increases toward patient left, y increases towards patient posterior, and z increases toward patient head. AMIDE is LAF+ */ /* ImageOrientationPatient contains a vector along the row direction, as well as the column direction, note though that the column direction in DICOM is in the wrong direction - it's from top to bottom, the z axis is off as well */ new_axes[AMITK_AXIS_X] = base_axes[AMITK_AXIS_X]; new_axes[AMITK_AXIS_Y] = base_axes[AMITK_AXIS_Y]; new_axes[AMITK_AXIS_Z] = base_axes[AMITK_AXIS_Z]; if (dcm_dataset->findAndGetFloat64(DCM_ImageOrientationPatient, return_float64, 0).good()) { new_axes[AMITK_AXIS_X].x = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_ImageOrientationPatient, return_float64, 1).good()) { new_axes[AMITK_AXIS_X].y = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_ImageOrientationPatient, return_float64, 2).good()) { new_axes[AMITK_AXIS_X].z = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_ImageOrientationPatient, return_float64, 3).good()) { new_axes[AMITK_AXIS_Y].x = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_ImageOrientationPatient, return_float64, 4).good()) { new_axes[AMITK_AXIS_Y].y = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_ImageOrientationPatient, return_float64, 5).good()) { new_axes[AMITK_AXIS_Y].z = return_float64; } } } } } } new_axes[AMITK_AXIS_X].y *= -1.0; new_axes[AMITK_AXIS_X].z *= -1.0; new_axes[AMITK_AXIS_Y].y *= -1.0; new_axes[AMITK_AXIS_Y].z *= -1.0; POINT_CROSS_PRODUCT(new_axes[AMITK_AXIS_X], new_axes[AMITK_AXIS_Y], new_axes[AMITK_AXIS_Z]); amitk_space_set_axes(AMITK_SPACE(ds), new_axes, zero_point); /* note, ImagePositionPatient is suppose to be defined as the center of the upper left hand voxel in Patient space, not necessarily with respect to the Gantry. At least for GE scanners, the offset is on corner of this voxel */ found_value=FALSE; if (dcm_dataset->findAndGetFloat64(DCM_ImagePositionPatient, return_float64, 0).good()) { new_offset.x = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_ImagePositionPatient, return_float64, 1).good()) { new_offset.y = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_ImagePositionPatient, return_float64, 2).good()) { new_offset.z = return_float64; /* not doing the half voxel correction... values seem more correct without, at least for GE. If this was not the case, the code would be: new_offset.x -= 0.5*voxel_size.x; new_offset.y -= 0.5*voxel_size.y; new_offset.z -= 0.5*voxel_size.z; */ /* Offset seems to be in base coordinate space, otherwise the code would be amitk_space_set_offset(AMITK_SPACE(ds), amitk_space_s2b(AMITK_SPACE(ds), new_offset)); */ new_offset.y = -1.0*new_offset.y; /* DICOM specifies y axis in wrong direction */ new_offset.z = -1.0*new_offset.z; /* DICOM specifies z axis in wrong direction */ amitk_space_set_offset(AMITK_SPACE(ds), new_offset); found_value=TRUE; } } } if (!found_value) { /* see if we can get it otherwise */ if (dcm_dataset->findAndGetFloat64(DCM_SliceLocation, return_float64).good()) { /* if no ImagePositionPatient, try using SliceLocation */ new_offset.x = new_offset.y = 0.0; //this looks wrong 2007.11.21 - doing what's done in the DCM_ImagePositionPatient case // new_offset.z = -1.0*(return_float64+voxel_size.z*dim.z); /* DICOM specifies z axis in wrong direction */ new_offset.z = -1.0*return_float64; /* DICOM specifies z axis in wrong direction */ amitk_space_set_offset(AMITK_SPACE(ds), new_offset); } } amitk_data_set_set_voxel_size(ds, voxel_size); amitk_data_set_calc_far_corner(ds); if (dcm_dataset->findAndGetString(DCM_PatientID, return_str, OFTrue).good()) amitk_data_set_set_subject_id(ds, return_str); if (dcm_dataset->findAndGetFloat64(DCM_PatientWeight, return_float64).good()) { amitk_data_set_set_subject_weight(ds, return_float64); amitk_data_set_set_displayed_weight_unit(ds, AMITK_WEIGHT_UNIT_KILOGRAM); } /* any MRI parameters we may need */ if (dcm_dataset->findAndGetFloat64(DCM_InversionTime, return_float64).good()) amitk_data_set_set_inversion_time(ds, return_float64); if (dcm_dataset->findAndGetFloat64(DCM_EchoTime, return_float64).good()) amitk_data_set_set_echo_time(ds, return_float64); if (dcm_dataset->findAndGetFloat64(DCM_DiffusionBValue, return_float64, 0, OFTrue).good()) { amitk_data_set_set_diffusion_b_value(ds, return_float64); } else if (dcm_dataset->findAndGetSint32(DcmTagKey(0x0043, 0x1039), return_sint32, 0, OFTrue).good()) { /* GE */ amitk_data_set_set_diffusion_b_value(ds, return_sint32); } /* diffusion directions */ direction = zero_point; if (dcm_dataset->findAndGetFloat64(DCM_DiffusionGradientOrientation, return_float64, 0, OFTrue).good()) direction.x = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_DiffusionGradientOrientation, return_float64, 1, OFTrue).good()) direction.y = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_DiffusionGradientOrientation, return_float64, 2, OFTrue).good()) direction.z = return_float64; /* following works for GE.... */ if (POINT_EQUAL(direction, zero_point)) { if (dcm_dataset->findAndGetFloat64(DcmTagKey(0x0019, 0x10bb), return_float64, 0, OFTrue).good()) direction.x = return_float64; if (dcm_dataset->findAndGetFloat64(DcmTagKey(0x0019, 0x10bc), return_float64, 0, OFTrue).good()) direction.y = return_float64; if (dcm_dataset->findAndGetFloat64(DcmTagKey(0x0019, 0x10bd), return_float64, 0, OFTrue).good()) direction.z = return_float64; } amitk_data_set_set_diffusion_direction(ds, direction); /* store the gate time if possible, DICOM stores this as milliseconds */ if (dcm_dataset->findAndGetFloat64(DCM_TriggerTime, return_float64).good()) amitk_data_set_set_gate_time(ds, 0, return_float64/1000.0); else amitk_data_set_set_gate_time(ds, 0, 0.0); /* and get the Temporal position, DICOM uses this with gated MR images */ if (dcm_dataset->findAndGetSint32(DCM_TemporalPositionIdentifier, return_sint32).good()) ds->gate_num=return_sint32; else ds->gate_num=-1; /* find the most relevant start time */ return_str = NULL; if (!dcm_dataset->findAndGetString(DCM_SeriesTime, return_str, OFTrue).good()) if (!dcm_dataset->findAndGetString(DCM_AcquisitionTime, return_str, OFTrue).good()) dcm_dataset->findAndGetString(DCM_StudyTime, return_str, OFTrue); if (return_str != NULL) { if (sscanf(return_str, "%2d%2d%2d\n", &hours, &minutes, &seconds)==3) { acquisition_start_time = ((hours*60)+minutes)*60+seconds; } } if (dcm_dataset->findAndGetString(DCM_RadiopharmaceuticalStartTime, return_str, OFTrue).good()) if (return_str != NULL) if (sscanf(return_str, "%2d%2d%2d\n", &hours, &minutes, &seconds)==3) dose_time = ((hours*60)+minutes)*60+seconds; if ((dose_time >= 0.0) && (acquisition_start_time >= 0.0)) { /* correct for if the dose was measured the previous day... note, DICOM can't seem to handle dose measured more than 24hours in the past */ if (acquisition_start_time > dose_time) decay_time = acquisition_start_time-dose_time; else decay_time = acquisition_start_time+24*60*60-dose_time; } if (dcm_dataset->findAndGetFloat64(DCM_RadionuclideHalfLife, return_float64, 0, OFTrue).good()) half_life = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_RadionuclideTotalDose, return_float64, 0, OFTrue).good()) { /* note, for NM data sets, total dose is in MBq. For PET data sets total dose is suppose to be in Bq. However, it seems that the value is sometimes in the wrong units, at least for GE data. */ decay_value = return_float64; if (decay_value > 10000.0) decay_value /= 1E6; /* if more than 10000, assume its in Bq, and convert */ if ((decay_time > 0.0) && (half_life > 0.0)) decay_value *= pow(0.5, decay_time/half_life); amitk_data_set_set_injected_dose(ds, decay_value); amitk_data_set_set_displayed_dose_unit(ds, AMITK_DOSE_UNIT_MEGABECQUEREL); } if (dcm_dataset->findAndGetString(DCM_Units, return_str, OFTrue).good()) { if (return_str != NULL) { /* BQML - voxel values are in Bq per ml */ if (strcmp(return_str, "BQML")==0) { amitk_data_set_set_cylinder_factor(ds,1.0/1.0E6); amitk_data_set_set_displayed_cylinder_unit(ds, AMITK_CYLINDER_UNIT_MEGABECQUEREL_PER_CC_IMAGE_UNIT); } } } if (dcm_dataset->findAndGetString(DCM_StudyDescription, return_str, OFTrue).good()) { amitk_object_set_name(AMITK_OBJECT(ds), return_str); if (pstudyname != NULL) *pstudyname = g_strdup(return_str); } if (dcm_dataset->findAndGetString(DCM_SeriesDescription, return_str, OFTrue).good()) { /* note, this overwrites the name set immediately above based on StudyDescription */ if (return_str != NULL) amitk_object_set_name(AMITK_OBJECT(ds), return_str); } if (dcm_dataset->findAndGetString(DCM_PatientName, return_str, OFTrue).good()) { if (AMITK_OBJECT_NAME(ds) == NULL) amitk_object_set_name(AMITK_OBJECT(ds), return_str); amitk_data_set_set_subject_name(ds, return_str); } if (dcm_dataset->findAndGetString(DCM_SeriesDate, return_str, OFTrue).good()) scan_date = return_str; else if (dcm_dataset->findAndGetString(DCM_AcquisitionDate, return_str, OFTrue).good()) scan_date = return_str; else if (dcm_dataset->findAndGetString(DCM_StudyDate, return_str, OFTrue).good()) scan_date = return_str; if (dcm_dataset->findAndGetString(DCM_SeriesTime, return_str, OFTrue).good()) scan_time = return_str; else if (dcm_dataset->findAndGetString(DCM_AcquisitionTime, return_str, OFTrue).good()) scan_time = return_str; else if (dcm_dataset->findAndGetString(DCM_StudyTime, return_str, OFTrue).good()) scan_time = return_str; valid=FALSE; if (scan_date != NULL) { if (3 == sscanf(scan_date, "%4d%2d%2d", &(time_structure.tm_year), &(time_structure.tm_mon), &(time_structure.tm_mday))) { time_structure.tm_year -= 1900; /* years start from 1900 */ if (time_structure.tm_mon > 0) time_structure.tm_mon -= 1; /* now from 0-11 */ if (scan_time != NULL) if (3 == sscanf(scan_time, "%2d%2d%2d", &(time_structure.tm_hour), &(time_structure.tm_min), &(time_structure.tm_sec))) valid = TRUE; if (!valid) { time_structure.tm_hour = 0; time_structure.tm_min = 0; time_structure.tm_sec = 0; } } time_structure.tm_isdst = -1; /* "-1" is suppose to let the system figure it out */ if (mktime(&time_structure) != -1) { amitk_data_set_set_scan_date(ds, asctime(&time_structure)); valid = TRUE; } else { valid = FALSE; } } if (!valid) { if ((scan_date != NULL) && (scan_time != NULL)) { temp_str = g_strdup_printf("%s %s\n",scan_date,scan_time); amitk_data_set_set_scan_date(ds,temp_str); g_free(temp_str); } else if (scan_date != NULL) { amitk_data_set_set_scan_date(ds,scan_date); } else if (scan_time != NULL) { amitk_data_set_set_scan_date(ds,scan_time); } } if (dcm_dataset->findAndGetString(DCM_PatientBirthDate, return_str, OFTrue).good()) amitk_data_set_set_subject_dob(ds, return_str); if (dcm_dataset->findAndGetString(DCM_PatientSex, return_str, OFTrue).good()) if (return_str != NULL) { if (return_str[0] == 'M') amitk_data_set_set_subject_sex(ds, AMITK_SUBJECT_SEX_MALE); else if (return_str[0] == 'F') amitk_data_set_set_subject_sex(ds, AMITK_SUBJECT_SEX_FEMALE); /* default is unknown */ } /* because of how the dicom coordinates are setup, after reading in the patient slices, they should all be oriented as SUPINE_HEADFIRST in AMIDE */ /* 20071121 - renabled following code, not sure if above statement is true */ // amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_SUPINE_HEADFIRST); if (dcm_dataset->findAndGetString(DCM_PatientPosition, return_str, OFTrue).good()) { if (return_str != NULL) { if (g_ascii_strcasecmp(return_str, "HFS")==0) amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_SUPINE_HEADFIRST); else if (g_ascii_strcasecmp(return_str, "FFS")==0) amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_SUPINE_FEETFIRST); else if (g_ascii_strcasecmp(return_str, "HFP")==0) amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_PRONE_HEADFIRST); else if (g_ascii_strcasecmp(return_str, "FFP")==0) amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_PRONE_FEETFIRST); else if (g_ascii_strcasecmp(return_str, "HFDR")==0) amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_HEADFIRST); else if (g_ascii_strcasecmp(return_str, "FFDR")==0) amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_FEETFIRST); else if (g_ascii_strcasecmp(return_str, "HFDL")==0) amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_HEADFIRST); else if (g_ascii_strcasecmp(return_str, "FFDL")==0) amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_FEETFIRST); } } format_size = amitk_format_sizes[format]; /* num_bytes = amitk_raw_format_calc_num_bytes(dim, amitk_format_to_raw_format(format)); */ /* a "GetSint16Array" function is also provided, but for some reason I get an error when using it. I'll just use GetUint16Array even for signed stuff */ switch(format) { case AMITK_FORMAT_SBYTE: case AMITK_FORMAT_UBYTE: { const Uint8 * temp_buffer; result = dcm_dataset->findAndGetUint8Array(DCM_PixelData, temp_buffer); buffer = (void *) temp_buffer; break; } case AMITK_FORMAT_SSHORT: case AMITK_FORMAT_USHORT: { const Uint16 * temp_buffer; result = dcm_dataset->findAndGetUint16Array(DCM_PixelData, temp_buffer); buffer = (void *) temp_buffer; break; } case AMITK_FORMAT_SINT: case AMITK_FORMAT_UINT: { const Uint32 * temp_buffer; result = dcm_dataset->findAndGetUint32Array(DCM_PixelData, temp_buffer); // result = dcm_dataset->findAndGetUint16Array(DCM_PixelData, temp_buffer); buffer = (void *) temp_buffer; break; } default: g_warning("unsupported data format in %s at %d\n", __FILE__, __LINE__); goto error; break; } if (result.bad()) { g_warning(_("error reading in pixel data - DCMTK error: %s - Failed to read file %s"),result.text(), filename); goto error; } i = zero_voxel; /* store the scaling factor... if there is one */ if (dcm_dataset->findAndGetFloat64(DCM_RescaleSlope, return_float64,0).good()) *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_factor, i) = return_float64; /* same for the offset */ if (dcm_dataset->findAndGetFloat64(DCM_RescaleIntercept, return_float64).good()) *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_intercept, i) = return_float64; if (dcm_dataset->findAndGetFloat64(DCM_FrameReferenceTime, return_float64).good()) amitk_data_set_set_scan_start(ds,return_float64/1000.0); /* and load in the data - plane by plane */ for (i.t = 0; (i.t < dim.t) && (continue_work); i.t++) { /* note ... doesn't seem to be a way to encode different frame durations within one dicom file */ if (dcm_dataset->findAndGetSint32(DCM_ActualFrameDuration, return_sint32).good()) { amitk_data_set_set_frame_duration(ds,i.t, ((gdouble) return_sint32)/1000.0); /* make sure it's not zero */ if (amitk_data_set_get_frame_duration(ds,i.t) < EPSILON) amitk_data_set_set_frame_duration(ds,i.t, EPSILON); } for (i.g = 0; (i.g < ds->raw_data->dim.g) && (continue_work); i.g++) { /* note, we've already flipped the coordinate axis, so reading in the data straight is correct */ ds_pointer = amitk_raw_data_get_pointer(AMITK_DATA_SET_RAW_DATA(ds), i); memcpy(ds_pointer, (guchar *) buffer, format_size*ds->raw_data->dim.x*ds->raw_data->dim.y*ds->raw_data->dim.z); } } amitk_data_set_set_scale_factor(ds, 1.0); /* set the external scaling factor */ amitk_data_set_calc_far_corner(ds); /* set the far corner of the volume */ amitk_data_set_calc_min_max(ds, update_func, update_data); goto function_end; error: if (ds != NULL) { ds = AMITK_DATA_SET(amitk_object_unref(ds)); ds = NULL; } function_end: return ds; } void transfer_slice(AmitkDataSet * ds, AmitkDataSet * slice_ds, AmitkVoxel i) { size_t num_bytes_to_transfer; void * ds_pointer; void * slice_pointer; num_bytes_to_transfer = amitk_raw_format_calc_num_bytes(AMITK_DATA_SET_DIM(slice_ds), AMITK_DATA_SET_FORMAT(slice_ds)); ds_pointer = amitk_raw_data_get_pointer(AMITK_DATA_SET_RAW_DATA(ds), i); g_return_if_fail(ds_pointer != NULL); slice_pointer = amitk_raw_data_get_pointer(AMITK_DATA_SET_RAW_DATA(slice_ds), zero_voxel); g_return_if_fail(slice_pointer != NULL); memcpy(ds_pointer, slice_pointer, num_bytes_to_transfer); /* copy the scaling factors */ *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_factor, i) = amitk_data_set_get_internal_scaling_factor(slice_ds, zero_voxel); *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_intercept, i) = amitk_data_set_get_scaling_intercept(slice_ds, zero_voxel); return; } /* sort by location */ static gint sort_slices_func(gconstpointer a, gconstpointer b) { AmitkDataSet * slice_a = (AmitkDataSet *) a; AmitkDataSet * slice_b = (AmitkDataSet *) b; AmitkPoint offset_b; g_return_val_if_fail(AMITK_IS_DATA_SET(slice_a), -1); g_return_val_if_fail(AMITK_IS_DATA_SET(slice_b), 1); offset_b = amitk_space_b2s(AMITK_SPACE(slice_a), AMITK_SPACE_OFFSET(slice_b)); if (offset_b.z > 0.0) return -1; else if (offset_b.z < 0.0) return 1; else return 0; } /* sort by time, then by location */ static gint sort_slices_func_with_time(gconstpointer a, gconstpointer b) { AmitkDataSet * slice_a = (AmitkDataSet *) a; AmitkDataSet * slice_b = (AmitkDataSet *) b; amide_time_t scan_start_a, scan_start_b; g_return_val_if_fail(AMITK_IS_DATA_SET(slice_a), -1); g_return_val_if_fail(AMITK_IS_DATA_SET(slice_b), 1); /* first sort by time */ scan_start_a = AMITK_DATA_SET_SCAN_START(slice_a); scan_start_b = AMITK_DATA_SET_SCAN_START(slice_b); if (!REAL_EQUAL(scan_start_a, scan_start_b)) { if (scan_start_a < scan_start_b) return -1; else return 1; } /* then sort by location */ return sort_slices_func(a,b); } /* sort by gate, then by location */ static gint sort_slices_func_with_gate(gconstpointer a, gconstpointer b) { AmitkDataSet * slice_a = (AmitkDataSet *) a; AmitkDataSet * slice_b = (AmitkDataSet *) b; amide_time_t gate_time_a, gate_time_b; g_return_val_if_fail(AMITK_IS_DATA_SET(slice_a), -1); g_return_val_if_fail(AMITK_IS_DATA_SET(slice_b), 1); /* first sort by gate if we can. Note, we set gate_num to -1 if there's no entry for it in the DICOM file */ if ((slice_a->gate_num >= 0) && (slice_b->gate_num >=0)) { if (slice_a->gate_num < slice_b->gate_num) return -1; else if (slice_a->gate_num > slice_b->gate_num) return 1; } /* if we don't have gate_num entries, sort by gate time */ gate_time_a = amitk_data_set_get_gate_time(slice_a, 0); gate_time_b = amitk_data_set_get_gate_time(slice_b, 0); if (!REAL_EQUAL(gate_time_a, gate_time_b)) { if (gate_time_a < gate_time_b) return -1; else return 1; } /* then sort by location */ return sort_slices_func(a,b); } static GList * find_slices_that_match(GList ** pslices) { AmitkDataSet * initial_ds; AmitkDataSet * comparison_ds; GList * matching_slices=NULL; gboolean match; GList * current_slices; g_return_val_if_fail(*pslices != NULL, NULL); /* put the first slice into the matching set */ initial_ds = AMITK_DATA_SET(g_list_nth_data(*pslices, 0)); *pslices = g_list_remove(*pslices, initial_ds); matching_slices = g_list_append(matching_slices, initial_ds); current_slices = *pslices; /* go through the rest of the slices and find what matches */ while (current_slices != NULL) { comparison_ds = AMITK_DATA_SET(current_slices->data); /* check dimensions are equal */ match = (VOXEL_EQUAL(AMITK_DATA_SET_DIM(initial_ds), AMITK_DATA_SET_DIM(comparison_ds))); /* check voxel sizes are equal */ if (match) match = (POINT_EQUAL(AMITK_DATA_SET_VOXEL_SIZE(initial_ds), AMITK_DATA_SET_VOXEL_SIZE(comparison_ds))); /* check that the orientation of the slices are equal. Note, we use _close instead of _equal (CLOSE vs EPSILON) because there values are coming from character strings in the DICOM header, and may be a little imprecise. */ if (match) match = amitk_space_axes_close(AMITK_SPACE(initial_ds), AMITK_SPACE(comparison_ds)); /* check that the image type tags are the same. g_strcmp0 handles NULL pointers */ if (match) match = (g_strcmp0(AMITK_DATA_SET_DICOM_IMAGE_TYPE(initial_ds), AMITK_DATA_SET_DICOM_IMAGE_TYPE(comparison_ds)) == 0); /* if MRI, check inversion, echo times, and b-value are equal */ if (AMITK_DATA_SET_MODALITY(initial_ds) == AMITK_MODALITY_MRI) { if (match) if (!isnan (AMITK_DATA_SET_INVERSION_TIME(initial_ds)) && !isnan(AMITK_DATA_SET_INVERSION_TIME(comparison_ds))) match = REAL_EQUAL(AMITK_DATA_SET_INVERSION_TIME(initial_ds), AMITK_DATA_SET_INVERSION_TIME(comparison_ds)); if (match) if (!isnan (AMITK_DATA_SET_ECHO_TIME(initial_ds)) && !isnan(AMITK_DATA_SET_ECHO_TIME(comparison_ds))) match = REAL_EQUAL(AMITK_DATA_SET_ECHO_TIME(initial_ds), AMITK_DATA_SET_ECHO_TIME(comparison_ds)); if (match) if (!isnan (AMITK_DATA_SET_DIFFUSION_B_VALUE(initial_ds)) && !isnan(AMITK_DATA_SET_DIFFUSION_B_VALUE(comparison_ds))) { match = REAL_EQUAL(AMITK_DATA_SET_DIFFUSION_B_VALUE(initial_ds), AMITK_DATA_SET_DIFFUSION_B_VALUE(comparison_ds)); if (match) match = POINT_EQUAL(AMITK_DATA_SET_DIFFUSION_DIRECTION(initial_ds), AMITK_DATA_SET_DIFFUSION_DIRECTION(comparison_ds)); } } if (match) matching_slices = g_list_append(matching_slices, comparison_ds); current_slices = current_slices->next; } current_slices = matching_slices; while (current_slices != NULL) { *pslices = g_list_remove(*pslices, current_slices->data); current_slices = current_slices->next; } return matching_slices; } static GList * separate_duplicate_slices(GList * slices_to_combine, GList ** premaining_slices) { GList * current_slices; AmitkDataSet * previous_ds; AmitkDataSet * current_ds; AmitkDataSet * discard_ds; g_return_val_if_fail(slices_to_combine != NULL, NULL); g_return_val_if_fail(premaining_slices != NULL, NULL); current_slices = g_list_first(slices_to_combine); previous_ds = AMITK_DATA_SET(current_slices->data); /* get a list of the duplicates */ current_slices = current_slices->next; while (current_slices != NULL) { current_ds = AMITK_DATA_SET(current_slices->data); current_slices = current_slices->next; if (POINT_EQUAL(AMITK_SPACE_OFFSET(previous_ds), AMITK_SPACE_OFFSET(current_ds))) { if (current_ds->instance_number < previous_ds->instance_number) { discard_ds = previous_ds; previous_ds = current_ds; /* for next iteration */ } else { discard_ds = current_ds; /* previous_ds stays the same */ } *premaining_slices = g_list_append(*premaining_slices, discard_ds); slices_to_combine = g_list_remove(slices_to_combine, discard_ds); } else { previous_ds = current_ds; } } return slices_to_combine; } static AmitkDataSet * import_slices_as_dataset(GList * slices, gint num_frames, gint num_gates, gint num_slices, AmitkUpdateFunc update_func, gpointer update_data, gchar **perror_buf) { AmitkDataSet * ds=NULL; gint num_files; gint i_file; AmitkDataSet * slice_ds=NULL; AmitkVoxel dim, scaling_dim; div_t x; AmitkVoxel i; AmitkPoint offset, initial_offset, diff; gboolean screwed_up_timing; gboolean screwed_up_thickness; amide_real_t true_thickness=0.0; amide_real_t old_thickness=0.0; AmitkPoint voxel_size; gboolean figured_out_dimz=FALSE; g_return_val_if_fail(slices != NULL, NULL); screwed_up_timing=FALSE; screwed_up_thickness=FALSE; num_files = g_list_length(slices); /* special stuff for 1st slice */ slice_ds = (AmitkDataSet *) g_list_nth_data(slices,0); dim = AMITK_DATA_SET_DIM(slice_ds); if ((dim.z != 1) && (num_files != 1)) { g_warning("Don't know how to deal with multiple files containing multiple slices"); goto error; } if (dim.z == 1) dim.z = num_files; /* dealing with dynamic or gated data */ if ((num_frames > 1) || (num_gates > 1)) { if (num_frames > 1) x = div(dim.z, num_frames); else /* (num_gates > 1) */ x = div(dim.z, num_gates); if (x.rem == 0) { /* ideal case, things make sense */ if (num_frames > 1) dim.t = num_frames; else /* (num_gates > 1) */ dim.g = num_gates; dim.z = x.quot; figured_out_dimz = TRUE; } if ((!figured_out_dimz) && (num_slices > 1)) { /* inconsistency in our data set.... let's assume num_gates or num frames off, and see if we can use the num_slices parameter to recover */ x = div(dim.z, num_slices); if (x.rem == 0) { /* try to recover based on what the DICOM file thinks is the number of slices per frame */ amitk_append_str_with_newline(perror_buf, _("Cannot evenly divide the number of slices (%d) by the number of reported %s (%d) for data set %s - will try with %d %s"), dim.z, num_frames > 1 ? _("frames") : _("gates"), num_frames > 1 ? num_frames : num_gates, AMITK_OBJECT_NAME(slice_ds), x.quot, num_frames > 1 ? _("frames") : _("gates")); if (num_frames > 1) dim.t = x.quot; else /* (num_gates > 1) */ dim.g = x.quot; dim.z = num_slices; figured_out_dimz = TRUE; } } if (!figured_out_dimz) { /* still have inconsistency in our data set.... */ /* if we have a num_slices parameter, we'll end up using that */ if (num_slices > 1) x.quot = num_slices; amitk_append_str_with_newline(perror_buf, _("Cannot evenly divide the number of slices (%d) by the number of %s (%d) for data set %s - will load first %d slices"), dim.z, num_frames > 1 ? _("frames") : _("gates"), num_frames > 1 ? num_frames : num_gates, AMITK_OBJECT_NAME(slice_ds), (x.quot > 0) ? x.quot : dim.z); /* failure */ if (num_frames > 1) dim.t = num_frames = 1; else /* (num_gates > 1) */ dim.g = num_gates = 1; if (x.quot > 0) dim.z = x.quot; figured_out_dimz = TRUE; } } /* dynamic/gated data */ ds = AMITK_DATA_SET(amitk_object_copy(AMITK_OBJECT(slice_ds))); /* unref and remalloc what we need */ if (ds->raw_data != NULL) g_object_unref(ds->raw_data); ds->raw_data = amitk_raw_data_new_with_data(AMITK_DATA_SET_FORMAT(slice_ds), dim); if (ds->raw_data == NULL) { g_warning("Could not allocate memory for raw data with dimensions %d x %d x %d x %d x %d", dim.g, dim.t, dim.z, dim.y, dim.x); goto error; } if (ds->distribution != NULL) g_object_unref(ds->distribution); ds->distribution = NULL; /* if we're loading up multiple files, each file has a separate scale factor, so we'll use per slice (2D) scaling. If we're loading up a single file with multiple data frames in it, there's only one scaling factor, so per frame (3D) scaling */ if (num_files > 1) ds->scaling_type = AMITK_SCALING_TYPE_2D_WITH_INTERCEPT; else ds->scaling_type = AMITK_SCALING_TYPE_1D_WITH_INTERCEPT; scaling_dim=one_voxel; scaling_dim.z = (num_files > 1) ? dim.z : 1; scaling_dim.g = dim.g; scaling_dim.t = dim.t; if (ds->internal_scaling_factor != NULL) g_object_unref(ds->internal_scaling_factor); ds->internal_scaling_factor = amitk_raw_data_new_with_data(AMITK_FORMAT_DOUBLE, scaling_dim); if (ds->internal_scaling_intercept != NULL) g_object_unref(ds->internal_scaling_intercept); ds->internal_scaling_intercept = amitk_raw_data_new_with_data(AMITK_FORMAT_DOUBLE, scaling_dim); if (ds->current_scaling_factor != NULL) g_object_unref(ds->current_scaling_factor); ds->current_scaling_factor=NULL; if (ds->frame_max != NULL) g_free(ds->frame_max); ds->frame_max = amitk_data_set_get_frame_min_max_mem(ds); if (ds->frame_min != NULL) g_free(ds->frame_min); ds->frame_min = amitk_data_set_get_frame_min_max_mem(ds); if (ds->frame_duration != NULL) g_free(ds->frame_duration); if ((ds->frame_duration = amitk_data_set_get_frame_duration_mem(ds)) == NULL) { g_warning(_("couldn't allocate space for the frame duration info")); goto error; } if (ds->gate_time != NULL) g_free(ds->gate_time); if ((ds->gate_time = amitk_data_set_get_gate_time_mem(ds)) == NULL) { g_warning(_("couldn't allocate space for the gate time info")); goto error; } initial_offset = AMITK_SPACE_OFFSET(slice_ds); /* and process all the images */ for (i_file=0; i_file < num_files; i_file++) { slice_ds = (AmitkDataSet *) g_list_nth_data(slices,i_file); x = div(i_file, dim.z); i=zero_voxel; if (num_gates > 1) i.g = x.quot; else i.t = x.quot; i.z = x.rem; transfer_slice(ds, slice_ds, i); /* record frame/gate duration if needed */ if (i.z == 0) { amitk_data_set_set_frame_duration(ds, i.t, amitk_data_set_get_frame_duration(slice_ds, 0)); amitk_data_set_set_gate_time(ds, i.g, amitk_data_set_get_gate_time(slice_ds, 0)); } if (i_file != 0) { /* figure out which direction the slices are going */ if (i_file == 1) { offset = AMITK_SPACE_OFFSET(slice_ds); POINT_SUB(offset, initial_offset, diff); true_thickness = POINT_MAGNITUDE(diff); old_thickness = AMITK_DATA_SET_VOXEL_SIZE_Z(ds); if (true_thickness > EPSILON) /* correct for differences in thickness */ if (!REAL_EQUAL(true_thickness, old_thickness)) { voxel_size = AMITK_DATA_SET_VOXEL_SIZE(ds); voxel_size.z = true_thickness; amitk_data_set_set_voxel_size(ds, voxel_size); /* whether to bother complaining */ if (!REAL_CLOSE(true_thickness, old_thickness)) screwed_up_thickness = TRUE; } } // if (i_file != 0) { /* check if we've crossed a frame boundary */ // if (!REAL_EQUAL(last_scan_start, AMITK_DATA_SET_SCAN_START(slice_ds))) { // if (is_dynamic) { // num_frames++; // if (num_frames > 1) { // if (!REAL_EQUAL(AMITK_DATA_SET_SCAN_START(slice_ds)-last_scan_start, duration)) // screwed_up_timing=TRUE; // duration = amitk_data_set_get_frame_duration(slice_ds, 0); // g_array_append_val(durations, duration); // last_scan_start = AMITK_DATA_SET_SCAN_START(slice_ds); // } // } // } /* check if the curtains match the rug */ if ((i.z == 0) && (i.t > 0)) { if (!REAL_CLOSE(AMITK_DATA_SET_SCAN_START(slice_ds)-amitk_data_set_get_start_time(ds, i.t-1), amitk_data_set_get_frame_duration(ds, i.t-1))) screwed_up_timing=TRUE; } } // last_offset = AMITK_SPACE_OFFSET(slice_ds); } /* i_file loop */ if (screwed_up_timing) amitk_append_str_with_newline(perror_buf, _("Detected discontinous frames in data set %s - frame start times will be incorrect"), AMITK_OBJECT_NAME(ds)); if (screwed_up_thickness) amitk_append_str_with_newline(perror_buf, _("Slice thickness (%5.3f mm) not equal to slice spacing (%5.3f mm) in data set %s - will use slice spacing for thickness"), old_thickness, true_thickness, AMITK_OBJECT_NAME(ds)); /* detected a dynamic data set, massage the data appropriately */ // if (num_frames > 1) { // x = div(dim.z, num_frames); // if (x.rem != 0) { // g_warning(_("Cannot evenly divide the number of slices by the number of frames for data set %s - ignoring dynamic data"), AMITK_OBJECT_NAME(ds)); // } else { /* hack the data set sizes */ // ds->raw_data->dim.t = num_frames; // ds->raw_data->dim.z = x.quot; // // ds->internal_scaling_factor->dim.t = num_frames; // ds->internal_scaling_factor->dim.z = x.quot; // // ds->internal_scaling_intercept->dim.t = num_frames; // ds->internal_scaling_intercept->dim.z = x.quot; /* free the frame max/min arrays - will be realloc's by set_calc_min_max */ // g_free(ds->frame_max); // ds->frame_max=NULL; // g_free(ds->frame_min); // ds->frame_min=NULL; /* and set the frame durations */ // if (ds->frame_duration != NULL) // g_free(ds->frame_duration); // if ((ds->frame_duration = amitk_data_set_get_frame_duration_mem(ds)) == NULL) { // g_warning(_("couldn't allocate space for the frame duration info")); // amitk_object_unref(ds); // return NULL; // } // // for (j=0; j < AMITK_DATA_SET_NUM_FRAMES(ds); j++) // ds->frame_duration[j] = g_array_index(durations,amide_time_t, j); // } // } // g_array_free(durations, TRUE); /* correct for a datset where the z direction is reveresed */ // if (reversed_z) { // void * buffer; // amide_data_t temp_val; // buffer = g_try_malloc(num_bytes_per_slice); // if (buffer == NULL) { // g_warning("could not malloc temp buffer"); // goto error; // } // k = zero_voxel; // for (i.t = 0,k.t=0; i.t < AMITK_DATA_SET_DIM_T(ds); i.t++,k.t++) { // for (i.g = 0,k.g=0; i.g < AMITK_DATA_SET_DIM_G(ds); i.g++,k.g++) { // for (i.z = 0,k.z=AMITK_DATA_SET_DIM_Z(ds)-1; i.z < AMITK_DATA_SET_DIM_Z(ds); i.z++,k.z--) { /* exchange the slices*/ // ds_pointer = amitk_raw_data_get_pointer(AMITK_DATA_SET_RAW_DATA(ds), i); // slice_pointer = amitk_raw_data_get_pointer(AMITK_DATA_SET_RAW_DATA(ds), k); // memcpy(buffer, ds_pointer, num_bytes_per_slice); // memcpy(ds_pointer, slice_pointer, num_bytes_per_slice); // memcpy(slice_pointer, buffer, num_bytes_per_slice); // /* exchange the scale factors */ // temp_val = AMITK_RAW_DATA_DOUBLE_CONTENT(ds->internal_scaling_factor, i); // AMITK_RAW_DATA_DOUBLE_SET_CONTENT(ds->internal_scaling_factor, i) = // AMITK_RAW_DATA_DOUBLE_CONTENT(ds->internal_scaling_factor, k); // AMITK_RAW_DATA_DOUBLE_SET_CONTENT(ds->internal_scaling_factor, k) = // temp_val; /* exchange the scale offsets */ // temp_val = AMITK_RAW_DATA_DOUBLE_CONTENT(ds->internal_scaling_intercept, i); // AMITK_RAW_DATA_DOUBLE_SET_CONTENT(ds->internal_scaling_intercept, i) = // AMITK_RAW_DATA_DOUBLE_CONTENT(ds->internal_scaling_intercept, k); // AMITK_RAW_DATA_DOUBLE_SET_CONTENT(ds->internal_scaling_intercept, k) = // temp_val; // // } // } // } // // g_free(buffer); // } /* make sure remaining values have been calculated */ amitk_data_set_set_scale_factor(ds, 1.0); /* set the external scaling factor */ amitk_data_set_calc_far_corner(ds); /* set the far corner of the volume */ amitk_data_set_calc_min_max(ds, update_func, update_data); goto end; error: if (ds != NULL) { amitk_object_unref(ds); ds = NULL; } end: return ds; } static GList * free_slices(GList * slices) { AmitkDataSet * slice_ds; while (slices != NULL) { slice_ds = AMITK_DATA_SET(g_list_nth_data(slices,0)); slices = g_list_remove(slices, slice_ds); amitk_object_unref(slice_ds); } return slices; } static GList * organize_and_import_slices_as_datasets(GList ** premaining_slices, gint num_frames, gint num_gates, gint num_slices, AmitkUpdateFunc update_func, gpointer update_data, gchar **perror_buf) { GList * slices_to_combine = NULL; GList * returned_sets = NULL; GList * additional_sets = NULL; AmitkDataSet * ds=NULL; /* find all the slices that appear to match into one dataset */ slices_to_combine = find_slices_that_match(premaining_slices); /* sort list based on the slice's time and z position */ if (num_frames > 1) slices_to_combine = g_list_sort(slices_to_combine, sort_slices_func_with_time); else if (num_gates > 1) slices_to_combine = g_list_sort(slices_to_combine, sort_slices_func_with_gate); else slices_to_combine = g_list_sort(slices_to_combine, sort_slices_func); /* throw out any slices that are duplicated in terms of orientation */ slices_to_combine = separate_duplicate_slices(slices_to_combine, premaining_slices); /* load in the primary data set */ ds = import_slices_as_dataset(slices_to_combine, num_frames, num_gates, num_slices, update_func, update_data, perror_buf); if (ds != NULL) returned_sets = g_list_append(returned_sets, ds); free_slices(slices_to_combine); /* and recurse to try loading in any remaining data sets */ if (*premaining_slices != NULL) { additional_sets = organize_and_import_slices_as_datasets(premaining_slices, num_frames, num_gates, num_slices, update_func, update_data, perror_buf); if (additional_sets != NULL) returned_sets = g_list_concat(returned_sets, additional_sets); } return returned_sets; } static GList * import_files_as_datasets(GList * image_files, gchar ** pstudyname, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data, gchar **perror_buf) { GList * returned_sets=NULL; AmitkDataSet * slice_ds=NULL; div_t x; gchar * slice_name; gint image; gint num_frames=1; gint num_gates=1; gint num_slices=-1; gint num_files; GList * slices=NULL; gboolean continue_work=TRUE; gint divider; num_files = g_list_length(image_files); g_return_val_if_fail(num_files != 0, NULL); if (update_func != NULL) continue_work = (*update_func)(update_data, _("Importing File(s) Through DCMTK"), (gdouble) 0.0); divider = (num_files/AMITK_UPDATE_DIVIDER < 1.0) ? 1 : (gint) rint(num_files/AMITK_UPDATE_DIVIDER); for (image=0; (image < num_files) && (continue_work); image++) { if (update_func != NULL) { x = div(image,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) image)/((gdouble) num_files)); } slice_name = (gchar *) g_list_nth_data(image_files,image); slice_ds = read_dicom_file(slice_name, pstudyname,preferences, &num_frames, &num_gates, &num_slices, NULL, NULL, perror_buf); if (slice_ds == NULL) { goto cleanup; } else if ((AMITK_DATA_SET_DIM_Z(slice_ds) != 1) && (num_files > 1)) { /* can handle multiple dicom files each with a single slice, or one dicom file with multiple slices, can't handle multiple files each with multiple slices */ g_warning(_("no support for multislice files within DICOM directory format")); amitk_object_unref(slice_ds); slice_ds = NULL; goto cleanup; } slices = g_list_append(slices, slice_ds); } if (!continue_work) goto cleanup; if ((num_frames > 1) && (num_gates > 1)) g_warning("Don't know how to deal with multi-gate and multi-frame data, results will be undefined"); returned_sets = organize_and_import_slices_as_datasets(&slices, num_frames, num_gates, num_slices, update_func, update_data, perror_buf); cleanup: if (update_func != NULL) /* remove progress bar */ (*update_func) (update_data, NULL, (gdouble) 2.0); slices = free_slices(slices); return returned_sets; } typedef struct slice_info_t { gchar * filename; gchar * series_instance_uid; gchar * modality; gchar * series_description; gchar * patient_id; gchar * patient_name; gint series_number; } slice_info_t; static void free_slice_info(slice_info_t * info) { if (info->filename != NULL) g_free(info->filename); if (info->series_instance_uid != NULL) g_free(info->series_instance_uid); if (info->modality != NULL) g_free(info->modality); if (info->series_description != NULL) g_free(info->series_description); if (info->patient_id != NULL) g_free(info->patient_id); if (info->patient_name != NULL) g_free(info->patient_name); g_free(info); return; } static slice_info_t * slice_info_new(void) { slice_info_t * info; info = g_try_new(slice_info_t, 1); info->filename=NULL; info->series_instance_uid=NULL; info->modality=NULL; info->series_description=NULL; info->patient_id=NULL; info->patient_name=NULL; info->series_number = -1; return info; } static slice_info_t * get_slice_info(const gchar * filename) { OFCondition result; DcmFileFormat dcm_format; DcmDataset * dcm_dataset; const char * return_str=NULL; slice_info_t * info=NULL; Sint32 return_sint32; result = dcm_format.loadFile(filename); if (result.bad()) return NULL; dcm_dataset = dcm_format.getDataset(); if (dcm_dataset == NULL) return NULL; info = slice_info_new(); info->filename = g_strdup(filename); dcm_dataset->findAndGetString(DCM_SeriesInstanceUID, return_str, OFTrue); if (return_str != NULL) info->series_instance_uid = g_strdup(return_str); dcm_dataset->findAndGetString(DCM_Modality, return_str, OFTrue); if (return_str != NULL) info->modality = g_strdup(return_str); dcm_dataset->findAndGetString(DCM_SeriesDescription, return_str, OFTrue); if (return_str != NULL) info->series_description = g_strdup(return_str); dcm_dataset->findAndGetString(DCM_PatientID, return_str, OFTrue); if (return_str != NULL) info->patient_id = g_strdup(return_str); dcm_dataset->findAndGetString(DCM_PatientName, return_str, OFTrue); if (return_str != NULL) info->patient_name = g_strdup(return_str); if (dcm_dataset->findAndGetSint32(DCM_SeriesNumber, return_sint32).good()) info->series_number = return_sint32; return info; } static gboolean check_str(gchar * str1, gchar * str2) { if ((str1 == NULL) && (str2 == NULL)) return TRUE; if ((str1 == NULL) || (str2 == NULL)) return FALSE; if (strcmp(str1, str2) == 0) return TRUE; return FALSE; } static gboolean check_same(slice_info_t * slice1, slice_info_t * slice2) { gint j, count; gchar ** slice1_uid_split=NULL; gchar ** slice2_uid_split=NULL; gboolean same_dataset; if ((slice1->series_instance_uid == NULL) || (slice2->series_instance_uid == NULL)) return FALSE; else if ((slice1->series_instance_uid != NULL) && (slice2->series_instance_uid != NULL)) { slice1_uid_split = g_strsplit(slice1->series_instance_uid, ".", -1); slice2_uid_split = g_strsplit(slice2->series_instance_uid, ".", -1); count=0; while (slice1_uid_split[count] != NULL) count++; /* check all but last number in series instance uid */ same_dataset=TRUE; for (j=0; (j<(count-1) && same_dataset); j++) { if (slice2_uid_split[j] == NULL) same_dataset=FALSE; else if (strcmp(slice1_uid_split[j], slice2_uid_split[j]) != 0) same_dataset=FALSE; } if (slice1_uid_split != NULL) g_strfreev(slice1_uid_split); if (slice2_uid_split != NULL) g_strfreev(slice2_uid_split); if (!same_dataset) return FALSE; } if (!check_str(slice1->series_description, slice2->series_description)) return FALSE; if (slice1->series_number != slice2->series_number) return FALSE; if (!check_str(slice1->modality, slice2->modality)) return FALSE; if (!check_str(slice1->patient_id, slice2->patient_id)) { return FALSE; } if (!check_str(slice1->patient_name, slice2->patient_name)) { return FALSE; } return TRUE; } static gint sort_raw_info(gconstpointer a, gconstpointer b) { const slice_info_t * slicea = (slice_info_t *) a; const slice_info_t * sliceb = (slice_info_t *) b; /* sort by series if we've got the data */ if ((slicea->series_number >=0) && (sliceb->series_number >=0)) { if (slicea->series_number > sliceb->series_number) return 1; else if (slicea->series_number < sliceb->series_number) return -1; } return strcmp(slicea->filename, sliceb->filename); } static gint sort_datasets_by_dicom_params(gconstpointer a, gconstpointer b) { g_return_val_if_fail(a != NULL, 0); g_return_val_if_fail(b != NULL, 0); /* first sort by series number */ if (AMITK_DATA_SET_SERIES_NUMBER(a) > AMITK_DATA_SET_SERIES_NUMBER(b)) return 1; else if (AMITK_DATA_SET_SERIES_NUMBER(a) < AMITK_DATA_SET_SERIES_NUMBER(b)) return -1; /* then sort by echo time if we have that parameter */ if (!isnan(AMITK_DATA_SET_ECHO_TIME(a)) && !isnan(AMITK_DATA_SET_ECHO_TIME(b))) { if (AMITK_DATA_SET_ECHO_TIME(a) > AMITK_DATA_SET_ECHO_TIME(b)) return 1; else if (AMITK_DATA_SET_ECHO_TIME(a) < AMITK_DATA_SET_ECHO_TIME(b)) return -1; } return 0; } static GList * import_files(const gchar * filename, gchar ** pstudyname, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data) { AmitkDataSet * ds; GList * data_sets = NULL; GList * returned_sets = NULL; GList * image_files=NULL; GList * raw_info=NULL; GList * all_slices=NULL; /* list of lists */ GList * temp_all_slices; GList * sorted_slices=NULL; /* pointer to a list in all_slices */ gchar * image_name; gchar * error_buf=NULL; slice_info_t * info=NULL; slice_info_t * current_info=NULL; gchar * dirname=NULL; gchar * basename=NULL; gchar * regularized_filename; gchar * new_filename; DIR* dir; struct dirent* entry; gboolean continue_work=TRUE; gboolean all_datasets; gboolean use_this_one; GtkWidget * question; gint return_val; /* note, I generate a "regularized_filename" rather than just using filename, to insure that when the filenames get sorted alphabetically, they're all of the same "./filename" form. */ dirname = g_path_get_dirname(filename); basename = g_path_get_basename(filename); if (dirname == NULL) regularized_filename = g_strdup_printf("%s", filename); else regularized_filename = g_strdup_printf("%s%s%s", dirname, G_DIR_SEPARATOR_S,basename); /* get the intially requested file */ info = get_slice_info(regularized_filename); if (info == NULL) { g_warning(_("could not find dataset in DICOM file %s\n"), regularized_filename); return NULL; } raw_info = g_list_append(raw_info, info); /* ------- find all dicom files in the directory ------------ */ if (update_func != NULL) continue_work = (*update_func)(update_data, _("Scanning Files to find additional DICOM Slices"), (gdouble) 0.0); if ((dir = opendir(dirname))!=NULL) { while (((entry = readdir(dir)) != NULL) && (continue_work)) { if (update_func != NULL) continue_work = (*update_func)(update_data, NULL, -1.0); if (dirname == NULL) new_filename = g_strdup_printf("%s", entry->d_name); else new_filename = g_strdup_printf("%s%s%s", dirname, G_DIR_SEPARATOR_S,entry->d_name); if (strcmp(basename, entry->d_name) != 0) { /* we've already got the initial filename */ if (dcmtk_test_dicom(new_filename)) { info = get_slice_info(new_filename); if (info != NULL) raw_info = g_list_append(raw_info, info); /* we have a match */ } } g_free(new_filename); } if (dir != NULL) closedir(dir); } if (dirname != NULL) g_free(dirname); if (basename != NULL) g_free(basename); if (update_func != NULL) /* remove progress bar */ (*update_func) (update_data, NULL, (gdouble) 2.0); /* sort by series number, then filename */ raw_info = g_list_sort(raw_info, sort_raw_info); /* ------------ sort the files ---------------- */ while (raw_info != NULL) { current_info = (slice_info_t *) raw_info->data; raw_info = g_list_remove(raw_info, current_info); /* go through the list of slice lists, find one that matches */ temp_all_slices = all_slices; while ((temp_all_slices != NULL) && (current_info != NULL)){ sorted_slices = (GList *) temp_all_slices->data; g_assert(sorted_slices->data != NULL); info = (slice_info_t *) sorted_slices->data; /* current slice matches the first slice in the current list, add it to this list */ if (check_same(current_info, info)) { sorted_slices = g_list_append(sorted_slices, current_info); current_info = NULL; } temp_all_slices = temp_all_slices->next; } /* current info doesn't match anything, add it on as a new list */ if (current_info != NULL) all_slices = g_list_append(all_slices, g_list_append(NULL, current_info)); } g_assert(all_slices != NULL); /* check if we want to load in everything or not */ all_datasets=FALSE; if (g_list_length(all_slices) > 1) { /* make sure we really want to delete */ question = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Multiple data sets were found in the same directory as the specified file. In addition to the dataset corresponding to the specified file, would you like to load in these additional datasets?")); /* and wait for the question to return */ return_val = gtk_dialog_run(GTK_DIALOG(question)); gtk_widget_destroy(question); if (return_val == GTK_RESPONSE_YES) all_datasets=TRUE; } while (all_slices != NULL) { sorted_slices = (GList *) all_slices->data; all_slices = g_list_remove(all_slices, sorted_slices); use_this_one = FALSE; /* transfer file names */ image_files = NULL; while (sorted_slices != NULL) { info = (slice_info_t *) sorted_slices->data; /* see if this group of filenames contains the filename we initially started with */ if (strcmp(regularized_filename, info->filename) == 0) use_this_one = TRUE; sorted_slices = g_list_remove(sorted_slices, info); image_files = g_list_append(image_files, info->filename); info->filename=NULL; free_slice_info(info); } if (all_datasets || (use_this_one)) { returned_sets = import_files_as_datasets(image_files, pstudyname, preferences, update_func, update_data, &error_buf); while (returned_sets != NULL) { ds = AMITK_DATA_SET(returned_sets->data); data_sets = g_list_append(data_sets, ds); returned_sets = g_list_remove(returned_sets, ds); } } /* cleanup */ while (image_files != NULL) { image_name = (gchar *) g_list_nth_data(image_files,0); image_files = g_list_remove(image_files, image_name); g_free(image_name); } } /* and sort datasets by series number, echo time, etc.*/ data_sets = g_list_sort(data_sets, sort_datasets_by_dicom_params); /* cleanup */ if (error_buf != NULL) { g_warning("%s",error_buf); g_free(error_buf); } if (regularized_filename != NULL) g_free(regularized_filename); return data_sets; } /* read in a DICOMDIR type file */ static GList * import_dir(const gchar * filename, gchar ** pstudyname, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data) { GList * data_sets=NULL; GList * returned_sets=NULL; DcmDirectoryRecord * dcm_root_record; DcmDirectoryRecord * patient_record=NULL; DcmDirectoryRecord * study_record=NULL; DcmDirectoryRecord * series_record=NULL; DcmDirectoryRecord * image_record=NULL; OFCondition result; AmitkDataSet * ds=NULL; const char * return_str=NULL; const char * record_name[3]; const char * patient_id; gchar * dirname=NULL; gchar * object_name=NULL; gchar * temp_name; gchar * temp_name2; GList * image_files=NULL; gint j; gchar * error_buf=NULL; gchar * image_name1; gchar * image_name2; gchar * lowercase_image_name1=NULL;; gchar * lowercase_image_name2=NULL;; gboolean valid_filename; gboolean ignore_missing_files = FALSE; gboolean use_alternative; gboolean always_use_alternative = FALSE; GtkWidget * question; gint return_val; /* first try loading it as a DIRFILE */ DcmDicomDir dcm_dir(filename); /* dcm_dir.print(cout); */ dirname = g_path_get_dirname(filename); dcm_root_record = &(dcm_dir.getRootRecord()); /* dcm_root_record->print(cout);*/ /* go through the whole directory */ while ((patient_record = dcm_root_record->nextSub(patient_record)) != NULL) { patient_record->findAndGetString(DCM_PatientName, record_name[0]); patient_record->findAndGetString(DCM_PatientID, patient_id, OFTrue); while ((study_record= patient_record->nextSub(study_record)) != NULL) { study_record->findAndGetString(DCM_StudyDescription, record_name[1]); while ((series_record = study_record->nextSub(series_record)) != NULL) { series_record->findAndGetString(DCM_SeriesDescription, record_name[2]); /* concat the names that aren't NULL */ for (j=0; j<3; j++) { if (record_name[j] != NULL) { temp_name2 = g_strdup(record_name[j]); g_strstrip(temp_name2); if (object_name != NULL) { temp_name = object_name; object_name = g_strdup_printf("%s - %s", temp_name, temp_name2); g_free(temp_name); } else object_name = g_strdup(temp_name2); g_free(temp_name2); } } while ((image_record=series_record->nextSub(image_record)) != NULL) { if (image_record->findAndGetString(DCM_ReferencedFileID, return_str).good()) { image_name1 = g_strdup(return_str); g_strdelimit(image_name1, "\\", G_DIR_SEPARATOR); /* remove separators */ image_name2 = g_strdup_printf("%s%s%s", dirname, G_DIR_SEPARATOR_S,image_name1); /* check if there's a upper vs lower case issue, seems to happen with GE exported DICOMDIR files, likely due to some filesystems not being case aware */ valid_filename = dcmtk_test_dicom(image_name2); if ((!valid_filename) && (!ignore_missing_files)) { use_alternative=FALSE; lowercase_image_name1 = g_ascii_strdown(image_name1,-1); lowercase_image_name2 = g_strdup_printf("%s%s%s", dirname, G_DIR_SEPARATOR_S, lowercase_image_name1); g_free(lowercase_image_name1); if (!dcmtk_test_dicom(lowercase_image_name2)) { question = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, _("For series: %s\n\nListed in DICOMDIR: %s\n\nCould not read DICOM file: %s"), object_name, filename, image_name2); gtk_dialog_add_button(GTK_DIALOG(question), GTK_STOCK_OK, GTK_RESPONSE_OK); gtk_dialog_add_button(GTK_DIALOG(question), _("OK, ignore similar errors"),1); return_val = gtk_dialog_run(GTK_DIALOG(question)); gtk_widget_destroy(question); if (return_val == 1) ignore_missing_files = TRUE; } else if (!always_use_alternative) { question = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, _("For series: %s\n\nListed in DICOMDIR: %s\n\nCould not read DICOM file: %s\n\nFound possible alternative file: %s"), object_name, filename, image_name2, lowercase_image_name2); gtk_dialog_add_button(GTK_DIALOG(question), GTK_STOCK_OK, GTK_RESPONSE_OK); gtk_dialog_add_button(GTK_DIALOG(question), _("OK, ignore similar errors"), 1); gtk_dialog_add_button(GTK_DIALOG(question), _("Use alternative"), 2); gtk_dialog_add_button(GTK_DIALOG(question), _("Always use alternative"), 3); return_val = gtk_dialog_run(GTK_DIALOG(question)); gtk_widget_destroy(question); if (return_val == 1) ignore_missing_files = TRUE; if (return_val == 2) use_alternative=TRUE; if (return_val == 3) always_use_alternative = TRUE; } if (use_alternative || always_use_alternative) { g_free(image_name2); image_name2=lowercase_image_name2; valid_filename=TRUE; } else { g_free(lowercase_image_name2); } } g_free(image_name1); if (valid_filename) image_files = g_list_append(image_files, image_name2); } } #if AMIDE_DEBUG g_print("object name: %s with %d files (images)\n", object_name, g_list_length(image_files)); #endif /* read in slices as dataset(s) */ if (g_list_length(image_files) != 0) returned_sets = import_files_as_datasets(image_files, pstudyname, preferences, update_func, update_data, &error_buf); while (returned_sets != NULL) { ds = AMITK_DATA_SET(returned_sets->data); /* If the actual dicom file didn't have these entries, we try using the corresponding enteries from the DICOMDIR file */ if (AMITK_OBJECT_NAME(ds) == NULL) { if (record_name[2] != NULL) amitk_object_set_name(AMITK_OBJECT(ds), record_name[2]); else amitk_object_set_name(AMITK_OBJECT(ds), object_name); } if (AMITK_DATA_SET_SUBJECT_NAME(ds) == NULL) { if (record_name[0] != NULL) amitk_data_set_set_subject_name(ds, record_name[0]); } if (AMITK_DATA_SET_SUBJECT_ID(ds) == NULL) { if (patient_id != NULL) amitk_data_set_set_subject_id(ds, patient_id); } data_sets = g_list_append(data_sets, ds); returned_sets = g_list_remove(returned_sets, ds); } /* cleanup */ while (image_files != NULL) { image_name2 = (gchar *) g_list_nth_data(image_files,0); image_files = g_list_remove(image_files, image_name2); g_free(image_name2); } g_free(object_name); object_name=NULL; } } } /* and sort datasets by series number, echo time, etc.*/ data_sets = g_list_sort(data_sets, sort_datasets_by_dicom_params); /* more cleanup */ if (dirname != NULL) g_free(dirname); if (error_buf != NULL) { g_warning("%s",error_buf); g_free(error_buf); } return data_sets; } GList * dcmtk_import(const gchar * filename, gchar ** pstudyname, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data) { GList * data_sets=NULL; gboolean is_dir=FALSE; DcmFileFormat dcm_format; DcmMetaInfo * dcm_metainfo; OFCondition result; const char * return_str=NULL; if (!dcmDataDict.isDictionaryLoaded()) { g_warning(_("Could not find a DICOM Data Dictionary. Reading may fail. Consider defining the environmental variable DCMDICTPATH to the dicom.dic file.")); } result = dcm_format.loadFile(filename); if (result.bad()) { g_warning(_("could not read DICOM file %s, dcmtk returned %s"),filename, result.text()); return NULL; } dcm_metainfo = dcm_format.getMetaInfo(); if (dcm_metainfo == NULL) { g_warning("could not find metainfo for DICOM file %s\n", filename); return NULL; } dcm_metainfo->findAndGetString(DCM_MediaStorageSOPClassUID, return_str, OFTrue); if (return_str != NULL) { if (strcmp(return_str, UID_MediaStorageDirectoryStorage) == 0) is_dir= TRUE; /* we've got a DICOMDIR file */ } if (is_dir) { data_sets = import_dir(filename, pstudyname, preferences, update_func, update_data); } else { data_sets = import_files(filename, pstudyname, preferences, update_func, update_data); } return data_sets; } static void insert_str(DcmItem * dcm_item, const DcmTag& tag, const gchar * str) { OFCondition status; status = dcm_item->putAndInsertString(tag, str); if (status.bad()) g_error("Error %s: failed writing tag of type %s\n", status.text(), tag.getVRName()); return; } static void insert_int_str(DcmItem * dcm_item, const DcmTag& tag, gint value) { gchar * temp_str; temp_str = g_strdup_printf("%d",value); insert_str(dcm_item, tag, temp_str); g_free(temp_str); return; } static void insert_double_str(DcmItem * dcm_item, const DcmTag& tag, gdouble value) { gchar * temp_str; temp_str = g_strdup_printf("%f",value); insert_str(dcm_item,tag,temp_str); g_free(temp_str); return; } static void insert_double2_str(DcmItem * dcm_item, const DcmTag& tag, gdouble value1, gdouble value2) { gchar * temp_str; temp_str = g_strdup_printf("%f\\%f",value1,value2); insert_str(dcm_item,tag,temp_str); g_free(temp_str); return; } static void insert_double3_str(DcmItem * dcm_item, const DcmTag& tag, gdouble value1, gdouble value2, gdouble value3) { gchar * temp_str; temp_str = g_strdup_printf("%f\\%f\\%f",value1,value2,value3); insert_str(dcm_item,tag,temp_str); g_free(temp_str); return; } static void insert_double6_str(DcmItem * dcm_item, const DcmTag& tag, gdouble value1, gdouble value2, gdouble value3, gdouble value4, gdouble value5, gdouble value6) { gchar * temp_str; temp_str = g_strdup_printf("%f\\%f\\%f\\%f\\%f\\%f", value1,value2,value3,value4,value5,value6); insert_str(dcm_item,tag,temp_str); g_free(temp_str); return; } /* take a stab at converting the study date and frame information into strings appropriate for the dicom header. date_str and time_str will have to be free'd */ static void generate_dicom_date_and_time(const gchar * date, const amide_time_t frame_offset, gchar ** pdate_str, gchar ** ptime_str) { struct tm time_structure; time_t time_in_seconds; gboolean valid = FALSE; if(date != NULL) { #ifdef HAVE_STRPTIME valid = (strptime(date,"%c",&time_structure) != NULL); if (!valid) /* try a less locale specific format string */ valid = (strptime(date,"%a %b %d %T %Y",&time_structure) != NULL); #endif } if (!valid) { time_structure.tm_year = 0; /* 1900 */ time_structure.tm_mon = 0; /* January */ time_structure.tm_mday = 1; /* first */ time_structure.tm_hour = 0; time_structure.tm_min = 0; time_structure.tm_sec = 0; } time_structure.tm_isdst = -1; /* make mktime figure out daylight savings times issues */ time_in_seconds = mktime(&time_structure); /* convert the dates to seconds since 1970 */ time_in_seconds += frame_offset; /* add the frame offset time */ #if !defined(G_PLATFORM_WIN32) localtime_r(&time_in_seconds, &time_structure); #else /* win32 doesn't have localtime_r */ { struct tm *ptm = localtime (&time_in_seconds); if (ptm != NULL) memcpy ((void *) &time_structure, (void *) ptm, sizeof(struct tm)); else valid = FALSE; } #endif *ptime_str = g_strdup_printf("%02d%02d%02d", time_structure.tm_hour, time_structure.tm_min, time_structure.tm_sec); if (valid) *pdate_str = g_strdup_printf("%04d%02d%02d", time_structure.tm_year+1900, time_structure.tm_mon+1, time_structure.tm_mday); else if (date != NULL) *pdate_str = g_strdup(date); /* if we couldn't figure out the date string, just propogate it */ else *pdate_str = g_strdup("19000101"); return; } /* dirname is usually the name of the directory that the dicomdir file will go into, it can also be the name of a preexisting dicomdir file, in which case the exported data will be appended */ gboolean dcmtk_export(AmitkDataSet * ds, const gchar * dir_or_filename, const gchar * studyname, const gboolean resliced, const AmitkPoint resliced_voxel_size, const AmitkVolume * bounding_box, AmitkUpdateFunc update_func, gpointer update_data) { DicomDirInterface dcm_dir; DcmDataset * dcm_ds; DcmFileFormat dcm_format; DcmMetaInfo * dcm_metainfo; DcmItem * dcm_item; char uid[100]; OFCondition status; struct stat file_info; gchar * subdirname=NULL; gchar * full_subdirname=NULL; gchar * filename=NULL; gchar * dirname=NULL; gchar * dcmdir_filename=NULL; gchar * full_filename=NULL; gchar * temp_str=NULL; gint i; AmitkVolume * output_volume=NULL; AmitkDataSet * slice = NULL; AmitkVoxel dim; AmitkPoint corner; AmitkVoxel i_voxel, j_voxel; gboolean format_changing; gboolean format_size_short; gpointer buffer = NULL; amitk_format_SSHORT_t * sshort_buffer; gdouble min,max; gint buffer_size; div_t x; gint divider; gint total_planes; gboolean continue_work=TRUE; AmitkPoint output_start_pt; AmitkCanvasPoint pixel_size; AmitkPoint new_offset; amide_data_t value; gint image_num; gchar * saved_time_locale; gchar * saved_numeric_locale; AmitkAxes axes; AmitkPoint dicom_offset; AmitkPoint voxel_size; gboolean successful = FALSE; gchar * date_str; gchar * time_str; saved_time_locale = g_strdup(setlocale(LC_TIME,NULL)); saved_numeric_locale = g_strdup(setlocale(LC_NUMERIC,NULL)); setlocale(LC_TIME,"POSIX"); setlocale(LC_NUMERIC,"POSIX"); /* figure out if we've been given a directory, or a DICOMDIR filename */ /* very simplistic, we assume the directory file will be called DICOMDIR if it's anything else, we assume we've been given a directory to create a new DICOMDIR file in */ dcmdir_filename = g_path_get_basename(dir_or_filename); if (g_strcmp0(dcmdir_filename, "DICOMDIR") == 0) if (dcmtk_test_dicom(dir_or_filename)) dirname = g_path_get_dirname(dir_or_filename); /* otherwise */ if (dirname == NULL) { dirname = g_strdup(dir_or_filename); } if (dcmdir_filename != NULL) g_free(dcmdir_filename); dcmdir_filename = g_strdup_printf("%s/DICOMDIR",dirname); /* make the directory we'll output the dicom data in if it doesn't already exist */ if (stat(dirname, &file_info) == 0) { if (!S_ISDIR(file_info.st_mode)) { g_warning(_("File already exists with name: %s"), dirname); goto cleanup; } } else { if (g_mkdir(dirname,0766) != 0) { g_warning(_("Couldn't create directory: %s"),dirname); goto cleanup; } } /* create the DICOMDIR, unless already made in which case we'll append to it */ if (stat(dcmdir_filename,&file_info) == 0) { if (!S_ISREG(file_info.st_mode)) { g_warning(_("Existing DICOMDIR file %s is not a regular file"),dcmdir_filename); goto cleanup; } status = dcm_dir.appendToDicomDir(DicomDirInterface::AP_Default,dcmdir_filename); if (status.bad()) { g_warning(_("Existing DICOMDIR file %s exists but is not appendable, error %s"),dcmdir_filename, status.text()); goto cleanup; } } else { status = dcm_dir.createNewDicomDir(DicomDirInterface::AP_Default,dcmdir_filename); if (status.bad()) { g_warning(_("Could not create DICOMDIR file %s, error %s"),dcmdir_filename, status.text()); goto cleanup; } } /* find a unique directory name */ i=0; temp_str = NULL; do { if (subdirname != NULL) g_free(subdirname); if (full_subdirname != NULL) g_free(full_subdirname); subdirname = g_strdup_printf("DCM%03d", i); full_subdirname = g_strdup_printf("%s%s%s",dirname,G_DIR_SEPARATOR_S,subdirname); i++; } while (stat(full_subdirname, &file_info) == 0); #if AMIDE_DEBUG g_print("selected subdirname %s\n", subdirname); #endif if (g_mkdir(full_subdirname,0766) != 0) { g_warning(_("Couldn't create directory: %s"),full_subdirname); } /* figure out our dimensions */ dim = AMITK_DATA_SET_DIM(ds); if (resliced) { if (bounding_box != NULL) output_volume = AMITK_VOLUME(amitk_object_copy(AMITK_OBJECT(bounding_box))); else output_volume = amitk_volume_new(); if (output_volume == NULL) goto cleanup; if (bounding_box != NULL) { corner = AMITK_VOLUME_CORNER(output_volume); } else { AmitkCorners corners; amitk_volume_get_enclosing_corners(AMITK_VOLUME(ds), AMITK_SPACE(output_volume), corners); corner = point_diff(corners[0], corners[1]); amitk_space_set_offset(AMITK_SPACE(output_volume), amitk_space_s2b(AMITK_SPACE(output_volume), corners[0])); } voxel_size = resliced_voxel_size; pixel_size.x = voxel_size.x; pixel_size.y = voxel_size.y; dim.x = (amide_intpoint_t) ceil(corner.x/voxel_size.x); dim.y = (amide_intpoint_t) ceil(corner.y/voxel_size.y); dim.z = (amide_intpoint_t) ceil(corner.z/voxel_size.z); corner.z = voxel_size.z; #ifdef AMIDE_DEBUG g_print("output dimensions %d %d %d, voxel size %f %f %f\n", dim.x, dim.y, dim.z, voxel_size.x, voxel_size.y, voxel_size.z); #else g_warning(_("dimensions of output data set will be %dx%dx%d, voxel size of %fx%fx%f"), dim.x, dim.y, dim.z, voxel_size.x, voxel_size.y, voxel_size.z); #endif } else { output_volume = amitk_volume_new(); amitk_space_copy_in_place(AMITK_SPACE(output_volume), AMITK_SPACE(ds)); voxel_size = AMITK_DATA_SET_VOXEL_SIZE(ds); corner = AMITK_VOLUME_CORNER(ds); } amitk_volume_set_corner(output_volume, corner); output_start_pt = AMITK_SPACE_OFFSET(output_volume); /* create the dicom data structure */ dcm_ds = dcm_format.getDataset(); dcm_metainfo = dcm_format.getMetaInfo(); dcm_metainfo->putAndInsertString(DCM_SOPClassUID, UID_SecondaryCaptureImageStorage); /* required dicom entries */ insert_str(dcm_ds,DCM_SeriesInstanceUID,dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT)); /* if we're appending to a DICOMDIR, it would be a little better to copy the studyinstanceuid and frameofreferenceuid from whatever DICOM files are already stored... but it's simpler to just regenerate these values */ insert_str(dcm_ds,DCM_StudyInstanceUID, dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT)); insert_str(dcm_ds,DCM_FrameOfReferenceUID, dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT)); insert_str(dcm_ds, DCM_StudyID,"0"); if (AMITK_DATA_SET_SERIES_NUMBER(dcm_ds) > 0) insert_int_str(dcm_ds, DCM_SeriesNumber, AMITK_DATA_SET_SERIES_NUMBER(dcm_ds)); else insert_str(dcm_ds, DCM_SeriesNumber,"0"); /* other stuff */ if (AMITK_DATA_SET_SUBJECT_NAME(ds) != NULL) insert_str(dcm_ds,DCM_PatientName, AMITK_DATA_SET_SUBJECT_NAME(ds)); if (AMITK_DATA_SET_SUBJECT_ID(ds) != NULL) insert_str(dcm_ds,DCM_PatientID, AMITK_DATA_SET_SUBJECT_ID(ds)); if (AMITK_DATA_SET_SUBJECT_DOB(ds) != NULL) insert_str(dcm_ds,DCM_PatientBirthDate, AMITK_DATA_SET_SUBJECT_DOB(ds)); /* set StudyDescription */ if (studyname != NULL) insert_str(dcm_ds,DCM_StudyDescription, studyname); else insert_str(dcm_ds,DCM_StudyDescription, AMITK_OBJECT_NAME(ds)); /* set SeriesDescription */ if (AMITK_OBJECT_NAME(ds) != NULL) insert_str(dcm_ds,DCM_SeriesDescription, AMITK_OBJECT_NAME(ds)); insert_double_str(dcm_ds,DCM_PatientWeight, AMITK_DATA_SET_SUBJECT_WEIGHT(ds)); switch(AMITK_DATA_SET_SUBJECT_SEX(ds)) { case AMITK_SUBJECT_SEX_MALE: insert_str(dcm_ds, DCM_PatientSex, "M"); break; case AMITK_SUBJECT_SEX_FEMALE: insert_str(dcm_ds, DCM_PatientSex, "F"); break; case AMITK_SUBJECT_SEX_UNKNOWN: default: insert_str(dcm_ds, DCM_PatientSex, "O"); break; } switch(AMITK_DATA_SET_SUBJECT_ORIENTATION(ds)) { case AMITK_SUBJECT_ORIENTATION_SUPINE_HEADFIRST: insert_str(dcm_ds,DCM_PatientPosition, "HFS"); break; case AMITK_SUBJECT_ORIENTATION_SUPINE_FEETFIRST: insert_str(dcm_ds,DCM_PatientPosition, "FFS"); break; case AMITK_SUBJECT_ORIENTATION_PRONE_HEADFIRST: insert_str(dcm_ds,DCM_PatientPosition, "HFP"); break; case AMITK_SUBJECT_ORIENTATION_PRONE_FEETFIRST: insert_str(dcm_ds,DCM_PatientPosition, "FFP"); break; case AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_HEADFIRST: insert_str(dcm_ds,DCM_PatientPosition, "HFDR"); break; case AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_FEETFIRST: insert_str(dcm_ds,DCM_PatientPosition, "FFDR"); break; case AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_HEADFIRST: insert_str(dcm_ds,DCM_PatientPosition, "HFDL"); break; case AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_FEETFIRST: insert_str(dcm_ds,DCM_PatientPosition, "FFDL"); break; case AMITK_SUBJECT_ORIENTATION_UNKNOWN: default: break; } switch(AMITK_DATA_SET_MODALITY(ds)) { case AMITK_MODALITY_PET: insert_str(dcm_ds,DCM_Modality, "PT"); dcm_metainfo->putAndInsertString(DCM_MediaStorageSOPClassUID, UID_PositronEmissionTomographyImageStorage); break; case AMITK_MODALITY_SPECT: insert_str(dcm_ds,DCM_Modality, "ST"); dcm_metainfo->putAndInsertString(DCM_MediaStorageSOPClassUID, UID_NuclearMedicineImageStorage); break; case AMITK_MODALITY_CT: insert_str(dcm_ds,DCM_Modality, "CT"); dcm_metainfo->putAndInsertString(DCM_MediaStorageSOPClassUID, UID_CTImageStorage); break; case AMITK_MODALITY_MRI: insert_str(dcm_ds,DCM_Modality, "MR"); dcm_metainfo->putAndInsertString(DCM_MediaStorageSOPClassUID, UID_MRImageStorage); break; case AMITK_MODALITY_OTHER: default: insert_str(dcm_ds,DCM_Modality, "OT"); dcm_metainfo->putAndInsertString(DCM_MediaStorageSOPClassUID, UID_SecondaryCaptureImageStorage); break; } /* modality specific items */ switch(AMITK_DATA_SET_MODALITY(ds)) { case AMITK_MODALITY_PET: case AMITK_MODALITY_SPECT: /* create a radiopharmaceutical information sequence if we have the data */ if (!isnan(AMITK_DATA_SET_INJECTED_DOSE(ds))) { if (dcm_ds->findOrCreateSequenceItem(DCM_RadiopharmaceuticalInformationSequence, dcm_item, 0).good()) { insert_double_str(dcm_item, DCM_RadionuclideTotalDose, AMITK_DATA_SET_INJECTED_DOSE(ds)); } } insert_str(dcm_ds, DCM_DecayCorrection, "START"); /* assume things were decay corrected from the start of the scan */ break; case AMITK_MODALITY_MRI: if (!isnan(AMITK_DATA_SET_INVERSION_TIME(ds))) insert_double_str(dcm_ds, DCM_InversionTime, AMITK_DATA_SET_INVERSION_TIME(ds)); if (!isnan(AMITK_DATA_SET_ECHO_TIME(ds))) insert_double_str(dcm_ds, DCM_EchoTime, AMITK_DATA_SET_ECHO_TIME(ds)); if (!isnan(AMITK_DATA_SET_DIFFUSION_B_VALUE(ds))) { insert_double_str(dcm_ds, DCM_DiffusionBValue, AMITK_DATA_SET_DIFFUSION_B_VALUE(ds)); dcm_ds->putAndInsertFloat64(DCM_DiffusionGradientOrientation, AMITK_DATA_SET_DIFFUSION_DIRECTION(ds).x, 0, OFTrue); dcm_ds->putAndInsertFloat64(DCM_DiffusionGradientOrientation, AMITK_DATA_SET_DIFFUSION_DIRECTION(ds).y, 1, OFTrue); dcm_ds->putAndInsertFloat64(DCM_DiffusionGradientOrientation, AMITK_DATA_SET_DIFFUSION_DIRECTION(ds).z, 2, OFTrue); } break; default: break; } dcm_ds->putAndInsertUint16(DCM_Columns, dim.x); dcm_ds->putAndInsertUint16(DCM_Rows, dim.y); dcm_ds->putAndInsertUint16(DCM_NumberOfSlices, dim.z); /* number of planes per frame, not per file */ /* retired entry dcm_ds->putAndInsertUint16(DCM_Planes, 1); */ /* we save one plane per file */ /* past in the image type if we have that info*/ if (AMITK_DATA_SET_DICOM_IMAGE_TYPE(ds) != NULL) { dcm_metainfo->putAndInsertString(DCM_ImageType, AMITK_DATA_SET_DICOM_IMAGE_TYPE(ds)); } else { /* technically, ImageType is a required entry, so we should probably guess something */ dcm_metainfo->putAndInsertString(DCM_ImageType, "DERIVED\\SECONDARY"); } /* tag required for PET data, but we don't currently keep track of the data set underlying units */ dcm_ds->putAndInsertString(DCM_Units, "NONE"); /* add some dicom required stuff */ dcm_ds->putAndInsertString(DCM_PhotometricInterpretation, "MONOCHROME2"); dcm_ds->putAndInsertUint16(DCM_SamplesPerPixel, 1); /* all our data is monochrome, 3 would be rgb */ /* if gated study, put in the gate information */ if (AMITK_DATA_SET_DIM_G(ds) > 1) { insert_str(dcm_ds,DCM_SeriesType, "GATED\\IMAGE"); dcm_ds->putAndInsertUint16(DCM_NumberOfTimeSlots, AMITK_DATA_SET_DIM_G(ds)); /* used for PET */ dcm_ds->putAndInsertSint32(DCM_NumberOfTemporalPositions, AMITK_DATA_SET_DIM_G(ds)); /* used for MR */ } if (AMITK_DATA_SET_DIM_T(ds) > 1) insert_str(dcm_ds,DCM_SeriesType, "DYNAMIC"); dcm_ds->putAndInsertUint16(DCM_NumberOfTimeSlices, AMITK_DATA_SET_DIM_T(ds)); /* figure out the format we'll be saving in */ if (!resliced) { switch (AMITK_DATA_SET_FORMAT(ds)) { case AMITK_FORMAT_SBYTE: case AMITK_FORMAT_UBYTE: format_changing=FALSE; format_size_short=FALSE; break; case AMITK_FORMAT_SSHORT: case AMITK_FORMAT_USHORT: format_changing=FALSE; format_size_short=TRUE; break; case AMITK_FORMAT_FLOAT: case AMITK_FORMAT_DOUBLE: case AMITK_FORMAT_SINT: case AMITK_FORMAT_UINT: format_changing=TRUE; /* well save as signed shorts */ format_size_short=TRUE; break; default: format_changing=TRUE; format_size_short=TRUE; g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } } else { format_changing=TRUE; format_size_short=TRUE; } dcm_ds->putAndInsertUint16(DCM_BitsAllocated, format_changing ? 8*amitk_format_sizes[AMITK_FORMAT_SSHORT] : 8*amitk_format_sizes[AMITK_DATA_SET_FORMAT(ds)]); dcm_ds->putAndInsertUint16(DCM_BitsStored, format_changing ? 8*amitk_format_sizes[AMITK_FORMAT_SSHORT] : 8*amitk_format_sizes[AMITK_DATA_SET_FORMAT(ds)]); dcm_ds->putAndInsertUint16(DCM_HighBit, format_changing ? 8*amitk_format_sizes[AMITK_FORMAT_SSHORT]-1 : 8*amitk_format_sizes[AMITK_DATA_SET_FORMAT(ds)]-1); dcm_ds->putAndInsertUint16(DCM_PixelRepresentation, format_changing ? amitk_format_signed[AMITK_FORMAT_SSHORT] : amitk_format_signed[AMITK_DATA_SET_FORMAT(ds)]); buffer_size = dim.y*dim.x*(format_changing ? amitk_format_sizes[AMITK_FORMAT_SSHORT] : amitk_format_sizes[AMITK_DATA_SET_FORMAT(ds)]); insert_double2_str(dcm_ds, DCM_PixelSpacing,voxel_size.y,voxel_size.x); insert_double_str(dcm_ds, DCM_SpacingBetweenSlices, voxel_size.z); insert_double_str(dcm_ds, DCM_SliceThickness, voxel_size.z); /* take a stab at converting the study date and putting it into the dicom header */ generate_dicom_date_and_time(AMITK_DATA_SET_SCAN_DATE(ds), 0.0, &date_str, &time_str); insert_str(dcm_ds, DCM_StudyDate, date_str); insert_str(dcm_ds, DCM_SeriesDate, date_str); insert_str(dcm_ds, DCM_AcquisitionDate, date_str); g_free(date_str); insert_str(dcm_ds, DCM_StudyTime, time_str); insert_str(dcm_ds, DCM_SeriesTime, time_str); insert_str(dcm_ds, DCM_AcquisitionTime, time_str); insert_str(dcm_ds, DCM_RadiopharmaceuticalStartTime,time_str); /* dose already corrected to start time */ g_free(time_str); /* put in orientation - see note in read_dicom_file about AMIDE versus DICOM orientation */ /* do flips for dicom convention */ amitk_axes_copy_in_place(axes, AMITK_SPACE_AXES(output_volume)); axes[AMITK_AXIS_X].y *= -1.0; axes[AMITK_AXIS_X].z *= -1.0; axes[AMITK_AXIS_Y].y *= -1.0; axes[AMITK_AXIS_Y].z *= -1.0; insert_double6_str(dcm_ds, DCM_ImageOrientationPatient, axes[AMITK_AXIS_X].x,axes[AMITK_AXIS_X].y,axes[AMITK_AXIS_X].z, axes[AMITK_AXIS_Y].x,axes[AMITK_AXIS_Y].y,axes[AMITK_AXIS_Y].z); /* and finally, get to the real work */ if (update_func != NULL) { temp_str = g_strdup_printf(_("Exporting File Through DCMTK:\n %s"), dirname); continue_work = (*update_func)(update_data, temp_str, (gdouble) 0.0); g_free(temp_str); } total_planes = dim.z*dim.g*dim.t; divider = ((total_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (gint) rint(total_planes/AMITK_UPDATE_DIVIDER); image_num=0; j_voxel = zero_voxel; i_voxel = zero_voxel; for (i_voxel.t = 0; (i_voxel.t < dim.t) && (continue_work); i_voxel.t++) { insert_int_str(dcm_ds, DCM_ActualFrameDuration, (int) (1000*amitk_data_set_get_frame_duration(ds,i_voxel.t))); /* into ms */ insert_double_str(dcm_ds,DCM_FrameReferenceTime, 1000.0*amitk_data_set_get_start_time(ds,i_voxel.t)); /* ContentDate/Time is actually when the pixel data is generated, not when the acquisition is started... so technically the below is wrong. Only including this because ContentDate/Time is apparently a Type 1 (required) parameter. */ generate_dicom_date_and_time(AMITK_DATA_SET_SCAN_DATE(ds), amitk_data_set_get_start_time(ds, i_voxel.t), &date_str, &time_str); insert_str(dcm_ds, DCM_ContentDate, date_str); insert_str(dcm_ds, DCM_ContentTime, time_str); g_free(date_str); g_free(time_str); for (i_voxel.g = 0 ; (i_voxel.g < dim.g) && (continue_work); i_voxel.g++) { /* if gated study, write in gate info */ if (AMITK_DATA_SET_DIM_G(ds) > 1) { insert_int_str(dcm_ds, DCM_TemporalPositionIdentifier, i_voxel.g+1); /* starts at 1, not 0 */ insert_double_str(dcm_ds,DCM_TriggerTime, 1000.0*amitk_data_set_get_gate_time(ds,i_voxel.g)); /* into ms */ } /* reset the output slice */ amitk_space_set_offset(AMITK_SPACE(output_volume), output_start_pt); for (i_voxel.z = 0 ; (i_voxel.z < dim.z) && (continue_work); i_voxel.z++, image_num++) { if (update_func != NULL) { x = div(image_num,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) image_num)/((gdouble) total_planes)); } /* get our transfer buffer */ buffer = g_try_malloc0(buffer_size); if (buffer == NULL) { g_warning(_("Could not malloc transfer buffer")); goto cleanup; } /* set things up if resliced or format changing */ if (resliced) { slice = amitk_data_set_get_slice(ds, amitk_data_set_get_start_time(ds,i_voxel.t), amitk_data_set_get_frame_duration(ds,i_voxel.t), i_voxel.g, pixel_size, output_volume); if ((AMITK_DATA_SET_DIM_X(slice) != dim.x) || (AMITK_DATA_SET_DIM_Y(slice) != dim.y)) { g_warning(_("Error in generating resliced data, %dx%d != %dx%d"), AMITK_DATA_SET_DIM_X(slice), AMITK_DATA_SET_DIM_Y(slice), dim.x, dim.y); goto cleanup; } min = amitk_data_set_get_global_min(slice); max = amitk_data_set_get_global_max(slice); } else if (format_changing) { amitk_data_set_slice_calc_min_max(ds, i_voxel.t, i_voxel.g, i_voxel.z, &min, &max); } /* transfer into the new buffer */ if (format_changing) { max = MAX(fabs(min), max); sshort_buffer = (amitk_format_SSHORT_t *) buffer; i=0; for (i_voxel.y=0, j_voxel.y=0; i_voxel.y < dim.y; i_voxel.y++, j_voxel.y++) for (i_voxel.x=0, j_voxel.x = 0; i_voxel.x < dim.x; i_voxel.x++, j_voxel.x++,i++) { if (resliced) value = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(slice, j_voxel); else value = amitk_data_set_get_value(ds, i_voxel); sshort_buffer[i] = (amitk_format_SSHORT_t) rint(amitk_format_max[AMITK_FORMAT_SSHORT]*value/max); } } else { /* short or char type */ i_voxel.y = 0; i_voxel.x = 0; memcpy(buffer, amitk_raw_data_get_pointer(AMITK_DATA_SET_RAW_DATA(ds), i_voxel), buffer_size); } /* convert to little endian */ /* note, ushort conversion is exactly the same as sshort, so the below works */ if (format_size_short) { i=0; sshort_buffer = (amitk_format_SSHORT_t *) buffer; for (i_voxel.y=0; i_voxel.y < dim.y; i_voxel.y++) for (i_voxel.x=0; i_voxel.x < dim.x; i_voxel.x++,i++) sshort_buffer[i] = GINT16_TO_LE(sshort_buffer[i]); } /* and store */ dcm_ds->putAndInsertUint8Array(DCM_PixelData, (Uint8*) buffer, buffer_size); dcm_ds->putAndInsertUint16(DCM_ImageIndex, image_num); /* store the scaling factor and offset */ insert_double_str(dcm_ds,DCM_RescaleSlope, (resliced || format_changing) ? max/amitk_format_max[AMITK_FORMAT_SSHORT] : amitk_data_set_get_scaling_factor(ds,i_voxel)); insert_double_str(dcm_ds,DCM_RescaleIntercept, (resliced || format_changing) ? 0.0 : amitk_data_set_get_scaling_intercept(ds,i_voxel)); /* and get it an identifier */ dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT); insert_str(dcm_ds,DCM_SOPInstanceUID,uid); /* set the meta info as well */ dcm_metainfo->putAndInsertString(DCM_MediaStorageSOPInstanceUID,uid); /* and some other data */ insert_int_str(dcm_ds,DCM_InstanceNumber, image_num); /* and save it's position in space - see note in dicom_read_file about DICOM versus AMIDE conventions */ dicom_offset = AMITK_SPACE_OFFSET(output_volume); dicom_offset.y = -1.0*dicom_offset.y; /* DICOM specifies y axis in wrong direction */ dicom_offset.z = -1.0*dicom_offset.z; /* DICOM specifies z axis in wrong direction */ insert_double3_str(dcm_ds, DCM_ImagePositionPatient, dicom_offset.x,dicom_offset.y, dicom_offset.z); insert_double_str(dcm_ds, DCM_SliceLocation, dicom_offset.z); /* and write it on out */ filename = g_strdup_printf("%s%sIMG%05d",subdirname,G_DIR_SEPARATOR_S,image_num); full_filename = g_strdup_printf("%s%s%s",dirname, G_DIR_SEPARATOR_S,filename); status = dcm_format.saveFile(full_filename, EXS_LittleEndianExplicit); if (status.bad()) { g_warning(_("couldn't write out file %s, error %s"), full_filename, status.text()); goto cleanup; } /* add it to the DICOMDIR file */ status = dcm_dir.addDicomFile(filename,dirname); if (status.bad()) { g_warning(_("couldn't append file %s to DICOMDIR %s, error %s"), filename, dirname, status.text()); goto cleanup; } /* cleanups */ if (filename != NULL) { g_free(filename); filename = NULL; } if (full_filename != NULL) { g_free(full_filename); full_filename = NULL; } if (buffer != NULL) { g_free(buffer); buffer = NULL; } if (slice != NULL) slice = AMITK_DATA_SET(amitk_object_unref(slice)); /* advance for next iteration */ new_offset = zero_point; new_offset.z += voxel_size.z; amitk_space_set_offset(AMITK_SPACE(output_volume), amitk_space_s2b(AMITK_SPACE(output_volume), new_offset)); } /* i_voxel.z */ } /* i_voxel.g */ } /* i_voxel.t */ status = dcm_dir.writeDicomDir(); if (status.bad()) { g_warning(_("Failed to write DICOMDIR file, error %s\n"), status.text()); goto cleanup; } successful = TRUE; /* whew! made it */ cleanup: if (output_volume != NULL) output_volume = AMITK_VOLUME(amitk_object_unref(output_volume)); if (slice != NULL) slice = AMITK_DATA_SET(amitk_object_unref(slice)); if (buffer != NULL) g_free(buffer); if (filename != NULL) g_free(filename); if (full_filename != NULL) g_free(full_filename); if (subdirname != NULL) g_free(subdirname); if (full_subdirname != NULL) g_free(full_subdirname); if (dirname != NULL) g_free(dirname); if (dcmdir_filename != NULL) g_free(dcmdir_filename); if (update_func != NULL) /* remove progress bar */ (*update_func)(update_data, NULL, (gdouble) 2.0); setlocale(LC_NUMERIC, saved_time_locale); setlocale(LC_NUMERIC, saved_numeric_locale); g_free(saved_time_locale); g_free(saved_numeric_locale); return successful; } #endif /* AMIDE_LIBDCMDATA_SUPPORT */ amide-1.0.5/src/amide_gnome.h0000664000175000017500000000212612270274603015656 0ustar loeningloening/* amide_gnome.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2007-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMIDE_GNOME_H__ #define __AMIDE_GNOME_H__ #include G_BEGIN_DECLS gboolean amide_gnome_help_display (const char *file_name, const char *link_id, GError **error); G_END_DECLS #endif /* __AMIDE_GNOME_H__ */ amide-1.0.5/src/amitk_common.c0000664000175000017500000002513212270306746016070 0ustar loeningloening/* amitk_common.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2004-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" //#include //#include //#include #include #include #include #include "amitk_type_builtins.h" #include "amitk_common.h" /* external variables */ gchar * amitk_limit_names[AMITK_THRESHOLD_STYLE_NUM][AMITK_LIMIT_NUM] = { { N_("Min"), N_("Max") }, { N_("Center"), N_("Width") } }; gchar * amitk_window_names[] = { // N_("Bone"), // N_("Soft Tissue") N_("Abdomen"), N_("Brain"), N_("Extremities"), N_("Liver"), N_("Lung"), N_("Pelvis, soft tissue"), N_("Skull Base"), N_("Spine A"), N_("Spine B"), N_("Thorax, soft tissue") }; /* external variables */ PangoFontDescription * amitk_fixed_font_desc; void amitk_common_font_init(void) { #if defined (G_PLATFORM_WIN32) amitk_fixed_font_desc = pango_font_description_from_string("Tahoma 10"); #else amitk_fixed_font_desc = pango_font_description_from_string("Monospace 9"); #endif /* actually, these fonts aren't fixed width... but it's what I've been using */ // amitk_fixed_font_desc = pango_font_description_from_string("Sans 9"); // amitk_fixed_font_desc = pango_font_description_from_string("-*-helvetica-medium-r-normal-*-*-120-*-*-*-*-*-*"); return; } /* little utility function, appends str to pstr, handles case of pstr pointing to NULL */ void amitk_append_str_with_newline(gchar ** pstr, const gchar * format, ...) { va_list args; gchar * temp_str; gchar * error_str; if (pstr == NULL) return; va_start (args, format); error_str = g_strdup_vprintf(format, args); va_end (args); if (*pstr != NULL) { temp_str = g_strdup_printf("%s\n%s", *pstr, error_str); g_free(*pstr); *pstr = temp_str; } else { *pstr = g_strdup(error_str); } g_free(error_str); } void amitk_append_str(gchar ** pstr, const gchar * format, ...) { va_list args; gchar * temp_str; gchar * error_str; if (pstr == NULL) return; va_start (args, format); error_str = g_strdup_vprintf(format, args); va_end (args); if (*pstr != NULL) { temp_str = g_strdup_printf("%s%s", *pstr, error_str); g_free(*pstr); *pstr = temp_str; } else { *pstr = g_strdup(error_str); } g_free(error_str); } /* this function's use is a bit of a cludge GTK typically uses %f for changing a float to text to display in a table Here we overwrite the typical conversion with a %g conversion */ void amitk_real_cell_data_func(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) { gdouble value; gchar *text; gint column = GPOINTER_TO_INT(data); /* Get the double value from the model. */ gtk_tree_model_get (tree_model, iter, column, &value, -1); /* Now we can format the value ourselves. */ text = g_strdup_printf ("%g", value); g_object_set (cell, "text", text, NULL); g_free (text); return; } gint amitk_spin_button_scientific_output (GtkSpinButton *spin_button, gpointer data) { gchar *buf = g_strdup_printf ("%g", spin_button->adjustment->value); if (strcmp (buf, gtk_entry_get_text (GTK_ENTRY (spin_button)))) gtk_entry_set_text (GTK_ENTRY (spin_button), buf); g_free (buf); return TRUE; /* non-zero forces the default output function not to run */ } /* this function exists, because double or triple clicking on the arrows in a spin button goes into an endless loop if that spin button is in a toolbar, at least in gtk as of version 2.24.22. */ gint amitk_spin_button_discard_double_or_triple_click(GtkWidget *widget, GdkEventButton *event, gpointer func_data) { if ((event->type==GDK_2BUTTON_PRESS || event->type==GDK_3BUTTON_PRESS)) return TRUE; else return FALSE; } /* The following function should return a pixbuf representing the currently shown data on the canvas (within the specified height/width at the given offset). -The code is based on gnome_canvas_paint_rect in gnome-canvas.c */ GdkPixbuf * amitk_get_pixbuf_from_canvas(GnomeCanvas * canvas, gint xoffset, gint yoffset, gint width, gint height) { GdkPixbuf * pixbuf; if (canvas->aa) { GnomeCanvasBuf buf; GdkColor *color; guchar * px; px = g_new (guchar, width*height * 3); buf.buf = px; buf.buf_rowstride = width * 3; buf.rect.x0 = xoffset; buf.rect.y0 = yoffset; buf.rect.x1 = xoffset+width; buf.rect.y1 = yoffset+height; color = >K_WIDGET(canvas)->style->bg[GTK_STATE_NORMAL]; buf.bg_color = (((color->red & 0xff00) << 8) | (color->green & 0xff00) | (color->blue >> 8)); buf.is_bg = 1; buf.is_buf = 0; /* render the background */ if ((* GNOME_CANVAS_GET_CLASS(canvas)->render_background) != NULL) (* GNOME_CANVAS_GET_CLASS(canvas)->render_background) (canvas, &buf); /* render the rest */ if (canvas->root->object.flags & GNOME_CANVAS_ITEM_VISIBLE) (* GNOME_CANVAS_ITEM_GET_CLASS (canvas->root)->render) (canvas->root, &buf); if (buf.is_bg) { g_warning("No code written to implement case buf.is_bg: %s at %d\n", __FILE__, __LINE__); pixbuf = NULL; } else { pixbuf = gdk_pixbuf_new_from_data(buf.buf, GDK_COLORSPACE_RGB, FALSE, 8, width, height,width*3, NULL, NULL); } } else { GdkPixmap * pixmap; pixmap = gdk_pixmap_new (canvas->layout.bin_window, width, height, gtk_widget_get_visual (GTK_WIDGET(canvas))->depth); /* draw the background */ (* GNOME_CANVAS_GET_CLASS(canvas)->draw_background) (canvas, pixmap, xoffset, yoffset, width, height); /* force a draw onto the pixmap */ (* GNOME_CANVAS_ITEM_GET_CLASS (canvas->root)->draw) (canvas->root, pixmap,xoffset, yoffset, width, height); /* transfer to a pixbuf */ pixbuf = gdk_pixbuf_get_from_drawable (NULL,GDK_DRAWABLE(pixmap),NULL,0,0,0,0,-1,-1); g_object_unref(pixmap); } return pixbuf; } gboolean amitk_is_xif_directory(const gchar * filename, gboolean * plegacy1, gchar ** pxml_filename) { struct stat file_info; gchar * temp_str; DIR * directory; struct dirent * directory_entry; gchar *xifname; gint length; /* remove any trailing directory characters */ length = strlen(filename); if ((length >= 1) && (strcmp(filename+length-1, G_DIR_SEPARATOR_S) == 0)) length--; xifname = g_strndup(filename, length); if (stat(xifname, &file_info) != 0) return FALSE; /* file doesn't exist */ if (!S_ISDIR(file_info.st_mode)) return FALSE; /* check for legacy .xif file (< 2.0 version) */ temp_str = g_strdup_printf("%s%sStudy.xml", xifname, G_DIR_SEPARATOR_S); if (stat(temp_str, &file_info) == 0) { if (plegacy1 != NULL) *plegacy1 = TRUE; if (pxml_filename != NULL) *pxml_filename = temp_str; else g_free(temp_str); return TRUE; } g_free(temp_str); /* figure out the name of the study file */ directory = opendir(xifname); /* currently, only looks at the first study_*.xml file... there should be only one anyway */ if (directory != NULL) { while (((directory_entry = readdir(directory)) != NULL)) if (g_pattern_match_simple("study_*.xml", directory_entry->d_name)) { if (plegacy1 != NULL) *plegacy1 = FALSE; if (pxml_filename != NULL) *pxml_filename = g_strdup(directory_entry->d_name); closedir(directory); return TRUE; } } closedir(directory); return FALSE; } gboolean amitk_is_xif_flat_file(const gchar * filename, guint64 * plocation_le, guint64 *psize_le) { struct stat file_info; FILE * study_file; guint64 location_le, size_le; gchar magic[64]; if (stat(filename, &file_info) != 0) return FALSE; /* file doesn't exist */ if (S_ISDIR(file_info.st_mode)) return FALSE; /* Note, "rb" is same as "r" on Unix, but not in Windows */ if ((study_file = fopen(filename, "rb")) == NULL) return FALSE; /* check magic string */ fread(magic, sizeof(gchar), 64, study_file); if (strncmp(magic, AMITK_FLAT_FILE_MAGIC_STRING, strlen(AMITK_FLAT_FILE_MAGIC_STRING)) != 0) { fclose(study_file); return FALSE; } /* get area of file to read for initial XML data */ fread(&location_le, sizeof(guint64), 1, study_file); fread(&size_le, sizeof(guint64), 1, study_file); if (plocation_le != NULL) *plocation_le = location_le; if (psize_le != NULL) *psize_le = size_le; fclose(study_file); return TRUE; } const gchar * amitk_layout_get_name(const AmitkLayout layout) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_LAYOUT); enum_value = g_enum_get_value(enum_class, layout); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_panel_layout_get_name(const AmitkPanelLayout panel_layout) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_PANEL_LAYOUT); enum_value = g_enum_get_value(enum_class, panel_layout); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_limit_get_name(const AmitkLimit limit) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_LIMIT); enum_value = g_enum_get_value(enum_class, limit); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_window_get_name (const AmitkWindow window) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_WINDOW); enum_value = g_enum_get_value(enum_class, window); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_modality_get_name(const AmitkModality modality) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_MODALITY); enum_value = g_enum_get_value(enum_class, modality); g_type_class_unref(enum_class); return enum_value->value_nick; } amide-1.0.5/src/amitk_color_table.c0000664000175000017500000003727112270273656017077 0ustar loeningloening/* amitk_color_table.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include #include "amitk_common.h" #include "amitk_color_table.h" #include "amitk_type_builtins.h" /* external variables */ /* don't change these, as legacy.c needs them for reading in files */ gchar * color_table_menu_names[] = { N_("black/white linear"), N_("white/black linear"), N_("black/white/black"), N_("white/black/white"), N_("red temperature"), N_("inverse red temp."), N_("blue temperature"), N_("inv. blue temp."), N_("green temperature"), N_("inv. green temp."), N_("hot metal"), N_("inv. hot metal"), N_("hot metal contour"), N_("inv. hot metal c."), N_("hot blue"), N_("inverse hot blue"), N_("hot green"), N_("inverse hot green"), N_("spectrum"), N_("inverse spectrum"), N_("NIH + white"), N_("inv. NIH + white"), N_("NIH"), N_("inverse NIH") }; /* internal functions */ static rgb_t hsv_to_rgb(hsv_t * hsv); /* this algorithm is derived from "Computer Graphics: principles and practice" */ /* hue = [0 360], s and v are in [0,1] */ static rgb_t hsv_to_rgb(hsv_t * hsv) { rgb_t rgb; hsv_data_t fraction, p,q,t; gint whole; if (hsv->s == 0.0) /* saturation is zero (on black white line)n */ rgb.r = rgb.g = rgb.b = UCHAR_MAX * hsv->v; /* achromatic case */ else { if (hsv->h == 360.0) hsv->h = 0.0; /* from [0 360] to [0 360) */ whole = floor(hsv->h/60.0); fraction = (hsv->h/60.0) - whole; p = hsv->v*(1.0-hsv->s); q = hsv->v*(1.0-(hsv->s*fraction)); t = hsv->v*(1.0-(hsv->s*(1.0-fraction))); switch(whole) { case 0: rgb.r = UCHAR_MAX * hsv->v; rgb.g = UCHAR_MAX * t; rgb.b = UCHAR_MAX * p; break; case 1: rgb.r = UCHAR_MAX * q; rgb.g = UCHAR_MAX * hsv->v; rgb.b = UCHAR_MAX * p; break; case 2: rgb.r = UCHAR_MAX * p; rgb.g = UCHAR_MAX * hsv->v; rgb.b = UCHAR_MAX * t; break; case 3: rgb.r = UCHAR_MAX * p; rgb.g = UCHAR_MAX * q; rgb.b = UCHAR_MAX * hsv->v; break; case 4: rgb.r = UCHAR_MAX * t; rgb.g = UCHAR_MAX * p; rgb.b = UCHAR_MAX * hsv->v; break; case 5: rgb.r = UCHAR_MAX * hsv->v; rgb.g = UCHAR_MAX * p; rgb.b = UCHAR_MAX * q; break; default: /* should never get here */ rgb.r = rgb.g = rgb.b = 0; break; } } return rgb; } rgba_t amitk_color_table_lookup(amide_data_t datum, AmitkColorTable which, amide_data_t min, amide_data_t max) { rgba_t temp_rgba; rgba_t rgba; rgb_t rgb; hsv_t hsv; amide_data_t scale; amide_data_t temp; gboolean not_a_number=FALSE; /* if not a number, computer as min value, and then set to transparent */ if (isnan(datum)) { datum = min; not_a_number = TRUE; } switch(which) { case AMITK_COLOR_TABLE_BWB_LINEAR: temp = 2*(datum-min) * 0xFF/(max-min); if (temp > 255) temp = 511-temp; if (temp < 0) temp = 0; rgba.r = temp; rgba.g = temp; rgba.b = temp; rgba.a = temp; break; case AMITK_COLOR_TABLE_WBW_LINEAR: rgba = amitk_color_table_lookup(datum, AMITK_COLOR_TABLE_BWB_LINEAR, min, max); rgba.r = 0xFF-rgba.r; rgba.g = 0xFF-rgba.g; rgba.b = 0xFF-rgba.b; break; case AMITK_COLOR_TABLE_RED_TEMP: /* this may not be exactly right.... */ scale = 0xFF/(max-min); temp = (datum-min)/(max-min); if (temp > 1.0) rgba.r = rgba.g = rgba.b = rgba.a = 0xFF; else if (temp < 0.0) rgba.r = rgba.g = rgba.b = rgba.a = 0; else { rgba.r = temp >= 0.70 ? 0xFF : scale*(datum-min)/0.70; rgba.g = temp >= 0.50 ? 2*scale*(datum-min/2.0-max/2.0) : 0; rgba.b = temp >= 0.50 ? 2*scale*(datum-min/2.0-max/2.0) : 0; rgba.a = 0xFF*temp; } break; case AMITK_COLOR_TABLE_INV_RED_TEMP: rgba = amitk_color_table_lookup((max-datum)+min, AMITK_COLOR_TABLE_RED_TEMP, min, max); rgba.a = 0xFF-rgba.a; break; case AMITK_COLOR_TABLE_BLUE_TEMP: temp_rgba = amitk_color_table_lookup(datum, AMITK_COLOR_TABLE_RED_TEMP, min, max); rgba.r = temp_rgba.b; rgba.g = temp_rgba.g; rgba.b = temp_rgba.r; rgba.a = temp_rgba.a; break; case AMITK_COLOR_TABLE_INV_BLUE_TEMP: rgba = amitk_color_table_lookup((max-datum)+min, AMITK_COLOR_TABLE_BLUE_TEMP, min, max); rgba.a = 0xFF-rgba.a; break; case AMITK_COLOR_TABLE_GREEN_TEMP: temp_rgba = amitk_color_table_lookup(datum, AMITK_COLOR_TABLE_RED_TEMP, min, max); rgba.r = temp_rgba.g; rgba.g = temp_rgba.r; rgba.b = temp_rgba.b; rgba.a = temp_rgba.a; break; case AMITK_COLOR_TABLE_INV_GREEN_TEMP: rgba = amitk_color_table_lookup((max-datum)+min, AMITK_COLOR_TABLE_GREEN_TEMP, min, max); rgba.a = 0xFF-rgba.a; break; case AMITK_COLOR_TABLE_HOT_METAL: /* derived from code in xmedcon (by Erik Nolf) */ temp = ((datum-min)/(max-min)); /* between 0.0 and 1.0 */ if (temp > 1.0) rgba.r = rgba.g = rgba.b = rgba.a = 0xFF; else if (temp < 0.0) rgba.r = rgba.g = rgba.b = rgba.a = 0; else { /* several "magic" numbers are used, i.e. I have no idea how they're derived, but they work..... red: distributed between 0-181 (out of 255) green: distributed between 128-218 (out of 255) blue: distributed between 192-255 (out of 255) */ rgba.r = (temp >= (182.0/255.0)) ? 0xFF : 0xFF*temp*(255.0/182); rgba.g = (temp < (128.0/255.0)) ? 0x00 : ((temp >= (219.0/255.0)) ? 0xFF : 0xFF*(temp-128.0/255.0)*(255.0/91.0)); rgba.b = (temp >= (192.0/255.0)) ? 0xFF*(temp-192.0/255)*(255.0/63.0) : 0x00 ; rgba.a = 0xFF*temp; } break; case AMITK_COLOR_TABLE_INV_HOT_METAL: rgba = amitk_color_table_lookup((max-datum)+min, AMITK_COLOR_TABLE_HOT_METAL, min, max); rgba.a = 0xFF-rgba.a; break; case AMITK_COLOR_TABLE_HOT_METAL_CONTOUR: temp = 2*(datum-min) * 0xFF/(max-min); if (temp > 255) temp = 511-temp; if (temp < 0) temp = 0; rgba = amitk_color_table_lookup(temp, AMITK_COLOR_TABLE_HOT_METAL, 0, 255); break; case AMITK_COLOR_TABLE_INV_HOT_METAL_CONTOUR: temp = 2*(datum-min) * 0xFF/(max-min); if (temp > 255) temp = 511-temp; if (temp < 0) temp = 0; rgba = amitk_color_table_lookup(temp, AMITK_COLOR_TABLE_INV_HOT_METAL, 0, 255); break; case AMITK_COLOR_TABLE_HOT_BLUE: temp_rgba = amitk_color_table_lookup(datum, AMITK_COLOR_TABLE_HOT_METAL, min, max); rgba.r = temp_rgba.b; rgba.g = temp_rgba.g; rgba.b = temp_rgba.r; rgba.a = temp_rgba.a; break; case AMITK_COLOR_TABLE_INV_HOT_BLUE: rgba = amitk_color_table_lookup((max-datum)+min, AMITK_COLOR_TABLE_HOT_BLUE, min, max); rgba.a = 0xFF-rgba.a; break; case AMITK_COLOR_TABLE_HOT_GREEN: temp_rgba = amitk_color_table_lookup(datum, AMITK_COLOR_TABLE_HOT_METAL, min, max); rgba.r = temp_rgba.g; rgba.g = temp_rgba.r; rgba.b = temp_rgba.b; rgba.a = temp_rgba.a; break; case AMITK_COLOR_TABLE_INV_HOT_GREEN: rgba = amitk_color_table_lookup((max-datum)+min, AMITK_COLOR_TABLE_HOT_GREEN, min, max); rgba.a = 0xFF-rgba.a; break; case AMITK_COLOR_TABLE_SPECTRUM: temp = ((datum-min)/(max-min)); hsv.s = 1.0; hsv.v = 1.0; if (temp > 1.0) { hsv.h = 360.0; rgba.a = 0xFF; } else if (temp < 0.0) { hsv.h = 0.0; rgba.a = 0; } else { hsv.h = 360.0*temp; rgba.a = 0xFF*temp; } rgb = hsv_to_rgb(&hsv); rgba.r = rgb.r; rgba.g = rgb.g; rgba.b = rgb.b; break; case AMITK_COLOR_TABLE_INV_SPECTRUM: rgba = amitk_color_table_lookup((max-datum)+min, AMITK_COLOR_TABLE_SPECTRUM, min, max); rgba.a = 0xFF-rgba.a; break; case AMITK_COLOR_TABLE_NIH: /* this algorithm is a complete guess, don't trust it */ temp = ((datum-min)/(max-min)); hsv.s = 1.0; if (temp < 0.0) hsv.v = 0.0; else if (temp > 0.2) hsv.v = 1.0; else hsv.v = 5*temp; if (temp > 1.0) { hsv.h = 0.0; rgba.a = 0xFF; } else if (temp < 0.0) { hsv.h = 300.0; rgba.a = 0; } else { hsv.h = 300.0*(1.0-temp); rgba.a = 0xFF*temp; } rgb = hsv_to_rgb(&hsv); rgba.r = rgb.r; rgba.g = rgb.g; rgba.b = rgb.b; break; case AMITK_COLOR_TABLE_INV_NIH: rgba = amitk_color_table_lookup((max-datum)+min, AMITK_COLOR_TABLE_NIH, min, max); rgba.a = 0xFF-rgba.a; break; case AMITK_COLOR_TABLE_NIH_WHITE: /* this algorithm is a complete guess, don't trust it */ temp = ((datum-min)/(max-min)); hsv.s = 1.0; if (temp < 0.0) hsv.v = 0.0; else if (temp > 0.2) hsv.v = 1.0; else hsv.v = 5*temp; if (temp > 1.0) { hsv.s = hsv.h = 0.0; rgba.a = 0xFF; } else if (temp < 0.0) { hsv.h = 300.0; rgba.a = 0; } else { hsv.h = 300.0*(1.0-temp); rgba.a = 0xFF * temp; } rgb = hsv_to_rgb(&hsv); rgba.r = rgb.r; rgba.g = rgb.g; rgba.b = rgb.b; break; case AMITK_COLOR_TABLE_INV_NIH_WHITE: rgba = amitk_color_table_lookup((max-datum)+min, AMITK_COLOR_TABLE_NIH_WHITE, min, max); rgba.a = 0xFF-rgba.a; break; case AMITK_COLOR_TABLE_WB_LINEAR: rgba = amitk_color_table_lookup((max-datum)+min, AMITK_COLOR_TABLE_BW_LINEAR, min, max); rgba.a = 0xFF-rgba.a; break; case AMITK_COLOR_TABLE_BW_LINEAR: default: temp = (datum-min) * 0xFF/(max-min); if (temp > 255) temp = 255; else if (temp < 0) temp = 0; rgba.r = temp; rgba.g = temp; rgba.b = temp; rgba.a = temp; break; } if (not_a_number) rgba.a = 0; return rgba; } rgba_t amitk_color_table_uint32_to_rgba(guint32 color_uint32) { rgba_t rgba; rgba.r = (color_uint32 >> 24) & 0x000000FF; rgba.g = (color_uint32 >> 16) & 0x000000FF; rgba.b = (color_uint32 >> 8) & 0x000000FF; rgba.a = (color_uint32 >> 0) & 0x000000FF; return rgba; } rgba_t amitk_color_table_outline_color(AmitkColorTable which, gboolean highlight) { rgba_t rgba, normal_rgba, highlight_rgba; switch(which) { case AMITK_COLOR_TABLE_RED_TEMP: case AMITK_COLOR_TABLE_INV_RED_TEMP: normal_rgba = amitk_color_table_lookup(1.0, which, 0.0,1.0); normal_rgba.r = 0x00; normal_rgba.g = 0xFF; normal_rgba.b = 0x80; highlight_rgba.r = 0x00; highlight_rgba.g = 0xFF; highlight_rgba.b = 0xFF; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_BLUE_TEMP: case AMITK_COLOR_TABLE_INV_BLUE_TEMP: normal_rgba = amitk_color_table_lookup(1.0, which, 0.0,1.0); normal_rgba.r = 0xFF; normal_rgba.g = 0x80; normal_rgba.b = 0x00; highlight_rgba.r = 0xFF; highlight_rgba.g = 0xFF; highlight_rgba.b = 0x00; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_GREEN_TEMP: case AMITK_COLOR_TABLE_INV_GREEN_TEMP: normal_rgba = amitk_color_table_lookup(1.0, which, 0.0,1.0); normal_rgba.r = 0x00; normal_rgba.g = 0x80; normal_rgba.b = 0xFF; highlight_rgba.r = 0xFF; highlight_rgba.g = 0x00; highlight_rgba.b = 0xFF; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_HOT_METAL: case AMITK_COLOR_TABLE_INV_HOT_METAL: normal_rgba = amitk_color_table_lookup(1.0, which, 0.0,1.0); normal_rgba.r = 0x00; normal_rgba.g = 0xFF; normal_rgba.b = 0x80; highlight_rgba.r = 0x00; highlight_rgba.g = 0xFF; highlight_rgba.b = 0xFF; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_HOT_METAL_CONTOUR: case AMITK_COLOR_TABLE_INV_HOT_METAL_CONTOUR: normal_rgba = amitk_color_table_lookup(0.5, which, 0.0,1.0); normal_rgba.r = 0x00; normal_rgba.g = 0xFF; normal_rgba.b = 0x80; highlight_rgba.r = 0x00; highlight_rgba.g = 0xFF; highlight_rgba.b = 0xFF; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_HOT_BLUE: case AMITK_COLOR_TABLE_INV_HOT_BLUE: normal_rgba = amitk_color_table_lookup(1.0, which, 0.0,1.0); normal_rgba.r = 0xFF; normal_rgba.g = 0x80; normal_rgba.b = 0x00; highlight_rgba.r = 0xFF; highlight_rgba.g = 0xFF; highlight_rgba.b = 0x00; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_HOT_GREEN: case AMITK_COLOR_TABLE_INV_HOT_GREEN: normal_rgba = amitk_color_table_lookup(1.0, which, 0.0,1.0); normal_rgba.r = 0x80; normal_rgba.g = 0x00; normal_rgba.b = 0xFF; highlight_rgba.r = 0xFF; highlight_rgba.g = 0x00; highlight_rgba.b = 0xFF; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_SPECTRUM: case AMITK_COLOR_TABLE_INV_SPECTRUM: normal_rgba.r = normal_rgba.g = normal_rgba.b = normal_rgba.a = 0xFF; highlight_rgba.r = highlight_rgba.g = highlight_rgba.b = 0x00; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_NIH: case AMITK_COLOR_TABLE_INV_NIH: normal_rgba.r = normal_rgba.g = normal_rgba.b = normal_rgba.a = 0xFF; highlight_rgba.r = 0xFF; highlight_rgba.g = 0x80; highlight_rgba.b = 0x00; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_NIH_WHITE: case AMITK_COLOR_TABLE_INV_NIH_WHITE: normal_rgba = amitk_color_table_lookup(1.0, which, 0.0,1.0); highlight_rgba.r = 0xFF; highlight_rgba.g = 0x80; highlight_rgba.b = 0x00; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_WBW_LINEAR: normal_rgba = amitk_color_table_lookup(0.5, which, 0.0,1.0); normal_rgba.r = 0xFF; normal_rgba.g = 0x00; normal_rgba.b = 0x00; highlight_rgba.r = 0xF0; highlight_rgba.g = 0xF0; highlight_rgba.b = 0x00; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_WB_LINEAR: normal_rgba = amitk_color_table_lookup(1.0, which, 0.0,1.0); normal_rgba.r = 0xFF; normal_rgba.g = 0x00; normal_rgba.b = 0x00; highlight_rgba.r = 0xF0; highlight_rgba.g = 0xF0; highlight_rgba.b = 0x00; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_BWB_LINEAR: normal_rgba = amitk_color_table_lookup(0.5, which, 0.0,1.0); normal_rgba.r = 0xFF; normal_rgba.g = 0x00; normal_rgba.b = 0x00; highlight_rgba.r = 0xFF; highlight_rgba.g = 0xFF; highlight_rgba.b = 0x00; highlight_rgba.a = normal_rgba.a; break; case AMITK_COLOR_TABLE_BW_LINEAR: default: normal_rgba = amitk_color_table_lookup(1.0, which, 0.0,1.0); normal_rgba.r = 0xFF; normal_rgba.g = 0x00; normal_rgba.b = 0x00; highlight_rgba.r = 0xFF; highlight_rgba.g = 0xFF; highlight_rgba.b = 0x00; highlight_rgba.a = normal_rgba.a; break; } if (highlight) rgba = highlight_rgba; else rgba = normal_rgba; return rgba; } const gchar * amitk_color_table_get_name(const AmitkColorTable which) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_COLOR_TABLE); enum_value = g_enum_get_value(enum_class, which); g_type_class_unref(enum_class); return enum_value->value_nick; } amide-1.0.5/src/libmdc_interface.c0000644000175000017500000011463012270273777016674 0ustar loeningloening/* libmdc_interface.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "amide_config.h" #ifdef AMIDE_LIBMDC_SUPPORT #include "amitk_data_set.h" #include "amitk_data_set_DOUBLE_0D_SCALING.h" #include "libmdc_interface.h" #include #include #include static char * libmdc_unknown = "Unknown"; libmdc_format_t libmdc_import_to_format[LIBMDC_NUM_IMPORT_METHODS] = { LIBMDC_NONE, LIBMDC_GIF, LIBMDC_ACR, LIBMDC_CONC, LIBMDC_ECAT6, LIBMDC_ECAT7, LIBMDC_INTF, LIBMDC_ANLZ, LIBMDC_DICM, LIBMDC_NIFTI }; gchar * libmdc_import_menu_names[LIBMDC_NUM_IMPORT_METHODS] = { N_("(_X)MedCon Guess"), N_("_GIF 87a/89a"), N_("Acr/_Nema 2.0"), N_("_Siemens/Concorde"), N_("ECAT _6 via (X)MedCon"), N_("ECAT _7 via (X)MedCon"), N_("_InterFile 3.3"), N_("_Analyze (SPM)"), N_("_DICOM 3.0 via (X)MedCon"), N_("_NIFTI via (X)MedCon") }; gchar * libmdc_import_menu_explanations[LIBMDC_NUM_IMPORT_METHODS] = { N_("let (X)MedCon/libmdc guess file type"), N_("Import a file stored as GIF"), N_("Import a Acr/Nema 2.0 file"), N_("Import a Siemens/Concorde file"), N_("Import a CTI/ECAT 6 file through (X)MedCon"), N_("Import a CTI/ECAT 7 file through (X)MedCon"), N_("Import a InterFile 3.3 file"), N_("Import an Analyze file"), N_("Import a DICOM 3.0 file through (X)MedCon"), N_("Import a NIFTI file through (X)MedCon") }; libmdc_format_t libmdc_export_to_format[LIBMDC_NUM_EXPORT_METHODS] = { LIBMDC_ACR, LIBMDC_CONC, LIBMDC_ECAT6, LIBMDC_INTF, LIBMDC_ANLZ, LIBMDC_DICM, LIBMDC_NIFTI }; gchar * libmdc_export_menu_names[LIBMDC_NUM_EXPORT_METHODS] = { N_("Acr/Nema 2.0"), N_("Siemens/Concorde"), N_("ECAT 6 via (X)MedCon"), N_("InterFile 3.3"), N_("Analyze (SPM)"), N_("DICOM 3.0 via (X)MedCon"), N_("NIFTI") }; gchar * libmdc_export_menu_explanations[LIBMDC_NUM_EXPORT_METHODS] = { N_("Export a Acr/Nema 2.0 file"), N_("Export a Siemens/Concorde file"), N_("Export a CTI/ECAT 6 file"), N_("Export a InterFile 3.3 file"), N_("Export an Analyze file"), N_("Export a DICOM 3.0 file"), N_("Export a NIFTI file") }; static gint libmdc_format_number(libmdc_format_t format) { switch(format) { case LIBMDC_RAW: return MDC_FRMT_RAW; break; case LIBMDC_ASCII: return MDC_FRMT_ASCII; break; case LIBMDC_GIF: return MDC_FRMT_GIF; break; case LIBMDC_ACR: return MDC_FRMT_ACR; break; case LIBMDC_CONC: return MDC_FRMT_CONC; break; case LIBMDC_ECAT6: return MDC_FRMT_ECAT6; break; case LIBMDC_ECAT7: return MDC_FRMT_ECAT7; break; case LIBMDC_INTF: return MDC_FRMT_INTF; break; case LIBMDC_ANLZ: return MDC_FRMT_ANLZ; break; case LIBMDC_DICM: return MDC_FRMT_DICM; break; case LIBMDC_NIFTI: return MDC_FRMT_NIFTI; break; case LIBMDC_NONE: /* let libmdc guess */ default: return MDC_FRMT_NONE; break; } } gboolean libmdc_supports(const libmdc_format_t format) { return FrmtSupported[libmdc_format_number(format)]; } static gint libmdc_type_number(const AmitkFormat format) { switch(format) { case AMITK_FORMAT_UBYTE: return BIT8_U; break; case AMITK_FORMAT_SBYTE: return BIT8_S; break; case AMITK_FORMAT_USHORT: return BIT16_U; break; case AMITK_FORMAT_SSHORT: return BIT16_S; break; case AMITK_FORMAT_UINT: return BIT32_U; break; case AMITK_FORMAT_SINT: return BIT32_S; break; case AMITK_FORMAT_FLOAT: return FLT32; break; case AMITK_FORMAT_DOUBLE: return FLT64; break; default: g_error("unexpected case in %s at line %d",__FILE__, __LINE__); return 0; break; } } AmitkDataSet * libmdc_import(const gchar * filename, const libmdc_format_t libmdc_format, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data) { FILEINFO libmdc_fi; gboolean libmdc_fi_init=FALSE; gint error; struct tm time_structure; AmitkVoxel i; gint j; guint64 k; AmitkDataSet * ds=NULL; gchar * name; gchar * import_filename=NULL; gchar ** frags=NULL; AmitkVoxel dim; AmitkFormat format; AmitkModality modality; div_t x; gint divider; gint total_planes; gboolean continue_work=TRUE; gboolean invalid_date; gchar * temp_string; gint image_num; gboolean salvage = FALSE; gchar * msg; gint num_corrupted_planes = 0; const gchar * bad_char; gsize invalid_point; gchar * saved_time_locale; gchar * saved_numeric_locale; gboolean use_pixdim_duration = FALSE; AmitkPoint new_offset; AmitkPoint shift; AmitkAxes new_axes; void * ds_pointer; Uint8 * conv_pointer; gint format_size; gint bytes_per_plane; gint bytes_per_row; gboolean center_data_set = FALSE; saved_time_locale = g_strdup(setlocale(LC_TIME,NULL)); saved_numeric_locale = g_strdup(setlocale(LC_NUMERIC,NULL)); setlocale(LC_TIME,"POSIX"); setlocale(LC_NUMERIC,"POSIX"); /* setup some defaults */ MDC_INFO=MDC_NO; /* don't print stuff */ MDC_VERBOSE=MDC_NO; /* and don't print stuff */ MDC_ANLZ_SPM=MDC_YES; /* if analyze format, assume SPM */ libmdc_fi.map = MDC_MAP_GRAY; /*default color map*/ MDC_MAKE_GRAY=MDC_YES; /* these are probably no longer important, as I now don't use MdcReadFile, and MdcPixelFiddle doesn't get invoked */ MDC_QUANTIFY=MDC_YES; /* want quantified data */ MDC_NEGATIVE=MDC_YES; /* allow negative values */ MDC_NORM_OVER_FRAMES = MDC_NO; /* figure out the fallback format */ if (libmdc_supports(libmdc_format)) MDC_FALLBACK_FRMT = libmdc_format_number(libmdc_format); else MDC_FALLBACK_FRMT = MDC_FRMT_NONE; /* open the file */ import_filename = g_strdup(filename); /* this gets around the facts that filename is type const */ if ((error = MdcOpenFile(&libmdc_fi, import_filename)) != MDC_OK) { g_warning(_("Can't open file %s with libmdc/(X)MedCon"),filename); goto error; } libmdc_fi_init=TRUE; /* read the file */ if ((error = MdcLoadFile(&libmdc_fi)) != MDC_OK) { g_warning(_("Can't read file %s with libmdc/(X)MedCon"),filename); goto error; } /* validate various strings to utf8 */ if (!g_utf8_validate(libmdc_fi.patient_name, -1, &bad_char)) { invalid_point = bad_char-libmdc_fi.patient_name; libmdc_fi.patient_name[invalid_point] = '\0'; } if (!g_utf8_validate(libmdc_fi.patient_id, -1, &bad_char)) { invalid_point = bad_char-libmdc_fi.patient_id; libmdc_fi.patient_id[invalid_point] = '\0'; } if (!g_utf8_validate(libmdc_fi.patient_dob, -1, &bad_char)) { invalid_point = bad_char-libmdc_fi.patient_dob; libmdc_fi.patient_dob[invalid_point] = '\0'; } if (!g_utf8_validate(libmdc_fi.study_id, -1, &bad_char)) { invalid_point = bad_char-libmdc_fi.study_id; libmdc_fi.study_id[invalid_point] = '\0'; } if (!g_utf8_validate(libmdc_fi.patient_sex, -1, &bad_char)) { invalid_point = bad_char-libmdc_fi.patient_sex; libmdc_fi.patient_sex[invalid_point] = '\0'; } if (!g_utf8_validate(libmdc_fi.recon_method, -1, &bad_char)) { invalid_point = bad_char-libmdc_fi.recon_method; libmdc_fi.recon_method[invalid_point] = '\0'; } /* make sure libmdc returned all dim's as >0 */ for (j=0; jvoxel_size.x = libmdc_fi.pixdim[1]; ds->voxel_size.y = libmdc_fi.pixdim[2]; ds->voxel_size.z = libmdc_fi.pixdim[3]; /* double check voxel size z */ if (libmdc_fi.image[0].slice_spacing > 0.0) if (libmdc_fi.image[0].slice_spacing != libmdc_fi.pixdim[3]) { g_warning(_("Pixel z dimension (%5.3f mm) not equal to slice spacing (%5.3f mm) - will use slice spacing for thickness"), libmdc_fi.pixdim[3], libmdc_fi.image[0].slice_spacing); ds->voxel_size.z = libmdc_fi.image[0].slice_spacing; } if (EQUAL_ZERO(ds->voxel_size.x)) { g_warning(_("Voxel size X was read as 0, setting to 1 mm. This may be an internationalization error.")); ds->voxel_size.x = 1.0; } if (EQUAL_ZERO(ds->voxel_size.y)) { g_warning(_("Voxel size Y was read as 0, setting to 1 mm. This may be an internationalization error.")); ds->voxel_size.y = 1.0; } if (EQUAL_ZERO(ds->voxel_size.z)) { g_warning(_("Voxel size Z was read as 0, setting to 1 mm. This may be an internationalization error.")); ds->voxel_size.z = 1.0; } /* try figuring out the name, start with the study name */ name = NULL; if (strlen(libmdc_fi.study_id) > 0) if (g_ascii_strcasecmp(libmdc_fi.study_id, libmdc_unknown) != 0) name = g_strdup(libmdc_fi.study_id); if (name == NULL) if (strlen(libmdc_fi.patient_name) > 0) if (g_ascii_strcasecmp(libmdc_fi.patient_name, libmdc_unknown) != 0) name = g_strdup(libmdc_fi.patient_name); if (name == NULL) {/* no original filename? */ temp_string = g_path_get_basename(filename); /* remove the extension of the file */ g_strreverse(temp_string); frags = g_strsplit(temp_string, ".", 2); g_free(temp_string); g_strreverse(frags[1]); name = g_strdup(frags[1]); g_strfreev(frags); /* free up now unused strings */ } /* append the reconstruction method */ if (strlen(libmdc_fi.recon_method) > 0) if (g_ascii_strcasecmp(libmdc_fi.recon_method, libmdc_unknown) != 0) { temp_string = name; name = g_strdup_printf("%s - %s", temp_string, libmdc_fi.recon_method); g_free(temp_string); } amitk_object_set_name(AMITK_OBJECT(ds),name); g_free(name); /* enter in the date the scan was performed */ invalid_date = FALSE; time_structure.tm_sec = libmdc_fi.study_time_second; time_structure.tm_min = libmdc_fi.study_time_minute; time_structure.tm_hour = libmdc_fi.study_time_hour; time_structure.tm_mday = libmdc_fi.study_date_day; if (libmdc_fi.study_date_month == 0) { invalid_date = TRUE; time_structure.tm_mon=0; } else time_structure.tm_mon = libmdc_fi.study_date_month-1; if (libmdc_fi.study_date_year == 0) { invalid_date = TRUE; time_structure.tm_year = 0; } else time_structure.tm_year = libmdc_fi.study_date_year-1900; time_structure.tm_isdst = -1; /* "-1" is suppose to let the system figure it out, was "daylight"; */ if ((mktime(&time_structure) == -1) && invalid_date) { /* do any corrections needed on the time */ amitk_data_set_set_scan_date(ds, "Unknown"); /* give up */ } else { amitk_data_set_set_scan_date(ds, asctime(&time_structure)); } /* get the patient orientation */ switch (libmdc_fi.pat_slice_orient) { case MDC_SUPINE_HEADFIRST_TRANSAXIAL: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_SUPINE_HEADFIRST); break; case MDC_SUPINE_FEETFIRST_TRANSAXIAL: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_SUPINE_FEETFIRST); break; case MDC_PRONE_HEADFIRST_TRANSAXIAL: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_PRONE_HEADFIRST); break; case MDC_PRONE_FEETFIRST_TRANSAXIAL: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_PRONE_FEETFIRST); break; case MDC_DECUBITUS_RIGHT_HEADFIRST_TRANSAXIAL: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_HEADFIRST); break; case MDC_DECUBITUS_RIGHT_FEETFIRST_TRANSAXIAL: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_FEETFIRST); break; case MDC_DECUBITUS_LEFT_HEADFIRST_TRANSAXIAL: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_HEADFIRST); break; case MDC_DECUBITUS_LEFT_FEETFIRST_TRANSAXIAL: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_FEETFIRST); break; default: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_UNKNOWN); break; } amitk_data_set_set_subject_name(ds, libmdc_fi.patient_name); amitk_data_set_set_subject_id(ds, libmdc_fi.patient_id); amitk_data_set_set_subject_dob(ds, libmdc_fi.patient_dob); /* default sex is unknown */ if ((libmdc_fi.patient_sex[0] == 'M') || (libmdc_fi.patient_sex[0] == 'm')) amitk_data_set_set_subject_sex(ds, AMITK_SUBJECT_SEX_MALE); else if ((libmdc_fi.patient_sex[0] == 'F') || (libmdc_fi.patient_sex[0] == 'f')) amitk_data_set_set_subject_sex(ds, AMITK_SUBJECT_SEX_FEMALE); /* guess the start of the scan is the same as the start of the first frame of data */ /* note, libmdc specifies time as integers in msecs */ /* note, libmdc only uses dyndata if there's more than one frame of data, if there's only 1 frame, dyndata is NULL! */ if (libmdc_fi.dyndata != NULL) ds->scan_start = libmdc_fi.dyndata[0].time_frame_start/1000.0; else if (libmdc_fi.image[0].sdata != NULL) ds->scan_start = 0.0; else if ((libmdc_fi.iformat == MDC_FRMT_ANLZ) && (!EQUAL_ZERO(libmdc_fi.pixdim[4]/1000.0))) { /* analyze files sometimes have duration in pixdim[4] */ use_pixdim_duration = TRUE; ds->scan_start = 0.0; } else { g_warning(_("(X)MedCon returned no duration information. Frame durations will be incorrect")); ds->scan_start = 0.0; } new_axes[AMITK_AXIS_X] = base_axes[AMITK_AXIS_X]; new_axes[AMITK_AXIS_Y] = base_axes[AMITK_AXIS_Y]; new_axes[AMITK_AXIS_Z] = base_axes[AMITK_AXIS_Z]; new_offset = zero_point; /* figure out the image orientation, below code added in version 1.0.3 */ /* Note, XMedCon is suppose to be like DICOM, it uses a right-handed space, that is LPH+: meaning x increases towards patient left, y increases toward patient posterior, and z increases toward patient head. In terms of how it stores data in memory though, it's actually LPF+. AMIDE uses a right-handed space that is LAF+ in both space and memory */ /* in practice, xmedcon seems to be inconsistent between different file types.... hence the logic below. */ switch (libmdc_fi.iformat) { case MDC_FRMT_DICM: if (((fabs(libmdc_fi.image[0].image_orient_pat[0]) + fabs(libmdc_fi.image[0].image_orient_pat[1]) + fabs(libmdc_fi.image[0].image_orient_pat[2])) > 0.9) && ((fabs(libmdc_fi.image[0].image_orient_pat[3]) + fabs(libmdc_fi.image[0].image_orient_pat[4]) + fabs(libmdc_fi.image[0].image_orient_pat[5])) > 0.9)) { new_axes[AMITK_AXIS_X].x = libmdc_fi.image[0].image_orient_pat[0]; new_axes[AMITK_AXIS_X].y = libmdc_fi.image[0].image_orient_pat[1]; new_axes[AMITK_AXIS_X].z = libmdc_fi.image[0].image_orient_pat[2]; new_axes[AMITK_AXIS_Y].x = libmdc_fi.image[0].image_orient_pat[3]; new_axes[AMITK_AXIS_Y].y = libmdc_fi.image[0].image_orient_pat[4]; new_axes[AMITK_AXIS_Y].z = libmdc_fi.image[0].image_orient_pat[5]; } /* Can skip these two lines, as we flip data manually when loading */ new_axes[AMITK_AXIS_X].y *= -1.0; new_axes[AMITK_AXIS_X].z *= -1.0; new_axes[AMITK_AXIS_Y].y *= 1.0; new_axes[AMITK_AXIS_Y].z *= 1.0; POINT_CROSS_PRODUCT(new_axes[AMITK_AXIS_X], new_axes[AMITK_AXIS_Y], new_axes[AMITK_AXIS_Z]); new_offset.x = libmdc_fi.image[0].image_pos_pat[0]; new_offset.y = -1.0 * libmdc_fi.image[0].image_pos_pat[1]; new_offset.z = -1.0 * libmdc_fi.image[0].image_pos_pat[2]; /* figure out the shift, as we're switching the y-axis */ { AmitkSpace * temp_space; temp_space = amitk_space_new(); amitk_space_set_axes(temp_space, new_axes, zero_point); shift.x= 0; shift.y = dim.y * ds->voxel_size.y; shift.z = dim.z * ds->voxel_size.z; shift = amitk_space_s2b(temp_space, shift); POINT_SUB(new_offset, shift, new_offset); temp_space = amitk_object_unref(temp_space); } break; case MDC_FRMT_ECAT6: case MDC_FRMT_ECAT7: if (((fabs(libmdc_fi.image[0].image_orient_dev[0]) + fabs(libmdc_fi.image[0].image_orient_dev[1]) + fabs(libmdc_fi.image[0].image_orient_dev[2])) > 0.9) && ((fabs(libmdc_fi.image[0].image_orient_dev[3]) + fabs(libmdc_fi.image[0].image_orient_dev[4]) + fabs(libmdc_fi.image[0].image_orient_dev[5])) > 0.9)) { new_axes[AMITK_AXIS_X].x = libmdc_fi.image[0].image_orient_dev[0]; new_axes[AMITK_AXIS_X].y = libmdc_fi.image[0].image_orient_dev[1]; new_axes[AMITK_AXIS_X].z = libmdc_fi.image[0].image_orient_dev[2]; new_axes[AMITK_AXIS_Y].x = libmdc_fi.image[0].image_orient_dev[3]; new_axes[AMITK_AXIS_Y].y = libmdc_fi.image[0].image_orient_dev[4]; new_axes[AMITK_AXIS_Y].z = libmdc_fi.image[0].image_orient_dev[5]; } POINT_CROSS_PRODUCT(new_axes[AMITK_AXIS_X], new_axes[AMITK_AXIS_Y], new_axes[AMITK_AXIS_Z]); /* the offset data seems to be garbage, at least on the test data sets I have, just center the data set */ center_data_set = TRUE; /* new_offset.x = libmdc_fi.image[0].image_pos_dev[0]; new_offset.y = libmdc_fi.image[0].image_pos_dev[1]; new_offset.z = libmdc_fi.image[0].image_pos_dev[2]; */ break; case MDC_FRMT_NIFTI: /* no idea whether this is right, but keeps compatibile with what was done prior to 1.0.3 */ new_axes[AMITK_AXIS_X].x *= -1.0; new_axes[AMITK_AXIS_X].y *= -1.0; new_axes[AMITK_AXIS_X].z *= -1.0; new_axes[AMITK_AXIS_Y].x *= -1.0; new_axes[AMITK_AXIS_Y].y *= -1.0; new_axes[AMITK_AXIS_Y].z *= -1.0; new_axes[AMITK_AXIS_Z].x *= -1.0; new_axes[AMITK_AXIS_Z].y *= -1.0; new_axes[AMITK_AXIS_Z].z *= -1.0; center_data_set = TRUE; break; case MDC_FRMT_CONC: /* libmdc concorde support doesn't currently import offset/rotation info */ default: /* all other formats, consistent with what was done prior to 1.0.3 */ /* don't try to read in offset/rotation info */ center_data_set = TRUE; break; } amitk_space_set_axes(AMITK_SPACE(ds), new_axes, zero_point); amitk_space_set_offset(AMITK_SPACE(ds), new_offset); #ifdef AMIDE_DEBUG g_print("\tscan start time %5.3f\n",ds->scan_start); #endif if (update_func != NULL) { temp_string = g_strdup_printf(_("Importing File Through (X)MedCon:\n %s"), filename); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } total_planes = dim.z*dim.g*dim.t; divider = ((total_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (total_planes/AMITK_UPDATE_DIVIDER); /* and load in the data */ i = zero_voxel; for (i.t = 0; (i.t < dim.t) && (continue_work); i.t++) { #ifdef AMIDE_DEBUG g_print("\tloading frame %d",i.t); #endif /* set the frame duration, note, medcon/libMDC specifies time as float in msecs */ if (libmdc_fi.dyndata != NULL) amitk_data_set_set_frame_duration(ds, i.t, libmdc_fi.dyndata[i.t].time_frame_duration/1000.0); else if (libmdc_fi.image[0].sdata != NULL) amitk_data_set_set_frame_duration(ds, i.t, libmdc_fi.image[0].sdata->image_duration/1000.0); else if (use_pixdim_duration) amitk_data_set_set_frame_duration(ds, i.t, libmdc_fi.pixdim[4]/1000.0); else amitk_data_set_set_frame_duration(ds, i.t, 1.0); /* make sure it's not zero */ if (amitk_data_set_get_frame_duration(ds,i.t) < EPSILON) amitk_data_set_set_frame_duration(ds,i.t, EPSILON); for (i.g = 0; (i.g < ds->raw_data->dim.g) && (continue_work); i.g++) { /* copy the data into the data set */ for (i.z = 0 ; (i.z < ds->raw_data->dim.z) && (continue_work); i.z++) { /* note, libmdc is gates->frames->planes, we're frames->gates->planes */ image_num = i.z+i.t*dim.z+i.g*dim.z*dim.t; if (update_func != NULL) { x = div(image_num,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) image_num)/((gdouble) total_planes)); } /* read in the raw plane data if needed */ if (libmdc_fi.image[image_num].buf == NULL) { if ((error = MdcLoadPlane(&libmdc_fi, image_num)) != MDC_OK) { g_warning(_("Couldn't read plane %d in %s with libmdc/(X)MedCon"),image_num, filename); goto error; } } /* store the scaling factor... I think this is the right scaling factor... */ if (salvage) *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_factor, i) = 1.0; else { *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_factor, i) = libmdc_fi.image[image_num].quant_scale* libmdc_fi.image[image_num].calibr_fctr; *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_intercept,i) = libmdc_fi.image[image_num].intercept; } /* sanity check */ if (libmdc_fi.image[image_num].buf == NULL) { num_corrupted_planes++; } else { /* handle endian issues */ switch(ds->raw_data->format) { case AMITK_FORMAT_SBYTE: case AMITK_FORMAT_UBYTE: break; case AMITK_FORMAT_SSHORT: case AMITK_FORMAT_USHORT: if (MdcDoSwap()) for (k=0; k < bytes_per_plane; k+=2) MdcSwapBytes(libmdc_fi.image[image_num].buf+k, 2); break; case AMITK_FORMAT_SINT: case AMITK_FORMAT_UINT: case AMITK_FORMAT_FLOAT: if (MdcDoSwap()) for (k=0; k < bytes_per_plane; k+=4) MdcSwapBytes(libmdc_fi.image[image_num].buf+k, 4); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); goto error; break; } if (salvage) { /* convert the image to a 32 bit float to begin with */ if ((conv_pointer = MdcGetImgFLT32(&libmdc_fi, image_num)) == NULL){ g_warning(_("(X)MedCon couldn't convert to a float... out of memory?")); goto error; } } else { conv_pointer = libmdc_fi.image[image_num].buf; } /* flip as (X)MedCon stores data from anterior to posterior (top to bottom) */ for (i.y=0; i.y < dim.y; i.y++) { ds_pointer = amitk_raw_data_get_pointer(AMITK_DATA_SET_RAW_DATA(ds), i); memcpy(ds_pointer, conv_pointer+bytes_per_row*(dim.y-i.y-1), format_size*ds->raw_data->dim.x); } /* free up the buffer data */ if (salvage) g_free(conv_pointer); MdcFree(libmdc_fi.image[image_num].buf); } /* .buf != NULL */ } /* i.z */ } #ifdef AMIDE_DEBUG g_print("\tduration %5.3f\n", amitk_data_set_get_frame_duration(ds, i.t)); #endif } /* i.t */ if (num_corrupted_planes > 0) g_warning(_("(X)MedCon returned %d blank planes... corrupted data file? Use data with caution."), num_corrupted_planes); /* setup remaining parameters */ amitk_data_set_set_injected_dose(ds, libmdc_fi.injected_dose); /* should be in MBq */ amitk_data_set_set_displayed_dose_unit(ds, AMITK_DOSE_UNIT_MEGABECQUEREL); amitk_data_set_set_subject_weight(ds, libmdc_fi.patient_weight); /* should be in Kg */ amitk_data_set_set_displayed_weight_unit(ds, AMITK_WEIGHT_UNIT_KILOGRAM); amitk_data_set_set_scale_factor(ds, 1.0); /* set the external scaling factor */ amitk_data_set_calc_far_corner(ds); /* set the far corner of the volume */ amitk_data_set_calc_min_max(ds, update_func, update_data); if (center_data_set) amitk_volume_set_center(AMITK_VOLUME(ds), zero_point); goto function_end; error: if (ds != NULL) ds = amitk_object_unref(ds); function_end: if (libmdc_fi_init) MdcCleanUpFI(&libmdc_fi); if (import_filename != NULL) g_free(import_filename); if (update_func != NULL) /* remove progress bar */ (*update_func)(update_data, NULL, (gdouble) 2.0); setlocale(LC_NUMERIC, saved_time_locale); setlocale(LC_NUMERIC, saved_numeric_locale); g_free(saved_time_locale); g_free(saved_numeric_locale); return ds; } gboolean libmdc_export(AmitkDataSet * ds, const gchar * filename, const libmdc_format_t libmdc_format, const gboolean resliced, const AmitkPoint voxel_size, const AmitkVolume * bounding_box, AmitkUpdateFunc update_func, gpointer update_data) { FILEINFO fi; gboolean fi_init=FALSE; IMG_DATA * plane; AmitkVoxel i, j; AmitkVoxel dim; div_t x; gint divider; gint total_planes; gboolean continue_work=TRUE; gint image_num; gint libmdc_format_num; gint bytes_per_row; gint bytes_per_plane; gchar * err_str; /* note, err_str (if used) will point to a const string in libmdc */ gint err_num; void * data_ptr; gchar * temp_string; amide_time_t frame_start, frame_duration; AmitkCanvasPoint pixel_size; AmitkPoint corner; AmitkVolume * output_volume=NULL; AmitkPoint output_start_pt; AmitkDataSet * slice = NULL; AmitkPoint new_offset; gfloat * row_data; gchar * saved_time_locale; gchar * saved_numeric_locale; amide_data_t value; gboolean successful = FALSE; saved_time_locale = g_strdup(setlocale(LC_TIME,NULL)); saved_numeric_locale = g_strdup(setlocale(LC_NUMERIC,NULL)); setlocale(LC_TIME,"POSIX"); setlocale(LC_NUMERIC,"POSIX"); /* setup some defaults */ MDC_INFO=MDC_NO; /* don't print stuff */ MDC_VERBOSE=MDC_NO; /* and don't print stuff */ MDC_ANLZ_SPM=MDC_YES; /* if analyze format, try using SPM style */ fi.map = MDC_MAP_GRAY; /*default color map*/ MDC_MAKE_GRAY=MDC_YES; MDC_QUANTIFY=MDC_YES; /* want quantified data */ MDC_NEGATIVE=MDC_YES; /* allow negative values */ MDC_PREFIX_DISABLED=MDC_YES; /* don't add on the m000- stuff */ MDC_NORM_OVER_FRAMES=MDC_NO; MDC_FILE_ENDIAN=MDC_HOST_ENDIAN; MDC_FILE_OVERWRITE=MDC_YES; /* figure out the fallback format */ if (libmdc_supports(libmdc_format)) { libmdc_format_num = libmdc_format_number(libmdc_format); } else { g_warning(_("Unsupported export file format: %d\n"), libmdc_format); goto cleanup; } /* initialize the fi info structure */ MdcInitFI(&fi, ""); fi_init=TRUE; /* set what we can */ if (AMITK_DATA_SET_SUBJECT_NAME(ds) != NULL) strncpy(fi.patient_name,AMITK_DATA_SET_SUBJECT_NAME(ds), MDC_MAXSTR); if (AMITK_DATA_SET_SUBJECT_ID(ds) != NULL) strncpy(fi.patient_id,AMITK_DATA_SET_SUBJECT_ID(ds), MDC_MAXSTR); if (AMITK_DATA_SET_SUBJECT_DOB(ds) != NULL) strncpy(fi.patient_dob,AMITK_DATA_SET_SUBJECT_DOB(ds), MDC_MAXSTR); strncpy(fi.patient_sex, amitk_subject_sex_get_name(AMITK_DATA_SET_SUBJECT_SEX(ds)), MDC_MAXSTR); fi.injected_dose = AMITK_DATA_SET_INJECTED_DOSE(ds); fi.patient_weight= AMITK_DATA_SET_SUBJECT_WEIGHT(ds); switch(AMITK_DATA_SET_SUBJECT_ORIENTATION(ds)) { case AMITK_SUBJECT_ORIENTATION_SUPINE_HEADFIRST: fi.pat_slice_orient = MDC_SUPINE_HEADFIRST_TRANSAXIAL; break; case AMITK_SUBJECT_ORIENTATION_SUPINE_FEETFIRST: fi.pat_slice_orient = MDC_SUPINE_FEETFIRST_TRANSAXIAL; break; case AMITK_SUBJECT_ORIENTATION_PRONE_HEADFIRST: fi.pat_slice_orient = MDC_PRONE_HEADFIRST_TRANSAXIAL; break; case AMITK_SUBJECT_ORIENTATION_PRONE_FEETFIRST: fi.pat_slice_orient = MDC_PRONE_FEETFIRST_TRANSAXIAL; break; case AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_HEADFIRST: fi.pat_slice_orient = MDC_DECUBITUS_RIGHT_HEADFIRST_TRANSAXIAL; break; case AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_FEETFIRST: fi.pat_slice_orient = MDC_DECUBITUS_RIGHT_FEETFIRST_TRANSAXIAL; break; case AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_HEADFIRST: fi.pat_slice_orient = MDC_DECUBITUS_LEFT_HEADFIRST_TRANSAXIAL; break; case AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_FEETFIRST: fi.pat_slice_orient = MDC_DECUBITUS_LEFT_FEETFIRST_TRANSAXIAL; break; case AMITK_SUBJECT_ORIENTATION_UNKNOWN: default: break; } fi.ifname = g_strdup(filename); fi.iformat = MDC_FRMT_RAW; if (resliced) { fi.type = libmdc_type_number(AMITK_FORMAT_FLOAT); } else { fi.type = libmdc_type_number(AMITK_DATA_SET_FORMAT(ds)); } fi.bits = MdcType2Bits(fi.type); fi.endian = MDC_HOST_ENDIAN; dim = AMITK_DATA_SET_DIM(ds); if (resliced) { if (bounding_box != NULL) output_volume = AMITK_VOLUME(amitk_object_copy(AMITK_OBJECT(bounding_box))); else output_volume = amitk_volume_new(); if (output_volume == NULL) goto cleanup; if (bounding_box != NULL) { corner = AMITK_VOLUME_CORNER(output_volume); } else { AmitkCorners corners; amitk_volume_get_enclosing_corners(AMITK_VOLUME(ds), AMITK_SPACE(output_volume), corners); corner = point_diff(corners[0], corners[1]); amitk_space_set_offset(AMITK_SPACE(output_volume), amitk_space_s2b(AMITK_SPACE(output_volume), corners[0])); } dim.x = ceil(corner.x/voxel_size.x); dim.y = ceil(corner.y/voxel_size.y); dim.z = ceil(corner.z/voxel_size.z); corner.z = voxel_size.z; amitk_volume_set_corner(output_volume, corner); output_start_pt = AMITK_SPACE_OFFSET(output_volume); #ifdef AMIDE_DEBUG g_print("output dimensions %d %d %d, voxel size %f %f %f\n", dim.x, dim.y, dim.z, voxel_size.x, voxel_size.y, voxel_size.z); #else g_warning(_("dimensions of output data set will be %dx%dx%d, voxel size of %fx%fx%f"), dim.x, dim.y, dim.z, voxel_size.x, voxel_size.y, voxel_size.z); #endif } fi.dim[0]=6; fi.dim[1]=dim.x; fi.dim[2]=dim.y; fi.dim[3]=dim.z; fi.dim[4]=dim.t; fi.dim[5]=dim.g; fi.dim[6]=1; /* no beds */ fi.number = fi.dim[6]*fi.dim[5]*fi.dim[4]*fi.dim[3]; /* total # planes */ fi.pixdim[0]=3; if (resliced) { pixel_size.x = voxel_size.x; pixel_size.y = voxel_size.y; fi.pixdim[1] = voxel_size.x; fi.pixdim[2] = voxel_size.y; fi.pixdim[3] = voxel_size.z; } else { fi.pixdim[1]=AMITK_DATA_SET_VOXEL_SIZE_X(ds); fi.pixdim[2]=AMITK_DATA_SET_VOXEL_SIZE_Y(ds); fi.pixdim[3]=AMITK_DATA_SET_VOXEL_SIZE_Z(ds); } switch (AMITK_DATA_SET_MODALITY(ds)) { case AMITK_MODALITY_PET: fi.modality = M_PT; break; case AMITK_MODALITY_SPECT: fi.modality = M_ST; break; case AMITK_MODALITY_CT: fi.modality = M_CT; break; case AMITK_MODALITY_MRI: fi.modality = M_MR; break; case AMITK_MODALITY_OTHER: default: fi.modality = M_OT; break; } if (dim.t > 1) fi.acquisition_type = MDC_ACQUISITION_DYNAMIC; else fi.acquisition_type = MDC_ACQUISITION_TOMO; if (resliced) { bytes_per_row = dim.x*amitk_raw_format_sizes[AMITK_FORMAT_FLOAT]; } else { bytes_per_row = dim.x*amitk_raw_format_sizes[AMITK_DATA_SET_FORMAT(ds)]; } bytes_per_plane = dim.y*bytes_per_row; /* fill in dynamic data struct */ if (!MdcGetStructDD(&fi,dim.t)) { g_warning(_("couldn't malloc DYNAMIC_DATA structs")); goto cleanup; } if (!MdcGetStructID(&fi,fi.number)) { g_warning(_("couldn't malloc img_data structs")); goto cleanup; } if (update_func != NULL) { temp_string = g_strdup_printf(_("Exporting File Through (X)MedCon:\n %s"), filename); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } total_planes = dim.z*dim.g*dim.t; divider = ((total_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (total_planes/AMITK_UPDATE_DIVIDER); image_num=0; data_ptr = ds->raw_data->data; j = zero_voxel; i = zero_voxel; for (i.t = 0; (i.t < dim.t) && (continue_work); i.t++) { frame_start = amitk_data_set_get_start_time(ds, i.t); frame_duration = amitk_data_set_get_frame_duration(ds, i.t); fi.dyndata[i.t].nr_of_slices = fi.dim[3]; /* medcon's in ms */ fi.dyndata[i.t].time_frame_start = 1000.0*frame_start; fi.dyndata[i.t].time_frame_duration = 1000.0*frame_duration; for (i.g = 0 ; (i.g < dim.g) && (continue_work); i.g++) { if (resliced) /* reset the output slice */ amitk_space_set_offset(AMITK_SPACE(output_volume), output_start_pt); for (i.z = 0 ; (i.z < dim.z) && (continue_work); i.z++) { /* note, libmdc is gates->frames->planes, we're frames->gates->planes */ image_num = i.z+i.t*dim.z+i.g*dim.z*dim.t; if (update_func != NULL) { x = div(image_num,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) image_num)/((gdouble) total_planes)); } plane = &(fi.image[image_num]); plane->width = fi.dim[1]; plane->height = fi.dim[2]; plane->bits = fi.bits; plane->type = fi.type; plane->pixel_xsize = fi.pixdim[1]; plane->pixel_ysize = fi.pixdim[2]; plane->slice_width = fi.pixdim[3]; plane->slice_spacing = fi.pixdim[3]; if (resliced) { plane->quant_scale = 1.0; plane->intercept = 0.0; } else { plane->quant_scale = AMITK_DATA_SET_SCALE_FACTOR(ds)* amitk_data_set_get_internal_scaling_factor(ds, i); plane->intercept = amitk_data_set_get_scaling_intercept(ds,i); } plane->calibr_fctr = 1.0; if ((plane->buf = MdcGetImgBuffer(bytes_per_plane)) == NULL) { g_warning(_("couldn't alloc %d bytes for plane"), bytes_per_plane); goto cleanup; } if (resliced) { slice = amitk_data_set_get_slice(ds, frame_start, frame_duration, i.g, pixel_size, output_volume); if ((AMITK_DATA_SET_DIM_X(slice) != dim.x) || (AMITK_DATA_SET_DIM_Y(slice) != dim.y)) { g_warning(_("Error in generating resliced data, %dx%d != %dx%d"), AMITK_DATA_SET_DIM_X(slice), AMITK_DATA_SET_DIM_Y(slice), dim.x, dim.y); goto cleanup; } /* advance for next iteration */ new_offset = AMITK_SPACE_OFFSET(output_volume); new_offset.z += voxel_size.z; amitk_space_set_offset(AMITK_SPACE(output_volume), new_offset); } /* ideally, I'd put in the orientation and offset into the exported files... For simplicity sake I'm not doing that at the moment, and just flipping the data on the y-axis manually as below. I'm not sure how consistent (X)Medcon's treatment of the image.image_orient_pat and image_pos_pat parameters is.... and setting these parameters is likely more confusing then it's worth... */ /* flip for (X)MedCon's axis */ for (i.y=0, j.y=0; i.y < dim.y; i.y++, j.y++) { if (resliced) { row_data = (gfloat *) (plane->buf+bytes_per_row*(dim.y-i.y-1)); for (j.x = 0; j.x < dim.x; j.x++) { /* clean - libmdc handles infinities, etc. badly */ value = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(slice, j); if (finite(value)) row_data[j.x] = value; else row_data[j.x] = 0.0; } } else { memcpy(plane->buf+bytes_per_row*(dim.y-i.y-1), data_ptr, bytes_per_row); data_ptr += bytes_per_row; } } if (slice != NULL) slice = amitk_object_unref(slice); } /* i.z */ } } /* make sure everything's kosher */ err_str = MdcImagesPixelFiddle(&fi); if (err_str != NULL) { g_warning(_("couldn't pixel fiddle, error: %s"), err_str); goto cleanup; } /* and writeout the file */ err_num = MdcWriteFile(&fi, libmdc_format_num, 0, NULL); if (err_num != MDC_OK) { g_warning(_("couldn't write out file %s, error %d"), fi.ofname, err_num); goto cleanup; } successful = TRUE; /* made it through! */ cleanup: if (fi_init) MdcCleanUpFI(&fi); /* clean up FILEINFO struct */ if (output_volume != NULL) output_volume = amitk_object_unref(output_volume); if (slice != NULL) slice = amitk_object_unref(slice); if (update_func != NULL) /* remove progress bar */ (*update_func)(update_data, NULL, (gdouble) 2.0); setlocale(LC_NUMERIC, saved_time_locale); setlocale(LC_NUMERIC, saved_numeric_locale); g_free(saved_time_locale); g_free(saved_numeric_locale); return successful; } #endif /* AMIDE_LIBMDC_SUPPORT */ amide-1.0.5/src/amitk_raw_data.c0000664000175000017500000010223312270273736016362 0ustar loeningloening/* amitk_raw_data.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include #include "amitk_raw_data.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" #define DATA_CONTENT(data, dim, voxel) ((data)[(voxel).x + (dim).x*(voxel).y]) /* external variables */ guint amitk_format_sizes[] = { sizeof(amitk_format_UBYTE_t), sizeof(amitk_format_SBYTE_t), sizeof(amitk_format_USHORT_t), sizeof(amitk_format_SSHORT_t), sizeof(amitk_format_UINT_t), sizeof(amitk_format_SINT_t), sizeof(amitk_format_FLOAT_t), sizeof(amitk_format_DOUBLE_t), 1 }; gboolean amitk_format_signed[AMITK_FORMAT_NUM] = { FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE }; gchar * amitk_format_names[AMITK_FORMAT_NUM] = { N_("Unsigned Byte (8 bit)"), N_("Signed Byte (8 bit)"), N_("Unsigned Short (16 bit)"), N_("Signed Short (16 bit)"), N_("Unsigned Integer (32 bit)"), N_("Signed Integer (32 bit)"), N_("Float (32 bit)"), N_("Double (64 bit)") }; amide_data_t amitk_format_max[AMITK_FORMAT_NUM] = { 255.0, 127.0, G_MAXUSHORT, G_MAXSHORT, G_MAXUINT, G_MAXINT, G_MAXFLOAT, G_MAXDOUBLE }; amide_data_t amitk_format_min[AMITK_FORMAT_NUM] = { 0.0, -128.0, 0.0, G_MINSHORT, 0.0, G_MININT, -G_MAXFLOAT, -G_MAXDOUBLE }; guint amitk_raw_format_sizes[] = { sizeof(amitk_format_UBYTE_t), sizeof(amitk_format_SBYTE_t), sizeof(amitk_format_USHORT_t), sizeof(amitk_format_SSHORT_t), sizeof(amitk_format_UINT_t), sizeof(amitk_format_SINT_t), sizeof(amitk_format_FLOAT_t), sizeof(amitk_format_DOUBLE_t), sizeof(amitk_format_USHORT_t), sizeof(amitk_format_SSHORT_t), sizeof(amitk_format_UINT_t), sizeof(amitk_format_SINT_t), sizeof(amitk_format_FLOAT_t), sizeof(amitk_format_DOUBLE_t), sizeof(amitk_format_UINT_t), sizeof(amitk_format_SINT_t), sizeof(amitk_format_FLOAT_t), 1, }; /* what used to be saved in the file */ gchar * amitk_raw_format_legacy_names[] = { "Unsigned Byte (8 bit)", "Signed Byte (8 bit)", "Unsigned Short, Little Endian (16 bit)", "Signed Short, Little Endian (16 bit)", "Unsigned Integer, Little Endian (32 bit)", "Signed Integer, Little Endian (32 bit)", "Float, Little Endian (32 bit)", "Double, Little Endian (64 bit)", "Unsigned Short, Big Endian (16 bit)", "Signed Short, Big Endian (16 bit)", "Unsigned Integer, Big Endian (32 bit)", "Signed Integer, Big Endian (32 bit)", "Float, Big Endian (32 bit)", "Double, Big Endian (64 bit)", "Unsigned Integer, PDP (32 bit)", "Signed Integer, PDP (32 bit)", "Float, PDP/VAX (32 bit)", "ASCII (8 bit)" }; /* what's shown to the user - can be translated */ gchar * amitk_raw_format_names[] = { N_("Unsigned Byte (8 bit)"), N_("Signed Byte (8 bit)"), N_("Unsigned Short, Little Endian (16 bit)"), N_("Signed Short, Little Endian (16 bit)"), N_("Unsigned Integer, Little Endian (32 bit)"), N_("Signed Integer, Little Endian (32 bit)"), N_("Float, Little Endian (32 bit)"), N_("Double, Little Endian (64 bit)"), N_("Unsigned Short, Big Endian (16 bit)"), N_("Signed Short, Big Endian (16 bit)"), N_("Unsigned Integer, Big Endian (32 bit)"), N_("Signed Integer, Big Endian (32 bit)"), N_("Float, Big Endian (32 bit)"), N_("Double, Big Endian (64 bit)"), N_("Unsigned Integer, PDP (32 bit)"), N_("Signed Integer, PDP (32 bit)"), N_("Float, PDP/VAX (32 bit)"), N_("ASCII (8 bit)") }; //enum { // LAST_SIGNAL //}; static void raw_data_class_init (AmitkRawDataClass *klass); static void raw_data_init (AmitkRawData *object); static void raw_data_finalize (GObject *object); static GObjectClass * parent_class; //static guint raw_data_signals[LAST_SIGNAL]; GType amitk_raw_data_get_type(void) { static GType raw_data_type = 0; if (!raw_data_type) { static const GTypeInfo raw_data_info = { sizeof (AmitkRawDataClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) raw_data_class_init, (GClassFinalizeFunc) NULL, NULL, /* class_data */ sizeof (AmitkRawData), 0, /* n_preallocs */ (GInstanceInitFunc) raw_data_init, NULL /* value table */ }; raw_data_type = g_type_register_static (G_TYPE_OBJECT, "AmitkRawData", &raw_data_info, 0); } return raw_data_type; } static void raw_data_class_init (AmitkRawDataClass * class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); parent_class = g_type_class_peek_parent(class); gobject_class->finalize = raw_data_finalize; } static void raw_data_init (AmitkRawData * raw_data) { raw_data->dim = zero_voxel; raw_data->data = NULL; raw_data->format = AMITK_FORMAT_DOUBLE; return; } static void raw_data_finalize (GObject *object) { AmitkRawData * raw_data = AMITK_RAW_DATA(object); if (raw_data->data != NULL) { #ifdef AMIDE_DEBUG //g_print("\tfreeing raw data\n"); #endif g_free(raw_data->data); raw_data->data = NULL; } G_OBJECT_CLASS (parent_class)->finalize (object); } AmitkRawData * amitk_raw_data_new (void) { AmitkRawData * raw_data; raw_data = g_object_new(amitk_raw_data_get_type(), NULL); return raw_data; } AmitkRawData* amitk_raw_data_new_with_data(AmitkFormat format, AmitkVoxel dim) { AmitkRawData * raw_data; raw_data = amitk_raw_data_new(); g_return_val_if_fail(raw_data != NULL, NULL); raw_data->format = format; raw_data->dim = dim; /* allocate the space for the data */ raw_data->data = amitk_raw_data_get_data_mem(raw_data); if (raw_data->data == NULL) { g_object_unref(raw_data); return NULL; } return raw_data; } /* initalize a 2D slice, with values initialized to 0 */ AmitkRawData * amitk_raw_data_new_2D_with_data0(AmitkFormat format, amide_intpoint_t y_dim, amide_intpoint_t x_dim) { AmitkRawData * raw_data; AmitkVoxel dim; dim.x = x_dim; dim.y = y_dim; dim.z = dim.g = dim.t = 1; raw_data = amitk_raw_data_new_with_data0(format, dim); g_return_val_if_fail(raw_data != NULL, NULL); return raw_data; } /* initalize a 2D slice, with values initialized to 0 */ AmitkRawData * amitk_raw_data_new_3D_with_data0(AmitkFormat format, amide_intpoint_t z_dim, amide_intpoint_t y_dim, amide_intpoint_t x_dim) { AmitkRawData * raw_data; AmitkVoxel dim; dim.x = x_dim; dim.y = y_dim; dim.z = z_dim; dim.g = dim.t = 1; raw_data = amitk_raw_data_new_with_data0(format, dim); g_return_val_if_fail(raw_data != NULL, NULL); return raw_data; } /* same as amitk_raw_data_new_with_data, except allocated data memory is initialized to 0 */ AmitkRawData* amitk_raw_data_new_with_data0(AmitkFormat format, AmitkVoxel dim) { AmitkRawData * raw_data; raw_data = amitk_raw_data_new(); g_return_val_if_fail(raw_data != NULL, NULL); raw_data->format = format; raw_data->dim = dim; /* allocate the space for the data */ raw_data->data = amitk_raw_data_get_data_mem0(raw_data); if (raw_data->data == NULL) { g_object_unref(raw_data); return NULL; } return raw_data; } /* reads the contents of a raw data file into an amide raw data structure, notes: 1. file_offset is bytes for a binary file, lines for an ascii file 2. either file_name, of existing_file need to be specified. If existing_file is not being used, it must be NULL */ AmitkRawData * amitk_raw_data_import_raw_file(const gchar * file_name, FILE * existing_file, AmitkRawFormat raw_format, AmitkVoxel dim, long file_offset, AmitkUpdateFunc update_func, gpointer update_data) { FILE * new_file_pointer=NULL; FILE * file_pointer=NULL; void * file_buffer=NULL; size_t bytes_per_slice=0; size_t bytes_read; AmitkVoxel i; gint error_code, j; AmitkRawData * raw_data=NULL;; gchar * temp_string; gint total_planes; gint i_plane; div_t x; gint divider; gboolean continue_work = TRUE; g_return_val_if_fail((file_name != NULL) || (existing_file != NULL), NULL); if (update_func != NULL) { temp_string = g_strdup_printf(_("Reading: %s"), (file_name != NULL) ? file_name : "raw data"); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } total_planes = dim.z*dim.t*dim.g; divider = ((total_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (total_planes/AMITK_UPDATE_DIVIDER); raw_data = amitk_raw_data_new_with_data(amitk_raw_format_to_format(raw_format), dim); if (raw_data == NULL) { g_warning(_("couldn't allocate memory space for the raw data set structure")); goto error_condition; } /* open the raw data file for reading */ if (existing_file == NULL) { if (raw_format == AMITK_RAW_FORMAT_ASCII_8_NE) { if ((new_file_pointer = fopen(file_name, "r")) == NULL) { g_warning(_("couldn't open raw data file %s"), file_name); goto error_condition; } } else { /* note, rb==r on any POSIX compliant system (i.e. Linux). */ if ((new_file_pointer = fopen(file_name, "rb")) == NULL) { g_warning(_("couldn't open raw data file %s"), file_name); goto error_condition; } } file_pointer = new_file_pointer; } else { file_pointer = existing_file; } /* jump forward by the given offset */ if (raw_format == AMITK_RAW_FORMAT_ASCII_8_NE) { for (j=0; j= 0) && (continue_work); i.t++) { for (i.g = 0; (i.g < dim.g) && (error_code >= 0) && (continue_work); i.g++) { for (i.z = 0; (i.z < dim.z) && (error_code >= 0) && (continue_work); i.z++, i_plane++) { if (update_func != NULL) { x = div(i_plane,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) i_plane)/((gdouble) total_planes)); } /* read in the contents of the file */ if (raw_format != AMITK_RAW_FORMAT_ASCII_8_NE) { /* ASCII handled in the loop below */ bytes_read = fread(file_buffer, 1, bytes_per_slice, file_pointer ); if (bytes_read != bytes_per_slice) { g_warning(_("read wrong # of elements from raw data, expected %zd, got %zd"), bytes_per_slice, bytes_read); goto error_condition; } } /* and convert the data */ switch (raw_format) { case AMITK_RAW_FORMAT_ASCII_8_NE: /* copy this frame into the data set */ i.x = 0; for (i.y = 0; (i.y < dim.y) && (error_code >= 0); i.y++) { for (i.x = 0; (i.x < dim.x) && (error_code >= 0); i.x++) { if (raw_data->format == AMITK_FORMAT_DOUBLE) error_code = fscanf(file_pointer, "%lf", AMITK_RAW_DATA_DOUBLE_POINTER(raw_data,i)); else // (raw_data->format == FLOAT) error_code = fscanf(file_pointer, "%f", AMITK_RAW_DATA_FLOAT_POINTER(raw_data,i)); if (error_code == 0) error_code = EOF; /* if we couldn't read, may as well be EOF*/ } } if (error_code < 0) { /* EOF = -1 (usually) */ g_warning(_("could not read ascii file after %d elements, file or parameters are erroneous"), i.x + dim.x*i.y + dim.x*dim.y*i_plane); goto error_condition; } break; case AMITK_RAW_FORMAT_FLOAT_32_PDP: { guint32 * data = file_buffer; guint32 temp; gfloat * float_p; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) { /* keep compiler from generating bad code with a noop,occurs with gcc 3.0.3 */ if (i.x == -1) g_print("no_op\n"); temp = GUINT32_FROM_PDP(DATA_CONTENT(data, dim,i)); float_p = (void *) &temp; AMITK_RAW_DATA_FLOAT_SET_CONTENT(raw_data,i) = *float_p; } } break; case AMITK_RAW_FORMAT_SINT_32_PDP: { gint32 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) AMITK_RAW_DATA_SINT_SET_CONTENT(raw_data,i) = GINT32_FROM_PDP(DATA_CONTENT(data, dim,i)); } break; case AMITK_RAW_FORMAT_UINT_32_PDP: { guint32 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) { /* keep compiler from generating bad code with a noop,occurs with gcc 3.0.3 */ if (i.x == -1) g_print("no_op\n"); AMITK_RAW_DATA_UINT_SET_CONTENT(raw_data,i) = GUINT32_FROM_PDP(DATA_CONTENT(data, dim,i)); } } break; case AMITK_RAW_FORMAT_DOUBLE_64_BE: { #if (G_BYTE_ORDER == G_LITTLE_ENDIAN) guint64 * data = file_buffer; guint64 temp; gdouble * double_p; #else #if (G_BYTE_ORDER == G_BIG_ENDIAN) gdouble * data = file_buffer; #else #error "need to specify G_BIG_ENDIAN or G_LITTLE_ENDIAN" #endif #endif /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) { #if (G_BYTE_ORDER == G_LITTLE_ENDIAN) temp = GUINT64_FROM_BE(DATA_CONTENT(data, dim, i)); double_p = (void *) &temp; if (i.x == -1) g_print("no op\n"); /* gets around compiler bug in gcc 4.1.2-27 */ AMITK_RAW_DATA_DOUBLE_SET_CONTENT(raw_data,i) = *double_p; #else /* G_BIG_ENDIAN */ AMITK_RAW_DATA_DOUBLE_SET_CONTENT(raw_data,i) = DATA_CONTENT(data, dim, i); #endif } } break; case AMITK_RAW_FORMAT_FLOAT_32_BE: { #if (G_BYTE_ORDER == G_LITTLE_ENDIAN) guint32 * data = file_buffer; guint32 temp; gfloat * float_p; #else /* (G_BYTE_ORDER == G_BIG_ENDIAN) */ gfloat * data = file_buffer; #endif /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) { /* keep compiler from generating bad code with a noop, occurs with gcc 3.0.3 */ if (i.x == -1) g_print("no op\n"); #if (G_BYTE_ORDER == G_LITTLE_ENDIAN) temp = GUINT32_FROM_BE(DATA_CONTENT(data, dim, i)); float_p = (void *) &temp; if (i.x == -1) g_print("no op\n"); /* gets around compiler bug in gcc 4.1.2-27 */ AMITK_RAW_DATA_FLOAT_SET_CONTENT(raw_data,i) = *float_p; #else /* G_BIG_ENDIAN */ AMITK_RAW_DATA_FLOAT_SET_CONTENT(raw_data,i) = DATA_CONTENT(data, dim, i); #endif } } break; case AMITK_RAW_FORMAT_SINT_32_BE: { gint32 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) AMITK_RAW_DATA_SINT_SET_CONTENT(raw_data,i) = GINT32_FROM_BE(DATA_CONTENT(data, dim, i)); } break; case AMITK_RAW_FORMAT_UINT_32_BE: { guint32 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) { /* keep compiler from generating bad code with a noop occurs with gcc 3.0.3 */ if (i.x == -1) g_print("no op\n"); AMITK_RAW_DATA_UINT_SET_CONTENT(raw_data,i) = GUINT32_FROM_BE(DATA_CONTENT(data, dim, i)); } } break; case AMITK_RAW_FORMAT_SSHORT_16_BE: { gint16 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) AMITK_RAW_DATA_SSHORT_SET_CONTENT(raw_data,i) = GINT16_FROM_BE(DATA_CONTENT(data, dim, i)); } break; case AMITK_RAW_FORMAT_USHORT_16_BE: { guint16 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) AMITK_RAW_DATA_USHORT_SET_CONTENT(raw_data,i) = GUINT16_FROM_BE(DATA_CONTENT(data, dim, i)); } break; case AMITK_RAW_FORMAT_DOUBLE_64_LE: { #if (G_BYTE_ORDER == G_BIG_ENDIAN) guint64 * data = file_buffer; guint64 temp; gdouble * double_p; #else /* (G_BYTE_ORDER == G_LITTLE_ENDIAN) */ gdouble * data = file_buffer; #endif /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) { #if (G_BYTE_ORDER == G_BIG_ENDIAN) temp = GUINT64_FROM_LE(DATA_CONTENT(data, dim, i)); double_p = (void *) &temp; if (i.x == -1) g_print("no op\n"); /* gets around compiler bug in gcc 4.1.2-27 */ AMITK_RAW_DATA_DOUBLE_SET_CONTENT(raw_data,i) = *double_p; #else /* G_LITTLE_ENDIAN */ AMITK_RAW_DATA_DOUBLE_SET_CONTENT(raw_data,i) = DATA_CONTENT(data, dim, i); #endif } } break; case AMITK_RAW_FORMAT_FLOAT_32_LE: { #if (G_BYTE_ORDER == G_BIG_ENDIAN) guint32 * data = file_buffer; guint32 temp; gfloat * float_p; #else /* (G_BYTE_ORDER == G_LITTLE_ENDIAN) */ gfloat * data = file_buffer; #endif /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) { /* keep compiler from generating bad code with a noop,occurs with gcc 3.0.3 */ if (i.x == -1) g_print("no op\n"); #if (G_BYTE_ORDER == G_BIG_ENDIAN) temp = GUINT32_FROM_LE(DATA_CONTENT(data, dim, i)); float_p = (void *) &temp; if (i.x == -1) g_print("no op\n"); /* gets around compiler bug in gcc 4.1.2-27 */ AMITK_RAW_DATA_FLOAT_SET_CONTENT(raw_data,i) = *float_p; #else /* G_LITTLE_ENDIAN */ AMITK_RAW_DATA_FLOAT_SET_CONTENT(raw_data,i) = DATA_CONTENT(data, dim, i); #endif } } break; case AMITK_RAW_FORMAT_SINT_32_LE: { gint32 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) AMITK_RAW_DATA_SINT_SET_CONTENT(raw_data,i) = GINT32_FROM_LE(DATA_CONTENT(data, dim, i)); } break; case AMITK_RAW_FORMAT_UINT_32_LE: { guint32 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) { /* keep compiler from generating bad code with a noop,occurs with gcc 3.0.3 */ if (i.x == -1) g_print("no_op\n"); AMITK_RAW_DATA_UINT_SET_CONTENT(raw_data,i) = GUINT32_FROM_LE(DATA_CONTENT(data, dim, i)); } } break; case AMITK_RAW_FORMAT_SSHORT_16_LE: { gint16 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) AMITK_RAW_DATA_SSHORT_SET_CONTENT(raw_data,i) = GINT16_FROM_LE(DATA_CONTENT(data, dim, i)); } break; case AMITK_RAW_FORMAT_USHORT_16_LE: { guint16 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) AMITK_RAW_DATA_USHORT_SET_CONTENT(raw_data,i) = GUINT16_FROM_LE(DATA_CONTENT(data, dim, i)); } break; case AMITK_RAW_FORMAT_SBYTE_8_NE: { gint8 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) AMITK_RAW_DATA_SBYTE_SET_CONTENT(raw_data,i) = DATA_CONTENT(data, dim, i); } break; case AMITK_RAW_FORMAT_UBYTE_8_NE: default: { guint8 * data=file_buffer; /* copy this frame into the data set */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) AMITK_RAW_DATA_UBYTE_SET_CONTENT(raw_data,i) = DATA_CONTENT(data, dim, i); } break; } } } } goto exit_condition; error_condition: if (raw_data != NULL) g_object_unref(raw_data); raw_data = NULL; exit_condition: if (new_file_pointer != NULL) fclose(new_file_pointer); if (file_buffer != NULL) g_free(file_buffer); if (update_func != NULL) (*update_func)(update_data, NULL, (gdouble) 2.0); return raw_data; } /* function to write out the information content of a raw_data set into an xml file. Returns a string containing the name of the file. */ void amitk_raw_data_write_xml(AmitkRawData * raw_data, const gchar * name, FILE *study_file, gchar ** output_filename, guint64 * plocation, guint64 * psize) { gchar * xml_filename=NULL; gchar * raw_filename=NULL; guint count; struct stat file_info; xmlDocPtr doc; FILE * file_pointer; guint64 location, size; size_t num_wrote; size_t num_to_write; size_t num_to_write_this_time; size_t bytes_per_unit; size_t total_to_write; size_t total_wrote = 0; if (study_file == NULL) { /* make a guess as to our filename */ count = 1; xml_filename = g_strdup_printf("%s.xml", name); raw_filename = g_strdup_printf("%s.dat", name); /* see if this file already exists */ while ((stat(xml_filename, &file_info) == 0) ||(stat(raw_filename, &file_info) == 0)) { g_free(xml_filename); g_free(raw_filename); count++; xml_filename = g_strdup_printf("%s_%d.xml", name, count); raw_filename = g_strdup_printf("%s_%d.dat", name, count); } /* and we now have unique filenames */ #ifdef AMIDE_DEBUG g_print("\t- saving raw data in file %s\n",xml_filename); #endif /* Note, "wb" is same as "w" on Unix, but not in Windows */ if ((file_pointer = fopen(raw_filename, "wb")) == NULL) { g_warning(_("couldn't save raw data file: %s"),raw_filename); g_free(xml_filename); g_free(raw_filename); return; } } else { file_pointer = study_file; } /* write it on out. */ location = ftell(file_pointer); num_to_write = amitk_raw_data_num_voxels(raw_data); bytes_per_unit = amitk_format_sizes[AMITK_RAW_DATA_FORMAT(raw_data)]; total_to_write = num_to_write; /* write in small chunks (<=16MB) to get around a bad samba/cygwin interaction */ while(num_to_write > 0) { if (num_to_write*bytes_per_unit > 0x1000000) num_to_write_this_time = 0x1000000/bytes_per_unit; else num_to_write_this_time = num_to_write; num_to_write -= num_to_write_this_time; num_wrote = fwrite((raw_data->data + total_wrote*bytes_per_unit), bytes_per_unit, num_to_write_this_time, file_pointer); total_wrote += num_wrote; if (num_wrote != num_to_write_this_time) { g_warning(_("incomplete save of raw data, wrote %zd (bytes), needed %zd (bytes), file: %s"), total_wrote*bytes_per_unit, total_to_write*bytes_per_unit, raw_filename); g_free(xml_filename); g_free(raw_filename); if (study_file == NULL) fclose(file_pointer); return; } } size = ftell(file_pointer)-location; if (study_file == NULL) fclose(file_pointer); /* write the xml portion */ doc = xmlNewDoc((xmlChar *) "1.0"); doc->children = xmlNewDocNode(doc, NULL, (xmlChar *) "raw_data", (xmlChar *) name); amitk_voxel_write_xml(doc->children, "dim", raw_data->dim); xml_save_string(doc->children,"raw_format", amitk_raw_format_get_name(amitk_format_to_raw_format(raw_data->format))); /* store the info on our associated data */ if (study_file == NULL) { xml_save_string(doc->children, "raw_data_file", raw_filename); g_free(raw_filename); } else { xml_save_location_and_size(doc->children, "raw_data_location_and_size", location, size); } /* and save */ if (study_file == NULL) { xmlSaveFile(xml_filename, doc); if (output_filename != NULL) *output_filename = xml_filename; else g_free(xml_filename); } else { *plocation = ftell(study_file); xmlDocDump(study_file, doc); *psize = ftell(study_file)-*plocation; } /* and we're done with the xml stuff*/ xmlFreeDoc(doc); return; } /* function to load in a raw data xml file */ AmitkRawData * amitk_raw_data_read_xml(gchar * xml_filename, FILE * study_file, guint64 location, guint64 size, gchar ** perror_buf, AmitkUpdateFunc update_func, gpointer update_data) { xmlDocPtr doc; AmitkRawData * raw_data; xmlNodePtr nodes; AmitkRawFormat i_raw_format, raw_format; gchar * temp_string; gchar * raw_filename=NULL; guint64 offset, dummy; long offset_long=0; AmitkVoxel dim; if ((doc = xml_open_doc(xml_filename, study_file, location, size, perror_buf)) == NULL) return NULL; /* function already appends the error message */ /* get the root of our document */ if ((nodes = xmlDocGetRootElement(doc)) == NULL) { amitk_append_str_with_newline(perror_buf,_("Raw data xml file doesn't appear to have a root: %s"), xml_filename); return NULL; } /* get the document tree */ nodes = nodes->children; dim = amitk_voxel_read_xml(nodes, "dim", perror_buf); /* figure out the data format */ temp_string = xml_get_string(nodes, "raw_format"); #if (G_BYTE_ORDER == G_BIG_ENDIAN) raw_format = AMITK_RAW_FORMAT_DOUBLE_64_BE; /* sensible guess in case we don't figure it out from the file */ #else /* (G_BYTE_ORDER == G_LITTLE_ENDIAN) */ raw_format = AMITK_RAW_FORMAT_DOUBLE_64_LE; /* sensible guess in case we don't figure it out from the file */ #endif if (temp_string != NULL) for (i_raw_format=0; i_raw_format < AMITK_RAW_FORMAT_NUM; i_raw_format++) if (g_ascii_strcasecmp(temp_string, amitk_raw_format_get_name(i_raw_format)) == 0) raw_format = i_raw_format; /* also need to check against legacy names for files created before amide version 0.7.11 */ for (i_raw_format=0; i_raw_format < AMITK_RAW_FORMAT_NUM; i_raw_format++) if (g_ascii_strcasecmp(temp_string, amitk_raw_format_legacy_names[i_raw_format]) == 0) raw_format = i_raw_format; g_free(temp_string); /* get the filename or location of our associated data */ if (study_file == NULL) { raw_filename = xml_get_string(nodes, "raw_data_file"); /* now load in the raw data */ #ifdef AMIDE_DEBUG g_print("reading data from file %s\n", raw_filename); #endif } else { xml_get_location_and_size(nodes, "raw_data_location_and_size", &offset, &dummy, perror_buf); /* check for file size problems */ if (!xml_check_file_32bit_okay(offset)) { amitk_append_str_with_newline(perror_buf, _("File to large to read on 32bit platform.")); return NULL; } offset_long = offset; } raw_data = amitk_raw_data_import_raw_file(raw_filename, study_file, raw_format, dim, offset_long, update_func, update_data); /* and we're done */ if (raw_filename != NULL) g_free(raw_filename); xmlFreeDoc(doc); return raw_data; } amide_data_t amitk_raw_data_get_value(const AmitkRawData * rd, const AmitkVoxel i) { g_return_val_if_fail(AMITK_IS_RAW_DATA(rd), EMPTY); if (!amitk_raw_data_includes_voxel(rd, i)) return EMPTY; /* hand everything off to the data type specific function */ switch(AMITK_RAW_DATA_FORMAT(rd)) { case AMITK_FORMAT_UBYTE: return AMITK_RAW_DATA_UBYTE_CONTENT(rd, i); case AMITK_FORMAT_SBYTE: return AMITK_RAW_DATA_SBYTE_CONTENT(rd, i); case AMITK_FORMAT_USHORT: return AMITK_RAW_DATA_USHORT_CONTENT(rd, i); case AMITK_FORMAT_SSHORT: return AMITK_RAW_DATA_SSHORT_CONTENT(rd, i); case AMITK_FORMAT_UINT: return AMITK_RAW_DATA_UINT_CONTENT(rd, i); case AMITK_FORMAT_SINT: return AMITK_RAW_DATA_SINT_CONTENT(rd, i); case AMITK_FORMAT_FLOAT: return AMITK_RAW_DATA_FLOAT_CONTENT(rd, i); case AMITK_FORMAT_DOUBLE: return AMITK_RAW_DATA_DOUBLE_CONTENT(rd, i); default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; } } gpointer amitk_raw_data_get_pointer(const AmitkRawData * rd, const AmitkVoxel i) { g_return_val_if_fail(AMITK_IS_RAW_DATA(rd), NULL); g_return_val_if_fail(amitk_raw_data_includes_voxel(rd, i), NULL); /* hand everything off to the data type specific function */ switch(AMITK_RAW_DATA_FORMAT(rd)) { case AMITK_FORMAT_UBYTE: return AMITK_RAW_DATA_UBYTE_POINTER(rd, i); case AMITK_FORMAT_SBYTE: return AMITK_RAW_DATA_SBYTE_POINTER(rd, i); case AMITK_FORMAT_USHORT: return AMITK_RAW_DATA_USHORT_POINTER(rd, i); case AMITK_FORMAT_SSHORT: return AMITK_RAW_DATA_SSHORT_POINTER(rd, i); case AMITK_FORMAT_UINT: return AMITK_RAW_DATA_UINT_POINTER(rd, i); case AMITK_FORMAT_SINT: return AMITK_RAW_DATA_SINT_POINTER(rd, i); case AMITK_FORMAT_FLOAT: return AMITK_RAW_DATA_FLOAT_POINTER(rd, i); case AMITK_FORMAT_DOUBLE: return AMITK_RAW_DATA_DOUBLE_POINTER(rd, i); default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return NULL; } } /* take in one of the raw data formats, and return the corresponding data format */ AmitkFormat amitk_raw_format_to_format(AmitkRawFormat raw_format) { AmitkFormat format; switch(raw_format) { case AMITK_RAW_FORMAT_UBYTE_8_NE: format = AMITK_FORMAT_UBYTE; break; case AMITK_RAW_FORMAT_SBYTE_8_NE: format = AMITK_FORMAT_SBYTE; break; case AMITK_RAW_FORMAT_USHORT_16_LE: case AMITK_RAW_FORMAT_USHORT_16_BE: format = AMITK_FORMAT_USHORT; break; case AMITK_RAW_FORMAT_SSHORT_16_LE: case AMITK_RAW_FORMAT_SSHORT_16_BE: format = AMITK_FORMAT_SSHORT; break; case AMITK_RAW_FORMAT_UINT_32_LE: case AMITK_RAW_FORMAT_UINT_32_BE: case AMITK_RAW_FORMAT_UINT_32_PDP: format = AMITK_FORMAT_UINT; break; case AMITK_RAW_FORMAT_SINT_32_LE: case AMITK_RAW_FORMAT_SINT_32_BE: case AMITK_RAW_FORMAT_SINT_32_PDP: format = AMITK_FORMAT_SINT; break; case AMITK_RAW_FORMAT_FLOAT_32_LE: case AMITK_RAW_FORMAT_FLOAT_32_BE: case AMITK_RAW_FORMAT_FLOAT_32_PDP: #if (SIZE_OF_AMIDE_T == 4) case AMITK_RAW_FORMAT_ASCII_8_NE: #endif format = AMITK_FORMAT_FLOAT; break; case AMITK_RAW_FORMAT_DOUBLE_64_LE: case AMITK_RAW_FORMAT_DOUBLE_64_BE: #if (SIZE_OF_AMIDE_T == 8) case AMITK_RAW_FORMAT_ASCII_8_NE: #endif format = AMITK_FORMAT_DOUBLE; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); format = AMITK_FORMAT_FLOAT; /* take a wild guess */ break; } return format; } /* tells you what raw data format corresponds to the given data format */ AmitkRawFormat amitk_format_to_raw_format(AmitkFormat format) { AmitkRawFormat raw_format; switch(format) { case AMITK_FORMAT_UBYTE: raw_format = AMITK_RAW_FORMAT_UBYTE_8_NE; break; case AMITK_FORMAT_SBYTE: raw_format = AMITK_RAW_FORMAT_SBYTE_8_NE; break; case AMITK_FORMAT_USHORT: #if (G_BYTE_ORDER == G_BIG_ENDIAN) raw_format = AMITK_RAW_FORMAT_USHORT_16_BE; #else #if (G_BYTE_ORDER == G_LITTLE_ENDIAN) raw_format = AMITK_RAW_FORMAT_USHORT_16_LE; #else #error "must specify G_LITTLE_ENDIAN or G_BIG_ENDIAN)" #endif #endif break; case AMITK_FORMAT_SSHORT: #if (G_BYTE_ORDER == G_BIG_ENDIAN) raw_format = AMITK_RAW_FORMAT_SSHORT_16_BE; #else /* (G_BYTE_ORDER == G_LITTLE_ENDIAN) */ raw_format = AMITK_RAW_FORMAT_SSHORT_16_LE; #endif break; case AMITK_FORMAT_UINT: #if (G_BYTE_ORDER == G_BIG_ENDIAN) raw_format = AMITK_RAW_FORMAT_UINT_32_BE; #else /* (G_BYTE_ORDER == G_LITTLE_ENDIAN) */ raw_format = AMITK_RAW_FORMAT_UINT_32_LE; #endif break; case AMITK_FORMAT_SINT: #if (G_BYTE_ORDER == G_BIG_ENDIAN) raw_format = AMITK_RAW_FORMAT_SINT_32_BE; #else /* (G_BYTE_ORDER == G_LITTLE_ENDIAN) */ raw_format = AMITK_RAW_FORMAT_SINT_32_LE; #endif break; case AMITK_FORMAT_FLOAT: #if (G_BYTE_ORDER == G_BIG_ENDIAN) raw_format = AMITK_RAW_FORMAT_FLOAT_32_BE; #else /* (G_BYTE_ORDER == G_LITTLE_ENDIAN) */ raw_format = AMITK_RAW_FORMAT_FLOAT_32_LE; #endif break; case AMITK_FORMAT_DOUBLE: #if (G_BYTE_ORDER == G_BIG_ENDIAN) raw_format = AMITK_RAW_FORMAT_DOUBLE_64_BE; #else /* (G_BYTE_ORDER == G_LITTLE_ENDIAN) */ raw_format = AMITK_RAW_FORMAT_DOUBLE_64_LE; #endif break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); raw_format = AMITK_RAW_FORMAT_UBYTE_8_NE; /* take a wild guess */ break; } return raw_format; } const gchar * amitk_raw_format_get_name(const AmitkRawFormat raw_format) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_RAW_FORMAT); enum_value = g_enum_get_value(enum_class, raw_format); g_type_class_unref(enum_class); return enum_value->value_nick; } amide-1.0.5/src/amitk_canvas.c0000664000175000017500000042607512270273651016064 0ustar loeningloening/* amitk_canvas.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amitk_study.h" #include "amide.h" #include "amitk_canvas.h" #include "amitk_canvas_object.h" #include "image.h" #include "ui_common.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" #define BOX_SPACING 3 #define DEFAULT_CANVAS_TRIANGLE_WIDTH 8.0 #define DEFAULT_CANVAS_TRIANGLE_HEIGHT 8.0 #define DEFAULT_CANVAS_BORDER_WIDTH 12.0 #define DEFAULT_CANVAS_TRIANGLE_SEPARATION 2.0 /* distance between triangle and canvas */ #define DEFAULT_CANVAS_TRIANGLE_BORDER 2.0 /* should be DEFAULT_CANVAS_BORDER_WIDTH-DEFAULT_CANVAS_TRIANGLE_HEIGHT-DEFAULT_CANVAS_TRIANGLE_SEPARATION */ #define UPDATE_NONE 0x00 #define UPDATE_VIEW 0x01 #define UPDATE_ARROWS 0x02 #define UPDATE_LINE_PROFILE 0x04 #define UPDATE_DATA_SETS 0x08 #define UPDATE_SCROLLBAR 0x10 #define UPDATE_OBJECT 0x20 #define UPDATE_OBJECTS 0x40 #define UPDATE_TARGET 0x80 #define UPDATE_TIME 0x100 #define UPDATE_SUBJECT_ORIENTATION 0x200 #define UPDATE_ALL 0x2FF #define cp_2_p(canvas, canvas_cpoint) (canvas_point_2_point(AMITK_VOLUME_CORNER((canvas)->volume),\ (canvas)->pixbuf_width, \ (canvas)->pixbuf_height,\ (canvas)->border_width, \ (canvas)->border_width, \ (canvas_cpoint))) #define p_2_cp(canvas, canvas_cpoint) (point_2_canvas_point(AMITK_VOLUME_CORNER((canvas)->volume),\ (canvas)->pixbuf_width, \ (canvas)->pixbuf_height,\ (canvas)->border_width, \ (canvas)->border_width, \ (canvas_cpoint))) gchar * orientation_label[6] = { N_("A"), N_("P"), N_("L"), N_("R"), N_("S"), N_("I") }; enum { ANTERIOR, POSTERIOR, LEFT, RIGHT, SUPERIOR, INFERIOR }; enum { HELP_EVENT, VIEW_CHANGING, VIEW_CHANGED, ERASE_VOLUME, NEW_OBJECT, LAST_SIGNAL } amitk_canvas_signals; typedef enum { CANVAS_EVENT_NONE, CANVAS_EVENT_ENTER_OBJECT, CANVAS_EVENT_LEAVE, CANVAS_EVENT_PRESS_MOVE_VIEW, CANVAS_EVENT_PRESS_MINIMIZE_VIEW, CANVAS_EVENT_PRESS_RESIZE_VIEW, CANVAS_EVENT_PRESS_SHIFT_OBJECT, /* currently data set only */ CANVAS_EVENT_PRESS_ROTATE_OBJECT, /* currently study or data set only */ CANVAS_EVENT_PRESS_NEW_ROI, CANVAS_EVENT_PRESS_SHIFT_OBJECT_IMMEDIATE, /* currently roi/line_profile/fiducial only */ CANVAS_EVENT_PRESS_ROTATE_OBJECT_IMMEDIATE, /* currently roi/line_profile only */ /* 10 */ CANVAS_EVENT_PRESS_RESIZE_ROI, CANVAS_EVENT_PRESS_ENTER_DRAWING_MODE, CANVAS_EVENT_PRESS_LEAVE_DRAWING_MODE, CANVAS_EVENT_PRESS_DRAW_POINT, CANVAS_EVENT_PRESS_DRAW_LARGE_POINT, CANVAS_EVENT_PRESS_ERASE_POINT, CANVAS_EVENT_PRESS_ERASE_LARGE_POINT, CANVAS_EVENT_PRESS_CHANGE_ISOCONTOUR, CANVAS_EVENT_PRESS_ERASE_VOLUME_INSIDE_ROI, CANVAS_EVENT_PRESS_ERASE_VOLUME_OUTSIDE_ROI, CANVAS_EVENT_PRESS_NEW_OBJECT, CANVAS_EVENT_MOTION, CANVAS_EVENT_MOTION_MOVE_VIEW, CANVAS_EVENT_MOTION_MINIMIZE_VIEW, CANVAS_EVENT_MOTION_RESIZE_VIEW, CANVAS_EVENT_MOTION_SHIFT_OBJECT, CANVAS_EVENT_MOTION_ROTATE_OBJECT, CANVAS_EVENT_MOTION_NEW_ROI, CANVAS_EVENT_MOTION_RESIZE_ROI, CANVAS_EVENT_MOTION_DRAW_POINT, CANVAS_EVENT_MOTION_DRAW_LARGE_POINT, CANVAS_EVENT_MOTION_ERASE_POINT, CANVAS_EVENT_MOTION_ERASE_LARGE_POINT, CANVAS_EVENT_MOTION_CHANGE_ISOCONTOUR, CANVAS_EVENT_RELEASE_MOVE_VIEW, CANVAS_EVENT_RELEASE_MINIMIZE_VIEW, CANVAS_EVENT_RELEASE_RESIZE_VIEW, CANVAS_EVENT_RELEASE_SHIFT_OBJECT, CANVAS_EVENT_RELEASE_ROTATE_OBJECT, CANVAS_EVENT_RELEASE_NEW_ROI, CANVAS_EVENT_RELEASE_SHIFT_OBJECT_IMMEDIATE, /* currently roi/line_profie/fiducial only */ CANVAS_EVENT_RELEASE_ROTATE_OBJECT_IMMEDIATE, CANVAS_EVENT_RELEASE_RESIZE_ROI, CANVAS_EVENT_RELEASE_DRAW_POINT, CANVAS_EVENT_RELEASE_DRAW_LARGE_POINT, CANVAS_EVENT_RELEASE_ERASE_POINT, CANVAS_EVENT_RELEASE_ERASE_LARGE_POINT, CANVAS_EVENT_RELEASE_CHANGE_ISOCONTOUR, CANVAS_EVENT_CANCEL_SHIFT_OBJECT, CANVAS_EVENT_CANCEL_ROTATE_OBJECT, CANVAS_EVENT_CANCEL_CHANGE_ISOCONTOUR, CANVAS_EVENT_ENACT_SHIFT_OBJECT, CANVAS_EVENT_ENACT_ROTATE_OBJECT, CANVAS_EVENT_ENACT_CHANGE_ISOCONTOUR, CANVAS_EVENT_SCROLL_UP, CANVAS_EVENT_SCROLL_DOWN, } canvas_event_t; static void canvas_class_init (AmitkCanvasClass *klass); static void canvas_init (AmitkCanvas *canvas); static void canvas_destroy(GtkObject * object); static GnomeCanvasItem * canvas_find_item(AmitkCanvas * canvas, AmitkObject * object); static GList * canvas_add_current_objects(AmitkCanvas * canvas, GList * objects); static void canvas_space_changed_cb(AmitkSpace * space, gpointer canvas); static void canvas_object_selection_changed_cb(AmitkObject * object, gpointer canvas); static void canvas_object_add_child_cb(AmitkObject * parent, AmitkObject * child, gpointer data); static void canvas_object_remove_child_cb(AmitkObject * parent, AmitkObject * child, gpointer data); static void canvas_view_changed_cb(AmitkStudy * study, gpointer canvas); static void canvas_roi_preference_changed_cb(AmitkStudy * study, gpointer canvas); static void canvas_general_preference_changed_cb(AmitkStudy * study, gpointer canvas); static void canvas_line_profile_changed_cb(AmitkLineProfile * line_profile, gpointer data); static void canvas_target_preference_changed_cb(AmitkStudy * study, gpointer canvas); static void canvas_layout_preference_changed_cb(AmitkStudy * study, gpointer canvas); static void canvas_study_changed_cb(AmitkStudy * study, gpointer canvas); static void canvas_target_changed_cb(AmitkStudy * study, gpointer canvas); static void canvas_time_changed_cb(AmitkStudy * study, gpointer canvas); static void canvas_volume_changed_cb(AmitkVolume * vol, gpointer canvas); static void canvas_roi_changed_cb(AmitkRoi * roi, gpointer canvas); static void canvas_fiducial_mark_changed_cb(AmitkFiducialMark * fm, gpointer canvas); static void canvas_data_set_invalidate_slice_cache(AmitkDataSet * ds, gpointer data); static void data_set_changed_cb(AmitkDataSet * ds, gpointer canvas); static void data_set_subject_orientation_changed_cb(AmitkDataSet * ds, gpointer canvas); static void data_set_thresholding_changed_cb(AmitkDataSet * ds, gpointer data); static void data_set_color_table_changed_cb(AmitkDataSet * ds, AmitkViewMode view_mode, gpointer data); static amide_real_t canvas_check_z_dimension(AmitkCanvas * canvas, amide_real_t z); static void canvas_create_isocontour_roi(AmitkCanvas * canvas, AmitkRoi * roi, AmitkPoint position, AmitkDataSet * active_slice); static gboolean canvas_create_freehand_roi(AmitkCanvas * canvas, AmitkRoi * roi, AmitkPoint position, AmitkDataSet * active_slice); static gboolean canvas_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data); static void canvas_scrollbar_adjustment_cb(GtkObject * adjustment, gpointer data); static gboolean canvas_recalc_corners(AmitkCanvas * canvas); static void canvas_update_scrollbar(AmitkCanvas * canvas, AmitkPoint center, amide_real_t thickness); static void canvas_update_target(AmitkCanvas * canvas, AmitkCanvasTargetAction action, AmitkPoint center, amide_real_t thickness); static void canvas_update_arrows(AmitkCanvas * canvas); static void canvas_update_line_profile(AmitkCanvas * canvas); static void canvas_update_time_on_image(AmitkCanvas * canvas); static void canvas_update_subject_orientation(AmitkCanvas * canvas); static void canvas_update_pixbuf(AmitkCanvas * canvas); static void canvas_update_object(AmitkCanvas * canvas, AmitkObject * object); static void canvas_update_objects(AmitkCanvas * canvas, gboolean all); static void canvas_update_setup(AmitkCanvas * canvas); static void canvas_add_object_update(AmitkCanvas * canvas, AmitkObject * object); static void canvas_add_update(AmitkCanvas * canvas, guint update_type); static gboolean canvas_update_while_idle(gpointer canvas); static void canvas_add_object(AmitkCanvas * canvas, AmitkObject * object); static void canvas_remove_object(AmitkCanvas * canvas, AmitkObject * object); static GtkVBoxClass *canvas_parent_class; static guint canvas_signals[LAST_SIGNAL]; GType amitk_canvas_get_type (void) { static GType canvas_type = 0; if (!canvas_type) { static const GTypeInfo canvas_info = { sizeof (AmitkCanvasClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) canvas_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (AmitkCanvas), 0, /* # preallocs */ (GInstanceInitFunc) canvas_init, NULL /* value table */ }; canvas_type = g_type_register_static (GTK_TYPE_VBOX, "AmitkCanvas", &canvas_info, 0); } return canvas_type; } static void canvas_class_init (AmitkCanvasClass *klass) { GtkObjectClass *gtkobject_class; /* GtkWidgetClass *widget_class; GObjectClass *gobject_class; */ gtkobject_class = (GtkObjectClass*) klass; /* widget_class = (GtkWidgetClass*) klass; gobject_class = (GObjectClass *) klass; */ canvas_parent_class = g_type_class_peek_parent(klass); gtkobject_class->destroy = canvas_destroy; canvas_signals[HELP_EVENT] = g_signal_new ("help_event", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkCanvasClass, help_event), NULL,NULL, amitk_marshal_NONE__ENUM_BOXED_DOUBLE, G_TYPE_NONE, 3, AMITK_TYPE_HELP_INFO, AMITK_TYPE_POINT, AMITK_TYPE_DATA); canvas_signals[VIEW_CHANGING] = g_signal_new ("view_changing", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkCanvasClass, view_changing), NULL,NULL, amitk_marshal_NONE__BOXED_DOUBLE, G_TYPE_NONE, 2, AMITK_TYPE_POINT, AMITK_TYPE_REAL); canvas_signals[VIEW_CHANGED] = g_signal_new ("view_changed", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkCanvasClass, view_changed), NULL,NULL, amitk_marshal_NONE__BOXED_DOUBLE, G_TYPE_NONE, 2, AMITK_TYPE_POINT, AMITK_TYPE_REAL); canvas_signals[ERASE_VOLUME] = g_signal_new("erase_volume", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkCanvasClass, erase_volume), NULL,NULL, amitk_marshal_NONE__OBJECT_BOOLEAN, G_TYPE_NONE, 2, AMITK_TYPE_ROI, G_TYPE_BOOLEAN); canvas_signals[NEW_OBJECT] = g_signal_new ("new_object", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkCanvasClass, new_object), NULL,NULL, amitk_marshal_NONE__OBJECT_ENUM_BOXED, G_TYPE_NONE, 3, AMITK_TYPE_OBJECT, AMITK_TYPE_OBJECT_TYPE, AMITK_TYPE_POINT); } static void canvas_init (AmitkCanvas *canvas) { gint i; gtk_box_set_homogeneous(GTK_BOX(canvas), FALSE); /* initialize some critical stuff */ for (i=0;i<4;i++) canvas->arrows[i]=NULL; for (i=0;i<8;i++) canvas->target[i]=NULL; for (i=0;i<4;i++) canvas->orientation_label[i]=NULL; canvas->line_profile_item = NULL; canvas->type = AMITK_CANVAS_TYPE_NORMAL; canvas->volume = amitk_volume_new(); amitk_volume_set_corner(canvas->volume, one_point); canvas->center = zero_point; canvas->active_object = NULL; canvas->canvas = NULL; canvas->slice_cache = NULL; canvas->max_slice_cache_size = 15; canvas->slices=NULL; canvas->image=NULL; canvas->pixbuf=NULL; canvas->time_on_image=FALSE; canvas->time_label=NULL; canvas->pixbuf_width = 128; canvas->pixbuf_height = 128; canvas->study = NULL; canvas->undrawn_rois = NULL; canvas->object_items=NULL; canvas->next_update = 0; canvas->idle_handler_id = 0; canvas->next_update_objects = NULL; } static void canvas_destroy (GtkObject * object) { AmitkCanvas * canvas; g_return_if_fail (object != NULL); g_return_if_fail (AMITK_IS_CANVAS (object)); canvas = AMITK_CANVAS(object); if (canvas->idle_handler_id != 0) { g_source_remove(canvas->idle_handler_id); canvas->idle_handler_id = 0; } if (canvas->next_update_objects != NULL) { canvas->next_update_objects = amitk_objects_unref(canvas->next_update_objects); } if (canvas->volume != NULL) canvas->volume = amitk_object_unref(canvas->volume); if (canvas->slice_cache != NULL) { canvas->slice_cache = amitk_objects_unref(canvas->slice_cache); } if (canvas->slices != NULL) { canvas->slices = amitk_objects_unref(canvas->slices); } if (canvas->pixbuf != NULL) { g_object_unref(canvas->pixbuf); canvas->pixbuf = NULL; } if (canvas->undrawn_rois != NULL) { canvas->undrawn_rois = amitk_objects_unref(canvas->undrawn_rois); } if (canvas->study != NULL) { canvas_remove_object(canvas, AMITK_OBJECT(canvas->study)); canvas->study = NULL; } if (GTK_OBJECT_CLASS (canvas_parent_class)->destroy) (* GTK_OBJECT_CLASS (canvas_parent_class)->destroy) (object); } static GnomeCanvasItem * canvas_find_item(AmitkCanvas * canvas, AmitkObject * object) { GList * items=canvas->object_items; while (items != NULL) { if (object == g_object_get_data(G_OBJECT(items->data), "object")) return items->data; items = items->next; } return NULL; } /* returns a referenced list of all the objects that currently have items on display. If objects != NULL, the returned list will be the concatenation of "objects" and currently appearing items not in "objects" */ static GList * canvas_add_current_objects(AmitkCanvas * canvas, GList * objects) { AmitkObject * object; GList * items=canvas->object_items; while (items != NULL) { object = g_object_get_data(G_OBJECT(items->data), "object"); if (object != NULL) if (g_list_index(objects, object) < 0) objects = g_list_append(objects, amitk_object_ref(object)); items = items->next; } return objects; } AmitkColorTable canvas_get_color_table(AmitkCanvas * canvas) { if (canvas->active_object != NULL) if (AMITK_IS_DATA_SET(canvas->active_object)) return amitk_data_set_get_color_table_to_use(AMITK_DATA_SET(canvas->active_object), AMITK_CANVAS_VIEW_MODE(canvas)); return AMITK_COLOR_TABLE_BW_LINEAR; /* default */ } static void canvas_space_changed_cb(AmitkSpace * space, gpointer data) { AmitkObject * object; AmitkCanvas * canvas = data; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_OBJECT(space)); object = AMITK_OBJECT(space); canvas_add_object_update(canvas, object); return; } static void canvas_object_selection_changed_cb(AmitkObject * object, gpointer data) { AmitkCanvas * canvas = data; GnomeCanvasItem * item; gboolean undrawn_roi=FALSE; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_OBJECT(object)); if (AMITK_IS_DATA_SET(object)) { /* update on select or unselect */ canvas_add_update(canvas, UPDATE_ALL); } else { if (AMITK_IS_ROI(object)) undrawn_roi = AMITK_ROI_UNDRAWN(object); if (amitk_object_get_selected(object, canvas->view_mode)) { if (undrawn_roi) { if (g_list_index(canvas->undrawn_rois, object) < 0) /* not yet in list */ canvas->undrawn_rois = g_list_prepend(canvas->undrawn_rois, amitk_object_ref(object)); } else { canvas_add_object_update(canvas, object); } } else { if (undrawn_roi) { if (g_list_index(canvas->undrawn_rois, object) >= 0) { canvas->undrawn_rois = g_list_remove(canvas->undrawn_rois, object); amitk_object_unref(object); } } else if ((item = canvas_find_item(canvas, object)) != NULL) { /* an unselect */ canvas->object_items = g_list_remove(canvas->object_items, item); gtk_object_destroy(GTK_OBJECT(item)); canvas_add_update(canvas, UPDATE_VIEW); /* needed to check if we need to reset the view slice */ } } } return; } static void canvas_object_add_child_cb(AmitkObject * parent, AmitkObject * child, gpointer data) { AmitkCanvas * canvas = data; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_OBJECT(child)); canvas_add_object(AMITK_CANVAS(canvas), child); return; } static void canvas_object_remove_child_cb(AmitkObject * parent, AmitkObject * child, gpointer data) { AmitkCanvas * canvas = data; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_OBJECT(child)); canvas_remove_object(AMITK_CANVAS(canvas), child); return; } static void canvas_view_changed_cb(AmitkStudy * study, gpointer data) { AmitkCanvas * canvas = data; gboolean changed=FALSE; gboolean coords_changed = FALSE; AmitkPoint temp[2]; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_OBJECT(study)); if (!REAL_EQUAL(AMITK_STUDY_VIEW_THICKNESS(study), AMITK_VOLUME_Z_CORNER(canvas->volume))) { amitk_volume_set_z_corner(canvas->volume, AMITK_STUDY_VIEW_THICKNESS(study)); changed = TRUE; } temp[0] = amitk_space_b2s(AMITK_SPACE(canvas->volume), AMITK_STUDY_VIEW_CENTER(study)); temp[1] = amitk_space_b2s(AMITK_SPACE(canvas->volume), canvas->center); if (!REAL_EQUAL(temp[0].z, temp[1].z)) changed = TRUE; /* only need to update if z's changed */ else if (!POINT_EQUAL(temp[0], temp[1])) coords_changed = TRUE; canvas->center = AMITK_STUDY_VIEW_CENTER(study); if (changed) { canvas_add_update(canvas, UPDATE_ALL); } else if (coords_changed) { canvas_add_update(canvas, UPDATE_ARROWS); canvas_add_update(canvas, UPDATE_TARGET); canvas_add_update(canvas, UPDATE_LINE_PROFILE); } return; } static void canvas_roi_preference_changed_cb(AmitkStudy * study, gpointer data) { AmitkCanvas * canvas = data; canvas_add_update(canvas, UPDATE_OBJECTS); /* line_style, transparency, roi_width, fill_roi */ return; } static void canvas_general_preference_changed_cb(AmitkStudy * study, gpointer data) { AmitkCanvas * canvas = data; canvas_add_update(canvas, UPDATE_ALL); /* maintain_size */ return; } static void canvas_target_preference_changed_cb(AmitkStudy * study, gpointer data) { AmitkCanvas * canvas = data; canvas_add_update(canvas, UPDATE_TARGET); /* target_empty_area */ return; } static void canvas_layout_preference_changed_cb(AmitkStudy * study, gpointer data) { AmitkCanvas * canvas = data; amitk_space_set_view_space(AMITK_SPACE(canvas->volume), canvas->view, AMITK_STUDY_CANVAS_LAYOUT(canvas->study)); canvas_recalc_corners(canvas); /* make sure everything's specified correctly */ canvas_update_setup(canvas); return; } static void canvas_line_profile_changed_cb(AmitkLineProfile * line_profile, gpointer data) { AmitkCanvas * canvas = data; canvas_add_update(canvas, UPDATE_LINE_PROFILE); return; } static void canvas_study_changed_cb(AmitkStudy * study, gpointer data) { AmitkCanvas * canvas = data; canvas_add_update(canvas, UPDATE_ALL); return; } static void canvas_target_changed_cb(AmitkStudy * study, gpointer data) { AmitkCanvas * canvas = data; if (AMITK_STUDY_CANVAS_TARGET(study)) canvas->next_target_action = AMITK_CANVAS_TARGET_ACTION_LEAVE; else canvas->next_target_action = AMITK_CANVAS_TARGET_ACTION_HIDE; canvas_add_update(canvas, UPDATE_TARGET); return; } static void canvas_time_changed_cb(AmitkStudy * study, gpointer data) { AmitkCanvas * canvas = data; canvas_add_update(canvas, UPDATE_ALL); } static void canvas_volume_changed_cb(AmitkVolume * vol, gpointer data) { AmitkCanvas * canvas = data; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_VOLUME(vol)); /* check if we need to remove the roi from the undrawn list */ if (AMITK_IS_ROI(vol)) if (!AMITK_ROI_UNDRAWN(vol)) if (g_list_index(canvas->undrawn_rois, vol) >= 0) { canvas->undrawn_rois = g_list_remove(canvas->undrawn_rois, vol); amitk_object_unref(vol); } canvas_add_object_update(canvas, AMITK_OBJECT(vol)); return; } static void canvas_roi_changed_cb(AmitkRoi * roi, gpointer data) { AmitkCanvas * canvas = data; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_ROI(roi)); canvas_add_object_update(canvas, AMITK_OBJECT(roi)); return; } static void canvas_fiducial_mark_changed_cb(AmitkFiducialMark * fm, gpointer data) { AmitkCanvas * canvas = data; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_FIDUCIAL_MARK(fm)); canvas_add_object_update(canvas, AMITK_OBJECT(fm)); return; } static void canvas_data_set_invalidate_slice_cache(AmitkDataSet * ds, gpointer data) { AmitkCanvas * canvas = data; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_DATA_SET(ds)); canvas->slice_cache = amitk_data_sets_remove_with_slice_parent(canvas->slice_cache, ds); } static void data_set_changed_cb(AmitkDataSet * ds, gpointer data) { AmitkCanvas * canvas = data; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_DATA_SET(ds)); canvas_add_object_update(canvas, AMITK_OBJECT(ds)); return; } static void data_set_subject_orientation_changed_cb(AmitkDataSet * ds, gpointer data) { AmitkCanvas * canvas = data; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds == AMITK_DATA_SET(canvas->active_object)) canvas_add_update(canvas, UPDATE_SUBJECT_ORIENTATION); return; } static void data_set_thresholding_changed_cb(AmitkDataSet * ds, gpointer data) { AmitkCanvas * canvas = data; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_DATA_SET(ds)); canvas_add_update(canvas, UPDATE_DATA_SETS); } static void data_set_color_table_changed_cb(AmitkDataSet * ds, AmitkViewMode view_mode, gpointer data) { AmitkCanvas * canvas = data; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (view_mode == AMITK_CANVAS_VIEW_MODE(canvas)) { canvas_add_update(canvas, UPDATE_DATA_SETS); canvas_add_update(canvas, UPDATE_OBJECTS); } } static void value_spin_cb(GtkWidget * widget, gpointer data) { gdouble * value = data; *value = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } static amide_real_t canvas_check_z_dimension(AmitkCanvas * canvas, amide_real_t z) { GtkWindow * window; GtkWidget * toplevel; GtkWidget * dialog; GtkWidget * table; GtkWidget * label; GtkWidget * spin_button; GtkWidget * image; g_return_val_if_fail(AMITK_IS_CANVAS(canvas), z); toplevel = gtk_widget_get_toplevel (GTK_WIDGET(canvas)); if (toplevel != NULL) window = GTK_WINDOW(toplevel); else window = NULL; dialog = gtk_dialog_new_with_buttons (_("ROI Depth Selection"), window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); table = gtk_table_new(1,3,FALSE); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table); /* pick depth of roi */ image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_QUESTION,GTK_ICON_SIZE_DIALOG); gtk_table_attach(GTK_TABLE(table), image, 0,1, 0,1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); label = gtk_label_new(_("Please pick depth of ROI (mm):")); gtk_table_attach(GTK_TABLE(table), label, 1,2, 0,1, 0, 0, X_PADDING, Y_PADDING); spin_button = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, MAX(z,EPSILON)); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), z); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_button),FALSE); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin_button), GTK_UPDATE_ALWAYS); gtk_entry_set_activates_default(GTK_ENTRY(spin_button), TRUE); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(value_spin_cb), &z); g_signal_connect(G_OBJECT(spin_button), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(table), spin_button, 2,3, 0,1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show_all(dialog); gtk_dialog_run(GTK_DIALOG(dialog)); /* let the user input */ gtk_widget_destroy(dialog); return z; } static void isocontour_gray_spins(AmitkRoiIsocontourRange isocontour_range, GtkWidget * min_spin_button, GtkWidget * max_spin_button) { switch (isocontour_range) { case AMITK_ROI_ISOCONTOUR_RANGE_BETWEEN_MIN_MAX: gtk_widget_set_sensitive(min_spin_button, TRUE); gtk_widget_set_sensitive(max_spin_button, TRUE); break; case AMITK_ROI_ISOCONTOUR_RANGE_BELOW_MAX: gtk_widget_set_sensitive(min_spin_button, FALSE); gtk_widget_set_sensitive(max_spin_button, TRUE); break; case AMITK_ROI_ISOCONTOUR_RANGE_ABOVE_MIN: default: gtk_widget_set_sensitive(min_spin_button, TRUE); gtk_widget_set_sensitive(max_spin_button, FALSE); break; } return; } static void isocontour_range_cb(GtkWidget * widget, gpointer data) { AmitkRoiIsocontourRange *pisocontour_range = data; GtkWidget * min_spin_button; GtkWidget * max_spin_button; /* get the state of the button */ *pisocontour_range = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "isocontour_range")); min_spin_button = g_object_get_data(G_OBJECT(widget), "min_spin_button"); max_spin_button = g_object_get_data(G_OBJECT(widget), "max_spin_button"); /* appropriately gray them out */ isocontour_gray_spins(*pisocontour_range, min_spin_button, max_spin_button); return; } static void canvas_create_isocontour_roi(AmitkCanvas * canvas, AmitkRoi * roi, AmitkPoint position, AmitkDataSet * active_slice) { AmitkPoint temp_point; AmitkVoxel temp_voxel; amide_time_t start_time, end_time; AmitkObject * parent_ds; AmitkDataSet * draw_on_ds=NULL; GtkWindow * window; GtkWidget * toplevel; amide_intpoint_t gate; GtkWidget * hbox; GtkWidget * dialog; GtkWidget * table; GtkWidget * label; GtkWidget * min_spin_button; GtkWidget * max_spin_button; GtkWidget * image; GtkWidget * radio_button[3]; amide_data_t isocontour_min_value; amide_data_t isocontour_max_value; AmitkRoiIsocontourRange isocontour_range; AmitkRoiIsocontourRange i_range; gint table_row; gchar * temp_str; gint return_val; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_ROI(roi)); g_return_if_fail(AMITK_ROI_TYPE_ISOCONTOUR(roi)); /* figure out the data set we're drawing on */ parent_ds = amitk_object_get_parent_of_type(AMITK_OBJECT(roi), AMITK_OBJECT_TYPE_DATA_SET); if (AMITK_ROI_TYPE(roi) == AMITK_ROI_TYPE_ISOCONTOUR_2D) { if (parent_ds != NULL) { draw_on_ds = amitk_data_sets_find_with_slice_parent(canvas->slices, AMITK_DATA_SET(parent_ds)); if (draw_on_ds == NULL) { g_warning(_("Parent of isocontour not currently displayed, can't draw isocontour")); return; } } else if (active_slice != NULL) { /* if no data set parent, just use the active slice */ draw_on_ds = active_slice; } } else { /* ISOCONTOUR_3D */ if (parent_ds != NULL) draw_on_ds = AMITK_DATA_SET(parent_ds); else if (canvas->active_object != NULL) if (AMITK_IS_DATA_SET(canvas->active_object)) draw_on_ds = AMITK_DATA_SET(canvas->active_object); } if (draw_on_ds == NULL) { g_warning(_("No data set found to draw isocontour on")); return; } start_time = AMITK_STUDY_VIEW_START_TIME(canvas->study); temp_point = amitk_space_b2s(AMITK_SPACE(draw_on_ds), position); if (AMITK_ROI_TYPE(roi) == AMITK_ROI_TYPE_ISOCONTOUR_3D) gate = AMITK_DATA_SET_VIEW_START_GATE(draw_on_ds); else gate = 0; POINT_TO_VOXEL(temp_point, AMITK_DATA_SET_VOXEL_SIZE(draw_on_ds), amitk_data_set_get_frame(AMITK_DATA_SET(draw_on_ds), start_time), gate, temp_voxel); if (!amitk_raw_data_includes_voxel(AMITK_DATA_SET_RAW_DATA(draw_on_ds),temp_voxel)) { g_warning(_("designated voxel not in data set %s"), AMITK_OBJECT_NAME(draw_on_ds)); return; } /* what we probably want to set the isocontour too */ isocontour_min_value = amitk_data_set_get_value(draw_on_ds, temp_voxel); isocontour_max_value = isocontour_min_value; isocontour_range = AMITK_ROI_ISOCONTOUR_RANGE(roi); toplevel = gtk_widget_get_toplevel (GTK_WIDGET(canvas)); if (toplevel != NULL) window = GTK_WINDOW(toplevel); else window = NULL; /* pop up dialog to let user pick isocontour values, etc. and for any warning messages */ dialog = gtk_dialog_new_with_buttons (_("Isocontour Value Selection"), window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); table = gtk_table_new(4,3,FALSE); table_row=0; gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table); /* complain if more then one frame or gate is currently showing for ISOCONTOUR_3D */ if (AMITK_ROI_TYPE(roi) == AMITK_ROI_TYPE_ISOCONTOUR_3D) { end_time = start_time + AMITK_STUDY_VIEW_DURATION(canvas->study); /* warning for multiple frames */ if (temp_voxel.t != amitk_data_set_get_frame(AMITK_DATA_SET(draw_on_ds), end_time)) { image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_WARNING,GTK_ICON_SIZE_DIALOG); gtk_table_attach(GTK_TABLE(table), image, 0,1, table_row,table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); temp_str = g_strdup_printf(_("Multiple data frames are currently being shown from: %s\nThe isocontour will only be drawn over frame %d"),AMITK_OBJECT_NAME(draw_on_ds), temp_voxel.t); label = gtk_label_new(temp_str); g_free(temp_str); gtk_table_attach(GTK_TABLE(table), label, 1,3,table_row,table_row+1, 0, 0, X_PADDING, Y_PADDING); table_row++; } /* warning for multiple gates */ if (AMITK_DATA_SET_VIEW_START_GATE(draw_on_ds) != AMITK_DATA_SET_VIEW_END_GATE(draw_on_ds)) { image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_WARNING,GTK_ICON_SIZE_DIALOG); gtk_table_attach(GTK_TABLE(table), image, 0,1, table_row,table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); temp_str = g_strdup_printf(_("Multiple gates are currently being shown from: %s\nThe isocontour will only be drawn over gate %d"),AMITK_OBJECT_NAME(draw_on_ds), temp_voxel.g); label = gtk_label_new(temp_str); g_free(temp_str); gtk_table_attach(GTK_TABLE(table), label, 1,3, table_row,table_row+1, 0, 0, X_PADDING, Y_PADDING); table_row++; } } image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_QUESTION,GTK_ICON_SIZE_DIALOG); gtk_table_attach(GTK_TABLE(table), image, 0,1, table_row,table_row+2, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); /* box where the radio buttons will go */ hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(table), hbox,1,3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hbox); table_row++; /* the spin buttons */ label = gtk_label_new(_("Min:")); gtk_table_attach(GTK_TABLE(table), label, 1,2, table_row,table_row+1, 0, 0, X_PADDING, Y_PADDING); min_spin_button = gtk_spin_button_new_with_range(-G_MAXDOUBLE, isocontour_min_value, MAX(EPSILON,fabs(isocontour_min_value)/10)); gtk_spin_button_set_value(GTK_SPIN_BUTTON(min_spin_button), isocontour_min_value); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(min_spin_button),FALSE); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(min_spin_button), FALSE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(min_spin_button), FALSE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(min_spin_button), GTK_UPDATE_ALWAYS); gtk_entry_set_activates_default(GTK_ENTRY(min_spin_button), TRUE); g_signal_connect(G_OBJECT(min_spin_button), "value_changed", G_CALLBACK(value_spin_cb), &isocontour_min_value); g_signal_connect(G_OBJECT(min_spin_button), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(table), min_spin_button, 2,3, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("Max:")); gtk_table_attach(GTK_TABLE(table), label, 1,2, table_row,table_row+1, 0, 0, X_PADDING, Y_PADDING); max_spin_button = gtk_spin_button_new_with_range(isocontour_max_value, G_MAXDOUBLE, MAX(EPSILON,fabs(isocontour_max_value)/10)); gtk_spin_button_set_value(GTK_SPIN_BUTTON(max_spin_button), isocontour_max_value); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(max_spin_button),FALSE); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(max_spin_button), FALSE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(max_spin_button), FALSE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(max_spin_button), GTK_UPDATE_ALWAYS); gtk_entry_set_activates_default(GTK_ENTRY(max_spin_button), TRUE); g_signal_connect(G_OBJECT(max_spin_button), "value_changed", G_CALLBACK(value_spin_cb), &isocontour_max_value); g_signal_connect(G_OBJECT(max_spin_button), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(table), max_spin_button, 2,3, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* appropriately gray them out */ isocontour_gray_spins(isocontour_range, min_spin_button, max_spin_button); /* radio buttons to choose the isocontour type */ radio_button[0] = gtk_radio_button_new_with_label(NULL, _("Above Min")); radio_button[1] = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button[0]), _("Below Max")); radio_button[2] = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button[0]), _("Between Min/Max")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[isocontour_range]), TRUE); for (i_range=0; i_range < AMITK_ROI_ISOCONTOUR_RANGE_NUM; i_range++) { gtk_box_pack_start(GTK_BOX(hbox), radio_button[i_range], FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button[i_range]), "isocontour_range", GINT_TO_POINTER(i_range)); g_object_set_data(G_OBJECT(radio_button[i_range]), "min_spin_button", min_spin_button); g_object_set_data(G_OBJECT(radio_button[i_range]), "max_spin_button", max_spin_button); g_signal_connect(G_OBJECT(radio_button[i_range]), "clicked", G_CALLBACK(isocontour_range_cb), &isocontour_range); } /* run the dialog */ gtk_widget_show_all(dialog); return_val = gtk_dialog_run(GTK_DIALOG(dialog)); /* let the user input */ gtk_widget_destroy(dialog); if (return_val != GTK_RESPONSE_OK) return; /* cancel */ ui_common_place_cursor(UI_CURSOR_WAIT, GTK_WIDGET(canvas)); amitk_roi_set_isocontour(roi, AMITK_DATA_SET(draw_on_ds), temp_voxel, isocontour_min_value,isocontour_max_value, isocontour_range); ui_common_remove_wait_cursor(GTK_WIDGET(canvas)); return; } /* returns true if sucessfully completed */ static gboolean canvas_create_freehand_roi(AmitkCanvas * canvas, AmitkRoi * roi, AmitkPoint position, AmitkDataSet * active_slice) { AmitkObject * parent_ds; AmitkDataSet * draw_on_ds=NULL; GtkWindow * window; GtkWidget * toplevel; GtkWidget * dialog; GtkWidget * table; GtkWidget * label; GtkWidget * spin_button[3]; GtkWidget * image; gint table_row; gchar * temp_str; gint return_val; AmitkPoint voxel_size; AmitkPoint temp_point; AmitkVoxel temp_voxel; AmitkAxis i_axis; g_return_val_if_fail(AMITK_IS_CANVAS(canvas), FALSE); g_return_val_if_fail(AMITK_IS_ROI(roi), FALSE); g_return_val_if_fail(AMITK_ROI_TYPE_FREEHAND(roi), FALSE); /* figure out the data set we're drawing on */ parent_ds = amitk_object_get_parent_of_type(AMITK_OBJECT(roi), AMITK_OBJECT_TYPE_DATA_SET); if (AMITK_ROI_TYPE(roi) == AMITK_ROI_TYPE_FREEHAND_2D) { if (parent_ds != NULL) { draw_on_ds = amitk_data_sets_find_with_slice_parent(canvas->slices, AMITK_DATA_SET(parent_ds)); if (draw_on_ds == NULL) { g_warning(_("Parent of roi not currently displayed, can't draw freehand roi")); return FALSE; } } else if (active_slice != NULL) { /* if no data set parent, just use the active slice */ draw_on_ds = active_slice; } } else { /* FREEHAND_3D */ if (parent_ds != NULL) draw_on_ds = AMITK_DATA_SET(parent_ds); else if (canvas->active_object != NULL) if (AMITK_IS_DATA_SET(canvas->active_object)) draw_on_ds = AMITK_DATA_SET(canvas->active_object); } if (draw_on_ds == NULL) { g_warning(_("No data set found to draw freehand roi on")); return FALSE; } voxel_size = AMITK_DATA_SET_VOXEL_SIZE(draw_on_ds); toplevel = gtk_widget_get_toplevel (GTK_WIDGET(canvas)); if (toplevel != NULL) window = GTK_WINDOW(toplevel); else window = NULL; /* pop up dialog to let user pick isocontour values, etc. and for any warning messages */ dialog = gtk_dialog_new_with_buttons (_("Freehand ROI Parameters"), window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); table = gtk_table_new(4,3,FALSE); table_row=0; gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table); image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_QUESTION,GTK_ICON_SIZE_DIALOG); gtk_table_attach(GTK_TABLE(table), image, 0,1, table_row,table_row+2, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); /* the spin buttons */ for (i_axis=0; i_axistype, widget, grab_on, // (GNOME_CANVAS(canvas->canvas)->grabbed_item)); // if ((event->type == GDK_BUTTON_PRESS) || // (event->type == GDK_BUTTON_RELEASE) || // (event->type == GDK_2BUTTON_PRESS)) // g_print("event %d widget %p grab_on %d %p\n", event->type, widget, grab_on, // (GNOME_CANVAS(canvas->canvas)->grabbed_item)); if (canvas->type == AMITK_CANVAS_TYPE_FLY_THROUGH) return FALSE; /* sanity checks */ if (canvas->study == NULL) return FALSE; if (canvas->slices == NULL) return FALSE; g_return_val_if_fail(canvas->active_object != NULL, FALSE); if (ignore_next_event) { ignore_next_event=FALSE; return FALSE; } /* check if we should bail out of drawing mode */ if (in_drawing_mode) { if (drawing_object != NULL) { if (!amitk_object_get_selected(drawing_object, AMITK_SELECTION_ANY)) { in_drawing_mode = FALSE; drawing_object = NULL; ui_common_place_cursor(UI_CURSOR_DEFAULT, GTK_WIDGET(canvas)); } } } if (extended_object != NULL) object = extended_object; if (canvas->undrawn_rois != NULL) /* check if there are any undrawn roi's */ object = canvas->undrawn_rois->data; if (object == NULL) /* no undrawn roi's, see if we're on an object */ object = g_object_get_data(G_OBJECT(widget), "object"); if (object == NULL) object = canvas->active_object; /* try the active object */ g_return_val_if_fail(object != NULL, FALSE); switch(event->type) { case GDK_ENTER_NOTIFY: event_cpoint.x = event->crossing.x; event_cpoint.y = event->crossing.y; if (event->crossing.mode != GDK_CROSSING_NORMAL) canvas_event_type = CANVAS_EVENT_NONE; /* ignore grabs */ else if (enter_drawing_mode) { canvas_event_type = CANVAS_EVENT_PRESS_ENTER_DRAWING_MODE; } else if ((canvas->undrawn_rois == NULL) && (extended_event_type != CANVAS_EVENT_NONE)) canvas_event_type = CANVAS_EVENT_NONE; else canvas_event_type = CANVAS_EVENT_ENTER_OBJECT; break; case GDK_LEAVE_NOTIFY: event_cpoint.x = event->crossing.x; event_cpoint.y = event->crossing.y; if (event->crossing.mode != GDK_CROSSING_NORMAL) canvas_event_type = CANVAS_EVENT_NONE; /* ignore grabs */ else if (extended_event_type != CANVAS_EVENT_NONE) canvas_event_type = CANVAS_EVENT_NONE; else canvas_event_type = CANVAS_EVENT_LEAVE; break; case GDK_BUTTON_PRESS: event_cpoint.x = event->button.x; event_cpoint.y = event->button.y; if (enter_drawing_mode) { canvas_event_type = CANVAS_EVENT_PRESS_ENTER_DRAWING_MODE; } else if (canvas->undrawn_rois != NULL) { canvas_event_type = CANVAS_EVENT_PRESS_NEW_ROI; } else if (in_drawing_mode) { if ((event->button.button == 1) && (event->button.state & GDK_SHIFT_MASK)) canvas_event_type = CANVAS_EVENT_PRESS_DRAW_LARGE_POINT; else if (event->button.button == 1) canvas_event_type = CANVAS_EVENT_PRESS_DRAW_POINT; else if (event->button.button == 2) canvas_event_type = CANVAS_EVENT_PRESS_LEAVE_DRAWING_MODE; else if ((event->button.button == 3) && (event->button.state & GDK_SHIFT_MASK)) canvas_event_type = CANVAS_EVENT_PRESS_ERASE_LARGE_POINT; else if (event->button.button == 3) canvas_event_type = CANVAS_EVENT_PRESS_ERASE_POINT; else canvas_event_type = CANVAS_EVENT_NONE; } else if (extended_event_type != CANVAS_EVENT_NONE) { canvas_event_type = extended_event_type; } else if ((!grab_on) && (!in_object) && (AMITK_IS_DATA_SET(object) || AMITK_IS_STUDY(object)) && (event->button.button == 1)) { if ((event->button.state & GDK_SHIFT_MASK) && (AMITK_IS_DATA_SET(object))) canvas_event_type = CANVAS_EVENT_PRESS_SHIFT_OBJECT; else canvas_event_type = CANVAS_EVENT_PRESS_MOVE_VIEW; } else if ((!grab_on) && (!in_object) && (AMITK_IS_DATA_SET(object) || AMITK_IS_STUDY(object)) && (event->button.button == 2)) { canvas_event_type = CANVAS_EVENT_PRESS_MINIMIZE_VIEW; } else if ((!grab_on) && (!in_object) && (AMITK_IS_DATA_SET(object) || AMITK_IS_STUDY(object)) && (event->button.button == 3)) { if (event->button.state & GDK_CONTROL_MASK) canvas_event_type = CANVAS_EVENT_PRESS_NEW_OBJECT; else if (event->button.state & GDK_SHIFT_MASK) canvas_event_type = CANVAS_EVENT_PRESS_ROTATE_OBJECT; else canvas_event_type = CANVAS_EVENT_PRESS_RESIZE_VIEW; } else if ((!grab_on) && (AMITK_IS_ROI(object)) && (event->button.button == 1)) { canvas_event_type = CANVAS_EVENT_PRESS_SHIFT_OBJECT_IMMEDIATE; } else if ((!grab_on) && (AMITK_IS_ROI(object)) && (event->button.button == 2)) { if (!AMITK_ROI_TYPE_ISOCONTOUR(object) && !AMITK_ROI_TYPE_FREEHAND(object)) canvas_event_type = CANVAS_EVENT_PRESS_RESIZE_ROI; else canvas_event_type = CANVAS_EVENT_PRESS_ENTER_DRAWING_MODE; } else if ((!grab_on) && (AMITK_IS_ROI(object)) && (event->button.button == 3)) { if (event->button.state & GDK_SHIFT_MASK) canvas_event_type = CANVAS_EVENT_PRESS_ERASE_VOLUME_OUTSIDE_ROI; else if (event->button.state & GDK_CONTROL_MASK) canvas_event_type = CANVAS_EVENT_PRESS_ERASE_VOLUME_INSIDE_ROI; else if (!AMITK_ROI_TYPE_ISOCONTOUR(object) && !AMITK_ROI_TYPE_FREEHAND(object)) canvas_event_type = CANVAS_EVENT_PRESS_ROTATE_OBJECT_IMMEDIATE; else canvas_event_type = CANVAS_EVENT_PRESS_CHANGE_ISOCONTOUR; } else if ((!grab_on) && (AMITK_IS_FIDUCIAL_MARK(object)) && (event->button.button == 1)) { canvas_event_type = CANVAS_EVENT_PRESS_SHIFT_OBJECT_IMMEDIATE; } else if ((!grab_on) && (AMITK_IS_LINE_PROFILE(object)) && (event->button.button == 1)) { canvas_event_type = CANVAS_EVENT_PRESS_SHIFT_OBJECT_IMMEDIATE; } else if ((!grab_on) && (AMITK_IS_LINE_PROFILE(object)) && (event->button.button == 3)) { canvas_event_type = CANVAS_EVENT_PRESS_ROTATE_OBJECT_IMMEDIATE; } else canvas_event_type = CANVAS_EVENT_NONE; break; case GDK_MOTION_NOTIFY: event_cpoint.x = event->motion.x; event_cpoint.y = event->motion.y; if (grab_on && (canvas->undrawn_rois != NULL)) { canvas_event_type = CANVAS_EVENT_MOTION_NEW_ROI; } else if (enter_drawing_mode) { canvas_event_type = CANVAS_EVENT_PRESS_ENTER_DRAWING_MODE; } else if (in_drawing_mode) { if ((event->motion.state & GDK_BUTTON1_MASK) && (event->motion.state & GDK_SHIFT_MASK)) canvas_event_type = CANVAS_EVENT_MOTION_DRAW_LARGE_POINT; else if (event->motion.state & GDK_BUTTON1_MASK) canvas_event_type = CANVAS_EVENT_MOTION_DRAW_POINT; else if ((event->motion.state & GDK_BUTTON3_MASK) && (event->motion.state & GDK_SHIFT_MASK)) canvas_event_type = CANVAS_EVENT_MOTION_ERASE_LARGE_POINT; else if (event->motion.state & GDK_BUTTON3_MASK) canvas_event_type = CANVAS_EVENT_MOTION_ERASE_POINT; else canvas_event_type = CANVAS_EVENT_MOTION; } else if (extended_event_type != CANVAS_EVENT_NONE) { if (extended_event_type == CANVAS_EVENT_PRESS_ROTATE_OBJECT) canvas_event_type = CANVAS_EVENT_MOTION_ROTATE_OBJECT; else if (extended_event_type == CANVAS_EVENT_PRESS_SHIFT_OBJECT) canvas_event_type = CANVAS_EVENT_MOTION_SHIFT_OBJECT; else if (extended_event_type == CANVAS_EVENT_PRESS_CHANGE_ISOCONTOUR) canvas_event_type = CANVAS_EVENT_MOTION_CHANGE_ISOCONTOUR; else { canvas_event_type = CANVAS_EVENT_NONE; g_warning("unexpected case in %s at line %d", __FILE__, __LINE__); } } else if (grab_on && (!in_object) && (AMITK_IS_DATA_SET(object) || AMITK_IS_STUDY(object)) && (event->motion.state & GDK_BUTTON1_MASK)) { canvas_event_type = CANVAS_EVENT_MOTION_MOVE_VIEW; } else if (grab_on && (!in_object) && (AMITK_IS_DATA_SET(object) || AMITK_IS_STUDY(object)) && (event->motion.state & GDK_BUTTON2_MASK)) { canvas_event_type = CANVAS_EVENT_MOTION_MINIMIZE_VIEW; } else if (grab_on && (!in_object) && (AMITK_IS_DATA_SET(object) || AMITK_IS_STUDY(object)) && (event->motion.state & GDK_BUTTON3_MASK)) { canvas_event_type = CANVAS_EVENT_MOTION_RESIZE_VIEW; } else if (grab_on && (AMITK_IS_ROI(object)) && (event->motion.state & GDK_BUTTON1_MASK)) { canvas_event_type = CANVAS_EVENT_MOTION_SHIFT_OBJECT; } else if (grab_on && (AMITK_IS_ROI(object)) && (event->motion.state & GDK_BUTTON2_MASK)) { if (!AMITK_ROI_TYPE_ISOCONTOUR(object) && !AMITK_ROI_TYPE_FREEHAND(object)) canvas_event_type = CANVAS_EVENT_MOTION_RESIZE_ROI; else { canvas_event_type = CANVAS_EVENT_NONE; g_warning("unexpected case in %s at line %d", __FILE__, __LINE__); } } else if (grab_on && (AMITK_IS_ROI(object)) && (event->motion.state & GDK_BUTTON3_MASK)) { if (!AMITK_ROI_TYPE_ISOCONTOUR(object) && !AMITK_ROI_TYPE_FREEHAND(object)) canvas_event_type = CANVAS_EVENT_MOTION_ROTATE_OBJECT; else canvas_event_type = CANVAS_EVENT_MOTION_CHANGE_ISOCONTOUR; } else if (grab_on && (AMITK_IS_FIDUCIAL_MARK(object)) && (event->motion.state & GDK_BUTTON1_MASK)) { canvas_event_type = CANVAS_EVENT_MOTION_SHIFT_OBJECT; } else if (grab_on && (AMITK_IS_LINE_PROFILE(object)) && (event->motion.state & GDK_BUTTON1_MASK)) { canvas_event_type = CANVAS_EVENT_MOTION_SHIFT_OBJECT; } else if (grab_on && (AMITK_IS_LINE_PROFILE(object)) && (event->motion.state & GDK_BUTTON3_MASK)) { canvas_event_type = CANVAS_EVENT_MOTION_ROTATE_OBJECT; } else canvas_event_type = CANVAS_EVENT_MOTION; break; case GDK_BUTTON_RELEASE: event_cpoint.x = event->button.x; event_cpoint.y = event->button.y; if (canvas->undrawn_rois != NULL) { canvas_event_type = CANVAS_EVENT_RELEASE_NEW_ROI; } else if (in_drawing_mode) { if ((event->button.button == 1) && (event->button.state & GDK_SHIFT_MASK)) canvas_event_type = CANVAS_EVENT_RELEASE_DRAW_LARGE_POINT; else if (event->button.button == 1) canvas_event_type = CANVAS_EVENT_RELEASE_DRAW_POINT; else if ((event->button.button == 3) && (event->button.state & GDK_SHIFT_MASK)) canvas_event_type = CANVAS_EVENT_RELEASE_ERASE_LARGE_POINT; else if (event->button.button == 3) canvas_event_type = CANVAS_EVENT_RELEASE_ERASE_POINT; else canvas_event_type = CANVAS_EVENT_NONE; } else if ((extended_event_type != CANVAS_EVENT_NONE) && (!grab_on) && (event->button.button == 3)) { if (extended_event_type == CANVAS_EVENT_PRESS_ROTATE_OBJECT) canvas_event_type = CANVAS_EVENT_ENACT_ROTATE_OBJECT; else if (extended_event_type == CANVAS_EVENT_PRESS_SHIFT_OBJECT) canvas_event_type = CANVAS_EVENT_ENACT_SHIFT_OBJECT; else if (extended_event_type == CANVAS_EVENT_PRESS_CHANGE_ISOCONTOUR) canvas_event_type = CANVAS_EVENT_ENACT_CHANGE_ISOCONTOUR; else { canvas_event_type = CANVAS_EVENT_NONE; g_warning("unexpected case in %s at line %d", __FILE__, __LINE__); } } else if ((extended_event_type != CANVAS_EVENT_NONE) && (!grab_on)) { if (extended_event_type == CANVAS_EVENT_PRESS_ROTATE_OBJECT) canvas_event_type = CANVAS_EVENT_CANCEL_ROTATE_OBJECT; else if (extended_event_type == CANVAS_EVENT_PRESS_SHIFT_OBJECT) canvas_event_type = CANVAS_EVENT_CANCEL_SHIFT_OBJECT; else if (extended_event_type == CANVAS_EVENT_PRESS_CHANGE_ISOCONTOUR) canvas_event_type = CANVAS_EVENT_CANCEL_CHANGE_ISOCONTOUR; else { canvas_event_type = CANVAS_EVENT_NONE; g_warning("unexpected case in %s at line %d", __FILE__, __LINE__); } } else if ((extended_event_type != CANVAS_EVENT_NONE) && (grab_on)) { if (extended_event_type == CANVAS_EVENT_PRESS_ROTATE_OBJECT) canvas_event_type = CANVAS_EVENT_RELEASE_ROTATE_OBJECT; else if (extended_event_type == CANVAS_EVENT_PRESS_SHIFT_OBJECT) canvas_event_type = CANVAS_EVENT_RELEASE_SHIFT_OBJECT; else if (extended_event_type == CANVAS_EVENT_PRESS_CHANGE_ISOCONTOUR) canvas_event_type = CANVAS_EVENT_RELEASE_CHANGE_ISOCONTOUR; else { canvas_event_type = CANVAS_EVENT_NONE; g_warning("unexpected case in %s at line %d", __FILE__, __LINE__); } } else if ((!in_object) && (AMITK_IS_DATA_SET(object) || AMITK_IS_STUDY(object)) && (event->button.button == 1)) { canvas_event_type = CANVAS_EVENT_RELEASE_MOVE_VIEW; } else if ((!in_object) && (AMITK_IS_DATA_SET(object) || AMITK_IS_STUDY(object)) && (event->button.button == 2)) { canvas_event_type = CANVAS_EVENT_RELEASE_MINIMIZE_VIEW; } else if ((!in_object) && (AMITK_IS_DATA_SET(object) || AMITK_IS_STUDY(object)) && (event->button.button == 3)) { canvas_event_type = CANVAS_EVENT_RELEASE_RESIZE_VIEW; } else if ((AMITK_IS_ROI(object)) && (event->button.button == 1)) { canvas_event_type = CANVAS_EVENT_RELEASE_SHIFT_OBJECT_IMMEDIATE; } else if (grab_on && (AMITK_IS_ROI(object)) && (event->button.button == 2)) { if (!AMITK_ROI_TYPE_ISOCONTOUR(object) && !AMITK_ROI_TYPE_FREEHAND(object)) canvas_event_type = CANVAS_EVENT_RELEASE_RESIZE_ROI; else { canvas_event_type = CANVAS_EVENT_NONE; g_warning("unexpected case in %s at line %d", __FILE__, __LINE__); } } else if ((AMITK_IS_ROI(object)) && (event->button.button == 3)) { if (!AMITK_ROI_TYPE_ISOCONTOUR(object) && !AMITK_ROI_TYPE_FREEHAND(object)) canvas_event_type = CANVAS_EVENT_RELEASE_ROTATE_OBJECT_IMMEDIATE; else canvas_event_type = CANVAS_EVENT_RELEASE_CHANGE_ISOCONTOUR; } else if ((AMITK_IS_FIDUCIAL_MARK(object)) && (event->button.button == 1)) { canvas_event_type = CANVAS_EVENT_RELEASE_SHIFT_OBJECT_IMMEDIATE; } else if ((AMITK_IS_LINE_PROFILE(object)) && (event->button.button == 1)) { canvas_event_type = CANVAS_EVENT_RELEASE_SHIFT_OBJECT_IMMEDIATE; } else if ((AMITK_IS_LINE_PROFILE(object)) && (event->button.button == 3)) { canvas_event_type = CANVAS_EVENT_RELEASE_ROTATE_OBJECT_IMMEDIATE; } else canvas_event_type = CANVAS_EVENT_NONE; break; case GDK_SCROLL: /* scroll wheel event */ event_cpoint.x = event_cpoint.y = 0; if (event->scroll.direction == GDK_SCROLL_UP) canvas_event_type = CANVAS_EVENT_SCROLL_UP; else if (event->scroll.direction == GDK_SCROLL_DOWN) canvas_event_type = CANVAS_EVENT_SCROLL_DOWN; else canvas_event_type = CANVAS_EVENT_NONE; break; default: event_cpoint.x = event_cpoint.y = 0; /* an event we don't handle */ canvas_event_type = CANVAS_EVENT_NONE; break; } // if ((canvas_event_type != CANVAS_EVENT_NONE) && // (canvas_event_type != CANVAS_EVENT_MOTION)) // g_print("%s event %d grab %d gdk %d in_object %d\n", AMITK_IS_OBJECT(object) ? AMITK_OBJECT_NAME(object) : "line_profile", // canvas_event_type, grab_on, event->type, in_object); /* get the location of the event, and convert it to the canvas coordinates */ gnome_canvas_window_to_world(GNOME_CANVAS(canvas->canvas), event_cpoint.x, event_cpoint.y, &canvas_cpoint.x, &canvas_cpoint.y); gnome_canvas_w2c_d(GNOME_CANVAS(canvas->canvas), canvas_cpoint.x, canvas_cpoint.y, &canvas_cpoint.x, &canvas_cpoint.y); /* Convert the event location info to real units */ canvas_point = cp_2_p(canvas, canvas_cpoint); base_point = amitk_space_s2b(AMITK_SPACE(canvas->volume), canvas_point); /* get the current location's value */ g_return_val_if_fail(canvas->slices != NULL, FALSE); active_slice = NULL; if (AMITK_IS_DATA_SET(canvas->active_object)) active_slice = amitk_data_sets_find_with_slice_parent(canvas->slices, AMITK_DATA_SET(canvas->active_object)); if (active_slice != NULL) { temp_point[0] = amitk_space_b2s(AMITK_SPACE(active_slice), base_point); POINT_TO_VOXEL(temp_point[0], AMITK_DATA_SET_VOXEL_SIZE(active_slice), 0,0,temp_voxel); voxel_value = amitk_data_set_get_value(active_slice, temp_voxel); } else { voxel_value = NAN; } switch (canvas_event_type) { case CANVAS_EVENT_ENTER_OBJECT: if (in_drawing_mode) { help_info = AMITK_HELP_INFO_CANVAS_DRAWING_MODE; cursor_type = UI_CURSOR_ROI_DRAW; } else if (AMITK_IS_DATA_SET(object)) { help_info = AMITK_HELP_INFO_CANVAS_DATA_SET; cursor_type =UI_CURSOR_DATA_SET_MODE; } else if (AMITK_IS_STUDY(object)) { help_info = AMITK_HELP_INFO_CANVAS_STUDY; cursor_type = UI_CURSOR_DATA_SET_MODE; } else if (AMITK_IS_FIDUCIAL_MARK(object)) { in_object = TRUE; help_info = AMITK_HELP_INFO_CANVAS_FIDUCIAL_MARK; cursor_type =UI_CURSOR_FIDUCIAL_MARK_MODE; } else if (AMITK_IS_ROI(object)) { in_object = TRUE; cursor_type = UI_CURSOR_ROI_MODE; if (AMITK_ROI_TYPE_ISOCONTOUR(object)) { if (AMITK_ROI_UNDRAWN(object)) help_info = AMITK_HELP_INFO_CANVAS_NEW_ISOCONTOUR_ROI; else { help_info = AMITK_HELP_INFO_CANVAS_ISOCONTOUR_ROI; } } else if (AMITK_ROI_TYPE_FREEHAND(object)) { if (AMITK_ROI_UNDRAWN(object)) help_info = AMITK_HELP_INFO_CANVAS_NEW_FREEHAND_ROI; else { help_info = AMITK_HELP_INFO_CANVAS_FREEHAND_ROI; } } else { /* geometric ROI's */ if (AMITK_ROI_UNDRAWN(object)) help_info = AMITK_HELP_INFO_CANVAS_NEW_ROI; else help_info = AMITK_HELP_INFO_CANVAS_ROI; } } else if (AMITK_IS_LINE_PROFILE(object)) { in_object = TRUE; help_info = AMITK_HELP_INFO_CANVAS_LINE_PROFILE; cursor_type = UI_CURSOR_FIDUCIAL_MARK_MODE; } else { g_return_val_if_reached(FALSE); } g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0,help_info, &base_point, 0.0); if (AMITK_IS_ROI(object)) if (!AMITK_ROI_UNDRAWN(object) && (AMITK_ROI_TYPE_ISOCONTOUR(object))) { if (AMITK_ROI_ISOCONTOUR_RANGE(object) == AMITK_ROI_ISOCONTOUR_RANGE_ABOVE_MIN) g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, AMITK_ROI(object)->isocontour_min_value); else if (AMITK_ROI_ISOCONTOUR_RANGE(object) == AMITK_ROI_ISOCONTOUR_RANGE_BELOW_MAX) g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, AMITK_ROI(object)->isocontour_max_value); else /* AMITK_ROI_ISOCONTOUR_RANGE_BETWEEN_MIN_MAX */ g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, 0.5*AMITK_ROI(object)->isocontour_min_value+ 0.5*AMITK_ROI(object)->isocontour_max_value); } gtk_widget_grab_focus(GTK_WIDGET(canvas)); /* move the keyboard entry focus into the canvas */ ui_common_place_cursor(cursor_type, GTK_WIDGET(canvas)); break; case CANVAS_EVENT_LEAVE: in_object = FALSE; ui_common_place_cursor(UI_CURSOR_DEFAULT, GTK_WIDGET(canvas)); break; case CANVAS_EVENT_PRESS_MINIMIZE_VIEW: case CANVAS_EVENT_PRESS_RESIZE_VIEW: case CANVAS_EVENT_PRESS_MOVE_VIEW: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point,voxel_value); if (canvas_event_type == CANVAS_EVENT_PRESS_MINIMIZE_VIEW) corner = amitk_data_sets_get_min_voxel_size(AMITK_OBJECT_CHILDREN(canvas->study)); else corner = AMITK_VOLUME_Z_CORNER(canvas->volume); grab_on = TRUE; initial_base_point = base_point; canvas_update_target(canvas, AMITK_CANVAS_TARGET_ACTION_SHOW, base_point, corner); /* grabbing the target doesn't quite work, double click events aren't handled correctly */ gnome_canvas_item_grab(canvas->image, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK |GDK_BUTTON_PRESS_MASK , ui_common_cursor[UI_CURSOR_DATA_SET_MODE], event->button.time); g_signal_emit(G_OBJECT (canvas), canvas_signals[VIEW_CHANGING], 0, &base_point, corner); break; case CANVAS_EVENT_PRESS_SHIFT_OBJECT: case CANVAS_EVENT_PRESS_ROTATE_OBJECT: if (extended_event_type != CANVAS_EVENT_NONE) { grab_on = FALSE; /* do everything on the BUTTON_RELEASE */ } else { GdkPixbuf * pixbuf; if (AMITK_IS_DATA_SET(object)) { if (active_slice == NULL) { g_warning(_("The active data set is not visible")); return FALSE; } pixbuf = image_from_slice(active_slice, AMITK_CANVAS_VIEW_MODE(canvas)); } else pixbuf = g_object_ref(canvas->pixbuf); grab_on = TRUE; extended_event_type = canvas_event_type; extended_object = object; initial_cpoint = canvas_cpoint; initial_base_point = base_point; initial_canvas_point = canvas_point; previous_cpoint = canvas_cpoint; canvas_item = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas->canvas)), gnome_canvas_pixbuf_get_type(), "pixbuf",pixbuf, "x", (double) canvas->border_width, "y", (double) canvas->border_width, NULL); g_signal_connect(G_OBJECT(canvas_item), "event", G_CALLBACK(canvas_event_cb), canvas); g_object_unref(pixbuf); } if (canvas_event_type == CANVAS_EVENT_PRESS_SHIFT_OBJECT) { g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_SHIFT_OBJECT, &base_point, 0.0); } else { /* ROTATE */ g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_ROTATE_OBJECT, &base_point, 0.0); } break; case CANVAS_EVENT_PRESS_NEW_ROI: outline_color = amitk_color_table_outline_color(canvas_get_color_table(canvas), TRUE); initial_canvas_point = canvas_point; initial_cpoint = canvas_cpoint; /* create the new roi */ switch(AMITK_ROI_TYPE(object)) { case AMITK_ROI_TYPE_BOX: case AMITK_ROI_TYPE_ELLIPSOID: case AMITK_ROI_TYPE_CYLINDER: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_NEW_ROI, &base_point, 0.0); canvas_item = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas->canvas)), (AMITK_ROI_TYPE(object) == AMITK_ROI_TYPE_BOX) ? gnome_canvas_rect_get_type() : gnome_canvas_ellipse_get_type(), "x1",canvas_cpoint.x, "y1", canvas_cpoint.y, "x2", canvas_cpoint.x, "y2", canvas_cpoint.y, "fill_color", NULL, "outline_color_rgba", amitk_color_table_rgba_to_uint32(outline_color), "width_pixels", AMITK_STUDY_CANVAS_ROI_WIDTH(canvas->study), NULL); g_signal_connect(G_OBJECT(canvas_item), "event", G_CALLBACK(canvas_event_cb), canvas); grab_on = TRUE; gnome_canvas_item_grab(canvas_item, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, ui_common_cursor[UI_CURSOR_ROI_MODE], event->button.time); break; case AMITK_ROI_TYPE_ISOCONTOUR_2D: case AMITK_ROI_TYPE_ISOCONTOUR_3D: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_NEW_ISOCONTOUR_ROI, &base_point, 0.0); grab_on = TRUE; break; case AMITK_ROI_TYPE_FREEHAND_2D: case AMITK_ROI_TYPE_FREEHAND_3D: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_NEW_FREEHAND_ROI, &base_point, 0.0); break; default: grab_on = FALSE; g_error("unexpected case in %s at line %d, roi_type %d", __FILE__, __LINE__, AMITK_ROI_TYPE(object)); break; } break; case CANVAS_EVENT_PRESS_SHIFT_OBJECT_IMMEDIATE: previous_cpoint = canvas_cpoint; case CANVAS_EVENT_PRESS_ROTATE_OBJECT_IMMEDIATE: case CANVAS_EVENT_PRESS_RESIZE_ROI: if (AMITK_IS_LINE_PROFILE(object)) help_info = AMITK_HELP_INFO_CANVAS_LINE_PROFILE; else if (AMITK_IS_FIDUCIAL_MARK(object)) help_info = AMITK_HELP_INFO_CANVAS_FIDUCIAL_MARK; else if (AMITK_ROI_TYPE_ISOCONTOUR(object)) help_info = AMITK_HELP_INFO_CANVAS_ISOCONTOUR_ROI; else if (AMITK_ROI_TYPE_FREEHAND(object)) help_info = AMITK_HELP_INFO_CANVAS_FREEHAND_ROI; else /* normal roi */ help_info = AMITK_HELP_INFO_CANVAS_ROI; if (canvas_event_type == CANVAS_EVENT_PRESS_SHIFT_OBJECT_IMMEDIATE) cursor_type = UI_CURSOR_OBJECT_SHIFT; else if (canvas_event_type == CANVAS_EVENT_PRESS_ROTATE_OBJECT_IMMEDIATE) cursor_type = UI_CURSOR_ROI_ROTATE; else /* CANVAS_EVENT_PRESS_RESIZE_ROI */ cursor_type = UI_CURSOR_ROI_RESIZE; g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, help_info, &base_point, 0.0); g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, voxel_value); grab_on = TRUE; canvas_item = GNOME_CANVAS_ITEM(widget); gnome_canvas_item_grab(canvas_item, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, ui_common_cursor[cursor_type], event->button.time); initial_base_point = base_point; initial_cpoint = canvas_cpoint; initial_canvas_point = canvas_point; theta = 0.0; zoom.x = zoom.y = zoom.z = 1.0; break; case CANVAS_EVENT_PRESS_ENTER_DRAWING_MODE: in_drawing_mode = TRUE; enter_drawing_mode = FALSE; if (drawing_object == NULL) drawing_object = object; ui_common_place_cursor(UI_CURSOR_ROI_DRAW, GTK_WIDGET(canvas)); g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_DRAWING_MODE, &base_point, voxel_value); break; case CANVAS_EVENT_PRESS_LEAVE_DRAWING_MODE: in_drawing_mode = FALSE; drawing_object = NULL; ui_common_place_cursor(UI_CURSOR_DEFAULT, GTK_WIDGET(canvas)); ignore_next_event=TRUE; g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, voxel_value); break; case CANVAS_EVENT_PRESS_CHANGE_ISOCONTOUR: if (extended_event_type != CANVAS_EVENT_NONE) { grab_on = FALSE; /* do everything on the BUTTON_RELEASE */ } else { g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, voxel_value); grab_on = TRUE; extended_event_type = canvas_event_type; extended_object = object; } g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_CHANGE_ISOCONTOUR, &base_point, 0.0); break; case CANVAS_EVENT_PRESS_ERASE_VOLUME_OUTSIDE_ROI: g_return_val_if_fail(AMITK_IS_ROI(object), FALSE); g_signal_emit(G_OBJECT (canvas), canvas_signals[ERASE_VOLUME], 0, AMITK_ROI(object), TRUE); break; case CANVAS_EVENT_PRESS_ERASE_VOLUME_INSIDE_ROI: g_return_val_if_fail(AMITK_IS_ROI(object), FALSE); g_signal_emit(G_OBJECT (canvas), canvas_signals[ERASE_VOLUME], 0, AMITK_ROI(object), FALSE); break; case CANVAS_EVENT_PRESS_NEW_OBJECT: if (AMITK_IS_DATA_SET(object)) g_signal_emit(G_OBJECT (canvas), canvas_signals[NEW_OBJECT], 0, object, AMITK_OBJECT_TYPE_FIDUCIAL_MARK, &base_point); break; case CANVAS_EVENT_MOTION: if (!in_drawing_mode) if (AMITK_IS_ROI(object)) if (!AMITK_ROI_UNDRAWN(object)) if (AMITK_ROI_TYPE_ISOCONTOUR(object)) { if (AMITK_ROI_ISOCONTOUR_RANGE(object) == AMITK_ROI_ISOCONTOUR_RANGE_ABOVE_MIN) voxel_value = AMITK_ROI(object)->isocontour_min_value; else if (AMITK_ROI_ISOCONTOUR_RANGE(object) == AMITK_ROI_ISOCONTOUR_RANGE_BELOW_MAX) voxel_value = AMITK_ROI(object)->isocontour_max_value; else /* AMITK_ROI_ISOCONTOUR_RANGE_BETWEEN_MIN_MAX */ voxel_value = 0.5*(AMITK_ROI(object)->isocontour_min_value+AMITK_ROI(object)->isocontour_max_value); } g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, voxel_value); break; case CANVAS_EVENT_MOTION_MOVE_VIEW: case CANVAS_EVENT_MOTION_MINIMIZE_VIEW: case CANVAS_EVENT_MOTION_RESIZE_VIEW: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, voxel_value); if (canvas_event_type == CANVAS_EVENT_MOTION_RESIZE_VIEW) { corner = point_max_dim(point_diff(base_point, initial_base_point)); center = initial_base_point; } else if (canvas_event_type == CANVAS_EVENT_MOTION_MOVE_VIEW) { corner = AMITK_VOLUME_Z_CORNER(canvas->volume); center = base_point; } else { /* CANVAS_EVENT_MOTION_MINIMIZE_VIEW */ corner = amitk_data_sets_get_min_voxel_size(AMITK_OBJECT_CHILDREN(canvas->study)); center = base_point; } canvas_update_target(canvas, AMITK_CANVAS_TARGET_ACTION_SHOW, center, corner); g_signal_emit(G_OBJECT (canvas), canvas_signals[VIEW_CHANGING], 0, ¢er, corner); break; case CANVAS_EVENT_PRESS_DRAW_POINT: case CANVAS_EVENT_PRESS_DRAW_LARGE_POINT: case CANVAS_EVENT_PRESS_ERASE_POINT: case CANVAS_EVENT_PRESS_ERASE_LARGE_POINT: grab_on = TRUE; canvas_item = GNOME_CANVAS_ITEM(widget); gnome_canvas_item_grab(canvas_item, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, ui_common_cursor[UI_CURSOR_ROI_DRAW], event->button.time); /* and fall through */ case CANVAS_EVENT_MOTION_DRAW_POINT: case CANVAS_EVENT_MOTION_DRAW_LARGE_POINT: case CANVAS_EVENT_MOTION_ERASE_POINT: case CANVAS_EVENT_MOTION_ERASE_LARGE_POINT: temp_point[0] = amitk_space_b2s(AMITK_SPACE(drawing_object), base_point); POINT_TO_VOXEL(temp_point[0], AMITK_ROI_VOXEL_SIZE(drawing_object), 0, 0, temp_voxel); amitk_roi_manipulate_area(AMITK_ROI(drawing_object), ((canvas_event_type != CANVAS_EVENT_MOTION_DRAW_POINT) && (canvas_event_type != CANVAS_EVENT_PRESS_DRAW_POINT) && (canvas_event_type != CANVAS_EVENT_MOTION_DRAW_LARGE_POINT) && (canvas_event_type != CANVAS_EVENT_PRESS_DRAW_LARGE_POINT)), temp_voxel, ((canvas_event_type == CANVAS_EVENT_MOTION_DRAW_LARGE_POINT) || (canvas_event_type == CANVAS_EVENT_PRESS_DRAW_LARGE_POINT) || (canvas_event_type == CANVAS_EVENT_MOTION_ERASE_LARGE_POINT) || (canvas_event_type == CANVAS_EVENT_PRESS_ERASE_LARGE_POINT)) ? 2 : 0); g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, voxel_value); break; case CANVAS_EVENT_MOTION_CHANGE_ISOCONTOUR: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, voxel_value); break; case CANVAS_EVENT_MOTION_NEW_ROI: switch(AMITK_ROI_TYPE(object)) { case AMITK_ROI_TYPE_BOX: case AMITK_ROI_TYPE_ELLIPSOID: case AMITK_ROI_TYPE_CYLINDER: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_NEW_ROI, &base_point, 0.0); if (event->motion.state & GDK_BUTTON1_MASK) { /* edge-to-edge button 1 */ temp_cpoint[0] = initial_cpoint; temp_cpoint[1] = canvas_cpoint; } else { /* center-out other buttons*/ diff_cpoint = canvas_point_diff(initial_cpoint, canvas_cpoint); temp_cpoint[0] = canvas_point_sub(initial_cpoint, diff_cpoint); temp_cpoint[1] = canvas_point_add(initial_cpoint, diff_cpoint); } gnome_canvas_item_set(canvas_item, "x1", temp_cpoint[0].x, "y1", temp_cpoint[0].y, "x2", temp_cpoint[1].x, "y2", temp_cpoint[1].y,NULL); break; case AMITK_ROI_TYPE_ISOCONTOUR_2D: case AMITK_ROI_TYPE_ISOCONTOUR_3D: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_NEW_ISOCONTOUR_ROI, &base_point, 0.0); break; case AMITK_ROI_TYPE_FREEHAND_2D: case AMITK_ROI_TYPE_FREEHAND_3D: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_NEW_FREEHAND_ROI, &base_point, 0.0); break; default: g_error("unexpected case in %s at line %d, roi_type %d", __FILE__, __LINE__, AMITK_ROI_TYPE(object)); break; } break; case CANVAS_EVENT_MOTION_SHIFT_OBJECT: if (AMITK_IS_DATA_SET(object)) { diff_point = point_sub(base_point, initial_base_point); g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_SHIFT, &diff_point, theta); } else g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, voxel_value); diff_cpoint = canvas_point_sub(canvas_cpoint, previous_cpoint); gnome_canvas_item_i2w(canvas_item->parent, &diff_cpoint.x, &diff_cpoint.y); gnome_canvas_item_move(canvas_item,diff_cpoint.x,diff_cpoint.y); previous_cpoint = canvas_cpoint; break; case CANVAS_EVENT_MOTION_ROTATE_OBJECT: { /* rotate button Pressed, we're rotating the object */ /* note, I'd like to use the function "gnome_canvas_item_rotate" but this isn't defined in the current version of gnome.... so I'll have to do a whole bunch of shit*/ double affine[6]; AmitkCanvasPoint item_center; AmitkPoint center; if (AMITK_IS_VOLUME(object)) center = amitk_volume_get_center(AMITK_VOLUME(object)); else /* STUDY */ center = canvas->center; center = amitk_space_b2s(AMITK_SPACE(canvas->volume), center); temp_point[0] = point_sub(initial_canvas_point,center); temp_point[1] = point_sub(canvas_point,center); theta = acos(point_dot_product(temp_point[0],temp_point[1])/(point_mag(temp_point[0]) * point_mag(temp_point[1]))); /* correct for the fact that acos is always positive by using the cross product */ if ((temp_point[0].x*temp_point[1].y-temp_point[0].y*temp_point[1].x) < 0.0) theta = -theta; /* figure out what the center of the roi is in canvas_item coords */ /* compensate for x's origin being top left (ours is bottom left) */ item_center = p_2_cp(canvas, center); affine[0] = cos(-theta); /* neg cause GDK has Y axis going down, not up */ affine[1] = sin(-theta); affine[2] = -affine[1]; affine[3] = affine[0]; affine[4] = (1.0-affine[0])*item_center.x+affine[1]*item_center.y; affine[5] = (1.0-affine[3])*item_center.y+affine[2]*item_center.x; gnome_canvas_item_affine_absolute(canvas_item,affine); } g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_THETA, &base_point, theta*180.0/M_PI); break; case CANVAS_EVENT_MOTION_RESIZE_ROI: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, voxel_value); { /* RESIZE button Pressed, we're scaling the object */ /* note, I'd like to use the function "gnome_canvas_item_scale" but this isn't defined in the current version of gnome.... so I'll have to do a whole bunch of shit*/ /* also, this "zoom" strategy doesn't always work if the object is not aligned with the view.... oh well... good enough for now... */ double affine[6]; AmitkCanvasPoint item_center; amide_real_t jump_limit, max, temp, dot; double cos_r, sin_r, rot; AmitkAxis i_axis, axis[AMITK_AXIS_NUM]; AmitkCanvasPoint radius_cpoint; AmitkPoint center, radius, canvas_zoom; /* calculating the radius and center wrt the canvas */ radius_point = point_cmult(0.5,AMITK_VOLUME_CORNER(object)); radius = amitk_space_s2s_dim(AMITK_SPACE(object), AMITK_SPACE(canvas->volume), radius_point); center = amitk_space_b2s(AMITK_SPACE(canvas->volume),amitk_volume_get_center(AMITK_VOLUME(object))); temp_point[0] = point_diff(initial_canvas_point, center); temp_point[1] = point_diff(canvas_point,center); radius_cpoint.x = radius_point.x; radius_cpoint.y = radius_point.y; jump_limit = canvas_point_mag(radius_cpoint)/3.0; /* figure out the zoom we're specifying via the canvas */ if (temp_point[0].x < jump_limit) /* prevent jumping */ canvas_zoom.x = (radius.x+temp_point[1].x)/(radius.x+temp_point[0].x); else canvas_zoom.x = temp_point[1].x/temp_point[0].x; if (temp_point[0].y < jump_limit) /* prevent jumping */ canvas_zoom.y = (radius.x+temp_point[1].y)/(radius.x+temp_point[0].y); else canvas_zoom.y = temp_point[1].y/temp_point[0].y; canvas_zoom.z = 1.0; /* translate the canvas zoom into the ROI's coordinate frame */ temp_point[0].x = temp_point[0].y = temp_point[0].z = 1.0; temp_point[0] = amitk_space_s2s_dim(AMITK_SPACE(canvas->volume), AMITK_SPACE(object), temp_point[0]); zoom = amitk_space_s2s_dim(AMITK_SPACE(canvas->volume), AMITK_SPACE(object), canvas_zoom); zoom = point_div(zoom, temp_point[0]); /* first, figure out how much the roi is rotated in the plane of the canvas */ /* figure out which axis in the ROI is closest to the view's x axis */ max = 0.0; axis[AMITK_AXIS_X]=AMITK_AXIS_X; temp_point[0] = amitk_axes_get_orthogonal_axis(AMITK_SPACE_AXES(canvas->volume), canvas->view, AMITK_STUDY_CANVAS_LAYOUT(canvas->study), AMITK_AXIS_X); for (i_axis=0;i_axis max) { max=temp; axis[AMITK_AXIS_X]=i_axis; } } /* and y axis */ max = 0.0; axis[AMITK_AXIS_Y]= (axis[AMITK_AXIS_X]+1 < AMITK_AXIS_NUM) ? axis[AMITK_AXIS_X]+1 : AMITK_AXIS_X; temp_point[0] = amitk_axes_get_orthogonal_axis(AMITK_SPACE_AXES(canvas->volume), canvas->view, AMITK_STUDY_CANVAS_LAYOUT(canvas->study), AMITK_AXIS_Y); for (i_axis=0;i_axis max) { if (i_axis != axis[AMITK_AXIS_X]) { max=temp; axis[AMITK_AXIS_Y]=i_axis; } } } i_axis = AMITK_AXIS_Z; for (i_axis=0;i_axisvolume), temp_point[0]); temp_point[0].z = 0.0; temp_point[1] = amitk_axes_get_orthogonal_axis(AMITK_SPACE_AXES(canvas->volume), canvas->view, AMITK_STUDY_CANVAS_LAYOUT(canvas->study), i_axis); temp_point[1] = amitk_space_b2s(AMITK_SPACE(canvas->volume), temp_point[1]); temp_point[1].z = 0.0; /* and get the angle the projection makes to the x axis */ dot = point_dot_product(temp_point[0],temp_point[1])/(point_mag(temp_point[0]) * point_mag(temp_point[1])); /* correct for the fact that acos is always positive by using the cross product */ if ((temp_point[0].x*temp_point[1].y-temp_point[0].y*temp_point[1].x) > 0.0) temp = acos(dot); else temp = -acos(dot); if (isnan(temp)) temp=0; rot += temp; } cos_r = cos(rot); /* precompute cos and sin of rot */ sin_r = sin(rot); /* figure out what the center of the roi is in gnome_canvas_item coords */ /* compensate for X's origin being top left (not bottom left) */ item_center = p_2_cp(canvas, center); /* do a wild ass affine matrix so that we can scale while preserving angles */ affine[0] = canvas_zoom.x * cos_r * cos_r + canvas_zoom.y * sin_r * sin_r; affine[1] = (canvas_zoom.x-canvas_zoom.y)* cos_r * sin_r; affine[2] = affine[1]; affine[3] = canvas_zoom.x * sin_r * sin_r + canvas_zoom.y * cos_r * cos_r; affine[4] = item_center.x - item_center.x*canvas_zoom.x*cos_r*cos_r - item_center.x*canvas_zoom.y*sin_r*sin_r + (canvas_zoom.y-canvas_zoom.x)*item_center.y*cos_r*sin_r; affine[5] = item_center.y - item_center.y*canvas_zoom.y*cos_r*cos_r - item_center.y*canvas_zoom.x*sin_r*sin_r + (canvas_zoom.y-canvas_zoom.x)*item_center.x*cos_r*sin_r; gnome_canvas_item_affine_absolute(canvas_item,affine); } break; case CANVAS_EVENT_RELEASE_MOVE_VIEW: case CANVAS_EVENT_RELEASE_MINIMIZE_VIEW: case CANVAS_EVENT_RELEASE_RESIZE_VIEW: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_UPDATE_LOCATION, &base_point, voxel_value); grab_on = FALSE; gnome_canvas_item_ungrab(canvas->image, event->button.time); /* queue target cross redraw */ amitk_canvas_update_target(canvas, AMITK_CANVAS_TARGET_ACTION_HIDE, base_point, 0.0); if (canvas_event_type == CANVAS_EVENT_RELEASE_RESIZE_VIEW) center = initial_base_point; else center = base_point; if (canvas_event_type == CANVAS_EVENT_RELEASE_MINIMIZE_VIEW) corner = amitk_data_sets_get_min_voxel_size(AMITK_OBJECT_CHILDREN(canvas->study)); else if (canvas_event_type == CANVAS_EVENT_RELEASE_RESIZE_VIEW) corner = point_max_dim(point_diff(base_point, initial_base_point)); else corner = AMITK_VOLUME_Z_CORNER(canvas->volume); g_signal_emit(G_OBJECT (canvas), canvas_signals[VIEW_CHANGED], 0, ¢er, corner); break; case CANVAS_EVENT_RELEASE_SHIFT_OBJECT: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_SHIFT_OBJECT, &base_point, 0.0); break; case CANVAS_EVENT_RELEASE_ROTATE_OBJECT: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_ROTATE_OBJECT, &base_point, 0.0); break; case CANVAS_EVENT_CANCEL_SHIFT_OBJECT: case CANVAS_EVENT_CANCEL_ROTATE_OBJECT: if (AMITK_IS_STUDY(object)) help_info = AMITK_HELP_INFO_CANVAS_STUDY; else /* DATA_SET */ help_info = AMITK_HELP_INFO_CANVAS_DATA_SET; g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0,help_info, &base_point, 0.0); extended_event_type = CANVAS_EVENT_NONE; extended_object = NULL; gtk_object_destroy(GTK_OBJECT(canvas_item)); break; case CANVAS_EVENT_CANCEL_CHANGE_ISOCONTOUR: help_info = AMITK_HELP_INFO_CANVAS_ISOCONTOUR_ROI; g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0,help_info, &base_point, 0.0); extended_event_type = CANVAS_EVENT_NONE; extended_object = NULL; break; case CANVAS_EVENT_ENACT_SHIFT_OBJECT: case CANVAS_EVENT_ENACT_ROTATE_OBJECT: if (AMITK_IS_STUDY(object)) help_info = AMITK_HELP_INFO_CANVAS_STUDY; else /* DATA_SET */ help_info = AMITK_HELP_INFO_CANVAS_DATA_SET; g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0,help_info, &base_point, 0.0); gtk_object_destroy(GTK_OBJECT(canvas_item)); extended_event_type = CANVAS_EVENT_NONE; extended_object = NULL; if (canvas_event_type == CANVAS_EVENT_ENACT_SHIFT_OBJECT) { /* shift active data set */ amitk_space_shift_offset(AMITK_SPACE(canvas->active_object), point_sub(base_point, initial_base_point)); } else {/* rotate active data set*/ if (canvas->view == AMITK_VIEW_SAGITTAL) theta = -theta; /* sagittal is left-handed */ if (AMITK_IS_VOLUME(object)) center = amitk_volume_get_center(AMITK_VOLUME(canvas->active_object)); else center = canvas->center; amitk_space_rotate_on_vector(AMITK_SPACE(canvas->active_object), amitk_space_get_axis(AMITK_SPACE(canvas->volume), AMITK_AXIS_Z), theta, center); } break; case CANVAS_EVENT_ENACT_CHANGE_ISOCONTOUR: help_info = AMITK_HELP_INFO_CANVAS_ISOCONTOUR_ROI; g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0,help_info, &base_point, 0.0); extended_event_type = CANVAS_EVENT_NONE; extended_object = NULL; if (active_slice == NULL) { g_warning(_("The active data set is not visible")); return FALSE; } canvas_create_isocontour_roi(canvas, AMITK_ROI(object), base_point, active_slice); break; case CANVAS_EVENT_RELEASE_NEW_ROI: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_DATA_SET, &base_point, 0.0); grab_on = FALSE; switch(AMITK_ROI_TYPE(object)) { case AMITK_ROI_TYPE_CYLINDER: case AMITK_ROI_TYPE_BOX: case AMITK_ROI_TYPE_ELLIPSOID: gnome_canvas_item_ungrab(canvas_item, event->button.time); diff_point = point_diff(initial_canvas_point, canvas_point); diff_point.z = canvas_check_z_dimension(canvas, AMITK_VOLUME_Z_CORNER(canvas->volume)); diff_point.z /= 2; gtk_object_destroy(GTK_OBJECT(canvas_item)); /* get rid of the roi drawn on the canvas */ if (event->button.button == 1) { /* edge to edge */ temp_point[0].x = MIN(initial_canvas_point.x, canvas_point.x); temp_point[0].y = MIN(initial_canvas_point.y, canvas_point.y); temp_point[0].z = canvas_point.z - diff_point.z; temp_point[1].x = MAX(initial_canvas_point.x, canvas_point.x); temp_point[1].y = MAX(initial_canvas_point.y, canvas_point.y); temp_point[1].z = canvas_point.z + diff_point.z; } else { /* center to center */ temp_point[0] = point_sub(initial_canvas_point, diff_point); temp_point[1] = point_add(initial_canvas_point, diff_point); } /* we'll save the coord frame and offset of the roi */ amitk_space_copy_in_place(AMITK_SPACE(object), AMITK_SPACE(canvas->volume)); amitk_space_set_offset(AMITK_SPACE(object), amitk_space_s2b(AMITK_SPACE(canvas->volume), temp_point[0])); /* and set the far corner of the roi */ amitk_volume_set_corner(AMITK_VOLUME(object), point_abs(amitk_space_s2s(AMITK_SPACE(canvas->volume), AMITK_SPACE(object), temp_point[1]))); break; case AMITK_ROI_TYPE_ISOCONTOUR_2D: case AMITK_ROI_TYPE_ISOCONTOUR_3D: if (active_slice == NULL) { g_warning(_("The active data set is not visible")); return FALSE; } canvas_create_isocontour_roi(canvas, AMITK_ROI(object), base_point, active_slice); break; case AMITK_ROI_TYPE_FREEHAND_2D: case AMITK_ROI_TYPE_FREEHAND_3D: if (active_slice == NULL) { g_warning(_("The active data set is not visible")); return FALSE; } if (canvas_create_freehand_roi(canvas, AMITK_ROI(object), base_point, active_slice)) { enter_drawing_mode = TRUE; drawing_object = object; } break; default: g_error("unexpected case in %s at line %d, roi_type %d", __FILE__, __LINE__, AMITK_ROI_TYPE(object)); break; } canvas_add_object_update(canvas, AMITK_OBJECT(object)); /* add this object for updating */ break; case CANVAS_EVENT_RELEASE_SHIFT_OBJECT_IMMEDIATE: gnome_canvas_item_ungrab(GNOME_CANVAS_ITEM(widget), event->button.time); grab_on = FALSE; shift = point_sub(base_point, initial_base_point); /* ------------- apply any shift done -------------- */ if (!POINT_EQUAL(shift, zero_point)) { if (AMITK_IS_FIDUCIAL_MARK(object)) { amitk_fiducial_mark_set(AMITK_FIDUCIAL_MARK(object), point_add(shift, AMITK_FIDUCIAL_MARK_GET(object))); center = AMITK_FIDUCIAL_MARK_GET(object); } else if (AMITK_IS_ROI(object)) { amitk_space_shift_offset(AMITK_SPACE(object), shift); center = amitk_volume_get_center(AMITK_VOLUME(object)); } else if (AMITK_IS_LINE_PROFILE(object)) { center = point_add(shift, canvas->center); /* make sure it stays in bounds */ center = amitk_volume_place_in_bounds(canvas->volume, center); } else g_return_val_if_reached(FALSE); g_signal_emit(G_OBJECT (canvas), canvas_signals[VIEW_CHANGED], 0, ¢er, AMITK_VOLUME_Z_CORNER(canvas->volume)); } break; case CANVAS_EVENT_RELEASE_ROTATE_OBJECT_IMMEDIATE: gnome_canvas_item_ungrab(GNOME_CANVAS_ITEM(widget), event->button.time); grab_on = FALSE; if (canvas->view == AMITK_VIEW_SAGITTAL) theta = -theta; /* sagittal is a left-handed coord frame */ /* now rotate the roi coordinate space axis */ if (AMITK_IS_ROI(object)) { amitk_space_rotate_on_vector(AMITK_SPACE(object), amitk_space_get_axis(AMITK_SPACE(canvas->volume), AMITK_AXIS_Z), theta, amitk_volume_get_center(AMITK_VOLUME(object))); } else if (AMITK_IS_LINE_PROFILE(object)) { amitk_line_profile_set_angle(AMITK_LINE_PROFILE(object), theta+AMITK_LINE_PROFILE_ANGLE(object)); } else g_return_val_if_reached(FALSE); /* shouldn't get here */ break; case CANVAS_EVENT_RELEASE_RESIZE_ROI: gnome_canvas_item_ungrab(GNOME_CANVAS_ITEM(widget), event->button.time); grab_on = FALSE; radius_point = point_cmult(0.5,AMITK_VOLUME_CORNER(object)); temp_point[0] = point_mult(zoom, radius_point); /* new radius */ temp_point[1] = amitk_space_b2s(AMITK_SPACE(object), amitk_volume_get_center(AMITK_VOLUME(object))); temp_point[1] = amitk_space_s2b(AMITK_SPACE(object), point_sub(temp_point[1], temp_point[0])); amitk_space_set_offset(AMITK_SPACE(object), temp_point[1]); /* and the new upper right corner is simply twice the radius */ amitk_volume_set_corner(AMITK_VOLUME(object), point_cmult(2.0, temp_point[0])); break; case CANVAS_EVENT_RELEASE_DRAW_POINT: case CANVAS_EVENT_RELEASE_DRAW_LARGE_POINT: case CANVAS_EVENT_RELEASE_ERASE_POINT: case CANVAS_EVENT_RELEASE_ERASE_LARGE_POINT: gnome_canvas_item_ungrab(GNOME_CANVAS_ITEM(widget), event->button.time); grab_on = FALSE; break; case CANVAS_EVENT_RELEASE_CHANGE_ISOCONTOUR: g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_CANVAS_CHANGE_ISOCONTOUR, &base_point, 0.0); break; case CANVAS_EVENT_SCROLL_UP: case CANVAS_EVENT_SCROLL_DOWN: /* just pretend this event is like the user pressed the scrollbar */ if (canvas_event_type == CANVAS_EVENT_SCROLL_UP) g_signal_emit_by_name(G_OBJECT(canvas->scrollbar), "move_slider", GTK_SCROLL_PAGE_BACKWARD, canvas); else /* scroll down */ g_signal_emit_by_name(G_OBJECT(canvas->scrollbar), "move_slider", GTK_SCROLL_PAGE_FORWARD, canvas); break; case CANVAS_EVENT_NONE: break; default: g_warning("unexpected case in %s at line %d, event %d", __FILE__, __LINE__, canvas_event_type); break; } return FALSE; } /* function called indicating the plane adjustment has changed */ static void canvas_scrollbar_adjustment_cb(GtkObject * adjustment, gpointer data) { AmitkCanvas * canvas = data; AmitkPoint canvas_center; g_return_if_fail(AMITK_IS_CANVAS(canvas)); canvas_center = amitk_space_b2s(AMITK_SPACE(canvas->volume), canvas->center); canvas_center.z = GTK_ADJUSTMENT(adjustment)->value; canvas->center = amitk_space_s2b(AMITK_SPACE(canvas->volume), canvas_center); canvas_add_update(canvas, UPDATE_ALL); g_signal_emit(G_OBJECT (canvas), canvas_signals[VIEW_CHANGED], 0, &(canvas->center), AMITK_VOLUME_Z_CORNER(canvas->volume)); g_signal_emit(G_OBJECT (canvas), canvas_signals[HELP_EVENT], 0, AMITK_HELP_INFO_BLANK, &(canvas->center), 0.0); return; } static gboolean canvas_recalc_corners(AmitkCanvas * canvas) { GList * volumes; gboolean changed; /* sanity checks */ if (canvas->study == NULL) return FALSE; /* what volumes are we looking at - ignore ROI's */ if (AMITK_STUDY_CANVAS_MAINTAIN_SIZE(canvas->study)) { volumes = amitk_object_get_children_of_type(AMITK_OBJECT(canvas->study), AMITK_OBJECT_TYPE_DATA_SET, TRUE); } else { volumes = amitk_object_get_selected_children_of_type(AMITK_OBJECT(canvas->study), AMITK_OBJECT_TYPE_DATA_SET, canvas->view_mode, TRUE); } changed = amitk_volumes_calc_display_volume(volumes, AMITK_SPACE(canvas->volume), canvas->center, AMITK_VOLUME_Z_CORNER(canvas->volume), AMITK_STUDY_FOV(canvas->study), canvas->volume); amitk_objects_unref(volumes); return changed; } /* function to update the adjustment settings for the scrollbar */ static void canvas_update_scrollbar(AmitkCanvas * canvas, AmitkPoint center, amide_real_t thickness) { AmitkCorners view_corner; amide_real_t upper, lower; amide_real_t min_voxel_size; AmitkPoint zp_start; GList * volumes; GList * data_sets; /* sanity checks */ if (canvas->study == NULL) return; /* make valgrind happy */ view_corner[0]=zero_point; view_corner[1]=zero_point; volumes = amitk_object_get_selected_children_of_type(AMITK_OBJECT(canvas->study), AMITK_OBJECT_TYPE_VOLUME, canvas->view_mode, TRUE); amitk_volumes_get_enclosing_corners(volumes, AMITK_SPACE(canvas->volume), view_corner); amitk_objects_unref(volumes); data_sets = amitk_object_get_selected_children_of_type(AMITK_OBJECT(canvas->study), AMITK_OBJECT_TYPE_DATA_SET, canvas->view_mode, TRUE); min_voxel_size = amitk_data_sets_get_min_voxel_size(data_sets); amitk_objects_unref(data_sets); upper = view_corner[1].z; lower = view_corner[0].z; /* translate the view center point so that the z coordinate corresponds to depth in this view */ zp_start = amitk_space_b2s(AMITK_SPACE(canvas->volume), center); /* make sure our view center makes sense */ if (zp_start.z < lower) { if (zp_start.z < lower-thickness) zp_start.z = (upper-lower)/2.0+lower; else zp_start.z = lower; } else if (zp_start.z > upper) { if (zp_start.z > lower+thickness) zp_start.z = (upper-lower)/2.0+lower; else zp_start.z = upper; } GTK_ADJUSTMENT(canvas->scrollbar_adjustment)->upper = upper; GTK_ADJUSTMENT(canvas->scrollbar_adjustment)->lower = lower; GTK_ADJUSTMENT(canvas->scrollbar_adjustment)->step_increment = min_voxel_size; GTK_ADJUSTMENT(canvas->scrollbar_adjustment)->page_increment = (thickness/2.0 < min_voxel_size) ? min_voxel_size : thickness/2.0; GTK_ADJUSTMENT(canvas->scrollbar_adjustment)->page_size = 0; GTK_ADJUSTMENT(canvas->scrollbar_adjustment)->value = zp_start.z; /* allright, we need to update widgets connected to the adjustment without triggering our callback */ g_signal_handlers_block_by_func(G_OBJECT(canvas->scrollbar_adjustment), G_CALLBACK(canvas_scrollbar_adjustment_cb), canvas); gtk_adjustment_changed(GTK_ADJUSTMENT(canvas->scrollbar_adjustment)); g_signal_handlers_unblock_by_func(G_OBJECT(canvas->scrollbar_adjustment), G_CALLBACK(canvas_scrollbar_adjustment_cb), canvas); return; } /* function to update the target cross on the canvas */ static void canvas_update_target(AmitkCanvas * canvas, AmitkCanvasTargetAction action, AmitkPoint center, amide_real_t thickness) { GnomeCanvasPoints * points[8]; AmitkCanvasPoint point0, point1; AmitkPoint start, end; gint i; gdouble separation; rgba_t color; if (canvas->type == AMITK_CANVAS_TYPE_FLY_THROUGH) return; if ((canvas->slices == NULL) || ((action == AMITK_CANVAS_TARGET_ACTION_HIDE) && (!AMITK_STUDY_CANVAS_TARGET(canvas->study)))) { for (i=0; i < 8 ; i++) if (canvas->target[i] != NULL) gnome_canvas_item_hide(canvas->target[i]); return; } if (((action == AMITK_CANVAS_TARGET_ACTION_HIDE) && AMITK_STUDY_CANVAS_TARGET(canvas->study)) || (action == AMITK_CANVAS_TARGET_ACTION_LEAVE)) { thickness = AMITK_VOLUME_Z_CORNER(canvas->volume); center = canvas->center; } color = amitk_color_table_outline_color(canvas_get_color_table(canvas), FALSE); start = end = amitk_space_b2s(AMITK_SPACE(canvas->volume), center); start.x -= thickness/2.0; start.y -= thickness/2.0; end.x += thickness/2.0; end.y += thickness/2.0; /* get the canvas locations corresponding to the start and end coordinates */ point0 = p_2_cp(canvas, start); point1 = p_2_cp(canvas, end); separation = (point1.x - point0.x)/2.0; if (separation < AMITK_STUDY_CANVAS_TARGET_EMPTY_AREA(canvas->study)) separation = AMITK_STUDY_CANVAS_TARGET_EMPTY_AREA(canvas->study)-separation; else separation = 0.0; points[0] = gnome_canvas_points_new(2); points[0]->coords[0] = (gdouble) canvas->border_width; points[0]->coords[1] = point1.y; points[0]->coords[2] = ((point0.x-separation) > canvas->border_width) ? (point0.x-separation) : canvas->border_width; points[0]->coords[3] = point1.y; points[1] = gnome_canvas_points_new(2); points[1]->coords[0] = point0.x; points[1]->coords[1] = ((point1.y-separation) > canvas->border_width) ? (point1.y-separation) : canvas->border_width; points[1]->coords[2] = point0.x; points[1]->coords[3] = (gdouble) canvas->border_width; points[2] = gnome_canvas_points_new(2); points[2]->coords[0] = point1.x; points[2]->coords[1] = (gdouble) canvas->border_width; points[2]->coords[2] = point1.x; points[2]->coords[3] = ((point1.y-separation) > canvas->border_width) ? (point1.y-separation) : canvas->border_width; points[3] = gnome_canvas_points_new(2); points[3]->coords[0] = ((point1.x+separation) < canvas->pixbuf_width+canvas->border_width) ? (point1.x+separation) : canvas->pixbuf_width+canvas->border_width; points[3]->coords[1] = point1.y; points[3]->coords[2] = (gdouble) (canvas->pixbuf_width+canvas->border_width); points[3]->coords[3] = point1.y; points[4] = gnome_canvas_points_new(2); points[4]->coords[0] = (gdouble) canvas->border_width; points[4]->coords[1] = point0.y; points[4]->coords[2] = ((point0.x-separation) > canvas->border_width) ? (point0.x-separation) : canvas->border_width; points[4]->coords[3] = point0.y; points[5] = gnome_canvas_points_new(2); points[5]->coords[0] = point0.x; points[5]->coords[1] = ((point0.y+separation) < canvas->pixbuf_height+canvas->border_width) ? (point0.y+separation) : canvas->pixbuf_height+canvas->border_width; points[5]->coords[2] = point0.x; points[5]->coords[3] = (gdouble) (canvas->pixbuf_height+canvas->border_width); points[6] = gnome_canvas_points_new(2); points[6]->coords[0] = point1.x; points[6]->coords[1] = (gdouble) (canvas->pixbuf_height+canvas->border_width); points[6]->coords[2] = point1.x; points[6]->coords[3] = ((point0.y+separation) < canvas->pixbuf_height+canvas->border_width) ? (point0.y+separation) : canvas->pixbuf_height+canvas->border_width; points[7] = gnome_canvas_points_new(2); points[7]->coords[0] = ((point1.x+separation) < canvas->pixbuf_width+canvas->border_width) ? (point1.x+separation) : canvas->pixbuf_width+canvas->border_width; points[7]->coords[1] = point0.y; points[7]->coords[2] = (gdouble) (canvas->pixbuf_width+canvas->border_width); points[7]->coords[3] = point0.y; for (i=0; i<8; i++) { if (canvas->target[i]==NULL) { canvas->target[i] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas->canvas)), gnome_canvas_line_get_type(), "points", points[i], "fill_color_rgba", amitk_color_table_rgba_to_uint32(color), "width_pixels", 1, NULL); g_signal_connect(G_OBJECT(canvas->target[i]), "event", G_CALLBACK(canvas_event_cb), canvas); } else if (action == AMITK_CANVAS_TARGET_ACTION_SHOW) gnome_canvas_item_set(canvas->target[i],"points",points[i], "fill_color_rgba", amitk_color_table_rgba_to_uint32(color), "width_pixels", 1, NULL); else gnome_canvas_item_set(canvas->target[i],"points",points[i], "fill_color_rgba", amitk_color_table_rgba_to_uint32(color), NULL); gnome_canvas_item_show(canvas->target[i]); gnome_canvas_points_unref(points[i]); } return; } /* function to update the arrows on the canvas */ static void canvas_update_arrows(AmitkCanvas * canvas) { GnomeCanvasPoints * points[4]; AmitkCanvasPoint point0, point1; AmitkPoint start, end; gint i; amide_real_t thickness; if (canvas->type == AMITK_CANVAS_TYPE_FLY_THROUGH) return; if (canvas->slices == NULL) { for (i=0; i<4; i++) if (canvas->arrows[i] != NULL) gnome_canvas_item_hide(canvas->arrows[i]); return; } /* figure out the dimensions of the view "box" */ thickness= AMITK_VOLUME_Z_CORNER(canvas->volume); start = amitk_space_b2s(AMITK_SPACE(canvas->volume), canvas->center); start.x -= thickness/2.0; start.y -= thickness/2.0; end = amitk_space_b2s(AMITK_SPACE(canvas->volume), canvas->center); end.x += thickness/2.0; end.y += thickness/2.0; /* get the canvas locations corresponding to the start and end coordinates */ point0 = p_2_cp(canvas, start); point1 = p_2_cp(canvas, end); /* notes: 1) even coords are the x coordinate, odd coords are the y 2) drawing coordinate frame starts from the top left 3) X's origin is top left, ours is bottom left */ /* left arrow */ points[0] = gnome_canvas_points_new(4); points[0]->coords[0] = DEFAULT_CANVAS_BORDER_WIDTH-DEFAULT_CANVAS_TRIANGLE_SEPARATION; points[0]->coords[1] = point1.y; points[0]->coords[2] = points[0]->coords[0]; points[0]->coords[3] = point0.y; points[0]->coords[4] = DEFAULT_CANVAS_TRIANGLE_BORDER; points[0]->coords[5] = point0.y + DEFAULT_CANVAS_TRIANGLE_WIDTH/2.0; points[0]->coords[6] = DEFAULT_CANVAS_TRIANGLE_BORDER; points[0]->coords[7] = point1.y - DEFAULT_CANVAS_TRIANGLE_WIDTH/2.0; /* top arrow */ points[1] = gnome_canvas_points_new(4); points[1]->coords[0] = point0.x; points[1]->coords[1] = DEFAULT_CANVAS_BORDER_WIDTH-DEFAULT_CANVAS_TRIANGLE_SEPARATION; points[1]->coords[2] = point1.x; points[1]->coords[3] = points[1]->coords[1]; points[1]->coords[4] = point1.x + DEFAULT_CANVAS_TRIANGLE_WIDTH/2.0; points[1]->coords[5] = DEFAULT_CANVAS_TRIANGLE_BORDER; points[1]->coords[6] = point0.x - DEFAULT_CANVAS_TRIANGLE_WIDTH/2.0; points[1]->coords[7] = DEFAULT_CANVAS_TRIANGLE_BORDER; /* right arrow */ points[2] = gnome_canvas_points_new(4); points[2]->coords[0] = DEFAULT_CANVAS_BORDER_WIDTH + DEFAULT_CANVAS_TRIANGLE_SEPARATION + canvas->pixbuf_width; points[2]->coords[1] = point1.y; points[2]->coords[2] = points[2]->coords[0]; points[2]->coords[3] = point0.y; points[2]->coords[4] = DEFAULT_CANVAS_BORDER_WIDTH + DEFAULT_CANVAS_TRIANGLE_HEIGHT + DEFAULT_CANVAS_TRIANGLE_SEPARATION + canvas->pixbuf_width; points[2]->coords[5] = point0.y + DEFAULT_CANVAS_TRIANGLE_WIDTH/2; points[2]->coords[6] = points[2]->coords[4]; points[2]->coords[7] = point1.y - DEFAULT_CANVAS_TRIANGLE_WIDTH/2; /* bottom arrow */ points[3] = gnome_canvas_points_new(4); points[3]->coords[0] = point0.x; points[3]->coords[1] = DEFAULT_CANVAS_BORDER_WIDTH + DEFAULT_CANVAS_TRIANGLE_SEPARATION + canvas->pixbuf_height; points[3]->coords[2] = point1.x; points[3]->coords[3] = points[3]->coords[1]; points[3]->coords[4] = point1.x + DEFAULT_CANVAS_TRIANGLE_WIDTH/2; points[3]->coords[5] = DEFAULT_CANVAS_BORDER_WIDTH+DEFAULT_CANVAS_TRIANGLE_HEIGHT + DEFAULT_CANVAS_TRIANGLE_SEPARATION + canvas->pixbuf_height; points[3]->coords[6] = point0.x - DEFAULT_CANVAS_TRIANGLE_WIDTH/2; points[3]->coords[7] = points[3]->coords[5]; for (i=0; i<4; i++) { if (canvas->arrows[i] != NULL ) gnome_canvas_item_set(canvas->arrows[i],"points",points[i], NULL); else canvas->arrows[i] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas->canvas)), gnome_canvas_polygon_get_type(), "points", points[i],"fill_color", "white", "outline_color", "black", "width_pixels", 2, NULL); gnome_canvas_item_show(canvas->arrows[i]); gnome_canvas_points_unref(points[i]); } return; } /* function to update the line profile on the canvas */ static void canvas_update_line_profile(AmitkCanvas * canvas) { GnomeCanvasPoints * points; AmitkCanvasPoint point0, point1; AmitkPoint start, end; amide_real_t temp; amide_real_t profile_angle; gint roi_width; #ifndef AMIDE_LIBGNOMECANVAS_AA GdkLineStyle line_style; #endif guint32 fill_color_rgba; rgba_t outline_color; AmitkLineProfile * line_profile; gdouble affine[6]; AmitkPoint initial; if (canvas->type == AMITK_CANVAS_TYPE_FLY_THROUGH) return; line_profile = AMITK_STUDY_LINE_PROFILE(canvas->study); /* figure out if we need to hide it */ if ((canvas->view != AMITK_LINE_PROFILE_VIEW(line_profile)) || (!AMITK_LINE_PROFILE_VISIBLE(line_profile)) || !amitk_volume_point_in_bounds(canvas->volume, canvas->center)) { /* the !amitk_volume_point_in_bounds gets hit when there's no data set on the given canvas.. only happens if multiple views are up at the same time */ if (canvas->line_profile_item != NULL) gnome_canvas_item_hide(canvas->line_profile_item); return; } initial = amitk_space_b2s(AMITK_SPACE(canvas->volume), canvas->center); profile_angle = AMITK_LINE_PROFILE_ANGLE(line_profile); if (canvas->view == AMITK_VIEW_SAGITTAL) profile_angle = -profile_angle; /* sagittal is a left-handed coord frame */ /* z location's easy */ start.z = end.z = initial.z; /* x locations */ if (REAL_EQUAL(profile_angle, M_PI/2.0)) { /* 90 degrees */ start.x = end.x = initial.x; } else if (REAL_EQUAL(profile_angle, 0) || REAL_EQUAL(profile_angle, M_PI)) { /* 0, 180 degrees */ start.x = 0; end.x = AMITK_VOLUME_X_CORNER(canvas->volume); } else { /* everything else */ start.x = initial.x - initial.y/tan(profile_angle); end.x = initial.x + (AMITK_VOLUME_Y_CORNER(canvas->volume)-initial.y)/tan(profile_angle); } if (start.x < 0.0) start.x = 0.0; else if (start.x > AMITK_VOLUME_X_CORNER(canvas->volume)) start.x = AMITK_VOLUME_X_CORNER(canvas->volume); if (end.x < 0.0) end.x = 0.0; else if (end.x > AMITK_VOLUME_X_CORNER(canvas->volume)) end.x = AMITK_VOLUME_X_CORNER(canvas->volume); if (profile_angle < 0.0) { temp = start.x; start.x = end.x; end.x = temp; } /* y locations */ if (REAL_EQUAL(profile_angle, M_PI/2.0)) { /* 90 degrees */ start.y = 0; end.y = AMITK_VOLUME_Y_CORNER(canvas->volume); } else if (REAL_EQUAL(profile_angle, 0) || REAL_EQUAL(profile_angle, M_PI)) { /* 0, 180 degrees */ start.y = end.y = initial.y; } else { /* everything else */ start.y = initial.y - initial.x*tan(profile_angle); end.y = initial.y + (AMITK_VOLUME_X_CORNER(canvas->volume)-initial.x)*tan(profile_angle); } if (start.y < 0.0) start.y = 0.0; else if (start.y > AMITK_VOLUME_Y_CORNER(canvas->volume)) start.y = AMITK_VOLUME_Y_CORNER(canvas->volume); if (end.y < 0.0) end.y = 0.0; else if (end.y > AMITK_VOLUME_Y_CORNER(canvas->volume)) end.y = AMITK_VOLUME_Y_CORNER(canvas->volume); if (fabs(profile_angle) > M_PI/2) { temp = start.y; start.y = end.y; end.y = temp; } /* get the canvas locations corresponding to the start and end coordinates */ point0 = p_2_cp(canvas, start); point1 = p_2_cp(canvas, end); /* record our start and end */ start = amitk_space_s2b(AMITK_SPACE(canvas->volume), start); amitk_line_profile_set_start_point(AMITK_STUDY_LINE_PROFILE(canvas->study), start); end = amitk_space_s2b(AMITK_SPACE(canvas->volume), end); amitk_line_profile_set_end_point(AMITK_STUDY_LINE_PROFILE(canvas->study), end); /* calculate the line */ points = gnome_canvas_points_new(2); points->coords[0] = point0.x; points->coords[1] = point0.y; points->coords[2] = point1.x; points->coords[3] = point1.y; roi_width = AMITK_STUDY_CANVAS_ROI_WIDTH(canvas->study); #ifndef AMIDE_LIBGNOMECANVAS_AA line_style = AMITK_STUDY_CANVAS_LINE_STYLE(canvas->study); #endif outline_color = amitk_color_table_outline_color(canvas_get_color_table(canvas), TRUE); fill_color_rgba = amitk_color_table_rgba_to_uint32(outline_color); if (canvas->line_profile_item != NULL ) { /* make sure to reset any affine translations we've done */ gnome_canvas_item_i2w_affine(canvas->line_profile_item,affine); affine[0] = affine[3] = 1.0; affine[1] = affine[2] = affine[4] = affine[5] = 0.0; gnome_canvas_item_affine_absolute(canvas->line_profile_item,affine); gnome_canvas_item_set(canvas->line_profile_item, "points",points, "fill_color_rgba", fill_color_rgba, "width_pixels", roi_width, #ifndef AMIDE_LIBGNOMECANVAS_AA "line_style", line_style, #endif NULL); } else { canvas->line_profile_item = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas->canvas)), gnome_canvas_line_get_type(), "points", points, "fill_color_rgba", fill_color_rgba, "width_pixels", roi_width, "last_arrowhead", TRUE, "arrow_shape_a", (gdouble) 6.0, "arrow_shape_b", (gdouble) 5.0, "arrow_shape_c", (gdouble) 4.0, #ifndef AMIDE_LIBGNOMECANVAS_AA "line_style", line_style, #endif NULL); g_object_set_data(G_OBJECT(canvas->line_profile_item), "object", line_profile); g_signal_connect(G_OBJECT(canvas->line_profile_item), "event", G_CALLBACK(canvas_event_cb), canvas); } gnome_canvas_item_show(canvas->line_profile_item); gnome_canvas_points_unref(points); return; } /* function to update the line profile on the canvas */ static void canvas_update_time_on_image(AmitkCanvas * canvas) { amide_time_t midpt_time; gint hours, minutes, seconds; gchar * time_str; rgba_t color; /* put up the timer */ if (canvas->time_on_image) { midpt_time = AMITK_STUDY_VIEW_START_TIME(canvas->study)+ AMITK_STUDY_VIEW_DURATION(canvas->study)/2.0; hours = floor(midpt_time/3600); midpt_time -= hours*3600; minutes = floor(midpt_time/60); midpt_time -= minutes*60; seconds = midpt_time; time_str = g_strdup_printf("%d:%.2d:%.2d",hours,minutes,seconds); color = amitk_color_table_outline_color(canvas_get_color_table(canvas), FALSE); if (canvas->time_label != NULL) gnome_canvas_item_set(canvas->time_label, "text", time_str, "fill_color_rgba", color, NULL); else canvas->time_label = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas->canvas)), gnome_canvas_text_get_type(), "anchor", GTK_ANCHOR_SOUTH_WEST, "text", time_str, "x", 4.0, "y", canvas->pixbuf_height-2.0, "fill_color_rgba", color, "font_desc", amitk_fixed_font_desc, NULL); g_free(time_str); } else { if (canvas->time_label != NULL) { gtk_object_destroy(GTK_OBJECT(canvas->time_label)); canvas->time_label = NULL; } } return; } static void canvas_update_subject_orientation(AmitkCanvas * canvas) { gboolean remove = FALSE; int i; float x[4]; float y[4]; gint anchor[4]; gint which_orientation[4]; if (canvas->active_object == NULL) remove = TRUE; else if (!AMITK_IS_DATA_SET(canvas->active_object)) remove = TRUE; else if (AMITK_DATA_SET_SUBJECT_ORIENTATION(canvas->active_object) == AMITK_SUBJECT_ORIENTATION_UNKNOWN) remove = TRUE; if (remove) { for (i=0; i<4; i++) if (canvas->orientation_label[i] != NULL) gnome_canvas_item_hide(canvas->orientation_label[i]); } else { switch(canvas->view) { case AMITK_VIEW_TRANSVERSE: switch(AMITK_DATA_SET_SUBJECT_ORIENTATION(canvas->active_object)) { case AMITK_SUBJECT_ORIENTATION_SUPINE_HEADFIRST: which_orientation[0] = ANTERIOR; which_orientation[1] = POSTERIOR; which_orientation[2] = RIGHT; which_orientation[3] = LEFT; break; case AMITK_SUBJECT_ORIENTATION_SUPINE_FEETFIRST: which_orientation[0] = ANTERIOR; which_orientation[1] = POSTERIOR; which_orientation[2] = LEFT; which_orientation[3] = RIGHT; break; case AMITK_SUBJECT_ORIENTATION_PRONE_HEADFIRST: which_orientation[0] = POSTERIOR; which_orientation[1] = ANTERIOR; which_orientation[2] = LEFT; which_orientation[3] = RIGHT; break; case AMITK_SUBJECT_ORIENTATION_PRONE_FEETFIRST: which_orientation[0] = POSTERIOR; which_orientation[1] = ANTERIOR; which_orientation[2] = RIGHT; which_orientation[3] = LEFT; break; case AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_HEADFIRST: which_orientation[0] = LEFT; which_orientation[1] = RIGHT; which_orientation[2] = ANTERIOR; which_orientation[3] = POSTERIOR; break; case AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_FEETFIRST: which_orientation[0] = LEFT; which_orientation[1] = RIGHT; which_orientation[2] = POSTERIOR; which_orientation[3] = ANTERIOR; break; case AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_HEADFIRST: which_orientation[0] = RIGHT; which_orientation[1] = LEFT; which_orientation[2] = POSTERIOR; which_orientation[3] = ANTERIOR; break; case AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_FEETFIRST: which_orientation[0] = RIGHT; which_orientation[1] = LEFT; which_orientation[2] = ANTERIOR; which_orientation[3] = POSTERIOR; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } break; case AMITK_VIEW_CORONAL: switch(AMITK_DATA_SET_SUBJECT_ORIENTATION(canvas->active_object)) { case AMITK_SUBJECT_ORIENTATION_SUPINE_HEADFIRST: which_orientation[0] = SUPERIOR; which_orientation[1] = INFERIOR; which_orientation[2] = RIGHT; which_orientation[3] = LEFT; break; case AMITK_SUBJECT_ORIENTATION_SUPINE_FEETFIRST: which_orientation[0] = INFERIOR; which_orientation[1] = SUPERIOR; which_orientation[2] = LEFT; which_orientation[3] = RIGHT; break; case AMITK_SUBJECT_ORIENTATION_PRONE_HEADFIRST: which_orientation[0] = SUPERIOR; which_orientation[1] = INFERIOR; which_orientation[2] = LEFT; which_orientation[3] = RIGHT; break; case AMITK_SUBJECT_ORIENTATION_PRONE_FEETFIRST: which_orientation[0] = INFERIOR; which_orientation[1] = SUPERIOR; which_orientation[2] = RIGHT; which_orientation[3] = LEFT; break; case AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_HEADFIRST: which_orientation[0] = SUPERIOR; which_orientation[1] = INFERIOR; which_orientation[2] = ANTERIOR; which_orientation[3] = POSTERIOR; break; case AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_FEETFIRST: which_orientation[0] = INFERIOR; which_orientation[1] = SUPERIOR; which_orientation[2] = POSTERIOR; which_orientation[3] = ANTERIOR; break; case AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_HEADFIRST: which_orientation[0] = SUPERIOR; which_orientation[1] = INFERIOR; which_orientation[2] = POSTERIOR; which_orientation[3] = ANTERIOR; break; case AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_FEETFIRST: which_orientation[0] = INFERIOR; which_orientation[1] = SUPERIOR; which_orientation[2] = ANTERIOR; which_orientation[3] = POSTERIOR; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } break; case AMITK_VIEW_SAGITTAL: switch(AMITK_DATA_SET_SUBJECT_ORIENTATION(canvas->active_object)) { case AMITK_SUBJECT_ORIENTATION_SUPINE_HEADFIRST: which_orientation[0] = SUPERIOR; which_orientation[1] = INFERIOR; which_orientation[2] = POSTERIOR; which_orientation[3] = ANTERIOR; break; case AMITK_SUBJECT_ORIENTATION_SUPINE_FEETFIRST: which_orientation[0] = INFERIOR; which_orientation[1] = SUPERIOR; which_orientation[2] = POSTERIOR; which_orientation[3] = ANTERIOR; break; case AMITK_SUBJECT_ORIENTATION_PRONE_HEADFIRST: which_orientation[0] = SUPERIOR; which_orientation[1] = INFERIOR; which_orientation[2] = ANTERIOR; which_orientation[3] = POSTERIOR; break; case AMITK_SUBJECT_ORIENTATION_PRONE_FEETFIRST: which_orientation[0] = INFERIOR; which_orientation[1] = SUPERIOR; which_orientation[2] = ANTERIOR; which_orientation[3] = POSTERIOR; break; case AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_HEADFIRST: which_orientation[0] = SUPERIOR; which_orientation[1] = INFERIOR; which_orientation[2] = RIGHT; which_orientation[3] = LEFT; break; case AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_FEETFIRST: which_orientation[0] = INFERIOR; which_orientation[1] = SUPERIOR; which_orientation[2] = RIGHT; which_orientation[3] = LEFT; break; case AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_HEADFIRST: which_orientation[0] = SUPERIOR; which_orientation[1] = INFERIOR; which_orientation[2] = LEFT; which_orientation[3] = RIGHT; break; case AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_FEETFIRST: which_orientation[0] = INFERIOR; which_orientation[1] = SUPERIOR; which_orientation[2] = LEFT; which_orientation[3] = RIGHT; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } /* text locations */ x[0] = 0; y[0] = canvas->border_width; anchor[0] = GTK_ANCHOR_NORTH_WEST; x[1] = 0; y[1] = canvas->border_width + canvas->pixbuf_height; anchor[1] = GTK_ANCHOR_SOUTH_WEST; x[2] = canvas->border_width; y[2] = 2*canvas->border_width + canvas->pixbuf_height; anchor[2] = GTK_ANCHOR_SOUTH_WEST; x[3] = canvas->border_width+canvas->pixbuf_width; y[3] = 2*canvas->border_width + canvas->pixbuf_height; anchor[3] = GTK_ANCHOR_SOUTH_EAST; for (i=0; i<4; i++) { if (canvas->orientation_label[i] != NULL ) gnome_canvas_item_set(canvas->orientation_label[i],"text", _(orientation_label[which_orientation[i]]), "x", x[i], "y", y[i], NULL); else canvas->orientation_label[i] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas->canvas)), gnome_canvas_text_get_type(), "anchor", anchor[i], "text", _(orientation_label[which_orientation[i]]), "x", x[i], "y", y[i], "fill_color", "black", "font_desc", amitk_fixed_font_desc, NULL); gnome_canvas_item_show(canvas->orientation_label[i]); } } return; } static void canvas_update_pixbuf(AmitkCanvas * canvas) { gint old_width, old_height; rgba_t blank_rgba; GtkStyle * widget_style; amide_real_t pixel_dim; AmitkPoint corner; gint width,height; GList * data_sets; AmitkDataSet * active_ds; /* sanity checks */ g_return_if_fail(canvas->study != NULL); old_width = canvas->pixbuf_width; old_height = canvas->pixbuf_height; /* free the previous pixbuf if possible */ if (canvas->pixbuf != NULL) { g_object_unref(canvas->pixbuf); canvas->pixbuf = NULL; } /* compensate for zoom */ pixel_dim = (1/AMITK_STUDY_ZOOM(canvas->study))*AMITK_STUDY_VOXEL_DIM(canvas->study); data_sets = amitk_object_get_selected_children_of_type(AMITK_OBJECT(canvas->study), AMITK_OBJECT_TYPE_DATA_SET, canvas->view_mode, TRUE); if (data_sets == NULL) { /* just use a blank image */ /* figure out what color to use */ widget_style = gtk_widget_get_style(GTK_WIDGET(canvas)); if (widget_style == NULL) { g_warning(_("Canvas has no style?\n")); widget_style = gtk_style_new(); } blank_rgba.r = widget_style->bg[GTK_STATE_NORMAL].red >> 8; blank_rgba.g = widget_style->bg[GTK_STATE_NORMAL].green >> 8; blank_rgba.b = widget_style->bg[GTK_STATE_NORMAL].blue >> 8; blank_rgba.a = 0xFF; corner = AMITK_VOLUME_CORNER(canvas->volume); width = ceil(corner.x/pixel_dim); if (width < 1) width = 1; height = ceil(corner.y/pixel_dim); if (height < 1) height = 1; canvas->pixbuf = image_blank(width, height,blank_rgba); amitk_objects_unref(canvas->slices); canvas->slices = NULL; } else { if (AMITK_IS_DATA_SET(canvas->active_object)) active_ds = AMITK_DATA_SET(canvas->active_object); else active_ds = NULL; canvas->pixbuf = image_from_data_sets(&(canvas->slices), &(canvas->slice_cache), canvas->max_slice_cache_size, data_sets, active_ds, AMITK_STUDY_VIEW_START_TIME(canvas->study), AMITK_STUDY_VIEW_DURATION(canvas->study), -1, pixel_dim, canvas->volume, AMITK_STUDY_FUSE_TYPE(canvas->study), AMITK_CANVAS_VIEW_MODE(canvas)); amitk_objects_unref(data_sets); } if (canvas->pixbuf != NULL) { /* record the width and height for future use*/ canvas->pixbuf_width = gdk_pixbuf_get_width(canvas->pixbuf); canvas->pixbuf_height = gdk_pixbuf_get_height(canvas->pixbuf); /* reset the min size of the widget and set the scroll region */ if ((old_width != canvas->pixbuf_width) || (old_height != canvas->pixbuf_height) || (canvas->image == NULL)) { gtk_widget_set_size_request(canvas->canvas, canvas->pixbuf_width + 2 * canvas->border_width, canvas->pixbuf_height + 2 * canvas->border_width); gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas->canvas), 0.0, 0.0, canvas->pixbuf_width + 2 * canvas->border_width, canvas->pixbuf_height + 2 * canvas->border_width); } /* put the canvas rgb image on the canvas_image */ if (canvas->image == NULL) {/* time to make a new image */ canvas->image = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas->canvas)), gnome_canvas_pixbuf_get_type(), "pixbuf", canvas->pixbuf, "x", (double) canvas->border_width, "y", (double) canvas->border_width, NULL); g_signal_connect(G_OBJECT(canvas->image), "event", G_CALLBACK(canvas_event_cb), canvas); } else { gnome_canvas_item_set(canvas->image, "pixbuf", canvas->pixbuf, NULL); } } return; } static void canvas_update_object(AmitkCanvas * canvas, AmitkObject * object) { rgba_t outline_color; GnomeCanvasItem * item; GnomeCanvasItem * new_item; amide_real_t pixel_dim; g_return_if_fail(object != NULL); g_return_if_fail(canvas->study != NULL); item = canvas_find_item(canvas, object); if (item != NULL) { g_return_if_fail(object == g_object_get_data(G_OBJECT(item), "object")); } outline_color = amitk_color_table_outline_color(canvas_get_color_table(canvas), TRUE); /* compensate for zoom */ pixel_dim = (1/AMITK_STUDY_ZOOM(canvas->study))*AMITK_STUDY_VOXEL_DIM(canvas->study); new_item = amitk_canvas_object_draw(GNOME_CANVAS(canvas->canvas), canvas->volume, object, AMITK_CANVAS_VIEW_MODE(canvas), item, pixel_dim, canvas->pixbuf_width, canvas->pixbuf_height, canvas->border_width,canvas->border_width, outline_color, AMITK_STUDY_CANVAS_ROI_WIDTH(canvas->study), #ifdef AMIDE_LIBGNOMECANVAS_AA AMITK_STUDY_CANVAS_ROI_TRANSPARENCY(canvas->study) #else AMITK_STUDY_CANVAS_LINE_STYLE(canvas->study), AMITK_STUDY_CANVAS_FILL_ROI(canvas->study) #endif ); if ((item == NULL) && (new_item != NULL)) { g_object_set_data(G_OBJECT(new_item), "object", object); g_signal_connect(G_OBJECT(new_item), "event", G_CALLBACK(canvas_event_cb), canvas); canvas->object_items = g_list_append(canvas->object_items, new_item); } return; } static void canvas_update_objects(AmitkCanvas * canvas, gboolean all) { GList * objects; AmitkObject * object; if (all) { objects = canvas_add_current_objects(canvas, canvas->next_update_objects); } else { objects = canvas->next_update_objects; } canvas->next_update_objects = NULL; while (objects != NULL) { object = AMITK_OBJECT(objects->data); canvas_update_object(canvas, object); objects = g_list_remove(objects, object); amitk_object_unref(object); } } static void canvas_update_setup(AmitkCanvas * canvas) { gboolean first_time = FALSE; gchar * temp_str; if (canvas->canvas != NULL) { /* add a ref so they aren't destroyed when removed from the container */ g_object_ref(G_OBJECT(canvas->label)); g_object_ref(G_OBJECT(canvas->canvas)); g_object_ref(G_OBJECT(canvas->scrollbar)); gtk_container_remove(GTK_CONTAINER(canvas), canvas->label); gtk_container_remove(GTK_CONTAINER(canvas), canvas->canvas); gtk_container_remove(GTK_CONTAINER(canvas), canvas->scrollbar); } else { first_time = TRUE; temp_str = g_strdup_printf("%s %d\n", amitk_view_get_name(canvas->view), canvas->view_mode+1); canvas->label = gtk_label_new(temp_str); g_free(temp_str); #ifdef AMIDE_LIBGNOMECANVAS_AA canvas->canvas = gnome_canvas_new_aa(); #else canvas->canvas = gnome_canvas_new(); #endif canvas->scrollbar_adjustment = gtk_adjustment_new(0.5, 0, 1, 1, 1, 1); /* junk values */ g_signal_connect(canvas->scrollbar_adjustment, "value_changed", G_CALLBACK(canvas_scrollbar_adjustment_cb), canvas); canvas->scrollbar = gtk_hscrollbar_new(GTK_ADJUSTMENT(canvas->scrollbar_adjustment)); gtk_range_set_update_policy(GTK_RANGE(canvas->scrollbar), GTK_UPDATE_CONTINUOUS); } /* pack it in based on what the layout is */ switch(AMITK_STUDY_CANVAS_LAYOUT(canvas->study)) { case AMITK_LAYOUT_ORTHOGONAL: switch(canvas->view) { case AMITK_VIEW_CORONAL: gtk_box_pack_start(GTK_BOX(canvas), canvas->canvas, TRUE, TRUE, BOX_SPACING); gtk_box_pack_start(GTK_BOX(canvas), canvas->scrollbar, FALSE, FALSE, BOX_SPACING); gtk_box_pack_start(GTK_BOX(canvas), canvas->label, FALSE, FALSE, BOX_SPACING); break; case AMITK_VIEW_TRANSVERSE: case AMITK_VIEW_SAGITTAL: default: gtk_box_pack_start(GTK_BOX(canvas), canvas->label, FALSE, FALSE, BOX_SPACING); gtk_box_pack_start(GTK_BOX(canvas), canvas->scrollbar, FALSE, FALSE, BOX_SPACING); gtk_box_pack_start(GTK_BOX(canvas), canvas->canvas, TRUE,TRUE,BOX_SPACING); break; } break; case AMITK_LAYOUT_LINEAR: default: gtk_box_pack_start(GTK_BOX(canvas), canvas->label, FALSE, FALSE, BOX_SPACING); gtk_box_pack_start(GTK_BOX(canvas), canvas->canvas, TRUE,TRUE,BOX_SPACING); gtk_box_pack_start(GTK_BOX(canvas), canvas->scrollbar, FALSE, FALSE,BOX_SPACING); break; } if (first_time) { canvas_add_update(canvas, UPDATE_ALL); } else { if (canvas->view == AMITK_VIEW_SAGITTAL) canvas_add_update(canvas, UPDATE_ALL); g_object_unref(G_OBJECT(canvas->label)); g_object_unref(G_OBJECT(canvas->canvas)); g_object_unref(G_OBJECT(canvas->scrollbar)); } } static void canvas_add_object_update(AmitkCanvas * canvas, AmitkObject * object) { if (AMITK_IS_STUDY(object)) { canvas_add_update(canvas, UPDATE_ALL); } else if (amitk_object_get_selected(object, canvas->view_mode)) { if (AMITK_IS_DATA_SET(object)) { canvas_add_update(canvas, UPDATE_ALL); } else if (g_list_index(canvas->next_update_objects, object) < 0) {/* not yet in list */ canvas->next_update_objects=g_list_append(canvas->next_update_objects, amitk_object_ref(object)); canvas_add_update(canvas, UPDATE_OBJECT); } } return; } static void canvas_add_update(AmitkCanvas * canvas, guint update_type) { /* reslicing is slow, put up a wait cursor */ /* don't use ui_common_place_cursor, as this has a gtk_main_iteration call... */ if ((update_type & UPDATE_DATA_SETS) && !(canvas->next_update & UPDATE_DATA_SETS)) ui_common_place_cursor_no_wait(UI_CURSOR_WAIT,GTK_WIDGET(canvas)); canvas->next_update = canvas->next_update | update_type; /* DEFAULT_IDLE is needed, as this is the first default lower then redraw */ if (canvas->idle_handler_id == 0) canvas->idle_handler_id = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE,canvas_update_while_idle, canvas, NULL); return; } static gboolean canvas_update_while_idle(gpointer data) { AmitkCanvas * canvas = data; /* update the corners */ if (canvas_recalc_corners(canvas)) /* if corners changed */ canvas->next_update = canvas->next_update | UPDATE_ALL; if (canvas->next_update & UPDATE_DATA_SETS) { canvas_update_pixbuf(canvas); } if (canvas->next_update & UPDATE_ARROWS) { canvas_update_arrows(canvas); } if (canvas->next_update & UPDATE_SCROLLBAR) { canvas_update_scrollbar(canvas, canvas->center, AMITK_VOLUME_Z_CORNER(canvas->volume)); } if (canvas->next_update & (UPDATE_OBJECTS | UPDATE_OBJECT)) { canvas_update_objects(canvas, (canvas->next_update & UPDATE_OBJECTS)); } if (canvas->next_update & UPDATE_LINE_PROFILE) { canvas_update_line_profile(canvas); } if (canvas->next_update & UPDATE_TIME) { canvas_update_time_on_image(canvas); } if (canvas->next_update & UPDATE_SUBJECT_ORIENTATION) { canvas_update_subject_orientation(canvas); } if (canvas->next_update & UPDATE_TARGET) { canvas_update_target(canvas, canvas->next_target_action, canvas->next_target_center, canvas->next_target_thickness); } canvas->idle_handler_id=0; if (canvas->next_update & UPDATE_DATA_SETS) /* remove the cursor on slow updates */ ui_common_remove_wait_cursor(GTK_WIDGET(canvas)); canvas->next_update = UPDATE_NONE; return FALSE; } static void canvas_add_object(AmitkCanvas * canvas, AmitkObject * object) { GList * children; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_OBJECT(object)); amitk_object_ref(object); if (AMITK_IS_STUDY(object)) { if (canvas->study != NULL) { canvas_remove_object(canvas, AMITK_OBJECT(canvas->study)); } canvas->study = AMITK_STUDY(object); canvas->center = AMITK_STUDY_VIEW_CENTER(object); amitk_volume_set_z_corner(canvas->volume, AMITK_STUDY_VIEW_THICKNESS(object)); } canvas_add_object_update(canvas, object); g_signal_connect(G_OBJECT(object), "space_changed", G_CALLBACK(canvas_space_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "object_selection_changed", G_CALLBACK(canvas_object_selection_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "object_add_child", G_CALLBACK(canvas_object_add_child_cb), canvas); g_signal_connect(G_OBJECT(object), "object_remove_child", G_CALLBACK(canvas_object_remove_child_cb), canvas); if (AMITK_IS_STUDY(object)) { g_signal_connect(G_OBJECT(object), "thickness_changed", G_CALLBACK(canvas_view_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "time_changed", G_CALLBACK(canvas_time_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "canvas_target_changed", G_CALLBACK(canvas_target_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "voxel_dim_or_zoom_changed", G_CALLBACK(canvas_study_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "fov_changed", G_CALLBACK(canvas_study_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "fuse_type_changed", G_CALLBACK(canvas_study_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "view_center_changed", G_CALLBACK(canvas_view_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "canvas_roi_preference_changed", G_CALLBACK(canvas_roi_preference_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "canvas_general_preference_changed", G_CALLBACK(canvas_general_preference_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "canvas_target_preference_changed", G_CALLBACK(canvas_target_preference_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "canvas_layout_preference_changed", G_CALLBACK(canvas_layout_preference_changed_cb), canvas); g_signal_connect(G_OBJECT(AMITK_STUDY_LINE_PROFILE(object)), "line_profile_changed", G_CALLBACK(canvas_line_profile_changed_cb), canvas); } if (AMITK_IS_VOLUME(object)) { g_signal_connect(G_OBJECT(object), "volume_changed", G_CALLBACK(canvas_volume_changed_cb), canvas); } if (AMITK_IS_ROI(object)) { g_signal_connect(G_OBJECT(object), "roi_changed", G_CALLBACK(canvas_roi_changed_cb), canvas); } if (AMITK_IS_FIDUCIAL_MARK(object)) { g_signal_connect(G_OBJECT(object), "fiducial_mark_changed", G_CALLBACK(canvas_fiducial_mark_changed_cb), canvas); } if (AMITK_IS_DATA_SET(object)) { g_signal_connect(G_OBJECT(object), "data_set_changed", G_CALLBACK(data_set_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "invalidate_slice_cache", G_CALLBACK(canvas_data_set_invalidate_slice_cache), canvas); g_signal_connect(G_OBJECT(object), "interpolation_changed", G_CALLBACK(data_set_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "rendering_changed", G_CALLBACK(data_set_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "thresholding_changed", G_CALLBACK(data_set_thresholding_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "thresholds_changed", G_CALLBACK(data_set_thresholding_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "color_table_changed", G_CALLBACK(data_set_color_table_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "subject_orientation_changed", G_CALLBACK(data_set_subject_orientation_changed_cb), canvas); g_signal_connect(G_OBJECT(object), "view_gates_changed", G_CALLBACK(data_set_changed_cb), canvas); } /* keep track of undrawn rois */ if (AMITK_IS_ROI(object)) if (AMITK_ROI_UNDRAWN(object)) if (amitk_object_get_selected(object, canvas->view_mode)) { if (g_list_index(canvas->undrawn_rois, object) < 0) /* not yet in list */ canvas->undrawn_rois = g_list_prepend(canvas->undrawn_rois, amitk_object_ref(object)); amitk_object_ref(object); } /* recurse */ children= AMITK_OBJECT_CHILDREN(object); while (children != NULL) { canvas_add_object(canvas, children->data); children = children->next; } return; } static void canvas_remove_object(AmitkCanvas * canvas, AmitkObject * object) { GnomeCanvasItem * found_item; GList * children; g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_OBJECT(object)); /* remove children */ children= AMITK_OBJECT_CHILDREN(object); while (children != NULL) { canvas_remove_object(canvas, children->data); children = children->next; } /* keep track of undrawn rois */ if (AMITK_IS_ROI(object)) { if (g_list_index(canvas->undrawn_rois, object) >= 0) { canvas->undrawn_rois = g_list_remove(canvas->undrawn_rois, object); amitk_object_unref(object); } } g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_space_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_object_selection_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_object_add_child_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_object_remove_child_cb, canvas); if (AMITK_IS_STUDY(object)) { g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_study_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_view_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_target_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_time_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_roi_preference_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_general_preference_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_target_preference_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_layout_preference_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(AMITK_STUDY_LINE_PROFILE(object)), canvas_line_profile_changed_cb, canvas); } if (AMITK_IS_VOLUME(object)) { g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_volume_changed_cb, canvas); } if (AMITK_IS_ROI(object)) { g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_roi_changed_cb, canvas); } if (AMITK_IS_FIDUCIAL_MARK(object)) { g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_fiducial_mark_changed_cb, canvas); } if (AMITK_IS_DATA_SET(object)) { g_signal_handlers_disconnect_by_func(G_OBJECT(object), data_set_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), canvas_data_set_invalidate_slice_cache, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), data_set_thresholding_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), data_set_color_table_changed_cb, canvas); g_signal_handlers_disconnect_by_func(G_OBJECT(object), data_set_subject_orientation_changed_cb, canvas); canvas->slice_cache = amitk_data_sets_remove_with_slice_parent(canvas->slice_cache, AMITK_DATA_SET(object)); } /* find corresponding CanvasItem and destroy */ found_item = canvas_find_item(canvas, object); if (found_item) { canvas->object_items = g_list_remove(canvas->object_items, found_item); gtk_object_destroy(GTK_OBJECT(found_item)); canvas_add_update(canvas, UPDATE_VIEW); /* needed to check if we need to reset the view slice */ } else if (AMITK_IS_DATA_SET(object)) { canvas_add_update(canvas, UPDATE_ALL); } amitk_object_unref(object); return; } GtkWidget * amitk_canvas_new(AmitkStudy * study, AmitkView view, AmitkViewMode view_mode, AmitkCanvasType type) { AmitkCanvas * canvas; g_return_val_if_fail(AMITK_IS_STUDY(study), NULL); canvas = g_object_new(amitk_canvas_get_type(), NULL); canvas->view = view; canvas->view_mode = view_mode; canvas->type = type; switch(type) { case AMITK_CANVAS_TYPE_FLY_THROUGH: canvas->border_width = 0.0; break; case AMITK_CANVAS_TYPE_NORMAL: default: canvas->border_width = DEFAULT_CANVAS_BORDER_WIDTH; break; } amitk_space_set_view_space(AMITK_SPACE(canvas->volume), canvas->view, AMITK_STUDY_CANVAS_LAYOUT(study)); amitk_canvas_set_study(canvas, study); canvas_update_setup(canvas); return GTK_WIDGET (canvas); } void amitk_canvas_set_study(AmitkCanvas * canvas, AmitkStudy * study) { g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(AMITK_IS_STUDY(study)); canvas_add_object(canvas, AMITK_OBJECT(study)); return; } void amitk_canvas_set_active_object(AmitkCanvas * canvas, AmitkObject * active_object) { g_return_if_fail(AMITK_IS_CANVAS(canvas)); g_return_if_fail(active_object != NULL); if (canvas->active_object != active_object) { canvas->active_object = active_object; if (AMITK_STUDY_FUSE_TYPE(canvas->study) == AMITK_FUSE_TYPE_BLEND) { canvas_add_update(canvas, UPDATE_OBJECTS); } else /* AMITK_FUSE_TYPE_OVERLAY */ canvas_add_update(canvas, UPDATE_DATA_SETS); canvas_add_update(canvas, UPDATE_TARGET); canvas_add_update(canvas, UPDATE_LINE_PROFILE); canvas_add_update(canvas, UPDATE_SUBJECT_ORIENTATION); } return; } void amitk_canvas_update_target(AmitkCanvas * canvas, AmitkCanvasTargetAction action, AmitkPoint center, amide_real_t thickness) { g_return_if_fail(AMITK_IS_CANVAS(canvas)); canvas->next_target_action = action; canvas->next_target_center = center; canvas->next_target_thickness = thickness; canvas_add_update(canvas, UPDATE_TARGET); return; } void amitk_canvas_set_time_on_image(AmitkCanvas * canvas, gboolean time_on_image) { g_return_if_fail(AMITK_IS_CANVAS(canvas)); if (time_on_image != canvas->time_on_image) { canvas->time_on_image = time_on_image; canvas_add_update(canvas, UPDATE_TIME); } return; } gint amitk_canvas_get_width(AmitkCanvas * canvas) { g_return_val_if_fail(AMITK_IS_CANVAS(canvas), 0); return canvas->pixbuf_width + 2*canvas->border_width; } gint amitk_canvas_get_height(AmitkCanvas * canvas) { GtkRequisition size; gint height; g_return_val_if_fail(AMITK_IS_CANVAS(canvas), 0); height = canvas->pixbuf_height + 2*canvas->border_width; gtk_widget_size_request(canvas->label, &size); height+=size.height; gtk_widget_size_request(canvas->scrollbar, &size); height+=size.height; return height; } GdkPixbuf * amitk_canvas_get_pixbuf(AmitkCanvas * canvas) { GdkPixbuf * pixbuf; pixbuf = amitk_get_pixbuf_from_canvas(GNOME_CANVAS(canvas->canvas), canvas->border_width,canvas->border_width, canvas->pixbuf_width, canvas->pixbuf_height); return pixbuf; } amide-1.0.5/src/tb_profile.c0000664000175000017500000012276312270274026015543 0ustar loeningloening/* tb_profile.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include "amide.h" #include "amitk_study.h" #include "tb_profile.h" #include "ui_common.h" #ifdef AMIDE_LIBGSL_SUPPORT #include #endif #define CANVAS_WIDTH 400 #define CANVAS_HEIGHT 300 #define TEXT_HEIGHT 12.0 #define EDGE_SPACING 2.0 #define NUM_COLOR_ROTATIONS 6 guint32 color_rotation[NUM_COLOR_ROTATIONS] = { 0x00FFFFFF, 0xFFFF00FF, 0xFF00FFFF, 0xFF0000FF, 0x00FF00FF, 0x0000FFFF, }; /* data structures */ typedef struct tb_profile_t { GtkWidget * dialog; AmitkStudy * study; AmitkPreferences * preferences; GtkWidget * angle_spin; guint idle_handler_id; GtkWidget * canvas; GtkWidget * text; gdouble min_x, max_x; gdouble scale_x; GPtrArray * results; /* gaussian fit stuff */ GnomeCanvasItem * x_label[2]; gboolean calc_gaussian_fit; gdouble initial_x; gdouble x_limit[2]; gboolean fix_x; gboolean fix_dc_zero; GnomeCanvasItem * x_limit_item[2]; guint reference_count; } tb_profile_t; typedef struct result_t { gchar * name; GPtrArray * line; GnomeCanvasItem * line_item; amide_data_t min_y, max_y, peak_location; gdouble scale_y; GnomeCanvasItem * y_label[2]; GnomeCanvasItem * legend; /* gaussian fit stuff */ gdouble b_fit, b_err; gdouble p_fit, p_err; gdouble c_fit, c_err; gdouble s_fit, s_err; gint iterations; gint status; GnomeCanvasItem * fit_item; } result_t; static GPtrArray * results_free(GPtrArray * results); static tb_profile_t * profile_free(tb_profile_t * tb_profile); static tb_profile_t * profile_init(void); #ifdef AMIDE_LIBGSL_SUPPORT static gboolean canvas_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data); static void calc_gaussian_fit_cb(GtkWidget * button, gpointer data); static void fix_x_cb(GtkWidget * widget, gpointer data); static void fix_dc_zero_cb(GtkWidget * widget, gpointer data); static double calc_gaussian(double b, double p, double c, double s, double loc); static int gaussian_f(const gsl_vector * func_p, void *params, gsl_vector * f); static int gaussian_df (const gsl_vector * func_p, void *params, gsl_matrix * J); static int gaussian_fdf (const gsl_vector * func_p, void *params, gsl_vector * f, gsl_matrix * J); static void fit_gaussian(tb_profile_t * tb_profile); static void display_gaussian_fit(tb_profile_t * tb_profile); #endif static void export_profiles(tb_profile_t * tb_profile); static void save_profiles(const gchar * save_filename, tb_profile_t * tb_profile); static void recalc_profiles(tb_profile_t * tb_profile); static gboolean update_while_idle(gpointer data); static void response_cb (GtkDialog * dialog, gint response_id, gpointer data); static void destroy_cb(GtkObject * object, gpointer data); static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * delete_event, gpointer data); static void view_center_changed_cb(AmitkStudy * study, gpointer data); static void selections_changed_cb(AmitkObject * object, gpointer data); static void profile_changed_cb(AmitkLineProfile * line_profile, gpointer data); static void profile_switch_view_cb(GtkWidget * widget, gpointer data); static void profile_angle_cb(GtkWidget * widget, gpointer data); static void profile_update_entries(tb_profile_t * tb_profile); static GPtrArray * results_free(GPtrArray * results) { gint i; result_t * result; if (results == NULL) return NULL; for (i=0; i < results->len; i++) { result = g_ptr_array_index(results, i); g_ptr_array_free(result->line, TRUE); if (result->name != NULL) g_free(result->name); if (result->line_item != NULL) gtk_object_destroy(GTK_OBJECT(result->line_item)); if (result->y_label[0] != NULL) gtk_object_destroy(GTK_OBJECT(result->y_label[0])); if (result->y_label[1] != NULL) gtk_object_destroy(GTK_OBJECT(result->y_label[1])); if (result->legend != NULL) gtk_object_destroy(GTK_OBJECT(result->legend)); if (result->fit_item != NULL) gtk_object_destroy(GTK_OBJECT(result->fit_item)); } g_ptr_array_free(results, TRUE); return NULL; } static tb_profile_t * profile_free(tb_profile_t * tb_profile) { /* sanity checks */ g_return_val_if_fail(tb_profile != NULL, NULL); g_return_val_if_fail(tb_profile->reference_count > 0, NULL); /* remove a reference count */ tb_profile->reference_count--; /* things to do if we've removed all reference's */ if (tb_profile->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing tb_profile\n"); #endif if (tb_profile->study != NULL) { /* disconnect any signal handlers */ g_signal_handlers_disconnect_by_func(G_OBJECT(tb_profile->study), view_center_changed_cb, tb_profile); g_signal_handlers_disconnect_by_func(G_OBJECT(tb_profile->study), selections_changed_cb, tb_profile); g_signal_handlers_disconnect_by_func(G_OBJECT(AMITK_STUDY_LINE_PROFILE(tb_profile->study)), profile_changed_cb, tb_profile); amitk_object_unref(tb_profile->study); tb_profile->study = NULL; } if (tb_profile->preferences != NULL) { g_object_unref(tb_profile->preferences); tb_profile->preferences = NULL; } if (tb_profile->idle_handler_id != 0) { g_source_remove(tb_profile->idle_handler_id); tb_profile->idle_handler_id = 0; } if (tb_profile->results != NULL){ tb_profile->results = results_free(tb_profile->results); } g_free(tb_profile); tb_profile = NULL; } #ifdef AMIDE_DEBUG else { g_print("unrefering tb_profile\n"); } #endif return tb_profile; } static tb_profile_t * profile_init(void) { tb_profile_t * tb_profile; if ((tb_profile = g_try_new(tb_profile_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for tb_profile_t")); return NULL; } tb_profile->reference_count = 1; tb_profile->study = NULL; tb_profile->preferences = NULL; tb_profile->dialog = NULL; tb_profile->idle_handler_id = 0; tb_profile->results = NULL; tb_profile->x_label[0] = NULL; tb_profile->x_label[1] = NULL; tb_profile->calc_gaussian_fit = TRUE; tb_profile->initial_x = -1.0; tb_profile->fix_x = FALSE; tb_profile->fix_dc_zero=FALSE; tb_profile->x_limit_item[0] = NULL; tb_profile->x_limit_item[1] = NULL; return tb_profile; } static gchar * results_as_string(tb_profile_t * tb_profile) { gchar * results; result_t * result; AmitkLineProfileDataElement * element; gint i,j; time_t current_time; /* intro information */ time(¤t_time); results = g_strdup_printf(_("# Profiles on Study: %s\tGenerated on: %s"), AMITK_OBJECT_NAME(tb_profile->study), ctime(¤t_time)); for (i=0; i < tb_profile->results->len; i++) { result = g_ptr_array_index(tb_profile->results, i); amitk_append_str(&results, _("#\n# Profile on: %s\n"), result->name); #ifdef AMIDE_LIBGSL_SUPPORT if (tb_profile->calc_gaussian_fit) { amitk_append_str(&results, _("# Gaussian Fit: b + p * e^(-0.5*(x-c)^2/s^2)\n")); amitk_append_str(&results,_("#\titerations used %d, status %s\n"), result->iterations, gsl_strerror(result->status)); if (tb_profile->fix_dc_zero) amitk_append_str(&results,"#\tb = 0 %s\n",_("(fixed)")); else amitk_append_str(&results,"#\tb = %.5g +/- %.5g\n",result->b_fit, result->b_err); amitk_append_str(&results,"#\tp = %.5g +/- %.5g\n",result->p_fit, result->p_err); if (tb_profile->fix_x) amitk_append_str(&results,"#\tc = %.5g mm %s\n",result->c_fit,_("(fixed)")); else amitk_append_str(&results,"#\tc = %.5g +/- %.5g mm\n",result->c_fit, result->c_err); amitk_append_str(&results,"#\ts = %.5g +/- %.5g\n",result->s_fit, result->s_err); amitk_append_str(&results,"#\tfwhm = %.5g +/- %.5g mm\n", SIGMA_TO_FWHM*(result->s_fit), SIGMA_TO_FWHM*(result->s_err)); amitk_append_str(&results,"#\tfwtm = %.5g +/- %.5g mm\n", SIGMA_TO_FWTM*(result->s_fit), SIGMA_TO_FWTM*(result->s_err)); amitk_append_str(&results,"#\n"); } #endif amitk_append_str(&results,_("# x\tvalue\n")); for (j=0; jline->len; j++) { element = g_ptr_array_index(result->line, j); amitk_append_str(&results,"%g\t%g\n", element->location, element->value); } } return results; } /* function to save the generated profile */ static void export_profiles(tb_profile_t * tb_profile) { GtkWidget * file_chooser; gchar * temp_string; GList * data_sets; GList * temp_data_sets; gchar * filename; /* sanity checks */ g_return_if_fail(tb_profile != NULL); data_sets = amitk_object_get_selected_children_of_type(AMITK_OBJECT(tb_profile->study), AMITK_OBJECT_TYPE_DATA_SET, AMITK_SELECTION_ANY, TRUE); g_return_if_fail(data_sets != NULL); /* the rest of this function runs the file selection dialog box */ file_chooser = gtk_file_chooser_dialog_new(_("Export Profile"), GTK_WINDOW(tb_profile->dialog), /* parent window */ GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(tb_profile->preferences, file_chooser); /* set the default directory if applicable */ /* take a guess at the filename */ filename = g_strdup_printf("%s_profile_{%s", AMITK_OBJECT_NAME(tb_profile->study), AMITK_OBJECT_NAME(data_sets->data)); temp_data_sets = data_sets->next; while (temp_data_sets != NULL) { temp_string = g_strdup_printf("%s+%s",filename,AMITK_OBJECT_NAME(temp_data_sets->data)); g_free(filename); filename = temp_string; temp_data_sets = temp_data_sets->next; } temp_string = g_strdup_printf("%s}.tsv",filename); g_free(filename); filename = temp_string; amitk_objects_unref(data_sets); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(file_chooser), filename); g_free(filename); /* run the save dialog */ if (gtk_dialog_run(GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (file_chooser)); else filename = NULL; gtk_widget_destroy(file_chooser); if (filename != NULL) { /* allright, save the data */ save_profiles(filename, tb_profile); g_free(filename); } return; } static void save_profiles(const gchar * save_filename, tb_profile_t * tb_profile) { FILE * file_pointer; gchar * results; if ((file_pointer = fopen(save_filename, "w")) == NULL) { g_warning(_("couldn't open: %s for writing profiles"), save_filename); return; } results = results_as_string(tb_profile); fprintf(file_pointer, "%s", results); g_free(results); fclose(file_pointer); return; } #ifdef AMIDE_LIBGSL_SUPPORT static gboolean canvas_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { tb_profile_t * tb_profile = data; AmitkCanvasPoint canvas_cpoint; GnomeCanvas * canvas; gdouble x_point; gboolean find_new_initial = FALSE; AmitkLineProfileDataElement * element; gboolean initialized; gdouble peak_x=0.0; gdouble peak_y=0.0; int i,j; result_t * result; canvas = GNOME_CANVAS(widget); gnome_canvas_window_to_world(canvas, event->button.x, event->button.y, &canvas_cpoint.x, &canvas_cpoint.y); gnome_canvas_w2c_d(canvas, canvas_cpoint.x, canvas_cpoint.y, &canvas_cpoint.x, &canvas_cpoint.y); switch (event->type) { case GDK_BUTTON_RELEASE: x_point = ((canvas_cpoint.x-EDGE_SPACING)/tb_profile->scale_x)+tb_profile->min_x; switch (event->button.button) { case 1: if (x_point < tb_profile->x_limit[1]) tb_profile->x_limit[0] = x_point; find_new_initial = TRUE; break; case 3: if (x_point > tb_profile->x_limit[0]) tb_profile->x_limit[1] = x_point; find_new_initial = TRUE; break; case 2: default: tb_profile->initial_x = x_point; break; } /* find new peaks */ if (find_new_initial) { tb_profile->initial_x = -1.0; for (i=0; i < tb_profile->results->len; i++) { result = g_ptr_array_index(tb_profile->results, i); g_return_val_if_fail(result != NULL, FALSE); initialized = FALSE; for (j=0; jline->len; j++) { element = g_ptr_array_index(result->line, j); if ((element->location >= tb_profile->x_limit[0]) && (element->location <= tb_profile->x_limit[1])) { if ((!initialized) || (peak_y < element->value)) { peak_x = element->location; peak_y = element->value; initialized = TRUE; } } } if (initialized) result->peak_location = peak_x; } } /* redisplay */ if (tb_profile->calc_gaussian_fit) display_gaussian_fit(tb_profile); break; default: break; } return FALSE; } static void calc_gaussian_fit_cb(GtkWidget * widget, gpointer data) { tb_profile_t * tb_profile = data; tb_profile->calc_gaussian_fit = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); if (tb_profile->calc_gaussian_fit) display_gaussian_fit(tb_profile); else recalc_profiles(tb_profile); /* removes old gaussian fit */ return; } static void fix_x_cb(GtkWidget * widget, gpointer data) { tb_profile_t * tb_profile = data; tb_profile->fix_x = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); if (tb_profile->calc_gaussian_fit) display_gaussian_fit(tb_profile); return; } static void fix_dc_zero_cb(GtkWidget * widget, gpointer data) { tb_profile_t * tb_profile = data; tb_profile->fix_dc_zero = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); if (tb_profile->calc_gaussian_fit) display_gaussian_fit(tb_profile); return; } static double calc_gaussian(double s, double p, double c, double b, double loc) { double diff; diff = loc-c; return b + p * (exp(-0.5*diff*diff/(s*s))); } typedef struct params_t { GPtrArray * line; gboolean fix_x; gdouble x; gboolean fix_dc_zero; gdouble x_limit[2]; } params_t; static int gaussian_f(const gsl_vector * func_p, void * data, gsl_vector * f) { params_t * params = data; double b; double p; double c; double s; gint i; AmitkLineProfileDataElement * element; /* get the parameters */ i = 0; s = gsl_vector_get(func_p, i++); p = gsl_vector_get(func_p, i++); if (params->fix_x) c = params->x; else c = gsl_vector_get(func_p, i++); if (params->fix_dc_zero) b = 0.0; else b = gsl_vector_get(func_p, i++); for (i = 0; i < params->line->len; i++) { element = g_ptr_array_index(params->line, i); if ((element->location > params->x_limit[0]) && (element->location < params->x_limit[1])) gsl_vector_set(f, i, calc_gaussian(s,p,c,b,element->location) - element->value); else gsl_vector_set(f, i, 0.0); } return GSL_SUCCESS; } static int gaussian_df (const gsl_vector * func_p, void *data, gsl_matrix * J) { params_t * params = data; double p; double c; double s; gint i,j; AmitkLineProfileDataElement * element; double diff; double inner; /* get the parameters */ i = 0; s = gsl_vector_get(func_p, i++); p = gsl_vector_get(func_p, i++); if (params->fix_x) c = params->x; else c = gsl_vector_get(func_p, i++); for (i = 0; i < params->line->len; i++) { element = g_ptr_array_index(params->line, i); diff = element->location-c; inner = exp(-0.5*(diff)*(diff)/(s*s)); j = 0; if ((element->location > params->x_limit[0]) && (element->location < params->x_limit[1])) { gsl_matrix_set (J, i, j++, p*inner*diff*diff/(s*s*s)); gsl_matrix_set (J, i, j++, inner); if (!params->fix_x) gsl_matrix_set (J, i, j++, p*inner*diff/(s*s)); if (!params->fix_dc_zero) gsl_matrix_set (J, i, j++, 1); } else { gsl_matrix_set (J, i, j++, 0.0); gsl_matrix_set (J, i, j++, 0.0); if (!params->fix_x) gsl_matrix_set (J, i, j++, 0.0); if (!params->fix_dc_zero) gsl_matrix_set (J, i, j++, 0.0); } } return GSL_SUCCESS; } static int gaussian_fdf (const gsl_vector * func_p, void *params, gsl_vector * f, gsl_matrix * J) { gaussian_f (func_p, params, f); gaussian_df (func_p, params, J); return GSL_SUCCESS; } /* we're fitting the following function b + p * exp(-0.5 * ((x-c)/s)^2) */ static void fit_gaussian(tb_profile_t * tb_profile) { gint i,j; result_t * result; gsl_multifit_fdfsolver * solver; gsl_matrix *covar; gsl_multifit_function_fdf fdf; gsl_vector * init_p; gint iter; gint status; gint num_p; params_t params; gdouble initial_x; num_p = 2; if (!tb_profile->fix_x) num_p++; if (!tb_profile->fix_dc_zero) num_p++; covar = gsl_matrix_alloc (num_p, num_p); g_return_if_fail(covar != NULL); init_p = gsl_vector_alloc(num_p); fdf.f = &gaussian_f; fdf.df = &gaussian_df; fdf.fdf = &gaussian_fdf; fdf.p = num_p; /* fit each profile */ for (i=0; i < tb_profile->results->len; i++) { result = g_ptr_array_index(tb_profile->results, i); g_return_if_fail(result != NULL); /* figure out where we'd like to start along x*/ initial_x = (tb_profile->initial_x >= 0.0) ? tb_profile->initial_x : result->peak_location; /* initialize parameters */ j=0; gsl_vector_set(init_p, j++, 1.0); /* s - sigma argument, proportional to width */ gsl_vector_set(init_p, j++, result->max_y); /* peak val */ if (!tb_profile->fix_x) gsl_vector_set(init_p, j++, initial_x); /* x offset val */ if (!tb_profile->fix_dc_zero) gsl_vector_set(init_p, j++, result->min_y); /* b - DC val */ /* alloc the solver */ solver = gsl_multifit_fdfsolver_alloc (gsl_multifit_fdfsolver_lmder,result->line->len, num_p); g_return_if_fail(solver != NULL); /* assign the data we're fitting */ params.line = result->line; params.fix_x = tb_profile->fix_x; params.x = initial_x; params.x_limit[0] = tb_profile->x_limit[0]; params.x_limit[1] = tb_profile->x_limit[1]; params.fix_dc_zero = tb_profile->fix_dc_zero; fdf.params = ¶ms; fdf.n = result->line->len; gsl_multifit_fdfsolver_set (solver, &fdf, init_p); /* and iterate */ iter = 0; do { iter++; status = gsl_multifit_fdfsolver_iterate (solver); if (status) break; status = gsl_multifit_test_delta (solver->dx, solver->x, 1e-4, 1e-4); } while ((status == GSL_CONTINUE) && (iter < 100)); gsl_multifit_covar (solver->J, 0.0, covar); j=0; result->s_fit = gsl_vector_get(solver->x, j++); result->p_fit = gsl_vector_get(solver->x, j++); if (tb_profile->fix_x) result->c_fit = initial_x; else result->c_fit = gsl_vector_get(solver->x, j++); if (tb_profile->fix_dc_zero) result->b_fit = 0.0; else result->b_fit = gsl_vector_get(solver->x, j++); j=0; result->s_err = sqrt(gsl_matrix_get(covar,j,j)); j++; result->p_err = sqrt(gsl_matrix_get(covar,j,j)); j++; if (tb_profile->fix_x) result->c_err = 0.0; else { result->c_err = sqrt(gsl_matrix_get(covar,j,j)); j++; } if (tb_profile->fix_dc_zero) result->b_err = 0.0; else { result->b_err = sqrt(gsl_matrix_get(covar,j,j)); j++; } result->iterations = iter; result->status = status; /* cleanup */ gsl_multifit_fdfsolver_free(solver); } gsl_matrix_free(covar); gsl_vector_free(init_p); return; } static void display_gaussian_fit(tb_profile_t * tb_profile) { gint i, j; GtkTextBuffer *buffer; GtkTextIter start_iter, end_iter; gchar * results_str; gdouble value; GnomeCanvasPoints * points; div_t x; guint color; result_t * result; double loc; /* perform gaussian fits */ fit_gaussian(tb_profile); /* make the x limit lines */ if (tb_profile->x_limit_item[0] != NULL) gtk_object_destroy(GTK_OBJECT(tb_profile->x_limit_item[0])); if (tb_profile->x_limit_item[1] != NULL) gtk_object_destroy(GTK_OBJECT(tb_profile->x_limit_item[1])); points = gnome_canvas_points_new(2); points->coords[0] = points->coords[2] = tb_profile->scale_x*(tb_profile->x_limit[0]-tb_profile->min_x)+EDGE_SPACING; points->coords[1] = EDGE_SPACING+CANVAS_HEIGHT/4.0; points->coords[3] = 3*CANVAS_HEIGHT/4.0+EDGE_SPACING; tb_profile->x_limit_item[0] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_profile->canvas)), gnome_canvas_line_get_type(), "points", points, "fill_color", "white", #ifndef AMIDE_LIBGNOMECANVAS_AA "line_style", GDK_LINE_ON_OFF_DASH, #endif "width_units", 1.0, NULL); gnome_canvas_points_unref(points); points = gnome_canvas_points_new(2); points->coords[0] = points->coords[2] = tb_profile->scale_x*(tb_profile->x_limit[1]-tb_profile->min_x)+EDGE_SPACING; points->coords[1] = EDGE_SPACING+CANVAS_HEIGHT/4.0; points->coords[3] = 3*CANVAS_HEIGHT/4.0+EDGE_SPACING; tb_profile->x_limit_item[1] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_profile->canvas)), gnome_canvas_line_get_type(), "points", points, "fill_color", "white", #ifndef AMIDE_LIBGNOMECANVAS_AA "line_style", GDK_LINE_ON_OFF_DASH, #endif "width_units", 1.0, NULL); gnome_canvas_points_unref(points); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (tb_profile->text)); /* delete any text in the buffer */ gtk_text_buffer_get_start_iter(buffer, &start_iter); gtk_text_buffer_get_end_iter(buffer, &end_iter); gtk_text_buffer_delete(buffer, &start_iter, &end_iter); /* write out the gaussian equation */ gtk_text_buffer_set_text (buffer, _("fit = b + p * e^(-0.5*(x-c)^2/s^2)"), -1); for (i=0; i < tb_profile->results->len; i++) { result = g_ptr_array_index(tb_profile->results, i); points = gnome_canvas_points_new(CANVAS_WIDTH); for (j=0; jscale_x)+tb_profile->min_x; value = calc_gaussian(result->s_fit, result->p_fit, result->c_fit,result->b_fit, loc); points->coords[2*j+0] = (gdouble) j; points->coords[2*j+1] = CANVAS_HEIGHT-EDGE_SPACING-result->scale_y*(value-result->min_y); } /* figure out the color we'll use */ x = div(i, NUM_COLOR_ROTATIONS); if (tb_profile->results->len < 2) { color = 0xFFFFFFFF; } else { color = color_rotation[x.rem]; } /* make sure it's destroyed */ if (result->fit_item != NULL) gtk_object_destroy(GTK_OBJECT(result->fit_item)); /* and (re)create it */ result->fit_item = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_profile->canvas)), gnome_canvas_line_get_type(), "points", points, "fill_color_rgba", color, #ifndef AMIDE_LIBGNOMECANVAS_AA "line_style", GDK_LINE_ON_OFF_DASH, #endif "width_units", 1.0, NULL); gnome_canvas_points_unref(points); results_str = g_strdup_printf(_("\n\ngaussian fit on: %s\n" "iterations used %d, status %s\n" "b = %.5g +/- %.5g %s\n" "p = %.5g +/- %.5g\n" "c = %.5g +/- %.5g mm %s\n" "s = %.5g +/- %.5g\n" "fwhm = %.5g +/- %.5g mm\n" "fwtm = %.5g +/- %.5g mm"), result->name, result->iterations, gsl_strerror (result->status), result->b_fit, result->b_err, tb_profile->fix_dc_zero ? _("(fixed)"): "", result->p_fit, result->p_err, result->c_fit, result->c_err, tb_profile->fix_x ? _("(fixed)") : "", result->s_fit, result->s_err, SIGMA_TO_FWHM*(result->s_fit), SIGMA_TO_FWHM*(result->s_err), SIGMA_TO_FWTM*(result->s_fit), SIGMA_TO_FWTM*(result->s_err)); gtk_text_buffer_insert_at_cursor(buffer, results_str, -1); g_free(results_str); } return; } #endif static void recalc_profiles(tb_profile_t * tb_profile) { profile_update_entries(tb_profile); if (tb_profile->idle_handler_id == 0) tb_profile->idle_handler_id = g_idle_add_full(G_PRIORITY_HIGH_IDLE,update_while_idle, tb_profile, NULL); return; } static gboolean update_while_idle(gpointer data) { tb_profile_t * tb_profile = data; gboolean initialized=FALSE; GList * data_sets; GList * temp_data_sets; GPtrArray * one_line; gint i,j; AmitkLineProfileDataElement * element; GnomeCanvasPoints * points; result_t * result; div_t x; gchar * label; ui_common_place_cursor(UI_CURSOR_WAIT, tb_profile->canvas); data_sets = amitk_object_get_selected_children_of_type(AMITK_OBJECT(tb_profile->study), AMITK_OBJECT_TYPE_DATA_SET, AMITK_SELECTION_ANY, TRUE); /* discard the old results... this also erases them from canvas */ tb_profile->results = results_free(tb_profile->results); tb_profile->results = g_ptr_array_new(); /* recalc profiles */ tb_profile->max_x = tb_profile->min_x = 0.0; temp_data_sets = data_sets; while (temp_data_sets != NULL) { amitk_data_set_get_line_profile(AMITK_DATA_SET(temp_data_sets->data), AMITK_STUDY_VIEW_START_TIME(tb_profile->study), AMITK_STUDY_VIEW_DURATION(tb_profile->study), AMITK_LINE_PROFILE_START_POINT(AMITK_STUDY_LINE_PROFILE(tb_profile->study)), AMITK_LINE_PROFILE_END_POINT(AMITK_STUDY_LINE_PROFILE(tb_profile->study)), &one_line); if (one_line->len > 1) { /* need at least two points for a valid line */ result = g_malloc(sizeof(result_t)); g_return_val_if_fail(result != NULL, FALSE); result->name = g_strdup(AMITK_OBJECT_NAME(temp_data_sets->data)); result->line_item = NULL; result->y_label[0] = NULL; result->y_label[1] = NULL; result->legend = NULL; result->line = one_line; result->fit_item = NULL; /* get max/min y values */ /* get max/min values */ element = g_ptr_array_index(one_line, 0); result->max_y = result->min_y = element->value; result->peak_location = element->location; if (!initialized) { tb_profile->min_x = tb_profile->max_x = element->location; initialized = TRUE; } for (j=0; jlen; j++) { element = g_ptr_array_index(one_line, j); if (element->location < tb_profile->min_x) tb_profile->min_x = element->location; if (element->location > tb_profile->max_x) tb_profile->max_x = element->location; if (element->value < result->min_y) result->min_y = element->value; if (element->value > result->max_y) { result->max_y = element->value; result->peak_location = element->location; } } g_ptr_array_add(tb_profile->results, result); } else g_ptr_array_free(one_line, TRUE); temp_data_sets = temp_data_sets->next; } label = g_strdup_printf("%g", tb_profile->min_x); if (tb_profile->x_label[0] != NULL) { gnome_canvas_item_set(tb_profile->x_label[0], "text", label, NULL); } else { tb_profile->x_label[0] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_profile->canvas)), gnome_canvas_text_get_type(), "anchor", GTK_ANCHOR_SOUTH_WEST, "text", label, "x", (gdouble) EDGE_SPACING+5.0, "y", (gdouble) CANVAS_HEIGHT-EDGE_SPACING, "fill_color", "white", "font_desc", amitk_fixed_font_desc, NULL); } g_free(label); label = g_strdup_printf("%g", tb_profile->max_x); if (tb_profile->x_label[1] != NULL) { gnome_canvas_item_set(tb_profile->x_label[1], "text", label, NULL); } else { tb_profile->x_label[1] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_profile->canvas)), gnome_canvas_text_get_type(), "anchor", GTK_ANCHOR_SOUTH_EAST, "text", label, "x", (gdouble) CANVAS_WIDTH-EDGE_SPACING, "y", (gdouble) CANVAS_HEIGHT-EDGE_SPACING, "fill_color", "white", "font_desc", amitk_fixed_font_desc, NULL); } g_free(label); tb_profile->scale_x = (CANVAS_WIDTH-2*EDGE_SPACING)/(tb_profile->max_x-tb_profile->min_x); /* generate new lines */ for (i=0; i < tb_profile->results->len; i++) { result = g_ptr_array_index(tb_profile->results, i); points = gnome_canvas_points_new(result->line->len); result->scale_y = (CANVAS_HEIGHT-2*EDGE_SPACING)/(result->max_y-result->min_y); for (j=0; jline->len; j++) { element = g_ptr_array_index(result->line, j); points->coords[2*j+0] = tb_profile->scale_x*(element->location-tb_profile->min_x)+EDGE_SPACING; points->coords[2*j+1] = CANVAS_HEIGHT-EDGE_SPACING-result->scale_y*(element->value-result->min_y); } x = div(i, NUM_COLOR_ROTATIONS); result->line_item = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_profile->canvas)), gnome_canvas_line_get_type(), "points", points, "fill_color_rgba", color_rotation[x.rem], "width_units", 1.0, NULL); gnome_canvas_points_unref(points); label = g_strdup_printf("%g", result->min_y); result->y_label[0] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_profile->canvas)), gnome_canvas_text_get_type(), "anchor", GTK_ANCHOR_SOUTH_WEST, "text", label, "x", (gdouble) EDGE_SPACING, "y", (gdouble) CANVAS_HEIGHT-EDGE_SPACING-TEXT_HEIGHT-(tb_profile->results->len-i-1)*TEXT_HEIGHT, "fill_color_rgba", color_rotation[x.rem], "font_desc", amitk_fixed_font_desc, NULL); g_free(label); label = g_strdup_printf("%g", result->max_y); result->y_label[1] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_profile->canvas)), gnome_canvas_text_get_type(), "anchor", GTK_ANCHOR_NORTH_WEST, "text", label, "x", (gdouble) EDGE_SPACING, "y", (gdouble) EDGE_SPACING+i*TEXT_HEIGHT, "fill_color_rgba", color_rotation[x.rem], "font_desc", amitk_fixed_font_desc, NULL); g_free(label); result->legend = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_profile->canvas)), gnome_canvas_text_get_type(), "anchor", GTK_ANCHOR_NORTH_EAST, "text", result->name, "x", (gdouble) CANVAS_WIDTH-EDGE_SPACING, "y", (gdouble) EDGE_SPACING+i*TEXT_HEIGHT, "fill_color_rgba", color_rotation[x.rem], "font_desc", amitk_fixed_font_desc, NULL); tb_profile->initial_x = -1.0; tb_profile->x_limit[0] = tb_profile->min_x; tb_profile->x_limit[1] = tb_profile->max_x; #ifdef AMIDE_LIBGSL_SUPPORT if (tb_profile->calc_gaussian_fit) display_gaussian_fit(tb_profile); #endif } /* and we're done */ ui_common_remove_wait_cursor(tb_profile->canvas); data_sets = amitk_objects_unref(data_sets); tb_profile->idle_handler_id=0; return FALSE; } static void response_cb (GtkDialog * dialog, gint response_id, gpointer data) { tb_profile_t * tb_profile = data; gint return_val; GtkClipboard * clipboard; gchar * results; switch(response_id) { case AMITK_RESPONSE_SAVE_AS: export_profiles(tb_profile); break; case AMITK_RESPONSE_COPY: results = results_as_string(tb_profile); /* fill in select/button2 clipboard (X11) */ clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); gtk_clipboard_set_text(clipboard, results, -1); /* fill in copy/paste clipboard (Win32 and Gnome) */ clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); gtk_clipboard_set_text(clipboard, results, -1); g_free(results); break; case GTK_RESPONSE_HELP: amide_call_help("profile-dialog"); break; case GTK_RESPONSE_CLOSE: g_signal_emit_by_name(G_OBJECT(dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(dialog)); break; default: break; } return; } static void destroy_cb(GtkObject * object, gpointer data) { tb_profile_t * tb_profile = data; /* make the line profile invisible */ amitk_line_profile_set_visible(AMITK_STUDY_LINE_PROFILE(tb_profile->study), FALSE); /* free the associated data structure */ tb_profile = profile_free(tb_profile); } /* function called to destroy the dialog */ static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { return FALSE; } static void view_center_changed_cb(AmitkStudy * study, gpointer data) { tb_profile_t * tb_profile=data; recalc_profiles(tb_profile); return; } /* somewhat wasteful... as we update the profiles if any object changes selection, not just data sets... but this greatly simplifies bookkeeping */ static void selections_changed_cb(AmitkObject * object, gpointer data) { tb_profile_t * tb_profile=data; recalc_profiles(tb_profile); return; } static void profile_changed_cb(AmitkLineProfile * line_profile, gpointer data) { tb_profile_t * tb_profile=data; recalc_profiles(tb_profile); return; } static void profile_switch_view_cb(GtkWidget * widget, gpointer data) { tb_profile_t * tb_profile=data; AmitkView view; view = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "view")); amitk_line_profile_set_view(AMITK_STUDY_LINE_PROFILE(tb_profile->study), view); return; } static void profile_angle_cb(GtkWidget * widget, gpointer data) { gdouble temp_val; tb_profile_t * tb_profile = data; temp_val = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); temp_val *= M_PI/180.0; /* convert to radians */ amitk_line_profile_set_angle(AMITK_STUDY_LINE_PROFILE(tb_profile->study), temp_val); profile_update_entries(tb_profile); return; } static void profile_update_entries(tb_profile_t * tb_profile) { amide_real_t angle; g_signal_handlers_block_by_func(G_OBJECT(tb_profile->angle_spin), G_CALLBACK(profile_angle_cb), tb_profile); angle = AMITK_LINE_PROFILE_ANGLE(AMITK_STUDY_LINE_PROFILE(tb_profile->study)); angle *= 180.0/M_PI; gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_profile->angle_spin),angle); g_signal_handlers_unblock_by_func(G_OBJECT(tb_profile->angle_spin), G_CALLBACK(profile_angle_cb), tb_profile); return; } void tb_profile(AmitkStudy * study, AmitkPreferences * preferences, GtkWindow * parent) { GtkWidget * dialog; gchar * title; GtkWidget * table; gint table_row; tb_profile_t * tb_profile; AmitkView i_view; GtkWidget * radio_button[3]; GtkWidget * hbox; GtkWidget * label; #ifdef AMIDE_LIBGSL_SUPPORT GtkWidget * check_button; GdkColor color; #endif tb_profile = profile_init(); tb_profile->study = g_object_ref(study); tb_profile->preferences = g_object_ref(preferences); /* make the line profile visible */ amitk_line_profile_set_visible(AMITK_STUDY_LINE_PROFILE(tb_profile->study), TRUE); /* start setting up the widget we'll display the info from */ title = g_strdup_printf(_("%s Profile Tool: Study %s"), PACKAGE, AMITK_OBJECT_NAME(tb_profile->study)); dialog = gtk_dialog_new_with_buttons(title, GTK_WINDOW(parent), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_SAVE_AS, AMITK_RESPONSE_SAVE_AS, GTK_STOCK_COPY, AMITK_RESPONSE_COPY, GTK_STOCK_HELP, GTK_RESPONSE_HELP, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); g_free(title); gtk_window_set_resizable(GTK_WINDOW(dialog), TRUE); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(response_cb), tb_profile); g_signal_connect(G_OBJECT(dialog), "delete_event", G_CALLBACK(delete_event_cb), tb_profile); g_signal_connect(G_OBJECT(dialog), "destroy", G_CALLBACK(destroy_cb), tb_profile); /* setup the callbacks for detecting if the line profile has changed */ g_signal_connect(G_OBJECT(tb_profile->study), "view_center_changed", G_CALLBACK(view_center_changed_cb), tb_profile); g_signal_connect(G_OBJECT(tb_profile->study), "object_child_selection_changed", G_CALLBACK(selections_changed_cb), tb_profile); g_signal_connect(G_OBJECT(AMITK_STUDY_LINE_PROFILE(tb_profile->study)), "line_profile_changed", G_CALLBACK(profile_changed_cb), tb_profile); /* make the widgets for this dialog box */ table = gtk_table_new(5,3,FALSE); table_row=0; gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table); gtk_widget_show(table); /* which view do we want the profile on */ label = gtk_label_new(_("Line Profile on:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(table), hbox,1,3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hbox); /* the radio buttons */ for (i_view=0; i_view < AMITK_VIEW_NUM; i_view++) { if (i_view == 0) radio_button[i_view] = gtk_radio_button_new_with_label(NULL,amitk_view_get_name(i_view)); else radio_button[i_view] = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button[0]), amitk_view_get_name(i_view)); gtk_box_pack_start(GTK_BOX(hbox), radio_button[i_view], FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button[i_view]), "view", GINT_TO_POINTER(i_view)); gtk_widget_show(radio_button[i_view]); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[AMITK_LINE_PROFILE_VIEW(AMITK_STUDY_LINE_PROFILE(tb_profile->study))]), TRUE); for (i_view=0; i_view < AMITK_VIEW_NUM; i_view++) g_signal_connect(G_OBJECT(radio_button[i_view]), "clicked", G_CALLBACK(profile_switch_view_cb), tb_profile); table_row++; /* changing the angle */ label = gtk_label_new(_("Angle (degrees):")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); tb_profile->angle_spin = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_profile->angle_spin), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tb_profile->angle_spin),3); g_signal_connect(G_OBJECT(tb_profile->angle_spin), "value_changed", G_CALLBACK(profile_angle_cb), tb_profile); gtk_table_attach(GTK_TABLE(table),tb_profile->angle_spin,1,3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(tb_profile->angle_spin); table_row++; /* the canvas */ #ifdef AMIDE_LIBGNOMECANVAS_AA tb_profile->canvas = gnome_canvas_new_aa(); #else tb_profile->canvas = gnome_canvas_new(); #endif gtk_table_attach(GTK_TABLE(table), tb_profile->canvas, 0, 3, table_row, table_row+1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); #ifdef AMIDE_LIBGSL_SUPPORT g_signal_connect(G_OBJECT(tb_profile->canvas), "event", G_CALLBACK(canvas_event_cb), tb_profile); #endif gtk_widget_set_size_request(tb_profile->canvas, CANVAS_WIDTH+1, CANVAS_HEIGHT+1); gnome_canvas_set_scroll_region(GNOME_CANVAS(tb_profile->canvas), 0.0, 0.0, CANVAS_WIDTH, CANVAS_HEIGHT); gtk_widget_show(tb_profile->canvas); table_row++; /* draw a black background on the canvas */ gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_profile->canvas)), gnome_canvas_rect_get_type(), "x1",0.0, "y1", 0.0, "x2", (gdouble) CANVAS_WIDTH, "y2", (gdouble) CANVAS_HEIGHT, "fill_color_rgba", 0x000000FF, NULL); /* the fit results */ #ifdef AMIDE_LIBGSL_SUPPORT check_button = gtk_check_button_new_with_label (_("calculate gaussian fit")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button), tb_profile->calc_gaussian_fit); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(calc_gaussian_fit_cb), tb_profile); gtk_table_attach(GTK_TABLE(table), check_button,0,3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(check_button); table_row++; check_button = gtk_check_button_new_with_label (_("fix x location (c)")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button), tb_profile->fix_x); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(fix_x_cb), tb_profile); gtk_table_attach(GTK_TABLE(table), check_button,0,3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(check_button); table_row++; check_button = gtk_check_button_new_with_label (_("fix dc value to zero (b)")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button), tb_profile->fix_dc_zero); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(fix_dc_zero_cb), tb_profile); gtk_table_attach(GTK_TABLE(table), check_button,0,3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(check_button); table_row++; tb_profile->text = gtk_text_view_new (); gtk_table_attach(GTK_TABLE(table), tb_profile->text, 0, 3, table_row, table_row+1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); gtk_widget_modify_font (tb_profile->text, amitk_fixed_font_desc); gtk_text_view_set_editable(GTK_TEXT_VIEW(tb_profile->text), FALSE); gtk_widget_show(tb_profile->text); table_row++; /* set it to black */ gdk_color_parse ("black", &color); gtk_widget_modify_base(tb_profile->text, GTK_STATE_NORMAL, &color); gdk_color_parse ("white", &color); gtk_widget_modify_text (tb_profile->text, GTK_STATE_NORMAL, &color); #endif /* and show all our widgets */ gtk_widget_show(dialog); /* and make sure they have the right stuff in them */ recalc_profiles(tb_profile); return; } amide-1.0.5/src/amitk_space_edit.h0000664000175000017500000000401412270274547016704 0ustar loeningloening/* amitk_space_edit.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_SPACE_EDIT_H__ #define __AMITK_SPACE_EDIT_H__ /* includes we always need with this widget */ #include #include "amitk_object.h" G_BEGIN_DECLS #define AMITK_TYPE_SPACE_EDIT (amitk_space_edit_get_type ()) #define AMITK_SPACE_EDIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AMITK_TYPE_SPACE_EDIT, AmitkSpaceEdit)) #define AMITK_SPACE_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_SPACE_EDIT, AmitkSpaceEditClass)) #define AMITK_IS_SPACE_EDIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AMITK_TYPE_SPACE_EDIT)) #define AMITK_IS_SPACE_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_SPACE_EDIT)) typedef struct _AmitkSpaceEdit AmitkSpaceEdit; typedef struct _AmitkSpaceEditClass AmitkSpaceEditClass; struct _AmitkSpaceEdit { GtkVBox vbox; GtkWidget * entry[AMITK_AXIS_NUM][AMITK_AXIS_NUM]; AmitkObject * object; }; struct _AmitkSpaceEditClass { GtkVBoxClass parent_class; }; GType amitk_space_edit_get_type (void); GtkWidget* amitk_space_edit_new (AmitkObject * object); G_END_DECLS #endif /* __AMITK_SPACE_EDIT_H__ */ amide-1.0.5/src/ui_preferences_dialog.c0000664000175000017500000005242412270274034017726 0ustar loeningloening/* ui_preferences_dialog.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amide.h" #include "ui_study.h" #include "ui_preferences_dialog.h" #include "amitk_canvas.h" #include "amitk_color_table_menu.h" #include "amitk_threshold.h" #include "amitk_window_edit.h" #include "ui_common.h" static gchar * study_preference_text = N_("These preferences are used only for new studies. \n" "Use the study modification dialog to change these \n" "parameters for the current study."); static gchar * data_set_preference_text = N_("These preferences are used only for new data sets. \n" "Use the data set modification dialog to change these \n" "parameters for the current data set."); static void update_roi_sample_item(ui_study_t * ui_study); static void roi_width_cb(GtkWidget * widget, gpointer data); #ifdef AMIDE_LIBGNOMECANVAS_AA static void roi_transparency_cb(GtkWidget * widget, gpointer data); #else static void line_style_cb(GtkWidget * widget, gpointer data); static void fill_roi_cb(GtkWidget * widget, gpointer data); #endif static void layout_cb(GtkWidget * widget, gpointer data); static void panel_layout_cb(GtkWidget * widget, gpointer data); static void maintain_size_cb(GtkWidget * widget, gpointer data); static void target_empty_area_cb(GtkWidget * widget, gpointer data); static void threshold_style_cb(GtkWidget * widget, gpointer data); static void warnings_to_console_cb(GtkWidget * widget, gpointer data); static void save_on_exit_cb(GtkWidget * widget, gpointer data); static void which_default_directory_cb(GtkWidget * widget, gpointer data); static void default_directory_cb(GtkWidget * fc, gpointer data); static void response_cb (GtkDialog * dialog, gint response_id, gpointer data); static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer preferences); /* function called to update the roi sampe item */ static void update_roi_sample_item(ui_study_t * ui_study) { GnomeCanvasItem * roi_item; roi_item = g_object_get_data(G_OBJECT(ui_study->preferences->dialog), "roi_item"); ui_common_update_sample_roi_item(roi_item, AMITK_PREFERENCES_CANVAS_ROI_WIDTH(ui_study->preferences), #ifdef AMIDE_LIBGNOMECANVAS_AA AMITK_PREFERENCES_CANVAS_ROI_TRANSPARENCY(ui_study->preferences) #else AMITK_PREFERENCES_CANVAS_LINE_STYLE(ui_study->preferences) #endif ); return; } /* function called when the roi width has been changed */ static void roi_width_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; gint new_roi_width; g_return_if_fail(ui_study->study != NULL); new_roi_width = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget)); amitk_preferences_set_canvas_roi_width(ui_study->preferences, new_roi_width); update_roi_sample_item(ui_study); return; } #ifdef AMIDE_LIBGNOMECANVAS_AA /* function to change the roi internal transparency */ static void roi_transparency_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study=data; gdouble new_transparency; g_return_if_fail(ui_study->study != NULL); new_transparency = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); amitk_preferences_set_canvas_roi_transparency(ui_study->preferences, new_transparency); update_roi_sample_item(ui_study); return; } #else /* function to change the line style */ static void line_style_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study=data; GdkLineStyle new_line_style; GnomeCanvasItem * roi_item; g_return_if_fail(ui_study->study != NULL); /* figure out which menu item called me */ new_line_style = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); amitk_preferences_set_canvas_line_style(ui_study->preferences, new_line_style); update_roi_sample_item(ui_study); return; } static void fill_roi_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; amitk_preferences_set_canvas_fill_roi(ui_study->preferences, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); return; } #endif /* function called to change the layout */ static void layout_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; amitk_preferences_set_canvas_layout(ui_study->preferences, GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "layout"))); return; } /* function called to change the panel layout */ static void panel_layout_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; amitk_preferences_set_panel_layout(ui_study->preferences, GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "panel_layout"))); return; } static void maintain_size_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; amitk_preferences_set_canvas_maintain_size(ui_study->preferences, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); return; } /* function called when the roi width has been changed */ static void target_empty_area_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; amitk_preferences_set_canvas_target_empty_area(ui_study->preferences, gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget))); return; } static void threshold_style_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; amitk_preferences_set_threshold_style(ui_study->preferences, GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "threshold_style"))); return; } static void warnings_to_console_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; amitk_preferences_set_warnings_to_console(ui_study->preferences, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); return; } static void save_on_exit_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; amitk_preferences_set_prompt_for_save_on_exit(ui_study->preferences, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); return; } static void which_default_directory_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; amitk_preferences_set_which_default_directory(ui_study->preferences, gtk_combo_box_get_active(GTK_COMBO_BOX(widget))); return; } static void default_directory_cb(GtkWidget * fc, gpointer data) { ui_study_t * ui_study = data; gchar * str; str = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(fc)); amitk_preferences_set_default_directory(ui_study->preferences, str); g_free(str); return; } /* changing the color table of a rendering context */ static void color_table_cb(GtkWidget * widget, gpointer data) { ui_study_t * ui_study=data; AmitkModality modality; AmitkColorTable color_table; modality = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "modality")); color_table = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); amitk_preferences_set_color_table(ui_study->preferences, modality, color_table); return; } static void response_cb (GtkDialog * dialog, gint response_id, gpointer data) { gint return_val; switch(response_id) { case GTK_RESPONSE_HELP: amide_call_help("preferences-dialog"); break; case GTK_RESPONSE_CLOSE: g_signal_emit_by_name(G_OBJECT(dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(dialog)); break; default: break; } return; } /* function called to destroy the preferences dialog */ gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { AmitkPreferences * preferences = data; amitk_preferences_set_dialog(preferences, NULL); return FALSE; } /* function that sets up the preferences dialog */ void ui_preferences_dialog_create(ui_study_t * ui_study) { GtkWidget * dialog; gchar * temp_string = NULL; GtkWidget * packing_table; GtkWidget * label; GtkWidget * check_button; GtkWidget * notebook; guint table_row; GtkWidget * maintain_size_button; GtkWidget * roi_width_spin; GtkWidget * target_size_spin; #ifdef AMIDE_LIBGNOMECANVAS_AA GtkWidget * roi_transparency_spin; #else GtkWidget * line_style_menu; GtkWidget * fill_roi_button; #endif GtkWidget * layout_button1; GtkWidget * layout_button2; GtkWidget * panel_layout_button1; GtkWidget * panel_layout_button2; GtkWidget * panel_layout_button3; GtkWidget * hseparator; GtkWidget * menu; GtkWidget * windows_widget; GtkWidget * scrolled; GtkWidget * entry; AmitkModality i_modality; AmitkWhichDefaultDirectory i_which_default_directory; GnomeCanvasItem * roi_item; AmitkThresholdStyle i_threshold_style; GtkWidget * style_buttons[AMITK_THRESHOLD_STYLE_NUM]; GtkWidget * hbox; /* sanity checks */ g_return_if_fail(ui_study != NULL); g_return_if_fail(ui_study->preferences != NULL); /* only have one preference dialog */ if (AMITK_PREFERENCES_DIALOG(ui_study->preferences) != NULL) { g_warning("A Preferences Dialog is already open"); return; } temp_string = g_strdup_printf(_("%s: Preferences Dialog"), PACKAGE); dialog = gtk_dialog_new_with_buttons (temp_string, ui_study->window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_HELP, GTK_RESPONSE_HELP, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); gtk_window_set_title(GTK_WINDOW(dialog), temp_string); g_free(temp_string); amitk_preferences_set_dialog(ui_study->preferences, dialog); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(response_cb), ui_study); g_signal_connect(G_OBJECT(dialog), "delete_event", G_CALLBACK(delete_event_cb), ui_study->preferences); notebook = gtk_notebook_new(); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), notebook); /* --------------------------- ROI/Canvas page --------------------------- */ /* start making the widgets for this dialog box */ packing_table = gtk_table_new(4,5,FALSE); label = gtk_label_new(_("ROI/View Preferences")); table_row=0; gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); /* warn that these preferences are only for new stuff */ label = gtk_label_new(study_preference_text); gtk_table_attach(GTK_TABLE(packing_table), label, 0,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); table_row++; hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 0, 3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; ui_common_study_preferences_widgets(packing_table, table_row, &roi_width_spin, &roi_item, #ifdef AMIDE_LIBGNOMECANVAS_AA &roi_transparency_spin, #else &line_style_menu, &fill_roi_button, #endif &layout_button1, &layout_button2, &panel_layout_button1,&panel_layout_button2,&panel_layout_button3, &maintain_size_button, &target_size_spin); gtk_spin_button_set_value(GTK_SPIN_BUTTON(roi_width_spin), AMITK_PREFERENCES_CANVAS_ROI_WIDTH(ui_study->preferences)); g_signal_connect(G_OBJECT(roi_width_spin), "value_changed", G_CALLBACK(roi_width_cb), ui_study); /* update the sample roi display */ g_object_set_data(G_OBJECT(dialog), "roi_item", roi_item); update_roi_sample_item(ui_study); #ifdef AMIDE_LIBGNOMECANVAS_AA gtk_spin_button_set_value(GTK_SPIN_BUTTON(roi_transparency_spin), AMITK_PREFERENCES_CANVAS_ROI_TRANSPARENCY(ui_study->preferences)); g_signal_connect(G_OBJECT(roi_transparency_spin), "value_changed", G_CALLBACK(roi_transparency_cb), ui_study); #else gtk_combo_box_set_active(GTK_COMBO_BOX(line_style_menu), AMITK_PREFERENCES_CANVAS_LINE_STYLE(ui_study->preferences)); g_signal_connect(G_OBJECT(line_style_menu), "changed", G_CALLBACK(line_style_cb), ui_study); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fill_roi_button), AMITK_PREFERENCES_CANVAS_FILL_ROI(ui_study->preferences)); g_signal_connect(G_OBJECT(fill_roi_button), "toggled", G_CALLBACK(fill_roi_cb), ui_study); #endif gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(layout_button1), (AMITK_PREFERENCES_CANVAS_LAYOUT(ui_study->preferences) == AMITK_LAYOUT_LINEAR)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(layout_button2), (AMITK_PREFERENCES_CANVAS_LAYOUT(ui_study->preferences) == AMITK_LAYOUT_ORTHOGONAL)); g_signal_connect(G_OBJECT(layout_button1), "clicked", G_CALLBACK(layout_cb), ui_study); g_signal_connect(G_OBJECT(layout_button2), "clicked", G_CALLBACK(layout_cb), ui_study); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(panel_layout_button1), (AMITK_PREFERENCES_PANEL_LAYOUT(ui_study->preferences) == AMITK_PANEL_LAYOUT_MIXED)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(panel_layout_button2), (AMITK_PREFERENCES_PANEL_LAYOUT(ui_study->preferences) == AMITK_PANEL_LAYOUT_LINEAR_X)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(panel_layout_button3), (AMITK_PREFERENCES_PANEL_LAYOUT(ui_study->preferences) == AMITK_PANEL_LAYOUT_LINEAR_Y)); g_signal_connect(G_OBJECT(panel_layout_button1), "clicked", G_CALLBACK(panel_layout_cb), ui_study); g_signal_connect(G_OBJECT(panel_layout_button2), "clicked", G_CALLBACK(panel_layout_cb), ui_study); g_signal_connect(G_OBJECT(panel_layout_button3), "clicked", G_CALLBACK(panel_layout_cb), ui_study); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(maintain_size_button), AMITK_PREFERENCES_CANVAS_MAINTAIN_SIZE(ui_study->preferences)); g_signal_connect(G_OBJECT(maintain_size_button), "toggled", G_CALLBACK(maintain_size_cb), ui_study); gtk_spin_button_set_value(GTK_SPIN_BUTTON(target_size_spin), AMITK_PREFERENCES_CANVAS_TARGET_EMPTY_AREA(ui_study->preferences)); g_signal_connect(G_OBJECT(target_size_spin), "value_changed", G_CALLBACK(target_empty_area_cb), ui_study); gtk_widget_show_all(packing_table); /* ---------------------- Threshold Windows ---------------------- */ packing_table = gtk_table_new(4,2,FALSE); label = gtk_label_new(_("Thresholding")); table_row=0; gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); /* warn that these preferences are only for new stuff */ label = gtk_label_new(data_set_preference_text); gtk_table_attach(GTK_TABLE(packing_table), label, 0,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); table_row++; hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 0, 3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hseparator); table_row++; /* threshold type selection */ label = gtk_label_new(_("Threshold Style")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); hbox = gtk_hbox_new(FALSE, 0); amitk_threshold_style_widgets(style_buttons, hbox); gtk_table_attach(GTK_TABLE(packing_table), hbox, 1,2, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(style_buttons[AMITK_PREFERENCES_THRESHOLD_STYLE(ui_study->preferences)]), TRUE); for (i_threshold_style = 0; i_threshold_style < AMITK_THRESHOLD_STYLE_NUM; i_threshold_style++) g_signal_connect(G_OBJECT(style_buttons[i_threshold_style]), "clicked", G_CALLBACK(threshold_style_cb), ui_study); gtk_widget_show(hbox); table_row++; /* draw the window widgets */ scrolled = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); windows_widget = amitk_window_edit_new(NULL, ui_study->preferences); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), windows_widget); gtk_widget_show(windows_widget); gtk_table_attach(GTK_TABLE(packing_table), scrolled, 0,2, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, GTK_FILL|GTK_EXPAND, X_PADDING, Y_PADDING); gtk_widget_show(scrolled); gtk_widget_show(packing_table); /* ---------------------- Default color tables ---------------------- */ packing_table = gtk_table_new(4,2,FALSE); label = gtk_label_new(_("Default Color Tables")); table_row=0; gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); for (i_modality=0; i_modality < AMITK_MODALITY_NUM; i_modality++) { /* color table selector */ temp_string = g_strdup_printf(_("default %s color table:"), amitk_modality_get_name(i_modality)); label = gtk_label_new(temp_string); g_free(temp_string); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); menu = amitk_color_table_menu_new(); gtk_table_attach(GTK_TABLE(packing_table), menu, 1,2, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_combo_box_set_active(GTK_COMBO_BOX(menu), AMITK_PREFERENCES_COLOR_TABLE(ui_study->preferences, i_modality)); g_object_set_data(G_OBJECT(menu), "modality", GINT_TO_POINTER(i_modality)); g_signal_connect(G_OBJECT(menu), "changed", G_CALLBACK(color_table_cb), ui_study); gtk_widget_show(menu); table_row++; } gtk_widget_show_all(packing_table); /* --------------------------- Miscellaneous stuff --------------------------- */ /* start making the widgets for this dialog box */ packing_table = gtk_table_new(4,5,FALSE); label = gtk_label_new(_("Miscellaneous")); table_row=0; gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); label = gtk_label_new(_("Send Warning Messages to Console:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); check_button = gtk_check_button_new(); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button), AMITK_PREFERENCES_WARNINGS_TO_CONSOLE(ui_study->preferences)); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(warnings_to_console_cb), ui_study); gtk_table_attach(GTK_TABLE(packing_table), check_button, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("Prompt for \"Save Changes\" on Exit:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); check_button = gtk_check_button_new(); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button), AMITK_PREFERENCES_PROMPT_FOR_SAVE_ON_EXIT(ui_study->preferences)); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(save_on_exit_cb), ui_study); gtk_table_attach(GTK_TABLE(packing_table), check_button, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("Which Default Directory:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); menu = gtk_combo_box_new_text(); for (i_which_default_directory=0; i_which_default_directory < AMITK_WHICH_DEFAULT_DIRECTORY_NUM; i_which_default_directory++) gtk_combo_box_append_text(GTK_COMBO_BOX(menu), amitk_which_default_directory_names[i_which_default_directory]); gtk_combo_box_set_active(GTK_COMBO_BOX(menu), AMITK_PREFERENCES_WHICH_DEFAULT_DIRECTORY(ui_study->preferences)); g_signal_connect(G_OBJECT(menu), "changed", G_CALLBACK(which_default_directory_cb), ui_study); gtk_table_attach(GTK_TABLE(packing_table), menu, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("Specified Directory:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); entry = gtk_file_chooser_button_new(_("Default Directory:"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); amitk_preferences_set_file_chooser_directory(ui_study->preferences, entry); /* set the default directory if applicable */ g_signal_connect(G_OBJECT(entry), "current-folder-changed", G_CALLBACK(default_directory_cb), ui_study); gtk_table_attach(GTK_TABLE(packing_table), entry, 1,2, table_row, table_row+1, GTK_FILL|GTK_EXPAND, 0, X_PADDING, Y_PADDING); /* make sure what's being shown in the above widget is consistent with what we have, this only comes up if we've never set a default directory before */ if (AMITK_PREFERENCES_DEFAULT_DIRECTORY(ui_study->preferences) == NULL) default_directory_cb(entry, ui_study); table_row++; gtk_widget_show_all(packing_table); /* and show all our widgets */ gtk_widget_show(notebook); gtk_widget_show(dialog); return; } amide-1.0.5/src/amitk_dial.c0000664000175000017500000003617011614352647015517 0ustar loeningloening/* amitk_dial.c, adapated from gtkdial.c */ /* GTK - The GIMP Toolkit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include #include #include "amitk_dial.h" #define SCROLL_DELAY_LENGTH 300 #define DIAL_DEFAULT_SIZE 100 /* Forward declarations */ static void amitk_dial_class_init (AmitkDialClass *klass); static void amitk_dial_init (AmitkDial *dial); static void amitk_dial_destroy (GtkObject *object); static void amitk_dial_realize (GtkWidget *widget); static void amitk_dial_size_request (GtkWidget *widget, GtkRequisition *requisition); static void amitk_dial_size_allocate (GtkWidget *widget, GtkAllocation *allocation); static gint amitk_dial_expose (GtkWidget *widget, GdkEventExpose *event); static gint amitk_dial_button_press (GtkWidget *widget, GdkEventButton *event); static gint amitk_dial_button_release (GtkWidget *widget, GdkEventButton *event); static gint amitk_dial_motion_notify (GtkWidget *widget, GdkEventMotion *event); static gint amitk_dial_timer (AmitkDial *dial); static void amitk_dial_update_mouse (AmitkDial *dial, gint x, gint y); static void amitk_dial_update (AmitkDial *dial); static void amitk_dial_adjustment_changed (GtkAdjustment *adjustment, gpointer data); static void amitk_dial_adjustment_value_changed (GtkAdjustment *adjustment, gpointer data); /* Local data */ static GtkWidgetClass *parent_class = NULL; GType amitk_dial_get_type () { static GType dial_type = 0; if (!dial_type) { static const GTypeInfo dial_info = { sizeof (AmitkDialClass), NULL, NULL, (GClassInitFunc) amitk_dial_class_init, NULL, NULL, sizeof (AmitkDial), 0, (GInstanceInitFunc) amitk_dial_init, }; dial_type = g_type_register_static (GTK_TYPE_WIDGET, "AmitkDial", &dial_info, 0); } return dial_type; } static void amitk_dial_class_init (AmitkDialClass *class) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; object_class = (GtkObjectClass*) class; widget_class = (GtkWidgetClass*) class; parent_class = g_type_class_peek_parent (class); object_class->destroy = amitk_dial_destroy; widget_class->realize = amitk_dial_realize; widget_class->expose_event = amitk_dial_expose; widget_class->size_request = amitk_dial_size_request; widget_class->size_allocate = amitk_dial_size_allocate; widget_class->button_press_event = amitk_dial_button_press; widget_class->button_release_event = amitk_dial_button_release; widget_class->motion_notify_event = amitk_dial_motion_notify; } static void amitk_dial_init (AmitkDial *dial) { dial->button = 0; dial->policy = GTK_UPDATE_CONTINUOUS; dial->timer = 0; dial->radius = 0; dial->pointer_width = 0; dial->angle = 0.0; dial->old_value = 0.0; dial->old_lower = 0.0; dial->old_upper = 0.0; dial->adjustment = NULL; } GtkWidget* amitk_dial_new (GtkAdjustment *adjustment) { AmitkDial *dial; dial = g_object_new (amitk_dial_get_type (), NULL); if (!adjustment) adjustment = (GtkAdjustment*) gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0); amitk_dial_set_adjustment (dial, adjustment); return GTK_WIDGET (dial); } static void amitk_dial_destroy (GtkObject *object) { AmitkDial *dial; g_return_if_fail (object != NULL); g_return_if_fail (AMITK_IS_DIAL (object)); dial = AMITK_DIAL (object); if (dial->adjustment) { g_object_unref (G_OBJECT (dial->adjustment)); dial->adjustment = NULL; } (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } GtkAdjustment* amitk_dial_get_adjustment (AmitkDial *dial) { g_return_val_if_fail (dial != NULL, NULL); g_return_val_if_fail (AMITK_IS_DIAL (dial), NULL); return dial->adjustment; } void amitk_dial_set_update_policy (AmitkDial *dial, GtkUpdateType policy) { g_return_if_fail (dial != NULL); g_return_if_fail (AMITK_IS_DIAL (dial)); dial->policy = policy; } void amitk_dial_set_adjustment (AmitkDial *dial, GtkAdjustment *adjustment) { g_return_if_fail (dial != NULL); g_return_if_fail (AMITK_IS_DIAL (dial)); if (dial->adjustment) { g_signal_handlers_disconnect_by_func (G_OBJECT (dial->adjustment), NULL, (gpointer) dial); g_object_unref (G_OBJECT (dial->adjustment)); } dial->adjustment = adjustment; g_object_ref (G_OBJECT (dial->adjustment)); g_signal_connect (G_OBJECT (adjustment), "changed", G_CALLBACK (amitk_dial_adjustment_changed), (gpointer) dial); g_signal_connect (G_OBJECT (adjustment), "value_changed", G_CALLBACK (amitk_dial_adjustment_value_changed), (gpointer) dial); dial->old_value = adjustment->value; dial->old_lower = adjustment->lower; dial->old_upper = adjustment->upper; amitk_dial_update (dial); } static void amitk_dial_realize (GtkWidget *widget) { /* AmitkDial *dial; */ GdkWindowAttr attributes; gint attributes_mask; g_return_if_fail (widget != NULL); g_return_if_fail (AMITK_IS_DIAL (widget)); GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); /* dial = AMITK_DIAL (widget); */ attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = widget->allocation.width; attributes.height = widget->allocation.height; attributes.wclass = GDK_INPUT_OUTPUT; attributes.window_type = GDK_WINDOW_CHILD; attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; widget->window = gdk_window_new (widget->parent->window, &attributes, attributes_mask); widget->style = gtk_style_attach (widget->style, widget->window); gdk_window_set_user_data (widget->window, widget); gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); } static void amitk_dial_size_request (GtkWidget *widget, GtkRequisition *requisition) { requisition->width = DIAL_DEFAULT_SIZE; requisition->height = DIAL_DEFAULT_SIZE; } static void amitk_dial_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { AmitkDial *dial; g_return_if_fail (widget != NULL); g_return_if_fail (AMITK_IS_DIAL (widget)); g_return_if_fail (allocation != NULL); widget->allocation = *allocation; dial = AMITK_DIAL (widget); if (GTK_WIDGET_REALIZED (widget)) { gdk_window_move_resize (widget->window, allocation->x, allocation->y, allocation->width, allocation->height); } dial->radius = MIN (allocation->width, allocation->height) * 0.45; dial->pointer_width = dial->radius / 2; } static gint amitk_dial_expose (GtkWidget *widget, GdkEventExpose *event) { AmitkDial *dial; GdkPoint points[6]; gdouble s,c; gint xc, yc; /* gint upper, lower; */ g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (AMITK_IS_DIAL (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); if (event->count > 0) return FALSE; dial = AMITK_DIAL (widget); /* gdk_window_clear_area (widget->window, 0, 0, widget->allocation.width, widget->allocation.height); */ xc = widget->allocation.width / 2; yc = widget->allocation.height / 2; /* upper = dial->adjustment->upper; */ /* lower = dial->adjustment->lower; */ /* draw circle */ gdk_draw_arc(widget->window, widget->style->fg_gc[widget->state], FALSE, xc - dial->radius, yc - dial->radius, 2*dial->radius, 2*dial->radius, 0, 23040); /* draw circle */ gdk_draw_arc(widget->window, widget->style->fg_gc[widget->state], FALSE, xc - 0.90*dial->radius, yc - 0.90*dial->radius, 1.8*dial->radius, 1.8*dial->radius, 0, 23040); /* Draw pointer */ s = sin (dial->angle); c = cos (dial->angle); dial->last_angle = dial->angle; points[0].x = xc + 0.9*s*dial->pointer_width/2; points[0].y = yc + 0.9*c*dial->pointer_width/2; points[1].x = xc + 0.9*c*dial->radius; points[1].y = yc - 0.9*s*dial->radius; points[2].x = xc - 0.9*s*dial->pointer_width/2; points[2].y = yc - 0.9*c*dial->pointer_width/2; points[3].x = xc - 0.9*c*dial->radius/10; points[3].y = yc + 0.9*s*dial->radius/10; points[4].x = points[0].x; points[4].y = points[0].y; gtk_paint_polygon (widget->style, widget->window, GTK_STATE_ACTIVE, GTK_SHADOW_IN, NULL, widget, NULL, points, 5, TRUE); return FALSE; } static gint amitk_dial_button_press (GtkWidget *widget, GdkEventButton *event) { AmitkDial *dial; gint dx, dy; double s, c; double d_parallel; double d_perpendicular; g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (AMITK_IS_DIAL (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); dial = AMITK_DIAL (widget); /* Determine if button press was within pointer region - we do this by computing the parallel and perpendicular distance of the point where the mouse was pressed from the line passing through the pointer */ dx = event->x - widget->allocation.width / 2; dy = widget->allocation.height / 2 - event->y; s = sin (dial->angle); c = cos (dial->angle); d_parallel = s*dy + c*dx; d_perpendicular = fabs (s*dx - c*dy); if (!dial->button && (d_perpendicular < dial->pointer_width/2) && (d_parallel > - dial->pointer_width)) { gtk_grab_add (widget); dial->button = event->button; amitk_dial_update_mouse (dial, event->x, event->y); } return FALSE; } static gint amitk_dial_button_release (GtkWidget *widget, GdkEventButton *event) { AmitkDial *dial; g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (AMITK_IS_DIAL (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); dial = AMITK_DIAL (widget); if (dial->button == event->button) { gtk_grab_remove (widget); dial->button = 0; if (dial->policy == GTK_UPDATE_DELAYED) g_source_remove (dial->timer); if ((dial->policy != GTK_UPDATE_CONTINUOUS) && (dial->old_value != dial->adjustment->value)) g_signal_emit_by_name (G_OBJECT (dial->adjustment), "value_changed"); } return FALSE; } static gint amitk_dial_motion_notify (GtkWidget *widget, GdkEventMotion *event) { AmitkDial *dial; GdkModifierType mods; gint x, y, mask; g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (AMITK_IS_DIAL (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); dial = AMITK_DIAL (widget); if (dial->button != 0) { x = event->x; y = event->y; if (event->is_hint || (event->window != widget->window)) gdk_window_get_pointer (widget->window, &x, &y, &mods); switch (dial->button) { case 1: mask = GDK_BUTTON1_MASK; break; case 2: mask = GDK_BUTTON2_MASK; break; case 3: mask = GDK_BUTTON3_MASK; break; default: mask = 0; break; } if (mods & mask) amitk_dial_update_mouse (dial, x,y); } return FALSE; } static gint amitk_dial_timer (AmitkDial *dial) { g_return_val_if_fail (dial != NULL, FALSE); g_return_val_if_fail (AMITK_IS_DIAL (dial), FALSE); if (dial->policy == GTK_UPDATE_DELAYED) g_signal_emit_by_name (G_OBJECT (dial->adjustment), "value_changed"); return FALSE; } static void amitk_dial_update_mouse (AmitkDial *dial, gint x, gint y) { gint xc, yc; gfloat old_value; g_return_if_fail (dial != NULL); g_return_if_fail (AMITK_IS_DIAL (dial)); xc = GTK_WIDGET(dial)->allocation.width / 2; yc = GTK_WIDGET(dial)->allocation.height / 2; old_value = dial->adjustment->value; dial->angle = atan2(yc-y, x-xc); if (dial->angle < M_PI/2.0) dial->angle += 2*M_PI; if (dial->angle > 4*M_PI/3.0) dial->angle -= 2*M_PI; dial->adjustment->value = dial->adjustment->upper - (dial->angle+M_PI/2.0)* (dial->adjustment->upper - dial->adjustment->lower) / (2*M_PI); if (dial->adjustment->value != old_value) { if (dial->policy == GTK_UPDATE_CONTINUOUS) { g_signal_emit_by_name (G_OBJECT (dial->adjustment), "value_changed"); } else { gtk_widget_queue_draw (GTK_WIDGET (dial)); if (dial->policy == GTK_UPDATE_DELAYED) { if (dial->timer) g_source_remove (dial->timer); dial->timer = g_timeout_add (SCROLL_DELAY_LENGTH, (GtkFunction) amitk_dial_timer, (gpointer) dial); } } } } static void amitk_dial_update (AmitkDial *dial) { gfloat new_value; g_return_if_fail (dial != NULL); g_return_if_fail (AMITK_IS_DIAL (dial)); new_value = dial->adjustment->value; if (new_value < dial->adjustment->lower) new_value = dial->adjustment->lower; if (new_value > dial->adjustment->upper) new_value = dial->adjustment->upper; if (new_value != dial->adjustment->value) { dial->adjustment->value = new_value; g_signal_emit_by_name (G_OBJECT (dial->adjustment), "value_changed"); } dial->angle = -M_PI/2.0 + 2.0*M_PI * (new_value - dial->adjustment->lower) / (dial->adjustment->upper - dial->adjustment->lower); gtk_widget_queue_draw (GTK_WIDGET (dial)); } static void amitk_dial_adjustment_changed (GtkAdjustment *adjustment, gpointer data) { AmitkDial *dial; g_return_if_fail (adjustment != NULL); g_return_if_fail (data != NULL); dial = AMITK_DIAL (data); if ((dial->old_value != adjustment->value) || (dial->old_lower != adjustment->lower) || (dial->old_upper != adjustment->upper)) { amitk_dial_update (dial); dial->old_value = adjustment->value; dial->old_lower = adjustment->lower; dial->old_upper = adjustment->upper; } } static void amitk_dial_adjustment_value_changed (GtkAdjustment *adjustment, gpointer data) { AmitkDial *dial; g_return_if_fail (adjustment != NULL); g_return_if_fail (data != NULL); dial = AMITK_DIAL (data); if (dial->old_value != adjustment->value) { amitk_dial_update (dial); dial->old_value = adjustment->value; } } amide-1.0.5/src/ui_time_dialog.h0000644000175000017500000000211312270274461016360 0ustar loeningloening/* ui_time_dialog.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* header files always needed with this */ #include "amitk_study.h" /* external functions */ void ui_time_dialog_set_times(GtkWidget * time_dialog); GtkWidget * ui_time_dialog_create(AmitkStudy * study, GtkWindow * parent); amide-1.0.5/src/ui_render_dialog.h0000644000175000017500000000221612270274471016706 0ustar loeningloening/* ui_render_dialog.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef AMIDE_LIBVOLPACK_SUPPORT /* header files that are always needed with this file */ #include "ui_render.h" /* external functions */ void ui_render_dialog_create_parameters(ui_render_t * ui_render); void ui_render_dialog_create_transfer_function(ui_render_t * ui_render); #endif amide-1.0.5/src/amitk_canvas.h0000664000175000017500000001140012270274577016057 0ustar loeningloening/* amitk_canvas.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_CANVAS_H__ #define __AMITK_CANVAS_H__ /* includes we always need with this widget */ //#include //#include //#include #include "amitk_study.h" G_BEGIN_DECLS #define AMITK_TYPE_CANVAS (amitk_canvas_get_type ()) #define AMITK_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AMITK_TYPE_CANVAS, AmitkCanvas)) #define AMITK_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_CANVAS, AmitkCanvasClass)) #define AMITK_IS_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AMITK_TYPE_CANVAS)) #define AMITK_IS_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_CANVAS)) #define AMITK_CANVAS_VIEW(obj) (AMITK_CANVAS(obj)->view) #define AMITK_CANVAS_VIEW_MODE(obj) (AMITK_CANVAS(obj)->view_mode) typedef enum { AMITK_CANVAS_TYPE_NORMAL, AMITK_CANVAS_TYPE_FLY_THROUGH } AmitkCanvasType; typedef enum { AMITK_CANVAS_TARGET_ACTION_HIDE, AMITK_CANVAS_TARGET_ACTION_SHOW, AMITK_CANVAS_TARGET_ACTION_LEAVE } AmitkCanvasTargetAction; typedef struct _AmitkCanvas AmitkCanvas; typedef struct _AmitkCanvasClass AmitkCanvasClass; struct _AmitkCanvas { GtkVBox vbox; GtkWidget * canvas; GtkWidget * label; GtkWidget * scrollbar; GtkObject * scrollbar_adjustment; GnomeCanvasItem * arrows[4]; GnomeCanvasItem * orientation_label[4]; AmitkCanvasType type; AmitkVolume * volume; /* the volume that this canvas slice displays */ AmitkPoint center; /* in base coordinate space */ AmitkView view; AmitkViewMode view_mode; gint roi_width; AmitkObject * active_object; GList * slices; GList * slice_cache; gint max_slice_cache_size; gint pixbuf_width, pixbuf_height; gdouble border_width; GnomeCanvasItem * image; GdkPixbuf * pixbuf; gboolean time_on_image; GnomeCanvasItem * time_label; AmitkStudy * study; GList * undrawn_rois; GList * object_items; guint next_update; guint idle_handler_id; GList * next_update_objects; /* profile stuff */ GnomeCanvasItem * line_profile_item; /* target stuff */ GnomeCanvasItem * target[8]; AmitkCanvasTargetAction next_target_action; AmitkPoint next_target_center; amide_real_t next_target_thickness; }; struct _AmitkCanvasClass { GtkVBoxClass parent_class; void (* help_event) (AmitkCanvas *Canvas, AmitkHelpInfo which_help, AmitkPoint *position, amide_data_t value); void (* view_changing) (AmitkCanvas *Canvas, AmitkPoint *position, amide_real_t thickness); void (* view_changed) (AmitkCanvas *Canvas, AmitkPoint *position, amide_real_t thickness); void (* erase_volume) (AmitkCanvas *Canvas, AmitkRoi *roi, gboolean outside); void (* new_object) (AmitkCanvas *Canvas, AmitkObject * parent, AmitkObjectType type, AmitkPoint *position); }; GType amitk_canvas_get_type (void); GtkWidget * amitk_canvas_new (AmitkStudy * study, AmitkView view, AmitkViewMode view_mode, AmitkCanvasType type); void amitk_canvas_set_study (AmitkCanvas * canvas, AmitkStudy * study); void amitk_canvas_set_active_object (AmitkCanvas * canvas, AmitkObject * active_object); void amitk_canvas_update_target (AmitkCanvas * canvas, AmitkCanvasTargetAction action, AmitkPoint center, amide_real_t thickness); void amitk_canvas_set_time_on_image (AmitkCanvas * canvas, gboolean time_on_image); gint amitk_canvas_get_width (AmitkCanvas * canvas); gint amitk_canvas_get_height (AmitkCanvas * canvas); GdkPixbuf * amitk_canvas_get_pixbuf (AmitkCanvas * canvas); G_END_DECLS #endif /* __AMITK_CANVAS_H__ */ amide-1.0.5/src/ui_render.c0000644000175000017500000011462312270306573015367 0ustar loeningloening/* ui_render.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #ifdef AMIDE_LIBVOLPACK_SUPPORT #include #include "amide_gconf.h" #include "image.h" #include "ui_common.h" #include "ui_render.h" #include "ui_render_dialog.h" #include "ui_render_movie.h" #include "amitk_dial.h" #include "amitk_progress_dialog.h" #include "amitk_tree_view.h" #include "amitk_common.h" #define UPDATE_NONE 0 #define UPDATE_RENDERING 0x1 static gboolean canvas_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data); static void stereoscopic_cb(GtkRadioAction * action, GtkRadioAction * current, gpointer data); static void change_zoom_cb(GtkWidget * widget, gpointer data); static void rotate_cb(GtkAdjustment * adjustment, gpointer data); static void reset_axis_pressed_cb(GtkWidget * widget, gpointer data); static void export_cb(GtkAction * action, gpointer data); static void parameters_cb(GtkAction * action, gpointer data); static void transfer_function_cb(GtkAction * action, gpointer data); #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) static void movie_cb(GtkAction * action, gpointer data); #endif static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data); static void close_cb(GtkAction * action, gpointer data); static void read_render_preferences(gboolean * strip_highs, gboolean * optimize_renderings, gboolean * initially_no_gradient_opacity); static ui_render_t * ui_render_init(GtkWindow * window, GtkWidget *window_vbox, AmitkStudy * study, GList * selected_objects, AmitkPreferences * preferences); static ui_render_t * ui_render_free(ui_render_t * ui_render); /* function called when the canvas is hit */ /* function called when an event occurs on the image canvas, notes: -events for non-new roi's are handled by ui_study_rois_cb_roi_event */ static gboolean canvas_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { ui_render_t * ui_render = data; GnomeCanvas * canvas; AmitkPoint temp_point; AmitkCanvasPoint temp_cpoint1, temp_cpoint2; AmitkCanvasPoint canvas_cpoint, diff_cpoint; GnomeCanvasPoints * line_points; guint i, j,k; rgba_t color; gdouble dim; static AmitkPoint prev_theta; static AmitkPoint theta; static AmitkCanvasPoint initial_cpoint, center_cpoint; static gboolean dragging = FALSE; static GnomeCanvasItem * rotation_box[8]; static AmitkPoint box_point[8]; canvas = GNOME_CANVAS(widget); /* get the location of the event, and convert it to the canvas coordinates */ gnome_canvas_window_to_world(canvas, event->button.x, event->button.y, &canvas_cpoint.x, &canvas_cpoint.y); gnome_canvas_w2c_d(canvas, canvas_cpoint.x, canvas_cpoint.y, &canvas_cpoint.x, &canvas_cpoint.y); dim = MIN(ui_render->pixbuf_width, ui_render->pixbuf_height); temp_point.x = temp_point.y = temp_point.z = -dim/2.0; amitk_space_set_offset(ui_render->box_space, temp_point); // amitk_space_set_axes(ui_render->box_space, base_axes, AMITK_SPACE_OFFSET(ui_render->box_space)); amitk_space_set_axes(ui_render->box_space, base_axes, AMITK_SPACE_OFFSET(ui_render->box_space)); /* switch on the event which called this */ switch (event->type) { case GDK_ENTER_NOTIFY: ui_common_place_cursor(UI_CURSOR_DATA_SET_MODE, GTK_WIDGET(canvas)); break; case GDK_LEAVE_NOTIFY: ui_common_place_cursor(UI_CURSOR_DEFAULT, GTK_WIDGET(canvas)); break; case GDK_BUTTON_PRESS: if ((event->button.button == 1) || (event->button.button == 2)) { dragging = TRUE; initial_cpoint = canvas_cpoint; center_cpoint.x = center_cpoint.y = dim/2.0; prev_theta = zero_point; /* figure out the eight vertices */ for (i=0; i<8; i++) { box_point[i].x = (i & 0x1) ? BOX_OFFSET * dim : (1-BOX_OFFSET) * dim; box_point[i].y = (i & 0x2) ? BOX_OFFSET * dim : (1-BOX_OFFSET) * dim; box_point[i].z = (i & 0x4) ? BOX_OFFSET * dim : (1-BOX_OFFSET) * dim; } /* draw the 8 lines we use to represent out cube */ for (i=0; i<8; i++) { line_points = gnome_canvas_points_new(2); if ((i < 4) && (i & 0x1)){ /* i < 4, evens */ j = (i & 0x2) ? i -2 : i -1; k = (i & 0x2) ? i : i +1; } else if (i < 4) { /* i < 4, odds */ j = i; k = j+1; } else { /* i > 4 */ j = i; k = j-4; } line_points->coords[0] = box_point[j].x; /* x1 */ line_points->coords[1] = box_point[j].y; /* y1 */ line_points->coords[2] = box_point[k].x; /* x2 */ line_points->coords[3] = box_point[k].y; /* y2 */ color = amitk_color_table_outline_color(ui_render->renderings->rendering->color_table, TRUE); rotation_box[i] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(ui_render->canvas)), gnome_canvas_line_get_type(), "points", line_points, "fill_color_rgba", amitk_color_table_rgba_to_uint32(color), "width_units", 1.0, NULL); gnome_canvas_points_unref(line_points); } /* translate the 8 vertices back to the base frame */ for (i=0; i<8; i++) box_point[i] = amitk_space_s2b(ui_render->box_space, box_point[i]); if (event->button.button == 1) gnome_canvas_item_grab(GNOME_CANVAS_ITEM(rotation_box[0]), GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, ui_common_cursor[UI_CURSOR_RENDERING_ROTATE_XY], event->button.time); else /* button 2 */ gnome_canvas_item_grab(GNOME_CANVAS_ITEM(rotation_box[0]), GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, ui_common_cursor[UI_CURSOR_RENDERING_ROTATE_Z], event->button.time); } break; case GDK_MOTION_NOTIFY: if (dragging && (event->motion.state & (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK))) { if (event->motion.state & GDK_BUTTON1_MASK) { diff_cpoint = canvas_point_sub(initial_cpoint, canvas_cpoint); theta.y = M_PI * diff_cpoint.x / dim; theta.x = M_PI * -diff_cpoint.y / dim; /* rotate the axis */ amitk_space_rotate_on_vector(ui_render->box_space, amitk_space_get_axis(ui_render->box_space, AMITK_AXIS_X), theta.x, zero_point); amitk_space_rotate_on_vector(ui_render->box_space, amitk_space_get_axis(ui_render->box_space, AMITK_AXIS_Y), theta.y, zero_point); renderings_set_rotation(ui_render->renderings, AMITK_AXIS_Y, prev_theta.y); renderings_set_rotation(ui_render->renderings, AMITK_AXIS_X, -prev_theta.x); renderings_set_rotation(ui_render->renderings, AMITK_AXIS_X, theta.x); renderings_set_rotation(ui_render->renderings, AMITK_AXIS_Y, -theta.y); } else {/* button 2 */ temp_cpoint1 = canvas_point_sub(initial_cpoint,center_cpoint); temp_cpoint2 = canvas_point_sub(canvas_cpoint,center_cpoint); /* figure out theta.z */ theta.z = acos(canvas_point_dot_product(temp_cpoint1, temp_cpoint2) / (canvas_point_mag(temp_cpoint1) * canvas_point_mag(temp_cpoint2))); /* correct for the fact that acos is always positive by using the cross product */ if ((temp_cpoint1.x*temp_cpoint2.y-temp_cpoint1.y*temp_cpoint2.x) < 0.0) theta.z = -theta.z; amitk_space_rotate_on_vector(ui_render->box_space, amitk_space_get_axis(ui_render->box_space, AMITK_AXIS_Z), -theta.z, zero_point); renderings_set_rotation(ui_render->renderings, AMITK_AXIS_Z, -prev_theta.z); renderings_set_rotation(ui_render->renderings, AMITK_AXIS_Z, theta.z); } /* recalculate the offset */ temp_point.x = temp_point.y = temp_point.z = -dim/2.0; amitk_space_set_offset(ui_render->box_space, zero_point); amitk_space_set_offset(ui_render->box_space, amitk_space_s2b(ui_render->box_space, temp_point)); /* translate the 8 vertices */ for (i=0; i<8; i++) box_point[i] = amitk_space_b2s(ui_render->box_space, box_point[i]); /* draw the 8 lines we use to represent out cube */ for (i=0; i<8; i++) { line_points = gnome_canvas_points_new(2); if ((i < 4) && (i & 0x1)){ /* i < 4, evens */ j = (i & 0x2) ? i -2 : i -1; k = (i & 0x2) ? i : i +1; } else if (i < 4) { /* i < 4, odds */ j = i; k = j+1; } else { /* i > 4 */ j = i; k = j-4; } line_points->coords[0] = box_point[j].x; /* x1 */ line_points->coords[1] = box_point[j].y; /* y1 */ line_points->coords[2] = box_point[k].x; /* x2 */ line_points->coords[3] = box_point[k].y; /* y2 */ gnome_canvas_item_set(rotation_box[i], "points", line_points, NULL); gnome_canvas_points_unref(line_points); } /* translate the 8 vertices back to the base frame */ for (i=0; i<8; i++) box_point[i] = amitk_space_s2b(ui_render->box_space, box_point[i]); if (ui_render->update_without_release) ui_render_add_update(ui_render); prev_theta = theta; } break; case GDK_BUTTON_RELEASE: if (dragging) { gnome_canvas_item_ungrab(GNOME_CANVAS_ITEM(rotation_box[0]), event->button.time); dragging = FALSE; /* get rid of the frame */ for (i=0; i<8; i++) gtk_object_destroy(GTK_OBJECT(rotation_box[i])); /* render now if appropriate*/ if (!ui_render->update_without_release) ui_render_add_update(ui_render); } break; default: break; } return FALSE; } /* function to switch into stereoscopic rendering mode */ static void stereoscopic_cb(GtkRadioAction * action, GtkRadioAction * current, gpointer data) { ui_render_t * ui_render = data; ui_render->stereoscopic = gtk_radio_action_get_current_value((GTK_RADIO_ACTION(current))); ui_render_add_update(ui_render); return; } /* function to change the zoom */ static void change_zoom_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render = data; gdouble temp_val; temp_val = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); if (temp_val < 0.1) return; if (temp_val > 10) /* 10x zoom seems like quite a bit... */ return; /* set the zoom */ if (!REAL_EQUAL(ui_render->zoom, temp_val)) { ui_render->zoom = temp_val; renderings_set_zoom(ui_render->renderings, ui_render->zoom); /* do updating */ ui_render_add_update(ui_render); } return; } /* function called when one of the rotate widgets has been hit */ static void rotate_cb(GtkAdjustment * adjustment, gpointer data) { ui_render_t * ui_render = data; AmitkAxis i_axis; gdouble rot; /* figure out which rotate widget called me */ i_axis = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(adjustment),"axis")); rot = (adjustment->value/180.0)*M_PI; /* get rotation in radians */ /* update the rotation values */ renderings_set_rotation(ui_render->renderings, i_axis, rot); /* render now if appropriate*/ ui_render_add_update(ui_render); /* return adjustment back to normal */ adjustment->value = 0.0; gtk_adjustment_changed(adjustment); return; } /* function called to snap the axis back to the default */ static void reset_axis_pressed_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render = data; /* reset the rotations */ renderings_reset_rotation(ui_render->renderings); ui_render_add_update(ui_render); return; } /* function to save a rendering as an external data format */ static void export_cb(GtkAction * action, gpointer data) { ui_render_t * ui_render = data; renderings_t * temp_renderings; GtkWidget * file_chooser; gchar * data_set_names = NULL; gchar * filename; static guint save_image_num = 0; GdkPixbuf * pixbuf; g_return_if_fail(ui_render->pixbuf != NULL); file_chooser = gtk_file_chooser_dialog_new(_("Export File"), GTK_WINDOW(ui_render->window), /* parent window */ GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER (file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(ui_render->preferences, file_chooser); /* set the default directory if applicable */ /* take a guess at the filename */ temp_renderings = ui_render->renderings; data_set_names = g_strdup(temp_renderings->rendering->name); temp_renderings = temp_renderings->next; while (temp_renderings != NULL) { filename = g_strdup_printf("%s+%s",data_set_names, temp_renderings->rendering->name); g_free(data_set_names); data_set_names = filename; temp_renderings = temp_renderings->next; } filename = g_strdup_printf("Rendering%s{%s}_%d.jpg", ui_render->stereoscopic ? "_stereo_" : "_", data_set_names,save_image_num++); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER (file_chooser), filename); g_free(data_set_names); g_free(filename); /* run the dialog */ if (gtk_dialog_run(GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (file_chooser)); else filename = NULL; gtk_widget_destroy (file_chooser); /* save out the image if we have a filename */ if (filename != NULL) { pixbuf = ui_render_get_pixbuf(ui_render); if (pixbuf != NULL) { if (gdk_pixbuf_save (pixbuf, filename, "jpeg", NULL, "quality", "100", NULL) == FALSE) g_warning(_("Failure Saving File: %s"), filename); g_object_unref(pixbuf); } else { g_warning(_("Canvas failed to return a valid image\n")); } g_free(filename); } return; } /* function called when the button to pop up a rendering parameters modification dialog is hit */ static void parameters_cb(GtkAction * action, gpointer data) { ui_render_t * ui_render = data; ui_render_dialog_create_parameters(ui_render); return; } /* function called when the button to pop up a transfer function dialog is hit */ static void transfer_function_cb(GtkAction * action, gpointer data) { ui_render_t * ui_render = data; ui_render_dialog_create_transfer_function(ui_render); return; } #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) /* function called when the button to pop up a movie generation dialog */ static void movie_cb(GtkAction * action, gpointer data) { ui_render_t * ui_render = data; ui_render->movie = ui_render_movie_dialog_create(ui_render); return; } #endif /* function to run for a delete_event */ static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { ui_render_t * ui_render = data; GtkWindow * window = ui_render->window; ui_render = ui_render_free(ui_render); /* free the associated data structure */ amide_unregister_window((gpointer) window); /* tell amide this window is no longer */ return FALSE; } /* function ran when closing the rendering window */ static void close_cb(GtkAction* widget, gpointer data) { ui_render_t * ui_render = data; GtkWindow * window = ui_render->window; gboolean return_val; /* run the delete event function */ g_signal_emit_by_name(G_OBJECT(window), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(window)); return; } static const GtkActionEntry normal_items[] = { /* Toplevel */ { "FileMenu", NULL, N_("_File") }, { "EditMenu", NULL, N_("_Edit") }, { "HelpMenu", NULL, N_("_Help") }, /* File menu */ { "ExportRendering", NULL, N_("_Export Rendering"), NULL, N_("Export the rendered image"), G_CALLBACK(export_cb)}, #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) { "CreateMovie", NULL, N_("_Create Movie"), NULL, N_("Create a movie out of a sequence of renderings"), G_CALLBACK(movie_cb)}, #endif { "Close", GTK_STOCK_CLOSE, NULL, "W", N_("Close the rendering dialog"), G_CALLBACK (close_cb)}, /* Edit menu */ { "Parameters", NULL, N_("_Rendering Parameters"), NULL, N_("Adjust parameters pertinent to the rendered image"), G_CALLBACK(parameters_cb)}, /* Toolbar items */ { "TransferFunctions", "amide_icon_transfer_function", N_("X-fer"), NULL, N_("Opacity and density transfer functions"), G_CALLBACK(transfer_function_cb)} }; static const GtkRadioActionEntry stereoscopic_radio_entries[] = { { "MonoscopicRendering", "amide_icon_view_mode_single", N_("Mono"), NULL, N_("Monoscopic rendering"), 0}, { "StereoscopicRendering", "amide_icon_view_mode_linked_2way", N_("Stereo"), NULL, N_("Stereoscopic rendering"), 1}, }; static const char *ui_description = "" " " " " " " " " " " " " " " " " " " " " HELP_MENU_UI_DESCRIPTION " " " " " " " " " " " " /* " " */ /* " " */ " " ""; /* function to setup the menus and toolbars for the rendering ui */ static void menus_toolbar_create(ui_render_t * ui_render) { GtkWidget *menubar; GtkWidget *toolbar; GtkActionGroup *action_group; GtkUIManager *ui_manager; GtkAccelGroup *accel_group; GtkWidget * label; GtkWidget * spin_button; GError * error; /* sanity check */ g_assert(ui_render !=NULL); /* create an action group with all the menu actions */ action_group = gtk_action_group_new ("MenuActions"); gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE); gtk_action_group_add_actions(action_group, normal_items, G_N_ELEMENTS(normal_items),ui_render); gtk_action_group_add_actions(action_group, ui_common_help_menu_items, G_N_ELEMENTS(ui_common_help_menu_items),ui_render); gtk_action_group_add_radio_actions(action_group, stereoscopic_radio_entries, G_N_ELEMENTS (stereoscopic_radio_entries), 0, G_CALLBACK(stereoscopic_cb), ui_render); /* create the ui manager, and add the actions and accel's */ ui_manager = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); accel_group = gtk_ui_manager_get_accel_group (ui_manager); gtk_window_add_accel_group (ui_render->window, accel_group); /* create the actual menu/toolbar ui */ error = NULL; if (!gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, &error)) { g_warning ("%s: building menus failed in %s: %s", PACKAGE, __FILE__, error->message); g_error_free (error); return; } /* pack in the menu and toolbar */ menubar = gtk_ui_manager_get_widget (ui_manager, "/MainMenu"); gtk_box_pack_start (GTK_BOX (ui_render->window_vbox), menubar, FALSE, FALSE, 0); toolbar = gtk_ui_manager_get_widget (ui_manager, "/ToolBar"); gtk_box_pack_start (GTK_BOX (ui_render->window_vbox), toolbar, FALSE, FALSE, 0); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); /* a separator for clarity */ ui_common_toolbar_append_separator(toolbar); /* add the zoom widget to our toolbar */ label = gtk_label_new(_("zoom:")); ui_common_toolbar_append_widget(toolbar, label, NULL); spin_button = gtk_spin_button_new_with_range(0.1, 10.0, 0.2); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_button),FALSE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin_button), 2); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), ui_render->zoom); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin_button), GTK_UPDATE_ALWAYS); gtk_widget_set_size_request (spin_button, 60, -1); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(change_zoom_cb), ui_render); g_signal_connect(G_OBJECT(spin_button), "button_press_event", G_CALLBACK(amitk_spin_button_discard_double_or_triple_click), NULL); ui_common_toolbar_append_widget(toolbar, spin_button,_("specify how much to magnify the rendering")); return; } /* destroy a ui_render data structure */ static ui_render_t * ui_render_free(ui_render_t * ui_render) { gboolean return_val; if (ui_render == NULL) return ui_render; /* sanity checks */ g_return_val_if_fail(ui_render->reference_count > 0, NULL); ui_render->reference_count--; /* things to do if we've removed all reference's */ if (ui_render->reference_count == 0) { ui_render->renderings = renderings_unref(ui_render->renderings); #ifdef AMIDE_DEBUG g_print("freeing ui_render\n"); #endif if (ui_render->preferences != NULL) { g_object_unref(ui_render->preferences); ui_render->preferences = NULL; } if (ui_render->idle_handler_id != 0) { g_source_remove(ui_render->idle_handler_id); ui_render->idle_handler_id = 0; } if (ui_render->pixbuf != NULL) { g_object_unref(ui_render->pixbuf); ui_render->pixbuf = NULL; } if (ui_render->box_space != NULL) { g_object_unref(ui_render->box_space); ui_render->box_space = NULL; } if (ui_render->progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(ui_render->progress_dialog), "delete_event", NULL, &return_val); ui_render->progress_dialog = NULL; } g_free(ui_render); ui_render = NULL; } return ui_render; } static void read_render_preferences(gboolean * strip_highs, gboolean * optimize_renderings, gboolean * initially_no_gradient_opacity) { *strip_highs = amide_gconf_get_bool(GCONF_AMIDE_RENDERING,"StripHighs"); *optimize_renderings = amide_gconf_get_bool(GCONF_AMIDE_RENDERING,"OptimizeRendering"); *initially_no_gradient_opacity = amide_gconf_get_bool(GCONF_AMIDE_RENDERING,"InitiallyNoGradientOpacity"); return; } /* allocate and initialize a ui_render data structure */ static ui_render_t * ui_render_init(GtkWindow * window, GtkWidget * window_vbox, AmitkStudy * study, GList * selected_objects, AmitkPreferences * preferences) { ui_render_t * ui_render; gboolean strip_highs; gboolean optimize_rendering; gboolean initially_no_gradient_opacity; read_render_preferences(&strip_highs, &optimize_rendering, &initially_no_gradient_opacity); /* alloc space for the data structure for passing ui info */ if ((ui_render = g_try_new(ui_render_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for ui_render_t")); return NULL; } ui_render->reference_count = 1; /* set any needed parameters */ ui_render->window = window; ui_render->window_vbox = window_vbox; ui_render->parameter_dialog = NULL; ui_render->transfer_function_dialog = NULL; ui_render->preferences = g_object_ref(preferences); #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) ui_render->movie = NULL; #endif ui_render->stereoscopic = FALSE; ui_render->renderings = NULL; ui_render->pixbuf = NULL; ui_render->pixbuf_width = 128; ui_render->pixbuf_height = 128; ui_render->canvas_image = NULL; ui_render->canvas_time_label = NULL; ui_render->time_label_on = FALSE; ui_render->quality = RENDERING_DEFAULT_QUALITY; ui_render->depth_cueing = RENDERING_DEFAULT_DEPTH_CUEING; ui_render->front_factor = RENDERING_DEFAULT_FRONT_FACTOR; ui_render->density = RENDERING_DEFAULT_DENSITY; ui_render->zoom = RENDERING_DEFAULT_ZOOM; ui_render->start = AMITK_STUDY_VIEW_START_TIME(study); ui_render->duration = AMITK_STUDY_VIEW_DURATION(study); ui_render->fov = AMITK_STUDY_FOV(study); ui_render->view_center = AMITK_STUDY_VIEW_CENTER(study); ui_render->box_space = amitk_space_new(); ui_render->progress_dialog = amitk_progress_dialog_new(ui_render->window); ui_render->disable_progress_dialog=FALSE; ui_render->next_update= UPDATE_NONE; ui_render->idle_handler_id = 0; ui_render->rendered_successfully=FALSE; /* load in saved render preferences */ ui_render->update_without_release = amide_gconf_get_bool(GCONF_AMIDE_RENDERING,"UpdateWithoutRelease"); ui_render->stereo_eye_width = amide_gconf_get_int(GCONF_AMIDE_RENDERING,"EyeWidth"); if (ui_render->stereo_eye_width == 0) /* if no config file, put in sane value */ ui_render->stereo_eye_width = 50*gdk_screen_width()/gdk_screen_width_mm(); /* in pixels */ ui_render->stereo_eye_angle = amide_gconf_get_float(GCONF_AMIDE_RENDERING,"EyeAngle"); if ((ui_render->stereo_eye_angle <= 0.1) || (ui_render->stereo_eye_angle > 45.0)) ui_render->stereo_eye_angle = 5.0; /* degrees */ /* initialize the rendering contexts */ ui_render->renderings = renderings_init(selected_objects, ui_render->start, ui_render->duration, strip_highs, optimize_rendering, initially_no_gradient_opacity, ui_render->fov, ui_render->view_center, ui_render->disable_progress_dialog ? NULL : amitk_progress_dialog_update, ui_render->disable_progress_dialog ? NULL : ui_render->progress_dialog); return ui_render; } GdkPixbuf * ui_render_get_pixbuf(ui_render_t * ui_render) { GdkPixbuf * pixbuf; pixbuf = amitk_get_pixbuf_from_canvas(GNOME_CANVAS(ui_render->canvas), 0.0,0.0, ui_render->pixbuf_width, ui_render->pixbuf_height); return pixbuf; } void ui_render_add_update(ui_render_t * ui_render) { ui_render->next_update = ui_render->next_update | UPDATE_RENDERING; if (ui_render->idle_handler_id == 0) { ui_common_place_cursor_no_wait(UI_CURSOR_WAIT, ui_render->canvas); ui_render->idle_handler_id = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE,ui_render_update_immediate, ui_render, NULL); } return; } /* render our objects and place into the canvases */ gboolean ui_render_update_immediate(gpointer data) { ui_render_t * ui_render = data; amide_intpoint_t size_dim; AmideEye eyes; gboolean return_val=TRUE; amide_time_t midpt_time; gint hours, minutes, seconds; gchar * time_str; rgba_t color; g_return_val_if_fail(ui_render != NULL, FALSE); g_return_val_if_fail(ui_render->renderings != NULL, FALSE); ui_render->rendered_successfully=FALSE; if (!renderings_reload_objects(ui_render->renderings, ui_render->start, ui_render->duration, ui_render->disable_progress_dialog ? NULL : amitk_progress_dialog_update, ui_render->disable_progress_dialog ? NULL : ui_render->progress_dialog )) { return_val=FALSE; goto function_end; } /* -------- render our objects ------------ */ if (ui_render->stereoscopic) eyes = AMIDE_EYE_NUM; else eyes = 1; if (ui_render->pixbuf != NULL) { g_object_unref(ui_render->pixbuf); ui_render->pixbuf = NULL; } /* base the dimensions on the first rendering context in the list.... */ size_dim = ceil(ui_render->zoom*POINT_MAX(ui_render->renderings->rendering->dim)); ui_render->pixbuf = image_from_renderings(ui_render->renderings, size_dim, size_dim, eyes, ui_render->stereo_eye_angle, ui_render->stereo_eye_width); /* put up the image */ if (ui_render->canvas_image != NULL) gnome_canvas_item_set(ui_render->canvas_image, "pixbuf", ui_render->pixbuf, NULL); else /* time to make a new image */ ui_render->canvas_image = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(ui_render->canvas)), gnome_canvas_pixbuf_get_type(), "pixbuf", ui_render->pixbuf, "x", (double) 0.0, "y", (double) 0.0, NULL); /* get the height and width */ ui_render->pixbuf_width = gdk_pixbuf_get_width(ui_render->pixbuf); ui_render->pixbuf_height = gdk_pixbuf_get_height(ui_render->pixbuf); /* put up the timer */ if (ui_render->time_label_on) { midpt_time = ui_render->start+ui_render->duration/2.0; hours = floor(midpt_time/3600); midpt_time -= hours*3600; minutes = floor(midpt_time/60); midpt_time -= minutes*60; seconds = midpt_time; time_str = g_strdup_printf("%d:%.2d:%.2d",hours,minutes,seconds); color = amitk_color_table_outline_color(ui_render->renderings->rendering->color_table, FALSE); if (ui_render->canvas_time_label != NULL) gnome_canvas_item_set(ui_render->canvas_time_label, "text", time_str, "fill_color_rgba", color, NULL); else ui_render->canvas_time_label = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(ui_render->canvas)), gnome_canvas_text_get_type(), "anchor", GTK_ANCHOR_SOUTH_WEST, "text", time_str, "x", 4.0, "y", ui_render->pixbuf_height-2.0, "fill_color_rgba", color, "font_desc", amitk_fixed_font_desc, NULL); g_free(time_str); } else { if (ui_render->canvas_time_label != NULL) { gtk_object_destroy(GTK_OBJECT(ui_render->canvas_time_label)); ui_render->canvas_time_label = NULL; } } /* reset the min size of the widget */ gnome_canvas_set_scroll_region(GNOME_CANVAS(ui_render->canvas), 0.0, 0.0, ui_render->pixbuf_width, ui_render->pixbuf_height); gtk_widget_set_size_request(ui_render->canvas, ui_render->pixbuf_width, ui_render->pixbuf_height); ui_render->rendered_successfully = TRUE; return_val = FALSE; function_end: ui_common_remove_wait_cursor(ui_render->canvas); ui_render->next_update = UPDATE_NONE; ui_render->idle_handler_id=0; return return_val; } /* function that sets up the rendering dialog */ void ui_render_create(AmitkStudy * study, GList * selected_objects, AmitkPreferences * preferences) { GtkWidget * packing_table; GtkWidget * button; GtkAdjustment * adjustment; GtkWidget * scale; GtkWidget * vbox; GtkWidget * hbox; GtkWidget * dial; GtkWidget * label; ui_render_t * ui_render; GtkWindow * window; GtkWidget * window_vbox; gboolean return_val; /* sanity checks */ g_return_if_fail(AMITK_IS_STUDY(study)); /* setup the window with a vbox container in it */ window = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); gtk_window_set_title(window, _("Rendering Window")); gtk_window_set_resizable(window, FALSE); window_vbox = gtk_vbox_new(FALSE,0); gtk_container_add (GTK_CONTAINER (window), window_vbox); ui_render = ui_render_init(window, window_vbox, study, selected_objects, preferences); /* check we actually have something */ if (ui_render->renderings == NULL) { /* run the delete event function */ g_signal_emit_by_name(G_OBJECT(window), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(window)); return; } /* setup the callbacks for the window */ g_signal_connect(G_OBJECT(ui_render->window), "delete_event", G_CALLBACK(delete_event_cb), ui_render); /* setup the menus and toolbar */ menus_toolbar_create(ui_render); /* make the widgets for this dialog box */ packing_table = gtk_table_new(3,3,FALSE); gtk_box_pack_start (GTK_BOX (ui_render->window_vbox), packing_table, TRUE,TRUE, 0); /* setup the main canvas */ #ifdef AMIDE_LIBGNOMECANVAS_AA ui_render->canvas = gnome_canvas_new_aa(); #else ui_render->canvas = gnome_canvas_new(); #endif gtk_table_attach(GTK_TABLE(packing_table), ui_render->canvas, 1,2,1,2, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(ui_render->canvas), "event", G_CALLBACK(canvas_event_cb), ui_render); ui_render_update_immediate(ui_render); /* fill in the canvas */ /* create the x, y, and z rotation dials */ hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(packing_table), hbox, 1,3,0,1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); adjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, -90.0, 90.0, 1.0, 1.0, 1.0)); scale = gtk_hscale_new(adjustment); gtk_range_set_update_policy (GTK_RANGE(scale), GTK_UPDATE_DISCONTINUOUS); g_object_set_data(G_OBJECT(adjustment), "axis", GINT_TO_POINTER(AMITK_AXIS_Y)); gtk_box_pack_start(GTK_BOX(hbox), scale, TRUE, TRUE, 0); g_signal_connect (G_OBJECT(adjustment), "value_changed", G_CALLBACK(rotate_cb), ui_render); label = gtk_label_new(_("y")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); /* create the z dial */ hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(packing_table), hbox, 3,4,0,1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); label = gtk_label_new(_("z")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); adjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, -180.0, 180.0, 1.0, 1.0, 1.0)); dial = amitk_dial_new(adjustment); gtk_widget_set_size_request(dial,50,50); amitk_dial_set_update_policy (AMITK_DIAL(dial), GTK_UPDATE_DISCONTINUOUS); g_object_set_data(G_OBJECT(adjustment), "axis", GINT_TO_POINTER(AMITK_AXIS_Z)); gtk_box_pack_start(GTK_BOX(hbox), dial, FALSE, FALSE, 0); g_signal_connect (G_OBJECT(adjustment), "value_changed", G_CALLBACK(rotate_cb), ui_render); /* the x slider */ vbox = gtk_vbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(packing_table), vbox, 3,4,1,2, X_PACKING_OPTIONS , Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); label = gtk_label_new(_("x")); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5); adjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, -90.0, 90.0, 1.0, 1.0, 1.0)); scale = gtk_vscale_new(adjustment); gtk_range_set_update_policy (GTK_RANGE(scale), GTK_UPDATE_DISCONTINUOUS); g_object_set_data(G_OBJECT(adjustment), "axis", GINT_TO_POINTER(AMITK_AXIS_X)); gtk_box_pack_start(GTK_BOX(vbox), scale, TRUE, TRUE, 0); g_signal_connect(G_OBJECT(adjustment), "value_changed", G_CALLBACK(rotate_cb), ui_render); /* button to reset the axis */ button = gtk_button_new_with_label(_("Reset Axis")); g_signal_connect(G_OBJECT(button), "pressed", G_CALLBACK(reset_axis_pressed_cb), ui_render); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); /* and show all our widgets */ gtk_widget_show_all(GTK_WIDGET(ui_render->window)); amide_register_window((gpointer) ui_render->window); return; } static void init_strip_highs_cb(GtkWidget * widget, gpointer data); static void init_optimize_rendering_cb(GtkWidget * widget, gpointer data); static void init_no_gradient_opacity_cb(GtkWidget * widget, gpointer data); static void init_strip_highs_cb(GtkWidget * widget, gpointer data) { amide_gconf_set_bool(GCONF_AMIDE_RENDERING,"StripHighs", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); return; } static void init_optimize_rendering_cb(GtkWidget * widget, gpointer data) { amide_gconf_set_bool(GCONF_AMIDE_RENDERING,"OptimizeRendering", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); return; } static void init_no_gradient_opacity_cb(GtkWidget * widget, gpointer data) { amide_gconf_set_bool(GCONF_AMIDE_RENDERING,"InitiallyNoGradientOpacity", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); return; } /* function to setup a dialog to allow us to choose options for rendering */ GtkWidget * ui_render_init_dialog_create(AmitkStudy * study, GtkWindow * parent) { GtkWidget * dialog; gchar * temp_string; GtkWidget * table; GtkWidget * check_button; guint table_row; GtkWidget * tree_view; GtkWidget * scrolled; gboolean strip_highs; gboolean optimize_rendering; gboolean initially_no_gradient_opacity; read_render_preferences(&strip_highs, &optimize_rendering, &initially_no_gradient_opacity); temp_string = g_strdup_printf(_("%s: Rendering Initialization Dialog"), PACKAGE); dialog = gtk_dialog_new_with_buttons (temp_string, parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE, GTK_STOCK_EXECUTE, AMITK_RESPONSE_EXECUTE, NULL); gtk_window_set_title(GTK_WINDOW(dialog), temp_string); g_free(temp_string); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(ui_common_init_dialog_response_cb), NULL); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); /* start making the widgets for this dialog box */ table = gtk_table_new(5,2,FALSE); table_row=0; gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table); tree_view = amitk_tree_view_new(AMITK_TREE_VIEW_MODE_MULTIPLE_SELECTION,NULL, NULL); g_object_set_data(G_OBJECT(dialog), "tree_view", tree_view); amitk_tree_view_set_study(AMITK_TREE_VIEW(tree_view), study); amitk_tree_view_expand_object(AMITK_TREE_VIEW(tree_view), AMITK_OBJECT(study)); /* make a scrolled area for the tree */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,250,250); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), tree_view); gtk_table_attach(GTK_TABLE(table), scrolled, 0,2, table_row, table_row+1,GTK_FILL, GTK_FILL | GTK_EXPAND, X_PADDING, Y_PADDING); table_row++; /* do we want to strip values */ check_button = gtk_check_button_new_with_label(_("Set values greater than max. threshold to zero?")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button), strip_highs); gtk_table_attach(GTK_TABLE(table), check_button, 0,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(init_strip_highs_cb), dialog); table_row++; /* do we want to converse memory */ check_button = gtk_check_button_new_with_label(_("Accelerate Rendering? Increases memory use ~3x")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button),optimize_rendering); gtk_table_attach(GTK_TABLE(table), check_button, 0,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(init_optimize_rendering_cb), dialog); table_row++; /* do we want the initial opacities to be only density dependent */ check_button = gtk_check_button_new_with_label(_("Initial opacity functions only density dependent?")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button),initially_no_gradient_opacity); gtk_table_attach(GTK_TABLE(table), check_button, 0,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(init_no_gradient_opacity_cb), dialog); table_row++; /* and show all our widgets */ gtk_widget_show_all(dialog); return dialog; } #endif amide-1.0.5/src/variable_type.m40000664000175000017500000000603312270274763016341 0ustar loeningloeningm4_dnl variable_type.m4 m4_dnl m4_dnl Part of amide - AMIDE's a Medical Image Data Examiner m4_dnl Copyright (c) 2001-2014 Andy Loening m4_dnl m4_dnl Author: Andy Loening m4_dnl m4_dnl m4_dnl This is an m4 file that specifies functions which are dependent m4_dnl on the internal data type of the data set. m4_dnl m4_dnl Specifying this as an m4 file allows there to exist only m4_dnl one version of the algorithms which can be optimized for m4_dnl each of the internal data formats and scaling modes or roi types. m4_dnl m4_dnl to convert this into a c file, run this file through the m4_dnl m4 process with "m4_SourceFile" defined in the form: m4_dnl *_*.c m4_dnl where the first wildcard is the base file name (roi, volume, data_set) m4_dnl and the second wildwcard specifies the data format (UBYTE, SBYTE, etc.), m4_dnl data format and scaling mode (UBYTE_0D, etc.) or roi type, (ELLIPSOID, m4_dnl BOX, etc.) as appropriate. m4_dnl m4_dnl m4_dnl m4 needs to be ran with the -P option m4_dnl m4_dnl m4_dnl m4_dnl m4_dnl Warning message for the generated file /* Do not edit this file, it is generated automatically from variable_type.m4 */ m4_dnl m4_dnl m4_dnl Figure out what internal data format/roi type we're making m4_ifdef(`m4_SourceFile', ` m4_define(m4_File_Base_Name, `m4_substr(m4_SourceFile, 0, m4_regexp(m4_SourceFile,`_[A-Z]'))') m4_define(m4_Temp_Variable_Type, `m4_substr(m4_SourceFile, m4_eval(m4_regexp(m4_SourceFile,`_[A-Z]')+1), m4_eval(m4_index(m4_SourceFile,`.')-m4_regexp(m4_SourceFile,`_[A-Z]')-1))') m4_define(m4_File_Type, `m4_substr(m4_SourceFile, m4_eval(m4_index(m4_SourceFile, `.')+1), 1)') ',` ``Must Define m4_SourceFile'' m4_m4exit') m4_dnl m4_dnl extract any additional information out of "Temp_Variable_Type" m4_dnl m4_ifelse(m4_regexp(m4_Temp_Variable_Type, `_'), `-1',` m4_dnl [^-]* matches everything but the ldash... using this as a poor man's wild card m4_ifelse(m4_regexp(m4_Temp_Variable_Type, `_[^-]*_'), `-1',` m4_define(m4_Variable_Type, m4_Temp_Variable_Type) m4_define(m4_Scale_Dim, `') ',` m4_ifelse(m4_regexp(m4_Temp_Variable_Type, `_INTERCEPT'), `-1',` m4_define(m4_Scale_Dim, `m4_substr(m4_Temp_Variable_Type, m4_eval(m4_regexp(m4_Temp_Variable_Type, `_')+1))') m4_define(m4_Intercept, `') ',` m4_define(m4_Scale_Dim, `m4_substr(m4_Temp_Variable_Type, m4_eval(m4_regexp(m4_Temp_Variable_Type, `_')+1), m4_eval(m4_regexp(m4_Temp_Variable_Type, `_INTERCEPT')- m4_regexp(m4_Temp_Variable_Type, `_')-1))') m4_define(m4_Intercept, `INTERCEPT_') ') m4_define(m4_Variable_Type, `m4_substr(m4_Temp_Variable_Type, 0, m4_regexp(m4_Temp_Variable_Type, `_'))') ') m4_dnl m4_dnl /* m4_SourceFile * * generated from the following file: */ m4_dnl m4_dnl m4_dnl change the delimiter, so we don't lose pound signs in the files m4_changecom(~,~) m4_dnl m4_ifelse(m4_File_Type, `h', `m4_include(m4_format(`%s_%s', m4_File_Base_Name,`variable_type.h'))', `m4_include(m4_format(`%s_%s', m4_File_Base_Name,`variable_type.c'))') m4_dnl m4_dnl end of m4 file amide-1.0.5/src/amitk_volume.c0000664000175000017500000004401412270273763016111 0ustar loeningloening/* amitk_volume.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amitk_volume.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" enum { VOLUME_CORNER_CHANGED, VOLUME_GET_CENTER, VOLUME_CHANGED, LAST_SIGNAL }; static void volume_class_init (AmitkVolumeClass *klass); static void volume_init (AmitkVolume *volume); static void volume_corner_changed (AmitkVolume *volume, AmitkPoint *new_corner); static void volume_get_center (const AmitkVolume *volume, AmitkPoint *center); static void volume_scale (AmitkSpace * space, AmitkPoint * ref_point, AmitkPoint * scaling); static AmitkObject * volume_copy (const AmitkObject * object); static void volume_copy_in_place (AmitkObject * dest_object, const AmitkObject * src_object); static void volume_write_xml (const AmitkObject *object, xmlNodePtr nodes, FILE *study_file); static gchar * volume_read_xml (AmitkObject *object, xmlNodePtr nodes, FILE *study_file, gchar *error_buf); static AmitkObjectClass* parent_class; static guint volume_signals[LAST_SIGNAL]; GType amitk_volume_get_type(void) { static GType volume_type = 0; if (!volume_type) { static const GTypeInfo volume_info = { sizeof (AmitkVolumeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) volume_class_init, (GClassFinalizeFunc) NULL, NULL, /* class_data */ sizeof (AmitkVolume), 0, /* n_preallocs */ (GInstanceInitFunc) volume_init, NULL /* value table */ }; volume_type = g_type_register_static (AMITK_TYPE_OBJECT, "AmitkVolume", &volume_info, 0); } return volume_type; } static void volume_class_init (AmitkVolumeClass * class) { // GObjectClass *gobject_class = G_OBJECT_CLASS (class); AmitkObjectClass * object_class = AMITK_OBJECT_CLASS(class); AmitkSpaceClass * space_class = AMITK_SPACE_CLASS(class); parent_class = g_type_class_peek_parent(class); space_class->space_scale = volume_scale; object_class->object_copy = volume_copy; object_class->object_copy_in_place = volume_copy_in_place; object_class->object_write_xml = volume_write_xml; object_class->object_read_xml = volume_read_xml; class->volume_corner_changed = volume_corner_changed; class->volume_get_center = volume_get_center; volume_signals[VOLUME_CORNER_CHANGED] = g_signal_new ("volume_corner_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkVolumeClass, volume_corner_changed), NULL, NULL, amitk_marshal_NONE__BOXED, G_TYPE_NONE,1, AMITK_TYPE_POINT); volume_signals[VOLUME_GET_CENTER] = g_signal_new ("volume_get_center", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkVolumeClass, volume_get_center), NULL, NULL, amitk_marshal_NONE__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); volume_signals[VOLUME_CHANGED] = g_signal_new ("volume_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkVolumeClass, volume_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); } static void volume_init (AmitkVolume * volume) { volume->corner = zero_point; volume->valid = FALSE; return; } static void volume_corner_changed(AmitkVolume *volume, AmitkPoint * new_corner) { volume->corner = *new_corner; volume->valid = TRUE; return; } static void volume_get_center(const AmitkVolume *volume, AmitkPoint * pcenter) { AmitkCorners corners; /* get the far corner, corner[0] is currently always zero */ corners[0] = amitk_space_b2s(AMITK_SPACE(volume), AMITK_SPACE_OFFSET(volume)); corners[1] = volume->corner; /* the center in roi coords is then just half the far corner */ (*pcenter) = point_add(point_cmult(0.5,corners[1]), point_cmult(0.5,corners[0])); /* now, translate that into the base coord frame */ (*pcenter) = amitk_space_s2b(AMITK_SPACE(volume), (*pcenter)); return; } static void volume_scale(AmitkSpace * space, AmitkPoint * ref_point, AmitkPoint * scaling) { AmitkVolume * volume; AmitkPoint new_corner; AmitkPoint shift; g_return_if_fail(AMITK_IS_VOLUME(space)); volume = AMITK_VOLUME(space); /* readjust the far corner */ /* note that this is an approximate scaling. Since we preserve angles, we can't correctly scale ROI's if the ROI is not orthogonal to the space that's initially being scaled. */ new_corner = AMITK_VOLUME_CORNER(volume); new_corner = amitk_space_s2b(AMITK_SPACE(volume), new_corner); shift = point_sub(new_corner, *ref_point); shift = point_mult(*scaling, shift); new_corner = point_add(*ref_point, shift); /* update the space */ AMITK_SPACE_CLASS(parent_class)->space_scale (space, ref_point, scaling); /* calculate the new corner */ if (AMITK_VOLUME_VALID(volume)) { new_corner = amitk_space_b2s(AMITK_SPACE(volume), new_corner); g_return_if_fail(new_corner.x >= 0); g_return_if_fail(new_corner.y >= 0); g_return_if_fail(new_corner.z >= 0); amitk_volume_set_corner(volume, new_corner); } } static AmitkObject * volume_copy(const AmitkObject * object) { AmitkVolume * copy; g_return_val_if_fail(AMITK_IS_VOLUME(object), NULL); copy = amitk_volume_new(); amitk_object_copy_in_place(AMITK_OBJECT(copy), AMITK_OBJECT(object)); return AMITK_OBJECT(copy); } static void volume_copy_in_place(AmitkObject * dest_object, const AmitkObject * src_object) { g_return_if_fail(AMITK_IS_VOLUME(src_object)); g_return_if_fail(AMITK_IS_VOLUME(dest_object)); if (AMITK_VOLUME_VALID(src_object)) amitk_volume_set_corner(AMITK_VOLUME(dest_object), AMITK_VOLUME_CORNER(src_object)); else AMITK_VOLUME(dest_object)->valid = FALSE; AMITK_OBJECT_CLASS (parent_class)->object_copy_in_place (dest_object, src_object); } static void volume_write_xml(const AmitkObject * object, xmlNodePtr nodes, FILE * study_file) { AMITK_OBJECT_CLASS(parent_class)->object_write_xml(object, nodes, study_file); amitk_point_write_xml(nodes, "corner", AMITK_VOLUME_CORNER(object)); xml_save_boolean(nodes, "valid", AMITK_VOLUME_VALID(object)); return; } static gchar * volume_read_xml(AmitkObject * object, xmlNodePtr nodes, FILE * study_file, gchar * error_buf) { AmitkVolume * volume; error_buf = AMITK_OBJECT_CLASS(parent_class)->object_read_xml(object, nodes, study_file, error_buf); volume = AMITK_VOLUME(object); volume->corner = amitk_point_read_xml(nodes, "corner", &error_buf); volume->valid = xml_get_boolean(nodes, "valid", &error_buf); /* legacy, "valid" is a new parameter */ if (!volume->valid) if (!POINT_EQUAL(volume->corner, zero_point)) volume->valid = TRUE; return error_buf; } AmitkVolume * amitk_volume_new (void) { AmitkVolume * volume; volume = g_object_new(amitk_volume_get_type(), NULL); return volume; } /* point should be in the base coordinate frame */ gboolean amitk_volume_point_in_bounds(const AmitkVolume * volume, const AmitkPoint base_point) { AmitkPoint point; g_return_val_if_fail(AMITK_IS_VOLUME(volume), FALSE); g_return_val_if_fail(AMITK_VOLUME_VALID(volume), FALSE); point = amitk_space_b2s(AMITK_SPACE(volume), base_point); if ((point.x < 0.0) || (point.y < 0.0) || (point.z < 0.0) || (point.x > AMITK_VOLUME_X_CORNER(volume)) || (point.y > AMITK_VOLUME_Y_CORNER(volume)) || (point.z > AMITK_VOLUME_Z_CORNER(volume))) return FALSE; else return TRUE; } AmitkPoint amitk_volume_place_in_bounds(const AmitkVolume * volume, const AmitkPoint base_point) { AmitkPoint point; g_return_val_if_fail(AMITK_IS_VOLUME(volume), zero_point); g_return_val_if_fail(AMITK_VOLUME_VALID(volume), zero_point); point = amitk_space_b2s(AMITK_SPACE(volume), base_point); if (point.x < 0.0) point.x = 0.0; else if (point.x > AMITK_VOLUME_X_CORNER(volume)) point.x = AMITK_VOLUME_X_CORNER(volume); if (point.y < 0.0) point.y = 0.0; else if (point.y > AMITK_VOLUME_Y_CORNER(volume)) point.y = AMITK_VOLUME_Y_CORNER(volume); if (point.z < 0.0) point.z = 0.0; else if (point.z > AMITK_VOLUME_Z_CORNER(volume)) point.z = AMITK_VOLUME_Z_CORNER(volume); point = amitk_space_s2b(AMITK_SPACE(volume), point); return point; } AmitkPoint amitk_volume_get_center(const AmitkVolume * volume) { AmitkPoint center; g_return_val_if_fail(AMITK_IS_VOLUME(volume), zero_point); g_return_val_if_fail(AMITK_VOLUME_VALID(volume), zero_point); g_signal_emit(G_OBJECT(volume), volume_signals[VOLUME_GET_CENTER], 0, ¢er); return center; } void amitk_volume_set_corner(AmitkVolume * volume, AmitkPoint corner) { g_return_if_fail(AMITK_IS_VOLUME(volume)); if (!POINT_EQUAL(AMITK_VOLUME_CORNER(volume), corner) || (!AMITK_VOLUME_VALID(volume))) { g_signal_emit(G_OBJECT(volume), volume_signals[VOLUME_CORNER_CHANGED], 0, &corner); g_signal_emit(G_OBJECT(volume), volume_signals[VOLUME_CHANGED], 0); } } void amitk_volume_set_z_corner(AmitkVolume * volume, amide_real_t z) { AmitkPoint corner; g_return_if_fail(AMITK_IS_VOLUME(volume)); g_return_if_fail(AMITK_VOLUME_VALID(volume)); if (!REAL_EQUAL(AMITK_VOLUME_Z_CORNER(volume), z)) { corner = AMITK_VOLUME_CORNER(volume); corner.z = z; g_signal_emit(G_OBJECT(volume), volume_signals[VOLUME_CORNER_CHANGED], 0, &corner); g_signal_emit(G_OBJECT(volume), volume_signals[VOLUME_CHANGED], 0); } } /* center should be in the base coordinate frame */ void amitk_volume_set_center(AmitkVolume * volume, const AmitkPoint new_center) { AmitkPoint shift; AmitkPoint new_offset; g_return_if_fail(AMITK_IS_VOLUME(volume)); g_return_if_fail(AMITK_VOLUME_VALID(volume)); shift = point_sub(new_center, amitk_volume_get_center(volume)); if (!POINT_EQUAL(shift, zero_point)) { new_offset = point_add(AMITK_SPACE_OFFSET(volume), shift); amitk_space_set_offset(AMITK_SPACE(volume), new_offset); } return; } /* takes a volume and a coordinate space, and give the corners of a box with sides orthogonal to the given space that totally encompasses the volume. The returned corners are in the coordinate space of the "space" variable */ void amitk_volume_get_enclosing_corners(const AmitkVolume * volume, const AmitkSpace * space, AmitkCorners return_corners) { AmitkCorners corners; g_return_if_fail(AMITK_IS_VOLUME(volume)); g_return_if_fail(AMITK_IS_SPACE(space)); g_return_if_fail(AMITK_VOLUME_VALID(volume)); corners[0] = amitk_space_b2s(AMITK_SPACE(volume), AMITK_SPACE_OFFSET(volume)); corners[1] = volume->corner; /* look at all eight corners of our cube, figure out the min and max coords */ amitk_space_get_enclosing_corners(AMITK_SPACE(volume), corners, space, return_corners); return; } /* takes a list of objects and a view coordinate space, give the corners necessary to totally encompass the volumes in the given space */ gboolean amitk_volumes_get_enclosing_corners(const GList * objects, const AmitkSpace * space, AmitkCorners return_corners) { AmitkCorners temp_corners; gboolean valid=FALSE; while (objects != NULL) { if (AMITK_IS_VOLUME(objects->data)) { if (AMITK_VOLUME_VALID(objects->data)) { amitk_volume_get_enclosing_corners(AMITK_VOLUME(objects->data),space,temp_corners); if (!valid) { valid = TRUE; return_corners[0] = temp_corners[0]; return_corners[1] = temp_corners[1]; } else { return_corners[0].x = (return_corners[0].x < temp_corners[0].x) ? return_corners[0].x : temp_corners[0].x; return_corners[0].y = (return_corners[0].y < temp_corners[0].y) ? return_corners[0].y : temp_corners[0].y; return_corners[0].z = (return_corners[0].z < temp_corners[0].z) ? return_corners[0].z : temp_corners[0].z; return_corners[1].x = (return_corners[1].x > temp_corners[1].x) ? return_corners[1].x : temp_corners[1].x; return_corners[1].y = (return_corners[1].y > temp_corners[1].y) ? return_corners[1].y : temp_corners[1].y; return_corners[1].z = (return_corners[1].z > temp_corners[1].z) ? return_corners[1].z : temp_corners[1].z; } } } objects = objects->next; } if (!valid) return_corners[0] = return_corners[1] = zero_point; return valid; } /* returns the corners of a box (orthogonal to volume1's coordinate space) that completely encloses the intersection of the two volumes. Corner points are in the space of volume 1. Returns FALSE if no intersection. */ gboolean amitk_volume_volume_intersection_corners(const AmitkVolume * volume1, const AmitkVolume * volume2, AmitkCorners return_corners) { gint i; g_return_val_if_fail(AMITK_IS_VOLUME(volume1), FALSE); g_return_val_if_fail(AMITK_IS_VOLUME(volume2), FALSE); g_return_val_if_fail(AMITK_VOLUME_VALID(volume1), FALSE); g_return_val_if_fail(AMITK_VOLUME_VALID(volume2), FALSE); /* get the corners in the volume's space that orthogonally encloses the roi */ amitk_volume_get_enclosing_corners(volume2, AMITK_SPACE(volume1), return_corners); /* and reduce the size of the intersection box */ for (i=0; i<2; i++) { if (return_corners[i].x < 0.0) return_corners[i].x = 0; if (return_corners[i].y < 0.0) return_corners[i].y = 0; if (return_corners[i].z < 0.0) return_corners[i].z = 0; if (return_corners[i].x > volume1->corner.x) return_corners[i].x = volume1->corner.x; if (return_corners[i].y > volume1->corner.y) return_corners[i].y = volume1->corner.y; if (return_corners[i].z > volume1->corner.z) return_corners[i].z = volume1->corner.z; } if (REAL_EQUAL(return_corners[0].x, return_corners[1].x) || REAL_EQUAL(return_corners[0].y, return_corners[1].y) || REAL_EQUAL(return_corners[0].z, return_corners[1].z)) return FALSE; else return TRUE; } /* returns the maximal dimensional size of a list of volumes */ amide_real_t amitk_volumes_get_max_size(GList * objects) { amide_real_t temp, max_size; if (objects == NULL) return -1.0; /* invalid */ /* first process the rest of the list */ max_size = amitk_volumes_get_max_size(objects->next); /* now process and compare to the children */ temp = amitk_volumes_get_max_size(AMITK_OBJECT_CHILDREN(objects->data)); if (temp > max_size) max_size = temp; /* and process this guy */ if (AMITK_IS_VOLUME(objects->data)) if (AMITK_VOLUME_VALID(objects->data)) { temp = point_max_dim(AMITK_VOLUME_CORNER(objects->data)); if (temp > max_size) max_size = temp; } return max_size; } /* given a list of volumes, a view space, a view point, and a thickness, calculates an appropriate slab volume in which the specified volumes will be containted. Returns true if the given volume structure is changed. view_center should be in the base reference frame. */ /* field of view is in percent */ gboolean amitk_volumes_calc_display_volume(const GList * volumes, const AmitkSpace * space, const AmitkPoint view_center, const amide_real_t thickness, const amide_real_t fov, AmitkVolume * volume) { AmitkCorners temp_corner; AmitkPoint temp_point; gboolean changed = FALSE; gboolean valid; AmitkPoint width; amide_real_t max_width; if (volumes == NULL) return FALSE; /* set the space of our view volume if needed */ if (!amitk_space_equal(space, AMITK_SPACE(volume))) { amitk_space_copy_in_place(AMITK_SPACE(volume), space); changed = TRUE; } /* figure out the corners */ valid = amitk_volumes_get_enclosing_corners(volumes,space, temp_corner); /* update the corners appropriately */ if (valid) { temp_point = amitk_space_b2s(space, view_center); /* compensate for field of view */ width = point_sub(temp_corner[1], temp_corner[0]); max_width = (fov/100.0)*POINT_MAX(width); if (width.x > max_width) { /* bigger than FOV */ if ((temp_point.x-max_width/2.0) < temp_corner[0].x) temp_corner[1].x = temp_corner[0].x+max_width; else if ((temp_point.x+max_width/2.0) > temp_corner[1].x) temp_corner[0].x = temp_corner[1].x-max_width; else { temp_corner[0].x = temp_point.x - max_width/2.0; temp_corner[1].x = temp_point.x + max_width/2.0; } } if (width.y > max_width) { if ((temp_point.y-max_width/2.0) < temp_corner[0].y) temp_corner[1].y = temp_corner[0].y+max_width; else if ((temp_point.y+max_width/2.0) > temp_corner[1].y) temp_corner[0].y = temp_corner[1].y-max_width; else { temp_corner[0].y = temp_point.y - max_width/2.0; temp_corner[1].y = temp_point.y + max_width/2.0; } } temp_corner[0].z = temp_point.z - thickness/2.0; temp_corner[1].z = temp_point.z + thickness/2.0; temp_corner[0] = amitk_space_s2b(space, temp_corner[0]); temp_corner[1] = amitk_space_s2b(space, temp_corner[1]); if (!POINT_EQUAL(AMITK_SPACE_OFFSET(volume), temp_corner[0])) { amitk_space_set_offset(AMITK_SPACE(volume), temp_corner[0]); changed = TRUE; } temp_corner[1] = amitk_space_b2s(AMITK_SPACE(volume), temp_corner[1]); if (!POINT_EQUAL(AMITK_VOLUME_CORNER(volume), temp_corner[1])) { amitk_volume_set_corner(volume, temp_corner[1]); changed = TRUE; } } return changed; } amide-1.0.5/src/amitk_data_set_variable_type.c0000664000175000017500000006734112270273714021300 0ustar loeningloening/* amitk_data_set_variable_type.c - used to generate the different amitk_data_set_*.c files * * Part of amide - Amide's a Medical Image Data Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amitk_data_set_`'m4_Variable_Type`'_`'m4_Scale_Dim`'.h" #include "amitk_data_set_FLOAT_0D_SCALING.h" #ifdef AMIDE_DEBUG #include #endif #define DIM_TYPE_`'m4_Scale_Dim`' #define DATA_TYPE_`'m4_Variable_Type`' /* function to calculate the max/min values of a slice within a data set */ void amitk_data_set_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_`'m4_Intercept`'calc_slice_min_max(AmitkDataSet * data_set, const amide_intpoint_t frame, const amide_intpoint_t gate, const amide_intpoint_t z, amitk_format_DOUBLE_t * pmin, amitk_format_DOUBLE_t * pmax) { AmitkVoxel i; amide_data_t max, min, temp; AmitkVoxel dim; dim = AMITK_DATA_SET_DIM(data_set); i.t = frame; i.g = gate; i.z = z; i.y = i.x = 0; temp = AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_`'m4_Intercept`'CONTENT(data_set, i); if (finite(temp)) max = min = temp; else max = min = 0.0; /* just throw in zero */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) { temp = AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_`'m4_Intercept`'CONTENT(data_set, i); if (finite(temp)) { if (temp > max) max = temp; else if (temp < min) min = temp; } } if (pmin != NULL) *pmin = min; if (pmax != NULL) *pmax = max; return; } /* generate the distribution array for a data_set */ void amitk_data_set_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_`'m4_Intercept`'calc_distribution(AmitkDataSet * data_set, AmitkUpdateFunc update_func, gpointer update_data) { AmitkVoxel i,j; amide_data_t scale, diff; AmitkVoxel distribution_dim; AmitkVoxel data_set_dim; gchar * temp_string; div_t x; gint divider; gint total_planes; gint i_plane; gboolean continue_work=TRUE; AmitkRawData * distribution; if (data_set->distribution != NULL) return; data_set_dim = AMITK_DATA_SET_DIM(data_set); diff = amitk_data_set_get_global_max(data_set) - amitk_data_set_get_global_min(data_set); if (diff == 0.0) scale = 0.0; else scale = (AMITK_DATA_SET_DISTRIBUTION_SIZE-1)/diff; distribution_dim.x = AMITK_DATA_SET_DISTRIBUTION_SIZE; distribution_dim.y = distribution_dim.z = distribution_dim.g = distribution_dim.t = 1; distribution = amitk_raw_data_new_with_data(AMITK_FORMAT_DOUBLE, distribution_dim); if (distribution == NULL) { g_warning(_("couldn't allocate memory space for the data set structure to hold distribution data")); return; } /* initialize the distribution array */ amitk_raw_data_DOUBLE_initialize_data(distribution, 0.0); if (update_func != NULL) { temp_string = g_strdup_printf(_("Generating distribution data for:\n %s"), AMITK_OBJECT_NAME(data_set)); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } total_planes = AMITK_DATA_SET_TOTAL_PLANES(data_set); divider = ((total_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (total_planes/AMITK_UPDATE_DIVIDER); /* now "bin" the data */ j = zero_voxel; i_plane=0; for (i.t = 0; (i.t < data_set_dim.t) && continue_work; i.t++) { for (i.g = 0; (i.g < data_set_dim.g) && continue_work; i.g++) { for ( i.z = 0; (i.z < data_set_dim.z) && continue_work; i.z++, i_plane++) { if (update_func != NULL) { x = div(i_plane,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) i_plane)/((gdouble) total_planes)); } for (i.y = 0; i.y < data_set_dim.y; i.y++) for (i.x = 0; i.x < data_set_dim.x; i.x++) { j.x = scale*(AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_`'m4_Intercept`'CONTENT(data_set,i)-amitk_data_set_get_global_min(data_set)); AMITK_RAW_DATA_DOUBLE_SET_CONTENT(distribution,j) += 1.0; } } } } if (update_func != NULL) /* remove progress bar */ continue_work = (*update_func)(update_data, NULL, (gdouble) 2.0); if (!continue_work) { /* if we quit, get out of here */ g_object_unref(distribution); return; } /* do some log scaling so the distribution is more meaningful, and doesn't get swamped by outlyers */ for (j.x = 0; j.x < distribution_dim.x ; j.x++) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(distribution,j) = log10(AMITK_RAW_DATA_DOUBLE_CONTENT(distribution,j)+1.0); /* and store the distribution with the data set */ data_set->distribution = distribution; return; } /* returns a slice with the appropriate data from the data_set */ AmitkDataSet * amitk_data_set_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_`'m4_Intercept`'get_slice(AmitkDataSet * data_set, const amide_time_t start_time, const amide_time_t duration, const amide_intpoint_t gate, const AmitkCanvasPoint pixel_size, const AmitkVolume * slice_volume) { /* zp_start, where on the zp axis to start the slice, zp (z_prime) corresponds to the rotated axises, if negative, choose the midpoint */ AmitkDataSet * slice = NULL; AmitkVoxel i_voxel; amide_intpoint_t z; amide_real_t max_diff, voxel_length, z_steps; AmitkPoint alt; AmitkPoint stride[AMITK_AXIS_NUM], last[AMITK_AXIS_NUM]; AmitkAxis i_axis; guint k, l; amide_data_t weight; amide_data_t time_weight; amide_intpoint_t start_frame, end_frame; amide_intpoint_t i_gate; amide_time_t end_time; AmitkPoint box_point[8]; AmitkVoxel box_voxel[8]; AmitkVoxel start, end; amide_data_t box_value[8]; AmitkPoint slice_point, ds_point,start_point,diff, nearest_point; AmitkSpace * slice_space; AmitkSpace * data_set_space; #if AMIDE_DEBUG gchar * temp_string; AmitkPoint center_point; #endif AmitkVoxel ds_voxel; amide_data_t weight1, weight2; amide_data_t * weights=NULL; amide_data_t * intermediate_data=NULL; AmitkCorners intersection_corners; AmitkVoxel dim; gint num_gates; gboolean empties=FALSE; /* ----- figure out what frames of this data set to include ----*/ end_time = start_time+duration; start_frame = amitk_data_set_get_frame(data_set, start_time+EPSILON); end_frame = amitk_data_set_get_frame(data_set, end_time-EPSILON); /* the number of gates we'll be looking at */ if (gate < 0) num_gates = AMITK_DATA_SET_NUM_VIEW_GATES(data_set); else num_gates = 1; /* ------------------------- */ dim.x = ceil(fabs(AMITK_VOLUME_X_CORNER(slice_volume))/pixel_size.x); dim.y = ceil(fabs(AMITK_VOLUME_Y_CORNER(slice_volume))/pixel_size.y); dim.z = dim.g = dim.t = 1; /* if we need it, get the weighting matrix */ if (data_set->rendering == AMITK_RENDERING_MPR) { if ((weights = g_try_malloc0(sizeof(amide_data_t)*dim.x*dim.y)) == NULL) { g_warning(_("couldn't allocate memory space for the weights, wanted %dx%d elements"), dim.x, dim.y); goto error; } } /* get an intermediate data matrix to speed things up */ if ((intermediate_data = g_try_malloc0(sizeof(amide_data_t)*dim.x*dim.y)) == NULL) { g_warning(_("couldn't allocate memory space for the intermediate_data, wanted %dx%d elements"), dim.x, dim.y); goto error; } /* get the return slice */ slice = amitk_data_set_new_with_data(NULL, AMITK_DATA_SET_MODALITY(data_set), AMITK_FORMAT_DOUBLE, dim, AMITK_SCALING_TYPE_0D); if (slice == NULL) { g_warning(_("couldn't allocate memory space for the slice, wanted %dx%dx%d elements"), dim.x, dim.y, dim.z); goto error; } slice->slice_parent = data_set; g_object_add_weak_pointer(G_OBJECT(data_set), (gpointer *) &(slice->slice_parent)); slice->voxel_size.x = pixel_size.x; slice->voxel_size.y = pixel_size.y; slice->voxel_size.z = AMITK_VOLUME_Z_CORNER(slice_volume); amitk_space_copy_in_place(AMITK_SPACE(slice), AMITK_SPACE(slice_volume)); slice->scan_start = start_time; slice->thresholding = data_set->thresholding; slice->interpolation = AMITK_DATA_SET_INTERPOLATION(data_set); slice->rendering = AMITK_DATA_SET_RENDERING(data_set); if (gate < 0) { slice->view_start_gate = AMITK_DATA_SET_VIEW_START_GATE(data_set); slice->view_end_gate = AMITK_DATA_SET_VIEW_END_GATE(data_set); } else { slice->view_start_gate = gate; slice->view_end_gate = gate; } amitk_data_set_calc_far_corner(slice); amitk_data_set_set_frame_duration(slice, 0, duration); #if AMIDE_DEBUG center_point = amitk_volume_get_center(slice_volume); temp_string = g_strdup_printf("slice from data_set %s: @ x %5.3f y %5.3f z %5.3f", AMITK_OBJECT_NAME(data_set), center_point.x, center_point.y, center_point.z); amitk_object_set_name(AMITK_OBJECT(slice),temp_string); g_free(temp_string); #endif #ifdef AMIDE_DEBUG_COMMENT_OUT { AmitkCorners real_corner; /* convert to real space */ real_corner[0] = AMITK_SPACE_OFFSET(slice); real_corner[1] = amitk_space_s2b(AMITK_SPACE(slice), AMITK_VOLUME_CORNER(slice)); g_print("new slice from data_set %s\t---------------------\n",AMITK_OBJECT_NAME(data_set)); g_print("\tdim\t\tx %d\t\ty %d\t\tz %d\n", dim.x, dim.y, dim.z); g_print("\treal corner[0]\tx %5.4f\ty %5.4f\tz %5.4f\n", real_corner[0].x,real_corner[0].y,real_corner[0].z); g_print("\treal corner[1]\tx %5.4f\ty %5.4f\tz %5.4f\n", real_corner[1].x,real_corner[1].y,real_corner[1].z); g_print("\tdata set\t\tstart\t%5.4f\tend\t%5.3f\tframes %d to %d\n", start_time, end_time,start_frame,end_frame); } #endif /* get direct pointers to the slice's and data set's spaces for efficiency */ slice_space = AMITK_SPACE(slice); data_set_space = AMITK_SPACE(data_set); /* voxel_length is the length of a voxel given the coordinate frame of the slice. this is used to figure out how many iterations in the z direction we need to do */ alt.x = alt.y = 0.0; alt.z = 1.0; alt = amitk_space_s2s_dim(slice_space, data_set_space, alt); alt = point_mult(alt, data_set->voxel_size); voxel_length = POINT_MAGNITUDE(alt); z_steps = slice->voxel_size.z/voxel_length; /* non-integer */ /* figure out the intersection bounds between the data set and the requested slice volume */ if (amitk_volume_volume_intersection_corners(slice_volume, AMITK_VOLUME(data_set), intersection_corners)) { /* translate the intersection into voxel space */ POINT_TO_VOXEL(intersection_corners[0], slice->voxel_size, 0, 0, start); POINT_TO_VOXEL(intersection_corners[1], slice->voxel_size, 0, 0, end); } else { /* no intersection */ start = zero_voxel; end = zero_voxel; } /* make sure we only iterate over the slice we've already malloc'ed */ if (start.x < 0) start.x = 0; if (start.y < 0) start.y = 0; if (end.x >= dim.x) end.x = dim.x-1; if (end.y >= dim.y) end.y = dim.y-1; /* iterate over those voxels that we won't be covering, and mark them as NAN */ i_voxel.t = i_voxel.g = i_voxel.z = 0; for (i_voxel.y = 0; i_voxel.y < start.y; i_voxel.y++) for (i_voxel.x = 0; i_voxel.x < dim.x; i_voxel.x++) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(slice->raw_data,i_voxel) = NAN; for (i_voxel.y = end.y+1; i_voxel.y < dim.y; i_voxel.y++) for (i_voxel.x = 0; i_voxel.x < dim.x; i_voxel.x++) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(slice->raw_data,i_voxel) = NAN; for (i_voxel.x = 0; i_voxel.x < start.x; i_voxel.x++) for (i_voxel.y = 0; i_voxel.y < dim.y; i_voxel.y++) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(slice->raw_data,i_voxel) = NAN; for (i_voxel.x = end.x+1; i_voxel.x < dim.x; i_voxel.x++) for (i_voxel.y = 0; i_voxel.y < dim.y; i_voxel.y++) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(slice->raw_data,i_voxel) = NAN; switch(data_set->interpolation) { case AMITK_INTERPOLATION_TRILINEAR: /* iterate over the frames we'll be incorporating into this slice */ for (ds_voxel.t = start_frame; ds_voxel.t <= end_frame; ds_voxel.t++) { /* averaging over more then one frame */ if (end_frame-start_frame > 0) { if (ds_voxel.t == start_frame) time_weight = (amitk_data_set_get_end_time(data_set, start_frame)-start_time)/(duration*num_gates); else if (ds_voxel.t == end_frame) time_weight = (end_time-amitk_data_set_get_start_time(data_set, end_frame))/(duration*num_gates); else time_weight = amitk_data_set_get_frame_duration(data_set, ds_voxel.t)/(duration*num_gates); } else time_weight = 1.0/((gdouble) num_gates); for (i_gate=0; i_gate < num_gates; i_gate++) { if (gate < 0) ds_voxel.g = i_gate+AMITK_DATA_SET_VIEW_START_GATE(data_set); else ds_voxel.g = i_gate+gate; if (ds_voxel.g >= AMITK_DATA_SET_NUM_GATES(data_set)) ds_voxel.g -= AMITK_DATA_SET_NUM_GATES(data_set); /* initialize the .t/.g components of box_voxel */ for (l=0; l<8; l=l+1) { box_voxel[l].t = ds_voxel.t; box_voxel[l].g = ds_voxel.g; } /* iterate over the number of planes we'll be compressing into this slice */ for (z = 0; z < ceil(z_steps); z++) { /* the slices z_coordinate for this iteration's slice voxel */ if (ceil(z_steps) > 1.0) slice_point.z = (z+0.5)*voxel_length; else slice_point.z = (0.5)*slice->voxel_size.z; /* only one iteration in z */ /* weight is between 0 and 1, this is used to weight the last voxel in the slice's z direction */ if (floor(z_steps) > z) weight = time_weight/z_steps; else weight = time_weight*(z_steps-floor(z_steps)) / z_steps; /* iterate over the y dimension */ for (i_voxel.y = start.y,k=0; i_voxel.y <= end.y; i_voxel.y++) { /* the slice y_coordinate of the center of this iteration's slice voxel */ slice_point.y = (((amide_real_t) i_voxel.y)+0.5)*slice->voxel_size.y; /* the slice x coord of the center of the first slice voxel in this loop */ slice_point.x = (((amide_real_t) start.x)+0.5)*slice->voxel_size.x; /* iterate over the x dimension */ for (i_voxel.x = start.x; i_voxel.x <= end.x; i_voxel.x++,k++) { /* translate the current point in slice space into the data set's coordinate frame */ ds_point = amitk_space_s2s(slice_space, data_set_space, slice_point); /* get the nearest neighbor in the data set to this slice voxel */ POINT_TO_VOXEL_COORDS_ONLY(ds_point, data_set->voxel_size, ds_voxel); VOXEL_TO_POINT(ds_voxel, data_set->voxel_size, nearest_point); /* figure out which way to go to get the nearest voxels to our slice voxel*/ POINT_SUB(ds_point, nearest_point, diff); /* figure out which voxels to look at */ for (l=0; l<8; l=l+1) { if (diff.x < 0) box_voxel[l].x = (l & 0x1) ? ds_voxel.x-1 : ds_voxel.x; else /* diff.x >= 0 */ box_voxel[l].x = (l & 0x1) ? ds_voxel.x : ds_voxel.x+1; if (diff.y < 0) box_voxel[l].y = (l & 0x2) ? ds_voxel.y-1 : ds_voxel.y; else /* diff.y >= 0 */ box_voxel[l].y = (l & 0x2) ? ds_voxel.y : ds_voxel.y+1; if (diff.z < 0) box_voxel[l].z = (l & 0x4) ? ds_voxel.z-1 : ds_voxel.z; else /* diff.z >= 0 */ box_voxel[l].z = (l & 0x4) ? ds_voxel.z : ds_voxel.z+1; VOXEL_TO_POINT(box_voxel[l], data_set->voxel_size, box_point[l]); /* get the value of the point on the box */ if (amitk_raw_data_includes_voxel(data_set->raw_data, box_voxel[l])) box_value[l] = AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_`'m4_Intercept`'CONTENT(data_set, box_voxel[l]); else { box_value[l] = NAN; empties = TRUE; } } if (empties) { /* slow algorithm - checking for empties */ /* reset value */ empties = FALSE; /* do the x direction linear interpolation of the sets of two points */ for (l=0;l<8;l=l+2) { max_diff = box_point[l+1].x-box_point[l].x; weight1 = ((max_diff - (ds_point.x - box_point[l].x))/max_diff); weight2 = ((max_diff - (box_point[l+1].x - ds_point.x))/max_diff); if (isnan(box_value[l])) { if (weight2 >= weight1) box_value[l] = box_value[l+1]; /* else box_value[l] left as is (NAN/empty) */ } else if (isnan(box_value[l+1])) { if (weight1 < weight2) box_value[l] = NAN; /* else box_value[l] left as is */ } else box_value[l] = (box_value[l] * weight1) + (box_value[l+1] * weight2); } /* do the y direction linear interpolation of the sets of two points */ for (l=0;l<8;l=l+4) { max_diff = box_point[l+2].y-box_point[l].y; weight1 = ((max_diff - (ds_point.y - box_point[l].y))/max_diff); weight2 = ((max_diff - (box_point[l+2].y - ds_point.y))/max_diff); if (isnan(box_value[l])) { if (weight2 >= weight1) box_value[l] = box_value[l+2]; /* else box_value[l] left as is (NAN/empty) */ } else if (isnan(box_value[l+2])) { if (weight1 < weight2) box_value[l] = NAN; /* else box_value[l] left as is */ } else box_value[l] = (box_value[l] * weight1) + (box_value[l+2] * weight2); } /* do the z direction linear interpolation of the sets of two points */ for (l=0;l<8;l=l+8) { max_diff = box_point[l+4].z-box_point[l].z; weight1 = ((max_diff - (ds_point.z - box_point[l].z))/max_diff); weight2 = ((max_diff - (box_point[l+4].z - ds_point.z))/max_diff); if (isnan(box_value[l])) { if (weight2 >= weight1) box_value[l] = box_value[l+4]; /* else box_value[l] left as is (NAN/empty) */ } else if (isnan(box_value[l+4])) { if (weight1 < weight2) box_value[l] = NAN; /* else box_value[l] left as is */ } else box_value[l] = (box_value[l] * weight1) + (box_value[l+4] * weight2); } /* separate into MPR/MIP/minIP algorithms */ if (data_set->rendering == AMITK_RENDERING_MPR) { /* MPR */ if (!isnan(box_value[0])) { intermediate_data[k] += weight*box_value[0]; weights[k] += weight; } } else { /* MIP or MINIP */ if ((z == 0) && (ds_voxel.t == start_frame) && (i_gate == 0)) intermediate_data[k]=box_value[0]; else if (data_set->rendering == AMITK_RENDERING_MIP) /* MIP */ intermediate_data[k] = MAX(box_value[0], intermediate_data[k]); else /* MINIP */ intermediate_data[k] = MIN(box_value[0], intermediate_data[k]); } } else { /* faster */ /* do the x direction linear interpolation of the sets of two points */ for (l=0;l<8;l=l+2) { max_diff = box_point[l+1].x-box_point[l].x; weight1 = ((max_diff - (ds_point.x - box_point[l].x))/max_diff); weight2 = ((max_diff - (box_point[l+1].x - ds_point.x))/max_diff); box_value[l] = (box_value[l] * weight1) + (box_value[l+1] * weight2); } /* do the y direction linear interpolation of the sets of two points */ for (l=0;l<8;l=l+4) { max_diff = box_point[l+2].y-box_point[l].y; weight1 = ((max_diff - (ds_point.y - box_point[l].y))/max_diff); weight2 = ((max_diff - (box_point[l+2].y - ds_point.y))/max_diff); box_value[l] = (box_value[l] * weight1) + (box_value[l+2] * weight2); } /* do the z direction linear interpolation of the sets of two points */ for (l=0;l<8;l=l+8) { max_diff = box_point[l+4].z-box_point[l].z; weight1 = ((max_diff - (ds_point.z - box_point[l].z))/max_diff); weight2 = ((max_diff - (box_point[l+4].z - ds_point.z))/max_diff); box_value[l] = (box_value[l] * weight1) + (box_value[l+4] * weight2); } /* separate into MPR/MIP/minIP algorithms */ if (data_set->rendering == AMITK_RENDERING_MPR) { /* MPR */ intermediate_data[k] += weight*box_value[0]; weights[k] += weight; } else { /* MIP or MINIP */ if ((z == 0) && (ds_voxel.t == start_frame) && (i_gate == 0)) intermediate_data[k]=box_value[0]; else if (data_set->rendering == AMITK_RENDERING_MIP) /* MIP */ intermediate_data[k] = MAX(intermediate_data[k], box_value[0]); else /* MINIP */ intermediate_data[k] = MIN(intermediate_data[k], box_value[0]); } } /* slow (empties) vs fast algorithm */ slice_point.x += slice->voxel_size.x; } } } } } break; case AMITK_INTERPOLATION_NEAREST_NEIGHBOR: default: /* figure out what point in the data set we're going to start at */ start_point.x = ((amide_real_t) start.x+0.5) * slice->voxel_size.x; start_point.y = ((amide_real_t) start.y+0.5) * slice->voxel_size.y; if (ceil(z_steps) > 1.0) start_point.z = voxel_length/2.0; else start_point.z = slice->voxel_size.z/2.0; /* only one iteration in z */ start_point = amitk_space_s2s(slice_space, data_set_space, start_point); /* figure out what stepping one voxel in a given direction in our slice cooresponds to in our data set */ for (i_axis = 0; i_axis < AMITK_AXIS_NUM; i_axis++) { alt.x = (i_axis == AMITK_AXIS_X) ? slice->voxel_size.x : 0.0; alt.y = (i_axis == AMITK_AXIS_Y) ? slice->voxel_size.y : 0.0; alt.z = (i_axis == AMITK_AXIS_Z) ? voxel_length : 0.0; alt = point_add(point_sub(amitk_space_s2b(slice_space, alt), AMITK_SPACE_OFFSET(slice_space)), AMITK_SPACE_OFFSET(data_set_space)); stride[i_axis] = amitk_space_b2s(data_set_space, alt); } /* iterate over the number of frames we'll be incorporating into this slice */ for (ds_voxel.t = start_frame; ds_voxel.t <= end_frame; ds_voxel.t++) { /* averaging over more then one frame */ if (end_frame-start_frame > 0) { if (ds_voxel.t == start_frame) time_weight = (amitk_data_set_get_end_time(data_set, start_frame)-start_time)/(duration*num_gates); else if (ds_voxel.t == end_frame) time_weight = (end_time-amitk_data_set_get_start_time(data_set, end_frame))/(duration*num_gates); else time_weight = amitk_data_set_get_frame_duration(data_set, ds_voxel.t)/(duration*num_gates); } else time_weight = 1.0/((gdouble) num_gates); /* iterate over gates */ for (i_gate=0; i_gate < num_gates; i_gate++) { if (gate < 0) ds_voxel.g = i_gate+AMITK_DATA_SET_VIEW_START_GATE(data_set); else ds_voxel.g = i_gate+gate; if (ds_voxel.g >= AMITK_DATA_SET_NUM_GATES(data_set)) ds_voxel.g -= AMITK_DATA_SET_NUM_GATES(data_set); ds_point = start_point; /* separate into MPR and MIP/MINIP algorithms. A fair amount of code is duplicated within the algorithms. The reason they aren't combined is to keep the MPR vs MIP/MINIP branch point out of the loop and speed things up slightly for the most commonly used selection (MPR) */ switch(data_set->rendering) { case AMITK_RENDERING_MPR: /* iterate over the number of planes we'll be compressing into this slice */ for (z = 0; z < ceil(z_steps); z++) { last[AMITK_AXIS_Z] = ds_point; /* weight is between 0 and 1, this is used to weight the last voxel in the slice's z direction */ if (floor(z_steps) > z) weight = time_weight/z_steps; else weight = time_weight*(z_steps-floor(z_steps)) / z_steps; /* iterate over x and y */ for (i_voxel.y = start.y, k=0; i_voxel.y <= end.y; i_voxel.y++) { last[AMITK_AXIS_Y] = ds_point; for (i_voxel.x = start.x; i_voxel.x <= end.x; i_voxel.x++, k++) { POINT_TO_VOXEL_COORDS_ONLY(ds_point, data_set->voxel_size, ds_voxel); if (amitk_raw_data_includes_voxel(data_set->raw_data,ds_voxel)) { intermediate_data[k] += weight*AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_`'m4_Intercept`'CONTENT(data_set,ds_voxel); weights[k] += weight; } POINT_ADD(ds_point, stride[AMITK_AXIS_X], ds_point); } /* x */ POINT_ADD(last[AMITK_AXIS_Y], stride[AMITK_AXIS_Y], ds_point); } /* y */ POINT_ADD(last[AMITK_AXIS_Z], stride[AMITK_AXIS_Z], ds_point); } /* z */ break; case AMITK_RENDERING_MIP: case AMITK_RENDERING_MINIP: /* iterate over the number of planes we'll be compressing into this slice */ for (z = 0; z < ceil(z_steps); z++) { last[AMITK_AXIS_Z] = ds_point; /* need to initialize based on the first plane we encounter */ if ((z == 0) && (ds_voxel.t == start_frame) && (i_gate == 0)) { /* iterate over x and y */ for (i_voxel.y = start.y,k=0; i_voxel.y <= end.y; i_voxel.y++) { last[AMITK_AXIS_Y] = ds_point; for (i_voxel.x = start.x; i_voxel.x <= end.x; i_voxel.x++,k++) { POINT_TO_VOXEL_COORDS_ONLY(ds_point, data_set->voxel_size, ds_voxel); if (!amitk_raw_data_includes_voxel(data_set->raw_data,ds_voxel)) intermediate_data[k] = NAN; else intermediate_data[k] = AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_`'m4_Intercept`'CONTENT(data_set,ds_voxel); POINT_ADD(ds_point, stride[AMITK_AXIS_X], ds_point); } /* x */ POINT_ADD(last[AMITK_AXIS_Y], stride[AMITK_AXIS_Y], ds_point); } /* y */ } else { /* iterate over everything that's not the first plane */ if (data_set->rendering == AMITK_RENDERING_MIP) { /* iterate over x and y */ for (i_voxel.y = start.y,k=0; i_voxel.y <= end.y; i_voxel.y++) { last[AMITK_AXIS_Y] = ds_point; for (i_voxel.x = start.x; i_voxel.x <= end.x; i_voxel.x++,k++) { POINT_TO_VOXEL_COORDS_ONLY(ds_point, data_set->voxel_size, ds_voxel); if (amitk_raw_data_includes_voxel(data_set->raw_data,ds_voxel)) intermediate_data[k] = MAX(intermediate_data[k], AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_`'m4_Intercept`'CONTENT(data_set,ds_voxel)); POINT_ADD(ds_point, stride[AMITK_AXIS_X], ds_point); } /* x */ POINT_ADD(last[AMITK_AXIS_Y], stride[AMITK_AXIS_Y], ds_point); } /* y */ } else { /* AMITK_RENDERING_MINIP */ /* iterate over x and y */ for (i_voxel.y = start.y,k=0; i_voxel.y <= end.y; i_voxel.y++) { last[AMITK_AXIS_Y] = ds_point; for (i_voxel.x = start.x; i_voxel.x <= end.x; i_voxel.x++,k++) { POINT_TO_VOXEL_COORDS_ONLY(ds_point, data_set->voxel_size, ds_voxel); if (amitk_raw_data_includes_voxel(data_set->raw_data,ds_voxel)) intermediate_data[k] = MIN(intermediate_data[k], AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_`'m4_Intercept`'CONTENT(data_set,ds_voxel)); POINT_ADD(ds_point, stride[AMITK_AXIS_X], ds_point); } /* x */ POINT_ADD(last[AMITK_AXIS_Y], stride[AMITK_AXIS_Y], ds_point); } /* y */ } /* end else, MIP vs MINIP */ } /* end else */ POINT_ADD(last[AMITK_AXIS_Z], stride[AMITK_AXIS_Z], ds_point); } /* z */ break; default: break; } /* MIP vs NON-MIP */ } /* iterating over gates */ } /* iterating over frames */ break; } /* fill in data/normalize if needed */ i_voxel.t = i_voxel.g = i_voxel.z = 0; if (data_set->rendering == AMITK_RENDERING_MPR) { for (i_voxel.y = start.y,k=0; i_voxel.y <= end.y; i_voxel.y++) for (i_voxel.x = start.x; i_voxel.x <= end.x; i_voxel.x++,k++) if (weights[k] > 0) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(slice->raw_data,i_voxel) = intermediate_data[k]/weights[k]; else AMITK_RAW_DATA_DOUBLE_SET_CONTENT(slice->raw_data,i_voxel) = NAN; } else { /* MIP or MINIP */ for (i_voxel.y = start.y,k=0; i_voxel.y <= end.y; i_voxel.y++) for (i_voxel.x = start.x; i_voxel.x <= end.x; i_voxel.x++,k++) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(slice->raw_data,i_voxel) = intermediate_data[k]; } error: if (weights != NULL) g_free(weights); if (intermediate_data != NULL) g_free(intermediate_data); return slice; } amide-1.0.5/src/amitk_object_dialog.c0000644000175000017500000032214012270273730017356 0ustar loeningloening/* amitk_object_dialog.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* adapted from gtkcolorsel.c */ #include "amide_config.h" #include "amide.h" #include "amitk_marshal.h" #include "amitk_object_dialog.h" #include "amitk_study.h" #include "amitk_space_edit.h" #include "amitk_threshold.h" #include "amitk_window_edit.h" #include "amitk_common.h" #include "ui_common.h" #define AMITK_RESPONSE_REVERT 2 #define DIMENSION_STEP 0.2 static void object_dialog_class_init (AmitkObjectDialogClass *class); static void object_dialog_init (AmitkObjectDialog *object_dialog); static void object_dialog_destroy (GtkObject * object); static void object_dialog_construct(AmitkObjectDialog * dialog, AmitkObject * object, AmitkLayout layout); static void dialog_update_entries (AmitkObjectDialog * dialog); static void dialog_update_interpolation(AmitkObjectDialog * dialog); static void dialog_update_rendering(AmitkObjectDialog * dialog); static void dialog_update_conversion(AmitkObjectDialog * dialog); static void dialog_update_roi_sample_item(AmitkObjectDialog * dialog); static void dialog_response_cb (GtkDialog * dialog, gint response_id, gpointer data); static void dialog_change_interpolation_cb (GtkWidget * widget, gpointer data); static void dialog_change_rendering_cb (GtkWidget * widget, gpointer data); static void dialog_conversion_cb (GtkWidget * widget, gpointer data); static void dialog_set_view_center_to_origin_cb(GtkWidget * widget, gpointer data); static void dialog_aspect_ratio_cb (GtkWidget * widget, gpointer data); static void dialog_change_name_cb (GtkWidget * widget, gpointer data); static void dialog_change_creation_date_cb (GtkWidget * widget, gpointer data); static void dialog_change_scan_date_cb (GtkWidget * widget, gpointer data); static void dialog_change_subject_name_cb (GtkWidget * widget, gpointer data); static void dialog_change_subject_id_cb (GtkWidget * widget, gpointer data); static void dialog_change_subject_dob_cb (GtkWidget * widget, gpointer data); static void dialog_change_center_cb (GtkWidget * widget, gpointer data); static void dialog_change_dim_cb (GtkWidget * widget, gpointer data); static void dialog_change_voxel_size_cb (GtkWidget * widget, gpointer data); static void dialog_change_scale_factor_cb (GtkWidget * widget, gpointer data); static void dialog_change_dose_cb (GtkWidget * widget, gpointer data); static void dialog_change_weight_cb (GtkWidget * widget, gpointer data); static void dialog_change_cylinder_cb (GtkWidget * widget, gpointer data); static void dialog_change_scan_start_cb (GtkWidget * widget, gpointer data); static void dialog_change_frame_duration_cb (GtkWidget * widget, gpointer data); static void dialog_change_gate_time_cb (GtkWidget * widget, gpointer data); static void dialog_change_roi_type_cb (GtkWidget * widget, gpointer data); static void dialog_change_modality_cb (GtkWidget * widget, gpointer data); static void dialog_change_subject_orientation_cb(GtkWidget * widget, gpointer data); static void dialog_change_subject_sex_cb (GtkWidget * widget, gpointer data); static void dialog_change_dose_unit_cb (GtkWidget * widget, gpointer data); static void dialog_change_weight_unit_cb (GtkWidget * widget, gpointer data); static void dialog_change_cylinder_unit_cb (GtkWidget * widget, gpointer data); static void dialog_change_roi_width_cb (GtkWidget * widget, gpointer data); #ifdef AMIDE_LIBGNOMECANVAS_AA static void dialog_change_roi_transparency_cb (GtkWidget * widget, gpointer data); #else static void dialog_change_line_style_cb (GtkWidget * widget, gpointer data); static void dialog_change_fill_roi_cb (GtkWidget * widget, gpointer data); #endif static void dialog_change_layout_cb (GtkWidget * widget, gpointer data); static void dialog_change_panel_layout_cb (GtkWidget * widget, gpointer data); static void dialog_change_maintain_size_cb (GtkWidget * widget, gpointer data); static void dialog_change_target_empty_area_cb (GtkWidget * widget, gpointer data); static void dialog_specify_color_cb (GtkWidget * widget, gpointer data); static void dialog_change_color_cb (GtkWidget * widget, gpointer data); static GtkDialogClass *object_dialog_parent_class; GType amitk_object_dialog_get_type (void) { static GType object_dialog_type = 0; if (!object_dialog_type) { GTypeInfo object_dialog_info = { sizeof (AmitkObjectDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) object_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (AmitkObjectDialog), 0, /* # preallocs */ (GInstanceInitFunc) object_dialog_init, NULL /* value table */ }; object_dialog_type = g_type_register_static(GTK_TYPE_DIALOG, "AmitkObjectDialog", &object_dialog_info, 0); } return object_dialog_type; } static void object_dialog_class_init (AmitkObjectDialogClass *klass) { GtkObjectClass *gtkobject_class; gtkobject_class = (GtkObjectClass*) klass; object_dialog_parent_class = g_type_class_peek_parent(klass); gtkobject_class->destroy = object_dialog_destroy; } static void object_dialog_destroy (GtkObject * object) { AmitkObjectDialog * dialog; g_return_if_fail (object != NULL); g_return_if_fail (AMITK_IS_OBJECT_DIALOG (object)); dialog = AMITK_OBJECT_DIALOG(object); if (dialog->object != NULL) { g_signal_handlers_disconnect_by_func(G_OBJECT(dialog->object), dialog_update_entries, dialog); g_signal_handlers_disconnect_by_func(G_OBJECT(dialog->object), dialog_update_interpolation, dialog); g_signal_handlers_disconnect_by_func(G_OBJECT(dialog->object), dialog_update_rendering, dialog); g_signal_handlers_disconnect_by_func(G_OBJECT(dialog->object), dialog_update_conversion, dialog); dialog->object->dialog = NULL; dialog->object = amitk_object_unref(dialog->object); } if (dialog->original_object != NULL) { #if AMIDE_DEBUG { gchar * temp_string; temp_string = g_strdup_printf(_("Copy of %s"), AMITK_OBJECT_NAME(dialog->original_object)); amitk_object_set_name(dialog->original_object,temp_string); g_free(temp_string); } #endif dialog->original_object = amitk_object_unref(dialog->original_object); } if (dialog->duration_spins != NULL) { g_free(dialog->duration_spins); dialog->duration_spins = NULL; } if (GTK_OBJECT_CLASS (object_dialog_parent_class)->destroy) (* GTK_OBJECT_CLASS (object_dialog_parent_class)->destroy) (object); } static void object_dialog_init (AmitkObjectDialog * dialog) { dialog->object = NULL; dialog->original_object = NULL; dialog->aspect_ratio = TRUE; dialog->duration_spins = NULL; return; } static void object_dialog_construct(AmitkObjectDialog * dialog, AmitkObject * object, AmitkLayout layout) { gchar * temp_string = NULL; GtkWidget * packing_table; GtkWidget * label; GtkWidget * hseparator; GtkWidget * vseparator; GtkWidget * axis_indicator; GtkWidget * check_button; GtkWidget * notebook; GtkWidget * space_edit; GtkWidget * hbox; GtkWidget * image; GtkWidget * button; gint table_row; gint inner_table_row; gint table_column; AmitkAxis i_axis; guint i; gboolean immutables; gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); gtk_dialog_add_buttons(GTK_DIALOG(dialog), GTK_STOCK_REVERT_TO_SAVED, AMITK_RESPONSE_REVERT, GTK_STOCK_HELP, GTK_RESPONSE_HELP, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); /* create the temp object which will store the old info if we want revert */ dialog->original_object = amitk_object_copy(object); dialog->object = amitk_object_ref(object); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(dialog_response_cb), NULL); notebook = gtk_notebook_new(); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), notebook); gtk_widget_show(notebook); /* --------------------------- Basic info page --------------------------- */ /* start making the widgets for this dialog box */ packing_table = gtk_table_new(14,4,FALSE); label = gtk_label_new(_("Basic Info")); table_row=0; gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); gtk_widget_show(label); gtk_widget_show(packing_table); /* widgets to change the object's name */ if (AMITK_IS_DATA_SET(object) ) label = gtk_label_new(_("Data Set Name:")); else label = gtk_label_new(_("Name:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->name_entry = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(dialog->name_entry), TRUE); g_signal_connect(G_OBJECT(dialog->name_entry), "changed", G_CALLBACK(dialog_change_name_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table),dialog->name_entry,1,4, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->name_entry); table_row++; if (AMITK_IS_ROI(object)) { AmitkRoiType i_roi_type; AmitkRoiType type_start, type_end; /* widgets to change the object's type */ label = gtk_label_new(_("Type:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->roi_type_menu = gtk_combo_box_new_text(); switch(AMITK_ROI_TYPE(object)) { case AMITK_ROI_TYPE_ELLIPSOID: case AMITK_ROI_TYPE_CYLINDER: case AMITK_ROI_TYPE_BOX: type_start = 0; type_end = AMITK_ROI_TYPE_BOX; break; case AMITK_ROI_TYPE_ISOCONTOUR_2D: case AMITK_ROI_TYPE_ISOCONTOUR_3D: case AMITK_ROI_TYPE_FREEHAND_2D: case AMITK_ROI_TYPE_FREEHAND_3D: type_start = type_end = AMITK_ROI_TYPE(object); break; default: type_start = type_end = 0; g_error("unexpected case in %s at line %d\n", __FILE__, __LINE__); break; } for (i_roi_type=type_start; i_roi_type<=type_end; i_roi_type++) gtk_combo_box_append_text(GTK_COMBO_BOX(dialog->roi_type_menu), amitk_roi_type_get_name(i_roi_type)); if (type_start != type_end) g_signal_connect(G_OBJECT(dialog->roi_type_menu), "changed", G_CALLBACK(dialog_change_roi_type_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->roi_type_menu, 1,2, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->roi_type_menu); table_row++; gtk_widget_show(packing_table); } else if (AMITK_IS_DATA_SET(object)) { AmitkInterpolation i_interpolation; AmitkRendering i_rendering; AmitkConversion i_conversion; AmitkModality i_modality; AmitkDoseUnit i_dose_unit; AmitkWeightUnit i_weight_unit; AmitkCylinderUnit i_cylinder_unit; AmitkSubjectOrientation i_subject_orientation; AmitkSubjectSex i_subject_sex; /* widgets to change the date of the scan name */ label = gtk_label_new(_("Scan Date:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->scan_date_entry = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(dialog->scan_date_entry), TRUE); g_signal_connect(G_OBJECT(dialog->scan_date_entry), "changed", G_CALLBACK(dialog_change_scan_date_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->scan_date_entry,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->scan_date_entry); /* widgets to change the object's modality */ label = gtk_label_new(_("Modality:")); gtk_table_attach(GTK_TABLE(packing_table), label, 2,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->modality_menu = gtk_combo_box_new_text(); for (i_modality=0; i_modalitymodality_menu), amitk_modality_get_name(i_modality)); g_signal_connect(G_OBJECT(dialog->modality_menu), "changed", G_CALLBACK(dialog_change_modality_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->modality_menu, 3,4, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->modality_menu); table_row++; /* widget to change the interpolation */ label = gtk_label_new(_("Interpolation Type:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(packing_table), hbox,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hbox); for (i_interpolation = 0; i_interpolation < AMITK_INTERPOLATION_NUM; i_interpolation++) { if (i_interpolation == 0) dialog->interpolation_button[0] = gtk_radio_button_new(NULL); else dialog->interpolation_button[i_interpolation] = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(dialog->interpolation_button[0])); switch (i_interpolation) { case AMITK_INTERPOLATION_NEAREST_NEIGHBOR: image = gtk_image_new_from_stock("amide_icon_interpolation_nearest_neighbor",GTK_ICON_SIZE_LARGE_TOOLBAR); break; case AMITK_INTERPOLATION_TRILINEAR: image = gtk_image_new_from_stock("amide_icon_interpolation_trilinear",GTK_ICON_SIZE_LARGE_TOOLBAR); break; default: g_error("unexpected case in %s at line %d",__FILE__, __LINE__); break; } gtk_button_set_image(GTK_BUTTON(dialog->interpolation_button[i_interpolation]), image); gtk_box_pack_start(GTK_BOX(hbox), dialog->interpolation_button[i_interpolation], FALSE, FALSE, 3); gtk_widget_show(dialog->interpolation_button[i_interpolation]); gtk_widget_set_tooltip_text(dialog->interpolation_button[i_interpolation], amitk_interpolation_explanations[i_interpolation]); g_object_set_data(G_OBJECT(dialog->interpolation_button[i_interpolation]), "interpolation", GINT_TO_POINTER(i_interpolation)); g_signal_connect(G_OBJECT(dialog->interpolation_button[i_interpolation]), "clicked", G_CALLBACK(dialog_change_interpolation_cb), dialog); } /* widget to change the rendering */ label = gtk_label_new(_("Rendering Type:")); gtk_table_attach(GTK_TABLE(packing_table), label, 2,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->rendering_menu = gtk_combo_box_new_text(); /* gtk_widget_set_tooltip_text(dialog->rendering_menu, _(amitk_rendering_explanation)); combo box's (as of 2.24 at least, don't have functioning tool tips */ for (i_rendering = 0; i_rendering < AMITK_RENDERING_NUM; i_rendering++) gtk_combo_box_append_text(GTK_COMBO_BOX(dialog->rendering_menu), amitk_rendering_get_name(i_rendering)); g_signal_connect(G_OBJECT(dialog->rendering_menu), "changed", G_CALLBACK(dialog_change_rendering_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->rendering_menu, 3,4, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->rendering_menu); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 0, 5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hseparator); table_row++; table_column=0; /* widgets to change the subject name associated with the data */ label = gtk_label_new(_("Subject Name:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->subject_name_entry = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(dialog->subject_name_entry), TRUE); g_signal_connect(G_OBJECT(dialog->subject_name_entry), "changed", G_CALLBACK(dialog_change_subject_name_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->subject_name_entry,1,4, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->subject_name_entry); table_row++; /* widgets to change the id associated with the data */ label = gtk_label_new(_("Subject ID:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->subject_id_entry = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(dialog->subject_id_entry), TRUE); g_signal_connect(G_OBJECT(dialog->subject_id_entry), "changed", G_CALLBACK(dialog_change_subject_id_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->subject_id_entry,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->subject_id_entry); /* widgets to change the subject's date of birth */ label = gtk_label_new(_("Subject DOB:")); gtk_table_attach(GTK_TABLE(packing_table), label, 2,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->subject_dob_entry = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(dialog->subject_dob_entry), TRUE); g_signal_connect(G_OBJECT(dialog->subject_dob_entry), "changed", G_CALLBACK(dialog_change_subject_dob_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->subject_dob_entry,3,4, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->subject_dob_entry); table_row++; /* widgets to change the subject's orientation */ label = gtk_label_new(_("Subject Orientation:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->subject_orientation_menu = gtk_combo_box_new_text(); for (i_subject_orientation=0; i_subject_orientationsubject_orientation_menu), amitk_subject_orientation_get_name(i_subject_orientation)); g_signal_connect(G_OBJECT(dialog->subject_orientation_menu), "changed", G_CALLBACK(dialog_change_subject_orientation_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->subject_orientation_menu, 1,2, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->subject_orientation_menu); /* widgets to change the subject's sex (much easier in the virtual world than in real life) */ label = gtk_label_new(_("Subject Sex:")); gtk_table_attach(GTK_TABLE(packing_table), label, 2,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->subject_sex_menu = gtk_combo_box_new_text(); for (i_subject_sex=0; i_subject_sexsubject_sex_menu), amitk_subject_sex_get_name(i_subject_sex)); g_signal_connect(G_OBJECT(dialog->subject_sex_menu), "changed", G_CALLBACK(dialog_change_subject_sex_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->subject_sex_menu, 3,4, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->subject_sex_menu); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 0, 5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hseparator); table_row++; table_column=0; /* widget to change the scaling factor */ label = gtk_label_new(_("Conversion Type:")); gtk_table_attach(GTK_TABLE(packing_table), label, table_column,table_column+1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); inner_table_row = table_row+1; for (i_conversion=0; i_conversion < AMITK_CONVERSION_NUM; i_conversion++) { if (i_conversion == 0) dialog->conversion_button[0] = gtk_radio_button_new_with_label(NULL, amitk_conversion_names[i_conversion]); else dialog->conversion_button[i_conversion] = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(dialog->conversion_button[0]), amitk_conversion_names[i_conversion]); g_object_set_data(G_OBJECT(dialog->conversion_button[i_conversion]), "conversion", GINT_TO_POINTER(i_conversion)); gtk_table_attach(GTK_TABLE(packing_table), dialog->conversion_button[i_conversion], table_column,table_column+1, inner_table_row, inner_table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->conversion_button[i_conversion]); g_signal_connect(G_OBJECT(dialog->conversion_button[i_conversion]), "clicked", G_CALLBACK(dialog_conversion_cb), dialog); if (i_conversion == 0) inner_table_row+=2; else inner_table_row++; } table_row++; table_column++; label = gtk_label_new(_("Scaling Factor:")); gtk_table_attach(GTK_TABLE(packing_table), label, table_column,table_column+1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->scaling_factor_spin = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(dialog->scaling_factor_spin), FALSE); g_signal_connect(G_OBJECT(dialog->scaling_factor_spin), "value_changed", G_CALLBACK(dialog_change_scale_factor_cb), dialog); g_signal_connect(G_OBJECT(dialog->scaling_factor_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), dialog->scaling_factor_spin, table_column+1,table_column+2,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->scaling_factor_spin); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 1, 5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hseparator); table_row++; /* injected dose */ label = gtk_label_new(_("Injected Dose:")); gtk_table_attach(GTK_TABLE(packing_table), label, table_column,table_column+1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->dose_spin = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(dialog->dose_spin), FALSE); g_signal_connect(G_OBJECT(dialog->dose_spin), "value_changed", G_CALLBACK(dialog_change_dose_cb), dialog); g_signal_connect(G_OBJECT(dialog->dose_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), dialog->dose_spin, table_column+1,table_column+2,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->dose_spin); /* injected dose units */ dialog->dose_unit_menu = gtk_combo_box_new_text(); for (i_dose_unit=0; i_dose_unitdose_unit_menu), amitk_dose_unit_names[i_dose_unit]); g_signal_connect(G_OBJECT(dialog->dose_unit_menu), "changed", G_CALLBACK(dialog_change_dose_unit_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->dose_unit_menu, table_column+2, table_column+3, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->dose_unit_menu); table_row++; /* subject weight */ label = gtk_label_new(_("Subject Weight:")); gtk_table_attach(GTK_TABLE(packing_table), label, table_column,table_column+1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->weight_spin = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(dialog->weight_spin), FALSE); g_signal_connect(G_OBJECT(dialog->weight_spin), "value_changed", G_CALLBACK(dialog_change_weight_cb), dialog); g_signal_connect(G_OBJECT(dialog->weight_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), dialog->weight_spin, table_column+1,table_column+2,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->weight_spin); /* subject weight units */ dialog->weight_unit_menu = gtk_combo_box_new_text(); for (i_weight_unit=0; i_weight_unitweight_unit_menu), amitk_weight_unit_names[i_weight_unit]); g_signal_connect(G_OBJECT(dialog->weight_unit_menu), "changed", G_CALLBACK(dialog_change_weight_unit_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->weight_unit_menu, table_column+2, table_column+3, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->weight_unit_menu); table_row++; /* cylinder factor */ label = gtk_label_new(_("Cylinder Factor:")); gtk_table_attach(GTK_TABLE(packing_table), label, table_column,table_column+1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->cylinder_spin = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(dialog->cylinder_spin), FALSE); g_signal_connect(G_OBJECT(dialog->cylinder_spin), "value_changed", G_CALLBACK(dialog_change_cylinder_cb), dialog); g_signal_connect(G_OBJECT(dialog->cylinder_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), dialog->cylinder_spin, table_column+1,table_column+2,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->cylinder_spin); /* cylinder factor units */ dialog->cylinder_unit_menu = gtk_combo_box_new_text(); for (i_cylinder_unit=0; i_cylinder_unitcylinder_unit_menu), amitk_cylinder_unit_names[i_cylinder_unit]); g_signal_connect(G_OBJECT(dialog->cylinder_unit_menu), "changed", G_CALLBACK(dialog_change_cylinder_unit_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->cylinder_unit_menu, table_column+2, table_column+3, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->cylinder_unit_menu); table_row++; dialog_update_interpolation(dialog); dialog_update_rendering(dialog); dialog_update_conversion(dialog); } else if (AMITK_IS_STUDY(object)) { /* widgets to change the study's creation date */ label = gtk_label_new(_("Creation Date:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->creation_date_entry = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(dialog->creation_date_entry), TRUE); g_signal_connect(G_OBJECT(dialog->creation_date_entry), "changed", G_CALLBACK(dialog_change_creation_date_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), dialog->creation_date_entry,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->creation_date_entry); table_row++; } /* --------------------------- Center adjustment page --------------------------- notes: - shifting the center of an entire study doesn't mean anything, instead, the option is to change the view center */ /* keep this on page 1 for fiducial points */ if (AMITK_IS_FIDUCIAL_MARK(object)) { /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 0, 4, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hseparator); table_row++; } else { /* the next page of options */ packing_table = gtk_table_new(7,7,FALSE); table_row=0; if (AMITK_IS_STUDY(object)) label = gtk_label_new(_("View Center")); else label = gtk_label_new(_("Center")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); gtk_widget_show(label); } if (AMITK_IS_STUDY(object)) label = gtk_label_new(_("View Center (mm from origin)")); else label = gtk_label_new(_("Center Location (mm from origin)")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); table_row++; /* location, and dimensions for data set's */ for (i_axis=0; i_axiscenter_spin[i_axis] = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, DIMENSION_STEP); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(dialog->center_spin[i_axis]), FALSE); g_object_set_data(G_OBJECT(dialog->center_spin[i_axis]), "axis", GINT_TO_POINTER(i_axis)); g_signal_connect(G_OBJECT(dialog->center_spin[i_axis]), "value_changed", G_CALLBACK(dialog_change_center_cb), dialog); g_signal_connect(G_OBJECT(dialog->center_spin[i_axis]), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), dialog->center_spin[i_axis],1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->center_spin[i_axis]); table_row++; } if (AMITK_IS_STUDY(object)) { button = gtk_button_new_with_label("Shift all objects so view center is origin"); gtk_table_attach(GTK_TABLE(packing_table), button, 0,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(dialog_set_view_center_to_origin_cb), object); gtk_widget_show(button); table_row++; } /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 0, 5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hseparator); table_row++; /* a canvas to indicate which way is x, y, and z */ axis_indicator = ui_common_create_view_axis_indicator(layout); gtk_table_attach(GTK_TABLE(packing_table), axis_indicator,0,5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(axis_indicator); table_row++; gtk_widget_show(packing_table); /* --------------------------- Voxel Size Page for Data Set's --------------------------- */ if (AMITK_IS_DATA_SET(object)) { /* the next page of options */ packing_table = gtk_table_new(4,2,FALSE); table_row=0; label = gtk_label_new(_("Voxel Size")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); gtk_widget_show(label); label = gtk_label_new(_("Voxel Size (mm)")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); table_row++; for (i_axis=0; i_axisvoxel_size_spin[i_axis] = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, DIMENSION_STEP); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(dialog->voxel_size_spin[i_axis]), FALSE); g_object_set_data(G_OBJECT(dialog->voxel_size_spin[i_axis]), "axis", GINT_TO_POINTER(i_axis)); g_signal_connect(G_OBJECT(dialog->voxel_size_spin[i_axis]), "value_changed", G_CALLBACK(dialog_change_voxel_size_cb), dialog); g_signal_connect(G_OBJECT(dialog->voxel_size_spin[i_axis]), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), dialog->voxel_size_spin[i_axis],1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->voxel_size_spin[i_axis]); table_row++; } check_button = gtk_check_button_new_with_label ("keep aspect ratio"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button), dialog->aspect_ratio); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(dialog_aspect_ratio_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), check_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(check_button); table_row++; gtk_widget_show(packing_table); } /* --------------------------- Dimension adjustment page for ROI's notes: 3D Isocontours/Freehands have no adjustable dimensions 2D Isocontours/Freehands can have their z dimension adjusted --------------------------- */ if (AMITK_IS_ROI(object)) { if ((AMITK_ROI_TYPE(object) != AMITK_ROI_TYPE_ISOCONTOUR_3D) && (AMITK_ROI_TYPE(object) != AMITK_ROI_TYPE_FREEHAND_3D)) { /* the next page of options */ packing_table = gtk_table_new(4,2,FALSE); table_row=0; label = gtk_label_new(_("Dimensions")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); gtk_widget_show(label); /* widgets to change the dimensions of the objects (in object's space) */ label = gtk_label_new(_("Dimensions (mm) wrt to ROI")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); table_row++; for (i_axis=0; i_axisdimension_spin[i_axis] = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, DIMENSION_STEP); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(dialog->dimension_spin[i_axis]), FALSE); g_object_set_data(G_OBJECT(dialog->dimension_spin[i_axis]), "axis", GINT_TO_POINTER(i_axis)); g_signal_connect(G_OBJECT(dialog->dimension_spin[i_axis]), "value_changed", G_CALLBACK(dialog_change_dim_cb), dialog); g_signal_connect(G_OBJECT(dialog->dimension_spin[i_axis]), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), dialog->dimension_spin[i_axis],1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->dimension_spin[i_axis]); table_row++; } } gtk_widget_show(packing_table); } } /* ---------------------------------------- Rotations page ---------------------------------------- notes: -fiducial points don't need to be rotated,as they're 0 dimensional */ if (!AMITK_IS_FIDUCIAL_MARK(object)) { label = gtk_label_new(_("Rotate")); space_edit = amitk_space_edit_new(object); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), space_edit, label); gtk_widget_show(space_edit); gtk_widget_show(label); } /* ---------------------------------------- Colormap/threshold page ---------------------------------------- */ if (AMITK_IS_DATA_SET(object)) { GtkWidget * threshold; label = gtk_label_new(_("Colormap/Threshold")); threshold = amitk_threshold_new(AMITK_DATA_SET(object), AMITK_THRESHOLD_BOX_LAYOUT, GTK_WINDOW(dialog), FALSE); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), threshold, label); gtk_widget_show(label); gtk_widget_show(threshold); } /* ---------------------------------------- Time page ---------------------------------------- */ if (AMITK_IS_DATA_SET(object)) { GtkWidget * secondary_table; GtkWidget * scrolled; /* start making the page to adjust time values */ label = gtk_label_new(_("Time/Gate")); packing_table = gtk_table_new(4,5,FALSE); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); table_row=0; gtk_widget_show(label); /* scan start time..... */ label = gtk_label_new(_("Scan Start Time (s)")); gtk_table_attach(GTK_TABLE(packing_table),label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->start_spin = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(dialog->start_spin), FALSE); g_signal_connect(GTK_OBJECT(dialog->start_spin), "value_changed", G_CALLBACK(dialog_change_scan_start_cb), dialog); g_signal_connect(G_OBJECT(dialog->start_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), dialog->start_spin,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->start_spin); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator,0,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hseparator); table_row++; /* frame duration(s).... */ label = gtk_label_new(_("Frame")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); label = gtk_label_new(_("Duration (s)")); gtk_table_attach(GTK_TABLE(packing_table), label, 1,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); table_row++; /* make a scrolled area for the info */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); secondary_table = gtk_table_new(AMITK_DATA_SET_NUM_FRAMES(object),2,TRUE); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), secondary_table); gtk_widget_show(secondary_table); gtk_table_attach(GTK_TABLE(packing_table), scrolled, 0,2, table_row, table_row+1, 0, GTK_FILL|GTK_EXPAND, X_PADDING, Y_PADDING); /* get memory for the spin buttons */ dialog->duration_spins = g_try_new(GtkWidget *,AMITK_DATA_SET_NUM_FRAMES(object)); /* iterate throught the frames */ for (i=0; i< AMITK_DATA_SET_NUM_FRAMES(object); i++) { /* this frame's label */ temp_string = g_strdup_printf("%d", i); label = gtk_label_new(temp_string); g_free(temp_string); gtk_table_attach(GTK_TABLE(secondary_table), label, 0,1, i, i+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); /* and this frame's spin_button */ dialog->duration_spins[i] = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(dialog->duration_spins[i]), FALSE); gtk_editable_set_editable(GTK_EDITABLE(dialog->duration_spins[i]), TRUE); g_object_set_data(G_OBJECT(dialog->duration_spins[i]), "frame", GINT_TO_POINTER(i)); g_signal_connect(G_OBJECT(dialog->duration_spins[i]), "value_changed", G_CALLBACK(dialog_change_frame_duration_cb), dialog); g_signal_connect(G_OBJECT(dialog->duration_spins[i]), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(secondary_table), dialog->duration_spins[i],1,2, i, i+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->duration_spins[i]); } gtk_widget_show(scrolled); /* a separator for clarity */ vseparator = gtk_vseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), vseparator,2,3, 0, table_row+1, GTK_FILL, GTK_FILL, X_PADDING, Y_PADDING); gtk_widget_show(vseparator); table_row=0; /* skip two rows to make things line up well */ table_row +=2; /* gate time(s).... */ label = gtk_label_new(_("Gate")); gtk_table_attach(GTK_TABLE(packing_table), label, 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); label = gtk_label_new(_("Trigger Time (s)")); gtk_table_attach(GTK_TABLE(packing_table), label, 4,5, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); table_row++; /* make a scrolled area for the info */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); secondary_table = gtk_table_new(AMITK_DATA_SET_NUM_GATES(object),2,TRUE); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), secondary_table); gtk_widget_show(secondary_table); gtk_table_attach(GTK_TABLE(packing_table), scrolled, 3,5, table_row, table_row+1, 0, GTK_FILL|GTK_EXPAND, X_PADDING, Y_PADDING); /* get memory for the spin buttons */ dialog->gate_spins = g_try_new(GtkWidget *,AMITK_DATA_SET_NUM_GATES(object)); /* iterate throught the gates */ for (i=0; i< AMITK_DATA_SET_NUM_GATES(object); i++) { /* this frame's label */ temp_string = g_strdup_printf("%d", i); label = gtk_label_new(temp_string); g_free(temp_string); gtk_table_attach(GTK_TABLE(secondary_table), label, 0,1, i, i+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); /* and this gates spin_button */ dialog->gate_spins[i] = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(dialog->gate_spins[i]), FALSE); gtk_editable_set_editable(GTK_EDITABLE(dialog->gate_spins[i]), TRUE); g_object_set_data(G_OBJECT(dialog->gate_spins[i]), "gate", GINT_TO_POINTER(i)); g_signal_connect(G_OBJECT(dialog->gate_spins[i]), "value_changed", G_CALLBACK(dialog_change_gate_time_cb), dialog); g_signal_connect(G_OBJECT(dialog->gate_spins[i]), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(secondary_table), dialog->gate_spins[i],1,2, i, i+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->gate_spins[i]); } gtk_widget_show(scrolled); table_row++; gtk_widget_show(packing_table); } /* ---------------------------------------- Misc. Preferences Page ---------------------------------------- */ if (AMITK_IS_STUDY(object) || AMITK_IS_DATA_SET(object)) { packing_table = gtk_table_new(4,2,FALSE); if (AMITK_IS_STUDY(object)) label = gtk_label_new(_("ROI/View Preferences")); else /* AMITK_IS_DATA_SET */ label = gtk_label_new(_("Windowing Prefs")); table_row=0; gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); gtk_widget_show(label); if (AMITK_IS_STUDY(object)) { ui_common_study_preferences_widgets(packing_table, table_row, &(dialog->roi_width_spin), &(dialog->roi_item), #ifdef AMIDE_LIBGNOMECANVAS_AA &(dialog->roi_transparency_spin), #else &(dialog->line_style_menu), &(dialog->fill_roi_button), #endif &(dialog->layout_button1), &(dialog->layout_button2), &(dialog->panel_layout_button1), &(dialog->panel_layout_button2), &(dialog->panel_layout_button3), &(dialog->maintain_size_button), &(dialog->target_size_spin)); g_signal_connect(G_OBJECT(dialog->roi_width_spin), "value_changed", G_CALLBACK(dialog_change_roi_width_cb), dialog); #ifdef AMIDE_LIBGNOMECANVAS_AA g_signal_connect(G_OBJECT(dialog->roi_transparency_spin), "value_changed", G_CALLBACK(dialog_change_roi_transparency_cb), dialog); #else g_signal_connect(G_OBJECT(dialog->line_style_menu), "changed", G_CALLBACK(dialog_change_line_style_cb), dialog); g_signal_connect(G_OBJECT(dialog->fill_roi_button), "toggled", G_CALLBACK(dialog_change_fill_roi_cb), dialog); #endif g_signal_connect(G_OBJECT(dialog->layout_button1), "clicked", G_CALLBACK(dialog_change_layout_cb), dialog); g_signal_connect(G_OBJECT(dialog->layout_button2), "clicked", G_CALLBACK(dialog_change_layout_cb), dialog); g_signal_connect(G_OBJECT(dialog->panel_layout_button1), "clicked", G_CALLBACK(dialog_change_panel_layout_cb), dialog); g_signal_connect(G_OBJECT(dialog->panel_layout_button2), "clicked", G_CALLBACK(dialog_change_panel_layout_cb), dialog); g_signal_connect(G_OBJECT(dialog->panel_layout_button3), "clicked", G_CALLBACK(dialog_change_panel_layout_cb), dialog); g_signal_connect(G_OBJECT(dialog->maintain_size_button), "toggled", G_CALLBACK(dialog_change_maintain_size_cb), dialog); g_signal_connect(G_OBJECT(dialog->target_size_spin), "value_changed", G_CALLBACK(dialog_change_target_empty_area_cb), dialog); } else if (AMITK_IS_DATA_SET(object)) { GtkWidget * windows_widget; GtkWidget * scrolled; scrolled = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); windows_widget = amitk_window_edit_new(AMITK_DATA_SET(object), NULL); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), windows_widget); gtk_widget_show(windows_widget); gtk_table_attach(GTK_TABLE(packing_table), scrolled, 0,4, table_row, table_row+1, 0, GTK_FILL|GTK_EXPAND, X_PADDING, Y_PADDING); gtk_widget_show(scrolled); } gtk_widget_show(packing_table); } /* ---------------------------------------- Specify Color Page ---------------------------------------- */ if (AMITK_IS_ROI(object) || AMITK_IS_FIDUCIAL_MARK(object)) { rgba_t color_rgba; GdkColor color_gdk; guint16 alpha_gdk; GtkWidget * color_sel; packing_table = gtk_table_new(2,2,FALSE); label = gtk_label_new(_("Color")); table_row=0; gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); gtk_widget_show(label); check_button = gtk_check_button_new_with_label ("Specify Color"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button), AMITK_IS_ROI(object) ? AMITK_ROI_SPECIFY_COLOR(object) : AMITK_FIDUCIAL_MARK_SPECIFY_COLOR(object)); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(dialog_specify_color_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), check_button,0,1, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(check_button); table_row++; color_rgba = AMITK_IS_ROI(object) ? AMITK_ROI_COLOR(object) : AMITK_FIDUCIAL_MARK_COLOR(object); color_gdk.red = color_rgba.r << 8; color_gdk.green = color_rgba.g << 8; color_gdk.blue = color_rgba.b << 8; alpha_gdk = color_rgba.a << 8; color_sel = gtk_color_selection_new(); gtk_color_selection_set_has_opacity_control(GTK_COLOR_SELECTION(color_sel), TRUE); gtk_color_selection_set_has_palette(GTK_COLOR_SELECTION(color_sel), TRUE); gtk_color_selection_set_current_alpha(GTK_COLOR_SELECTION(color_sel), alpha_gdk); gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(color_sel), &color_gdk); g_signal_connect(G_OBJECT(color_sel), "color_changed", G_CALLBACK(dialog_change_color_cb), dialog); gtk_table_attach(GTK_TABLE(packing_table), color_sel, 0, 2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(color_sel); table_row++; gtk_widget_show(packing_table); } /* ---------------------------------------- Immutables Page: ---------------------------------------- */ immutables = FALSE; if (AMITK_IS_STUDY(object)) immutables = TRUE; else if (AMITK_IS_DATA_SET(object)) immutables = TRUE; else if (AMITK_IS_ROI(object)) { if (AMITK_ROI_TYPE_ISOCONTOUR(object)) immutables = TRUE; } if (immutables) { packing_table = gtk_table_new(12,5,FALSE); label = gtk_label_new(_("Immutables")); table_row=0; gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); gtk_widget_show(label); if (AMITK_IS_STUDY(object)) { label = gtk_label_new(_("Max-Min Voxel Dim")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->voxel_dim_entry = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(dialog->voxel_dim_entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), dialog->voxel_dim_entry,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->voxel_dim_entry); table_row++; } else if (AMITK_IS_ROI(object)) { if (AMITK_ROI_TYPE_ISOCONTOUR(object)) { label = gtk_label_new(_("Isocontour Min Specified Value")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->isocontour_min_value_entry = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(dialog->isocontour_min_value_entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), dialog->isocontour_min_value_entry,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->isocontour_min_value_entry); table_row++; label = gtk_label_new(_("Isocontour Max Specified Value")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); dialog->isocontour_max_value_entry = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(dialog->isocontour_max_value_entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), dialog->isocontour_max_value_entry,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(dialog->isocontour_max_value_entry); table_row++; } } else if (AMITK_IS_DATA_SET(object)) { AmitkDim i_dim; GtkWidget * entry; gdouble memory_used; AmitkRawData * rd; gint prefix=0; rd = AMITK_DATA_SET_RAW_DATA(object); memory_used = amitk_raw_data_size_data_mem(rd); if ((memory_used/1024.0) > 1.0) { memory_used /= 1024.0; prefix=1; } if ((memory_used/1024.0) > 1.0) { memory_used /= 1024.0; prefix=2; } if ((memory_used/1024.0) > 1.0) { memory_used /= 1024.0; prefix=3; } /* how big in memory the raw data is */ switch(prefix) { case 3: label = gtk_label_new(_("Memory Used (GB):")); break; case 2: label = gtk_label_new(_("Memory Used (MB):")); break; case 1: label = gtk_label_new(_("Memory Used (KB):")); break; case 0: default: label = gtk_label_new(_("Memory Used (bytes):")); break; } gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); entry = gtk_entry_new(); temp_string = g_strdup_printf("%5.3f", memory_used); gtk_entry_set_text(GTK_ENTRY(entry), temp_string); g_free(temp_string); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), entry, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(entry); table_row++; /* widget to tell you the internal data format */ label = gtk_label_new(_("Data Format:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); entry = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry), amitk_format_names[AMITK_DATA_SET_FORMAT(object)]); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), entry, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(entry); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator,0,2, table_row, table_row+1, GTK_FILL, GTK_FILL, X_PADDING, Y_PADDING); gtk_widget_show(hseparator); table_row++; /* widget to tell you the scaling format */ label = gtk_label_new(_("Scale Format:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); entry = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry), amitk_scaling_menu_names[AMITK_DATA_SET_SCALING_TYPE(object)]); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), entry, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(entry); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator,0,2, table_row, table_row+1, GTK_FILL, GTK_FILL, X_PADDING, Y_PADDING); gtk_widget_show(hseparator); table_row++; /* widgets to display the data set dimensions */ label = gtk_label_new(_("Data Set Dimensions (voxels)")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); table_row++; /**************/ for (i_dim=0; i_dim < AMITK_DIM_NUM; i_dim++) { label = gtk_label_new(amitk_dim_get_name(i_dim)); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); entry = gtk_entry_new(); temp_string = g_strdup_printf("%d", voxel_get_dim(AMITK_DATA_SET_DIM(object),i_dim)); gtk_entry_set_text(GTK_ENTRY(entry), temp_string); g_free(temp_string); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), entry,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(entry); table_row++; } /* a separator for clarity */ vseparator = gtk_vseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), vseparator,2,3, 0, table_row, GTK_FILL, GTK_FILL, X_PADDING, Y_PADDING); gtk_widget_show(vseparator); table_row=0; /* MRI parameters */ label = gtk_label_new(_("MRI Parameters")); gtk_table_attach(GTK_TABLE(packing_table), label, 3,5, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); table_row++; /* inversion time */ label = gtk_label_new(_("Inversion Time (ms):")); gtk_table_attach(GTK_TABLE(packing_table), label, 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); entry = gtk_entry_new(); temp_string = g_strdup_printf("%f", AMITK_DATA_SET_INVERSION_TIME(object)); gtk_entry_set_text(GTK_ENTRY(entry), temp_string); g_free(temp_string); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), entry, 4,5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(entry); table_row++; /* echo time */ label = gtk_label_new(_("Echo Time (ms):")); gtk_table_attach(GTK_TABLE(packing_table), label, 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); entry = gtk_entry_new(); temp_string = g_strdup_printf("%f", AMITK_DATA_SET_ECHO_TIME(object)); gtk_entry_set_text(GTK_ENTRY(entry), temp_string); g_free(temp_string); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), entry, 4,5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(entry); table_row++; /* b factor */ label = gtk_label_new(_("Diffusion B Value:")); gtk_table_attach(GTK_TABLE(packing_table), label, 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); entry = gtk_entry_new(); temp_string = g_strdup_printf("%f", AMITK_DATA_SET_DIFFUSION_B_VALUE(object)); gtk_entry_set_text(GTK_ENTRY(entry), temp_string); g_free(temp_string); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), entry, 4,5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(entry); table_row++; /* diffusion direction */ label = gtk_label_new(_("Diffusion Direction:")); gtk_table_attach(GTK_TABLE(packing_table), label, 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); entry = gtk_entry_new(); temp_string = g_strdup_printf("%5.3f %5.3f %5.3f", AMITK_DATA_SET_DIFFUSION_DIRECTION(object).x, AMITK_DATA_SET_DIFFUSION_DIRECTION(object).y, AMITK_DATA_SET_DIFFUSION_DIRECTION(object).z); gtk_entry_set_text(GTK_ENTRY(entry), temp_string); g_free(temp_string); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), entry, 4,5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(entry); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator,3,5, table_row, table_row+1, GTK_FILL, GTK_FILL, X_PADDING, Y_PADDING); gtk_widget_show(hseparator); table_row++; /* additional parameters */ label = gtk_label_new(_("Misc. Parameters")); gtk_table_attach(GTK_TABLE(packing_table), label, 3,5, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); table_row++; /* series number */ label = gtk_label_new(_("Series Number:")); gtk_table_attach(GTK_TABLE(packing_table), label, 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); entry = gtk_entry_new(); temp_string = g_strdup_printf("%d", AMITK_DATA_SET_SERIES_NUMBER(object)); gtk_entry_set_text(GTK_ENTRY(entry), temp_string); g_free(temp_string); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), entry, 4,5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(entry); table_row++; /* dicom image type */ label = gtk_label_new(_("Dicom Image Type:")); gtk_table_attach(GTK_TABLE(packing_table), label, 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); entry = gtk_entry_new(); if (AMITK_DATA_SET_DICOM_IMAGE_TYPE(object) != NULL) gtk_entry_set_text(GTK_ENTRY(entry), AMITK_DATA_SET_DICOM_IMAGE_TYPE(object)); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(packing_table), entry, 4,5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(entry); table_row++; } gtk_widget_show(packing_table); } return; } static void dialog_update_entries(AmitkObjectDialog * dialog) { AmitkAxis i_axis; AmitkPoint center; gchar * temp_str; gint i; gboolean immutables; gboolean center_valid = TRUE; /* object name */ g_signal_handlers_block_by_func(G_OBJECT(dialog->name_entry),G_CALLBACK(dialog_change_name_cb), dialog); if (AMITK_OBJECT_NAME(dialog->object) != NULL) gtk_entry_set_text(GTK_ENTRY(dialog->name_entry), AMITK_OBJECT_NAME(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->name_entry), G_CALLBACK(dialog_change_name_cb), dialog); if (AMITK_IS_ROI(dialog->object)) { g_signal_handlers_block_by_func(G_OBJECT(dialog->roi_type_menu),G_CALLBACK(dialog_change_roi_type_cb), dialog); gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->roi_type_menu), AMITK_ROI_TYPE(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->roi_type_menu),G_CALLBACK(dialog_change_roi_type_cb), dialog); } else if (AMITK_IS_DATA_SET(dialog->object)) { g_signal_handlers_block_by_func(G_OBJECT(dialog->scan_date_entry),G_CALLBACK(dialog_change_scan_date_cb), dialog); gtk_entry_set_text(GTK_ENTRY(dialog->scan_date_entry), AMITK_DATA_SET_SCAN_DATE(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->scan_date_entry),G_CALLBACK(dialog_change_scan_date_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->subject_name_entry),G_CALLBACK(dialog_change_subject_name_cb), dialog); gtk_entry_set_text(GTK_ENTRY(dialog->subject_name_entry), AMITK_DATA_SET_SUBJECT_NAME(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->subject_name_entry),G_CALLBACK(dialog_change_subject_name_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->subject_id_entry),G_CALLBACK(dialog_change_subject_id_cb), dialog); gtk_entry_set_text(GTK_ENTRY(dialog->subject_id_entry), AMITK_DATA_SET_SUBJECT_ID(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->subject_id_entry),G_CALLBACK(dialog_change_subject_id_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->subject_dob_entry),G_CALLBACK(dialog_change_subject_dob_cb), dialog); gtk_entry_set_text(GTK_ENTRY(dialog->subject_dob_entry), AMITK_DATA_SET_SUBJECT_DOB(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->subject_dob_entry),G_CALLBACK(dialog_change_subject_dob_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->modality_menu),G_CALLBACK(dialog_change_modality_cb), dialog); gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->modality_menu), AMITK_DATA_SET_MODALITY(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->modality_menu),G_CALLBACK(dialog_change_modality_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->subject_orientation_menu),G_CALLBACK(dialog_change_subject_orientation_cb), dialog); gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->subject_orientation_menu), AMITK_DATA_SET_SUBJECT_ORIENTATION(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->subject_orientation_menu),G_CALLBACK(dialog_change_subject_orientation_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->subject_sex_menu),G_CALLBACK(dialog_change_subject_sex_cb), dialog); gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->subject_sex_menu), AMITK_DATA_SET_SUBJECT_SEX(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->subject_sex_menu),G_CALLBACK(dialog_change_subject_sex_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->scaling_factor_spin), G_CALLBACK(dialog_change_scale_factor_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->scaling_factor_spin), AMITK_DATA_SET_SCALE_FACTOR(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->scaling_factor_spin), G_CALLBACK(dialog_change_scale_factor_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->dose_spin), G_CALLBACK(dialog_change_dose_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->dose_spin), amitk_dose_unit_convert_to(AMITK_DATA_SET_INJECTED_DOSE(dialog->object), AMITK_DATA_SET_DISPLAYED_DOSE_UNIT(dialog->object))); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->dose_spin), G_CALLBACK(dialog_change_dose_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->dose_unit_menu), G_CALLBACK(dialog_change_dose_unit_cb), dialog); gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->dose_unit_menu), AMITK_DATA_SET_DISPLAYED_DOSE_UNIT(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->dose_unit_menu), G_CALLBACK(dialog_change_dose_unit_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->weight_spin), G_CALLBACK(dialog_change_weight_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->weight_spin), amitk_weight_unit_convert_to(AMITK_DATA_SET_SUBJECT_WEIGHT(dialog->object), AMITK_DATA_SET_DISPLAYED_WEIGHT_UNIT(dialog->object))); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->weight_spin), G_CALLBACK(dialog_change_weight_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->weight_unit_menu), G_CALLBACK(dialog_change_weight_unit_cb), dialog); gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->weight_unit_menu), AMITK_DATA_SET_DISPLAYED_WEIGHT_UNIT(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->weight_unit_menu), G_CALLBACK(dialog_change_weight_unit_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->cylinder_spin), G_CALLBACK(dialog_change_cylinder_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->cylinder_spin), amitk_cylinder_unit_convert_to(AMITK_DATA_SET_CYLINDER_FACTOR(dialog->object), AMITK_DATA_SET_DISPLAYED_CYLINDER_UNIT(dialog->object))); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->cylinder_spin), G_CALLBACK(dialog_change_cylinder_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->cylinder_unit_menu), G_CALLBACK(dialog_change_cylinder_unit_cb), dialog); gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->cylinder_unit_menu), AMITK_DATA_SET_DISPLAYED_CYLINDER_UNIT(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->cylinder_unit_menu), G_CALLBACK(dialog_change_cylinder_unit_cb), dialog); } else if (AMITK_IS_STUDY(dialog->object)) { g_signal_handlers_block_by_func(G_OBJECT(dialog->creation_date_entry),G_CALLBACK(dialog_change_creation_date_cb), dialog); gtk_entry_set_text(GTK_ENTRY(dialog->creation_date_entry), AMITK_STUDY_CREATION_DATE(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->creation_date_entry),G_CALLBACK(dialog_change_creation_date_cb), dialog); } if (AMITK_IS_VOLUME(dialog->object)) { if (AMITK_VOLUME_VALID(dialog->object)) center = amitk_volume_get_center(AMITK_VOLUME(dialog->object)); else center_valid = FALSE; } else if (AMITK_IS_STUDY(dialog->object)) { center = AMITK_STUDY_VIEW_CENTER(dialog->object); } else if (AMITK_IS_FIDUCIAL_MARK(dialog->object)) { center = AMITK_FIDUCIAL_MARK_GET(dialog->object); } else g_return_if_reached(); for (i_axis=0; i_axiscenter_spin[i_axis]), G_CALLBACK(dialog_change_center_cb), dialog); gtk_widget_set_sensitive(GTK_WIDGET(dialog->center_spin[i_axis]), center_valid); if (center_valid) gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->center_spin[i_axis]), point_get_component(center, i_axis)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->center_spin[i_axis]), G_CALLBACK(dialog_change_center_cb), dialog); if (AMITK_IS_DATA_SET(dialog->object)) { g_signal_handlers_block_by_func(G_OBJECT(dialog->voxel_size_spin[i_axis]), G_CALLBACK(dialog_change_voxel_size_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->voxel_size_spin[i_axis]), point_get_component(AMITK_DATA_SET_VOXEL_SIZE(dialog->object), i_axis)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->voxel_size_spin[i_axis]), G_CALLBACK(dialog_change_voxel_size_cb), dialog); } } if (AMITK_IS_ROI(dialog->object)) { if ((AMITK_ROI_TYPE(dialog->object) != AMITK_ROI_TYPE_ISOCONTOUR_3D) && (AMITK_ROI_TYPE(dialog->object) != AMITK_ROI_TYPE_FREEHAND_3D)) { for (i_axis=0; i_axisobject) != AMITK_ROI_TYPE_ISOCONTOUR_2D) && (AMITK_ROI_TYPE(dialog->object) != AMITK_ROI_TYPE_FREEHAND_2D)) || (i_axis == AMITK_AXIS_Z)) { g_signal_handlers_block_by_func(G_OBJECT(dialog->dimension_spin[i_axis]), G_CALLBACK(dialog_change_dim_cb), dialog); gtk_widget_set_sensitive(GTK_WIDGET(dialog->dimension_spin[i_axis]), center_valid); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->dimension_spin[i_axis]), point_get_component(AMITK_VOLUME_CORNER(dialog->object), i_axis)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->dimension_spin[i_axis]), G_CALLBACK(dialog_change_dim_cb), dialog); } } } } /* Preferences Page */ if (AMITK_IS_STUDY(dialog->object)) { dialog_update_roi_sample_item(dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->roi_width_spin), G_CALLBACK(dialog_change_roi_width_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->roi_width_spin), AMITK_STUDY_CANVAS_ROI_WIDTH(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->roi_width_spin), G_CALLBACK(dialog_change_roi_width_cb), dialog); #ifdef AMIDE_LIBGNOMECANVAS_AA g_signal_handlers_block_by_func(G_OBJECT(dialog->roi_transparency_spin), G_CALLBACK(dialog_change_roi_transparency_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->roi_transparency_spin), AMITK_STUDY_CANVAS_ROI_TRANSPARENCY(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->roi_transparency_spin), G_CALLBACK(dialog_change_roi_transparency_cb), dialog); #else g_signal_handlers_block_by_func(G_OBJECT(dialog->line_style_menu), G_CALLBACK(dialog_change_line_style_cb), dialog); gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->line_style_menu), AMITK_STUDY_CANVAS_LINE_STYLE(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->line_style_menu), G_CALLBACK(dialog_change_line_style_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->fill_roi_button), G_CALLBACK(dialog_change_fill_roi_cb), dialog); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->fill_roi_button), AMITK_STUDY_CANVAS_FILL_ROI(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->fill_roi_button), G_CALLBACK(dialog_change_fill_roi_cb), dialog); #endif g_signal_handlers_block_by_func(G_OBJECT(dialog->layout_button1), G_CALLBACK(dialog_change_layout_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->layout_button2), G_CALLBACK(dialog_change_layout_cb), dialog); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->layout_button1), (AMITK_STUDY_CANVAS_LAYOUT(dialog->object) == AMITK_LAYOUT_LINEAR)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->layout_button2), (AMITK_STUDY_CANVAS_LAYOUT(dialog->object) == AMITK_LAYOUT_ORTHOGONAL)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->layout_button1), G_CALLBACK(dialog_change_layout_cb), dialog); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->layout_button2), G_CALLBACK(dialog_change_layout_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->panel_layout_button1), G_CALLBACK(dialog_change_panel_layout_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->panel_layout_button2), G_CALLBACK(dialog_change_panel_layout_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->panel_layout_button3), G_CALLBACK(dialog_change_panel_layout_cb), dialog); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->panel_layout_button1), (AMITK_STUDY_PANEL_LAYOUT(dialog->object) == AMITK_PANEL_LAYOUT_MIXED)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->panel_layout_button2), (AMITK_STUDY_PANEL_LAYOUT(dialog->object) == AMITK_PANEL_LAYOUT_LINEAR_X)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->panel_layout_button3), (AMITK_STUDY_PANEL_LAYOUT(dialog->object) == AMITK_PANEL_LAYOUT_LINEAR_Y)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->panel_layout_button1), G_CALLBACK(dialog_change_panel_layout_cb), dialog); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->panel_layout_button2), G_CALLBACK(dialog_change_panel_layout_cb), dialog); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->panel_layout_button3), G_CALLBACK(dialog_change_panel_layout_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->maintain_size_button), G_CALLBACK(dialog_change_maintain_size_cb), dialog); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->maintain_size_button), AMITK_STUDY_CANVAS_MAINTAIN_SIZE(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->maintain_size_button), G_CALLBACK(dialog_change_maintain_size_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->target_size_spin), G_CALLBACK(dialog_change_target_empty_area_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->target_size_spin), AMITK_STUDY_CANVAS_TARGET_EMPTY_AREA(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->target_size_spin), G_CALLBACK(dialog_change_target_empty_area_cb), dialog); } /* Immutables Page */ immutables = FALSE; if (AMITK_IS_STUDY(dialog->object)) immutables = TRUE; else if (AMITK_IS_DATA_SET(dialog->object)) immutables = TRUE; else if (AMITK_IS_ROI(dialog->object)) if (AMITK_ROI_TYPE_ISOCONTOUR(dialog->object)) immutables = TRUE; if (immutables) { if (AMITK_IS_STUDY(dialog->object)) { temp_str = g_strdup_printf("%f", AMITK_STUDY_VOXEL_DIM(dialog->object)); gtk_entry_set_text(GTK_ENTRY(dialog->voxel_dim_entry), temp_str); g_free(temp_str); } else if AMITK_IS_ROI(dialog->object) { if (AMITK_ROI_TYPE_ISOCONTOUR(dialog->object)) { temp_str = g_strdup_printf("%f", AMITK_ROI_ISOCONTOUR_MIN_VALUE(dialog->object)); gtk_entry_set_text(GTK_ENTRY(dialog->isocontour_min_value_entry), temp_str); g_free(temp_str); gtk_widget_set_sensitive(dialog->isocontour_min_value_entry, AMITK_ROI_ISOCONTOUR_RANGE(dialog->object) != AMITK_ROI_ISOCONTOUR_RANGE_BELOW_MAX); temp_str = g_strdup_printf("%f", AMITK_ROI_ISOCONTOUR_MAX_VALUE(dialog->object)); gtk_entry_set_text(GTK_ENTRY(dialog->isocontour_max_value_entry), temp_str); g_free(temp_str); gtk_widget_set_sensitive(dialog->isocontour_max_value_entry, AMITK_ROI_ISOCONTOUR_RANGE(dialog->object) != AMITK_ROI_ISOCONTOUR_RANGE_ABOVE_MIN); } } else if (AMITK_IS_DATA_SET(dialog->object)) { g_signal_handlers_block_by_func(G_OBJECT(dialog->start_spin), G_CALLBACK(dialog_change_scan_start_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->start_spin), AMITK_DATA_SET_SCAN_START(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->start_spin), G_CALLBACK(dialog_change_scan_start_cb), dialog); /* iterate throught the frames */ for (i=0; i< AMITK_DATA_SET_NUM_FRAMES(dialog->object); i++) { g_signal_handlers_block_by_func(G_OBJECT(dialog->duration_spins[i]), G_CALLBACK(dialog_change_frame_duration_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->duration_spins[i]), amitk_data_set_get_frame_duration(AMITK_DATA_SET(dialog->object),i)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->duration_spins[i]), G_CALLBACK(dialog_change_frame_duration_cb), dialog); } /* iterate throught the gates */ for (i=0; i< AMITK_DATA_SET_NUM_GATES(dialog->object); i++) { g_signal_handlers_block_by_func(G_OBJECT(dialog->gate_spins[i]), G_CALLBACK(dialog_change_gate_time_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->gate_spins[i]), amitk_data_set_get_gate_time(AMITK_DATA_SET(dialog->object),i)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->gate_spins[i]), G_CALLBACK(dialog_change_gate_time_cb), dialog); } } } return; } /* set which toggle button is depressed */ static void dialog_update_interpolation(AmitkObjectDialog * dialog) { AmitkInterpolation i_interpolation; AmitkInterpolation interpolation; interpolation = AMITK_DATA_SET_INTERPOLATION(dialog->object); for (i_interpolation=0; i_interpolation < AMITK_INTERPOLATION_NUM; i_interpolation++) g_signal_handlers_block_by_func(G_OBJECT(dialog->interpolation_button[i_interpolation]), G_CALLBACK(dialog_change_interpolation_cb), dialog); /* need the button pressed to get the display to update correctly */ gtk_button_pressed(GTK_BUTTON(dialog->interpolation_button[interpolation])); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->interpolation_button[interpolation]),TRUE); for (i_interpolation=0; i_interpolation < AMITK_INTERPOLATION_NUM; i_interpolation++) g_signal_handlers_unblock_by_func(G_OBJECT(dialog->interpolation_button[i_interpolation]), G_CALLBACK(dialog_change_interpolation_cb), dialog); return; } /* set which combo box item is present */ static void dialog_update_rendering(AmitkObjectDialog * dialog) { g_signal_handlers_block_by_func(G_OBJECT(dialog->rendering_menu), G_CALLBACK(dialog_change_rendering_cb), dialog); gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->rendering_menu), AMITK_DATA_SET_RENDERING(dialog->object)); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->rendering_menu), G_CALLBACK(dialog_change_rendering_cb), dialog); return; } static void dialog_update_conversion(AmitkObjectDialog * dialog) { AmitkConversion i_conversion; AmitkConversion conversion; conversion = AMITK_DATA_SET_CONVERSION(dialog->object); for (i_conversion=0; i_conversion < AMITK_CONVERSION_NUM; i_conversion++) g_signal_handlers_block_by_func(G_OBJECT(dialog->conversion_button[i_conversion]), G_CALLBACK(dialog_conversion_cb), dialog); /* need the button pressed to get the display to update correctly */ gtk_button_pressed(GTK_BUTTON(dialog->conversion_button[conversion])); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->conversion_button[conversion]),TRUE); for (i_conversion=0; i_conversion < AMITK_CONVERSION_NUM; i_conversion++) g_signal_handlers_unblock_by_func(G_OBJECT(dialog->conversion_button[i_conversion]), G_CALLBACK(dialog_conversion_cb), dialog); switch (conversion) { case AMITK_CONVERSION_PERCENT_ID_PER_CC: gtk_widget_set_sensitive(dialog->scaling_factor_spin, FALSE); gtk_widget_set_sensitive(dialog->dose_spin, TRUE); gtk_widget_set_sensitive(dialog->weight_spin, FALSE); gtk_widget_set_sensitive(dialog->cylinder_spin, TRUE); break; case AMITK_CONVERSION_SUV: gtk_widget_set_sensitive(dialog->scaling_factor_spin, FALSE); gtk_widget_set_sensitive(dialog->dose_spin, TRUE); gtk_widget_set_sensitive(dialog->weight_spin, TRUE); gtk_widget_set_sensitive(dialog->cylinder_spin, TRUE); break; case AMITK_CONVERSION_STRAIGHT: default: gtk_widget_set_sensitive(dialog->scaling_factor_spin, TRUE); gtk_widget_set_sensitive(dialog->dose_spin, FALSE); gtk_widget_set_sensitive(dialog->weight_spin, FALSE); gtk_widget_set_sensitive(dialog->cylinder_spin, FALSE); break; } } static void dialog_update_roi_sample_item(AmitkObjectDialog * dialog) { ui_common_update_sample_roi_item(dialog->roi_item, AMITK_STUDY_CANVAS_ROI_WIDTH(dialog->object), #ifdef AMIDE_LIBGNOMECANVAS_AA AMITK_STUDY_CANVAS_ROI_TRANSPARENCY(dialog->object) #else AMITK_STUDY_CANVAS_LINE_STYLE(dialog->object) #endif ); return; } static void dialog_change_interpolation_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; AmitkInterpolation interpolation; interpolation = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget),"interpolation")); amitk_data_set_set_interpolation(AMITK_DATA_SET(dialog->object), interpolation); return; } static void dialog_change_rendering_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); amitk_data_set_set_rendering(AMITK_DATA_SET(dialog->object), gtk_combo_box_get_active(GTK_COMBO_BOX(widget))); return; } static void dialog_conversion_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; AmitkConversion conversion; conversion = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget),"conversion")); amitk_data_set_set_conversion(AMITK_DATA_SET(dialog->object), conversion); return; } static void dialog_set_view_center_to_origin_cb(GtkWidget * widget, gpointer data) { AmitkStudy * study = data; AmitkPoint shift; GList * objects; g_return_if_fail(AMITK_IS_STUDY(data)); /* move all children by the given amount */ objects = AMITK_OBJECT_CHILDREN(study); shift = point_neg(AMITK_STUDY_VIEW_CENTER(study)); while (objects != NULL) { amitk_space_shift_offset(AMITK_SPACE(objects->data), shift); objects = objects->next; } /* and reset the view center */ amitk_study_set_view_center(study, zero_point); return; } /* function called when the aspect ratio button gets clicked */ static void dialog_aspect_ratio_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog=data; dialog->aspect_ratio = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); return; } /* function called when the name of the roi has been changed */ static void dialog_change_name_cb(GtkWidget * widget, gpointer data) { gchar * new_name; AmitkObjectDialog * dialog = data; /* get the contents of the name entry box and save it */ new_name = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); amitk_object_set_name(dialog->object, new_name); g_free(new_name); return; } /* function called when the creation date of the study has been changed */ static void dialog_change_creation_date_cb(GtkWidget * widget, gpointer data) { gchar * new_date; AmitkObjectDialog * dialog = data; /* get the contents of the name entry box and save it */ new_date = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); amitk_study_set_creation_date(AMITK_STUDY(dialog->object), new_date); g_free(new_date); return; } /* function called when the scan date of the data set has been changed */ static void dialog_change_scan_date_cb(GtkWidget * widget, gpointer data) { gchar * new_date; AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); /* get the contents of the name entry box and save it */ new_date = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); amitk_data_set_set_scan_date(AMITK_DATA_SET(dialog->object), new_date); g_free(new_date); return; } /* function called when the subject name of the data set has been changed */ static void dialog_change_subject_name_cb(GtkWidget * widget, gpointer data) { gchar * new_name; AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); /* get the contents of the name entry box and save it */ new_name = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); amitk_data_set_set_subject_name(AMITK_DATA_SET(dialog->object), new_name); g_free(new_name); return; } /* function called when the subject id of the data set has been changed */ static void dialog_change_subject_id_cb(GtkWidget * widget, gpointer data) { gchar * new_id; AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); /* get the contents of the id entry box and save it */ new_id = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); amitk_data_set_set_subject_id(AMITK_DATA_SET(dialog->object), new_id); g_free(new_id); return; } /* function called when the subject date of birth of the volume has been changed */ static void dialog_change_subject_dob_cb(GtkWidget * widget, gpointer data) { gchar * new_dob; AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); /* get the contents of the name entry box and save it */ new_dob = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); amitk_data_set_set_subject_dob(AMITK_DATA_SET(dialog->object), new_dob); g_free(new_dob); return; } static void dialog_change_center_cb(GtkWidget * widget, gpointer data) { gdouble temp_val; AmitkAxis axis; AmitkPoint old_center; AmitkPoint new_center; AmitkObjectDialog * dialog=data; /* figure out which widget this is */ axis = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "axis")); if (AMITK_IS_VOLUME(dialog->object)) old_center = amitk_volume_get_center(AMITK_VOLUME(dialog->object)); /* in base coords */ else if (AMITK_IS_STUDY(dialog->object)) old_center = AMITK_STUDY_VIEW_CENTER(dialog->object); else if (AMITK_IS_FIDUCIAL_MARK(dialog->object)) old_center = AMITK_FIDUCIAL_MARK_GET(dialog->object); else g_return_if_reached(); new_center = old_center; temp_val = gtk_spin_button_get_value(GTK_SPIN_BUTTON(dialog->center_spin[axis])); point_set_component(&new_center, axis, temp_val); if (AMITK_IS_STUDY(dialog->object)) amitk_study_set_view_center(AMITK_STUDY(dialog->object), new_center); else /* recalculate the object's offset based on the new dimensions/center/and axis */ amitk_space_shift_offset(AMITK_SPACE(dialog->object), point_sub(new_center, old_center)); dialog_update_entries(dialog); return; } static void dialog_change_dim_cb(GtkWidget * widget, gpointer data) { gdouble temp_val; AmitkAxis axis; AmitkPoint shift; AmitkPoint new_corner; AmitkPoint old_corner; AmitkCorners temp_corner; AmitkObjectDialog * dialog=data; /* figure out which widget this is */ axis = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "axis")); /* initialize the center and dimension variables based on the old roi info */ if (AMITK_IS_VOLUME(dialog->object)) new_corner = old_corner = AMITK_VOLUME_CORNER(dialog->object); /* in object's coords */ else g_return_if_reached(); temp_val = gtk_spin_button_get_value(GTK_SPIN_BUTTON(dialog->dimension_spin[axis])); point_set_component(&new_corner, axis, fabs(temp_val)); /* recalculate the object's offset based on the new dimensions/center/and axis */ if (AMITK_IS_ROI(dialog->object)) { temp_corner[0] = amitk_space_s2b(AMITK_SPACE(dialog->object), new_corner); temp_corner[1] = amitk_space_s2b(AMITK_SPACE(dialog->object), old_corner); shift = point_cmult(-0.5, point_sub(temp_corner[0], temp_corner[1])); } amitk_space_shift_offset(AMITK_SPACE(dialog->object), shift); /* reset the far corner */ if (AMITK_IS_ROI(dialog->object)) { amitk_volume_set_corner(AMITK_VOLUME(dialog->object), new_corner); if ((AMITK_ROI_TYPE(dialog->object) == AMITK_ROI_TYPE_ISOCONTOUR_2D) || (AMITK_ROI_TYPE(dialog->object) == AMITK_ROI_TYPE_FREEHAND_2D)) { AmitkPoint new_voxel_size = AMITK_ROI_VOXEL_SIZE(dialog->object); new_voxel_size.z = new_corner.z; amitk_roi_set_voxel_size(AMITK_ROI(dialog->object), new_voxel_size); } } dialog_update_entries(dialog); return; } static void dialog_change_voxel_size_cb(GtkWidget * widget, gpointer data) { gdouble temp_val; AmitkAxis start_axis, end_axis, axis; AmitkAxis i_axis; AmitkObjectDialog * dialog=data; AmitkPoint new_voxel_size=one_point; amide_real_t scale; AmitkPoint center; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); /* figure out which widget this is */ axis = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "axis")); new_voxel_size = AMITK_DATA_SET_VOXEL_SIZE(dialog->object); center = amitk_volume_get_center(AMITK_VOLUME(dialog->object)); /* which ones we need to change */ if (dialog->aspect_ratio) { start_axis = axis; end_axis = start_axis+1; } else { start_axis = 0; end_axis = AMITK_AXIS_NUM; } for (i_axis = start_axis; i_axis < end_axis; i_axis++) { temp_val = gtk_spin_button_get_value(GTK_SPIN_BUTTON(dialog->voxel_size_spin[i_axis])); if (temp_val > EPSILON) { /* can't be having negative/very small numbers */ switch(i_axis) { case AMITK_AXIS_X: if (dialog->aspect_ratio) { scale = temp_val/new_voxel_size.x; new_voxel_size.y = scale*new_voxel_size.y; new_voxel_size.z = scale*new_voxel_size.z; } new_voxel_size.x = temp_val; break; case AMITK_AXIS_Y: if (dialog->aspect_ratio) { scale = temp_val/new_voxel_size.y; new_voxel_size.x = scale*new_voxel_size.x; new_voxel_size.z = scale*new_voxel_size.z; } new_voxel_size.y = temp_val; break; case AMITK_AXIS_Z: if (dialog->aspect_ratio) { scale = temp_val/new_voxel_size.z; new_voxel_size.y = scale*new_voxel_size.y; new_voxel_size.x = scale*new_voxel_size.x; } new_voxel_size.z = temp_val; break; default: g_return_if_reached(); /* error */ break; } } } amitk_data_set_set_voxel_size(AMITK_DATA_SET(dialog->object), new_voxel_size); amitk_volume_set_center(AMITK_VOLUME(dialog->object), center); /* preserve center location */ dialog_update_entries(dialog); return; } static void dialog_change_scale_factor_cb(GtkWidget * widget, gpointer data) { gdouble temp_val; AmitkObjectDialog * dialog=data; temp_val = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); if (fabs(temp_val) > EPSILON) { /* make sure it's a valid number and avoid zero */ amitk_data_set_set_scale_factor(AMITK_DATA_SET(dialog->object), temp_val); } dialog_update_entries(dialog); return; } static void dialog_change_dose_cb(GtkWidget * widget, gpointer data) { amide_data_t injected_dose; AmitkObjectDialog * dialog=data; injected_dose = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); if (injected_dose >= 0.0) { injected_dose = amitk_dose_unit_convert_from(injected_dose, AMITK_DATA_SET_DISPLAYED_DOSE_UNIT(dialog->object)); amitk_data_set_set_injected_dose(AMITK_DATA_SET(dialog->object), injected_dose); } dialog_update_entries(dialog); return; } static void dialog_change_weight_cb(GtkWidget * widget, gpointer data) { amide_data_t subject_weight; AmitkObjectDialog * dialog=data; subject_weight = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); /* we allow zero, so that the user can put in a proxy for "I don't know" */ if (subject_weight >= 0.0) { subject_weight = amitk_weight_unit_convert_from(subject_weight, AMITK_DATA_SET_DISPLAYED_WEIGHT_UNIT(dialog->object)); amitk_data_set_set_subject_weight(AMITK_DATA_SET(dialog->object), subject_weight); } dialog_update_entries(dialog); return; } static void dialog_change_cylinder_cb(GtkWidget * widget, gpointer data) { gdouble cylinder_factor; AmitkObjectDialog * dialog=data; cylinder_factor = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); /* make sure it's a valid number and avoid zero */ if (fabs(cylinder_factor) > EPSILON) { cylinder_factor = amitk_cylinder_unit_convert_from(cylinder_factor, AMITK_DATA_SET_DISPLAYED_CYLINDER_UNIT(dialog->object)); amitk_data_set_set_cylinder_factor(AMITK_DATA_SET(dialog->object), cylinder_factor); } dialog_update_entries(dialog); return; } static void dialog_change_scan_start_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog=data; amitk_data_set_set_scan_start(AMITK_DATA_SET(dialog->object), gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget))); dialog_update_entries(dialog); return; } static void dialog_change_frame_duration_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog=data; guint i; i = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "frame")); amitk_data_set_set_frame_duration(AMITK_DATA_SET(dialog->object),i, gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget))); dialog_update_entries(dialog); return; } static void dialog_change_gate_time_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog=data; guint i; i = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "gate")); amitk_data_set_set_gate_time(AMITK_DATA_SET(dialog->object),i, gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget))); dialog_update_entries(dialog); return; } /* function to change an roi's type */ static void dialog_change_roi_type_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; amitk_roi_set_type(AMITK_ROI(dialog->object), gtk_combo_box_get_active(GTK_COMBO_BOX(widget))); return; } /* function called when the modality type of a data set gets changed */ static void dialog_change_modality_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); amitk_data_set_set_modality(AMITK_DATA_SET(dialog->object), gtk_combo_box_get_active(GTK_COMBO_BOX(widget))); return; } /* function called when the subject orientation of a data set gets changed */ static void dialog_change_subject_orientation_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); /* figure out which menu item called me */ amitk_data_set_set_subject_orientation(AMITK_DATA_SET(dialog->object), gtk_combo_box_get_active(GTK_COMBO_BOX(widget))); return; } /* function called when the subject sex of a data set gets changed */ static void dialog_change_subject_sex_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); /* figure out which menu item called me */ amitk_data_set_set_subject_sex(AMITK_DATA_SET(dialog->object), gtk_combo_box_get_active(GTK_COMBO_BOX(widget))); return; } /* function called when the displayed dose unit type of a data set gets changed */ static void dialog_change_dose_unit_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; AmitkDoseUnit dose_unit; amide_data_t injected_dose; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); dose_unit = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); if (dose_unit != AMITK_DATA_SET_DISPLAYED_DOSE_UNIT(dialog->object)) { injected_dose = amitk_dose_unit_convert_to(AMITK_DATA_SET_INJECTED_DOSE(dialog->object), AMITK_DATA_SET_DISPLAYED_DOSE_UNIT(dialog->object)); injected_dose = amitk_dose_unit_convert_from(injected_dose, dose_unit); amitk_data_set_set_displayed_dose_unit(AMITK_DATA_SET(dialog->object), dose_unit); amitk_data_set_set_injected_dose(AMITK_DATA_SET(dialog->object), injected_dose); } return; } /* function called when the displayed weight unit type of a data set gets changed */ static void dialog_change_weight_unit_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; AmitkWeightUnit weight_unit; amide_data_t subject_weight; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); weight_unit = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); if (weight_unit != AMITK_DATA_SET_DISPLAYED_WEIGHT_UNIT(dialog->object)) { subject_weight = amitk_weight_unit_convert_to(AMITK_DATA_SET_SUBJECT_WEIGHT(dialog->object), AMITK_DATA_SET_DISPLAYED_WEIGHT_UNIT(dialog->object)); subject_weight = amitk_weight_unit_convert_from(subject_weight, weight_unit); amitk_data_set_set_displayed_weight_unit(AMITK_DATA_SET(dialog->object), weight_unit); amitk_data_set_set_subject_weight(AMITK_DATA_SET(dialog->object), subject_weight); } return; } /* function called when the displayed cylinder unit type of a data set gets changed */ static void dialog_change_cylinder_unit_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; AmitkCylinderUnit cylinder_unit; amide_data_t cylinder_factor; g_return_if_fail(AMITK_IS_DATA_SET(dialog->object)); cylinder_unit = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); if (cylinder_unit != AMITK_DATA_SET_DISPLAYED_CYLINDER_UNIT(dialog->object)) { cylinder_factor = amitk_cylinder_unit_convert_to(AMITK_DATA_SET_CYLINDER_FACTOR(dialog->object), AMITK_DATA_SET_DISPLAYED_CYLINDER_UNIT(dialog->object)); cylinder_factor = amitk_cylinder_unit_convert_from(cylinder_factor, cylinder_unit); amitk_data_set_set_displayed_cylinder_unit(AMITK_DATA_SET(dialog->object), cylinder_unit); amitk_data_set_set_cylinder_factor(AMITK_DATA_SET(dialog->object), cylinder_factor); } return; } static void dialog_change_roi_width_cb(GtkWidget * widget, gpointer data){ AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_STUDY(dialog->object)); amitk_study_set_canvas_roi_width(AMITK_STUDY(dialog->object), gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget))); return; } #ifdef AMIDE_LIBGNOMECANVAS_AA static void dialog_change_roi_transparency_cb(GtkWidget * widget, gpointer data){ AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_STUDY(dialog->object)); amitk_study_set_canvas_roi_transparency(AMITK_STUDY(dialog->object), gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget))); return; } #else static void dialog_change_line_style_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_STUDY(dialog->object)); amitk_study_set_canvas_line_style(AMITK_STUDY(dialog->object), gtk_combo_box_get_active(GTK_COMBO_BOX(widget))); return; } static void dialog_change_fill_roi_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_STUDY(dialog->object)); amitk_study_set_canvas_fill_roi(AMITK_STUDY(dialog->object), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); return; } #endif static void dialog_change_layout_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; AmitkLayout new_layout; g_return_if_fail(AMITK_IS_STUDY(dialog->object)); new_layout = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "layout")); amitk_study_set_canvas_layout(AMITK_STUDY(dialog->object),new_layout); return; } static void dialog_change_panel_layout_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; AmitkPanelLayout new_panel_layout; g_return_if_fail(AMITK_IS_STUDY(dialog->object)); new_panel_layout = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "panel_layout")); amitk_study_set_panel_layout(AMITK_STUDY(dialog->object),new_panel_layout); return; } static void dialog_change_maintain_size_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_STUDY(dialog->object)); amitk_study_set_canvas_maintain_size(AMITK_STUDY(dialog->object), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); return; } static void dialog_change_target_empty_area_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; g_return_if_fail(AMITK_IS_STUDY(dialog->object)); amitk_study_set_canvas_target_empty_area(AMITK_STUDY(dialog->object), gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget))); return; } static void dialog_specify_color_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; if (AMITK_IS_ROI(dialog->object)) amitk_roi_set_specify_color(AMITK_ROI(dialog->object), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); else if (AMITK_IS_FIDUCIAL_MARK(dialog->object)) amitk_fiducial_mark_set_specify_color(AMITK_FIDUCIAL_MARK(dialog->object), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); else g_return_if_reached(); return; } static void dialog_change_color_cb(GtkWidget * widget, gpointer data) { AmitkObjectDialog * dialog = data; rgba_t new_color; GdkColor color_gdk; guint16 alpha; gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(widget), &color_gdk); alpha = gtk_color_selection_get_current_alpha(GTK_COLOR_SELECTION(widget)); new_color.r = color_gdk.red >> 8; new_color.g = color_gdk.green >> 8; new_color.b = color_gdk.blue >> 8; new_color.a = alpha >> 8; if (AMITK_IS_ROI(dialog->object)) amitk_roi_set_color(AMITK_ROI(dialog->object), new_color); else if (AMITK_IS_FIDUCIAL_MARK(dialog->object)) amitk_fiducial_mark_set_color(AMITK_FIDUCIAL_MARK(dialog->object),new_color); else g_return_if_reached(); } /* function called when we hit the apply button */ static void dialog_response_cb(GtkDialog* dialog, gint response_id, gpointer data) { gboolean return_val; g_return_if_fail(AMITK_IS_OBJECT_DIALOG(dialog)); switch(response_id) { case AMITK_RESPONSE_REVERT: /* copy the old info on over */ amitk_object_copy_in_place(AMITK_OBJECT_DIALOG(dialog)->object, AMITK_OBJECT_DIALOG(dialog)->original_object); dialog_update_entries(AMITK_OBJECT_DIALOG(dialog)); break; case GTK_RESPONSE_HELP: if (AMITK_IS_DATA_SET(AMITK_OBJECT_DIALOG(dialog)->object)) amide_call_help("data-set-dialog"); else if (AMITK_IS_ROI(AMITK_OBJECT_DIALOG(dialog)->object)) amide_call_help("roi-dialog"); else if (AMITK_IS_FIDUCIAL_MARK(AMITK_OBJECT_DIALOG(dialog)->object)) amide_call_help("fiducial-marker-dialog"); else if (AMITK_IS_STUDY(AMITK_OBJECT_DIALOG(dialog)->object)) amide_call_help("study-dialog"); break; case GTK_RESPONSE_CLOSE: g_signal_emit_by_name(G_OBJECT(dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(dialog)); break; default: break; } return; } GtkWidget* amitk_object_dialog_new (AmitkObject * object) { AmitkObjectDialog *dialog; gchar * temp_string; AmitkObject * study; g_return_val_if_fail(AMITK_IS_OBJECT(object), NULL); /* find study - use for the layout */ if (AMITK_IS_STUDY(object)) study = object; else study = amitk_object_get_parent_of_type(object, AMITK_OBJECT_TYPE_STUDY); /* unreferenced pointer */ g_return_val_if_fail(AMITK_IS_STUDY(study), NULL); if (object->dialog != NULL) { if (AMITK_IS_OBJECT_DIALOG(object->dialog)) return NULL; /* already modifying */ else if (AMITK_IS_THRESHOLD(object->dialog)) gtk_widget_destroy(GTK_WIDGET(object->dialog)); else g_return_val_if_reached(NULL); } dialog = g_object_new (AMITK_TYPE_OBJECT_DIALOG, NULL); object->dialog = G_OBJECT(dialog); object_dialog_construct(dialog, object, AMITK_STUDY_CANVAS_LAYOUT(study)); g_signal_connect_swapped(G_OBJECT(object), "space_changed", G_CALLBACK(dialog_update_entries), dialog); if (AMITK_IS_STUDY(object)) { g_signal_connect_swapped(G_OBJECT(object), "voxel_dim_or_zoom_changed", G_CALLBACK(dialog_update_entries), dialog); g_signal_connect_swapped(G_OBJECT(object), "view_center_changed", G_CALLBACK(dialog_update_entries), dialog); g_signal_connect_swapped(G_OBJECT(object), "canvas_roi_preference_changed", G_CALLBACK(dialog_update_entries), dialog); g_signal_connect_swapped(G_OBJECT(object), "canvas_general_preference_changed", G_CALLBACK(dialog_update_entries), dialog); g_signal_connect_swapped(G_OBJECT(object), "canvas_target_preference_changed", G_CALLBACK(dialog_update_entries), dialog); g_signal_connect_swapped(G_OBJECT(object), "canvas_layout_preference_changed", G_CALLBACK(dialog_update_entries), dialog); g_signal_connect_swapped(G_OBJECT(object), "panel_layout_preference_changed", G_CALLBACK(dialog_update_entries), dialog); } if (AMITK_IS_VOLUME(object)) { g_signal_connect_swapped(G_OBJECT(object), "volume_changed", G_CALLBACK(dialog_update_entries), dialog); } if (AMITK_IS_ROI(object)) { g_signal_connect_swapped(G_OBJECT(object), "roi_changed", G_CALLBACK(dialog_update_entries), dialog); } if (AMITK_IS_FIDUCIAL_MARK(object)) { g_signal_connect_swapped(G_OBJECT(object), "fiducial_mark_changed", G_CALLBACK(dialog_update_entries), dialog); } if (AMITK_IS_DATA_SET(object)) { g_signal_connect_swapped(G_OBJECT(object), "data_set_changed", G_CALLBACK(dialog_update_entries), dialog); g_signal_connect_swapped(G_OBJECT(object), "interpolation_changed", G_CALLBACK(dialog_update_interpolation), dialog); g_signal_connect_swapped(G_OBJECT(object), "rendering_changed", G_CALLBACK(dialog_update_rendering), dialog); g_signal_connect_swapped(G_OBJECT(object), "conversion_changed", G_CALLBACK(dialog_update_conversion), dialog); } /* fill in values */ dialog_update_entries(dialog); temp_string = g_strdup_printf(_("Modification Dialog: %s"),AMITK_OBJECT_NAME(object)); gtk_window_set_title (GTK_WINDOW (dialog), temp_string); g_free(temp_string); return GTK_WIDGET (dialog); } amide-1.0.5/src/amitk_line_profile.c0000664000175000017500000001261312270273723017245 0ustar loeningloening/* amitk_line_profile.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amitk_line_profile.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" enum { LINE_PROFILE_CHANGED, LAST_SIGNAL }; static void line_profile_class_init (AmitkLineProfileClass *klass); static void line_profile_init (AmitkLineProfile *object); static void line_profile_finalize (GObject *object); static GObjectClass * parent_class; static guint line_profile_signals[LAST_SIGNAL]; GType amitk_line_profile_get_type(void) { static GType line_profile_type = 0; if (!line_profile_type) { static const GTypeInfo line_profile_info = { sizeof (AmitkLineProfileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) line_profile_class_init, (GClassFinalizeFunc) NULL, NULL, /* class_data */ sizeof (AmitkLineProfile), 0, /* n_preallocs */ (GInstanceInitFunc) line_profile_init, NULL /* value table */ }; line_profile_type = g_type_register_static (G_TYPE_OBJECT, "AmitkLineProfile", &line_profile_info, 0); } return line_profile_type; } static void line_profile_class_init (AmitkLineProfileClass * class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); parent_class = g_type_class_peek_parent(class); gobject_class->finalize = line_profile_finalize; line_profile_signals[LINE_PROFILE_CHANGED] = g_signal_new ("line_profile_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkLineProfileClass, line_profile_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); } static void line_profile_init (AmitkLineProfile * line_profile) { line_profile->view = AMITK_VIEW_TRANSVERSE; line_profile->angle=0.0; line_profile->visible=FALSE; line_profile->start_point = zero_point; line_profile->end_point = zero_point; return; } static void line_profile_finalize (GObject *object) { G_OBJECT_CLASS (parent_class)->finalize (object); } AmitkLineProfile * amitk_line_profile_new (void) { AmitkLineProfile * line_profile; line_profile = g_object_new(amitk_line_profile_get_type(), NULL); return line_profile; } void amitk_line_profile_copy_in_place(AmitkLineProfile * dest_profile, const AmitkLineProfile * src_profile) { g_return_if_fail(AMITK_IS_LINE_PROFILE(src_profile)); g_return_if_fail(AMITK_IS_LINE_PROFILE(dest_profile)); dest_profile->view = AMITK_LINE_PROFILE_VIEW(src_profile); dest_profile->angle = AMITK_LINE_PROFILE_ANGLE(src_profile); dest_profile->visible = AMITK_LINE_PROFILE_VISIBLE(src_profile); return; } void amitk_line_profile_set_view(AmitkLineProfile * line_profile, AmitkView view) { g_return_if_fail(AMITK_IS_LINE_PROFILE(line_profile)); g_return_if_fail(view >= 0); g_return_if_fail(view < AMITK_VIEW_NUM); if (AMITK_LINE_PROFILE_VIEW(line_profile) != view) { line_profile->view = view; g_signal_emit(G_OBJECT(line_profile), line_profile_signals[LINE_PROFILE_CHANGED], 0); } return; } void amitk_line_profile_set_angle(AmitkLineProfile * line_profile, amide_real_t angle) { g_return_if_fail(AMITK_IS_LINE_PROFILE(line_profile)); if (angle > M_PI) angle-=2.0*M_PI; if (angle < -M_PI) angle+=2.0*M_PI; if (!REAL_EQUAL(AMITK_LINE_PROFILE_ANGLE(line_profile), angle)) { line_profile->angle = angle; g_signal_emit(G_OBJECT(line_profile), line_profile_signals[LINE_PROFILE_CHANGED], 0); } return; } void amitk_line_profile_set_visible(AmitkLineProfile * line_profile, gboolean visible) { g_return_if_fail(AMITK_IS_LINE_PROFILE(line_profile)); if (AMITK_LINE_PROFILE_VISIBLE(line_profile) != visible) { line_profile->visible = visible; g_signal_emit(G_OBJECT(line_profile), line_profile_signals[LINE_PROFILE_CHANGED], 0); } return; } void amitk_line_profile_set_start_point(AmitkLineProfile * line_profile, const AmitkPoint start_point) { g_return_if_fail(AMITK_IS_LINE_PROFILE(line_profile)); if (!POINT_EQUAL(AMITK_LINE_PROFILE_START_POINT(line_profile), start_point)) { line_profile->start_point = start_point; g_signal_emit(G_OBJECT(line_profile), line_profile_signals[LINE_PROFILE_CHANGED], 0); } return; } void amitk_line_profile_set_end_point(AmitkLineProfile * line_profile, const AmitkPoint end_point) { g_return_if_fail(AMITK_IS_LINE_PROFILE(line_profile)); if (!POINT_EQUAL(AMITK_LINE_PROFILE_END_POINT(line_profile), end_point)) { line_profile->end_point = end_point; g_signal_emit(G_OBJECT(line_profile), line_profile_signals[LINE_PROFILE_CHANGED], 0); } return; } amide-1.0.5/src/ui_render_movie.h0000644000175000017500000000231712270274466016574 0ustar loeningloening/* ui_render_movie.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef AMIDE_LIBVOLPACK_SUPPORT #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) /* header files that are always needed with this file */ #include "ui_render.h" /* external functions */ gpointer * ui_render_movie_dialog_create(ui_render_t * ui_render); #endif /* AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT */ #endif /* LIBVOLPACK_SUPPORT */ amide-1.0.5/src/analysis.h0000664000175000017500000000636512270274535015252 0ustar loeningloening/* analysis.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __ANALYSIS_H__ #define __ANALYSIS_H__ /* header files that are always needed with this file */ #include "amitk_study.h" /* defines */ /* typedefs, etc. */ typedef enum { ALL_VOXELS, HIGHEST_FRACTION_VOXELS, VOXELS_NEAR_MAX, VOXELS_GREATER_THAN_VALUE, NUM_CALCULATION_TYPES } analysis_calculation_t; typedef struct _analysis_gate_t analysis_gate_t; typedef struct _analysis_frame_t analysis_frame_t; typedef struct _analysis_volume_t analysis_volume_t; typedef struct _analysis_roi_t analysis_roi_t; typedef struct _analysis_study_t analysis_study_t; typedef struct analysis_element_t { amide_data_t value; amide_real_t weight; AmitkVoxel ds_voxel; } analysis_element_t; struct _analysis_gate_t { /* roi data - array of analysis_element's */ GPtrArray * data_array; /* stats */ amide_data_t mean; amide_data_t median; guint voxels; amide_real_t fractional_voxels; amide_data_t var; amide_data_t min; amide_data_t max; amide_data_t total; /* info */ amide_time_t duration; amide_time_t time_midpoint; amide_time_t gate_time; /* internal */ amide_data_t correction; analysis_gate_t * next_gate_analysis; guint ref_count; }; struct _analysis_frame_t { analysis_gate_t * gate_analyses; guint ref_count; analysis_frame_t * next_frame_analysis; }; struct _analysis_volume_t { AmitkDataSet * data_set; analysis_frame_t * frame_analyses; guint ref_count; analysis_volume_t * next_volume_analysis; }; struct _analysis_roi_t { AmitkRoi * roi; AmitkStudy * study; analysis_calculation_t calculation_type; gboolean accurate; gdouble subfraction; gdouble threshold_percentage; gdouble threshold_value; analysis_volume_t * volume_analyses; guint ref_count; analysis_roi_t * next_roi_analysis; }; /* external functions */ analysis_roi_t * analysis_roi_unref(analysis_roi_t *roi_analysis); /* note, subfraction is only used for calculation_type == HIGHEST_FRACTION_VOXELS, threshold_percentage is only used for calculation_type == VOXELS_NEAR_MAX threshold_value is only used for calculation_type == HIGHER_THAN_VALUE */ analysis_roi_t * analysis_roi_init(AmitkStudy * study, GList * rois, GList * volumes, analysis_calculation_t calculation_type, gboolean accurate, gdouble subfraction, gdouble threshold_percentage, gdouble threshold_value); #endif /* __ANALYSIS_H__ */ amide-1.0.5/src/raw_data_import.c0000644000175000017500000005636312270274003016565 0ustar loeningloening/* raw_data_import.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include #include "amide.h" #include "amide_gconf.h" #include "amitk_common.h" #include "raw_data_import.h" #include "amitk_progress_dialog.h" #define GCONF_AMIDE_RAWDATAIMPORT "RAWDATAIMPORT" /* raw_data information structure */ typedef struct raw_data_info_t { gchar * filename; gchar * name; gsize total_file_size; AmitkRawFormat raw_format; AmitkVoxel data_dim; AmitkPoint voxel_size; AmitkModality modality; amide_data_t scale_factor; guint offset; GtkWidget * num_bytes_label1; GtkWidget * num_bytes_label2; GtkWidget * read_offset_label; GtkWidget * ok_button; } raw_data_info_t; static void change_name_cb(GtkWidget * widget, gpointer data); static void change_scaling_cb(GtkWidget * widget, gpointer data); static void change_entry_cb(GtkWidget * widget, gpointer data); static void change_modality_cb(GtkWidget * widget, gpointer data); static void change_raw_format_cb(GtkWidget * widget, gpointer data); static guint update_num_bytes(raw_data_info_t * raw_data_info); static void read_last_values(AmitkModality * plast_modality, AmitkRawFormat * plast_raw_format, AmitkVoxel * plast_data_dim, AmitkPoint * plast_voxel_size, guint * plast_offset, amide_data_t *plast_scale_factor); static GtkWidget * import_dialog(raw_data_info_t * raw_data_info); static void update_offset_label(raw_data_info_t * raw_data_info); /* function called when the name of the data set has been changed */ static void change_name_cb(GtkWidget * widget, gpointer data) { raw_data_info_t * raw_data_info = data; gchar * new_name; /* get the contents of the name entry box and save it */ new_name = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); g_free(raw_data_info->name); raw_data_info->name = new_name; return; } /* function called to change the scaling factor */ static void change_scaling_cb(GtkWidget * widget, gpointer data) { gchar * str; gint error; gdouble temp_real; raw_data_info_t * raw_data_info = data; /* get the contents of the name entry box */ str = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); /* convert to the correct number */ error = sscanf(str, "%lf", &temp_real); if (error == EOF) return; /* make sure it's a valid number */ g_free(str); /* and save the value */ raw_data_info->scale_factor = temp_real; amide_gconf_set_float(GCONF_AMIDE_RAWDATAIMPORT,"LastScaleFactor", raw_data_info->scale_factor); return; } /* function called when a numerical entry of the data set has been changed, used for the dimensions and voxel_size */ static void change_entry_cb(GtkWidget * widget, gpointer data) { gchar * str; gint error; gdouble temp_real=0.0; gint temp_int=0; guint which_widget; raw_data_info_t * raw_data_info = data; /* figure out which widget this is */ which_widget = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "type")); /* get the contents of the name entry box */ str = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); /* convert to the correct number */ if ((which_widget < AMITK_DIM_NUM) || (which_widget == AMITK_DIM_NUM+AMITK_AXIS_NUM)) { error = sscanf(str, "%d", &temp_int); if (error == EOF) return; /* make sure it's a valid number */ if (temp_int < 0) return; } else { /* one of the voxel_size widgets */ error = sscanf(str, "%lf", &temp_real); if (error == EOF) /* make sure it's a valid number */ return; if (temp_real < 0.0) return; } g_free(str); /* and save the value in our temporary data set structure */ switch(which_widget) { case AMITK_DIM_X: raw_data_info->data_dim.x = temp_int; break; case AMITK_DIM_Y: raw_data_info->data_dim.y = temp_int; break; case AMITK_DIM_Z: raw_data_info->data_dim.z = temp_int; break; case AMITK_DIM_G: raw_data_info->data_dim.g = temp_int; break; case AMITK_DIM_T: raw_data_info->data_dim.t = temp_int; break; case (AMITK_DIM_NUM+AMITK_AXIS_X): raw_data_info->voxel_size.x = temp_real; break; case (AMITK_DIM_NUM+AMITK_AXIS_Y): raw_data_info->voxel_size.y = temp_real; break; case (AMITK_DIM_NUM+AMITK_AXIS_Z): raw_data_info->voxel_size.z = temp_real; break; case (AMITK_DIM_NUM+AMITK_AXIS_NUM): raw_data_info->offset = temp_int; break; default: break; /* do nothing */ } /* recalculate the total number of bytes to be read and have it displayed */ update_num_bytes(raw_data_info); amide_gconf_set_int(GCONF_AMIDE_RAWDATAIMPORT,"LastDataDimG", raw_data_info->data_dim.g); amide_gconf_set_int(GCONF_AMIDE_RAWDATAIMPORT,"LastDataDimT", raw_data_info->data_dim.t); amide_gconf_set_int(GCONF_AMIDE_RAWDATAIMPORT,"LastDataDimZ", raw_data_info->data_dim.z); amide_gconf_set_int(GCONF_AMIDE_RAWDATAIMPORT,"LastDataDimY", raw_data_info->data_dim.y); amide_gconf_set_int(GCONF_AMIDE_RAWDATAIMPORT,"LastDataDimX", raw_data_info->data_dim.x); amide_gconf_set_float(GCONF_AMIDE_RAWDATAIMPORT,"LastVoxelSizeZ", raw_data_info->voxel_size.z); amide_gconf_set_float(GCONF_AMIDE_RAWDATAIMPORT,"LastVoxelSizeY", raw_data_info->voxel_size.y); amide_gconf_set_float(GCONF_AMIDE_RAWDATAIMPORT,"LastVoxelSizeX", raw_data_info->voxel_size.x); amide_gconf_set_int(GCONF_AMIDE_RAWDATAIMPORT,"LastOffset", raw_data_info->offset); return; } /* function to change the modality */ static void change_modality_cb(GtkWidget * widget, gpointer data) { raw_data_info_t * raw_data_info = data; raw_data_info->modality = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); amide_gconf_set_int(GCONF_AMIDE_RAWDATAIMPORT,"LastModality", raw_data_info->modality); return; } /* function to change the raw data file's data format */ static void change_raw_format_cb(GtkWidget * widget, gpointer data) { raw_data_info_t * raw_data_info = data; raw_data_info->raw_format = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); /* recalculate the total number of bytes to be read and have it displayed*/ update_num_bytes(raw_data_info); /* update the offset label so it makes sense */ update_offset_label(raw_data_info); amide_gconf_set_int(GCONF_AMIDE_RAWDATAIMPORT,"LastRawFormat", raw_data_info->raw_format); return; } /* reset the label for the offset entry */ static void update_offset_label(raw_data_info_t * raw_data_info) { if (raw_data_info->raw_format == AMITK_RAW_FORMAT_ASCII_8_NE) gtk_label_set_text(GTK_LABEL(raw_data_info->read_offset_label), _("read offset (entries):")); else gtk_label_set_text(GTK_LABEL(raw_data_info->read_offset_label), _("read offset (bytes):")); } /* calculate the total amount of the file that will be read through */ static guint update_num_bytes(raw_data_info_t * raw_data_info) { gsize num_bytes; guint num_entries; gchar * temp_string; /* how many bytes we're currently reading from the file */ if (raw_data_info->raw_format == AMITK_RAW_FORMAT_ASCII_8_NE) { num_entries = raw_data_info->offset + raw_data_info->data_dim.x*raw_data_info->data_dim.y*raw_data_info->data_dim.z*raw_data_info->data_dim.g*raw_data_info->data_dim.t; gtk_label_set_text(GTK_LABEL(raw_data_info->num_bytes_label1), _("total entries to read through:")); temp_string = g_strdup_printf("%d",num_entries); gtk_label_set_text(GTK_LABEL(raw_data_info->num_bytes_label2), temp_string); g_free(temp_string); /* and figure out a bare minimum for how many bytes might be in the file, this would correspond to all single digit numbers, seperated by spaces */ num_bytes = 2*num_entries; } else { num_bytes = raw_data_info->offset + amitk_raw_format_calc_num_bytes(raw_data_info->data_dim, raw_data_info->raw_format); gtk_label_set_text(GTK_LABEL(raw_data_info->num_bytes_label1), _("total bytes to read through:")); temp_string = g_strdup_printf("%lu",num_bytes); gtk_label_set_text(GTK_LABEL(raw_data_info->num_bytes_label2), temp_string); g_free(temp_string); } /* if we think we can load in the file, desensitise the "ok" button */ gtk_widget_set_sensitive(raw_data_info->ok_button, (num_bytes <= raw_data_info->total_file_size) && (num_bytes > 0)); return num_bytes; } static void read_last_values(AmitkModality * plast_modality, AmitkRawFormat * plast_raw_format, AmitkVoxel * plast_data_dim, AmitkPoint * plast_voxel_size, guint * plast_offset, amide_data_t *plast_scale_factor) { gint temp_int; gfloat temp_float; *plast_modality = amide_gconf_get_int(GCONF_AMIDE_RAWDATAIMPORT,"LastModality"); *plast_raw_format = amide_gconf_get_int(GCONF_AMIDE_RAWDATAIMPORT,"LastRawFormat"); temp_int = amide_gconf_get_int(GCONF_AMIDE_RAWDATAIMPORT,"LastDataDimG"); (*plast_data_dim).g = (temp_int == 0) ? 1 : temp_int; temp_int = amide_gconf_get_int(GCONF_AMIDE_RAWDATAIMPORT,"LastDataDimT"); (*plast_data_dim).t = (temp_int == 0) ? 1 : temp_int; temp_int = amide_gconf_get_int(GCONF_AMIDE_RAWDATAIMPORT,"LastDataDimZ"); (*plast_data_dim).z = (temp_int == 0) ? 1 : temp_int; temp_int = amide_gconf_get_int(GCONF_AMIDE_RAWDATAIMPORT,"LastDataDimY"); (*plast_data_dim).y = (temp_int == 0) ? 1 : temp_int; temp_int = amide_gconf_get_int(GCONF_AMIDE_RAWDATAIMPORT,"LastDataDimX"); (*plast_data_dim).x = (temp_int == 0) ? 1 : temp_int; temp_float = amide_gconf_get_float(GCONF_AMIDE_RAWDATAIMPORT,"LastVoxelSizeZ"); (*plast_voxel_size).z = EQUAL_ZERO(temp_float) ? 1.0 : temp_float; temp_float = amide_gconf_get_float(GCONF_AMIDE_RAWDATAIMPORT,"LastVoxelSizeY"); (*plast_voxel_size).y = EQUAL_ZERO(temp_float) ? 1.0 : temp_float; temp_float = amide_gconf_get_float(GCONF_AMIDE_RAWDATAIMPORT,"LastVoxelSizeX"); (*plast_voxel_size).x = EQUAL_ZERO(temp_float) ? 1.0 : temp_float; *plast_offset = amide_gconf_get_int(GCONF_AMIDE_RAWDATAIMPORT,"LastOffset"); temp_float = amide_gconf_get_float(GCONF_AMIDE_RAWDATAIMPORT,"LastScaleFactor"); *plast_scale_factor = EQUAL_ZERO(temp_float) ? 1.0 : temp_float; return; } /* function to bring up the dialog widget to direct our importing of raw data */ static GtkWidget * import_dialog(raw_data_info_t * raw_data_info) { AmitkModality i_modality; AmitkDim i_dim; AmitkRawFormat i_raw_format; AmitkAxis i_axis; gchar * temp_string = NULL; gchar ** frags; GtkWidget * dialog; GtkWidget * packing_table; GtkWidget * label; GtkWidget * entry; GtkWidget * menu; guint table_row = 0; /* start making the import dialog */ dialog = gtk_dialog_new(); temp_string = g_strdup_printf(_("%s: Raw Data Import Dialog\n"), PACKAGE); gtk_window_set_title(GTK_WINDOW(dialog), temp_string); g_free(temp_string); raw_data_info->ok_button = gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_OK, GTK_RESPONSE_YES); gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE); /* make the packing table */ packing_table = gtk_table_new(10,6,FALSE); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),packing_table); /* widgets to change the roi's name */ label = gtk_label_new(_("name:")); gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 0,1, table_row, table_row+1, GTK_FILL|GTK_EXPAND, 0, X_PADDING, Y_PADDING); /* figure out an initial name for the data */ temp_string = g_path_get_basename(raw_data_info->filename); /* remove the extension of the file */ g_strreverse(temp_string); frags = g_strsplit(temp_string, ".", 2); g_free(temp_string); if (frags[1] != NULL) raw_data_info->name = strdup(frags[1]); else /* no extension on filename */ raw_data_info->name = strdup(frags[0]); g_strfreev(frags); g_strreverse(raw_data_info->name); entry = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry), raw_data_info->name); gtk_editable_set_editable(GTK_EDITABLE(entry), TRUE); g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(change_name_cb), raw_data_info); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(entry),1,3, table_row, table_row+1, GTK_FILL | GTK_EXPAND, 0, X_PADDING, Y_PADDING); table_row++; /* widgets to change the object's modality */ label = gtk_label_new(_("modality:")); gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 0,1, table_row, table_row+1, GTK_FILL|GTK_EXPAND, 0, X_PADDING, Y_PADDING); menu = gtk_combo_box_new_text(); for (i_modality=0; i_modalitymodality); g_signal_connect(G_OBJECT(menu), "changed", G_CALLBACK(change_modality_cb), raw_data_info); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(menu), 1,3, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* widgets to change the raw data file's data format */ label = gtk_label_new(_("data format:")); gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 0,1, table_row, table_row+1, GTK_FILL|GTK_EXPAND, 0, X_PADDING, Y_PADDING); menu = gtk_combo_box_new_text(); for (i_raw_format=0; i_raw_formatraw_format); g_signal_connect(G_OBJECT(menu), "changed", G_CALLBACK(change_raw_format_cb), raw_data_info); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(menu), 1,3, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); /* how many bytes we can read from the file */ label = gtk_label_new(_("file size (bytes):")); gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 3,5, table_row, table_row+1, GTK_FILL | GTK_EXPAND, 0, X_PADDING, Y_PADDING); /* how many bytes we're currently reading from the file */ temp_string = g_strdup_printf("%lu", raw_data_info->total_file_size); label = gtk_label_new(temp_string); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); g_free(temp_string); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 5,6, table_row, table_row+1, GTK_FILL | GTK_EXPAND, 0, X_PADDING, Y_PADDING); table_row++; /* what offset in the raw_data file we should start reading at */ raw_data_info->read_offset_label = gtk_label_new(""); gtk_misc_set_alignment(GTK_MISC(raw_data_info->read_offset_label), 1.0, 0.5); update_offset_label(raw_data_info); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(raw_data_info->read_offset_label), 0,1, table_row, table_row+1, GTK_FILL | GTK_EXPAND, 0, X_PADDING, Y_PADDING); entry = gtk_entry_new(); temp_string = g_strdup_printf("%d", raw_data_info->offset); gtk_entry_set_text(GTK_ENTRY(entry), temp_string); g_free(temp_string); gtk_editable_set_editable(GTK_EDITABLE(entry), TRUE); g_object_set_data(G_OBJECT(entry), "type", GINT_TO_POINTER(AMITK_DIM_NUM+AMITK_AXIS_NUM)); g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(change_entry_cb), raw_data_info); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(entry),1,3, table_row, table_row+1, GTK_FILL | GTK_EXPAND, 0, X_PADDING, Y_PADDING); /* how many bytes we're currently reading from the file */ raw_data_info->num_bytes_label1 = gtk_label_new(""); raw_data_info->num_bytes_label2 = gtk_label_new(""); gtk_misc_set_alignment(GTK_MISC(raw_data_info->num_bytes_label1), 1.0, 0.5); gtk_misc_set_alignment(GTK_MISC(raw_data_info->num_bytes_label2), 0.0, 0.5); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(raw_data_info->num_bytes_label1), 3,5, table_row, table_row+1, GTK_FILL|GTK_EXPAND, 0, X_PADDING, Y_PADDING); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(raw_data_info->num_bytes_label2), 5,6, table_row, table_row+1, GTK_FILL|GTK_EXPAND, 0, X_PADDING, Y_PADDING); update_num_bytes(raw_data_info); /* put something sensible into the label */ table_row++; /* labels for the x, y, and z components */ label = gtk_label_new(_("x")); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 1,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); label = gtk_label_new(_("y")); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 2,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); label = gtk_label_new(_("z")); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); label = gtk_label_new(_("gates")); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 4,5, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); label = gtk_label_new(_("frames")); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 5,6, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); table_row++; /* widgets to change the dimensions of the data set */ label = gtk_label_new(_("dimensions (# voxels)")); gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 0,1, table_row, table_row+1, GTK_FILL|GTK_EXPAND, 0, X_PADDING, Y_PADDING); for (i_dim=0; i_dimdata_dim, i_dim)); gtk_entry_set_text(GTK_ENTRY(entry), temp_string); g_free(temp_string); gtk_editable_set_editable(GTK_EDITABLE(entry), TRUE); g_object_set_data(G_OBJECT(entry), "type", GINT_TO_POINTER(i_dim)); g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(change_entry_cb), raw_data_info); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(entry),i_dim+1,i_dim+2, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); } table_row++; /* widgets to change the voxel size of the data set */ label = gtk_label_new(_("voxel size (mm)")); gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 0,1, table_row, table_row+1, GTK_FILL|GTK_EXPAND, 0, X_PADDING, Y_PADDING); for (i_axis=0; i_axisvoxel_size, i_axis)); gtk_entry_set_text(GTK_ENTRY(entry), temp_string); g_free(temp_string); gtk_editable_set_editable(GTK_EDITABLE(entry), TRUE); g_object_set_data(G_OBJECT(entry), "type", GINT_TO_POINTER(i_axis+AMITK_DIM_NUM)); g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(change_entry_cb), raw_data_info); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(entry),i_axis+1,i_axis+2, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); } table_row++; /* scale factor to apply to the data */ label = gtk_label_new(_("scale factor")); gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(label), 0,1, table_row, table_row+1, GTK_FILL|GTK_EXPAND, 0, X_PADDING, Y_PADDING); entry = gtk_entry_new(); gtk_entry_set_width_chars(GTK_ENTRY(entry), 12); temp_string = g_strdup_printf("%5.3f", raw_data_info->scale_factor); gtk_entry_set_text(GTK_ENTRY(entry), temp_string); g_free(temp_string); gtk_editable_set_editable(GTK_EDITABLE(entry), TRUE); g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(change_scaling_cb), raw_data_info); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(entry),1,2, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); table_row++; gtk_widget_show_all(dialog); return dialog; } /* function to bring up the dialog widget to direct our importing of raw data */ AmitkDataSet * raw_data_import(const gchar * raw_data_filename, AmitkPreferences * preferences) { struct stat file_info; raw_data_info_t * raw_data_info; AmitkDataSet * ds; gint dialog_reply; GtkWidget * dialog; GtkWidget * progress_dialog = NULL; gboolean return_val; /* get space for our raw_data_info structure */ if ((raw_data_info = g_try_new(raw_data_info_t,1)) == NULL) { g_warning(_("Couldn't allocate memory space for raw_data_info structure for raw data import")); return NULL; } /* initialize */ raw_data_info->filename = g_strdup(raw_data_filename); read_last_values(&(raw_data_info->modality), &(raw_data_info->raw_format), &(raw_data_info->data_dim), &(raw_data_info->voxel_size), &(raw_data_info->offset), &(raw_data_info->scale_factor)); /* figure out the file size in bytes (file_info.st_size) */ if (stat(raw_data_info->filename, &file_info) != 0) { g_warning(_("Couldn't get stat's on file %s for raw data import"), raw_data_info->filename); g_free(raw_data_info); return NULL; } raw_data_info->total_file_size = file_info.st_size; /* create the import_dialog */ dialog = import_dialog(raw_data_info); /* block till the user closes the dialog */ dialog_reply = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); /* and start loading in the file if we hit ok*/ if (dialog_reply == GTK_RESPONSE_YES) { /* the progress dialog */ progress_dialog = amitk_progress_dialog_new(NULL); ds = amitk_data_set_import_raw_file(raw_data_info->filename, raw_data_info->raw_format, raw_data_info->data_dim, raw_data_info->offset, preferences, raw_data_info->modality, raw_data_info->name, raw_data_info->voxel_size, raw_data_info->scale_factor, amitk_progress_dialog_update, progress_dialog); } else /* we hit the cancel button */ ds = NULL; if (progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(progress_dialog), "delete_event", NULL, &return_val); progress_dialog = NULL; } if (raw_data_info->filename != NULL) { g_free(raw_data_info->filename); raw_data_info->filename = NULL; } if (raw_data_info->name != NULL) { g_free(raw_data_info->name); raw_data_info->name = NULL; } if (raw_data_info != NULL) { g_free(raw_data_info); raw_data_info = NULL; } return ds; /* NULL if we hit cancel */ } amide-1.0.5/src/pixmaps.h0000664000175000017500000000174612270274522015102 0ustar loeningloening/* pixmaps.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* header files that are always needed with this file */ extern const gchar * windowing_icons[]; void pixmaps_initialize_icons(); amide-1.0.5/src/ui_time_dialog.c0000644000175000017500000004401312270274047016360 0ustar loeningloening/* ui_time_dialog.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include "amide.h" #include "ui_time_dialog.h" #define SPIN_BUTTON_X_SIZE 100 typedef enum { COLUMN_START, COLUMN_END, COLUMN_FRAME, COLUMN_NAME, COLUMN_DATA_SET, NUM_COLUMNS } column_type_t; static gboolean column_use_my_renderer[NUM_COLUMNS] = { TRUE, TRUE, FALSE, FALSE, FALSE }; enum { ENTRY_START, ENTRY_END, NUM_ENTRIES }; static gchar * column_names[] = { N_("Start (s)"), N_("End (s)"), N_("Frame #"), N_("Data Set"), "error - shouldn't be used" }; typedef struct ui_time_dialog_t { amide_time_t start; amide_time_t end; gboolean valid; AmitkStudy * study; GList * data_sets; GtkWidget * tree_view; GtkWidget * start_spin; GtkWidget * end_spin; } ui_time_dialog_t; static void selection_for_each_func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); static void selection_changed_cb (GtkTreeSelection *selection, gpointer data); static gboolean delete_event_cb(GtkWidget* dialog, GdkEvent * event, gpointer data); static void change_spin_cb(GtkSpinButton * spin_button, gpointer data); static void update_model(GtkListStore * store, GtkTreeSelection *selection, GList * data_sets); static void update_selections(GtkTreeModel * model, GtkTreeSelection *selection, GtkWidget * dialog, ui_time_dialog_t * td); static void update_entries(GtkWidget * dialog, ui_time_dialog_t * td); static void data_set_time_changed_cb(AmitkDataSet * ds, gpointer dialog); static void add_data_set(GtkWidget * dialog, AmitkDataSet * ds); static void remove_data_set(GtkWidget * dialog, AmitkDataSet * ds); static void selection_for_each_func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { amide_time_t start, end, old_end; ui_time_dialog_t * td = data; gtk_tree_model_get(model, iter, COLUMN_START, &start, COLUMN_END, &end, -1); /* save our new times */ if (td->valid) { old_end = td->end; if (start < td->start) td->start = start+EPSILON*fabs(start); if (end > old_end) td->end = end-EPSILON*fabs(end); else td->end = old_end-EPSILON*fabs(old_end); } else { td->valid = TRUE; td->start = start+EPSILON*fabs(start); td->end = end-EPSILON*fabs(end); } return; } /* reset out start and duration based on what just got selected */ static void selection_changed_cb (GtkTreeSelection *selection, gpointer data) { GtkWidget * dialog = data; GtkTreeView * tree_view; GtkTreeModel * model; ui_time_dialog_t * td; td = g_object_get_data(G_OBJECT(dialog), "td"); td->valid = FALSE; /* run the following function on each selected row */ gtk_tree_selection_selected_foreach(selection, selection_for_each_func, td); if (!td->valid) td->valid = TRUE; /* reset selected rows to old values */ tree_view = gtk_tree_selection_get_tree_view(selection); model = gtk_tree_view_get_model(tree_view); update_selections(model, selection, dialog, td); update_entries(dialog, td); amitk_study_set_view_start_time(td->study, td->start); amitk_study_set_view_duration(td->study, td->end-td->start); return; } /* function called to destroy the time dialog */ static gboolean delete_event_cb(GtkWidget* dialog, GdkEvent * event, gpointer data) { ui_time_dialog_t * td = data; GtkTreeSelection *selection; /* explicitly disconnect signals, sometimes GTK throws some of these on delete (after unref'ing study */ g_signal_handlers_disconnect_by_func(G_OBJECT(td->start_spin), G_CALLBACK(change_spin_cb), dialog); g_signal_handlers_disconnect_by_func(G_OBJECT(td->end_spin), G_CALLBACK(change_spin_cb), dialog); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (td->tree_view)); g_signal_handlers_disconnect_by_func(G_OBJECT(selection), G_CALLBACK(selection_changed_cb), dialog); /* trash collection */ while(td->data_sets != NULL) remove_data_set(dialog, td->data_sets->data); if (td->study != NULL) td->study = amitk_object_unref(td->study); g_free(td); return FALSE; } /* function called when a numerical spin button has been changed */ static void change_spin_cb(GtkSpinButton * spin_button, gpointer data) { gdouble temp_val; gint which_widget; GtkWidget * dialog = data; ui_time_dialog_t * td; GtkTreeSelection *selection; GtkTreeModel * model; which_widget = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(spin_button), "type")); td = g_object_get_data(G_OBJECT(dialog), "td"); temp_val = gtk_spin_button_get_value(spin_button); switch(which_widget) { case ENTRY_START: if (temp_val-EPSILON*fabs(temp_val) > td->end) td->start = td->end-EPSILON*fabs(td->end); else td->start = temp_val; break; case ENTRY_END: if (temp_val+EPSILON*fabs(temp_val) < td->start) td->end = td->start+EPSILON*fabs(td->start); else td->end = temp_val; break; } model = gtk_tree_view_get_model(GTK_TREE_VIEW(td->tree_view)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(td->tree_view)); update_selections(model, selection, dialog, td); update_entries(dialog, td); amitk_study_set_view_start_time(td->study, td->start); amitk_study_set_view_duration(td->study, td->end-td->start); return; } static void update_model(GtkListStore * store, GtkTreeSelection *selection, GList * data_sets) { GList * sets; AmitkDataSet * min_ds; guint num_sets; guint i_ds, min_ds_num; guint * frames; guint total_frames=0; guint current_frames; amide_time_t min, temp; GtkTreeIter iter; gtk_list_store_clear(store); /* make sure the list is clear */ /* count the number of data setss */ sets = data_sets; num_sets=0; while (sets != NULL) { num_sets++; total_frames += AMITK_DATA_SET_NUM_FRAMES(sets->data); sets = sets->next; } /* get space for the array that'll take care of which frame of which data set we're looking at*/ frames = g_try_new(guint,num_sets); if ((frames == NULL) && (num_sets !=0)) { g_warning(_("can't count frames or allocate memory!")); return; } /* initialize */ for (i_ds = 0; i_dsdata) <= frames[i_ds]) { sets = sets->next; /* advancing to a data set that still has frames left */ i_ds++; } min_ds = AMITK_DATA_SET(sets->data); min_ds_num = i_ds; min = amitk_data_set_get_start_time(min_ds,frames[i_ds]); sets = sets->next; i_ds++; while (sets != NULL) { if (frames[i_ds] < AMITK_DATA_SET_NUM_FRAMES(sets->data)) { temp = amitk_data_set_get_start_time(AMITK_DATA_SET(sets->data), frames[i_ds]); if (temp < min) { min_ds = AMITK_DATA_SET(sets->data); min = temp; min_ds_num = i_ds; } } i_ds++; sets = sets->next; } /* we now have the next minimum start time */ /* setup the corresponding list entry */ gtk_list_store_append (store, &iter); /* Acquire an iterator */ gtk_list_store_set (store, &iter, COLUMN_START, min, COLUMN_END, min+amitk_data_set_get_frame_duration(min_ds,frames[min_ds_num]), COLUMN_FRAME,frames[min_ds_num], COLUMN_NAME,AMITK_OBJECT_NAME(min_ds), COLUMN_DATA_SET, min_ds,-1); frames[min_ds_num]++; current_frames++; } /* freeup our allocated data structures */ g_free(frames); return; } static void update_selections(GtkTreeModel * model, GtkTreeSelection *selection, GtkWidget * dialog, ui_time_dialog_t * td) { AmitkDataSet * ds; gboolean ds_used; GtkTreeIter iter; gint iter_frame; amide_time_t iter_start, iter_end; GList * used_sets=NULL;; /* Block signals to this list widget. I need to do this, as I'll be selecting rows, causing the emission of "changed" signals */ g_signal_handlers_block_by_func(G_OBJECT(selection), G_CALLBACK(selection_changed_cb), dialog); if (gtk_tree_model_get_iter_first(model, &iter)) { do { gtk_tree_model_get(model, &iter, COLUMN_START, &iter_start, COLUMN_END, &iter_end, COLUMN_FRAME, &iter_frame, COLUMN_DATA_SET, &ds,-1); /* see if we've already marked a frame in this data set */ ds_used = (g_list_index(used_sets, ds) >= 0); /* figure out if this row is suppose to be selected */ if (((td->start <= iter_start) && ((td->end) > iter_start)) || ((td->start <= (iter_end)) && ((td->end) > (iter_end))) || ((td->start > (iter_start)) &&((td->end) < (iter_end)))) { gtk_tree_selection_select_iter(selection, &iter); if (!ds_used) used_sets = g_list_append(used_sets, ds); } else if ((!ds_used) && (iter_frame == 0) && (td->start < iter_start)) { /* special case #1 this is the first frame in the data set and it's still behind the time, so select it anyway */ gtk_tree_selection_select_iter(selection, &iter); used_sets = g_list_append(used_sets, ds); } else if ((!ds_used) && (iter_frame == AMITK_DATA_SET_NUM_FRAMES(ds)-1) && (td->start > iter_end)) { /* special case #2 this is the last frame in the data set and no other frame has been selected, so select this one anyway */ gtk_tree_selection_select_iter(selection, &iter); used_sets = g_list_append(used_sets, ds); } else { gtk_tree_selection_unselect_iter(selection, &iter); } } while(gtk_tree_model_iter_next(model, &iter)); } g_list_free(used_sets); /* done updating the list, we can reconnect signals now */ g_signal_handlers_unblock_by_func(G_OBJECT(selection), G_CALLBACK(selection_changed_cb), dialog); return; } static void update_entries(GtkWidget * dialog, ui_time_dialog_t * td) { g_signal_handlers_block_by_func(G_OBJECT(td->start_spin), G_CALLBACK(change_spin_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(td->start_spin), td->start); g_signal_handlers_unblock_by_func(G_OBJECT(td->start_spin), G_CALLBACK(change_spin_cb), dialog); g_signal_handlers_block_by_func(G_OBJECT(td->end_spin), G_CALLBACK(change_spin_cb), dialog); gtk_spin_button_set_value(GTK_SPIN_BUTTON(td->end_spin), td->end); g_signal_handlers_unblock_by_func(G_OBJECT(td->end_spin), G_CALLBACK(change_spin_cb), dialog); return; } static void data_set_time_changed_cb(AmitkDataSet * ds, gpointer data) { GtkWidget * dialog = data; ui_time_dialog_set_times(dialog); } static void add_data_set(GtkWidget * dialog, AmitkDataSet * ds) { ui_time_dialog_t * td; td = g_object_get_data(G_OBJECT(dialog), "td"); td->data_sets = g_list_append(td->data_sets, amitk_object_ref(ds)); g_signal_connect(G_OBJECT(ds), "time_changed", G_CALLBACK(data_set_time_changed_cb), dialog); return; } static void remove_data_set(GtkWidget * dialog, AmitkDataSet * ds) { ui_time_dialog_t * td; td = g_object_get_data(G_OBJECT(dialog), "td"); g_return_if_fail(g_list_index(td->data_sets, ds) >= 0); g_signal_handlers_disconnect_by_func(G_OBJECT(ds), G_CALLBACK(data_set_time_changed_cb), dialog); td->data_sets = g_list_remove(td->data_sets, ds); amitk_object_unref(ds); return; } /* function to setup the time combo widget */ void ui_time_dialog_set_times(GtkWidget * dialog) { ui_time_dialog_t * td; GtkTreeSelection *selection; GtkTreeModel * model; GList * selected_sets; GList * temp_sets; g_return_if_fail(dialog != NULL); td = g_object_get_data(G_OBJECT(dialog), "td"); while(td->data_sets != NULL) remove_data_set(dialog, td->data_sets->data); selected_sets = amitk_object_get_selected_children_of_type(AMITK_OBJECT(td->study), AMITK_OBJECT_TYPE_DATA_SET, AMITK_SELECTION_ANY, TRUE); temp_sets = selected_sets; while (temp_sets != NULL) { add_data_set(dialog, temp_sets->data); temp_sets = temp_sets->next; } amitk_objects_unref(selected_sets); model = gtk_tree_view_get_model(GTK_TREE_VIEW(td->tree_view)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(td->tree_view)); update_model(GTK_LIST_STORE(model), selection,td->data_sets); update_selections(model, selection, dialog, td); update_entries(dialog, td); return; } /* create the time selection dialog */ GtkWidget * ui_time_dialog_create(AmitkStudy * study, GtkWindow * parent) { GtkWidget * dialog; gchar * temp_string = NULL; GtkWidget * packing_table; GtkWidget * label; GtkWidget * scrolled; guint table_row = 0; ui_time_dialog_t * td; GtkListStore * store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *selection; GtkWidget * hseparator; column_type_t i_column; temp_string = g_strdup_printf(_("%s: Time Dialog"),PACKAGE); dialog = gtk_dialog_new_with_buttons(temp_string, parent, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, NULL); g_free(temp_string); gtk_window_set_resizable(GTK_WINDOW(dialog), TRUE); /* make (and save a pointer to) a structure to temporary hold the new time and duration */ td = g_try_new(ui_time_dialog_t, 1); g_return_val_if_fail(td != NULL, NULL); td->start = AMITK_STUDY_VIEW_START_TIME(study); td->end = td->start+AMITK_STUDY_VIEW_DURATION(study); td->valid = TRUE; td->study = amitk_object_ref(study); td->data_sets = NULL; g_object_set_data(G_OBJECT(dialog), "td", td); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(dialog), "delete_event", G_CALLBACK(delete_event_cb), td); /* start making the widgets for this dialog box */ packing_table = gtk_table_new(4,4,FALSE); table_row=0; gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), packing_table); label = gtk_label_new(_("Start (s)")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); td->start_spin = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(td->start_spin), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(td->start_spin), td->start); g_object_set_data(G_OBJECT(td->start_spin), "type", GINT_TO_POINTER(ENTRY_START)); gtk_widget_set_size_request(td->start_spin, SPIN_BUTTON_X_SIZE, -1); g_signal_connect(G_OBJECT(td->start_spin), "value_changed", G_CALLBACK(change_spin_cb), dialog); g_signal_connect(G_OBJECT(td->start_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), td->start_spin,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("End (s)")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); td->end_spin = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(td->end_spin), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(td->end_spin), td->end); g_object_set_data(G_OBJECT(td->end_spin), "type", GINT_TO_POINTER(ENTRY_END)); gtk_widget_set_size_request(td->end_spin, SPIN_BUTTON_X_SIZE, -1); g_signal_connect(G_OBJECT(td->end_spin), "value_changed", G_CALLBACK(change_spin_cb), dialog); g_signal_connect(G_OBJECT(td->end_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), td->end_spin,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 0, 4, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* the scroll widget which the list will go into */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,350,200); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_table_attach(GTK_TABLE(packing_table), scrolled, 0,2, table_row, table_row+1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); table_row++; /* and the list itself */ store = gtk_list_store_new(NUM_COLUMNS, AMITK_TYPE_TIME, AMITK_TYPE_TIME, G_TYPE_INT, G_TYPE_STRING, G_TYPE_POINTER); td->tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref(store); for (i_column=0; i_columntree_view), column); } selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (td->tree_view)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE); g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK (selection_changed_cb), dialog); gtk_container_add(GTK_CONTAINER(scrolled),td->tree_view); /* fill in the list */ ui_time_dialog_set_times(dialog); /* and show all our widgets */ gtk_widget_show_all(dialog); return dialog; } amide-1.0.5/src/amitk_progress_dialog.h0000664000175000017500000000515712270274554017776 0ustar loeningloening/* amitk_progress_dialog.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* adapated from gtkcolorsel.h */ #ifndef __AMITK_PROGRESS_DIALOG_H__ #define __AMITK_PROGRESS_DIALOG_H__ /* includes we always need with this widget */ #include G_BEGIN_DECLS /* ------------- Progress_Dialog---------- */ #define AMITK_TYPE_PROGRESS_DIALOG (amitk_progress_dialog_get_type ()) #define AMITK_PROGRESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AMITK_TYPE_PROGRESS_DIALOG, AmitkProgressDialog)) #define AMITK_PROGRESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_THESHOLD, AmitkProgressDialogClass)) #define AMITK_IS_PROGRESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AMITK_TYPE_PROGRESS_DIALOG)) #define AMITK_IS_PROGRESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_PROGRESS_DIALOG)) #define AMITK_PROGRESS_DIALOG_CAN_CONTINUE(obj) (AMITK_PROGRESS_DIALOG(obj)->can_continue); typedef struct _AmitkProgressDialog AmitkProgressDialog; typedef struct _AmitkProgressDialogClass AmitkProgressDialogClass; struct _AmitkProgressDialog { GtkDialog dialog; GtkWidget * message_label; GtkWidget * progress_bar; gboolean can_continue; }; struct _AmitkProgressDialogClass { GtkDialogClass parent_class; }; GType amitk_progress_dialog_get_type (void); gboolean amitk_progress_dialog_update (gpointer dialog, char * message, gdouble fraction); void amitk_progress_dialog_set_text (AmitkProgressDialog * dialog, gchar * message); gboolean amitk_progress_dialog_set_fraction (AmitkProgressDialog * dialog, gdouble fraction); GtkWidget* amitk_progress_dialog_new (GtkWindow * parent); G_END_DECLS #endif /* __AMITK_PROGRESS_DIALOG_H__ */ amide-1.0.5/src/amitk_roi.c0000664000175000017500000007125512270273743015400 0ustar loeningloening/* amitk_roi.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amitk_roi.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" /* variable type function declarations */ #include "amitk_roi_ELLIPSOID.h" #include "amitk_roi_CYLINDER.h" #include "amitk_roi_BOX.h" #include "amitk_roi_ISOCONTOUR_2D.h" #include "amitk_roi_ISOCONTOUR_3D.h" #include "amitk_roi_FREEHAND_2D.h" #include "amitk_roi_FREEHAND_3D.h" gchar * amitk_roi_menu_names[] = { N_("_Ellipsoid"), N_("Elliptic _Cylinder"), N_("_Box"), N_("_2D Isocontour"), N_("_3D Isocontour"), N_("_2D Freehand"), N_("_3D Freehand") }; gchar * amitk_roi_menu_explanation[] = { N_("Add a new elliptical ROI"), N_("Add a new elliptic cylinder ROI"), N_("Add a new box shaped ROI"), N_("Add a new 2D Isocontour ROI"), N_("Add a new 3D Isocontour ROI"), N_("Add a new 2D Freehand ROI"), N_("Add a new 3D Freehand ROI") }; enum { ROI_CHANGED, ROI_TYPE_CHANGED, LAST_SIGNAL }; static void roi_class_init (AmitkRoiClass *klass); static void roi_init (AmitkRoi *roi); static void roi_finalize (GObject *object); static void roi_scale (AmitkSpace *space, AmitkPoint *ref_point, AmitkPoint *scaling); static AmitkObject * roi_copy (const AmitkObject * object); static void roi_copy_in_place (AmitkObject * dest_object, const AmitkObject * src_object); static void roi_write_xml (const AmitkObject *object, xmlNodePtr nodes, FILE *study_file); static gchar * roi_read_xml (AmitkObject *object, xmlNodePtr nodes, FILE *study_file, gchar *error_buf); static void roi_get_center (const AmitkVolume *volume, AmitkPoint *center); static void roi_set_voxel_size (AmitkRoi * roi, AmitkPoint voxel_size); static AmitkVolumeClass * parent_class; static guint roi_signals[LAST_SIGNAL]; GType amitk_roi_get_type(void) { static GType roi_type = 0; if (!roi_type) { static const GTypeInfo roi_info = { sizeof (AmitkRoiClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) roi_class_init, (GClassFinalizeFunc) NULL, NULL, /* class_data */ sizeof (AmitkRoi), 0, /* n_preallocs */ (GInstanceInitFunc) roi_init, NULL /* value table */ }; roi_type = g_type_register_static (AMITK_TYPE_VOLUME, "AmitkRoi", &roi_info, 0); } return roi_type; } static void roi_class_init (AmitkRoiClass * class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); AmitkObjectClass * object_class = AMITK_OBJECT_CLASS(class); AmitkSpaceClass * space_class = AMITK_SPACE_CLASS(class); AmitkVolumeClass * volume_class = AMITK_VOLUME_CLASS(class); parent_class = g_type_class_peek_parent(class); space_class->space_scale = roi_scale; object_class->object_copy = roi_copy; object_class->object_copy_in_place = roi_copy_in_place; object_class->object_write_xml = roi_write_xml; object_class->object_read_xml = roi_read_xml; volume_class->volume_get_center = roi_get_center; gobject_class->finalize = roi_finalize; roi_signals[ROI_CHANGED] = g_signal_new ("roi_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkRoiClass, roi_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); roi_signals[ROI_TYPE_CHANGED] = g_signal_new ("roi_type_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkRoiClass, roi_type_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); } static void roi_init (AmitkRoi * roi) { roi->specify_color = FALSE; roi->color = amitk_color_table_uint32_to_rgba(AMITK_OBJECT_DEFAULT_COLOR); roi->voxel_size = zero_point; roi->map_data = NULL; roi->center_of_mass_calculated=FALSE; roi->center_of_mass=zero_point; roi->isocontour_min_value = 0.0; roi->isocontour_max_value = 0.0; roi->isocontour_range = AMITK_ROI_ISOCONTOUR_RANGE_ABOVE_MIN; } static void roi_finalize (GObject *object) { AmitkRoi * roi = AMITK_ROI(object); if (roi->map_data != NULL) { g_object_unref(roi->map_data); roi->map_data = NULL; } G_OBJECT_CLASS (parent_class)->finalize (object); } static void roi_scale(AmitkSpace *space, AmitkPoint *ref_point, AmitkPoint *scaling) { AmitkRoi * roi; AmitkPoint voxel_size; g_return_if_fail(AMITK_IS_ROI(space)); roi = AMITK_ROI(space); /* first, pass the signal on, this gets the volume corner value readjusted */ AMITK_SPACE_CLASS(parent_class)->space_scale (space, ref_point, scaling); /* and readjust the voxel size based on the new corner */ if (AMITK_VOLUME_VALID(roi)) { if (AMITK_ROI_TYPE_ISOCONTOUR(roi) || AMITK_ROI_TYPE_FREEHAND(roi)) { voxel_size = AMITK_VOLUME_CORNER(roi); voxel_size.x /= roi->map_data->dim.x; voxel_size.y /= roi->map_data->dim.y; voxel_size.z /= roi->map_data->dim.z; roi_set_voxel_size(roi, voxel_size); } } } static AmitkObject * roi_copy (const AmitkObject * object) { AmitkRoi * copy; g_return_val_if_fail(AMITK_IS_ROI(object), NULL); copy = amitk_roi_new(AMITK_ROI_TYPE(object)); amitk_object_copy_in_place(AMITK_OBJECT(copy), object); return AMITK_OBJECT(copy); } /* doesn't copy the data set used by isocontours and freehands, just adds a reference... */ static void roi_copy_in_place (AmitkObject * dest_object, const AmitkObject * src_object) { AmitkRoi * src_roi; AmitkRoi * dest_roi; g_return_if_fail(AMITK_IS_ROI(src_object)); g_return_if_fail(AMITK_IS_ROI(dest_object)); src_roi = AMITK_ROI(src_object); dest_roi = AMITK_ROI(dest_object); amitk_roi_set_type(dest_roi, AMITK_ROI_TYPE(src_object)); dest_roi->specify_color = AMITK_ROI_SPECIFY_COLOR(src_roi); dest_roi->color = AMITK_ROI_COLOR(src_roi); if (src_roi->map_data != NULL) { if (dest_roi->map_data != NULL) g_object_unref(dest_roi->map_data); dest_roi->map_data = g_object_ref(src_roi->map_data); } dest_roi->center_of_mass_calculated = src_roi->center_of_mass_calculated; dest_roi->center_of_mass = src_roi->center_of_mass; roi_set_voxel_size(dest_roi, AMITK_ROI_VOXEL_SIZE(src_object)); dest_roi->isocontour_min_value = AMITK_ROI_ISOCONTOUR_MIN_VALUE(src_object); dest_roi->isocontour_max_value = AMITK_ROI_ISOCONTOUR_MAX_VALUE(src_object); dest_roi->isocontour_range = AMITK_ROI_ISOCONTOUR_RANGE(src_object); AMITK_OBJECT_CLASS (parent_class)->object_copy_in_place (dest_object, src_object); } static void roi_write_xml (const AmitkObject * object, xmlNodePtr nodes, FILE * study_file) { AmitkRoi * roi; gchar * name; gchar * filename; guint64 location, size; AMITK_OBJECT_CLASS(parent_class)->object_write_xml(object, nodes, study_file); roi = AMITK_ROI(object); xml_save_string(nodes, "type", amitk_roi_type_get_name(AMITK_ROI_TYPE(roi))); xml_save_boolean(nodes, "specify_color", AMITK_ROI_SPECIFY_COLOR(roi)); xml_save_uint(nodes, "color", amitk_color_table_rgba_to_uint32(AMITK_ROI_COLOR(roi))); /* freehand and isocontour specific stuff */ amitk_point_write_xml(nodes, "voxel_size", AMITK_ROI_VOXEL_SIZE(roi)); xml_save_boolean(nodes, "center_of_mass_calculated", AMITK_ROI(roi)->center_of_mass_calculated); amitk_point_write_xml(nodes, "center_of_mass", AMITK_ROI(roi)->center_of_mass); if (AMITK_ROI_TYPE_ISOCONTOUR(roi) || AMITK_ROI_TYPE_FREEHAND(roi)) { name = g_strdup_printf("roi_%s_map_data", AMITK_OBJECT_NAME(roi)); amitk_raw_data_write_xml(roi->map_data, name, study_file, &filename, &location, &size); g_free(name); if (study_file == NULL) { xml_save_string(nodes,"map_file", filename); g_free(filename); } else { xml_save_location_and_size(nodes, "map_location_and_size", location, size); } } /* isocontour specific stuff */ xml_save_real(nodes, "isocontour_min_value", AMITK_ROI_ISOCONTOUR_MIN_VALUE(roi)); xml_save_real(nodes, "isocontour_max_value", AMITK_ROI_ISOCONTOUR_MAX_VALUE(roi)); xml_save_int(nodes, "isocontour_range", AMITK_ROI_ISOCONTOUR_RANGE(roi)); return; } static gchar * roi_read_xml (AmitkObject * object, xmlNodePtr nodes, FILE * study_file, gchar * error_buf) { AmitkRoi * roi; AmitkRoiType i_roi_type; gchar * temp_string; gchar * map_xml_filename=NULL; guint64 location, size; error_buf = AMITK_OBJECT_CLASS(parent_class)->object_read_xml(object, nodes, study_file, error_buf); roi = AMITK_ROI(object); /* figure out the type */ temp_string = xml_get_string(nodes, "type"); if (temp_string != NULL) for (i_roi_type=0; i_roi_type < AMITK_ROI_TYPE_NUM; i_roi_type++) if (g_ascii_strcasecmp(temp_string, amitk_roi_type_get_name(i_roi_type)) == 0) roi->type = i_roi_type; g_free(temp_string); amitk_roi_set_specify_color(roi, xml_get_boolean_with_default(nodes, "specify_color", AMITK_ROI_SPECIFY_COLOR(roi))); amitk_roi_set_color(roi, amitk_color_table_uint32_to_rgba(xml_get_uint_with_default(nodes, "color", AMITK_OBJECT_DEFAULT_COLOR))); /* freehand and isocontour specific stuff */ if (AMITK_ROI_TYPE_ISOCONTOUR(roi) | AMITK_ROI_TYPE_FREEHAND(roi)) { roi_set_voxel_size(roi, amitk_point_read_xml(nodes, "voxel_size", &error_buf)); /* check for old style entries */ if (xml_node_exists(nodes, "isocontour_center_of_mass_calculated")) roi->center_of_mass_calculated = xml_get_boolean(nodes, "isocontour_center_of_mass_calculated", &error_buf); else roi->center_of_mass_calculated = xml_get_boolean(nodes, "center_of_mass_calculated", &error_buf); /* check for old style entries */ if (xml_node_exists(nodes, "isocontour_center_of_mass")) roi->center_of_mass = amitk_point_read_xml(nodes, "isocontour_center_of_mass", &error_buf); else roi->center_of_mass = amitk_point_read_xml(nodes, "center_of_mass", &error_buf); /* check for old style entries */ if (xml_node_exists(nodes, "isocontour_file") || xml_node_exists(nodes, "isocontour_location_and_size")) { if (study_file == NULL) map_xml_filename = xml_get_string(nodes, "isocontour_file"); else xml_get_location_and_size(nodes, "isocontour_location_and_size", &location, &size, &error_buf); roi->map_data = amitk_raw_data_read_xml(map_xml_filename, study_file, location, size,&error_buf, NULL, NULL); /* if the ROI's never been drawn, it's possible for this not to exist */ } else if (xml_node_exists(nodes, "map_file") || xml_node_exists(nodes, "map_location_and_size")) { if (study_file == NULL) map_xml_filename = xml_get_string(nodes, "map_file"); else xml_get_location_and_size(nodes, "map_location_and_size", &location, &size, &error_buf); roi->map_data = amitk_raw_data_read_xml(map_xml_filename, study_file, location, size,&error_buf, NULL, NULL); } if (map_xml_filename != NULL) g_free(map_xml_filename); } /* isocontour specific stuff */ if (AMITK_ROI_TYPE_ISOCONTOUR(roi)) { /* check first if we're using the old isocontour_value and isocontour_inverse entries */ if (xml_node_exists(nodes, "isocontour_value")) { /* works, cause inverse=TRUE=1=AMITK_ROI_ISOCONTOUR_RANGE_BELOW_MAX */ roi->isocontour_range = xml_get_boolean(nodes, "isocontour_inverse", &error_buf); if (roi->isocontour_range == AMITK_ROI_ISOCONTOUR_RANGE_BELOW_MAX) roi->isocontour_min_value = xml_get_real(nodes, "isocontour_value", &error_buf); else roi->isocontour_max_value = xml_get_real(nodes, "isocontour_value", &error_buf); } else { /* how we currently store isocontour information */ roi->isocontour_range = xml_get_int(nodes, "isocontour_range", &error_buf); roi->isocontour_min_value = xml_get_real(nodes, "isocontour_min_value", &error_buf); roi->isocontour_max_value = xml_get_real(nodes, "isocontour_max_value", &error_buf); } } /* make sure to mark the roi as undrawn if needed */ if (AMITK_ROI_TYPE_ISOCONTOUR(roi)) { if (roi->map_data == NULL) AMITK_VOLUME(roi)->valid = FALSE; } else { if (POINT_EQUAL(AMITK_VOLUME_CORNER(roi), zero_point)) { AMITK_VOLUME(roi)->valid = FALSE; } } return error_buf; } static void roi_get_center(const AmitkVolume *volume, AmitkPoint * pcenter) { if (AMITK_ROI_TYPE_ISOCONTOUR(volume) || AMITK_ROI_TYPE_FREEHAND(volume)) { *pcenter = amitk_roi_get_center_of_mass(AMITK_ROI(volume)); } else { /* if geometric, just use the standard volume function */ AMITK_VOLUME_CLASS(parent_class)->volume_get_center(volume,pcenter); } return; } AmitkRoi * amitk_roi_new (AmitkRoiType type) { AmitkRoi * roi; roi = g_object_new(amitk_roi_get_type(), NULL); roi->type = type; return roi; } /* returns a singly linked list of intersection points between the roi and the given canvas slice. returned points are in the canvas's coordinate space. note: use this function for ELLIPSOID, CYLINDER, and BOX */ GSList * amitk_roi_get_intersection_line(const AmitkRoi * roi, const AmitkVolume * canvas_slice, const amide_real_t pixel_dim) { GSList * return_points = NULL; g_return_val_if_fail(AMITK_IS_ROI(roi), NULL); if (AMITK_ROI_UNDRAWN(roi)) return NULL; switch(AMITK_ROI_TYPE(roi)) { case AMITK_ROI_TYPE_ELLIPSOID: return_points = amitk_roi_ELLIPSOID_get_intersection_line(roi, canvas_slice, pixel_dim); break; case AMITK_ROI_TYPE_CYLINDER: return_points = amitk_roi_CYLINDER_get_intersection_line(roi, canvas_slice, pixel_dim); break; case AMITK_ROI_TYPE_BOX: return_points = amitk_roi_BOX_get_intersection_line(roi, canvas_slice, pixel_dim); break; default: g_error("roi type %d not implemented! file %s line %d", AMITK_ROI_TYPE(roi), __FILE__, __LINE__); break; } return return_points; } GSList * amitk_roi_free_points_list(GSList * list) { AmitkPoint * ppoint; if (list == NULL) return list; list->next = amitk_roi_free_points_list(list->next); /* recurse */ ppoint = (AmitkPoint *) list->data; list = g_slist_remove(list, ppoint); g_free(ppoint); return list; } /* whether we want to use the specified color or have the program choose a decent color */ void amitk_roi_set_specify_color(AmitkRoi * roi, gboolean specify_color) { g_return_if_fail(AMITK_IS_ROI(roi)); if (specify_color != AMITK_ROI_SPECIFY_COLOR(roi)) { roi->specify_color = specify_color; g_signal_emit(G_OBJECT(roi), roi_signals[ROI_CHANGED], 0); } return; } /* color to draw the roi in, if we choose specify_color */ void amitk_roi_set_color(AmitkRoi * roi, rgba_t new_color) { rgba_t old_color; g_return_if_fail(AMITK_IS_ROI(roi)); old_color = AMITK_ROI_COLOR(roi); if ((old_color.r != new_color.r) || (old_color.g != new_color.g) || (old_color.b != new_color.b) || (old_color.a != new_color.a)) { roi->color = new_color; g_signal_emit(G_OBJECT(roi), roi_signals[ROI_CHANGED], 0); } return; } /* this does not recalc the far corner, needs to be done separately */ static void roi_set_voxel_size(AmitkRoi * roi, AmitkPoint voxel_size) { if (!POINT_EQUAL(AMITK_ROI_VOXEL_SIZE(roi), voxel_size)) { roi->voxel_size = voxel_size; roi->center_of_mass_calculated = FALSE; g_signal_emit(G_OBJECT(roi), roi_signals[ROI_CHANGED], 0); } } /* only for isocontour and freehand roi's */ void amitk_roi_set_voxel_size(AmitkRoi * roi, AmitkPoint voxel_size) { GList * children; AmitkPoint ref_point; AmitkPoint scaling; AmitkPoint old_corner; g_return_if_fail(AMITK_IS_ROI(roi)); g_return_if_fail(AMITK_ROI_TYPE_ISOCONTOUR(roi) || AMITK_ROI_TYPE_FREEHAND(roi)); if (!POINT_EQUAL(AMITK_ROI_VOXEL_SIZE(roi), voxel_size)) { old_corner = AMITK_VOLUME_CORNER(roi); roi_set_voxel_size(roi, voxel_size); if (roi->map_data != NULL) amitk_roi_calc_far_corner(roi); scaling = point_div(AMITK_VOLUME_CORNER(roi), old_corner); scaling = amitk_space_s2b_dim(AMITK_SPACE(roi), scaling); ref_point = AMITK_SPACE_OFFSET(roi); /* propagate this scaling operation to the children */ children = AMITK_OBJECT_CHILDREN(roi); while (children != NULL) { amitk_space_scale(children->data, ref_point, scaling); children = children->next; } } } /* function to recalculate the far corner of an isocontour roi */ /* only for isocontour and freehand rois */ void amitk_roi_calc_far_corner(AmitkRoi * roi) { AmitkPoint new_point; g_return_if_fail(AMITK_IS_ROI(roi)); g_return_if_fail(AMITK_ROI_TYPE_ISOCONTOUR(roi) || AMITK_ROI_TYPE_FREEHAND(roi)); POINT_MULT(roi->map_data->dim, roi->voxel_size, new_point); amitk_volume_set_corner(AMITK_VOLUME(roi), new_point); return; } /* returns a slice (in a volume structure) containing a data set defining the edges of the roi in the given space. returned data set is in the given coord frame. */ AmitkDataSet * amitk_roi_get_intersection_slice(const AmitkRoi * roi, const AmitkVolume * canvas_volume, const amide_real_t pixel_dim #ifndef AMIDE_LIBGNOMECANVAS_AA ,const gboolean fill_map_roi #endif ) { AmitkDataSet * intersection = NULL; g_return_val_if_fail(AMITK_IS_ROI(roi), NULL); if (AMITK_ROI_UNDRAWN(roi)) return NULL; switch(AMITK_ROI_TYPE(roi)) { case AMITK_ROI_TYPE_ISOCONTOUR_2D: intersection = amitk_roi_ISOCONTOUR_2D_get_intersection_slice(roi, canvas_volume, pixel_dim #ifndef AMIDE_LIBGNOMECANVAS_AA , fill_map_roi #endif ); break; case AMITK_ROI_TYPE_ISOCONTOUR_3D: intersection = amitk_roi_ISOCONTOUR_3D_get_intersection_slice(roi, canvas_volume, pixel_dim #ifndef AMIDE_LIBGNOMECANVAS_AA , fill_map_roi #endif ); break; case AMITK_ROI_TYPE_FREEHAND_2D: intersection = amitk_roi_FREEHAND_2D_get_intersection_slice(roi, canvas_volume, pixel_dim #ifndef AMIDE_LIBGNOMECANVAS_AA , fill_map_roi #endif ); break; case AMITK_ROI_TYPE_FREEHAND_3D: intersection = amitk_roi_FREEHAND_3D_get_intersection_slice(roi, canvas_volume, pixel_dim #ifndef AMIDE_LIBGNOMECANVAS_AA , fill_map_roi #endif ); break; default: g_error("roi type %d not implemented! file %s line %d",AMITK_ROI_TYPE(roi), __FILE__, __LINE__); break; } return intersection; } /* sets/resets the isocontour value of an isocontour ROI based on the given volume and voxel note: vol should be a slice for the case of ISOCONTOUR_2D/FREEHAND_2D */ void amitk_roi_set_isocontour(AmitkRoi * roi, AmitkDataSet * ds, AmitkVoxel start_voxel, amide_data_t isocontour_min_value, amide_data_t isocontour_max_value, AmitkRoiIsocontourRange isocontour_range) { g_return_if_fail(AMITK_ROI_TYPE_ISOCONTOUR(roi)); switch(AMITK_ROI_TYPE(roi)) { case AMITK_ROI_TYPE_ISOCONTOUR_2D: amitk_roi_ISOCONTOUR_2D_set_isocontour(roi, ds, start_voxel, isocontour_min_value, isocontour_max_value, isocontour_range); break; case AMITK_ROI_TYPE_ISOCONTOUR_3D: default: amitk_roi_ISOCONTOUR_3D_set_isocontour(roi, ds, start_voxel, isocontour_min_value, isocontour_max_value, isocontour_range); break; } roi->center_of_mass_calculated = FALSE; g_signal_emit(G_OBJECT(roi), roi_signals[ROI_CHANGED], 0); return; } /* sets an area in the roi to zero (if erase is TRUE) or in (if erase if FALSE) */ /* only works for isocontour and freehand roi's */ void amitk_roi_manipulate_area(AmitkRoi * roi, gboolean erase, AmitkVoxel voxel, gint area_size) { g_return_if_fail(AMITK_ROI_TYPE_ISOCONTOUR(roi) || AMITK_ROI_TYPE_FREEHAND(roi)); /* if we're drawing a single point, do a quick check to see if we're already done */ if (!AMITK_ROI_UNDRAWN(roi) && (area_size == 0)) { if (erase) { if (amitk_raw_data_includes_voxel(roi->map_data, voxel)) { if (AMITK_RAW_DATA_UBYTE_SET_CONTENT(roi->map_data, voxel)==0) { return; } } } else { if (amitk_raw_data_includes_voxel(roi->map_data, voxel)) { if (AMITK_RAW_DATA_UBYTE_SET_CONTENT(roi->map_data, voxel)) { return; } } } } switch(AMITK_ROI_TYPE(roi)) { case AMITK_ROI_TYPE_ISOCONTOUR_2D: amitk_roi_ISOCONTOUR_2D_manipulate_area(roi, erase, voxel, area_size); break; case AMITK_ROI_TYPE_ISOCONTOUR_3D: amitk_roi_ISOCONTOUR_3D_manipulate_area(roi, erase, voxel, area_size); break; case AMITK_ROI_TYPE_FREEHAND_2D: amitk_roi_FREEHAND_2D_manipulate_area(roi, erase, voxel, area_size); break; case AMITK_ROI_TYPE_FREEHAND_3D: amitk_roi_FREEHAND_3D_manipulate_area(roi, erase, voxel, area_size); break; default: g_error("unexpected case in %s at line %d\n", __FILE__, __LINE__); break; } roi->center_of_mass_calculated = FALSE; g_signal_emit(G_OBJECT(roi), roi_signals[ROI_CHANGED], 0); return; } /* only for isocontour and freehand rois */ AmitkPoint amitk_roi_get_center_of_mass (AmitkRoi * roi) { g_return_val_if_fail(AMITK_IS_ROI(roi), zero_point); g_return_val_if_fail((AMITK_ROI_TYPE_ISOCONTOUR(roi) || AMITK_ROI_TYPE_FREEHAND(roi)), zero_point); if (!roi->center_of_mass_calculated) { switch(AMITK_ROI_TYPE(roi)) { case AMITK_ROI_TYPE_ISOCONTOUR_2D: amitk_roi_ISOCONTOUR_2D_calc_center_of_mass(roi); break; case AMITK_ROI_TYPE_ISOCONTOUR_3D: amitk_roi_ISOCONTOUR_3D_calc_center_of_mass(roi); break; case AMITK_ROI_TYPE_FREEHAND_2D: amitk_roi_FREEHAND_2D_calc_center_of_mass(roi); break; case AMITK_ROI_TYPE_FREEHAND_3D: amitk_roi_FREEHAND_3D_calc_center_of_mass(roi); break; default: g_error("unexpected case in %s at line %d\n", __FILE__, __LINE__); break; } } return amitk_space_s2b(AMITK_SPACE(roi), roi->center_of_mass); } void amitk_roi_set_type(AmitkRoi * roi, AmitkRoiType new_type) { g_return_if_fail(AMITK_IS_ROI(roi)); if ((new_type == AMITK_ROI_TYPE_ISOCONTOUR_2D) || (new_type == AMITK_ROI_TYPE_ISOCONTOUR_3D) || AMITK_ROI_TYPE_ISOCONTOUR(roi) || (new_type == AMITK_ROI_TYPE_FREEHAND_2D) || (new_type == AMITK_ROI_TYPE_FREEHAND_3D) || AMITK_ROI_TYPE_FREEHAND(roi)) g_return_if_fail(new_type == AMITK_ROI_TYPE(roi)); if (AMITK_ROI_TYPE(roi) != new_type) { roi->type = new_type; g_signal_emit(G_OBJECT(roi), roi_signals[ROI_TYPE_CHANGED], 0); g_signal_emit(G_OBJECT(roi), roi_signals[ROI_CHANGED], 0); } return; } /* iterates over the voxels in the given data set that are inside the given roi, and performs the specified calculation function for those points */ /* if inverse is true, the calculation is done for the portion of the data set not in the roi */ /* if accurate is true, uses much slower but more accurate calculation */ /* calulation should be a function taking the following arguments: calculation(AmitkVoxel dataset_voxel, amide_data_t value, amide_real_t voxel_fraction, gpointer data) */ void amitk_roi_calculate_on_data_set(const AmitkRoi * roi, const AmitkDataSet * ds, const guint frame, const guint gate, const gboolean inverse, const gboolean accurate, void (*calculation)(), gpointer data) { g_return_if_fail(AMITK_IS_ROI(roi)); g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (AMITK_ROI_UNDRAWN(roi)) return; switch(AMITK_ROI_TYPE(roi)) { case AMITK_ROI_TYPE_ELLIPSOID: if (accurate) amitk_roi_ELLIPSOID_calculate_on_data_set_accurate(roi, ds, frame, gate, inverse, calculation, data); else amitk_roi_ELLIPSOID_calculate_on_data_set_fast(roi, ds, frame, gate, inverse, calculation, data); break; case AMITK_ROI_TYPE_CYLINDER: if (accurate) amitk_roi_CYLINDER_calculate_on_data_set_accurate(roi, ds, frame, gate, inverse, calculation, data); else amitk_roi_CYLINDER_calculate_on_data_set_fast(roi, ds, frame, gate, inverse, calculation, data); break; case AMITK_ROI_TYPE_BOX: if (accurate) amitk_roi_BOX_calculate_on_data_set_accurate(roi, ds, frame, gate, inverse, calculation, data); else amitk_roi_BOX_calculate_on_data_set_fast(roi, ds, frame, gate, inverse, calculation, data); break; case AMITK_ROI_TYPE_ISOCONTOUR_2D: if (accurate) amitk_roi_ISOCONTOUR_2D_calculate_on_data_set_accurate(roi, ds, frame, gate, inverse, calculation, data); else amitk_roi_ISOCONTOUR_2D_calculate_on_data_set_fast(roi, ds, frame, gate, inverse, calculation, data); break; case AMITK_ROI_TYPE_ISOCONTOUR_3D: if (accurate) amitk_roi_ISOCONTOUR_3D_calculate_on_data_set_accurate(roi, ds, frame, gate, inverse, calculation, data); else amitk_roi_ISOCONTOUR_3D_calculate_on_data_set_fast(roi, ds, frame, gate, inverse, calculation, data); break; case AMITK_ROI_TYPE_FREEHAND_2D: if (accurate) amitk_roi_FREEHAND_2D_calculate_on_data_set_accurate(roi, ds, frame, gate, inverse, calculation, data); else amitk_roi_FREEHAND_2D_calculate_on_data_set_fast(roi, ds, frame, gate, inverse, calculation, data); break; case AMITK_ROI_TYPE_FREEHAND_3D: if (accurate) amitk_roi_FREEHAND_3D_calculate_on_data_set_accurate(roi, ds, frame, gate, inverse, calculation, data); else amitk_roi_FREEHAND_3D_calculate_on_data_set_fast(roi, ds, frame, gate, inverse, calculation, data); break; default: g_error("roi type %d not implemented! file %s line %d",AMITK_ROI_TYPE(roi), __FILE__, __LINE__); break; } return; } static void erase_volume(AmitkVoxel voxel, amide_data_t value, amide_real_t voxel_fraction, gpointer ds) { amitk_data_set_set_value(AMITK_DATA_SET(ds), voxel, (value*(1.0-voxel_fraction)+ AMITK_DATA_SET_THRESHOLD_MIN(ds, 0)*voxel_fraction), FALSE); return; } /* sets the volume inside/or outside of the given data set that is enclosed by roi equal to zero */ void amitk_roi_erase_volume(const AmitkRoi * roi, AmitkDataSet * ds, const gboolean outside, AmitkUpdateFunc update_func, gpointer update_data) { guint i_frame; guint i_gate; for (i_frame=0; i_framedistribution = NULL; } /* this is a no-op to get a data_set_changed signal */ amitk_data_set_set_value(AMITK_DATA_SET(ds), zero_voxel, amitk_data_set_get_value(AMITK_DATA_SET(ds), zero_voxel), TRUE); return; } const gchar * amitk_roi_type_get_name(const AmitkRoiType roi_type) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_ROI_TYPE); enum_value = g_enum_get_value(enum_class, roi_type); g_type_class_unref(enum_class); return enum_value->value_nick; } /* returns the minimum dimensional width of the roi with the largest voxel size */ /* only operates on ISOCONTOUR roi's */ amide_real_t amitk_rois_get_max_min_voxel_size(GList * objects) { amide_real_t min_voxel_size, temp; if (objects == NULL) return -1.0; /* invalid */ /* first process the rest of the list */ min_voxel_size = amitk_rois_get_max_min_voxel_size(objects->next); /* now process and compare to the children */ temp = amitk_rois_get_max_min_voxel_size(AMITK_OBJECT_CHILDREN(objects->data)); if (temp > 0) { if (min_voxel_size < 0.0) min_voxel_size = temp; else if (temp > min_voxel_size) min_voxel_size = temp; } /* and process this guy */ if (AMITK_IS_ROI(objects->data)) if (AMITK_ROI_TYPE_ISOCONTOUR(objects->data) || AMITK_ROI_TYPE_FREEHAND(objects->data)) { temp = point_min_dim(AMITK_ROI_VOXEL_SIZE(objects->data)); if (min_voxel_size < 0.0) min_voxel_size = temp; else if (temp > min_voxel_size) min_voxel_size = temp; } return min_voxel_size; } amide-1.0.5/src/image.h0000644000175000017500000000610012270274531014466 0ustar loeningloening/* image.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __IMAGE_H__ #define __IMAGE_H__ /* header files that are always needed with this file */ #include #include "amide.h" #include "amitk_common.h" #include "amitk_study.h" #include "amitk_roi.h" #include "render.h" #define IMAGE_DISTRIBUTION_WIDTH 100 /* external functions */ GdkPixbuf * image_slice_intersection(const AmitkRoi * roi, const AmitkVolume * canvas_slice, const amide_real_t pixel_size, #ifdef AMIDE_LIBGNOMECANVAS_AA const gdouble transparency, #else const gboolean fill_roi, #endif rgba_t color, AmitkPoint * return_offset, AmitkPoint * return_corner); GdkPixbuf * image_blank(const amide_intpoint_t width, const amide_intpoint_t height, rgba_t image_color); GdkPixbuf * image_from_8bit(const guchar * image, const amide_intpoint_t width, const amide_intpoint_t height, const AmitkColorTable color_table); #ifdef AMIDE_LIBVOLPACK_SUPPORT GdkPixbuf * image_from_renderings(renderings_t * renderings, gint16 image_width, gint16 image_height, AmideEye eyes, gdouble eye_angle, gint16 eye_width); #endif GdkPixbuf * image_of_distribution(AmitkDataSet * ds, rgb_t fg, AmitkUpdateFunc update_func, gpointer update_data); GdkPixbuf * image_from_colortable(const AmitkColorTable color_table, const amide_intpoint_t width, const amide_intpoint_t height, const amide_data_t min, const amide_data_t max, const amide_data_t data_set_min, const amide_data_t data_set_max, const gboolean horizontal); GdkPixbuf * image_from_projection(AmitkDataSet * projection); GdkPixbuf * image_from_slice(AmitkDataSet * slice, AmitkViewMode view_mode); GdkPixbuf * image_from_data_sets(GList ** pdisp_slices, GList ** pslice_cache, const gint max_slice_cache_size, GList * objects, const AmitkDataSet * active_ds, const amide_time_t start, const amide_time_t duration, const amide_intpoint_t gate, const amide_real_t pixel_size, const AmitkVolume * view_volume, const AmitkFuseType fuse_type, const AmitkViewMode view_mode); GdkPixbuf * image_get_data_set_pixbuf(AmitkDataSet * ds); #endif /* __IMAGE_H__ */ amide-1.0.5/src/ui_study_cb.c0000644000175000017500000012636512270305626015730 0ustar loeningloening/* ui_study_cb.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include /* needed for stat */ #include /* needed for dirent.h on mac os */ #include #include #include "amide.h" #include "amitk_threshold.h" #include "amitk_canvas.h" #include "amitk_tree_view.h" #include "ui_common.h" #include "ui_render.h" #include "ui_series.h" #include "ui_study.h" #include "ui_study_cb.h" #include "ui_preferences_dialog.h" #include "amitk_object_dialog.h" #include "amitk_progress_dialog.h" #include "ui_gate_dialog.h" #include "ui_time_dialog.h" #include "tb_export_data_set.h" #include "tb_distance.h" #include "tb_fly_through.h" #include "tb_alignment.h" #include "tb_crop.h" #include "tb_fads.h" #include "tb_filter.h" #include "tb_math.h" #include "tb_profile.h" #include "tb_roi_analysis.h" static gchar * no_active_ds = N_("No data set is currently marked as active"); #ifndef AMIDE_LIBGSL_SUPPORT static gchar * no_gsl = N_("This wizard requires compiled in support from the GNU Scientific Library (libgsl), which this copy of AMIDE does not have."); #endif static void object_picker(ui_study_t * ui_study, AmitkStudy * import_study) { GtkWidget * dialog; gchar * temp_string; GtkWidget * table; guint table_row; GtkWidget * tree_view; GtkWidget * scrolled; GList * selected_objects; GList * temp_objects; gint return_val; /* unselect all objects in study */ amitk_object_set_selected(AMITK_OBJECT(import_study), FALSE, AMITK_SELECTION_ALL); temp_string = g_strdup_printf(_("%s: Pick Object(s) to Import"), PACKAGE); dialog = gtk_dialog_new_with_buttons (temp_string, ui_study->window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_EXECUTE, AMITK_RESPONSE_EXECUTE, GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE, NULL); gtk_window_set_title(GTK_WINDOW(dialog), temp_string); g_free(temp_string); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(ui_common_init_dialog_response_cb), NULL); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); /* start making the widgets for this dialog box */ table = gtk_table_new(5,2,FALSE); table_row=0; gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table); tree_view = amitk_tree_view_new(AMITK_TREE_VIEW_MODE_MULTIPLE_SELECTION,NULL, NULL); g_object_set_data(G_OBJECT(dialog), "tree_view", tree_view); amitk_tree_view_set_study(AMITK_TREE_VIEW(tree_view), import_study); amitk_tree_view_expand_object(AMITK_TREE_VIEW(tree_view), AMITK_OBJECT(import_study)); /* make a scrolled area for the tree */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,250,250); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), tree_view); gtk_table_attach(GTK_TABLE(table), scrolled, 0,2, table_row, table_row+1,GTK_FILL, GTK_FILL | GTK_EXPAND, X_PADDING, Y_PADDING); table_row++; /* and show all our widgets */ gtk_widget_show_all(dialog); /* and wait for the question to return */ return_val = gtk_dialog_run(GTK_DIALOG(dialog)); /* get which objects were selected */ selected_objects = ui_common_init_dialog_selected_objects(dialog); gtk_widget_destroy(dialog); /* add on the new objects i fwe want */ if (return_val == AMITK_RESPONSE_EXECUTE) { temp_objects = selected_objects; while (temp_objects != NULL) { amitk_object_remove_child(AMITK_OBJECT(import_study), AMITK_OBJECT(temp_objects->data)); amitk_object_add_child(AMITK_OBJECT(ui_study->study), AMITK_OBJECT(temp_objects->data)); temp_objects = temp_objects->next; } } selected_objects = amitk_objects_unref(selected_objects); } gboolean xif_files_filter(const GtkFileFilterInfo *filter_info, gpointer data) { g_return_val_if_fail(filter_info->filename != NULL, FALSE); // amitk_is_xif_directory(filter_info->filename, NULL, NULL) return amitk_is_xif_flat_file(filter_info->filename, NULL, NULL); } void create_xif_filters(GtkFileChooser * file_chooser) { GtkFileFilter * filter; /* create the filter for .xif files */ filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("XIF Files")); // gtk_file_filter_add_pattern (filter, "*"); gtk_file_filter_add_custom(filter, GTK_FILE_FILTER_FILENAME, xif_files_filter, NULL, NULL); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(file_chooser), filter); gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (file_chooser), filter); /* xif filter is default */ filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("All Files")); gtk_file_filter_add_pattern (filter, "*"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_chooser), filter); return; } void read_xif(ui_study_t * ui_study, gboolean import_object, gboolean as_directory, gboolean recovery_mode) { GtkWidget * file_chooser; AmitkStudy * study; gchar * filename; /* get the name of the file to import */ file_chooser = gtk_file_chooser_dialog_new (recovery_mode ? _("Recover AMIDE XIF FILE") : _("Open AMIDE XIF File"), GTK_WINDOW(ui_study->window), /* parent window */ as_directory ? GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER : GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(ui_study->preferences, file_chooser); /* set the default directory if applicable */ if (!as_directory) create_xif_filters(GTK_FILE_CHOOSER(file_chooser)); /* only include *.xif in the list by default */ if (gtk_dialog_run (GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (file_chooser)); else filename = NULL; gtk_widget_destroy (file_chooser); if (filename == NULL) return; if (!ui_common_check_filename(filename)) { g_warning(_("Inappropriate filename: %s"),filename); g_free(filename); return; } ui_common_place_cursor(UI_CURSOR_WAIT, ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); /* try loading the study into memory */ if (recovery_mode) { study = amitk_study_recover_xml(filename, ui_study->preferences); if (study == NULL) g_warning(_("error recovering study: %s"),filename); } else { study = amitk_study_load_xml(filename); if (study == NULL) g_warning(_("error loading study: %s"),filename); } if (study != NULL) { if (!import_object) { /* setup the study window */ if (ui_study->study_virgin) ui_study_set_study(ui_study, study); else ui_study_create(study, ui_study->preferences); } else { object_picker(ui_study, study); } amitk_object_unref(study); } ui_common_remove_wait_cursor(ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); g_free(filename); } /* function to load a study into the study widget */ void ui_study_cb_open_xif_file(GtkAction * action, gpointer data) { ui_study_t * ui_study=data; read_xif(ui_study, FALSE, FALSE, FALSE); return; } void ui_study_cb_open_xif_dir(GtkAction * action, gpointer data) { ui_study_t * ui_study=data; read_xif(ui_study, FALSE, TRUE, FALSE); return; } /* function to load an object from a pre-existing study into the current study widget */ void ui_study_cb_import_object_from_xif_file(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; read_xif(ui_study, TRUE, FALSE, FALSE); return; } void ui_study_cb_import_object_from_xif_dir(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; read_xif(ui_study, TRUE, TRUE, FALSE); return; } /* try to recover portions of a study file */ void ui_study_cb_recover_xif_file(GtkAction * action, gpointer data) { ui_study_t * ui_study=data; read_xif(ui_study, FALSE, FALSE, TRUE); return; } /* function to create a new study widget */ void ui_study_cb_new_study(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; ui_study_create(NULL, ui_study->preferences); return; } /* returned save_filename needs to be free'd */ static gchar * verify_save_name(GtkWindow * parent, const gchar * filename) { gchar * save_filename; gchar * prev_filename; gchar ** frags1=NULL; gchar ** frags2=NULL; struct stat file_info; GtkWidget * question; gint return_val; g_return_val_if_fail(filename != NULL, NULL); /* make sure the filename ends with .xif */ save_filename = g_strdup(filename); g_strreverse(save_filename); frags1 = g_strsplit(save_filename, ".", 2); g_strreverse(save_filename); g_strreverse(frags1[0]); frags2 = g_strsplit(frags1[0], G_DIR_SEPARATOR_S, -1); if (g_ascii_strcasecmp(frags2[0], "xif") != 0) { prev_filename = save_filename; save_filename = g_strdup_printf("%s%s",prev_filename, ".xif"); g_free(prev_filename); } g_strfreev(frags2); g_strfreev(frags1); /* check with user if filename already exists */ if (stat(save_filename, &file_info) == 0) { /* check if it's okay to writeover the file */ question = gtk_message_dialog_new(parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, _("Overwrite file: %s"), save_filename); /* and wait for the question to return */ return_val = gtk_dialog_run(GTK_DIALOG(question)); gtk_widget_destroy(question); if (return_val != GTK_RESPONSE_OK) { return NULL; /* we don't want to overwrite the file.... */ } } /* unlinking the file doesn't occur here */ return save_filename; } void save_xif(ui_study_t * ui_study, gboolean as_directory) { GtkWidget * file_chooser; gchar * initial_filename; gchar * final_filename; gchar * temp_str; /* get the name of the file to save */ file_chooser = gtk_file_chooser_dialog_new (_("Save AMIDE XIF File"), GTK_WINDOW(ui_study->window), /* parent window */ as_directory ? GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER : GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); if (!as_directory) create_xif_filters(GTK_FILE_CHOOSER(file_chooser)); /* only include *.xif in the list by default */ /* take a guess at the filename */ if (AMITK_STUDY_FILENAME(ui_study->study) == NULL) { if (AMITK_OBJECT_NAME(ui_study->study) != NULL) { initial_filename = g_strdup_printf("%s.xif",AMITK_OBJECT_NAME(ui_study->study)); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(file_chooser), initial_filename); g_free(initial_filename); } else { gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER(file_chooser), "Untitled.xif"); } temp_str = ui_common_suggest_path(); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser), temp_str); g_free(temp_str); } else { /* don't already have a filename */ if (!as_directory) { gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(file_chooser), AMITK_STUDY_FILENAME(ui_study->study)); } else { /* as_directory */ /* have to do all this crap, as gtk_file_chooser_set_filename doesn't play well with GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER */ temp_str = g_path_get_basename(AMITK_STUDY_FILENAME(ui_study->study)); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(file_chooser), temp_str); g_free(temp_str); temp_str = g_path_get_dirname(AMITK_STUDY_FILENAME(ui_study->study)); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser), temp_str); g_free(temp_str); } } if (gtk_dialog_run (GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) initial_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (file_chooser)); else initial_filename = NULL; gtk_widget_destroy (file_chooser); if (initial_filename == NULL) return; /* sanity checks */ if (!ui_common_check_filename(initial_filename)) { g_warning(_("Inappropriate filename: %s"),initial_filename); g_free(initial_filename); return; } /* verify the file name is kosher, and if we really want to overwrite */ if (!as_directory) { final_filename = verify_save_name(GTK_WINDOW(ui_study->window), initial_filename); g_free(initial_filename); if (final_filename == NULL) return; } else { /* we don't force the user to end the directory name with .xif this is mainly because gtk_file_chooser already creates the directory (annoying) */ final_filename = initial_filename; initial_filename = NULL; } ui_common_place_cursor(UI_CURSOR_WAIT, ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); /* allright, save our study */ if (amitk_study_save_xml(ui_study->study, final_filename, as_directory) == FALSE) { g_warning(_("Failure Saving File: %s"),final_filename); } else { /* indicate no new changes */ ui_study->study_altered=FALSE; ui_study_update_title(ui_study); } ui_common_remove_wait_cursor(ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); ui_common_set_last_path_used(final_filename); g_free(final_filename); } void ui_study_cb_save_as_xif_file(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; save_xif(ui_study, FALSE); return; } void ui_study_cb_save_as_xif_dir(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; save_xif(ui_study, TRUE); return; } /* function to selection which file to import */ void ui_study_cb_import(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; GtkWidget * file_chooser; AmitkImportMethod method; int submethod; gchar * filename; gchar * studyname = NULL; GList * import_data_sets; AmitkDataSet * import_ds; /* get the name of the file to import */ file_chooser = gtk_file_chooser_dialog_new (_("Import File"), GTK_WINDOW(ui_study->window), /* parent window */ GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(ui_study->preferences, file_chooser); /* set the default directory if applicable */ if (gtk_dialog_run (GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (file_chooser)); else filename = NULL; gtk_widget_destroy (file_chooser); if (filename == NULL) return; if (!ui_common_check_filename(filename)) { g_warning(_("Inappropriate Filename: %s"), filename); g_free(filename); return; } #ifdef AMIDE_DEBUG g_print("file to import: %s\n",filename); #endif /* method we're trying to use to read in the file */ method = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "method")); submethod = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "submethod")); ui_common_place_cursor(UI_CURSOR_WAIT, ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); /* now, what we need to do if we've successfully gotten an image filename */ if ((import_data_sets = amitk_data_set_import_file(method, submethod, filename, &studyname, ui_study->preferences, amitk_progress_dialog_update, ui_study->progress_dialog)) != NULL) { if (studyname != NULL) { amitk_study_suggest_name(ui_study->study, studyname); g_free(studyname); } while (import_data_sets != NULL) { import_ds = import_data_sets->data; #ifdef AMIDE_DEBUG g_print("imported data set name %s\n",AMITK_OBJECT_NAME(import_ds)); #endif amitk_object_add_child(AMITK_OBJECT(ui_study->study), AMITK_OBJECT(import_ds)); /* this adds a reference to the data set*/ import_data_sets = g_list_remove(import_data_sets, import_ds); amitk_object_unref(import_ds); /* so remove a reference */ } } else { g_warning(_("Could not import data sets from file %s\n"), filename); } ui_common_remove_wait_cursor(ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); ui_common_set_last_path_used(filename); g_free(filename); return; } /* function to selection which file to export to */ void ui_study_cb_export_data_set(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; if (!AMITK_IS_DATA_SET(ui_study->active_object)) { g_warning(_("There's currently no active data set to export")); return; } /* let the user input rendering options */ tb_export_data_set(ui_study->study, AMITK_DATA_SET(ui_study->active_object), ui_study->preferences, ui_study->window); return; } /* function to save a view as an external data format */ void ui_study_cb_export_view(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; GList * current_data_sets; GList * temp_sets; GtkWidget * file_chooser; gchar * filename; gchar * data_set_names = NULL; AmitkView view; amide_real_t upper, lower; AmitkPoint temp_p; AmitkVolume * canvas_volume; GdkPixbuf * pixbuf; gboolean save_as_png=FALSE; gint length; const gchar * extension; gboolean return_val; current_data_sets = amitk_object_get_selected_children_of_type(AMITK_OBJECT(ui_study->study), AMITK_OBJECT_TYPE_DATA_SET, AMITK_SELECTION_SELECTED_0, TRUE); if (current_data_sets == NULL) return; file_chooser = gtk_file_chooser_dialog_new(_("Export to File"), GTK_WINDOW(ui_study->window), /* parent window */ GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER (file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(ui_study->preferences, file_chooser); /* set the default directory if applicable */ view = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "view")); if (ui_study->canvas[AMITK_VIEW_MODE_SINGLE][view] == NULL) return; canvas_volume = AMITK_CANVAS(ui_study->canvas[AMITK_VIEW_MODE_SINGLE][view])->volume; g_return_if_fail(canvas_volume != NULL); /* translate the center so that the z coordinate corresponds to depth in this view */ temp_p = amitk_space_b2s(AMITK_SPACE(canvas_volume), AMITK_STUDY_VIEW_CENTER(ui_study->study)); /* figure out the top and bottom of this slice */ upper = temp_p.z + AMITK_STUDY_VIEW_THICKNESS(ui_study->study)/2.0; lower = temp_p.z - AMITK_STUDY_VIEW_THICKNESS(ui_study->study)/2.0; /* take a guess at the filename */ data_set_names = g_strdup(AMITK_OBJECT_NAME(current_data_sets->data)); temp_sets = current_data_sets->next; while (temp_sets != NULL) { filename = g_strdup_printf("%s+%s",data_set_names, AMITK_OBJECT_NAME(temp_sets->data)); g_free(data_set_names); data_set_names = filename; temp_sets = temp_sets->next; } filename = g_strdup_printf("%s_%s_%s_%3.1f-%3.1f.jpg", AMITK_OBJECT_NAME(ui_study->study), data_set_names, amitk_view_get_name(view), lower, upper); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(file_chooser), filename); g_free(data_set_names); g_free(filename); amitk_objects_unref(current_data_sets); /* run the file chooser dialog */ if (gtk_dialog_run(GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (file_chooser)); else filename = NULL; gtk_widget_destroy (file_chooser); if (filename == NULL) return; /* check if we want a png */ length = strlen(filename); if (length > 4) { extension = filename + length-4; if (g_ascii_strncasecmp(extension, ".png", 4)==0) { save_as_png = TRUE; } } /* get a pixbuf of the canvas */ pixbuf = amitk_canvas_get_pixbuf(AMITK_CANVAS(ui_study->canvas[AMITK_VIEW_MODE_SINGLE][view])); if (pixbuf == NULL) { g_warning(_("Canvas failed to return a valid image\n")); } else { if (save_as_png) return_val = gdk_pixbuf_save (pixbuf, filename, "png", NULL, NULL); else return_val = gdk_pixbuf_save (pixbuf, filename, "jpeg", NULL, "quality", "100", NULL); if (!return_val) g_warning(_("Failure Saving File: %s"),filename); g_object_unref(pixbuf); } g_free(filename); return; } /* callback generally attached to the entry_notify_event */ gboolean ui_study_cb_update_help_info(GtkWidget * widget, GdkEventCrossing * event, gpointer data) { ui_study_t * ui_study = data; AmitkHelpInfo which_info; which_info = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "which_help")); ui_study_update_help_info(ui_study, which_info, AMITK_STUDY_VIEW_CENTER(ui_study->study), 0.0); return FALSE; } void ui_study_cb_canvas_help_event(GtkWidget * canvas, AmitkHelpInfo help_type, AmitkPoint *location, amide_data_t value, gpointer data) { ui_study_t * ui_study = data; ui_study_update_help_info(ui_study, help_type, *location, value); return; } void ui_study_cb_canvas_view_changing(GtkWidget * canvas, AmitkPoint *position, amide_real_t thickness, gpointer data) { ui_study_t * ui_study = data; AmitkView i_view; AmitkViewMode i_view_mode; g_return_if_fail(ui_study->study != NULL); /* update the other canvases accordingly */ for (i_view_mode=0; i_view_mode <= AMITK_STUDY_VIEW_MODE(ui_study->study); i_view_mode++) for (i_view=0; i_viewcanvas[i_view_mode][i_view] != NULL) if (canvas != ui_study->canvas[i_view_mode][i_view]) amitk_canvas_update_target(AMITK_CANVAS(ui_study->canvas[i_view_mode][i_view]), AMITK_CANVAS_TARGET_ACTION_SHOW,*position, thickness); if (!REAL_EQUAL(AMITK_STUDY_VIEW_THICKNESS(ui_study->study), thickness)) ui_study_update_thickness(ui_study, thickness); return; } void ui_study_cb_canvas_view_changed(GtkWidget * canvas, AmitkPoint *position, amide_real_t thickness, gpointer data) { ui_study_t * ui_study = data; AmitkView i_view; AmitkViewMode i_view_mode; g_return_if_fail(ui_study->study != NULL); amitk_study_set_view_thickness(ui_study->study, thickness); amitk_study_set_view_center(ui_study->study, *position); /* update the other canvases accordingly */ for (i_view_mode=0; i_view_mode <= AMITK_STUDY_VIEW_MODE(ui_study->study); i_view_mode++) { for (i_view=0; i_viewcanvas[i_view_mode][i_view] != NULL) amitk_canvas_update_target(AMITK_CANVAS(ui_study->canvas[i_view_mode][i_view]), AMITK_CANVAS_TARGET_ACTION_HIDE,*position, thickness); } return; } void ui_study_cb_canvas_erase_volume(GtkWidget * canvas, AmitkRoi * roi, gboolean outside, gpointer data) { ui_study_t * ui_study = data; GtkWidget * question; gint return_val; if (!AMITK_IS_DATA_SET(ui_study->active_object)) { g_warning(_("no active data set to erase from")); return; } /* make sure we really want to delete */ question = gtk_message_dialog_new(ui_study->window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, _("Do you really wish to erase the data set %s\n to the ROI: %s\n on the data set: %s\nThis step is irreversible\nThe minimum threshold value: %5.3f\n will be used to fill in the volume"), outside ? _("exterior") : _("interior"), AMITK_OBJECT_NAME(roi), AMITK_OBJECT_NAME(ui_study->active_object), AMITK_DATA_SET_THRESHOLD_MIN(ui_study->active_object,0)); /* and wait for the question to return */ return_val = gtk_dialog_run(GTK_DIALOG(question)); gtk_widget_destroy(question); if (return_val != GTK_RESPONSE_OK) return; /* cancel */ amitk_roi_erase_volume(roi, AMITK_DATA_SET(ui_study->active_object), outside, amitk_progress_dialog_update, ui_study->progress_dialog); return; } void ui_study_cb_canvas_new_object(GtkWidget * canvas, AmitkObject * parent, AmitkObjectType type, AmitkPoint *position, gpointer data) { ui_study_t * ui_study = data; /* only handles fiducial marks currently */ g_return_if_fail(type == AMITK_OBJECT_TYPE_FIDUCIAL_MARK); ui_study_add_fiducial_mark(ui_study, parent, TRUE, *position); return; } void ui_study_cb_tree_view_activate_object(GtkWidget * tree_view, AmitkObject * object, gpointer data) { ui_study_t * ui_study = data; AmitkPoint center; if (object == NULL) { ui_study_make_active_object(ui_study, object); } else if (AMITK_IS_DATA_SET(object) || AMITK_IS_STUDY(object)) { ui_study_make_active_object(ui_study, object); } else if (AMITK_IS_ROI(object)) { if (!AMITK_ROI_UNDRAWN(AMITK_ROI(object))) { center = amitk_volume_get_center(AMITK_VOLUME(object)); if (!POINT_EQUAL(center, AMITK_STUDY_VIEW_CENTER(ui_study->study))) amitk_study_set_view_center(ui_study->study, center); } } else if (AMITK_IS_FIDUCIAL_MARK(object)) { center = AMITK_FIDUCIAL_MARK_GET(object); if ( !POINT_EQUAL(center, AMITK_STUDY_VIEW_CENTER(ui_study->study))) amitk_study_set_view_center(ui_study->study, center); } } void ui_study_cb_tree_view_popup_object(GtkWidget * tree_view, AmitkObject * object, gpointer data) { ui_study_t * ui_study = data; GtkWidget * dialog; if (AMITK_IS_DATA_SET(object)) { ui_common_place_cursor(UI_CURSOR_WAIT, ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); if (ui_study->threshold_dialog != NULL) { if (amitk_threshold_dialog_data_set(AMITK_THRESHOLD_DIALOG(ui_study->threshold_dialog)) == AMITK_DATA_SET(object)) { gtk_widget_destroy(ui_study->threshold_dialog); ui_study->threshold_dialog = NULL; } } } dialog = amitk_object_dialog_new(object); if (AMITK_IS_DATA_SET(object)) ui_common_remove_wait_cursor(ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); if (dialog != NULL) gtk_widget_show(dialog); else /* already up ,pop the window to the top */ gtk_window_present(GTK_WINDOW(object->dialog)); return; } void ui_study_cb_tree_view_add_object(GtkWidget * tree_view, AmitkObject * parent, AmitkObjectType object_type, AmitkRoiType roi_type, gpointer data) { ui_study_t * ui_study = data; if (parent == NULL) parent = AMITK_OBJECT(ui_study->study); if (object_type == AMITK_OBJECT_TYPE_FIDUCIAL_MARK) ui_study_add_fiducial_mark(ui_study, parent, TRUE,AMITK_STUDY_VIEW_CENTER(ui_study->study)); else if (object_type == AMITK_OBJECT_TYPE_ROI) ui_study_add_roi(ui_study, parent, roi_type); return; } void ui_study_cb_tree_view_delete_object(GtkWidget * tree_view, AmitkObject * object, gpointer data) { ui_study_t * ui_study = data; GtkWidget * question; gint return_val; g_return_if_fail(AMITK_IS_OBJECT(object)); question = gtk_message_dialog_new(ui_study->window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, _("Do you really want to delete: %s%s"), AMITK_OBJECT_NAME(object), AMITK_OBJECT_CHILDREN(object) != NULL ? _("\nand its children") : ""); /* and wait for the question to return */ return_val = gtk_dialog_run(GTK_DIALOG(question)); gtk_widget_destroy(question); if (return_val != GTK_RESPONSE_OK) return; amitk_object_remove_child(AMITK_OBJECT_PARENT(object), object); if (ui_study->study_altered != TRUE) { ui_study->study_virgin=FALSE; ui_study->study_altered=TRUE; ui_study_update_title(ui_study); } return; } void ui_study_cb_tree_view_help_event(GtkWidget * widget, AmitkHelpInfo help_type, gpointer data) { ui_study_t * ui_study = data; ui_study_update_help_info(ui_study, help_type, zero_point, 0.0); return; } void ui_study_cb_zoom(GtkSpinButton * spin_button, gpointer data) { ui_study_t * ui_study = data; amide_real_t zoom; if (AMITK_OBJECT_CHILDREN(ui_study->study)==NULL) return; zoom = gtk_spin_button_get_value(spin_button); amitk_study_set_zoom(ui_study->study, zoom); return; } void ui_study_cb_fov(GtkSpinButton * spin_button, gpointer data) { ui_study_t * ui_study = data; amide_real_t fov; if (AMITK_OBJECT_CHILDREN(ui_study->study)==NULL) return; fov = gtk_spin_button_get_value(spin_button); amitk_study_set_fov(ui_study->study, fov); return; } void ui_study_cb_thickness(GtkSpinButton * spin_button, gpointer data) { ui_study_t * ui_study = data; amide_real_t thickness; if (AMITK_OBJECT_CHILDREN(ui_study->study)==NULL) return; /* this does the equivalent of hitting "enter", makes sure any rounding error that is done on the entry is performed before we get the value */ g_signal_emit_by_name(G_OBJECT(spin_button), "activate", NULL, NULL); thickness = gtk_spin_button_get_value(spin_button); amitk_study_set_view_thickness(ui_study->study, thickness); return; } static gboolean gate_delete_event(GtkWidget* widget, GdkEvent * event, gpointer data) { ui_study_t * ui_study = data; /* just keeping track on whether or not the gate widget is up */ ui_study->gate_dialog = NULL; return FALSE; } void ui_study_cb_gate(GtkWidget * button, gpointer data) { ui_study_t * ui_study = data; if (ui_study->gate_dialog == NULL) { if (AMITK_IS_DATA_SET(ui_study->active_object)) { ui_study->gate_dialog = ui_gate_dialog_create(AMITK_DATA_SET(ui_study->active_object), ui_study->window); g_signal_connect(G_OBJECT(ui_study->gate_dialog), "delete_event", G_CALLBACK(gate_delete_event), ui_study); gtk_widget_show(ui_study->gate_dialog); } } else /* pop the window to the top */ gtk_window_present(GTK_WINDOW(ui_study->gate_dialog)); return; } static gboolean time_delete_event(GtkWidget* widget, GdkEvent * event, gpointer data) { ui_study_t * ui_study = data; /* just keeping track on whether or not the time widget is up */ ui_study->time_dialog = NULL; return FALSE; } void ui_study_cb_time(GtkWidget * button, gpointer data) { ui_study_t * ui_study = data; if (ui_study->time_dialog == NULL) { ui_study->time_dialog = ui_time_dialog_create(ui_study->study, ui_study->window); g_signal_connect(G_OBJECT(ui_study->time_dialog), "delete_event", G_CALLBACK(time_delete_event), ui_study); gtk_widget_show(ui_study->time_dialog); } else /* pop the window to the top */ gtk_window_present(GTK_WINDOW(ui_study->time_dialog)); return; } /* callbacks for setting up a set of slices in a new window */ void ui_study_cb_series(GtkAction * action, gpointer data) { GtkWidget * dialog; ui_study_t * ui_study = data; gint return_val; GList * selected_objects; /* let the user input rendering options */ dialog = ui_series_init_dialog_create(ui_study->study, ui_study->window); /* and wait for the question to return */ return_val = gtk_dialog_run(GTK_DIALOG(dialog)); selected_objects = ui_common_init_dialog_selected_objects(dialog); gtk_widget_destroy(dialog); /* we want to create the series */ if (return_val == AMITK_RESPONSE_EXECUTE) { ui_common_place_cursor(UI_CURSOR_WAIT, ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); ui_series_create(ui_study->study, ui_study->active_object, selected_objects, ui_study->preferences); ui_common_remove_wait_cursor(ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); } selected_objects = amitk_objects_unref(selected_objects); return; } #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) void ui_study_cb_fly_through(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; AmitkView view; view = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "view")); tb_fly_through(ui_study->study, view, ui_study->preferences, ui_study->window); return; } #endif #ifdef AMIDE_LIBVOLPACK_SUPPORT /* callback for starting up volume rendering */ void ui_study_cb_render(GtkAction * action, gpointer data) { GtkWidget * dialog; ui_study_t * ui_study = data; gint return_val; GList * selected_objects; /* let the user input rendering options */ dialog = ui_render_init_dialog_create(ui_study->study, ui_study->window); /* and wait for the question to return */ return_val = gtk_dialog_run(GTK_DIALOG(dialog)); selected_objects = ui_common_init_dialog_selected_objects(dialog); gtk_widget_destroy(dialog); /* we want to render */ if (return_val == AMITK_RESPONSE_EXECUTE) { ui_common_place_cursor(UI_CURSOR_WAIT, ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); ui_render_create(ui_study->study, selected_objects, ui_study->preferences); ui_common_remove_wait_cursor(ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); } selected_objects = amitk_objects_unref(selected_objects); return; } #endif /* do roi calculations */ void ui_study_cb_roi_statistics(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; GtkWidget * dialog; gint return_val; /* let the user input roi analysis options */ dialog = tb_roi_analysis_init_dialog(ui_study->window); /* and wait for the question to return */ return_val = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); if (return_val != AMITK_RESPONSE_EXECUTE) return; /* we hit cancel */ ui_common_place_cursor(UI_CURSOR_WAIT, ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); tb_roi_analysis(ui_study->study, ui_study->preferences, ui_study->window); ui_common_remove_wait_cursor(ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); return; } /* user wants to run the alignment wizard */ void ui_study_cb_alignment_selected(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; tb_alignment(ui_study->study, ui_study->window); return; } /* user wants to run the crop wizard */ void ui_study_cb_crop_selected(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; if (!AMITK_IS_DATA_SET(ui_study->active_object)) g_warning("%s",no_active_ds); else tb_crop(ui_study->study, AMITK_DATA_SET(ui_study->active_object), ui_study->window); return; } /* user wants to run the distance wizard */ void ui_study_cb_distance_selected(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; tb_distance(ui_study->study, ui_study->window); return; } /* user wants to run the fads wizard */ void ui_study_cb_fads_selected(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; if (!AMITK_IS_DATA_SET(ui_study->active_object)) g_warning("%s",no_active_ds); else { #ifdef AMIDE_LIBGSL_SUPPORT tb_fads(AMITK_DATA_SET(ui_study->active_object), ui_study->preferences, ui_study->window); #else g_warning("%s",no_gsl); #endif } return; } /* user wants to run the filter wizard */ void ui_study_cb_filter_selected(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; if (!AMITK_IS_DATA_SET(ui_study->active_object)) g_warning("%s",no_active_ds); else tb_filter(ui_study->study, AMITK_DATA_SET(ui_study->active_object), ui_study->window); return; } /* user wants to run the profile wizard */ void ui_study_cb_profile_selected(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; tb_profile(ui_study->study, ui_study->preferences, ui_study->window); return; } /* user wants to run the image math wizard */ void ui_study_cb_data_set_math_selected(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; tb_math(ui_study->study, ui_study->window); return; } static gboolean threshold_delete_event(GtkWidget* widget, GdkEvent * event, gpointer data) { ui_study_t * ui_study = data; /* just keeping track on whether or not the threshold widget is up */ ui_study->threshold_dialog = NULL; return FALSE; } /* function called when target button toggled on toolbar */ void ui_study_cb_canvas_target(GtkToggleAction * action, gpointer data) { ui_study_t * ui_study = data; amitk_study_set_canvas_target(ui_study->study, gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action))); } /* function called when hitting the threshold button, pops up a dialog */ void ui_study_cb_thresholding(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; if (!AMITK_IS_DATA_SET(ui_study->active_object)) return; /* make sure we don't already have a data set edit dialog up */ if ((ui_study->active_object->dialog == NULL) && (ui_study->threshold_dialog == NULL)) { ui_common_place_cursor(UI_CURSOR_WAIT, ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); ui_study->threshold_dialog = amitk_threshold_dialog_new(AMITK_DATA_SET(ui_study->active_object), ui_study->window); ui_common_remove_wait_cursor(ui_study->canvas[AMITK_VIEW_MODE_SINGLE][AMITK_VIEW_TRANSVERSE]); g_signal_connect(G_OBJECT(ui_study->threshold_dialog), "delete_event", G_CALLBACK(threshold_delete_event), ui_study); gtk_widget_show(ui_study->threshold_dialog); } else { /* pop the window to the top */ if (ui_study->active_object->dialog) gtk_window_present(GTK_WINDOW(ui_study->active_object->dialog)); else gtk_window_present(GTK_WINDOW(ui_study->threshold_dialog)); } return; } /* callback function for adding an roi */ void ui_study_cb_add_roi(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; AmitkRoiType roi_type; /* figure out which menu item called me */ roi_type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget),"roi_type")); ui_study_add_roi(ui_study, AMITK_OBJECT(ui_study->study), roi_type); return; } /* callback function for adding a fiducial mark */ void ui_study_cb_add_fiducial_mark(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; if (AMITK_IS_DATA_SET(ui_study->active_object)) { ui_study_add_fiducial_mark(ui_study, ui_study->active_object, TRUE, AMITK_STUDY_VIEW_CENTER(ui_study->study)); } return; } /* callback function for changing user's preferences */ void ui_study_cb_preferences(GtkAction * action, gpointer data) { ui_study_t * ui_study=data; ui_preferences_dialog_create(ui_study); return; } /* function to switch the interpolation method */ void ui_study_cb_interpolation(GtkRadioAction * action, GtkRadioAction * current, gpointer data) { ui_study_t * ui_study = data; g_return_if_fail(AMITK_IS_DATA_SET(ui_study->active_object)); amitk_data_set_set_interpolation(AMITK_DATA_SET(ui_study->active_object), gtk_radio_action_get_current_value((GTK_RADIO_ACTION(current)))); return; } /* function to switch the rendering method */ void ui_study_cb_rendering(GtkWidget * widget, gpointer data) { ui_study_t * ui_study = data; g_return_if_fail(AMITK_IS_DATA_SET(ui_study->active_object)); amitk_data_set_set_rendering(AMITK_DATA_SET(ui_study->active_object), gtk_combo_box_get_active(GTK_COMBO_BOX(widget))); return; } void ui_study_cb_study_changed(AmitkStudy * study, gpointer data) { ui_study_t * ui_study = data; ui_study_update_time_button(ui_study); ui_study_update_canvas_target(ui_study); return; } void ui_study_cb_thickness_changed(AmitkStudy * study, gpointer data) { ui_study_t * ui_study = data; ui_study_update_thickness(ui_study, AMITK_STUDY_VIEW_THICKNESS(ui_study->study)); return; } void ui_study_cb_canvas_layout_changed(AmitkStudy * study, gpointer data) { ui_study_t * ui_study = data; ui_study_update_canvas_visible_buttons(ui_study); ui_study_update_layout(ui_study); return; } void ui_study_cb_voxel_dim_or_zoom_changed(AmitkStudy * study, gpointer data) { ui_study_t * ui_study = data; ui_study_update_zoom(ui_study); return; } void ui_study_cb_fov_changed(AmitkStudy * study, gpointer data) { ui_study_t * ui_study = data; ui_study_update_fov(ui_study); return; } /* function to switch the image fusion type */ void ui_study_cb_fuse_type(GtkRadioAction * action, GtkRadioAction * current, gpointer data) { ui_study_t * ui_study = data; amitk_study_set_fuse_type(ui_study->study, gtk_radio_action_get_current_value((GTK_RADIO_ACTION(current)))); ui_study_update_fuse_type(ui_study); return; } void ui_study_cb_canvas_visible(GtkToggleAction * action, gpointer data) { ui_study_t * ui_study = data; AmitkView view; view = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action),"view")); amitk_study_set_canvas_visible(ui_study->study, view, gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action))); ui_study_update_canvas_visible_buttons(ui_study); return; } void ui_study_cb_view_mode(GtkRadioAction * action, GtkRadioAction * current, gpointer data) { ui_study_t * ui_study = data; amitk_study_set_view_mode(ui_study->study, gtk_radio_action_get_current_value((GTK_RADIO_ACTION(current)))); ui_study_update_view_mode(ui_study); return; } /* function ran to exit the program */ void ui_study_cb_quit(GtkAction * action, gpointer data) { ui_study_t * ui_study = data; GtkWindow * window = ui_study->window; gboolean return_val; /* run the delete event function */ g_signal_emit_by_name(G_OBJECT(window), "delete_event", NULL, &return_val); if (!return_val) { /* if we don't cancel the quit */ gtk_widget_destroy(GTK_WIDGET(window)); amide_unregister_all_windows(); /* kill everything */ } return; } /* function ran when closing a study window */ void ui_study_cb_close(GtkAction* action, gpointer data) { ui_study_t * ui_study = data; GtkWindow * window = ui_study->window; gboolean return_val; /* run the delete event function */ g_signal_emit_by_name(G_OBJECT(window), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(window)); return; } /* function to run for a delete_event */ gboolean ui_study_cb_delete_event(GtkWidget* widget, GdkEvent * event, gpointer data) { ui_study_t * ui_study = data; GtkWindow * window = ui_study->window; GtkWidget * exit_dialog; gint return_val; /* check to see if we need saving */ if ((ui_study->study_altered == TRUE) && (AMITK_PREFERENCES_PROMPT_FOR_SAVE_ON_EXIT(ui_study->preferences))) { exit_dialog = gtk_message_dialog_new(ui_study->window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, _("There are unsaved changes to the study.\nAre you sure you wish to quit?")); /* and wait for the question to return */ return_val = gtk_dialog_run(GTK_DIALOG(exit_dialog)); gtk_widget_destroy(exit_dialog); if (return_val != GTK_RESPONSE_OK) return TRUE; /* cancel */ } ui_study = ui_study_free(ui_study); /* free our data structure's */ amide_unregister_window((gpointer) window); /* tell the rest of the program this window's gone */ return FALSE; } amide-1.0.5/src/tb_alignment.c0000664000175000017500000006645412270274007016064 0ustar loeningloening/* tb_alignment.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * except mutual information addition Copyright (C) 2011-2012 Ian Miller * */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amide.h" #include "amitk_progress_dialog.h" #include "alignment_mutual_information.h" #include "alignment_procrustes.h" #include "tb_alignment.h" #include "ui_common.h" #define LABEL_WIDTH 375 static gchar * data_set_error_page_text = N_("There is only one data set in this study. There needs " "to be at least two data sets to perform an alignment"); static gchar * fiducial_marks_error_page_text = N_("In order to perform an alignment, each data set must " "have at least three objects with the same name as " "the corresponding three objects in the other data set." "\n\n" "Please see the help documentation for a longer " "explanation as to how alignments can be done."); static gchar * start_page_text = N_("Welcome to the data set alignment wizard, used for " "aligning one medical image data set with another. " "\n\n" #ifdef AMIDE_LIBGSL_SUPPORT "Currently, only rigid body registration using either " "fiducial marks, or maximization of mutual information " "has been implemented inside of AMIDE. " #else "This program was built without libgsl support, as such " "registration utilizing fiducial marks is not supported." #endif "\n\n" "The mutual information algorithm is run on the " "currently displayed slices, not the whole data " "sets."); typedef enum { COLUMN_DATA_SET_NAME, COLUMN_DATA_SET_POINTER, NUM_DATA_SET_COLUMNS } data_set_column_t; typedef enum { COLUMN_POINT_SELECTED, COLUMN_POINT_NAME, COLUMN_POINT_POINTER, NUM_POINT_COLUMNS } point_column_t; typedef enum { INTRO_PAGE, ALIGNMENT_TYPE_PAGE, DATA_SETS_PAGE, FIDUCIAL_MARKS_PAGE, NO_FIDUCIAL_MARKS_PAGE, CONCLUSION_PAGE, NUM_PAGES } which_page_t; typedef enum { #ifdef AMIDE_LIBGSL_SUPPORT PROCRUSTES, #endif MUTUAL_INFORMATION, NUM_ALIGNMENT_TYPES } which_alignment_t; static gchar * alignment_names[] = { #ifdef AMIDE_LIBGSL_SUPPORT N_("Fiducial Markers"), #endif N_("Mutual Information") }; /* data structures */ typedef struct tb_alignment_t { GtkWidget * dialog; GtkWidget * page[NUM_PAGES]; GtkWidget * list_moving_ds; GtkWidget * list_fixed_ds; GtkWidget * list_points; GtkWidget * progress_dialog; GList * data_sets; AmitkDataSet * moving_ds; AmitkDataSet * fixed_ds; which_alignment_t alignment_type; GList * selected_marks; AmitkSpace * transform_space; /* the new coordinate space for the moving volume */ amide_time_t view_start_time; amide_time_t view_duration; AmitkPoint view_center; amide_real_t view_thickness; guint reference_count; } tb_alignment_t; static tb_alignment_t * tb_alignment_free(tb_alignment_t * alignment); static tb_alignment_t * tb_alignment_init(void); static void apply_cb(GtkAssistant * assistant, gpointer data); static void close_cb(GtkAssistant * assistant, gpointer data); static void data_sets_update_model(tb_alignment_t * alignment); static void points_update_model(tb_alignment_t * alignment); static void alignment_type_changed_cb(GtkRadioButton * clicked_button, gpointer data ); static void data_set_selection_changed_cb(GtkTreeSelection * selection, gpointer data); static gboolean points_button_press_event(GtkWidget * list, GdkEventButton * event, gpointer data); static GtkWidget * create_alignment_type_page(tb_alignment_t * tb_alignment); static GtkWidget * create_data_sets_page(tb_alignment_t * tb_alignment); static GtkWidget * create_fiducial_marks_page(tb_alignment_t * tb_alignment); static gint forward_page_function (gint current_page, gpointer data); static void prepare_page_cb(GtkAssistant * wizard, GtkWidget * page, gpointer data); /* destroy a alignment data structure */ static tb_alignment_t * tb_alignment_free(tb_alignment_t * tb_alignment) { gboolean return_val; g_return_val_if_fail(tb_alignment != NULL, NULL); /* sanity checks */ g_return_val_if_fail(tb_alignment->reference_count > 0, NULL); /* remove a reference count */ tb_alignment->reference_count--; /* things to do if we've removed all reference's */ if (tb_alignment->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing tb_alignment\n"); #endif if (tb_alignment->data_sets != NULL) tb_alignment->data_sets = amitk_objects_unref(tb_alignment->data_sets); if (tb_alignment->moving_ds != NULL) { amitk_object_unref(tb_alignment->moving_ds); tb_alignment->moving_ds = NULL; } if (tb_alignment->fixed_ds != NULL) { amitk_object_unref(tb_alignment->fixed_ds); tb_alignment->fixed_ds = NULL; } if (tb_alignment->selected_marks != NULL) tb_alignment->selected_marks = amitk_objects_unref(tb_alignment->selected_marks); if (tb_alignment->transform_space != NULL) { g_object_unref(tb_alignment->transform_space); tb_alignment->transform_space = NULL; } if (tb_alignment->progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(tb_alignment->progress_dialog), "delete_event", NULL, &return_val); tb_alignment->progress_dialog = NULL; } g_free(tb_alignment); tb_alignment = NULL; } return tb_alignment; } /* allocate and initialize an alignment data structure */ static tb_alignment_t * tb_alignment_init(void) { tb_alignment_t * tb_alignment; /* alloc space for the data structure for passing ui info */ if ((tb_alignment = g_try_new(tb_alignment_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for tb_alignment_t")); return NULL; } tb_alignment->reference_count = 1; tb_alignment->dialog = NULL; tb_alignment->progress_dialog = NULL; tb_alignment->moving_ds = NULL; tb_alignment->fixed_ds = NULL; tb_alignment->alignment_type = 0; /* PROCRUSTES if with GSL support */ tb_alignment->selected_marks = NULL; tb_alignment->transform_space = NULL; return tb_alignment; } /* function called when the finish button is hit */ static void apply_cb(GtkAssistant * assistant, gpointer data) { tb_alignment_t * tb_alignment = data; /* sanity check */ g_return_if_fail(tb_alignment->transform_space != NULL); /* apply the alignment transform */ amitk_space_transform(AMITK_SPACE(tb_alignment->moving_ds), tb_alignment->transform_space); return; } /* function called to cancel the dialog */ static void close_cb(GtkAssistant * assistant, gpointer data) { tb_alignment_t * tb_alignment = data; GtkWidget * dialog = tb_alignment->dialog; tb_alignment = tb_alignment_free(tb_alignment); /* trash collection */ gtk_widget_destroy(dialog); return; } static void data_sets_update_model(tb_alignment_t * tb_alignment) { GtkTreeIter iter; GtkTreeModel * model; GtkTreeSelection *selection; GList * data_sets; gint count; /* update the moving data set */ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_alignment->list_moving_ds)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tb_alignment->list_moving_ds)); gtk_list_store_clear(GTK_LIST_STORE(model)); /* make sure the list is clear */ data_sets = tb_alignment->data_sets; count = 0; while (data_sets != NULL) { gtk_list_store_append (GTK_LIST_STORE(model), &iter); /* Acquire an iterator */ gtk_list_store_set (GTK_LIST_STORE(model), &iter, COLUMN_DATA_SET_NAME, AMITK_OBJECT_NAME(data_sets->data), COLUMN_DATA_SET_POINTER, data_sets->data, -1); if ( ((tb_alignment->moving_ds == NULL) && (count == 0)) || (tb_alignment->moving_ds == data_sets->data)) gtk_tree_selection_select_iter (selection, &iter); count++; data_sets = data_sets->next; } /* update the fixed data set */ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_alignment->list_fixed_ds)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tb_alignment->list_fixed_ds)); gtk_list_store_clear(GTK_LIST_STORE(model)); /* make sure the list is clear */ data_sets = tb_alignment->data_sets; count = 0; while (data_sets != NULL) { gtk_list_store_append (GTK_LIST_STORE(model), &iter); /* Acquire an iterator */ gtk_list_store_set (GTK_LIST_STORE(model), &iter, COLUMN_DATA_SET_NAME, AMITK_OBJECT_NAME(data_sets->data), COLUMN_DATA_SET_POINTER, data_sets->data, -1); if (((tb_alignment->fixed_ds == NULL) && (tb_alignment->moving_ds != data_sets->data)) || (tb_alignment->fixed_ds == data_sets->data)) if (count == 1) gtk_tree_selection_select_iter (selection, &iter); count++; data_sets = data_sets->next; } return; } static void points_update_model(tb_alignment_t * tb_alignment) { GtkTreeIter iter; GList * fiducial_marks; GList * selected_marks; GtkTreeModel * model; gboolean selected; model = gtk_tree_view_get_model(GTK_TREE_VIEW(tb_alignment->list_points)); gtk_list_store_clear(GTK_LIST_STORE(model)); /* make sure the list is clear */ /* put in new pairs of points */ fiducial_marks = AMITK_OBJECT_CHILDREN(tb_alignment->fixed_ds); selected_marks = tb_alignment->selected_marks; tb_alignment->selected_marks = NULL; while (fiducial_marks != NULL) { if (AMITK_IS_FIDUCIAL_MARK(fiducial_marks->data) || (AMITK_IS_VOLUME(fiducial_marks->data))) { if (amitk_objects_find_object_by_name(AMITK_OBJECT_CHILDREN(tb_alignment->moving_ds), AMITK_OBJECT_NAME(fiducial_marks->data))) { if ((amitk_objects_find_object_by_name(selected_marks, AMITK_OBJECT_NAME(fiducial_marks->data))) || (selected_marks == NULL)) selected = TRUE; else selected = FALSE; gtk_list_store_append (GTK_LIST_STORE(model), &iter); /* Acquire an iterator */ gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_POINT_SELECTED, selected, COLUMN_POINT_NAME, AMITK_OBJECT_NAME(fiducial_marks->data), COLUMN_POINT_POINTER, fiducial_marks->data, -1); if (selected) tb_alignment->selected_marks = g_list_append(tb_alignment->selected_marks, amitk_object_ref(fiducial_marks->data)); } } fiducial_marks = fiducial_marks->next; } selected_marks = amitk_objects_unref(selected_marks); return; } static void alignment_type_changed_cb(GtkRadioButton * rb, gpointer data ) { tb_alignment_t * tb_alignment = data; g_return_if_fail(tb_alignment != NULL); tb_alignment->alignment_type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(rb), "alignment_type")); return; } static void data_set_selection_changed_cb(GtkTreeSelection * selection, gpointer data) { tb_alignment_t * tb_alignment = data; AmitkDataSet * ds; gboolean fixed_ds; gboolean can_continue; GtkTreeIter iter; GtkTreeModel * model; fixed_ds = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(selection), "fixed")); if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get(model, &iter, COLUMN_DATA_SET_POINTER, &ds, -1); g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (fixed_ds) { if (tb_alignment->fixed_ds != NULL) amitk_object_unref(tb_alignment->fixed_ds); tb_alignment->fixed_ds = amitk_object_ref(ds); } else { if (tb_alignment->moving_ds != NULL) amitk_object_unref(tb_alignment->moving_ds); tb_alignment->moving_ds = amitk_object_ref(ds); } } else { if (fixed_ds) { if (tb_alignment->fixed_ds != NULL) amitk_object_unref(tb_alignment->fixed_ds); tb_alignment->fixed_ds = NULL; } else { if (tb_alignment->moving_ds != NULL) amitk_object_unref(tb_alignment->moving_ds); tb_alignment->moving_ds = NULL; } } can_continue = ((tb_alignment->fixed_ds != NULL) && (tb_alignment->moving_ds != NULL) && (tb_alignment->fixed_ds != tb_alignment->moving_ds)); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[DATA_SETS_PAGE], can_continue); return; } static gboolean points_button_press_event(GtkWidget * list, GdkEventButton * event, gpointer data) { tb_alignment_t * tb_alignment = data; GtkTreePath * path=NULL; AmitkObject * point; gboolean can_continue; GtkTreeIter iter; GtkTreeModel * model; gboolean toggled; gint cell_x, cell_y; switch(event->button) { case 1: /* left button */ if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(list), event->x, event->y, &path, NULL, &cell_x, &cell_y)) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_path_free(path); gtk_tree_model_get(model, &iter, COLUMN_POINT_SELECTED, &toggled, COLUMN_POINT_POINTER, &point, -1); g_return_val_if_fail(AMITK_IS_FIDUCIAL_MARK(point) || AMITK_IS_VOLUME(point), FALSE); toggled = !toggled; gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_POINT_SELECTED, toggled, -1); if (toggled) { tb_alignment->selected_marks = g_list_append(tb_alignment->selected_marks, amitk_object_ref(point)); } else { tb_alignment->selected_marks = g_list_remove(tb_alignment->selected_marks, point); amitk_object_unref(point); } } break; default: /* do nothing */ break; } can_continue = (amitk_objects_count(tb_alignment->selected_marks) >= 3); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[FIDUCIAL_MARKS_PAGE], can_continue); return FALSE; } /* Ian Miller addition */ /* this sets up the user interface for the "Alignment type" page/section of the wizard */ static GtkWidget * create_alignment_type_page(tb_alignment_t * tb_alignment) { GtkWidget * vbox; GtkWidget * rb[NUM_ALIGNMENT_TYPES]; which_alignment_t i_alignment; vbox = gtk_vbox_new (TRUE, 2); for (i_alignment = 0; i_alignment < NUM_ALIGNMENT_TYPES; i_alignment ++) { if (i_alignment == 0) rb[i_alignment] = gtk_radio_button_new_with_label(NULL, alignment_names[i_alignment]); else rb[i_alignment] = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(rb[0]), alignment_names[i_alignment]); gtk_box_pack_start (GTK_BOX (vbox), rb[i_alignment], TRUE, TRUE, 2); g_object_set_data(G_OBJECT(rb[i_alignment]), "alignment_type", GINT_TO_POINTER(i_alignment)); } /* set which toggle button is pressed in before connecting signals */ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(rb[tb_alignment->alignment_type]), TRUE); for (i_alignment = 0; i_alignment < NUM_ALIGNMENT_TYPES; i_alignment ++) { g_signal_connect(G_OBJECT(rb[i_alignment]), "clicked", G_CALLBACK(alignment_type_changed_cb), tb_alignment); } return vbox; } static GtkWidget * create_data_sets_page(tb_alignment_t * tb_alignment) { GtkWidget * table; GtkListStore * store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *selection; GtkWidget * vseparator; table = gtk_table_new(3,3,FALSE); /* the moving data set */ store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); tb_alignment->list_moving_ds = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref(store); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes(_("Align Data Set: (moving)"), renderer, "text", COLUMN_DATA_SET_NAME, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tb_alignment->list_moving_ds), column); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_alignment->list_moving_ds)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); g_object_set_data(G_OBJECT(selection), "fixed", GINT_TO_POINTER(FALSE)); g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(data_set_selection_changed_cb), tb_alignment); gtk_table_attach(GTK_TABLE(table),tb_alignment->list_moving_ds, 0,1,0,1, GTK_FILL|GTK_EXPAND, GTK_FILL | GTK_EXPAND,X_PADDING, Y_PADDING); vseparator = gtk_vseparator_new(); gtk_table_attach(GTK_TABLE(table), vseparator, 1,2,0,2, 0, GTK_FILL, X_PADDING, Y_PADDING); /* the fixed data set */ store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); tb_alignment->list_fixed_ds = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref(store); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes(_("Align Data Set: (fixed)"), renderer, "text", COLUMN_DATA_SET_NAME, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tb_alignment->list_fixed_ds), column); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_alignment->list_fixed_ds)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); g_object_set_data(G_OBJECT(selection), "fixed", GINT_TO_POINTER(TRUE)); g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(data_set_selection_changed_cb), tb_alignment); gtk_table_attach(GTK_TABLE(table),tb_alignment->list_fixed_ds, 2,3,0,1, GTK_FILL|GTK_EXPAND, GTK_FILL | GTK_EXPAND,X_PADDING, Y_PADDING); return table; } static GtkWidget * create_fiducial_marks_page(tb_alignment_t * tb_alignment) { GtkWidget * table; GtkListStore * store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *selection; table = gtk_table_new(2,2,FALSE); store = gtk_list_store_new(3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER); tb_alignment->list_points = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref(store); g_signal_connect(G_OBJECT(tb_alignment->list_points), "button_press_event", G_CALLBACK(points_button_press_event), tb_alignment); renderer = gtk_cell_renderer_toggle_new (); column = gtk_tree_view_column_new_with_attributes("Select", renderer, "active", COLUMN_POINT_SELECTED, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tb_alignment->list_points), column); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes(_("Points for Alignment"), renderer, "text", COLUMN_POINT_NAME, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tb_alignment->list_points), column); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_alignment->list_points)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); gtk_table_attach(GTK_TABLE(table),tb_alignment->list_points, 0,1,0,1, GTK_FILL|GTK_EXPAND, GTK_FILL | GTK_EXPAND,X_PADDING, Y_PADDING); return table; } static gint forward_page_function (gint current_page, gpointer data) { tb_alignment_t * tb_alignment=data; gint num_pairs=0; switch (current_page) { case ALIGNMENT_TYPE_PAGE: return DATA_SETS_PAGE; break; case DATA_SETS_PAGE: if (tb_alignment->alignment_type == MUTUAL_INFORMATION) return CONCLUSION_PAGE; if ((tb_alignment->fixed_ds != NULL) && (tb_alignment->moving_ds != NULL)) num_pairs = amitk_objects_count_pairs_by_name(AMITK_OBJECT_CHILDREN(tb_alignment->fixed_ds), AMITK_OBJECT_CHILDREN(tb_alignment->moving_ds)); if (num_pairs < 3) return NO_FIDUCIAL_MARKS_PAGE; else return FIDUCIAL_MARKS_PAGE; break; case FIDUCIAL_MARKS_PAGE: return CONCLUSION_PAGE; break; default: return current_page+1; break; } } static void prepare_page_cb(GtkAssistant * wizard, GtkWidget * page, gpointer data) { tb_alignment_t * tb_alignment = data; which_page_t which_page; which_alignment_t which_alignment; gdouble performance_metric; gchar * temp_string; which_page = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(page), "which_page")); which_alignment = tb_alignment->alignment_type; switch(which_page) { case DATA_SETS_PAGE: data_sets_update_model(tb_alignment); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_alignment->dialog), page, (tb_alignment->fixed_ds != NULL) && (tb_alignment->moving_ds != NULL) && (tb_alignment->fixed_ds != tb_alignment->moving_ds)); break; case FIDUCIAL_MARKS_PAGE: points_update_model(tb_alignment); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[FIDUCIAL_MARKS_PAGE], amitk_objects_count(tb_alignment->selected_marks) >= 3); break; case CONCLUSION_PAGE: /* calculate the alignment */ switch(which_alignment) { #ifdef AMIDE_LIBGSL_SUPPORT case PROCRUSTES: tb_alignment->transform_space = alignment_procrustes(tb_alignment->moving_ds, tb_alignment->fixed_ds, tb_alignment->selected_marks, &performance_metric); temp_string = g_strdup_printf(_("The alignment has been calculated, press Finish to apply, or Cancel to quit.\n\nThe calculated fiducial reference error is:\n\t %5.2f mm/point"), performance_metric); break; #endif case MUTUAL_INFORMATION: tb_alignment->transform_space = alignment_mutual_information(tb_alignment->moving_ds, tb_alignment->fixed_ds, tb_alignment->view_center, tb_alignment->view_thickness, tb_alignment->view_start_time, tb_alignment->view_duration, &performance_metric, amitk_progress_dialog_update, tb_alignment->progress_dialog); temp_string = g_strdup_printf(_("The alignment has been calculated, press Finish to apply, or Cancel to quit.\n\nThe calculated mutual information metric is:\n\t %5.2f"), performance_metric); break; default: g_return_if_reached(); break; } gtk_label_set_text(GTK_LABEL(page), temp_string); g_free(temp_string); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_alignment->dialog), page, TRUE); break; case NO_FIDUCIAL_MARKS_PAGE: default: break; } return; } /* function that sets up an align point dialog */ void tb_alignment(AmitkStudy * study, GtkWindow * parent) { tb_alignment_t * tb_alignment; GdkPixbuf * logo; guint count; gint i; g_return_if_fail(AMITK_IS_STUDY(study)); tb_alignment = tb_alignment_init(); tb_alignment->data_sets = amitk_object_get_children_of_type(AMITK_OBJECT(study), AMITK_OBJECT_TYPE_DATA_SET, TRUE); tb_alignment->view_start_time = AMITK_STUDY_VIEW_START_TIME(study); tb_alignment->view_duration = AMITK_STUDY_VIEW_DURATION(study); tb_alignment->view_center = AMITK_STUDY_VIEW_CENTER(study); tb_alignment->view_thickness = AMITK_STUDY_VIEW_THICKNESS(study); tb_alignment->dialog = gtk_assistant_new(); gtk_window_set_transient_for(GTK_WINDOW(tb_alignment->dialog), parent); gtk_window_set_destroy_with_parent(GTK_WINDOW(tb_alignment->dialog), TRUE); g_signal_connect(G_OBJECT(tb_alignment->dialog), "cancel", G_CALLBACK(close_cb), tb_alignment); g_signal_connect(G_OBJECT(tb_alignment->dialog), "close", G_CALLBACK(close_cb), tb_alignment); g_signal_connect(G_OBJECT(tb_alignment->dialog), "apply", G_CALLBACK(apply_cb), tb_alignment); g_signal_connect(G_OBJECT(tb_alignment->dialog), "prepare", G_CALLBACK(prepare_page_cb), tb_alignment); gtk_assistant_set_forward_page_func(GTK_ASSISTANT(tb_alignment->dialog), forward_page_function, tb_alignment, NULL); tb_alignment->progress_dialog = amitk_progress_dialog_new(GTK_WINDOW(tb_alignment->dialog)); /* --------------- initial page ------------------ */ count = amitk_data_sets_count(tb_alignment->data_sets, TRUE); tb_alignment->page[INTRO_PAGE] = gtk_label_new((count >= 2) ? _(start_page_text) : _(data_set_error_page_text)); gtk_widget_set_size_request(tb_alignment->page[INTRO_PAGE],LABEL_WIDTH, -1); gtk_label_set_line_wrap(GTK_LABEL(tb_alignment->page[INTRO_PAGE]), TRUE); gtk_assistant_append_page(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[INTRO_PAGE]); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[INTRO_PAGE], _("Data Set Alignment Wizard")); gtk_assistant_set_page_type(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[INTRO_PAGE], GTK_ASSISTANT_PAGE_INTRO); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[INTRO_PAGE], count >= 2); /*------------------ pick your alignment type page ------------------ */ tb_alignment->page[ALIGNMENT_TYPE_PAGE] = create_alignment_type_page(tb_alignment); gtk_assistant_append_page(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[ALIGNMENT_TYPE_PAGE]); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[ALIGNMENT_TYPE_PAGE], _("Alignment Type Selection")); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[ALIGNMENT_TYPE_PAGE], TRUE); /*------------------ pick your data set page ------------------ */ tb_alignment->page[DATA_SETS_PAGE] = create_data_sets_page(tb_alignment); gtk_assistant_append_page(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[DATA_SETS_PAGE]); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[DATA_SETS_PAGE], _("Data Set Selection")); /*------------------ pick your fiducial marks page ------------------ */ tb_alignment->page[FIDUCIAL_MARKS_PAGE] = create_fiducial_marks_page(tb_alignment); gtk_assistant_append_page(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[FIDUCIAL_MARKS_PAGE]); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[FIDUCIAL_MARKS_PAGE], _("Fiducial Marks Selection")); /* --------------- page shown if no fiducial marks ------------------ */ tb_alignment->page[NO_FIDUCIAL_MARKS_PAGE] = gtk_label_new(_(fiducial_marks_error_page_text)); gtk_widget_set_size_request(tb_alignment->page[NO_FIDUCIAL_MARKS_PAGE],LABEL_WIDTH, -1); gtk_label_set_line_wrap(GTK_LABEL(tb_alignment->page[NO_FIDUCIAL_MARKS_PAGE]), TRUE); gtk_assistant_append_page(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[NO_FIDUCIAL_MARKS_PAGE]); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[NO_FIDUCIAL_MARKS_PAGE], _("Alignment Error")); /* ---------------- conclusion page ---------------------------------- */ tb_alignment->page[CONCLUSION_PAGE] = gtk_label_new(""); gtk_widget_set_size_request(tb_alignment->page[CONCLUSION_PAGE],LABEL_WIDTH, -1); gtk_label_set_line_wrap(GTK_LABEL(tb_alignment->page[CONCLUSION_PAGE]), TRUE); gtk_assistant_append_page(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[CONCLUSION_PAGE]); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[CONCLUSION_PAGE], _("Conclusion")); gtk_assistant_set_page_type(GTK_ASSISTANT(tb_alignment->dialog), tb_alignment->page[CONCLUSION_PAGE], GTK_ASSISTANT_PAGE_CONFIRM); /* things for all page */ logo = gtk_widget_render_icon(GTK_WIDGET(tb_alignment->dialog), "amide_icon_logo", GTK_ICON_SIZE_DIALOG, 0); for (i=0; idialog), tb_alignment->page[i], logo); g_object_set_data(G_OBJECT(tb_alignment->page[i]),"which_page", GINT_TO_POINTER(i)); } g_object_unref(logo); gtk_widget_show_all(tb_alignment->dialog); return; } amide-1.0.5/src/tb_fly_through.h0000664000175000017500000000244312270274501016430 0ustar loeningloening/* tb_fly_through.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) #ifndef __TB_FLY_THROUGH_H__ #define __TB_FLY_THROUGH_H__ /* header files that are always needed with this file */ #include "amitk_study.h" /* external functions */ void tb_fly_through(AmitkStudy * study, AmitkView view, AmitkPreferences * preferences, GtkWindow * parent); #endif /* TB_FLY_THROUGH_H */ #endif /* AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT */ amide-1.0.5/src/ui_study.h0000644000175000017500000001113412270274463015260 0ustar loeningloening/* ui_study.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __UI_STUDY_H__ #define __UI_STUDY_H__ /* header files that are always needed with this file */ #include #include "amitk_study.h" #include #define AMIDE_LIMIT_ZOOM_UPPER 10.0 #define AMIDE_LIMIT_ZOOM_LOWER 0.2 #define AMIDE_LIMIT_ZOOM_STEP 0.2 /* in percent */ #define AMIDE_LIMIT_FOV_UPPER 100.0 #define AMIDE_LIMIT_FOV_LOWER 10.0 #define AMIDE_LIMIT_FOV_STEP 10.0 typedef enum { HELP_INFO_LINE_1, HELP_INFO_LINE_1_SHIFT, HELP_INFO_LINE_2, HELP_INFO_LINE_2_SHIFT, HELP_INFO_LINE_3, HELP_INFO_LINE_3_SHIFT, HELP_INFO_LINE_3_CTRL, HELP_INFO_LINE_VARIABLE, HELP_INFO_LINE_BLANK, HELP_INFO_LINE_LOCATION1, HELP_INFO_LINE_LOCATION2, NUM_HELP_INFO_LINES /* corresponds to the location line */ } help_info_line_t; #define UI_STUDY_DEFAULT_ENTRY_WIDTH 75 /* ui_study data structures */ typedef struct ui_study_t { GtkWindow * window; /* pointer to the window managing this study */ GtkWidget * window_vbox; GtkWidget * thickness_spin; GtkWidget * zoom_spin; GtkWidget * fov_spin; GtkAction * interpolation_action[AMITK_INTERPOLATION_NUM]; GtkWidget * rendering_menu; GtkAction * canvas_target_action; GtkAction * canvas_visible_action[AMITK_VIEW_NUM]; GtkAction * view_mode_action[AMITK_VIEW_MODE_NUM]; GtkAction * fuse_type_action[AMITK_FUSE_TYPE_NUM]; GtkWidget * tree_view; /* the tree showing the study data structure info */ GtkWidget * gate_dialog; GtkWidget * gate_button; GtkWidget * time_dialog; GtkWidget * time_button; AmitkObject * active_object; /* which object to use for actions that are for one object */ AmitkStudy * study; /* pointer to the study data structure */ GtkWidget * threshold_dialog; /* pointer to the threshold dialog */ GtkWidget * progress_dialog; /* canvas specific info */ GtkWidget * center_table; GtkWidget * canvas_table[AMITK_VIEW_MODE_NUM]; GtkWidget * canvas_handle[AMITK_VIEW_MODE_NUM]; GtkWidget * canvas[AMITK_VIEW_MODE_NUM][AMITK_VIEW_NUM]; AmitkPanelLayout panel_layout; AmitkLayout canvas_layout; /* help canvas info */ GnomeCanvas * help_info; GnomeCanvasItem * help_legend[NUM_HELP_INFO_LINES]; GnomeCanvasItem * help_line[NUM_HELP_INFO_LINES]; /* preferences */ AmitkPreferences * preferences; gboolean study_altered; gboolean study_virgin; guint reference_count; } ui_study_t; /* external functions */ ui_study_t * ui_study_free(ui_study_t * ui_study); ui_study_t * ui_study_init(AmitkPreferences * preferences); void ui_study_make_active_object(ui_study_t * ui_study, AmitkObject * object); void ui_study_add_fiducial_mark(ui_study_t * ui_study, AmitkObject * parent_object, gboolean selected, AmitkPoint position); void ui_study_add_roi(ui_study_t * ui_study, AmitkObject * parent_object, AmitkRoiType roi_type); void ui_study_set_study(ui_study_t * ui_study, AmitkStudy * study); GtkWidget * ui_study_create(AmitkStudy * study, AmitkPreferences * preferences); void ui_study_update_help_info(ui_study_t * ui_study, AmitkHelpInfo which_info, AmitkPoint point, amide_data_t value); void ui_study_update_canvas_visible_buttons(ui_study_t * ui_study); void ui_study_update_gate_button(ui_study_t * ui_study); void ui_study_update_time_button(ui_study_t * ui_study); void ui_study_update_thickness(ui_study_t * ui_study, amide_real_t thickness); void ui_study_update_zoom(ui_study_t * ui_study); void ui_study_update_fov(ui_study_t * ui_study); void ui_study_update_canvas_target(ui_study_t * ui_study); void ui_study_update_fuse_type(ui_study_t * ui_study); void ui_study_update_view_mode(ui_study_t * ui_study); void ui_study_update_title(ui_study_t * ui_study); void ui_study_update_layout(ui_study_t * ui_study); void ui_study_setup_widgets(ui_study_t * ui_study); #endif /* __UI_STUDY_H__ */ amide-1.0.5/src/ui_render.h0000644000175000017500000000533012270274470015366 0ustar loeningloening/* ui_render.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef AMIDE_LIBVOLPACK_SUPPORT #ifndef __UI_RENDER_H__ #define __UI_RENDER_H__ /* header files that are always needed with this file */ #include #include "render.h" #include "amitk_study.h" #define GCONF_AMIDE_RENDERING "RENDERING" /* defines */ #define UI_RENDER_BLANK_WIDTH 200 #define UI_RENDER_BLANK_HEIGHT 200 #define BOX_OFFSET 0.2 /* ui_render data structures */ typedef struct ui_render_t { GtkWindow * window; GtkWidget * window_vbox; GtkWidget * parameter_dialog; GtkWidget * transfer_function_dialog; AmitkPreferences * preferences; #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) gpointer movie; /* pointer to type ui_render_movie_t */ #endif amide_time_t start; amide_time_t duration; amide_real_t fov; AmitkPoint view_center; GtkWidget * canvas; GnomeCanvasItem * canvas_image; GnomeCanvasItem * canvas_time_label; gboolean time_label_on; gint pixbuf_width, pixbuf_height; GdkPixbuf * pixbuf; renderings_t * renderings; gboolean update_without_release; gboolean stereoscopic; gdouble stereo_eye_angle; gint stereo_eye_width; /* pixels */ rendering_quality_t quality; gboolean depth_cueing; gdouble front_factor; gdouble density; gdouble zoom; AmitkSpace * box_space; guint next_update; guint idle_handler_id; gboolean rendered_successfully; GtkWidget * progress_dialog; gboolean disable_progress_dialog; guint reference_count; } ui_render_t; /* external functions */ GdkPixbuf * ui_render_get_pixbuf(ui_render_t * ui_render); void ui_render_add_update(ui_render_t * ui_render); gboolean ui_render_update_immediate(gpointer ui_render); void ui_render_create(AmitkStudy * study, GList * selected_objects, AmitkPreferences * preferences); GtkWidget * ui_render_init_dialog_create(AmitkStudy * study, GtkWindow * parent); #endif /* __UI_RENDER_H__ */ #endif /* AMIDE_LIBVOLPACK_SUPPORT */ amide-1.0.5/src/image.c0000644000175000017500000010663512270273772014505 0ustar loeningloening/* image.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "image.h" #include "amitk_data_set_DOUBLE_0D_SCALING.h" #include "amitk_study.h" #define OBJECT_ICON_XSIZE 24 #define OBJECT_ICON_YSIZE 24 guchar CT_icon_data[] = { 0, 0, 0, 0, 0, 0, 0, 0, 17, 43, 35, 35, 43, 43, 43, 26, 35, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 79, 105, 105, 131, 149, 158, 149, 149, 105, 149, 79, 52, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 96, 149, 175, 123, 105, 114, 246, 140, 105, 123, 123, 149, 131, 79, 0, 0, 0, 0, 0, 0, 0, 0, 52, 96, 175, 123, 70, 61, 70, 87, 96, 96, 105, 105, 96, 87, 114, 131, 61, 0, 0, 0, 0, 0, 0, 17, 105, 114, 114, 43, 70, 87, 87, 96, 105, 96, 96, 96, 96, 96, 79, 149, 114, 8, 0, 0, 17, 26, 0, 61, 105, 96, 26, 52, 79, 87, 96, 96, 96, 96, 96, 96, 96, 96, 96, 158, 105, 52, 0, 0, 70, 61, 79, 96, 105, 43, 26, 70, 87, 87, 87, 87, 96, 96, 96, 96, 96, 96, 105, 123, 96, 87, 35, 0, 43, 79, 96, 123, 158, 17, 43, 79, 87, 87, 87, 87, 87, 96, 96, 96, 96, 96, 87, 79, 140, 105, 79, 0, 17, 87, 96, 123, 131, 8, 52, 70, 87, 87, 87, 87, 79, 79, 79, 87, 87, 79, 52, 8, 123, 158, 114, 8, 35, 96, 96, 114, 52, 26, 61, 70, 87, 87, 87, 79, 70, 70, 70, 61, 61, 52, 17, 0, 114, 131, 96, 26, 8, 70, 96, 184, 26, 26, 61, 70, 70, 87, 96, 79, 61, 61, 61, 52, 52, 43, 35, 17, 79, 114, 87, 43, 0, 52, 96, 184, 17, 26, 52, 61, 70, 79, 96, 79, 52, 52, 43, 43, 43, 43, 35, 17, 61, 211, 140, 35, 0, 61, 96, 96, 17, 8, 26, 43, 52, 70, 87, 52, 26, 26, 17, 26, 26, 8, 8, 0, 87, 158, 96, 0, 0, 17, 96, 114, 35, 8, 17, 26, 8, 17, 35, 8, 26, 17, 8, 8, 0, 0, 8, 35, 114, 87, 52, 0, 0, 8, 96, 175, 123, 0, 0, 8, 8, 0, 52, 8, 8, 17, 8, 35, 8, 26, 8, 26, 193, 105, 17, 0, 0, 0, 70, 114, 140, 26, 17, 8, 8, 26, 26, 8, 17, 17, 17, 17, 26, 17, 0, 87, 202, 114, 0, 0, 0, 0, 43, 96, 105, 43, 8, 17, 17, 26, 17, 0, 52, 43, 0, 8, 26, 8, 43, 140, 79, 26, 0, 0, 0, 0, 8, 70, 96, 96, 52, 17, 8, 8, 8, 35, 184, 79, 8, 17, 52, 61, 79, 96, 79, 0, 0, 0, 0, 0, 0, 8, 79, 96, 175, 158, 35, 17, 61, 219, 255, 228, 87, 96, 202, 228, 131, 96, 17, 0, 0, 0, 0, 0, 0, 0, 43, 105, 149, 184, 149, 123, 131, 211, 131, 237, 149, 114, 96, 123, 114, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 79, 96, 105, 105, 114, 228, 228, 228, 131, 105, 105, 105, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 61, 79, 96, 114, 140, 167, 123, 123, 105, 87, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 79, 96, 105, 105, 105, 87, 70, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 70, 35, 17, 17, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; guchar PET_icon_data[] = { 3, 8, 25, 35, 21, 22, 50, 96, 148, 171, 134, 109, 145, 177, 156, 134, 86, 54, 42, 40, 42, 25, 11, 3, 8, 27, 29, 25, 24, 53, 120, 162, 187, 216, 224, 184, 211, 224, 198, 185, 147, 108, 61, 33, 34, 32, 26, 10, 28, 34, 18, 25, 88, 129, 160, 154, 166, 214, 234, 203, 210, 211, 185, 176, 169, 156, 133, 83, 37, 21, 28, 26, 37, 24, 21, 75, 158, 161, 154, 142, 180, 234, 255, 224, 221, 220, 212, 186, 162, 160, 169, 165, 101, 32, 18, 37, 28, 25, 70, 139, 163, 141, 122, 147, 197, 226, 242, 196, 195, 218, 206, 200, 148, 116, 155, 188, 153, 72, 24, 41, 29, 45, 107, 165, 171, 136, 116, 160, 198, 203, 216, 165, 158, 201, 189, 193, 155, 125, 153, 168, 171, 125, 53, 36, 45, 104, 147, 172, 173, 141, 100, 122, 157, 179, 190, 153, 147, 181, 166, 134, 102, 97, 122, 163, 187, 179, 124, 43, 76, 163, 184, 178, 158, 116, 73, 76, 89, 121, 154, 137, 138, 144, 102, 83, 70, 80, 114, 170, 195, 200, 162, 64, 80, 158, 168, 165, 148, 104, 74, 81, 76, 81, 93, 96, 94, 85, 66, 65, 62, 69, 96, 145, 179, 193, 174, 91, 85, 158, 173, 169, 132, 104, 93, 93, 96, 101, 82, 67, 58, 70, 75, 83, 77, 83, 113, 153, 174, 190, 180, 101, 74, 158, 166, 176, 172, 170, 144, 120, 128, 150, 138, 89, 82, 122, 157, 139, 107, 140, 165, 182, 187, 184, 171, 102, 61, 152, 178, 181, 186, 185, 163, 132, 137, 200, 195, 147, 128, 176, 217, 161, 115, 148, 168, 195, 193, 178, 162, 89, 30, 117, 164, 168, 170, 157, 155, 137, 117, 184, 187, 145, 138, 174, 164, 125, 120, 147, 160, 169, 188, 176, 129, 52, 26, 99, 160, 174, 177, 162, 150, 130, 118, 118, 102, 89, 81, 96, 120, 108, 126, 162, 173, 155, 165, 171, 125, 43, 42, 84, 156, 177, 162, 164, 157, 130, 97, 102, 73, 53, 56, 68, 102, 114, 114, 148, 168, 173, 174, 166, 108, 37, 41, 69, 133, 179, 186, 165, 147, 122, 99, 96, 60, 50, 50, 48, 88, 110, 130, 158, 158, 176, 185, 145, 85, 42, 36, 41, 99, 171, 187, 174, 157, 122, 91, 62, 51, 66, 69, 53, 66, 93, 146, 165, 177, 185, 196, 108, 42, 38, 43, 35, 72, 157, 180, 160, 126, 106, 82, 75, 83, 94, 100, 83, 65, 89, 134, 153, 154, 179, 184, 92, 30, 28, 33, 24, 38, 108, 176, 179, 139, 98, 85, 114, 144, 146, 147, 130, 93, 82, 110, 126, 150, 195, 152, 46, 21, 22, 22, 33, 34, 53, 163, 187, 153, 129, 107, 140, 172, 169, 168, 161, 117, 92, 132, 173, 184, 165, 92, 34, 30, 13, 16, 29, 30, 19, 104, 177, 197, 180, 156, 158, 177, 168, 169, 169, 141, 136, 181, 210, 172, 81, 36, 33, 29, 6, 5, 6, 13, 17, 41, 81, 152, 179, 193, 170, 178, 165, 162, 165, 164, 181, 187, 163, 86, 13, 19, 26, 12, 3, 3, 3, 6, 29, 41, 33, 49, 89, 133, 154, 155, 118, 140, 164, 166, 138, 86, 44, 24, 26, 26, 9, 5, 3, 3, 8, 18, 21, 24, 37, 34, 26, 40, 60, 62, 36, 51, 73, 61, 50, 25, 22, 29, 22, 12, 5, 6, 6 }; guchar MRI_icon_data[] = { 0, 0, 0, 0, 0, 0, 0, 0, 6, 10, 16, 14, 15, 13, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 22, 19, 32, 58, 24, 22, 50, 16, 19, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 42, 153, 222, 133, 111, 108, 160, 162, 99, 22, 22, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 24, 80, 150, 147, 169, 122, 164, 141, 116, 113, 170, 156, 40, 21, 1, 0, 0, 0, 0, 0, 0, 0, 0, 19, 47, 169, 134, 132, 148, 157, 139, 120, 116, 120, 146, 116, 174, 15, 21, 0, 0, 0, 0, 0, 0, 0, 5, 21, 175, 230, 165, 138, 199, 204, 202, 179, 152, 135, 116, 141, 155, 87, 20, 4, 0, 0, 0, 0, 0, 0, 14, 70, 146, 213, 152, 149, 178, 206, 148, 159, 152, 155, 150, 120, 141, 185, 35, 12, 0, 0, 0, 0, 0, 0, 24, 112, 135, 134, 132, 223, 185, 150, 120, 148, 137, 232, 193, 121, 139, 105, 102, 11, 0, 0, 0, 0, 0, 0, 23, 142, 147, 133, 134, 184, 240, 141, 121, 116, 181, 241, 148, 110, 96, 116, 104, 13, 0, 0, 0, 0, 0, 7, 28, 158, 152, 144, 142, 115, 129, 168, 202, 196, 157, 124, 93, 117, 92, 101, 105, 12, 0, 0, 0, 0, 0, 7, 14, 147, 122, 129, 205, 116, 131, 143, 222, 201, 122, 111, 134, 152, 90, 116, 108, 14, 0, 0, 0, 0, 0, 3, 12, 111, 111, 192, 195, 122, 96, 120, 217, 181, 102, 94, 131, 197, 96, 85, 79, 20, 0, 0, 0, 0, 0, 0, 16, 70, 114, 186, 203, 164, 134, 101, 225, 185, 78, 132, 150, 207, 156, 123, 37, 20, 0, 0, 0, 0, 0, 0, 17, 23, 138, 181, 207, 148, 165, 183, 228, 210, 164, 164, 155, 223, 125, 111, 15, 21, 0, 0, 0, 0, 0, 0, 15, 15, 122, 206, 197, 192, 174, 210, 208, 206, 187, 164, 213, 252, 148, 94, 28, 16, 0, 0, 0, 0, 0, 0, 17, 48, 40, 132, 106, 162, 172, 201, 196, 186, 190, 175, 156, 183, 144, 53, 37, 3, 0, 0, 0, 0, 0, 0, 7, 48, 37, 73, 24, 71, 122, 167, 186, 190, 165, 128, 70, 29, 76, 37, 52, 0, 0, 0, 0, 0, 0, 0, 0, 44, 31, 59, 48, 71, 68, 25, 165, 123, 42, 62, 53, 35, 40, 52, 38, 0, 0, 0, 0, 0, 0, 0, 0, 12, 41, 53, 144, 149, 99, 35, 110, 51, 75, 107, 176, 84, 28, 59, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 83, 253, 255, 123, 108, 68, 61, 69, 198, 253, 203, 37, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 22, 186, 205, 61, 25, 58, 32, 64, 144, 224, 178, 26, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 14, 30, 13, 25, 21, 29, 17, 49, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 31, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; guchar SPECT_icon_data[] = { 17, 17, 36, 56, 51, 46, 36, 31, 29, 31, 39, 63, 93, 115, 147, 147, 102, 78, 41, 22, 17, 17, 19, 12, 12, 24, 61, 125, 102, 80, 71, 63, 53, 58, 51, 73, 95, 132, 152, 139, 112, 80, 39, 22, 17, 17, 19, 12, 2, 17, 66, 166, 139, 102, 78, 76, 76, 83, 71, 73, 102, 134, 139, 115, 98, 73, 34, 17, 17, 17, 12, 7, 4, 22, 98, 203, 174, 139, 117, 107, 110, 112, 100, 98, 122, 139, 134, 107, 90, 58, 22, 17, 17, 12, 4, 0, 9, 29, 61, 102, 115, 112, 100, 105, 115, 132, 132, 132, 139, 137, 129, 98, 85, 46, 19, 17, 14, 9, 2, 0, 17, 31, 29, 39, 51, 78, 53, 44, 51, 71, 115, 139, 137, 132, 147, 107, 78, 31, 19, 17, 14, 4, 0, 0, 14, 46, 110, 129, 112, 117, 107, 95, 76, 56, 90, 132, 120, 110, 144, 117, 76, 34, 22, 19, 17, 2, 0, 0, 12, 41, 156, 250, 232, 191, 164, 159, 166, 127, 85, 122, 122, 120, 125, 110, 73, 39, 26, 14, 17, 9, 0, 0, 19, 41, 112, 178, 213, 228, 196, 144, 171, 186, 110, 137, 122, 117, 127, 110, 85, 73, 61, 31, 19, 14, 2, 0, 31, 76, 95, 98, 127, 147, 152, 129, 169, 178, 120, 127, 100, 100, 125, 107, 98, 107, 115, 95, 51, 22, 9, 2, 46, 112, 112, 95, 110, 152, 201, 191, 203, 198, 171, 152, 112, 110, 201, 129, 83, 78, 85, 110, 112, 53, 19, 2, 36, 115, 142, 125, 142, 191, 205, 203, 255, 235, 205, 178, 183, 201, 250, 142, 63, 58, 71, 98, 156, 156, 63, 14, 14, 71, 107, 120, 164, 149, 122, 100, 159, 210, 147, 98, 90, 76, 83, 76, 61, 63, 61, 90, 147, 178, 120, 34, 24, 63, 115, 154, 156, 125, 110, 105, 169, 188, 98, 46, 51, 44, 44, 39, 44, 49, 58, 80, 120, 139, 154, 71, 58, 112, 147, 166, 159, 110, 107, 110, 152, 154, 88, 46, 46, 46, 39, 31, 34, 29, 41, 49, 71, 98, 152, 98, 78, 149, 142, 139, 134, 90, 98, 95, 63, 44, 41, 53, 61, 53, 44, 41, 41, 41, 44, 46, 53, 80, 149, 112, 66, 149, 110, 95, 83, 76, 71, 61, 39, 34, 36, 39, 49, 44, 44, 49, 41, 44, 49, 46, 61, 93, 152, 102, 31, 120, 105, 85, 80, 76, 61, 58, 51, 41, 34, 36, 39, 36, 36, 36, 36, 41, 49, 61, 80, 110, 156, 78, 7, 83, 110, 110, 76, 66, 53, 53, 56, 51, 49, 51, 51, 36, 36, 36, 36, 39, 53, 68, 88, 137, 134, 46, 4, 39, 102, 137, 100, 71, 63, 53, 58, 66, 71, 63, 61, 53, 46, 36, 44, 51, 56, 78, 110, 149, 80, 14, 2, 7, 49, 120, 144, 107, 78, 78, 73, 76, 76, 85, 85, 66, 63, 63, 66, 73, 80, 107, 147, 112, 34, 4, 0, 0, 7, 51, 115, 159, 125, 107, 100, 95, 98, 105, 100, 88, 93, 93, 90, 110, 139, 149, 102, 36, 7, 0, 0, 0, 0, 7, 36, 102, 144, 166, 154, 139, 142, 132, 120, 122, 127, 137, 149, 154, 125, 76, 29, 7, 2, 0, 0, 0, 0, 0, 0, 12, 49, 98, 127, 159, 174, 166, 166, 171, 159, 147, 117, 68, 29, 9, 2, 0, 2, 0 }; /* callback function used for freeing the pixel data in a gdkpixbuf */ static void image_free_rgb_data(guchar * pixels, gpointer data) { g_free(pixels); return; } /* note, return offset and corner are in base coordinate frame */ GdkPixbuf * image_slice_intersection(const AmitkRoi * roi, const AmitkVolume * canvas_slice, const amide_real_t pixel_size, #ifdef AMIDE_LIBGNOMECANVAS_AA const gdouble transparency, #else const gboolean fill_roi, #endif rgba_t color, AmitkPoint * return_offset, AmitkPoint * return_corner) { GdkPixbuf * temp_image; AmitkDataSet * intersection; AmitkVoxel i; guchar * rgba_data; AmitkVoxel dim; #ifdef AMIDE_LIBGNOMECANVAS_AA guchar transparency_byte; transparency_byte = transparency * 0xFF; #endif intersection = amitk_roi_get_intersection_slice(roi, canvas_slice, pixel_size #ifndef AMIDE_LIBGNOMECANVAS_AA , fill_roi #endif ); if (intersection == NULL) return NULL; dim = AMITK_DATA_SET_DIM(intersection); if ((dim.x == 0) && (dim.y ==0)) { amitk_object_unref(intersection); return NULL; } if ((rgba_data = g_try_new(guchar,4*dim.x*dim.y)) == NULL) { g_warning(_("couldn't allocate memory for rgba_data for roi image")); amitk_object_unref(intersection); return NULL; } i.z = i.g = i.t = 0; for (i.y=0 ; i.y < dim.y; i.y++) for (i.x=0 ; i.x < dim.x; i.x++) if (AMITK_RAW_DATA_UBYTE_CONTENT(intersection->raw_data, i) == 1) { rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+0] = color.r; rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+1] = color.g; rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+2] = color.b; #ifdef AMIDE_LIBGNOMECANVAS_AA rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+3] = color.a; #else rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+3] = 0xFF; #endif #ifdef AMIDE_LIBGNOMECANVAS_AA } else if (AMITK_RAW_DATA_UBYTE_CONTENT(intersection->raw_data, i) == 2) { rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+0] = color.r; rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+1] = color.g; rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+2] = color.b; rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+3] = transparency_byte; #endif } else { rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+0] = 0x00; rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+1] = 0x00; rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+2] = 0x00; rgba_data[(dim.y-i.y-1)*dim.x*4 + i.x*4+3] = 0x00; } temp_image = gdk_pixbuf_new_from_data(rgba_data, GDK_COLORSPACE_RGB, TRUE,8, dim.x,dim.y,dim.x*4*sizeof(guchar), image_free_rgb_data, NULL); if (return_offset != NULL) *return_offset = AMITK_SPACE_OFFSET(intersection); if (return_corner != NULL) *return_corner = amitk_space_s2b(AMITK_SPACE(intersection), AMITK_VOLUME_CORNER(intersection)); amitk_object_unref(intersection); return temp_image; } /* function to return a blank image */ GdkPixbuf * image_blank(const amide_intpoint_t width, const amide_intpoint_t height, rgba_t image_color) { GdkPixbuf * temp_image; amide_intpoint_t i,j; guchar * rgb_data; if ((rgb_data = g_try_new(guchar, 3*width*height)) == NULL) { g_warning(_("couldn't allocate memory for rgb_data for blank image")); return NULL; } for (i=0 ; i < height; i++) for (j=0; j < width; j++) { rgb_data[i*width*3+j*3+0] = image_color.r; rgb_data[i*width*3+j*3+1] = image_color.g; rgb_data[i*width*3+j*3+2] = image_color.b; } temp_image = gdk_pixbuf_new_from_data(rgb_data, GDK_COLORSPACE_RGB, FALSE,8,width,height,width*3*sizeof(guchar), image_free_rgb_data, NULL); return temp_image; } /* function returns a GdkPixbuf from 8 bit data */ GdkPixbuf * image_from_8bit(const guchar * image, const amide_intpoint_t width, const amide_intpoint_t height, const AmitkColorTable color_table) { GdkPixbuf * temp_image; amide_intpoint_t i,j; guchar * rgb_data; rgba_t rgba_temp; guint location; if ((rgb_data = g_try_new(guchar,3*width*height)) == NULL) { g_warning(_("couldn't allocate memory for image from 8 bit data")); return NULL; } for (i=0 ; i < height; i++) for (j=0; j < width; j++) { /* note, line below compensates for X's origin being top left, not bottom left */ rgba_temp = amitk_color_table_lookup(image[(height-i-1)*width+j], color_table, 0, 0xFF); location = i*width*3+j*3; rgb_data[location+0] = rgba_temp.r; rgb_data[location+1] = rgba_temp.g; rgb_data[location+2] = rgba_temp.b; } /* generate the GdkPixbuf from the rgb_data */ temp_image = gdk_pixbuf_new_from_data(rgb_data, GDK_COLORSPACE_RGB, FALSE,8,width,height,width*3*sizeof(guchar), image_free_rgb_data, NULL); return temp_image; } #ifdef AMIDE_LIBVOLPACK_SUPPORT /* function returns a GdkPixbuf from a rendering context */ GdkPixbuf * image_from_renderings(renderings_t * renderings, gint16 image_width, gint16 image_height, AmideEye eyes, gdouble eye_angle, gint16 eye_width) { gint image_num; guint32 total_alpha; rgba16_t * rgba16_data; guchar * char_data; AmitkVoxel i; rgba_t rgba_temp; guint location; GdkPixbuf * temp_image; gint total_width; gdouble rot; AmideEye i_eye; gint j; total_width = image_width+(eyes-1)*eye_width; /* allocate and initialize space for a temporary storage buffer */ if ((rgba16_data = g_try_new(rgba16_t,total_width * image_height)) == NULL) { g_warning(_("couldn't allocate memory for rgba16_data for transferring rendering to image")); return NULL; } for (j=0; jrendering); } else { rot = (-0.5 + i_eye*1.0) * eye_angle; rot = M_PI*rot/180; /* convert to radians */ rendering_set_rotation(renderings->rendering, AMITK_AXIS_Y, -rot); rendering_render(renderings->rendering); rendering_set_rotation(renderings->rendering, AMITK_AXIS_Y, rot); } i.t = i.g = i.z = 0; for (i.y = 0; i.y < image_height; i.y++) for (i.x = 0; i.x < image_width; i.x++) { rgba_temp = amitk_color_table_lookup(renderings->rendering->image[i.x+i.y*image_width], renderings->rendering->color_table, 0, RENDERING_DENSITY_MAX); /* compensate for the fact that X defines the origin as top left, not bottom left */ location = (image_height-i.y-1)*total_width+i.x+i_eye*eye_width; total_alpha = rgba16_data[location].a + rgba_temp.a; if (i_eye == 0) image_num = 1; else if ((i.x+i_eye*eye_width) >= image_width) image_num = 1; else image_num = 2; if (total_alpha == 0) { rgba16_data[location].r = (((image_num-1)*rgba16_data[location].r + rgba_temp.r)/ ((gdouble) image_num)); rgba16_data[location].g = (((image_num-1)*rgba16_data[location].g + rgba_temp.g)/ ((gdouble) image_num)); rgba16_data[location].b = (((image_num-1)*rgba16_data[location].b + rgba_temp.b)/ ((gdouble) image_num)); } else if (rgba16_data[location].a == 0) { rgba16_data[location].r = rgba_temp.r; rgba16_data[location].g = rgba_temp.g; rgba16_data[location].b = rgba_temp.b; rgba16_data[location].a = rgba_temp.a; } else if (rgba_temp.a != 0) { rgba16_data[location].r = ((rgba16_data[location].r*rgba16_data[location].a + rgba_temp.r*rgba_temp.a)/ ((gdouble) total_alpha)); rgba16_data[location].g = ((rgba16_data[location].g*rgba16_data[location].a + rgba_temp.g*rgba_temp.a)/ ((gdouble) total_alpha)); rgba16_data[location].b = ((rgba16_data[location].b*rgba16_data[location].a + rgba_temp.b*rgba_temp.a)/ ((gdouble) total_alpha)); rgba16_data[location].a = total_alpha; } } } renderings = renderings->next; } /* allocate space for the true rgb buffer */ if ((char_data = g_try_new(guchar,3*image_height * total_width)) == NULL) { g_warning(_("couldn't allocate memory for char_data for rendering image")); g_free(rgba16_data); return NULL; } /* now convert our temp rgb data to real rgb data */ for (j=0; j max) max = *AMITK_RAW_DATA_DOUBLE_POINTER(distribution,j); if (max/IMAGE_DISTRIBUTION_WIDTH != 0.0) scale = ((gdouble) IMAGE_DISTRIBUTION_WIDTH)/max; else scale = 0; /* figure out what the rgb data is */ j.t = j.g = j.z = j.y = 0; for (l=0 ; l < dim_x ; l++) { j.x = dim_x-l-1; for (k=0; k < floor(((gdouble) IMAGE_DISTRIBUTION_WIDTH)- scale*(*AMITK_RAW_DATA_DOUBLE_POINTER(distribution,j))) ; k++) { rgba_data[l*IMAGE_DISTRIBUTION_WIDTH*4+k*4+0] = 0x00; rgba_data[l*IMAGE_DISTRIBUTION_WIDTH*4+k*4+1] = 0x00; rgba_data[l*IMAGE_DISTRIBUTION_WIDTH*4+k*4+2] = 0x00; rgba_data[l*IMAGE_DISTRIBUTION_WIDTH*4+k*4+3] = 0x00; } for ( ; k < IMAGE_DISTRIBUTION_WIDTH ; k++) { rgba_data[l*IMAGE_DISTRIBUTION_WIDTH*4+k*4+0] = fg.r; rgba_data[l*IMAGE_DISTRIBUTION_WIDTH*4+k*4+1] = fg.g; rgba_data[l*IMAGE_DISTRIBUTION_WIDTH*4+k*4+2] = fg.b; rgba_data[l*IMAGE_DISTRIBUTION_WIDTH*4+k*4+3] = 0xFF; } } } /* generate the pixbuf image */ temp_image = gdk_pixbuf_new_from_data(rgba_data, GDK_COLORSPACE_RGB, TRUE,8,IMAGE_DISTRIBUTION_WIDTH, dim_x, IMAGE_DISTRIBUTION_WIDTH*4*sizeof(guchar), image_free_rgb_data, NULL); if (temp_image == NULL) g_error("NULL Distribution Image created\n"); return temp_image; } /* function to make the color_strip image */ GdkPixbuf * image_from_colortable(const AmitkColorTable color_table, const amide_intpoint_t width, const amide_intpoint_t height, const amide_data_t min, const amide_data_t max, const amide_data_t data_set_min, const amide_data_t data_set_max, const gboolean horizontal) { amide_intpoint_t i,j; rgba_t rgba; GdkPixbuf * temp_image; amide_data_t datum; guchar * rgb_data; if ((rgb_data = g_try_new(guchar,3*width*height)) == NULL) { g_warning(_("couldn't allocate memory for rgb_data for color_strip")); return NULL; } if (horizontal) { for (i=0; i < width; i++) { datum = ((((gdouble) width-i)/width) * (data_set_max-data_set_min))+data_set_min; datum = (data_set_max-data_set_min)*(datum-min)/(max-min)+data_set_min; rgba = amitk_color_table_lookup(datum, color_table, data_set_min, data_set_max); for (j=0; j < height; j++) { rgb_data[j*width*3+i*3+0] = rgba.r; rgb_data[j*width*3+i*3+1] = rgba.g; rgb_data[j*width*3+i*3+2] = rgba.b; } } } else { for (j=0; j < height; j++) { datum = ((((gdouble) height-j)/height) * (data_set_max-data_set_min))+data_set_min; datum = (data_set_max-data_set_min)*(datum-min)/(max-min)+data_set_min; rgba = amitk_color_table_lookup(datum, color_table, data_set_min, data_set_max); for (i=0; i < width; i++) { rgb_data[j*width*3+i*3+0] = rgba.r; rgb_data[j*width*3+i*3+1] = rgba.g; rgb_data[j*width*3+i*3+2] = rgba.b; } } } temp_image = gdk_pixbuf_new_from_data(rgb_data, GDK_COLORSPACE_RGB, FALSE,8,width,height,width*3*sizeof(guchar), image_free_rgb_data, NULL); return temp_image; } GdkPixbuf * image_from_projection(AmitkDataSet * projection) { guchar * rgb_data; AmitkVoxel i; AmitkVoxel dim; amide_data_t max,min; GdkPixbuf * temp_image; rgba_t rgba_temp; AmitkColorTable color_table; /* sanity checks */ g_return_val_if_fail(AMITK_IS_DATA_SET(projection), NULL); dim = AMITK_DATA_SET_DIM(projection); if ((rgb_data = g_try_new(guchar,3*dim.x*dim.y)) == NULL) { g_warning(_("couldn't allocate memory for rgba_data for projection image")); return NULL; } amitk_data_set_get_thresholding_min_max(projection, projection, AMITK_DATA_SET_SCAN_START(projection), amitk_data_set_get_frame_duration(projection,0), &min, &max); color_table = AMITK_DATA_SET_COLOR_TABLE(projection, AMITK_VIEW_MODE_SINGLE); i.t = i.g = i.z = 0; for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) { rgba_temp = amitk_color_table_lookup(AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(projection,i), color_table,min, max); /* compensate for the fact that X defines the origin as top left, not bottom left */ rgb_data[(dim.y-i.y-1)*dim.x*3 + i.x*3+0] = rgba_temp.r; rgb_data[(dim.y-i.y-1)*dim.x*3 + i.x*3+1] = rgba_temp.g; rgb_data[(dim.y-i.y-1)*dim.x*3 + i.x*3+2] = rgba_temp.b; } /* from the rgb_data, generate a GdkPixbuf */ temp_image = gdk_pixbuf_new_from_data(rgb_data, GDK_COLORSPACE_RGB, FALSE,8,dim.x,dim.y,dim.x*3*sizeof(guchar), image_free_rgb_data, NULL); return temp_image; } GdkPixbuf * image_from_slice(AmitkDataSet * slice, AmitkViewMode view_mode) { guchar * rgba_data; AmitkVoxel i; AmitkVoxel dim; amide_data_t max,min; GdkPixbuf * temp_image; guint index; rgba_t rgba_temp; AmitkColorTable color_table; /* sanity checks */ g_return_val_if_fail(AMITK_IS_DATA_SET(slice), NULL); g_return_val_if_fail(AMITK_DATA_SET_SLICE_PARENT(slice) != NULL, NULL); dim = AMITK_DATA_SET_DIM(slice); if ((rgba_data = g_try_new(guchar,4*dim.x*dim.y)) == NULL) { g_warning(_("couldn't allocate memory for rgba_data for slice image")); return NULL; } amitk_data_set_get_thresholding_min_max(AMITK_DATA_SET_SLICE_PARENT(slice), AMITK_DATA_SET(slice), AMITK_DATA_SET_SCAN_START(slice), amitk_data_set_get_frame_duration(slice,0), &min, &max); color_table = amitk_data_set_get_color_table_to_use(AMITK_DATA_SET_SLICE_PARENT(slice), view_mode); i.t = i.g = i.z = 0; index=0; /* compensate for the fact that X defines the origin as top left, not bottom left */ for (i.y = dim.y-1; i.y >= 0; i.y--) for (i.x = 0; i.x < dim.x; i.x++, index+=4) { rgba_temp = amitk_color_table_lookup(AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(slice,i), color_table,min, max); rgba_data[index+0] = rgba_temp.r; rgba_data[index+1] = rgba_temp.g; rgba_data[index+2] = rgba_temp.b; rgba_data[index+3] = rgba_temp.a; } /* from the rgb_data, generate a GdkPixbuf */ temp_image = gdk_pixbuf_new_from_data(rgba_data, GDK_COLORSPACE_RGB, TRUE,8,dim.x,dim.y,dim.x*4*sizeof(guchar), image_free_rgb_data, NULL); return temp_image; } /* note, generally call this function with gate -1, only use the gate parameter if you want to override the data set's specified gate */ GdkPixbuf * image_from_data_sets(GList ** pdisp_slices, GList ** pslice_cache, const gint max_slice_cache_size, GList * objects, const AmitkDataSet * active_ds, const amide_time_t start, const amide_time_t duration, const amide_intpoint_t gate, const amide_real_t pixel_size, const AmitkVolume * view_volume, const AmitkFuseType fuse_type, const AmitkViewMode view_mode) { gint slice_num; guint32 total_alpha; guchar * rgb_data; rgba16_t * rgba16_data; guint location; AmitkVoxel i; AmitkVoxel dim; amide_data_t max,min; GdkPixbuf * temp_image; rgba_t rgba_temp; GList * slices; GList * temp_slices; AmitkDataSet * slice; AmitkColorTable color_table; AmitkDataSet * overlay_slice = NULL; gint j; AmitkCanvasPoint pixel_size2; /* sanity checks */ g_return_val_if_fail(objects != NULL, NULL); pixel_size2.x = pixel_size2.y = pixel_size; slices = amitk_data_sets_get_slices(objects, pslice_cache, max_slice_cache_size, start, duration, gate, pixel_size2,view_volume); g_return_val_if_fail(slices != NULL, NULL); /* get the dimensions. since all slices have the same dimensions, we'll just get the first */ dim = AMITK_DATA_SET_DIM(slices->data); /* allocate and initialize space for a temporary storage buffer */ rgba16_data = g_try_new(rgba16_t,dim.y*dim.x); g_return_val_if_fail(rgba16_data != NULL, NULL); for (j=0; jdata; if ((fuse_type == AMITK_FUSE_TYPE_OVERLAY) && (AMITK_DATA_SET_SLICE_PARENT(slice) == active_ds)) { overlay_slice = slice; } else { /* blend this slice */ slice_num++; amitk_data_set_get_thresholding_min_max(AMITK_DATA_SET_SLICE_PARENT(slice), AMITK_DATA_SET(slice), start, duration, &min, &max); color_table = amitk_data_set_get_color_table_to_use(AMITK_DATA_SET_SLICE_PARENT(slice), view_mode); /* now add this slice into the rgba16 data */ i.t = i.g = i.z = 0; location=0; /* compensate for the fact that X defines the origin as top left, not bottom left */ for (i.y = dim.y-1; i.y >= 0; i.y--) for (i.x = 0; i.x < dim.x; i.x++, location++) { rgba_temp = amitk_color_table_lookup(AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(slice,i), color_table,min, max); total_alpha = rgba16_data[location].a + rgba_temp.a; if (total_alpha == 0) { rgba16_data[location].r = (((slice_num-1)*rgba16_data[location].r + rgba_temp.r)/ ((gdouble) slice_num)); rgba16_data[location].g = (((slice_num-1)*rgba16_data[location].g + rgba_temp.g)/ ((gdouble) slice_num)); rgba16_data[location].b = (((slice_num-1)*rgba16_data[location].b + rgba_temp.b)/ ((gdouble) slice_num)); } else if (rgba16_data[location].a == 0) { rgba16_data[location].r = rgba_temp.r; rgba16_data[location].g = rgba_temp.g; rgba16_data[location].b = rgba_temp.b; rgba16_data[location].a = rgba_temp.a; } else if (rgba_temp.a != 0) { rgba16_data[location].r = ((rgba16_data[location].r*rgba16_data[location].a + rgba_temp.r*rgba_temp.a)/ ((gdouble) total_alpha)); rgba16_data[location].g = ((rgba16_data[location].g*rgba16_data[location].a + rgba_temp.g*rgba_temp.a)/ ((gdouble) total_alpha)); rgba16_data[location].b = ((rgba16_data[location].b*rgba16_data[location].a + rgba_temp.b*rgba_temp.a)/ ((gdouble) total_alpha)); rgba16_data[location].a = total_alpha; } } } temp_slices = temp_slices->next; } /* allocate space for the true rgb buffer */ rgb_data = g_try_new(guchar,3*dim.y*dim.x); g_return_val_if_fail(rgb_data != NULL, NULL); /* now convert our temp rgb data to real rgb data */ i.z = 0; location=0; for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++, location++) { rgb_data[3*location+0] = rgba16_data[location].r < 0xFF ? rgba16_data[location].r : 0xFF; rgb_data[3*location+1] = rgba16_data[location].g < 0xFF ? rgba16_data[location].g : 0xFF; rgb_data[3*location+2] = rgba16_data[location].b < 0xFF ? rgba16_data[location].b : 0xFF; } /* if we have a data set we're overlaying, add it in now */ if (overlay_slice != NULL) { amitk_data_set_get_thresholding_min_max(AMITK_DATA_SET_SLICE_PARENT(overlay_slice), AMITK_DATA_SET(overlay_slice), start, duration, &min, &max); color_table = amitk_data_set_get_color_table_to_use(AMITK_DATA_SET_SLICE_PARENT(overlay_slice), view_mode); i.t = i.g = i.z = 0; for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) { rgba_temp = amitk_color_table_lookup(AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(overlay_slice,i), color_table,min, max); /* compensate for the fact that X defines the origin as top left, not bottom left */ location = (dim.y - i.y - 1)*dim.x+i.x; if (rgba_temp.a != 0) { rgb_data[3*location+0] = rgba_temp.r; rgb_data[3*location+1] = rgba_temp.g; rgb_data[3*location+2] = rgba_temp.b; } } } /* from the rgb_data, generate a GdkPixbuf */ temp_image = gdk_pixbuf_new_from_data(rgb_data, GDK_COLORSPACE_RGB, FALSE,8,dim.x,dim.y,dim.x*3*sizeof(guchar), image_free_rgb_data, NULL); /* cleanup */ g_free(rgba16_data); if (pdisp_slices != NULL) { amitk_objects_unref((*pdisp_slices)); *pdisp_slices = slices; } else { amitk_objects_unref(slices); } return temp_image; } /* get the icon to use for this modality */ GdkPixbuf * image_get_data_set_pixbuf(AmitkDataSet * ds) { GdkPixbuf * pixbuf; guchar * object_icon_data; g_return_val_if_fail(AMITK_IS_DATA_SET(ds), NULL); switch (AMITK_DATA_SET_MODALITY(ds)) { case AMITK_MODALITY_SPECT: object_icon_data = SPECT_icon_data; break; case AMITK_MODALITY_MRI: object_icon_data = MRI_icon_data; break; case AMITK_MODALITY_PET: object_icon_data = PET_icon_data; break; case AMITK_MODALITY_CT: case AMITK_MODALITY_OTHER: default: object_icon_data = CT_icon_data; break; } pixbuf = image_from_8bit(object_icon_data, OBJECT_ICON_XSIZE,OBJECT_ICON_YSIZE, AMITK_DATA_SET_COLOR_TABLE(ds, AMITK_VIEW_MODE_SINGLE)); return pixbuf; } amide-1.0.5/src/amitk_raw_data_variable_type.c0000664000175000017500000000400312270274125021255 0ustar loeningloening/* amitk_raw_data_variable_type.c - used to generate the different amitk_raw_data_*.c files * * Part of amide - Amide's a Medical Image Data Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include "amitk_raw_data_`'m4_Variable_Type`'.h" AmitkRawData * amitk_raw_data_`'m4_Variable_Type`'_0D_SCALING_init(amitk_format_`'m4_Variable_Type`'_t init_value) { AmitkRawData * temp_amitk_raw_data; AmitkVoxel i; temp_amitk_raw_data = amitk_raw_data_new_with_data(AMITK_FORMAT_`'m4_Variable_Type`', one_voxel); g_return_val_if_fail(temp_amitk_raw_data != NULL, NULL); i = zero_voxel; (*AMITK_RAW_DATA_`'m4_Variable_Type`'_0D_SCALING_POINTER(temp_amitk_raw_data, i)) = init_value; return temp_amitk_raw_data; } void amitk_raw_data_`'m4_Variable_Type`'_initialize_data(AmitkRawData * amitk_raw_data, amitk_format_`'m4_Variable_Type`'_t init_value) { AmitkVoxel i; for (i.t = 0; i.t < amitk_raw_data->dim.t; i.t++) for (i.g = 0; i.g < amitk_raw_data->dim.g; i.g++) for (i.z = 0; i.z < amitk_raw_data->dim.z; i.z++) for (i.y = 0; i.y < amitk_raw_data->dim.y; i.y++) for (i.x = 0; i.x < amitk_raw_data->dim.x; i.x++) AMITK_RAW_DATA_`'m4_Variable_Type`'_SET_CONTENT(amitk_raw_data,i)=init_value; return; } amide-1.0.5/src/ui_series.c0000644000175000017500000013243312270274041015373 0ustar loeningloening/* ui_series.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amide_gconf.h" #include "amitk_common.h" #include "amitk_threshold.h" #include "amitk_progress_dialog.h" #include "amitk_canvas_object.h" #include "amitk_tree_view.h" #include "image.h" #include "ui_common.h" #include "ui_series.h" typedef enum { OVER_SPACE, OVER_FRAMES, OVER_GATES, NUM_SERIES_TYPES, } series_type_t; /* external variables */ static gchar * series_names[] = { N_("over Space"), N_("over Time"), N_("over Gates") }; static gchar * series_explanations[] = { N_("Look at a series of images over a spatial dimension"), N_("Look at a series of images over time"), N_("Look at a series of images over gates") }; #define UPDATE_NONE 0 #define UPDATE_SERIES 0x1 #define GCONF_AMIDE_SERIES "SERIES" /* ui_series data structures */ typedef struct ui_series_t { GtkWindow * window; GtkWidget * window_vbox; GList * slice_cache; gint max_slice_cache_size; GList * objects; AmitkDataSet * active_ds; GtkWidget * canvas; gint canvas_height; gint canvas_width; GnomeCanvasItem ** images; GnomeCanvasItem ** captions; GList ** items; GtkWidget * thresholds_dialog; guint num_slices, rows, columns; AmitkVolume * volume; amide_time_t view_time; AmitkFuseType fuse_type; amide_real_t pixel_dim; series_type_t series_type; AmitkPreferences * preferences; GtkWidget * progress_dialog; gboolean in_generation; gboolean quit_generation; gint roi_width; #ifdef AMIDE_LIBGNOMECANVAS_AA gdouble roi_transparency; #else GdkLineStyle line_style; gboolean fill_roi; #endif gint pixbuf_width; gint pixbuf_height; /* for "OVER SPACE" series */ amide_time_t view_duration; amide_real_t start_z; amide_real_t z_point; /* current slice offset z component*/ amide_real_t end_z; /* for "OVER TIME" series */ guint view_frame; amide_time_t start_time; amide_time_t * frame_durations; /* an array of frame durations */ /* for "OVER GATES" series */ gint view_gate; gint num_gates; guint next_update; guint idle_handler_id; guint reference_count; } ui_series_t; static void scroll_change_cb(GtkAdjustment* adjustment, gpointer data); static void canvas_size_change_cb(GtkWidget * widget, GtkAllocation * allocation, gpointer ui_series); static void export_cb(GtkAction * action, gpointer data); static void changed_cb(gpointer dummy, gpointer ui_series); static void color_table_changed_cb(gpointer dummy, AmitkViewMode view_mode, gpointer ui_series); static void data_set_invalidate_slice_cache(AmitkDataSet *ds, gpointer ui_series); static void threshold_cb(GtkAction * action, gpointer data); static void close_cb(GtkAction * action, gpointer data); static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data); static void menus_toolbar_create(ui_series_t * ui_series); static ui_series_t * ui_series_unref(ui_series_t * ui_series); static ui_series_t * ui_series_init(GtkWindow * window, GtkWidget * window_vbox); static GtkAdjustment * ui_series_create_scroll_adjustment(ui_series_t * ui_series); static void add_update(ui_series_t * ui_series); static gboolean update_immediate(gpointer ui_series); static void read_series_preferences(series_type_t * series_type, AmitkView * view); /* function called by the adjustment in charge for scrolling */ static void scroll_change_cb(GtkAdjustment* adjustment, gpointer data) { ui_series_t * ui_series = data; switch(ui_series->series_type) { case OVER_GATES: ui_series->view_gate = adjustment->value; break; case OVER_FRAMES: ui_series->view_frame = adjustment->value; break; case OVER_SPACE: default: ui_series->z_point = adjustment->value-AMITK_VOLUME_Z_CORNER(ui_series->volume)/2.0; break; } add_update(ui_series); return; } static void canvas_size_change_cb(GtkWidget * widget, GtkAllocation * allocation, gpointer data) { ui_series_t * ui_series = data; ui_series->canvas_width = allocation->width; ui_series->canvas_height = allocation->height; add_update(ui_series); return; } /* function to save the series as an image */ static void export_cb(GtkAction * action, gpointer data) { ui_series_t * ui_series = data; GList * objects; GtkWidget * file_chooser; gchar * filename=NULL; gchar * data_set_names = NULL; GdkPixbuf * pixbuf; file_chooser = gtk_file_chooser_dialog_new(_("Export to Image"), GTK_WINDOW(ui_series->window), /* parent window */ GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(ui_series->preferences, file_chooser); /* set the default directory if applicable */ /* take a guess at the filename */ objects = ui_series->objects; while (objects != NULL) { if (AMITK_IS_DATA_SET(objects->data)) { if (data_set_names == NULL) filename = g_strdup(AMITK_OBJECT_NAME(objects->data)); else filename = g_strdup_printf("%s+%s",data_set_names, AMITK_OBJECT_NAME(objects->data)); g_free(data_set_names); data_set_names = filename; } objects = objects->next; } if (data_set_names == NULL) { objects = ui_series->objects; while (objects != NULL) { if (data_set_names == NULL) filename = g_strdup(AMITK_OBJECT_NAME(objects->data)); else filename = g_strdup_printf("%s+%s",data_set_names, AMITK_OBJECT_NAME(objects->data)); g_free(data_set_names); data_set_names = filename; objects = objects->next; } } switch(ui_series->series_type) { case OVER_GATES: filename = g_strdup_printf("%s_gated.jpg", data_set_names); break; case OVER_FRAMES: case OVER_SPACE: default: filename = g_strdup_printf("%s.jpg", data_set_names); break; } gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(file_chooser), filename); g_free(data_set_names); g_free(filename); if (gtk_dialog_run(GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (file_chooser)); else filename = NULL; gtk_widget_destroy(file_chooser); if (filename == NULL) return; /* inappropriate name or don't want to overwrite */ pixbuf = amitk_get_pixbuf_from_canvas(GNOME_CANVAS(ui_series->canvas),0,0, ui_series->columns*(ui_series->pixbuf_width+UI_SERIES_R_MARGIN+UI_SERIES_L_MARGIN), ui_series->rows*(ui_series->pixbuf_height+UI_SERIES_TOP_MARGIN+UI_SERIES_BOTTOM_MARGIN)); if (pixbuf == NULL) { g_warning(_("ui_series canvas failed to return a valid image")); return; } if (gdk_pixbuf_save (pixbuf, filename, "jpeg", NULL, "quality", "100", NULL) == FALSE) { g_warning(_("Failure Saving File: %s"),filename); return; } g_object_unref(pixbuf); return; } /* function called when a data set changed */ static void changed_cb(gpointer dummy, gpointer data) { ui_series_t * ui_series=data; add_update(ui_series); return; } static void color_table_changed_cb(gpointer dummy, AmitkViewMode view_mode, gpointer ui_series) { g_return_if_fail(view_mode == AMITK_VIEW_MODE_SINGLE); changed_cb(dummy, ui_series); return; } static void data_set_invalidate_slice_cache(AmitkDataSet *ds, gpointer data) { ui_series_t * ui_series=data; if (ui_series->slice_cache != NULL) { ui_series->slice_cache = amitk_objects_unref(ui_series->slice_cache); } add_update(ui_series); return; } static gboolean thresholds_delete_event(GtkWidget* widget, GdkEvent * event, gpointer data) { ui_series_t * ui_series = data; /* just keeping track on whether or not the threshold widget is up */ ui_series->thresholds_dialog = NULL; return FALSE; } /* function called when we hit the threshold button */ static void threshold_cb(GtkAction * action, gpointer data) { ui_series_t * ui_series = data; if (ui_series->thresholds_dialog != NULL) return; if (!amitk_objects_has_type(ui_series->objects, AMITK_OBJECT_TYPE_DATA_SET, FALSE)) { g_warning(_("No data sets to threshold\n")); return; } ui_common_place_cursor(UI_CURSOR_WAIT, ui_series->canvas); ui_series->thresholds_dialog = amitk_thresholds_dialog_new(ui_series->objects, ui_series->window); g_signal_connect(G_OBJECT(ui_series->thresholds_dialog), "delete_event", G_CALLBACK(thresholds_delete_event), ui_series); gtk_widget_show(ui_series->thresholds_dialog); ui_common_remove_wait_cursor(ui_series->canvas); return; } /* function ran when closing a series window */ static void close_cb(GtkAction * action, gpointer data) { ui_series_t * ui_series = data; GtkWindow * window = ui_series->window; gboolean return_val; /* run the delete event function */ g_signal_emit_by_name(G_OBJECT(window), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(window)); return; } /* function to run for a delete_event */ static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { ui_series_t * ui_series = data; GtkWindow * window = ui_series->window; /* trying to close while we're generating */ if (ui_series->in_generation) { ui_series->quit_generation=TRUE; return TRUE; } /* free the associated data structure */ ui_series = ui_series_unref(ui_series); /* tell the rest of the program this window is no longer here */ amide_unregister_window((gpointer) window); return FALSE; } static const GtkActionEntry normal_items[] = { /* Toplevel */ { "FileMenu", NULL, N_("_File") }, { "HelpMenu", NULL, N_("_Help") }, /* File menu */ { "ExportSeries", NULL, N_("_Export Series"), NULL, N_("Export the series to a JPEG image file"), G_CALLBACK(export_cb)}, { "Close", GTK_STOCK_CLOSE, NULL, "W", N_("Close the series dialog"), G_CALLBACK (close_cb)}, /* Toolbar items */ { "Threshold", "amide_icon_thresholding", N_("Threshold"), NULL, N_("Set the thresholds and colormaps for the data sets in the series view"), G_CALLBACK(threshold_cb)} }; static const char *ui_description = "" " " " " " " " " " " " " HELP_MENU_UI_DESCRIPTION " " " " " " " " ""; /* function to setup the menus for the series ui */ static void menus_toolbar_create(ui_series_t * ui_series) { GtkWidget *menubar; GtkWidget *toolbar; GtkActionGroup *action_group; GtkUIManager *ui_manager; GtkAccelGroup *accel_group; GError *error; /* sanity check */ g_assert(ui_series!=NULL); /* create an action group with all the menu actions */ action_group = gtk_action_group_new ("MenuActions"); gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE); gtk_action_group_add_actions(action_group, normal_items, G_N_ELEMENTS(normal_items),ui_series); gtk_action_group_add_actions(action_group, ui_common_help_menu_items, G_N_ELEMENTS(ui_common_help_menu_items),ui_series); /* create the ui manager, and add the actions and accel's */ ui_manager = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); accel_group = gtk_ui_manager_get_accel_group (ui_manager); gtk_window_add_accel_group (ui_series->window, accel_group); /* create the actual menu/toolbar ui */ error = NULL; if (!gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, &error)) { g_warning ("%s: building menus failed in %s: %s", PACKAGE, __FILE__, error->message); g_error_free (error); return; } /* pack in the menu and toolbar */ menubar = gtk_ui_manager_get_widget (ui_manager, "/MainMenu"); gtk_box_pack_start (GTK_BOX (ui_series->window_vbox), menubar, FALSE, FALSE, 0); toolbar = gtk_ui_manager_get_widget (ui_manager, "/ToolBar"); gtk_box_pack_start (GTK_BOX (ui_series->window_vbox), toolbar, FALSE, FALSE, 0); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); return; } /* destroy a ui_series data structure */ static ui_series_t * ui_series_unref(ui_series_t * ui_series) { GList * temp_objects; gboolean return_val; gint i; g_return_val_if_fail(ui_series != NULL, NULL); /* sanity checks */ g_return_val_if_fail(ui_series->reference_count > 0, NULL); /* remove a reference count */ ui_series->reference_count--; /* things to do if we've removed all reference's */ if (ui_series->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing ui_series\n"); #endif if (ui_series->idle_handler_id != 0) { g_source_remove(ui_series->idle_handler_id); ui_series->idle_handler_id = 0; } if (ui_series->active_ds != NULL) ui_series->active_ds = amitk_object_unref(ui_series->active_ds); if (ui_series->objects != NULL) { /* disconnect and signals */ temp_objects = ui_series->objects; while (temp_objects != NULL) { if (AMITK_IS_DATA_SET(temp_objects->data)) { g_signal_handlers_disconnect_by_func(G_OBJECT(temp_objects->data), G_CALLBACK(data_set_invalidate_slice_cache), ui_series); g_signal_handlers_disconnect_by_func(G_OBJECT(temp_objects->data), G_CALLBACK(color_table_changed_cb), ui_series); } g_signal_handlers_disconnect_by_func(G_OBJECT(temp_objects->data), G_CALLBACK(changed_cb), ui_series); temp_objects = temp_objects->next; } amitk_objects_unref(ui_series->objects); ui_series->objects = NULL; } if (ui_series->slice_cache != NULL) { ui_series->slice_cache = amitk_objects_unref(ui_series->slice_cache); } if (ui_series->volume != NULL) { amitk_object_unref(ui_series->volume); ui_series->volume = NULL; } if (ui_series->thresholds_dialog != NULL) { gtk_widget_destroy(ui_series->thresholds_dialog); ui_series->thresholds_dialog = NULL; } if (ui_series->preferences != NULL) { g_object_unref(ui_series->preferences); ui_series->preferences = NULL; } if (ui_series->progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(ui_series->progress_dialog), "delete_event", NULL, &return_val); ui_series->progress_dialog = NULL; } if (ui_series->images != NULL) { g_free(ui_series->images); ui_series->images = NULL; } if (ui_series->captions != NULL) { g_free(ui_series->captions); ui_series->captions = NULL; } if (ui_series->items != NULL) { for (i=0; i < ui_series->num_slices; i++) { if (ui_series->items[i] != NULL) { g_list_free(ui_series->items[i]); ui_series->items[i] = NULL; } } g_free(ui_series->items); ui_series->items = NULL; } if (ui_series->frame_durations != NULL) { g_free(ui_series->frame_durations); ui_series->frame_durations = NULL; } g_free(ui_series); ui_series = NULL; } return ui_series; } /* allocate and initialize a ui_series data structure */ static ui_series_t * ui_series_init(GtkWindow * window, GtkWidget * window_vbox) { ui_series_t * ui_series; /* alloc space for the data structure for passing ui info */ if ((ui_series = g_try_new(ui_series_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for ui_series_t")); return NULL; } ui_series->reference_count = 1; /* set any needed parameters */ ui_series->window = window; ui_series->window_vbox = window_vbox; ui_series->slice_cache = NULL; ui_series->max_slice_cache_size=10; ui_series->num_slices = 0; ui_series->rows = 0; ui_series->columns = 0; ui_series->canvas_height = 0; ui_series->canvas_width = 1; ui_series->images = NULL; ui_series->captions = NULL; ui_series->items = NULL; ui_series->objects = NULL; ui_series->active_ds = NULL; ui_series->fuse_type = AMITK_FUSE_TYPE_BLEND; ui_series->pixel_dim = 1.0; ui_series->volume = NULL; ui_series->view_time = 0.0; ui_series->series_type = OVER_SPACE; ui_series->thresholds_dialog = NULL; ui_series->preferences = NULL; ui_series->progress_dialog = amitk_progress_dialog_new(ui_series->window); ui_series->in_generation=FALSE; ui_series->quit_generation=FALSE; ui_series->roi_width = 1.0; #ifdef AMIDE_LIBGNOMECANVAS_AA ui_series->roi_transparency = 0.5; #else ui_series->line_style = 0; ui_series->fill_roi = TRUE; #endif ui_series->pixbuf_width = 0; ui_series->pixbuf_height = 0; ui_series->view_duration = 1.0; ui_series->start_z = 0.0; ui_series->end_z = 0.0; ui_series->z_point = 0.0; ui_series->view_frame = 0; ui_series->start_time = 0.0; ui_series->frame_durations = NULL; ui_series->view_gate = 0; ui_series->num_gates = 1; ui_series->next_update = UPDATE_NONE; ui_series->idle_handler_id = 0; return ui_series; } /* function to make the adjustments for the scrolling scale */ static GtkAdjustment * ui_series_create_scroll_adjustment(ui_series_t * ui_series) { amide_real_t thickness; GtkObject * adjustment; switch(ui_series->series_type) { case OVER_GATES: adjustment = gtk_adjustment_new(ui_series->view_gate, 0, ui_series->num_slices, 1,1,1); break; case OVER_FRAMES: adjustment = gtk_adjustment_new(ui_series->view_frame, 0, ui_series->num_slices, 1,1,1); break; case OVER_SPACE: default: thickness = AMITK_VOLUME_Z_CORNER(ui_series->volume); adjustment = gtk_adjustment_new(ui_series->z_point-thickness/2.0, ui_series->start_z+thickness/2.0, ui_series->end_z-thickness/2.0, thickness, thickness, thickness); break; } return GTK_ADJUSTMENT(adjustment); } static void add_update(ui_series_t * ui_series) { ui_series->next_update = ui_series->next_update | UPDATE_SERIES; if (ui_series->idle_handler_id == 0) { ui_common_place_cursor_no_wait(UI_CURSOR_WAIT, ui_series->canvas); ui_series->idle_handler_id = g_idle_add_full(G_PRIORITY_DEFAULT_IDLE,update_immediate, ui_series, NULL); } return; } /* funtion to update the canvas */ static gboolean update_immediate(gpointer data) { ui_series_t * ui_series = data; AmitkPoint temp_point; amide_time_t temp_time, temp_duration; gint temp_gate; gint i, start_i; gdouble x, y; AmitkVolume * view_volume; gint image_width, image_height; gchar * temp_string; GdkPixbuf * pixbuf; gboolean can_continue=TRUE; gboolean return_val = TRUE; GList * objects; GnomeCanvasItem * item; rgba_t outline_color; gint rows, columns; ui_series->in_generation=TRUE; temp_string = g_strdup_printf(_("Slicing for series")); amitk_progress_dialog_set_text(AMITK_PROGRESS_DIALOG(ui_series->progress_dialog), temp_string); g_free(temp_string); /* allocate space for the following if this is the first time through */ if (ui_series->images == NULL) { if ((ui_series->images = g_try_new(GnomeCanvasItem *,ui_series->num_slices)) == NULL) { g_warning(_("couldn't allocate memory space for pointers to image GnomeCanvasItem's")); return_val = FALSE; goto exit_update; } if ((ui_series->captions = g_try_new(GnomeCanvasItem *,ui_series->num_slices)) == NULL) { g_warning(_("couldn't allocate memory space for pointers to caption GnomeCanvasItem's")); return_val = FALSE; goto exit_update; } if ((ui_series->items = g_try_new(GList *,ui_series->num_slices)) == NULL) { g_warning(_("couldn't allocate memory space for pointers to GnomeCanavasItem lists")); return_val = FALSE; goto exit_update; } for (i=0; i < ui_series->num_slices ; i++) { ui_series->images[i] = NULL; ui_series->captions[i] = NULL; ui_series->items[i] = NULL; } } image_width = ui_series->pixbuf_width + UI_SERIES_R_MARGIN + UI_SERIES_L_MARGIN; image_height = ui_series->pixbuf_height + UI_SERIES_TOP_MARGIN + UI_SERIES_BOTTOM_MARGIN; /* figure out how many images we can display at once */ columns = floor(ui_series->canvas_width/image_width); if (columns < 1) columns = 1; rows = floor(ui_series->canvas_height/image_height); if (rows < 1) rows = 1; /* compensate for cases where we don't need all the rows */ if ((columns * rows) > ui_series->num_slices) rows = ceil((double) ui_series->num_slices/(double) columns); /* if we've changed rows or columns, delete prexisting canvas objects */ if ((ui_series->rows != rows) || (ui_series->columns != columns)) { ui_series->rows = rows; ui_series->columns = columns; for (i=0; i < ui_series->num_slices ; i++) { if (ui_series->images[i] != NULL) { gtk_object_destroy(GTK_OBJECT(ui_series->images[i])); ui_series->images[i] = NULL; } if (ui_series->captions[i] != NULL) { gtk_object_destroy(GTK_OBJECT(ui_series->captions[i])); ui_series->captions[i] = NULL; } if (ui_series->items[i] != NULL) { while (ui_series->items[i] != NULL) { item = ui_series->items[i]->data; ui_series->items[i] = g_list_remove(ui_series->items[i], item); gtk_object_destroy(GTK_OBJECT(item)); } ui_series->items[i] = NULL; } } gnome_canvas_set_scroll_region(GNOME_CANVAS(ui_series->canvas), 0.0, 0.0, (double) (ui_series->columns*image_width), (double) (ui_series->rows*image_height)); } /* figure out what's the first image we want to display */ switch(ui_series->series_type) { case OVER_GATES: start_i = ui_series->view_gate; break; case OVER_FRAMES: start_i = ui_series->view_frame; break; case OVER_SPACE: default: start_i = ui_series->num_slices*((ui_series->z_point-ui_series->start_z)/ (ui_series->end_z-ui_series->start_z-AMITK_VOLUME_Z_CORNER(ui_series->volume))); break; } /* correct i for special cases */ if (ui_series->num_slices < ui_series->columns*ui_series->rows) start_i=0; else if (start_i < (ui_series->columns*ui_series->rows/2.0)) start_i=0; else if (start_i > (ui_series->num_slices - ui_series->columns*ui_series->rows)) start_i = ui_series->num_slices - ui_series->columns*ui_series->rows; else start_i = start_i-ui_series->columns*ui_series->rows/2.0; temp_time = ui_series->start_time; temp_point = zero_point; temp_gate = -1; if (ui_series->series_type == OVER_FRAMES) { for (i=0;i< start_i; i++) temp_time += ui_series->frame_durations[i]; temp_time -= ui_series->frame_durations[start_i];/* well get added back 1st time through loop */ temp_duration = ui_series->frame_durations[start_i]; } else { temp_time = ui_series->view_time; temp_duration = ui_series->view_duration; } x = y = 0.0; view_volume = AMITK_VOLUME(amitk_object_copy(AMITK_OBJECT(ui_series->volume))); for (i=start_i; (((i-start_i) < (ui_series->rows*ui_series->columns)) && (i < ui_series->num_slices) && can_continue && (!ui_series->quit_generation)); i++) { switch (ui_series->series_type) { case OVER_GATES: temp_gate=i; break; case OVER_FRAMES: temp_time += temp_duration; /* duration from last time through the loop */ temp_duration = ui_series->frame_durations[i]; break; case OVER_SPACE: default: temp_point.z = i*AMITK_VOLUME_Z_CORNER(ui_series->volume)+ui_series->start_z; break; } amitk_space_set_offset(AMITK_SPACE(view_volume), amitk_space_s2b(AMITK_SPACE(ui_series->volume), temp_point)); /* figure out the next x,y spot to put this guy */ y = floor((i-start_i)/ui_series->columns)*image_height; x = (i-start_i-ui_series->columns*floor((i-start_i)/ui_series->columns))*image_width; if (amitk_objects_has_type(ui_series->objects, AMITK_OBJECT_TYPE_DATA_SET, FALSE)) { pixbuf = image_from_data_sets(NULL, &(ui_series->slice_cache), ui_series->max_slice_cache_size, ui_series->objects, ui_series->active_ds, temp_time+EPSILON*fabs(temp_time), temp_duration-EPSILON*fabs(temp_duration), temp_gate, ui_series->pixel_dim, view_volume, ui_series->fuse_type, AMITK_VIEW_MODE_SINGLE); if (ui_series->images[i-start_i] == NULL) ui_series->images[i-start_i] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(ui_series->canvas)), gnome_canvas_pixbuf_get_type(), "pixbuf", pixbuf, "x", x+UI_SERIES_L_MARGIN, "y", y+UI_SERIES_TOP_MARGIN, NULL); else gnome_canvas_item_set(ui_series->images[i-start_i], "pixbuf", pixbuf, NULL); g_object_unref(pixbuf); } /* draw the rest of the objects */ while (ui_series->items[i-start_i] != NULL) { /* first, delete the old objects */ item = ui_series->items[i-start_i]->data; ui_series->items[i-start_i] = g_list_remove(ui_series->items[i-start_i], item); gtk_object_destroy(GTK_OBJECT(item)); } /* add the new item to the canvas */ objects = ui_series->objects; while (objects != NULL) { if (AMITK_IS_FIDUCIAL_MARK(objects->data) || AMITK_IS_ROI(objects->data)) { if (AMITK_IS_DATA_SET(AMITK_OBJECT_PARENT(objects->data))) outline_color = amitk_color_table_outline_color(AMITK_DATA_SET_COLOR_TABLE(AMITK_OBJECT_PARENT(objects->data), AMITK_VIEW_MODE_SINGLE), TRUE); else outline_color = amitk_color_table_outline_color(AMITK_COLOR_TABLE_BW_LINEAR, TRUE); item = amitk_canvas_object_draw(GNOME_CANVAS(ui_series->canvas), view_volume, objects->data, AMITK_VIEW_MODE_SINGLE, NULL, ui_series->pixel_dim, ui_series->pixbuf_width, ui_series->pixbuf_height, x+UI_SERIES_L_MARGIN, y+UI_SERIES_TOP_MARGIN, outline_color, ui_series->roi_width, #ifdef AMIDE_LIBGNOMECANVAS_AA ui_series->roi_transparency #else ui_series->line_style, ui_series->fill_roi #endif ); if (item != NULL) ui_series->items[i-start_i] = g_list_append(ui_series->items[i-start_i], item); } objects = objects->next; } /* write the caption */ switch (ui_series->series_type) { case OVER_GATES: temp_string = g_strdup_printf("gate %d", temp_gate); break; case OVER_FRAMES: temp_string = g_strdup_printf("%2.1f-%2.1f s", temp_time, temp_time+temp_duration); break; case OVER_SPACE: default: temp_string = g_strdup_printf("%2.1f-%2.1f mm", temp_point.z, temp_point.z+AMITK_VOLUME_Z_CORNER(ui_series->volume)); break; } if (ui_series->captions[i-start_i] == NULL) ui_series->captions[i-start_i] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(ui_series->canvas)), gnome_canvas_text_get_type(), "justification", GTK_JUSTIFY_LEFT, "anchor", GTK_ANCHOR_NORTH_WEST, "text", temp_string, "x", x+UI_SERIES_L_MARGIN, "y", y+image_height-UI_SERIES_BOTTOM_MARGIN, "fill_color", "black", "font_desc", amitk_fixed_font_desc, NULL); else gnome_canvas_item_set(ui_series->captions[i-start_i], "text", temp_string, NULL); g_free(temp_string); can_continue = amitk_progress_dialog_set_fraction(AMITK_PROGRESS_DIALOG(ui_series->progress_dialog), (i-start_i)/((gdouble) ui_series->rows*ui_series->columns)); } amitk_object_unref(view_volume); return_val = FALSE; exit_update: amitk_progress_dialog_set_fraction(AMITK_PROGRESS_DIALOG(ui_series->progress_dialog), 2.0); /* hide progress dialog */ ui_common_remove_wait_cursor(ui_series->canvas); ui_series->idle_handler_id=0; ui_series->quit_generation=FALSE; ui_series->in_generation=FALSE; return return_val; } static void read_series_preferences(series_type_t * series_type, AmitkView * view) { *series_type = amide_gconf_get_int(GCONF_AMIDE_SERIES,"Type"); *view = amide_gconf_get_int(GCONF_AMIDE_SERIES,"View"); return; } /* function that sets up the series dialog */ void ui_series_create(AmitkStudy * study, AmitkObject * active_object, GList * selected_objects, AmitkPreferences * preferences) { ui_series_t * ui_series; GtkWindow * window; GtkWidget * window_vbox; gchar * title = NULL; GtkWidget * packing_table; GtkAdjustment * adjustment; GtkWidget * scale; amide_time_t min_duration; GList * temp_objects; guint num_data_sets = 0; guint total_data_set_frames=0; gint width, height; series_type_t series_type; AmitkView view; read_series_preferences(&series_type, &view); /* sanity checks */ g_return_if_fail(AMITK_IS_STUDY(study)); title = g_strdup_printf(_("Series: %s (%s - %s)"), AMITK_OBJECT_NAME(study), amitk_view_get_name(view), _(series_names[series_type])); window = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); gtk_window_set_title(window, title); g_free(title); gtk_window_set_resizable(window, TRUE); width = 0.5*gdk_screen_width(); height = 0.5*gdk_screen_height(); gtk_window_set_default_size(window, width, height); window_vbox = gtk_vbox_new(FALSE,0); gtk_container_add (GTK_CONTAINER (window), window_vbox); ui_series = ui_series_init(window, window_vbox); ui_series->preferences = g_object_ref(preferences); ui_series->series_type = series_type; #ifdef AMIDE_LIBGNOMECANVAS_AA ui_series->roi_transparency = AMITK_STUDY_CANVAS_ROI_TRANSPARENCY(study); #else ui_series->line_style = AMITK_STUDY_CANVAS_LINE_STYLE(study); ui_series->fill_roi = AMITK_STUDY_CANVAS_FILL_ROI(study); #endif ui_series->roi_width = AMITK_STUDY_CANVAS_ROI_WIDTH(study); ui_series->objects = amitk_objects_ref(selected_objects); if (ui_series->objects == NULL) { g_warning(_("Need selected objects to create a series")); ui_series_unref(ui_series); return; } if (active_object != NULL) if (AMITK_IS_DATA_SET(active_object)) ui_series->active_ds = amitk_object_ref(active_object); /* save a pointer to which object is active */ /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(ui_series->window), "delete_event", G_CALLBACK(delete_event_cb), ui_series); /* save the coordinate space of the series and some other parameters */ ui_series->volume = amitk_volume_new(); amitk_space_set_view_space(AMITK_SPACE(ui_series->volume), view, AMITK_STUDY_CANVAS_LAYOUT(study)); amitk_volumes_calc_display_volume(selected_objects, AMITK_SPACE(ui_series->volume), AMITK_STUDY_VIEW_CENTER(study), AMITK_STUDY_VIEW_THICKNESS(study), AMITK_STUDY_FOV(study), ui_series->volume); ui_series->fuse_type = AMITK_STUDY_FUSE_TYPE(study); ui_series->view_time = AMITK_STUDY_VIEW_START_TIME(study); min_duration = amitk_data_sets_get_min_frame_duration(ui_series->objects); ui_series->view_duration = (min_duration > AMITK_STUDY_VIEW_DURATION(study)) ? min_duration : AMITK_STUDY_VIEW_DURATION(study); ui_series->pixel_dim = (1/AMITK_STUDY_ZOOM(study)) * AMITK_STUDY_VOXEL_DIM(study); ui_series->pixbuf_width = ceil(AMITK_VOLUME_X_CORNER(ui_series->volume)/ui_series->pixel_dim); ui_series->pixbuf_height = ceil(AMITK_VOLUME_Y_CORNER(ui_series->volume)/ui_series->pixel_dim); /* count the number of data sets */ temp_objects = ui_series->objects; while (temp_objects != NULL) { if (AMITK_IS_DATA_SET(temp_objects->data)) { num_data_sets++; total_data_set_frames += AMITK_DATA_SET_NUM_FRAMES(temp_objects->data); } temp_objects = temp_objects->next; } /* do some initial calculations */ switch (ui_series->series_type) { case OVER_GATES: temp_objects = ui_series->objects; ui_series->num_gates = 1; while (temp_objects != NULL) { if (AMITK_IS_DATA_SET(temp_objects->data)) { if (AMITK_DATA_SET_NUM_GATES(temp_objects->data) > ui_series->num_gates) ui_series->num_gates = AMITK_DATA_SET_NUM_GATES(temp_objects->data); } temp_objects = temp_objects->next; } ui_series->num_slices = ui_series->num_gates; break; case OVER_FRAMES: { amide_time_t current_start = 0.0; amide_time_t last_start, current_end, temp_time; guint * frames; guint i; guint series_frame = 0; gboolean done; gboolean valid; if (num_data_sets == 0) { g_warning(_("Need selected data sets to generate a series of slices over time")); ui_series_unref(ui_series); return; } /* get space for the array that'll take care of which frame of which data set we're looking at*/ frames = g_try_new(guint,num_data_sets); if (frames == NULL) { g_warning(_("unable to allocate memory space for frames")); ui_series_unref(ui_series); return; } for (i=0;iframe_durations = g_try_new(amide_time_t,total_data_set_frames+2); if (ui_series->frame_durations == NULL) { g_warning(_("unable to allocate memory for frame durations")); g_free(frames); ui_series_unref(ui_series); return; } /* do the initial case */ temp_objects = ui_series->objects; i=0; valid = FALSE; while (temp_objects != NULL) { if (AMITK_IS_DATA_SET(temp_objects->data)) { if (AMITK_DATA_SET_NUM_FRAMES(temp_objects->data) != frames[i]) { temp_time = amitk_data_set_get_start_time(AMITK_DATA_SET(temp_objects->data), frames[i]); if (!valid) /* first valid data set */ { current_start = temp_time; valid = TRUE; } else if (temp_time < current_start) { current_start = temp_time; } } i++; } temp_objects = temp_objects->next; } ui_series->start_time = current_start; /* ignore any frames boundaries close to this one */ temp_objects = ui_series->objects; i=0; while (temp_objects != NULL) { if (AMITK_IS_DATA_SET(temp_objects->data)) { temp_time = amitk_data_set_get_start_time(AMITK_DATA_SET(temp_objects->data), frames[i]); if (REAL_EQUAL(ui_series->start_time, temp_time)) frames[i]++; i++; } temp_objects = temp_objects->next; } done = FALSE; last_start = ui_series->start_time; while (!done) { /* check if we're done */ temp_objects = ui_series->objects; i=0; done = TRUE; while (temp_objects != NULL) { if (AMITK_IS_DATA_SET(temp_objects->data)) { if (frames[i] != AMITK_DATA_SET_NUM_FRAMES(temp_objects->data)) done = FALSE; i++; } temp_objects = temp_objects->next; } if (!done) { /* check for the next earliest start time */ temp_objects = ui_series->objects; i=0; valid = FALSE; while (temp_objects != NULL) { if (AMITK_IS_DATA_SET(temp_objects->data)) { if (AMITK_DATA_SET_NUM_FRAMES(temp_objects->data) != frames[i]) { temp_time = amitk_data_set_get_start_time(AMITK_DATA_SET(temp_objects->data), frames[i]); if (!valid) /* first valid data set */ { current_start = temp_time; valid = TRUE; } else if (temp_time < current_start) { current_start = temp_time; } } i++; } temp_objects = temp_objects->next; } /* allright, found the next start time */ ui_series->frame_durations[series_frame] = current_start-last_start; series_frame++; last_start = current_start; /* and ignore any frames boundaries close to this one */ temp_objects = ui_series->objects; i=0; while (temp_objects != NULL) { if (AMITK_IS_DATA_SET(temp_objects->data)) { if (AMITK_DATA_SET_NUM_FRAMES(temp_objects->data) != frames[i]) { temp_time = amitk_data_set_get_start_time(AMITK_DATA_SET(temp_objects->data), frames[i]); if (REAL_EQUAL(current_start, temp_time)) frames[i]++; } i++; } temp_objects = temp_objects->next; } } } /* need to get the last frame */ temp_objects = ui_series->objects; i=0; current_end = amitk_data_set_get_end_time(temp_objects->data, frames[i]-1); temp_objects = temp_objects->next; i++; while (temp_objects != NULL) { if (AMITK_IS_DATA_SET(temp_objects->data)) { temp_time = amitk_data_set_get_end_time(AMITK_DATA_SET(temp_objects->data), frames[i]-1); if (temp_time > current_end) { current_end = temp_time; } i++; } temp_objects = temp_objects->next; } ui_series->frame_durations[series_frame] = current_end-last_start; series_frame++; /* save how many frames we'll need */ ui_series->num_slices = series_frame; /* garbage collection */ g_free(frames); /* figure out the view_frame */ temp_time = ui_series->start_time; for (i=0; inum_slices;i++) { if ((temp_time <= ui_series->view_time) && (ui_series->view_time < temp_time+ui_series->frame_durations[i])) ui_series->view_frame = i; temp_time += ui_series->frame_durations[i]; } } break; case OVER_SPACE: { AmitkCorners view_corners; amitk_volumes_get_enclosing_corners(ui_series->objects, AMITK_SPACE(ui_series->volume), view_corners); ui_series->start_z = view_corners[0].z; ui_series->end_z = view_corners[1].z; ui_series->num_slices = ceil((ui_series->end_z-ui_series->start_z)/AMITK_VOLUME_Z_CORNER(ui_series->volume)); } break; default: g_error("unexpected case in %s at line %d",__FILE__, __LINE__); break; } ui_series->max_slice_cache_size = ui_series->num_slices*num_data_sets+5; /* connect the thresholding and color table signals */ temp_objects = ui_series->objects; while (temp_objects != NULL) { if (AMITK_IS_DATA_SET(temp_objects->data)) { g_signal_connect(G_OBJECT(temp_objects->data), "thresholding_changed", G_CALLBACK(changed_cb), ui_series); g_signal_connect(G_OBJECT(temp_objects->data), "thresholds_changed", G_CALLBACK(changed_cb), ui_series); g_signal_connect(G_OBJECT(temp_objects->data), "color_table_changed", G_CALLBACK(color_table_changed_cb), ui_series); g_signal_connect(G_OBJECT(temp_objects->data), "invalidate_slice_cache", G_CALLBACK(data_set_invalidate_slice_cache), ui_series); g_signal_connect(G_OBJECT(temp_objects->data), "interpolation_changed", G_CALLBACK(changed_cb), ui_series); g_signal_connect(G_OBJECT(temp_objects->data), "rendering_changed", G_CALLBACK(changed_cb), ui_series); } g_signal_connect(G_OBJECT(temp_objects->data), "space_changed", G_CALLBACK(changed_cb), ui_series); temp_objects = temp_objects->next; } menus_toolbar_create(ui_series); /* setup the menu and toolbar */ /* make the widgets for this dialog box */ packing_table = gtk_table_new(1,2,FALSE); gtk_box_pack_start (GTK_BOX (ui_series->window_vbox), packing_table, TRUE,TRUE, 0); /* setup the canvas */ #ifdef AMIDE_LIBGNOMECANVAS_AA ui_series->canvas = gnome_canvas_new_aa(); #else ui_series->canvas = gnome_canvas_new(); #endif g_signal_connect(G_OBJECT(ui_series->canvas), "size_allocate", G_CALLBACK(canvas_size_change_cb), ui_series); gtk_table_attach(GTK_TABLE(packing_table), ui_series->canvas, 0,1,1,2, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); /* make a nice scroll bar */ adjustment = ui_series_create_scroll_adjustment(ui_series); scale = gtk_hscale_new(adjustment); if ((ui_series->series_type == OVER_FRAMES) || (ui_series->series_type == OVER_GATES)) gtk_scale_set_digits(GTK_SCALE(scale), 0); /* want integer for frames */ gtk_range_set_update_policy(GTK_RANGE(scale), GTK_UPDATE_DISCONTINUOUS); gtk_table_attach(GTK_TABLE(packing_table), GTK_WIDGET(scale), 0,1,0,1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(adjustment), "value_changed", G_CALLBACK(scroll_change_cb), ui_series); /* show all our widgets */ gtk_widget_show_all(GTK_WIDGET(ui_series->window)); amide_register_window((gpointer) ui_series->window); return; } static void init_series_type_cb(GtkWidget * widget, gpointer data); static void init_view_cb(GtkWidget * widget, gpointer data); static void init_series_type_cb(GtkWidget * widget, gpointer data) { amide_gconf_set_int(GCONF_AMIDE_SERIES,"Type", GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "series_type"))); return; } static void init_view_cb(GtkWidget * widget, gpointer data) { amide_gconf_set_int(GCONF_AMIDE_SERIES,"View", GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "view"))); return; } /* function to setup a dialog to allow us to choose options for the series */ GtkWidget * ui_series_init_dialog_create(AmitkStudy * study, GtkWindow * parent) { GtkWidget * dialog; gchar * temp_string; GtkWidget * table; guint table_row; GtkWidget * label; GtkWidget * radio_button[4]; GtkWidget * hseparator; GtkWidget * scrolled; GtkWidget * tree_view; series_type_t i_series_type; AmitkView i_view; series_type_t series_type; AmitkView view; read_series_preferences(&series_type, &view); temp_string = g_strdup_printf(_("%s: Series Initialization Dialog"), PACKAGE); dialog = gtk_dialog_new_with_buttons (temp_string, parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE, GTK_STOCK_EXECUTE, AMITK_RESPONSE_EXECUTE, NULL); gtk_window_set_title(GTK_WINDOW(dialog), temp_string); g_free(temp_string); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(ui_common_init_dialog_response_cb), NULL); gtk_container_set_border_width(GTK_CONTAINER(dialog), 10); /* start making the widgets for this dialog box */ table = gtk_table_new(7,3,FALSE); table_row=0; gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table); /* what series type do we want */ label = gtk_label_new(_("Series Type:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); for (i_series_type = 0; i_series_type < NUM_SERIES_TYPES; i_series_type++) { if (i_series_type == 0) radio_button[i_series_type] = gtk_radio_button_new_with_label(NULL, _(series_names[i_series_type])); else radio_button[i_series_type] = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button[0]), _(series_names[i_series_type])); gtk_widget_set_tooltip_text(radio_button[i_series_type], _(series_explanations[i_series_type])); gtk_table_attach(GTK_TABLE(table), radio_button[i_series_type], 1, 2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[i_series_type]), "series_type", GINT_TO_POINTER(i_series_type)); table_row++; } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[series_type]), TRUE); for (i_series_type = 0; i_series_type < NUM_SERIES_TYPES; i_series_type++) { g_signal_connect(G_OBJECT(radio_button[i_series_type]), "clicked", G_CALLBACK(init_series_type_cb), NULL); } hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(table), hseparator, 0,2, table_row, table_row+1,GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* what view type do we want */ label = gtk_label_new(_("View Type:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view++) { if (i_view == 0) radio_button[i_view] = gtk_radio_button_new_with_label(NULL, amitk_view_get_name(i_view)); else radio_button[i_view] = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button[0]), amitk_view_get_name(i_view)); gtk_table_attach(GTK_TABLE(table), radio_button[i_view], 1, 2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[i_view]), "view", GINT_TO_POINTER(i_view)); table_row++; } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[view]), TRUE); for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view++) { g_signal_connect(G_OBJECT(radio_button[i_view]), "clicked", G_CALLBACK(init_view_cb), NULL); } tree_view = amitk_tree_view_new(AMITK_TREE_VIEW_MODE_MULTIPLE_SELECTION,NULL, NULL); g_object_set_data(G_OBJECT(dialog), "tree_view", tree_view); amitk_tree_view_set_study(AMITK_TREE_VIEW(tree_view), study); amitk_tree_view_expand_object(AMITK_TREE_VIEW(tree_view), AMITK_OBJECT(study)); /* make a scrolled area for the tree */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,250,-1); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), tree_view); gtk_table_attach(GTK_TABLE(table), scrolled, 2,3, 0, table_row,GTK_FILL, GTK_FILL | GTK_EXPAND, X_PADDING, Y_PADDING); /* and show all our widgets */ gtk_widget_show_all(dialog); return dialog; } amide-1.0.5/src/Makefile.am0000644000175000017500000003247012271034451015274 0ustar loeningloeningif AMIDE_OS_WIN32 AMIDE_LDADD_WIN32 = -lwsock32 ../win32/amiderc.o AMIDE_LDFLAGS_WIN32 = -mwindows #INCLUDES = \ # -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" else AMIDE_LDADD_WIN32 = AMIDE_LDFLAGS_WIN32 = endif INCLUDES = \ -DAMIDE_PREFIX=\""$(prefix)"\" \ -DAMIDE_SYSCONFDIR=\""$(sysconfdir)"\" \ -DAMIDE_DATADIR=\""$(datadir)"\" \ -DAMIDE_LIBDIR=\""$(libdir)"\" ## -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ AM_CFLAGS = \ $(OPTIMIZATION_CFLAGS) \ $(GSL_CFLAGS) \ $(LIBFAME_CFLAGS) \ $(AMIDE_GTK_CFLAGS) \ $(AMIDE_DEBUG_CFLAGS) \ $(AMIDE_CHECK_OBSOLETE_CFLAGS) \ $(AMIDE_LIBDCMDATA_CFLAGS) \ -I/usr/local/include \ $(XMEDCON_CFLAGS) \ $(FFMPEG_CFLAGS) ## c++ gets the same includes AM_CXXFLAGS = $(AM_CFLAGS) bin_PROGRAMS = amide # for some reason, the -wsock32 added by AMIDE_LDADD_WIN32 on windows has # to be behind the DCMTK stuff amide_LDADD = \ $(GSL_LIBS) \ $(LIBFAME_LIBS) \ $(AMIDE_LIBECAT_LIBS) \ $(AMIDE_LIBVOLPACK_LIBS) \ $(AMIDE_GTK_LIBS) \ $(XMEDCON_LIBS) \ $(FFMPEG_LIBS) \ $(AMIDE_LIBDCMDATA_LIBS) \ $(AMIDE_LDADD_WIN32) ## 2007.10.28, gcc 3.4.4 the below may no longer be an issue, as ## xmedcon can now be glib2/gtk2 based. But haven't tested ## ## 2005.01.08, gcc 3.3.3 ## note, for some reason, if XMEDCON_LIBS is before AMIDE_GTK_LIBS, ## an executable is made that dumps core on startup.... ## this is probably because xmedcon is linked with glib 1.2... while ## amide needs glib 2.*, and something is clashing in name space amide_LDFLAGS = \ $(AMIDE_LDFLAGS_WIN32) amide_SOURCES = \ $(MARSHAL_SOURCES) \ $(TYPE_BUILTINS_SOURCES) \ $(AMITK_RAW_DATA_VARIABLE_H) \ $(AMITK_RAW_DATA_VARIABLE_C) \ $(AMITK_DATA_SET_VARIABLE_H) \ $(AMITK_DATA_SET_VARIABLE_C) \ $(AMITK_ROI_VARIABLE_H) \ $(AMITK_ROI_VARIABLE_C) \ $(AMITK_H_SOURCES) \ amide.h \ amide.c \ amide_intl.h \ amide_gconf.c \ amide_gconf.h \ amide_gnome.c \ amide_gnome.h \ amitk_common.c \ amitk_common.h \ amitk_canvas.c \ amitk_canvas_object.c \ amitk_color_table.c \ amitk_color_table_menu.c \ amitk_data_set.c \ amitk_dial.c \ amitk_fiducial_mark.c \ amitk_filter.c \ amitk_line_profile.c \ amitk_object.c \ amitk_object_dialog.c \ amitk_point.c \ amitk_preferences.c \ amitk_progress_dialog.c \ amitk_raw_data.c \ amitk_roi.c \ amitk_space.c \ amitk_space_edit.c \ amitk_study.c \ amitk_threshold.c \ amitk_tree_view.c \ amitk_volume.c \ amitk_window_edit.c \ alignment_mutual_information.c \ alignment_mutual_information.h \ alignment_procrustes.c \ alignment_procrustes.h \ analysis.c \ analysis.h \ dcmtk_interface.cc \ dcmtk_interface.h \ fads.c \ fads.h \ image.c \ image.h \ legacy.c \ legacy.h \ libecat_interface.c \ libecat_interface.h \ libmdc_interface.c \ libmdc_interface.h \ mpeg_encode.c \ mpeg_encode.h \ pixmaps.c \ pixmaps.h \ raw_data_import.c \ raw_data_import.h \ render.c \ render.h \ tb_alignment.c \ tb_alignment.h \ tb_crop.c \ tb_crop.h \ tb_distance.c \ tb_distance.h \ tb_export_data_set.c \ tb_export_data_set.h \ tb_fads.c \ tb_fads.h \ tb_filter.c \ tb_filter.h \ tb_fly_through.c \ tb_fly_through.h \ tb_math.c \ tb_math.h \ tb_profile.c \ tb_profile.h \ tb_roi_analysis.c \ tb_roi_analysis.h \ ui_common.c \ ui_common.h \ ui_gate_dialog.c \ ui_gate_dialog.h \ ui_preferences_dialog.c \ ui_preferences_dialog.h \ ui_render.c \ ui_render.h \ ui_render_dialog.c \ ui_render_dialog.h \ ui_render_movie.c \ ui_render_movie.h \ ui_series.c \ ui_series.h \ ui_study.c \ ui_study.h \ ui_study_cb.c \ ui_study_cb.h \ ui_time_dialog.c \ ui_time_dialog.h \ xml.c \ xml.h AMITK_H_SOURCES = \ amitk_canvas.h \ amitk_canvas_object.h \ amitk_color_table.h \ amitk_color_table_menu.h \ amitk_common.h \ amitk_dial.h \ amitk_data_set.h \ amitk_fiducial_mark.h \ amitk_filter.h \ amitk_line_profile.h \ amitk_object.h \ amitk_object_dialog.h \ amitk_point.h \ amitk_preferences.h \ amitk_progress_dialog.h \ amitk_raw_data.h \ amitk_roi.h \ amitk_space_edit.h \ amitk_space.h \ amitk_study.h \ amitk_threshold.h \ amitk_tree_view.h \ amitk_type.h \ amitk_volume.h \ amitk_window_edit.h AMITK_ROI_VARIABLE_C = \ amitk_roi_ELLIPSOID.c \ amitk_roi_CYLINDER.c \ amitk_roi_BOX.c \ amitk_roi_ISOCONTOUR_2D.c \ amitk_roi_ISOCONTOUR_3D.c \ amitk_roi_FREEHAND_2D.c \ amitk_roi_FREEHAND_3D.c AMITK_ROI_VARIABLE_H = \ amitk_roi_ELLIPSOID.h \ amitk_roi_CYLINDER.h \ amitk_roi_BOX.h \ amitk_roi_ISOCONTOUR_2D.h \ amitk_roi_ISOCONTOUR_3D.h \ amitk_roi_FREEHAND_2D.h \ amitk_roi_FREEHAND_3D.h AMITK_RAW_DATA_VARIABLE_C = \ amitk_raw_data_UBYTE.c \ amitk_raw_data_SBYTE.c \ amitk_raw_data_USHORT.c \ amitk_raw_data_SSHORT.c \ amitk_raw_data_UINT.c \ amitk_raw_data_SINT.c \ amitk_raw_data_FLOAT.c \ amitk_raw_data_DOUBLE.c AMITK_RAW_DATA_VARIABLE_H = \ amitk_raw_data_UBYTE.h \ amitk_raw_data_SBYTE.h \ amitk_raw_data_USHORT.h \ amitk_raw_data_SSHORT.h \ amitk_raw_data_UINT.h \ amitk_raw_data_SINT.h \ amitk_raw_data_FLOAT.h \ amitk_raw_data_DOUBLE.h AMITK_DATA_SET_VARIABLE_C = \ amitk_data_set_UBYTE_0D_SCALING.c \ amitk_data_set_UBYTE_1D_SCALING.c \ amitk_data_set_UBYTE_2D_SCALING.c \ amitk_data_set_SBYTE_0D_SCALING.c \ amitk_data_set_SBYTE_1D_SCALING.c \ amitk_data_set_SBYTE_2D_SCALING.c \ amitk_data_set_USHORT_0D_SCALING.c \ amitk_data_set_USHORT_1D_SCALING.c \ amitk_data_set_USHORT_2D_SCALING.c \ amitk_data_set_SSHORT_0D_SCALING.c \ amitk_data_set_SSHORT_1D_SCALING.c \ amitk_data_set_SSHORT_2D_SCALING.c \ amitk_data_set_UINT_0D_SCALING.c \ amitk_data_set_UINT_1D_SCALING.c \ amitk_data_set_UINT_2D_SCALING.c \ amitk_data_set_SINT_0D_SCALING.c \ amitk_data_set_SINT_1D_SCALING.c \ amitk_data_set_SINT_2D_SCALING.c \ amitk_data_set_FLOAT_0D_SCALING.c \ amitk_data_set_FLOAT_1D_SCALING.c \ amitk_data_set_FLOAT_2D_SCALING.c \ amitk_data_set_DOUBLE_0D_SCALING.c \ amitk_data_set_DOUBLE_1D_SCALING.c \ amitk_data_set_DOUBLE_2D_SCALING.c \ amitk_data_set_UBYTE_0D_SCALING_INTERCEPT.c \ amitk_data_set_UBYTE_1D_SCALING_INTERCEPT.c \ amitk_data_set_UBYTE_2D_SCALING_INTERCEPT.c \ amitk_data_set_SBYTE_0D_SCALING_INTERCEPT.c \ amitk_data_set_SBYTE_1D_SCALING_INTERCEPT.c \ amitk_data_set_SBYTE_2D_SCALING_INTERCEPT.c \ amitk_data_set_USHORT_0D_SCALING_INTERCEPT.c \ amitk_data_set_USHORT_1D_SCALING_INTERCEPT.c \ amitk_data_set_USHORT_2D_SCALING_INTERCEPT.c \ amitk_data_set_SSHORT_0D_SCALING_INTERCEPT.c \ amitk_data_set_SSHORT_1D_SCALING_INTERCEPT.c \ amitk_data_set_SSHORT_2D_SCALING_INTERCEPT.c \ amitk_data_set_UINT_0D_SCALING_INTERCEPT.c \ amitk_data_set_UINT_1D_SCALING_INTERCEPT.c \ amitk_data_set_UINT_2D_SCALING_INTERCEPT.c \ amitk_data_set_SINT_0D_SCALING_INTERCEPT.c \ amitk_data_set_SINT_1D_SCALING_INTERCEPT.c \ amitk_data_set_SINT_2D_SCALING_INTERCEPT.c \ amitk_data_set_FLOAT_0D_SCALING_INTERCEPT.c \ amitk_data_set_FLOAT_1D_SCALING_INTERCEPT.c \ amitk_data_set_FLOAT_2D_SCALING_INTERCEPT.c \ amitk_data_set_DOUBLE_0D_SCALING_INTERCEPT.c \ amitk_data_set_DOUBLE_1D_SCALING_INTERCEPT.c \ amitk_data_set_DOUBLE_2D_SCALING_INTERCEPT.c AMITK_DATA_SET_VARIABLE_H = \ amitk_data_set_UBYTE_0D_SCALING.h \ amitk_data_set_UBYTE_1D_SCALING.h \ amitk_data_set_UBYTE_2D_SCALING.h \ amitk_data_set_SBYTE_0D_SCALING.h \ amitk_data_set_SBYTE_1D_SCALING.h \ amitk_data_set_SBYTE_2D_SCALING.h \ amitk_data_set_USHORT_0D_SCALING.h \ amitk_data_set_USHORT_1D_SCALING.h \ amitk_data_set_USHORT_2D_SCALING.h \ amitk_data_set_SSHORT_0D_SCALING.h \ amitk_data_set_SSHORT_1D_SCALING.h \ amitk_data_set_SSHORT_2D_SCALING.h \ amitk_data_set_UINT_0D_SCALING.h \ amitk_data_set_UINT_1D_SCALING.h \ amitk_data_set_UINT_2D_SCALING.h \ amitk_data_set_SINT_0D_SCALING.h \ amitk_data_set_SINT_1D_SCALING.h \ amitk_data_set_SINT_2D_SCALING.h \ amitk_data_set_FLOAT_0D_SCALING.h \ amitk_data_set_FLOAT_1D_SCALING.h \ amitk_data_set_FLOAT_2D_SCALING.h \ amitk_data_set_DOUBLE_0D_SCALING.h \ amitk_data_set_DOUBLE_1D_SCALING.h \ amitk_data_set_DOUBLE_2D_SCALING.h VARIABLE_INPUT = \ variable_type.m4 AMITK_ROI_VARIABLE_C_SRC = amitk_roi_variable_type.c AMITK_ROI_VARIABLE_H_SRC = amitk_roi_variable_type.h AMITK_RAW_DATA_VARIABLE_C_SRC = amitk_raw_data_variable_type.c AMITK_RAW_DATA_VARIABLE_H_SRC = amitk_raw_data_variable_type.h AMITK_DATA_SET_VARIABLE_C_SRC = amitk_data_set_variable_type.c AMITK_DATA_SET_VARIABLE_H_SRC = amitk_data_set_variable_type.h $(AMITK_ROI_VARIABLE_H): $(VARIABLE_INPUT) $(AMITK_ROI_VARIABLE_H_SRC) @for i in $(AMITK_ROI_VARIABLE_H) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done $(AMITK_ROI_VARIABLE_C): $(VARIABLE_INPUT) $(AMITK_ROI_VARIABLE_C_SRC) $(AMITK_ROI_VARIABLE_H) @for i in $(AMITK_ROI_VARIABLE_C) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done $(AMITK_RAW_DATA_VARIABLE_C): $(VARIABLE_INPUT) $(AMITK_RAW_DATA_VARIABLE_C_SRC) $(AMITK_RAW_DATA_VARIABLE_H) @for i in $(AMITK_RAW_DATA_VARIABLE_C) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done $(AMITK_RAW_DATA_VARIABLE_H): $(VARIABLE_INPUT) $(AMITK_RAW_DATA_VARIABLE_H_SRC) @for i in $(AMITK_RAW_DATA_VARIABLE_H) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done $(AMITK_DATA_SET_VARIABLE_C): $(VARIABLE_INPUT) $(AMITK_DATA_SET_VARIABLE_C_SRC) $(AMITK_DATA_SET_VARIABLE_H) @for i in $(AMITK_DATA_SET_VARIABLE_C) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done $(AMITK_DATA_SET_VARIABLE_H): $(VARIABLE_INPUT) $(AMITK_DATA_SET_VARIABLE_H_SRC) @for i in $(AMITK_DATA_SET_VARIABLE_H) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done ## $(amide_la_OBJECTS): $(MARSHAL_SOURCES) ## BUILT_SOURCES = \ ## $(MARSHAL_SOURCES) \ ## $(TYPE_BUILTINS_SOURCES) \ MARSHAL_SOURCES = \ amitk_marshal.c \ amitk_marshal.h amitk_marshal.h: amitk_marshal.list $(GLIB_GENMARSHAL) $(GLIB_GENMARSHAL) $< --header --prefix=amitk_marshal > $@ amitk_marshal.c: amitk_marshal.list $(GLIB_GENMARSHAL) amitk_marshal.h $(GLIB_GENMARSHAL) $< --body --prefix=amitk_marshal > $@ TYPE_BUILTINS_SOURCES = \ amitk_type_builtins.h \ amitk_type_builtins.c TEMP_FILES = \ xgen-atbh \ xgen-atbc STAMP_FILES = \ stamp-amitk_type_builtins.h \ stamp-amitk_type_builtins.c ## fancy rebuild rules stolen from the Makefile.am from gtk-2.0 $(srcdir)/amitk_type_builtins.h: stamp-amitk_type_builtins.h $(AMITK_DATA_SET_VARIABLE_H) $(AMITK_RAW_DATA_VARIABLE_H) @true stamp-amitk_type_builtins.h: $(AMITK_H_SOURCES) Makefile ( cd $(srcdir) && glib-mkenums \ --fhead "#ifndef __AMITK_TYPE_BUILTINS_H__\n#define __AMITK_TYPE_BUILTINS_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ --fprod "/* enumerations from \"@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void);\n#define AMITK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ --ftail "G_END_DECLS\n\n#endif /* __AMITK_TYPE_BUILTINS_H__ */" \ $(AMITK_H_SOURCES)) >> xgen-atbh \ && (cmp -s xgen-atbh $(srcdir)/amitk_type_builtins.h || cp xgen-atbh $(srcdir)/amitk_type_builtins.h ) \ && rm -f xgen-atbh \ && echo timestamp > $(@F) $(srcdir)/amitk_type_builtins.c: stamp-amitk_type_builtins.c @true stamp-amitk_type_builtins.c: $(AMITK_H_SOURCES) Makefile amitk_type_builtins.h ( cd $(srcdir) && glib-mkenums \ --fhead "#include \n#include \"amide_config.h\"\n#include \"amitk_common.h\"\n#include \"amitk_canvas.h\"\n#include \"amitk_data_set.h\"\n#include \"amitk_filter.h\"\n#include \"amitk_object.h\"\n#include \"amitk_point.h\"\n#include \"amitk_raw_data.h\"\n#include \"amitk_roi.h\"\n#include \"amitk_space.h\"\n#include \"amitk_threshold.h\"\n#include \"amitk_tree_view.h\"\n" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ $(AMITK_H_SOURCES) ) > xgen-atbc \ && cp xgen-atbc $(srcdir)/amitk_type_builtins.c \ && rm -f xgen-atbc \ && echo timestamp > $(@F) CLEANFILES = \ $(AMITK_ROI_VARIABLE_C) \ $(AMITK_ROI_VARIABLE_H) \ $(AMITK_DATA_SET_VARIABLE_C) \ $(AMITK_DATA_SET_VARIABLE_H) \ $(AMITK_RAW_DATA_VARIABLE_C) \ $(AMITK_RAW_DATA_VARIABLE_H) \ $(MARSHAL_SOURCES) \ $(TYPE_BUILTINS_SOURCES) \ $(TEMP_FILES) \ $(STAMP_FILES) DISTCLEANFILES = *~ amide-1.0.5/src/tb_fads.h0000664000175000017500000000211112270274503015005 0ustar loeningloening/* tb_fads.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* includes always needed with this */ #include "amitk_data_set.h" #ifdef AMIDE_LIBGSL_SUPPORT /* external functions */ void tb_fads(AmitkDataSet * active_ds, AmitkPreferences * preferences, GtkWindow * parent); #endif amide-1.0.5/src/ui_study.c0000644000175000017500000021710712270306700015251 0ustar loeningloening/* ui_study.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include "image.h" #include "ui_common.h" #include "ui_study.h" #include "ui_study_cb.h" #include "ui_gate_dialog.h" #include "ui_time_dialog.h" #include "amitk_tree_view.h" #include "amitk_canvas.h" #include "amitk_threshold.h" #include "amitk_progress_dialog.h" #include "amitk_common.h" #include "libmdc_interface.h" #define HELP_INFO_LINE_HEIGHT 13 #define LEFT_COLUMN_WIDTH 350 /* internal variables */ static gchar * help_info_legends[NUM_HELP_INFO_LINES] = { N_("m1"), N_("shift-m1"), N_("m2"), N_("shift-m2"), N_("m3"), N_("shift-m3"), N_("ctrl-m3"), "variable_place_holder" }; enum { HELP_INFO_VARIABLE_LINE_CTRL_X, HELP_INFO_VARIABLE_LINE_SHIFT_CTRL_3, NUM_HELP_INFO_VARIABLE_LINES }; static gchar * help_info_variable_legend[NUM_HELP_INFO_VARIABLE_LINES] = { N_("ctrl-x"), N_("shift-m3") }; static gchar * help_info_lines[][NUM_HELP_INFO_LINES] = { {"", "", "", "", "", "", "", ""}, /* BLANK */ {N_("move view"), N_("shift data set"), N_("move view, min. depth"), "", N_("change depth"), N_("rotate data set"), N_("add fiducial mark"), ""}, /* DATA SET */ {N_("shift"), "", N_("scale"), "", N_("rotate"), "", N_("set data set inside roi to zero"), N_("set data set outside roi to zero")}, /*CANVAS_ROI */ {N_("shift"), "", "", "", "", "", "", ""}, /*CANVAS_FIDUCIAL_MARK */ {N_("move view"), "", N_("move view, min. depth"), "", N_("change depth"), N_("rotate study"), "", ""}, /* STUDY */ {N_("shift"), "", N_("enter draw mode"), "", N_("start isocontour change"), "", N_("set data set inside roi to zero"), N_("set data set outside roi to zero")}, /*CANVAS_ISOCONTOUR_ROI */ {N_("shift"), "", N_("enter draw mode"), "", "", "", N_("set data set inside roi to zero"), N_("set data set outside roi to zero")}, /*CANVAS_FREEHAND_ROI */ {N_("draw point"),N_("draw large point"), N_("leave draw mode"), "", N_("erase point"), N_("erase large point"), "", ""}, /* CANVAS_DRAWING_MODE */ {N_("move line"), "", "", "", N_("rotate line"), "", "", ""}, /* CANVAS_LINE_PROFILE */ {N_("draw - edge-to-edge"), "", N_("draw - center out"), "", "", "", "", ""}, /* CANVAS_NEW_ROI */ {N_("pick isocontour start point"), "", "", "", "", "", "", ""}, /* CANVAS_NEW_ISOCONTOUR_ROI */ {N_("pick freehand drawing start point"), "", "", "", "", "", "", ""}, /* CANVAS_NEW_FREEHAND_ROI */ {N_("cancel"), "", "", "", N_("pick new isocontour"), "", "", ""}, /*CANVAS CHANGE ISOCONTOUR */ {N_("cancel"), "", "", "", N_("shift"), "", "", ""}, /*CANVAS SHIFT OBJECT */ {N_("cancel"), "", "", "", N_("rotate"), "", "", ""}, /*CANVAS ROTATE OBJECT */ {N_("select data set"), "", N_("make active"), "", N_("pop up data set dialog"), N_("add roi"), N_("add fiducial mark"), N_("delete data set")}, /* TREE_DATA_SET */ {N_("select roi"), "", N_("center view on roi"), "", N_("pop up roi dialog"), "", "", N_("delete roi")}, /* TREE_ROI */ {N_("select point"), "", N_("center view on point"), "", N_("pop up point dialog"), "", "", N_("delete mark")}, /* TREE_FIDUCIAL_MARK */ {"", "", N_("make active"), "", N_("pop up study dialog"),N_("add roi"), "", ""}, /* TREE_STUDY */ {"", "", "", "", N_("add roi"),"", "", ""} /* TREE_NONE */ }; static void update_interpolation_and_rendering(ui_study_t * ui_study); static void object_selection_changed_cb(AmitkObject * object, gpointer ui_study); static void study_name_changed_cb(AmitkObject * object, gpointer ui_study); static void object_add_child_cb(AmitkObject * parent, AmitkObject * child, gpointer ui_study); static void object_remove_child_cb(AmitkObject * parent, AmitkObject * child, gpointer ui_study); static void add_object(ui_study_t * ui_study, AmitkObject * object); static void remove_object(ui_study_t * ui_study, AmitkObject * object); static void menus_toolbar_create(ui_study_t * ui_study); /* updates the settings of the interpolation radio button/rendering combo box, will not change canvas */ static void update_interpolation_and_rendering(ui_study_t * ui_study) { AmitkInterpolation i_interpolation; AmitkInterpolation interpolation; if (AMITK_IS_STUDY(ui_study->active_object)) { for (i_interpolation = 0; i_interpolation < AMITK_INTERPOLATION_NUM; i_interpolation++) gtk_action_set_sensitive(ui_study->interpolation_action[i_interpolation], FALSE); gtk_widget_set_sensitive(ui_study->rendering_menu, FALSE); } else if (AMITK_IS_DATA_SET(ui_study->active_object)) { for (i_interpolation = 0; i_interpolation < AMITK_INTERPOLATION_NUM; i_interpolation++) gtk_action_set_sensitive(ui_study->interpolation_action[i_interpolation], TRUE); gtk_widget_set_sensitive(ui_study->rendering_menu, TRUE); /* block signals, as we only want to change the value, it's up to the caller of this function to change anything on the actual canvases... we'll unblock at the end of this function */ for (i_interpolation = 0; i_interpolation < AMITK_INTERPOLATION_NUM; i_interpolation++) g_signal_handlers_block_by_func(G_OBJECT(ui_study->interpolation_action[i_interpolation]), G_CALLBACK(ui_study_cb_interpolation), ui_study); g_signal_handlers_block_by_func(G_OBJECT(ui_study->rendering_menu), G_CALLBACK(ui_study_cb_rendering), ui_study); interpolation = AMITK_DATA_SET_INTERPOLATION(ui_study->active_object); gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(ui_study->interpolation_action[interpolation]), TRUE); gtk_combo_box_set_active(GTK_COMBO_BOX(ui_study->rendering_menu), AMITK_DATA_SET_RENDERING(ui_study->active_object)); for (i_interpolation = 0; i_interpolation < AMITK_INTERPOLATION_NUM; i_interpolation++) g_signal_handlers_unblock_by_func(G_OBJECT(ui_study->interpolation_action[i_interpolation]), G_CALLBACK(ui_study_cb_interpolation), ui_study); g_signal_handlers_unblock_by_func(G_OBJECT(ui_study->rendering_menu), G_CALLBACK(ui_study_cb_rendering), ui_study); } } static void object_selection_changed_cb(AmitkObject * object, gpointer data) { ui_study_t * ui_study = data; if (AMITK_IS_DATA_SET(object)) { if (ui_study->time_dialog != NULL) ui_time_dialog_set_times(ui_study->time_dialog); if (AMITK_IS_STUDY(ui_study->active_object) && amitk_object_get_selected(object, AMITK_SELECTION_ANY)) ui_study_make_active_object(ui_study, object); } return; } static void study_name_changed_cb(AmitkObject * object, gpointer data) { ui_study_t * ui_study = data; if (AMITK_IS_STUDY(object)) { ui_study_update_title(ui_study); } return; } static void object_add_child_cb(AmitkObject * parent, AmitkObject * child, gpointer data ) { ui_study_t * ui_study = data; amide_real_t vox_size; g_return_if_fail(AMITK_IS_OBJECT(child)); add_object(ui_study, child); /* reset the view thickness if indicated */ if (AMITK_IS_DATA_SET(child)) { vox_size = amitk_data_sets_get_min_voxel_size(AMITK_OBJECT_CHILDREN(ui_study->study)); amitk_study_set_view_thickness(ui_study->study, vox_size); } return; } static void object_remove_child_cb(AmitkObject * parent, AmitkObject * child, gpointer data) { ui_study_t * ui_study = data; g_return_if_fail(AMITK_IS_OBJECT(child)); remove_object(ui_study, child); return; } static void add_object(ui_study_t * ui_study, AmitkObject * object) { GList * children; AmitkViewMode i_view_mode; AmitkView i_view; amitk_object_ref(object); /* add a reference */ if (AMITK_IS_STUDY(object)) { /* save a ref to a study object */ if (ui_study->study != NULL) remove_object(ui_study, AMITK_OBJECT(ui_study->study)); ui_study->study = AMITK_STUDY(object); ui_study->active_object = AMITK_OBJECT(ui_study->study); ui_study->study_virgin=FALSE; /* set any settings we can */ ui_study_update_thickness(ui_study, AMITK_STUDY_VIEW_THICKNESS(object)); ui_study_update_zoom(ui_study); ui_study_update_fov(ui_study); ui_study_update_canvas_target(ui_study); ui_study_update_title(ui_study); ui_study_update_time_button(ui_study); ui_study_update_layout(ui_study); ui_study_update_canvas_visible_buttons(ui_study); ui_study_update_fuse_type(ui_study); ui_study_update_view_mode(ui_study); amitk_tree_view_set_study(AMITK_TREE_VIEW(ui_study->tree_view), AMITK_STUDY(object)); amitk_tree_view_expand_object(AMITK_TREE_VIEW(ui_study->tree_view), object); for (i_view_mode = 0; i_view_mode <= AMITK_STUDY_VIEW_MODE(ui_study->study); i_view_mode++) for (i_view=0; i_view< AMITK_VIEW_NUM; i_view++) if (AMITK_STUDY_CANVAS_VISIBLE(object, i_view)) amitk_canvas_set_study(AMITK_CANVAS(ui_study->canvas[i_view_mode][i_view]), AMITK_STUDY(object)); g_signal_connect(G_OBJECT(object), "time_changed", G_CALLBACK(ui_study_cb_study_changed), ui_study); g_signal_connect(G_OBJECT(object), "filename_changed", G_CALLBACK(study_name_changed_cb), ui_study); g_signal_connect(G_OBJECT(object), "thickness_changed", G_CALLBACK(ui_study_cb_thickness_changed), ui_study); g_signal_connect(G_OBJECT(object), "object_name_changed", G_CALLBACK(study_name_changed_cb), ui_study); g_signal_connect(G_OBJECT(object), "canvas_visible_changed", G_CALLBACK(ui_study_cb_canvas_layout_changed), ui_study); g_signal_connect(G_OBJECT(object), "view_mode_changed", G_CALLBACK(ui_study_cb_canvas_layout_changed), ui_study); g_signal_connect(G_OBJECT(object), "canvas_target_changed", G_CALLBACK(ui_study_cb_study_changed), ui_study); g_signal_connect(G_OBJECT(object), "canvas_layout_preference_changed", G_CALLBACK(ui_study_cb_canvas_layout_changed), ui_study); g_signal_connect(G_OBJECT(object), "panel_layout_preference_changed", G_CALLBACK(ui_study_cb_canvas_layout_changed), ui_study); g_signal_connect(G_OBJECT(object), "voxel_dim_or_zoom_changed", G_CALLBACK(ui_study_cb_voxel_dim_or_zoom_changed), ui_study); g_signal_connect(G_OBJECT(object), "fov_changed", G_CALLBACK(ui_study_cb_fov_changed), ui_study); } else if (AMITK_IS_DATA_SET(object)) { amitk_tree_view_expand_object(AMITK_TREE_VIEW(ui_study->tree_view), AMITK_OBJECT_PARENT(object)); /* see if we should reset the study name */ if (AMITK_DATA_SET_SUBJECT_NAME(object) != NULL) amitk_study_suggest_name(ui_study->study, AMITK_DATA_SET_SUBJECT_NAME(object)); else amitk_study_suggest_name(ui_study->study, AMITK_OBJECT_NAME(object)); if (ui_study->study_altered != TRUE) { ui_study->study_altered=TRUE; ui_study->study_virgin=FALSE; ui_study_update_title(ui_study); } } g_signal_connect(G_OBJECT(object), "object_selection_changed", G_CALLBACK(object_selection_changed_cb), ui_study); g_signal_connect(G_OBJECT(object), "object_add_child", G_CALLBACK(object_add_child_cb), ui_study); g_signal_connect(G_OBJECT(object), "object_remove_child", G_CALLBACK(object_remove_child_cb), ui_study); /* add children */ children = AMITK_OBJECT_CHILDREN(object); while (children != NULL) { add_object(ui_study, children->data); children = children->next; } return; } static void remove_object(ui_study_t * ui_study, AmitkObject * object) { GList * children; /* recursive remove children */ children = AMITK_OBJECT_CHILDREN(object); while (children != NULL) { remove_object(ui_study, children->data); children = children->next; } /* disconnect the object's signals */ if (AMITK_IS_STUDY(object)) { g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(ui_study_cb_study_changed), ui_study); g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(ui_study_cb_thickness_changed), ui_study); g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(ui_study_cb_canvas_layout_changed), ui_study); g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(study_name_changed_cb), ui_study); } g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(object_selection_changed_cb), ui_study); g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(object_add_child_cb), ui_study); g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(object_remove_child_cb), ui_study); /* close down the object's dialog if it's up */ if (object->dialog != NULL) { gtk_widget_destroy(GTK_WIDGET(object->dialog)); object->dialog = NULL; } /* and unref */ amitk_object_unref(object); return; } static const GtkActionEntry normal_items[] = { /* Toplevel */ { "FileMenu", NULL, N_("_File") }, { "EditMenu", NULL, N_("_Edit") }, { "ViewMenu", NULL, N_("_View") }, { "ToolsMenu", NULL, N_("_Tools") }, { "HelpMenu", NULL, N_("_Help") }, /* submenus */ { "ImportSpecificMenu", NULL, N_("Import File (_specify)")}, //N_("Import an image data file into this study, specifying the import type"), { "ExportView", NULL, N_("_Export View")}, //N_("Export one of the views to a picture file") { "AddRoi", NULL, N_("Add _ROI")}, //N_("Add a new ROI"), #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) { "FlyThrough",NULL,N_("Generate _Fly Through")}, //N_("generate an mpeg fly through of the data sets") #endif /* FileMenu */ { "NewStudy", GTK_STOCK_NEW, N_("_New Study"), NULL, N_("Create a new study viewer window"), G_CALLBACK(ui_study_cb_new_study)}, { "OpenXIFFile", GTK_STOCK_OPEN, N_("_Open Study"), NULL, N_("Open a previously saved study (XIF file)"), G_CALLBACK(ui_study_cb_open_xif_file)}, { "SaveAsXIFFile", GTK_STOCK_SAVE_AS, N_("Save Study As"), NULL, N_("Save current study (as a XIF file)"), G_CALLBACK(ui_study_cb_save_as_xif_file)}, { "ImportGuess", NULL, N_("Import File (guess)"), NULL, N_("Import an image data file into this study, guessing at the file type"),G_CALLBACK(ui_study_cb_import)}, { "ImportObject", NULL, N_("Import _Object from Study"),NULL, N_("Import an object, such as an ROI, from a preexisting study (XIF file)"),G_CALLBACK(ui_study_cb_import_object_from_xif_file)}, { "ExportDataSet", NULL, N_("Export _Data Set"),NULL,N_("Export data set(s) to a medical image format"),G_CALLBACK(ui_study_cb_export_data_set)}, { "RecoverXIFFile", NULL, N_("_Recover Study"),NULL,N_("Try to recover a corrupted XIF file"),G_CALLBACK(ui_study_cb_recover_xif_file)}, { "OpenXIFDir", NULL, N_("Open XIF Directory"), NULL, N_("Open a study stored in XIF directory format"), G_CALLBACK(ui_study_cb_open_xif_dir)}, { "SaveAsXIFDir", NULL, N_("Save As XIF Drectory"), NULL, N_("Save a study in XIF directory format"), G_CALLBACK(ui_study_cb_save_as_xif_dir)}, { "ImportFromXIFDir", NULL, N_("Import from XIF Directory"),NULL, N_("Import an object, such as an ROI, from a preexisting XIF directory"),G_CALLBACK(ui_study_cb_import_object_from_xif_dir)}, { "Close", GTK_STOCK_CLOSE, NULL, "W", N_("Close the current study"), G_CALLBACK (ui_study_cb_close)}, { "Quit", GTK_STOCK_QUIT, NULL, "Q", N_("Quit AMIDE"), G_CALLBACK (ui_study_cb_quit)}, /* ExportView Submenu */ { "ExportViewTransverse", NULL, N_("_Transverse"),NULL,N_("Export the current transaxial view to an image file (JPEG/TIFF/PNG/etc.)"),G_CALLBACK(ui_study_cb_export_view)}, { "ExportViewCoronal",NULL, N_("_Coronal"),NULL,N_("Export the current coronal view to an image file (JPEG/TIFF/PNG/etc.)"),G_CALLBACK(ui_study_cb_export_view)}, { "ExportViewSagittal",NULL, N_("_Sagittal"),NULL,N_("Export the current sagittal view to an image file (JPEG/TIFF/PNG/etc.)"),G_CALLBACK(ui_study_cb_export_view)}, /* EditMenu */ { "AddFiducial", NULL, N_("Add _Fiducial Mark"),NULL,N_("Add a new fiducial mark to the active data set"),G_CALLBACK(ui_study_cb_add_fiducial_mark)}, { "Preferences", GTK_STOCK_PREFERENCES,NULL, NULL,NULL,G_CALLBACK(ui_study_cb_preferences)}, /* ViewMenu */ { "ViewSeries", NULL, N_("_Series"),NULL,N_("Look at a series of images"), G_CALLBACK(ui_study_cb_series)}, #if AMIDE_LIBVOLPACK_SUPPORT { "ViewRendering",NULL,N_("_Volume Rendering"),NULL,N_("perform a volume rendering on the currently selected objects"),G_CALLBACK(ui_study_cb_render)}, #endif /* ToolsMenu */ { "AlignmentWizard",NULL,N_("_Alignment Wizard"),NULL,N_("guides you throw the processing of alignment"),G_CALLBACK(ui_study_cb_alignment_selected)}, { "CropWizard",NULL,N_("_Crop Active Data Set"),NULL,N_("allows you to crop the active data set"),G_CALLBACK(ui_study_cb_crop_selected)}, { "DistanceWizard",NULL,N_("Distance Measurements"),NULL,N_("calculate distances between fiducial marks and ROIs"),G_CALLBACK(ui_study_cb_distance_selected)}, { "FactorAnalysisWizard", NULL,N_("_Factor Analysis"),NULL,N_("allows you to do factor analysis of dynamic data on the active data set"),G_CALLBACK(ui_study_cb_fads_selected)}, { "FilterWizard",NULL,N_("_Filter Active Data Set"),NULL,N_("allows you to filter the active data set"),G_CALLBACK(ui_study_cb_filter_selected)}, { "LineProfile",NULL,N_("Generate Line _Profile"),NULL,N_("allows generating a line profile between two fiducial marks"),G_CALLBACK(ui_study_cb_profile_selected)}, { "MathWizard",NULL,N_("Perform _Math on Data Set(s)"),NULL,N_("perform simple math operations on a data set or between data sets"),G_CALLBACK(ui_study_cb_data_set_math_selected)}, { "RoiStats",NULL,N_("Calculate _ROI Statistics"),NULL,N_("caculate ROI statistics"),G_CALLBACK(ui_study_cb_roi_statistics)}, /* Flythrough Submenu */ #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) { "FlyThroughTransverse",NULL,N_("_Transverse"),NULL,N_("Generate a fly through using transaxial slices"),G_CALLBACK(ui_study_cb_fly_through)}, { "FlyThroughCoronal",NULL,N_("_Coronal"),NULL,N_("Generate a fly through using coronal slices"),G_CALLBACK(ui_study_cb_fly_through)}, { "FlyThroughSagittal",NULL,N_("_Sagittal"),NULL,N_("Generate a fly through using sagittal slices"),G_CALLBACK(ui_study_cb_fly_through)}, #endif /* Toolbar items */ { "Thresholding", "amide_icon_thresholding", N_("_Threshold"),NULL,N_("Set the thresholds and colormaps for the active data set"), G_CALLBACK(ui_study_cb_thresholding)}, }; static const GtkRadioActionEntry interpolation_radio_entries[AMITK_INTERPOLATION_NUM] = { { "InterpolationNearestNeighbor", "amide_icon_interpolation_nearest_neighbor", N_("Near."), NULL, N_("interpolate using nearest neighbor (fast)"),AMITK_INTERPOLATION_NEAREST_NEIGHBOR}, { "InterpolationTrilinear", "amide_icon_interpolation_trilinear", N_("Tri."), NULL, N_("interpolate using trilinear interpolation (slow)"), AMITK_INTERPOLATION_TRILINEAR}, }; static const GtkRadioActionEntry fuse_type_radio_entries[AMITK_FUSE_TYPE_NUM] = { { "FuseTypeBlend", "amide_icon_fuse_type_blend", N_("Blend"), NULL, N_("blend all data sets"), AMITK_FUSE_TYPE_BLEND }, { "FuseTypeOverlay", "amide_icon_fuse_type_overlay", N_("Overlay"), NULL, N_("overlay active data set on blended data sets"),AMITK_FUSE_TYPE_OVERLAY }, }; static const GtkRadioActionEntry view_mode_radio_entries[AMITK_VIEW_MODE_NUM] = { { "CanvasViewModeSingle", "amide_icon_view_mode_single", N_("Single"), NULL, N_("All objects are shown in a single view"),AMITK_VIEW_MODE_SINGLE }, { "CanvasViewModeLinked2Way", "amide_icon_view_mode_linked_2way", N_("2-way"), NULL,N_("Objects are shown between 2 linked views"), AMITK_VIEW_MODE_LINKED_2WAY }, { "CanvasViewModeLinked3Way", "amide_icon_view_mode_linked_3way", N_("3-way"), NULL,N_("Objects are shown between 3 linked views"), AMITK_VIEW_MODE_LINKED_3WAY }, }; /* Toggle items */ static const GtkToggleActionEntry toggle_entries[] = { { "CanvasTarget", "amide_icon_canvas_target", N_("Target"), NULL, N_("Leave crosshairs on views"), G_CALLBACK(ui_study_cb_canvas_target), FALSE}, { "CanvasViewTransverse", "amide_icon_view_transverse", N_("Transverse"), NULL, N_("Enable transverse view"), G_CALLBACK(ui_study_cb_canvas_visible), FALSE}, { "CanvasViewCoronal", "amide_icon_view_coronal", N_("Coronal"), NULL, N_("Enable coronal view"), G_CALLBACK(ui_study_cb_canvas_visible), FALSE}, { "CanvasViewSagittal", "amide_icon_view_sagittal", N_("Sagittal"), NULL, N_("Enable sagittal view"), G_CALLBACK(ui_study_cb_canvas_visible), FALSE}, }; static const char *ui_description = "" " " " " " " " " " " " " " " " " /* filled in the function */ " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " /* filled in the function */ " " " " " " " " " " " " " " #if AMIDE_LIBVOLPACK_SUPPORT " " #endif " " " " " " " " " " " " " " #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) " " " " " " " " " " #endif " " " " " " " " HELP_MENU_UI_DESCRIPTION " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " /*" " */ /* " " */ " " ""; /* function to setup the menus for the study ui */ static void menus_toolbar_create(ui_study_t * ui_study) { GtkWidget *menubar; GtkWidget *toolbar; GtkActionGroup *action_group; GtkUIManager *ui_manager; GtkAccelGroup *accel_group; GError *error; GtkWidget * label; AmitkImportMethod i_import_method; AmitkRendering i_rendering; GtkAction * action; GtkWidget * menu; GtkWidget * submenu; GtkWidget * menu_item; #ifdef AMIDE_LIBMDC_SUPPORT libmdc_import_t i_libmdc_import; #endif AmitkRoiType i_roi_type; GtkObject * adjustment; GtkWidget * placeholder; g_assert(ui_study!=NULL); /* sanity check */ /* create an action group with all the menu actions */ action_group = gtk_action_group_new ("MenuActions"); gtk_action_group_set_translation_domain(action_group, GETTEXT_PACKAGE); gtk_action_group_add_actions(action_group, normal_items, G_N_ELEMENTS(normal_items),ui_study); gtk_action_group_add_actions(action_group, ui_common_help_menu_items, G_N_ELEMENTS(ui_common_help_menu_items),ui_study); gtk_action_group_add_toggle_actions(action_group, toggle_entries, G_N_ELEMENTS (toggle_entries), ui_study); gtk_action_group_add_radio_actions(action_group, interpolation_radio_entries, G_N_ELEMENTS (interpolation_radio_entries), 0, G_CALLBACK(ui_study_cb_interpolation), ui_study); gtk_action_group_add_radio_actions(action_group, fuse_type_radio_entries, G_N_ELEMENTS (fuse_type_radio_entries), 0, G_CALLBACK(ui_study_cb_fuse_type), ui_study); gtk_action_group_add_radio_actions(action_group, view_mode_radio_entries, G_N_ELEMENTS (view_mode_radio_entries), 0, G_CALLBACK(ui_study_cb_view_mode), ui_study); /* create the ui manager, and add the actions and accel's */ ui_manager = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); accel_group = gtk_ui_manager_get_accel_group (ui_manager); gtk_window_add_accel_group (ui_study->window, accel_group); /* create the actual menu/toolbar ui */ error = NULL; if (!gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, &error)) { g_warning ("%s: building menus failed in %s: %s", PACKAGE, __FILE__, error->message); g_error_free (error); return; } /* set additional info so we can tell the menus apart */ g_object_set_data(G_OBJECT(gtk_action_group_get_action (action_group, "ExportViewTransverse")), "view", GINT_TO_POINTER(AMITK_VIEW_TRANSVERSE)); g_object_set_data(G_OBJECT(gtk_action_group_get_action (action_group, "ExportViewCoronal")), "view", GINT_TO_POINTER(AMITK_VIEW_CORONAL)); g_object_set_data(G_OBJECT(gtk_action_group_get_action (action_group, "ExportViewSagittal")), "view", GINT_TO_POINTER(AMITK_VIEW_SAGITTAL)); #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) g_object_set_data(G_OBJECT(gtk_action_group_get_action (action_group, "FlyThroughTransverse")), "view", GINT_TO_POINTER(AMITK_VIEW_TRANSVERSE)); g_object_set_data(G_OBJECT(gtk_action_group_get_action (action_group, "FlyThroughCoronal")), "view", GINT_TO_POINTER(AMITK_VIEW_CORONAL)); g_object_set_data(G_OBJECT(gtk_action_group_get_action (action_group, "FlyThroughSagittal")), "view", GINT_TO_POINTER(AMITK_VIEW_SAGITTAL)); #endif /* build the import menu */ submenu = gtk_menu_new(); for (i_import_method = AMITK_IMPORT_METHOD_RAW; i_import_method < AMITK_IMPORT_METHOD_NUM; i_import_method++) { #ifdef AMIDE_LIBMDC_SUPPORT if (i_import_method == AMITK_IMPORT_METHOD_LIBMDC) { for (i_libmdc_import = 0; i_libmdc_import < LIBMDC_NUM_IMPORT_METHODS; i_libmdc_import++) { if (libmdc_supports(libmdc_import_to_format[i_libmdc_import])) { menu_item = gtk_menu_item_new_with_mnemonic(libmdc_import_menu_names[i_libmdc_import]); /* if tooltip support existed - libmdc_import_menu_explanations[i_libmdc_import] */ gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menu_item); g_object_set_data(G_OBJECT(menu_item), "method", GINT_TO_POINTER(i_import_method)); g_object_set_data(G_OBJECT(menu_item), "submethod", GINT_TO_POINTER(libmdc_import_to_format[i_libmdc_import])); g_signal_connect(G_OBJECT(menu_item), "activate", G_CALLBACK(ui_study_cb_import), ui_study); gtk_widget_show(menu_item); } } } else #endif { menu_item = gtk_menu_item_new_with_mnemonic(amitk_import_menu_names[i_import_method]); /* if tooltip support existed - amitk_import_menu_explanations[i_import_method] */ gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menu_item); g_object_set_data(G_OBJECT(menu_item), "method", GINT_TO_POINTER(i_import_method)); g_object_set_data(G_OBJECT(menu_item), "submethod", GINT_TO_POINTER(0)); g_signal_connect(G_OBJECT(menu_item), "activate", G_CALLBACK(ui_study_cb_import), ui_study); gtk_widget_show(menu_item); } } menu = gtk_ui_manager_get_widget(ui_manager, "ui/MainMenu/FileMenu/ImportSpecificMenu"); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu), submenu); gtk_widget_show(submenu); gtk_widget_show(menu); /* build the add roi menu */ submenu = gtk_menu_new(); for (i_roi_type=0; i_roi_typeinterpolation_action[AMITK_INTERPOLATION_NEAREST_NEIGHBOR] = gtk_action_group_get_action(action_group, "InterpolationNearestNeighbor"); ui_study->interpolation_action[AMITK_INTERPOLATION_TRILINEAR] = gtk_action_group_get_action(action_group, "InterpolationTrilinear"); g_assert(AMITK_INTERPOLATION_TRILINEAR+1 == AMITK_INTERPOLATION_NUM); /* make sure we handle all types */ ui_study->fuse_type_action[AMITK_FUSE_TYPE_BLEND] = gtk_action_group_get_action(action_group, "FuseTypeBlend"); ui_study->fuse_type_action[AMITK_FUSE_TYPE_OVERLAY] = gtk_action_group_get_action(action_group, "FuseTypeOverlay"); g_assert(AMITK_FUSE_TYPE_OVERLAY+1 == AMITK_FUSE_TYPE_NUM); /* make sure we handle all types */ ui_study->view_mode_action[AMITK_VIEW_MODE_SINGLE] = gtk_action_group_get_action(action_group, "CanvasViewModeSingle"); ui_study->view_mode_action[AMITK_VIEW_MODE_LINKED_2WAY] = gtk_action_group_get_action(action_group, "CanvasViewModeLinked2Way"); ui_study->view_mode_action[AMITK_VIEW_MODE_LINKED_3WAY] = gtk_action_group_get_action(action_group, "CanvasViewModeLinked3Way"); g_assert(AMITK_VIEW_MODE_LINKED_3WAY+1 == AMITK_VIEW_MODE_NUM); /* make sure we handle all types */ ui_study->canvas_target_action = gtk_action_group_get_action(action_group, "CanvasTarget"); action = gtk_action_group_get_action(action_group, "CanvasViewTransverse"); ui_study->canvas_visible_action[AMITK_VIEW_TRANSVERSE] = action; g_object_set_data(G_OBJECT(action), "view", GINT_TO_POINTER(AMITK_VIEW_TRANSVERSE)); action = gtk_action_group_get_action(action_group, "CanvasViewCoronal"); ui_study->canvas_visible_action[AMITK_VIEW_CORONAL] = action; g_object_set_data(G_OBJECT(action), "view", GINT_TO_POINTER(AMITK_VIEW_CORONAL)); action = gtk_action_group_get_action(action_group, "CanvasViewSagittal"); ui_study->canvas_visible_action[AMITK_VIEW_SAGITTAL] = action; g_object_set_data(G_OBJECT(action), "view", GINT_TO_POINTER(AMITK_VIEW_SAGITTAL)); /* pack in the menu and toolbar */ menubar = gtk_ui_manager_get_widget (ui_manager, "/MainMenu"); gtk_box_pack_start (GTK_BOX (ui_study->window_vbox), menubar, FALSE, FALSE, 0); toolbar = gtk_ui_manager_get_widget (ui_manager, "/ToolBar"); gtk_box_pack_start (GTK_BOX (ui_study->window_vbox), toolbar, FALSE, FALSE, 0); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS); gtk_toolbar_set_show_arrow(GTK_TOOLBAR(toolbar), FALSE); /* insert the rendering menu into the toolbar */ placeholder = gtk_ui_manager_get_widget (ui_manager, "/ToolBar/RenderingCombo"); ui_study->rendering_menu = gtk_combo_box_new_text(); /* gtk_widget_set_tooltip_text(ui_study->rendering_menu, _(amitk_rendering_explanation)); combo box's (as of 2.24 at least, don't have functioning tool tips */ for (i_rendering = 0; i_rendering < AMITK_RENDERING_NUM; i_rendering++) gtk_combo_box_append_text(GTK_COMBO_BOX(ui_study->rendering_menu), amitk_rendering_get_name(i_rendering)); g_signal_connect(G_OBJECT(ui_study->rendering_menu), "changed", G_CALLBACK(ui_study_cb_rendering), ui_study); ui_common_toolbar_insert_widget(toolbar, ui_study->rendering_menu, "", gtk_toolbar_get_item_index(GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(placeholder))); /* and finish off the rest of the toolbar */ /* starting with a separator for clarity */ ui_common_toolbar_append_separator(toolbar); /* add the zoom widget to our toolbar */ label = gtk_label_new(_("zoom:")); ui_common_toolbar_append_widget(toolbar, label, NULL); ui_study->zoom_spin = gtk_spin_button_new_with_range(AMIDE_LIMIT_ZOOM_LOWER, AMIDE_LIMIT_ZOOM_UPPER, AMIDE_LIMIT_ZOOM_STEP); gtk_widget_set_size_request(ui_study->zoom_spin, 50,-1); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(ui_study->zoom_spin), 3); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(ui_study->zoom_spin),FALSE); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(ui_study->zoom_spin), FALSE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(ui_study->zoom_spin), FALSE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(ui_study->zoom_spin), GTK_UPDATE_ALWAYS); g_signal_connect(G_OBJECT(ui_study->zoom_spin), "value_changed",G_CALLBACK(ui_study_cb_zoom), ui_study); g_signal_connect(G_OBJECT(ui_study->zoom_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); g_signal_connect(G_OBJECT(ui_study->zoom_spin), "button_press_event", G_CALLBACK(amitk_spin_button_discard_double_or_triple_click), NULL); ui_common_toolbar_append_widget(toolbar,ui_study->zoom_spin,_("specify how much to magnify the images")); /* a separator for clarity */ ui_common_toolbar_append_separator(toolbar); /* add the field of view widget to our toolbar */ label = gtk_label_new(_("fov (%):")); ui_common_toolbar_append_widget(toolbar, label, NULL); ui_study->fov_spin = gtk_spin_button_new_with_range(AMIDE_LIMIT_FOV_LOWER, AMIDE_LIMIT_FOV_UPPER, AMIDE_LIMIT_FOV_STEP); gtk_widget_set_size_request(ui_study->fov_spin, 50,-1); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(ui_study->fov_spin), 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(ui_study->fov_spin),FALSE); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(ui_study->fov_spin), FALSE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(ui_study->fov_spin), FALSE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(ui_study->fov_spin), GTK_UPDATE_ALWAYS); g_signal_connect(G_OBJECT(ui_study->fov_spin), "value_changed", G_CALLBACK(ui_study_cb_fov), ui_study); g_signal_connect(G_OBJECT(ui_study->fov_spin), "button_press_event", G_CALLBACK(amitk_spin_button_discard_double_or_triple_click), NULL); ui_common_toolbar_append_widget(toolbar,ui_study->fov_spin,_("specify how much of the image field of view to display")); /* a separator for clarity */ ui_common_toolbar_append_separator(toolbar); /* add the slice thickness selector */ label = gtk_label_new(_("thickness (mm):")); ui_common_toolbar_append_widget(toolbar, label, NULL); adjustment = gtk_adjustment_new(1.0, 0.2, G_MAXDOUBLE, 0.2, 0.2, 0.0); ui_study->thickness_spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjustment),1.0, 3); gtk_widget_set_size_request (ui_study->thickness_spin, 60, -1); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(ui_study->thickness_spin),FALSE); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(ui_study->thickness_spin), FALSE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(ui_study->thickness_spin), FALSE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(ui_study->thickness_spin), GTK_UPDATE_ALWAYS); g_signal_connect(G_OBJECT(ui_study->thickness_spin), "value_changed", G_CALLBACK(ui_study_cb_thickness), ui_study); g_signal_connect(G_OBJECT(ui_study->thickness_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); g_signal_connect(G_OBJECT(ui_study->thickness_spin), "button_press_event", G_CALLBACK(amitk_spin_button_discard_double_or_triple_click), NULL); ui_common_toolbar_append_widget(toolbar,ui_study->thickness_spin,_("specify how thick to make the slices (mm)")); /* a separator for clarity */ ui_common_toolbar_append_separator(toolbar); /* gate */ /* note, can't use gtk_tool_button, as no way to set the relief in gtk 2.10, and the default is no relief so you can't tell that it's a button.... - */ label = gtk_label_new(_("gate:")); ui_common_toolbar_append_widget(toolbar, label, NULL); ui_study->gate_button = gtk_button_new_with_label("?"); g_signal_connect(G_OBJECT(ui_study->gate_button), "clicked", G_CALLBACK(ui_study_cb_gate), ui_study); ui_common_toolbar_append_widget(toolbar, ui_study->gate_button, _("the gate range over which to view the data")); /* a separator for clarity */ ui_common_toolbar_append_separator(toolbar); /* frame selector */ label = gtk_label_new(_("time:")); ui_common_toolbar_append_widget(toolbar, label, NULL); ui_study->time_button = gtk_button_new_with_label("?"); g_signal_connect(G_OBJECT(ui_study->time_button), "clicked", G_CALLBACK(ui_study_cb_time), ui_study); ui_common_toolbar_append_widget(toolbar, ui_study->time_button, _("the time range over which to view the data (s)")); return; } /* destroy a ui_study data structure */ ui_study_t * ui_study_free(ui_study_t * ui_study) { gboolean return_val; if (ui_study == NULL) return ui_study; /* sanity checks */ g_return_val_if_fail(ui_study->reference_count > 0, NULL); /* remove a reference count */ ui_study->reference_count--; /* if we've removed all reference's, free the structure */ if (ui_study->reference_count == 0) { /* these two lines forces any remaining spin button updates, so that we don't call any spin button callbacks with invalid data */ gtk_widget_grab_focus(GTK_WIDGET(ui_study->window)); while (gtk_events_pending()) gtk_main_iteration(); #ifdef AMIDE_DEBUG g_print("freeing ui_study\n"); #endif if (ui_study->study != NULL) { remove_object(ui_study, AMITK_OBJECT(ui_study->study)); ui_study->study = NULL; } if (ui_study->progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(ui_study->progress_dialog), "delete_event", NULL, &return_val); ui_study->progress_dialog = NULL; } if (ui_study->preferences != NULL) { g_object_unref(ui_study->preferences); ui_study->preferences = NULL; } g_free(ui_study); ui_study = NULL; } return ui_study; } /* allocate and initialize a ui_study data structure */ ui_study_t * ui_study_init(AmitkPreferences * preferences) { ui_study_t * ui_study; AmitkViewMode i_view_mode; AmitkView i_view; help_info_line_t i_line; /* alloc space for the data structure for passing ui info */ ui_study = g_try_new(ui_study_t,1); g_return_val_if_fail(ui_study != NULL, NULL); ui_study->reference_count = 1; ui_study->study = NULL; ui_study->threshold_dialog = NULL; ui_study->gate_dialog = NULL; ui_study->time_dialog = NULL; ui_study->thickness_spin = NULL; ui_study->active_object = NULL; for (i_view_mode=0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) { ui_study->canvas_table[i_view_mode] = NULL; for (i_view=0; i_view < AMITK_VIEW_NUM; i_view++) { ui_study->canvas[i_view_mode][i_view] = NULL; } } ui_study->study_altered=FALSE; ui_study->study_virgin=TRUE; for (i_line=0 ;i_line < NUM_HELP_INFO_LINES;i_line++) { ui_study->help_line[i_line] = NULL; ui_study->help_legend[i_line] = NULL; } ui_study->preferences = g_object_ref(preferences); return ui_study; } /* if object is NULL, it'll do its best guess */ void ui_study_make_active_object(ui_study_t * ui_study, AmitkObject * object) { AmitkView i_view; GList * current_objects; AmitkViewMode i_view_mode; g_return_if_fail(ui_study->study != NULL); g_return_if_fail(ui_study->active_object != NULL); if (AMITK_IS_DATA_SET(ui_study->active_object)) { g_signal_handlers_disconnect_by_func(G_OBJECT(ui_study->active_object), G_CALLBACK(update_interpolation_and_rendering), ui_study); g_signal_handlers_disconnect_by_func(G_OBJECT(ui_study->active_object), G_CALLBACK(ui_study_update_gate_button), ui_study); } ui_study->active_object = object; if (object == NULL) { /* guessing */ /* find visible data set to make active object */ for (i_view_mode = 0; (i_view_mode <= AMITK_STUDY_VIEW_MODE(ui_study->study)) && (ui_study->active_object == NULL); i_view_mode++) { current_objects = amitk_object_get_selected_children_of_type(AMITK_OBJECT(ui_study->study), AMITK_OBJECT_TYPE_DATA_SET, AMITK_VIEW_MODE_SINGLE+i_view_mode, TRUE); if (current_objects != NULL) { ui_study->active_object = AMITK_OBJECT(current_objects->data); amitk_objects_unref(current_objects); } } if (ui_study->active_object == NULL) /* study as backup */ ui_study->active_object = AMITK_OBJECT(ui_study->study); } /* indicate this is now the active object */ amitk_tree_view_set_active_object(AMITK_TREE_VIEW(ui_study->tree_view), ui_study->active_object); /* connect any needed signals */ if (AMITK_IS_DATA_SET(ui_study->active_object)) { g_signal_connect_swapped(G_OBJECT(ui_study->active_object), "interpolation_changed", G_CALLBACK(update_interpolation_and_rendering), ui_study); g_signal_connect_swapped(G_OBJECT(ui_study->active_object), "rendering_changed", G_CALLBACK(update_interpolation_and_rendering), ui_study); g_signal_connect_swapped(G_OBJECT(ui_study->active_object), "view_gates_changed", G_CALLBACK(ui_study_update_gate_button), ui_study); } update_interpolation_and_rendering(ui_study); for (i_view_mode = 0; i_view_mode <= AMITK_STUDY_VIEW_MODE(ui_study->study); i_view_mode++) for (i_view=0; i_view< AMITK_VIEW_NUM; i_view++) if (ui_study->canvas[i_view_mode][i_view] != NULL) amitk_canvas_set_active_object(AMITK_CANVAS(ui_study->canvas[i_view_mode][i_view]), ui_study->active_object); /* reset the threshold widget based on the current data set */ if (ui_study->threshold_dialog != NULL) { if (AMITK_IS_STUDY(ui_study->active_object)) { gtk_widget_destroy(ui_study->threshold_dialog); ui_study->threshold_dialog = NULL; } else if (AMITK_IS_DATA_SET(ui_study->active_object)) { amitk_threshold_dialog_new_data_set(AMITK_THRESHOLD_DIALOG(ui_study->threshold_dialog), AMITK_DATA_SET(ui_study->active_object)); } } if (ui_study->gate_dialog != NULL) { if (AMITK_IS_DATA_SET(ui_study->active_object)) ui_gate_dialog_set_active_data_set(ui_study->gate_dialog, AMITK_DATA_SET(ui_study->active_object)); else ui_gate_dialog_set_active_data_set(ui_study->gate_dialog, NULL); } ui_study_update_gate_button(ui_study); } /* function for adding a fiducial mark */ void ui_study_add_fiducial_mark(ui_study_t * ui_study, AmitkObject * parent_object, gboolean selected, AmitkPoint position) { GtkWidget * dialog; gint return_val; AmitkFiducialMark * new_pt=NULL; gchar * temp_string; gchar * return_str=NULL; g_return_if_fail(AMITK_IS_OBJECT(parent_object)); temp_string = g_strdup_printf(_("Adding fiducial mark for data set: %s\nEnter the mark's name:"), AMITK_OBJECT_NAME(parent_object)); dialog = ui_common_entry_dialog(ui_study->window, temp_string, &return_str); return_val = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_free(temp_string); if (return_val == GTK_RESPONSE_OK) { new_pt = amitk_fiducial_mark_new(); amitk_space_copy_in_place(AMITK_SPACE(new_pt), AMITK_SPACE(parent_object)); amitk_fiducial_mark_set(new_pt, position); amitk_object_set_name(AMITK_OBJECT(new_pt), return_str); amitk_object_add_child(AMITK_OBJECT(parent_object), AMITK_OBJECT(new_pt)); amitk_tree_view_expand_object(AMITK_TREE_VIEW(ui_study->tree_view), AMITK_OBJECT(parent_object)); amitk_object_unref(new_pt); /* don't want an extra ref */ if (selected) amitk_object_set_selected(AMITK_OBJECT(new_pt), TRUE, AMITK_SELECTION_SELECTED_0); if (ui_study->study_altered != TRUE) { ui_study->study_virgin=FALSE; ui_study->study_altered=TRUE; ui_study_update_title(ui_study); } } if (return_str != NULL) g_free(return_str); return; } void ui_study_add_roi(ui_study_t * ui_study, AmitkObject * parent_object, AmitkRoiType roi_type) { GtkWidget * dialog; gint return_val; AmitkRoi * roi; gchar * temp_string; gchar * return_str=NULL; AmitkViewMode i_view_mode; g_return_if_fail(AMITK_IS_OBJECT(parent_object)); temp_string = g_strdup_printf(_("Adding ROI to: %s\nEnter ROI Name:"), AMITK_OBJECT_NAME(parent_object)); dialog = ui_common_entry_dialog(ui_study->window, temp_string, &return_str); return_val = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_free(temp_string); if (return_val == GTK_RESPONSE_OK) { roi = amitk_roi_new(roi_type); amitk_object_set_name(AMITK_OBJECT(roi), return_str); amitk_object_add_child(parent_object, AMITK_OBJECT(roi)); amitk_object_unref(roi); /* don't want an extra ref */ if (AMITK_ROI_UNDRAWN(roi)) /* undrawn roi's selected to begin with*/ for (i_view_mode = 0; i_view_mode <= AMITK_STUDY_VIEW_MODE(ui_study->study); i_view_mode++) amitk_object_set_selected(AMITK_OBJECT(roi), TRUE, i_view_mode); if (ui_study->study_altered != TRUE) { ui_study->study_altered=TRUE; ui_study->study_virgin=FALSE; ui_study_update_title(ui_study); } } if (return_str != NULL) g_free(return_str); return; } void ui_study_update_canvas_visible_buttons(ui_study_t * ui_study) { AmitkView i_view; for (i_view=0; i_view < AMITK_VIEW_NUM; i_view++) { g_signal_handlers_block_by_func(G_OBJECT(ui_study->canvas_visible_action[i_view]), G_CALLBACK(ui_study_cb_canvas_visible), ui_study); gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(ui_study->canvas_visible_action[i_view]), AMITK_STUDY_CANVAS_VISIBLE(ui_study->study, i_view)); g_signal_handlers_unblock_by_func(G_OBJECT(ui_study->canvas_visible_action[i_view]), G_CALLBACK(ui_study_cb_canvas_visible), ui_study); } return; } /* function to update the text in the gate dialog popup widget */ void ui_study_update_gate_button(ui_study_t * ui_study) { gchar * temp_string; if (AMITK_IS_DATA_SET(ui_study->active_object)) temp_string = g_strdup_printf(_("%d-%d"), AMITK_DATA_SET_VIEW_START_GATE(ui_study->active_object), AMITK_DATA_SET_VIEW_END_GATE(ui_study->active_object)); else temp_string = g_strdup_printf(_("N/A")); gtk_button_set_label(GTK_BUTTON(ui_study->gate_button),temp_string); g_free(temp_string); return; } /* function to update the text in the time dialog popup widget */ void ui_study_update_time_button(ui_study_t * ui_study) { gchar * temp_string; temp_string = g_strdup_printf(_("%g-%g s"), AMITK_STUDY_VIEW_START_TIME(ui_study->study), AMITK_STUDY_VIEW_START_TIME(ui_study->study)+ AMITK_STUDY_VIEW_DURATION(ui_study->study)); gtk_button_set_label(GTK_BUTTON(ui_study->time_button),temp_string); g_free(temp_string); return; } /* This function updates the little info box which tells us what the different mouse buttons will do */ void ui_study_update_help_info(ui_study_t * ui_study, AmitkHelpInfo which_info, AmitkPoint point, amide_data_t value) { help_info_line_t i_line; gchar * location_text[2]; gchar * legend; AmitkPoint location_p; gchar * help_info_line; /* put up the help lines... except for the given info types, in which case we leave the last one displayed up */ if ((which_info != AMITK_HELP_INFO_UPDATE_LOCATION) && (which_info != AMITK_HELP_INFO_UPDATE_SHIFT) && (which_info != AMITK_HELP_INFO_UPDATE_THETA)) { for (i_line=0; i_line < HELP_INFO_LINE_BLANK;i_line++) { /* the line's legend */ if (strlen(help_info_lines[which_info][i_line]) > 0) { if (i_line == HELP_INFO_LINE_VARIABLE) { if ((which_info == AMITK_HELP_INFO_CANVAS_ROI) || (which_info == AMITK_HELP_INFO_CANVAS_ISOCONTOUR_ROI) || (which_info == AMITK_HELP_INFO_CANVAS_FREEHAND_ROI)) { legend = _(help_info_variable_legend[HELP_INFO_VARIABLE_LINE_SHIFT_CTRL_3]); } else { legend = _(help_info_variable_legend[HELP_INFO_VARIABLE_LINE_CTRL_X]); } } else { legend = _(help_info_legends[i_line]); } } else { legend = ""; } if (ui_study->help_legend[i_line] == NULL) ui_study->help_legend[i_line] = gnome_canvas_item_new(gnome_canvas_root(ui_study->help_info), gnome_canvas_text_get_type(), "justification", GTK_JUSTIFY_RIGHT, "anchor", GTK_ANCHOR_NORTH_EAST, "text", legend, "x", (gdouble) 55.0, "y", (gdouble) (i_line*HELP_INFO_LINE_HEIGHT), "fill_color", "black", "font_desc", amitk_fixed_font_desc, NULL); else /* just need to change the text */ gnome_canvas_item_set(ui_study->help_legend[i_line], "text", legend, NULL); /* gettext can't handle "" */ if (g_strcmp0(help_info_lines[which_info][i_line],"") != 0) help_info_line = _(help_info_lines[which_info][i_line]); else help_info_line = help_info_lines[which_info][i_line]; /* and the button info */ if (ui_study->help_line[i_line] == NULL) ui_study->help_line[i_line] = gnome_canvas_item_new(gnome_canvas_root(ui_study->help_info), gnome_canvas_text_get_type(), "justification", GTK_JUSTIFY_LEFT, "anchor", GTK_ANCHOR_NORTH_WEST, "text", help_info_line, "x", (gdouble) 65.0, "y", (gdouble) (i_line*HELP_INFO_LINE_HEIGHT), "fill_color", "black", "font_desc", amitk_fixed_font_desc, NULL); else /* just need to change the text */ gnome_canvas_item_set(ui_study->help_line[i_line], "text", help_info_line, NULL); } } /* update the location information */ if ((which_info == AMITK_HELP_INFO_UPDATE_LOCATION) || (which_info == AMITK_HELP_INFO_CANVAS_DRAWING_MODE)) { location_text[0] = g_strdup_printf(_("[x,y,z] = [% 5.2f,% 5.2f,% 5.2f] mm"), point.x, point.y, point.z); if (!isnan(value)) location_text[1] = g_strdup_printf(_("value = % 5.3g"), value); else location_text[1] = g_strdup_printf(_("value = none")); } else if (which_info == AMITK_HELP_INFO_UPDATE_SHIFT) { location_text[0] = g_strdup_printf(_("shift (x,y,z) =")); location_text[1] = g_strdup_printf(_("[% 5.2f,% 5.2f,% 5.2f] mm"), point.x, point.y, point.z); } else if (which_info == AMITK_HELP_INFO_UPDATE_THETA) { location_text[0] = g_strdup(""); location_text[1] = g_strdup_printf(_("theta = % 5.3f degrees"), value); } else { location_p = AMITK_STUDY_VIEW_CENTER(ui_study->study); location_text[0] = g_strdup_printf(_("view center (x,y,z) =")); location_text[1] = g_strdup_printf(_("[% 5.2f,% 5.2f,% 5.2f] mm"), location_p.x, location_p.y, location_p.z); } /* update the location display */ for (i_line=HELP_INFO_LINE_LOCATION1; i_line <= HELP_INFO_LINE_LOCATION2;i_line++) { if (ui_study->help_line[i_line] == NULL) ui_study->help_line[i_line] = gnome_canvas_item_new(gnome_canvas_root(ui_study->help_info), gnome_canvas_text_get_type(), "justification", GTK_JUSTIFY_LEFT, "anchor", GTK_ANCHOR_NORTH_WEST, "text", location_text[i_line-HELP_INFO_LINE_LOCATION1], "x", (gdouble) 2.0, "y", (gdouble) (i_line*HELP_INFO_LINE_HEIGHT), "fill_color", "black", "font_desc", amitk_fixed_font_desc, NULL); else /* just need to change the text */ gnome_canvas_item_set(ui_study->help_line[i_line], "text", location_text[i_line-HELP_INFO_LINE_LOCATION1], NULL); g_free(location_text[i_line-HELP_INFO_LINE_LOCATION1]); } return; } /* updates the settings of the thickness spin button, will not change anything about the canvas */ void ui_study_update_thickness(ui_study_t * ui_study, amide_real_t thickness) { amide_real_t min_voxel_size, max_size; /* there's no spin button if we don't create the toolbar at this moment */ if (ui_study->thickness_spin == NULL) return; min_voxel_size = amitk_data_sets_get_min_voxel_size(AMITK_OBJECT_CHILDREN(ui_study->study)); max_size = amitk_volumes_get_max_size(AMITK_OBJECT_CHILDREN(ui_study->study)); if ((min_voxel_size < 0) || (max_size < 0)) return; /* no valid objects */ /* block signals to the spin button, as we only want to change the value of the spin button, it's up to the caller of this function to change anything on the actual canvases... we'll unblock at the end of this function */ g_signal_handlers_block_by_func(G_OBJECT(ui_study->thickness_spin), G_CALLBACK(ui_study_cb_thickness), ui_study); /* set the current thickness if it hasn't already been set or if it's no longer valid*/ if (thickness < min_voxel_size) thickness = min_voxel_size; gtk_spin_button_set_value(GTK_SPIN_BUTTON(ui_study->thickness_spin), thickness); gtk_spin_button_set_increments(GTK_SPIN_BUTTON(ui_study->thickness_spin), min_voxel_size, min_voxel_size); gtk_spin_button_set_range(GTK_SPIN_BUTTON(ui_study->thickness_spin), min_voxel_size, max_size); gtk_spin_button_configure(GTK_SPIN_BUTTON(ui_study->thickness_spin),NULL, thickness, gtk_spin_button_get_digits(GTK_SPIN_BUTTON(ui_study->thickness_spin))); /* and now, reconnect the signal */ g_signal_handlers_unblock_by_func(G_OBJECT(ui_study->thickness_spin), G_CALLBACK(ui_study_cb_thickness), ui_study); return; } /* updates the settings of the zoom spinbutton, will not change anything about the canvas */ void ui_study_update_zoom(ui_study_t * ui_study) { /* block signals to the zoom spin button, as we only want to change the value of the spin button, it's up to the caller of this function to change anything on the actual canvases... we'll unblock at the end of this function */ g_signal_handlers_block_by_func(G_OBJECT(ui_study->zoom_spin), G_CALLBACK(ui_study_cb_zoom), ui_study); if (ui_study->study != NULL) gtk_spin_button_set_value(GTK_SPIN_BUTTON(ui_study->zoom_spin), AMITK_STUDY_ZOOM(ui_study->study)); /* and now, reconnect the signal */ g_signal_handlers_unblock_by_func(G_OBJECT(ui_study->zoom_spin), G_CALLBACK(ui_study_cb_zoom), ui_study); return; } /* updates the settings of the fov spinbutton, will not change anything about the canvas */ void ui_study_update_fov(ui_study_t * ui_study) { /* block signals to the fov spin button, as we only want to change the value of the spin button, it's up to the caller of this function to change anything on the actual canvases... we'll unblock at the end of this function */ g_signal_handlers_block_by_func(G_OBJECT(ui_study->fov_spin), G_CALLBACK(ui_study_cb_fov), ui_study); gtk_spin_button_set_value(GTK_SPIN_BUTTON(ui_study->fov_spin), AMITK_STUDY_FOV(ui_study->study)); /* and now, reconnect the signal */ g_signal_handlers_unblock_by_func(G_OBJECT(ui_study->fov_spin), G_CALLBACK(ui_study_cb_fov), ui_study); return; } /* updates the settings of the canvas target button */ void ui_study_update_canvas_target(ui_study_t * ui_study) { g_signal_handlers_block_by_func(G_OBJECT(ui_study->canvas_target_action), G_CALLBACK(ui_study_cb_canvas_target), ui_study); gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(ui_study->canvas_target_action), AMITK_STUDY_CANVAS_TARGET(ui_study->study)); g_signal_handlers_unblock_by_func(G_OBJECT(ui_study->canvas_target_action), G_CALLBACK(ui_study_cb_canvas_target), ui_study); return; } void ui_study_update_fuse_type(ui_study_t * ui_study) { AmitkFuseType i_fuse_type; g_return_if_fail(ui_study->study != NULL); for (i_fuse_type = 0; i_fuse_type < AMITK_FUSE_TYPE_NUM; i_fuse_type++) g_signal_handlers_block_by_func(G_OBJECT(ui_study->fuse_type_action[i_fuse_type]), G_CALLBACK(ui_study_cb_fuse_type), ui_study); gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(ui_study->fuse_type_action[AMITK_STUDY_FUSE_TYPE(ui_study->study)]), TRUE); for (i_fuse_type = 0; i_fuse_type < AMITK_FUSE_TYPE_NUM; i_fuse_type++) g_signal_handlers_unblock_by_func(G_OBJECT(ui_study->fuse_type_action[i_fuse_type]), G_CALLBACK(ui_study_cb_fuse_type), ui_study); } void ui_study_update_view_mode(ui_study_t * ui_study) { AmitkViewMode i_view_mode; g_return_if_fail(ui_study->study != NULL); for (i_view_mode = 0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) g_signal_handlers_block_by_func(G_OBJECT(ui_study->view_mode_action[i_view_mode]), G_CALLBACK(ui_study_cb_view_mode), ui_study); gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(ui_study->view_mode_action[AMITK_STUDY_VIEW_MODE(ui_study->study)]), TRUE); for (i_view_mode = 0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) g_signal_handlers_unblock_by_func(G_OBJECT(ui_study->view_mode_action[i_view_mode]), G_CALLBACK(ui_study_cb_view_mode),ui_study); } void ui_study_update_title(ui_study_t * ui_study) { gchar * title; if (AMITK_STUDY_FILENAME(ui_study->study) == NULL) { title = g_strdup_printf(_("Study: %s %s"), AMITK_OBJECT_NAME(ui_study->study), ui_study->study_altered ? "*" : ""); } else { title = g_strdup_printf(_("Study: %s (%s) %s"), AMITK_OBJECT_NAME(ui_study->study), AMITK_STUDY_FILENAME(ui_study->study), ui_study->study_altered ? "*" : ""); } gtk_window_set_title(ui_study->window, title); g_free(title); } /* taken/modified from gtkhandlebox.c - note, no reattach signal gets called when this is used */ static void handle_box_reattach (GtkHandleBox *hb) { GtkWidget *widget = GTK_WIDGET (hb); if (hb->child_detached) { hb->child_detached = FALSE; if (GTK_WIDGET_REALIZED (hb)) { gdk_window_hide (hb->float_window); gdk_window_reparent (hb->bin_window, widget->window, 0, 0); } hb->float_window_mapped = FALSE; } gtk_widget_queue_resize (GTK_WIDGET (hb)); } void ui_study_update_layout(ui_study_t * ui_study) { AmitkView i_view; AmitkViewMode i_view_mode; gint row, column, table_column, table_row; // GtkWidget * scrolled; g_return_if_fail(ui_study->study != NULL); /* get rid of visible canvases that are no longer visible */ for (i_view_mode = AMITK_STUDY_VIEW_MODE(ui_study->study)+1; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) { if (ui_study->canvas_table[i_view_mode] != NULL) { gtk_widget_destroy(ui_study->canvas_table[i_view_mode]); ui_study->canvas_table[i_view_mode] = NULL; gtk_widget_destroy(ui_study->canvas_handle[i_view_mode]); ui_study->canvas_handle[i_view_mode] = NULL; for (i_view=0; i_view < AMITK_VIEW_NUM; i_view++) ui_study->canvas[i_view_mode][i_view] = NULL; } } for (i_view_mode = 0; i_view_mode <= AMITK_STUDY_VIEW_MODE(ui_study->study); i_view_mode++) { for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view++) { if ((!AMITK_STUDY_CANVAS_VISIBLE(ui_study->study, i_view)) && (ui_study->canvas[i_view_mode][i_view] != NULL)) { gtk_widget_destroy(ui_study->canvas[i_view_mode][i_view]); ui_study->canvas[i_view_mode][i_view] = NULL; } } } for (i_view_mode = 0; i_view_mode <= AMITK_STUDY_VIEW_MODE(ui_study->study); i_view_mode++) { if (ui_study->canvas_table[i_view_mode] == NULL) { ui_study->canvas_table[i_view_mode] = gtk_table_new(3, 2,FALSE); // scrolled = gtk_scrolled_window_new(NULL, NULL); // gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); // gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), ui_study->canvas_table[i_view_mode]); ui_study->canvas_handle[i_view_mode] = gtk_handle_box_new(); g_object_ref(G_OBJECT(ui_study->canvas_handle[i_view_mode])); /* gets removed below */ gtk_handle_box_set_shadow_type(GTK_HANDLE_BOX(ui_study->canvas_handle[i_view_mode]), GTK_SHADOW_NONE); gtk_handle_box_set_handle_position(GTK_HANDLE_BOX(ui_study->canvas_handle[i_view_mode]), GTK_POS_TOP); gtk_container_add(GTK_CONTAINER(ui_study->canvas_handle[i_view_mode]), ui_study->canvas_table[i_view_mode]); // gtk_container_add(GTK_CONTAINER(ui_study->canvas_handle[i_view_mode]), scrolled); } else { g_return_if_fail(ui_study->canvas_handle[i_view_mode] != NULL); /* extra ref so widget not destroyed on container_remove - gets removed below */ g_object_ref(G_OBJECT(ui_study->canvas_handle[i_view_mode])); /* note, ui_study->panel_layout doesn't get set till end of function, but first time through this function we never hit this condition */ if (ui_study->panel_layout != AMITK_STUDY_PANEL_LAYOUT(ui_study->study)) { /* hack! to force handle box to reattach. If we don't force a reattach, the widget doesn't get enough size allocated to it on the gtk_table_attach that follows */ handle_box_reattach(GTK_HANDLE_BOX(ui_study->canvas_handle[i_view_mode])); gtk_container_remove(GTK_CONTAINER(ui_study->center_table), ui_study->canvas_handle[i_view_mode]); } } for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view++) { if (AMITK_STUDY_CANVAS_VISIBLE(ui_study->study, i_view)) { if (ui_study->canvas[i_view_mode][i_view] == NULL) { /* new canvas */ ui_study->canvas[i_view_mode][i_view] = amitk_canvas_new(ui_study->study, i_view, i_view_mode, AMITK_CANVAS_TYPE_NORMAL); g_object_ref(G_OBJECT(ui_study->canvas[i_view_mode][i_view])); /* will be removed below */ amitk_canvas_set_active_object(AMITK_CANVAS(ui_study->canvas[i_view_mode][i_view]), ui_study->active_object); g_signal_connect(G_OBJECT(ui_study->canvas[i_view_mode][i_view]), "help_event", G_CALLBACK(ui_study_cb_canvas_help_event), ui_study); g_signal_connect(G_OBJECT(ui_study->canvas[i_view_mode][i_view]), "view_changing", G_CALLBACK(ui_study_cb_canvas_view_changing), ui_study); g_signal_connect(G_OBJECT(ui_study->canvas[i_view_mode][i_view]), "view_changed", G_CALLBACK(ui_study_cb_canvas_view_changed), ui_study); g_signal_connect(G_OBJECT(ui_study->canvas[i_view_mode][i_view]), "erase_volume", G_CALLBACK(ui_study_cb_canvas_erase_volume), ui_study); g_signal_connect(G_OBJECT(ui_study->canvas[i_view_mode][i_view]), "new_object", G_CALLBACK(ui_study_cb_canvas_new_object), ui_study); } else { /* not a new canvas */ /* add ref so it's not destroyed when we remove it from the container */ g_object_ref(G_OBJECT(ui_study->canvas[i_view_mode][i_view])); /* note, ui_study->canvas_layout doesn't get set till end of function, but first time through this function we never hit this condition */ if (ui_study->canvas_layout != AMITK_STUDY_CANVAS_LAYOUT(ui_study->study)) { gtk_widget_hide(ui_study->canvas[i_view_mode][i_view]); /* hide, so we get more fluid moving */ gtk_container_remove(GTK_CONTAINER(ui_study->canvas_table[i_view_mode]), ui_study->canvas[i_view_mode][i_view]); } } } } } for (i_view_mode = 0; i_view_mode <= AMITK_STUDY_VIEW_MODE(ui_study->study); i_view_mode++) { /* put the canvases in each table/handlebox according to the desired layout */ switch(AMITK_STUDY_CANVAS_LAYOUT(ui_study->study)) { case AMITK_LAYOUT_ORTHOGONAL: row = column = 0; if (ui_study->canvas[i_view_mode][AMITK_VIEW_TRANSVERSE] != NULL) { if (gtk_widget_get_parent(ui_study->canvas[i_view_mode][AMITK_VIEW_TRANSVERSE]) == NULL) gtk_table_attach(GTK_TABLE(ui_study->canvas_table[i_view_mode]), ui_study->canvas[i_view_mode][AMITK_VIEW_TRANSVERSE], column,column+1, row,row+1,FALSE,FALSE, X_PADDING, Y_PADDING); row++; } if (ui_study->canvas[i_view_mode][AMITK_VIEW_CORONAL] != NULL) { if (gtk_widget_get_parent(ui_study->canvas[i_view_mode][AMITK_VIEW_CORONAL]) == NULL) gtk_table_attach(GTK_TABLE(ui_study->canvas_table[i_view_mode]), ui_study->canvas[i_view_mode][AMITK_VIEW_CORONAL], column, column+1, row, row+1, FALSE,FALSE, X_PADDING, Y_PADDING); } row = 0; column++; if (ui_study->canvas[i_view_mode][AMITK_VIEW_SAGITTAL] != NULL) if (gtk_widget_get_parent(ui_study->canvas[i_view_mode][AMITK_VIEW_SAGITTAL]) == NULL) gtk_table_attach(GTK_TABLE(ui_study->canvas_table[i_view_mode]), ui_study->canvas[i_view_mode][AMITK_VIEW_SAGITTAL], column, column+1,row, row+1, FALSE,FALSE, X_PADDING, Y_PADDING); break; case AMITK_LAYOUT_LINEAR: default: for (i_view=0;i_view< AMITK_VIEW_NUM;i_view++) if (ui_study->canvas[i_view_mode][i_view] != NULL) if (gtk_widget_get_parent(ui_study->canvas[i_view_mode][i_view]) == NULL) gtk_table_attach(GTK_TABLE(ui_study->canvas_table[i_view_mode]), ui_study->canvas[i_view_mode][i_view], i_view, i_view+1, 0,1, FALSE, FALSE, X_PADDING, Y_PADDING); break; } /* place the handleboxes */ if (gtk_widget_get_parent(ui_study->canvas_handle[i_view_mode]) == NULL) { switch(AMITK_STUDY_PANEL_LAYOUT(ui_study->study)) { case AMITK_PANEL_LAYOUT_LINEAR_X: table_column=i_view_mode; table_row=0; break; case AMITK_PANEL_LAYOUT_LINEAR_Y: table_row=i_view_mode; table_column=0; break; case AMITK_PANEL_LAYOUT_MIXED: default: table_column = (i_view_mode % 2); table_row = floor((i_view_mode)/2); break; } gtk_table_attach(GTK_TABLE(ui_study->center_table), ui_study->canvas_handle[i_view_mode], table_column, table_column+1, table_row, table_row+1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); } /* remove the additional reference */ for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view++) if (ui_study->canvas[i_view_mode][i_view] != NULL) g_object_unref(G_OBJECT(ui_study->canvas[i_view_mode][i_view])); g_object_unref(ui_study->canvas_handle[i_view_mode]); gtk_widget_show_all(ui_study->canvas_handle[i_view_mode]); /* and show */ } /* record the layout */ ui_study->panel_layout = AMITK_STUDY_PANEL_LAYOUT(ui_study->study); ui_study->canvas_layout = AMITK_STUDY_CANVAS_LAYOUT(ui_study->study); return; } /* function to setup the widgets inside of the study ui */ void ui_study_setup_widgets(ui_study_t * ui_study) { GtkWidget * scrolled; GtkWidget * left_vbox; GtkWidget * hbox; GtkWidget * handle_box; /* the hbox that'll contain everything in the ui besides the menu and toolbar */ hbox = gtk_hbox_new(FALSE,0); gtk_box_pack_start (GTK_BOX (ui_study->window_vbox), hbox, TRUE, TRUE, 0); /* make and add the left packing table */ left_vbox = gtk_vbox_new(FALSE,0); handle_box = gtk_handle_box_new(); gtk_handle_box_set_shadow_type(GTK_HANDLE_BOX(handle_box), GTK_SHADOW_NONE); gtk_handle_box_set_handle_position(GTK_HANDLE_BOX(handle_box), GTK_POS_TOP); gtk_container_add(GTK_CONTAINER(handle_box), left_vbox); gtk_box_pack_start(GTK_BOX(hbox), handle_box, FALSE, FALSE, X_PADDING); /* connect the blank help signal */ g_object_set_data(G_OBJECT(ui_study->window), "which_help", GINT_TO_POINTER(AMITK_HELP_INFO_BLANK)); g_signal_connect(G_OBJECT(ui_study->window), "enter_notify_event", G_CALLBACK(ui_study_cb_update_help_info), ui_study); ui_study->tree_view = amitk_tree_view_new(AMITK_TREE_VIEW_MODE_MAIN, ui_study->preferences, ui_study->progress_dialog); g_signal_connect(G_OBJECT(ui_study->tree_view), "help_event", G_CALLBACK(ui_study_cb_tree_view_help_event), ui_study); g_signal_connect(G_OBJECT(ui_study->tree_view), "activate_object", G_CALLBACK(ui_study_cb_tree_view_activate_object), ui_study); g_signal_connect(G_OBJECT(ui_study->tree_view), "popup_object", G_CALLBACK(ui_study_cb_tree_view_popup_object), ui_study); g_signal_connect(G_OBJECT(ui_study->tree_view), "add_object", G_CALLBACK(ui_study_cb_tree_view_add_object), ui_study); g_signal_connect(G_OBJECT(ui_study->tree_view), "delete_object", G_CALLBACK(ui_study_cb_tree_view_delete_object), ui_study); /* make a scrolled area for the tree */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,LEFT_COLUMN_WIDTH,250); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), ui_study->tree_view); gtk_box_pack_start(GTK_BOX(left_vbox), scrolled, TRUE, TRUE,Y_PADDING); /* the help information canvas */ #ifdef AMIDE_LIBGNOMECANVAS_AA ui_study->help_info = GNOME_CANVAS(gnome_canvas_new_aa()); #else ui_study->help_info = GNOME_CANVAS(gnome_canvas_new()); #endif gtk_box_pack_start(GTK_BOX(left_vbox), GTK_WIDGET(ui_study->help_info), FALSE, TRUE, Y_PADDING); gtk_widget_set_size_request(GTK_WIDGET(ui_study->help_info), LEFT_COLUMN_WIDTH, HELP_INFO_LINE_HEIGHT*NUM_HELP_INFO_LINES+2); gnome_canvas_set_scroll_region(ui_study->help_info, 0.0, 0.0, LEFT_COLUMN_WIDTH, HELP_INFO_LINE_HEIGHT*NUM_HELP_INFO_LINES+2.0); /* make the stuff in the center */ ui_study->center_table = gtk_table_new(2, 2,FALSE); gtk_box_pack_start(GTK_BOX(hbox),ui_study->center_table, TRUE, TRUE, X_PADDING); return; } /* replace what's currently in the ui_study with the specified study */ void ui_study_set_study(ui_study_t * ui_study, AmitkStudy * study) { add_object(ui_study, AMITK_OBJECT(study)); ui_study->study_altered=FALSE; ui_study_update_title(ui_study); ui_study_make_active_object(ui_study, NULL); } /* procedure to set up the study window */ GtkWidget * ui_study_create(AmitkStudy * study, AmitkPreferences * preferences) { ui_study_t * ui_study; GdkPixbuf * pixbuf; g_return_val_if_fail(preferences != NULL, NULL); ui_study = ui_study_init(preferences); /* setup the study window */ ui_study->window = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); ui_study->window_vbox = gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER (ui_study->window), ui_study->window_vbox); /* set the icon that the window manager knows about */ pixbuf = gtk_widget_render_icon(GTK_WIDGET(ui_study->window), "amide_icon_logo", -1, 0); gtk_window_set_icon(ui_study->window, pixbuf); gtk_window_set_default_icon(pixbuf); /* sets it as the default for all additional windows */ g_object_unref(pixbuf); /* disable user resizability, allows the window to autoshrink */ gtk_window_set_resizable(ui_study->window, FALSE); /* setup the callbacks for the window */ g_signal_connect(G_OBJECT(ui_study->window), "delete_event", G_CALLBACK(ui_study_cb_delete_event), ui_study); ui_study->progress_dialog = amitk_progress_dialog_new(ui_study->window); /* setup the menu and toolbar */ menus_toolbar_create(ui_study); /* setup the rest of the study window */ ui_study_setup_widgets(ui_study); /* add the study to the ui_study */ if (study == NULL) { study = amitk_study_new(preferences); ui_study_set_study(ui_study, study); amitk_object_unref(study); ui_study->study_virgin=TRUE; } else { ui_study_set_study(ui_study, study); ui_study->study_virgin=FALSE; } ui_study_update_title(ui_study); /* get the study window running */ gtk_widget_show_all(GTK_WIDGET(ui_study->window)); amide_register_window((gpointer) ui_study->window); return GTK_WIDGET(ui_study->window); } amide-1.0.5/src/tb_distance.h0000664000175000017500000000200412270274653015671 0ustar loeningloening/* tb_distance.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2012-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* includes always needed with this */ #include "amitk_study.h" /* external functions */ void tb_distance(AmitkStudy * study, GtkWindow * parent); amide-1.0.5/src/amitk_window_edit.c0000664000175000017500000002754512270273765017132 0ustar loeningloening/* amitk_window_edit.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2005-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amide.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" #include "amitk_window_edit.h" #include "amitk_common.h" static void window_edit_class_init (AmitkWindowEditClass *class); static void window_edit_init (AmitkWindowEdit *window_edit); static void window_edit_destroy(GtkObject * object); static void window_spin_cb(GtkWidget * widget, gpointer window_edit); static void insert_window_level_cb (GtkWidget * widget, gpointer window_edit); static void window_edit_update_entries(AmitkWindowEdit * window_edit); static GtkVBoxClass *parent_class; GType amitk_window_edit_get_type (void) { static GType window_edit_type = 0; if (!window_edit_type) { static const GTypeInfo window_edit_info = { sizeof (AmitkWindowEditClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) window_edit_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (AmitkWindowEdit), 0, /* # preallocs */ (GInstanceInitFunc) window_edit_init, NULL /* value table */ }; window_edit_type = g_type_register_static(GTK_TYPE_VBOX, "AmitkWindowEdit", &window_edit_info, 0); } return window_edit_type; } static void window_edit_class_init (AmitkWindowEditClass *class) { GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS(class); parent_class = g_type_class_peek_parent(class); gtkobject_class->destroy = window_edit_destroy; } static void window_edit_init (AmitkWindowEdit *window_edit) { GtkWidget * table; GtkWidget * label; AmitkWindow i_window; AmitkLimit i_limit; guint table_row=0; /* initialize some critical stuff */ window_edit->data_set = NULL; window_edit->preferences = NULL; table = gtk_table_new(11,4, FALSE); gtk_container_add(GTK_CONTAINER(window_edit), table); for (i_limit = 0; i_limit < AMITK_LIMIT_NUM; i_limit++) { window_edit->limit_label[i_limit] = gtk_label_new(NULL); gtk_table_attach(GTK_TABLE(table), window_edit->limit_label[i_limit], 1+i_limit,2+i_limit, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(window_edit->limit_label[i_limit]); } table_row++; for (i_window = 0; i_window < AMITK_WINDOW_NUM; i_window++) { label = gtk_label_new(_(amitk_window_names[i_window])); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); for (i_limit = 0; i_limit < AMITK_LIMIT_NUM; i_limit++) { window_edit->window_spin[i_window][i_limit] = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(window_edit->window_spin[i_window][i_limit]), FALSE); g_object_set_data(G_OBJECT(window_edit->window_spin[i_window][i_limit]), "which_window", GINT_TO_POINTER(i_window)); g_object_set_data(G_OBJECT(window_edit->window_spin[i_window][i_limit]), "which_limit", GINT_TO_POINTER(i_limit)); g_signal_connect(G_OBJECT(window_edit->window_spin[i_window][i_limit]), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); g_signal_connect(G_OBJECT(window_edit->window_spin[i_window][i_limit]), "value_changed", G_CALLBACK(window_spin_cb), window_edit); gtk_table_attach(GTK_TABLE(table), window_edit->window_spin[i_window][i_limit], 1+i_limit,2+i_limit, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(window_edit->window_spin[i_window][i_limit]); } window_edit->insert_button[i_window] = gtk_button_new_with_label("Insert Current Thresholds"); gtk_table_attach(GTK_TABLE(table), window_edit->insert_button[i_window], 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(window_edit->insert_button[i_window]), "which_window", GINT_TO_POINTER(i_window)); g_signal_connect(G_OBJECT(window_edit->insert_button[i_window]), "clicked", G_CALLBACK(insert_window_level_cb), window_edit); table_row++; } gtk_widget_show(table); } static void window_edit_destroy (GtkObject * gtkobject) { AmitkWindowEdit * window_edit; g_return_if_fail (gtkobject != NULL); g_return_if_fail (AMITK_IS_WINDOW_EDIT (gtkobject)); window_edit = AMITK_WINDOW_EDIT(gtkobject); if (window_edit->data_set != NULL) { g_signal_handlers_disconnect_by_func(G_OBJECT(window_edit->data_set), window_edit_update_entries, window_edit); amitk_object_unref(AMITK_OBJECT(window_edit->data_set)); window_edit->data_set = NULL; } if (window_edit->preferences != NULL) { g_signal_handlers_disconnect_by_func(G_OBJECT(window_edit->preferences), window_edit_update_entries, window_edit); g_object_unref(G_OBJECT(window_edit->preferences)); window_edit->preferences = NULL; } if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (gtkobject); } static void window_spin_cb(GtkWidget * widget, gpointer data) { AmitkWindowEdit * window_edit = data; AmitkWindow which_window; AmitkLimit which_limit; amide_data_t value, min, max, center, window; AmitkThresholdStyle threshold_style; g_return_if_fail(AMITK_IS_WINDOW_EDIT(window_edit)); which_window = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "which_window")); which_limit = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "which_limit")); value = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); if (window_edit->data_set != NULL) { threshold_style = AMITK_DATA_SET_THRESHOLD_STYLE(window_edit->data_set); min = AMITK_DATA_SET_THRESHOLD_WINDOW(window_edit->data_set, which_window, AMITK_LIMIT_MIN); max = AMITK_DATA_SET_THRESHOLD_WINDOW(window_edit->data_set, which_window, AMITK_LIMIT_MAX); } else {/* window_edit->preferences != NULL */ threshold_style = AMITK_PREFERENCES_THRESHOLD_STYLE(window_edit->preferences); min = AMITK_PREFERENCES_WINDOW(window_edit->preferences, which_window, AMITK_LIMIT_MIN); max = AMITK_PREFERENCES_WINDOW(window_edit->preferences, which_window, AMITK_LIMIT_MAX); } /* if needed, translate center/window to min/max */ if (threshold_style == AMITK_THRESHOLD_STYLE_CENTER_WIDTH) { if (which_limit == AMITK_LIMIT_MIN) { center = value; window = max-min; } else { /* which_limit == AMITK_LIMIT_MAX */ center = (max+min)/2.0; window = value; } min = center-window/2.0; max = center+window/2.0; } if (window_edit->data_set != NULL) { amitk_data_set_set_threshold_window(window_edit->data_set, which_window, AMITK_LIMIT_MIN,min); amitk_data_set_set_threshold_window(window_edit->data_set, which_window, AMITK_LIMIT_MAX,max); } else {/* window_edit->preferences != NULL */ amitk_preferences_set_default_window(window_edit->preferences, which_window, AMITK_LIMIT_MIN, min); amitk_preferences_set_default_window(window_edit->preferences, which_window, AMITK_LIMIT_MAX, max); } return; } static void insert_window_level_cb (GtkWidget * widget, gpointer data) { AmitkWindowEdit * window_edit = data; AmitkWindow window; g_return_if_fail(AMITK_IS_WINDOW_EDIT(window_edit)); g_return_if_fail(AMITK_IS_DATA_SET(window_edit->data_set)); window = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "which_window")); amitk_data_set_set_threshold_window(window_edit->data_set, window, AMITK_LIMIT_MIN, AMITK_DATA_SET_THRESHOLD_MIN(window_edit->data_set, 0)); amitk_data_set_set_threshold_window(window_edit->data_set, window, AMITK_LIMIT_MAX, AMITK_DATA_SET_THRESHOLD_MAX(window_edit->data_set, 0)); return; } /* function to update the entry widgets */ static void window_edit_update_entries(AmitkWindowEdit * window_edit) { AmitkLimit i_limit; AmitkWindow i_window; AmitkThresholdStyle threshold_style; amide_data_t center; amide_data_t window; amide_data_t value[AMITK_LIMIT_NUM]; g_return_if_fail(AMITK_IS_WINDOW_EDIT(window_edit)); if (window_edit->data_set != NULL) threshold_style = AMITK_DATA_SET_THRESHOLD_STYLE(window_edit->data_set); else /* window_edit->preferences != NULL */ threshold_style = AMITK_PREFERENCES_THRESHOLD_STYLE(window_edit->preferences); for (i_limit = 0; i_limit < AMITK_LIMIT_NUM; i_limit++) { gtk_label_set_text(GTK_LABEL(window_edit->limit_label[i_limit]), amitk_limit_names[threshold_style][i_limit]); } for (i_window = 0; i_window < AMITK_WINDOW_NUM; i_window++) { for (i_limit = 0; i_limit < AMITK_LIMIT_NUM; i_limit++) if (window_edit->data_set != NULL) value[i_limit] = AMITK_DATA_SET_THRESHOLD_WINDOW(window_edit->data_set, i_window, i_limit); else /* window_edit->preferences != NULL */ value[i_limit] = AMITK_PREFERENCES_WINDOW(window_edit->preferences, i_window, i_limit); /* if needed, switch the values to center/window style */ if (threshold_style == AMITK_THRESHOLD_STYLE_CENTER_WIDTH) { center = (value[AMITK_LIMIT_MAX]+value[AMITK_LIMIT_MIN])/2.0; window = (value[AMITK_LIMIT_MAX]-value[AMITK_LIMIT_MIN]); value[AMITK_LIMIT_MIN] = center; value[AMITK_LIMIT_MAX] = window; } for (i_limit = 0; i_limit < AMITK_LIMIT_NUM; i_limit++) { g_signal_handlers_block_by_func(G_OBJECT(window_edit->window_spin[i_window][i_limit]), G_CALLBACK(window_spin_cb), window_edit); gtk_spin_button_set_value(GTK_SPIN_BUTTON(window_edit->window_spin[i_window][i_limit]), value[i_limit]); g_signal_handlers_unblock_by_func(G_OBJECT(window_edit->window_spin[i_window][i_limit]), G_CALLBACK(window_spin_cb), window_edit); } } return; } /* if data_set is specified, this widget causes and reacts to changes in the corresponding data set. Otherwise, the preferences object will be changed/reacted to. */ GtkWidget * amitk_window_edit_new(AmitkDataSet * data_set, AmitkPreferences * preferences) { AmitkWindowEdit * window_edit; AmitkWindow i_window; g_return_val_if_fail(AMITK_IS_DATA_SET(data_set) || AMITK_IS_PREFERENCES(preferences), NULL); window_edit = g_object_new(amitk_window_edit_get_type (), NULL); if (data_set != NULL) { window_edit->data_set = AMITK_DATA_SET(amitk_object_ref(AMITK_OBJECT(data_set))); g_signal_connect_swapped(G_OBJECT(window_edit->data_set), "threshold_style_changed", G_CALLBACK(window_edit_update_entries), window_edit); g_signal_connect_swapped(G_OBJECT(window_edit->data_set), "windows_changed", G_CALLBACK(window_edit_update_entries), window_edit); for (i_window=0; i_window < AMITK_WINDOW_NUM; i_window++) gtk_widget_show(window_edit->insert_button[i_window]); } else { /* preferences != NULL */ window_edit->preferences = AMITK_PREFERENCES(g_object_ref(G_OBJECT(preferences))); g_signal_connect_swapped(G_OBJECT(window_edit->preferences), "data_set_preferences_changed", G_CALLBACK(window_edit_update_entries), window_edit); for (i_window=0; i_window < AMITK_WINDOW_NUM; i_window++) gtk_widget_hide(window_edit->insert_button[i_window]); } window_edit_update_entries(window_edit); return GTK_WIDGET (window_edit); } amide-1.0.5/src/libecat_interface.h0000644000175000017500000000243512270274526017042 0ustar loeningloening/* libecat_interface.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef AMIDE_LIBECAT_SUPPORT #ifndef __LIBECAT_INTERFACE_H__ #define __LIBECAT_INTERFACE_H__ /* headers always needed with this guy */ #include "amitk_data_set.h" /* external functions */ AmitkDataSet * libecat_import(const gchar * filename, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data); #endif /* __LIBECAT_INTERFACE_H__ */ #endif /* AMIDE_LIBECAT_SUPPORT */ amide-1.0.5/src/amitk_object.h0000664000175000017500000001700312270274560016047 0ustar loeningloening/* amitk_object.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_OBJECT_H__ #define __AMITK_OBJECT_H__ #include "amitk_space.h" G_BEGIN_DECLS #define AMITK_TYPE_OBJECT (amitk_object_get_type ()) #define AMITK_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), AMITK_TYPE_OBJECT, AmitkObject)) #define AMITK_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_OBJECT, AmitkObjectClass)) #define AMITK_IS_OBJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), AMITK_TYPE_OBJECT)) #define AMITK_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_OBJECT)) #define AMITK_OBJECT_GET_CLASS(object) (G_TYPE_CHECK_GET_CLASS ((object), AMITK_TYPE_OBJECT, AmitkObjectClass)) #define AMITK_OBJECT_CHILDREN(object) (AMITK_OBJECT(object)->children) #define AMITK_OBJECT_PARENT(object) (AMITK_OBJECT(object)->parent) #define AMITK_OBJECT_NAME(object) ((const gchar *) (AMITK_OBJECT(object)->name)) typedef struct _AmitkObjectClass AmitkObjectClass; typedef struct _AmitkObject AmitkObject; typedef enum { AMITK_OBJECT_TYPE_STUDY, AMITK_OBJECT_TYPE_DATA_SET, AMITK_OBJECT_TYPE_FIDUCIAL_MARK, AMITK_OBJECT_TYPE_ROI, AMITK_OBJECT_TYPE_VOLUME, AMITK_OBJECT_TYPE_NUM } AmitkObjectType; /* note that the numbered entries need to correspond to the enteries in AmitkViewMode */ typedef enum { AMITK_SELECTION_SELECTED_0, AMITK_SELECTION_SELECTED_1, AMITK_SELECTION_SELECTED_2, AMITK_SELECTION_NUM, AMITK_SELECTION_ANY, AMITK_SELECTION_ALL, } AmitkSelection; struct _AmitkObject { AmitkSpace space; gchar * name; gboolean selected[AMITK_SELECTION_NUM]; AmitkObject * parent; GList * children; GObject * dialog; }; struct _AmitkObjectClass { AmitkSpaceClass space_class; void (* object_name_changed) (AmitkObject * object); void (* object_selection_changed) (AmitkObject * object); void (* object_child_selection_changed) (AmitkObject * object); AmitkObject * (* object_copy) (const AmitkObject * object); void (* object_copy_in_place) (AmitkObject * dest_object, const AmitkObject * src_object); void (* object_write_xml) (const AmitkObject * object, xmlNodePtr nodes, FILE * study_file); gchar * (* object_read_xml) (AmitkObject * object, xmlNodePtr nodes, FILE * study_file, gchar * error_buf); void (* object_add_child) (AmitkObject * object, AmitkObject * child); void (* object_remove_child) (AmitkObject * object, AmitkObject * child); }; /* Application-level methods */ GType amitk_object_get_type (void); AmitkObject * amitk_object_new (void); void amitk_object_write_xml (AmitkObject * object, FILE * study_file, gchar ** output_filename, guint64 * location, guint64 * size); AmitkObject * amitk_object_read_xml (gchar * xml_filename, FILE * study_file, guint64 location, guint64 size, gchar ** perror_buf); AmitkObject * amitk_object_copy (const AmitkObject * object); void amitk_object_copy_in_place (AmitkObject * dest_object, const AmitkObject * src_object); void amitk_object_set_name (AmitkObject * object, const gchar * new_name); gboolean amitk_object_get_selected (const AmitkObject * object, const AmitkSelection which_selection); void amitk_object_set_selected (AmitkObject * object, const gboolean selection, const AmitkSelection which_selection); #define amitk_object_select(obj, which) (amitk_object_set_selected((obj), (TRUE), (which))) #define amitk_object_unselect(obj, which) (amitk_object_set_selected((obj), (FALSE), (which))) void amitk_object_set_parent (AmitkObject * object, AmitkObject * parent); void amitk_object_add_child (AmitkObject * object, AmitkObject * child); void amitk_object_add_children (AmitkObject * object, GList * children); gboolean amitk_object_remove_child (AmitkObject * object, AmitkObject * child); gboolean amitk_object_remove_children (AmitkObject * object, GList * children); gboolean amitk_object_compare_object_type (AmitkObject * object, AmitkObjectType type); AmitkObject * amitk_object_get_parent_of_type (AmitkObject * object, const AmitkObjectType type); GList * amitk_object_get_children_of_type (AmitkObject * object, const AmitkObjectType type, const gboolean recurse); gboolean amitk_object_selected_children (AmitkObject * object, const AmitkSelection which_selection, gboolean recurse); GList * amitk_object_get_selected_children (AmitkObject * object, const AmitkSelection which_selection, const gboolean recurse); GList * amitk_object_get_selected_children_of_type (AmitkObject * object, const AmitkObjectType type, const AmitkSelection which_selection, const gboolean recurse); gpointer amitk_object_ref (gpointer object); gpointer amitk_object_unref (gpointer object); GList * amitk_objects_ref (GList * objects); GList * amitk_objects_unref (GList * objects); gint amitk_objects_count (GList * objects); AmitkObject * amitk_objects_find_object_by_name (GList * objects, const gchar * name); gint amitk_objects_count_pairs_by_name (GList * objects1, GList * objects2); GList * amitk_objects_get_of_type (GList * objects, const AmitkObjectType type, const gboolean recurse); gboolean amitk_objects_has_type (GList * objects, const AmitkObjectType type, const gboolean recurse); void amitk_objects_write_xml (GList * objects, xmlNodePtr node_list, FILE * study_file); GList * amitk_objects_read_xml (xmlNodePtr node_list, FILE * study_file, gchar **perror_buf); const gchar * amitk_object_type_get_name (const AmitkObjectType type); const gchar * amitk_selection_get_name (const AmitkSelection type); extern gchar * amide_data_file_xml_tag; extern gchar * amide_data_file_xml_start_tag; extern gchar * amide_data_file_xml_end_tag; G_END_DECLS #endif /* __AMITK_OBJECT_H__ */ amide-1.0.5/src/alignment_mutual_information.h0000664000175000017500000000315011706124754021366 0ustar loeningloening/* alignment_mutual_information.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2011-2012 Ian Miller * */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __ALIGNMENT_MUTUAL_INFORMATION_H__ #define __ALIGNMENT_MUTUAL_INFORMATION_H__ /* header files that are always needed with this file */ #include "amitk_data_set.h" /* external functions */ /* the space returned is the transform needed to change moving_ds's space to the aligned space, incoding an axes rotation, as well as the necessary shift with respect to the dataset's center */ AmitkSpace * alignment_mutual_information(AmitkDataSet * moving_ds, AmitkDataSet * fixed_ds, AmitkPoint view_center, amide_real_t thickness, amide_time_t view_start_time, amide_time_t view_duration, gdouble * pointer_mutual_information_error, AmitkUpdateFunc update_func, gpointer update_data); #endif /* __ALIGNMENT_MUTUAL_INFORMATION_H__ */ amide-1.0.5/src/amitk_data_set.h0000664000175000017500000007514312270274571016400 0ustar loeningloening/* amitk_data_set.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_DATA_SET_H__ #define __AMITK_DATA_SET_H__ #include "amitk_volume.h" #include "amitk_raw_data.h" #include "amitk_color_table.h" #include "amitk_filter.h" #include "amitk_preferences.h" G_BEGIN_DECLS #define AMITK_TYPE_DATA_SET (amitk_data_set_get_type ()) #define AMITK_DATA_SET(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), AMITK_TYPE_DATA_SET, AmitkDataSet)) #define AMITK_DATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_DATA_SET, AmitkDataSetClass)) #define AMITK_IS_DATA_SET(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), AMITK_TYPE_DATA_SET)) #define AMITK_IS_DATA_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_DATA_SET)) #define AMITK_DATA_SET_GET_CLASS(object) (G_TYPE_CHECK_GET_CLASS ((object), AMITK_TYPE_DATA_SET, AmitkDataSetClass)) #define AMITK_DATA_SET_MODALITY(ds) (AMITK_DATA_SET(ds)->modality) #define AMITK_DATA_SET_VOXEL_SIZE(ds) (AMITK_DATA_SET(ds)->voxel_size) #define AMITK_DATA_SET_VOXEL_SIZE_X(ds) (AMITK_DATA_SET(ds)->voxel_size.x) #define AMITK_DATA_SET_VOXEL_SIZE_Y(ds) (AMITK_DATA_SET(ds)->voxel_size.y) #define AMITK_DATA_SET_VOXEL_SIZE_Z(ds) (AMITK_DATA_SET(ds)->voxel_size.z) #define AMITK_DATA_SET_VOXEL_VOLUME(ds) (AMITK_DATA_SET(ds)->voxel_size.z*AMITK_DATA_SET(ds)->voxel_size.y*AMITK_DATA_SET(ds)->voxel_size.x) #define AMITK_DATA_SET_RAW_DATA(ds) (AMITK_DATA_SET(ds)->raw_data) #define AMITK_DATA_SET_DIM(ds) (AMITK_RAW_DATA_DIM(AMITK_DATA_SET_RAW_DATA(ds))) #define AMITK_DATA_SET_DIM_X(ds) (AMITK_RAW_DATA_DIM_X(AMITK_DATA_SET_RAW_DATA(ds))) #define AMITK_DATA_SET_DIM_Y(ds) (AMITK_RAW_DATA_DIM_Y(AMITK_DATA_SET_RAW_DATA(ds))) #define AMITK_DATA_SET_DIM_Z(ds) (AMITK_RAW_DATA_DIM_Z(AMITK_DATA_SET_RAW_DATA(ds))) #define AMITK_DATA_SET_DIM_G(ds) (AMITK_RAW_DATA_DIM_G(AMITK_DATA_SET_RAW_DATA(ds))) #define AMITK_DATA_SET_DIM_T(ds) (AMITK_RAW_DATA_DIM_T(AMITK_DATA_SET_RAW_DATA(ds))) #define AMITK_DATA_SET_FORMAT(ds) (AMITK_RAW_DATA_FORMAT(AMITK_DATA_SET_RAW_DATA(ds))) #define AMITK_DATA_SET_NUM_GATES(ds) (AMITK_DATA_SET_DIM_G(ds)) #define AMITK_DATA_SET_NUM_FRAMES(ds) (AMITK_DATA_SET_DIM_T(ds)) #define AMITK_DATA_SET_TOTAL_PLANES(ds) (AMITK_DATA_SET_DIM_Z(ds)*AMITK_DATA_SET_DIM_G(ds)*AMITK_DATA_SET_DIM_T(ds)) #define AMITK_DATA_SET_DISTRIBUTION(ds) (AMITK_DATA_SET(ds)->distribution) #define AMITK_DATA_SET_COLOR_TABLE(ds, view_mode) (AMITK_DATA_SET(ds)->color_table[view_mode]) #define AMITK_DATA_SET_COLOR_TABLE_INDEPENDENT(ds, view_mode) (AMITK_DATA_SET(ds)->color_table_independent[view_mode]) #define AMITK_DATA_SET_INTERPOLATION(ds) (AMITK_DATA_SET(ds)->interpolation) #define AMITK_DATA_SET_RENDERING(ds) (AMITK_DATA_SET(ds)->rendering) #define AMITK_DATA_SET_DYNAMIC(ds) (AMITK_DATA_SET_NUM_FRAMES(ds) > 1) #define AMITK_DATA_SET_GATED(ds) (AMITK_DATA_SET_NUM_GATES(ds) > 1) #define AMITK_DATA_SET_THRESHOLDING(ds) (AMITK_DATA_SET(ds)->thresholding) #define AMITK_DATA_SET_THRESHOLD_STYLE(ds) (AMITK_DATA_SET(ds)->threshold_style) #define AMITK_DATA_SET_SLICE_PARENT(ds) (AMITK_DATA_SET(ds)->slice_parent) #define AMITK_DATA_SET_SCAN_DATE(ds) (AMITK_DATA_SET(ds)->scan_date) #define AMITK_DATA_SET_SUBJECT_NAME(ds) (AMITK_DATA_SET(ds)->subject_name) #define AMITK_DATA_SET_SUBJECT_ID(ds) (AMITK_DATA_SET(ds)->subject_id) #define AMITK_DATA_SET_SUBJECT_DOB(ds) (AMITK_DATA_SET(ds)->subject_dob) #define AMITK_DATA_SET_SERIES_NUMBER(ds) (AMITK_DATA_SET(ds)->series_number) #define AMITK_DATA_SET_DICOM_IMAGE_TYPE(ds) (AMITK_DATA_SET(ds)->dicom_image_type) #define AMITK_DATA_SET_SCAN_START(ds) (AMITK_DATA_SET(ds)->scan_start) #define AMITK_DATA_SET_THRESHOLD_REF_FRAME(ds,ref_frame) (AMITK_DATA_SET(ds)->threshold_ref_frame[ref_frame]) #define AMITK_DATA_SET_THRESHOLD_MAX(ds, ref_frame) (AMITK_DATA_SET(ds)->threshold_max[ref_frame]) #define AMITK_DATA_SET_THRESHOLD_MIN(ds, ref_frame) (AMITK_DATA_SET(ds)->threshold_min[ref_frame]) #define AMITK_DATA_SET_SCALING_TYPE(ds) (AMITK_DATA_SET(ds)->scaling_type) #define AMITK_DATA_SET_SCALING_HAS_INTERCEPT(ds) ((AMITK_DATA_SET(ds)->scaling_type == AMITK_SCALING_TYPE_0D_WITH_INTERCEPT) || (AMITK_DATA_SET(ds)->scaling_type == AMITK_SCALING_TYPE_1D_WITH_INTERCEPT) || (AMITK_DATA_SET(ds)->scaling_type == AMITK_SCALING_TYPE_2D_WITH_INTERCEPT)) #define AMITK_DATA_SET_SUBJECT_ORIENTATION(ds) (AMITK_DATA_SET(ds)->subject_orientation) #define AMITK_DATA_SET_SUBJECT_SEX(ds) (AMITK_DATA_SET(ds)->subject_sex) #define AMITK_DATA_SET_CONVERSION(ds) (AMITK_DATA_SET(ds)->conversion) #define AMITK_DATA_SET_SCALE_FACTOR(ds) (AMITK_DATA_SET(ds)->scale_factor) #define AMITK_DATA_SET_INJECTED_DOSE(ds) (AMITK_DATA_SET(ds)->injected_dose) #define AMITK_DATA_SET_DISPLAYED_DOSE_UNIT(ds) (AMITK_DATA_SET(ds)->displayed_dose_unit) #define AMITK_DATA_SET_SUBJECT_WEIGHT(ds) (AMITK_DATA_SET(ds)->subject_weight) #define AMITK_DATA_SET_DISPLAYED_WEIGHT_UNIT(ds) (AMITK_DATA_SET(ds)->displayed_weight_unit) #define AMITK_DATA_SET_CYLINDER_FACTOR(ds) (AMITK_DATA_SET(ds)->cylinder_factor) #define AMITK_DATA_SET_DISPLAYED_CYLINDER_UNIT(ds) (AMITK_DATA_SET(ds)->displayed_cylinder_unit) #define AMITK_DATA_SET_INVERSION_TIME(ds) (AMITK_DATA_SET(ds)->inversion_time) #define AMITK_DATA_SET_ECHO_TIME(ds) (AMITK_DATA_SET(ds)->echo_time) #define AMITK_DATA_SET_DIFFUSION_B_VALUE(ds) (AMITK_DATA_SET(ds)->diffusion_b_value) #define AMITK_DATA_SET_DIFFUSION_DIRECTION(ds) (AMITK_DATA_SET(ds)->diffusion_direction) #define AMITK_DATA_SET_THRESHOLD_WINDOW(ds, i_win, limit) (AMITK_DATA_SET(ds)->threshold_window[i_win][limit]) #define AMITK_DATA_SET_VIEW_START_GATE(ds) (AMITK_DATA_SET(ds)->view_start_gate) #define AMITK_DATA_SET_VIEW_END_GATE(ds) (AMITK_DATA_SET(ds)->view_end_gate) #define AMITK_DATA_SET_NUM_VIEW_GATES(ds) (AMITK_DATA_SET(ds)->num_view_gates) #define AMITK_DATA_SET_DISTRIBUTION_SIZE 256 typedef enum { AMITK_OPERATION_UNARY_RESCALE, AMITK_OPERATION_UNARY_REMOVE_NEGATIVES, AMITK_OPERATION_UNARY_NUM } AmitkOperationUnary; typedef enum { AMITK_OPERATION_BINARY_ADD, AMITK_OPERATION_BINARY_SUB, AMITK_OPERATION_BINARY_MULTIPLY, AMITK_OPERATION_BINARY_DIVISION, AMITK_OPERATION_BINARY_T2STAR, AMITK_OPERATION_BINARY_NUM } AmitkOperationBinary; typedef enum { AMITK_INTERPOLATION_NEAREST_NEIGHBOR, AMITK_INTERPOLATION_TRILINEAR, AMITK_INTERPOLATION_NUM } AmitkInterpolation; typedef enum { AMITK_RENDERING_MPR, AMITK_RENDERING_MIP, AMITK_RENDERING_MINIP, AMITK_RENDERING_NUM } AmitkRendering; typedef enum { AMITK_THRESHOLDING_PER_SLICE, AMITK_THRESHOLDING_PER_FRAME, AMITK_THRESHOLDING_INTERPOLATE_FRAMES, AMITK_THRESHOLDING_GLOBAL, AMITK_THRESHOLDING_NUM } AmitkThresholding; /* 2D is per plane scaling */ /* 1D is per frame/gate scaling */ /* 0D is global scaling */ typedef enum { AMITK_SCALING_TYPE_0D, AMITK_SCALING_TYPE_1D, AMITK_SCALING_TYPE_2D, AMITK_SCALING_TYPE_0D_WITH_INTERCEPT, AMITK_SCALING_TYPE_1D_WITH_INTERCEPT, AMITK_SCALING_TYPE_2D_WITH_INTERCEPT, AMITK_SCALING_TYPE_NUM } AmitkScalingType; typedef enum { AMITK_CONVERSION_STRAIGHT, AMITK_CONVERSION_PERCENT_ID_PER_CC, AMITK_CONVERSION_SUV, AMITK_CONVERSION_NUM } AmitkConversion; typedef enum { AMITK_WEIGHT_UNIT_KILOGRAM, AMITK_WEIGHT_UNIT_GRAM, AMITK_WEIGHT_UNIT_POUND, AMITK_WEIGHT_UNIT_OUNCE, AMITK_WEIGHT_UNIT_NUM } AmitkWeightUnit; typedef enum { AMITK_DOSE_UNIT_MEGABECQUEREL, AMITK_DOSE_UNIT_MILLICURIE, AMITK_DOSE_UNIT_MICROCURIE, AMITK_DOSE_UNIT_NANOCURIE, AMITK_DOSE_UNIT_NUM } AmitkDoseUnit; typedef enum { AMITK_CYLINDER_UNIT_MEGABECQUEREL_PER_CC_IMAGE_UNIT, AMITK_CYLINDER_UNIT_MILLICURIE_PER_CC_IMAGE_UNIT, AMITK_CYLINDER_UNIT_MICROCURIE_PER_CC_IMAGE_UNIT, AMITK_CYLINDER_UNIT_NANOCURIE_PER_CC_IMAGE_UNIT, AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_MEGABECQUEREL, AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_MILLICURIE, AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_MICROCURIE, AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_NANOCURIE, AMITK_CYLINDER_UNIT_NUM } AmitkCylinderUnit; typedef enum { AMITK_SUBJECT_ORIENTATION_UNKNOWN, AMITK_SUBJECT_ORIENTATION_SUPINE_HEADFIRST, AMITK_SUBJECT_ORIENTATION_SUPINE_FEETFIRST, AMITK_SUBJECT_ORIENTATION_PRONE_HEADFIRST, AMITK_SUBJECT_ORIENTATION_PRONE_FEETFIRST, AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_HEADFIRST, AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_FEETFIRST, AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_HEADFIRST, AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_FEETFIRST, AMITK_SUBJECT_ORIENTATION_NUM } AmitkSubjectOrientation; typedef enum { AMITK_SUBJECT_SEX_UNKNOWN, AMITK_SUBJECT_SEX_MALE, AMITK_SUBJECT_SEX_FEMALE, AMITK_SUBJECT_SEX_NUM } AmitkSubjectSex; /* the skip is for glib-mkenums, it doesn't know how to handle ifdef's */ typedef enum { /*< skip >*/ AMITK_IMPORT_METHOD_GUESS, AMITK_IMPORT_METHOD_RAW, #ifdef AMIDE_LIBDCMDATA_SUPPORT AMITK_IMPORT_METHOD_DCMTK, #endif #ifdef AMIDE_LIBECAT_SUPPORT AMITK_IMPORT_METHOD_LIBECAT, #endif #ifdef AMIDE_LIBMDC_SUPPORT AMITK_IMPORT_METHOD_LIBMDC, #endif AMITK_IMPORT_METHOD_NUM } AmitkImportMethod; /* the skip is for glib-mkenums, it doesn't know how to handle ifdef's */ typedef enum { /*< skip >*/ AMITK_EXPORT_METHOD_RAW, #ifdef AMIDE_LIBDCMDATA_SUPPORT AMITK_EXPORT_METHOD_DCMTK, #endif #ifdef AMIDE_LIBMDC_SUPPORT AMITK_EXPORT_METHOD_LIBMDC, #endif AMITK_EXPORT_METHOD_NUM } AmitkExportMethod; typedef struct _AmitkDataSetClass AmitkDataSetClass; typedef struct _AmitkDataSet AmitkDataSet; struct _AmitkDataSet { AmitkVolume parent; /* parameters that are saved */ gchar * scan_date; /* the time/day the image was acquired */ gchar * subject_name; /* name of the subject */ gchar * subject_id; /* id of the subject */ gchar * subject_dob; /* date of birth of the subject */ gint series_number; /* series number, used by dicom */ gchar * dicom_image_type; /* dicom specific image type designator */ AmitkModality modality; AmitkPoint voxel_size; /* in mm */ AmitkRawData * raw_data; AmitkScalingType scaling_type; /* dimensions of internal scaling */ AmitkRawData * internal_scaling_factor; /* internally (data set) supplied scaling factor */ AmitkRawData * internal_scaling_intercept; /* internally (data set) supplied scaling intercept */ amide_time_t * gate_time; /* array of the trigger times of each gate */ amide_time_t scan_start; amide_time_t * frame_duration; /* array of the duration of each frame */ AmitkColorTable color_table[AMITK_VIEW_MODE_NUM]; /* the color table to draw this volume in */ gboolean color_table_independent[AMITK_VIEW_MODE_NUM]; /* whether to use the independent color tables for 2-way or 3-way linked modes*/ AmitkInterpolation interpolation; AmitkRendering rendering; /* rendering mode - MPR/MIP/MINIP */ AmitkSubjectOrientation subject_orientation; /* orientation of subject in scanner */ AmitkSubjectSex subject_sex; amide_data_t scale_factor; /* user specified factor to multiply data set by */ AmitkConversion conversion; amide_data_t injected_dose; /* in MBq */ AmitkDoseUnit displayed_dose_unit; amide_data_t subject_weight; /* in KG */ AmitkWeightUnit displayed_weight_unit; amide_data_t cylinder_factor; /* (MBq/cc)/Image Unit */ AmitkCylinderUnit displayed_cylinder_unit; /* MRI parameters */ amide_time_t inversion_time; /* in milliseconds */ amide_time_t echo_time; /* in milliseconds */ gdouble diffusion_b_value; AmitkPoint diffusion_direction; /* Thresholding */ AmitkThresholding thresholding; /* what sort of thresholding we're using (per slice, global, etc.) */ AmitkThresholdStyle threshold_style; /* min/max or center/width */ amide_data_t threshold_max[2]; /* the thresholds to use for this volume */ amide_data_t threshold_min[2]; guint threshold_ref_frame[2]; amide_data_t threshold_window[AMITK_WINDOW_NUM][AMITK_LIMIT_NUM]; /* which gates we're showing */ amide_intpoint_t view_start_gate; amide_intpoint_t view_end_gate; /* parameters calculated as needed or on loading the object */ /* in theory, could be recalculated on the fly, but used enough we'll store... */ AmitkRawData * distribution; /* 1D array of data distribution, used in thresholding */ gboolean min_max_calculated; /* the min/max values can be calculated on demand */ amide_data_t global_max; amide_data_t global_min; amide_data_t * frame_max; amide_data_t * frame_min; AmitkRawData * current_scaling_factor; /* external_scaling * internal_scaling_factor[] */ amide_intpoint_t num_view_gates; GList * slice_cache; /* only used by derived data sets (slices and projections) */ /* this is a weak pointer, it should be NULL'ed automatically by gtk on the parent's destruction */ AmitkDataSet * slice_parent; /* misc data items - not saved in .xif file */ gint instance_number; /* used by dcmtk_interface.cc occasionally for sorting */ gint gate_num; /* used by dcmtk_interface.cc occasionally for sorting */ }; struct _AmitkDataSetClass { AmitkVolumeClass parent_class; void (* thresholding_changed) (AmitkDataSet * ds); void (* threshold_style_changed) (AmitkDataSet * ds); void (* thresholds_changed) (AmitkDataSet * ds); void (* windows_changed) (AmitkDataSet * ds); void (* color_table_changed) (AmitkDataSet * ds, AmitkViewMode * view_mode); void (* color_table_independent_changed)(AmitkDataSet * ds, AmitkViewMode * view_mode); void (* interpolation_changed) (AmitkDataSet * ds); void (* rendering_changed) (AmitkDataSet * ds); void (* subject_orientation_changed) (AmitkDataSet * ds); void (* subject_sex_changed) (AmitkDataSet * ds); void (* conversion_changed) (AmitkDataSet * ds); void (* scale_factor_changed) (AmitkDataSet * ds); void (* modality_changed) (AmitkDataSet * ds); void (* time_changed) (AmitkDataSet * ds); void (* voxel_size_changed) (AmitkDataSet * ds); void (* data_set_changed) (AmitkDataSet * ds); void (* invalidate_slice_cache) (AmitkDataSet * ds); void (* view_gates_changed) (AmitkDataSet * ds); }; /* Application-level methods */ GType amitk_data_set_get_type (void); AmitkDataSet * amitk_data_set_new (AmitkPreferences * preferences, const AmitkModality modality); AmitkDataSet * amitk_data_set_new_with_data (AmitkPreferences * preferences, const AmitkModality modality, const AmitkFormat format, const AmitkVoxel dim, const AmitkScalingType scaling_type); AmitkDataSet * amitk_data_set_import_raw_file (const gchar * file_name, const AmitkRawFormat raw_format, const AmitkVoxel data_dim, guint file_offset, AmitkPreferences * preferences, const AmitkModality modality, const gchar * data_set_name, const AmitkPoint voxel_size, const amide_data_t scale_factor, AmitkUpdateFunc update_func, gpointer update_data); GList * amitk_data_set_import_file (AmitkImportMethod method, int submethod, const gchar * filename, gchar ** pstudyname, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data); gboolean amitk_data_set_export_to_file (AmitkDataSet * ds, const AmitkExportMethod method, const int submethod, const gchar * filename, const gchar * studyname, const gboolean resliced, const AmitkPoint voxel_size, const AmitkVolume * bounding_box, AmitkUpdateFunc update_func, gpointer update_data); gboolean amitk_data_sets_export_to_file (GList * data_sets, const AmitkExportMethod method, const int submethod, const gchar * filename, const gchar * studyname, const AmitkPoint voxel_size, const AmitkVolume * bounding_box, AmitkUpdateFunc update_func, gpointer update_data); amide_data_t amitk_data_set_get_global_max (AmitkDataSet * ds); amide_data_t amitk_data_set_get_global_min (AmitkDataSet * ds); amide_data_t amitk_data_set_get_frame_max (AmitkDataSet * ds, const guint frame); amide_data_t amitk_data_set_get_frame_min (AmitkDataSet * ds, const guint frame); AmitkColorTable amitk_data_set_get_color_table_to_use(AmitkDataSet * ds, const AmitkViewMode view_mode); void amitk_data_set_set_modality (AmitkDataSet * ds, const AmitkModality modality); void amitk_data_set_set_scan_start (AmitkDataSet * ds, const amide_time_t start); void amitk_data_set_set_frame_duration (AmitkDataSet * ds, const guint frame, amide_time_t duration); void amitk_data_set_set_voxel_size (AmitkDataSet * ds, const AmitkPoint voxel_size); void amitk_data_set_set_thresholding (AmitkDataSet * ds, const AmitkThresholding thresholding); void amitk_data_set_set_threshold_style(AmitkDataSet * ds, const AmitkThresholdStyle threshold_style); void amitk_data_set_set_threshold_max (AmitkDataSet * ds, guint which_reference, amide_data_t value); void amitk_data_set_set_threshold_min (AmitkDataSet * ds, guint which_reference, amide_data_t value); void amitk_data_set_set_threshold_ref_frame (AmitkDataSet * ds, guint which_reference, guint frame); void amitk_data_set_set_color_table (AmitkDataSet * ds, const AmitkViewMode view_mode, const AmitkColorTable new_color_table); void amitk_data_set_set_color_table_independent(AmitkDataSet * ds, const AmitkViewMode view_mode, const gboolean independent); void amitk_data_set_set_interpolation (AmitkDataSet * ds, const AmitkInterpolation new_interpolation); void amitk_data_set_set_rendering (AmitkDataSet * ds, const AmitkRendering new_rendering); void amitk_data_set_set_subject_orientation (AmitkDataSet * ds, const AmitkSubjectOrientation subject_orientation); void amitk_data_set_set_subject_sex (AmitkDataSet * ds, const AmitkSubjectSex subject_sex); void amitk_data_set_set_scan_date (AmitkDataSet * ds, const gchar * new_date); void amitk_data_set_set_subject_name (AmitkDataSet * ds, const gchar * new_name); void amitk_data_set_set_subject_id (AmitkDataSet * ds, const gchar * new_id); void amitk_data_set_set_subject_dob (AmitkDataSet * ds, const gchar * new_dob); void amitk_data_set_set_series_number (AmitkDataSet * ds, const gint new_series_number); void amitk_data_set_set_dicom_image_type(AmitkDataSet * ds, const gchar * image_type); void amitk_data_set_set_conversion (AmitkDataSet * ds, AmitkConversion new_conversion); void amitk_data_set_set_scale_factor (AmitkDataSet * ds, amide_data_t new_scale_factor); void amitk_data_set_set_injected_dose (AmitkDataSet * ds, amide_data_t new_injected_dose); void amitk_data_set_set_subject_weight (AmitkDataSet * ds, amide_data_t new_subject_weight); void amitk_data_set_set_cylinder_factor(AmitkDataSet * ds, amide_data_t new_cylinder_factor); void amitk_data_set_set_displayed_dose_unit (AmitkDataSet * ds, AmitkDoseUnit new_dose_unit); void amitk_data_set_set_displayed_weight_unit (AmitkDataSet * ds, AmitkWeightUnit new_weight_unit); void amitk_data_set_set_displayed_cylinder_unit(AmitkDataSet * ds, AmitkCylinderUnit new_cylinder_unit); void amitk_data_set_set_inversion_time (AmitkDataSet * ds, amide_time_t new_inversion_time); void amitk_data_set_set_echo_time (AmitkDataSet * ds, amide_time_t new_echo_time); void amitk_data_set_set_diffusion_b_value(AmitkDataSet * ds, gdouble b_value); void amitk_data_set_set_diffusion_direction(AmitkDataSet * ds, AmitkPoint direction); void amitk_data_set_set_threshold_window (AmitkDataSet * ds, const AmitkWindow window, const AmitkLimit limit, const amide_data_t value); void amitk_data_set_set_view_start_gate(AmitkDataSet * ds, amide_intpoint_t start_gate); void amitk_data_set_set_view_end_gate (AmitkDataSet * ds, amide_intpoint_t end_gate); void amitk_data_set_set_gate_time (AmitkDataSet * ds, const guint gate, amide_time_t time); amide_time_t amitk_data_set_get_gate_time (const AmitkDataSet * ds, const guint gate); amide_time_t amitk_data_set_get_start_time (const AmitkDataSet * ds, const guint frame); amide_time_t amitk_data_set_get_end_time (const AmitkDataSet * ds, const guint frame); amide_time_t amitk_data_set_get_midpt_time (const AmitkDataSet *ds, const guint frame); guint amitk_data_set_get_frame (const AmitkDataSet * ds, const amide_time_t time); amide_time_t amitk_data_set_get_frame_duration (const AmitkDataSet * ds, guint frame); amide_time_t amitk_data_set_get_min_frame_duration (const AmitkDataSet * ds); void amitk_data_set_calc_far_corner (AmitkDataSet * ds); /* note: calling any of the get_*_max or get_*_min functions will automatically call calc_min_max if needed. The main reason to call this function independently is if you know the min/max values will be needed later, and you'd like to put up a progress dialog. */ void amitk_data_set_calc_min_max (AmitkDataSet * ds, AmitkUpdateFunc update_func, gpointer update_data); void amitk_data_set_calc_min_max_if_needed(AmitkDataSet * ds, AmitkUpdateFunc update_func, gpointer update_data); void amitk_data_set_slice_calc_min_max (AmitkDataSet * ds, const amide_intpoint_t frame, const amide_intpoint_t gate, const amide_intpoint_t z, amitk_format_DOUBLE_t * pmin, amitk_format_DOUBLE_t * pmax); amide_data_t amitk_data_set_get_max (AmitkDataSet * ds, const amide_time_t start, const amide_time_t duration); amide_data_t amitk_data_set_get_min (AmitkDataSet * ds, const amide_time_t start, const amide_time_t duration); void amitk_data_set_get_thresholding_min_max(AmitkDataSet * ds, AmitkDataSet * slice, const amide_time_t start, const amide_time_t duration, amide_data_t * min, amide_data_t * max); void amitk_data_set_calc_distribution (AmitkDataSet * ds, AmitkUpdateFunc update_func, gpointer update_data); amide_data_t amitk_data_set_get_internal_value (const AmitkDataSet * ds, const AmitkVoxel i); amide_data_t amitk_data_set_get_value (const AmitkDataSet * ds, const AmitkVoxel i); amide_data_t amitk_data_set_get_internal_scaling_factor(const AmitkDataSet * ds, const AmitkVoxel i); amide_data_t amitk_data_set_get_scaling_factor (const AmitkDataSet * ds, const AmitkVoxel i); amide_data_t amitk_data_set_get_scaling_intercept(const AmitkDataSet * ds, const AmitkVoxel i); void amitk_data_set_set_value (AmitkDataSet *ds, const AmitkVoxel i, const amide_data_t value, const gboolean signal_change); void amitk_data_set_set_internal_value (AmitkDataSet *ds, const AmitkVoxel i, const amide_data_t internal_value, const gboolean signal_change); void amitk_data_set_get_projections (AmitkDataSet * ds, const guint frame, const guint gate, AmitkDataSet ** projections, AmitkUpdateFunc update_func, gpointer update_data); AmitkDataSet * amitk_data_set_get_cropped (const AmitkDataSet * ds, const AmitkVoxel start, const AmitkVoxel end, const AmitkFormat format, const AmitkScalingType scaling_type, AmitkUpdateFunc update_func, gpointer update_data); AmitkDataSet * amitk_data_set_get_filtered (const AmitkDataSet * ds, const AmitkFilter filter_type, const gint kernel_size, const amide_real_t fwhm, AmitkUpdateFunc update_func, gpointer update_data); AmitkDataSet * amitk_data_set_get_slice (AmitkDataSet * ds, const amide_time_t start, const amide_time_t duration, const amide_intpoint_t gate, const AmitkCanvasPoint pixel_size, const AmitkVolume * slice_volume); void amitk_data_set_get_line_profile (AmitkDataSet * ds, const amide_time_t start, const amide_time_t duration, const AmitkPoint start_point, const AmitkPoint end_point, GPtrArray ** preturn_data); gint amitk_data_sets_count (GList * objects, gboolean recurse); amide_time_t amitk_data_sets_get_min_frame_duration(GList * objects); amide_real_t amitk_data_sets_get_min_voxel_size (GList * objects); amide_real_t amitk_data_sets_get_max_min_voxel_size(GList * objects); GList * amitk_data_sets_get_slices (GList * objects, GList ** pslice_cache, const gint max_slice_cache_size, const amide_time_t start, const amide_time_t duration, const amide_intpoint_t gate, const AmitkCanvasPoint pixel_size, const AmitkVolume * view_volume); AmitkDataSet * amitk_data_sets_find_with_slice_parent(GList * slices, const AmitkDataSet * slice_parent); GList * amitk_data_sets_remove_with_slice_parent(GList * slices, const AmitkDataSet * slice_parent); AmitkDataSet * amitk_data_sets_math_unary (AmitkDataSet * ds1, AmitkOperationUnary operation, amide_data_t parameter0, amide_data_t parameter1, AmitkUpdateFunc update_func, gpointer update_data); AmitkDataSet * amitk_data_sets_math_binary (AmitkDataSet * ds1, AmitkDataSet * ds2, AmitkOperationBinary operation, amide_data_t parameter0, amide_data_t parameter1, gboolean by_frame, gboolean maintain_ds1_dim, AmitkUpdateFunc update_func, gpointer update_data); /* -------- defines ----------- */ #define amitk_data_set_get_gate_time_mem(ds) (g_try_new0(amide_time_t,(ds)->raw_data->dim.g)) #define amitk_data_set_get_frame_duration_mem(ds) (g_try_new0(amide_time_t,(ds)->raw_data->dim.t)) #define amitk_data_set_get_frame_min_max_mem(ds) (g_try_new0(amide_data_t,(ds)->raw_data->dim.t)) const gchar * amitk_scaling_type_get_name (const AmitkScalingType scaling_type); const gchar * amitk_operation_unary_get_name (const AmitkOperationUnary operation); const gchar * amitk_operation_binary_get_name (const AmitkOperationBinary operation); const gchar * amitk_interpolation_get_name (const AmitkInterpolation interpolation); const gchar * amitk_rendering_get_name (const AmitkRendering rendering); const gchar * amitk_subject_orientation_get_name(const AmitkSubjectOrientation subject_orientation); const gchar * amitk_subject_sex_get_name (const AmitkSubjectSex subject_sex); const gchar * amitk_thresholding_get_name (const AmitkThresholding thresholding); const gchar * amitk_threshold_style_get_name (const AmitkThresholdStyle threshold_style); const gchar * amitk_conversion_get_name (const AmitkConversion conversion); const gchar * amitk_weight_unit_get_name (const AmitkWeightUnit weight_unit); const gchar * amitk_dose_unit_get_name (const AmitkDoseUnit dose_unit); const gchar * amitk_cylinder_unit_get_name (const AmitkCylinderUnit cylinder_unit); amide_data_t amitk_weight_unit_convert_to (const amide_data_t kg, const AmitkWeightUnit weight_unit); amide_data_t amitk_weight_unit_convert_from (const amide_data_t weight, const AmitkWeightUnit weight_unit); amide_data_t amitk_dose_unit_convert_to (const amide_data_t MBq, const AmitkDoseUnit dose_unit); amide_data_t amitk_dose_unit_convert_from (const amide_data_t dose, const AmitkDoseUnit dose_unit); amide_data_t amitk_cylinder_unit_convert_to (const amide_data_t MBq_cc_image_units, const AmitkCylinderUnit cylinder_unit); amide_data_t amitk_cylinder_unit_convert_from (const amide_data_t cylinder_factor, const AmitkCylinderUnit cylinder_unit); /* external variables */ extern AmitkColorTable amitk_modality_default_color_table[]; extern const gchar * amitk_interpolation_explanations[]; extern const gchar * amitk_rendering_explanation; extern const gchar * amitk_import_menu_names[]; extern const gchar * amitk_import_menu_explanations[]; extern const gchar * amitk_export_menu_names[]; extern const gchar * amitk_export_menu_explanations[]; extern const gchar * amitk_conversion_names[]; extern const gchar * amitk_dose_unit_names[]; extern const gchar * amitk_weight_unit_names[]; extern const gchar * amitk_cylinder_unit_names[]; extern const gchar * amitk_scaling_menu_names[]; extern amide_data_t amitk_window_default[AMITK_WINDOW_NUM][AMITK_LIMIT_NUM]; G_END_DECLS #endif /* __AMITK_DATA_SET_H__ */ amide-1.0.5/src/raw_data_import.h0000644000175000017500000000207112270274521016562 0ustar loeningloening/* raw_data_import.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* header files that are always needed with this file */ #include "amitk_data_set.h" /* external functions */ AmitkDataSet * raw_data_import(const gchar * filename, AmitkPreferences * preferences); amide-1.0.5/src/xml.h0000644000175000017500000000720112270274460014210 0ustar loeningloening/* xml.c - convience functions for working with xml files * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __XML_H__ #define __XML_H__ /* header files that are always associated with this header file */ #include "amitk_type.h" #include #include G_BEGIN_DECLS /* functions */ void xml_convert_radix_to_local(gchar * string); gboolean xml_check_file_32bit_okay(guint64 value); gboolean xml_node_exists(xmlNodePtr nodes, const gchar * descriptor); xmlNodePtr xml_get_node(xmlNodePtr nodes, const gchar * descriptor); gchar * xml_get_string(xmlNodePtr nodes, const gchar * descriptor); amide_time_t xml_get_time(xmlNodePtr nodes, const gchar * descriptor, gchar **perror_buf); amide_time_t * xml_get_times(xmlNodePtr nodes, const gchar * descriptor, guint num_times, gchar **perror_buf); amide_data_t xml_get_data(xmlNodePtr nodes, const gchar * descriptor, gchar **perror_buf); amide_data_t xml_get_data_with_default(xmlNodePtr nodes, const gchar * descriptor, amide_data_t default_data); amide_real_t xml_get_real(xmlNodePtr node, const gchar * descriptor, gchar **perror_buf); amide_real_t xml_get_real_with_default(xmlNodePtr node, const gchar * descriptor, amide_real_t default_real); gboolean xml_get_boolean(xmlNodePtr nodes, const gchar * descriptor, gchar **perror_buf); gboolean xml_get_boolean_with_default(xmlNodePtr nodes, const gchar * descriptor, gboolean default_boolean); gint xml_get_int(xmlNodePtr nodes, const gchar * descriptor, gchar **perror_buf); gint xml_get_int_with_default(xmlNodePtr nodes, const gchar * descriptor, gint default_int); guint xml_get_uint(xmlNodePtr nodes, const gchar * descriptor, gchar **perror_buf); guint xml_get_uint_with_default(xmlNodePtr nodes, const gchar * descriptor, guint default_uint); void xml_get_location_and_size(xmlNodePtr nodes, const gchar * descriptor, guint64 * location, guint64 * size, gchar **perror_buf); void xml_save_string(xmlNodePtr node, const gchar * descriptor, const gchar * string); void xml_save_time(xmlNodePtr node, const gchar * descriptor, const amide_time_t num); void xml_save_times(xmlNodePtr node, const gchar * descriptor, const amide_time_t * numbers, const int num); void xml_save_data(xmlNodePtr node, const gchar * descriptor, const amide_data_t num); void xml_save_real(xmlNodePtr node, const gchar * descriptor, const amide_real_t num); void xml_save_boolean(xmlNodePtr node, const gchar * descriptor, const gboolean value); void xml_save_int(xmlNodePtr node, const gchar * descriptor, const gint num); void xml_save_uint(xmlNodePtr node, const gchar * descriptor, const guint num); void xml_save_location_and_size(xmlNodePtr node, const gchar * descriptor, const guint64 location, const guint64 size); xmlDocPtr xml_open_doc(gchar * filename, FILE * study_file, guint64 location, guint64 size, gchar ** perror_buf); G_END_DECLS #endif /* __XML_H__ */ amide-1.0.5/src/ui_preferences_dialog.h0000664000175000017500000000171412270274472017735 0ustar loeningloening/* ui_preferences_dialog.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* external functions */ void ui_preferences_dialog_create(ui_study_t * ui_study); amide-1.0.5/src/render.h0000644000175000017500000002130012270274517014666 0ustar loeningloening/* render.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef AMIDE_LIBVOLPACK_SUPPORT #ifndef __RENDER_H__ #define __RENDER_H__ /* header files that are always needed with this file */ #include #include "amitk_object.h" #include "amitk_data_set.h" /* -------------- structures and such ------------- */ typedef gshort rendering_normal_t; typedef guchar rendering_density_t; typedef guchar rendering_gradient_t; typedef enum {DENSITY_CLASSIFICATION, GRADIENT_CLASSIFICATION, NUM_CLASSIFICATIONS} classification_t; typedef enum {HIGHEST, HIGH, FAST, FASTEST, NUM_QUALITIES} rendering_quality_t; typedef enum {OPACITY, GRAYSCALE, NUM_PIXEL_TYPES} pixel_type_t; typedef enum {CURVE_LINEAR, CURVE_SPLINE, NUM_CURVE_TYPES} curve_type_t; typedef struct { /* contents of a voxel */ rendering_normal_t normal; /* encoded surface normal vector */ rendering_density_t density; /* original density */ rendering_gradient_t gradient; /* original gradient */ } rendering_voxel_t; /* dummy variable used in some macros below */ rendering_voxel_t * dummy_voxel; /* ----------- defines ------------- */ #define RENDERING_BYTES_PER_VOXEL sizeof(rendering_voxel_t)/* voxel size in bytes */ #define RENDERING_VOXEL_FIELDS 3 /* number of fields in voxel */ #define RENDERING_SHADE_FIELDS 2 /* number of fields used for shading (normal and density); must be the 1st fields of RawVoxel */ #define RENDERING_CLSFY_FIELDS 2 /* number of fields used for classifying (density and gradient); can be any fields in the RawVoxel */ #define RENDERING_NORMAL_FIELD 0 #define RENDERING_NORMAL_OFFSET vpFieldOffset(dummy_voxel, normal) #define RENDERING_NORMAL_SIZE sizeof(rendering_normal_t) #define RENDERING_NORMAL_MAX VP_NORM_MAX /*7923 last time I checked */ #define RENDERING_DENSITY_FIELD 1 #define RENDERING_DENSITY_OFFSET vpFieldOffset(dummy_voxel, density) #define RENDERING_DENSITY_SIZE sizeof(rendering_density_t) #define RENDERING_DENSITY_MAX VP_SCALAR_MAX /*255 last time I checked */ #define RENDERING_GRADIENT_FIELD 2 #define RENDERING_GRADIENT_OFFSET vpFieldOffset(dummy_voxel, gradient) #define RENDERING_GRADIENT_SIZE sizeof(rendering_gradient_t) #define RENDERING_GRADIENT_MAX VP_GRAD_MAX /* 221 last time I checked */ #define RENDERING_DENSITY_PARAM 0 /* classification parameter */ #define RENDERING_GRADIENT_PARAM 1 /* classification parameter */ /* initial density and gradient ramps */ //#define RENDERING_DENSITY_RAMP_X {0.0, 20, RENDERING_DENSITY_MAX} //#define RENDERING_DENSITY_RAMP_Y {0.0, 1.0, 1.0} //#define RENDERING_DENSITY_RAMP_POINTS 3 #define RENDERING_DENSITY_RAMP_X {0.0, RENDERING_DENSITY_MAX} #define RENDERING_DENSITY_RAMP_Y {0.0, 1.0} #define RENDERING_DENSITY_RAMP_POINTS 2 #define RENDERING_GRADIENT_RAMP_X {0.0, RENDERING_GRADIENT_MAX} #define RENDERING_GRADIENT_RAMP_Y {0.0, 1.0} #define RENDERING_GRADIENT_RAMP_Y_FLAT {0.2, 0.2} #define RENDERING_GRADIENT_RAMP_POINTS 2 #define RENDERING_OCTREE_DENSITY_THRESH 4 #define RENDERING_OCTREE_GRADIENT_THRESH 4 #define RENDERING_OCTREE_BASE_NODE_SIZE 4 #define RENDERING_DEFAULT_ZOOM 1.0 #define RENDERING_DEFAULT_QUALITY HIGHEST #define RENDERING_DEFAULT_PIXEL_TYPE GRAYSCALE #define RENDERING_DEFAULT_DEPTH_CUEING FALSE #define RENDERING_DEFAULT_FRONT_FACTOR 1.0 #define RENDERING_DEFAULT_DENSITY 1.0 /* ------------ some more structures ------------ */ /* our rendering context structure */ typedef struct _rendering_t { vpContext * vpc; /* VolPack rendering Context */ AmitkObject * object; gchar * name; AmitkColorTable color_table; pixel_type_t pixel_type; amide_time_t start; amide_time_t duration; gint view_start_gate; gint view_end_gate; AmitkVolume * transformed_volume; /* volume in rendering space in which the data resides */ AmitkVolume * extraction_volume; /* set on init, used for extracting data into the context */ rendering_voxel_t * rendering_data; amide_real_t voxel_size; /* volpack needs isotropic voxels */ AmitkVoxel dim; /* dimensions of our rendering_data and image */ guchar * image; gfloat shade_table[RENDERING_NORMAL_MAX+1]; /* shading lookup table */ gfloat density_ramp[RENDERING_DENSITY_MAX+1]; /* opacity as a function */ gfloat gradient_ramp[RENDERING_GRADIENT_MAX+1]; /* opacity as a function */ gint * ramp_x[NUM_CLASSIFICATIONS]; gfloat * ramp_y[NUM_CLASSIFICATIONS]; guint num_points[NUM_CLASSIFICATIONS]; curve_type_t curve_type[NUM_CLASSIFICATIONS]; gboolean zero_fill; gboolean optimize_rendering; gboolean need_rerender; gboolean need_reclassify; guint ref_count; } rendering_t; /* a list of rendering contexts */ typedef struct _renderings_t renderings_t; struct _renderings_t { rendering_t * rendering; guint ref_count; renderings_t * next; }; /* notes: the update function needs to have the folowing syntax: gboolean update_func(gchar * message, gfloat fraction, gpointer data); */ /* external functions */ rendering_t * rendering_unref(rendering_t * rendering); rendering_t * rendering_init(const AmitkObject * object, AmitkVolume * rendering_volume, const amide_real_t min_voxel_size, const amide_time_t start, const amide_time_t duration, const gboolean zero_fill, const gboolean optimize_rendering, const gboolean no_gradient_opacity, AmitkUpdateFunc update_func, gpointer update_data); gboolean rendering_reload_object(rendering_t * rendering, const amide_time_t new_start, const amide_time_t new_duration, AmitkUpdateFunc update_func, gpointer update_data); gboolean rendering_load_object(rendering_t * rendering, AmitkUpdateFunc update_func, gpointer update_data); void rendering_set_space(rendering_t * rendering, AmitkSpace * space); void rendering_set_rotation(rendering_t * rendering, AmitkAxis dir, gdouble rotation); void rendering_reset_rotation(rendering_t * rendering); void rendering_set_quality(rendering_t * rendering, rendering_quality_t quality); void rendering_set_image(rendering_t * rendering, pixel_type_t pixel_type, gdouble zoom); void rendering_set_depth_cueing(rendering_t * rendering, gboolean state); void rendering_set_depth_cueing_parameters(rendering_t * rendering, gdouble front_factor, gdouble density); void rendering_render(rendering_t * rendering); renderings_t * renderings_unref(renderings_t * renderings); renderings_t * renderings_init(GList * objects, const amide_time_t start, const amide_time_t duration, const gboolean zero_fill, const gboolean optimize_rendering, const gboolean no_gradient_opacity, const amide_real_t fov, const AmitkPoint view_center, AmitkUpdateFunc update_func, gpointer update_data); gboolean renderings_reload_objects(renderings_t * renderings, const amide_time_t start, const amide_time_t duration, AmitkUpdateFunc update_func, gpointer update_data); void renderings_set_space(renderings_t * renderings, AmitkSpace * space); void renderings_set_rotation(renderings_t * renderings, AmitkAxis dir, gdouble rotation); void renderings_reset_rotation(renderings_t * renderings); void renderings_set_quality(renderings_t * renderlings, rendering_quality_t quality); void renderings_set_zoom(renderings_t * renderings, gdouble zoom); void renderings_set_depth_cueing(renderings_t * renderings, gboolean state); void renderings_set_depth_cueing_parameters(renderings_t * renderings, gdouble front_factor, gdouble density); void renderings_render(renderings_t * renderings); guint renderings_count(renderings_t * renderings); /* external variables */ extern gchar * rendering_quality_names[]; extern gchar * pixel_type_names[]; /* external funnctions from render.c */ //gboolean render_set_material_shinyness(gint material_num, gdouble shinyness); #endif /* __RENDERING_H__ */ #endif /* AMIDE_LIBVOLPACK_SUPPORT */ amide-1.0.5/src/amitk_line_profile.h0000664000175000017500000000736112270274562017260 0ustar loeningloening/* amitk_line_profile.h * * Part of amide - Amide's a Medical Image Data Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_LINE_PROFILE_H__ #define __AMITK_LINE_PROFILE_H__ /* header files that are always needed with this file */ #include #include "amitk_object.h" G_BEGIN_DECLS #define AMITK_TYPE_LINE_PROFILE (amitk_line_profile_get_type ()) #define AMITK_LINE_PROFILE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), AMITK_TYPE_LINE_PROFILE, AmitkLineProfile)) #define AMITK_LINE_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_LINE_PROFILE, AmitkLineProfileClass)) #define AMITK_IS_LINE_PROFILE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), AMITK_TYPE_LINE_PROFILE)) #define AMITK_IS_LINE_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_LINE_PROFILE)) #define AMITK_LINE_PROFILE_GET_CLASS(object) (G_TYPE_CHECK_GET_CLASS ((object), AMITK_TYPE_LINE_PROFILE, AmitkLineProfileClass)) #define AMITK_LINE_PROFILE_VIEW(linep) (AMITK_LINE_PROFILE(linep)->view) #define AMITK_LINE_PROFILE_ANGLE(linep) (AMITK_LINE_PROFILE(linep)->angle) #define AMITK_LINE_PROFILE_VISIBLE(linep) (AMITK_LINE_PROFILE(linep)->visible) #define AMITK_LINE_PROFILE_START_POINT(linep) (AMITK_LINE_PROFILE(linep)->start_point) #define AMITK_LINE_PROFILE_END_POINT(linep) (AMITK_LINE_PROFILE(linep)->end_point) typedef struct _AmitkLineProfileClass AmitkLineProfileClass; typedef struct _AmitkLineProfile AmitkLineProfile; struct _AmitkLineProfile { GObject parent; AmitkView view; amide_real_t angle; /* in radians */ gboolean visible; /* in base coordinate frame. These are updated by the canvas */ AmitkPoint start_point; AmitkPoint end_point; }; struct _AmitkLineProfileClass { GObjectClass parent_class; void (* line_profile_changed) (AmitkLineProfile * line_profile); }; typedef struct _AmitkLineProfileDataElement AmitkLineProfileDataElement; struct _AmitkLineProfileDataElement { amide_real_t value; amide_real_t location; }; /* ------------ external functions ---------- */ GType amitk_line_profile_get_type (void); AmitkLineProfile* amitk_line_profile_new (void); void amitk_line_profile_copy_in_place (AmitkLineProfile * dest_profile, const AmitkLineProfile * src_profile); void amitk_line_profile_set_view (AmitkLineProfile * line_profile, const AmitkView view); void amitk_line_profile_set_angle (AmitkLineProfile * line_profile, const amide_real_t angle); void amitk_line_profile_set_visible (AmitkLineProfile * line_profile, const gboolean visible); void amitk_line_profile_set_start_point(AmitkLineProfile * line_profile, const AmitkPoint start_point); void amitk_line_profile_set_end_point (AmitkLineProfile * line_profile, const AmitkPoint end_point); G_END_DECLS #endif /* __AMITK_LINE_PROFILE_H__ */ amide-1.0.5/src/xml.c0000644000175000017500000004422612270274051014207 0ustar loeningloening/* xml.c - convience functions for working with xml files * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "xml.h" #include #include #include #include "amitk_common.h" #define BOOLEAN_STRING_MAX_LENGTH 10 /* when we stop checking */ static char * true_string = "true"; static char * false_string = "false"; /* automagically converts the string to having the right radix for the current locale */ /* this crap needs to be used because on windows, setlocale isn't implemented on mingw */ void xml_convert_radix_to_local(gchar * conv_str) { gboolean period=TRUE; gdouble temp_float; gchar * radix_ptr; /* mingw doesn't really support setlocale, so use the following to figure out if we're using a period or comma for the radix */ sscanf("1,9", "%lf", &temp_float); if (temp_float > 1.1) period=FALSE; if (period == FALSE) { /* using comma's */ while ((radix_ptr = strchr(conv_str, '.')) != NULL) *radix_ptr = ','; } else { /* using period */ while ((radix_ptr = strchr(conv_str, ',')) != NULL) *radix_ptr = '.'; } return; } /* returns FALSE if we'll have problems reading this file on a 32bit system */ gboolean xml_check_file_32bit_okay(guint64 value) { #if !defined (G_PLATFORM_WIN32) /* for some reason, 64bit calculations on windows returns garbage */ if (sizeof(long) < sizeof(guint64)) { guint64 check = ((guint64) value) >> ((guint64) 31); /* long is signed, so 31 bits */ if (check > 0) return FALSE; } #endif // the following doesn't work on win32 either // if (sizeof(long) < sizeof(guint64)) { // guint32 * value32; // value32 = (guint32 *) &value; // //#if (G_BYTE_ORDER == G_BIG_ENDIAN) // if (value32[0] > 0) // return FALSE; //#else /* little endian */ // if (value32[1] > 0) // return FALSE; //#endif // } return TRUE; } /* utility functions */ gboolean xml_node_exists(xmlNodePtr nodes, const gchar * descriptor) { if (xml_get_node(nodes, descriptor) != NULL) return TRUE; else return FALSE; } /* ----------------- the load functions ------------------ */ /* go through a list of nodes, and return a pointer to the node matching the descriptor */ xmlNodePtr xml_get_node(xmlNodePtr nodes, const gchar * descriptor) { if (nodes == NULL) return NULL; else { if (xmlStrcmp(nodes->name, (const xmlChar *) descriptor) == 0) return nodes; else return xml_get_node(nodes->next, descriptor); } } /* go through a list of nodes, and return the text which matches the descriptor */ gchar * xml_get_string(xmlNodePtr nodes, const gchar * descriptor) { gchar * xml_str; gchar * return_str; xml_str = (gchar *) xmlNodeGetContent(xml_get_node(nodes, descriptor)); if (xml_str != NULL) return_str = g_strdup_printf("%s", xml_str); else return_str = NULL; free(xml_str); return return_str; } amide_time_t xml_get_time(xmlNodePtr nodes, const gchar * descriptor, gchar ** perror_buf) { gchar * temp_str; amide_time_t return_time; gint error=0; gchar * saved_locale; saved_locale = g_strdup(setlocale(LC_NUMERIC,NULL)); setlocale(LC_NUMERIC,"POSIX"); temp_str = xml_get_string(nodes, descriptor); if (temp_str != NULL) { xml_convert_radix_to_local(temp_str); #if (SIZE_OF_AMIDE_TIME_T == 8) /* convert to double */ error = sscanf(temp_str, "%lf", &return_time); #elif (SIZE_OF_AMIDE_TIME_T == 4) /* convert to float */ error = sscanf(temp_str, "%f", &return_time); #else #error "Unknown size for SIZE_OF_AMIDE_TIME_T" #endif g_free(temp_str); } if ((temp_str == NULL) || (error == EOF)) { return_time = 0.0; amitk_append_str_with_newline(perror_buf,_("Couldn't read time value for %s, substituting %5.3f"), descriptor, return_time); } setlocale(LC_NUMERIC, saved_locale); g_free(saved_locale); return return_time; } amide_time_t * xml_get_times(xmlNodePtr nodes, const gchar * descriptor, guint num_times, gchar ** perror_buf) { gchar * temp_str; gchar ** string_chunks; amide_time_t * return_times=NULL; gint error; guint i; gchar * saved_locale; gboolean corrupted=FALSE; saved_locale = g_strdup(setlocale(LC_NUMERIC,NULL)); setlocale(LC_NUMERIC,"POSIX"); temp_str = xml_get_string(nodes, descriptor); if ((return_times = g_try_new(amide_time_t,num_times)) == NULL) { amitk_append_str_with_newline(perror_buf, _("Couldn't allocate memory space for time data")); return return_times; } if (temp_str != NULL) { /* split-up the string so we can process it */ string_chunks = g_strsplit(temp_str, "\t", num_times); g_free(temp_str); for (i=0; (i */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_FILTER_H__ #define __AMITK_FILTER_H__ #include #ifndef _GNU_SOURCE #define _GNU_SOURCE /* use GNU extensions, i.e. NaN */ #endif #include #include "amitk_raw_data.h" #ifdef AMIDE_LIBGSL_SUPPORT #include #endif G_BEGIN_DECLS typedef enum { AMITK_FILTER_GAUSSIAN, AMITK_FILTER_MEDIAN_LINEAR, AMITK_FILTER_MEDIAN_3D, AMITK_FILTER_NUM } AmitkFilter; #define AMITK_FILTER_FFT_SIZE 64 AmitkRawData * amitk_filter_calculate_gaussian_kernel_complex(const AmitkVoxel kernel_size, const AmitkPoint voxel_size, const amide_real_t fwhm); #ifdef AMIDE_LIBGSL_SUPPORT void amitk_filter_3D_FFT(AmitkRawData * data, gsl_fft_complex_wavetable * wavetable, gsl_fft_complex_workspace * workspace); void amitk_filter_inverse_3D_FFT(AmitkRawData * data, gsl_fft_complex_wavetable * wavetable, gsl_fft_complex_workspace * workspace); void amitk_filter_complex_mult(AmitkRawData * data, AmitkRawData * kernel); #endif amide_data_t amitk_filter_find_median_by_partial_sort(amide_data_t * partial_sort_data, gint size); const gchar * amitk_filter_get_name(const AmitkFilter filter); G_END_DECLS #endif /* __AMITK_FILTER_H__ */ amide-1.0.5/src/amitk_marshal.list0000664000175000017500000000064610254203373016753 0ustar loeningloeningOBJECT:OBJECT OBJECT:NONE NONE:POINTER NONE:POINTER,POINTER NONE:NONE NONE:BOXED NONE:BOXED,BOXED NONE:BOXED,DOUBLE NONE:BOXED,DOUBLE,BOXED NONE:ENUM NONE:ENUM,BOXED NONE:ENUM,BOXED,DOUBLE NONE:ENUM,POINTER,DOUBLE NONE:OBJECT NONE:OBJECT,BOOLEAN NONE:OBJECT,BOXED NONE:OBJECT,ENUM NONE:OBJECT,ENUM, BOXED NONE:OBJECT,ENUM, ENUM NONE:UINT, UINT STRING:POINTER,STRING POINTER:POINTER,POINTER POINTER:POINTER,POINTER,POINTER amide-1.0.5/src/tb_crop.c0000664000175000017500000011135412270274011015032 0ustar loeningloening/* tb_crop.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "image.h" #include "tb_crop.h" #include "amitk_threshold.h" #include "amitk_progress_dialog.h" #include "ui_common.h" #define AXIS_WIDTH 120 #define AXIS_HEIGHT 120 #define CURSOR_SIZE 1 #define NUM_ROWS 4 static const char * finish_page_text = N_("When the apply button is hit, a new data set will be created\n" "and placed into the study's tree, consisting of the appropriately\n" "cropped data\n"); typedef enum { TRANSVERSE_PAGE, CORONAL_PAGE, SAGITTAL_PAGE, CONVERSION_PAGE, FINISH_PAGE, NUM_PAGES } which_page_t; typedef enum { RANGE_MIN, RANGE_MAX, NUM_RANGES } range_t; /* data structures */ typedef struct tb_crop_t { GtkWidget * dialog; AmitkVoxel range[NUM_RANGES]; AmitkFormat format; AmitkScalingType scaling_type; guint frame; guint gate; gdouble zoom; amide_data_t threshold_max; amide_data_t threshold_min; AmitkColorTable color_table; gboolean threshold_info_set; AmitkStudy * study; AmitkDataSet * data_set; AmitkDataSet * projections[AMITK_VIEW_NUM]; GtkWidget * canvas[AMITK_VIEW_NUM]; GnomeCanvasItem * image[AMITK_VIEW_NUM]; gint canvas_width[AMITK_VIEW_NUM]; gint canvas_height[AMITK_VIEW_NUM]; GnomeCanvasItem * line[AMITK_VIEW_NUM][2][NUM_RANGES]; GtkWidget * threshold[AMITK_VIEW_NUM]; GList * update_view; gint idle_handler_id; GtkWidget * zoom_spinner[AMITK_VIEW_NUM]; GtkWidget * frame_spinner[AMITK_VIEW_NUM]; GtkWidget * gate_spinner[AMITK_VIEW_NUM]; GtkWidget * spinner[AMITK_VIEW_NUM][AMITK_DIM_NUM][NUM_RANGES]; GtkWidget * mm_label[AMITK_VIEW_NUM][AMITK_AXIS_NUM][NUM_RANGES]; GtkWidget * page[NUM_PAGES]; GtkWidget * progress_dialog; guint reference_count; } tb_crop_t; static void apply_cb(GtkAssistant * assistant, gpointer data); static void close_cb(GtkAssistant * assistant, gpointer data); static tb_crop_t * tb_crop_free(tb_crop_t * tb_crop); static tb_crop_t * tb_crop_init(void); static GtkWidget * create_projection_page(tb_crop_t * tb_crop, AmitkView view); static GtkWidget * create_conversion_page(tb_crop_t * tb_crop); static void prepare_page_cb(GtkAssistant * wizard, GtkWidget * page, gpointer data); static void zoom_spinner_cb(GtkSpinButton * button, gpointer data); static void frame_spinner_cb(GtkSpinButton * button, gpointer data); static void gate_spinner_cb(GtkSpinButton * button, gpointer data); static void spinner_cb(GtkSpinButton * button, gpointer data); static void projection_thresholds_changed_cb(AmitkDataSet * projection, gpointer data); static void projection_color_table_changed_cb(AmitkDataSet * projection, AmitkViewMode view_mode, gpointer data); static void change_format_cb(GtkWidget * widget, gpointer data); static void change_scaling_type_cb(GtkWidget * widget, gpointer data); static void update_mm_labels(tb_crop_t * tb_crop, AmitkView view); static void update_crop_lines(tb_crop_t * tb_crop, AmitkView view); static void add_canvas_update(tb_crop_t * tb_crop, AmitkView view); static gboolean update_canvas_while_idle(gpointer tb_crop); /* function called when the finish button is hit */ static void apply_cb(GtkAssistant * assistant, gpointer data) { tb_crop_t * tb_crop = data; AmitkDataSet * cropped; /* disable the buttons */ gtk_widget_set_sensitive(GTK_WIDGET(assistant), FALSE); /* generate the new data set */ cropped = amitk_data_set_get_cropped(tb_crop->data_set, tb_crop->range[RANGE_MIN], tb_crop->range[RANGE_MAX], tb_crop->format, tb_crop->scaling_type, amitk_progress_dialog_update, tb_crop->progress_dialog); /* if successful, add the new data set to the study and quit*/ if (cropped != NULL) { amitk_object_add_child(AMITK_OBJECT(tb_crop->study), AMITK_OBJECT(cropped)); /* this adds a reference to the data set*/ amitk_object_unref(cropped); /* so remove a reference */ } else g_warning("Failed to generate cropped data set"); /* close_cb gets run automatically on close */ return; } /* function called to cancel the dialog */ static void close_cb(GtkAssistant * assistant, gpointer data) { tb_crop_t * tb_crop = data; GtkWidget * dialog = tb_crop->dialog; tb_crop = tb_crop_free(tb_crop); gtk_widget_destroy(dialog); return; } static GtkWidget * create_projection_page(tb_crop_t * tb_crop, AmitkView view) { GtkWidget * table; GtkWidget * label; GtkWidget * spin_button; gint table_row, m_table_row; gint table_column; AmitkDim i_dim; range_t i_range; gchar * temp_string; GtkWidget * axis_canvas; GtkWidget * vseparator; GtkWidget * middle_table; table = gtk_table_new(NUM_ROWS,5,FALSE); table_row=0; table_column=0; /* the zoom selection */ label = gtk_label_new(_("zoom")); gtk_table_attach(GTK_TABLE(table), label, table_column,table_column+1, table_row,table_row+1, FALSE,FALSE, X_PADDING, 0); spin_button = gtk_spin_button_new_with_range(0.2,5.0,0.2); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin_button),2); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), tb_crop->zoom); g_object_set_data(G_OBJECT(spin_button), "which_view", GINT_TO_POINTER(view)); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(zoom_spinner_cb), tb_crop); gtk_table_attach(GTK_TABLE(table), spin_button, table_column+1,table_column+2, table_row,table_row+1, FALSE,FALSE, X_PADDING, 0); tb_crop->zoom_spinner[view] = spin_button; table_row++; /* the gate selection */ if (AMITK_DATA_SET_NUM_GATES(tb_crop->data_set) > 1) { label = gtk_label_new(_("gate")); gtk_table_attach(GTK_TABLE(table), label, table_column,table_column+1, table_row,table_row+1, FALSE,FALSE, X_PADDING, 0); spin_button = gtk_spin_button_new_with_range(0,AMITK_DATA_SET_NUM_GATES(tb_crop->data_set)-1,1); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin_button),0); g_object_set_data(G_OBJECT(spin_button), "which_view", GINT_TO_POINTER(view)); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(gate_spinner_cb), tb_crop); gtk_table_attach(GTK_TABLE(table), spin_button, table_column+1,table_column+2, table_row,table_row+1, FALSE,FALSE, X_PADDING, 0); tb_crop->gate_spinner[view] = spin_button; table_row++; } /* the frame selection */ if (AMITK_DATA_SET_NUM_FRAMES(tb_crop->data_set) > 1) { label = gtk_label_new(_("frame")); gtk_table_attach(GTK_TABLE(table), label, table_column,table_column+1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); spin_button = gtk_spin_button_new_with_range(0,AMITK_DATA_SET_NUM_FRAMES(tb_crop->data_set)-1,1); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin_button),0); g_object_set_data(G_OBJECT(spin_button), "which_view", GINT_TO_POINTER(view)); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(frame_spinner_cb), tb_crop); gtk_table_attach(GTK_TABLE(table), spin_button, table_column+1,table_column+2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); tb_crop->frame_spinner[view] = spin_button; table_row++; } /* the projection */ #ifdef AMIDE_LIBGNOMECANVAS_AA tb_crop->canvas[view] = gnome_canvas_new_aa(); #else tb_crop->canvas[view] = gnome_canvas_new(); #endif gtk_table_attach(GTK_TABLE(table), tb_crop->canvas[view], table_column,table_column+2,table_row,NUM_ROWS, FALSE,FALSE, X_PADDING, Y_PADDING); add_canvas_update(tb_crop, view); /* wait for canvas to update, this allows the projection to get made */ while (tb_crop->idle_handler_id != 0) gtk_main_iteration(); table_row=0; table_column += 2; /* a separator for clarity */ vseparator = gtk_vseparator_new(); gtk_table_attach(GTK_TABLE(table), vseparator, table_column, table_column+1, table_row, NUM_ROWS, 0, GTK_FILL, X_PADDING, Y_PADDING); table_row=0; table_column += 1; /* the middle table */ middle_table = gtk_table_new(9, 3, FALSE); gtk_table_attach(GTK_TABLE(table), middle_table, table_column, table_column+1, table_row, NUM_ROWS, 0, GTK_FILL, X_PADDING, Y_PADDING); m_table_row=0; /* the range selectors */ for (i_dim=0; i_dimdata_set), i_dim) > 1) { temp_string = g_strdup_printf(_("%s range:"), amitk_dim_get_name(i_dim)); label = gtk_label_new(temp_string); gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); g_free(temp_string); gtk_table_attach(GTK_TABLE(middle_table), label, 0,1, m_table_row,m_table_row+1, GTK_FILL|GTK_EXPAND,FALSE, X_PADDING, 0); for (i_range=0; i_rangedata_set), i_dim)-1,1); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin_button),0); // gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), // voxel_get_dim(tb_crop->range[i_range], i_dim)); g_object_set_data(G_OBJECT(spin_button), "which_view", GINT_TO_POINTER(view)); g_object_set_data(G_OBJECT(spin_button), "which_dim", GINT_TO_POINTER(i_dim)); g_object_set_data(G_OBJECT(spin_button), "which_range", GINT_TO_POINTER(i_range)); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(spinner_cb), tb_crop); gtk_table_attach(GTK_TABLE(middle_table), spin_button, 1+i_range,2+i_range, m_table_row,m_table_row+1, FALSE,FALSE, X_PADDING, 0); tb_crop->spinner[view][i_dim][i_range] = spin_button; } m_table_row++; if (i_dim <= AMITK_DIM_Z) { label = gtk_label_new(_("(mm)")); gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); gtk_table_attach(GTK_TABLE(middle_table), label, 0,1, m_table_row,m_table_row+1, GTK_FILL|GTK_EXPAND,FALSE, X_PADDING, 0); for (i_range=0; i_rangemm_label[view][i_dim][i_range] = gtk_label_new(""); gtk_table_attach(GTK_TABLE(middle_table), tb_crop->mm_label[view][i_dim][i_range], 1+i_range,2+i_range, m_table_row,m_table_row+1, FALSE,FALSE, X_PADDING, 0); } m_table_row++; } } } /* the axis display */ #ifdef AMIDE_LIBGNOMECANVAS_AA axis_canvas = gnome_canvas_new_aa(); #else axis_canvas = gnome_canvas_new(); #endif ui_common_draw_view_axis(GNOME_CANVAS(axis_canvas), 0, 0, view, AMITK_LAYOUT_LINEAR, AXIS_WIDTH, AXIS_HEIGHT); gtk_widget_set_size_request(axis_canvas, AXIS_WIDTH, AXIS_HEIGHT); gnome_canvas_set_scroll_region(GNOME_CANVAS(axis_canvas), 0.0, 0.0, 3.0*AXIS_WIDTH, AXIS_HEIGHT); gtk_table_attach(GTK_TABLE(middle_table), axis_canvas, 0,3,m_table_row,m_table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row=0; table_column+=1; /* a separator for clarity */ vseparator = gtk_vseparator_new(); gtk_table_attach(GTK_TABLE(table), vseparator, table_column, table_column+1, table_row, NUM_ROWS, 0, GTK_FILL, X_PADDING, Y_PADDING); table_row=0; table_column += 1; /* the threshold */ tb_crop->threshold[view] = amitk_threshold_new(tb_crop->projections[view], AMITK_THRESHOLD_LINEAR_LAYOUT, GTK_WINDOW(tb_crop->dialog), TRUE); gtk_table_attach(GTK_TABLE(table), tb_crop->threshold[view], table_column,table_column+1,table_row,NUM_ROWS, FALSE,FALSE, X_PADDING, Y_PADDING); gtk_widget_show_all(table); return table; } static GtkWidget * create_conversion_page(tb_crop_t * tb_crop) { GtkWidget * table; GtkWidget * label; gint table_row; AmitkFormat i_format; AmitkScalingType i_scaling_type; GtkWidget * entry; GtkWidget * menu; GtkWidget * hseparator; table = gtk_table_new(3,3,FALSE); table_row = 0; /* widget to tell you the internal data format */ label = gtk_label_new(_("Current Data Format:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); entry = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry), amitk_format_names[AMITK_DATA_SET_FORMAT(tb_crop->data_set)]); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(table), entry, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); /* widget to tell you the scaling format */ label = gtk_label_new(_("Current Scale Format:")); gtk_table_attach(GTK_TABLE(table), label, 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); entry = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry), amitk_scaling_menu_names[AMITK_DATA_SET_SCALING_TYPE(tb_crop->data_set)]); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_table_attach(GTK_TABLE(table), entry, 4,5, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(table), hseparator,0,5, table_row, table_row+1, GTK_FILL, GTK_FILL, X_PADDING, Y_PADDING); table_row++; /* widget to tell you the internal data format */ label = gtk_label_new(_("Output Data Format:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); menu = gtk_combo_box_new_text(); for (i_format=0; i_formatformat); g_signal_connect(G_OBJECT(menu), "changed", G_CALLBACK(change_format_cb), tb_crop); gtk_table_attach(GTK_TABLE(table), menu, 1,2, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); /* widget to tell you the scaling format */ label = gtk_label_new(_("Output Scale Format:")); gtk_table_attach(GTK_TABLE(table), label, 3,4, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); menu = gtk_combo_box_new_text(); for (i_scaling_type=0; i_scaling_typescaling_type); g_signal_connect(G_OBJECT(menu), "changed", G_CALLBACK(change_scaling_type_cb), tb_crop); gtk_table_attach(GTK_TABLE(table), menu, 4,5, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show_all(table); return table; } static void prepare_page_cb(GtkAssistant * wizard, GtkWidget * page, gpointer data) { tb_crop_t * tb_crop = data; which_page_t which_page; AmitkView view; AmitkDim i_dim; range_t i_range; which_page = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(page), "which_page")); view = which_page-TRANSVERSE_PAGE; /* ---------------- set entries appropriately ---------------- */ switch(which_page) { case TRANSVERSE_PAGE: case CORONAL_PAGE: case SAGITTAL_PAGE: g_signal_handlers_block_by_func(G_OBJECT(tb_crop->zoom_spinner[view]), G_CALLBACK(zoom_spinner_cb), tb_crop); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_crop->zoom_spinner[view]), tb_crop->zoom); g_signal_handlers_unblock_by_func(G_OBJECT(tb_crop->zoom_spinner[view]), G_CALLBACK(zoom_spinner_cb), tb_crop); if (AMITK_DATA_SET_NUM_GATES(tb_crop->data_set) > 1) { g_signal_handlers_block_by_func(G_OBJECT(tb_crop->gate_spinner[view]), G_CALLBACK(gate_spinner_cb), tb_crop); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_crop->gate_spinner[view]), tb_crop->gate); g_signal_handlers_unblock_by_func(G_OBJECT(tb_crop->gate_spinner[view]), G_CALLBACK(gate_spinner_cb), tb_crop); } if (AMITK_DATA_SET_NUM_FRAMES(tb_crop->data_set) > 1) { g_signal_handlers_block_by_func(G_OBJECT(tb_crop->frame_spinner[view]), G_CALLBACK(frame_spinner_cb), tb_crop); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_crop->frame_spinner[view]), tb_crop->frame); g_signal_handlers_unblock_by_func(G_OBJECT(tb_crop->frame_spinner[view]), G_CALLBACK(frame_spinner_cb), tb_crop); } for (i_dim=0; i_dimdata_set), i_dim) > 1) { for (i_range=0; i_rangespinner[view][i_dim][i_range]), G_CALLBACK(spinner_cb), tb_crop); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_crop->spinner[view][i_dim][i_range]), voxel_get_dim(tb_crop->range[i_range], i_dim)); g_signal_handlers_unblock_by_func(G_OBJECT(tb_crop->spinner[view][i_dim][i_range]), G_CALLBACK(spinner_cb), tb_crop); } } } gnome_canvas_set_pixels_per_unit(GNOME_CANVAS(tb_crop->canvas[view]), tb_crop->zoom); gtk_widget_set_size_request(tb_crop->canvas[view], tb_crop->zoom*tb_crop->canvas_width[view], tb_crop->zoom*tb_crop->canvas_height[view]); add_canvas_update(tb_crop, view); update_crop_lines(tb_crop, view); update_mm_labels(tb_crop, view); amitk_data_set_set_color_table(tb_crop->projections[view], AMITK_VIEW_MODE_SINGLE, tb_crop->color_table); amitk_data_set_set_threshold_min(tb_crop->projections[view], 0, tb_crop->threshold_min); amitk_data_set_set_threshold_max(tb_crop->projections[view], 0, tb_crop->threshold_max); break; default: break; } return; } static void zoom_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_crop_t * tb_crop = data; AmitkView view; gdouble value; value = gtk_spin_button_get_value(spin_button); view = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(spin_button), "which_view")); if (value < 0.2) tb_crop->zoom = 0.2; else if (value >= 5.0) tb_crop->zoom = 5.0; else tb_crop->zoom = value; gnome_canvas_set_pixels_per_unit(GNOME_CANVAS(tb_crop->canvas[view]), tb_crop->zoom); gtk_widget_set_size_request(tb_crop->canvas[view], tb_crop->zoom*tb_crop->canvas_width[view], tb_crop->zoom*tb_crop->canvas_height[view]); return; } static void frame_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_crop_t * tb_crop = data; AmitkView view; AmitkView i_view; gint int_value; int_value = gtk_spin_button_get_value_as_int(spin_button); view = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(spin_button), "which_view")); if (int_value < 0) int_value = 0; else if (int_value >= AMITK_DATA_SET_NUM_FRAMES(tb_crop->data_set)) int_value = AMITK_DATA_SET_NUM_FRAMES(tb_crop->data_set)-1; if (int_value != tb_crop->frame) { tb_crop->frame = int_value; g_signal_handlers_block_by_func(G_OBJECT(tb_crop->frame_spinner[view]), G_CALLBACK(frame_spinner_cb), tb_crop); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_crop->frame_spinner[view]), tb_crop->frame); g_signal_handlers_unblock_by_func(G_OBJECT(tb_crop->frame_spinner[view]), G_CALLBACK(frame_spinner_cb), tb_crop); /* unref all the computed projections */ for (i_view=0; i_view < AMITK_VIEW_NUM; i_view++) if (tb_crop->projections[i_view] != NULL) tb_crop->projections[i_view] = amitk_object_unref(tb_crop->projections[i_view]); /* just update the current projection for now */ add_canvas_update(tb_crop, view); } return; } static void gate_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_crop_t * tb_crop = data; AmitkView view; AmitkView i_view; gint int_value; int_value = gtk_spin_button_get_value_as_int(spin_button); view = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(spin_button), "which_view")); if (int_value < 0) int_value = 0; else if (int_value >= AMITK_DATA_SET_NUM_GATES(tb_crop->data_set)) int_value = AMITK_DATA_SET_NUM_GATES(tb_crop->data_set)-1; if (int_value != tb_crop->gate) { tb_crop->gate = int_value; g_signal_handlers_block_by_func(G_OBJECT(tb_crop->gate_spinner[view]), G_CALLBACK(gate_spinner_cb), tb_crop); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_crop->gate_spinner[view]), tb_crop->gate); g_signal_handlers_unblock_by_func(G_OBJECT(tb_crop->gate_spinner[view]), G_CALLBACK(gate_spinner_cb), tb_crop); /* unref all the computed projections */ for (i_view=0; i_view < AMITK_VIEW_NUM; i_view++) if (tb_crop->projections[i_view] != NULL) tb_crop->projections[i_view] = amitk_object_unref(tb_crop->projections[i_view]); /* just update the current projection for now */ add_canvas_update(tb_crop, view); } return; } static void spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_crop_t * tb_crop = data; AmitkView view; AmitkDim dim; range_t which_range; gint int_value; view = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(spin_button), "which_view")); dim = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(spin_button), "which_dim")); which_range = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(spin_button), "which_range")); int_value = gtk_spin_button_get_value_as_int(spin_button); if (which_range == RANGE_MIN) { if (int_value > voxel_get_dim(tb_crop->range[RANGE_MAX], dim)) { int_value = voxel_get_dim(tb_crop->range[RANGE_MAX], dim); } } else { /* RANGE_MAX */ if (int_value < voxel_get_dim(tb_crop->range[RANGE_MIN], dim)) { int_value = voxel_get_dim(tb_crop->range[RANGE_MIN], dim); } } voxel_set_dim(&(tb_crop->range[which_range]), dim, int_value); g_signal_handlers_block_by_func(G_OBJECT(tb_crop->spinner[view][dim][which_range]), G_CALLBACK(spinner_cb), tb_crop); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_crop->spinner[view][dim][which_range]), voxel_get_dim(tb_crop->range[which_range], dim)); g_signal_handlers_unblock_by_func(G_OBJECT(tb_crop->spinner[view][dim][which_range]), G_CALLBACK(spinner_cb), tb_crop); update_crop_lines(tb_crop, view); update_mm_labels(tb_crop, view); return; } static void projection_thresholds_changed_cb(AmitkDataSet * projection, gpointer data) { tb_crop_t * tb_crop = data; AmitkView view; view = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(projection), "which_view")); tb_crop->threshold_max = AMITK_DATA_SET_THRESHOLD_MAX(projection, 0); tb_crop->threshold_min = AMITK_DATA_SET_THRESHOLD_MIN(projection, 0); add_canvas_update(tb_crop, view); update_crop_lines(tb_crop, view); return; } static void projection_color_table_changed_cb(AmitkDataSet * projection, AmitkViewMode view_mode, gpointer data) { tb_crop_t * tb_crop = data; AmitkView view; if (view_mode == AMITK_VIEW_MODE_SINGLE) { view = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(projection), "which_view")); tb_crop->color_table = AMITK_DATA_SET_COLOR_TABLE(projection, AMITK_VIEW_MODE_SINGLE); add_canvas_update(tb_crop, view); update_crop_lines(tb_crop, view); } return; } /* function called to change the desired format */ static void change_format_cb(GtkWidget * widget, gpointer data) { tb_crop_t * tb_crop = data; tb_crop->format = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); return; } /* function called to change the desired scaling */ static void change_scaling_type_cb(GtkWidget * widget, gpointer data) { tb_crop_t * tb_crop = data; tb_crop->scaling_type = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); return; } static void update_mm_labels(tb_crop_t * tb_crop, AmitkView view) { AmitkPoint temp_rp; range_t i_range; AmitkDim i_dim; gchar * temp_string; for (i_range=0; i_rangerange[i_range], AMITK_DATA_SET_VOXEL_SIZE(tb_crop->data_set), temp_rp); temp_rp = amitk_space_s2b(AMITK_SPACE(tb_crop->data_set), temp_rp); for (i_dim=0; i_dim<=AMITK_DIM_Z; i_dim++) { if (voxel_get_dim(AMITK_DATA_SET_DIM(tb_crop->data_set), i_dim) > 1) { temp_string = g_strdup_printf("%g", point_get_component(temp_rp, i_dim)); gtk_label_set_text(GTK_LABEL(tb_crop->mm_label[view][i_dim][i_range]), temp_string); g_free(temp_string); } } } return; } static void update_crop_lines(tb_crop_t * tb_crop, AmitkView view) { GnomeCanvasPoints * points; range_t i_range; rgba_t outline_color; gint j; gint x_range[NUM_RANGES]; gint y_range[NUM_RANGES]; if (tb_crop->canvas[view] == NULL) return; points = gnome_canvas_points_new(2); outline_color = amitk_color_table_outline_color(AMITK_DATA_SET_COLOR_TABLE(tb_crop->projections[view], AMITK_VIEW_MODE_SINGLE), FALSE); switch(view) { case AMITK_VIEW_CORONAL: for (i_range=0; i_rangerange[i_range].x; y_range[i_range] = tb_crop->range[i_range].z; } break; case AMITK_VIEW_SAGITTAL: for (i_range=0; i_rangerange[i_range].y; y_range[i_range] = tb_crop->range[i_range].z; } break; case AMITK_VIEW_TRANSVERSE: default: for (i_range=0; i_rangerange[i_range].x; y_range[i_range] = tb_crop->range[i_range].y; } break; } for (j=0; j<2; j++) { for (i_range=0; i_rangecoords[0]=points->coords[2] = x_range[i_range]+0.5; else points->coords[0]=points->coords[2] = x_range[i_range]+0.5+2*CURSOR_SIZE; if (view == AMITK_VIEW_TRANSVERSE) { points->coords[1] = tb_crop->canvas_height[view]-y_range[RANGE_MIN]-1+0.5-CURSOR_SIZE; points->coords[3] = tb_crop->canvas_height[view]-y_range[RANGE_MAX]-1+0.5-CURSOR_SIZE; } else { /* our z direction points down */ points->coords[1] = y_range[RANGE_MIN]+0.5; points->coords[3] = y_range[RANGE_MAX]+0.5+2*CURSOR_SIZE; } } else { /* y direction, compensate for X Window's coordinate axis */ if (i_range == RANGE_MIN) { if (view == AMITK_VIEW_TRANSVERSE) points->coords[1]=points->coords[3] = tb_crop->canvas_height[view]-y_range[i_range]+0.5-CURSOR_SIZE; else /* our z direction points down */ points->coords[1]=points->coords[3] = y_range[i_range]+0.5; } else { if (view == AMITK_VIEW_TRANSVERSE) points->coords[1]=points->coords[3] = tb_crop->canvas_height[view]-y_range[i_range]-1+0.5-2*CURSOR_SIZE; else /* our z direction points down */ points->coords[1]=points->coords[3] = y_range[i_range]+0.5+2*CURSOR_SIZE; } points->coords[0] = x_range[RANGE_MIN]+0.5; points->coords[2] = x_range[RANGE_MAX]+0.5+2*CURSOR_SIZE; } if (tb_crop->line[view][j][i_range] == NULL) { tb_crop->line[view][j][i_range] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_crop->canvas[view])), gnome_canvas_line_get_type(), "points", points, "fill_color_rgba", amitk_color_table_rgba_to_uint32(outline_color), "width_units", 1.0, "cap_style", GDK_CAP_PROJECTING, NULL); } else { gnome_canvas_item_set(tb_crop->line[view][j][i_range], "points", points, "fill_color_rgba", amitk_color_table_rgba_to_uint32(outline_color),NULL); } } } gnome_canvas_points_unref(points); return; } static void add_canvas_update(tb_crop_t * tb_crop, AmitkView view) { if (g_list_index(tb_crop->update_view, GINT_TO_POINTER(view)) < 0) tb_crop->update_view = g_list_append(tb_crop->update_view, GINT_TO_POINTER(view)); if (tb_crop->idle_handler_id == 0) tb_crop->idle_handler_id = g_idle_add_full(G_PRIORITY_HIGH_IDLE,update_canvas_while_idle, tb_crop, NULL); } static gboolean update_canvas_while_idle(gpointer data) { tb_crop_t * tb_crop = data; GdkPixbuf * pixbuf; AmitkView view, i_view; while (tb_crop->update_view != NULL) { view = GPOINTER_TO_INT(tb_crop->update_view->data); tb_crop->update_view = g_list_remove(tb_crop->update_view, GINT_TO_POINTER(view)); /* create the projections if we haven't already */ if (tb_crop->projections[view] == NULL) amitk_data_set_get_projections(tb_crop->data_set, tb_crop->frame, tb_crop->gate, tb_crop->projections, amitk_progress_dialog_update, tb_crop->progress_dialog); for (i_view=0; i_viewprojections[i_view] != NULL) { if (!tb_crop->threshold_info_set) { tb_crop->threshold_info_set = TRUE; tb_crop->color_table = AMITK_DATA_SET_COLOR_TABLE(tb_crop->projections[i_view], AMITK_VIEW_MODE_SINGLE); tb_crop->threshold_max = AMITK_DATA_SET_THRESHOLD_MAX(tb_crop->projections[i_view], 0); tb_crop->threshold_min = AMITK_DATA_SET_THRESHOLD_MIN(tb_crop->projections[i_view], 0); } else { amitk_data_set_set_color_table(tb_crop->projections[i_view], AMITK_VIEW_MODE_SINGLE, tb_crop->color_table ); amitk_data_set_set_threshold_max(tb_crop->projections[i_view], 0, tb_crop->threshold_max); amitk_data_set_set_threshold_min(tb_crop->projections[i_view], 0, tb_crop->threshold_min); } g_object_set_data(G_OBJECT(tb_crop->projections[i_view]), "which_view", GINT_TO_POINTER(i_view)); g_signal_connect(G_OBJECT(tb_crop->projections[i_view]), "thresholds_changed", G_CALLBACK(projection_thresholds_changed_cb), tb_crop); g_signal_connect(G_OBJECT(tb_crop->projections[i_view]), "color_table_changed", G_CALLBACK(projection_color_table_changed_cb), tb_crop); // if (tb_crop->threshold[i_view] != NULL) // amitk_threshold_new_data_set(AMITK_THRESHOLD(tb_crop->threshold[i_view]), // tb_crop->projections[i_view]); } } if ((tb_crop->canvas[view] != NULL) && (tb_crop->projections[view] != NULL)) { /* make a pixbuf based on the projection */ pixbuf = image_from_projection(tb_crop->projections[view]); if (tb_crop->image[view] == NULL) {/* create the canvas image if we don't have it */ tb_crop->image[view] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(tb_crop->canvas[view])), gnome_canvas_pixbuf_get_type(), "pixbuf", pixbuf, "x", (gdouble) CURSOR_SIZE, "y", (gdouble) CURSOR_SIZE, NULL); tb_crop->canvas_width[view] =gdk_pixbuf_get_width(pixbuf)+2*CURSOR_SIZE; tb_crop->canvas_height[view] = gdk_pixbuf_get_height(pixbuf)+2*CURSOR_SIZE; gtk_widget_set_size_request(tb_crop->canvas[view], tb_crop->canvas_width[view], tb_crop->canvas_height[view]); gnome_canvas_set_scroll_region(GNOME_CANVAS(tb_crop->canvas[view]), 0,0, tb_crop->canvas_width[view], tb_crop->canvas_height[view]); } else { gnome_canvas_item_set(tb_crop->image[view], "pixbuf", pixbuf, NULL); } g_object_unref(pixbuf); } } tb_crop->idle_handler_id=0; return FALSE; } static tb_crop_t * tb_crop_free(tb_crop_t * tb_crop) { AmitkView i_view; gboolean return_val; /* sanity checks */ g_return_val_if_fail(tb_crop != NULL, NULL); g_return_val_if_fail(tb_crop->reference_count > 0, NULL); /* remove a reference count */ tb_crop->reference_count--; /* things to do if we've removed all reference's */ if (tb_crop->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing tb_crop\n"); #endif if (tb_crop->idle_handler_id != 0) { g_source_remove(tb_crop->idle_handler_id); tb_crop->idle_handler_id = 0; } if (tb_crop->data_set != NULL) { amitk_object_unref(tb_crop->data_set); tb_crop->data_set = NULL; } if (tb_crop->study != NULL) { amitk_object_unref(tb_crop->study); tb_crop->study = NULL; } for (i_view=0; i_view < AMITK_VIEW_NUM; i_view++) { if (tb_crop->projections[i_view] != NULL) { amitk_object_unref(tb_crop->projections[i_view]); tb_crop->projections[i_view] = NULL; } } if (tb_crop->progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(tb_crop->progress_dialog), "delete_event", NULL, &return_val); tb_crop->progress_dialog = NULL; } g_free(tb_crop); tb_crop = NULL; } #ifdef AMIDE_DEBUG else { g_print("unrefering tb_crop\n"); } #endif return tb_crop; } static tb_crop_t * tb_crop_init(void) { AmitkView i_view; tb_crop_t * tb_crop; gint j; range_t i_range; /* alloc space for the data structure for passing ui info */ if ((tb_crop = g_try_new(tb_crop_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for tb_crop_t")); return NULL; } tb_crop->reference_count = 1; tb_crop->frame = 0; tb_crop->gate=0; tb_crop->dialog = NULL; tb_crop->data_set = NULL; tb_crop->study = NULL; tb_crop->zoom = 1.0; tb_crop->threshold_info_set = FALSE; tb_crop->format = AMITK_FORMAT_FLOAT; tb_crop->scaling_type = AMITK_SCALING_TYPE_0D; for (i_range=0; i_rangerange[i_range] = zero_voxel; for (i_view=0; i_view < AMITK_VIEW_NUM; i_view++) { tb_crop->image[i_view] = NULL; tb_crop->projections[i_view] = NULL; tb_crop->threshold[i_view] = NULL; tb_crop->canvas[i_view]=NULL; for (j=0; j<2; j++) for (i_range=0; i_rangeline[i_view][j][i_range]=NULL; } tb_crop->update_view=NULL; tb_crop->idle_handler_id = 0; return tb_crop; } void tb_crop(AmitkStudy * study, AmitkDataSet * active_ds, GtkWindow * parent) { tb_crop_t * tb_crop; GdkPixbuf * logo; AmitkView i_view; gint i; if (active_ds == NULL) { g_warning(_("No data set is currently marked as active")); return; } tb_crop = tb_crop_init(); tb_crop->study = amitk_object_ref(study); tb_crop->data_set = amitk_object_ref(active_ds); tb_crop->format = AMITK_DATA_SET_FORMAT(active_ds); tb_crop->scaling_type = AMITK_DATA_SET_SCALING_TYPE(active_ds); tb_crop->frame = amitk_data_set_get_frame(active_ds, AMITK_STUDY_VIEW_START_TIME(study)); tb_crop->gate = AMITK_DATA_SET_VIEW_START_GATE(active_ds); tb_crop->dialog = gtk_assistant_new(); gtk_window_set_transient_for(GTK_WINDOW(tb_crop->dialog), parent); gtk_window_set_destroy_with_parent(GTK_WINDOW(tb_crop->dialog), TRUE); g_signal_connect(G_OBJECT(tb_crop->dialog), "cancel", G_CALLBACK(close_cb), tb_crop); g_signal_connect(G_OBJECT(tb_crop->dialog), "close", G_CALLBACK(close_cb), tb_crop); g_signal_connect(G_OBJECT(tb_crop->dialog), "apply", G_CALLBACK(apply_cb), tb_crop); g_signal_connect(G_OBJECT(tb_crop->dialog), "prepare", G_CALLBACK(prepare_page_cb), tb_crop); tb_crop->progress_dialog = amitk_progress_dialog_new(GTK_WINDOW(tb_crop->dialog)); tb_crop->range[RANGE_MAX] = voxel_sub(AMITK_DATA_SET_DIM(tb_crop->data_set), one_voxel); /* setup the projection pages */ for (i_view=0; i_viewpage[i_view] = create_projection_page(tb_crop, i_view); gtk_assistant_append_page(GTK_ASSISTANT(tb_crop->dialog), tb_crop->page[i_view]); } /* setup the conversion page */ tb_crop->page[CONVERSION_PAGE] = create_conversion_page(tb_crop); gtk_assistant_append_page(GTK_ASSISTANT(tb_crop->dialog), tb_crop->page[CONVERSION_PAGE]); /* setup the conclusion page */ tb_crop->page[FINISH_PAGE] = gtk_label_new(_(finish_page_text)); gtk_assistant_append_page(GTK_ASSISTANT(tb_crop->dialog), tb_crop->page[FINISH_PAGE]); gtk_assistant_set_page_type(GTK_ASSISTANT(tb_crop->dialog), tb_crop->page[FINISH_PAGE], GTK_ASSISTANT_PAGE_CONFIRM); /* set the title, icon, and other info */ logo = gtk_widget_render_icon(GTK_WIDGET(tb_crop->dialog), "amide_icon_logo", GTK_ICON_SIZE_DIALOG, 0); for (i=0; idialog), tb_crop->page[i], _("Data Set Cropping Wizard")); gtk_assistant_set_page_header_image(GTK_ASSISTANT(tb_crop->dialog), tb_crop->page[i], logo); g_object_set_data(G_OBJECT(tb_crop->page[i]),"which_page", GINT_TO_POINTER(i)); /* by default, everything's finished in this wizard */ gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_crop->dialog), tb_crop->page[i], TRUE); } g_object_unref(logo); gtk_widget_show_all(tb_crop->dialog); return; } amide-1.0.5/src/amitk_roi_variable_type.h0000664000175000017500000000570012270274550020300 0ustar loeningloening/* amitk_roi_variable_type.h - used to generate the different amitk_roi_*.h files * * Part of amide - Amide's a Medical Image Data Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_ROI_`'m4_Internal_Data_Format`'_H__ #define __AMITK_ROI_`'m4_Variable_Type`'_H__ /* header files that are always needed with this file */ #include "amitk_roi.h" #include "amitk_data_set.h" /* function declarations */ #define ROI_TYPE_`'m4_Variable_Type`' #if defined(ROI_TYPE_ELLIPSOID) || defined(ROI_TYPE_CYLINDER) || defined(ROI_TYPE_BOX) GSList * amitk_roi_`'m4_Variable_Type`'_get_intersection_line(const AmitkRoi * roi, const AmitkVolume * canvas_slice, const amide_real_t pixel_dim); #endif #if defined(ROI_TYPE_ISOCONTOUR_2D) || defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_2D) || defined(ROI_TYPE_FREEHAND_3D) AmitkDataSet * amitk_roi_`'m4_Variable_Type`'_get_intersection_slice(const AmitkRoi * roi, const AmitkVolume * canvas_slice, const amide_real_t pixel_dim #ifndef AMIDE_LIBGNOMECANVAS_AA ,const gboolean fill_roi #endif ); void amitk_roi_`'m4_Variable_Type`'_set_isocontour(AmitkRoi * roi, AmitkDataSet * ds, AmitkVoxel iso_vp, amide_data_t iso_min_value, amide_data_t iso_max_value, AmitkRoiIsocontourRange iso_range); void amitk_roi_`'m4_Variable_Type`'_manipulate_area(AmitkRoi * roi, gboolean erase, AmitkVoxel voxel, gint area_size); void amitk_roi_`'m4_Variable_Type`'_calc_center_of_mass(AmitkRoi * roi); #endif void amitk_roi_`'m4_Variable_Type`'_calculate_on_data_set_fast(const AmitkRoi * roi, const AmitkDataSet * ds, const guint frame, const guint gate, const gboolean inverse, void (*calculation)(), gpointer data); void amitk_roi_`'m4_Variable_Type`'_calculate_on_data_set_accurate(const AmitkRoi * roi, const AmitkDataSet * ds, const guint frame, const guint gate, const gboolean inverse, void (*calculation)(), gpointer data); #undef ROI_TYPE_`'m4_Variable_Type`' #endif /* __AMITK_ROI_`'m4_Variable_Type`'_H__ */ amide-1.0.5/src/amitk_tree_view.h0000664000175000017500000000746312270274542016603 0ustar loeningloening/* amitk_tree_view.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_TREE_VIEW_H__ #define __AMITK_TREE_VIEW_H__ /* includes we always need with this widget */ #include #include "amitk_type_builtins.h" #include "amitk_study.h" G_BEGIN_DECLS #define AMITK_TYPE_TREE_VIEW (amitk_tree_view_get_type ()) #define AMITK_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AMITK_TYPE_TREE_VIEW, AmitkTreeView)) #define AMITK_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_THESHOLD, AmitkTreeViewClass)) #define AMITK_IS_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AMITK_TYPE_TREE_VIEW)) #define AMITK_IS_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_TREE_VIEW)) typedef enum { AMITK_TREE_VIEW_MODE_MAIN, AMITK_TREE_VIEW_MODE_SINGLE_SELECTION, AMITK_TREE_VIEW_MODE_MULTIPLE_SELECTION, AMITK_TREE_VIEW_MODE_NUM } AmitkTreeViewMode; typedef struct _AmitkTreeView AmitkTreeView; typedef struct _AmitkTreeViewClass AmitkTreeViewClass; struct _AmitkTreeView { GtkTreeView tree_view; AmitkTreeViewMode mode; AmitkStudy * study; AmitkObject * active_object; AmitkPreferences * preferences; GtkWidget * progress_dialog; GtkTreeViewColumn * select_column[AMITK_VIEW_MODE_NUM]; AmitkViewMode prev_view_mode; gint mouse_x; /* the current mouse position */ gint mouse_y; GtkTreePath * current_path; /* drag-n-drop info */ gboolean drag_begin_possible; gint press_x; gint press_y; AmitkObject * src_object; /* not referenced */ AmitkObject * dest_object; /* not referenced */ GtkTargetList * drag_list; }; struct _AmitkTreeViewClass { GtkTreeViewClass parent_class; void (* help_event) (AmitkTreeView * tree_view, AmitkHelpInfo help_type); void (* activate_object) (AmitkTreeView * tree, AmitkObject * object); void (* popup_object) (AmitkTreeView * tree_view, AmitkObject * object); void (* add_object) (AmitkTreeView * tree_view, AmitkObject * parent, AmitkObjectType type, AmitkRoiType roi_type); void (* delete_object) (AmitkTreeView * tree_view, AmitkObject * object); }; GType amitk_tree_view_get_type (void); GtkWidget* amitk_tree_view_new (AmitkTreeViewMode tree_mode, AmitkPreferences * preferences, GtkWidget * progress_dialog); void amitk_tree_view_set_study (AmitkTreeView * tree_view, AmitkStudy * study); void amitk_tree_view_expand_object (AmitkTreeView * tree_view, AmitkObject * object); AmitkObject * amitk_tree_view_get_active_object (AmitkTreeView * tree_view); void amitk_tree_view_set_active_object (AmitkTreeView * tree_view, AmitkObject * object); GList * amitk_tree_view_get_multiple_selection_objects(AmitkTreeView * tree_view); G_END_DECLS #endif /* __AMITK_TREE_VIEW_H__ */ amide-1.0.5/src/amitk_fiducial_mark.h0000664000175000017500000000570612270274564017406 0ustar loeningloening/* amitk_fiducial_mark.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_FIDUCIAL_MARK_H__ #define __AMITK_FIDUCIAL_MARK_H__ #include "amitk_object.h" #include "amitk_color_table.h" G_BEGIN_DECLS #define AMITK_TYPE_FIDUCIAL_MARK (amitk_fiducial_mark_get_type ()) #define AMITK_FIDUCIAL_MARK(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), AMITK_TYPE_FIDUCIAL_MARK, AmitkFiducialMark)) #define AMITK_FIDUCIAL_MARK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_FIDUCIAL_MARK, AmitkFiducialMarkClass)) #define AMITK_IS_FIDUCIAL_MARK(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), AMITK_TYPE_FIDUCIAL_MARK)) #define AMITK_IS_FIDUCIAL_MARK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_FIDUCIAL_MARK)) #define AMITK_FIDUCIAL_MARK_GET_CLASS(fiducial_mark) (G_TYPE_CHECK_GET_CLASS ((fiducial_mark), AMITK_TYPE_FIDUCIAL_MARK, AmitkFiducialMarkClass)) #define AMITK_FIDUCIAL_MARK_GET(mark) (AMITK_SPACE_OFFSET(mark)) #define AMITK_FIDUCIAL_MARK_SPECIFY_COLOR(mark) (AMITK_FIDUCIAL_MARK(mark)->specify_color) #define AMITK_FIDUCIAL_MARK_COLOR(mark) (AMITK_FIDUCIAL_MARK(mark)->color) typedef struct _AmitkFiducialMarkClass AmitkFiducialMarkClass; typedef struct _AmitkFiducialMark AmitkFiducialMark; struct _AmitkFiducialMark { AmitkObject parent; gboolean specify_color; /* if false, program guesses a good color to use */ rgba_t color; }; struct _AmitkFiducialMarkClass { AmitkObjectClass parent_class; void (* fiducial_mark_changed) (AmitkFiducialMark * fiducial_mark); }; /* Application-level methods */ GType amitk_fiducial_mark_get_type (void); AmitkFiducialMark * amitk_fiducial_mark_new (void); void amitk_fiducial_mark_set (AmitkFiducialMark * fiducial_mark, AmitkPoint new_point); void amitk_fiducial_mark_set_specify_color (AmitkFiducialMark * fiducial_mark, gboolean specify_color); void amitk_fiducial_mark_set_color (AmitkFiducialMark * fiducial_mark, rgba_t color); G_END_DECLS #endif /* __AMITK_FIDUCIAL_MARK_H__ */ amide-1.0.5/src/amide.h0000644000175000017500000000250512270274602014467 0ustar loeningloening/* amide.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMIDE_H__ #define __AMIDE_H__ #include #include #include "amide_intl.h" G_BEGIN_DECLS /* some basic defines for packing tables */ #define X_PACKING_OPTIONS GTK_EXPAND #define Y_PACKING_OPTIONS GTK_EXPAND #define X_PADDING 5 #define Y_PADDING 5 typedef enum { AMIDE_EYE_LEFT, AMIDE_EYE_RIGHT, AMIDE_EYE_NUM } AmideEye; /* external variables */ extern gchar * object_menu_names[]; G_END_DECLS #endif /* __AMIDE_H__ */ amide-1.0.5/src/analysis.c0000664000175000017500000004464012270273766015250 0ustar loeningloening/* analysis.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "analysis.h" #include #include #include #include #ifdef AMIDE_DEBUG #include #endif /* make sure we have NAN defined to at least something */ //0.8.12 - hopefully all systems have bits/nan.h //remove in a couple versions //#ifndef NAN //#define NAN 0.0 //#endif #define EMPTY 0.0 static analysis_gate_t * analysis_gate_unref(analysis_gate_t *gate_analysis); static analysis_gate_t * analysis_gate_init(AmitkRoi * roi, AmitkDataSet *ds,guint frame, analysis_calculation_t calculation_type, gboolean accurate, gdouble subfraction, gdouble threshold_percentage, gdouble threshold_value); static analysis_frame_t * analysis_frame_unref(analysis_frame_t * frame_analysis); static analysis_frame_t * analysis_frame_init(AmitkRoi * roi, AmitkDataSet *ds, analysis_calculation_t calculation_type, gboolean accurate, gdouble subfraction, gdouble threshold_percentage, gdouble threshold_value); static analysis_volume_t * analysis_volume_unref(analysis_volume_t *volume_analysis); static analysis_volume_t * analysis_volume_init(AmitkRoi * roi, GList * volumes, analysis_calculation_t calculation_type, gboolean accurate, gdouble subfraction, gdouble threshold_percentage, gdouble threshold_value); void free_array_element(gpointer data, gpointer user_data) { analysis_element_t * element = data; g_free(element); } static analysis_gate_t * analysis_gate_unref(analysis_gate_t * gate_analysis) { analysis_gate_t * return_list; if (gate_analysis == NULL) return gate_analysis; /* sanity checks */ g_return_val_if_fail(gate_analysis->ref_count > 0, NULL); /* remove a reference count */ gate_analysis->ref_count--; /* if we've removed all reference's, free the roi */ if (gate_analysis->ref_count == 0) { g_ptr_array_foreach(gate_analysis->data_array, free_array_element, NULL); /* free the elements */ g_ptr_array_free(gate_analysis->data_array, TRUE); /* TRUE frees the array of pointers to elements as well */ /* recursively delete rest of list */ return_list = analysis_gate_unref(gate_analysis->next_gate_analysis); gate_analysis->next_gate_analysis = NULL; g_free(gate_analysis); gate_analysis = NULL; } else return_list = gate_analysis; return return_list; } static void record_stats(AmitkVoxel ds_voxel, amide_data_t value, amide_real_t voxel_fraction, gpointer data) { GPtrArray * array = data; analysis_element_t * element; /* crashes if alloc fails, but I don't want to do error checking in the inner loop... let's not run out of memory */ if (voxel_fraction > 0.0) { element = g_malloc(sizeof(analysis_element_t)); element->value = value; element->weight = voxel_fraction; element->ds_voxel = ds_voxel; g_ptr_array_add(array, element); } return; } static gint array_comparison(gconstpointer a, gconstpointer b) { const analysis_element_t * ea = *((analysis_element_t **) a); const analysis_element_t * eb = *((analysis_element_t **) b); if (ea->value > eb->value) return -1; else if (ea->value < eb->value) return 1; else return 0; } /* note, the following function for weight variance calculation is derived from statistics/wvariance_source.c from gsl version 1.3. copyright Jim Davies, Brian Gough, released under GPL. */ /* The variance is divided by N-1, since the mean in a sense is being "estimated" from the data set.... If anyone else with more statistical experience disagrees, please speak up */ static gdouble wvariance (GPtrArray * array, guint num_elements, gdouble wmean) { analysis_element_t * element; gdouble wsumofsquares = 0 ; gdouble Wa = 0; gdouble Wb = 0; gdouble wi; gdouble delta; gdouble factor; guint i; if (num_elements < 2) return NAN; /* find the weight sum of the squares */ /* computes sum(wi*(valuei-mean))/sum(wi) */ /* and computes the weighted version of N/(N-1) */ for (i = 0; i < num_elements; i++) { element = g_ptr_array_index(array, i); wi = element->weight; if (wi > 0) { delta = element->value-wmean; Wa += wi ; Wb += wi*wi; wsumofsquares += (delta * delta - wsumofsquares) * (wi / Wa); } } factor = (Wa*Wa)/((Wa*Wa)-Wb); return factor*wsumofsquares; } /* calculate an analysis of several statistical values for an roi on a given data set frame/gate. */ static analysis_gate_t * analysis_gate_init_recurse(AmitkRoi * roi, AmitkDataSet * ds, guint frame, guint gate, analysis_calculation_t calculation_type, gboolean accurate, gdouble subfraction, gdouble threshold_percentage, gdouble threshold_value) { GPtrArray * data_array; analysis_gate_t * analysis; guint subfraction_voxels; guint i; analysis_element_t * element; gdouble max; gboolean done; #ifdef AMIDE_DEBUG struct timeval tv1; struct timeval tv2; gdouble time1; gdouble time2; /* let's do some timing */ gettimeofday(&tv1, NULL); #endif if (gate == AMITK_DATA_SET_NUM_GATES(ds)) return NULL; /* check if we're done */ /* and now calculate this gate's data */ if ((data_array = g_ptr_array_new()) == NULL) { g_warning(_("couldn't allocate memory space for data array for frame %d/gate %d"), frame, gate); return NULL; } /* fill the array with the appropriate info from the data set */ /* note, I really only need a partial sort to get the median value, but glib doesn't have one (only has a full qsort), so I'll just do that. Partial sort would be order(N), qsort is order(NlogN), so it's not that much worse. If I used a partial sort, I'd have to iterate over the subfraction to find the max and min, and I'd have to do another partial sort to find the median */ amitk_roi_calculate_on_data_set(roi, ds, frame, gate,FALSE, accurate, record_stats, data_array); g_ptr_array_sort(data_array, array_comparison); switch(calculation_type) { case ALL_VOXELS: subfraction_voxels = data_array->len; break; case HIGHEST_FRACTION_VOXELS: subfraction_voxels = ceil(subfraction*data_array->len); if ((subfraction_voxels == 0) && (data_array->len > 0)) subfraction_voxels = 1; /* have at least one voxel if the roi is in the data set*/ break; case VOXELS_NEAR_MAX: subfraction_voxels = 0; if (data_array->len > 0) { element = g_ptr_array_index(data_array, 0); max = element->value; done = FALSE; for (i=0; ilen && !done; i++) { element = g_ptr_array_index(data_array, i); if (element->value >= max*threshold_percentage/100.0) subfraction_voxels++; else done = TRUE; } } if ((subfraction_voxels == 0) && (data_array->len > 0)) subfraction_voxels = 1; /* have at least one voxel if the roi is in the data set*/ break; case VOXELS_GREATER_THAN_VALUE: subfraction_voxels = 0; if (data_array->len > 0) { element = g_ptr_array_index(data_array, 0); max = element->value; done = FALSE; for (i=0; ilen && !done; i++) { element = g_ptr_array_index(data_array, i); if (element->value >= threshold_value) subfraction_voxels++; else done = TRUE; } } break; default: subfraction_voxels=0; g_error("unexpected case in %s at line %d",__FILE__, __LINE__); } /* fill in our gate_analysis structure */ if ((analysis = g_try_new(analysis_gate_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for roi analysis of frame %d/gate %d"), frame, gate); return analysis; } analysis->ref_count = 1; /* set values */ analysis->data_array = data_array; analysis->duration = amitk_data_set_get_frame_duration(ds, frame); analysis->time_midpoint = amitk_data_set_get_midpt_time(ds, frame); analysis->gate_time = amitk_data_set_get_gate_time(ds, gate); analysis->total = 0.0; analysis->median = 0.0; analysis->total = 0.0; analysis->voxels = subfraction_voxels; analysis->fractional_voxels = 0.0; analysis->correction = 0.0; analysis->var = 0.0; if (subfraction_voxels == 0) { /* roi not in data set */ analysis->max = 0.0; analysis->min = 0.0; analysis->median = 0.0; analysis->mean = 0.0; } else { /* max */ element = g_ptr_array_index(data_array, 0); analysis->max = element->value; /* min */ element = g_ptr_array_index(data_array, subfraction_voxels-1); analysis->min = element->value; /* median */ if (subfraction_voxels & 0x1) { /* odd */ element = g_ptr_array_index(data_array, (subfraction_voxels-1)/2); analysis->median = element->value; } else { /* even */ element = g_ptr_array_index(data_array, subfraction_voxels/2-1); analysis->median = 0.5*element->value; element = g_ptr_array_index(data_array, subfraction_voxels/2); analysis->median += 0.5*element->value; } /* total and #fractional_voxels */ for (i=0; itotal += element->weight*element->value; analysis->fractional_voxels += element->weight; } /* calculate the mean */ analysis->mean = analysis->total/analysis->fractional_voxels; /* calculate variance */ analysis->var = wvariance(data_array, subfraction_voxels, analysis->mean); } #ifdef AMIDE_DEBUG /* and wrapup our timing */ gettimeofday(&tv2, NULL); time1 = ((double) tv1.tv_sec) + ((double) tv1.tv_usec)/1000000.0; time2 = ((double) tv2.tv_sec) + ((double) tv2.tv_usec)/1000000.0; g_print("Calculated ROI: %s on Data Set: %s Frame %d Gate %d. Took %5.3f (s) \n", AMITK_OBJECT_NAME(roi), AMITK_OBJECT_NAME(ds), frame, gate, time2-time1); #endif /* now let's recurse */ analysis->next_gate_analysis = analysis_gate_init_recurse(roi, ds, frame, gate+1, calculation_type, accurate, subfraction, threshold_percentage, threshold_value); return analysis; } static analysis_gate_t * analysis_gate_init(AmitkRoi * roi, AmitkDataSet * ds, guint frame, analysis_calculation_t calculation_type, gboolean accurate, gdouble subfraction, gdouble threshold_percentage, gdouble threshold_value) { return analysis_gate_init_recurse(roi, ds, frame, 0, calculation_type, accurate, subfraction, threshold_percentage, threshold_value); } static analysis_frame_t * analysis_frame_unref(analysis_frame_t * frame_analysis) { analysis_frame_t * return_list; if (frame_analysis == NULL) return frame_analysis; /* sanity checks */ g_return_val_if_fail(frame_analysis->ref_count > 0, NULL); /* remove a reference count */ frame_analysis->ref_count--; /* if we've removed all reference's, free the roi */ if (frame_analysis->ref_count == 0) { /* recursively delete rest of list */ return_list = analysis_frame_unref(frame_analysis->next_frame_analysis); frame_analysis->next_frame_analysis = NULL; frame_analysis->gate_analyses = analysis_gate_unref(frame_analysis->gate_analyses); g_free(frame_analysis); frame_analysis = NULL; } else return_list = frame_analysis; return return_list; } /* returns a calculated analysis structure of an roi on a frame of a data set */ static analysis_frame_t * analysis_frame_init_recurse(AmitkRoi * roi, AmitkDataSet *ds, guint frame, analysis_calculation_t calculation_type, gboolean accurate, gdouble subfraction, gdouble threshold_percentage, gdouble threshold_value) { analysis_frame_t * temp_frame_analysis; if (frame == AMITK_DATA_SET_NUM_FRAMES(ds)) return NULL; /* check if we're done */ if ((temp_frame_analysis = g_try_new(analysis_frame_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for roi analysis of frames")); return NULL; } temp_frame_analysis->ref_count = 1; /* calculate this one */ temp_frame_analysis->gate_analyses = analysis_gate_init(roi, ds, frame, calculation_type, accurate, subfraction, threshold_percentage, threshold_value); /* recurse */ temp_frame_analysis->next_frame_analysis = analysis_frame_init_recurse(roi, ds, frame+1, calculation_type, accurate, subfraction, threshold_percentage, threshold_value); return temp_frame_analysis; } static analysis_frame_t * analysis_frame_init(AmitkRoi * roi, AmitkDataSet *ds, analysis_calculation_t calculation_type, gboolean accurate, gdouble subfraction, gdouble threshold_percentage, gdouble threshold_value) { /* sanity checks */ g_return_val_if_fail(AMITK_IS_DATA_SET(ds), NULL); if (AMITK_ROI_UNDRAWN(roi)) { g_warning(_("ROI: %s appears not to have been drawn"), AMITK_OBJECT_NAME(roi)); return NULL; } return analysis_frame_init_recurse(roi, ds, 0, calculation_type, accurate, subfraction, threshold_percentage, threshold_value); } /* free up an roi analysis over a data set */ static analysis_volume_t * analysis_volume_unref(analysis_volume_t * volume_analysis) { analysis_volume_t * return_list; if (volume_analysis == NULL) return volume_analysis; /* sanity check */ g_return_val_if_fail(volume_analysis->ref_count > 0, NULL); /* remove a reference count */ volume_analysis->ref_count--; /* stuff to do if reference count is zero */ if (volume_analysis->ref_count == 0) { /* recursively delete rest of list */ return_list = analysis_volume_unref(volume_analysis->next_volume_analysis); volume_analysis->next_volume_analysis = NULL; volume_analysis->frame_analyses = analysis_frame_unref(volume_analysis->frame_analyses); if (volume_analysis->data_set != NULL) volume_analysis->data_set=amitk_object_unref(volume_analysis->data_set); g_free(volume_analysis); volume_analysis = NULL; } else return_list = volume_analysis; return return_list; } /* returns an initialized roi analysis of a list of volumes */ static analysis_volume_t * analysis_volume_init(AmitkRoi * roi, GList * data_sets, analysis_calculation_t calculation_type, gboolean accurate, gdouble subfraction, gdouble threshold_percentage, gdouble threshold_value) { analysis_volume_t * temp_volume_analysis; if (data_sets == NULL) return NULL; g_return_val_if_fail(AMITK_IS_DATA_SET(data_sets->data), NULL); if ((temp_volume_analysis = g_try_new(analysis_volume_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for roi analysis of volumes")); return NULL; } temp_volume_analysis->ref_count = 1; temp_volume_analysis->data_set = amitk_object_ref(data_sets->data); /* calculate this one */ temp_volume_analysis->frame_analyses = analysis_frame_init(roi, temp_volume_analysis->data_set, calculation_type, accurate, subfraction, threshold_percentage, threshold_value); /* recurse */ temp_volume_analysis->next_volume_analysis = analysis_volume_init(roi, data_sets->next, calculation_type, accurate, subfraction, threshold_percentage, threshold_value); return temp_volume_analysis; } /* free up a list of roi analyses */ analysis_roi_t * analysis_roi_unref(analysis_roi_t * roi_analysis) { analysis_roi_t * return_list; if (roi_analysis == NULL) return roi_analysis; /* sanity check */ g_return_val_if_fail(roi_analysis->ref_count > 0, NULL); /* remove a reference count */ roi_analysis->ref_count--; /* stuff to do if reference count is zero */ if (roi_analysis->ref_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing roi_analysis\n"); #endif /* recursively free/dereference rest of list */ return_list = analysis_roi_unref(roi_analysis->next_roi_analysis); roi_analysis->next_roi_analysis = NULL; roi_analysis->volume_analyses = analysis_volume_unref(roi_analysis->volume_analyses); if (roi_analysis->roi != NULL) roi_analysis->roi = amitk_object_unref(roi_analysis->roi); if (roi_analysis->study != NULL) roi_analysis->study = amitk_object_unref(roi_analysis->study); g_free(roi_analysis); roi_analysis = NULL; } else return_list = roi_analysis; return return_list; } /* returns an initialized list of roi analyses */ analysis_roi_t * analysis_roi_init(AmitkStudy * study, GList * rois, GList * data_sets, analysis_calculation_t calculation_type, gboolean accurate, gdouble subfraction, gdouble threshold_percentage, gdouble threshold_value) { analysis_roi_t * temp_roi_analysis; if (rois == NULL) return NULL; if ((temp_roi_analysis = g_try_new(analysis_roi_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for roi analyses")); return NULL; } temp_roi_analysis->ref_count = 1; temp_roi_analysis->roi = amitk_object_ref(rois->data); temp_roi_analysis->study = amitk_object_ref(study); temp_roi_analysis->calculation_type = calculation_type; temp_roi_analysis->accurate = accurate; temp_roi_analysis->subfraction = subfraction; temp_roi_analysis->threshold_percentage = threshold_percentage; temp_roi_analysis->threshold_value = threshold_value; /* calculate this one */ temp_roi_analysis->volume_analyses = analysis_volume_init(temp_roi_analysis->roi, data_sets, calculation_type, accurate, subfraction, threshold_percentage, threshold_value); /* recurse */ temp_roi_analysis->next_roi_analysis = analysis_roi_init(study, rois->next, data_sets, calculation_type, accurate, subfraction, threshold_percentage, threshold_value); return temp_roi_analysis; } amide-1.0.5/src/tb_export_data_set.h0000664000175000017500000000230312270274504017261 0ustar loeningloening/* tb_export_data_set.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2006-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __TB_EXPORT_DATA_SET_H__ #define __TB_EXPORT_DATA_SET_H__ /* header files always needed with this one */ #include "amitk_study.h" /* external functions */ void tb_export_data_set(AmitkStudy * study, AmitkDataSet * active_ds, AmitkPreferences * preferences, GtkWindow * parent); #endif /* __TB_EXPORT_DATA_SET_H__ */ amide-1.0.5/src/amitk_data_set.c0000664000175000017500000071006112271016447016363 0ustar loeningloening/* amitk_data_set.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amitk_data_set.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" #include "amitk_line_profile.h" /* variable type function declarations */ #include "amitk_data_set_UBYTE_0D_SCALING.h" #include "amitk_data_set_UBYTE_1D_SCALING.h" #include "amitk_data_set_UBYTE_2D_SCALING.h" #include "amitk_data_set_SBYTE_0D_SCALING.h" #include "amitk_data_set_SBYTE_1D_SCALING.h" #include "amitk_data_set_SBYTE_2D_SCALING.h" #include "amitk_data_set_USHORT_0D_SCALING.h" #include "amitk_data_set_USHORT_1D_SCALING.h" #include "amitk_data_set_USHORT_2D_SCALING.h" #include "amitk_data_set_SSHORT_0D_SCALING.h" #include "amitk_data_set_SSHORT_1D_SCALING.h" #include "amitk_data_set_SSHORT_2D_SCALING.h" #include "amitk_data_set_UINT_0D_SCALING.h" #include "amitk_data_set_UINT_1D_SCALING.h" #include "amitk_data_set_UINT_2D_SCALING.h" #include "amitk_data_set_SINT_0D_SCALING.h" #include "amitk_data_set_SINT_1D_SCALING.h" #include "amitk_data_set_SINT_2D_SCALING.h" #include "amitk_data_set_FLOAT_0D_SCALING.h" #include "amitk_data_set_FLOAT_1D_SCALING.h" #include "amitk_data_set_FLOAT_2D_SCALING.h" #include "amitk_data_set_DOUBLE_0D_SCALING.h" #include "amitk_data_set_DOUBLE_1D_SCALING.h" #include "amitk_data_set_DOUBLE_2D_SCALING.h" #include #include #include #include #ifdef AMIDE_DEBUG #include #endif #ifdef HAVE_UNISTD_H #include #endif #include #include "raw_data_import.h" #include "dcmtk_interface.h" #include "libecat_interface.h" #include "libmdc_interface.h" //#define SLICE_TIMING #undef SLICE_TIMING /* external variables */ AmitkColorTable amitk_modality_default_color_table[AMITK_MODALITY_NUM] = { AMITK_COLOR_TABLE_NIH, /* PET */ AMITK_COLOR_TABLE_HOT_METAL, /* SPECT */ AMITK_COLOR_TABLE_BW_LINEAR, /* CT */ AMITK_COLOR_TABLE_BW_LINEAR, /* MRI */ AMITK_COLOR_TABLE_BW_LINEAR /* OTHER */ }; const gchar * amitk_interpolation_explanations[AMITK_INTERPOLATION_NUM] = { N_("interpolate using nearest neighbor (fast)"), N_("interpolate using trilinear interpolation (slow)"), }; const gchar * amitk_rendering_explanation = N_("How data is aggregated, most important for thick slices. MPR (multiplanar reformation) combines by averaging. MIP (maximum intensity projection) combines by taking the maximum. MINIP (minimum intensity projection) combines by taking the minimum"); const gchar * amitk_import_menu_names[] = { "", /* place holder for AMITK_IMPORT_METHOD_GUESS */ N_("_Raw Data"), #ifdef AMIDE_LIBDCMDATA_SUPPORT N_("_DICOM via dcmtk"), #endif #ifdef AMIDE_LIBECAT_SUPPORT N_("_ECAT 6/7 via libecat"), #endif #ifdef AMIDE_LIBMDC_SUPPORT "" /* place holder for AMITK_IMPORT_METHOD_LIBMDC */ #endif }; const gchar * amitk_import_menu_explanations[] = { "", N_("Import file as raw data"), #ifdef AMIDE_LIBDCMDATA_SUPPORT N_("Import a DICOM file or directory file using the DCMTK library"), #endif #ifdef AMIDE_LIBECAT_SUPPORT N_("Import a CTI 6.4 or 7.0 file using the libecat library"), #endif #ifdef AMIDE_LIBMDC_SUPPORT N_("Import via the (X)medcon library (libmdc)"), #endif }; const gchar * amitk_export_menu_names[] = { N_("Raw Data"), #ifdef AMIDE_LIBDCMDATA_SUPPORT N_("DICOM via dcmtk"), #endif #ifdef AMIDE_LIBMDC_SUPPORT "" /* place holder for AMITK_EXPORT_METHOD_LIBMDC */ #endif }; const gchar * amitk_export_menu_explanations[] = { N_("Export file as raw data"), #ifdef AMIDE_LIBDCMDATA_SUPPORT N_("Export a DICOM file or directory file using the DCMTK library"), #endif #ifdef AMIDE_LIBMDC_SUPPORT N_("Export via the (X)medcon library (libmdc)"), #endif }; const gchar * amitk_conversion_names[] = { N_("Direct"), N_("%ID/cc"), N_("SUV") }; const gchar * amitk_dose_unit_names[] = { N_("MBq"), N_("mCi"), N_("uCi"), N_("nCi") }; const gchar * amitk_weight_unit_names[] = { N_("Kg"), N_("g"), N_("lbs"), N_("ounces"), }; const gchar * amitk_cylinder_unit_names[] = { N_("MBq/cc/Image Units"), N_("mCi/cc/Image Units"), N_("uCi/cc/Image Units"), N_("nCi/cc/Image Units"), N_("Image Units/(MBq/cc)"), N_("Image Units/(mCi/cc)"), N_("Image Units/(uCi/cc)"), N_("Image Units/(nCi/cc)"), }; const gchar * amitk_scaling_menu_names[] = { N_("Single Scale Factor"), N_("Per Frame Scale Factor"), N_("Per Plane Scale Factor"), N_("Single Scale Factor with Intercept"), N_("Per Frame Scale Factor with Intercept"), N_("Per Plane Scale Factor with Intercept") }; amide_data_t amitk_window_default[AMITK_WINDOW_NUM][AMITK_LIMIT_NUM] = { // {-800.0, 1200.0}, /* bone */ // {-200.0, 200.0} /* tissue */ {-85.0, 165.0}, /* abdomen */ {-0.0, 80.0}, /* brain */ {-400.0, 1000.0}, /* extremities */ {-40.0, 160.0}, /* liver */ {-1350.0, 150.0}, /* lung */ {-140.0, 210.0}, /* pelvis, soft tissue */ {-60.0, 140.0}, /* skull base */ {-35.0, 215.0}, /* spine a */ {-300.0, 1200.0}, /* spine b */ {-125.0, 225.0} /* thorax, soft tissue */ }; enum { THRESHOLDING_CHANGED, THRESHOLD_STYLE_CHANGED, THRESHOLDS_CHANGED, WINDOWS_CHANGED, COLOR_TABLE_CHANGED, COLOR_TABLE_INDEPENDENT_CHANGED, INTERPOLATION_CHANGED, RENDERING_CHANGED, SUBJECT_ORIENTATION_CHANGED, SUBJECT_SEX_CHANGED, CONVERSION_CHANGED, SCALE_FACTOR_CHANGED, MODALITY_CHANGED, TIME_CHANGED, VOXEL_SIZE_CHANGED, DATA_SET_CHANGED, INVALIDATE_SLICE_CACHE, VIEW_GATES_CHANGED, LAST_SIGNAL }; static void data_set_class_init (AmitkDataSetClass *klass); static void data_set_init (AmitkDataSet *data_set); static void data_set_finalize (GObject *object); static void data_set_scale (AmitkSpace *space, AmitkPoint *ref_point, AmitkPoint *scaling); static void data_set_space_changed (AmitkSpace *space); static void data_set_selection_changed (AmitkObject *object); static AmitkObject * data_set_copy (const AmitkObject *object); static void data_set_copy_in_place (AmitkObject * dest_object, const AmitkObject * src_object); static void data_set_write_xml (const AmitkObject *object, xmlNodePtr nodes, FILE *study_file); static gchar * data_set_read_xml (AmitkObject *object, xmlNodePtr nodes, FILE *study_file, gchar *error_buf); static void data_set_invalidate_slice_cache (AmitkDataSet * ds); static void data_set_set_voxel_size (AmitkDataSet * ds, const AmitkPoint voxel_size); static void data_set_drop_intercept (AmitkDataSet * ds); static void data_set_reduce_scaling_dimension (AmitkDataSet * ds); static AmitkVolumeClass * parent_class; static guint data_set_signals[LAST_SIGNAL]; static amide_data_t calculate_scale_factor(AmitkDataSet * ds); GList * slice_cache_trim(GList * slice_cache, gint max_size); #define MIN_LOCAL_CACHE_SIZE 3 GType amitk_data_set_get_type(void) { static GType data_set_type = 0; if (!data_set_type) { static const GTypeInfo data_set_info = { sizeof (AmitkDataSetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_set_class_init, (GClassFinalizeFunc) NULL, NULL, /* class_data */ sizeof (AmitkDataSet), 0, /* n_preallocs */ (GInstanceInitFunc) data_set_init, NULL /* value table */ }; data_set_type = g_type_register_static (AMITK_TYPE_VOLUME, "AmitkDataSet", &data_set_info, 0); } return data_set_type; } static void data_set_class_init (AmitkDataSetClass * class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); AmitkObjectClass * object_class = AMITK_OBJECT_CLASS(class); AmitkSpaceClass * space_class = AMITK_SPACE_CLASS(class); parent_class = g_type_class_peek_parent(class); space_class->space_scale = data_set_scale; space_class->space_changed = data_set_space_changed; object_class->object_selection_changed = data_set_selection_changed; object_class->object_copy = data_set_copy; object_class->object_copy_in_place = data_set_copy_in_place; object_class->object_write_xml = data_set_write_xml; object_class->object_read_xml = data_set_read_xml; class->invalidate_slice_cache = data_set_invalidate_slice_cache; gobject_class->finalize = data_set_finalize; data_set_signals[THRESHOLDING_CHANGED] = g_signal_new ("thresholding_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, thresholding_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[THRESHOLD_STYLE_CHANGED] = g_signal_new ("threshold_style_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, threshold_style_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[THRESHOLDS_CHANGED] = g_signal_new ("thresholds_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, thresholds_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[WINDOWS_CHANGED] = g_signal_new ("windows_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, windows_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[COLOR_TABLE_CHANGED] = g_signal_new ("color_table_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, color_table_changed), NULL, NULL, amitk_marshal_NONE__ENUM, G_TYPE_NONE, 1, AMITK_TYPE_VIEW_MODE); data_set_signals[COLOR_TABLE_INDEPENDENT_CHANGED] = g_signal_new ("color_table_independent_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, color_table_independent_changed), NULL, NULL, amitk_marshal_NONE__ENUM, G_TYPE_NONE, 1, AMITK_TYPE_VIEW_MODE); data_set_signals[INTERPOLATION_CHANGED] = g_signal_new ("interpolation_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, interpolation_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[RENDERING_CHANGED] = g_signal_new ("rendering_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, rendering_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[SUBJECT_ORIENTATION_CHANGED] = g_signal_new ("subject_orientation_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, subject_orientation_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[SUBJECT_SEX_CHANGED] = g_signal_new ("subject_sex_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, subject_sex_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[CONVERSION_CHANGED] = g_signal_new ("conversion_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, conversion_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[SCALE_FACTOR_CHANGED] = g_signal_new ("scale_factor_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, scale_factor_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[MODALITY_CHANGED] = g_signal_new ("modality_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, modality_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[TIME_CHANGED] = g_signal_new ("time_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, time_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[VOXEL_SIZE_CHANGED] = g_signal_new ("voxel_size_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, voxel_size_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[DATA_SET_CHANGED] = g_signal_new ("data_set_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, data_set_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[INVALIDATE_SLICE_CACHE] = g_signal_new ("invalidate_slice_cache", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, invalidate_slice_cache), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); data_set_signals[VIEW_GATES_CHANGED] = g_signal_new ("view_gates_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkDataSetClass, view_gates_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); } static void data_set_init (AmitkDataSet * data_set) { gint i; AmitkWindow i_window; AmitkLimit i_limit; AmitkViewMode i_view_mode; /* put in some sensable values */ data_set->raw_data = NULL; data_set->current_scaling_factor = NULL; data_set->gate_time = NULL; data_set->frame_duration = NULL; data_set->min_max_calculated = FALSE; data_set->frame_max = NULL; data_set->frame_min = NULL; data_set->global_max = 0.0; data_set->global_min = 0.0; amitk_data_set_set_thresholding(data_set, AMITK_THRESHOLDING_GLOBAL); amitk_data_set_set_threshold_style(data_set, AMITK_THRESHOLD_STYLE_MIN_MAX); for (i=0; i<2; i++) data_set->threshold_ref_frame[i]=0; data_set->distribution = NULL; data_set->modality = AMITK_MODALITY_PET; data_set->voxel_size = one_point; data_set->scaling_type = AMITK_SCALING_TYPE_0D; data_set->internal_scaling_factor = amitk_raw_data_DOUBLE_0D_SCALING_init(1.0); g_assert(data_set->internal_scaling_factor!=NULL); data_set->internal_scaling_intercept = NULL; amitk_data_set_set_scale_factor(data_set, 1.0); data_set->conversion = AMITK_CONVERSION_STRAIGHT; data_set->injected_dose = NAN; /* unknown */ data_set->displayed_dose_unit = AMITK_DOSE_UNIT_MEGABECQUEREL; data_set->subject_weight = NAN; /* unknown */ data_set->displayed_weight_unit = AMITK_WEIGHT_UNIT_KILOGRAM; data_set->cylinder_factor = 1.0; data_set->displayed_cylinder_unit = AMITK_CYLINDER_UNIT_MEGABECQUEREL_PER_CC_IMAGE_UNIT; data_set->inversion_time = NAN; /* unknown */ data_set->echo_time = NAN; /* unknown */ data_set->diffusion_b_value = NAN; /* unknown */ data_set->diffusion_direction = zero_point; data_set->view_start_gate = 0; data_set->view_end_gate = 0; data_set->num_view_gates= 1; data_set->scan_start = 0.0; for(i_view_mode=0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) { data_set->color_table[i_view_mode] = AMITK_COLOR_TABLE_BW_LINEAR; data_set->color_table_independent[i_view_mode] = FALSE; } data_set->interpolation = AMITK_INTERPOLATION_NEAREST_NEIGHBOR; data_set->rendering = AMITK_RENDERING_MPR; data_set->subject_orientation = AMITK_SUBJECT_ORIENTATION_UNKNOWN; data_set->subject_sex = AMITK_SUBJECT_SEX_UNKNOWN; data_set->slice_cache = NULL; data_set->slice_parent = NULL; for (i_window=0; i_window < AMITK_WINDOW_NUM; i_window++) for (i_limit=0; i_limit < AMITK_LIMIT_NUM; i_limit++) data_set->threshold_window[i_window][i_limit] = amitk_window_default[i_window][i_limit]; /* set the scan date to the current time, good for an initial guess */ data_set->scan_date = NULL; amitk_data_set_set_scan_date(data_set, NULL); data_set->subject_name = NULL; amitk_data_set_set_subject_name(data_set, NULL); data_set->subject_id = NULL; amitk_data_set_set_subject_id(data_set, NULL); data_set->subject_dob = NULL; amitk_data_set_set_subject_dob(data_set, NULL); data_set->series_number = 0; data_set->dicom_image_type = NULL; data_set->instance_number=0; data_set->gate_num=-1; } static void data_set_finalize (GObject *object) { AmitkDataSet * data_set = AMITK_DATA_SET(object); if (data_set->raw_data != NULL) { #ifdef AMIDE_DEBUG if (data_set->raw_data->dim.z != 1) /* avoid slices */ g_print("\tfreeing data set: %s\n",AMITK_OBJECT_NAME(data_set)); #endif g_object_unref(data_set->raw_data); data_set->raw_data = NULL; } if (data_set->internal_scaling_factor != NULL) { g_object_unref(data_set->internal_scaling_factor); data_set->internal_scaling_factor = NULL; } if (data_set->internal_scaling_intercept != NULL) { g_object_unref(data_set->internal_scaling_intercept); data_set->internal_scaling_intercept = NULL; } if (data_set->current_scaling_factor != NULL) { g_object_unref(data_set->current_scaling_factor); data_set->current_scaling_factor = NULL; } if (data_set->distribution != NULL) { g_object_unref(data_set->distribution); data_set->distribution = NULL; } if (data_set->gate_time != NULL) { g_free(data_set->gate_time); data_set->gate_time = NULL; } if (data_set->frame_duration != NULL) { g_free(data_set->frame_duration); data_set->frame_duration = NULL; } if (data_set->frame_max != NULL) { g_free(data_set->frame_max); data_set->frame_max = NULL; } if (data_set->frame_min != NULL) { g_free(data_set->frame_min); data_set->frame_min = NULL; } if (data_set->scan_date != NULL) { g_free(data_set->scan_date); data_set->scan_date = NULL; } if (data_set->subject_name != NULL) { g_free(data_set->subject_name); data_set->subject_name = NULL; } if (data_set->subject_id != NULL) { g_free(data_set->subject_id); data_set->subject_id = NULL; } if (data_set->subject_dob != NULL) { g_free(data_set->subject_dob); data_set->subject_dob = NULL; } if (data_set->dicom_image_type != NULL) { g_free(data_set->dicom_image_type); data_set->dicom_image_type = NULL; } if (data_set->slice_cache != NULL) { amitk_objects_unref(data_set->slice_cache); data_set->slice_cache = NULL; } if (data_set->slice_parent != NULL) { g_object_remove_weak_pointer(G_OBJECT(data_set->slice_parent), (gpointer *) &(data_set->slice_parent)); data_set->slice_parent = NULL; } G_OBJECT_CLASS (parent_class)->finalize (object); } static void data_set_scale(AmitkSpace *space, AmitkPoint *ref_point, AmitkPoint *scaling) { AmitkDataSet * data_set; AmitkPoint voxel_size; g_return_if_fail(AMITK_IS_DATA_SET(space)); data_set = AMITK_DATA_SET(space); /* first, pass the signal on, this gets the volume corner value readjusted */ AMITK_SPACE_CLASS(parent_class)->space_scale (space, ref_point, scaling); /* readjust the voxel size based on the new corner */ if (AMITK_VOLUME_VALID(data_set)) { voxel_size = AMITK_VOLUME_CORNER(data_set); voxel_size.x /= AMITK_DATA_SET_DIM_X(data_set); voxel_size.y /= AMITK_DATA_SET_DIM_Y(data_set); voxel_size.z /= AMITK_DATA_SET_DIM_Z(data_set); data_set_set_voxel_size(data_set, voxel_size); } } static void data_set_space_changed(AmitkSpace * space) { AmitkDataSet * data_set; g_return_if_fail(AMITK_IS_DATA_SET(space)); data_set = AMITK_DATA_SET(space); g_signal_emit(G_OBJECT (data_set), data_set_signals[INVALIDATE_SLICE_CACHE], 0); if (AMITK_SPACE_CLASS(parent_class)->space_changed) AMITK_SPACE_CLASS(parent_class)->space_changed (space); } static void data_set_selection_changed(AmitkObject * object) { AmitkDataSet * data_set; g_return_if_fail(AMITK_IS_DATA_SET(object)); data_set = AMITK_DATA_SET(object); if (!amitk_object_get_selected(object, AMITK_SELECTION_ANY)) { data_set->slice_cache = slice_cache_trim(data_set->slice_cache, MIN_LOCAL_CACHE_SIZE); } return; } static AmitkObject * data_set_copy (const AmitkObject * object) { AmitkDataSet * copy; g_return_val_if_fail(AMITK_IS_DATA_SET(object), NULL); copy = amitk_data_set_new(NULL, -1); amitk_object_copy_in_place(AMITK_OBJECT(copy), object); return AMITK_OBJECT(copy); } /* Notes: - does not make a copy of the source raw_data, just adds a reference - does not make a copy of the distribution data, just adds a reference - does not make a copy of the internal scaling factor, just adds a reference - does not make a copy of the internal scaling intercept, just adds a reference */ static void data_set_copy_in_place (AmitkObject * dest_object, const AmitkObject * src_object) { AmitkDataSet * src_ds; AmitkDataSet * dest_ds; AmitkViewMode i_view_mode; guint i; g_return_if_fail(AMITK_IS_DATA_SET(src_object)); g_return_if_fail(AMITK_IS_DATA_SET(dest_object)); src_ds = AMITK_DATA_SET(src_object); dest_ds = AMITK_DATA_SET(dest_object); /* copy the data elements */ amitk_data_set_set_scan_date(dest_ds, AMITK_DATA_SET_SCAN_DATE(src_object)); amitk_data_set_set_subject_name(dest_ds, AMITK_DATA_SET_SUBJECT_NAME(src_object)); amitk_data_set_set_subject_id(dest_ds, AMITK_DATA_SET_SUBJECT_ID(src_object)); amitk_data_set_set_subject_dob(dest_ds, AMITK_DATA_SET_SUBJECT_DOB(src_object)); amitk_data_set_set_series_number(dest_ds, AMITK_DATA_SET_SERIES_NUMBER(src_object)); amitk_data_set_set_dicom_image_type(dest_ds, AMITK_DATA_SET_DICOM_IMAGE_TYPE(src_object)); amitk_data_set_set_modality(dest_ds, AMITK_DATA_SET_MODALITY(src_object)); dest_ds->voxel_size = AMITK_DATA_SET_VOXEL_SIZE(src_object); if (src_ds->raw_data != NULL) { if (dest_ds->raw_data != NULL) g_object_unref(dest_ds->raw_data); dest_ds->raw_data = g_object_ref(src_ds->raw_data); } /* just reference, as internal scaling is never suppose to change */ dest_ds->scaling_type = src_ds->scaling_type; if (src_ds->internal_scaling_factor != NULL) { if (dest_ds->internal_scaling_factor != NULL) g_object_unref(dest_ds->internal_scaling_factor); dest_ds->internal_scaling_factor = g_object_ref(src_ds->internal_scaling_factor); } if (src_ds->internal_scaling_intercept != NULL) { if (dest_ds->internal_scaling_intercept != NULL) g_object_unref(dest_ds->internal_scaling_intercept); dest_ds->internal_scaling_intercept = g_object_ref(src_ds->internal_scaling_intercept); } dest_ds->scan_start = AMITK_DATA_SET_SCAN_START(src_object); if (src_ds->distribution != NULL) { if (dest_ds->distribution != NULL) g_object_unref(dest_ds->distribution); dest_ds->distribution = g_object_ref(src_ds->distribution); } amitk_data_set_set_scale_factor(dest_ds, AMITK_DATA_SET_SCALE_FACTOR(src_object)); dest_ds->conversion = AMITK_DATA_SET_CONVERSION(src_object); dest_ds->injected_dose = AMITK_DATA_SET_INJECTED_DOSE(src_object); dest_ds->displayed_dose_unit = AMITK_DATA_SET_DISPLAYED_DOSE_UNIT(src_object); dest_ds->subject_weight = AMITK_DATA_SET_SUBJECT_WEIGHT(src_object); dest_ds->displayed_weight_unit = AMITK_DATA_SET_DISPLAYED_WEIGHT_UNIT(src_object); dest_ds->cylinder_factor = AMITK_DATA_SET_CYLINDER_FACTOR(src_object); dest_ds->displayed_cylinder_unit = AMITK_DATA_SET_DISPLAYED_CYLINDER_UNIT(src_object); dest_ds->inversion_time = AMITK_DATA_SET_INVERSION_TIME(src_object); dest_ds->echo_time = AMITK_DATA_SET_ECHO_TIME(src_object); dest_ds->diffusion_b_value = AMITK_DATA_SET_DIFFUSION_B_VALUE(src_object); dest_ds->diffusion_direction = AMITK_DATA_SET_DIFFUSION_DIRECTION(src_object); for (i_view_mode=0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) amitk_data_set_set_color_table(dest_ds, i_view_mode, AMITK_DATA_SET_COLOR_TABLE(src_object, i_view_mode)); for (i_view_mode=AMITK_VIEW_MODE_LINKED_2WAY; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) amitk_data_set_set_color_table_independent(dest_ds, i_view_mode, AMITK_DATA_SET_COLOR_TABLE_INDEPENDENT(src_object, i_view_mode)); amitk_data_set_set_interpolation(dest_ds, AMITK_DATA_SET_INTERPOLATION(src_object)); amitk_data_set_set_rendering(dest_ds, AMITK_DATA_SET_RENDERING(src_object)); amitk_data_set_set_subject_orientation(dest_ds, AMITK_DATA_SET_SUBJECT_ORIENTATION(src_object)); amitk_data_set_set_subject_sex(dest_ds, AMITK_DATA_SET_SUBJECT_SEX(src_object)); amitk_data_set_set_thresholding(dest_ds,AMITK_DATA_SET_THRESHOLDING(src_object)); amitk_data_set_set_threshold_style(dest_ds, AMITK_DATA_SET_THRESHOLD_STYLE(src_object)); for (i=0; i<2; i++) { dest_ds->threshold_max[i] = AMITK_DATA_SET_THRESHOLD_MAX(src_object, i); dest_ds->threshold_min[i] = AMITK_DATA_SET_THRESHOLD_MIN(src_object, i); dest_ds->threshold_ref_frame[i] = AMITK_DATA_SET_THRESHOLD_REF_FRAME(src_object, i); } amitk_data_set_set_view_start_gate(dest_ds, AMITK_DATA_SET_VIEW_START_GATE(src_object)); amitk_data_set_set_view_end_gate(dest_ds, AMITK_DATA_SET_VIEW_END_GATE(src_object)); /* make a separate copy in memory of the data set's gate times */ if (dest_ds->gate_time != NULL) g_free(dest_ds->gate_time); dest_ds->gate_time = amitk_data_set_get_gate_time_mem(dest_ds); g_return_if_fail(dest_ds->gate_time != NULL); for (i=0;igate_time[i] = amitk_data_set_get_gate_time(src_ds, i); /* make a separate copy in memory of the data set's frame durations */ if (dest_ds->frame_duration != NULL) g_free(dest_ds->frame_duration); dest_ds->frame_duration = amitk_data_set_get_frame_duration_mem(dest_ds); g_return_if_fail(dest_ds->frame_duration != NULL); for (i=0;iframe_duration[i] = amitk_data_set_get_frame_duration(src_ds, i); /* if they've already been calculated, make a copy in memory of the data set's max/min values */ dest_ds->min_max_calculated = AMITK_DATA_SET(src_object)->min_max_calculated; if (dest_ds->frame_max != NULL) { g_free(dest_ds->frame_max); dest_ds->frame_max = NULL; } if (dest_ds->frame_min != NULL) { g_free(dest_ds->frame_min); dest_ds->frame_min = NULL; } if (src_ds->min_max_calculated) { dest_ds->global_max = AMITK_DATA_SET(src_object)->global_max; dest_ds->global_min = AMITK_DATA_SET(src_object)->global_min; dest_ds->frame_max = amitk_data_set_get_frame_min_max_mem(dest_ds); g_return_if_fail(dest_ds->frame_max != NULL); for (i=0;iframe_max[i] = src_ds->frame_max[i]; dest_ds->frame_min = amitk_data_set_get_frame_min_max_mem(dest_ds); g_return_if_fail(dest_ds->frame_min != NULL); for (i=0;iframe_min[i] = src_ds->frame_min[i]; } AMITK_OBJECT_CLASS (parent_class)->object_copy_in_place (dest_object, src_object); } static void data_set_write_xml(const AmitkObject * object, xmlNodePtr nodes, FILE * study_file) { AmitkDataSet * ds; gchar * xml_filename; gchar * name; gchar * temp_string; guint64 location, size; AmitkWindow i_window; AmitkLimit i_limit; AmitkViewMode i_view_mode; AMITK_OBJECT_CLASS(parent_class)->object_write_xml(object, nodes, study_file); ds = AMITK_DATA_SET(object); xml_save_string(nodes, "scan_date", AMITK_DATA_SET_SCAN_DATE(ds)); xml_save_string(nodes, "subject_name", AMITK_DATA_SET_SUBJECT_NAME(ds)); xml_save_string(nodes, "subject_id", AMITK_DATA_SET_SUBJECT_ID(ds)); xml_save_string(nodes, "subject_dob", AMITK_DATA_SET_SUBJECT_DOB(ds)); xml_save_int(nodes, "series_number", AMITK_DATA_SET_SERIES_NUMBER(ds)); xml_save_string(nodes, "subject_dicom_image_type", AMITK_DATA_SET_DICOM_IMAGE_TYPE(ds)); xml_save_string(nodes, "modality", amitk_modality_get_name(AMITK_DATA_SET_MODALITY(ds))); amitk_point_write_xml(nodes,"voxel_size", AMITK_DATA_SET_VOXEL_SIZE(ds)); name = g_strdup_printf("data-set_%s_raw-data",AMITK_OBJECT_NAME(object)); amitk_raw_data_write_xml(AMITK_DATA_SET_RAW_DATA(ds), name, study_file, &xml_filename, &location, &size); g_free(name); if (study_file == NULL) { xml_save_string(nodes, "raw_data_file", xml_filename); g_free(xml_filename); } else { xml_save_location_and_size(nodes, "raw_data_location_and_size", location, size); } name = g_strdup_printf("data-set_%s_scaling-factors",AMITK_OBJECT_NAME(ds)); amitk_raw_data_write_xml(ds->internal_scaling_factor, name, study_file, &xml_filename, &location, &size); g_free(name); if (study_file == NULL) { xml_save_string(nodes, "internal_scaling_factor_file", xml_filename); g_free(xml_filename); } else { xml_save_location_and_size(nodes, "internal_scaling_factor_location_and_size", location, size); } if (ds->internal_scaling_intercept != NULL) { name = g_strdup_printf("data-set_%s_scaling-intercepts",AMITK_OBJECT_NAME(ds)); amitk_raw_data_write_xml(ds->internal_scaling_intercept, name, study_file, &xml_filename, &location, &size); g_free(name); if (study_file == NULL) { xml_save_string(nodes, "internal_scaling_intercepts_file", xml_filename); g_free(xml_filename); } else { xml_save_location_and_size(nodes, "internal_scaling_intercepts_location_and_size", location, size); } } if (ds->distribution != NULL) { name = g_strdup_printf("data-set_%s_distribution",AMITK_OBJECT_NAME(ds)); amitk_raw_data_write_xml(ds->distribution, name, study_file, &xml_filename, &location, &size); g_free(name); if (study_file == NULL) { xml_save_string(nodes, "distribution_file", xml_filename); g_free(xml_filename); } else { xml_save_location_and_size(nodes, "distribution_location_and_size", location, size); } } xml_save_string(nodes, "scaling_type", amitk_scaling_type_get_name(ds->scaling_type)); xml_save_data(nodes, "scale_factor", AMITK_DATA_SET_SCALE_FACTOR(ds)); xml_save_string(nodes, "conversion", amitk_conversion_get_name(ds->conversion)); xml_save_data(nodes, "injected_dose", AMITK_DATA_SET_INJECTED_DOSE(ds)); xml_save_string(nodes, "displayed_dose_unit", amitk_dose_unit_get_name(ds->displayed_dose_unit)); xml_save_data(nodes, "subject_weight", AMITK_DATA_SET_SUBJECT_WEIGHT(ds)); xml_save_string(nodes, "displayed_weight_unit", amitk_weight_unit_get_name(ds->displayed_weight_unit)); xml_save_data(nodes, "cylinder_factor", AMITK_DATA_SET_CYLINDER_FACTOR(ds)); xml_save_string(nodes, "displayed_cylinder_unit", amitk_cylinder_unit_get_name(ds->displayed_cylinder_unit)); xml_save_data(nodes, "inversion_time", AMITK_DATA_SET_INVERSION_TIME(ds)); xml_save_data(nodes, "echo_time", AMITK_DATA_SET_ECHO_TIME(ds)); xml_save_data(nodes, "diffusion_b_value", AMITK_DATA_SET_DIFFUSION_B_VALUE(ds)); amitk_point_write_xml(nodes, "diffusion_direction", AMITK_DATA_SET_DIFFUSION_DIRECTION(ds)); xml_save_time(nodes, "scan_start", AMITK_DATA_SET_SCAN_START(ds)); xml_save_times(nodes, "gate_time", ds->gate_time, AMITK_DATA_SET_NUM_GATES(ds)); xml_save_times(nodes, "frame_duration", ds->frame_duration, AMITK_DATA_SET_NUM_FRAMES(ds)); xml_save_string(nodes, "color_table", amitk_color_table_get_name(AMITK_DATA_SET_COLOR_TABLE(ds, AMITK_VIEW_MODE_SINGLE))); for (i_view_mode=AMITK_VIEW_MODE_LINKED_2WAY; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) { temp_string = g_strdup_printf("color_table_%d", i_view_mode+1); xml_save_string(nodes, temp_string, amitk_color_table_get_name(AMITK_DATA_SET_COLOR_TABLE(ds, i_view_mode))); g_free(temp_string); temp_string = g_strdup_printf("color_table_%d_independent", i_view_mode+1); xml_save_int(nodes, temp_string, AMITK_DATA_SET_COLOR_TABLE_INDEPENDENT(ds, i_view_mode)); g_free(temp_string); } xml_save_string(nodes, "interpolation", amitk_interpolation_get_name(AMITK_DATA_SET_INTERPOLATION(ds))); xml_save_string(nodes, "rendering", amitk_rendering_get_name(AMITK_DATA_SET_RENDERING(ds))); xml_save_string(nodes, "subject_orientation", amitk_subject_orientation_get_name(AMITK_DATA_SET_SUBJECT_ORIENTATION(ds))); xml_save_string(nodes, "subject_sex", amitk_subject_sex_get_name(AMITK_DATA_SET_SUBJECT_SEX(ds))); xml_save_string(nodes, "thresholding", amitk_thresholding_get_name(AMITK_DATA_SET_THRESHOLDING(ds))); xml_save_string(nodes, "threshold_style", amitk_threshold_style_get_name(AMITK_DATA_SET_THRESHOLD_STYLE(ds))); xml_save_data(nodes, "threshold_max_0", ds->threshold_max[0]); xml_save_data(nodes, "threshold_min_0", ds->threshold_min[0]); xml_save_int(nodes, "threshold_ref_frame_0", ds->threshold_ref_frame[0]); xml_save_data(nodes, "threshold_max_1", ds->threshold_max[1]); xml_save_data(nodes, "threshold_min_1", ds->threshold_min[1]); xml_save_int(nodes, "threshold_ref_frame_1", ds->threshold_ref_frame[1]); for (i_window=0; i_window < AMITK_WINDOW_NUM; i_window++) for (i_limit=0; i_limit < AMITK_LIMIT_NUM; i_limit++) { temp_string = g_strdup_printf("threshold_window_%s-%s", amitk_window_get_name(i_window), amitk_limit_get_name(i_limit)); xml_save_data(nodes, temp_string, ds->threshold_window[i_window][i_limit]); g_free(temp_string); } xml_save_int(nodes, "view_start_gate", AMITK_DATA_SET_VIEW_START_GATE(ds)); xml_save_int(nodes, "view_end_gate", AMITK_DATA_SET_VIEW_END_GATE(ds)); return; } static gchar * data_set_read_xml(AmitkObject * object, xmlNodePtr nodes, FILE * study_file, gchar * error_buf) { AmitkDataSet * ds; AmitkModality i_modality; AmitkColorTable i_color_table; AmitkViewMode i_view_mode; AmitkThresholding i_thresholding; AmitkThresholdStyle i_threshold_style; AmitkInterpolation i_interpolation; AmitkRendering i_rendering; AmitkSubjectOrientation i_subject_orientation; AmitkSubjectSex i_subject_sex; AmitkScalingType i_scaling_type; AmitkConversion i_conversion; AmitkDoseUnit i_dose_unit; AmitkWeightUnit i_weight_unit; AmitkCylinderUnit i_cylinder_unit; AmitkWindow i_window; AmitkLimit i_limit; gchar * temp_string; gchar * temp_string2; gchar * filename=NULL; guint64 location, size; gboolean intercept; error_buf = AMITK_OBJECT_CLASS(parent_class)->object_read_xml(object, nodes, study_file, error_buf); ds = AMITK_DATA_SET(object); temp_string = xml_get_string(nodes, "scan_date"); amitk_data_set_set_scan_date(ds, temp_string); g_free(temp_string); if (xml_node_exists(nodes, "subject_name")) { temp_string = xml_get_string(nodes, "subject_name"); amitk_data_set_set_subject_name(ds, temp_string); g_free(temp_string); } if (xml_node_exists(nodes, "subject_id")) { temp_string = xml_get_string(nodes, "subject_id"); amitk_data_set_set_subject_id(ds, temp_string); g_free(temp_string); } if (xml_node_exists(nodes, "subject_dob")) { temp_string = xml_get_string(nodes, "subject_dob"); amitk_data_set_set_subject_dob(ds, temp_string); g_free(temp_string); } ds->series_number = xml_get_int(nodes,"series_number", &error_buf); if (xml_node_exists(nodes, "dicom_image_type")) { temp_string = xml_get_string(nodes, "dicom_image_type"); amitk_data_set_set_subject_dob(ds, temp_string); g_free(temp_string); } temp_string = xml_get_string(nodes, "modality"); if (temp_string != NULL) for (i_modality=0; i_modality < AMITK_MODALITY_NUM; i_modality++) if (g_ascii_strcasecmp(temp_string, amitk_modality_get_name(i_modality)) == 0) amitk_data_set_set_modality(ds, i_modality); g_free(temp_string); ds->voxel_size = amitk_point_read_xml(nodes, "voxel_size", &error_buf); if (EQUAL_ZERO(ds->voxel_size.x)) { g_warning(_("Voxel size X was read as 0, setting to 1 mm. This may be an internationalization error.")); ds->voxel_size.x = 1.0; } if (EQUAL_ZERO(ds->voxel_size.y)) { g_warning(_("Voxel size Y was read as 0, setting to 1 mm. This may be an internationalization error.")); ds->voxel_size.y = 1.0; } if (EQUAL_ZERO(ds->voxel_size.z)) { g_warning(_("Voxel size Z was read as 0, setting to 1 mm. This may be an internationalization error.")); ds->voxel_size.z = 1.0; } if (study_file == NULL) filename = xml_get_string(nodes, "raw_data_file"); else xml_get_location_and_size(nodes, "raw_data_location_and_size", &location, &size, &error_buf); ds->raw_data = amitk_raw_data_read_xml(filename, study_file, location, size, &error_buf, NULL, NULL); if (filename != NULL) { g_free(filename); filename = NULL; } /* changed internal_scaling to internal_scaling_factor in 0.8.15 - compensate for old naming scheme */ if (study_file == NULL) { if (xml_node_exists(nodes, "internal_scaling_file")) filename = xml_get_string(nodes, "internal_scaling_file"); else filename = xml_get_string(nodes, "internal_scaling_factor_file"); } else { if (xml_node_exists(nodes, "internal_scaling_location_and_size")) xml_get_location_and_size(nodes, "internal_scaling_location_and_size", &location, &size, &error_buf); else xml_get_location_and_size(nodes, "internal_scaling_factor_location_and_size", &location, &size, &error_buf); } if (ds->internal_scaling_factor != NULL) { g_object_unref(ds->internal_scaling_factor); ds->internal_scaling_factor=NULL; } ds->internal_scaling_factor = amitk_raw_data_read_xml(filename, study_file, location, size, &error_buf, NULL, NULL); if (filename != NULL) { g_free(filename); filename = NULL; } if (ds->internal_scaling_factor == NULL) { amitk_append_str_with_newline(&error_buf, _("internal scaling factor returned NULL... either file is corrupt, or AMIDE has a bug")); return error_buf; /* something really bad has happened */ } /* added an optional internal_scaling_intercept in 0.8.15 */ if (ds->internal_scaling_intercept != NULL) { g_object_unref(ds->internal_scaling_intercept); ds->internal_scaling_intercept = NULL; } intercept = FALSE; if (study_file == NULL) { if (xml_node_exists(nodes, "internal_scaling_intercepts_file")) { filename = xml_get_string(nodes, "internal_scaling_intercepts_file"); intercept = TRUE; } } else { if (xml_node_exists(nodes, "internal_scaling_intercepts_location_and_size")) { xml_get_location_and_size(nodes, "internal_scaling_intercepts_location_and_size", &location, &size, &error_buf); intercept = TRUE; } } if (intercept) { ds->internal_scaling_intercept = amitk_raw_data_read_xml(filename, study_file, location, size, &error_buf, NULL, NULL); if (filename != NULL) { g_free(filename); filename = NULL; } if (!AMITK_DATA_SET_SCALING_HAS_INTERCEPT(ds)) ds->scaling_type += 3; /* quick hack for some 0.8.15 beta's */ } if (xml_node_exists(nodes, "distribution_file") || xml_node_exists(nodes, "distribution_location_and_size")) { if (study_file == NULL) filename = xml_get_string(nodes, "distribution_file"); else xml_get_location_and_size(nodes, "distribution_location_and_size", &location, &size, &error_buf); if (ds->distribution != NULL) g_object_unref(ds->distribution); ds->distribution = amitk_raw_data_read_xml(filename, study_file, location, size, &error_buf, NULL, NULL); if (filename != NULL) { g_free(filename); filename = NULL; } } /* figure out the scaling type */ temp_string = xml_get_string(nodes, "scaling_type"); if (temp_string != NULL) { for (i_scaling_type=0; i_scaling_type < AMITK_SCALING_TYPE_NUM; i_scaling_type++) if (g_ascii_strcasecmp(temp_string, amitk_scaling_type_get_name(i_scaling_type)) == 0) ds->scaling_type = i_scaling_type; } else { /* scaling_type is a new entry, circa 0.7.7 */ if (ds->internal_scaling_factor->dim.z > 1) ds->scaling_type = AMITK_SCALING_TYPE_2D; else if ((ds->internal_scaling_factor->dim.t > 1) || (ds->internal_scaling_factor->dim.g > 1)) ds->scaling_type = AMITK_SCALING_TYPE_1D; else ds->scaling_type = AMITK_SCALING_TYPE_0D; } g_free(temp_string); /* a little legacy bit, the type of internal_scaling has been changed to double as of amide 0.7.1 */ if (ds->internal_scaling_factor->format != AMITK_FORMAT_DOUBLE) { AmitkRawData * old_scaling; AmitkVoxel i; amitk_append_str_with_newline(&error_buf, _("wrong type found on internal scaling, converting to double")); old_scaling = ds->internal_scaling_factor; ds->internal_scaling_factor = amitk_raw_data_new_with_data(AMITK_FORMAT_DOUBLE, old_scaling->dim); if (ds->internal_scaling_factor == NULL) { amitk_append_str_with_newline(&error_buf, _("Couldn't allocate memory space for the new scaling factors")); return error_buf; } for (i.t=0; i.tinternal_scaling_factor->dim.t; i.t++) for (i.g=0; i.ginternal_scaling_factor->dim.g; i.g++) for (i.z=0; i.zinternal_scaling_factor->dim.z; i.z++) for (i.y=0; i.yinternal_scaling_factor->dim.y; i.y++) for (i.x=0; i.xinternal_scaling_factor->dim.x; i.x++) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(ds->internal_scaling_factor,i) = amitk_raw_data_get_value(old_scaling, i); g_object_unref(old_scaling); } /* end legacy cruft */ amitk_data_set_set_scale_factor(ds, xml_get_data(nodes, "scale_factor", &error_buf)); ds->injected_dose = xml_get_data(nodes, "injected_dose", &error_buf); ds->subject_weight = xml_get_data(nodes, "subject_weight", &error_buf); ds->cylinder_factor = xml_get_data(nodes, "cylinder_factor", &error_buf); ds->inversion_time = xml_get_data(nodes, "inversion_time", &error_buf); ds->echo_time = xml_get_data(nodes, "echo_time", &error_buf); ds->diffusion_b_value = xml_get_data(nodes, "diffusion_b_value", &error_buf); ds->diffusion_direction = amitk_point_read_xml(nodes, "diffusion_direction", &error_buf); temp_string = xml_get_string(nodes, "conversion"); if (temp_string != NULL) { for (i_conversion=0; i_conversion < AMITK_CONVERSION_NUM; i_conversion++) if (g_ascii_strcasecmp(temp_string, amitk_conversion_get_name(i_conversion)) == 0) ds->conversion = i_conversion; if (g_ascii_strcasecmp(temp_string,"percent-id-per-g") == 0) /* in 0.9.0 changed to percent-id-per-cc */ ds->conversion = AMITK_CONVERSION_PERCENT_ID_PER_CC; } g_free(temp_string); temp_string = xml_get_string(nodes, "displayed_dose_unit"); if (temp_string != NULL) for (i_dose_unit=0; i_dose_unit < AMITK_DOSE_UNIT_NUM; i_dose_unit++) if (g_ascii_strcasecmp(temp_string, amitk_dose_unit_get_name(i_dose_unit)) == 0) ds->displayed_dose_unit = i_dose_unit; g_free(temp_string); temp_string = xml_get_string(nodes, "displayed_weight_unit"); if (temp_string != NULL) for (i_weight_unit=0; i_weight_unit < AMITK_WEIGHT_UNIT_NUM; i_weight_unit++) if (g_ascii_strcasecmp(temp_string, amitk_weight_unit_get_name(i_weight_unit)) == 0) ds->displayed_weight_unit = i_weight_unit; g_free(temp_string); temp_string = xml_get_string(nodes, "displayed_cylinder_unit"); if (temp_string != NULL) for (i_cylinder_unit=0; i_cylinder_unit < AMITK_CYLINDER_UNIT_NUM; i_cylinder_unit++) if (g_ascii_strcasecmp(temp_string, amitk_cylinder_unit_get_name(i_cylinder_unit)) == 0) ds->displayed_cylinder_unit = i_cylinder_unit; g_free(temp_string); ds->scan_start = xml_get_time(nodes, "scan_start", &error_buf); ds->gate_time = xml_get_times(nodes, "gate_time", AMITK_DATA_SET_NUM_GATES(ds), &error_buf); ds->frame_duration = xml_get_times(nodes, "frame_duration", AMITK_DATA_SET_NUM_FRAMES(ds), &error_buf); for (i_view_mode=0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) { if (i_view_mode == 0) { temp_string = xml_get_string(nodes, "color_table"); } else { temp_string2 = g_strdup_printf("color_table_%d", i_view_mode+1); temp_string = xml_get_string(nodes, temp_string2); g_free(temp_string2); } if (temp_string != NULL) for (i_color_table=0; i_color_table < AMITK_COLOR_TABLE_NUM; i_color_table++) if (g_ascii_strcasecmp(temp_string, amitk_color_table_get_name(i_color_table)) == 0) amitk_data_set_set_color_table(ds, i_view_mode, i_color_table); g_free(temp_string); } for (i_view_mode=AMITK_VIEW_MODE_LINKED_2WAY; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) { temp_string = g_strdup_printf("color_table_%d_independent", i_view_mode+1); amitk_data_set_set_color_table_independent(ds, i_view_mode, xml_get_int(nodes,temp_string, &error_buf)); g_free(temp_string); } temp_string = xml_get_string(nodes, "interpolation"); if (temp_string != NULL) for (i_interpolation=0; i_interpolation < AMITK_INTERPOLATION_NUM; i_interpolation++) if (g_ascii_strcasecmp(temp_string, amitk_interpolation_get_name(i_interpolation)) == 0) amitk_data_set_set_interpolation(ds, i_interpolation); g_free(temp_string); temp_string = xml_get_string(nodes, "rendering"); if (temp_string != NULL) for (i_rendering=0; i_rendering < AMITK_RENDERING_NUM; i_rendering++) if (g_ascii_strcasecmp(temp_string, amitk_rendering_get_name(i_rendering)) == 0) amitk_data_set_set_rendering(ds, i_rendering); g_free(temp_string); temp_string = xml_get_string(nodes, "subject_orientation"); if (temp_string != NULL) for (i_subject_orientation=0; i_subject_orientation < AMITK_SUBJECT_ORIENTATION_NUM; i_subject_orientation++) if (g_ascii_strcasecmp(temp_string, amitk_subject_orientation_get_name(i_subject_orientation)) == 0) amitk_data_set_set_subject_orientation(ds, i_subject_orientation); g_free(temp_string); temp_string = xml_get_string(nodes, "subject_sex"); if (temp_string != NULL) for (i_subject_sex=0; i_subject_sex < AMITK_SUBJECT_SEX_NUM; i_subject_sex++) if (g_ascii_strcasecmp(temp_string, amitk_subject_sex_get_name(i_subject_sex)) == 0) amitk_data_set_set_subject_sex(ds, i_subject_sex); g_free(temp_string); temp_string = xml_get_string(nodes, "thresholding"); if (temp_string != NULL) for (i_thresholding=0; i_thresholding < AMITK_THRESHOLDING_NUM; i_thresholding++) if (g_ascii_strcasecmp(temp_string, amitk_thresholding_get_name(i_thresholding)) == 0) amitk_data_set_set_thresholding(ds, i_thresholding); g_free(temp_string); temp_string = xml_get_string(nodes, "threshold_style"); if (temp_string != NULL) for (i_threshold_style=0; i_threshold_style < AMITK_THRESHOLD_STYLE_NUM; i_threshold_style++) if (g_ascii_strcasecmp(temp_string, amitk_threshold_style_get_name(i_threshold_style)) == 0) amitk_data_set_set_threshold_style(ds, i_threshold_style); g_free(temp_string); ds->threshold_max[0] = xml_get_data(nodes, "threshold_max_0", &error_buf); ds->threshold_max[1] = xml_get_data(nodes, "threshold_max_1", &error_buf); ds->threshold_ref_frame[0] = xml_get_int(nodes,"threshold_ref_frame_0", &error_buf); ds->threshold_min[0] = xml_get_data(nodes, "threshold_min_0", &error_buf); ds->threshold_min[1] = xml_get_data(nodes, "threshold_min_1", &error_buf); ds->threshold_ref_frame[1] = xml_get_int(nodes,"threshold_ref_frame_1", &error_buf); for (i_window=0; i_window < AMITK_WINDOW_NUM; i_window++) for (i_limit=0; i_limit < AMITK_LIMIT_NUM; i_limit++) { temp_string = g_strdup_printf("threshold_window_%s-%s", amitk_window_get_name(i_window), amitk_limit_get_name(i_limit)); ds->threshold_window[i_window][i_limit] = xml_get_data_with_default(nodes, temp_string, AMITK_DATA_SET_THRESHOLD_WINDOW(ds, i_window, i_limit)); g_free(temp_string); } amitk_data_set_set_view_start_gate(ds, xml_get_int(nodes, "view_start_gate", &error_buf)); amitk_data_set_set_view_end_gate(ds, xml_get_int(nodes, "view_end_gate", &error_buf)); /* recalc the temporary parameters */ amitk_data_set_calc_far_corner(ds); /* see if we can drop the intercept/reduce scaling dimensionality */ data_set_drop_intercept(ds); data_set_reduce_scaling_dimension(ds); return error_buf; } static void data_set_invalidate_slice_cache(AmitkDataSet * data_set) { /* invalidate cache */ if (data_set->slice_cache != NULL) { amitk_objects_unref(data_set->slice_cache); data_set->slice_cache = NULL; } return; } /* this does not recalc the far corner, needs to be done separately */ static void data_set_set_voxel_size(AmitkDataSet * ds, const AmitkPoint voxel_size) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (!POINT_EQUAL(AMITK_DATA_SET_VOXEL_SIZE(ds), voxel_size)) { ds->voxel_size = voxel_size; g_signal_emit(G_OBJECT (ds), data_set_signals[VOXEL_SIZE_CHANGED], 0); g_signal_emit(G_OBJECT (ds), data_set_signals[INVALIDATE_SLICE_CACHE], 0); g_signal_emit(G_OBJECT (ds), data_set_signals[DATA_SET_CHANGED], 0); } } /* set preferences to NULL if we don't want to use, modality can be specified as -1 to not set */ AmitkDataSet * amitk_data_set_new (AmitkPreferences * preferences, const AmitkModality modality) { AmitkDataSet * data_set; AmitkWindow i_window; AmitkLimit i_limit; AmitkViewMode i_view_mode; data_set = g_object_new(amitk_data_set_get_type(), NULL); if (modality >= 0) amitk_data_set_set_modality(data_set, modality); if (preferences != NULL) { /* apply our preferential colortable*/ for (i_view_mode=0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) amitk_data_set_set_color_table(data_set,i_view_mode, AMITK_PREFERENCES_COLOR_TABLE(preferences, modality)); /* and copy in the default windows */ for (i_window=0; i_window < AMITK_WINDOW_NUM; i_window++) for (i_limit=0; i_limit < AMITK_LIMIT_NUM; i_limit++) { amitk_data_set_set_threshold_window(data_set, i_window, i_limit, AMITK_PREFERENCES_WINDOW(preferences, i_window, i_limit)); } amitk_data_set_set_threshold_style(data_set, AMITK_PREFERENCES_THRESHOLD_STYLE(preferences)); } return data_set; } AmitkDataSet * amitk_data_set_new_with_data(AmitkPreferences * preferences, const AmitkModality modality, const AmitkFormat format, const AmitkVoxel dim, const AmitkScalingType scaling_type) { AmitkDataSet * data_set; AmitkVoxel scaling_dim; gint i; data_set = amitk_data_set_new(preferences, modality); g_return_val_if_fail(data_set != NULL, NULL); g_assert(data_set->raw_data == NULL); data_set->raw_data = amitk_raw_data_new_with_data(format, dim); if (data_set->raw_data == NULL) { amitk_object_unref(data_set); g_return_val_if_reached(NULL); } g_assert(data_set->gate_time == NULL); data_set->gate_time = amitk_data_set_get_gate_time_mem(data_set); if (data_set->gate_time == NULL) { amitk_object_unref(data_set); g_return_val_if_reached(NULL); } for (i=0; i < dim.g; i++) data_set->gate_time[i] = 0.0; g_assert(data_set->frame_duration == NULL); data_set->frame_duration = amitk_data_set_get_frame_duration_mem(data_set); if (data_set->frame_duration == NULL) { amitk_object_unref(data_set); g_return_val_if_reached(NULL); } for (i=0; i < dim.t; i++) data_set->frame_duration[i] = 1.0; if (data_set->internal_scaling_factor != NULL) { g_object_unref(data_set->internal_scaling_factor); data_set->internal_scaling_factor=NULL; } if (data_set->internal_scaling_intercept != NULL) { g_object_unref(data_set->internal_scaling_intercept); data_set->internal_scaling_intercept=NULL; } scaling_dim = one_voxel; data_set->scaling_type = scaling_type; switch(scaling_type) { case AMITK_SCALING_TYPE_2D: case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: scaling_dim.t = dim.t; scaling_dim.g = dim.g; scaling_dim.z = dim.z; break; case AMITK_SCALING_TYPE_1D: case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: scaling_dim.t = dim.t; scaling_dim.g = dim.g; break; case AMITK_SCALING_TYPE_0D: default: break; } data_set->internal_scaling_factor = amitk_raw_data_new_with_data(AMITK_FORMAT_DOUBLE, scaling_dim); if (data_set->internal_scaling_factor == NULL) { amitk_object_unref(data_set); g_return_val_if_reached(NULL); } amitk_raw_data_DOUBLE_initialize_data(data_set->internal_scaling_factor, 1.0); if (AMITK_DATA_SET_SCALING_HAS_INTERCEPT(data_set)) { data_set->internal_scaling_intercept = amitk_raw_data_new_with_data(AMITK_FORMAT_DOUBLE, scaling_dim); if (data_set->internal_scaling_intercept == NULL) { amitk_object_unref(data_set); g_return_val_if_reached(NULL); } amitk_raw_data_DOUBLE_initialize_data(data_set->internal_scaling_intercept, 0.0); } return data_set; } /* reads the contents of a raw data file into an amide data set structure, note: returned structure will have 1 second frame durations entered note: file_offset is bytes for a binary file, lines for an ascii file */ AmitkDataSet * amitk_data_set_import_raw_file(const gchar * file_name, AmitkRawFormat raw_format, AmitkVoxel data_dim, guint file_offset, AmitkPreferences * preferences, const AmitkModality modality, const gchar * data_set_name, const AmitkPoint voxel_size, const amide_data_t scale_factor, AmitkUpdateFunc update_func, gpointer update_data) { guint g,t; AmitkDataSet * ds; if ((ds = amitk_data_set_new(preferences, modality)) == NULL) { g_warning(_("couldn't allocate memory space for the data set structure to hold data")); return NULL; } /* read in the data set */ ds->raw_data = amitk_raw_data_import_raw_file(file_name, NULL, raw_format, data_dim, file_offset, update_func, update_data); if (ds->raw_data == NULL) { g_warning(_("raw_data_read_file failed returning NULL data set")); amitk_object_unref(ds); return NULL; } /* allocate space for the array containing info on the gate times */ if ((ds->gate_time = amitk_data_set_get_gate_time_mem(ds)) == NULL) { g_warning(_("couldn't allocate memory space for the gate time info")); amitk_object_unref(ds); return NULL; } /* put in fake gate times*/ for (g=0; g < AMITK_DATA_SET_NUM_GATES(ds); g++) ds->gate_time[g] = 0.0; /* allocate space for the array containing info on the duration of the frames */ if ((ds->frame_duration = amitk_data_set_get_frame_duration_mem(ds)) == NULL) { g_warning(_("couldn't allocate memory space for the frame duration info")); amitk_object_unref(ds); return NULL; } /* put in fake frame durations */ for (t=0; t < AMITK_DATA_SET_NUM_FRAMES(ds); t++) ds->frame_duration[t] = 1.0; /* calc max/min values now, as we have a progress dialog */ amitk_data_set_calc_min_max(ds, update_func, update_data); /* set any remaining parameters */ amitk_object_set_name(AMITK_OBJECT(ds),data_set_name); amitk_data_set_set_scale_factor(ds, scale_factor); amitk_data_set_set_voxel_size(ds, voxel_size); amitk_data_set_calc_far_corner(ds); amitk_volume_set_center(AMITK_VOLUME(ds), zero_point); return ds; } /* function to import a file into a data set */ GList * amitk_data_set_import_file(AmitkImportMethod method, int submethod, const gchar * filename, gchar ** pstudyname, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data) { AmitkDataSet * import_ds=NULL; GList * import_data_sets=NULL; GList * temp_list; gchar * filename_base; gchar * filename_extension; gchar * header_filename=NULL; gchar * raw_filename=NULL; gchar ** frags; gint j; #ifdef AMIDE_LIBMDC_SUPPORT gboolean incorrect_permissions=FALSE; gboolean incorrect_hdr_permissions=FALSE; gboolean incorrect_raw_permissions=FALSE; GtkWidget * question; struct stat file_info; gint return_val; #endif g_return_val_if_fail(filename != NULL, NULL); #ifdef AMIDE_LIBMDC_SUPPORT /* figure out if this is a Siemens/Concorde Header file */ if (strstr(filename, ".hdr") != NULL) { /* try to see if a corresponding raw file exists */ raw_filename = g_strdup(filename); raw_filename[strlen(raw_filename)-4] = '\0'; if (stat(raw_filename, &file_info) != 0) {/* file doesn't exist*/ g_free(raw_filename); raw_filename = NULL; } } else { /* try to see if a header file exists */ header_filename = g_strdup_printf("%s.hdr", filename); if (stat(header_filename, &file_info) != 0) {/* file doesn't exist */ g_free(header_filename); header_filename = NULL; } } #if 1 /* hack for illogical permission problems... we get this sometimes at UCLA as one of our disk servers is a windows machine */ if (stat(filename, &file_info) == 0) incorrect_permissions = (access(filename, R_OK) != 0); if (header_filename != NULL) if (stat(header_filename, &file_info) == 0) incorrect_hdr_permissions = (access(header_filename, R_OK) != 0); if (raw_filename != NULL) if (stat(raw_filename, &file_info) == 0) incorrect_raw_permissions = (access(raw_filename, R_OK) != 0); if (incorrect_permissions || incorrect_hdr_permissions || incorrect_raw_permissions) { /* check if it's okay to change permission of file */ question = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, _("File has incorrect permissions for reading\nCan I try changing access permissions on:\n %s?"), filename); /* and wait for the question to return */ return_val = gtk_dialog_run(GTK_DIALOG(question)); gtk_widget_destroy(question); if (return_val == GTK_RESPONSE_OK) { if (incorrect_permissions) { stat(filename, &file_info); if (chmod(filename, 0400 | file_info.st_mode) != 0) g_warning(_("failed to change read permissions, you're probably not the owner")); /* we'll go ahead and try reading anyway, even if chmod was unsuccessful */ } if (incorrect_hdr_permissions) { stat(header_filename, &file_info); if (chmod(header_filename, 0400 | file_info.st_mode) != 0) g_warning(_("failed to change read permissions, you're probably not the owner")); /* we'll go ahead and try reading anyway, even if chmod was unsuccessful */ } if (incorrect_raw_permissions) { stat(raw_filename, &file_info); if (chmod(raw_filename, 0400 | file_info.st_mode) != 0) g_warning(_("failed to change read permissions on raw data file, you're probably not the owner")); /* we'll go ahead and try reading anyway, even if chmod was unsuccessful */ } } else { /* we hit cancel */ return NULL; } } #endif #endif /* AMITK_LIBMDC_SUPPORT */ /* if we're guessing how to import.... */ if (method == AMITK_IMPORT_METHOD_GUESS) { /* extract the extension of the file */ filename_base = g_path_get_basename(filename); g_strreverse(filename_base); frags = g_strsplit(filename_base, ".", 2); g_free(filename_base); filename_extension = g_strdup(frags[0]); g_strreverse(filename_extension); g_strfreev(frags); #ifdef AMIDE_LIBMDC_SUPPORT if (header_filename != NULL) { method = AMITK_IMPORT_METHOD_LIBMDC; } else #endif #ifdef AMIDE_LIBDCMDATA_SUPPORT if (dcmtk_test_dicom(filename)) { method = AMITK_IMPORT_METHOD_DCMTK; } else #endif if ((g_ascii_strcasecmp(filename_extension, "dat")==0) || (g_ascii_strcasecmp(filename_extension, "raw")==0)) { /* .dat and .raw are assumed to be raw data */ method = AMITK_IMPORT_METHOD_RAW; #ifdef AMIDE_LIBECAT_SUPPORT } else if ((g_ascii_strcasecmp(filename_extension, "img")==0) || (g_ascii_strcasecmp(filename_extension, "v")==0) || (g_ascii_strcasecmp(filename_extension, "atn")==0) || (g_ascii_strcasecmp(filename_extension, "scn")==0)) { /* if it appears to be a cti file */ method = AMITK_IMPORT_METHOD_LIBECAT; #endif } else { /* fallback methods */ #ifdef AMIDE_LIBMDC_SUPPORT /* try passing it to the libmdc library.... */ method = AMITK_IMPORT_METHOD_LIBMDC; #else /* unrecognized file type */ g_warning(_("Extension %s not recognized on file: %s\nGuessing File Type"), filename_extension, filename); method = AMITK_IMPORT_METHOD_RAW; #endif } g_free(filename_extension); } switch (method) { #ifdef AMIDE_LIBDCMDATA_SUPPORT case AMITK_IMPORT_METHOD_DCMTK: import_data_sets = dcmtk_import(filename, pstudyname, preferences, update_func, update_data); break; #endif #ifdef AMIDE_LIBECAT_SUPPORT case AMITK_IMPORT_METHOD_LIBECAT: import_ds =libecat_import(filename, preferences, update_func, update_data); break; #endif #ifdef AMIDE_LIBMDC_SUPPORT case AMITK_IMPORT_METHOD_LIBMDC: import_ds = libmdc_import(header_filename == NULL ? filename : header_filename, submethod, preferences, update_func, update_data); break; #endif case AMITK_IMPORT_METHOD_RAW: default: import_ds= raw_data_import(filename, preferences); break; } if (raw_filename != NULL) g_free(raw_filename); if (header_filename != NULL) g_free(header_filename); if ((import_ds == NULL) && (import_data_sets == NULL)) return NULL; if (import_data_sets == NULL) { import_data_sets = g_list_append(import_data_sets, import_ds); } /* run through the list, and do some last minute corrections */ temp_list = import_data_sets; while (temp_list != NULL) { import_ds = temp_list->data; /* set the thresholds */ import_ds->threshold_max[0] = import_ds->threshold_max[1] = amitk_data_set_get_global_max(import_ds); import_ds->threshold_min[0] = import_ds->threshold_min[1] = ((amitk_data_set_get_global_min(import_ds) > 0.0) || (import_ds->threshold_max[0] <= 0.0)) ? amitk_data_set_get_global_min(import_ds) : 0.0; import_ds->threshold_ref_frame[1] = AMITK_DATA_SET_NUM_FRAMES(import_ds)-1; /* set some sensible thresholds for CT */ if (AMITK_DATA_SET_MODALITY(import_ds) == AMITK_MODALITY_CT) { if (AMITK_DATA_SET_THRESHOLD_WINDOW(import_ds, AMITK_WINDOW_THORAX_SOFT_TISSUE, AMITK_LIMIT_MAX) < amitk_data_set_get_global_max(import_ds)) for (j=0; j<2; j++) { amitk_data_set_set_threshold_min(import_ds, j, AMITK_DATA_SET_THRESHOLD_WINDOW(import_ds, AMITK_WINDOW_THORAX_SOFT_TISSUE, AMITK_LIMIT_MIN)); amitk_data_set_set_threshold_max(import_ds, j, AMITK_DATA_SET_THRESHOLD_WINDOW(import_ds, AMITK_WINDOW_THORAX_SOFT_TISSUE, AMITK_LIMIT_MAX)); } } /* see if we can drop the offset/reducing scaling dimension */ data_set_drop_intercept(import_ds); data_set_reduce_scaling_dimension(import_ds); if (!((AMITK_DATA_SET_VOXEL_SIZE_Z(import_ds) > 0.0) && (AMITK_DATA_SET_VOXEL_SIZE_Y(import_ds) > 0.0) && (AMITK_DATA_SET_VOXEL_SIZE_X(import_ds) > 0.0))) { g_warning(_("Data Set %s has erroneous voxel size of %gx%gx%g, setting to 1.0x1.0x1.0"), AMITK_OBJECT_NAME(import_ds), AMITK_DATA_SET_VOXEL_SIZE_X(import_ds), AMITK_DATA_SET_VOXEL_SIZE_Y(import_ds), AMITK_DATA_SET_VOXEL_SIZE_Z(import_ds)); amitk_data_set_set_voxel_size(import_ds, one_point); } temp_list = temp_list->next; } return import_data_sets; } /* voxel_size only used if resliced=TRUE */ /* if bounding_box == NULL, will create its own using the minimal necessary */ static gboolean export_raw(AmitkDataSet *ds, const gchar * filename, const gboolean resliced, const AmitkPoint voxel_size, const AmitkVolume * bounding_box, AmitkUpdateFunc update_func, gpointer update_data) { AmitkVoxel i,j; FILE * file_pointer=NULL; gfloat * row_data=NULL; AmitkVoxel dim; gint divider; gint num_planes, plane; div_t x; gboolean continue_work=TRUE; size_t num_wrote; size_t total_wrote=0; gchar * temp_string; amide_time_t frame_start, frame_duration; AmitkPoint corner; AmitkVolume * output_volume=NULL; AmitkPoint output_start_pt; AmitkDataSet * slice = NULL; AmitkPoint new_offset; AmitkCanvasPoint pixel_size; gboolean successful = FALSE; #ifdef AMIDE_DEBUG g_print("\t- exporting raw data to file %s\n",filename); #endif dim = AMITK_DATA_SET_DIM(ds); if (resliced) { if (bounding_box != NULL) output_volume = AMITK_VOLUME(amitk_object_copy(AMITK_OBJECT(bounding_box))); else output_volume = amitk_volume_new(); if (output_volume == NULL) goto exit_strategy; if (bounding_box != NULL) { corner = AMITK_VOLUME_CORNER(output_volume); } else { AmitkCorners corners; amitk_volume_get_enclosing_corners(AMITK_VOLUME(ds), AMITK_SPACE(output_volume), corners); corner = point_diff(corners[0], corners[1]); amitk_space_set_offset(AMITK_SPACE(output_volume), amitk_space_s2b(AMITK_SPACE(output_volume), corners[0])); } pixel_size.x = voxel_size.x; pixel_size.y = voxel_size.y; dim.x = ceil(corner.x/voxel_size.x); dim.y = ceil(corner.y/voxel_size.y); dim.z = ceil(corner.z/voxel_size.z); corner.z = voxel_size.z; amitk_volume_set_corner(output_volume, corner); output_start_pt = AMITK_SPACE_OFFSET(output_volume); } g_message("dimensions of output data set will be %dx%dx%dx%dx%d, voxel size of %fx%fx%f", dim.x, dim.y, dim.z, dim.g, dim.t, voxel_size.x, voxel_size.y, voxel_size.z); if ((row_data = g_try_new(gfloat,dim.x)) == NULL) { g_warning(_("Couldn't allocate memory space for row_data")); goto exit_strategy; } /* Note, "wb" is same as "w" on Unix, but not in Windows */ if ((file_pointer = fopen(filename, "wb")) == NULL) { g_warning(_("couldn't open file for writing: %s"),filename); goto exit_strategy; } /* setup the wait dialog */ if (update_func != NULL) { temp_string = g_strdup_printf(_("Exporting Raw Data for:\n %s"), AMITK_OBJECT_NAME(ds)); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } num_planes = dim.g*dim.t*dim.z; plane = 0; divider = ((num_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (num_planes/AMITK_UPDATE_DIVIDER); j = zero_voxel; for(i.t = 0; i.t < dim.t; i.t++) { frame_start = amitk_data_set_get_start_time(ds, i.t) + EPSILON; frame_duration = amitk_data_set_get_frame_duration(ds, i.t) - EPSILON; for (i.g = 0; i.g < dim.g; i.g++) { if (resliced) /* reset the output slice */ amitk_space_set_offset(AMITK_SPACE(output_volume), output_start_pt); for (i.z = 0; (i.z < dim.z) && continue_work; i.z++, plane++) { if (update_func != NULL) { x = div(plane,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, (gdouble) plane/num_planes); } if (resliced) { slice = amitk_data_set_get_slice(ds, frame_start, frame_duration, i.g, pixel_size, output_volume); if ((AMITK_DATA_SET_DIM_X(slice) != dim.x) || (AMITK_DATA_SET_DIM_Y(slice) != dim.y)) { g_warning(_("Error in generating resliced data, %dx%d != %dx%d"), AMITK_DATA_SET_DIM_X(slice), AMITK_DATA_SET_DIM_Y(slice), dim.x, dim.y); goto exit_strategy; } /* advance for next iteration */ new_offset = AMITK_SPACE_OFFSET(output_volume); new_offset.z += voxel_size.z; amitk_space_set_offset(AMITK_SPACE(output_volume), new_offset); } if (resliced) { if (i.z == 0) { gdouble max=0.0; gdouble value=0.0; for (i.y=0, j.y=0; i.y < dim.y; i.y++, j.y++) { for (j.x = 0; j.x < dim.x; j.x++) { value = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(slice, j); if (value > max) max = value; } } #ifdef AMIDE_DEBUG g_print("slice max %f\tstart-duration %f %f\n", max, frame_start, frame_duration); #endif } } for (i.y=0, j.y=0; i.y < dim.y; i.y++, j.y++) { if (resliced) { for (j.x = 0; j.x < dim.x; j.x++) row_data[j.x] = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(slice, j); } else { i.x = 3; for (i.x = 0; i.x < dim.x; i.x++) row_data[i.x] = amitk_data_set_get_value(ds, i); } num_wrote = fwrite(row_data, sizeof(gfloat), dim.x, file_pointer); total_wrote += num_wrote; if ( num_wrote != dim.x) { g_warning(_("incomplete save of raw data, wrote %lx (bytes), file: %s"), total_wrote*sizeof(gfloat), filename); goto exit_strategy; } } /* i.y */ if (slice != NULL) slice = amitk_object_unref(slice); } /* i.z */ } } if (update_func != NULL) /* remove progress bar */ continue_work = (*update_func)(update_data, NULL, (gdouble) 2.0); /* if (!continue_work) goto exit_strategy; */ successful = TRUE; exit_strategy: if (file_pointer != NULL) fclose(file_pointer); if (row_data != NULL) g_free(row_data); if (output_volume != NULL) output_volume = amitk_object_unref(output_volume); if (slice != NULL) slice = amitk_object_unref(slice); return successful; } /* if bounding_box == NULL, will create its own using the minimal necessary */ gboolean amitk_data_set_export_to_file(AmitkDataSet *ds, const AmitkExportMethod method, const int submethod, const gchar * filename, const gchar * studyname, const gboolean resliced, const AmitkPoint voxel_size, const AmitkVolume * bounding_box, AmitkUpdateFunc update_func, gpointer update_data) { gboolean successful = FALSE; switch (method) { #ifdef AMIDE_LIBDCMDATA_SUPPORT case AMITK_EXPORT_METHOD_DCMTK: successful = dcmtk_export(ds, filename, studyname, resliced, voxel_size, bounding_box, update_func, update_data); break; #endif #ifdef AMIDE_LIBMDC_SUPPORT case AMITK_EXPORT_METHOD_LIBMDC: successful = libmdc_export(ds, filename, submethod, resliced, voxel_size, bounding_box, update_func, update_data); break; #endif case AMITK_EXPORT_METHOD_RAW: default: successful = export_raw(ds, filename, resliced, voxel_size, bounding_box, update_func, update_data); break; } return successful; } /* note, this function is fairly stupid. If you put two different dynamic data sets in, it'll just take the one with the most frames, and use those frame durations */ /* if bounding_box == NULL, will create its own using the minimal necessary */ gboolean amitk_data_sets_export_to_file(GList * data_sets, const AmitkExportMethod method, const int submethod, const gchar * filename, const gchar * studyname, const AmitkPoint voxel_size, const AmitkVolume * bounding_box, AmitkUpdateFunc update_func, gpointer update_data) { AmitkDataSet * export_ds=NULL; AmitkVoxel dim; AmitkVolume * volume; GList * temp_data_sets; AmitkDataSet * max_frames_ds; AmitkDataSet * max_gates_ds; AmitkVoxel i_voxel, j_voxel; GList * slices = NULL; GList * temp_slices; AmitkPoint new_offset; amitk_format_DOUBLE_t value; div_t x; gint divider; gint num_planes, plane; gboolean continue_work=TRUE; gchar * temp_string; gchar * export_name; AmitkCanvasPoint pixel_size; AmitkPoint corner; gboolean successful = FALSE; /* setup the wait dialog */ if (update_func != NULL) { temp_string = g_strdup_printf(_("Generating new data set")); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } /* allocate export data set - use the first data set in the list for info */ /* figure out all encompasing corners for the data sets in the base viewing axis */ if (bounding_box != NULL) volume = AMITK_VOLUME(amitk_object_copy(AMITK_OBJECT(bounding_box))); else { AmitkCorners corners; volume = amitk_volume_new(); /* base coordinate frame */ if (volume == NULL) { g_warning(_("Could not allocate memory space for volume")); goto exit_strategy; } amitk_volumes_get_enclosing_corners(data_sets, AMITK_SPACE(volume), corners); amitk_space_set_offset(AMITK_SPACE(volume), corners[0]); amitk_volume_set_corner(volume, amitk_space_b2s(AMITK_SPACE(volume), corners[1])); } pixel_size.x = voxel_size.x; pixel_size.y = voxel_size.y; dim.x = ceil(fabs(AMITK_VOLUME_X_CORNER(volume))/voxel_size.x); dim.y = ceil(fabs(AMITK_VOLUME_Y_CORNER(volume))/voxel_size.y); dim.z = ceil(fabs(AMITK_VOLUME_Z_CORNER(volume))/voxel_size.z); dim.t = 1; dim.g = 1; temp_data_sets = data_sets; max_frames_ds = max_gates_ds = data_sets->data; while (temp_data_sets != NULL) { if (AMITK_DATA_SET_NUM_FRAMES(temp_data_sets->data) > dim.t) { dim.t = AMITK_DATA_SET_NUM_FRAMES(temp_data_sets->data); max_frames_ds = temp_data_sets->data; } if (AMITK_DATA_SET_NUM_GATES(temp_data_sets->data) > dim.g) { dim.g = AMITK_DATA_SET_NUM_GATES(temp_data_sets->data); max_gates_ds = temp_data_sets->data; } temp_data_sets = temp_data_sets->next; } export_ds = amitk_data_set_new_with_data(NULL, AMITK_DATA_SET_MODALITY(max_frames_ds), AMITK_FORMAT_DOUBLE, dim, AMITK_SCALING_TYPE_0D); if (export_ds == NULL) { g_warning(_("Failed to allocate export data set")); goto exit_strategy; } /* get a name */ export_name = g_strdup(AMITK_OBJECT_NAME(data_sets->data)); temp_data_sets = data_sets->next; while (temp_data_sets != NULL) { temp_string = g_strdup_printf("%s+%s",export_name, AMITK_OBJECT_NAME(temp_data_sets->data)); g_free(export_name); export_name = temp_string; temp_data_sets = temp_data_sets->next; } amitk_object_set_name(AMITK_OBJECT(export_ds), export_name); g_free(export_name); /* set various other parameters */ amitk_space_copy_in_place(AMITK_SPACE(export_ds), AMITK_SPACE(volume)); amitk_data_set_set_scale_factor(export_ds, 1.0); export_ds->voxel_size.x = voxel_size.x; export_ds->voxel_size.y = voxel_size.y; export_ds->voxel_size.z = voxel_size.z; amitk_data_set_calc_far_corner(export_ds); amitk_raw_data_DOUBLE_initialize_data(AMITK_DATA_SET_RAW_DATA(export_ds), -INFINITY); export_ds->scan_start = AMITK_DATA_SET_SCAN_START(max_frames_ds); amitk_data_set_set_subject_orientation(export_ds, AMITK_DATA_SET_SUBJECT_ORIENTATION(max_frames_ds)); amitk_data_set_set_subject_sex(export_ds, AMITK_DATA_SET_SUBJECT_SEX(max_frames_ds)); for (i_voxel.t = 0; i_voxel.t < dim.t; i_voxel.t++) { amitk_data_set_set_frame_duration(export_ds, i_voxel.t, amitk_data_set_get_frame_duration(max_frames_ds, i_voxel.t)); } /* fill in export data set from the data sets */ corner = AMITK_VOLUME_CORNER(volume); corner.z = voxel_size.z; amitk_volume_set_corner(volume, corner); /* set the z dim of the slices */ j_voxel.t = j_voxel.g = j_voxel.z = 0; num_planes = dim.g*dim.t*dim.z; plane=0; divider = ((num_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (num_planes/AMITK_UPDATE_DIVIDER); for (i_voxel.t=0; (i_voxel.t< dim.t) && continue_work; i_voxel.t++) for (i_voxel.g=0; (i_voxel.gdata), j_voxel); if (finite(value)) { if (value > AMITK_RAW_DATA_DOUBLE_CONTENT(export_ds->raw_data, i_voxel)) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(export_ds->raw_data, i_voxel) = value; } } temp_slices = temp_slices->next; } amitk_objects_unref(slices); slices = NULL; } if (update_func != NULL) /* remove progress bar */ continue_work = (*update_func)(update_data, NULL, (gdouble) 2.0); if (!continue_work) goto exit_strategy; /* we hit cancel */ /* export data set */ switch (method) { #ifdef AMIDE_LIBDCMDATA_SUPPORT case AMITK_EXPORT_METHOD_DCMTK: successful = dcmtk_export(export_ds, filename, studyname, FALSE, zero_point, volume, update_func, update_data); break; #endif #ifdef AMIDE_LIBMDC_SUPPORT case AMITK_EXPORT_METHOD_LIBMDC: /* clean - libmdc handles infinities, etc. badly */ for (i_voxel.t=0; i_voxel.t< dim.t; i_voxel.t++) for (i_voxel.g=0; i_voxel.graw_data, i_voxel))) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(export_ds->raw_data, i_voxel) = 0.0; successful = libmdc_export(export_ds, filename, submethod, FALSE, zero_point, volume, update_func, update_data); break; #endif case AMITK_EXPORT_METHOD_RAW: default: successful = export_raw(export_ds, filename, FALSE, AMITK_DATA_SET_VOXEL_SIZE(export_ds), volume, update_func, update_data); break; } exit_strategy: if (volume != NULL) { amitk_object_unref(volume); volume = NULL; } if (export_ds != NULL) { amitk_object_unref(export_ds); export_ds = NULL; } if (slices != NULL) { amitk_objects_unref(slices); slices = NULL; } return successful; } /* look through the scaling_intercept factors and see if we they're all zero/we can drop them */ static void data_set_drop_intercept(AmitkDataSet * ds) { AmitkVoxel i_voxel; g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (!AMITK_DATA_SET_SCALING_HAS_INTERCEPT(ds)) return; g_return_if_fail(ds->internal_scaling_intercept != NULL); i_voxel = zero_voxel; for (i_voxel.t=0; i_voxel.t < ds->internal_scaling_intercept->dim.t; i_voxel.t++) for (i_voxel.g=0; i_voxel.g < ds->internal_scaling_intercept->dim.g; i_voxel.g++) for (i_voxel.z=0; i_voxel.z < ds->internal_scaling_intercept->dim.z; i_voxel.z++) /* note, the 2D_SCALING_POINTER macro will work for all SCALING_TYPES */ if (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_intercept, i_voxel) != 0.0) return; g_object_unref(ds->internal_scaling_intercept); ds->internal_scaling_intercept=NULL; switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: ds->scaling_type = AMITK_SCALING_TYPE_0D; break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: ds->scaling_type = AMITK_SCALING_TYPE_1D; break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: ds->scaling_type = AMITK_SCALING_TYPE_2D; break; default: g_error("unexpected case in %s at line %d",__FILE__, __LINE__); break; } g_signal_emit(G_OBJECT (ds), data_set_signals[DATA_SET_CHANGED], 0); } /* look through the scaling factors, and see if we can reduce the dimensionality */ static void data_set_reduce_scaling_dimension(AmitkDataSet * ds) { AmitkVoxel i_voxel; amitk_format_DOUBLE_t initial_scale_factor; amitk_format_DOUBLE_t initial_scale_intercept=0.0; g_return_if_fail(AMITK_IS_DATA_SET(ds)); if ((AMITK_DATA_SET_SCALING_TYPE(ds) == AMITK_SCALING_TYPE_0D) || (AMITK_DATA_SET_SCALING_TYPE(ds) == AMITK_SCALING_TYPE_0D_WITH_INTERCEPT)) return; i_voxel = zero_voxel; initial_scale_factor = *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_factor, i_voxel); for (i_voxel.t=0; i_voxel.t < ds->internal_scaling_factor->dim.t; i_voxel.t++) for (i_voxel.g=0; i_voxel.g < ds->internal_scaling_factor->dim.g; i_voxel.g++) for (i_voxel.z=0; i_voxel.z < ds->internal_scaling_factor->dim.z; i_voxel.z++) /* note, the 2D_SCALING_POINTER macro will work for all SCALING_TYPES */ if (initial_scale_factor != *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_factor, i_voxel)) return; if (AMITK_DATA_SET_SCALING_HAS_INTERCEPT(ds)) { i_voxel = zero_voxel; initial_scale_intercept = *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_intercept, i_voxel); for (i_voxel.t=0; i_voxel.t < ds->internal_scaling_intercept->dim.t; i_voxel.t++) for (i_voxel.g=0; i_voxel.g < ds->internal_scaling_intercept->dim.g; i_voxel.g++) for (i_voxel.z=0; i_voxel.z < ds->internal_scaling_intercept->dim.z; i_voxel.z++) /* note, the 2D_SCALING_POINTER macro will work for all SCALING_TYPES */ if (initial_scale_intercept != *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_intercept, i_voxel)) return; } g_object_unref(ds->internal_scaling_factor); ds->internal_scaling_factor=NULL; if (AMITK_DATA_SET_SCALING_HAS_INTERCEPT(ds)) { g_object_unref(ds->internal_scaling_intercept); ds->internal_scaling_intercept=NULL; } switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: ds->scaling_type = AMITK_SCALING_TYPE_0D_WITH_INTERCEPT; break; default: ds->scaling_type = AMITK_SCALING_TYPE_0D; break; } ds->internal_scaling_factor = amitk_raw_data_DOUBLE_0D_SCALING_init(initial_scale_factor); if (ds->internal_scaling_factor==NULL) g_error("malloc for internal scaling factor failed - fatal"); if (AMITK_DATA_SET_SCALING_HAS_INTERCEPT(ds)) { ds->internal_scaling_intercept = amitk_raw_data_DOUBLE_0D_SCALING_init(initial_scale_intercept); if (ds->internal_scaling_intercept == NULL) g_error("malloc for internal scaling factor failed - fatal"); } amitk_data_set_set_scale_factor(ds, AMITK_DATA_SET_SCALE_FACTOR(ds)); /* reset the current_scale_factor */ g_signal_emit(G_OBJECT (ds), data_set_signals[DATA_SET_CHANGED], 0); } amide_data_t amitk_data_set_get_global_max(AmitkDataSet * ds) { amitk_data_set_calc_min_max_if_needed(ds, NULL, NULL); return ds->global_max; } amide_data_t amitk_data_set_get_global_min(AmitkDataSet * ds) { amitk_data_set_calc_min_max_if_needed(ds, NULL, NULL); return ds->global_min; } amide_data_t amitk_data_set_get_frame_max(AmitkDataSet * ds, const guint frame) { amitk_data_set_calc_min_max_if_needed(ds, NULL, NULL); return ds->frame_max[frame]; } amide_data_t amitk_data_set_get_frame_min(AmitkDataSet * ds, const guint frame) { amitk_data_set_calc_min_max_if_needed(ds, NULL, NULL); return ds->frame_min[frame]; } AmitkColorTable amitk_data_set_get_color_table_to_use(AmitkDataSet * ds, const AmitkViewMode view_mode) { g_return_val_if_fail(AMITK_IS_DATA_SET(ds), AMITK_COLOR_TABLE_BW_LINEAR); g_return_val_if_fail(view_mode >= 0, AMITK_COLOR_TABLE_BW_LINEAR); g_return_val_if_fail(view_mode < AMITK_VIEW_MODE_NUM, AMITK_COLOR_TABLE_BW_LINEAR); if ((view_mode != AMITK_VIEW_MODE_SINGLE) && (AMITK_DATA_SET_COLOR_TABLE_INDEPENDENT(ds, view_mode))) return AMITK_DATA_SET_COLOR_TABLE(ds, view_mode); else return AMITK_DATA_SET_COLOR_TABLE(ds, AMITK_VIEW_MODE_SINGLE); } void amitk_data_set_set_modality(AmitkDataSet * ds, const AmitkModality modality) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if ( ds->modality != modality) { ds->modality = modality; g_signal_emit(G_OBJECT (ds), data_set_signals[MODALITY_CHANGED], 0); g_signal_emit(G_OBJECT (ds), data_set_signals[DATA_SET_CHANGED], 0); } } void amitk_data_set_set_scan_start (AmitkDataSet * ds, const amide_time_t start) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->scan_start != start) { ds->scan_start = start; g_signal_emit(G_OBJECT (ds), data_set_signals[TIME_CHANGED], 0); g_signal_emit(G_OBJECT (ds), data_set_signals[DATA_SET_CHANGED], 0); } } void amitk_data_set_set_frame_duration(AmitkDataSet * ds, const guint frame, amide_time_t duration) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(frame < AMITK_DATA_SET_NUM_FRAMES(ds)); g_return_if_fail(ds->frame_duration != NULL); if (duration < EPSILON) duration = EPSILON; /* guard against bad values */ if (ds->frame_duration[frame] != duration) { ds->frame_duration[frame] = duration; g_signal_emit(G_OBJECT (ds), data_set_signals[TIME_CHANGED], 0); g_signal_emit(G_OBJECT (ds), data_set_signals[DATA_SET_CHANGED], 0); } } void amitk_data_set_set_voxel_size(AmitkDataSet * ds, const AmitkPoint voxel_size) { GList * children; AmitkPoint ref_point; AmitkPoint scaling; AmitkPoint old_corner; g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (!POINT_EQUAL(AMITK_DATA_SET_VOXEL_SIZE(ds), voxel_size)) { if (AMITK_VOLUME_VALID(ds)) old_corner = AMITK_VOLUME_CORNER(ds); else old_corner = one_point; /* guard for zero's */ if (EQUAL_ZERO(old_corner.x) || EQUAL_ZERO(old_corner.y) || EQUAL_ZERO(old_corner.z)) old_corner = one_point; data_set_set_voxel_size(ds, voxel_size); amitk_data_set_calc_far_corner(ds); scaling = point_div(AMITK_VOLUME_CORNER(ds), old_corner); scaling = amitk_space_s2b_dim(AMITK_SPACE(ds), scaling); ref_point = AMITK_SPACE_OFFSET(ds); /* propagate this scaling operation to the children */ children = AMITK_OBJECT_CHILDREN(ds); while (children != NULL) { amitk_space_scale(children->data, ref_point, scaling); children = children->next; } } } void amitk_data_set_set_thresholding(AmitkDataSet * ds, const AmitkThresholding thresholding) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->thresholding != thresholding) { ds->thresholding = thresholding; g_signal_emit(G_OBJECT (ds), data_set_signals[THRESHOLDING_CHANGED], 0); } } void amitk_data_set_set_threshold_style(AmitkDataSet * ds, const AmitkThresholdStyle threshold_style) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->threshold_style != threshold_style) { ds->threshold_style = threshold_style; g_signal_emit(G_OBJECT (ds), data_set_signals[THRESHOLD_STYLE_CHANGED], 0); } } void amitk_data_set_set_threshold_max(AmitkDataSet * ds, guint which_reference, amide_data_t value) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if ((ds->threshold_max[which_reference] != value) && (value > amitk_data_set_get_global_min(ds))) { ds->threshold_max[which_reference] = value; if (ds->threshold_max[which_reference] < ds->threshold_min[which_reference]) ds->threshold_min[which_reference] = ds->threshold_max[which_reference]-EPSILON*fabs(ds->threshold_max[which_reference]); g_signal_emit(G_OBJECT (ds), data_set_signals[THRESHOLDS_CHANGED], 0); } } void amitk_data_set_set_threshold_min(AmitkDataSet * ds, guint which_reference, amide_data_t value) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if ((ds->threshold_min[which_reference] != value ) && (value < amitk_data_set_get_global_max(ds))) { ds->threshold_min[which_reference] = value; if (ds->threshold_min[which_reference] > ds->threshold_max[which_reference]) ds->threshold_max[which_reference] = ds->threshold_min[which_reference]+EPSILON*fabs(ds->threshold_min[which_reference]); g_signal_emit(G_OBJECT (ds), data_set_signals[THRESHOLDS_CHANGED], 0); } } void amitk_data_set_set_threshold_ref_frame(AmitkDataSet * ds, guint which_reference, guint frame) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->threshold_ref_frame[which_reference] != frame) { ds->threshold_ref_frame[which_reference] = frame; g_signal_emit(G_OBJECT (ds), data_set_signals[THRESHOLDS_CHANGED], 0); } } void amitk_data_set_set_color_table(AmitkDataSet * ds, const AmitkViewMode view_mode, const AmitkColorTable new_color_table) { AmitkViewMode i_view_mode; g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(view_mode >= 0); g_return_if_fail(view_mode < AMITK_VIEW_MODE_NUM); if (new_color_table != ds->color_table[view_mode]) { ds->color_table[view_mode] = new_color_table; g_signal_emit(G_OBJECT (ds), data_set_signals[COLOR_TABLE_CHANGED], 0, view_mode); if (view_mode == AMITK_VIEW_MODE_SINGLE) { for (i_view_mode=AMITK_VIEW_MODE_LINKED_2WAY; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) { if (!AMITK_DATA_SET_COLOR_TABLE_INDEPENDENT(ds, i_view_mode)) g_signal_emit(G_OBJECT (ds), data_set_signals[COLOR_TABLE_CHANGED], 0, i_view_mode); } } } } void amitk_data_set_set_color_table_independent(AmitkDataSet * ds, const AmitkViewMode view_mode, const gboolean independent) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(view_mode >= AMITK_VIEW_MODE_SINGLE); g_return_if_fail(view_mode < AMITK_VIEW_MODE_NUM); if (independent != ds->color_table_independent[view_mode]) { ds->color_table_independent[view_mode] = independent; g_signal_emit(G_OBJECT (ds), data_set_signals[COLOR_TABLE_INDEPENDENT_CHANGED], 0, view_mode); if (ds->color_table[view_mode] != ds->color_table[AMITK_VIEW_MODE_SINGLE]) g_signal_emit(G_OBJECT (ds), data_set_signals[COLOR_TABLE_CHANGED], 0, view_mode); } } void amitk_data_set_set_interpolation(AmitkDataSet * ds, const AmitkInterpolation new_interpolation) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->interpolation != new_interpolation) { ds->interpolation = new_interpolation; g_signal_emit(G_OBJECT (ds), data_set_signals[INTERPOLATION_CHANGED], 0); } return; } void amitk_data_set_set_rendering(AmitkDataSet * ds, const AmitkRendering new_rendering) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->rendering != new_rendering) { ds->rendering = new_rendering; g_signal_emit(G_OBJECT (ds), data_set_signals[RENDERING_CHANGED], 0); } return; } void amitk_data_set_set_subject_orientation(AmitkDataSet * ds, const AmitkSubjectOrientation subject_orientation) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->subject_orientation != subject_orientation) { ds->subject_orientation = subject_orientation; g_signal_emit(G_OBJECT (ds), data_set_signals[SUBJECT_ORIENTATION_CHANGED], 0); } return; } void amitk_data_set_set_subject_sex(AmitkDataSet * ds, const AmitkSubjectSex subject_sex) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->subject_sex != subject_sex) { ds->subject_sex = subject_sex; g_signal_emit(G_OBJECT (ds), data_set_signals[SUBJECT_SEX_CHANGED], 0); } return; } /* sets the scan date of a data set note: no error checking is done on the date, as of yet */ void amitk_data_set_set_scan_date(AmitkDataSet * ds, const gchar * new_date) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->scan_date != NULL) { g_free(ds->scan_date); ds->scan_date = NULL; } if (new_date != NULL) { ds->scan_date = g_strdup(new_date); g_strdelimit(ds->scan_date, "\n", ' '); /* turns newlines to white space */ g_strstrip(ds->scan_date); /* removes trailing and leading white space */ } else { ds->scan_date = g_strdup(_("unknown")); } return; } /* sets the subject name associated with the data set */ void amitk_data_set_set_subject_name(AmitkDataSet * ds, const gchar * new_name) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->subject_name != NULL) { g_free(ds->subject_name); ds->subject_name = NULL; } if (new_name != NULL) { ds->subject_name = g_strdup(new_name); g_strdelimit(ds->subject_name, "\n", ' '); /* turns newlines to white space */ g_strstrip(ds->subject_name); /* removes trailing and leading white space */ } else { ds->subject_name = g_strdup(_("unknown")); } return; } /* sets the subject id associated with the data set */ void amitk_data_set_set_subject_id(AmitkDataSet * ds, const gchar * new_id) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->subject_id != NULL) { g_free(ds->subject_id); ds->subject_id = NULL; } if (new_id != NULL) { ds->subject_id = g_strdup(new_id); g_strdelimit(ds->subject_id, "\n", ' '); /* turns newlines to white space */ g_strstrip(ds->subject_id); /* removes trailing and leading white space */ } else { ds->subject_id = g_strdup(_("unknown")); } return; } /* sets the subject's date of birth note: no error checking is done on the date, as of yet */ void amitk_data_set_set_subject_dob(AmitkDataSet * ds, const gchar * new_dob) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->subject_dob != NULL) { g_free(ds->subject_dob); ds->subject_dob = NULL; } if (new_dob != NULL) { ds->subject_dob = g_strdup(new_dob); g_strdelimit(ds->subject_dob, "\n", ' '); /* turns newlines to white space */ g_strstrip(ds->subject_dob); /* removes trailing and leading white space */ } else { ds->subject_dob = g_strdup(_("unknown")); } return; } /* sets the series number - parameter used by dicom */ void amitk_data_set_set_series_number(AmitkDataSet * ds, const gint new_series_number) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->series_number != new_series_number) { ds->series_number = new_series_number; } return; } /* sets the dicom image type of the data set */ void amitk_data_set_set_dicom_image_type(AmitkDataSet * ds, const gchar * new_image_type) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->dicom_image_type != NULL) { g_free(ds->dicom_image_type); ds->dicom_image_type = NULL; } if (new_image_type != NULL) { ds->dicom_image_type = g_strdup(new_image_type); g_strdelimit(ds->dicom_image_type, "\n", ' '); /* turns newlines to white space */ g_strstrip(ds->dicom_image_type); /* removes trailing and leading white space */ } else { ; /* leave it as NULL */ } return; } /* used when changing the external scale factor, so that we can keep a pregenerated scaling factor */ void amitk_data_set_set_scale_factor(AmitkDataSet * ds, amide_data_t new_scale_factor) { AmitkVoxel i; gint j; amide_data_t scaling; gboolean need_update = FALSE; g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(ds->internal_scaling_factor != NULL); if (new_scale_factor <= 0.0) return; if ((ds->scale_factor != new_scale_factor) || (ds->current_scaling_factor == NULL) || (ds->current_scaling_factor->dim.x != ds->internal_scaling_factor->dim.x) || (ds->current_scaling_factor->dim.y != ds->internal_scaling_factor->dim.y) || (ds->current_scaling_factor->dim.z != ds->internal_scaling_factor->dim.z) || (ds->current_scaling_factor->dim.g != ds->internal_scaling_factor->dim.g) || (ds->current_scaling_factor->dim.t != ds->internal_scaling_factor->dim.t)) { need_update = TRUE; } else { /* make absolutely sure we don't need an update */ for(i.t = 0; i.t < ds->current_scaling_factor->dim.t; i.t++) for (i.g = 0; i.g < ds->current_scaling_factor->dim.g; i.g++) for (i.z = 0; i.z < ds->current_scaling_factor->dim.z; i.z++) for (i.y = 0; i.y < ds->current_scaling_factor->dim.y; i.y++) for (i.x = 0; i.x < ds->current_scaling_factor->dim.x; i.x++) if (AMITK_RAW_DATA_DOUBLE_SET_CONTENT(ds->current_scaling_factor, i) != ds->scale_factor * AMITK_RAW_DATA_DOUBLE_CONTENT(ds->internal_scaling_factor, i)) need_update = TRUE; } if (need_update) { if (ds->current_scaling_factor == NULL) /* first time */ scaling = 1.0; else scaling = new_scale_factor/ds->scale_factor; ds->scale_factor = new_scale_factor; if (ds->current_scaling_factor != NULL) if ((ds->current_scaling_factor->dim.x != ds->internal_scaling_factor->dim.x) || (ds->current_scaling_factor->dim.y != ds->internal_scaling_factor->dim.y) || (ds->current_scaling_factor->dim.z != ds->internal_scaling_factor->dim.z) || (ds->current_scaling_factor->dim.g != ds->internal_scaling_factor->dim.g) || (ds->current_scaling_factor->dim.t != ds->internal_scaling_factor->dim.t)) { g_object_unref(ds->current_scaling_factor); ds->current_scaling_factor = NULL; } if (ds->current_scaling_factor == NULL) { ds->current_scaling_factor = amitk_raw_data_new_with_data(ds->internal_scaling_factor->format, ds->internal_scaling_factor->dim); g_return_if_fail(ds->current_scaling_factor != NULL); } for(i.t = 0; i.t < ds->current_scaling_factor->dim.t; i.t++) for (i.g = 0; i.g < ds->current_scaling_factor->dim.g; i.g++) for (i.z = 0; i.z < ds->current_scaling_factor->dim.z; i.z++) for (i.y = 0; i.y < ds->current_scaling_factor->dim.y; i.y++) for (i.x = 0; i.x < ds->current_scaling_factor->dim.x; i.x++) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(ds->current_scaling_factor, i) = ds->scale_factor * AMITK_RAW_DATA_DOUBLE_CONTENT(ds->internal_scaling_factor, i); /* adjust all thresholds and other variables so they remain constant relative the change in scale factors */ for (j=0; j<2; j++) { ds->threshold_max[j] *= scaling; ds->threshold_min[j] *= scaling; } ds->global_max *= scaling; ds->global_min *= scaling; if ((AMITK_DATA_SET_RAW_DATA(ds) != NULL) && (ds->frame_max != NULL) && (ds->frame_min != NULL)) for (j=0; j < AMITK_DATA_SET_NUM_FRAMES(ds); j++) { ds->frame_max[j] *= scaling; ds->frame_min[j] *= scaling; } /* and emit the signal */ g_signal_emit (G_OBJECT (ds), data_set_signals[SCALE_FACTOR_CHANGED], 0); g_signal_emit (G_OBJECT (ds), data_set_signals[INVALIDATE_SLICE_CACHE], 0); g_signal_emit (G_OBJECT (ds), data_set_signals[DATA_SET_CHANGED], 0); g_signal_emit (G_OBJECT (ds), data_set_signals[THRESHOLDS_CHANGED], 0); } return; } static amide_data_t calculate_scale_factor(AmitkDataSet * ds) { amide_data_t value; switch(ds->conversion) { case AMITK_CONVERSION_STRAIGHT: value = AMITK_DATA_SET_SCALE_FACTOR(ds); break; case AMITK_CONVERSION_PERCENT_ID_PER_CC: if (!isfinite(ds->injected_dose) || (EQUAL_ZERO(ds->injected_dose))) value = 1.0; else value = 100.0*ds->cylinder_factor/ds->injected_dose; break; case AMITK_CONVERSION_SUV: if (!isfinite(ds->subject_weight) || (EQUAL_ZERO(ds->subject_weight))) value = 1.0; else if (!finite(ds->injected_dose) || (EQUAL_ZERO(ds->injected_dose))) value = 1.0; else value = ds->cylinder_factor/(ds->injected_dose/(1000.0*ds->subject_weight)); break; default: value = 1.0; g_error("unexpected case in %s at line %d",__FILE__, __LINE__); break; } return value; } void amitk_data_set_set_conversion(AmitkDataSet * ds, AmitkConversion new_conversion) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->conversion != new_conversion) { ds->conversion = new_conversion; amitk_data_set_set_scale_factor(ds, calculate_scale_factor(ds)); g_signal_emit(G_OBJECT (ds), data_set_signals[CONVERSION_CHANGED], 0); } } void amitk_data_set_set_injected_dose(AmitkDataSet * ds,amide_data_t new_injected_dose) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->injected_dose != new_injected_dose) { ds->injected_dose = new_injected_dose; amitk_data_set_set_scale_factor(ds, calculate_scale_factor(ds)); } } void amitk_data_set_set_subject_weight(AmitkDataSet * ds,amide_data_t new_subject_weight) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->subject_weight != new_subject_weight) { ds->subject_weight = new_subject_weight; amitk_data_set_set_scale_factor(ds, calculate_scale_factor(ds)); } } void amitk_data_set_set_cylinder_factor(AmitkDataSet * ds, amide_data_t new_cylinder_factor) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (ds->cylinder_factor != new_cylinder_factor) { ds->cylinder_factor = new_cylinder_factor; amitk_data_set_set_scale_factor(ds, calculate_scale_factor(ds)); } } void amitk_data_set_set_displayed_dose_unit(AmitkDataSet * ds, AmitkDoseUnit new_dose_unit) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); ds->displayed_dose_unit = new_dose_unit; } void amitk_data_set_set_displayed_weight_unit(AmitkDataSet * ds, AmitkWeightUnit new_weight_unit) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); ds->displayed_weight_unit = new_weight_unit; } void amitk_data_set_set_displayed_cylinder_unit(AmitkDataSet * ds, AmitkCylinderUnit new_cylinder_unit) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); ds->displayed_cylinder_unit = new_cylinder_unit; } void amitk_data_set_set_inversion_time(AmitkDataSet * ds, amide_time_t new_inversion_time) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); ds->inversion_time = new_inversion_time; } void amitk_data_set_set_echo_time(AmitkDataSet * ds, amide_time_t new_echo_time) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); ds->echo_time = new_echo_time; } void amitk_data_set_set_diffusion_b_value(AmitkDataSet * ds, gdouble b_value) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); ds->diffusion_b_value = b_value; } void amitk_data_set_set_diffusion_direction(AmitkDataSet * ds, AmitkPoint direction) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); ds->diffusion_direction = direction; } void amitk_data_set_set_threshold_window(AmitkDataSet * ds, const AmitkWindow window, const AmitkLimit limit, const amide_data_t value) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if (!REAL_EQUAL(AMITK_DATA_SET_THRESHOLD_WINDOW(ds, window, limit), value)) { ds->threshold_window[window][limit] = value; } g_signal_emit (G_OBJECT (ds), data_set_signals[WINDOWS_CHANGED], 0); } void amitk_data_set_set_view_start_gate(AmitkDataSet * ds, amide_intpoint_t start_gate) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if ((AMITK_DATA_SET_VIEW_START_GATE(ds) != start_gate) && (start_gate >= 0) && (start_gate < AMITK_DATA_SET_NUM_GATES(ds))){ ds->view_start_gate = start_gate; if (ds->view_start_gate > ds->view_end_gate) ds->num_view_gates = AMITK_DATA_SET_NUM_GATES(ds) - (ds->view_start_gate-ds->view_end_gate-1); else ds->num_view_gates = ds->view_end_gate-ds->view_start_gate+1; g_signal_emit(G_OBJECT (ds), data_set_signals[VIEW_GATES_CHANGED], 0); } return; } void amitk_data_set_set_view_end_gate(AmitkDataSet * ds, amide_intpoint_t end_gate) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); if ((AMITK_DATA_SET_VIEW_END_GATE(ds) != end_gate) && (end_gate >= 0) && (end_gate < AMITK_DATA_SET_NUM_GATES(ds))) { ds->view_end_gate = end_gate; if (ds->view_start_gate > ds->view_end_gate) ds->num_view_gates = AMITK_DATA_SET_NUM_GATES(ds) - (ds->view_start_gate-ds->view_end_gate-1); else ds->num_view_gates = ds->view_end_gate-ds->view_start_gate+1; g_signal_emit(G_OBJECT (ds), data_set_signals[VIEW_GATES_CHANGED], 0); } return; } void amitk_data_set_set_gate_time(AmitkDataSet * ds, const guint gate, amide_time_t time) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(gate < AMITK_DATA_SET_NUM_GATES(ds)); g_return_if_fail(ds->gate_time != NULL); if (ds->gate_time[gate] != time) { ds->gate_time[gate] = time; g_signal_emit(G_OBJECT (ds), data_set_signals[VIEW_GATES_CHANGED], 0); g_signal_emit(G_OBJECT (ds), data_set_signals[DATA_SET_CHANGED], 0); } } amide_time_t amitk_data_set_get_gate_time(const AmitkDataSet * ds, guint gate) { g_return_val_if_fail(AMITK_IS_DATA_SET(ds), 0.0); g_return_val_if_fail(ds->gate_time != NULL, 0.0); if (gate >= AMITK_DATA_SET_NUM_GATES(ds)) return 0.0; return ds->gate_time[gate]; } /* returns the start time of the given frame */ amide_time_t amitk_data_set_get_start_time(const AmitkDataSet * ds, const guint frame) { amide_time_t time; guint i_frame; guint check_frame; g_return_val_if_fail(AMITK_IS_DATA_SET(ds), 0.0); if (frame >= AMITK_DATA_SET_NUM_FRAMES(ds)) check_frame = AMITK_DATA_SET_NUM_FRAMES(ds)-1; else check_frame = frame; time = ds->scan_start; for(i_frame=0;i_frame= AMITK_DATA_SET_NUM_FRAMES(ds)) check_frame = AMITK_DATA_SET_NUM_FRAMES(ds)-1; else check_frame = frame; return (amitk_data_set_get_start_time(ds, check_frame) +amitk_data_set_get_frame_duration(ds, check_frame)); } /* returns the midpoint of a given frame */ amide_time_t amitk_data_set_get_midpt_time(const AmitkDataSet * ds, const guint frame) { guint check_frame; g_return_val_if_fail(AMITK_IS_DATA_SET(ds), 1.0); if (frame >= AMITK_DATA_SET_NUM_FRAMES(ds)) check_frame = AMITK_DATA_SET_NUM_FRAMES(ds)-1; else check_frame = frame; return (amitk_data_set_get_start_time(ds, check_frame) + amitk_data_set_get_frame_duration(ds, check_frame)/2.0); } /* returns the frame that corresponds to the time */ guint amitk_data_set_get_frame(const AmitkDataSet * ds, const amide_time_t time) { amide_time_t start, end; guint i_frame; g_return_val_if_fail(AMITK_IS_DATA_SET(ds), 0); start = amitk_data_set_get_start_time(ds, 0); if (time <= start) return 0; for(i_frame=0; i_frame < AMITK_DATA_SET_NUM_FRAMES(ds); i_frame++) { start = amitk_data_set_get_start_time(ds, i_frame); end = amitk_data_set_get_end_time(ds, i_frame); if ((start <= time) && (time <= end)) return i_frame; } /* must be past the end */ return AMITK_DATA_SET_NUM_FRAMES(ds)-1; } amide_time_t amitk_data_set_get_frame_duration (const AmitkDataSet * ds, guint frame) { g_return_val_if_fail(AMITK_IS_DATA_SET(ds), 1.0); g_return_val_if_fail(ds->frame_duration != NULL, 1.0); if (frame >= AMITK_DATA_SET_NUM_FRAMES(ds)) frame = AMITK_DATA_SET_NUM_FRAMES(ds)-1; return ds->frame_duration[frame]; } /* return the minimal frame duration in this data set */ amide_time_t amitk_data_set_get_min_frame_duration(const AmitkDataSet * ds) { amide_time_t min_frame_duration; guint i_frame; g_return_val_if_fail(AMITK_IS_DATA_SET(ds), 1.0); min_frame_duration = amitk_data_set_get_frame_duration(ds,0); for(i_frame=1;i_frameraw_data->dim, ds->voxel_size, new_point); amitk_volume_set_corner(AMITK_VOLUME(ds), new_point); return; } static void (*calc_slice_min_max_func[AMITK_FORMAT_NUM][AMITK_SCALING_TYPE_NUM])(AmitkDataSet *, const amide_intpoint_t, const amide_intpoint_t, const amide_intpoint_t, amitk_format_DOUBLE_t *, amitk_format_DOUBLE_t *) = { {amitk_data_set_UBYTE_0D_SCALING_calc_slice_min_max, amitk_data_set_UBYTE_1D_SCALING_calc_slice_min_max, amitk_data_set_UBYTE_2D_SCALING_calc_slice_min_max, amitk_data_set_UBYTE_0D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_UBYTE_1D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_UBYTE_2D_SCALING_INTERCEPT_calc_slice_min_max }, {amitk_data_set_SBYTE_0D_SCALING_calc_slice_min_max, amitk_data_set_SBYTE_1D_SCALING_calc_slice_min_max, amitk_data_set_SBYTE_2D_SCALING_calc_slice_min_max, amitk_data_set_SBYTE_0D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_SBYTE_1D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_SBYTE_2D_SCALING_INTERCEPT_calc_slice_min_max }, {amitk_data_set_USHORT_0D_SCALING_calc_slice_min_max,amitk_data_set_USHORT_1D_SCALING_calc_slice_min_max, amitk_data_set_USHORT_2D_SCALING_calc_slice_min_max,amitk_data_set_USHORT_0D_SCALING_INTERCEPT_calc_slice_min_max,amitk_data_set_USHORT_1D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_USHORT_2D_SCALING_INTERCEPT_calc_slice_min_max }, {amitk_data_set_SSHORT_0D_SCALING_calc_slice_min_max,amitk_data_set_SSHORT_1D_SCALING_calc_slice_min_max, amitk_data_set_SSHORT_2D_SCALING_calc_slice_min_max,amitk_data_set_SSHORT_0D_SCALING_INTERCEPT_calc_slice_min_max,amitk_data_set_SSHORT_1D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_SSHORT_2D_SCALING_INTERCEPT_calc_slice_min_max }, {amitk_data_set_UINT_0D_SCALING_calc_slice_min_max, amitk_data_set_UINT_1D_SCALING_calc_slice_min_max, amitk_data_set_UINT_2D_SCALING_calc_slice_min_max, amitk_data_set_UINT_0D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_UINT_1D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_UINT_2D_SCALING_INTERCEPT_calc_slice_min_max }, {amitk_data_set_SINT_0D_SCALING_calc_slice_min_max, amitk_data_set_SINT_1D_SCALING_calc_slice_min_max, amitk_data_set_SINT_2D_SCALING_calc_slice_min_max, amitk_data_set_SINT_0D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_SINT_1D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_SINT_2D_SCALING_INTERCEPT_calc_slice_min_max }, {amitk_data_set_FLOAT_0D_SCALING_calc_slice_min_max, amitk_data_set_FLOAT_1D_SCALING_calc_slice_min_max, amitk_data_set_FLOAT_2D_SCALING_calc_slice_min_max, amitk_data_set_FLOAT_0D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_FLOAT_1D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_FLOAT_2D_SCALING_INTERCEPT_calc_slice_min_max }, {amitk_data_set_DOUBLE_0D_SCALING_calc_slice_min_max,amitk_data_set_DOUBLE_1D_SCALING_calc_slice_min_max, amitk_data_set_DOUBLE_2D_SCALING_calc_slice_min_max,amitk_data_set_DOUBLE_0D_SCALING_INTERCEPT_calc_slice_min_max,amitk_data_set_DOUBLE_1D_SCALING_INTERCEPT_calc_slice_min_max, amitk_data_set_DOUBLE_2D_SCALING_INTERCEPT_calc_slice_min_max } }; void amitk_data_set_slice_calc_min_max (AmitkDataSet * ds, const amide_intpoint_t frame, const amide_intpoint_t gate, const amide_intpoint_t z, amitk_format_DOUBLE_t * pmin, amitk_format_DOUBLE_t * pmax) { (*calc_slice_min_max_func[ds->raw_data->format][ds->scaling_type])(ds, frame, gate, z, pmin, pmax); } /* function to calculate the max and min over the data frames */ void amitk_data_set_calc_min_max(AmitkDataSet * ds, AmitkUpdateFunc update_func, gpointer update_data) { AmitkVoxel i; amide_data_t max, min, temp; amide_data_t slice_max, slice_min; div_t x; gint divider; gint total_planes; gint i_plane; gchar * temp_string; AmitkVoxel dim; g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(ds->raw_data != NULL); dim = AMITK_DATA_SET_DIM(ds); /* allocate the arrays if we haven't already */ if (ds->frame_max == NULL) { ds->frame_max = amitk_data_set_get_frame_min_max_mem(ds); ds->frame_min = amitk_data_set_get_frame_min_max_mem(ds); } g_return_if_fail(ds->frame_max != NULL); g_return_if_fail(ds->frame_min != NULL); /* note, we can't cancel this */ if (update_func != NULL) { temp_string = g_strdup_printf(_("Calculating Max/Min Values for:\n %s"), AMITK_OBJECT_NAME(ds) == NULL ? "dataset" : AMITK_OBJECT_NAME(ds)); (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } total_planes = AMITK_DATA_SET_TOTAL_PLANES(ds); divider = ((total_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (total_planes/AMITK_UPDATE_DIVIDER); i_plane=0; for (i.t = 0; i.t < dim.t; i.t++) { i.x = i.y = i.z = i.g = 0; temp = amitk_data_set_get_value(ds,i); if (finite(temp)) max = min = temp; else max = min = 0.0; /* just throw in zero */ for (i.g = 0; i.g < dim.g; i.g++) { for (i.z = 0; i.z < dim.z; i.z++, i_plane++) { if (update_func != NULL) { x = div(i_plane, divider); if (x.rem == 0) (*update_func)(update_data, NULL, ((gdouble) i_plane)/((gdouble)total_planes)); } amitk_data_set_slice_calc_min_max(ds, i.t, i.g, i.z, &slice_min, &slice_max); if (finite(slice_min)) if (slice_min < min) min = slice_min; if (finite(slice_max)) if (slice_max > max) max = slice_max; } } ds->frame_max[i.t] = max; ds->frame_min[i.t] = min; #ifdef AMIDE_DEBUG if (dim.z > 1) /* don't print for slices */ g_print("\tframe %d max %5.3g frame min %5.3g\n",i.t, ds->frame_max[i.t],ds->frame_min[i.t]); #endif } if (update_func != NULL) (*update_func)(update_data, NULL, (gdouble) 2.0); /* remove progress bar */ /* calc the global max/min */ ds->global_max = ds->frame_max[0]; ds->global_min = ds->frame_min[0]; for (i.t=1; i.tglobal_max < ds->frame_max[i.t]) ds->global_max = ds->frame_max[i.t]; if (ds->global_min > ds->frame_min[i.t]) ds->global_min = ds->frame_min[i.t]; } /* note that we've calculated the max and mins */ ds->min_max_calculated = TRUE; #ifdef AMIDE_DEBUG if (AMITK_DATA_SET_DIM_Z(ds) > 1) /* don't print for slices */ g_print("\tglobal max %5.3g global min %5.3g\n",ds->global_max,ds->global_min); #endif return; } void amitk_data_set_calc_min_max_if_needed(AmitkDataSet * ds, AmitkUpdateFunc update_func, gpointer update_data) { if (!ds->min_max_calculated) amitk_data_set_calc_min_max(ds, update_func, update_data); return; } amide_data_t amitk_data_set_get_max(AmitkDataSet * ds, const amide_time_t start, const amide_time_t duration) { guint start_frame; guint end_frame; guint i_frame; amide_time_t used_start, used_end, used_duration; amide_time_t ds_start, ds_end; amide_data_t max; amide_data_t time_weight; g_return_val_if_fail(AMITK_IS_DATA_SET(ds), 1.0); g_return_val_if_fail(duration >= 0.0, 1.0); /* figure out what frames of this data set to use */ used_start = start; start_frame = amitk_data_set_get_frame(ds, used_start); ds_start = amitk_data_set_get_start_time(ds, start_frame); used_end = start+duration; end_frame = amitk_data_set_get_frame(ds, used_end); ds_end = amitk_data_set_get_end_time(ds, end_frame); if (start_frame == end_frame) { max = amitk_data_set_get_frame_max(ds, start_frame); } else { if (ds_end < used_end) used_end = ds_end; if (ds_start > used_start) used_start = ds_start; used_duration = used_end-used_start; max = 0; for (i_frame=start_frame; i_frame <= end_frame; i_frame++) { if (i_frame == start_frame) time_weight = (amitk_data_set_get_end_time(ds, start_frame)-used_start)/used_duration; else if (i_frame == end_frame) time_weight = (used_end-amitk_data_set_get_start_time(ds, end_frame))/used_duration; else time_weight = amitk_data_set_get_frame_duration(ds, i_frame)/used_duration; max += time_weight*amitk_data_set_get_frame_max(ds, i_frame); } } return max; } amide_data_t amitk_data_set_get_min(AmitkDataSet * ds, const amide_time_t start, const amide_time_t duration) { guint start_frame; guint end_frame; guint i_frame; amide_time_t used_start, used_end, used_duration; amide_time_t ds_start, ds_end; amide_data_t min; amide_data_t time_weight; g_return_val_if_fail(AMITK_IS_DATA_SET(ds), 0.0); g_return_val_if_fail(duration>=0.0, 0.0); /* figure out what frames of this data set to use */ used_start = start; start_frame = amitk_data_set_get_frame(ds, used_start); ds_start = amitk_data_set_get_start_time(ds, start_frame); used_end = start+duration; end_frame = amitk_data_set_get_frame(ds, used_end); ds_end = amitk_data_set_get_end_time(ds, end_frame); if (start_frame == end_frame) { min = amitk_data_set_get_frame_min(ds, start_frame); } else { if (ds_end < used_end) used_end = ds_end; if (ds_start > used_start) used_start = ds_start; used_duration = used_end-used_start; min = 0; for (i_frame=start_frame; i_frame <= end_frame; i_frame++) { if (i_frame == start_frame) time_weight = (amitk_data_set_get_end_time(ds, start_frame)-used_start)/used_duration; else if (i_frame == end_frame) time_weight = (used_end-amitk_data_set_get_start_time(ds, end_frame))/used_duration; else time_weight = amitk_data_set_get_frame_duration(ds, i_frame)/used_duration; min += time_weight*amitk_data_set_get_frame_min(ds, i_frame); } } return min; } /* figure out the min and max threshold values given a threshold type */ /* slice is only needed for THRESHOLDING_PER_SLICE */ /* valid values for start and duration only needed for THRESHOLDING_PER_FRAME and THRESHOLDING_INTERPOLATE_FRAMES */ void amitk_data_set_get_thresholding_min_max(AmitkDataSet * ds, AmitkDataSet * slice, const amide_time_t start, const amide_time_t duration, amide_data_t * min, amide_data_t * max) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); /* get the max/min values for thresholding */ switch(AMITK_DATA_SET_THRESHOLDING(ds)) { case AMITK_THRESHOLDING_PER_SLICE: { amide_data_t slice_max,slice_min; amide_data_t threshold_range; g_return_if_fail(AMITK_IS_DATA_SET(slice)); /* find the slice's max and min, and then adjust these values to * correspond to the current threshold values */ slice_max = amitk_data_set_get_global_max(slice); slice_min = amitk_data_set_get_global_min(slice); threshold_range = amitk_data_set_get_global_max(ds)-amitk_data_set_get_global_min(ds); *max = ds->threshold_max[0]*(slice_max-slice_min)/threshold_range; *min = ds->threshold_min[0]*(slice_max-slice_min)/threshold_range; } break; case AMITK_THRESHOLDING_PER_FRAME: { amide_data_t frame_max,frame_min; amide_data_t threshold_range; frame_max = amitk_data_set_get_max(ds, start,duration); frame_min = amitk_data_set_get_min(ds, start,duration); threshold_range = amitk_data_set_get_global_max(ds)-amitk_data_set_get_global_min(ds); *max = ds->threshold_max[0]*(frame_max-frame_min)/threshold_range; *min = ds->threshold_min[0]*(frame_max-frame_min)/threshold_range; } break; case AMITK_THRESHOLDING_INTERPOLATE_FRAMES: { guint middle_frame; if (ds->threshold_ref_frame[1]==ds->threshold_ref_frame[0]) { *max = ds->threshold_max[0]; *min = ds->threshold_min[0]; } else { middle_frame = amitk_data_set_get_frame(ds, start+duration/2.0); if (middle_frame < ds->threshold_ref_frame[0]) middle_frame = ds->threshold_ref_frame[0]; else if (middle_frame > ds->threshold_ref_frame[1]) middle_frame = ds->threshold_ref_frame[1]; *max= (((ds->threshold_ref_frame[1]-middle_frame)*ds->threshold_max[0]+ (middle_frame-ds->threshold_ref_frame[0])*ds->threshold_max[1]) /(ds->threshold_ref_frame[1]-ds->threshold_ref_frame[0])); *min= (((ds->threshold_ref_frame[1]-middle_frame)*ds->threshold_min[0]+ (middle_frame-ds->threshold_ref_frame[0])*ds->threshold_min[1]) /(ds->threshold_ref_frame[1]-ds->threshold_ref_frame[0])); } } break; case AMITK_THRESHOLDING_GLOBAL: *max = ds->threshold_max[0]; *min = ds->threshold_min[0]; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } return; } static void (*calc_distribution_func[AMITK_FORMAT_NUM][AMITK_SCALING_TYPE_NUM])(AmitkDataSet *, AmitkUpdateFunc, gpointer) = { {amitk_data_set_UBYTE_0D_SCALING_calc_distribution, amitk_data_set_UBYTE_1D_SCALING_calc_distribution, amitk_data_set_UBYTE_2D_SCALING_calc_distribution, amitk_data_set_UBYTE_0D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_UBYTE_1D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_UBYTE_2D_SCALING_INTERCEPT_calc_distribution }, {amitk_data_set_SBYTE_0D_SCALING_calc_distribution, amitk_data_set_SBYTE_1D_SCALING_calc_distribution, amitk_data_set_SBYTE_2D_SCALING_calc_distribution, amitk_data_set_SBYTE_0D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_SBYTE_1D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_SBYTE_2D_SCALING_INTERCEPT_calc_distribution }, {amitk_data_set_USHORT_0D_SCALING_calc_distribution,amitk_data_set_USHORT_1D_SCALING_calc_distribution, amitk_data_set_USHORT_2D_SCALING_calc_distribution,amitk_data_set_USHORT_0D_SCALING_INTERCEPT_calc_distribution,amitk_data_set_USHORT_1D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_USHORT_2D_SCALING_INTERCEPT_calc_distribution }, {amitk_data_set_SSHORT_0D_SCALING_calc_distribution,amitk_data_set_SSHORT_1D_SCALING_calc_distribution, amitk_data_set_SSHORT_2D_SCALING_calc_distribution,amitk_data_set_SSHORT_0D_SCALING_INTERCEPT_calc_distribution,amitk_data_set_SSHORT_1D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_SSHORT_2D_SCALING_INTERCEPT_calc_distribution }, {amitk_data_set_UINT_0D_SCALING_calc_distribution, amitk_data_set_UINT_1D_SCALING_calc_distribution, amitk_data_set_UINT_2D_SCALING_calc_distribution, amitk_data_set_UINT_0D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_UINT_1D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_UINT_2D_SCALING_INTERCEPT_calc_distribution }, {amitk_data_set_SINT_0D_SCALING_calc_distribution, amitk_data_set_SINT_1D_SCALING_calc_distribution, amitk_data_set_SINT_2D_SCALING_calc_distribution, amitk_data_set_SINT_0D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_SINT_1D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_SINT_2D_SCALING_INTERCEPT_calc_distribution }, {amitk_data_set_FLOAT_0D_SCALING_calc_distribution, amitk_data_set_FLOAT_1D_SCALING_calc_distribution, amitk_data_set_FLOAT_2D_SCALING_calc_distribution, amitk_data_set_FLOAT_0D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_FLOAT_1D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_FLOAT_2D_SCALING_INTERCEPT_calc_distribution }, {amitk_data_set_DOUBLE_0D_SCALING_calc_distribution,amitk_data_set_DOUBLE_1D_SCALING_calc_distribution, amitk_data_set_DOUBLE_2D_SCALING_calc_distribution,amitk_data_set_DOUBLE_0D_SCALING_INTERCEPT_calc_distribution,amitk_data_set_DOUBLE_1D_SCALING_INTERCEPT_calc_distribution, amitk_data_set_DOUBLE_2D_SCALING_INTERCEPT_calc_distribution } }; /* generate the distribution array for a data set */ void amitk_data_set_calc_distribution(AmitkDataSet * ds, AmitkUpdateFunc update_func, gpointer update_data) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(ds->raw_data != NULL); /* check that the distribution is the right size. This may not be the case if we've changed AMITK_DATA_SET_DISTRIBUTION_SIZE, and we've loaded in an old file */ if (ds->distribution != NULL) if (AMITK_RAW_DATA_DIM_X(ds->distribution) != AMITK_DATA_SET_DISTRIBUTION_SIZE) { g_object_unref(ds->distribution); ds->distribution = NULL; } (*calc_distribution_func[ds->raw_data->format][ds->scaling_type])(ds, update_func, update_data); return; } /* this is the same as amitk_data_get_value, except only the internal scale factor is applied this is mainly useful for copying values from data sets into new data sets, where the new data set will copy the old data set's external scale factor information anyway */ amide_data_t amitk_data_set_get_internal_value(const AmitkDataSet * ds, const AmitkVoxel i) { g_return_val_if_fail(AMITK_IS_DATA_SET(ds), EMPTY); if (!amitk_raw_data_includes_voxel(ds->raw_data, i)) return EMPTY; /* hand everything off to the data type specific function */ switch(ds->raw_data->format) { case AMITK_FORMAT_UBYTE: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_UBYTE_0D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_UBYTE_1D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_UBYTE_2D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_UBYTE_0D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_UBYTE_1D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_UBYTE_2D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_SBYTE: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_SBYTE_0D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_SBYTE_1D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_SBYTE_2D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_SBYTE_0D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_SBYTE_1D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_SBYTE_2D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_USHORT: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_USHORT_0D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_USHORT_1D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_USHORT_2D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_USHORT_0D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_USHORT_1D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_USHORT_2D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_SSHORT: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_SSHORT_0D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_SSHORT_1D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_SSHORT_2D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_SSHORT_0D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_SSHORT_1D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_SSHORT_2D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_UINT: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_UINT_0D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_UINT_1D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_UINT_2D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_UINT_0D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_UINT_1D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_UINT_2D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_SINT: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_SINT_0D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_SINT_1D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_SINT_2D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_SINT_0D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_SINT_1D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_SINT_2D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_FLOAT: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_FLOAT_0D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_FLOAT_1D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_FLOAT_2D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_FLOAT_0D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_FLOAT_1D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_FLOAT_2D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_DOUBLE: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_DOUBLE_0D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_DOUBLE_1D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_DOUBLE_2D_SCALING_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_DOUBLE_0D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_DOUBLE_1D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_DOUBLE_2D_SCALING_INTERCEPT_INTERNAL_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } } amide_data_t amitk_data_set_get_value(const AmitkDataSet * ds, const AmitkVoxel i) { g_return_val_if_fail(AMITK_IS_DATA_SET(ds), EMPTY); if (!amitk_raw_data_includes_voxel(ds->raw_data, i)) return EMPTY; /* hand everything off to the data type specific function */ switch(ds->raw_data->format) { case AMITK_FORMAT_UBYTE: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_UBYTE_0D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_UBYTE_1D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_UBYTE_2D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_UBYTE_0D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_UBYTE_1D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_UBYTE_2D_SCALING_INTERCEPT_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_SBYTE: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_SBYTE_0D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_SBYTE_1D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_SBYTE_2D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_SBYTE_0D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_SBYTE_1D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_SBYTE_2D_SCALING_INTERCEPT_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_USHORT: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_USHORT_0D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_USHORT_1D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_USHORT_2D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_USHORT_0D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_USHORT_1D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_USHORT_2D_SCALING_INTERCEPT_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_SSHORT: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_SSHORT_0D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_SSHORT_1D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_SSHORT_2D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_SSHORT_0D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_SSHORT_1D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_SSHORT_2D_SCALING_INTERCEPT_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_UINT: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_UINT_0D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_UINT_1D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_UINT_2D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_UINT_0D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_UINT_1D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_UINT_2D_SCALING_INTERCEPT_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_SINT: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_SINT_0D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_SINT_1D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_SINT_2D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_SINT_0D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_SINT_1D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_SINT_2D_SCALING_INTERCEPT_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_FLOAT: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_FLOAT_0D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_FLOAT_1D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_FLOAT_2D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_FLOAT_0D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_FLOAT_1D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_FLOAT_2D_SCALING_INTERCEPT_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; case AMITK_FORMAT_DOUBLE: switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: return AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D: return AMITK_DATA_SET_DOUBLE_1D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D: return AMITK_DATA_SET_DOUBLE_2D_SCALING_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return AMITK_DATA_SET_DOUBLE_0D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return AMITK_DATA_SET_DOUBLE_1D_SCALING_INTERCEPT_CONTENT(ds,i); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return AMITK_DATA_SET_DOUBLE_2D_SCALING_INTERCEPT_CONTENT(ds,i); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); return EMPTY; break; } } amide_data_t amitk_data_set_get_internal_scaling_factor(const AmitkDataSet * ds, const AmitkVoxel i) { g_return_val_if_fail(AMITK_IS_DATA_SET(ds), EMPTY); g_return_val_if_fail(ds->internal_scaling_factor->format == AMITK_FORMAT_DOUBLE, EMPTY); switch(ds->scaling_type) { case AMITK_SCALING_TYPE_2D: case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_factor,i); break; case AMITK_SCALING_TYPE_1D: case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return *AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(ds->internal_scaling_factor,i); break; default: return *AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(ds->internal_scaling_factor,i); } } amide_data_t amitk_data_set_get_scaling_factor(const AmitkDataSet * ds, const AmitkVoxel i) { g_return_val_if_fail(AMITK_IS_DATA_SET(ds), EMPTY); g_return_val_if_fail(ds->current_scaling_factor != NULL, EMPTY); g_return_val_if_fail(ds->current_scaling_factor->format == AMITK_FORMAT_DOUBLE, EMPTY); switch(ds->scaling_type) { case AMITK_SCALING_TYPE_2D: case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->current_scaling_factor,i); break; case AMITK_SCALING_TYPE_1D: case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return *AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(ds->current_scaling_factor,i); break; default: return *AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(ds->current_scaling_factor,i); } } amide_data_t amitk_data_set_get_scaling_intercept(const AmitkDataSet * ds, const AmitkVoxel i) { g_return_val_if_fail(AMITK_IS_DATA_SET(ds), EMPTY); if (ds->internal_scaling_intercept == NULL) return 0.0; g_return_val_if_fail(ds->internal_scaling_intercept->format == AMITK_FORMAT_DOUBLE, EMPTY); switch(ds->scaling_type) { case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: return *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_intercept,i); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: return *AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(ds->internal_scaling_intercept,i); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: return *AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(ds->internal_scaling_intercept,i); break; default: return 0.0; } } /* sets the current voxel to the given value. If value/scaling is outside of the range of the data set type (i.e. negative for unsigned type), it will be truncated to lie at the limits of the range */ /* note, after using this function, you should recalculate the frame's max/min, along with the global max/min, and the distribution data */ void amitk_data_set_set_value(AmitkDataSet * ds, const AmitkVoxel i, const amide_data_t value, const gboolean signal_change) { amide_data_t unscaled_value; g_return_if_fail(AMITK_IS_DATA_SET(ds)); /* figure out what the value is unscaled */ switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: unscaled_value = value/ (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER((ds)->current_scaling_factor, (i))); break; case AMITK_SCALING_TYPE_1D: unscaled_value = value/ (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER((ds)->current_scaling_factor, (i))); break; case AMITK_SCALING_TYPE_2D: unscaled_value = value/ (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER((ds)->current_scaling_factor, (i))); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: unscaled_value = value/ (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER((ds)->current_scaling_factor, (i))) -(*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER((ds)->internal_scaling_intercept, (i))); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: unscaled_value = value/ (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER((ds)->current_scaling_factor, (i))) -(*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER((ds)->internal_scaling_intercept, (i))); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: unscaled_value = value/ (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER((ds)->current_scaling_factor, (i))) -(*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER((ds)->internal_scaling_intercept, (i))); break; default: unscaled_value=0.0; g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } /* truncated unscaled value to type limits */ if (unscaled_value < amitk_format_min[ds->raw_data->format]) unscaled_value = amitk_format_min[ds->raw_data->format]; else if (unscaled_value > amitk_format_max[ds->raw_data->format]) unscaled_value = amitk_format_max[ds->raw_data->format]; switch(ds->raw_data->format) { case AMITK_FORMAT_UBYTE: AMITK_RAW_DATA_UBYTE_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_SBYTE: AMITK_RAW_DATA_SBYTE_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_USHORT: AMITK_RAW_DATA_USHORT_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_SSHORT: AMITK_RAW_DATA_SSHORT_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_UINT: AMITK_RAW_DATA_UINT_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_SINT: AMITK_RAW_DATA_SINT_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_FLOAT: AMITK_RAW_DATA_FLOAT_SET_CONTENT((ds)->raw_data, (i)) = unscaled_value; break; case AMITK_FORMAT_DOUBLE: AMITK_RAW_DATA_DOUBLE_SET_CONTENT((ds)->raw_data, (i)) = unscaled_value; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } if (signal_change) { g_signal_emit (G_OBJECT (ds), data_set_signals[INVALIDATE_SLICE_CACHE], 0); g_signal_emit (G_OBJECT (ds), data_set_signals[DATA_SET_CHANGED], 0); } } /* like amitk_data_set_set_value, but only takes into account the internal_scaling_factor, not the current_scaling_factor. Really only useful if you're copying data from one data set to the other, and you've just used amitk_data_set_get_internal_value */ void amitk_data_set_set_internal_value(AmitkDataSet * ds, const AmitkVoxel i, const amide_data_t internal_value, const gboolean signal_change) { amide_data_t unscaled_value; g_return_if_fail(AMITK_IS_DATA_SET(ds)); /* figure out what the value is unscaled */ switch(ds->scaling_type) { case AMITK_SCALING_TYPE_0D: unscaled_value = internal_value/ (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER((ds)->internal_scaling_factor, (i))); break; case AMITK_SCALING_TYPE_1D: unscaled_value = internal_value/ (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER((ds)->internal_scaling_factor, (i))); break; case AMITK_SCALING_TYPE_2D: unscaled_value = internal_value/ (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER((ds)->internal_scaling_factor, (i))); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: unscaled_value = internal_value/ (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER((ds)->internal_scaling_factor, (i))) -(*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER((ds)->internal_scaling_intercept, (i))); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: unscaled_value = internal_value/ (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER((ds)->internal_scaling_factor, (i))) -(*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER((ds)->internal_scaling_intercept, (i))); break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: unscaled_value = internal_value/ (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER((ds)->internal_scaling_factor, (i))) -(*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER((ds)->internal_scaling_intercept, (i))); break; default: unscaled_value=0.0; g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } /* truncated unscaled value to type limits */ if (unscaled_value < amitk_format_min[ds->raw_data->format]) unscaled_value = amitk_format_min[ds->raw_data->format]; else if (unscaled_value > amitk_format_max[ds->raw_data->format]) unscaled_value = amitk_format_max[ds->raw_data->format]; switch(ds->raw_data->format) { case AMITK_FORMAT_UBYTE: AMITK_RAW_DATA_UBYTE_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_SBYTE: AMITK_RAW_DATA_SBYTE_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_USHORT: AMITK_RAW_DATA_USHORT_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_SSHORT: AMITK_RAW_DATA_SSHORT_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_UINT: AMITK_RAW_DATA_UINT_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_SINT: AMITK_RAW_DATA_SINT_SET_CONTENT((ds)->raw_data, (i)) = rint(unscaled_value); break; case AMITK_FORMAT_FLOAT: AMITK_RAW_DATA_FLOAT_SET_CONTENT((ds)->raw_data, (i)) = unscaled_value; break; case AMITK_FORMAT_DOUBLE: AMITK_RAW_DATA_DOUBLE_SET_CONTENT((ds)->raw_data, (i)) = unscaled_value; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } if (signal_change) { g_signal_emit (G_OBJECT (ds), data_set_signals[INVALIDATE_SLICE_CACHE], 0); g_signal_emit (G_OBJECT (ds), data_set_signals[DATA_SET_CHANGED], 0); } } static AmitkDataSet * (*get_slice_func[AMITK_FORMAT_NUM][AMITK_SCALING_TYPE_NUM])(AmitkDataSet *, const amide_time_t, const amide_time_t, const amide_intpoint_t, const AmitkCanvasPoint, const AmitkVolume *) = { {amitk_data_set_UBYTE_0D_SCALING_get_slice, amitk_data_set_UBYTE_1D_SCALING_get_slice, amitk_data_set_UBYTE_2D_SCALING_get_slice, amitk_data_set_UBYTE_0D_SCALING_INTERCEPT_get_slice, amitk_data_set_UBYTE_1D_SCALING_INTERCEPT_get_slice, amitk_data_set_UBYTE_2D_SCALING_INTERCEPT_get_slice }, {amitk_data_set_SBYTE_0D_SCALING_get_slice, amitk_data_set_SBYTE_1D_SCALING_get_slice, amitk_data_set_SBYTE_2D_SCALING_get_slice, amitk_data_set_SBYTE_0D_SCALING_INTERCEPT_get_slice, amitk_data_set_SBYTE_1D_SCALING_INTERCEPT_get_slice, amitk_data_set_SBYTE_2D_SCALING_INTERCEPT_get_slice }, {amitk_data_set_USHORT_0D_SCALING_get_slice,amitk_data_set_USHORT_1D_SCALING_get_slice, amitk_data_set_USHORT_2D_SCALING_get_slice,amitk_data_set_USHORT_0D_SCALING_INTERCEPT_get_slice,amitk_data_set_USHORT_1D_SCALING_INTERCEPT_get_slice, amitk_data_set_USHORT_2D_SCALING_INTERCEPT_get_slice }, {amitk_data_set_SSHORT_0D_SCALING_get_slice,amitk_data_set_SSHORT_1D_SCALING_get_slice, amitk_data_set_SSHORT_2D_SCALING_get_slice,amitk_data_set_SSHORT_0D_SCALING_INTERCEPT_get_slice,amitk_data_set_SSHORT_1D_SCALING_INTERCEPT_get_slice, amitk_data_set_SSHORT_2D_SCALING_INTERCEPT_get_slice }, {amitk_data_set_UINT_0D_SCALING_get_slice, amitk_data_set_UINT_1D_SCALING_get_slice, amitk_data_set_UINT_2D_SCALING_get_slice, amitk_data_set_UINT_0D_SCALING_INTERCEPT_get_slice, amitk_data_set_UINT_1D_SCALING_INTERCEPT_get_slice, amitk_data_set_UINT_2D_SCALING_INTERCEPT_get_slice }, {amitk_data_set_SINT_0D_SCALING_get_slice, amitk_data_set_SINT_1D_SCALING_get_slice, amitk_data_set_SINT_2D_SCALING_get_slice, amitk_data_set_SINT_0D_SCALING_INTERCEPT_get_slice, amitk_data_set_SINT_1D_SCALING_INTERCEPT_get_slice, amitk_data_set_SINT_2D_SCALING_INTERCEPT_get_slice }, {amitk_data_set_FLOAT_0D_SCALING_get_slice, amitk_data_set_FLOAT_1D_SCALING_get_slice, amitk_data_set_FLOAT_2D_SCALING_get_slice, amitk_data_set_FLOAT_0D_SCALING_INTERCEPT_get_slice, amitk_data_set_FLOAT_1D_SCALING_INTERCEPT_get_slice, amitk_data_set_FLOAT_2D_SCALING_INTERCEPT_get_slice }, {amitk_data_set_DOUBLE_0D_SCALING_get_slice,amitk_data_set_DOUBLE_1D_SCALING_get_slice, amitk_data_set_DOUBLE_2D_SCALING_get_slice,amitk_data_set_DOUBLE_0D_SCALING_INTERCEPT_get_slice,amitk_data_set_DOUBLE_1D_SCALING_INTERCEPT_get_slice, amitk_data_set_DOUBLE_2D_SCALING_INTERCEPT_get_slice } }; /* returns a "2D" slice from a data set */ AmitkDataSet *amitk_data_set_get_slice(AmitkDataSet * ds, const amide_time_t start, const amide_time_t duration, const amide_intpoint_t gate, const AmitkCanvasPoint pixel_size, const AmitkVolume * slice_volume) { AmitkDataSet * slice; g_return_val_if_fail(AMITK_IS_DATA_SET(ds), NULL); g_return_val_if_fail(ds->raw_data != NULL, NULL); /* hand everything off to the data type specific function */ slice = (*get_slice_func[ds->raw_data->format][ds->scaling_type])(ds, start, duration, gate, pixel_size, slice_volume); return slice; } /* start_point and end_point should be in the base coordinate frame */ void amitk_data_set_get_line_profile(AmitkDataSet * ds, const amide_time_t start, const amide_time_t duration, const AmitkPoint base_start_point, const AmitkPoint base_end_point, GPtrArray ** preturn_data) { AmitkPoint start_point, end_point; AmitkPoint candidate_point, current_point; AmitkPoint step; AmitkPoint direction; AmitkVoxel current_voxel, last_voxel, candidate_voxel; amide_real_t min_size; amide_real_t length; amide_intpoint_t i_gate; gint start_frame, end_frame; amide_time_t used_start, used_end, used_duration; amide_time_t ds_start, ds_end; amide_data_t value, gate_value, time_weight; AmitkLineProfileDataElement * element; AmitkPoint voxel_point; gdouble m; g_return_if_fail(AMITK_IS_DATA_SET(ds)); *preturn_data = g_ptr_array_new(); g_return_if_fail(*preturn_data != NULL); /* figure out what frames of this data set to use */ used_start = start; start_frame = amitk_data_set_get_frame(ds, used_start); ds_start = amitk_data_set_get_start_time(ds, start_frame); used_end = start+duration; end_frame = amitk_data_set_get_frame(ds, used_end); ds_end = amitk_data_set_get_end_time(ds, end_frame); if (ds_end < used_end) used_end = ds_end; if (ds_start > used_start) used_start = ds_start; used_duration = used_end-used_start; /* translate the start and end into the data set's coordinate frame */ start_point = amitk_space_b2s(AMITK_SPACE(ds), base_start_point); end_point = amitk_space_b2s(AMITK_SPACE(ds), base_end_point); /* figure out the direction we want to go */ direction = point_sub(end_point, start_point); length = point_mag(direction); /* figure out what our "step" size will be (1/4 a voxel size) */ min_size = point_min_dim(AMITK_DATA_SET_VOXEL_SIZE(ds)); step = point_cmult((1.0/4.0)*min_size*(1.0/length), direction); /* initialize starting values */ current_point = start_point; POINT_TO_VOXEL(current_point, AMITK_DATA_SET_VOXEL_SIZE(ds), start_frame, AMITK_DATA_SET_VIEW_START_GATE(ds), current_voxel); while (point_mag(point_sub(current_point, start_point)) < length) { /* this next snippet of code advances us along the line so that we're at the point on the line closest to the center of the voxel */ VOXEL_TO_POINT(current_voxel, AMITK_DATA_SET_VOXEL_SIZE(ds), voxel_point); m = ((voxel_point.x-start_point.x)*direction.x + (voxel_point.y-start_point.y)*direction.y + (voxel_point.z-start_point.z)*direction.z) / (length*length); candidate_point = point_add(start_point, point_cmult(m, direction)); /* note, we may get a voxel out that's not the current voxel... we'll skip the voxel in that case */ POINT_TO_VOXEL(candidate_point, AMITK_DATA_SET_VOXEL_SIZE(ds), current_voxel.t, current_voxel.g,candidate_voxel); /* record the value if it's in the data set */ if ((amitk_raw_data_includes_voxel(AMITK_DATA_SET_RAW_DATA(ds), current_voxel)) && (VOXEL_EQUAL(candidate_voxel, current_voxel))) { /* need to average over frames */ value = 0; for (current_voxel.t=start_frame; current_voxel.t<=end_frame;current_voxel.t++) { if (start_frame == end_frame) time_weight = 1.0; else if (current_voxel.t == start_frame) time_weight = (amitk_data_set_get_end_time(ds, start_frame)-used_start)/used_duration; else if (current_voxel.t == end_frame) time_weight = (used_end-amitk_data_set_get_start_time(ds, end_frame))/used_duration; else time_weight = amitk_data_set_get_frame_duration(ds, current_voxel.t)/used_duration; /* need to average over gates */ gate_value = 0.0; for (i_gate=0; i_gate < AMITK_DATA_SET_NUM_VIEW_GATES(ds); i_gate++) { current_voxel.g = i_gate+AMITK_DATA_SET_VIEW_START_GATE(ds); if (current_voxel.g >= AMITK_DATA_SET_NUM_GATES(ds)) current_voxel.g -= AMITK_DATA_SET_NUM_GATES(ds); gate_value += amitk_data_set_get_value(ds, current_voxel); } value += time_weight*gate_value/((gdouble) AMITK_DATA_SET_NUM_VIEW_GATES(ds)); } /* record value in array */ element = g_malloc(sizeof(AmitkLineProfileDataElement)); g_return_if_fail(element != NULL); element->value = value; element->location = point_mag(point_sub(candidate_point, start_point)); g_ptr_array_add(*preturn_data, element); } current_voxel.t = start_frame; current_voxel.g = AMITK_DATA_SET_VIEW_START_GATE(ds); /* get next voxel */ last_voxel = current_voxel; /* this makes sure we move at least one voxel */ while (VOXEL_EQUAL(last_voxel, current_voxel)) { current_point = point_add(current_point, step); POINT_TO_VOXEL(current_point, AMITK_DATA_SET_VOXEL_SIZE(ds), current_voxel.t, current_voxel.g, current_voxel); } } return; } /* return the three planar projections of the data set */ /* projections should be an array of 3 pointers to data sets */ void amitk_data_set_get_projections(AmitkDataSet * ds, const guint frame, const guint gate, AmitkDataSet ** projections, AmitkUpdateFunc update_func, gpointer update_data) { AmitkVoxel dim, planar_dim, i; AmitkPoint voxel_size; amide_data_t normalizers[AMITK_VIEW_NUM]; div_t x; gint divider; gboolean continue_work=TRUE; gchar * temp_string; AmitkView i_view; amide_data_t value; g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(ds->raw_data != NULL); g_return_if_fail(projections != NULL); dim = AMITK_DATA_SET_DIM(ds); voxel_size = AMITK_DATA_SET_VOXEL_SIZE(ds); /* setup the wait dialog */ if (update_func != NULL) { temp_string = g_strdup_printf(_("Generating projections of:\n %s"), AMITK_OBJECT_NAME(ds)); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } divider = ((dim.z/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (dim.z/AMITK_UPDATE_DIVIDER); /* initialize the 3 projections */ for (i_view=0; i_view < AMITK_VIEW_NUM; i_view++) { planar_dim.z = 1; planar_dim.g = 1; planar_dim.t = 1; switch(i_view) { case AMITK_VIEW_CORONAL: planar_dim.x = dim.x; planar_dim.y = dim.z; break; case AMITK_VIEW_SAGITTAL: planar_dim.x = dim.y; planar_dim.y = dim.z; break; case AMITK_VIEW_TRANSVERSE: default: planar_dim.x = dim.x; planar_dim.y = dim.y; break; } projections[i_view] = amitk_data_set_new_with_data(NULL, AMITK_DATA_SET_MODALITY(ds), AMITK_FORMAT_DOUBLE, planar_dim, AMITK_SCALING_TYPE_0D); if (projections[i_view] == NULL) { g_warning(_("couldn't allocate memory space for the projection, wanted %dx%dx%dx%dx%d elements"), planar_dim.x, planar_dim.y, planar_dim.z, planar_dim.g, planar_dim.t); return; } switch(i_view) { case AMITK_VIEW_CORONAL: projections[i_view]->voxel_size.x = voxel_size.x; projections[i_view]->voxel_size.y = voxel_size.z; projections[i_view]->voxel_size.z = AMITK_VOLUME_Y_CORNER(ds); normalizers[i_view] = voxel_size.y/projections[i_view]->voxel_size.z; break; case AMITK_VIEW_SAGITTAL: projections[i_view]->voxel_size.x = voxel_size.y; projections[i_view]->voxel_size.y = voxel_size.z; projections[i_view]->voxel_size.z = AMITK_VOLUME_X_CORNER(ds); normalizers[i_view] = voxel_size.x/projections[i_view]->voxel_size.z; break; case AMITK_VIEW_TRANSVERSE: default: projections[i_view]->voxel_size.x = voxel_size.x; projections[i_view]->voxel_size.y = voxel_size.y; projections[i_view]->voxel_size.z = AMITK_VOLUME_Z_CORNER(ds); normalizers[i_view] = voxel_size.z/projections[i_view]->voxel_size.z; break; } projections[i_view]->slice_parent = ds; g_object_add_weak_pointer(G_OBJECT(ds), (gpointer *) &(projections[i_view]->slice_parent)); amitk_space_copy_in_place(AMITK_SPACE(projections[i_view]), AMITK_SPACE(ds)); amitk_data_set_calc_far_corner(projections[i_view]); projections[i_view]->scan_start = amitk_data_set_get_start_time(ds, frame); amitk_data_set_set_thresholding(projections[i_view], AMITK_THRESHOLDING_GLOBAL); amitk_data_set_set_color_table(projections[i_view], AMITK_VIEW_MODE_SINGLE, AMITK_DATA_SET_COLOR_TABLE(ds, AMITK_VIEW_MODE_SINGLE)); amitk_data_set_set_gate_time(projections[i_view], 0, amitk_data_set_get_gate_time(ds, gate)); amitk_data_set_set_frame_duration(projections[i_view], 0, amitk_data_set_get_frame_duration(ds, frame)); /* initialize our projection */ amitk_raw_data_DOUBLE_initialize_data(projections[i_view]->raw_data, 0.0); } /* now iterate through the entire data set, adding up the 3 projections */ i.t = frame; i.g = gate; for (i.z = 0; (i.z < dim.z) && continue_work; i.z++) { if (update_func != NULL) { x = div(i.z,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, (gdouble) (i.z)/dim.z); } for (i.y = 0; i.y < dim.y; i.y++) { for (i.x = 0; i.x < dim.x; i.x++) { value = amitk_data_set_get_value(ds, i); AMITK_RAW_DATA_DOUBLE_2D_SET_CONTENT(projections[AMITK_VIEW_TRANSVERSE]->raw_data,i.y, i.x) += value; AMITK_RAW_DATA_DOUBLE_2D_SET_CONTENT(projections[AMITK_VIEW_CORONAL]->raw_data,dim.z-i.z-1, i.x) += value; AMITK_RAW_DATA_DOUBLE_2D_SET_CONTENT(projections[AMITK_VIEW_SAGITTAL]->raw_data,dim.z-i.z-1, i.y) += value; } } } if (update_func != NULL) /* remove progress bar */ continue_work = (*update_func)(update_data, NULL, (gdouble) 2.0); if (!continue_work) {/* we hit cancel */ for (i_view=0; i_viewraw_data,i.y, i.x) *= normalizers[i_view]; amitk_data_set_set_threshold_max(projections[i_view], 0, amitk_data_set_get_global_max(projections[i_view])); amitk_data_set_set_threshold_min(projections[i_view], 0, amitk_data_set_get_global_min(projections[i_view])); } return; } /* returns a cropped version of the given data set */ AmitkDataSet *amitk_data_set_get_cropped(const AmitkDataSet * ds, const AmitkVoxel start, const AmitkVoxel end, const AmitkFormat format, const AmitkScalingType scaling_type, AmitkUpdateFunc update_func, gpointer update_data) { AmitkDataSet * cropped; AmitkVoxel i, j; AmitkVoxel dim; AmitkVoxel scaling_dim; gchar * temp_string; AmitkPoint shift; AmitkPoint temp_pt; GList * children; gboolean same_format_and_scaling; gboolean unsigned_type; gboolean float_type; amide_data_t max, min, value; div_t x; gint divider; gint total_planes; gint total_progress; gint scaling_progress; gint i_progress; gboolean continue_work=TRUE; g_return_val_if_fail(AMITK_IS_DATA_SET(ds), NULL); g_return_val_if_fail(ds->raw_data != NULL, NULL); /* are we converting format and/or scaling? */ if ((AMITK_DATA_SET_FORMAT(ds) == format) && (AMITK_DATA_SET_SCALING_TYPE(ds) == scaling_type)) same_format_and_scaling = TRUE; else same_format_and_scaling = FALSE; /* are we converting to an unsigned type? */ switch(format) { case AMITK_FORMAT_UBYTE: case AMITK_FORMAT_USHORT: case AMITK_FORMAT_UINT: unsigned_type = TRUE; float_type = FALSE; break; case AMITK_FORMAT_FLOAT: case AMITK_FORMAT_DOUBLE: unsigned_type = FALSE; float_type = TRUE; break; default: unsigned_type = FALSE; float_type = FALSE; break; } /* figure out the dimensions of the output data set and the scaling array */ dim = voxel_add(voxel_sub(end, start), one_voxel); scaling_dim = one_voxel; switch (scaling_type) { case AMITK_SCALING_TYPE_2D: case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: scaling_dim.t = dim.t; scaling_dim.g = dim.g; scaling_dim.z = dim.z; break; case AMITK_SCALING_TYPE_1D: case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: scaling_dim.g = dim.g; scaling_dim.t = dim.t; break; default: break; } /* multiply total_planes by two if we also need to iterate to find new scale factors */ total_planes = dim.t*dim.g*dim.z; if (!same_format_and_scaling) scaling_progress = total_planes; else scaling_progress = 0; total_progress = total_planes + scaling_progress; divider = ((total_progress/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (total_progress/AMITK_UPDATE_DIVIDER); cropped = AMITK_DATA_SET(amitk_object_copy(AMITK_OBJECT(ds))); /* start by unrefing the info that's only copied by reference by amitk_object_copy */ if (cropped->raw_data != NULL) { g_object_unref(cropped->raw_data); cropped->raw_data = NULL; } if (cropped->internal_scaling_factor != NULL) { g_object_unref(cropped->internal_scaling_factor); cropped->internal_scaling_factor = NULL; } if (cropped->internal_scaling_intercept != NULL) { g_object_unref(cropped->internal_scaling_intercept); cropped->internal_scaling_intercept = NULL; } if (cropped->distribution != NULL) { g_object_unref(cropped->distribution); cropped->distribution = NULL; } /* and unref anything that's obviously now incorrect */ if (cropped->current_scaling_factor != NULL) { g_object_unref(cropped->current_scaling_factor); cropped->current_scaling_factor = NULL; } if (cropped->gate_time != NULL) { g_free(cropped->gate_time); cropped->gate_time = NULL; } if (cropped->frame_duration != NULL) { g_free(cropped->frame_duration); cropped->frame_duration = NULL; } if (cropped->frame_max != NULL) { g_free(cropped->frame_max); cropped->frame_max = NULL; } if (cropped->frame_min != NULL) { g_free(cropped->frame_min); cropped->frame_min = NULL; } /* set a new name for this guy */ temp_string = g_strdup_printf(_("%s, cropped"), AMITK_OBJECT_NAME(ds)); amitk_object_set_name(AMITK_OBJECT(cropped), temp_string); g_free(temp_string); /* set the scale type */ cropped->scaling_type = scaling_type; /* setup the scale factors */ cropped->internal_scaling_factor = amitk_raw_data_new_with_data(AMITK_FORMAT_DOUBLE,scaling_dim); if (cropped->internal_scaling_factor == NULL) { g_warning(_("couldn't allocate memory space for the cropped internal scaling structure")); goto error; } if (AMITK_DATA_SET_SCALING_HAS_INTERCEPT(cropped)) { cropped->internal_scaling_intercept = amitk_raw_data_new_with_data(AMITK_FORMAT_DOUBLE,scaling_dim); if (cropped->internal_scaling_intercept == NULL) { g_warning(_("couldn't allocate memory space for the cropped internal scaling structure")); goto error; } } if (update_func != NULL) { temp_string = g_strdup_printf(_("Generating cropped version of:\n %s"), AMITK_OBJECT_NAME(ds)); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } /* now generate the scale factors */ if (same_format_and_scaling) { /* we'll just use the old scaling factors if applicable */ i = zero_voxel; j = start; switch(scaling_type) { case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: for (i.t=0, j.t=start.t; j.t <= end.t; i.t++, j.t++) for (i.g=0, j.g=start.g; j.g <= end.g; i.g++, j.g++) for (i.z=0, j.z=start.z; j.z <= end.z; i.z++, j.z++) { (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_factor, j); (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(cropped->internal_scaling_intercept, i)) = *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_intercept, j); } break; case AMITK_SCALING_TYPE_2D: for (i.t=0, j.t=start.t; j.t <= end.t; i.t++, j.t++) for (i.g=0, j.g=start.g; j.g <= end.g; i.g++, j.g++) for (i.z=0, j.z=start.z; j.z <= end.z; i.z++, j.z++) (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_factor, j); break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: for (i.t=0, j.t=start.t; j.t <= end.t; i.t++, j.t++) for (i.g=0, j.g=start.g; j.g <= end.g; i.g++, j.g++) { (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = *AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(ds->internal_scaling_factor, j); (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(cropped->internal_scaling_intercept, i)) = *AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(ds->internal_scaling_intercept, j); } break; case AMITK_SCALING_TYPE_1D: for (i.t=0, j.t=start.t; j.t <= end.t; i.t++, j.t++) for (i.g=0, j.g=start.g; j.g <= end.g; i.g++, j.g++) (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = *AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(ds->internal_scaling_factor, j); break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = *AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(ds->internal_scaling_factor, j); (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(cropped->internal_scaling_intercept, i)) = *AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(ds->internal_scaling_intercept, j); break; case AMITK_SCALING_TYPE_0D: (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = *AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(ds->internal_scaling_factor, j); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } } else if (!float_type) { /* we're changing format/scaling type - generate new scaling factors */ max = min = 0.0; i_progress = 0; for (i.t=0, j.t=start.t; j.t <= end.t; i.t++, j.t++) { for (i.g=0, j.g=start.g; j.g <= end.g; i.g++, j.g++) { for (i.z=0, j.z=start.z; (j.z <= end.z) && continue_work; i.z++, j.z++, i_progress++) { if (update_func != NULL) { x = div(i_progress,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) i_progress)/((gdouble) total_progress)); } for (i.y=0, j.y=start.y; j.y <= end.y; i.y++, j.y++) { for (i.x=0, j.x=start.x; j.x <= end.x; i.x++, j.x++) { value = amitk_data_set_get_internal_value(ds, i); if (value > max) max = value; else if (value < min) min = value; } } if (scaling_type == AMITK_SCALING_TYPE_2D) { if (!unsigned_type) max = MAX(fabs(min), max); (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = max/amitk_format_max[format]; max = min = 0.0; } else if (scaling_type == AMITK_SCALING_TYPE_2D_WITH_INTERCEPT) { if (!unsigned_type) { max = MAX(fabs(min), max); min = 0.0; } (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = (max-min)/amitk_format_max[format]; (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(cropped->internal_scaling_intercept, i)) = min; max = min = 0.0; } } if (scaling_type == AMITK_SCALING_TYPE_1D) { if (!unsigned_type) max = MAX(fabs(min), max); (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = max/amitk_format_max[format]; max = min = 0.0; } else if (scaling_type == AMITK_SCALING_TYPE_1D_WITH_INTERCEPT) { if (!unsigned_type) { max = MAX(fabs(min), max); min = 0.0; } (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = max/amitk_format_max[format]; (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(cropped->internal_scaling_intercept, i)) = min; max = min = 0.0; } } } if (scaling_type == AMITK_SCALING_TYPE_0D) { if (!unsigned_type) max = MAX(fabs(min), max); (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = max/amitk_format_max[format]; max = min = 0.0; } else if (scaling_type == AMITK_SCALING_TYPE_0D_WITH_INTERCEPT) { if (!unsigned_type) { max = MAX(fabs(min), max); min = 0.0; } (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = max/amitk_format_max[format]; (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(cropped->internal_scaling_intercept, i)) = min; max = min = 0.0; } } else { /* floating point type, just set scaling factors to 1 */ i = zero_voxel; switch(scaling_type) { case AMITK_SCALING_TYPE_2D: for (i.t=0; i.t < dim.t; i.t++) for (i.g=0; i.g < dim.g; i.g++) for (i.z=0; i.z < dim.z; i.z++) (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = 1.0; break; case AMITK_SCALING_TYPE_2D_WITH_INTERCEPT: for (i.t=0; i.t < dim.t; i.t++) for (i.g=0; i.g < dim.g; i.g++) for (i.z=0; i.z < dim.z; i.z++) { (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = 1.0; (*AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(cropped->internal_scaling_intercept, i)) = 0.0; } break; case AMITK_SCALING_TYPE_1D: for (i.t=0; i.t < dim.t; i.t++) for (i.g=0; i.g < dim.g; i.g++) (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = 1.0; break; case AMITK_SCALING_TYPE_1D_WITH_INTERCEPT: for (i.t=0; i.t < dim.t; i.t++) for (i.g=0; i.g < dim.g; i.g++) { (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = 1.0; (*AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(cropped->internal_scaling_intercept, i)) = 0.0; } break; case AMITK_SCALING_TYPE_0D: (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = 1.0; break; case AMITK_SCALING_TYPE_0D_WITH_INTERCEPT: (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(cropped->internal_scaling_factor, i)) = 1.0; (*AMITK_RAW_DATA_DOUBLE_0D_SCALING_POINTER(cropped->internal_scaling_intercept, i)) = 0.0; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } } /* reset the current scaling array */ amitk_data_set_set_scale_factor(cropped, AMITK_DATA_SET_SCALE_FACTOR(ds)); /* and setup the data */ cropped->raw_data = amitk_raw_data_new_with_data(format, voxel_add(voxel_sub(end, start), one_voxel)); if (cropped->raw_data == NULL) { g_warning(_("couldn't allocate memory space for the cropped raw data set structure")); goto error; } /* copy the raw data on over */ i_progress = scaling_progress; for (i.t=0, j.t=start.t; j.t <= end.t; i.t++, j.t++) { for (i.g=0, j.g=start.g; j.g <= end.g; i.g++, j.g++) { for (i.z=0, j.z=start.z; (j.z <= end.z) && continue_work; i.z++, j.z++, i_progress++) { if (update_func != NULL) { x = div(i_progress,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) i_progress)/((gdouble) total_progress)); } for (i.y=0, j.y=start.y; j.y <= end.y; i.y++, j.y++) { if (same_format_and_scaling) { i.x = 0; j.x = start.x; memcpy(amitk_raw_data_get_pointer(cropped->raw_data, i), amitk_raw_data_get_pointer(ds->raw_data, j), amitk_format_sizes[format]*dim.x); } else { for (i.x=0, j.x=start.x; j.x <= end.x; i.x++, j.x++) { value = amitk_data_set_get_internal_value(ds, j); amitk_data_set_set_internal_value(cropped, i, value, FALSE); } } } } } } if (update_func != NULL) /* remove progress bar */ continue_work = (*update_func)(update_data, NULL, (gdouble) 2.0); if (!continue_work) goto error; /* reset the gates we're viewing as appropriate */ if (((AMITK_DATA_SET_VIEW_START_GATE(ds) - start.g) < AMITK_DATA_SET_NUM_GATES(cropped)) && ((AMITK_DATA_SET_VIEW_START_GATE(ds) - start.g) >= 0)) amitk_data_set_set_view_start_gate(cropped, AMITK_DATA_SET_VIEW_START_GATE(ds) - start.g); else amitk_data_set_set_view_start_gate(cropped, 0); /* put something reasonable */ if (((AMITK_DATA_SET_VIEW_END_GATE(ds) - start.g) < AMITK_DATA_SET_NUM_GATES(cropped)) && ((AMITK_DATA_SET_VIEW_END_GATE(ds) - start.g) >= 0)) amitk_data_set_set_view_end_gate(cropped, AMITK_DATA_SET_VIEW_END_GATE(ds) - start.g); else amitk_data_set_set_view_end_gate(cropped, AMITK_DATA_SET_VIEW_START_GATE(cropped)); /* put something reasonable */ /* setup the gate time array */ cropped->gate_time = amitk_data_set_get_gate_time_mem(ds); for (i.g=0, j.g=start.g; j.g <= end.g; i.g++, j.g++) amitk_data_set_set_gate_time(cropped, i.g, amitk_data_set_get_gate_time(ds, j.g)); /* setup the frame time array */ cropped->scan_start = amitk_data_set_get_start_time(ds, start.t); cropped->frame_duration = amitk_data_set_get_frame_duration_mem(ds); for (i.t=0, j.t=start.t; j.t <= end.t; i.t++, j.t++) amitk_data_set_set_frame_duration(cropped, i.t, amitk_data_set_get_frame_duration(ds, j.t)); /* recalc the temporary parameters */ amitk_data_set_calc_far_corner(cropped); amitk_data_set_calc_min_max(cropped, update_func, update_data); /* and shift the offset appropriately */ POINT_MULT(start, AMITK_DATA_SET_VOXEL_SIZE(cropped), temp_pt); temp_pt = amitk_space_s2b(AMITK_SPACE(ds), temp_pt); shift = point_sub(temp_pt, AMITK_SPACE_OFFSET(ds)); amitk_space_shift_offset(AMITK_SPACE(cropped), shift); /* and reshift the children, so they stay in the right spot */ shift = point_neg(shift); children = AMITK_OBJECT_CHILDREN(cropped); while (children != NULL) { amitk_space_shift_offset(AMITK_SPACE(children->data), shift); children = children->next; } /* see if we can drop the intercept (if present)/reducing scaling dimensionality */ data_set_drop_intercept(cropped); data_set_reduce_scaling_dimension(cropped); return cropped; error: amitk_object_unref(cropped); return NULL; } #ifdef AMIDE_LIBGSL_SUPPORT /* fills the data set "filtered_ds", with the results of the kernel convolved to data_set */ /* assumptions: 1- filtered_ds is of type FLOAT, 0D scaling 2- scale of filtered_ds is 1.0 3- kernel is of type DOUBLE, is in complex packed format, and has odd dimensions in x,y,z, and dimension 1 in t notes: 1. kernel is modified (FFT'd) 2. don't have a separate function for each data type, as getting the data_set data, is a tiny fraction of the computational time, use amitk_data_set_get_internal_value instead */ static gboolean filter_fir(const AmitkDataSet * data_set, AmitkDataSet * filtered_ds, AmitkRawData * kernel, AmitkVoxel kernel_size, AmitkUpdateFunc update_func, gpointer update_data) { AmitkVoxel subset_size; AmitkVoxel i_outer; AmitkVoxel i_inner; AmitkVoxel j_inner; AmitkVoxel half; AmitkVoxel ds_dim; AmitkRawData * subset=NULL; gsl_fft_complex_wavetable * wavetable=NULL; gsl_fft_complex_workspace * workspace = NULL; gchar * temp_string; gint image_num; gint total_planes; gboolean continue_work=TRUE; g_return_val_if_fail(kernel_size.t == 1, FALSE); g_return_val_if_fail(kernel_size.g == 1, FALSE); g_return_val_if_fail((kernel_size.z & 0x1), FALSE); /* needs to be odd */ g_return_val_if_fail((kernel_size.y & 0x1), FALSE); g_return_val_if_fail((kernel_size.x & 0x1), FALSE); g_return_val_if_fail(2*kernel_size.z < AMITK_FILTER_FFT_SIZE, FALSE); g_return_val_if_fail(2*kernel_size.y < AMITK_FILTER_FFT_SIZE, FALSE); g_return_val_if_fail(2*kernel_size.x < AMITK_FILTER_FFT_SIZE, FALSE); ds_dim = AMITK_DATA_SET_DIM(data_set); /* initialize gsl's FFT stuff */ wavetable = gsl_fft_complex_wavetable_alloc(AMITK_FILTER_FFT_SIZE); workspace = gsl_fft_complex_workspace_alloc (AMITK_FILTER_FFT_SIZE); if ((wavetable == NULL) || (workspace == NULL)) { g_warning(_("Filtering: Failed to allocate wavetable and workspace")); continue_work=FALSE; goto exit_strategy; } /* get space for our data subset*/ if ((subset = amitk_raw_data_new()) == NULL) { g_warning(_("couldn't allocate memory space for the subset structure")); continue_work=FALSE; goto exit_strategy; } subset->format = AMITK_FORMAT_DOUBLE; subset->dim.t = subset->dim.g = 1; subset->dim.z = subset->dim.y = AMITK_FILTER_FFT_SIZE; subset->dim.x = 2*AMITK_FILTER_FFT_SIZE; /* real and complex parts */ subset_size.t = subset_size.g = 1; subset_size.z = AMITK_FILTER_FFT_SIZE-kernel_size.z+1; subset_size.y = AMITK_FILTER_FFT_SIZE-kernel_size.y+1; subset_size.x = AMITK_FILTER_FFT_SIZE-kernel_size.x+1; half.t = half.g = 0; half.z = kernel_size.z>>1; half.y = kernel_size.y>>1; half.x = kernel_size.x>>1; if ((subset->data = amitk_raw_data_get_data_mem(subset)) == NULL) { g_warning(_("Couldn't allocate memory space for the subset data")); continue_work=FALSE; goto exit_strategy; } /* FFT the kernel */ amitk_filter_3D_FFT(kernel, wavetable, workspace); if (update_func != NULL) { temp_string = g_strdup_printf(_("Filtering Data Set: %s"), AMITK_OBJECT_NAME(data_set)); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } total_planes = ds_dim.z*ds_dim.t*ds_dim.g; /* start the overlap and add FFT method */ i_outer.t = i_inner.t = j_inner.t = 0; i_outer.g = i_inner.g = j_inner.g = 0; for (i_outer.t = 0; (i_outer.t < ds_dim.t) && continue_work; i_outer.t++) { for (i_outer.g = 0; (i_outer.g < ds_dim.g) && continue_work; i_outer.g++) { #if AMIDE_DEBUG g_print("Filtering Frame %d/Gate %d\n", i_outer.t, i_outer.g); #endif for (i_outer.z = 0; (i_outer.z < ds_dim.z) && continue_work; i_outer.z+= subset_size.z) { if (update_func != NULL) { image_num = i_outer.z+i_outer.t*ds_dim.z+i_outer.g*ds_dim.z*ds_dim.t; continue_work = (*update_func)(update_data, NULL, ((gdouble) image_num)/((gdouble) total_planes)); } for (i_outer.y = 0; i_outer.y < ds_dim.y; i_outer.y+= subset_size.y) { for (i_outer.x = 0; i_outer.x < ds_dim.x; i_outer.x+= subset_size.x) { /* initialize the subset */ for (j_inner.z = 0; j_inner.z < subset->dim.z; j_inner.z++) for (j_inner.y = 0; j_inner.y < subset->dim.y; j_inner.y++) for (j_inner.x = 0; j_inner.x < subset->dim.x; j_inner.x++) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(subset, j_inner) = 0.0; /* copy data over from the actual data set */ for (i_inner.z = 0, j_inner.z=0; ((i_inner.z < subset_size.z) && (i_inner.z+i_outer.z) < ds_dim.z); i_inner.z++, j_inner.z++) for (i_inner.y = 0, j_inner.y=0; ((i_inner.y < subset_size.y) && (i_inner.y+i_outer.y) < ds_dim.y); i_inner.y++, j_inner.y++) for (i_inner.x = 0, j_inner.x=0; ((i_inner.x < subset_size.x) && (i_inner.x+i_outer.x) < ds_dim.x); i_inner.x++, j_inner.x+=2) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(subset, j_inner) = amitk_data_set_get_internal_value(data_set, voxel_add(i_outer, i_inner)); /* should be zero for out of range */ /* FFT the data */ amitk_filter_3D_FFT(subset, wavetable, workspace); /* multiple the data by the filter */ amitk_filter_complex_mult(subset, kernel); /* and inverse FFT */ amitk_filter_inverse_3D_FFT(subset, wavetable, workspace); /* and add in, at the same time we're shifting the data set over by half the kernel size */ for (((i_inner.z = (i_outer.z == 0) ? 0 : -half.z), (j_inner.z = (i_outer.z == 0) ? half.z : 0)); ((j_inner.z < AMITK_FILTER_FFT_SIZE) && ((i_inner.z+i_outer.z) < AMITK_DATA_SET_DIM_Z(filtered_ds))); i_inner.z++, j_inner.z++) for (((i_inner.y = (i_outer.y == 0) ? 0 : -half.y), (j_inner.y = (i_outer.y == 0) ? half.y : 0)); ((j_inner.y < AMITK_FILTER_FFT_SIZE) && ((i_inner.y+i_outer.y) < AMITK_DATA_SET_DIM_Y(filtered_ds))); i_inner.y++, j_inner.y++) for (((i_inner.x = (i_outer.x == 0) ? 0 : -half.x), (j_inner.x = (i_outer.x == 0) ? 2*half.x : 0)); ((j_inner.x < 2*AMITK_FILTER_FFT_SIZE) && ((i_inner.x+i_outer.x) < AMITK_DATA_SET_DIM_X(filtered_ds))); i_inner.x++, j_inner.x+=2) AMITK_RAW_DATA_FLOAT_SET_CONTENT(filtered_ds->raw_data, voxel_add(i_outer,i_inner)) += AMITK_RAW_DATA_DOUBLE_CONTENT(subset, j_inner); } } } } } /* i_outer.t */ exit_strategy: if (wavetable != NULL) { gsl_fft_complex_wavetable_free(wavetable); wavetable = NULL; } if (workspace != NULL) { gsl_fft_complex_workspace_free(workspace); workspace = NULL; } if (subset != NULL) { g_object_unref(subset); subset = NULL; } if (update_func != NULL) /* remove progress bar */ (*update_func)(update_data, NULL, (gdouble) 2.0); return continue_work; } #endif /* assumptions: 1- filtered_ds is of type FLOAT, 0D scaling 2- scale of filtered_ds is 1.0 3- kernel dimensions are odd notes: 1. don't have a separate function for each data type, as getting the data_set data, is a tiny fraction of the computational time, use amitk_data_set_get_internal_value instead 2. data set can be the same as filtered_ds */ static gboolean filter_median_3D(const AmitkDataSet * data_set, AmitkDataSet * filtered_ds, AmitkVoxel kernel_dim, AmitkUpdateFunc update_func, gpointer update_data) { amide_data_t * partial_sort_data; AmitkVoxel i,j, mid_dim, output_dim; gint loc, median_size; AmitkRawData * output_data; AmitkVoxel ds_dim; gchar * temp_string; gint image_num; gint total_planes; div_t x; gint divider; gboolean continue_work=TRUE; g_return_val_if_fail(AMITK_IS_DATA_SET(data_set), FALSE); g_return_val_if_fail(AMITK_IS_DATA_SET(filtered_ds), FALSE); g_return_val_if_fail(VOXEL_EQUAL(AMITK_DATA_SET_DIM(data_set), AMITK_DATA_SET_DIM(filtered_ds)), FALSE); g_return_val_if_fail(AMITK_RAW_DATA_FORMAT(AMITK_DATA_SET_RAW_DATA(filtered_ds)) == AMITK_FORMAT_FLOAT, FALSE); g_return_val_if_fail(REAL_EQUAL(AMITK_DATA_SET_SCALE_FACTOR(filtered_ds), 1.0), FALSE); g_return_val_if_fail(VOXEL_EQUAL(AMITK_RAW_DATA_DIM(filtered_ds->internal_scaling_factor), one_voxel), FALSE); g_return_val_if_fail(kernel_dim.t == 1, FALSE); /* haven't written support yet */ g_return_val_if_fail(kernel_dim.g == 1, FALSE); /* haven't written support yet */ /* check it's odd */ g_return_val_if_fail(kernel_dim.x & 0x1, FALSE); g_return_val_if_fail(kernel_dim.y & 0x1, FALSE); g_return_val_if_fail(kernel_dim.z & 0x1, FALSE); ds_dim = AMITK_DATA_SET_DIM(data_set); if (ds_dim.z < kernel_dim.z) { kernel_dim.z = 1; g_warning(_("data set z dimension to small for kernel, setting kernel dimension to 1")); } if (ds_dim.y < kernel_dim.y) { kernel_dim.y = 1; g_warning(_("data set y dimension to small for kernel, setting kernel dimension to 1")); } if (ds_dim.x < kernel_dim.x) { kernel_dim.x = 1; g_warning(_("data set x dimension to small for kernel, setting kernel dimension to 1")); } mid_dim.t = mid_dim.g = 0; mid_dim.z = kernel_dim.z >> 1; mid_dim.y = kernel_dim.y >> 1; mid_dim.x = kernel_dim.x >> 1; median_size = kernel_dim.z*kernel_dim.y*kernel_dim.x; output_dim = ds_dim; output_dim.t = output_dim.g = 1; if ((output_data = amitk_raw_data_new_with_data(AMITK_FORMAT_FLOAT, output_dim)) == NULL) { g_warning(_("couldn't allocate memory space for the internal raw data")); return FALSE; } amitk_raw_data_FLOAT_initialize_data(output_data, 0.0); partial_sort_data = g_try_new(amide_data_t, median_size); g_return_val_if_fail(partial_sort_data != NULL, FALSE); if (update_func != NULL) { temp_string = g_strdup_printf(_("Filtering Data Set: %s"), AMITK_OBJECT_NAME(data_set)); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } total_planes = ds_dim.z*ds_dim.t*ds_dim.g; divider = ((total_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (total_planes/AMITK_UPDATE_DIVIDER); /* iterate over all the voxels in the data_set */ i.t = i.g = 0; for (j.t=0; (j.t < AMITK_DATA_SET_NUM_FRAMES(data_set)) && continue_work; j.t++) { for (j.g=0; (j.g < AMITK_DATA_SET_NUM_GATES(data_set)) && continue_work; j.g++) { for (i.z=0; (i.z < output_dim.z) && continue_work; i.z++) { if (update_func != NULL) { image_num = i.z+j.t*ds_dim.z+j.g*ds_dim.z*ds_dim.t; x = div(image_num,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) image_num)/((gdouble) total_planes)); } for (i.y=0; i.y < output_dim.y; i.y++) { for (i.x=0; i.x < output_dim.x; i.x++) { /* initialize the data for the iteration */ loc = 0; for (j.z = i.z-mid_dim.z; j.z <= i.z+mid_dim.z; j.z++) { if ((j.z < 0) || (j.z >= ds_dim.z)) { for (j.y=0; j.y < kernel_dim.y; j.y++) { for (j.x=0; j.x < kernel_dim.x; j.x++) { partial_sort_data[loc] = 0.0; loc++; } } } else { for (j.y = i.y-mid_dim.y; j.y <= i.y+mid_dim.y; j.y++) { if ((j.y < 0) || (j.y >= ds_dim.y)) { for (j.x=0; j.x < kernel_dim.x; j.x++) { partial_sort_data[loc] = 0.0; loc++; } } else { for (j.x = i.x-mid_dim.x; j.x <= i.x+mid_dim.x; j.x++) { if ((j.x < 0) || (j.x >= ds_dim.x)) { partial_sort_data[loc] = 0.0; loc++; } else { partial_sort_data[loc] = amitk_data_set_get_internal_value(data_set, j); loc++; } } } } } } /* end initializing data */ /* and store median value */ AMITK_RAW_DATA_FLOAT_SET_CONTENT(output_data, i) = amitk_filter_find_median_by_partial_sort(partial_sort_data, median_size); } /* i.x */ } /* i.y */ } /* i.z */ /* copy the output_data over into the filtered_ds */ for (i.z=0, j.z=0; i.z < output_dim.z; i.z++, j.z++) for (i.y=0, j.y=0; i.y < output_dim.y; i.y++, j.y++) for (i.x=0, j.x=0; i.x < output_dim.x; i.x++, j.x++) AMITK_RAW_DATA_FLOAT_SET_CONTENT(filtered_ds->raw_data, j) = AMITK_RAW_DATA_FLOAT_CONTENT(output_data, i); } /* j.g */ } /* j.t */ /* garbage collection */ g_object_unref(output_data); g_free(partial_sort_data); if (update_func != NULL) /* remove progress bar */ (*update_func)(update_data, NULL, (gdouble) 2.0); return continue_work; } /* see notes for filter_median_3D */ static gboolean filter_median_linear(const AmitkDataSet * data_set, AmitkDataSet * filtered_ds, const gint kernel_size, AmitkUpdateFunc update_func, gpointer update_data) { AmitkVoxel kernel_dim; kernel_dim.x = kernel_size; kernel_dim.y = 1; kernel_dim.z = 1; kernel_dim.g = 1; kernel_dim.t = 1; if (!filter_median_3D(data_set, filtered_ds, kernel_dim, update_func, update_data)) return FALSE; kernel_dim.x = 1; kernel_dim.y = kernel_size; kernel_dim.z = 1; kernel_dim.g = 1; kernel_dim.t = 1; if (!filter_median_3D(filtered_ds,filtered_ds,kernel_dim, update_func, update_data)) return FALSE; kernel_dim.x = 1; kernel_dim.y = 1; kernel_dim.z = kernel_size; kernel_dim.g = 1; kernel_dim.t = 1; if (!filter_median_3D(filtered_ds,filtered_ds,kernel_dim, update_func, update_data)) return FALSE; return TRUE; } /* returns a filtered version of the given data set */ AmitkDataSet *amitk_data_set_get_filtered(const AmitkDataSet * ds, const AmitkFilter filter_type, const gint kernel_size, const amide_real_t fwhm, AmitkUpdateFunc update_func, gpointer update_data) { AmitkDataSet * filtered=NULL; gchar * temp_string; AmitkVoxel kernel_dim; gboolean good=TRUE; g_return_val_if_fail(AMITK_IS_DATA_SET(ds), NULL); g_return_val_if_fail(ds->raw_data != NULL, NULL); filtered = AMITK_DATA_SET(amitk_object_copy(AMITK_OBJECT(ds))); /* start by unrefing the info that's only copied by reference by amitk_object_copy */ if (filtered->raw_data != NULL) { g_object_unref(filtered->raw_data); filtered->raw_data = NULL; } if (filtered->internal_scaling_factor != NULL) { g_object_unref(filtered->internal_scaling_factor); filtered->internal_scaling_factor = NULL; } if (filtered->internal_scaling_intercept != NULL) { g_object_unref(filtered->internal_scaling_intercept); filtered->internal_scaling_intercept = NULL; } if (filtered->distribution != NULL) { g_object_unref(filtered->distribution); filtered->distribution = NULL; } /* and unref anything that's obviously now incorrect */ if (filtered->current_scaling_factor != NULL) { g_object_unref(filtered->current_scaling_factor); filtered->current_scaling_factor = NULL; } if (filtered->frame_max != NULL) { g_free(filtered->frame_max); filtered->frame_max = NULL; } if (filtered->frame_min != NULL) { g_free(filtered->frame_min); filtered->frame_min = NULL; } /* set a new name for this guy */ temp_string = g_strdup_printf(_("%s, %s filtered"), AMITK_OBJECT_NAME(ds), amitk_filter_get_name(filter_type)); amitk_object_set_name(AMITK_OBJECT(filtered), temp_string); g_free(temp_string); /* start the new building process */ filtered->raw_data = amitk_raw_data_new_with_data(AMITK_FORMAT_FLOAT, AMITK_DATA_SET_DIM(ds)); if (filtered->raw_data == NULL) { g_warning(_("couldn't allocate memory space for the filtered raw data set structure")); goto error; } /* setup the scaling factor */ filtered->scaling_type = AMITK_SCALING_TYPE_0D; filtered->internal_scaling_factor = amitk_raw_data_DOUBLE_0D_SCALING_init(1.0); /* reset the current scaling array */ amitk_data_set_set_scale_factor(filtered, AMITK_DATA_SET_SCALE_FACTOR(ds)); switch(filter_type) { #ifdef AMIDE_LIBGSL_SUPPORT case AMITK_FILTER_GAUSSIAN: { AmitkRawData * kernel; AmitkVoxel kernel_size_3D; kernel_size_3D.t=kernel_size_3D.g=1; kernel_size_3D.z=kernel_size_3D.y=kernel_size_3D.x=kernel_size; kernel = amitk_filter_calculate_gaussian_kernel_complex(kernel_size_3D, AMITK_DATA_SET_VOXEL_SIZE(ds), fwhm); if (kernel == NULL) { g_warning(_("failed to calculate 3D gaussian kernel")); goto error; } good = filter_fir(ds, filtered, kernel, kernel_size_3D, update_func, update_data); g_object_unref(kernel); } break; #endif case AMITK_FILTER_MEDIAN_LINEAR: good = filter_median_linear(ds, filtered, kernel_size, update_func, update_data); break; case AMITK_FILTER_MEDIAN_3D: kernel_dim.t = kernel_dim.g = 1; kernel_dim.z = kernel_dim.y = kernel_dim.x = kernel_size; good = filter_median_3D(ds, filtered, kernel_dim, update_func, update_data); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); goto error; } if (!good) goto error; /* recalc the temporary parameters */ amitk_data_set_calc_min_max(filtered, update_func, update_data); return filtered; error: if (filtered != NULL) amitk_object_unref(filtered); return NULL; } gint amitk_data_sets_count(GList * objects, gboolean recurse) { gint count; if (objects == NULL) return 0; if (AMITK_IS_DATA_SET(objects->data)) count = 1; else count = 0; if (recurse) /* count data sets that are children */ count += amitk_data_sets_count(AMITK_OBJECT_CHILDREN(objects->data), recurse); /* add this count too the counts from the rest of the objects */ return count+amitk_data_sets_count(objects->next, recurse); } /* function to return the minimum frame duration from a list of objects */ amide_time_t amitk_data_sets_get_min_frame_duration(GList * objects) { amide_time_t min_duration, temp; if (objects == NULL) return -1.0; /* invalid */ /* first process the rest of the list */ min_duration = amitk_data_sets_get_min_frame_duration(objects->next); /* now process and compare to the children */ temp = amitk_data_sets_get_min_frame_duration(AMITK_OBJECT_CHILDREN(objects->data)); if (temp >= 0.0) { if (min_duration < 0.0) min_duration = temp; else if (temp < min_duration) min_duration = temp; } /* and process this guy */ if (AMITK_IS_DATA_SET(objects->data)) { temp = amitk_data_set_get_min_frame_duration(objects->data); if (min_duration < 0.0) min_duration = temp; else if (temp < min_duration) min_duration = temp; } return min_duration; } /* returns the minimum voxel dimensions of the list of data sets */ amide_real_t amitk_data_sets_get_min_voxel_size(GList * objects) { amide_real_t min_voxel_size, temp; if (objects == NULL) return -1.0; /* invalid */ /* first process the rest of the list */ min_voxel_size = amitk_data_sets_get_min_voxel_size(objects->next); /* now process and compare to the children */ temp = amitk_data_sets_get_min_voxel_size(AMITK_OBJECT_CHILDREN(objects->data)); if (temp >= 0.0) { if (min_voxel_size < 0.0) min_voxel_size = temp; else if (temp < min_voxel_size) min_voxel_size = temp; } /* and process this guy */ if (AMITK_IS_DATA_SET(objects->data)) { temp = point_min_dim(AMITK_DATA_SET_VOXEL_SIZE(objects->data)); if (min_voxel_size < 0.0) min_voxel_size = temp; else if (temp < min_voxel_size) min_voxel_size = temp; } return min_voxel_size; } /* returns the minimum dimensional width of the data set with the largest voxel size */ /* figure out what our voxel size is going to be for our returned slices. I'm going to base this on the volume with the largest minimum voxel dimension, this way the user doesn't suddenly get a huge image when adding in a study with small voxels (i.e. a CT scan). The user can always increase the zoom later*/ amide_real_t amitk_data_sets_get_max_min_voxel_size(GList * objects) { amide_real_t min_voxel_size, temp; if (objects == NULL) return -1.0; /* invalid */ /* first process the rest of the list */ min_voxel_size = amitk_data_sets_get_max_min_voxel_size(objects->next); /* now process and compare to the children */ temp = amitk_data_sets_get_max_min_voxel_size(AMITK_OBJECT_CHILDREN(objects->data)); if (temp >= 0.0) { if (min_voxel_size < 0.0) min_voxel_size = temp; else if (temp > min_voxel_size) min_voxel_size = temp; } /* and process this guy */ if (AMITK_IS_DATA_SET(objects->data)) { temp = point_min_dim(AMITK_DATA_SET_VOXEL_SIZE(objects->data)); if (min_voxel_size < 0.0) min_voxel_size = temp; else if (temp > min_voxel_size) min_voxel_size = temp; } return min_voxel_size; } /* returns an unreferenced pointer to a slice in the list with the given parent */ AmitkDataSet * amitk_data_sets_find_with_slice_parent(GList * slices, const AmitkDataSet * slice_parent) { AmitkDataSet * slice=NULL; if (slice_parent == NULL) return NULL; if (slices == NULL) return NULL; if (AMITK_IS_DATA_SET(slices->data)) if (AMITK_DATA_SET(slices->data)->slice_parent == slice_parent) slice = AMITK_DATA_SET(slices->data); /* check children */ if (slice == NULL) slice = amitk_data_sets_find_with_slice_parent(AMITK_OBJECT_CHILDREN(slices->data), slice_parent); /* process the rest of the list */ if (slice == NULL) slice = amitk_data_sets_find_with_slice_parent(slices->next, slice_parent); return slice; } /* removes from slices the slice with the given slice_parent */ GList * amitk_data_sets_remove_with_slice_parent(GList * slices,const AmitkDataSet * slice_parent) { AmitkDataSet * slice; if (slice_parent == NULL) return NULL; if (slices == NULL) return NULL; slice = amitk_data_sets_find_with_slice_parent(slices, slice_parent); while (slice != NULL) { slices = g_list_remove(slices, slice); amitk_object_unref(slice); /* may be multiple slices with this parent */ slice = amitk_data_sets_find_with_slice_parent(slices, slice_parent); } return slices; } /* trim cache slice size down to max_size, removes from end */ GList * slice_cache_trim(GList * slice_cache, gint max_size) { GList * last; while (g_list_length(slice_cache) > max_size) { last = g_list_last(slice_cache); slice_cache = g_list_remove_link(slice_cache, last); amitk_objects_unref(last); } return slice_cache; } /* several things cause slice caches to get invalidated, so they don't need to be explicitly checked here 1. Scale factor changes 2. The parent data set's space changing 3. The parent data set's voxel size changing 4. Any change to the raw data */ static AmitkDataSet * slice_cache_find (GList * slice_cache, AmitkDataSet * parent_ds, const amide_time_t start, const amide_time_t duration, const amide_intpoint_t gate, const AmitkCanvasPoint pixel_size, const AmitkVolume * view_volume) { AmitkDataSet * slice; AmitkVoxel dim; amide_intpoint_t start_gate, end_gate; if (slice_cache == NULL) { return NULL; } else { slice = slice_cache->data; if (AMITK_DATA_SET_SLICE_PARENT(slice) == parent_ds) if (amitk_space_equal(AMITK_SPACE(slice), AMITK_SPACE(view_volume))) if (REAL_EQUAL(slice->scan_start, start)) if (REAL_EQUAL(amitk_data_set_get_frame_duration(slice,0), duration)) { if (gate < 0) { start_gate = AMITK_DATA_SET_VIEW_START_GATE(AMITK_DATA_SET_SLICE_PARENT(slice)); end_gate = AMITK_DATA_SET_VIEW_END_GATE(AMITK_DATA_SET_SLICE_PARENT(slice)); } else { start_gate = gate; end_gate = gate; } if (AMITK_DATA_SET_VIEW_START_GATE(slice) == start_gate) if (AMITK_DATA_SET_VIEW_END_GATE(slice) == end_gate) if (REAL_EQUAL(slice->voxel_size.z,AMITK_VOLUME_Z_CORNER(view_volume))) { dim.x = ceil(fabs(AMITK_VOLUME_X_CORNER(view_volume))/pixel_size.x); dim.y = ceil(fabs(AMITK_VOLUME_Y_CORNER(view_volume))/pixel_size.y); dim.z = dim.t = dim.g = 1; if (VOXEL_EQUAL(dim, AMITK_DATA_SET_DIM(slice))) if (AMITK_DATA_SET_INTERPOLATION(slice) == AMITK_DATA_SET_INTERPOLATION(parent_ds)) if (AMITK_DATA_SET_RENDERING(slice) == AMITK_DATA_SET_RENDERING(parent_ds)) return slice; } } } /* this one's not it, keep looking */ return slice_cache_find(slice_cache->next, parent_ds, start, duration, gate, pixel_size, view_volume); } /* give a list of data_sets, returns a list of slices of equal size and orientation intersecting these data_sets. The slice_cache is a list of already generated slices, if an appropriate slice is found in there, it'll be used */ /* notes - in real practice, the parent data set's local cache is rarely used, as most slices, if there in the local cache, will also be in the passed in cache - the "gate" parameter should ordinarily by -1 (ignored). Only use it to override the the data set's view_start_gate/view_end_gate parameters */ GList * amitk_data_sets_get_slices(GList * objects, GList ** pslice_cache, const gint max_slice_cache_size, const amide_time_t start, const amide_time_t duration, const amide_intpoint_t gate, const AmitkCanvasPoint pixel_size, const AmitkVolume * view_volume) { GList * slices=NULL; AmitkDataSet * local_slice; AmitkDataSet * canvas_slice=NULL; AmitkDataSet * slice; AmitkDataSet * parent_ds; gint num_data_sets=0; #ifdef SLICE_TIMING struct timeval tv1; struct timeval tv2; gdouble time1; gdouble time2; /* let's do some timing */ gettimeofday(&tv1, NULL); #endif g_return_val_if_fail(objects != NULL, NULL); /* and get the slices */ while (objects != NULL) { if (AMITK_IS_DATA_SET(objects->data)) { num_data_sets++; parent_ds = AMITK_DATA_SET(objects->data); /* try to find it in the caches first */ if (pslice_cache != NULL) canvas_slice = slice_cache_find(*pslice_cache, parent_ds, start, duration, gate, pixel_size, view_volume); local_slice = slice_cache_find(parent_ds->slice_cache, parent_ds, start, duration, gate, pixel_size, view_volume); if (canvas_slice != NULL) { slice = amitk_object_ref(canvas_slice); } else if (local_slice != NULL) { slice = amitk_object_ref(local_slice); } else {/* generate a new one */ slice = amitk_data_set_get_slice(parent_ds, start, duration, gate, pixel_size, view_volume); } g_return_val_if_fail(slice != NULL, slices); slices = g_list_prepend(slices, slice); if ((canvas_slice == NULL) && (pslice_cache != NULL)) *pslice_cache = g_list_prepend(*pslice_cache, amitk_object_ref(slice)); /* most recently used first */ if (local_slice == NULL) { parent_ds->slice_cache = g_list_prepend(parent_ds->slice_cache, amitk_object_ref(slice)); /* regulate the size of the local per dataset cache */ parent_ds->slice_cache = slice_cache_trim(parent_ds->slice_cache, 3 * MAX(AMITK_DATA_SET_NUM_FRAMES(parent_ds), AMITK_DATA_SET_NUM_GATES(parent_ds))); } } objects = objects->next; } /* regulate the size of the global cache */ if (pslice_cache != NULL) *pslice_cache = slice_cache_trim(*pslice_cache, max_slice_cache_size); #ifdef SLICE_TIMING /* and wrapup our timing */ gettimeofday(&tv2, NULL); time1 = ((double) tv1.tv_sec) + ((double) tv1.tv_usec)/1000000.0; time2 = ((double) tv2.tv_sec) + ((double) tv2.tv_usec)/1000000.0; g_print("######## Slice Generating Took %5.3f (s) #########\n",time2-time1); #endif return slices; } /* function to perform the given operation on a single data set parameter0 and parameter1 are used by some operations, for instance for the threshold operation, values below parameter0 are set to 0, values above parameter1 1, and parameters between are interpolated */ AmitkDataSet * amitk_data_sets_math_unary(AmitkDataSet * ds1, AmitkOperationUnary operation, amide_data_t parameter0, amide_data_t parameter1, AmitkUpdateFunc update_func, gpointer update_data) { AmitkVoxel i_dim; AmitkDataSet * output_ds; AmitkVoxel i_voxel; amide_data_t value; gchar * temp_string; AmitkViewMode i_view_mode; div_t x; gint divider, total_planes,image_num; gboolean continue_work=TRUE; AmitkFormat format; g_return_val_if_fail(AMITK_IS_DATA_SET(ds1), NULL); i_dim = AMITK_DATA_SET_DIM (ds1); switch(operation) { case AMITK_OPERATION_UNARY_RESCALE: if (parameter0 >= parameter1) format = AMITK_FORMAT_UBYTE; /* results will be 0 or 1 */ else format = AMITK_FORMAT_FLOAT; /* results will be between 0 and 1 */ break; case AMITK_OPERATION_UNARY_REMOVE_NEGATIVES: format = AMITK_FORMAT_FLOAT; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); goto error; } output_ds = amitk_data_set_new_with_data(NULL, AMITK_DATA_SET_MODALITY(ds1), format, i_dim, AMITK_SCALING_TYPE_0D); if (output_ds == NULL) { g_warning(_("couldn't allocate %d MB for the output_ds data set structure"), amitk_raw_format_calc_num_bytes(i_dim, format)/(1024*1024)); goto error; } /* Start setting up the new dataset */ amitk_space_copy_in_place( AMITK_SPACE(output_ds), AMITK_SPACE(ds1)); amitk_data_set_set_scale_factor(output_ds, 1.0); amitk_data_set_set_voxel_size(output_ds, AMITK_DATA_SET_VOXEL_SIZE(ds1)); amitk_data_set_calc_far_corner(output_ds); amitk_data_set_set_scan_start(output_ds, amitk_data_set_get_start_time(ds1, i_voxel.t)); for (i_view_mode=0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) amitk_data_set_set_color_table(output_ds, i_view_mode, AMITK_DATA_SET_COLOR_TABLE(ds1, i_view_mode)); for (i_view_mode=AMITK_VIEW_MODE_LINKED_2WAY; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) amitk_data_set_set_color_table_independent(output_ds, i_view_mode, AMITK_DATA_SET_COLOR_TABLE_INDEPENDENT(ds1, i_view_mode)); /* set a new name for this guy */ switch(operation) { case AMITK_OPERATION_UNARY_RESCALE: if (parameter0 >= parameter1) temp_string = g_strdup_printf(_("Result: %s rescaled at %3.2g"), AMITK_OBJECT_NAME(ds1), parameter0); else temp_string = g_strdup_printf(_("Result: %s rescaled below %3.2g and above %3.2g"), AMITK_OBJECT_NAME(ds1), parameter0, parameter1); break; case AMITK_OPERATION_UNARY_REMOVE_NEGATIVES: temp_string = g_strdup_printf(_("Result: %s negative values removed"), AMITK_OBJECT_NAME(ds1)); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); goto error; } amitk_object_set_name(AMITK_OBJECT(output_ds), temp_string); g_free(temp_string); if (update_func != NULL) { temp_string = g_strdup_printf(_("Performing math operation")); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } total_planes = i_dim.z*i_dim.t*i_dim.g; divider = ((total_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (total_planes/AMITK_UPDATE_DIVIDER); /* fill in output_ds by performing the operation on the data set */ for (i_voxel.g = 0; (i_voxel.g < i_dim.g) && continue_work; i_voxel.g++) { amitk_data_set_set_gate_time(output_ds, i_voxel.g, amitk_data_set_get_gate_time(ds1, i_voxel.g)); for (i_voxel.t = 0; (i_voxel.t < i_dim.t) && continue_work; i_voxel.t++) { amitk_data_set_set_frame_duration(output_ds, i_voxel.t, amitk_data_set_get_frame_duration(ds1, i_voxel.t)); for (i_voxel.z = 0; (i_voxel.z < i_dim.z) && continue_work; i_voxel.z++) { if (update_func != NULL) { image_num = i_voxel.z+i_voxel.t*i_dim.z+i_voxel.g*i_dim.z*i_dim.t; x = div(image_num,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) image_num)/((gdouble) total_planes)); } for (i_voxel.y = 0; i_voxel.y < i_dim.y; i_voxel.y++) { for (i_voxel.x = 0; i_voxel.x < i_dim.x; i_voxel.x++) { value = amitk_data_set_get_value(ds1, i_voxel); switch(operation) { case AMITK_OPERATION_UNARY_RESCALE: if (parameter0 > parameter1) { AMITK_RAW_DATA_UBYTE_SET_CONTENT(output_ds->raw_data, i_voxel) = (value >= parameter0); } else { if (value <= parameter0) AMITK_RAW_DATA_FLOAT_SET_CONTENT(output_ds->raw_data, i_voxel) = 0.0; else if (value >= parameter1) AMITK_RAW_DATA_FLOAT_SET_CONTENT(output_ds->raw_data, i_voxel) = 1.0; else AMITK_RAW_DATA_FLOAT_SET_CONTENT(output_ds->raw_data, i_voxel) = (value - parameter0)/(parameter1-parameter0); } case AMITK_OPERATION_UNARY_REMOVE_NEGATIVES: AMITK_RAW_DATA_FLOAT_SET_CONTENT(output_ds->raw_data, i_voxel) = (value < 0.0) ? 0.0 : value; break; default: goto error; } } } } } } if (!continue_work) goto error; /* recalc the temporary parameters */ amitk_data_set_calc_min_max(output_ds, NULL, NULL); /* set some sensible thresholds */ output_ds->threshold_max[0] = output_ds->threshold_max[1] = amitk_data_set_get_global_max(output_ds); output_ds->threshold_min[0] = output_ds->threshold_min[1] = amitk_data_set_get_global_min(output_ds); output_ds->threshold_ref_frame[1] = AMITK_DATA_SET_NUM_FRAMES(output_ds)-1; goto exit; error: if (output_ds != NULL) { amitk_object_unref(output_ds); output_ds = NULL; } exit: if (update_func != NULL) /* remove progress bar */ (*update_func)(update_data, NULL, (gdouble) 2.0); return output_ds; } /* function to perform the given operation between two data sets DIVISION: parameter0 used a threshold for the divisor, below which output is set zero. T2STAR: parameter0 is the echo time of ds1 parameter1 is the echo time of ds2 */ AmitkDataSet * amitk_data_sets_math_binary(AmitkDataSet * ds1, AmitkDataSet * ds2, AmitkOperationBinary operation, amide_data_t parameter0, amide_data_t parameter1, gboolean by_frames, gboolean maintain_ds1_dim, AmitkUpdateFunc update_func, gpointer update_data) { GList * data_sets=NULL; AmitkCorners corner; AmitkVolume * volume=NULL; AmitkPoint voxel_size; AmitkCanvasPoint pixel_size; AmitkVoxel i_dim,j_dim; amide_time_t frame_start, frame_duration; AmitkDataSet * output_ds=NULL; AmitkVoxel i_voxel, j_voxel, k_voxel; AmitkPoint new_offset; AmitkDataSet * slice1=NULL; AmitkDataSet * slice2=NULL; amitk_format_FLOAT_t value0; amitk_format_FLOAT_t value1; gchar * temp_string; AmitkViewMode i_view_mode; div_t x; gint divider, total_planes,image_num; gboolean continue_work=TRUE; amide_data_t delta_echo=1.0; g_return_val_if_fail(AMITK_IS_DATA_SET(ds1), NULL); g_return_val_if_fail(AMITK_IS_DATA_SET(ds2), NULL); /* more error checking */ switch(operation) { case AMITK_OPERATION_BINARY_T2STAR: if ((parameter0 <= 0) || (parameter1 <= 0)) { g_warning("echo times need to be positive"); goto error; } if (parameter0 == parameter1) { g_warning("echo times cannot be equal"); goto error; } /* switch data set order so that ds1 has shorter echo time */ if (parameter0 > parameter1) { AmitkDataSet * temp_ds; amide_data_t temp_parameter; temp_ds = ds2; ds2 = ds1; ds1 = temp_ds; temp_parameter = parameter1; parameter1 = parameter0; parameter0 = temp_parameter; } delta_echo = parameter1 - parameter0; break; default: break; } /* Make a list out of datasets 1 and 2 */ data_sets = g_list_append(NULL, ds1); data_sets = g_list_append(data_sets, ds2); /* Set up the voxel dimensions for the output data set */ if (maintain_ds1_dim) { volume = AMITK_VOLUME(amitk_object_copy(AMITK_OBJECT(ds1))); voxel_size = AMITK_DATA_SET_VOXEL_SIZE(ds1); pixel_size.x = voxel_size.x; pixel_size.y = voxel_size.y; } else { /* create a volume that's a superset of the volumes of the two data sets */ volume = amitk_volume_new(); amitk_volumes_get_enclosing_corners(data_sets, AMITK_SPACE(volume), corner); amitk_space_set_offset(AMITK_SPACE(volume), corner[0]); amitk_volume_set_corner(volume, amitk_space_b2s(AMITK_SPACE(volume), corner[1])); voxel_size.x = voxel_size.y = voxel_size.z = amitk_data_sets_get_min_voxel_size(data_sets); pixel_size.x = pixel_size.y = voxel_size.x; } i_dim.x = j_dim.x = ceil(fabs(AMITK_VOLUME_X_CORNER(volume) ) / voxel_size.x ); i_dim.y = j_dim.y = ceil(fabs(AMITK_VOLUME_Y_CORNER(volume) ) / voxel_size.y ); i_dim.z = j_dim.z = ceil(fabs(AMITK_VOLUME_Z_CORNER(volume) ) / voxel_size.z ); i_dim.t = j_dim.t = AMITK_DATA_SET_DIM_T(ds1); if (AMITK_DATA_SET_DIM_T(ds1) != AMITK_DATA_SET_DIM_T(ds2)) { if (by_frames) { g_warning(_("Can't handle 'by frame' operations with data sets with unequal frame numbers, will use all frames of \"%s\" and the first gate of \"%s\"."), AMITK_OBJECT_NAME(ds1), AMITK_OBJECT_NAME(ds2)); j_dim.t = 1; } else { g_warning(_("Output data set will have the same number of frames as %s"), AMITK_OBJECT_NAME(ds1)); } } /* figure out what muti-gate studies we can handle */ i_dim.g = j_dim.g = AMITK_DATA_SET_DIM_G(ds1); if (AMITK_DATA_SET_DIM_G(ds1) != AMITK_DATA_SET_DIM_G(ds2)) { g_warning(_("Can't handle studies with different numbers of gates, will use all gates of \"%s\" and the first gate of \"%s\"."), AMITK_OBJECT_NAME(ds1), AMITK_OBJECT_NAME(ds2)); j_dim.g = 1; } output_ds = amitk_data_set_new_with_data(NULL, AMITK_DATA_SET_MODALITY(ds1), AMITK_FORMAT_FLOAT, i_dim, AMITK_SCALING_TYPE_0D); if (output_ds == NULL) { g_warning(_("couldn't allocate %d MB for the output_ds data set structure"), amitk_raw_format_calc_num_bytes(i_dim, AMITK_FORMAT_FLOAT)/(1024*1024)); goto error; } /* Start setting up the new dataset */ amitk_space_copy_in_place( AMITK_SPACE(output_ds), AMITK_SPACE(volume)); amitk_data_set_set_scale_factor(output_ds, 1.0); amitk_data_set_set_voxel_size(output_ds, voxel_size); amitk_raw_data_FLOAT_initialize_data(AMITK_DATA_SET_RAW_DATA(output_ds),NAN); for (i_view_mode=0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) amitk_data_set_set_color_table(output_ds, i_view_mode, AMITK_DATA_SET_COLOR_TABLE(ds1, i_view_mode)); for (i_view_mode=AMITK_VIEW_MODE_LINKED_2WAY; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) amitk_data_set_set_color_table_independent(output_ds, i_view_mode, AMITK_DATA_SET_COLOR_TABLE_INDEPENDENT(ds1, i_view_mode)); /* set a new name for this guy */ switch(operation) { case AMITK_OPERATION_BINARY_T2STAR: temp_string = g_strdup_printf(_("R2* (1/s) based on: %s %s"), AMITK_OBJECT_NAME(ds1), AMITK_OBJECT_NAME(ds2)); break; default: temp_string = g_strdup_printf(_("Result: %s %s %s"), AMITK_OBJECT_NAME(ds1), amitk_operation_binary_get_name(operation), AMITK_OBJECT_NAME(ds2)); break; } amitk_object_set_name(AMITK_OBJECT(output_ds), temp_string); g_free(temp_string); if (update_func != NULL) { temp_string = g_strdup_printf(_("Performing math operation")); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } total_planes = i_dim.z*i_dim.t*i_dim.g; divider = ((total_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (total_planes/AMITK_UPDATE_DIVIDER); /* fill in output_ds by performing the operation on the data sets */ corner[0] = AMITK_VOLUME_CORNER(volume); corner[0].z = voxel_size.z; amitk_volume_set_corner(volume, corner[0]); /* set the z dim of the slices */ k_voxel = zero_voxel; new_offset = zero_point; for (i_voxel.t = 0; (i_voxel.t < i_dim.t) && continue_work; i_voxel.t++) { j_voxel.t = (i_voxel.t >= j_dim.t) ? 0 : i_voxel.t; /* only used if by_frames is true */ frame_start = amitk_data_set_get_start_time(ds1, i_voxel.t); frame_duration = amitk_data_set_get_frame_duration(ds1, i_voxel.t); if (i_voxel.t == 0) amitk_data_set_set_scan_start(output_ds, frame_start); amitk_data_set_set_frame_duration(output_ds, i_voxel.t, frame_duration); for (i_voxel.g = 0; (i_voxel.g < i_dim.g) && continue_work; i_voxel.g++) { j_voxel.g = (i_voxel.g >= j_dim.g) ? 0 : i_voxel.g; amitk_data_set_set_gate_time(output_ds, i_voxel.g, amitk_data_set_get_gate_time(ds1, i_voxel.g)); for (i_voxel.z = 0; (i_voxel.z < i_dim.z) && continue_work; i_voxel.z++) { j_voxel.z = i_voxel.z; new_offset.z = i_voxel.z * voxel_size.z; if (update_func != NULL) { image_num = i_voxel.z+i_voxel.t*i_dim.z+i_voxel.g*i_dim.z*i_dim.t; x = div(image_num,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) image_num)/((gdouble) total_planes)); } /* advance the requested slice volume */ amitk_space_set_offset( AMITK_SPACE(volume), amitk_space_s2b(AMITK_SPACE(output_ds), new_offset)); slice1 = amitk_data_set_get_slice(ds1, frame_start, frame_duration, i_voxel.g, pixel_size, volume); slice2 = amitk_data_set_get_slice(ds2, by_frames ? amitk_data_set_get_start_time(ds2, j_voxel.t) : frame_start, by_frames ? amitk_data_set_get_frame_duration(ds2, j_voxel.t) : frame_duration, j_voxel.g, pixel_size, volume); if ((slice1 == NULL) || (slice2 == NULL)) { g_warning(_("couldn't generate slices from the data set...")); goto error; } for (i_voxel.y = 0, k_voxel.y = 0; i_voxel.y < i_dim.y; i_voxel.y++, k_voxel.y++) { for (i_voxel.x = 0, k_voxel.x = 0; i_voxel.x < i_dim.x; i_voxel.x++, k_voxel.x++) { switch(operation) { case AMITK_OPERATION_BINARY_ADD: value0 = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(AMITK_DATA_SET(slice1), k_voxel ) + AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT( AMITK_DATA_SET(slice2), k_voxel); break; case AMITK_OPERATION_BINARY_SUB: value0 = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(AMITK_DATA_SET(slice1), k_voxel ) - AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT( AMITK_DATA_SET(slice2), k_voxel); break; case AMITK_OPERATION_BINARY_MULTIPLY: value0 = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(AMITK_DATA_SET(slice1), k_voxel ) * AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT( AMITK_DATA_SET(slice2), k_voxel); break; case AMITK_OPERATION_BINARY_DIVISION: value0 = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT( AMITK_DATA_SET(slice2), k_voxel); if (value0 > parameter0) value0 = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(AMITK_DATA_SET(slice1), k_voxel ) / value0; else value0 = 0.0; break; case AMITK_OPERATION_BINARY_T2STAR: /* we actually compute the relaxation rate, that way we don't run into issues with infinity */ value0 = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(AMITK_DATA_SET(slice1), k_voxel); value1 = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(AMITK_DATA_SET(slice2), k_voxel); if ((value0 <= 0) || (value1 <= 0)) value0 = 0; /* don't have signal, can't assess */ if (value0 <= value1) /* no decay between two time points */ value0 = 0; /* no relaxation */ else /* compute in units of 1/s */ value0 = 1000.0 * (log(value0)-log(value1)) / (delta_echo); break; default: goto error; } AMITK_RAW_DATA_FLOAT_SET_CONTENT(output_ds->raw_data, i_voxel) = value0; } } amitk_object_unref(slice1); slice1 = NULL; amitk_object_unref(slice2); slice2 = NULL; } } } if (!continue_work) goto error; /* recalc the temporary parameters */ amitk_data_set_calc_min_max(output_ds, NULL, NULL); /* set some sensible thresholds */ output_ds->threshold_max[0] = output_ds->threshold_max[1] = amitk_data_set_get_global_max(output_ds); output_ds->threshold_min[0] = output_ds->threshold_min[1] = amitk_data_set_get_global_min(output_ds); output_ds->threshold_ref_frame[1] = AMITK_DATA_SET_NUM_FRAMES(output_ds)-1; goto exit; error: if (output_ds != NULL) { amitk_object_unref(output_ds); output_ds = NULL; } exit: amitk_object_unref(volume); g_list_free(data_sets); if (slice1 != NULL) amitk_object_unref(slice1); if (slice2 != NULL) amitk_object_unref(slice2); if (update_func != NULL) /* remove progress bar */ (*update_func)(update_data, NULL, (gdouble) 2.0); return output_ds; } const gchar * amitk_scaling_type_get_name(const AmitkScalingType scaling_type) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_SCALING_TYPE); enum_value = g_enum_get_value(enum_class, scaling_type); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_interpolation_get_name(const AmitkInterpolation interpolation) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_INTERPOLATION); enum_value = g_enum_get_value(enum_class, interpolation); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_rendering_get_name(const AmitkRendering rendering) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_RENDERING); enum_value = g_enum_get_value(enum_class, rendering); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_operation_unary_get_name(const AmitkOperationUnary operation) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_OPERATION_UNARY); enum_value = g_enum_get_value(enum_class, operation); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_operation_binary_get_name(const AmitkOperationBinary operation) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_OPERATION_BINARY); enum_value = g_enum_get_value(enum_class, operation); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_subject_orientation_get_name(const AmitkSubjectOrientation subject_orientation) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_SUBJECT_ORIENTATION); enum_value = g_enum_get_value(enum_class, subject_orientation); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_subject_sex_get_name(const AmitkSubjectSex subject_sex) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_SUBJECT_SEX); enum_value = g_enum_get_value(enum_class, subject_sex); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_thresholding_get_name(const AmitkThresholding thresholding) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_THRESHOLDING); enum_value = g_enum_get_value(enum_class, thresholding); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_threshold_style_get_name(const AmitkThresholdStyle threshold_style) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_THRESHOLD_STYLE); enum_value = g_enum_get_value(enum_class, threshold_style); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_conversion_get_name(const AmitkConversion conversion) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_CONVERSION); enum_value = g_enum_get_value(enum_class, conversion); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_weight_unit_get_name(const AmitkWeightUnit weight_unit) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_WEIGHT_UNIT); enum_value = g_enum_get_value(enum_class, weight_unit); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_dose_unit_get_name(const AmitkDoseUnit dose_unit) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_DOSE_UNIT); enum_value = g_enum_get_value(enum_class, dose_unit); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_cylinder_unit_get_name(const AmitkCylinderUnit cylinder_unit) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_CYLINDER_UNIT); enum_value = g_enum_get_value(enum_class, cylinder_unit); g_type_class_unref(enum_class); return enum_value->value_nick; } amide_data_t amitk_weight_unit_convert_to (const amide_data_t kg, const AmitkWeightUnit weight_unit) { switch(weight_unit) { case AMITK_WEIGHT_UNIT_KILOGRAM: return kg; break; case AMITK_WEIGHT_UNIT_GRAM: return kg*1000.0; break; case AMITK_WEIGHT_UNIT_POUND: return kg*2.2046226; break; case AMITK_WEIGHT_UNIT_OUNCE: return kg*35.273962; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } return 0.0; } amide_data_t amitk_weight_unit_convert_from (const amide_data_t weight, const AmitkWeightUnit weight_unit) { switch(weight_unit) { case AMITK_WEIGHT_UNIT_KILOGRAM: return weight; break; case AMITK_WEIGHT_UNIT_GRAM: return weight/1000.0; break; case AMITK_WEIGHT_UNIT_POUND: return weight/2.2046226; break; case AMITK_WEIGHT_UNIT_OUNCE: return weight/35.273962; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } return 0.0; } amide_data_t amitk_dose_unit_convert_to (const amide_data_t MBq, const AmitkDoseUnit dose_unit) { switch(dose_unit) { case AMITK_DOSE_UNIT_MEGABECQUEREL: return MBq; break; case AMITK_DOSE_UNIT_MILLICURIE: return MBq/37.0; break; case AMITK_DOSE_UNIT_MICROCURIE: return MBq/0.037; break; case AMITK_DOSE_UNIT_NANOCURIE: return MBq/0.000037; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } return 0.0; } amide_data_t amitk_dose_unit_convert_from (const amide_data_t dose, const AmitkDoseUnit dose_unit) { switch(dose_unit) { case AMITK_DOSE_UNIT_MEGABECQUEREL: return dose; break; case AMITK_DOSE_UNIT_MILLICURIE: return dose*37.0; break; case AMITK_DOSE_UNIT_MICROCURIE: return dose*0.037; break; case AMITK_DOSE_UNIT_NANOCURIE: return dose*0.000037; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } return 0.0; } amide_data_t amitk_cylinder_unit_convert_to (const amide_data_t MBq_cc_image_units, const AmitkCylinderUnit cylinder_unit) { switch(cylinder_unit) { case AMITK_CYLINDER_UNIT_MEGABECQUEREL_PER_CC_IMAGE_UNIT: return MBq_cc_image_units; break; case AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_MEGABECQUEREL: return 1.0/MBq_cc_image_units; case AMITK_CYLINDER_UNIT_MILLICURIE_PER_CC_IMAGE_UNIT: return amitk_dose_unit_convert_to(MBq_cc_image_units, AMITK_DOSE_UNIT_MILLICURIE); break; case AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_MILLICURIE: return 1.0/amitk_dose_unit_convert_to(MBq_cc_image_units, AMITK_DOSE_UNIT_MILLICURIE); break; case AMITK_CYLINDER_UNIT_MICROCURIE_PER_CC_IMAGE_UNIT: return amitk_dose_unit_convert_to(MBq_cc_image_units, AMITK_DOSE_UNIT_MICROCURIE); break; case AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_MICROCURIE: return 1.0/amitk_dose_unit_convert_to(MBq_cc_image_units, AMITK_DOSE_UNIT_MICROCURIE); break; case AMITK_CYLINDER_UNIT_NANOCURIE_PER_CC_IMAGE_UNIT: return amitk_dose_unit_convert_to(MBq_cc_image_units, AMITK_DOSE_UNIT_NANOCURIE); break; case AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_NANOCURIE: return 1.0/amitk_dose_unit_convert_to(MBq_cc_image_units, AMITK_DOSE_UNIT_NANOCURIE); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } return 0.0; } amide_data_t amitk_cylinder_unit_convert_from (const amide_data_t cylinder_factor, const AmitkCylinderUnit cylinder_unit) { switch(cylinder_unit) { case AMITK_CYLINDER_UNIT_MEGABECQUEREL_PER_CC_IMAGE_UNIT: return cylinder_factor; break; case AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_MEGABECQUEREL: return 1.0/cylinder_factor; break; case AMITK_CYLINDER_UNIT_MILLICURIE_PER_CC_IMAGE_UNIT: return amitk_dose_unit_convert_from(cylinder_factor, AMITK_DOSE_UNIT_MILLICURIE); break; case AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_MILLICURIE: return amitk_dose_unit_convert_from(1.0/cylinder_factor, AMITK_DOSE_UNIT_MILLICURIE); break; case AMITK_CYLINDER_UNIT_MICROCURIE_PER_CC_IMAGE_UNIT: return amitk_dose_unit_convert_from(cylinder_factor, AMITK_DOSE_UNIT_MICROCURIE); break; case AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_MICROCURIE: return amitk_dose_unit_convert_from(1.0/cylinder_factor, AMITK_DOSE_UNIT_MICROCURIE); break; case AMITK_CYLINDER_UNIT_NANOCURIE_PER_CC_IMAGE_UNIT: return amitk_dose_unit_convert_from(cylinder_factor, AMITK_DOSE_UNIT_NANOCURIE); break; case AMITK_CYLINDER_UNIT_IMAGE_UNIT_CC_PER_NANOCURIE: return amitk_dose_unit_convert_from(1.0/cylinder_factor, AMITK_DOSE_UNIT_NANOCURIE); break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); break; } return 0.0; } amide-1.0.5/src/tb_fads.c0000664000175000017500000012451512270274015015013 0ustar loeningloening/* tb_fads.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amide.h" #include "amitk_progress_dialog.h" #include "fads.h" #include "tb_fads.h" #include "ui_common.h" #ifdef AMIDE_LIBGSL_SUPPORT #define LABEL_WIDTH 400 #define SPIN_BUTTON_X_SIZE 100 #define MAX_ITERATIONS 1e8 static const char * wizard_name = N_("Factor Analysis Wizard"); static const char *svd_page_text = N_("This page allows the computation of the singular value decomposition " "for the data set in question. These values can give you an idea of " "how many important factors the data set has." "\n\n" "This process can be extremely slow, so skip this page if you already " "know the answer."); static const char * finish_page_text = N_("When the apply button is hit, the appropriate factor analysis data " "structures will be created, and placed underneath the given data set " "in the study tree\n"); static gchar * start_page_text = N_("Welcome to the factor analysis of dynamic structures wizard. " "\n\n" "None of this code has been validated, and it's probably wrong, " "so use at your own risk"); static gchar * not_enough_frames_text = N_("Welcome to the factor analysis of dynamic structures wizard. " "\n\n" "This wizard only works with dynamic studies"); static gchar * curve_explanation_text = N_("You can select a text file to set the initial starting point for the fitted curves." "\n\n" "The file should have one line per time point, with one column for each parameter"); static gchar * no_curve_explanation_text = N_("Selected factor analysis method does not utilize initial curves"); typedef enum { INTRO_PAGE, SVD_PAGE, FACTOR_CHOICE_PAGE, PARAMETERS_PAGE, CURVES_PAGE, CONCLUSION_PAGE, NUM_PAGES } which_page_t; /* data structures */ typedef struct tb_fads_t { GtkWidget * dialog; AmitkDataSet * data_set; AmitkPreferences * preferences; gint num_factors; gint max_iterations; gdouble stopping_criteria; gboolean sum_factors_equal_one; gdouble beta; gdouble k12; gdouble k21; gdouble k23; gdouble k32; fads_type_t fads_type; fads_minimizer_algorithm_t algorithm; GArray * initial_curves; GtkWidget * page[NUM_PAGES]; GtkWidget * progress_dialog; GtkWidget * algorithm_menu; GtkWidget * num_factors_spin; GtkWidget * num_iterations_spin; GtkWidget * stopping_criteria_spin; GtkWidget * sum_factors_equal_one_button; GtkWidget * beta_spin; GtkWidget * k12_spin; GtkWidget * k21_spin; GtkWidget * svd_tree; GtkWidget * blood_add_button; GtkWidget * blood_remove_button; GtkWidget * blood_tree; GtkWidget * curve_add_button; GtkWidget * curve_remove_button; GtkWidget * curve_view; GtkTextBuffer * curve_text; GtkTextBuffer * explanation_buffer; guint reference_count; } tb_fads_t; static void set_text(tb_fads_t * tb_fads); static void update_curve_text(tb_fads_t * tb_fads, gboolean allow_curve_entries); static gchar * get_filename(tb_fads_t * tb_fads); static void fads_type_cb(GtkWidget * widget, gpointer data); static void algorithm_cb(GtkWidget * widget, gpointer data); static void svd_pressed_cb(GtkButton * button, gpointer data); static void blood_cell_edited(GtkCellRendererText *cellrenderertext, gchar *arg1, gchar *arg2,gpointer data); static void add_blood_pressed_cb(GtkButton * button, gpointer data); static void remove_blood_pressed_cb(GtkButton * button, gpointer data); static void read_in_curve_file(tb_fads_t * tb_fads, gchar * filename); static void add_curve_pressed_cb(GtkButton * button, gpointer data); static void remove_curve_pressed_cb(GtkButton * button, gpointer data); static void num_factors_spinner_cb(GtkSpinButton * spin_button, gpointer data); static void max_iterations_spinner_cb(GtkSpinButton * spin_button, gpointer data); static void stopping_criteria_spinner_cb(GtkSpinButton * spin_button, gpointer data); static void sum_factors_equal_one_toggle_cb(GtkToggleButton * button, gpointer data); static void beta_spinner_cb(GtkSpinButton * spin_button, gpointer data); static void k12_spinner_cb(GtkSpinButton * spin_button, gpointer data); static void k21_spinner_cb(GtkSpinButton * spin_button, gpointer data); static void apply_cb(GtkAssistant * assistant, gpointer data); static void close_cb(GtkAssistant * assistant, gpointer data); static tb_fads_t * tb_fads_free(tb_fads_t * tb_fads); static tb_fads_t * tb_fads_init(void); static void prepare_page_cb(GtkAssistant * wizard, GtkWidget * page, gpointer data); static GtkWidget * create_page(tb_fads_t * tb_fads, which_page_t i_page); static void set_text(tb_fads_t * tb_fads) { gchar * temp_string; GtkTextIter iter; GdkPixbuf * pixbuf; /* the output page text */ if (tb_fads->page[CONCLUSION_PAGE] != NULL) { temp_string = g_strdup_printf(_("%s\nMethod Picked: %s"), _(finish_page_text), _(fads_type_explanation[tb_fads->fads_type])); gtk_label_set_text(GTK_LABEL(tb_fads->page[CONCLUSION_PAGE]),temp_string); g_free(temp_string); } /* the factor analysis type picking page */ if (tb_fads->explanation_buffer != NULL) { gtk_text_buffer_set_text (tb_fads->explanation_buffer, _(fads_type_explanation[tb_fads->fads_type]), -1); if (fads_type_icon[tb_fads->fads_type] != NULL) { gtk_text_buffer_get_end_iter(tb_fads->explanation_buffer, &iter); gtk_text_buffer_insert(tb_fads->explanation_buffer, &iter, "\n", -1); pixbuf = gdk_pixbuf_new_from_inline(-1,fads_type_icon[tb_fads->fads_type] , FALSE, NULL); gtk_text_buffer_get_end_iter(tb_fads->explanation_buffer, &iter); gtk_text_buffer_insert_pixbuf(tb_fads->explanation_buffer, &iter, pixbuf); g_object_unref(pixbuf); } } return; } static void update_curve_text(tb_fads_t * tb_fads, gboolean allow_curve_entries) { gint i; gint j; gint k; GString * text_str; if (!allow_curve_entries) { /* using a method that doesn't use initial curves */ gtk_text_buffer_set_text(tb_fads->curve_text, _(no_curve_explanation_text), -1); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(tb_fads->curve_view), GTK_WRAP_WORD); } else if (tb_fads->initial_curves == NULL) { gtk_text_buffer_set_text(tb_fads->curve_text, _(curve_explanation_text), -1); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(tb_fads->curve_view), GTK_WRAP_WORD); } else { text_str = g_string_new("frame/curve:"); for (j=0; j < tb_fads->num_factors; j++) g_string_append_printf(text_str, " %10d", j); g_string_append(text_str, "\n\n"); for (i=0,j=0,k=0; i < tb_fads->initial_curves->len; i++,j++) { if (j >= tb_fads->num_factors) { g_string_append(text_str, "\n"); j=0; } if (j==0) { /* new row, first column */ g_string_append_printf(text_str, "%12d", k); k++; } g_string_append_printf(text_str, " %10.9g", g_array_index(tb_fads->initial_curves, gdouble, i)); } g_string_append(text_str, "\n"); gtk_text_buffer_set_text(tb_fads->curve_text, text_str->str, -1); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(tb_fads->curve_view), GTK_WRAP_NONE); g_string_free(text_str, TRUE); } return; } /* function to get a name to save the output as: returned string will need to be free'd if not NULL */ static gchar * get_filename(tb_fads_t * tb_fads) { GtkWidget * file_chooser; gchar * analysis_name; gchar * save_filename; file_chooser = gtk_file_chooser_dialog_new (_("Filename for Factor Data"), GTK_WINDOW(tb_fads->dialog), /* parent window */ GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(tb_fads->preferences, file_chooser); /* set the default directory if applicable */ /* take a guess at the filename */ analysis_name = g_strdup_printf("%s_fads_analysis.tsv",AMITK_OBJECT_NAME(tb_fads->data_set)); gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (file_chooser), analysis_name); g_free(analysis_name); /* run the dialog */ if (gtk_dialog_run (GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) save_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (file_chooser)); else save_filename = NULL; gtk_widget_destroy (file_chooser); return save_filename; } static void svd_pressed_cb(GtkButton * button, gpointer data) { tb_fads_t * tb_fads = data; gdouble * factors = NULL; gint num_factors; gint i; GtkTreeIter iter; GtkTreeModel * model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(tb_fads->svd_tree)); gtk_list_store_clear(GTK_LIST_STORE(model)); /* make sure the list is clear */ /* calculate factors */ ui_common_place_cursor(UI_CURSOR_WAIT, tb_fads->page[PARAMETERS_PAGE]); fads_svd_factors(tb_fads->data_set, &num_factors, &factors); ui_common_remove_wait_cursor(tb_fads->page[PARAMETERS_PAGE]); for (i=0; iblood_tree)); /* switch the following 3 lines with path = gtk_tree_path_new_from_indices(row, -1); when gtk 2.2 is ready */ temp_string = g_strdup_printf("%d", row); path = gtk_tree_path_new_from_string(temp_string); g_free(temp_string); if (gtk_tree_model_get_iter(model, &iter, path)) { gtk_list_store_set (GTK_LIST_STORE(model), &iter,column,value, -1, -1); } gtk_tree_path_free(path); } } return; } static void add_blood_pressed_cb(GtkButton * button, gpointer data) { tb_fads_t * tb_fads = data; GtkTreeIter iter; GtkTreeModel * model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(tb_fads->blood_tree)); gtk_list_store_append (GTK_LIST_STORE(model), &iter); /* Acquire an iterator */ gtk_list_store_set (GTK_LIST_STORE(model), &iter,0,0.0,1,0.0,-1); return; } static void remove_blood_pressed_cb(GtkButton * button, gpointer data) { tb_fads_t * tb_fads = data; GtkTreeIter iter; GtkTreeSelection * selection; GtkTreeModel * model; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_fads->blood_tree)); if(gtk_tree_selection_get_selected(selection, &model, &iter)) { gtk_list_store_remove(GTK_LIST_STORE(model), &iter); } return; } static void read_in_curve_file(tb_fads_t * tb_fads, gchar * filename) { FILE * file; gdouble return_val; gchar line[1024]; gchar ** string_chunks; gint i; if ((file = fopen(filename, "r")) == NULL) { g_warning(_("Could not open file: %s"), filename); return; } if (tb_fads->initial_curves != NULL) g_array_free(tb_fads->initial_curves, TRUE); tb_fads->initial_curves = g_array_new(FALSE, TRUE, sizeof(gdouble)); while(fgets(line, 1024, file) != NULL) { if (line[0] != '#') {/* skip comment lines */ /* split the line by tabs */ string_chunks = g_strsplit(line, "\t", -1); i=0; while (string_chunks[i] != NULL) { if (sscanf(string_chunks[i], "%lf", &return_val) == 1) tb_fads->initial_curves = g_array_append_val(tb_fads->initial_curves, return_val); i++; } g_strfreev(string_chunks); } } if (tb_fads->initial_curves->len == 0) { g_warning(_("Could not find any numerical values in file: %s\n"), filename); g_array_free(tb_fads->initial_curves, TRUE); tb_fads->initial_curves = NULL; } update_curve_text(tb_fads, TRUE); fclose(file); return; } static void add_curve_pressed_cb(GtkButton * button, gpointer data) { tb_fads_t * tb_fads = data; GtkWidget * file_chooser; gchar * filename; /* get the name of the file to import */ file_chooser = gtk_file_chooser_dialog_new (_("Import Curve File"), GTK_WINDOW(tb_fads->dialog), /* parent window */ GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(tb_fads->preferences, file_chooser); if (gtk_dialog_run (GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (file_chooser)); else filename = NULL; gtk_widget_destroy (file_chooser); if (filename == NULL) return; if (!ui_common_check_filename(filename)) { g_warning(_("Inappropriate Filename: %s"), filename); g_free(filename); return; } #ifdef AMIDE_DEBUG g_print("Curve file to import: %s\n",filename); #endif read_in_curve_file(tb_fads, filename); g_free(filename); return; } static void remove_curve_pressed_cb(GtkButton * button, gpointer data) { tb_fads_t * tb_fads = data; if (tb_fads->initial_curves != NULL) { g_array_free(tb_fads->initial_curves, TRUE); tb_fads->initial_curves = NULL; } /* and reset the explanation text */ gtk_text_buffer_set_text(tb_fads->curve_text, _(curve_explanation_text), -1); return; } static void fads_type_cb(GtkWidget * widget, gpointer data) { tb_fads_t * tb_fads = data; tb_fads->fads_type = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); set_text(tb_fads); return; } static void algorithm_cb(GtkWidget * widget, gpointer data) { tb_fads_t * tb_fads = data; tb_fads->algorithm = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); set_text(tb_fads); return; } static void num_factors_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_fads_t * tb_fads = data; tb_fads->num_factors = gtk_spin_button_get_value_as_int(spin_button); return; } static void max_iterations_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_fads_t * tb_fads = data; tb_fads->max_iterations = gtk_spin_button_get_value_as_int(spin_button); return; } static void stopping_criteria_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_fads_t * tb_fads = data; tb_fads->stopping_criteria = gtk_spin_button_get_value(spin_button); return; } static void sum_factors_equal_one_toggle_cb(GtkToggleButton * button, gpointer data) { tb_fads_t * tb_fads = data; tb_fads->sum_factors_equal_one = gtk_toggle_button_get_active(button); return; } static void beta_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_fads_t * tb_fads = data; tb_fads->beta = gtk_spin_button_get_value(spin_button); return; } static void k12_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_fads_t * tb_fads = data; tb_fads->k12 = gtk_spin_button_get_value(spin_button); return; } static void k21_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_fads_t * tb_fads = data; tb_fads->k21 = gtk_spin_button_get_value(spin_button); return; } /* function called when the finish button is hit */ static void apply_cb(GtkAssistant * assistant, gpointer data) { tb_fads_t * tb_fads = data; gchar * output_filename; gint num=0; gint i; gint * frames=NULL; amide_data_t * vals=NULL; amide_data_t value; amide_time_t time; GtkTreeModel *model; GtkTreeIter iter; output_filename = get_filename(tb_fads); if (output_filename == NULL) return; /* no filename, no go */ /* get the blood values */ model = gtk_tree_view_get_model(GTK_TREE_VIEW(tb_fads->blood_tree)); num = gtk_tree_model_iter_n_children(model, NULL); if (num > 0) { if ((frames = g_try_new(gint, num)) == NULL) { g_warning(_("failed malloc for frames array")); return; } if ((vals = g_try_new(amide_data_t, num)) == NULL) { g_warning(_("failed malloc for vals array")); g_free(frames); return; } for (i=0; idata_set, time); } #if AMIDE_DEBUG g_print("blood values: frame\tval\n"); for (i=0; ipage[CONCLUSION_PAGE]); switch(tb_fads->fads_type) { case FADS_TYPE_PCA: fads_pca(tb_fads->data_set, tb_fads->num_factors, output_filename, amitk_progress_dialog_update, tb_fads->progress_dialog); break; case FADS_TYPE_PLS: fads_pls(tb_fads->data_set, tb_fads->num_factors, tb_fads->algorithm, tb_fads->max_iterations, tb_fads->stopping_criteria, tb_fads->sum_factors_equal_one, tb_fads->beta, output_filename, num, frames, vals, tb_fads->initial_curves, amitk_progress_dialog_update, tb_fads->progress_dialog); break; case FADS_TYPE_TWO_COMPARTMENT: fads_two_comp(tb_fads->data_set, tb_fads->algorithm, tb_fads->max_iterations, tb_fads->num_factors-1, tb_fads->k12, tb_fads->k21, tb_fads->stopping_criteria, tb_fads->sum_factors_equal_one, output_filename, num, frames, vals, amitk_progress_dialog_update, tb_fads->progress_dialog); break; default: g_error("fads type %d not defined", tb_fads->fads_type); break; } ui_common_remove_wait_cursor(tb_fads->page[CONCLUSION_PAGE]); if (frames != NULL) { g_free(frames); frames = NULL; } if (vals != NULL) { g_free(vals); vals = NULL; } if (output_filename != NULL) { g_free(output_filename); output_filename = NULL; } return; } /* function called to close the dialog */ static void close_cb(GtkAssistant * assistant, gpointer data) { tb_fads_t * tb_fads = data; GtkWidget * dialog = tb_fads->dialog; tb_fads = tb_fads_free(tb_fads); /* trash collection */ gtk_widget_destroy(dialog); return; } static tb_fads_t * tb_fads_free(tb_fads_t * tb_fads) { gboolean return_val; /* sanity checks */ g_return_val_if_fail(tb_fads != NULL, NULL); g_return_val_if_fail(tb_fads->reference_count > 0, NULL); /* remove a reference count */ tb_fads->reference_count--; /* things to do if we've removed all reference's */ if (tb_fads->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing tb_fads\n"); #endif if (tb_fads->initial_curves != NULL) { g_array_free(tb_fads->initial_curves, TRUE); tb_fads->initial_curves = NULL; } if (tb_fads->data_set != NULL) { amitk_object_unref(tb_fads->data_set); tb_fads->data_set = NULL; } if (tb_fads->preferences != NULL) { g_object_unref(tb_fads->preferences); tb_fads->preferences = NULL; } if (tb_fads->progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(tb_fads->progress_dialog), "delete_event", NULL, &return_val); tb_fads->progress_dialog = NULL; } g_free(tb_fads); tb_fads = NULL; } return tb_fads; } static tb_fads_t * tb_fads_init(void) { tb_fads_t * tb_fads; /* alloc space for the data structure for passing ui info */ if ((tb_fads = g_try_new(tb_fads_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for tb_fads_t")); return NULL; } tb_fads->reference_count = 1; tb_fads->dialog = NULL; tb_fads->data_set = NULL; tb_fads->preferences = NULL; tb_fads->num_factors = 2; tb_fads->max_iterations = 1e6; tb_fads->stopping_criteria = 1e-2; tb_fads->sum_factors_equal_one = FALSE; tb_fads->beta = 0.0; tb_fads->k12 = 0.01; tb_fads->k21 = 0.1; tb_fads->k23 = 0.01; tb_fads->k32 = 0.1; tb_fads->fads_type = FADS_TYPE_PCA; // tb_fads->algorithm = FADS_MINIMIZER_VECTOR_BFGS; tb_fads->algorithm = FADS_MINIMIZER_CONJUGATE_PR; tb_fads->initial_curves = NULL; tb_fads->explanation_buffer = NULL; tb_fads->progress_dialog = NULL; return tb_fads; } static void prepare_page_cb(GtkAssistant * wizard, GtkWidget * page, gpointer data) { tb_fads_t * tb_fads = data; which_page_t which_page; gboolean num_factors; gboolean blood_entries; gboolean curve_entries; gboolean num_iterations; gboolean k_values; which_page = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(page), "which_page")); switch(tb_fads->fads_type) { case FADS_TYPE_PCA: k_values = FALSE; blood_entries = FALSE; curve_entries = FALSE; num_factors = TRUE; num_iterations = FALSE; break; case FADS_TYPE_TWO_COMPARTMENT: k_values = TRUE; blood_entries = TRUE; curve_entries = FALSE; num_factors = TRUE; num_iterations = TRUE; break; case FADS_TYPE_PLS: k_values = FALSE; blood_entries = TRUE; curve_entries = TRUE; num_factors = TRUE; num_iterations = TRUE; break; default: g_error("unexpected case in %s at line %d", __FILE__, __LINE__); k_values = FALSE; blood_entries = TRUE; curve_entries = TRUE; num_factors = TRUE; num_iterations = TRUE; break; } switch(which_page) { case PARAMETERS_PAGE: /* fill in the proper text for the option to add initial curves */ gtk_text_buffer_set_text(tb_fads->curve_text, curve_entries ? _(curve_explanation_text) : "", -1); /* hide options we don't need */ gtk_widget_set_sensitive(tb_fads->blood_tree, blood_entries); gtk_widget_set_sensitive(tb_fads->blood_remove_button, blood_entries); gtk_widget_set_sensitive(tb_fads->blood_add_button, blood_entries); gtk_widget_set_sensitive(tb_fads->algorithm_menu, num_iterations); gtk_widget_set_sensitive(tb_fads->num_factors_spin, num_factors); gtk_widget_set_sensitive(tb_fads->num_iterations_spin, num_iterations); gtk_widget_set_sensitive(tb_fads->stopping_criteria_spin, num_iterations); gtk_widget_set_sensitive(tb_fads->sum_factors_equal_one_button, num_iterations); gtk_widget_set_sensitive(tb_fads->beta_spin, num_iterations); gtk_widget_set_sensitive(tb_fads->k12_spin, k_values); gtk_widget_set_sensitive(tb_fads->k21_spin, k_values); break; case CURVES_PAGE: /* hide options we don't need */ gtk_widget_set_sensitive(tb_fads->curve_remove_button, curve_entries); gtk_widget_set_sensitive(tb_fads->curve_add_button, curve_entries); update_curve_text(tb_fads, curve_entries); default: break; } } static GtkWidget * create_page(tb_fads_t * tb_fads, which_page_t i_page) { fads_type_t i_fads_type; fads_minimizer_algorithm_t i_algorithm; GtkWidget * label; GtkWidget * button; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *selection; GtkListStore * store; gint table_row; GtkWidget * table; GtkWidget * scrolled; GtkWidget * menu; GtkWidget * view; GtkWidget * vseparator; GtkWidget * hseparator; GtkTextBuffer *buffer; table = gtk_table_new(8,6,FALSE); table_row=0; switch(i_page) { case SVD_PAGE: view = gtk_text_view_new (); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); gtk_text_buffer_set_text (buffer, _(svd_page_text), -1); gtk_table_attach(GTK_TABLE(table), view, 0,1, table_row,table_row+2, FALSE,FALSE, X_PADDING, Y_PADDING); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(view), GTK_WRAP_WORD); gtk_text_view_set_editable(GTK_TEXT_VIEW(view), FALSE); gtk_widget_set_size_request(view,300,-1); /* a separator for clarity */ vseparator = gtk_vseparator_new(); gtk_table_attach(GTK_TABLE(table), vseparator, 1,2,table_row, table_row+2,0, GTK_FILL, X_PADDING, Y_PADDING); /* do I need to compute factors? */ button = gtk_button_new_with_label(_("Compute Singular Values?")); g_signal_connect(G_OBJECT(button), "pressed", G_CALLBACK(svd_pressed_cb), tb_fads); gtk_table_attach(GTK_TABLE(table), button, 2,3, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* the scroll widget which the list will go into */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,200,200); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_table_attach(GTK_TABLE(table), scrolled, 2, 3, table_row, table_row+1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); /* the table itself */ store = gtk_list_store_new(2, G_TYPE_INT, G_TYPE_DOUBLE); tb_fads->svd_tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref(store); /* above command adds a reference */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes(_("singular entry"), renderer,"text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tb_fads->svd_tree), column); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes(_("value"), renderer,"text", 1, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tb_fads->svd_tree), column); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_fads->svd_tree)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); gtk_container_add(GTK_CONTAINER(scrolled),tb_fads->svd_tree); table_row++; break; case FACTOR_CHOICE_PAGE: /* ask for the fads method to use */ label = gtk_label_new(_("FADS Method:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); menu = gtk_combo_box_new_text(); for (i_fads_type = 0; i_fads_type < NUM_FADS_TYPES; i_fads_type++) gtk_combo_box_append_text(GTK_COMBO_BOX(menu), _(fads_type_name[i_fads_type])); gtk_combo_box_set_active(GTK_COMBO_BOX(menu), tb_fads->fads_type); g_signal_connect(G_OBJECT(menu), "changed", G_CALLBACK(fads_type_cb), tb_fads); gtk_table_attach(GTK_TABLE(table), menu, 1,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(table), hseparator, 0,2,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* the explanation */ view = gtk_text_view_new (); tb_fads->explanation_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); gtk_text_buffer_set_text (tb_fads->explanation_buffer, _(fads_type_explanation[tb_fads->fads_type]), -1); gtk_table_attach(GTK_TABLE(table), view, 0,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(view), GTK_WRAP_WORD); gtk_text_view_set_editable(GTK_TEXT_VIEW(view), FALSE); gtk_widget_set_size_request(view,300,-1); table_row++; break; case PARAMETERS_PAGE: /* ask for the minimizer algorithm to use */ label = gtk_label_new(_("Minimization Algorithm:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); tb_fads->algorithm_menu = gtk_combo_box_new_text(); for (i_algorithm = 0; i_algorithm < NUM_FADS_MINIMIZERS; i_algorithm++) gtk_combo_box_append_text(GTK_COMBO_BOX(tb_fads->algorithm_menu), _(fads_minimizer_algorithm_name[i_algorithm])); gtk_combo_box_set_active(GTK_COMBO_BOX(tb_fads->algorithm_menu), tb_fads->algorithm); g_signal_connect(G_OBJECT(tb_fads->algorithm_menu), "changed", G_CALLBACK(algorithm_cb), tb_fads); gtk_table_attach(GTK_TABLE(table), tb_fads->algorithm_menu, 1,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* max # of iterations */ label = gtk_label_new(_("Max. # of iterations:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); tb_fads->num_iterations_spin = gtk_spin_button_new_with_range(1, MAX_ITERATIONS, 1); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tb_fads->num_iterations_spin),0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fads->num_iterations_spin), tb_fads->max_iterations); gtk_widget_set_size_request(tb_fads->num_iterations_spin, SPIN_BUTTON_X_SIZE, -1); g_signal_connect(G_OBJECT(tb_fads->num_iterations_spin), "value_changed", G_CALLBACK(max_iterations_spinner_cb), tb_fads); gtk_table_attach(GTK_TABLE(table), tb_fads->num_iterations_spin, 1,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* stopping criteria */ label = gtk_label_new(_("Stopping Criteria:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); tb_fads->stopping_criteria_spin = gtk_spin_button_new_with_range(EPSILON, 1.0, tb_fads->stopping_criteria); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_fads->stopping_criteria_spin), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fads->stopping_criteria_spin), tb_fads->stopping_criteria); gtk_widget_set_size_request(tb_fads->stopping_criteria_spin, SPIN_BUTTON_X_SIZE, -1); g_signal_connect(G_OBJECT(tb_fads->stopping_criteria_spin), "value_changed", G_CALLBACK(stopping_criteria_spinner_cb), tb_fads); g_signal_connect(G_OBJECT(tb_fads->stopping_criteria_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(table), tb_fads->stopping_criteria_spin, 1,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* whether to force sum of factors to equal one */ label = gtk_label_new(_("Constrain sum of factors = 1:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); tb_fads->sum_factors_equal_one_button = gtk_check_button_new(); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb_fads->sum_factors_equal_one_button), tb_fads->sum_factors_equal_one); g_signal_connect(G_OBJECT(tb_fads->sum_factors_equal_one_button), "toggled", G_CALLBACK(sum_factors_equal_one_toggle_cb), tb_fads); gtk_table_attach(GTK_TABLE(table), tb_fads->sum_factors_equal_one_button, 1,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* stopping criteria */ label = gtk_label_new(_("Beta:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); tb_fads->beta_spin = gtk_spin_button_new_with_range(0.0, 1.0, 0.01); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_fads->beta_spin), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fads->beta_spin), tb_fads->beta); gtk_widget_set_size_request(tb_fads->beta_spin, SPIN_BUTTON_X_SIZE, -1); g_signal_connect(G_OBJECT(tb_fads->beta_spin), "value_changed", G_CALLBACK(beta_spinner_cb), tb_fads); gtk_table_attach(GTK_TABLE(table), tb_fads->beta_spin, 1,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* how many factors to solve for? */ label = gtk_label_new(_("# of Factors to use")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); tb_fads->num_factors_spin = gtk_spin_button_new_with_range(1, AMITK_DATA_SET_NUM_FRAMES(tb_fads->data_set), 1); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tb_fads->num_factors_spin),0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fads->num_factors_spin), tb_fads->num_factors); gtk_widget_set_size_request(tb_fads->num_factors_spin, SPIN_BUTTON_X_SIZE, -1); g_signal_connect(G_OBJECT(tb_fads->num_factors_spin), "value_changed", G_CALLBACK(num_factors_spinner_cb), tb_fads); gtk_table_attach(GTK_TABLE(table), tb_fads->num_factors_spin, 1,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* k12 criteria */ label = gtk_label_new(_("initial k12 (1/s):")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); tb_fads->k12_spin = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, 0.01); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_fads->k12_spin), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fads->k12_spin), tb_fads->k12); gtk_widget_set_size_request(tb_fads->k12_spin, SPIN_BUTTON_X_SIZE, -1); g_signal_connect(G_OBJECT(tb_fads->k12_spin), "value_changed", G_CALLBACK(k12_spinner_cb), tb_fads); g_signal_connect(G_OBJECT(tb_fads->k12_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(table), tb_fads->k12_spin, 1,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* k21 criteria */ label = gtk_label_new(_("initial K21 (1/s):")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); tb_fads->k21_spin = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, 0.01); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_fads->k21_spin), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fads->k21_spin), tb_fads->k21); gtk_widget_set_size_request(tb_fads->k21_spin, SPIN_BUTTON_X_SIZE, -1); g_signal_connect(G_OBJECT(tb_fads->k21_spin), "value_changed", G_CALLBACK(k21_spinner_cb), tb_fads); g_signal_connect(G_OBJECT(tb_fads->k21_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(table), tb_fads->k21_spin, 1,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); // table_row++; table_row = 0; /* a separator for clarity */ vseparator = gtk_vseparator_new(); gtk_table_attach(GTK_TABLE(table), vseparator, 2,3,table_row, table_row+6, 0, GTK_FILL, X_PADDING, Y_PADDING); /* A table to add blood sample measurements */ tb_fads->blood_add_button = gtk_button_new_with_label(_("Add Blood Sample")); g_signal_connect(G_OBJECT(tb_fads->blood_add_button), "pressed", G_CALLBACK(add_blood_pressed_cb), tb_fads); gtk_table_attach(GTK_TABLE(table), tb_fads->blood_add_button, 3,4, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* the scroll widget which the list will go into */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,200,200); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_table_attach(GTK_TABLE(table), scrolled, 3, 4, table_row, table_row+4, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); table_row+=4; /* the table itself */ store = gtk_list_store_new(2, G_TYPE_DOUBLE, G_TYPE_DOUBLE); tb_fads->blood_tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref(store); /* above command adds a reference */ renderer = gtk_cell_renderer_text_new (); g_object_set(G_OBJECT(renderer), "editable", TRUE, NULL); g_object_set_data(G_OBJECT(renderer),"column", GINT_TO_POINTER(0)); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(blood_cell_edited), tb_fads); column = gtk_tree_view_column_new_with_attributes("time pt (s)", renderer,"text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tb_fads->blood_tree), column); renderer = gtk_cell_renderer_text_new (); g_object_set(G_OBJECT(renderer), "editable", TRUE, NULL); g_object_set_data(G_OBJECT(renderer),"column", GINT_TO_POINTER(1)); g_signal_connect(G_OBJECT(renderer), "edited", G_CALLBACK(blood_cell_edited), tb_fads); column = gtk_tree_view_column_new_with_attributes("value", renderer,"text", 1,NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tb_fads->blood_tree), column); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tb_fads->blood_tree)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_container_add(GTK_CONTAINER(scrolled),tb_fads->blood_tree); tb_fads->blood_remove_button = gtk_button_new_with_label(_("Remove Blood Sample")); g_signal_connect(G_OBJECT(tb_fads->blood_remove_button), "pressed", G_CALLBACK(remove_blood_pressed_cb), tb_fads); gtk_table_attach(GTK_TABLE(table), tb_fads->blood_remove_button, 3,4, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); break; case CURVES_PAGE: /* A button to add initial curves */ tb_fads->curve_add_button = gtk_button_new_with_label(_("Add Initial Curves")); g_signal_connect(G_OBJECT(tb_fads->curve_add_button), "pressed", G_CALLBACK(add_curve_pressed_cb), tb_fads); gtk_table_attach(GTK_TABLE(table), tb_fads->curve_add_button, 0,1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* the scroll widget which the list will go into */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,200,200); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_table_attach(GTK_TABLE(table), scrolled, 0, 1, table_row, table_row+4, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); table_row+=4; /* the curve text area */ tb_fads->curve_view = gtk_text_view_new(); tb_fads->curve_text = gtk_text_view_get_buffer(GTK_TEXT_VIEW(tb_fads->curve_view)); gtk_widget_modify_font(tb_fads->curve_view, amitk_fixed_font_desc); gtk_text_view_set_editable(GTK_TEXT_VIEW(tb_fads->curve_view), FALSE); gtk_container_add(GTK_CONTAINER(scrolled),tb_fads->curve_view); tb_fads->curve_remove_button = gtk_button_new_with_label(_("Remove Initial Curves")); g_signal_connect(G_OBJECT(tb_fads->curve_remove_button), "pressed", G_CALLBACK(remove_curve_pressed_cb), tb_fads); gtk_table_attach(GTK_TABLE(table), tb_fads->curve_remove_button, 0,1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; break; default: table = NULL; g_error("unhandled case in %s at line %d\n", __FILE__, __LINE__); break; } return table; } void tb_fads(AmitkDataSet * active_ds, AmitkPreferences * preferences, GtkWindow * parent) { tb_fads_t * tb_fads; GdkPixbuf * logo; which_page_t i_page; g_return_if_fail(AMITK_IS_DATA_SET(active_ds)); tb_fads = tb_fads_init(); tb_fads->data_set = amitk_object_ref(active_ds); tb_fads->preferences = g_object_ref(preferences); tb_fads->dialog = gtk_assistant_new(); gtk_window_set_transient_for(GTK_WINDOW(tb_fads->dialog), parent); gtk_window_set_destroy_with_parent(GTK_WINDOW(tb_fads->dialog), TRUE); g_signal_connect(G_OBJECT(tb_fads->dialog), "cancel", G_CALLBACK(close_cb), tb_fads); g_signal_connect(G_OBJECT(tb_fads->dialog), "close", G_CALLBACK(close_cb), tb_fads); g_signal_connect(G_OBJECT(tb_fads->dialog), "apply", G_CALLBACK(apply_cb), tb_fads); g_signal_connect(G_OBJECT(tb_fads->dialog), "prepare", G_CALLBACK(prepare_page_cb), tb_fads); tb_fads->progress_dialog = amitk_progress_dialog_new(GTK_WINDOW(tb_fads->dialog)); /* --------------- initial page ------------------ */ tb_fads->page[INTRO_PAGE]= gtk_label_new(((AMITK_DATA_SET_NUM_FRAMES(tb_fads->data_set) > 1) ? _(start_page_text) : _(not_enough_frames_text))); gtk_widget_set_size_request(tb_fads->page[INTRO_PAGE],LABEL_WIDTH, -1); gtk_label_set_line_wrap(GTK_LABEL(tb_fads->page[INTRO_PAGE]), TRUE); gtk_assistant_append_page(GTK_ASSISTANT(tb_fads->dialog), tb_fads->page[INTRO_PAGE]); gtk_assistant_set_page_type(GTK_ASSISTANT(tb_fads->dialog), tb_fads->page[INTRO_PAGE], GTK_ASSISTANT_PAGE_INTRO); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_fads->dialog), tb_fads->page[INTRO_PAGE], (AMITK_DATA_SET_NUM_FRAMES(tb_fads->data_set) > 1)); /* --------------- the pages in the middle ---------------- */ for (i_page=INTRO_PAGE+1; i_pagepage[i_page] = create_page(tb_fads, i_page); gtk_assistant_append_page(GTK_ASSISTANT(tb_fads->dialog), tb_fads->page[i_page]); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_fads->dialog), tb_fads->page[i_page], TRUE); /* all pages have default values */ } /* ---------------- conclusion page ---------------------------------- */ tb_fads->page[CONCLUSION_PAGE] = gtk_label_new("?"); set_text(tb_fads); gtk_widget_set_size_request(tb_fads->page[CONCLUSION_PAGE],LABEL_WIDTH, -1); gtk_label_set_line_wrap(GTK_LABEL(tb_fads->page[CONCLUSION_PAGE]), TRUE); gtk_assistant_append_page(GTK_ASSISTANT(tb_fads->dialog), tb_fads->page[CONCLUSION_PAGE]); gtk_assistant_set_page_type(GTK_ASSISTANT(tb_fads->dialog), tb_fads->page[CONCLUSION_PAGE], GTK_ASSISTANT_PAGE_CONFIRM); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_fads->dialog), tb_fads->page[CONCLUSION_PAGE], TRUE); logo = gtk_widget_render_icon(GTK_WIDGET(tb_fads->dialog), "amide_icon_logo", GTK_ICON_SIZE_DIALOG, 0); for (i_page=0; i_pagedialog), tb_fads->page[i_page], logo); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_fads->dialog), tb_fads->page[i_page], _(wizard_name)); g_object_set_data(G_OBJECT(tb_fads->page[i_page]),"which_page", GINT_TO_POINTER(i_page)); } g_object_unref(logo); gtk_widget_show_all(tb_fads->dialog); return; } #endif /* AMIDE_LIBGSL_SUPPORT */ amide-1.0.5/src/amitk_color_table_menu.h0000664000175000017500000000423712270274573020123 0ustar loeningloening/* amitk_color_table_menu.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_COLOR_TABLE_MENU__ #define __AMITK_COLOR_TABLE_MENU_H__ /* includes we always need with this widget */ #include #include "amitk_color_table.h" G_BEGIN_DECLS #define AMITK_TYPE_COLOR_TABLE_MENU (amitk_color_table_menu_get_type ()) #define AMITK_COLOR_TABLE_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AMITK_TYPE_COLOR_TABLE_MENU, AmitkColorTableMenu)) #define AMITK_COLOR_TABLE_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_COLOR_TABLE_MENU, AmitkColorTableMenuClass)) #define AMITK_IS_COLOR_TABLE_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AMITK_TYPE_COLOR_TABLE_MENU)) #define AMITK_IS_COLOR_TABLE_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_COLOR_TABLE_MENU)) #define AMITK_COLOR_TABLE_MENU_COLOR_TABLE(obj) (AMITK_COLOR_TABLE_MENU(obj)->color_table) typedef struct _AmitkColorTableMenu AmitkColorTableMenu; typedef struct _AmitkColorTableMenuClass AmitkColorTableMenuClass; struct _AmitkColorTableMenu { GtkComboBox combo_box; }; struct _AmitkColorTableMenuClass { GtkComboBoxClass parent_class; }; GType amitk_color_table_menu_get_type (void); GtkWidget* amitk_color_table_menu_new (); G_END_DECLS #endif /* __AMITK_COLOR_TABLE_MENU_H__ */ amide-1.0.5/src/amitk_preferences.h0000664000175000017500000002165612270274741017114 0ustar loeningloening/* amitk_preferences.h * * Part of amide - Amide's a Medical Image Data Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_PREFERENCES_H__ #define __AMITK_PREFERENCES_H__ /* header files that are always needed with this file */ #include #include "amitk_common.h" #include "amitk_color_table.h" G_BEGIN_DECLS #define AMITK_TYPE_PREFERENCES (amitk_preferences_get_type ()) #define AMITK_PREFERENCES(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), AMITK_TYPE_PREFERENCES, AmitkPreferences)) #define AMITK_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_PREFERENCES, AmitkPreferencesClass)) #define AMITK_IS_PREFERENCES(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), AMITK_TYPE_PREFERENCES)) #define AMITK_IS_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_PREFERENCES)) #define AMITK_PREFERENCES_GET_CLASS(object) (G_TYPE_CHECK_GET_CLASS ((object), AMITK_TYPE_PREFERENCES, AmitkPreferencesClass)) #define AMITK_PREFERENCES_WARNINGS_TO_CONSOLE(object) (AMITK_PREFERENCES(object)->warnings_to_console) #define AMITK_PREFERENCES_PROMPT_FOR_SAVE_ON_EXIT(object) (AMITK_PREFERENCES(object)->prompt_for_save_on_exit) #define AMITK_PREFERENCES_WHICH_DEFAULT_DIRECTORY(object) (AMITK_PREFERENCES(object)->which_default_directory) #define AMITK_PREFERENCES_DEFAULT_DIRECTORY(object) (AMITK_PREFERENCES(object)->default_directory) #define AMITK_PREFERENCES_CANVAS_ROI_WIDTH(pref) (AMITK_PREFERENCES(pref)->canvas_roi_width) #ifdef AMIDE_LIBGNOMECANVAS_AA #define AMITK_PREFERENCES_CANVAS_ROI_TRANSPARENCY(pref) (AMITK_PREFERENCES(pref)->canvas_roi_transparency) #else #define AMITK_PREFERENCES_CANVAS_LINE_STYLE(pref) (AMITK_PREFERENCES(pref)->canvas_line_style) #define AMITK_PREFERENCES_CANVAS_FILL_ROI(pref) (AMITK_PREFERENCES(pref)->canvas_fill_roi) #endif #define AMITK_PREFERENCES_CANVAS_LAYOUT(pref) (AMITK_PREFERENCES(pref)->canvas_layout) #define AMITK_PREFERENCES_CANVAS_MAINTAIN_SIZE(pref) (AMITK_PREFERENCES(pref)->canvas_maintain_size) #define AMITK_PREFERENCES_CANVAS_TARGET_EMPTY_AREA(pref) (AMITK_PREFERENCES(pref)->canvas_target_empty_area) #define AMITK_PREFERENCES_PANEL_LAYOUT(pref) (AMITK_PREFERENCES(pref)->panel_layout) #define AMITK_PREFERENCES_COLOR_TABLE(pref, modality) (AMITK_PREFERENCES(pref)->color_table[modality]) #define AMITK_PREFERENCES_WINDOW(pref, which_window, limit) (AMITK_PREFERENCES(pref)->window[which_window][limit]) #define AMITK_PREFERENCES_THRESHOLD_STYLE(pref) (AMITK_PREFERENCES(pref)->threshold_style) #define AMITK_PREFERENCES_DIALOG(pref) (AMITK_PREFERENCES(pref)->dialog) typedef enum { AMITK_WHICH_DEFAULT_DIRECTORY_NONE, AMITK_WHICH_DEFAULT_DIRECTORY_SPECIFIED, AMITK_WHICH_DEFAULT_DIRECTORY_WORKING, AMITK_WHICH_DEFAULT_DIRECTORY_NUM } AmitkWhichDefaultDirectory; #define AMITK_PREFERENCES_DEFAULT_CANVAS_ROI_WIDTH 2 #ifdef AMIDE_LIBGNOMECANVAS_AA #define AMITK_PREFERENCES_DEFAULT_CANVAS_ROI_TRANSPARENCY 0.5 #else #define AMITK_PREFERENCES_DEFAULT_CANVAS_LINE_STYLE GDK_LINE_SOLID #define AMITK_PREFERENCES_DEFAULT_CANVAS_FILL_ROI TRUE #endif #define AMITK_PREFERENCES_DEFAULT_CANVAS_LAYOUT AMITK_LAYOUT_LINEAR #define AMITK_PREFERENCES_DEFAULT_CANVAS_MAINTAIN_SIZE TRUE #define AMITK_PREFERENCES_DEFAULT_CANVAS_TARGET_EMPTY_AREA 5 #define AMITK_PREFERENCES_DEFAULT_PANEL_LAYOUT AMITK_PANEL_LAYOUT_MIXED #define AMITK_PREFERENCES_DEFAULT_WARNINGS_TO_CONSOLE FALSE #define AMITK_PREFERENCES_DEFAULT_PROMPT_FOR_SAVE_ON_EXIT TRUE #define AMITK_PREFERENCES_DEFAULT_SAVE_XIF_AS_DIRECTORY FALSE #define AMITK_PREFERENCES_DEFAULT_WHICH_DEFAULT_DIRECTORY AMITK_WHICH_DEFAULT_DIRECTORY_NONE #define AMITK_PREFERENCES_DEFAULT_DEFAULT_DIRECTORY NULL #define AMITK_PREFERENCES_DEFAULT_THRESHOLD_STYLE AMITK_THRESHOLD_STYLE_MIN_MAX #define AMITK_PREFERENCES_MIN_ROI_WIDTH 1 #define AMITK_PREFERENCES_MAX_ROI_WIDTH 5 #define AMITK_PREFERENCES_MIN_TARGET_EMPTY_AREA 0 #define AMITK_PREFERENCES_MAX_TARGET_EMPTY_AREA 25 typedef struct _AmitkPreferencesClass AmitkPreferencesClass; typedef struct _AmitkPreferences AmitkPreferences; struct _AmitkPreferences { GObject parent; /* debug preferences */ gboolean warnings_to_console; /* file saving preferences */ gboolean prompt_for_save_on_exit; gboolean save_xif_as_directory; AmitkWhichDefaultDirectory which_default_directory; gchar * default_directory; /* canvas preferences -> study preferences */ gint canvas_roi_width; gdouble canvas_roi_transparency; #ifdef AMIDE_LIBGNOMECANVAS_AA GdkLineStyle canvas_line_style; gboolean canvas_fill_roi; #endif AmitkLayout canvas_layout; gboolean canvas_maintain_size; gint canvas_target_empty_area; /* in pixels */ AmitkPanelLayout panel_layout; /* data set preferences */ AmitkColorTable color_table[AMITK_MODALITY_NUM]; amide_data_t window[AMITK_WINDOW_NUM][AMITK_LIMIT_NUM]; AmitkThresholdStyle threshold_style; /* misc pointers */ GtkWidget * dialog; }; struct _AmitkPreferencesClass { GObjectClass parent_class; void (* data_set_preferences_changed) (AmitkPreferences * preferences); void (* study_preferences_changed) (AmitkPreferences * preferences); void (* misc_preferences_changed) (AmitkPreferences * preferences); }; /* ------------ external functions ---------- */ GType amitk_preferences_get_type (void); AmitkPreferences* amitk_preferences_new (void); void amitk_preferences_set_canvas_roi_width (AmitkPreferences * preferences, gint roi_width); #ifdef AMIDE_LIBGNOMECANVAS_AA void amitk_preferences_set_canvas_roi_transparency(AmitkPreferences * preferences, gdouble roi_transparency); #else void amitk_preferences_set_canvas_line_style (AmitkPreferences * preferences, GdkLineStyle line_style); void amitk_preferences_set_canvas_fill_roi (AmitkPreferences * preferences, gboolean fill_roi); #endif void amitk_preferences_set_canvas_layout (AmitkPreferences * preferences, AmitkLayout layout); void amitk_preferences_set_canvas_maintain_size (AmitkPreferences * preferences, gboolean maintain_size); void amitk_preferences_set_canvas_target_empty_area(AmitkPreferences * preferences, gint target_empty_area); void amitk_preferences_set_panel_layout (AmitkPreferences * preferences, AmitkPanelLayout panel_layout); void amitk_preferences_set_warnings_to_console (AmitkPreferences * preferences, gboolean new_value); void amitk_preferences_set_prompt_for_save_on_exit(AmitkPreferences * preferences, gboolean new_value); void amitk_preferences_set_xif_as_directory (AmitkPreferences * preferences, gboolean new_value); void amitk_preferences_set_which_default_directory(AmitkPreferences * preferences, const AmitkWhichDefaultDirectory which_default_directory); void amitk_preferences_set_default_directory (AmitkPreferences * preferences, const gchar * directory); void amitk_preferences_set_color_table (AmitkPreferences * preferences, AmitkModality modality, AmitkColorTable color_table); void amitk_preferences_set_default_window (AmitkPreferences * preferences, const AmitkWindow window, const AmitkLimit limit, const amide_data_t value); void amitk_preferences_set_threshold_style (AmitkPreferences * preferences, const AmitkThresholdStyle threshold_style); void amitk_preferences_set_dialog (AmitkPreferences * preferences, GtkWidget * dialog); void amitk_preferences_set_file_chooser_directory (AmitkPreferences * preferences, GtkWidget * file_chooser); /* external variables */ extern const gchar * amitk_which_default_directory_names[]; G_END_DECLS #endif /* __AMITK_PREFERENCES_H__ */ amide-1.0.5/src/amitk_space.c0000664000175000017500000005554612271013560015675 0ustar loeningloening/* amitk_space.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amitk_space.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" enum { SPACE_SHIFT, SPACE_ROTATE, SPACE_INVERT, SPACE_TRANSFORM, SPACE_TRANSFORM_AXES, SPACE_SCALE, SPACE_CHANGED, LAST_SIGNAL }; /* local functions */ static void space_class_init (AmitkSpaceClass *klass); static void space_init (AmitkSpace *object); static void space_shift (AmitkSpace * space, AmitkPoint * shift); static void space_rotate_on_vector (AmitkSpace * space, AmitkPoint * vector, amide_real_t theta, AmitkPoint * center_of_rotation); static void space_invert_axis (AmitkSpace * space, AmitkAxis which_axis, AmitkPoint * center_of_inversion); static void space_transform (AmitkSpace * space, AmitkSpace * transform_space); static void space_transform_axes (AmitkSpace * space, AmitkAxes axes, AmitkPoint * center_of_rotation); static void space_scale (AmitkSpace * space, AmitkPoint * ref_point, AmitkPoint * scaling); static GObjectClass * parent_class; static guint space_signals[LAST_SIGNAL]; GType amitk_space_get_type(void) { static GType space_type = 0; if (!space_type) { static const GTypeInfo space_info = { sizeof (AmitkSpaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) space_class_init, (GClassFinalizeFunc) NULL, NULL, /* class_data */ sizeof (AmitkSpace), 0, /* n_preallocs */ (GInstanceInitFunc) space_init, NULL /* value table */ }; space_type = g_type_register_static (G_TYPE_OBJECT, "AmitkSpace", &space_info, 0); } return space_type; } static void space_class_init (AmitkSpaceClass * class) { // GObjectClass *gobject_class = G_OBJECT_CLASS (class); parent_class = g_type_class_peek_parent(class); class->space_shift = space_shift; class->space_rotate = space_rotate_on_vector; class->space_invert = space_invert_axis; class->space_transform = space_transform; class->space_transform_axes = space_transform_axes; class->space_scale = space_scale; space_signals[SPACE_SHIFT] = g_signal_new ("space_shift", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkSpaceClass, space_shift), NULL, NULL, amitk_marshal_NONE__BOXED, G_TYPE_NONE,1, AMITK_TYPE_POINT); space_signals[SPACE_ROTATE] = g_signal_new ("space_rotate", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkSpaceClass, space_rotate), NULL, NULL, amitk_marshal_NONE__BOXED_DOUBLE_BOXED, G_TYPE_NONE,3, AMITK_TYPE_POINT, AMITK_TYPE_REAL, AMITK_TYPE_POINT); space_signals[SPACE_INVERT] = g_signal_new ("space_invert", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkSpaceClass, space_invert), NULL, NULL, amitk_marshal_NONE__ENUM_BOXED, G_TYPE_NONE,2, AMITK_TYPE_AXIS, AMITK_TYPE_POINT); space_signals[SPACE_TRANSFORM] = g_signal_new ("space_transform", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkSpaceClass, space_transform), NULL, NULL, amitk_marshal_NONE__OBJECT, G_TYPE_NONE,1, AMITK_TYPE_SPACE); space_signals[SPACE_TRANSFORM_AXES] = g_signal_new ("space_transform_axes", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkSpaceClass, space_transform_axes), NULL, NULL, amitk_marshal_NONE__BOXED_BOXED, G_TYPE_NONE,2, AMITK_TYPE_AXES, AMITK_TYPE_POINT); space_signals[SPACE_SCALE] = g_signal_new ("space_scale", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkSpaceClass, space_scale), NULL, NULL, amitk_marshal_NONE__BOXED_BOXED, G_TYPE_NONE,2, AMITK_TYPE_POINT, AMITK_TYPE_POINT); space_signals[SPACE_CHANGED] = g_signal_new ("space_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkSpaceClass, space_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); } static void space_init (AmitkSpace * space) { AmitkAxis i_axis; space->offset = zero_point; for (i_axis=0; i_axisaxes[i_axis] = base_axes[i_axis]; } static void space_shift(AmitkSpace * space, AmitkPoint * shift) { space->offset = point_add(space->offset, *shift); /* get around some bizarre compiler bug */ if (isnan(space->offset.x) || isnan(space->offset.y) || isnan(space->offset.z)) { g_warning("inappropriate offset, possibly an internalization problem, or a compiler bug from libecat, working around"); space->offset = zero_point; } return; } static void space_invert_axis (AmitkSpace * space, AmitkAxis which_axis, AmitkPoint * center_of_inversion) { AmitkPoint shift; shift = amitk_space_b2s(space, *center_of_inversion); space->axes[which_axis] = point_neg(space->axes[which_axis]); shift = point_sub(*center_of_inversion, amitk_space_s2b(space, shift)); space->offset = point_add(space->offset, shift); return; } /*center of rotation should be in base coordinate frame */ static void space_rotate_on_vector(AmitkSpace * space, AmitkPoint * vector, amide_real_t theta, AmitkPoint * center_of_rotation) { AmitkPoint shift; shift = amitk_space_b2s(space, *center_of_rotation); amitk_axes_rotate_on_vector(space->axes, *vector, theta); amitk_axes_make_orthonormal(space->axes); /* make sure the result is orthonomal */ shift = point_sub(*center_of_rotation, amitk_space_s2b(space, shift)); space->offset = point_add(space->offset, shift); return; } static void space_transform(AmitkSpace * space, AmitkSpace * transform_space) { space->offset = point_add(space->offset, transform_space->offset); amitk_axes_mult(transform_space->axes, space->axes, space->axes); amitk_axes_make_orthonormal(space->axes); /* make sure the result is orthonomal */ /* get around some bizarre compiler bug */ if (isnan(space->axes[AMITK_AXIS_X].x) || isnan(space->axes[AMITK_AXIS_X].y) || isnan(space->axes[AMITK_AXIS_X].z) || isnan(space->axes[AMITK_AXIS_Y].x) || isnan(space->axes[AMITK_AXIS_Y].y) || isnan(space->axes[AMITK_AXIS_Y].z) || isnan(space->axes[AMITK_AXIS_Z].x) || isnan(space->axes[AMITK_AXIS_Z].y) || isnan(space->axes[AMITK_AXIS_Z].z)) { AmitkAxis i_axis; g_warning("inappropriate offset: compiler bug? internalization problem? Working around"); for (i_axis=0;i_axisaxes[i_axis]=base_axes[i_axis]; } return; } static void space_transform_axes(AmitkSpace * space, AmitkAxes transform_axes, AmitkPoint * center_of_rotation) { AmitkPoint shift; shift = amitk_space_b2s(space, *center_of_rotation); amitk_axes_mult(transform_axes, space->axes, space->axes); amitk_axes_make_orthonormal(space->axes); /* make sure the result is orthonomal */ shift = point_sub(*center_of_rotation, amitk_space_s2b(space, shift)); space->offset = point_add(space->offset, shift); return; } /* scaling and ref_point need to be wrt the base reference frame */ static void space_scale(AmitkSpace * space, AmitkPoint * ref_point, AmitkPoint * scaling) { AmitkPoint shift; shift = point_sub(AMITK_SPACE_OFFSET(space), *ref_point); shift = point_mult(*scaling, shift); space->offset = point_add(shift, *ref_point); return; } AmitkSpace * amitk_space_new (void) { AmitkSpace * space; space = g_object_new(amitk_space_get_type(), NULL); return space; } void amitk_space_write_xml(xmlNodePtr node, gchar * descriptor, AmitkSpace * space) { gchar * temp_string; AmitkAxis i_axis; temp_string = g_strdup_printf("%s_offset", descriptor); amitk_point_write_xml(node,temp_string, AMITK_SPACE_OFFSET(space)); g_free(temp_string); for (i_axis=0;i_axisoffset); amitk_space_shift_offset(space, shift); return; } void amitk_space_shift_offset(AmitkSpace * space, const AmitkPoint shift ){ g_return_if_fail(AMITK_IS_SPACE(space)); if (!POINT_EQUAL(shift, zero_point)) { g_signal_emit(G_OBJECT(space), space_signals[SPACE_SHIFT], 0, &shift); g_signal_emit(G_OBJECT(space), space_signals[SPACE_CHANGED], 0); } return; } void amitk_space_set_axes(AmitkSpace * space, const AmitkAxes new_axes, const AmitkPoint center_of_rotation) { AmitkAxes transform_axes; g_return_if_fail(AMITK_IS_SPACE(space)); amitk_axes_copy_in_place(transform_axes, space->axes); /* since the axes matrix is orthogonal, the transpose is the same as the inverse */ amitk_axes_transpose(transform_axes); amitk_axes_mult(new_axes, transform_axes, transform_axes); /* now transform_space->axes incodes the rotation of the original coordinate space that will result in the new coordinate space */ amitk_space_transform_axes(space, transform_axes, center_of_rotation); return; } /* given two spaces, calculate the transform space that when applied to src_space will make it equal to dest_space. */ AmitkSpace * amitk_space_calculate_transform(const AmitkSpace * dest_space, const AmitkSpace * src_space) { AmitkSpace * transform_space; g_return_val_if_fail(AMITK_IS_SPACE(src_space), NULL); g_return_val_if_fail(AMITK_IS_SPACE(dest_space), NULL); /* transform_space will encode the shift and rotation of the coordinate space */ transform_space = amitk_space_new(); transform_space->offset = point_sub(src_space->offset, dest_space->offset); amitk_axes_copy_in_place(transform_space->axes, dest_space->axes); /* since the axes matrix is orthogonal, the transpose is the same as the inverse */ amitk_axes_transpose(transform_space->axes); amitk_axes_mult(src_space->axes, transform_space->axes, transform_space->axes); /* now transform_space->axes incodes the rotation of the original coordinate space that will result in the new coordinate space */ return transform_space; } void amitk_space_copy_in_place(AmitkSpace * dest_space, const AmitkSpace * src_space) { AmitkSpace * transform_space; g_return_if_fail(AMITK_IS_SPACE(src_space)); g_return_if_fail(AMITK_IS_SPACE(dest_space)); transform_space = amitk_space_calculate_transform(dest_space, src_space); g_return_if_fail(transform_space != NULL); amitk_space_transform(dest_space, transform_space); g_object_unref(transform_space); return; } void amitk_space_transform(AmitkSpace * space, const AmitkSpace * transform_space) { g_return_if_fail(AMITK_IS_SPACE(space)); g_return_if_fail(AMITK_IS_SPACE(transform_space)); g_signal_emit(G_OBJECT(space), space_signals[SPACE_TRANSFORM], 0, transform_space); g_signal_emit(G_OBJECT(space), space_signals[SPACE_CHANGED], 0); return; } void amitk_space_transform_axes(AmitkSpace * space, const AmitkAxes transform_axes, AmitkPoint center_of_rotation) { g_return_if_fail(AMITK_IS_SPACE(space)); g_signal_emit(G_OBJECT(space), space_signals[SPACE_TRANSFORM_AXES], 0, transform_axes, ¢er_of_rotation); g_signal_emit(G_OBJECT(space), space_signals[SPACE_CHANGED], 0); return; } /* scaling and ref_point need to be wrt the base reference frame */ /* note, this doesn't actually scale the coordinate axis, as we always leave those as orthonormal. instead, it shifts the offset of the space appropriately giving the ref_point, and leaves further scaling operations to objects that inherit from this class */ void amitk_space_scale(AmitkSpace * space, AmitkPoint ref_point, AmitkPoint scaling) { g_return_if_fail(AMITK_IS_SPACE(space)); g_signal_emit(G_OBJECT(space), space_signals[SPACE_SCALE], 0, &ref_point, &scaling); g_signal_emit(G_OBJECT(space), space_signals[SPACE_CHANGED], 0); } AmitkPoint amitk_space_get_axis(const AmitkSpace * space, const AmitkAxis which_axis) { g_return_val_if_fail(AMITK_IS_SPACE(space), one_point); return space->axes[which_axis]; } /* given the ordered corners[] (i.e corner[0].x < corner[1].x, etc.) of a box in the input coordinate space, this function will return an ordered set of corners for the box in the new coordinate space that completely encloses the given box */ void amitk_space_get_enclosing_corners(const AmitkSpace * in_space, const AmitkCorners in_corners, const AmitkSpace * out_space, AmitkCorners out_corners) { AmitkPoint temp_point; guint corner; g_return_if_fail(AMITK_IS_SPACE(in_space)); g_return_if_fail(AMITK_IS_SPACE(out_space)); for (corner=0; corner<8 ; corner++) { temp_point.x = in_corners[(corner & 0x1) ? 1 : 0].x; temp_point.y = in_corners[(corner & 0x2) ? 1 : 0].y; temp_point.z = in_corners[(corner & 0x4) ? 1 : 0].z; temp_point = amitk_space_s2s(in_space, out_space, temp_point); if (corner==0) out_corners[0]=out_corners[1]=temp_point; else { if (temp_point.x < out_corners[0].x) out_corners[0].x=temp_point.x; if (temp_point.x > out_corners[1].x) out_corners[1].x=temp_point.x; if (temp_point.y < out_corners[0].y) out_corners[0].y=temp_point.y; if (temp_point.y > out_corners[1].y) out_corners[1].y=temp_point.y; if (temp_point.z < out_corners[0].z) out_corners[0].z=temp_point.z; if (temp_point.z > out_corners[1].z) out_corners[1].z=temp_point.z; } } return; } AmitkSpace * amitk_space_copy(const AmitkSpace * space) { AmitkSpace * new_space; g_return_val_if_fail(AMITK_IS_SPACE(space), NULL); new_space = amitk_space_new(); amitk_space_copy_in_place(new_space, space); return new_space; } gboolean amitk_space_axes_equal(const AmitkSpace * space1, const AmitkSpace * space2) { gboolean inner = TRUE; AmitkAxis i_axis; g_return_val_if_fail(AMITK_IS_SPACE(space1), FALSE); g_return_val_if_fail(AMITK_IS_SPACE(space2), FALSE); for (i_axis=0;i_axisaxes[i_axis], space2->axes[i_axis]); return inner; } gboolean amitk_space_axes_close(const AmitkSpace * space1, const AmitkSpace * space2) { gboolean inner = TRUE; AmitkAxis i_axis; g_return_val_if_fail(AMITK_IS_SPACE(space1), FALSE); g_return_val_if_fail(AMITK_IS_SPACE(space2), FALSE); for (i_axis=0;i_axisaxes[i_axis], space2->axes[i_axis]); return inner; } gboolean amitk_space_equal(const AmitkSpace * space1, const AmitkSpace * space2) { g_return_val_if_fail(AMITK_IS_SPACE(space1), FALSE); g_return_val_if_fail(AMITK_IS_SPACE(space2), FALSE); if (POINT_EQUAL(space1->offset, space2->offset)) return amitk_space_axes_equal(space1, space2); else return FALSE; } void amitk_space_invert_axis (AmitkSpace * space, const AmitkAxis which_axis, const AmitkPoint center_of_inversion) { g_return_if_fail(AMITK_IS_SPACE(space)); g_signal_emit(G_OBJECT(space), space_signals[SPACE_INVERT], 0, which_axis, ¢er_of_inversion); g_signal_emit(G_OBJECT(space), space_signals[SPACE_CHANGED], 0); return; } /* rotate the entire coordinate space around the given vector */ void amitk_space_rotate_on_vector(AmitkSpace * space, const AmitkPoint vector, const amide_real_t theta, const AmitkPoint center_of_rotation) { g_return_if_fail(AMITK_IS_SPACE(space)); g_signal_emit(G_OBJECT(space), space_signals[SPACE_ROTATE], 0, &vector, theta, ¢er_of_rotation); g_signal_emit(G_OBJECT(space), space_signals[SPACE_CHANGED], 0); return; } /* given a view, and the layout, return the appropriate coordinate frame */ AmitkSpace * amitk_space_get_view_space(const AmitkView view, const AmitkLayout layout) { AmitkSpace * view_space; AmitkAxis i_axis; view_space = amitk_space_new(); for (i_axis=0;i_axisaxes[i_axis] = amitk_axes_get_orthogonal_axis(base_axes, view, layout, i_axis); amitk_axes_make_orthonormal(view_space->axes); /* safety */ return view_space; } /* given a coordinate frame, and a view, and the layout, sets the space to the appropriate coordinate space */ void amitk_space_set_view_space(AmitkSpace * set_space, const AmitkView view, const AmitkLayout layout) { AmitkSpace * temp_space; g_return_if_fail(AMITK_IS_SPACE(set_space)); temp_space = amitk_space_get_view_space(view, layout); amitk_space_copy_in_place(set_space, temp_space); g_object_unref(temp_space); return; } /* convert a point from the base coordinate frame to the given coordinate space */ AmitkPoint amitk_space_b2s(const AmitkSpace * space, AmitkPoint in_point) { AmitkPoint return_point; /* compensate the inpoint for the offset of the new coordinate frame */ POINT_SUB(in_point, space->offset, in_point); /* instead of multiplying by inv(A), we multiple by transpose(A), this is the same thing, as A is orthogonal */ return_point.x = in_point.x * space->axes[AMITK_AXIS_X].x + in_point.y * space->axes[AMITK_AXIS_X].y + in_point.z * space->axes[AMITK_AXIS_X].z; return_point.y = in_point.x * space->axes[AMITK_AXIS_Y].x + in_point.y * space->axes[AMITK_AXIS_Y].y + in_point.z * space->axes[AMITK_AXIS_Y].z; return_point.z = in_point.x * space->axes[AMITK_AXIS_Z].x + in_point.y * space->axes[AMITK_AXIS_Z].y + in_point.z * space->axes[AMITK_AXIS_Z].z; return return_point; } /* convert a point from the given coordinate spaace to the base coordinate frame */ AmitkPoint amitk_space_s2b(const AmitkSpace * space, const AmitkPoint in_point) { AmitkPoint return_point; return_point.x = in_point.x * space->axes[AMITK_AXIS_X].x + in_point.y * space->axes[AMITK_AXIS_Y].x + in_point.z * space->axes[AMITK_AXIS_Z].x; return_point.y = in_point.x * space->axes[AMITK_AXIS_X].y + in_point.y * space->axes[AMITK_AXIS_Y].y + in_point.z * space->axes[AMITK_AXIS_Z].y; return_point.z = in_point.x * space->axes[AMITK_AXIS_X].z + in_point.y * space->axes[AMITK_AXIS_Y].z + in_point.z * space->axes[AMITK_AXIS_Z].z; POINT_ADD(return_point, space->offset, return_point); return return_point; } /* converts a "dimensional" quantity (i.e. the size of a voxel) from a given space to the base coordinate system */ AmitkPoint amitk_space_s2b_dim(const AmitkSpace * space, const AmitkPoint in_point) { AmitkPoint return_point; AmitkPoint temp[AMITK_AXIS_NUM]; AmitkPoint temp_point; /* all the fabs/point_abs are 'cause dim's should always be positive */ temp_point.x = fabs(in_point.x); temp_point.y = temp_point.z = 0.0; temp[AMITK_AXIS_X]=point_abs(point_sub(amitk_space_s2b(space, temp_point), space->offset)); temp_point.y = fabs(in_point.y); temp_point.x = temp_point.z = 0.0; temp[AMITK_AXIS_Y]=point_abs(point_sub(amitk_space_s2b(space, temp_point), space->offset)); temp_point.z = fabs(in_point.z); temp_point.x = temp_point.y = 0.0; temp[AMITK_AXIS_Z]=point_abs(point_sub(amitk_space_s2b(space, temp_point), space->offset)); return_point.x = temp[AMITK_AXIS_X].x+temp[AMITK_AXIS_Y].x+temp[AMITK_AXIS_Z].x; return_point.y = temp[AMITK_AXIS_X].y+temp[AMITK_AXIS_Y].y+temp[AMITK_AXIS_Z].y; return_point.z = temp[AMITK_AXIS_X].z+temp[AMITK_AXIS_Y].z+temp[AMITK_AXIS_Z].z; return return_point; } /* converts a "dimensional" quantity (i.e. the size of a voxel) from the base coordinate space to the given coordinate space */ AmitkPoint amitk_space_b2s_dim(const AmitkSpace * space, const AmitkPoint in_point) { AmitkPoint return_point; AmitkPoint temp[AMITK_AXIS_NUM]; AmitkPoint temp_point; /* all the fabs/point_abs are 'cause dim's should always be positive */ temp_point.x = fabs(in_point.x); temp_point.y = temp_point.z = 0.0; temp[AMITK_AXIS_X]=point_abs(amitk_space_b2s(space, point_add(temp_point, space->offset))); temp_point.y = fabs(in_point.y); temp_point.x = temp_point.z = 0.0; temp[AMITK_AXIS_Y]=point_abs(amitk_space_b2s(space, point_add(temp_point, space->offset))); temp_point.z = fabs(in_point.z); temp_point.x = temp_point.y = 0.0; temp[AMITK_AXIS_Z]=point_abs(amitk_space_b2s(space, point_add(temp_point,space->offset))); return_point.x = temp[AMITK_AXIS_X].x+temp[AMITK_AXIS_Y].x+temp[AMITK_AXIS_Z].x; return_point.y = temp[AMITK_AXIS_X].y+temp[AMITK_AXIS_Y].y+temp[AMITK_AXIS_Z].y; return_point.z = temp[AMITK_AXIS_X].z+temp[AMITK_AXIS_Y].z+temp[AMITK_AXIS_Z].z; return return_point; } /* little utility function for debugging */ void amitk_space_print(AmitkSpace * space, gchar * message) { g_print("%s\n", message); g_print("\toffset:\t% 5.5f\t% 5.5f\t% 5.5f\n", space->offset.x, space->offset.y, space->offset.z); g_print("\taxis x:\t% 5.5f\t% 5.5f\t% 5.5f\n", space->axes[AMITK_AXIS_X].x,space->axes[AMITK_AXIS_X].y, space->axes[AMITK_AXIS_X].z); g_print("\taxis y:\t% 5.5f\t% 5.5f\t% 5.5f\n", space->axes[AMITK_AXIS_Y].x,space->axes[AMITK_AXIS_Y].y, space->axes[AMITK_AXIS_Y].z); g_print("\taxis z:\t% 5.5f\t% 5.5f\t% 5.5f\n", space->axes[AMITK_AXIS_Z].x,space->axes[AMITK_AXIS_Z].y, space->axes[AMITK_AXIS_Z].z); return; } amide-1.0.5/src/amitk_space_edit.c0000664000175000017500000003423712270273754016710 0ustar loeningloening/* amitk_space_edit.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amide.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" #include "amitk_space_edit.h" #include "amitk_study.h" #define DEFAULT_ENTRY_WIDTH 100 static void space_edit_class_init (AmitkSpaceEditClass *klass); static void space_edit_init (AmitkSpaceEdit *space_edit); static void space_edit_destroy(GtkObject * object); static void space_edit_update_entries(AmitkSpaceEdit * space_edit); static void space_edit_rotate_axis(GtkAdjustment * adjustment, gpointer data); static gboolean space_edit_prompt(AmitkSpaceEdit * space_edit, const gchar * message); static void space_edit_apply_entries(GtkWidget * button, gpointer space_edit); static void space_edit_reset_axis(GtkWidget * button, gpointer data); static void space_edit_invert_axis(GtkWidget * button, gpointer data); #if 0 static void space_edit_apply_air(GtkWidget * button, gpointer data); static void space_edit_export_air(GtkWidget * button, gpointer data); #endif static GtkVBoxClass *parent_class; GType amitk_space_edit_get_type (void) { static GType space_edit_type = 0; if (!space_edit_type) { static const GTypeInfo space_edit_info = { sizeof (AmitkSpaceEditClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) space_edit_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (AmitkSpaceEdit), 0, /* # preallocs */ (GInstanceInitFunc) space_edit_init, NULL /* value table */ }; space_edit_type = g_type_register_static(GTK_TYPE_VBOX, "AmitkSpaceEdit", &space_edit_info, 0); } return space_edit_type; } static void space_edit_class_init (AmitkSpaceEditClass *klass) { /* GObjectClass *gobject_class; GtkWidgetClass *widget_class; */ GtkObjectClass *gtkobject_class; /* gobject_class = (GObjectClass *) klass; widget_class = (GtkWidgetClass*) klass; */ gtkobject_class = (GtkObjectClass*) klass; parent_class = g_type_class_peek_parent(klass); gtkobject_class->destroy = space_edit_destroy; } static void space_edit_init (AmitkSpaceEdit *space_edit) { GtkWidget * table; GtkWidget * slider; GtkWidget * label; GtkWidget * button; GtkWidget * hseparator; guint row=0; AmitkView i_view; GtkObject * adjustment; AmitkAxis i_axis, j_axis; /* initialize some critical stuff */ space_edit->object = NULL; table = gtk_table_new(14,5, FALSE); gtk_container_add(GTK_CONTAINER(space_edit), table); gtk_widget_show(table); /* the sliders to spin on a view */ for (i_view=0;i_view< AMITK_VIEW_NUM;i_view++) { /* label */ label = gtk_label_new(amitk_view_get_name(i_view)); gtk_table_attach(GTK_TABLE(table), label, 0,1, row, row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); /* the slider */ adjustment = gtk_adjustment_new(0,-45.0,45.5,0.5,0.5,0.5); g_object_set_data(G_OBJECT(adjustment), "view", GINT_TO_POINTER(i_view)); slider = gtk_hscale_new(GTK_ADJUSTMENT(adjustment)); gtk_range_set_update_policy(GTK_RANGE(slider), GTK_UPDATE_DISCONTINUOUS); gtk_table_attach(GTK_TABLE(table), slider, 1,5, row, row+1, X_PACKING_OPTIONS | GTK_FILL,FALSE, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(adjustment), "value_changed", G_CALLBACK(space_edit_rotate_axis), space_edit); gtk_widget_show(slider); row++; } /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(table), hseparator, 0, 5, row, row+1,GTK_FILL, 0, X_PADDING, Y_PADDING); row++; gtk_widget_show(hseparator); /* and a display of the current axis */ label = gtk_label_new(_("i")); gtk_table_attach(GTK_TABLE(table), label, 1,2, row, row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); label = gtk_label_new(_("j")); gtk_table_attach(GTK_TABLE(table), label, 2,3, row, row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); label = gtk_label_new(_("k")); gtk_table_attach(GTK_TABLE(table), label, 3,4, row, row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); row++; for (i_axis=0;i_axisentry[i_axis][j_axis] = gtk_entry_new(); gtk_widget_set_size_request(space_edit->entry[i_axis][j_axis], DEFAULT_ENTRY_WIDTH,-1); gtk_editable_set_editable(GTK_EDITABLE(space_edit->entry[i_axis][j_axis]), TRUE); gtk_table_attach(GTK_TABLE(table), space_edit->entry[i_axis][j_axis],j_axis+1, j_axis+2, row, row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(space_edit->entry[i_axis][j_axis]); } /* the invert button */ button = gtk_button_new_with_label("invert axis"); gtk_table_attach(GTK_TABLE(table), button, 4,5, row, row+1, 0, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(button), "axis", GINT_TO_POINTER(i_axis)); g_signal_connect(G_OBJECT(button), "pressed", G_CALLBACK(space_edit_invert_axis), space_edit); gtk_widget_show(button); row++; } label = gtk_label_new(_("data set axis:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, row, row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); /* button to apply entries */ button = gtk_button_new_with_label(_("apply manual entries")); gtk_table_attach(GTK_TABLE(table), button, 1,2, row, row+1, 0, 0, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(button), "pressed", G_CALLBACK(space_edit_apply_entries), space_edit); gtk_widget_show(button); /* button to reset the axis */ button = gtk_button_new_with_label(_("reset to identity")); gtk_table_attach(GTK_TABLE(table), button, 2,3, row, row+1, 0, 0, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(button), "pressed", G_CALLBACK(space_edit_reset_axis), space_edit); gtk_widget_show(button); row++; #if 0 /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(table), hseparator, 0, 5, row, row+1,GTK_FILL, 0, X_PADDING, Y_PADDING); row++; gtk_widget_show(hseparator); /* our AIR buttons */ label = gtk_label_new(_("AIR Files:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, row, row+1, 0, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); button = gtk_button_new_with_label(_("Apply .AIR")); gtk_table_attach(GTK_TABLE(table), button, 1,2, row, row+1, 0, 0, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(button), "pressed", G_CALLBACK(space_edit_apply_air), space_edit); gtk_widget_show(button); button = gtk_button_new_with_label(_("Export .AIR")); gtk_table_attach(GTK_TABLE(table), button, 2,3, row, row+1, 0, 0, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(button), "pressed", G_CALLBACK(space_edit_export_air), space_edit); gtk_widget_show(button); row++; #endif } static void space_edit_destroy (GtkObject * gtkobject) { AmitkSpaceEdit * space_edit; g_return_if_fail (gtkobject != NULL); g_return_if_fail (AMITK_IS_SPACE_EDIT (gtkobject)); space_edit = AMITK_SPACE_EDIT(gtkobject); if (space_edit->object != NULL) { g_signal_handlers_disconnect_by_func(G_OBJECT(space_edit->object), space_edit_update_entries, space_edit); amitk_object_unref(space_edit->object); space_edit->object = NULL; } if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (gtkobject); } /* function to update the entry widgets */ static void space_edit_update_entries(AmitkSpaceEdit * space_edit) { AmitkAxis i_axis, j_axis; gchar * temp_string; AmitkPoint one_axis; g_return_if_fail(AMITK_IS_SPACE_EDIT(space_edit)); for (i_axis=0;i_axisobject), i_axis); for (j_axis=0; j_axisentry[i_axis][j_axis]), temp_string); g_free(temp_string); } } return; } static void space_edit_rotate_axis(GtkAdjustment * adjustment, gpointer data) { AmitkSpaceEdit * space_edit = data; AmitkView i_view; amide_real_t rotation; AmitkPoint center; /* figure out which scale widget called me */ i_view = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(adjustment),"view")); rotation = (adjustment->value/180)*M_PI; /* get rotation in radians */ /* compensate for sagittal being a left-handed coordinate frame */ if (i_view == AMITK_VIEW_SAGITTAL) rotation = -rotation; if (AMITK_IS_VOLUME(space_edit->object)) center = amitk_volume_get_center(AMITK_VOLUME(space_edit->object)); else if (AMITK_IS_STUDY(space_edit->object)) center = AMITK_STUDY_VIEW_CENTER(space_edit->object); else center = AMITK_SPACE_OFFSET(space_edit->object); /* rotate the axis */ amitk_space_rotate_on_vector(AMITK_SPACE(space_edit->object), amitk_axes_get_normal_axis(base_axes, i_view), rotation, center); /* return adjustment back to normal */ adjustment->value = 0.0; gtk_adjustment_changed(adjustment); return; } static gboolean space_edit_prompt(AmitkSpaceEdit * space_edit, const gchar * message) { GtkWidget * question; gint return_val; GtkWidget *toplevel; GtkWindow *window; toplevel = gtk_widget_get_toplevel (GTK_WIDGET(space_edit)); if (toplevel != NULL) window = GTK_WINDOW(toplevel); else window = NULL; question = gtk_message_dialog_new(window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, "%s", message); return_val = gtk_dialog_run(GTK_DIALOG(question)); gtk_widget_destroy(question); if (return_val != GTK_RESPONSE_OK) return FALSE; else return TRUE; } static void space_edit_apply_entries(GtkWidget * entry, gpointer data) { AmitkSpaceEdit * space_edit = data; AmitkAxis i_axis, j_axis; const gchar * text; AmitkAxes axes; gdouble temp_real; AmitkPoint center; gint error; /* first double check that we really want to do this */ if (!space_edit_prompt(space_edit, _("Do you really wish to manual set the axis?\nThis may flip left/right relationships"))) return; for (i_axis=0;i_axisentry[i_axis][j_axis])); error = sscanf(text, "%lf", &temp_real); if (error != EOF) point_set_component(&(axes[i_axis]), j_axis, temp_real); } } amitk_axes_make_orthonormal(axes); if (AMITK_IS_VOLUME(space_edit->object)) center = amitk_volume_get_center(AMITK_VOLUME(space_edit->object)); else center = AMITK_SPACE_OFFSET(space_edit->object); amitk_space_set_axes(AMITK_SPACE(space_edit->object), axes, center); return; } static void space_edit_reset_axis(GtkWidget * button, gpointer data) { AmitkSpaceEdit * space_edit = data; AmitkPoint center; /* first double check that we really want to do this */ if (!space_edit_prompt(space_edit, _("Do you really wish to reset the axis to identity?\nThis may flip left/right relationships"))) return; /* shift the coord frame to the center of rotation, and save the old offset */ if (AMITK_IS_VOLUME(space_edit->object)) center = amitk_volume_get_center(AMITK_VOLUME(space_edit->object)); else if (AMITK_IS_STUDY(space_edit->object)) center = AMITK_STUDY_VIEW_CENTER(space_edit->object); else center = AMITK_SPACE_OFFSET(space_edit->object); /* reset the axis */ amitk_space_set_axes(AMITK_SPACE(space_edit->object), base_axes, center); return; } static void space_edit_invert_axis(GtkWidget * button, gpointer data) { AmitkSpaceEdit * space_edit = data; AmitkAxis i_axis; AmitkPoint center; /* first double check that we really want to do this */ if (!space_edit_prompt(space_edit, _("Do you really wish to invert?\nThis will flip left/right relationships"))) return; i_axis = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button), "axis")); /* shift the coord frame to the center of rotation, and save the old offset */ if (AMITK_IS_VOLUME(space_edit->object)) center = amitk_volume_get_center(AMITK_VOLUME(space_edit->object)); else if (AMITK_IS_STUDY(space_edit->object)) center = AMITK_STUDY_VIEW_CENTER(space_edit->object); else center = AMITK_SPACE_OFFSET(space_edit->object); /* invert the axis */ amitk_space_invert_axis(AMITK_SPACE(space_edit->object), i_axis, center); return; } #if 0 static void space_edit_apply_air(GtkWidget * button, gpointer data) { AmitkSpaceEdit * space_edit = data; g_warning("not yet implemented\n"); return; } static void space_edit_export_air(GtkWidget * button, gpointer data) { AmitkSpaceEdit * space_edit = data; g_warning("not yet implemented\n"); return; } #endif GtkWidget * amitk_space_edit_new(AmitkObject * object) { AmitkSpaceEdit * space_edit; g_return_val_if_fail(AMITK_IS_OBJECT(object), NULL); space_edit = g_object_new(amitk_space_edit_get_type (), NULL); space_edit->object = amitk_object_ref(object); g_signal_connect_swapped(G_OBJECT(object), "space_changed", G_CALLBACK(space_edit_update_entries), space_edit); space_edit_update_entries(space_edit); return GTK_WIDGET (space_edit); } amide-1.0.5/src/amitk_canvas_object.h0000664000175000017500000000331412270274576017411 0ustar loeningloening/* amitk_canvas_object.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2004-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_CANVAS_OBJECT_H__ #define __AMITK_CANVAS_OBJECT_H__ /* includes we always need with this widget */ #include #include #include #include "amitk_volume.h" #include "amitk_color_table.h" G_BEGIN_DECLS GnomeCanvasItem * amitk_canvas_object_draw(GnomeCanvas * canvas, AmitkVolume * canvas_volume, AmitkObject * object, AmitkViewMode view_mode, GnomeCanvasItem * item, amide_real_t pixel_dim, gint width, gint height, gdouble x_offset, gdouble y_offset, rgba_t roi_color, gint roi_width, #ifdef AMIDE_LIBGNOMECANVAS_AA gdouble transparency #else GdkLineStyle line_style, gboolean fill_roi #endif ); G_END_DECLS #endif /* __AMITK_CANVAS_OBJECT_H__ */ amide-1.0.5/src/alignment_procrustes.c0000664000175000017500000003062012270273626017660 0ustar loeningloening/* alignment.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #ifdef AMIDE_LIBGSL_SUPPORT #include #include #include #include #include "alignment_procrustes.h" #include "amitk_fiducial_mark.h" /* convient functions that gsl doesn't supply */ static gsl_matrix * matrix_mult(gsl_matrix * matrix1, gsl_matrix * matrix2) { gsl_matrix * matrix_r = NULL; gint i,j,k; gdouble temp_value; g_return_val_if_fail(matrix1->size2 == matrix2->size1, NULL); matrix_r = gsl_matrix_alloc(matrix1->size1,matrix2->size2); for (i=0; isize1; i++) for (j=0; jsize2; j++) { temp_value = 0; for (k=0; ksize2; k++) temp_value += gsl_matrix_get(matrix1, i, k) * gsl_matrix_get(matrix2, k, j); gsl_matrix_set(matrix_r, i, j, temp_value); } return matrix_r; } static AmitkPoint matrix_mult_point(gsl_matrix * matrix, AmitkPoint rp) { AmitkPoint return_point; g_return_val_if_fail(matrix->size1 == AMITK_AXIS_NUM, rp); g_return_val_if_fail(matrix->size2 == AMITK_AXIS_NUM, rp); return_point.x = \ gsl_matrix_get(matrix, 0, 0)*rp.x + gsl_matrix_get(matrix, 0, 1)*rp.y + gsl_matrix_get(matrix, 0, 2)*rp.z; return_point.y = \ gsl_matrix_get(matrix, 1, 0)*rp.x + gsl_matrix_get(matrix, 1, 1)*rp.y + gsl_matrix_get(matrix, 1, 2)*rp.z; return_point.z = \ gsl_matrix_get(matrix, 2, 0)*rp.x + gsl_matrix_get(matrix, 2, 1)*rp.y + gsl_matrix_get(matrix, 2, 2)*rp.z; return return_point; } /* this is the procrustes rigid registration algorithm, derived from the review article: "Medical Image Registration", Hill, Batchelor, Holden, and Hawkes Phys. Med. Biol 46 (2001) R1-R45 */ AmitkSpace * alignment_procrustes(AmitkDataSet * moving_ds, AmitkDataSet * fixed_ds, GList * marks, gdouble *pointer_fiducial_reference_error) { AmitkSpace * transform_space=NULL; guint count = 0; GList * moving_fiducial_marks = NULL; GList * fixed_fiducial_marks = NULL; GList * moving_temp_list; GList * fixed_temp_list; AmitkObject * moving_fiducial_mark; AmitkObject * fixed_fiducial_mark; AmitkFiducialMark * fiducial_mark; AmitkPoint moving_centroid = zero_point; AmitkPoint fixed_centroid = zero_point; AmitkPoint temp_point; AmitkPoint shift; AmitkPoint offset_shift; AmitkAxes axis; AmitkPoint moving_center; AmitkPoint fixed_center; gsl_matrix * fixed_matrix=NULL; gsl_matrix * moving_matrixt=NULL; gsl_matrix * matrix_a; gsl_matrix * matrix_v; gsl_matrix * matrix_r=NULL; gsl_matrix * matrix_temp; gsl_matrix * matrix_diag; gsl_permutation * permutation; gsl_vector * vector_s; gsl_vector * vector_w; gint i; gint signum; gdouble det; gdouble fre; gint status; const char * mark_name; g_return_val_if_fail(AMITK_IS_DATA_SET(moving_ds), NULL); g_return_val_if_fail(AMITK_IS_DATA_SET(fixed_ds), NULL); g_return_val_if_fail(marks != NULL, NULL); /* get the two lists of points */ while (marks != NULL) { fiducial_mark = marks->data; if (AMITK_IS_FIDUCIAL_MARK(fiducial_mark) || AMITK_IS_VOLUME(fiducial_mark)) { mark_name = AMITK_OBJECT_NAME(fiducial_mark); moving_fiducial_mark = amitk_objects_find_object_by_name(AMITK_OBJECT_CHILDREN(moving_ds), mark_name); fixed_fiducial_mark = amitk_objects_find_object_by_name(AMITK_OBJECT_CHILDREN(fixed_ds), mark_name); if ((AMITK_IS_FIDUCIAL_MARK(moving_fiducial_mark) || AMITK_IS_VOLUME(moving_fiducial_mark)) && (AMITK_IS_FIDUCIAL_MARK(fixed_fiducial_mark) || AMITK_IS_VOLUME(moving_fiducial_mark))) { moving_fiducial_marks = g_list_append(moving_fiducial_marks, amitk_object_ref(moving_fiducial_mark)); if (AMITK_IS_FIDUCIAL_MARK(moving_fiducial_mark)) moving_center = AMITK_FIDUCIAL_MARK_GET(moving_fiducial_mark); else /* (AMITK_IS_VOLUME(moving_fiducial_mark) - maybe someday data sets will be fiducials */ moving_center = amitk_volume_get_center(AMITK_VOLUME(moving_fiducial_mark)); moving_centroid = point_add(moving_centroid, moving_center); fixed_fiducial_marks = g_list_append(fixed_fiducial_marks, amitk_object_ref(fixed_fiducial_mark)); if (AMITK_IS_FIDUCIAL_MARK(fixed_fiducial_mark)) fixed_center = AMITK_FIDUCIAL_MARK_GET(fixed_fiducial_mark); else /* (AMITK_IS_VOLUME(fixed_fiducial_mark) - maybe someday data sets will be fiducials */ fixed_center = amitk_volume_get_center(AMITK_VOLUME(fixed_fiducial_mark)); fixed_centroid = point_add(fixed_centroid, fixed_center); count++; } } marks = marks->next; } /* calculate the centroid of each point set */ moving_centroid = point_cmult((1.0/(gdouble) count), moving_centroid); fixed_centroid = point_cmult((1.0/(gdouble) count), fixed_centroid); /* sanity check */ if (count < 3) { g_warning(_("Cannot perform an alignment with %d points, need at least 3"),count); goto ending; } /* translate the points into data structures that GSL can handle */ /* also demean the alignment points so the centroid of each set is the origin */ /* the matrix are constructed such that each row is a point */ /* moving_matrixt is the transpose of the moving matrix */ moving_matrixt = gsl_matrix_alloc(AMITK_AXIS_NUM, count); fixed_matrix = gsl_matrix_alloc(count, AMITK_AXIS_NUM); moving_temp_list = moving_fiducial_marks; fixed_temp_list = fixed_fiducial_marks; for (i=0;idata; moving_temp_list = moving_temp_list->next; fixed_fiducial_mark = fixed_temp_list->data; fixed_temp_list = fixed_temp_list->next; if (AMITK_IS_FIDUCIAL_MARK(moving_fiducial_mark)) moving_center = AMITK_FIDUCIAL_MARK_GET(moving_fiducial_mark); else /* (AMITK_IS_VOLUME(moving_fiducial_mark) - maybe someday data sets will be fiducials */ moving_center = amitk_volume_get_center(AMITK_VOLUME(moving_fiducial_mark)); temp_point = point_sub(moving_center, moving_centroid); gsl_matrix_set(moving_matrixt, AMITK_AXIS_X, i, temp_point.x); gsl_matrix_set(moving_matrixt, AMITK_AXIS_Y, i, temp_point.y); gsl_matrix_set(moving_matrixt, AMITK_AXIS_Z, i, temp_point.z); if (AMITK_IS_FIDUCIAL_MARK(fixed_fiducial_mark)) fixed_center = AMITK_FIDUCIAL_MARK_GET(fixed_fiducial_mark); else /* (AMITK_IS_VOLUME(fixed_fiducial_mark) - maybe someday data sets will be fiducials */ fixed_center = amitk_volume_get_center(AMITK_VOLUME(fixed_fiducial_mark)); temp_point = point_sub(fixed_center,fixed_centroid); gsl_matrix_set(fixed_matrix, i, AMITK_AXIS_X, temp_point.x); gsl_matrix_set(fixed_matrix, i, AMITK_AXIS_Y, temp_point.y); gsl_matrix_set(fixed_matrix, i, AMITK_AXIS_Z, temp_point.z); } if ((fixed_temp_list != NULL) || (moving_temp_list != NULL)) { g_warning(_("points lists not completely used in %s at %d"), __FILE__, __LINE__); goto ending; } /* calculate the correlation matrix */ matrix_a = matrix_mult(moving_matrixt, fixed_matrix); /* get the singular value decomposition of the correlation matrix -> matrix_a = U*S*Vt notes: the function will place the value of U into matrix_a gsl_linalg_SV_decomp_jacobi will return an unsuitable matrix_v, don't use it */ matrix_v = gsl_matrix_alloc(AMITK_AXIS_NUM, AMITK_AXIS_NUM); vector_s = gsl_vector_alloc(AMITK_AXIS_NUM); vector_w = gsl_vector_alloc(AMITK_AXIS_NUM); status = gsl_linalg_SV_decomp(matrix_a, matrix_v, vector_s, vector_w); if (status != 0) g_warning(_("SV decomp returned error: %s"), gsl_strerror(status)); gsl_vector_free(vector_s); gsl_vector_free(vector_w); /* get U transpose */ status = gsl_matrix_transpose(matrix_a); if (status != 0) g_warning(_("transpose returned error: %s"), gsl_strerror(status)); /* figure out the determinant of V*Ut */ matrix_temp = matrix_mult(matrix_v, matrix_a); permutation = gsl_permutation_alloc(AMITK_AXIS_NUM); status = gsl_linalg_LU_decomp(matrix_temp, permutation, &signum); if (status != 0) g_warning(_("LU decomp returned error: %s"), gsl_strerror(status)); det = gsl_linalg_LU_det(matrix_temp, signum); g_return_val_if_fail(fabs(det) > 0.1, NULL); /* needs to be -1 or 1 */ gsl_permutation_free(permutation); gsl_matrix_free(matrix_temp); /* compute the rotation r = V * delta * Ut, where delta = diag(1,1,det(V,Ut))*/ matrix_diag = gsl_matrix_alloc(AMITK_AXIS_NUM, AMITK_AXIS_NUM); gsl_matrix_set_identity (matrix_diag); if (fabs(det) > 0.1) gsl_matrix_set(matrix_diag, AMITK_AXIS_NUM-1, AMITK_AXIS_NUM-1, det); matrix_temp = matrix_mult(matrix_diag, matrix_a); matrix_r = matrix_mult(matrix_v, matrix_temp); gsl_matrix_free(matrix_temp); gsl_matrix_free(matrix_diag); gsl_matrix_free(matrix_a); gsl_matrix_free(matrix_v); transform_space = amitk_space_new(); /* transfer over the rotation matrix */ for (i=0;idata; moving_temp_list = moving_temp_list->next; fixed_fiducial_mark = fixed_temp_list->data; fixed_temp_list = fixed_temp_list->next; if (AMITK_IS_FIDUCIAL_MARK(moving_fiducial_mark)) moving_center = AMITK_FIDUCIAL_MARK_GET(moving_fiducial_mark); else /* (AMITK_IS_VOLUME(moving_fiducial_mark) - maybe someday data sets will be fiducials */ moving_center = amitk_volume_get_center(AMITK_VOLUME(moving_fiducial_mark)); if (AMITK_IS_FIDUCIAL_MARK(fixed_fiducial_mark)) fixed_center = AMITK_FIDUCIAL_MARK_GET(fixed_fiducial_mark); else /* (AMITK_IS_VOLUME(fixed_fiducial_mark) - maybe someday data sets will be fiducials */ fixed_center = amitk_volume_get_center(AMITK_VOLUME(fixed_fiducial_mark)); moving_center = amitk_space_b2s(AMITK_SPACE(moving_ds), moving_center); moving_center = amitk_space_s2b(new_space,moving_center); fre += point_mag(point_sub(moving_center, fixed_center)); } fre = fre/((gdouble) count); *pointer_fiducial_reference_error = fre; if (new_space != NULL) g_object_unref(new_space); } ending: /* garbage collection */ if (matrix_r != NULL) gsl_matrix_free(matrix_r); if (moving_fiducial_marks != NULL) amitk_objects_unref(moving_fiducial_marks); if (fixed_fiducial_marks != NULL) amitk_objects_unref(fixed_fiducial_marks); if (fixed_matrix != NULL) gsl_matrix_free(fixed_matrix); if (moving_matrixt != NULL) gsl_matrix_free(moving_matrixt); return transform_space; } #endif /* AMIDE_LIBGSL_SUPPORT */ amide-1.0.5/src/tb_filter.h0000664000175000017500000000203112270274502015355 0ustar loeningloening/* tb_filter.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* includes always needed with this */ #include "amitk_study.h" /* external functions */ void tb_filter(AmitkStudy * study, AmitkDataSet * active_ds, GtkWindow * parent); amide-1.0.5/src/amitk_color_table_menu.c0000664000175000017500000000721312270273657020115 0ustar loeningloening/* amitk_color_table_menu.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" #include "amitk_color_table_menu.h" #include "image.h" #define MENU_COLOR_SCALE_HEIGHT 8 #define MENU_COLOR_SCALE_WIDTH 30 static void color_table_menu_class_init (AmitkColorTableMenuClass *klass); static void color_table_menu_init (AmitkColorTableMenu *menu); //static GtkComboBoxClass *parent_class; static GtkComboBoxClass *parent_class; GType amitk_color_table_menu_get_type (void) { static GType color_table_menu_type = 0; if (!color_table_menu_type) { static const GTypeInfo color_table_menu_info = { sizeof (AmitkColorTableMenuClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) color_table_menu_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (AmitkColorTableMenu), 0, /* # preallocs */ (GInstanceInitFunc) color_table_menu_init, NULL /* value table */ }; color_table_menu_type = g_type_register_static(GTK_TYPE_COMBO_BOX, "AmitkColorTableMenu", &color_table_menu_info, 0); } return color_table_menu_type; } static void color_table_menu_class_init (AmitkColorTableMenuClass *klass) { parent_class = g_type_class_peek_parent(klass); } static void color_table_menu_init (AmitkColorTableMenu * ct_menu) { GtkCellRenderer *renderer; GdkPixbuf *pixbuf; GtkTreeIter iter; GtkListStore *store; AmitkColorTable i_color_table; /* create the store of data */ store = gtk_list_store_new(2, /* NUM_COLUMNS */ GDK_TYPE_PIXBUF, G_TYPE_STRING); for(i_color_table=0; i_color_table */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "legacy.h" /* external variables */ static gchar * roi_type_names[] = { "Ellipsoid", "Elliptic Cylinder", "Box", "2D Isocontour", "3D Isocontour" }; #define NUM_ROI_TYPES 5 static gchar * modality_names[] = { "PET", "SPECT", "CT", "MRI", "Other" }; #define NUM_MODALITIES 5 static gchar * threshold_names[] = { "per slice", "per frame", "interpolated between frames", "global" }; #define LEGACY_COLOR_TABLE_NUM 22 gchar * color_table_legacy_names[] = { "black/white linear", "white/black linear", "black/white/black", "white/black/white", "red temperature", "inverse red temp.", "blue temperature", "inv. blue temp.", "green temperature", "inv. green temp.", "hot metal", "inv. hot metal", "hot blue", "inverse hot blue", "hot green", "inverse hot green", "spectrum", "inverse spectrum", "NIH + white", "inv. NIH + white", "NIH", "inverse NIH" }; #define NUM_THRESHOLDS 4 static AmitkVoxel voxel3d_read_xml(xmlNodePtr nodes, gchar * descriptor, gchar **perror_buf) { gchar * temp_string; AmitkVoxel return_vp; gint x,y,z; gint error=0; return_vp = zero_voxel; temp_string = xml_get_string(nodes, descriptor); if (temp_string != NULL) { /* convert to a voxel */ error = sscanf(temp_string,"%d\t%d\t%d", &x,&y,&z); g_free(temp_string); return_vp.x = x; return_vp.y = y; return_vp.z = z; return_vp.g = 1; return_vp.t = 1; } if ((temp_string == NULL) || (error == EOF)) { return_vp.x = return_vp.y = return_vp.z = return_vp.g = return_vp.t = 0; amitk_append_str_with_newline(perror_buf,"Couldn't read value for %s, substituting [%d %d %d %d %d]", descriptor, return_vp.x, return_vp.y, return_vp.z, return_vp.g, return_vp.t); } return return_vp; } /* function to load in a raw_data structure from a legacy file */ static AmitkRawData * data_set_load_xml(gchar * data_set_xml_filename, gchar **perror_buf) { xmlDocPtr doc; AmitkRawData * new_data_set; xmlNodePtr nodes; AmitkRawFormat i_raw_data_format, raw_data_format; gchar * temp_string; gchar * data_set_raw_filename; AmitkVoxel dim; /* parse the xml file */ if ((doc = xmlParseFile(data_set_xml_filename)) == NULL) { amitk_append_str_with_newline(perror_buf,"Couldn't Parse AMIDE data_set xml file %s", data_set_xml_filename); return NULL; } /* get the root of our document */ if ((nodes = xmlDocGetRootElement(doc)) == NULL) { amitk_append_str_with_newline(perror_buf,"Data Set xml file doesn't appear to have a root: %s", data_set_xml_filename); return NULL; } /* get the document tree */ nodes = nodes->children; /* figure out the data format */ temp_string = xml_get_string(nodes, "raw_data_format"); #if (G_BYTE_ORDER == G_BIG_ENDIAN) raw_data_format = AMITK_RAW_FORMAT_DOUBLE_64_BE; #else /* (G_BYTE_ORDER == G_LITTLE_ENDIAN) */ raw_data_format = AMITK_RAW_FORMAT_DOUBLE_64_LE; #endif if (temp_string != NULL) for (i_raw_data_format=0; i_raw_data_format < AMITK_RAW_FORMAT_NUM; i_raw_data_format++) if (g_ascii_strcasecmp(temp_string, amitk_raw_format_legacy_names[i_raw_data_format]) == 0) raw_data_format = i_raw_data_format; g_free(temp_string); /* get the rest of the parameters */ dim = amitk_voxel_read_xml(nodes, "dim", perror_buf); /* get the name of our associated data file */ data_set_raw_filename = xml_get_string(nodes, "raw_data_file"); /* now load in the raw data */ #ifdef AMIDE_DEBUG g_print("reading data from file %s\n", data_set_raw_filename); #endif new_data_set = amitk_raw_data_import_raw_file(data_set_raw_filename, NULL, raw_data_format, dim, 0, NULL, NULL); /* and we're done */ g_free(data_set_raw_filename); xmlFreeDoc(doc); return new_data_set; } /* function to load in an alignment point xml file */ static AmitkFiducialMark * align_pt_load_xml(gchar * pt_xml_filename, gchar **perror_buf, AmitkSpace *space) { xmlDocPtr doc; AmitkFiducialMark * new_pt; AmitkPoint point; xmlNodePtr nodes; gchar * temp_string; /* parse the xml file */ if ((doc = xmlParseFile(pt_xml_filename)) == NULL) { amitk_append_str_with_newline(perror_buf, "Couldn't Parse AMIDE alignment point xml file %s", pt_xml_filename); return NULL; } /* get the root of our document */ if ((nodes = xmlDocGetRootElement(doc)) == NULL) { amitk_append_str_with_newline(perror_buf,"AMIDE alignment point xml file doesn't appear to have a root: %s", pt_xml_filename); return NULL; } new_pt = amitk_fiducial_mark_new(); /* get the name */ temp_string = xml_get_string(nodes->children, "text"); if (temp_string != NULL) { amitk_object_set_name(AMITK_OBJECT(new_pt), temp_string); g_free(temp_string); } /* get the document tree */ nodes = nodes->children; /* previous to version xif version 2.0, points were defined only with respect to their parent's space*/ amitk_space_copy_in_place(AMITK_SPACE(new_pt), space); /* the "point" option was eliminated in version 0.7.11, just using the space's offset instead */ point = amitk_point_read_xml(nodes, "point", perror_buf); point = amitk_space_s2b(AMITK_SPACE(new_pt), point); amitk_space_set_offset(AMITK_SPACE(new_pt), point); /* and we're done */ xmlFreeDoc(doc); return new_pt; } /* function to load in a list of alignment point xml nodes */ static GList * align_pts_load_xml(xmlNodePtr node_list, gchar **perror_buf, AmitkSpace * space) { gchar * file_name; GList * new_pts; AmitkFiducialMark * new_pt; if (node_list != NULL) { /* first, recurse on through the list */ new_pts = align_pts_load_xml(node_list->next, perror_buf, space); /* load in this node */ file_name = xml_get_string(node_list->children, "text"); new_pt = align_pt_load_xml(file_name, perror_buf, space); new_pts = g_list_prepend(new_pts, new_pt); g_free(file_name); } else new_pts = NULL; return new_pts; } /* function to load in a volume xml file */ static AmitkDataSet * volume_load_xml(gchar * volume_xml_filename, AmitkInterpolation interpolation, gchar ** perror_buf) { xmlDocPtr doc; AmitkDataSet * new_volume; xmlNodePtr nodes; xmlNodePtr pts_nodes; AmitkModality i_modality; AmitkColorTable i_color_table; AmitkThresholding i_thresholding; gchar * temp_string; gchar * scan_date; gchar * data_set_xml_filename; gchar * internal_scaling_xml_filename; GList * align_pts; AmitkSpace * space; AmitkViewMode i_view_mode; /* parse the xml file */ if ((doc = xmlParseFile(volume_xml_filename)) == NULL) { amitk_append_str_with_newline(perror_buf,"Couldn't Parse AMIDE volume xml file %s", volume_xml_filename); return NULL; } /* get the root of our document */ if ((nodes = xmlDocGetRootElement(doc)) == NULL) { amitk_append_str_with_newline(perror_buf,"AMIDE volume xml file doesn't appear to have a root: %s", volume_xml_filename); return NULL; } new_volume = amitk_data_set_new(NULL, -1); new_volume->interpolation = interpolation; /* get the volume name */ temp_string = xml_get_string(nodes->children, "text"); if (temp_string != NULL) { amitk_object_set_name(AMITK_OBJECT(new_volume),temp_string); g_free(temp_string); } /* get the document tree */ nodes = nodes->children; /* get the date the scan was made */ scan_date = xml_get_string(nodes, "scan_date"); amitk_data_set_set_scan_date(new_volume, scan_date); g_free(scan_date); /* figure out the modality */ temp_string = xml_get_string(nodes, "modality"); if (temp_string != NULL) for (i_modality=0; i_modality < NUM_MODALITIES; i_modality++) if (g_ascii_strcasecmp(temp_string, modality_names[i_modality]) == 0) new_volume->modality = i_modality; g_free(temp_string); /* figure out the color table */ temp_string = xml_get_string(nodes, "color_table"); if (temp_string != NULL) for (i_color_table=0; i_color_table < LEGACY_COLOR_TABLE_NUM; i_color_table++) if (g_ascii_strcasecmp(temp_string, color_table_legacy_names[i_color_table]) == 0) for (i_view_mode=0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) new_volume->color_table[i_view_mode] = i_color_table; g_free(temp_string); /* load in our data set */ data_set_xml_filename = xml_get_string(nodes, "data_set_file"); internal_scaling_xml_filename = xml_get_string(nodes, "internal_scaling_file"); if ((data_set_xml_filename != NULL) && (internal_scaling_xml_filename != NULL)) { new_volume->raw_data = data_set_load_xml(data_set_xml_filename, perror_buf); if (new_volume->internal_scaling_factor != NULL) { g_object_unref(new_volume->internal_scaling_factor); new_volume->internal_scaling_factor = NULL; } new_volume->internal_scaling_factor = data_set_load_xml(internal_scaling_xml_filename, perror_buf); /* the type of internal_scaling has been changed to double as of amide 0.7.1 */ if (new_volume->internal_scaling_factor->format != AMITK_FORMAT_DOUBLE) { AmitkRawData * old_scaling; AmitkVoxel i; amitk_append_str_with_newline(perror_buf,"wrong type found on internal scaling, converting to double"); old_scaling = new_volume->internal_scaling_factor; new_volume->internal_scaling_factor = amitk_raw_data_new_with_data(AMITK_FORMAT_DOUBLE, old_scaling->dim); if (new_volume->internal_scaling_factor == NULL) { amitk_append_str_with_newline(perror_buf,"couldn't allocate memory space for the new scaling structure"); amitk_object_unref(new_volume); return NULL; } for (i.t=0; i.tinternal_scaling_factor->dim.t; i.t++) for (i.g=0; i.ginternal_scaling_factor->dim.g; i.g++) for (i.z=0; i.zinternal_scaling_factor->dim.z; i.z++) for (i.y=0; i.yinternal_scaling_factor->dim.y; i.y++) for (i.x=0; i.xinternal_scaling_factor->dim.x; i.x++) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(new_volume->internal_scaling_factor,i) = amitk_raw_data_get_value(old_scaling, i); g_object_unref(old_scaling); } /* parameters that aren't in older versions and default values aren't good enough*/ amitk_data_set_set_scale_factor(new_volume, xml_get_data(nodes, "external_scaling", perror_buf)); } else { /* ---- legacy cruft previous to .xif version 1.4 ----- */ gchar * raw_data_filename; AmitkRawFormat i_raw_data_format, raw_data_format; AmitkVoxel temp_dim; amitk_append_str_with_newline(perror_buf,"no data_set file, will continue with the assumption of a .xif format previous to 1.4"); /* get the name of our associated data file */ raw_data_filename = xml_get_string(nodes, "raw_data"); /* and figure out the data format */ temp_string = xml_get_string(nodes, "data_format"); #if (G_BYTE_ORDER == G_BIG_ENDIAN) raw_data_format = AMITK_RAW_FORMAT_DOUBLE_64_BE; #else /* (G_BYTE_ORDER == G_LITTLE_ENDIAN) */ raw_data_format = AMITK_RAW_FORMAT_DOUBLE_64_LE; #endif if (temp_string != NULL) for (i_raw_data_format=0; i_raw_data_format < AMITK_RAW_FORMAT_NUM; i_raw_data_format++) if (g_ascii_strcasecmp(temp_string, amitk_raw_format_legacy_names[i_raw_data_format]) == 0) raw_data_format = i_raw_data_format; g_free(temp_string); temp_dim = voxel3d_read_xml(nodes, "dim", perror_buf); temp_dim.t = xml_get_int(nodes, "num_frames", perror_buf); amitk_data_set_set_scale_factor(new_volume, xml_get_data(nodes, "conversion", perror_buf)); /* now load in the raw data */ new_volume->raw_data = amitk_raw_data_import_raw_file(raw_data_filename, NULL, raw_data_format, temp_dim, 0, NULL, NULL); g_free(raw_data_filename); /* -------- end legacy cruft -------- */ } /* figure out the rest of the parameters */ new_volume->voxel_size = amitk_point_read_xml(nodes, "voxel_size", perror_buf); new_volume->scan_start = xml_get_time(nodes, "scan_start", perror_buf); new_volume->frame_duration = xml_get_times(nodes, "frame_duration", AMITK_DATA_SET_NUM_FRAMES(new_volume), perror_buf); new_volume->threshold_max[0] = xml_get_data(nodes, "threshold_max", perror_buf); new_volume->threshold_min[0] = xml_get_data(nodes, "threshold_min", perror_buf); new_volume->threshold_max[1] = xml_get_data(nodes, "threshold_max_1", perror_buf); new_volume->threshold_min[1] = xml_get_data(nodes, "threshold_min_1", perror_buf); new_volume->threshold_ref_frame[0] = xml_get_int(nodes,"threshold_ref_frame_0", perror_buf); new_volume->threshold_ref_frame[1] = xml_get_int(nodes,"threshold_ref_frame_1", perror_buf); space = amitk_space_read_xml(nodes, "coord_frame", perror_buf); amitk_space_copy_in_place(AMITK_SPACE(new_volume), space); g_object_unref(space); /* figure out the thresholding */ temp_string = xml_get_string(nodes, "threshold_type"); if (temp_string != NULL) for (i_thresholding=0; i_thresholding < NUM_THRESHOLDS; i_thresholding++) if (g_ascii_strcasecmp(temp_string, threshold_names[i_thresholding]) == 0) new_volume->thresholding = i_thresholding; g_free(temp_string); /* figure out the scaling type */ if (new_volume->internal_scaling_factor->dim.z > 1) new_volume->scaling_type = AMITK_SCALING_TYPE_2D; else if (new_volume->internal_scaling_factor->dim.t > 1) new_volume->scaling_type = AMITK_SCALING_TYPE_1D; else new_volume->scaling_type = AMITK_SCALING_TYPE_0D; /* recalc the temporary parameters */ amitk_data_set_calc_far_corner(new_volume); /* and load in any alignment points */ pts_nodes = xml_get_node(nodes, "Alignment_points"); if (pts_nodes != NULL) { pts_nodes = pts_nodes->children; if (pts_nodes != NULL) { align_pts = align_pts_load_xml(pts_nodes, perror_buf, AMITK_SPACE(new_volume)); amitk_object_add_children(AMITK_OBJECT(new_volume), align_pts); amitk_objects_unref(align_pts); } } /* and we're done */ xmlFreeDoc(doc); return new_volume; } /* function to load in a list of volume xml nodes */ static GList * volumes_load_xml(xmlNodePtr node_list, AmitkInterpolation interpolation, gchar **perror_buf) { gchar * file_name; GList * new_data_sets; AmitkDataSet * new_ds; if (node_list != NULL) { /* first, recurse on through the list */ new_data_sets = volumes_load_xml(node_list->next, interpolation, perror_buf); /* load in this node */ file_name = xml_get_string(node_list->children, "text"); new_ds = volume_load_xml(file_name, interpolation, perror_buf); new_data_sets = g_list_prepend(new_data_sets, new_ds); g_free(file_name); } else new_data_sets = NULL; return new_data_sets; } /* function to load in an ROI xml file */ AmitkRoi * roi_load_xml(gchar * roi_xml_filename, gchar **perror_buf) { xmlDocPtr doc; AmitkRoi * new_roi; xmlNodePtr nodes; AmitkRoiType i_roi_type; gchar * temp_string; gchar * isocontour_xml_filename; AmitkSpace * space; /* parse the xml file */ if ((doc = xmlParseFile(roi_xml_filename)) == NULL) { amitk_append_str_with_newline(perror_buf,"Couldn't Parse AMIDE ROI xml file %s",roi_xml_filename); return NULL; } /* get the root of our document */ if ((nodes = xmlDocGetRootElement(doc)) == NULL) { amitk_append_str_with_newline(perror_buf,"AMIDE ROI xml file doesn't appear to have a root: %s", roi_xml_filename); return NULL; } new_roi = amitk_roi_new(0); /* get the roi name */ temp_string = xml_get_string(nodes->children, "text"); if (temp_string != NULL) { amitk_object_set_name(AMITK_OBJECT(new_roi),temp_string); g_free(temp_string); } /* get the document tree */ nodes = nodes->children; /* figure out the type */ temp_string = xml_get_string(nodes, "type"); if (temp_string != NULL) for (i_roi_type=0; i_roi_type < NUM_ROI_TYPES; i_roi_type++) if (g_ascii_strcasecmp(temp_string, roi_type_names[i_roi_type]) == 0) new_roi->type = i_roi_type; g_free(temp_string); /* and figure out the rest of the parameters */ space = amitk_space_read_xml(nodes, "coord_frame", perror_buf); amitk_space_copy_in_place(AMITK_SPACE(new_roi), space); g_object_unref(space); amitk_volume_set_corner(AMITK_VOLUME(new_roi), amitk_point_read_xml(nodes, "corner", perror_buf)); /* isocontour specific stuff */ if (AMITK_ROI_TYPE_ISOCONTOUR(new_roi)) { new_roi->voxel_size = amitk_point_read_xml(nodes, "voxel_size", perror_buf); new_roi->isocontour_min_value = xml_get_real(nodes, "isocontour_value", perror_buf); isocontour_xml_filename = xml_get_string(nodes, "isocontour_file"); if (isocontour_xml_filename != NULL) new_roi->map_data = data_set_load_xml(isocontour_xml_filename, perror_buf); } /* children were never used */ /* make sure to mark the roi as undrawn if needed */ if (AMITK_ROI_TYPE_ISOCONTOUR(new_roi)) { if (new_roi->map_data == NULL) AMITK_VOLUME(new_roi)->valid = FALSE; } else { if (POINT_EQUAL(AMITK_VOLUME_CORNER(new_roi), zero_point)) { AMITK_VOLUME(new_roi)->valid = FALSE; } } /* and we're done */ xmlFreeDoc(doc); return new_roi; } /* function to load in a list of ROI xml nodes */ static GList * rois_load_xml(xmlNodePtr node_list, gchar **perror_buf) { gchar * roi_xml_filename; GList * new_rois; AmitkRoi * new_roi; if (node_list != NULL) { /* first, recurse on through the list */ new_rois = rois_load_xml(node_list->next, perror_buf); /* load in this node */ roi_xml_filename = xml_get_string(node_list->children, "text"); new_roi = roi_load_xml(roi_xml_filename, perror_buf); new_rois = g_list_prepend(new_rois, new_roi); g_free(roi_xml_filename); } else new_rois = NULL; return new_rois; } AmitkStudy * legacy_load_xml(gchar ** perror_buf) { AmitkStudy * study = NULL; AmitkSpace * space; AmitkPoint view_center; AmitkInterpolation interpolation; xmlDocPtr doc; xmlNodePtr nodes; xmlNodePtr object_nodes; gchar * temp_string; gchar * file_version; gchar * creation_date; GList * objects; /* warn that this is an old file version */ amitk_append_str_with_newline(perror_buf,"A .xif file previous to file version 2.0 found.\n" "Invoking legacy loader, please resave file as soon as possible"); /* parse the xml file */ if ((doc = xmlParseFile("Study.xml")) == NULL) { amitk_append_str_with_newline(perror_buf,"Couldn't Parse AMIDE xml file:\n\tStudy.xml"); return NULL; } /* get the root of our document */ if ((nodes = xmlDocGetRootElement(doc)) == NULL) { amitk_append_str_with_newline(perror_buf,"AMIDE xml file doesn't appear to have a root:\n\tStudy.xml"); return NULL; } study = amitk_study_new(NULL); /* get the study name */ temp_string = xml_get_string(nodes->children, "text"); if (temp_string != NULL) { amitk_object_set_name(AMITK_OBJECT(study),temp_string); g_free(temp_string); } /* get the document tree */ nodes = nodes->children; /* get the version of the data file */ file_version = xml_get_string(nodes, "AMIDE_Data_File_Version"); /* get the creation date of the study */ creation_date = xml_get_string(nodes, "creation_date"); amitk_study_set_creation_date(study, creation_date); g_free(creation_date); /* get our study parameters */ space = amitk_space_read_xml(nodes, "coord_frame", perror_buf); amitk_space_copy_in_place(AMITK_SPACE(study), space); g_object_unref(space); /* figure out the interpolation */ temp_string = xml_get_string(nodes, "interpolation"); interpolation = AMITK_INTERPOLATION_NEAREST_NEIGHBOR; if (temp_string != NULL) if (g_ascii_strcasecmp(temp_string, "Trilinear") == 0) interpolation = AMITK_INTERPOLATION_TRILINEAR; g_free(temp_string); /* load in the volumes */ object_nodes = xml_get_node(nodes, "Volumes"); object_nodes = object_nodes->children; objects = volumes_load_xml(object_nodes, interpolation, perror_buf); amitk_object_add_children(AMITK_OBJECT(study), objects); amitk_objects_unref(objects); /* load in the rois */ object_nodes = xml_get_node(nodes, "ROIs"); object_nodes = object_nodes->children; objects = rois_load_xml(object_nodes, perror_buf); amitk_object_add_children(AMITK_OBJECT(study), objects); amitk_objects_unref(objects); /* get our view parameters */ view_center = amitk_point_read_xml(nodes, "view_center", perror_buf); amitk_study_set_view_center(study, amitk_space_s2b(AMITK_SPACE(study), view_center)); amitk_study_set_view_thickness(study, xml_get_real(nodes, "view_thickness", perror_buf)); amitk_study_set_view_start_time(study, xml_get_time(nodes, "view_time", perror_buf)); amitk_study_set_view_duration(study, xml_get_time(nodes, "view_duration", perror_buf)); amitk_study_set_zoom(study, xml_get_real(nodes, "zoom", perror_buf)); /* sanity check */ if (AMITK_STUDY_ZOOM(study) < EPSILON) { amitk_append_str_with_newline(perror_buf,"inappropriate zoom (%5.3f) for study, reseting to 1.0", AMITK_STUDY_ZOOM(study)); amitk_study_set_zoom(study, 1.0); } /* and we're done */ xmlFreeDoc(doc); /* legacy cruft, rip out at some point in the future */ /* compensate for errors in old versions of amide */ if (g_ascii_strcasecmp(file_version, "1.3") < 0) { GList * objects; AmitkObject * object; AmitkPoint new_axes[AMITK_AXIS_NUM]; AmitkPoint new_offset; AmitkAxis i_axis; amitk_append_str_with_newline(perror_buf,"detected file version previous to 1.3, compensating for coordinate errors"); view_center = AMITK_STUDY_VIEW_CENTER(study); view_center.y = -view_center.y; amitk_study_set_view_center(study,view_center); objects = AMITK_OBJECT_CHILDREN(study); while (objects != NULL) { object = objects->data; for (i_axis=0;i_axisnext; } } /* freeing up anything we haven't freed yet */ g_free(file_version); return study; } amide-1.0.5/src/tb_math.h0000664000175000017500000000177412270274500015034 0ustar loeningloening/* tb_math.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2006-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* includes always needed with this */ #include "amitk_study.h" /* external functions */ void tb_math(AmitkStudy * study, GtkWindow * parent); amide-1.0.5/src/tb_alignment.h0000664000175000017500000000177512270274516016071 0ustar loeningloening/* tb_alignment.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* includes always needed with this */ #include "amitk_study.h" /* external functions */ void tb_alignment(AmitkStudy * study, GtkWindow * parent); amide-1.0.5/src/alignment_mutual_information.c0000664000175000017500000004610511707034142021360 0ustar loeningloening/* alignment_mutual_information.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2011-2012 Ian Miller * */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include "amitk_data_set.h" #include "amitk_data_set_DOUBLE_0D_SCALING.h" #include "alignment_mutual_information.h" /* this algorithm will calculate the amount of mutual information between two data sets in their current orientations */ /* it is a re-write of the original algorithm for purposes of improved speed. the hope is that it won't affect accuracy. */ /* rather than computing mutual information for the whole volume of data, the algorithm computes it for three orthogonal */ /* slices: axial, sagittal, and coronal */ #define NUM_BINS 50 gdouble calculate_mutual_information(AmitkDataSet * fixed_ds, AmitkDataSet * moving_ds, AmitkSpace * new_space, gint granularity, gboolean * pfixed_slices_current, AmitkDataSet ** fixed_slice, AmitkPoint view_center, amide_real_t thickness, amide_time_t view_start_time, amide_time_t view_duration) { /* variables related to datasets, their volumes, coordinate spaces, etc */ amide_data_t value_fixed, value_moving; AmitkCanvasPoint pixel_size; /* variables related to binning and mutual information determination*/ gdouble bin_width_moving; // mutual information will be calculated bin-wise gdouble bin_width_fixed; // these values determine the size of the bins gint current_bin_number_moving; // the number of bins for the first dataset gint current_bin_number_fixed; // the number of bins for the second dataset gint mutual_information_array[NUM_BINS][NUM_BINS] = {{ 0 }} ; gint margin_moving[NUM_BINS] = { 0 }; gint margin_fixed[NUM_BINS] = { 0 }; gint margin_total = 0; gint mi_nan_count; gdouble voxel_probability; // the probability contribution of a single voxel gdouble incremental_mi; gdouble mutual_information = 0.0; // this is the return value; the amount of MI computed in the two data sets; default to zero AmitkSpace * temp_space; GList * fixed_dss; AmitkVolume * view_volume; AmitkDataSet * moving_slice; AmitkPoint temp_offset; /* loop counters */ AmitkView i_view; AmitkVoxel i_voxel; gint i, j; // temporary counters to iterate through the bins for the two datasets amide_data_t moving_global_min; amide_data_t fixed_global_min; /* use the range of values present in the data and the number of bins desired in order to determine how wide the bins should be */ moving_global_min = amitk_data_set_get_global_min(moving_ds); fixed_global_min = amitk_data_set_get_global_min(fixed_ds); bin_width_moving = (amitk_data_set_get_global_max(moving_ds) - moving_global_min) / NUM_BINS; bin_width_fixed = (amitk_data_set_get_global_max(fixed_ds) - fixed_global_min) / NUM_BINS; /* iterate through the dataset, and build up a frequency matrix for binned values */ /* granularity determines whether we look at all the voxels, or just a subset. */ /* we look at every nth voxel, where n is granularity */ pixel_size.x = pixel_size.y = granularity * point_min_dim(AMITK_DATA_SET_VOXEL_SIZE(fixed_ds)); /* iterate over the orthogonal directions */ for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view++) { /* create a volume for the slice we're going to work on */ view_volume = amitk_volume_new(); temp_space = amitk_space_get_view_space(i_view, AMITK_LAYOUT_LINEAR); /* figure out the dimensions of the slice volume */ fixed_dss = g_list_append(NULL, amitk_object_ref(fixed_ds)); /* note, we don't bother with FOV, as that's actually computed based on all visible data sets, and we only have two of the data sets here. We'll just use 100% FOV */ amitk_volumes_calc_display_volume(fixed_dss, temp_space, view_center, thickness, 100.0, view_volume); amitk_objects_unref(fixed_dss); g_object_unref(temp_space); /* (re)calculate the fixed slice if we need to */ if ((fixed_slice[i_view] == NULL) || (*pfixed_slices_current == FALSE)) { #ifdef AMIDE_DEBUG g_print("recompute fixed slice for view %d with pixel size %f\n", i_view, pixel_size.x); #endif if (fixed_slice[i_view] != NULL) amitk_object_unref(AMITK_OBJECT(fixed_slice[i_view])); /* compute the fixed slices of data */ fixed_slice[i_view] = amitk_data_set_get_slice(fixed_ds, view_start_time, view_duration, -1, pixel_size, view_volume); } /* update the view volume by a transform to take into account the rotations/translations we're doing */ /* first take care of the axis rotation */ temp_offset = AMITK_SPACE_OFFSET(view_volume); temp_space = amitk_space_calculate_transform(new_space, AMITK_SPACE(moving_ds)); amitk_space_transform(AMITK_SPACE(view_volume), temp_space); g_object_unref(temp_space); /* second, take care of adjusting the view volume's offset. */ temp_offset = amitk_space_b2s(AMITK_SPACE(new_space), temp_offset); temp_offset = amitk_space_s2b(AMITK_SPACE(moving_ds), temp_offset); amitk_space_set_offset(AMITK_SPACE(view_volume), temp_offset); /* now calculate the slice from the moving data set, and calculate the corresponding MI */ moving_slice = amitk_data_set_get_slice(moving_ds, view_start_time, view_duration, -1, pixel_size, view_volume); /* calculate the mutual information */ i_voxel = zero_voxel; for (i_voxel.y = 0; i_voxel.y < AMITK_DATA_SET_DIM_Y(fixed_slice[i_view]); i_voxel.y++) { for (i_voxel.x = 0; i_voxel.x < AMITK_DATA_SET_DIM_X(fixed_slice[i_view]); i_voxel.x++) { /* DOUBLE_0D is the type of the slice data sets */ value_fixed = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(AMITK_DATA_SET(fixed_slice[i_view]), i_voxel); value_moving = AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(AMITK_DATA_SET(moving_slice), i_voxel); /* treat any NaN or "out of volume" values as zeros */ if (isnan(value_fixed)) value_fixed = 0; if (isnan(value_moving)) value_moving = 0; current_bin_number_fixed = floor((value_fixed-fixed_global_min)/bin_width_fixed); current_bin_number_moving = floor((value_moving-moving_global_min)/bin_width_moving); g_assert(current_bin_number_fixed < NUM_BINS); g_assert(current_bin_number_moving < NUM_BINS); /* Update the count in this particular bin combination by incrementing the counter*/ mutual_information_array[current_bin_number_fixed][current_bin_number_moving]++; /* Update the *marginal* count. We could derive this, but we'll need it later, and computing it one time only should improve computation speed */ margin_fixed[current_bin_number_fixed]++; margin_moving[current_bin_number_moving]++; margin_total++; } } /* garbage collection */ amitk_object_unref(AMITK_OBJECT(view_volume)); amitk_object_unref(AMITK_OBJECT(moving_slice)); } /* mark that we may not need to recompute the fixed slices next time around */ *pfixed_slices_current = TRUE; /* calculate the "probability weight" of a single voxel */ voxel_probability = (1.0 / margin_total); /* this is an idea for later: add the MI array to the study as a data set if (mi_matrix != NULL) { // and add the mutual information matrix to the study amitk_object_add_child(AMITK_OBJECT(fixed_ds), AMITK_OBJECT(mi_matrix)); // this adds a reference to the data set amitk_object_unref(mi_matrix); // so remove a reference } else { g_warning("Failed to generate filtered data set"); } */ mutual_information = 0; /* // print the column headings in order to debug the matrix g_print("\t%i", margin_moving[0]); for (j = 1; j < NUM_BINS ; j++) { g_print("\t%i", margin_moving[j]); } */ mi_nan_count=0; for (i = 0; i < NUM_BINS ; i++) { // g_print("\n%i", margin_fixed[i]); // print the row headings in order to debug the matrix for (j = 0; j < NUM_BINS ; j++) { /* when the probability of (x AND y) == 0, then the log (x AND y) is NaN. Therefore, test for this condition, and add a zero in order to avoid blowing up the equation */ if (mutual_information_array[i][j] != 0) { incremental_mi = (mutual_information_array[i][j]*voxel_probability)*(log2((mutual_information_array[i][j] * voxel_probability) /( (margin_fixed[i] * voxel_probability)*(margin_moving[j] * voxel_probability)))); } else { // how do we deal with zero probability? There is probably a theoretical "best" answer, but this should be practical. // we are trying to avoid complete lack of overlap from looking like a "good fit" // things I've tried that *don't* work are i_mi=log2(EPSILON) and =log2(voxel_probability) incremental_mi = 0; mi_nan_count++; } /* you can choose either of the following g_print commands for debugging the matrix */ //g_print("\t\%i", mutual_information_array[i][j] ); // for point-wise counts // g_print("\t\%4.3f", incremental_mi ); // for point-wise probability if isinf(incremental_mi) { //count it (because lots and lots of zeroes mean bad registration) and go to the next loop mi_nan_count++; // this is most often a problem when the incemental MI is infinity, due to divide by zero } else { // add it to the mutual information metric mutual_information += (incremental_mi); } /* // debugging code g_print("Current indices are: %i, %i\n", i, j); g_print("Current prob(x,y) is: %e\n", mutual_information_array[i][j] * voxel_probability); g_print("Current prob(x) is: %e\n", margin_moving[i] * voxel_probability); g_print("Current prob(y) is: %e\n", margin_fixed[j] * voxel_probability); if (margin_moving[i] == 0 || margin_fixed[j] == 0 ) { g_print("there is a zero at i=%i, j=%i!\n", i, j); } g_print("Incremental mutual information is: %e\n", incremental_mi); if (margin_moving[i] == 0 || margin_fixed[j] == 0 ) { g_print("there is a zero at i=%i, j=%i!\n", i, j); } g_print("Incremental mutual information is: %e\n", incremental_mi); */ } } // g_print("\nThe mutual information sum is %f\n", mutual_information); // g_print("the count of NAN in the MI algorithm was\t%d\n", mi_nan_count); return mutual_information; } /* rot_x, y, and z are angles about the respective axes, in radians */ void rotate(AmitkPoint rotation, AmitkSpace * moving_space) { // apply the rotation to the data set if (rotation.x !=0) amitk_space_rotate_on_vector(AMITK_SPACE(moving_space), base_axes[AMITK_AXIS_X], rotation.x, zero_point ); if (rotation.y !=0) amitk_space_rotate_on_vector(AMITK_SPACE(moving_space), base_axes[AMITK_AXIS_Y], rotation.y, zero_point ); if (rotation.z !=0) amitk_space_rotate_on_vector(AMITK_SPACE(moving_space), base_axes[AMITK_AXIS_Z], rotation.z, zero_point ); } /* This is the algorithm responsible for computing the transform which provides the maximum amount of mutual information for coregistration */ AmitkSpace * alignment_mutual_information(AmitkDataSet * moving_ds, AmitkDataSet * fixed_ds, AmitkPoint view_center, amide_real_t thickness, amide_time_t view_start_time, amide_time_t view_duration, gdouble * pointer_mutual_information_error, AmitkUpdateFunc update_func, gpointer update_data) { #define ITERATIONS_PER_LEVEL 3 #define TRANSLATION_MAX_DISTANCE 10 #define TRANSLATION_TARGET_PRECISION 0.001 // twenty degrees: #define ROTATION_MAX_ANGLE (20*(M_PI/180)) #define ROTATION_TARGET_PRECISION (0.1*(M_PI/180)) #define INITIAL_STEP_SIZE 8 #define MIN_STEP_SIZE 8 AmitkSpace * transform_space; AmitkSpace * new_space; AmitkSpace * last_best_space; gdouble translation_precision, rotation_precision, step_size; // GRand * random_generator; gdouble current_mi = 0, best_mi = 0; AmitkPoint best_shift, best_rotation; AmitkPoint current_shift, current_rotation; gchar * temp_string; gboolean continue_work = TRUE; AmitkDataSet * fixed_slice[AMITK_VIEW_NUM] = {NULL, NULL, NULL}; gboolean fixed_slices_current; AmitkView i_view; // random_generator = g_rand_new(); /* =======================================================================================*/ /* determine the translation which maximizes shared information */ /* first pass of pyramidal descent (course alignment followed by fine alignment */ /* =======================================================================================*/ new_space = amitk_space_copy(AMITK_SPACE(moving_ds)); last_best_space = amitk_space_copy(new_space); translation_precision = TRANSLATION_MAX_DISTANCE; rotation_precision = ROTATION_MAX_ANGLE; step_size = INITIAL_STEP_SIZE; fixed_slices_current = FALSE; /* set baseline characteristics, including baseline space and initial error */ best_mi = calculate_mutual_information(fixed_ds, moving_ds, new_space, step_size, &fixed_slices_current, fixed_slice, view_center, thickness, view_start_time, view_duration); #ifdef AMIDE_DEBUG g_print("initial mi %f\n", best_mi); #endif if (update_func != NULL) { temp_string = g_strdup_printf(_("Maximizing the mutual information")); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } while (continue_work && ((translation_precision > TRANSLATION_TARGET_PRECISION) || (rotation_precision > ROTATION_TARGET_PRECISION) || ( step_size > MIN_STEP_SIZE ))) { #ifdef AMIDE_DEBUG g_print("starting descent\ttranslation precision=\t%4.4f\n\t\t\trotation precision=\t%4.4f\tdegrees\n", translation_precision, rotation_precision*180/M_PI ); #endif if (update_func != NULL) continue_work = (*update_func)(update_data, NULL, (gdouble) -1.0); best_shift = zero_point; /* current_step_size = current_iteration * translation_precision / ITERATIONS_PER_LEVEL; // * current_step_size = g_rand_double_range(random_generator, 0, translation_precision ); */ for ( current_shift.z = -translation_precision ; current_shift.z < translation_precision; current_shift.z += translation_precision / ITERATIONS_PER_LEVEL ) { for ( current_shift.y = -translation_precision; current_shift.y < translation_precision; current_shift.y += translation_precision / ITERATIONS_PER_LEVEL ) { for ( current_shift.x = -translation_precision; current_shift.x < translation_precision; current_shift.x += translation_precision / ITERATIONS_PER_LEVEL ) { /* first test whether offset increases the mutual information */ amitk_space_shift_offset(AMITK_SPACE(new_space), current_shift); current_mi = calculate_mutual_information( fixed_ds, moving_ds, new_space, step_size, &fixed_slices_current, fixed_slice, view_center, thickness, view_start_time, view_duration); /*if this location gives a better mutual information, then keep it */ if (current_mi > best_mi ) { #ifdef AMIDE_DEBUG g_print("better translation fit at %4.4f\t%4.4f\t%4.4f with mi=\t%4.4f\n", current_shift.x, current_shift.y, current_shift.z, current_mi); #endif best_mi = current_mi; best_shift = current_shift; } /* and unroll the transformation */ g_object_unref(new_space); new_space = amitk_space_copy(last_best_space); } } } /* apply/store the transform that worked best */ amitk_space_shift_offset(AMITK_SPACE(new_space), best_shift); g_object_unref(last_best_space); last_best_space = amitk_space_copy(new_space); /* =======================================================================================*/ /* determine the rotation which maximizes shared information */ /* =======================================================================================*/ best_rotation = zero_point; for ( current_rotation.z = -rotation_precision ; current_rotation.z < rotation_precision; current_rotation.z += rotation_precision / ITERATIONS_PER_LEVEL ) { for ( current_rotation.y = -rotation_precision; current_rotation.y < rotation_precision; current_rotation.y += rotation_precision / ITERATIONS_PER_LEVEL ) { for ( current_rotation.x = -rotation_precision; current_rotation.x < rotation_precision; current_rotation.x += rotation_precision / ITERATIONS_PER_LEVEL ) { /* first test whether offset increases the mutual information */ rotate(current_rotation, AMITK_SPACE(new_space)); current_mi = calculate_mutual_information( fixed_ds, moving_ds, new_space, step_size, &fixed_slices_current, fixed_slice, view_center, thickness, view_start_time, view_duration); /*if this location gives a better mutual information, then keep it */ if (current_mi > best_mi ) { #ifdef AMIDE_DEBUG g_print("better rotation fit at %4.4f\t%4.4f\t%4.4f\t with mi=\t%4.4f\n", current_rotation.x, current_rotation.y, current_rotation.z, current_mi); #endif best_mi = current_mi; best_rotation = current_rotation; } /* and unroll the transformation */ g_object_unref(new_space); new_space = amitk_space_copy(last_best_space); } } } /* apply/store the transform that worked best */ rotate(best_rotation, AMITK_SPACE(new_space)); g_object_unref(last_best_space); last_best_space = amitk_space_copy(new_space); /* update loop variables for next iteration */ translation_precision = translation_precision * 0.70; rotation_precision = rotation_precision * 0.70; if (step_size != MIN_STEP_SIZE) { step_size = step_size / 2.0; if (step_size < MIN_STEP_SIZE ) step_size = MIN_STEP_SIZE; fixed_slices_current = FALSE; } } if (update_func != NULL) /* remove progress bar */ (*update_func)(update_data, NULL, (gdouble) 2.0); /* calculate the transform we'll need to apply */ transform_space = amitk_space_calculate_transform(AMITK_SPACE(moving_ds), new_space); /* garbage collection */ if (last_best_space != NULL) g_object_unref(last_best_space); if (new_space != NULL) g_object_unref(new_space); for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view++) { if (fixed_slice[i_view] != NULL) amitk_object_unref(AMITK_OBJECT(fixed_slice[i_view])); } *pointer_mutual_information_error = best_mi; return transform_space; } amide-1.0.5/src/amitk_filter.c0000664000175000017500000002713312271013635016061 0ustar loeningloening/* amitk_filter.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include "amitk_filter.h" #include "amitk_type_builtins.h" #ifdef AMIDE_LIBGSL_SUPPORT #include #endif static inline amide_real_t gaussian(amide_real_t x, amide_real_t sigma) { return exp(-(x*x)/(2.0*sigma*sigma))/(sigma*sqrt(2*M_PI)); } /* gaussian kernel is returned in a packad array (alternating real and imaginary parts since the filter is entirely real, all imaginary parts are zero */ AmitkRawData * amitk_filter_calculate_gaussian_kernel_complex(const AmitkVoxel kernel_size, const AmitkPoint voxel_size, const amide_real_t fwhm) { AmitkVoxel i_voxel; AmitkPoint location; amide_real_t sigma; AmitkVoxel half; AmitkRawData * kernel; amide_real_t total; amide_real_t gaussian_value; g_return_val_if_fail((kernel_size.t == 1), NULL); /* can't filter over time */ g_return_val_if_fail((kernel_size.g == 1), NULL); /* can't filter over gates */ g_return_val_if_fail((kernel_size.z & 0x1), NULL); /* needs to be odd */ g_return_val_if_fail((kernel_size.y & 0x1), NULL); g_return_val_if_fail((kernel_size.x & 0x1), NULL); if ((kernel = amitk_raw_data_new()) == NULL) { g_warning(_("couldn't allocate memory space for the kernel structure")); return NULL; } kernel->format = AMITK_FORMAT_DOUBLE; g_free(kernel->data); kernel->dim.t = kernel->dim.g = 1; kernel->dim.z = kernel->dim.y = AMITK_FILTER_FFT_SIZE; kernel->dim.x = 2*AMITK_FILTER_FFT_SIZE; /* real and complex */ /* get mem for the kernel, initialized to 0 */ if ((kernel->data = amitk_raw_data_get_data_mem0(kernel)) == NULL) { g_warning(_("Couldn't allocate memory space for the kernel data")); amitk_object_unref(kernel); return NULL; } sigma = fwhm/SIGMA_TO_FWHM; half.t = half.g = 0; half.z = kernel_size.z>>1; half.y = kernel_size.y>>1; half.x = kernel_size.x>>1; total = 0.0; i_voxel.t = i_voxel.g = 0; for (i_voxel.z = 0; i_voxel.z < kernel_size.z; i_voxel.z++) { location.z = voxel_size.z*(i_voxel.z-half.z); for (i_voxel.y = 0; i_voxel.y < kernel_size.y; i_voxel.y++) { location.y = voxel_size.y*(i_voxel.y-half.y); for (i_voxel.x = 0; i_voxel.x < 2*kernel_size.x; i_voxel.x+=2) { location.x = voxel_size.x*(i_voxel.x/2-half.x); gaussian_value = gaussian(point_mag(location), sigma); AMITK_RAW_DATA_DOUBLE_SET_CONTENT(kernel, i_voxel) = gaussian_value; total += gaussian_value; } } } /* renormalize, as the tails are cut, and we've discretized the gaussian */ for (i_voxel.z = 0; i_voxel.z < kernel_size.z; i_voxel.z++) for (i_voxel.y = 0; i_voxel.y < kernel_size.y; i_voxel.y++) for (i_voxel.x = 0; i_voxel.x < 2*kernel_size.x; i_voxel.x+=2) AMITK_RAW_DATA_DOUBLE_SET_CONTENT(kernel, i_voxel) /= total; return kernel; } #ifdef AMIDE_LIBGSL_SUPPORT void amitk_filter_3D_FFT(AmitkRawData * data, gsl_fft_complex_wavetable * wavetable, gsl_fft_complex_workspace * workspace) { AmitkVoxel i_voxel; g_return_if_fail(AMITK_RAW_DATA_FORMAT(data) == AMITK_FORMAT_DOUBLE); g_return_if_fail(AMITK_RAW_DATA_DIM_T(data) == 1); g_return_if_fail(AMITK_RAW_DATA_DIM_G(data) == 1); g_return_if_fail(AMITK_RAW_DATA_DIM_Z(data) == AMITK_FILTER_FFT_SIZE); g_return_if_fail(AMITK_RAW_DATA_DIM_Y(data) == AMITK_FILTER_FFT_SIZE); g_return_if_fail(AMITK_RAW_DATA_DIM_X(data) == 2*AMITK_FILTER_FFT_SIZE); /* FFT in the X direction */ i_voxel.t = i_voxel.g = i_voxel.x = 0; for (i_voxel.z=0; i_voxel.z < AMITK_RAW_DATA_DIM_Z(data); i_voxel.z++) for (i_voxel.y=0; i_voxel.y < AMITK_RAW_DATA_DIM_Y(data); i_voxel.y++) gsl_fft_complex_forward(AMITK_RAW_DATA_DOUBLE_POINTER(data,i_voxel), 1, AMITK_FILTER_FFT_SIZE, wavetable, workspace); /* FFT in the Y direction */ i_voxel.t = i_voxel.g = i_voxel.y = 0; for (i_voxel.z=0; i_voxel.z < AMITK_RAW_DATA_DIM_Z(data); i_voxel.z++) for (i_voxel.x=0; i_voxel.x < AMITK_RAW_DATA_DIM_X(data); i_voxel.x+=2) gsl_fft_complex_forward(AMITK_RAW_DATA_DOUBLE_POINTER(data,i_voxel), AMITK_FILTER_FFT_SIZE, AMITK_FILTER_FFT_SIZE, wavetable, workspace); /* FFT in the Z direction */ i_voxel.t = i_voxel.g = i_voxel.z = 0; for (i_voxel.y=0; i_voxel.y < AMITK_RAW_DATA_DIM_Y(data); i_voxel.y++) for (i_voxel.x=0; i_voxel.x < AMITK_RAW_DATA_DIM_X(data); i_voxel.x+=2) gsl_fft_complex_forward(AMITK_RAW_DATA_DOUBLE_POINTER(data,i_voxel), AMITK_FILTER_FFT_SIZE*AMITK_FILTER_FFT_SIZE, AMITK_FILTER_FFT_SIZE, wavetable, workspace); return; } void amitk_filter_inverse_3D_FFT(AmitkRawData * data, gsl_fft_complex_wavetable * wavetable, gsl_fft_complex_workspace * workspace) { AmitkVoxel i_voxel; g_return_if_fail(AMITK_RAW_DATA_FORMAT(data) == AMITK_FORMAT_DOUBLE); g_return_if_fail(AMITK_RAW_DATA_DIM_T(data) == 1); g_return_if_fail(AMITK_RAW_DATA_DIM_G(data) == 1); g_return_if_fail(AMITK_RAW_DATA_DIM_Z(data) == AMITK_FILTER_FFT_SIZE); g_return_if_fail(AMITK_RAW_DATA_DIM_Y(data) == AMITK_FILTER_FFT_SIZE); g_return_if_fail(AMITK_RAW_DATA_DIM_X(data) == 2*AMITK_FILTER_FFT_SIZE); /* inverse FFT in the X direction */ i_voxel.t = i_voxel.g = i_voxel.x = 0; for (i_voxel.z=0; i_voxel.z < AMITK_RAW_DATA_DIM_Z(data); i_voxel.z++) for (i_voxel.y=0; i_voxel.y < AMITK_RAW_DATA_DIM_Y(data); i_voxel.y++) gsl_fft_complex_inverse(AMITK_RAW_DATA_DOUBLE_POINTER(data,i_voxel), 1, AMITK_FILTER_FFT_SIZE, wavetable, workspace); /* inverse FFT in the Y direction */ i_voxel.t = i_voxel.g = i_voxel.y = 0; for (i_voxel.z=0; i_voxel.z < AMITK_RAW_DATA_DIM_Z(data); i_voxel.z++) for (i_voxel.x=0; i_voxel.x < AMITK_RAW_DATA_DIM_X(data); i_voxel.x+=2) gsl_fft_complex_inverse(AMITK_RAW_DATA_DOUBLE_POINTER(data,i_voxel), AMITK_FILTER_FFT_SIZE, AMITK_FILTER_FFT_SIZE, wavetable, workspace); /* inverse FFT in the Z direction */ i_voxel.t = i_voxel.g = i_voxel.z = 0; for (i_voxel.y=0; i_voxel.y < AMITK_RAW_DATA_DIM_Y(data); i_voxel.y++) for (i_voxel.x=0; i_voxel.x < AMITK_RAW_DATA_DIM_X(data); i_voxel.x+=2) gsl_fft_complex_inverse(AMITK_RAW_DATA_DOUBLE_POINTER(data,i_voxel), AMITK_FILTER_FFT_SIZE*AMITK_FILTER_FFT_SIZE, AMITK_FILTER_FFT_SIZE, wavetable, workspace); return; } /* multiples the data by the kernel, both of which are in packed complex form */ void amitk_filter_complex_mult(AmitkRawData * data, AmitkRawData * kernel) { AmitkVoxel i_voxel; AmitkVoxel j_voxel; gsl_complex a,b; g_return_if_fail(AMITK_RAW_DATA_FORMAT(data) == AMITK_FORMAT_DOUBLE); g_return_if_fail(AMITK_RAW_DATA_FORMAT(kernel) == AMITK_FORMAT_DOUBLE); g_return_if_fail(AMITK_RAW_DATA_DIM_T(data) == AMITK_RAW_DATA_DIM_T(kernel)); g_return_if_fail(AMITK_RAW_DATA_DIM_Z(data) == AMITK_RAW_DATA_DIM_Z(kernel)); g_return_if_fail(AMITK_RAW_DATA_DIM_Y(data) == AMITK_RAW_DATA_DIM_Y(kernel)); g_return_if_fail(AMITK_RAW_DATA_DIM_X(data) == AMITK_RAW_DATA_DIM_X(kernel)); i_voxel.t = i_voxel.g = j_voxel.t = j_voxel.g = 0; for (i_voxel.z = 0, j_voxel.z=0; i_voxel.z < AMITK_RAW_DATA_DIM_Z(data); i_voxel.z++, j_voxel.z++) for (i_voxel.y = 0, j_voxel.y=0; i_voxel.y < AMITK_RAW_DATA_DIM_Y(data); i_voxel.y++, j_voxel.y++) for (i_voxel.x = 0, j_voxel.x=1; i_voxel.x < AMITK_RAW_DATA_DIM_X(data); i_voxel.x+=2, j_voxel.x+=2) { a.dat[0] = AMITK_RAW_DATA_DOUBLE_CONTENT(data, i_voxel); a.dat[1] = AMITK_RAW_DATA_DOUBLE_CONTENT(data, j_voxel); b.dat[0] = AMITK_RAW_DATA_DOUBLE_CONTENT(kernel, i_voxel); b.dat[1] = AMITK_RAW_DATA_DOUBLE_CONTENT(kernel, j_voxel); a = gsl_complex_mul(a,b); AMITK_RAW_DATA_DOUBLE_SET_CONTENT(data, i_voxel) = a.dat[0]; AMITK_RAW_DATA_DOUBLE_SET_CONTENT(data, j_voxel) = a.dat[1]; } return; } #endif /* do a (destructive) partial sort of the given data to find median */ /* adapted and modified from Numerical Receipes in C, (who got it from Knuth, Vol 3?) */ /* median size needs to be odd for this to be strictly correct from a statistical stand point*/ #define SWAP(leftv, rightv) temp=(leftv); (leftv)=(rightv); (rightv=temp) amide_data_t amitk_filter_find_median_by_partial_sort(amide_data_t * partial_sort_data, gint size) { gint left, right, mid; gint i_left, i_right; gint median_point; amide_data_t partition_value; amide_data_t temp; median_point = (size-1) >> 1; /* not strictly correct for case of even size */ left = 0; right = size-1; while (TRUE) if (right-left <= 2) { /* <= 3 elements left */ if (right-left == 1) {/* 2 elements left to sort*/ if (partial_sort_data[left] > partial_sort_data[right]) { SWAP(partial_sort_data[left], partial_sort_data[right]); } } else if (right-left == 2){ /* 3 elements left to sort */ if (partial_sort_data[left] > partial_sort_data[right]) { SWAP(partial_sort_data[left], partial_sort_data[right]); } if (partial_sort_data[left+1] > partial_sort_data[right]) { SWAP(partial_sort_data[left+1], partial_sort_data[right]); } if (partial_sort_data[left] > partial_sort_data[left+1]) { SWAP(partial_sort_data[left], partial_sort_data[left+1]); } } return partial_sort_data[median_point]; } else { mid = (left+right) >> 1; /* do a three way median with the leftmost, rightmost, and mid elements to get a decent guess for a partitioning element. This partioning element ends up in left+1*/ SWAP(partial_sort_data[mid], partial_sort_data[left+1]); if (partial_sort_data[left] > partial_sort_data[right]) { SWAP(partial_sort_data[left], partial_sort_data[right]); } if (partial_sort_data[left+1] > partial_sort_data[right]) { SWAP(partial_sort_data[left+1], partial_sort_data[right]); } if (partial_sort_data[left] > partial_sort_data[left+1]) { SWAP(partial_sort_data[left], partial_sort_data[left+1]); } partition_value = partial_sort_data[left+1]; i_left=left+1; i_right = right; while (TRUE) { /* find an element > partition_value */ do i_left++; while (partial_sort_data[i_left] < partition_value); /* find an element < partition value */ do i_right--; while (partial_sort_data[i_right] > partition_value); if (i_right < i_left) break; /* pointers crossed */ SWAP(partial_sort_data[i_left], partial_sort_data[i_right]); } partial_sort_data[left+1] = partial_sort_data[i_right]; partial_sort_data[i_right] = partition_value; if (i_right >= median_point) right = i_right-1; if (i_right <= median_point) left = i_left; } } const gchar * amitk_filter_get_name(const AmitkFilter filter) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_FILTER); enum_value = g_enum_get_value(enum_class, filter); g_type_class_unref(enum_class); return enum_value->value_nick; } amide-1.0.5/src/amitk_common.h0000664000175000017500000001225112270305562016066 0ustar loeningloening/* amitk_common.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2004-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_COMMON_H__ #define __AMITK_COMMON_H__ /* header files that are always needed with this file */ #include #include #include "amide_intl.h" G_BEGIN_DECLS #define AMITK_RESPONSE_EXECUTE 1 #define AMITK_RESPONSE_COPY 2 #define AMITK_RESPONSE_SAVE_AS 3 #define AMITK_RESPONSE_SAVE_RAW_AS 4 /* defines how many times we want the progress bar to be updated over the course of an action */ #define AMITK_UPDATE_DIVIDER 40.0 /* must be float point */ /* file info. magic string needs to be < 64 bytes */ #define AMITK_FILE_VERSION (xmlChar *) "2.0" #define AMITK_FLAT_FILE_MAGIC_STRING "AMIDE XML Image Format Flat File" /* typedef's */ /* layout of the three views in a canvas */ typedef enum { AMITK_LAYOUT_LINEAR, AMITK_LAYOUT_ORTHOGONAL, AMITK_LAYOUT_NUM } AmitkLayout; /* layout of multiple canvases */ typedef enum { AMITK_PANEL_LAYOUT_MIXED, AMITK_PANEL_LAYOUT_LINEAR_X, AMITK_PANEL_LAYOUT_LINEAR_Y, AMITK_PANEL_LAYOUT_NUM } AmitkPanelLayout; typedef enum { AMITK_VIEW_MODE_SINGLE, AMITK_VIEW_MODE_LINKED_2WAY, AMITK_VIEW_MODE_LINKED_3WAY, AMITK_VIEW_MODE_NUM } AmitkViewMode; typedef enum { AMITK_MODALITY_PET, AMITK_MODALITY_SPECT, AMITK_MODALITY_CT, AMITK_MODALITY_MRI, AMITK_MODALITY_OTHER, AMITK_MODALITY_NUM } AmitkModality; typedef enum { AMITK_LIMIT_MIN, AMITK_LIMIT_MAX, AMITK_LIMIT_NUM } AmitkLimit; // AMITK_WINDOW_BONE, // AMITK_WINDOW_SOFT_TISSUE, typedef enum { AMITK_WINDOW_ABDOMEN, AMITK_WINDOW_BRAIN, AMITK_WINDOW_EXTREMITIES, AMITK_WINDOW_LIVER, AMITK_WINDOW_LUNG, AMITK_WINDOW_PELVIS_SOFT_TISSUE, AMITK_WINDOW_SKULL_BASE, AMITK_WINDOW_SPINE_A, AMITK_WINDOW_SPINE_B, AMITK_WINDOW_THORAX_SOFT_TISSUE, AMITK_WINDOW_NUM } AmitkWindow; typedef enum { AMITK_THRESHOLD_STYLE_MIN_MAX, AMITK_THRESHOLD_STYLE_CENTER_WIDTH, AMITK_THRESHOLD_STYLE_NUM } AmitkThresholdStyle; typedef enum { AMITK_HELP_INFO_BLANK, AMITK_HELP_INFO_CANVAS_DATA_SET, AMITK_HELP_INFO_CANVAS_ROI, AMITK_HELP_INFO_CANVAS_FIDUCIAL_MARK, AMITK_HELP_INFO_CANVAS_STUDY, AMITK_HELP_INFO_CANVAS_ISOCONTOUR_ROI, AMITK_HELP_INFO_CANVAS_FREEHAND_ROI, AMITK_HELP_INFO_CANVAS_DRAWING_MODE, AMITK_HELP_INFO_CANVAS_LINE_PROFILE, AMITK_HELP_INFO_CANVAS_NEW_ROI, AMITK_HELP_INFO_CANVAS_NEW_ISOCONTOUR_ROI, AMITK_HELP_INFO_CANVAS_NEW_FREEHAND_ROI, AMITK_HELP_INFO_CANVAS_CHANGE_ISOCONTOUR, AMITK_HELP_INFO_CANVAS_SHIFT_OBJECT, AMITK_HELP_INFO_CANVAS_ROTATE_OBJECT, AMITK_HELP_INFO_TREE_VIEW_DATA_SET, AMITK_HELP_INFO_TREE_VIEW_ROI, AMITK_HELP_INFO_TREE_VIEW_FIDUCIAL_MARK, AMITK_HELP_INFO_TREE_VIEW_STUDY, AMITK_HELP_INFO_TREE_VIEW_NONE, AMITK_HELP_INFO_UPDATE_LOCATION, AMITK_HELP_INFO_UPDATE_THETA, AMITK_HELP_INFO_UPDATE_SHIFT, AMITK_HELP_INFO_NUM } AmitkHelpInfo; /* external variables */ extern gchar * amitk_limit_names[AMITK_THRESHOLD_STYLE_NUM][AMITK_LIMIT_NUM]; extern gchar * amitk_window_names[AMITK_WINDOW_NUM]; extern PangoFontDescription * amitk_fixed_font_desc; /* external functions */ void amitk_common_font_init(void); void amitk_append_str_with_newline(gchar ** pstr, const gchar * format, ...); void amitk_append_str(gchar ** pstr, const gchar * format, ...); void amitk_real_cell_data_func(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data); gint amitk_spin_button_scientific_output (GtkSpinButton *spin_button, gpointer data); gint amitk_spin_button_discard_double_or_triple_click(GtkWidget *widget, GdkEventButton *event, gpointer func_data); GdkPixbuf * amitk_get_pixbuf_from_canvas(GnomeCanvas * canvas, gint xoffset, gint yoffset, gint width, gint height); gboolean amitk_is_xif_directory(const gchar * filename, gboolean * plegacy, gchar ** pxml_filename); gboolean amitk_is_xif_flat_file(const gchar * filename, guint64 * plocation_le, guint64 *psize_le); /* built in type functions */ const gchar * amitk_layout_get_name (const AmitkLayout layout); const gchar * amitk_panel_layout_get_name (const AmitkPanelLayout panel_layout); const gchar * amitk_limit_get_name (const AmitkLimit limit); const gchar * amitk_window_get_name (const AmitkWindow window); const gchar * amitk_modality_get_name (const AmitkModality modality); G_END_DECLS #endif /* __AMITK_COMMON_H__ */ amide-1.0.5/src/ui_gate_dialog.h0000664000175000017500000000214512270274473016354 0ustar loeningloening/* ui_gate_dialog.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2004-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* header files always needed with this */ #include "amitk_data_set.h" /* external functions */ void ui_gate_dialog_set_active_data_set(GtkWidget * dialog, AmitkDataSet * ds); GtkWidget * ui_gate_dialog_create(AmitkDataSet * ds, GtkWindow * parent); amide-1.0.5/src/tb_fly_through.c0000664000175000017500000011524212270274024016425 0ustar loeningloening/* tb_fly_through.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) #include #include #include "amide.h" #include "amitk_threshold.h" #include "amitk_progress_dialog.h" #include "mpeg_encode.h" #include "tb_fly_through.h" #include "amitk_canvas.h" typedef enum { NOT_DYNAMIC, OVER_TIME, OVER_FRAMES, OVER_FRAMES_SMOOTHED, OVER_GATES, DYNAMIC_TYPES } dynamic_t; typedef struct tb_fly_through_t { AmitkStudy * study; AmitkSpace * space; AmitkPreferences * preferences; amide_time_t start_time; amide_time_t end_time; guint start_frame; guint end_frame; amide_real_t start_z; amide_real_t end_z; amide_time_t duration; gboolean in_generation; gboolean dynamic; gboolean gated; dynamic_t type; GtkWidget * dialog; GtkWidget * canvas; GtkWidget * start_time_label; GtkWidget * end_time_label; GtkWidget * start_frame_label; GtkWidget * end_frame_label; GtkWidget * start_time_spin_button; GtkWidget * end_time_spin_button; GtkWidget * start_frame_spin_button; GtkWidget * end_frame_spin_button; GtkWidget * time_on_image_label; GtkWidget * time_on_image_button; GtkWidget * dynamic_type; GtkWidget * start_position_button; GtkWidget * end_position_button; GtkWidget * start_position_spin; GtkWidget * end_position_spin; GtkWidget * duration_spin_button; GtkWidget * position_entry; GtkWidget * progress_dialog; guint reference_count; } tb_fly_through_t; static void view_changed_cb(GtkWidget * canvas, AmitkPoint *position, amide_real_t thickness, gpointer data); static void dynamic_type_cb(GtkWidget * widget, gpointer data); static void change_start_time_cb(GtkWidget * widget, gpointer data); static void change_start_frame_cb(GtkWidget * widget, gpointer data); static void change_end_time_cb(GtkWidget * widget, gpointer data); static void change_end_frame_cb(GtkWidget * widget, gpointer data); static void time_on_image_cb(GtkWidget * widget, gpointer data); static void set_start_position_pressed_cb(GtkWidget * button, gpointer data); static void set_end_position_pressed_cb(GtkWidget * button, gpointer data); static void change_start_position_spin_cb(GtkWidget * widget, gpointer data); static void change_end_position_spin_cb(GtkWidget * widget, gpointer data); static void change_duration_spin_cb(GtkWidget * widget, gpointer data); static void destroy_cb(GtkObject * object, gpointer data); static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data); static void response_cb (GtkDialog * dialog, gint response_id, gpointer data); static void movie_generate(tb_fly_through_t * tb_fly_through, gchar * output_filename); static void dialog_update_position_entry(tb_fly_through_t * tb_fly_through); static void dialog_set_sensitive(tb_fly_through_t * tb_fly_through, gboolean sensitive); static void dialog_update_entries(tb_fly_through_t * tb_fly_through); static tb_fly_through_t * tb_fly_through_unref(tb_fly_through_t * tb_fly_through); static tb_fly_through_t * tb_fly_through_init(void); static void view_changed_cb(GtkWidget * canvas, AmitkPoint *position, amide_real_t thickness, gpointer data) { tb_fly_through_t * tb_fly_through = data; amitk_study_set_view_center(tb_fly_through->study, *position); dialog_update_position_entry(tb_fly_through); return; } static void dynamic_type_cb(GtkWidget * widget, gpointer data) { tb_fly_through_t * tb_fly_through = data; dynamic_t type; type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "dynamic_type")); if (type != tb_fly_through->type) { tb_fly_through->type = type; if (tb_fly_through->dynamic) { if (type == OVER_TIME) { gtk_widget_show(tb_fly_through->start_time_label); gtk_widget_show(tb_fly_through->start_time_spin_button); gtk_widget_show(tb_fly_through->end_time_label); gtk_widget_show(tb_fly_through->end_time_spin_button); } if ((type == OVER_FRAMES) || (type == OVER_FRAMES_SMOOTHED)) { gtk_widget_show(tb_fly_through->start_frame_label); gtk_widget_show(tb_fly_through->start_frame_spin_button); gtk_widget_show(tb_fly_through->end_frame_label); gtk_widget_show(tb_fly_through->end_frame_spin_button); } if ((type == OVER_FRAMES) || (type == OVER_FRAMES_SMOOTHED) || (type == OVER_TIME)) { gtk_widget_show(tb_fly_through->time_on_image_label); gtk_widget_show(tb_fly_through->time_on_image_button); } else { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb_fly_through->time_on_image_button), FALSE); gtk_widget_hide(tb_fly_through->time_on_image_label); gtk_widget_hide(tb_fly_through->time_on_image_button); } if ((type != OVER_FRAMES) && (type != OVER_FRAMES_SMOOTHED)) { gtk_widget_hide(tb_fly_through->start_frame_label); gtk_widget_hide(tb_fly_through->start_frame_spin_button); gtk_widget_hide(tb_fly_through->end_frame_label); gtk_widget_hide(tb_fly_through->end_frame_spin_button); } if (type != OVER_TIME) { gtk_widget_hide(tb_fly_through->start_time_label); gtk_widget_hide(tb_fly_through->start_time_spin_button); gtk_widget_hide(tb_fly_through->end_time_label); gtk_widget_hide(tb_fly_through->end_time_spin_button); } } } return; } /* function to change the start time */ static void change_start_time_cb(GtkWidget * widget, gpointer data) { tb_fly_through_t * tb_fly_through = data; tb_fly_through->start_time = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } /* function to change the start frame */ static void change_start_frame_cb(GtkWidget * widget, gpointer data) { tb_fly_through_t * tb_fly_through = data; gint temp_val; temp_val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget)); if (temp_val >= 0) tb_fly_through->start_frame = temp_val; return; } /* function to change the end time */ static void change_end_time_cb(GtkWidget * widget, gpointer data) { tb_fly_through_t * tb_fly_through = data; tb_fly_through->end_time = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } /* function to change the end frame */ static void change_end_frame_cb(GtkWidget * widget, gpointer data) { tb_fly_through_t * tb_fly_through = data; tb_fly_through->end_frame = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } static void time_on_image_cb(GtkWidget * widget, gpointer data) { tb_fly_through_t * tb_fly_through = data; amitk_canvas_set_time_on_image(AMITK_CANVAS(tb_fly_through->canvas), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); return; } static void set_start_position_pressed_cb(GtkWidget * button, gpointer data) { AmitkPoint temp_point; tb_fly_through_t * tb_fly_through = data; temp_point = amitk_space_b2s(tb_fly_through->space, AMITK_STUDY_VIEW_CENTER(tb_fly_through->study)); tb_fly_through->start_z = temp_point.z; dialog_update_entries(tb_fly_through); } static void set_end_position_pressed_cb(GtkWidget * button, gpointer data) { AmitkPoint temp_point; tb_fly_through_t * tb_fly_through = data; temp_point = amitk_space_b2s(tb_fly_through->space, AMITK_STUDY_VIEW_CENTER(tb_fly_through->study)); tb_fly_through->end_z = temp_point.z; dialog_update_entries(tb_fly_through); } static void change_start_position_spin_cb(GtkWidget * widget, gpointer data) { tb_fly_through_t * tb_fly_through = data; tb_fly_through->start_z = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } static void change_end_position_spin_cb(GtkWidget * widget, gpointer data) { tb_fly_through_t * tb_fly_through = data; tb_fly_through->end_z = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } static void change_duration_spin_cb(GtkWidget * widget, gpointer data) { tb_fly_through_t * tb_fly_through = data; tb_fly_through->duration = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } static void destroy_cb(GtkObject * object, gpointer data) { tb_fly_through_t * tb_fly_through = data; tb_fly_through = tb_fly_through_unref(tb_fly_through); /* free the associated data structure */ } /* function to run for a delete_event */ static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { tb_fly_through_t * tb_fly_through = data; /* trying to close while we're generating */ if (tb_fly_through->in_generation) { tb_fly_through->in_generation = FALSE; /* signal we need to exit */ return TRUE; } return FALSE; } /* function called when we hit the apply button */ static void response_cb (GtkDialog * dialog, gint response_id, gpointer data) { tb_fly_through_t * tb_fly_through = data; GtkWidget * file_chooser; gchar * filename; static guint save_image_num = 0; gboolean return_val; switch(response_id) { case AMITK_RESPONSE_EXECUTE: /* the rest of this function runs the file selection dialog box */ file_chooser = gtk_file_chooser_dialog_new(_("Output MPEG As"), GTK_WINDOW(dialog), /* parent window */ GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(tb_fly_through->preferences, file_chooser); /* set the default directory if applicable */ /* take a guess at the filename */ filename = g_strdup_printf("%s_FlyThrough_%d.mpg", AMITK_OBJECT_NAME(tb_fly_through->study), save_image_num++); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(file_chooser), filename); g_free(filename); if (gtk_dialog_run(GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (file_chooser)); else filename = NULL; gtk_widget_destroy(file_chooser); if (filename == NULL) return; /* return to flythrough generation dialog */ else { /* generate the movie */ movie_generate(tb_fly_through, filename); g_free(filename); } /* and fall through to close out the dialog */ case GTK_RESPONSE_CANCEL: g_signal_emit_by_name(G_OBJECT(dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(dialog)); break; default: break; } return; } /* perform the movie generation */ static void movie_generate(tb_fly_through_t * tb_fly_through, gchar * output_filename) { guint i_frame; gint return_val = 1; gint num_frames; amide_real_t increment_z; amide_time_t duration=1.0; amide_time_t initial_duration; amide_time_t initial_start; amide_time_t start_time; AmitkPoint current_point; gpointer mpeg_encode_context; gboolean continue_work=TRUE; GList * data_sets; GList * temp_sets; AmitkDataSet * most_frames_ds=NULL; guint ds_frame=0; gdouble ds_frame_real; gint ds_gate; GdkPixbuf * pixbuf; /* gray out anything that could screw up the movie */ dialog_set_sensitive(tb_fly_through, FALSE); tb_fly_through->in_generation = TRUE; /* indicate we're generating */ /* figure out which data set has the most frames, need this if we're doing a movie over frames */ data_sets = amitk_object_get_children_of_type(AMITK_OBJECT(tb_fly_through->study), AMITK_OBJECT_TYPE_DATA_SET, TRUE); temp_sets = data_sets; while (temp_sets != NULL) { if (most_frames_ds == NULL) most_frames_ds = AMITK_DATA_SET(temp_sets->data); else if (AMITK_DATA_SET_NUM_FRAMES(most_frames_ds) < AMITK_DATA_SET_NUM_FRAMES(temp_sets->data)) most_frames_ds = AMITK_DATA_SET(temp_sets->data); temp_sets = temp_sets->next; } num_frames = ceil(tb_fly_through->duration*FRAMES_PER_SECOND); if (num_frames > 1) increment_z = (tb_fly_through->end_z-tb_fly_through->start_z)/(num_frames-1); else increment_z = 0; /* erroneous */ current_point = amitk_space_b2s(AMITK_SPACE(tb_fly_through->space), AMITK_STUDY_VIEW_CENTER(tb_fly_through->study)); current_point.z = tb_fly_through->start_z; pixbuf = amitk_canvas_get_pixbuf(AMITK_CANVAS(tb_fly_through->canvas)); g_return_if_fail(pixbuf != NULL); mpeg_encode_context = mpeg_encode_setup(output_filename, ENCODE_MPEG1, gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf)); g_object_unref(pixbuf); g_return_if_fail(mpeg_encode_context != NULL); #ifdef AMIDE_DEBUG g_print("Total number of movie frames to do: %d\tincrement %f\n",num_frames, increment_z); #endif initial_start = AMITK_STUDY_VIEW_START_TIME(tb_fly_through->study); initial_duration = AMITK_STUDY_VIEW_DURATION (tb_fly_through->study); if (tb_fly_through->type == OVER_TIME) { duration = (tb_fly_through->end_time-tb_fly_through->start_time)/((amide_time_t) num_frames); amitk_study_set_view_duration(tb_fly_through->study, duration); } /* start generating the frames, continue while we haven't hit cancel */ for (i_frame = 0; (i_frame < num_frames) && tb_fly_through->in_generation && (return_val==1) && (continue_work); i_frame++) { switch (tb_fly_through->type) { case OVER_FRAMES: case OVER_FRAMES_SMOOTHED: ds_frame_real = (i_frame/((gdouble) num_frames)) * AMITK_DATA_SET_NUM_FRAMES(most_frames_ds); ds_frame = floor(ds_frame_real); start_time = amitk_data_set_get_start_time(most_frames_ds, ds_frame); duration = amitk_data_set_get_end_time(most_frames_ds, ds_frame)-start_time; start_time = start_time + EPSILON*fabs(start_time) + ((tb_fly_through->type == OVER_FRAMES_SMOOTHED) ? ((ds_frame_real-ds_frame)*duration) : 0.0); duration = duration - EPSILON*fabs(duration); amitk_study_set_view_start_time(tb_fly_through->study, start_time); amitk_study_set_view_duration(tb_fly_through->study, duration); break; case OVER_TIME: start_time = tb_fly_through->start_time + i_frame*duration; amitk_study_set_view_start_time(tb_fly_through->study, start_time); break; case OVER_GATES: temp_sets = data_sets; while (temp_sets != NULL) { ds_gate = floor((i_frame/((gdouble) num_frames))*AMITK_DATA_SET_NUM_GATES(temp_sets->data)); amitk_data_set_set_view_start_gate(AMITK_DATA_SET(temp_sets->data), ds_gate); amitk_data_set_set_view_end_gate(AMITK_DATA_SET(temp_sets->data), ds_gate); temp_sets = temp_sets->next; } break; default: /* NOT_DYNAMIC */ break; } dialog_update_position_entry(tb_fly_through); continue_work = amitk_progress_dialog_set_fraction(AMITK_PROGRESS_DIALOG(tb_fly_through->progress_dialog), (i_frame)/((gdouble) num_frames)); /* advance the canvas */ amitk_study_set_view_center(tb_fly_through->study, amitk_space_s2b(tb_fly_through->space, current_point)); /* do any events pending, and make sure the canvas gets updated */ while (gtk_events_pending() || AMITK_CANVAS(tb_fly_through->canvas)->next_update) gtk_main_iteration(); pixbuf = amitk_canvas_get_pixbuf(AMITK_CANVAS(tb_fly_through->canvas)); g_return_if_fail(pixbuf != NULL); return_val = mpeg_encode_frame(mpeg_encode_context, pixbuf); g_object_unref(pixbuf); if (return_val != 1) g_warning(_("encoding of frame %d failed"), i_frame); current_point.z += increment_z; } mpeg_encode_close(mpeg_encode_context); amitk_progress_dialog_set_fraction(AMITK_PROGRESS_DIALOG(tb_fly_through->progress_dialog),2.0); /* reset the canvas */ amitk_study_set_view_start_time(tb_fly_through->study, initial_start); amitk_study_set_view_duration(tb_fly_through->study, initial_duration); /* free up references */ amitk_objects_unref(data_sets); tb_fly_through->in_generation = FALSE; /* done generating */ dialog_set_sensitive(tb_fly_through, TRUE); /* let user change stuff again */ return; } static void dialog_update_position_entry(tb_fly_through_t * tb_fly_through) { gchar * temp_str; AmitkPoint temp_point; temp_point = amitk_space_b2s(tb_fly_through->space, AMITK_STUDY_VIEW_CENTER(tb_fly_through->study)); temp_str = g_strdup_printf("%f", temp_point.z); gtk_entry_set_text(GTK_ENTRY(tb_fly_through->position_entry), temp_str); g_free(temp_str); return; } static void dialog_set_sensitive(tb_fly_through_t * tb_fly_through, gboolean sensitive) { gtk_widget_set_sensitive(tb_fly_through->start_position_button, sensitive); gtk_widget_set_sensitive(tb_fly_through->end_position_button, sensitive); gtk_widget_set_sensitive(tb_fly_through->position_entry, sensitive); gtk_widget_set_sensitive(tb_fly_through->start_position_spin, sensitive); gtk_widget_set_sensitive(tb_fly_through->end_position_spin, sensitive); gtk_widget_set_sensitive(tb_fly_through->duration_spin_button, sensitive); gtk_widget_set_sensitive(GTK_WIDGET(tb_fly_through->canvas), sensitive); if (tb_fly_through->dynamic || tb_fly_through->gated) { gtk_widget_set_sensitive(tb_fly_through->dynamic_type, sensitive); } if (tb_fly_through->dynamic) { gtk_widget_set_sensitive(tb_fly_through->start_frame_spin_button, sensitive); gtk_widget_set_sensitive(tb_fly_through->end_frame_spin_button, sensitive); gtk_widget_set_sensitive(tb_fly_through->start_time_spin_button, sensitive); gtk_widget_set_sensitive(tb_fly_through->end_time_spin_button, sensitive); } gtk_dialog_set_response_sensitive(GTK_DIALOG(tb_fly_through->dialog), AMITK_RESPONSE_EXECUTE, sensitive); } static void dialog_update_entries(tb_fly_through_t * tb_fly_through) { g_signal_handlers_block_by_func(G_OBJECT(tb_fly_through->start_position_spin), G_CALLBACK(change_start_position_spin_cb), tb_fly_through); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fly_through->start_position_spin), tb_fly_through->start_z); g_signal_handlers_unblock_by_func(G_OBJECT(tb_fly_through->start_position_spin), G_CALLBACK(change_start_position_spin_cb), tb_fly_through); g_signal_handlers_block_by_func(G_OBJECT(tb_fly_through->end_position_spin), G_CALLBACK(change_end_position_spin_cb), tb_fly_through); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fly_through->end_position_spin), tb_fly_through->end_z); g_signal_handlers_unblock_by_func(G_OBJECT(tb_fly_through->end_position_spin), G_CALLBACK(change_end_position_spin_cb), tb_fly_through); g_signal_handlers_block_by_func(G_OBJECT(tb_fly_through->duration_spin_button), G_CALLBACK(change_duration_spin_cb), tb_fly_through); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fly_through->duration_spin_button), tb_fly_through->duration); g_signal_handlers_unblock_by_func(G_OBJECT(tb_fly_through->duration_spin_button), G_CALLBACK(change_duration_spin_cb), tb_fly_through); return; } static tb_fly_through_t * tb_fly_through_unref(tb_fly_through_t * tb_fly_through) { g_return_val_if_fail(tb_fly_through != NULL, NULL); gboolean return_val; /* sanity checks */ g_return_val_if_fail(tb_fly_through->reference_count > 0, NULL); /* remove a reference count */ tb_fly_through->reference_count--; /* things to do if we've removed all reference's */ if (tb_fly_through->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing tb_fly_through\n"); #endif if (tb_fly_through->study != NULL) { amitk_object_unref(tb_fly_through->study); tb_fly_through->study = NULL; } if (tb_fly_through->space != NULL) { g_object_unref(tb_fly_through->space); tb_fly_through->space = NULL; } if (tb_fly_through->preferences != NULL) { g_object_unref(tb_fly_through->preferences); tb_fly_through->preferences = NULL; } if (tb_fly_through->progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(tb_fly_through->progress_dialog), "delete_event", NULL, &return_val); tb_fly_through->progress_dialog = NULL; } g_free(tb_fly_through); tb_fly_through = NULL; } return tb_fly_through; } /* adds one to the reference count */ //static tb_fly_through_t * fly_through_ref(tb_fly_through_t * fly_through) { // // g_return_val_if_fail(fly_through != NULL, NULL); // // fly_through->reference_count++; // // return fly_through; //} /* allocate and initialize a tb_fly_through data structure */ static tb_fly_through_t * tb_fly_through_init(void) { tb_fly_through_t * tb_fly_through; /* alloc space for the data structure for passing ui info */ if ((tb_fly_through = g_try_new(tb_fly_through_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for tb_fly_through_t")); return NULL; } tb_fly_through->reference_count = 1; /* set any needed parameters */ tb_fly_through->study = NULL; tb_fly_through->space = NULL; tb_fly_through->preferences = NULL; tb_fly_through->start_z = 0.0; tb_fly_through->end_z = 0.0; tb_fly_through->duration = 10.0; /* seconds */ tb_fly_through->in_generation = FALSE; tb_fly_through->start_time = 0.0; tb_fly_through->end_time = 1.0; tb_fly_through->start_frame = 0; tb_fly_through->end_frame = 0; tb_fly_through->type = NOT_DYNAMIC; return tb_fly_through; } void tb_fly_through(AmitkStudy * study, AmitkView view, AmitkPreferences * preferences, GtkWindow * parent) { tb_fly_through_t * tb_fly_through; GtkWidget * packing_table; GtkWidget * right_table; GtkWidget * label; gint table_row=0; AmitkCorners corners; GList * objects; GList * temp_objects; gboolean dynamic = FALSE; gboolean gated = FALSE; gboolean valid; gint temp_end_frame; amide_time_t temp_end_time; amide_time_t temp_start_time; GtkWidget * radio_button1; GtkWidget * radio_button2=NULL; GtkWidget * radio_button3=NULL; GtkWidget * radio_button4=NULL; GtkWidget * radio_button5=NULL; GtkWidget * hbox; GtkWidget * hseparator; AmitkDataSet * temp_ds; /* sanity checks */ g_return_if_fail(AMITK_IS_STUDY(study)); objects = amitk_object_get_selected_children(AMITK_OBJECT(study), AMITK_SELECTION_SELECTED_0, TRUE); if (amitk_data_sets_count(objects, FALSE) == 0) return; tb_fly_through = tb_fly_through_init(); tb_fly_through->study = AMITK_STUDY(amitk_object_copy(AMITK_OBJECT(study))); tb_fly_through->space = amitk_space_get_view_space(view, AMITK_STUDY_CANVAS_LAYOUT(study)); tb_fly_through->preferences = g_object_ref(preferences); /* need to reset the view center, as this gets overwritten in amitk_object_copy because study_add_child gets called */ amitk_study_set_view_center(tb_fly_through->study, AMITK_STUDY_VIEW_CENTER(study)); tb_fly_through->dialog = gtk_dialog_new_with_buttons(_("Fly Through Generation"), parent, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, _("_Generate Fly Through"), AMITK_RESPONSE_EXECUTE, NULL); g_signal_connect(G_OBJECT(tb_fly_through->dialog), "delete_event", G_CALLBACK(delete_event_cb), tb_fly_through); g_signal_connect(G_OBJECT(tb_fly_through->dialog), "destroy", G_CALLBACK(destroy_cb), tb_fly_through); g_signal_connect(G_OBJECT(tb_fly_through->dialog), "response", G_CALLBACK(response_cb), tb_fly_through); gtk_window_set_resizable(GTK_WINDOW(tb_fly_through->dialog), TRUE); /* make the widgets for this dialog box */ packing_table = gtk_table_new(2,3,FALSE); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(tb_fly_through->dialog)->vbox), packing_table); right_table = gtk_table_new(9,2,FALSE); gtk_table_attach(GTK_TABLE(packing_table), right_table, 2,3, 0,2, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); label = gtk_label_new(_("Current Position (mm):")); gtk_table_attach(GTK_TABLE(right_table), label, 0,1, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); tb_fly_through->position_entry = gtk_entry_new(); gtk_editable_set_editable(GTK_EDITABLE(tb_fly_through->position_entry), FALSE); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->position_entry, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("Start Position (mm):")); gtk_table_attach(GTK_TABLE(right_table), label, 0,1, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); tb_fly_through->start_position_spin = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_fly_through->start_position_spin), FALSE); g_signal_connect(G_OBJECT(tb_fly_through->start_position_spin), "value_changed", G_CALLBACK(change_start_position_spin_cb), tb_fly_through); g_signal_connect(G_OBJECT(tb_fly_through->start_position_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->start_position_spin, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("End Position (mm):")); gtk_table_attach(GTK_TABLE(right_table), label, 0,1, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); tb_fly_through->end_position_spin = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_fly_through->end_position_spin), FALSE); g_signal_connect(G_OBJECT(tb_fly_through->end_position_spin), "value_changed", G_CALLBACK(change_end_position_spin_cb), tb_fly_through); g_signal_connect(G_OBJECT(tb_fly_through->end_position_spin), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->end_position_spin, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("Movie Duration (sec):")); gtk_table_attach(GTK_TABLE(right_table), label, 0,1, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); tb_fly_through->duration_spin_button = gtk_spin_button_new_with_range(0, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_fly_through->duration_spin_button), FALSE); g_signal_connect(G_OBJECT(tb_fly_through->duration_spin_button), "value_changed", G_CALLBACK(change_duration_spin_cb), tb_fly_through); g_signal_connect(G_OBJECT(tb_fly_through->duration_spin_button), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->duration_spin_button, 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* the progress dialog */ tb_fly_through->progress_dialog = amitk_progress_dialog_new(GTK_WINDOW(tb_fly_through->dialog)); amitk_progress_dialog_set_text(AMITK_PROGRESS_DIALOG(tb_fly_through->progress_dialog), _("Fly through movie generation")); /* setup the canvas */ tb_fly_through->canvas = amitk_canvas_new(tb_fly_through->study, view, AMITK_VIEW_MODE_SINGLE, AMITK_CANVAS_TYPE_FLY_THROUGH); g_signal_connect(G_OBJECT(tb_fly_through->canvas), "view_changed", G_CALLBACK(view_changed_cb), tb_fly_through); gtk_table_attach(GTK_TABLE(packing_table), tb_fly_through->canvas, 0,2,0,1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); tb_fly_through->start_position_button = gtk_button_new_with_label(_("Set Start Position")); g_signal_connect(G_OBJECT(tb_fly_through->start_position_button), "pressed", G_CALLBACK(set_start_position_pressed_cb), tb_fly_through); gtk_table_attach(GTK_TABLE(packing_table), tb_fly_through->start_position_button, 0,1,1,2, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); tb_fly_through->end_position_button = gtk_button_new_with_label(_("Set End Position")); g_signal_connect(G_OBJECT(tb_fly_through->end_position_button), "pressed", G_CALLBACK(set_end_position_pressed_cb), tb_fly_through); gtk_table_attach(GTK_TABLE(packing_table), tb_fly_through->end_position_button, 1,2,1,2, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* load up the canvases and get some initial info */ amitk_volumes_get_enclosing_corners(objects, tb_fly_through->space, corners); tb_fly_through->start_z = point_get_component(corners[0], AMITK_AXIS_Z); tb_fly_through->end_z = point_get_component(corners[1], AMITK_AXIS_Z); temp_objects = objects; valid = FALSE; while (temp_objects != NULL) { if (AMITK_IS_DATA_SET(temp_objects->data)) { temp_ds = AMITK_DATA_SET(temp_objects->data); temp_end_frame = AMITK_DATA_SET_NUM_FRAMES(temp_ds)-1; temp_start_time = amitk_data_set_get_start_time(temp_ds,0); temp_end_time = amitk_data_set_get_end_time(temp_ds, temp_end_frame); if (!valid) { tb_fly_through->end_frame = temp_end_frame; tb_fly_through->start_time = temp_start_time; tb_fly_through->end_time = temp_end_time; } else { if (temp_end_frame > tb_fly_through->end_frame) tb_fly_through->end_frame = temp_end_frame; if (temp_start_time < tb_fly_through->start_time) tb_fly_through->start_time = temp_start_time; if (temp_end_time > tb_fly_through->end_time) tb_fly_through->end_time = temp_end_time; } valid = TRUE; if (AMITK_DATA_SET_NUM_FRAMES(temp_objects->data) > 1) dynamic = TRUE; if (AMITK_DATA_SET_NUM_GATES(temp_objects->data) > 1) gated = TRUE; } temp_objects = temp_objects->next; } tb_fly_through->dynamic=dynamic; tb_fly_through->gated=gated; /* garbage collection */ amitk_objects_unref(objects); if (tb_fly_through->dynamic || tb_fly_through->gated) { /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(right_table), hseparator, 0,2, table_row, table_row+1,GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* do we want to make a movie over time or over frames */ label = gtk_label_new(_("Dynamic Movie:")); gtk_table_attach(GTK_TABLE(right_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(right_table), hbox,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hbox); table_row++; /* the radio buttons */ radio_button1 = gtk_radio_button_new_with_label(NULL, _("No")); gtk_box_pack_start(GTK_BOX(hbox), radio_button1, FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button1), "dynamic_type", GINT_TO_POINTER(NOT_DYNAMIC)); tb_fly_through->dynamic_type = radio_button1; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button1), TRUE); if (tb_fly_through->dynamic) { radio_button2 = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button1), _("over time")); gtk_box_pack_start(GTK_BOX(hbox), radio_button2, FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button2), "dynamic_type", GINT_TO_POINTER(OVER_TIME)); radio_button3 = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button1), _("over frames")); gtk_box_pack_start(GTK_BOX(hbox), radio_button3, FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button3), "dynamic_type", GINT_TO_POINTER(OVER_FRAMES)); } hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(right_table), hbox,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hbox); table_row++; if (tb_fly_through->dynamic) { radio_button4 = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button1), _("over frames smoothed")); gtk_box_pack_start(GTK_BOX(hbox), radio_button4, FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button4), "dynamic_type", GINT_TO_POINTER(OVER_FRAMES_SMOOTHED)); } if (tb_fly_through->gated) { radio_button5 = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button1), _("over gates")); gtk_box_pack_start(GTK_BOX(hbox), radio_button5, FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button5), "dynamic_type", GINT_TO_POINTER(OVER_GATES)); } g_signal_connect(G_OBJECT(radio_button1), "clicked", G_CALLBACK(dynamic_type_cb), tb_fly_through); if (tb_fly_through->dynamic) { g_signal_connect(G_OBJECT(radio_button2), "clicked", G_CALLBACK(dynamic_type_cb), tb_fly_through); g_signal_connect(G_OBJECT(radio_button3), "clicked", G_CALLBACK(dynamic_type_cb), tb_fly_through); g_signal_connect(G_OBJECT(radio_button4), "clicked", G_CALLBACK(dynamic_type_cb), tb_fly_through); } if (tb_fly_through->gated) { g_signal_connect(G_OBJECT(radio_button5), "clicked", G_CALLBACK(dynamic_type_cb), tb_fly_through); } } if (tb_fly_through->dynamic) { /* widgets to specify the start and end times */ tb_fly_through->start_time_label = gtk_label_new(_("Start Time (s)")); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->start_time_label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); tb_fly_through->start_frame_label = gtk_label_new(_("Start Frame")); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->start_frame_label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); tb_fly_through->start_time_spin_button = gtk_spin_button_new_with_range(tb_fly_through->start_time, tb_fly_through->end_time, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_fly_through->start_time_spin_button), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fly_through->start_time_spin_button), tb_fly_through->start_time); g_signal_connect(G_OBJECT(tb_fly_through->start_time_spin_button), "value_changed", G_CALLBACK(change_start_time_cb), tb_fly_through); g_signal_connect(G_OBJECT(tb_fly_through->start_time_spin_button), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->start_time_spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); tb_fly_through->start_frame_spin_button = gtk_spin_button_new_with_range(tb_fly_through->start_frame,tb_fly_through->end_frame+0.1, 1.0); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tb_fly_through->start_frame_spin_button),0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fly_through->start_frame_spin_button), tb_fly_through->start_frame); g_signal_connect(G_OBJECT(tb_fly_through->start_frame_spin_button), "value_changed", G_CALLBACK(change_start_frame_cb), tb_fly_through); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->start_frame_spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; tb_fly_through->end_time_label = gtk_label_new(_("End Time (s)")); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->end_time_label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); tb_fly_through->end_frame_label = gtk_label_new(_("End Frame")); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->end_frame_label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); tb_fly_through->end_time_spin_button = gtk_spin_button_new_with_range(tb_fly_through->start_time, tb_fly_through->end_time, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_fly_through->end_time_spin_button), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fly_through->end_time_spin_button), tb_fly_through->end_time); g_signal_connect(G_OBJECT(tb_fly_through->end_time_spin_button), "value_changed", G_CALLBACK(change_end_time_cb), tb_fly_through); g_signal_connect(G_OBJECT(tb_fly_through->end_time_spin_button), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->end_time_spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); tb_fly_through->end_frame_spin_button = gtk_spin_button_new_with_range(tb_fly_through->start_frame,tb_fly_through->end_frame+0.1, 1.0); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tb_fly_through->end_frame_spin_button),0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_fly_through->end_frame_spin_button), tb_fly_through->end_frame); g_signal_connect(G_OBJECT(tb_fly_through->end_frame_spin_button), "value_changed", G_CALLBACK(change_end_frame_cb), tb_fly_through); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->end_frame_spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; tb_fly_through->time_on_image_label = gtk_label_new(_("Display time on image")); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->time_on_image_label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); tb_fly_through->time_on_image_button = gtk_check_button_new(); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb_fly_through->time_on_image_button), FALSE); g_signal_connect(G_OBJECT(tb_fly_through->time_on_image_button), "toggled", G_CALLBACK(time_on_image_cb), tb_fly_through); gtk_table_attach(GTK_TABLE(right_table), tb_fly_through->time_on_image_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; } /* update entries */ dialog_update_position_entry(tb_fly_through); dialog_update_entries(tb_fly_through); /* and show all our widgets */ gtk_widget_show_all(tb_fly_through->dialog); /* and hide the appropriate widgets */ if (tb_fly_through->dynamic) { gtk_widget_hide(tb_fly_through->start_frame_label); gtk_widget_hide(tb_fly_through->start_frame_spin_button); gtk_widget_hide(tb_fly_through->end_frame_label); gtk_widget_hide(tb_fly_through->end_frame_spin_button); gtk_widget_hide(tb_fly_through->start_time_label); gtk_widget_hide(tb_fly_through->start_time_spin_button); gtk_widget_hide(tb_fly_through->end_time_label); gtk_widget_hide(tb_fly_through->end_time_spin_button); gtk_widget_hide(tb_fly_through->time_on_image_label); gtk_widget_hide(tb_fly_through->time_on_image_button); } return; } #endif /* AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT */ amide-1.0.5/src/mpeg_encode.h0000664000175000017500000000302512270274524015660 0ustar loeningloening/* mpeg_encode.c - interface to the mpeg encoding library * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) #ifndef __MPEG_ENCODE_H__ #define __MPEG_ENCODE_H__ /* header files that are always associated with this header file */ #include #define FRAMES_PER_SECOND 30 typedef enum { ENCODE_MPEG1, ENCODE_MPEG4 } mpeg_encode_t; /* functions */ gpointer mpeg_encode_setup(gchar * output_filename, mpeg_encode_t type, gint xsize, gint ysize); gboolean mpeg_encode_frame(gpointer mpeg_encode_context, GdkPixbuf * pixbuf); gpointer mpeg_encode_close(gpointer mpeg_encode_context); #endif /* __MPEG_ENCODE_H__ */ #endif /* AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT */ amide-1.0.5/src/amitk_canvas_object.c0000664000175000017500000002254312270273653017404 0ustar loeningloening/* amitk_canvas_object.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amitk_marshal.h" #include "amitk_canvas_object.h" #include "amitk_type_builtins.h" #include "amitk_canvas.h" #include "image.h" #define FIDUCIAL_MARK_WIDTH 4.0 #define FIDUCIAL_MARK_WIDTH_PIXELS 2 #ifndef AMIDE_LIBGNOMECANVAS_AA #define FIDUCIAL_MARK_LINE_STYLE GDK_LINE_SOLID #endif /* draws the given object on the given canvas. */ /* if item is NULL, a new canvas item will be created */ /* pixel dim is the current dimensions of the pixels in the canvas */ GnomeCanvasItem * amitk_canvas_object_draw(GnomeCanvas * canvas, AmitkVolume * canvas_volume, AmitkObject * object, AmitkViewMode view_mode, GnomeCanvasItem * item, amide_real_t pixel_dim, gint width, gint height, gdouble x_offset, gdouble y_offset, rgba_t roi_color, gint roi_width, #ifdef AMIDE_LIBGNOMECANVAS_AA gdouble transparency #else GdkLineStyle line_style, gboolean fill_roi #endif ) { guint32 fill_color_rgba; guint32 outline_color_rgba; gdouble affine[6]; gboolean hide_object = FALSE; GnomeCanvasPoints * points; g_return_val_if_fail(GNOME_IS_CANVAS(canvas), item); g_return_val_if_fail(AMITK_IS_VOLUME(canvas_volume), item); g_return_val_if_fail(object != NULL, item); if (item != NULL) { /* make sure to reset any affine translations we've done */ gnome_canvas_item_i2w_affine(item,affine); affine[0] = affine[3] = 1.0; affine[1] = affine[2] = affine[4] = affine[5] = 0.0; gnome_canvas_item_affine_absolute(item,affine); } if (AMITK_IS_FIDUCIAL_MARK(object)) { /* --------------------- redraw alignment point ----------------------------- */ AmitkPoint center_point; AmitkCanvasPoint center_cpoint; rgba_t outline_color; if (AMITK_FIDUCIAL_MARK_SPECIFY_COLOR(object)) outline_color = AMITK_FIDUCIAL_MARK_COLOR(object); else if (AMITK_IS_DATA_SET(AMITK_OBJECT_PARENT(object))) outline_color = amitk_color_table_outline_color(amitk_data_set_get_color_table_to_use(AMITK_DATA_SET(AMITK_OBJECT_PARENT(object)), view_mode), TRUE); else outline_color = amitk_color_table_outline_color(AMITK_COLOR_TABLE_BW_LINEAR, TRUE); outline_color_rgba = amitk_color_table_rgba_to_uint32(outline_color); center_point = amitk_space_b2s(AMITK_SPACE(canvas_volume), AMITK_FIDUCIAL_MARK_GET(object)); center_cpoint= point_2_canvas_point(AMITK_VOLUME_CORNER(canvas_volume), width, height, x_offset, y_offset, center_point); points = gnome_canvas_points_new(7); points->coords[0] = center_cpoint.x-FIDUCIAL_MARK_WIDTH; points->coords[1] = center_cpoint.y; points->coords[2] = center_cpoint.x; points->coords[3] = center_cpoint.y; points->coords[4] = center_cpoint.x; points->coords[5] = center_cpoint.y+FIDUCIAL_MARK_WIDTH; points->coords[6] = center_cpoint.x; points->coords[7] = center_cpoint.y; points->coords[8] = center_cpoint.x+FIDUCIAL_MARK_WIDTH; points->coords[9] = center_cpoint.y; points->coords[10] = center_cpoint.x; points->coords[11] = center_cpoint.y; points->coords[12] = center_cpoint.x; points->coords[13] = center_cpoint.y-FIDUCIAL_MARK_WIDTH; if (item == NULL) item = gnome_canvas_item_new(gnome_canvas_root(canvas), gnome_canvas_line_get_type(), "points", points, "fill_color_rgba", outline_color_rgba, "width_pixels", FIDUCIAL_MARK_WIDTH_PIXELS, #ifndef AMIDE_LIBGNOMECANVAS_AA "line_style", FIDUCIAL_MARK_LINE_STYLE, #endif NULL); else gnome_canvas_item_set(item, "points", points,"fill_color_rgba", outline_color_rgba, NULL); gnome_canvas_points_unref(points); /* make sure the point is on this slice */ hide_object = ((center_point.x < 0.0) || (center_point.x > AMITK_VOLUME_X_CORNER(canvas_volume)) || (center_point.y < 0.0) || (center_point.y > AMITK_VOLUME_Y_CORNER(canvas_volume)) || (center_point.z < 0.0) || (center_point.z > AMITK_VOLUME_Z_CORNER(canvas_volume))); } else if (AMITK_IS_ROI(object)) { /* --------------------- redraw roi ----------------------------- */ GSList * roi_points, * temp; guint num_points, j; AmitkCanvasPoint roi_cpoint; GdkPixbuf * pixbuf; AmitkCanvasPoint offset_cpoint; AmitkCanvasPoint corner_cpoint; AmitkRoi * roi = AMITK_ROI(object); AmitkPoint offset, corner; AmitkPoint * ptemp_rp; if (AMITK_ROI_UNDRAWN(object)) return item; /* overwrite the passed in color if desired */ if (AMITK_ROI_SPECIFY_COLOR(object)) roi_color = AMITK_ROI_COLOR(object); switch(AMITK_ROI_TYPE(roi)) { case AMITK_ROI_TYPE_ISOCONTOUR_2D: case AMITK_ROI_TYPE_ISOCONTOUR_3D: case AMITK_ROI_TYPE_FREEHAND_2D: case AMITK_ROI_TYPE_FREEHAND_3D: offset = zero_point; corner = one_point; pixbuf = image_slice_intersection(roi, canvas_volume, pixel_dim, #ifdef AMIDE_LIBGNOMECANVAS_AA transparency, #else fill_roi, #endif roi_color,&offset, &corner); offset_cpoint= point_2_canvas_point(AMITK_VOLUME_CORNER(canvas_volume), width, height, x_offset, y_offset, amitk_space_b2s(AMITK_SPACE(canvas_volume), offset)); corner_cpoint= point_2_canvas_point(AMITK_VOLUME_CORNER(canvas_volume), width, height, x_offset, y_offset, amitk_space_b2s(AMITK_SPACE(canvas_volume), corner)); /* find the north west corner (in terms of the X reference frame) */ if (corner_cpoint.y < offset_cpoint.y) offset_cpoint.y = corner_cpoint.y; if (corner_cpoint.x < offset_cpoint.x) offset_cpoint.x = corner_cpoint.x; /* create the item */ if (item == NULL) { item = gnome_canvas_item_new(gnome_canvas_root(canvas), gnome_canvas_pixbuf_get_type(), "pixbuf", pixbuf, "x", (double) offset_cpoint.x, "y", (double) offset_cpoint.y, NULL); } else { gnome_canvas_item_set(item, "pixbuf", pixbuf, "x", (double) offset_cpoint.x, "y", (double) offset_cpoint.y, NULL); } if (pixbuf != NULL) g_object_unref(pixbuf); break; case AMITK_ROI_TYPE_ELLIPSOID: case AMITK_ROI_TYPE_CYLINDER: case AMITK_ROI_TYPE_BOX: roi_points = amitk_roi_get_intersection_line(roi, canvas_volume, pixel_dim); /* count the points */ num_points=0; temp=roi_points; while(temp!=NULL) { temp=temp->next; num_points++; } /* transfer the points list to what we'll be using to construction the figure */ if (num_points > 1) { points = gnome_canvas_points_new(num_points); temp=roi_points; j=0; while(temp!=NULL) { ptemp_rp = temp->data; roi_cpoint= point_2_canvas_point(AMITK_VOLUME_CORNER(canvas_volume), width, height, x_offset, y_offset, *ptemp_rp); points->coords[j] = roi_cpoint.x; points->coords[j+1] = roi_cpoint.y; temp=temp->next; j += 2; } } else { /* throw in junk we'll hide*/ hide_object = TRUE; points = gnome_canvas_points_new(3); points->coords[0] = points->coords[1] = 0; points->coords[2] = points->coords[3] = 1; points->coords[4] = 0; points->coords[5] = 1; } roi_points = amitk_roi_free_points_list(roi_points); #ifdef AMIDE_LIBGNOMECANVAS_AA outline_color_rgba = amitk_color_table_rgba_to_uint32(roi_color); roi_color.a = transparency * 0xFF; #endif fill_color_rgba = amitk_color_table_rgba_to_uint32(roi_color); if ((item == NULL)) { /* create the item */ item = gnome_canvas_item_new(gnome_canvas_root(canvas), #ifdef AMIDE_LIBGNOMECANVAS_AA gnome_canvas_polygon_get_type(), #else gnome_canvas_line_get_type(), #endif "points", points, "fill_color_rgba",fill_color_rgba, "width_pixels", roi_width, #ifdef AMIDE_LIBGNOMECANVAS_AA "outline_color_rgba", outline_color_rgba, #else "line_style", line_style, #endif NULL); } else { /* and reset the line points */ gnome_canvas_item_set(item, "points", points, "fill_color_rgba", fill_color_rgba, "width_pixels", roi_width, #ifdef AMIDE_LIBGNOMECANVAS_AA "outline_color_rgba", outline_color_rgba, #else "line_style", line_style, #endif NULL); } gnome_canvas_points_unref(points); break; default: g_error("unexpected case in %s at %d\n", __FILE__, __LINE__); break; } } /* make sure the point is on this canvas */ if (hide_object) gnome_canvas_item_hide(item); else if (item) gnome_canvas_item_show(item); return item; } amide-1.0.5/src/legacy.h0000664000175000017500000000205712270274530014660 0ustar loeningloening/* legacy.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __LEGACY_H__ #define __LEGACY_H__ /* header files that are always needed with this file */ #include "amitk_study.h" AmitkStudy * legacy_load_xml(gchar ** perror_buf); #endif /* __LEGACY_H__ */ amide-1.0.5/src/amitk_fiducial_mark.c0000664000175000017500000001703612270273720017371 0ustar loeningloening/* amitk_fiducial_mark.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amitk_fiducial_mark.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" enum { FIDUCIAL_MARK_CHANGED, LAST_SIGNAL }; static void fiducial_mark_class_init (AmitkFiducialMarkClass *klass); static void fiducial_mark_init (AmitkFiducialMark *fiducial_mark); static void fiducial_mark_finalize (GObject *object); static AmitkObject * fiducial_mark_copy (const AmitkObject *object); static void fiducial_mark_copy_in_place (AmitkObject * dest_object, const AmitkObject * src_object); static void fiducial_mark_write_xml (const AmitkObject *object, xmlNodePtr nodes, FILE *study_file); static gchar * fiducial_mark_read_xml (AmitkObject *object, xmlNodePtr nodes, FILE *study_file, gchar *error_buf); static AmitkObjectClass * parent_class; static guint fiducial_mark_signals[LAST_SIGNAL]; GType amitk_fiducial_mark_get_type(void) { static GType fiducial_mark_type = 0; if (!fiducial_mark_type) { static const GTypeInfo fiducial_mark_info = { sizeof (AmitkFiducialMarkClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) fiducial_mark_class_init, (GClassFinalizeFunc) NULL, NULL, /* class_data */ sizeof (AmitkFiducialMark), 0, /* n_preallocs */ (GInstanceInitFunc) fiducial_mark_init, NULL /* value table */ }; fiducial_mark_type = g_type_register_static (AMITK_TYPE_OBJECT, "AmitkFiducialMark", &fiducial_mark_info, 0); } return fiducial_mark_type; } static void fiducial_mark_class_init (AmitkFiducialMarkClass * class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); AmitkObjectClass * object_class = AMITK_OBJECT_CLASS(class); parent_class = g_type_class_peek_parent(class); object_class->object_copy = fiducial_mark_copy; object_class->object_copy_in_place = fiducial_mark_copy_in_place; object_class->object_write_xml = fiducial_mark_write_xml; object_class->object_read_xml = fiducial_mark_read_xml; gobject_class->finalize = fiducial_mark_finalize; fiducial_mark_signals[FIDUCIAL_MARK_CHANGED] = g_signal_new ("fiducial_mark_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkFiducialMarkClass, fiducial_mark_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); } static void fiducial_mark_init (AmitkFiducialMark * fiducial_mark) { fiducial_mark->specify_color = FALSE; fiducial_mark->color = amitk_color_table_uint32_to_rgba(AMITK_OBJECT_DEFAULT_COLOR); return; } static void fiducial_mark_finalize (GObject * object) { G_OBJECT_CLASS (parent_class)->finalize (object); } static AmitkObject * fiducial_mark_copy (const AmitkObject * object ) { AmitkFiducialMark * copy; g_return_val_if_fail(AMITK_IS_FIDUCIAL_MARK(object), NULL); copy = amitk_fiducial_mark_new(); amitk_object_copy_in_place(AMITK_OBJECT(copy), object); return AMITK_OBJECT(copy); } static void fiducial_mark_copy_in_place(AmitkObject * dest_object, const AmitkObject * src_object) { AmitkFiducialMark * src_fm; AmitkFiducialMark * dest_fm; g_return_if_fail(AMITK_IS_FIDUCIAL_MARK(src_object)); g_return_if_fail(AMITK_IS_FIDUCIAL_MARK(dest_object)); src_fm = AMITK_FIDUCIAL_MARK(src_object); dest_fm = AMITK_FIDUCIAL_MARK(dest_object); dest_fm->specify_color = AMITK_FIDUCIAL_MARK_SPECIFY_COLOR(src_fm); dest_fm->color = AMITK_FIDUCIAL_MARK_COLOR(src_fm); AMITK_OBJECT_CLASS (parent_class)->object_copy_in_place (dest_object, src_object); } static void fiducial_mark_write_xml(const AmitkObject * object, xmlNodePtr nodes, FILE *study_file) { AmitkFiducialMark * fm; AMITK_OBJECT_CLASS(parent_class)->object_write_xml(object, nodes, study_file); fm = AMITK_FIDUCIAL_MARK(object); xml_save_boolean(nodes, "specify_color", AMITK_FIDUCIAL_MARK_SPECIFY_COLOR(fm)); xml_save_uint(nodes, "color", amitk_color_table_rgba_to_uint32(AMITK_FIDUCIAL_MARK_COLOR(fm))); return; } static gchar * fiducial_mark_read_xml(AmitkObject * object, xmlNodePtr nodes, FILE * study_file, gchar * error_buf ) { AmitkFiducialMark * fm; AmitkPoint point; fm = AMITK_FIDUCIAL_MARK(object); error_buf = AMITK_OBJECT_CLASS(parent_class)->object_read_xml(object, nodes, study_file, error_buf); amitk_fiducial_mark_set_specify_color(fm, xml_get_boolean_with_default(nodes, "specify_color", AMITK_FIDUCIAL_MARK_SPECIFY_COLOR(fm))); amitk_fiducial_mark_set_color(fm, amitk_color_table_uint32_to_rgba(xml_get_uint_with_default(nodes, "color", AMITK_OBJECT_DEFAULT_COLOR))); /* legacy cruft. the "point" option was eliminated in version 0.7.11, just using the space's offset instead */ if (xml_node_exists(nodes, "point")) { point = amitk_point_read_xml(nodes, "point", &error_buf); point = amitk_space_s2b(AMITK_SPACE(fm), point); amitk_space_set_offset(AMITK_SPACE(fm), point); } return error_buf; } AmitkFiducialMark * amitk_fiducial_mark_new (void) { AmitkFiducialMark * fiducial_mark; fiducial_mark = g_object_new(amitk_fiducial_mark_get_type(), NULL); return fiducial_mark; } /* new point should be in the base coordinate space */ void amitk_fiducial_mark_set(AmitkFiducialMark * fiducial_mark, AmitkPoint new_point) { g_return_if_fail(AMITK_IS_FIDUCIAL_MARK(fiducial_mark)); if (!POINT_EQUAL(AMITK_FIDUCIAL_MARK_GET(fiducial_mark), new_point)) { amitk_space_set_offset(AMITK_SPACE(fiducial_mark), new_point); } return; } /* whether we want to use the specified color or have the program choose a decent color */ void amitk_fiducial_mark_set_specify_color(AmitkFiducialMark * fiducial_mark, gboolean specify_color) { g_return_if_fail(AMITK_IS_FIDUCIAL_MARK(fiducial_mark)); if (specify_color != AMITK_FIDUCIAL_MARK_SPECIFY_COLOR(fiducial_mark)) { fiducial_mark->specify_color = specify_color; g_signal_emit(G_OBJECT(fiducial_mark), fiducial_mark_signals[FIDUCIAL_MARK_CHANGED], 0); } return; } /* color to draw the fiducial_mark in, if we choose specify_color */ void amitk_fiducial_mark_set_color(AmitkFiducialMark * fiducial_mark, rgba_t new_color) { rgba_t old_color; g_return_if_fail(AMITK_IS_FIDUCIAL_MARK(fiducial_mark)); old_color = AMITK_FIDUCIAL_MARK_COLOR(fiducial_mark); if ((old_color.r != new_color.r) || (old_color.g != new_color.g) || (old_color.b != new_color.b) || (old_color.a != new_color.a)) { fiducial_mark->color = new_color; g_signal_emit(G_OBJECT(fiducial_mark), fiducial_mark_signals[FIDUCIAL_MARK_CHANGED], 0); } return; } amide-1.0.5/src/amitk_preferences.c0000664000175000017500000004112712270273734017103 0ustar loeningloening/* amitk_preferences.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include "amide.h" #include "amide_gconf.h" #include "amitk_preferences.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" #include "amitk_data_set.h" #define GCONF_AMIDE_ROI "ROI" #define GCONF_AMIDE_CANVAS "CANVAS" #define GCONF_AMIDE_MISC "MISC" #define GCONF_AMIDE_DATASETS "DATASETS" #define GCONF_AMIDE_WINDOWS "WINDOWS" enum { DATA_SET_PREFERENCES_CHANGED, STUDY_PREFERENCES_CHANGED, MISC_PREFERENCES_CHANGED, LAST_SIGNAL }; static void preferences_class_init (AmitkPreferencesClass *klass); static void preferences_init (AmitkPreferences *object); static void preferences_finalize (GObject *object); static GObjectClass * parent_class; static guint preferences_signals[LAST_SIGNAL]; /* external variables */ const gchar * amitk_which_default_directory_names[] = { N_("None"), N_("Specified Directory"), N_("Working Directory") }; GType amitk_preferences_get_type(void) { static GType preferences_type = 0; if (!preferences_type) { static const GTypeInfo preferences_info = { sizeof (AmitkPreferencesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) preferences_class_init, (GClassFinalizeFunc) NULL, NULL, /* class_data */ sizeof (AmitkPreferences), 0, /* n_preallocs */ (GInstanceInitFunc) preferences_init, NULL /* value table */ }; preferences_type = g_type_register_static (G_TYPE_OBJECT, "AmitkPreferences", &preferences_info, 0); } return preferences_type; } static void preferences_class_init (AmitkPreferencesClass * class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); parent_class = g_type_class_peek_parent(class); gobject_class->finalize = preferences_finalize; preferences_signals[DATA_SET_PREFERENCES_CHANGED] = g_signal_new ("data_set_preferences_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkPreferencesClass, data_set_preferences_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); preferences_signals[STUDY_PREFERENCES_CHANGED] = g_signal_new ("study_preferences_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkPreferencesClass, study_preferences_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); preferences_signals[MISC_PREFERENCES_CHANGED] = g_signal_new ("misc_preferences_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkPreferencesClass, misc_preferences_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); } static void preferences_init (AmitkPreferences * preferences) { gchar * temp_str; AmitkLimit i_limit; AmitkWindow i_window; AmitkModality i_modality; /* load in saved preferences */ preferences->canvas_roi_width = amide_gconf_get_int_with_default(GCONF_AMIDE_ROI,"Width", AMITK_PREFERENCES_DEFAULT_CANVAS_ROI_WIDTH); #ifdef AMIDE_LIBGNOMECANVAS_AA preferences->canvas_roi_transparency = amide_gconf_get_float_with_default(GCONF_AMIDE_ROI,"Transparency", AMITK_PREFERENCES_DEFAULT_CANVAS_ROI_TRANSPARENCY); #else preferences->canvas_line_style = amide_gconf_get_int_with_default(GCONF_AMIDE_ROI,"LineStyle",AMITK_PREFERENCES_DEFAULT_CANVAS_LINE_STYLE); preferences->canvas_fill_roi = amide_gconf_get_bool_with_default(GCONF_AMIDE_ROI,"FillIsocontour", AMITK_PREFERENCES_DEFAULT_CANVAS_FILL_ROI); #endif preferences->canvas_layout = amide_gconf_get_int_with_default(GCONF_AMIDE_CANVAS,"Layout", AMITK_PREFERENCES_DEFAULT_CANVAS_LAYOUT); preferences->canvas_maintain_size = amide_gconf_get_bool_with_default(GCONF_AMIDE_CANVAS,"MaintainSize", AMITK_PREFERENCES_DEFAULT_CANVAS_MAINTAIN_SIZE); preferences->canvas_target_empty_area = amide_gconf_get_int_with_default(GCONF_AMIDE_CANVAS,"TargetEmptyArea", AMITK_PREFERENCES_DEFAULT_CANVAS_TARGET_EMPTY_AREA); preferences->panel_layout = amide_gconf_get_int_with_default(GCONF_AMIDE_CANVAS,"PanelLayout", AMITK_PREFERENCES_DEFAULT_PANEL_LAYOUT); preferences->warnings_to_console = amide_gconf_get_bool_with_default(GCONF_AMIDE_MISC,"WarningsToConsole", AMITK_PREFERENCES_DEFAULT_WARNINGS_TO_CONSOLE); preferences->prompt_for_save_on_exit = amide_gconf_get_bool_with_default(GCONF_AMIDE_MISC,"PromptForSaveOnExit", AMITK_PREFERENCES_DEFAULT_PROMPT_FOR_SAVE_ON_EXIT); preferences->which_default_directory = amide_gconf_get_int_with_default(GCONF_AMIDE_MISC,"WhichDefaultDirectory", AMITK_PREFERENCES_DEFAULT_WHICH_DEFAULT_DIRECTORY); preferences->default_directory = amide_gconf_get_string_with_default(GCONF_AMIDE_MISC,"DefaultDirectory", AMITK_PREFERENCES_DEFAULT_DEFAULT_DIRECTORY); for (i_modality=0; i_modalitycolor_table[i_modality] = amide_gconf_get_int_with_default(GCONF_AMIDE_DATASETS,temp_str, amitk_modality_default_color_table[i_modality]); g_free(temp_str); } for (i_window = 0; i_window < AMITK_WINDOW_NUM; i_window++) for (i_limit = 0; i_limit < AMITK_LIMIT_NUM; i_limit++) { temp_str = g_strdup_printf("%s-%s", amitk_window_get_name(i_window), amitk_limit_get_name(i_limit)); preferences->window[i_window][i_limit] = amide_gconf_get_float_with_default(GCONF_AMIDE_WINDOWS,temp_str, amitk_window_default[i_window][i_limit]); } preferences->threshold_style = amide_gconf_get_int_with_default(GCONF_AMIDE_DATASETS,"ThresholdStyle", AMITK_PREFERENCES_DEFAULT_THRESHOLD_STYLE); preferences->dialog = NULL; return; } static void preferences_finalize (GObject *object) { // AmitkPreferences * preferences = AMITK_PREFERENCES(object); G_OBJECT_CLASS (parent_class)->finalize (object); } AmitkPreferences * amitk_preferences_new (void) { AmitkPreferences * preferences; preferences = g_object_new(amitk_preferences_get_type(), NULL); return preferences; } void amitk_preferences_set_canvas_roi_width(AmitkPreferences * preferences, gint roi_width) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); if (roi_width < AMITK_PREFERENCES_MIN_ROI_WIDTH) roi_width = AMITK_PREFERENCES_MIN_ROI_WIDTH; if (roi_width > AMITK_PREFERENCES_MAX_ROI_WIDTH) roi_width = AMITK_PREFERENCES_MAX_ROI_WIDTH; if (AMITK_PREFERENCES_CANVAS_ROI_WIDTH(preferences) != roi_width) { preferences->canvas_roi_width = roi_width; amide_gconf_set_int(GCONF_AMIDE_ROI,"Width", roi_width); g_signal_emit(G_OBJECT(preferences), preferences_signals[STUDY_PREFERENCES_CHANGED], 0); } return; } #ifdef AMIDE_LIBGNOMECANVAS_AA void amitk_preferences_set_canvas_roi_transparency(AmitkPreferences * preferences, gdouble roi_transparency) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); g_return_if_fail(roi_transparency >= 0.0); g_return_if_fail(roi_transparency <= 1.0); if (AMITK_PREFERENCES_CANVAS_ROI_TRANSPARENCY(preferences) != roi_transparency) { preferences->canvas_roi_transparency = roi_transparency; amide_gconf_set_float(GCONF_AMIDE_ROI,"Transparency", roi_transparency); g_signal_emit(G_OBJECT(preferences), preferences_signals[STUDY_PREFERENCES_CHANGED], 0); } return; } #else void amitk_preferences_set_canvas_line_style(AmitkPreferences * preferences, GdkLineStyle line_style) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); if (AMITK_PREFERENCES_CANVAS_LINE_STYLE(preferences) != line_style) { preferences->canvas_line_style = line_style; amide_gconf_set_int(GCONF_AMIDE_ROI,"LineStyle",line_style); g_signal_emit(G_OBJECT(preferences), preferences_signals[STUDY_PREFERENCES_CHANGED], 0); } return; } void amitk_preferences_set_canvas_fill_roi(AmitkPreferences * preferences, gboolean fill_roi) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); if (AMITK_PREFERENCES_CANVAS_FILL_ROI(preferences) != fill_roi) { preferences->canvas_fill_roi = fill_roi; amide_gconf_set_bool(GCONF_AMIDE_ROI,"FillIsocontour",fill_roi); g_signal_emit(G_OBJECT(preferences), preferences_signals[STUDY_PREFERENCES_CHANGED], 0); } return; } #endif void amitk_preferences_set_canvas_layout(AmitkPreferences * preferences, AmitkLayout layout) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); if (AMITK_PREFERENCES_CANVAS_LAYOUT(preferences) != layout) { preferences->canvas_layout = layout; amide_gconf_set_int(GCONF_AMIDE_CANVAS,"Layout", layout); g_signal_emit(G_OBJECT(preferences), preferences_signals[STUDY_PREFERENCES_CHANGED], 0); } return; } void amitk_preferences_set_canvas_maintain_size(AmitkPreferences * preferences, gboolean maintain_size) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); if (AMITK_PREFERENCES_CANVAS_MAINTAIN_SIZE(preferences) != maintain_size) { preferences->canvas_maintain_size = maintain_size; amide_gconf_set_bool(GCONF_AMIDE_CANVAS,"MaintainSize",maintain_size); g_signal_emit(G_OBJECT(preferences), preferences_signals[STUDY_PREFERENCES_CHANGED], 0); } return; }; void amitk_preferences_set_canvas_target_empty_area(AmitkPreferences * preferences, gint target_empty_area) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); /* sanity checks */ if (target_empty_area < AMITK_PREFERENCES_MIN_TARGET_EMPTY_AREA) target_empty_area = AMITK_PREFERENCES_MIN_TARGET_EMPTY_AREA; if (target_empty_area > AMITK_PREFERENCES_MAX_TARGET_EMPTY_AREA) target_empty_area = AMITK_PREFERENCES_MAX_TARGET_EMPTY_AREA; if (AMITK_PREFERENCES_CANVAS_TARGET_EMPTY_AREA(preferences) != target_empty_area) { preferences->canvas_target_empty_area = target_empty_area; amide_gconf_set_int(GCONF_AMIDE_CANVAS,"TargetEmptyArea", target_empty_area); g_signal_emit(G_OBJECT(preferences), preferences_signals[STUDY_PREFERENCES_CHANGED], 0); } return; } void amitk_preferences_set_panel_layout(AmitkPreferences * preferences, AmitkPanelLayout panel_layout) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); if (AMITK_PREFERENCES_PANEL_LAYOUT(preferences) != panel_layout) { preferences->panel_layout = panel_layout; amide_gconf_set_int(GCONF_AMIDE_CANVAS,"PanelLayout", panel_layout); g_signal_emit(G_OBJECT(preferences), preferences_signals[STUDY_PREFERENCES_CHANGED], 0); } return; } void amitk_preferences_set_warnings_to_console(AmitkPreferences * preferences, gboolean new_value) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); if (AMITK_PREFERENCES_WARNINGS_TO_CONSOLE(preferences) != new_value) { preferences->warnings_to_console = new_value; amide_gconf_set_bool(GCONF_AMIDE_MISC,"WarningsToConsole",new_value); g_signal_emit(G_OBJECT(preferences), preferences_signals[MISC_PREFERENCES_CHANGED], 0); } return; } void amitk_preferences_set_prompt_for_save_on_exit(AmitkPreferences * preferences, gboolean new_value) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); if (AMITK_PREFERENCES_PROMPT_FOR_SAVE_ON_EXIT(preferences) != new_value) { preferences->prompt_for_save_on_exit = new_value; amide_gconf_set_bool(GCONF_AMIDE_MISC,"PromptForSaveOnExit",new_value); g_signal_emit(G_OBJECT(preferences), preferences_signals[MISC_PREFERENCES_CHANGED], 0); } return; } void amitk_preferences_set_which_default_directory(AmitkPreferences * preferences, AmitkWhichDefaultDirectory new_value) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); if (AMITK_PREFERENCES_WHICH_DEFAULT_DIRECTORY(preferences) != new_value) { preferences->which_default_directory = new_value; amide_gconf_set_int(GCONF_AMIDE_MISC,"WhichDefaultDirectory",new_value); g_signal_emit(G_OBJECT(preferences), preferences_signals[MISC_PREFERENCES_CHANGED], 0); } return; } void amitk_preferences_set_default_directory(AmitkPreferences * preferences, const gchar * new_directory) { gboolean different=FALSE; g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); if (((AMITK_PREFERENCES_DEFAULT_DIRECTORY(preferences) == NULL) && (new_directory != NULL)) || ((AMITK_PREFERENCES_DEFAULT_DIRECTORY(preferences) != NULL) && (new_directory == NULL))) different=TRUE; else if ((AMITK_PREFERENCES_DEFAULT_DIRECTORY(preferences) != NULL) && (new_directory != NULL)) if (strcmp(AMITK_PREFERENCES_DEFAULT_DIRECTORY(preferences), new_directory) != 0) different=TRUE; if (different) { if (preferences->default_directory != NULL) g_free(preferences->default_directory); if (new_directory != NULL) preferences->default_directory = g_strdup(new_directory); amide_gconf_set_string(GCONF_AMIDE_MISC,"DefaultDirectory", new_directory); g_signal_emit(G_OBJECT(preferences), preferences_signals[MISC_PREFERENCES_CHANGED], 0); } return; } void amitk_preferences_set_color_table(AmitkPreferences * preferences, AmitkModality modality, AmitkColorTable color_table) { gchar * temp_string; g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); g_return_if_fail((modality >= 0) && (modality < AMITK_MODALITY_NUM)); g_return_if_fail((color_table >= 0) && (color_table < AMITK_COLOR_TABLE_NUM)); if (AMITK_PREFERENCES_COLOR_TABLE(preferences,modality) != color_table) { preferences->color_table[modality] = color_table; temp_string = g_strdup_printf("DefaultColorTable%s", amitk_modality_get_name(modality)); amide_gconf_set_int(GCONF_AMIDE_DATASETS,temp_string, color_table); g_free(temp_string); g_signal_emit(G_OBJECT(preferences), preferences_signals[DATA_SET_PREFERENCES_CHANGED], 0); } return; } void amitk_preferences_set_default_window(AmitkPreferences * preferences, const AmitkWindow window, const AmitkLimit limit, const amide_data_t value) { gchar * temp_string; g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); g_return_if_fail((window >= 0) && (window < AMITK_WINDOW_NUM)); g_return_if_fail((limit >= 0) && (limit < AMITK_LIMIT_NUM)); if (!REAL_EQUAL(AMITK_PREFERENCES_WINDOW(preferences, window, limit), value)) { preferences->window[window][limit] = value; temp_string = g_strdup_printf("%s-%s", amitk_window_get_name(window), amitk_limit_get_name(limit)); amide_gconf_set_float(GCONF_AMIDE_WINDOWS,temp_string,value); g_free(temp_string); g_signal_emit(G_OBJECT(preferences), preferences_signals[DATA_SET_PREFERENCES_CHANGED], 0); } return; } void amitk_preferences_set_threshold_style(AmitkPreferences * preferences, const AmitkThresholdStyle threshold_style) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); if (AMITK_PREFERENCES_THRESHOLD_STYLE(preferences) != threshold_style) { preferences->threshold_style = threshold_style; amide_gconf_set_int(GCONF_AMIDE_DATASETS,"ThresholdStyle", threshold_style); g_signal_emit(G_OBJECT(preferences), preferences_signals[DATA_SET_PREFERENCES_CHANGED], 0); } } void amitk_preferences_set_dialog(AmitkPreferences * preferences, GtkWidget * dialog) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); preferences->dialog = dialog; } /* conviencence function */ void amitk_preferences_set_file_chooser_directory(AmitkPreferences * preferences, GtkWidget * file_chooser) { g_return_if_fail(AMITK_IS_PREFERENCES(preferences)); g_return_if_fail(GTK_IS_FILE_CHOOSER(file_chooser)); switch(AMITK_PREFERENCES_WHICH_DEFAULT_DIRECTORY(preferences)) { case AMITK_WHICH_DEFAULT_DIRECTORY_SPECIFIED: if (AMITK_PREFERENCES_DEFAULT_DIRECTORY(preferences) != NULL) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser), AMITK_PREFERENCES_DEFAULT_DIRECTORY(preferences)); break; case AMITK_WHICH_DEFAULT_DIRECTORY_WORKING: gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser), ""); break; case AMITK_WHICH_DEFAULT_DIRECTORY_NONE: default: break; } } amide-1.0.5/src/amitk_study.h0000664000175000017500000002171412270274544015757 0ustar loeningloening/* amitk_study.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_STUDY_H__ #define __AMITK_STUDY_H__ #include "amitk_object.h" #include "amitk_data_set.h" #include "amitk_roi.h" #include "amitk_fiducial_mark.h" #include "amitk_preferences.h" #include "amitk_line_profile.h" G_BEGIN_DECLS #define AMITK_TYPE_STUDY (amitk_study_get_type ()) #define AMITK_STUDY(study) (G_TYPE_CHECK_INSTANCE_CAST ((study), AMITK_TYPE_STUDY, AmitkStudy)) #define AMITK_STUDY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_STUDY, AmitkStudyClass)) #define AMITK_IS_STUDY(study) (G_TYPE_CHECK_INSTANCE_TYPE ((study), AMITK_TYPE_STUDY)) #define AMITK_IS_STUDY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_STUDY)) #define AMITK_STUDY_GET_CLASS(study) (G_TYPE_CHECK_GET_CLASS ((study), AMITK_TYPE_STUDY, AmitkStudyClass)) #define AMITK_STUDY_VIEW_CENTER(stu) (amitk_space_s2b(AMITK_SPACE(stu), AMITK_STUDY(stu)->view_center)) #define AMITK_STUDY_VIEW_THICKNESS(stu) (AMITK_STUDY(stu)->view_thickness) #define AMITK_STUDY_ZOOM(stu) (AMITK_STUDY(stu)->zoom) #define AMITK_STUDY_FOV(stu) (AMITK_STUDY(stu)->fov) #define AMITK_STUDY_VIEW_START_TIME(stu) (AMITK_STUDY(stu)->view_start_time) #define AMITK_STUDY_VIEW_DURATION(stu) (AMITK_STUDY(stu)->view_duration) #define AMITK_STUDY_CREATION_DATE(stu) (AMITK_STUDY(stu)->creation_date) #define AMITK_STUDY_FILENAME(stu) (AMITK_STUDY(stu)->filename) #define AMITK_STUDY_VOXEL_DIM(stu) (AMITK_STUDY(stu)->voxel_dim) #define AMITK_STUDY_VOXEL_DIM_VALID(stu) (AMITK_STUDY(stu)->voxel_dim_valid) #define AMITK_STUDY_FUSE_TYPE(stu) (AMITK_STUDY(stu)->fuse_type) #define AMITK_STUDY_VIEW_MODE(stu) (AMITK_STUDY(stu)->view_mode) #define AMITK_STUDY_CANVAS_VISIBLE(stu, canvas) (AMITK_STUDY(stu)->canvas_visible[canvas]) #define AMITK_STUDY_CANVAS_TARGET(stu) (AMITK_STUDY(stu)->canvas_target) #define AMITK_STUDY_CANVAS_ROI_WIDTH(stu) (AMITK_STUDY(stu)->canvas_roi_width) #ifdef AMIDE_LIBGNOMECANVAS_AA #define AMITK_STUDY_CANVAS_ROI_TRANSPARENCY(stu) (AMITK_STUDY(stu)->canvas_roi_transparency) #else #define AMITK_STUDY_CANVAS_LINE_STYLE(stu) (AMITK_STUDY(stu)->canvas_line_style) #define AMITK_STUDY_CANVAS_FILL_ROI(stu) (AMITK_STUDY(stu)->canvas_fill_roi) #endif #define AMITK_STUDY_CANVAS_LAYOUT(stu) (AMITK_STUDY(stu)->canvas_layout) #define AMITK_STUDY_CANVAS_MAINTAIN_SIZE(stu) (AMITK_STUDY(stu)->canvas_maintain_size) #define AMITK_STUDY_CANVAS_TARGET_EMPTY_AREA(stu) (AMITK_STUDY(stu)->canvas_target_empty_area) #define AMITK_STUDY_PANEL_LAYOUT(stu) (AMITK_STUDY(stu)->panel_layout) #define AMITK_STUDY_LINE_PROFILE(stu) (AMITK_STUDY(stu)->line_profile) typedef enum { AMITK_FUSE_TYPE_BLEND, AMITK_FUSE_TYPE_OVERLAY, AMITK_FUSE_TYPE_NUM } AmitkFuseType; typedef struct _AmitkStudyClass AmitkStudyClass; typedef struct _AmitkStudy AmitkStudy; struct _AmitkStudy { AmitkObject parent; gchar * creation_date; /* when this study was created */ /* canvas view parameters */ AmitkPoint view_center; /* wrt the study coordinate space */ amide_real_t view_thickness; amide_time_t view_start_time; amide_time_t view_duration; amide_real_t zoom; amide_real_t fov; /* field of view, in percent */ AmitkFuseType fuse_type; AmitkViewMode view_mode; gboolean canvas_visible[AMITK_VIEW_NUM]; gboolean canvas_target; /* target on/off */ /* canvas preferences */ gint canvas_roi_width; #ifdef AMIDE_LIBGNOMECANVAS_AA gdouble canvas_roi_transparency; #else GdkLineStyle canvas_line_style; gboolean canvas_fill_roi; #endif AmitkLayout canvas_layout; gboolean canvas_maintain_size; gint canvas_target_empty_area; /* in pixels */ AmitkPanelLayout panel_layout; /* stuff calculated when file is loaded and stored */ amide_real_t voxel_dim; /* prefered voxel/pixel dim, canvas wants this info */ gboolean voxel_dim_valid; /* stuff that doesn't need to be saved */ AmitkLineProfile * line_profile; gchar * filename; /* file name of the study */ }; struct _AmitkStudyClass { AmitkObjectClass parent_class; void (* filename_changed) (AmitkStudy * study); void (* thickness_changed) (AmitkStudy * study); void (* time_changed) (AmitkStudy * study); void (* canvas_visible_changed) (AmitkStudy * study); void (* view_mode_changed) (AmitkStudy * study); void (* canvas_target_changed) (AmitkStudy * study); void (* voxel_dim_or_zoom_changed) (AmitkStudy * study); void (* fov_changed) (AmitkStudy * study); void (* fuse_type_changed) (AmitkStudy * study); void (* view_center_changed) (AmitkStudy * study); void (* canvas_roi_preference_changed) (AmitkStudy * study); void (* canvas_general_preference_changed) (AmitkStudy * study); void (* canvas_target_preference_changed) (AmitkStudy * study); void (* canvas_layout_preference_changed) (AmitkStudy * study); void (* panel_layout_preference_changed) (AmitkStudy * study); }; /* Application-level methods */ GType amitk_study_get_type (void); AmitkStudy * amitk_study_new (AmitkPreferences * preferences); void amitk_study_set_filename (AmitkStudy * study, const gchar * new_filename); void amitk_study_suggest_name (AmitkStudy * study, const gchar * suggested_name); void amitk_study_set_creation_date (AmitkStudy * study, const gchar * new_date); void amitk_study_set_view_thickness (AmitkStudy * study, const amide_real_t new_thickness); void amitk_study_set_view_center (AmitkStudy * study, const AmitkPoint new_center); void amitk_study_set_view_start_time (AmitkStudy * study, const amide_time_t new_start); void amitk_study_set_view_duration (AmitkStudy * study, const amide_time_t new_duration); void amitk_study_set_fuse_type (AmitkStudy * study, const AmitkFuseType new_fuse_type); void amitk_study_set_view_mode (AmitkStudy * study, const AmitkViewMode new_view_mode); void amitk_study_set_canvas_visible (AmitkStudy * study, const AmitkView view, const gboolean visible); void amitk_study_set_zoom (AmitkStudy * study, const amide_real_t new_zoom); void amitk_study_set_fov (AmitkStudy * study, const amide_real_t new_fov); void amitk_study_set_canvas_target (AmitkStudy * study, const gboolean always_on); void amitk_study_set_canvas_roi_width (AmitkStudy * study, gint roi_width); #ifdef AMIDE_LIBGNOMECANVAS_AA void amitk_study_set_canvas_roi_transparency(AmitkStudy * study, const gdouble transparency); #else void amitk_study_set_canvas_line_style (AmitkStudy * study, const GdkLineStyle line_style); void amitk_study_set_canvas_fill_roi (AmitkStudy * study, const gboolean fill_roi); #endif void amitk_study_set_canvas_layout (AmitkStudy * study, const AmitkLayout layout); void amitk_study_set_canvas_maintain_size(AmitkStudy * study, const gboolean maintain_size); void amitk_study_set_canvas_target_empty_area(AmitkStudy * study, gint target_empty_area); void amitk_study_set_panel_layout (AmitkStudy * study, const AmitkPanelLayout panel_layout); AmitkStudy * amitk_study_recover_xml (const gchar * study_filename, AmitkPreferences * preferences); AmitkStudy * amitk_study_load_xml (const gchar * study_filename); gboolean amitk_study_save_xml (AmitkStudy * study, const gchar * study_filename, const gboolean save_as_directory); const gchar * amitk_fuse_type_get_name (const AmitkFuseType fuse_type); const gchar * amitk_view_mode_get_name (const AmitkViewMode view_mode); G_END_DECLS #endif /* __AMITK_STUDY_H__ */ amide-1.0.5/src/mpeg_encode.c0000664000175000017500000004052412270274000015645 0ustar loeningloening/* mpeg_encode.c - interface to the mpeg encoding library * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" /* shared code */ #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) #include #include #include #include "amide_intl.h" #include "mpeg_encode.h" /* note, this is identifical to fame_yuv_t */ typedef struct __yuv_t_ { unsigned int w, h, p; unsigned char *y; unsigned char *u; unsigned char *v; } yuv_t; #define RGB_TO_Y(pixels, loc) (0.29900 * pixels[loc] + 0.58700 * pixels[loc+1] + 0.11400 * pixels[loc+2]) #define RGB_TO_U(pixels, loc)(-0.16874 * pixels[loc] - 0.33126 * pixels[loc+1] + 0.50000 * pixels[loc+2]+128.0) #define RGB_TO_V(pixels, loc) (0.50000 * pixels[loc] - 0.41869 * pixels[loc+1] - 0.08131 * pixels[loc+2]+128.0) static void convert_rgb_pixbuf_to_yuv(yuv_t * yuv, GdkPixbuf * pixbuf) { gint x, y, location, location2; gint inner_x, inner_y, half_location; gfloat cr, cb; gint pixbuf_xsize, pixbuf_ysize; guchar * pixels; gint row_stride; gboolean x_odd, y_odd; pixbuf_xsize = gdk_pixbuf_get_width(pixbuf); pixbuf_ysize = gdk_pixbuf_get_height(pixbuf); pixels = gdk_pixbuf_get_pixels(pixbuf); row_stride = gdk_pixbuf_get_rowstride(pixbuf); y_odd = (pixbuf_ysize & 0x1); x_odd = (pixbuf_xsize & 0x1); /* note, the Cr and Cb info is subsampled by 2x2 */ for (y=0; yy[inner_x+inner_y*yuv->w] = RGB_TO_Y(pixels, location); cb += RGB_TO_U(pixels, location); cr += RGB_TO_V(pixels, location); } half_location = x/2 + y*yuv->w/4; yuv->u[half_location] = cb/4.0; yuv->v[half_location] = cr/4.0; } if (x_odd) { location = y*row_stride+3*x; location2 = (y+1)*row_stride+3*x; yuv->y[x+y*yuv->w] = RGB_TO_Y(pixels, location); yuv->y[x+1+y*yuv->w] = 0; yuv->y[x+(y+1)*yuv->w] = RGB_TO_Y(pixels, location2); yuv->y[x+1+(y+1)*yuv->w] = 0; half_location = x/2 + y*yuv->w/4; yuv->u[half_location] = (RGB_TO_U(pixels, location)+RGB_TO_U(pixels, location2)+256)/4.0; yuv->v[half_location] = (RGB_TO_V(pixels, location)+RGB_TO_V(pixels, location2)+256)/4.0; } } if (y_odd) { for (x=0; xy[x+y*yuv->w] = RGB_TO_Y(pixels, location); yuv->y[x+1+y*yuv->w] = RGB_TO_Y(pixels, location2); yuv->y[x+(y+1)*yuv->w] = 0; yuv->y[x+1+(y+1)*yuv->w] = 0; half_location = x/2 + y*yuv->w/4; yuv->u[half_location] = (RGB_TO_U(pixels, location)+RGB_TO_U(pixels, location2)+256)/4.0; yuv->v[half_location] = (RGB_TO_V(pixels, location)+RGB_TO_V(pixels, location2)+256)/4.0; } if (x_odd) { location = y*row_stride+3*x; yuv->y[x+y*yuv->w] = RGB_TO_Y(pixels, location); yuv->y[x+1+y*yuv->w] = 0; yuv->y[x+(y+1)*yuv->w] = 0; yuv->y[x+1+(y+1)*yuv->w] = 0; half_location = x/2 + y*yuv->w/4; yuv->u[half_location] = (RGB_TO_U(pixels, location)+384)/4.0; yuv->v[half_location] = (RGB_TO_V(pixels, location)+384)/4.0; } } return; } #endif /* AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT */ /* -------------------------------------------------------- */ /* ---------------------- ffmpeg encoding ----------------- */ /* -------------------------------------------------------- */ #ifdef AMIDE_FFMPEG_SUPPORT #include typedef struct { AVCodec *codec; AVCodecContext *context; AVFrame *picture; yuv_t * yuv; guchar * output_buffer; gint output_buffer_size; gint size; /* output frame width * height */ FILE * output_file; } encode_t; /* free a mpeg_encode encode structure */ static encode_t * encode_free(encode_t * encode) { if (encode == NULL) return encode; if (encode->context != NULL) { avcodec_close(encode->context); av_free(encode->context); encode->context = NULL; } if (encode->picture != NULL) { av_free(encode->picture); encode->picture=NULL; } if (encode->yuv != NULL) { g_free(encode->yuv->y); g_free(encode->yuv); encode->yuv = NULL; } if (encode->output_buffer != NULL) { g_free(encode->output_buffer); encode->output_buffer = NULL; } // if (encode->fame_parameters != NULL) { // g_free(encode->fame_parameters); // encode->fame_parameters = NULL; // } // if (encode->yuv != NULL) { // g_free(encode->yuv->y); // g_free(encode->yuv); // encode->yuv = NULL; // } if (encode->output_file != NULL) { fclose(encode->output_file); encode->output_file = NULL; } g_free(encode); return NULL; } gboolean avcodec_initialized=FALSE; static void mpeg_encoding_init(void) { if (!avcodec_initialized) { /* must be called before using avcodec lib */ avcodec_register_all(); /* register all the codecs */ avcodec_register_all(); avcodec_initialized=TRUE; } } gpointer mpeg_encode_setup(gchar * output_filename, mpeg_encode_t type, gint xsize, gint ysize) { encode_t * encode; gint codec_type; gint i; mpeg_encoding_init(); switch(type) { case ENCODE_MPEG4: codec_type = CODEC_ID_MPEG4; break; case ENCODE_MPEG1: default: codec_type=CODEC_ID_MPEG1VIDEO; break; } /* alloc space for the mpeg_encoding structure */ if ((encode = g_try_new(encode_t,1)) == NULL) { g_warning("couldn't allocate memory space for encode_t"); return NULL; } encode->context=NULL; encode->picture=NULL; encode->yuv=NULL; encode->output_buffer=NULL; encode->output_file=NULL; /* find the mpeg1 video encoder */ encode->codec = avcodec_find_encoder(codec_type); if (!encode->codec) { g_warning("couldn't find codec %d",codec_type); encode_free(encode); return NULL; } encode->context = avcodec_alloc_context3(NULL); if (!encode->context) { g_warning("couldn't allocate memory for encode->context"); encode_free(encode); return NULL; } encode->picture= avcodec_alloc_frame(); if (!encode->picture) { g_warning("couldn't allocate memory for encode->picture"); encode_free(encode); return NULL; } /* at a minimum, the width and height need to be even */ /* we'll make them divisible by 16 incase ffmpeg wants to use AltiVec or SSE acceleration */ xsize = 16*ceil(xsize/16.0); ysize = 16*ceil(ysize/16.0); /* put sample parameters */ /* used to use 400000.0*((float) (xsize*ysize)/(352.0*288.0)) but output mpeg was too blocky */ encode->context->bit_rate = 2000000.0*((float) (xsize*ysize)/(352.0*288.0)); encode->context->width = xsize; encode->context->height = ysize; encode->size = encode->context->width*encode->context->height; /* frames per second */ encode->context->time_base= (AVRational){1,FRAMES_PER_SECOND}; encode->context->gop_size = 10; /* emit one intra frame every ten frames */ encode->context->max_b_frames=10; encode->context->pix_fmt = PIX_FMT_YUV420P; /* encoding parameters */ encode->context->sample_aspect_ratio= (AVRational){1,1}; /* our pixels are square */ encode->context->me_method=5; /* 5 is epzs */ encode->context->trellis=2; /* turn trellis quantization on */ /* open it */ if (avcodec_open2(encode->context, encode->codec, NULL) < 0) { g_warning("could not open codec"); encode_free(encode); return NULL; } if ((encode->output_file = fopen(output_filename, "wb")) == NULL) { g_warning("unable to open output file for mpeg encoding"); encode_free(encode); return NULL; } /* alloc image and output buffer */ encode->output_buffer_size = 200000*(xsize*ysize)/(352*288); if (encode->output_buffer_size < 100000) encode->output_buffer_size=100000; if ((encode->output_buffer = g_try_new(guchar,encode->output_buffer_size)) == NULL) { g_warning("couldn't allocate memory space for output_buffer"); encode_free(encode); return NULL; } if ((encode->yuv = g_try_new(yuv_t, 1)) == NULL) { g_warning(_("Unable to allocate yuv struct")); encode_free(encode); return NULL; } encode->yuv->w = xsize; encode->yuv->h = ysize; encode->yuv->p = xsize; /* alloc mem for YUV 420 size (hence the 3/2) */ if ((encode->yuv->y = g_try_new0(guchar, xsize*ysize*3/2)) == NULL) { g_warning(_("Unable to allocate yuv buffer")); encode_free(encode); return NULL; } encode->yuv->u = encode->yuv->y + xsize*ysize; encode->yuv->v = encode->yuv->u + xsize*ysize/4; /* initialize the u and v portions of the yuv buffer, as 0 is not the right initial value, and the portion of the buffer that's larger then the pixbuf's we use will never be written to */ for (i=0; iyuv->u[i] = 128; encode->yuv->v[i] = 128; } encode->picture->data[0] = encode->yuv->y; encode->picture->data[1] = encode->yuv->u; encode->picture->data[2] = encode->yuv->v; encode->picture->linesize[0] = encode->context->width; encode->picture->linesize[1] = encode->context->width/2; encode->picture->linesize[2] = encode->context->width/2; return (gpointer) encode; } gboolean mpeg_encode_frame(gpointer data, GdkPixbuf * pixbuf) { encode_t * encode = data; gint out_size; convert_rgb_pixbuf_to_yuv(encode->yuv, pixbuf); /* encode the image */ out_size = avcodec_encode_video(encode->context, encode->output_buffer, encode->output_buffer_size, encode->picture); fwrite(encode->output_buffer, 1, out_size, encode->output_file); return TRUE; }; /* close everything up */ gpointer mpeg_encode_close(gpointer data) { encode_t * encode = data; /* add sequence end code to have a real mpeg file */ encode->output_buffer[0] = 0x00; encode->output_buffer[1] = 0x00; encode->output_buffer[2] = 0x01; encode->output_buffer[3] = 0xb7; fwrite(encode->output_buffer, 1, 4, encode->output_file); /* free encode struct/close out_file */ encode_free(encode); return NULL; } /* endif AMIDE_FFMPEG_SUPPORT */ /* --------------------------------------------------------------------------------------------------------*/ /* old code */ /* mpeg encoding used to be done using libfame */ /* --------------------------------------------------------------------------------------------------------*/ #elif AMIDE_LIBFAME_SUPPORT #include #define BUFFER_MULT 8 typedef struct { fame_context_t * fame_context; fame_parameters_t * fame_parameters; gint xsize; gint ysize; guchar *buffer; gint buffer_size; /*xsize*ysize*BUFFER_MULT */ yuv_t * yuv; FILE * output_file; } context_t; /* free a mpeg_encode context structure */ static context_t * context_free(context_t * context) { gint length; if (context == NULL) return context; if (context->fame_context != NULL) { length = fame_close(context->fame_context); /* flush anything left */ if ((context->buffer != NULL) && (context->output_file != NULL)) /* and finish writing the file */ fwrite(context->buffer, sizeof(guchar), length, context->output_file); context->fame_context = NULL; } if (context->output_file != NULL) { fclose(context->output_file); context->output_file = NULL; } if (context->fame_parameters != NULL) { g_free(context->fame_parameters); context->fame_parameters = NULL; } if (context->buffer != NULL) { g_free(context->buffer); context->buffer = NULL; } if (context->yuv != NULL) { g_free(context->yuv->y); g_free(context->yuv); context->yuv = NULL; } g_free(context); return NULL; } /* setup the mpeg encoding process */ gpointer mpeg_encode_setup(gchar * output_filename, mpeg_encode_t type, gint xsize, gint ysize) { fame_parameters_t default_fame_parameters = FAME_PARAMETERS_INITIALIZER; context_t * context; fame_object_t *object; int i; /* we need x and y to be divisible by 2 for conversion to YUV12 space */ /* and we need x and y to be divisible by 16 for fame */ xsize = 16*ceil(xsize/16.0); ysize = 16*ceil(ysize/16.0); /* alloc space for the mpeg_encoding structure */ if ((context = g_try_new(context_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for context_t")); return NULL; } context->fame_context = NULL; context->fame_parameters = NULL; context->buffer = NULL; context->output_file = NULL; context->xsize = xsize; context->ysize = ysize; context->buffer_size = xsize*ysize*BUFFER_MULT; /* needs to be able to hold a couple frames */ if ((context->fame_parameters = g_try_new(fame_parameters_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for fame parameters")); context_free(context); return NULL; } memcpy(context->fame_parameters, &default_fame_parameters, sizeof(fame_parameters_t)); if ((context->buffer = g_try_new(guchar, context->buffer_size)) == NULL) { g_warning(_("Unable to allocate memory space for mpeg encoding buffer")); context_free(context); return NULL; } if ((context->yuv = g_try_new(yuv_t, 1)) == NULL) { g_warning(_("Unable to allocate yuv struct")); context_free(context); return NULL; } context->yuv->w = xsize; context->yuv->h = ysize; context->yuv->p = xsize; if ((context->yuv->y = g_try_new(unsigned char, xsize*ysize*3/2)) == NULL) { g_warning(_("Unable to allocate yuv buffer")); context_free(context); return NULL; } context->yuv->u = context->yuv->y + xsize*ysize; context->yuv->v = context->yuv->u + xsize*ysize/4; /* initialize yuv buffer, as the portion of the buffer that's large then the pixbuf's we use is never used*/ for (i=0; iyuv->y[i] = 0; for (i=0; iyuv->u[i] = 128; context->yuv->v[i] = 128; } if ((context->output_file = fopen(output_filename, "wb")) == NULL) { g_warning(_("unable to open output file for mpeg encoding")); context_free(context); return NULL; } context->fame_context = fame_open(); /* initalize library */ /* specify any parameters we want to change from default */ context->fame_parameters->width = xsize; context->fame_parameters->height = ysize; context->fame_parameters->frame_rate_num = FRAMES_PER_SECOND; context->fame_parameters->frame_rate_den = 1; context->fame_parameters->verbose = 0; /* turn off verbose mode */ /* specify additional options */ switch(type) { case ENCODE_MPEG4: object = fame_get_object(context->fame_context, "profile/mpeg4"); break; case ENCODE_MPEG1: default: object = fame_get_object(context->fame_context, "profile/mpeg1"); break; } fame_register(context->fame_context, "profile", object); fame_init(context->fame_context, context->fame_parameters, context->buffer, context->buffer_size); return (gpointer) context; } /* encode a frame of data */ gboolean mpeg_encode_frame(gpointer data, GdkPixbuf * pixbuf) { context_t * context = data; gint length; g_return_val_if_fail(gdk_pixbuf_get_colorspace(pixbuf) == GDK_COLORSPACE_RGB, FALSE); convert_rgb_pixbuf_to_yuv(context->yuv, pixbuf); fame_start_frame(context->fame_context, context->yuv, NULL); while((length = fame_encode_slice(context->fame_context)) != 0) fwrite(context->buffer, sizeof(guchar), length, context->output_file); fame_end_frame(context->fame_context, NULL); return TRUE; } /* close everything up */ gpointer mpeg_encode_close(gpointer data) { context_t * context = data; context_free(context); /* free context */ return NULL; } #endif /* AMIDE_LIBFAME_SUPPORT */ amide-1.0.5/src/ui_common.h0000664000175000017500000001006212270274474015403 0ustar loeningloening/* ui_common.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* header files that are always needed with this file */ #include #include #include "amitk_point.h" #define HELP_MENU_UI_DESCRIPTION " " typedef enum { UI_CURSOR_DEFAULT, UI_CURSOR_ROI_MODE, UI_CURSOR_ROI_RESIZE, UI_CURSOR_ROI_ROTATE, UI_CURSOR_OBJECT_SHIFT, UI_CURSOR_ROI_ISOCONTOUR, UI_CURSOR_ROI_ERASE, UI_CURSOR_ROI_DRAW, UI_CURSOR_DATA_SET_MODE, UI_CURSOR_FIDUCIAL_MARK_MODE, UI_CURSOR_RENDERING_ROTATE_XY, UI_CURSOR_RENDERING_ROTATE_Z, UI_CURSOR_WAIT, NUM_CURSORS } ui_common_cursor_t; typedef enum { UI_COMMON_HELP_MENU_CONTENTS, UI_COMMON_HELP_MENU_ABOUT, UI_COMMON_HELP_MENU_NUM } ui_common_help_menu_t; /* external functions */ gboolean ui_common_check_filename(const gchar * filename); void ui_common_set_last_path_used(const gchar * last_path_used); gchar * ui_common_suggest_path(void); void ui_common_entry_name_cb(gchar * entry_string, gpointer data); void ui_common_about_cb(GtkWidget * button, gpointer data); void ui_common_draw_view_axis(GnomeCanvas * canvas, gint row, gint column, AmitkView view, AmitkLayout layout, gint axis_width, gint axis_height); void ui_common_update_sample_roi_item(GnomeCanvasItem * roi_item, gint roi_width, #ifdef AMIDE_LIBGNOMECANVAS_AA gdouble transparency #else GdkLineStyle line_style #endif ); void ui_common_study_preferences_widgets(GtkWidget * packing_table, gint table_row, GtkWidget ** proi_width_spin, GnomeCanvasItem ** proi_item, #ifdef AMIDE_LIBGNOMECANVAS_AA GtkWidget ** proi_transparency_spin, #else GtkWidget ** pline_style_menu, GtkWidget ** fill_roi_button, #endif GtkWidget ** playout_button1, GtkWidget ** playout_button2, GtkWidget ** ppanel_layout_button1, GtkWidget ** ppanel_layout_button2, GtkWidget ** ppanel_layout_button3, GtkWidget ** pmaintain_size_button, GtkWidget ** ptarget_size_spin); GtkWidget * ui_common_create_view_axis_indicator(AmitkLayout layout); void ui_common_place_cursor_no_wait(ui_common_cursor_t which_cursor, GtkWidget * widget); void ui_common_remove_wait_cursor(GtkWidget * widget); void ui_common_place_cursor(ui_common_cursor_t which_cursor, GtkWidget * widget); GtkWidget * ui_common_entry_dialog(GtkWindow * parent, gchar * prompt, gchar **return_str_ptr); void ui_common_init_dialog_response_cb (GtkDialog * dialog, gint response_id, gpointer data); GList * ui_common_init_dialog_selected_objects(GtkWidget * dialog); void ui_common_toolbar_insert_widget(GtkWidget * toolbar, GtkWidget * widget, const gchar * tooltip, gint position); void ui_common_toolbar_append_widget(GtkWidget * toolbar, GtkWidget * widget, const gchar * tooltip); void ui_common_toolbar_append_separator(GtkWidget * toolbar); void amide_call_help(const gchar * link_id); void amide_register_window(gpointer * widget); void amide_unregister_window(gpointer * widget); void amide_unregister_all_windows(void); /* external variables */ extern GtkActionEntry ui_common_help_menu_items[UI_COMMON_HELP_MENU_NUM]; extern GdkCursor * ui_common_cursor[NUM_CURSORS]; amide-1.0.5/src/amitk_data_set_variable_type.h0000664000175000017500000001325212270274570021276 0ustar loeningloening/* amitk_data_set_variable_type.h - used to generate the different amitk_data_set_*.h files * * Part of amide - Amide's a Medical Image Data Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'__ #define __AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'__ /* header files that are always needed with this file */ #include "amitk_data_set.h" /* defines */ /* translates to the contents of the voxel specified by voxelpoint i */ #define AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_CONTENT(data_set,i) \ (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->current_scaling_factor, (i))) * \ ((amide_data_t) (*(AMITK_RAW_DATA_`'m4_Variable_Type`'_POINTER((data_set)->raw_data,(i)))))) #define AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_INTERCEPT_CONTENT(data_set,i) \ (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->current_scaling_factor, (i))) * \ ((amide_data_t) (*(AMITK_RAW_DATA_`'m4_Variable_Type`'_POINTER((data_set)->raw_data,(i)))) + \ (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->internal_scaling_intercept, (i)))))) #define AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_INTERNAL_CONTENT(data_set,i) \ (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->internal_scaling_factor, (i))) * \ ((amide_data_t) (*(AMITK_RAW_DATA_`'m4_Variable_Type`'_POINTER((data_set)->raw_data,(i)))))) #define AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_INTERCEPT_INTERNAL_CONTENT(data_set,i) \ (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->internal_scaling_factor, (i))) * \ ((amide_data_t) (*(AMITK_RAW_DATA_`'m4_Variable_Type`'_POINTER((data_set)->raw_data,(i)))) + \ (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->internal_scaling_intercept, (i)))))) #define AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_SET_CONTENT(data_set,i,value) \ (AMITK_RAW_DATA_`'m4_Variable_Type`'_SET_CONTENT((data_set)->raw_data, (i)) = value/ \ (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->current_scaling_factor, (i))))) #define AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_INTERCEPT_SET_CONTENT(data_set,i,value) \ (AMITK_RAW_DATA_`'m4_Variable_Type`'_SET_CONTENT((data_set)->raw_data, (i)) = value/ \ (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->current_scaling_factor, (i)))) \ - (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->internal_scaling_intercept, (i))))) #define AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_SET_INTERNAL_CONTENT(data_set,i,value) \ (AMITK_RAW_DATA_`'m4_Variable_Type`'_SET_CONTENT((data_set)->raw_data, (i)) = value/ \ (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->internal_scaling_factor, (i))))) #define AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_INTERCEPT_SET_INTERNAL_CONTENT(data_set,i,value) \ (AMITK_RAW_DATA_`'m4_Variable_Type`'_SET_CONTENT((data_set)->raw_data, (i)) = value/ \ (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->internal_scaling_factor, (i)))) \ - (*(AMITK_RAW_DATA_DOUBLE_`'m4_Scale_Dim`'_POINTER((data_set)->internal_scaling_intercept, (i))))) /* function declarations */ void amitk_data_set_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_calc_slice_min_max(AmitkDataSet * data_set, const amide_intpoint_t frame, const amide_intpoint_t gate, const amide_intpoint_t z, amitk_format_DOUBLE_t * pmin, amitk_format_DOUBLE_t * pmax); void amitk_data_set_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_INTERCEPT_calc_slice_min_max(AmitkDataSet * data_set, const amide_intpoint_t frame, const amide_intpoint_t gate, const amide_intpoint_t z, amitk_format_DOUBLE_t * pmin, amitk_format_DOUBLE_t * pmax); void amitk_data_set_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_calc_distribution(AmitkDataSet * data_set, AmitkUpdateFunc update_func, gpointer update_data); void amitk_data_set_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_INTERCEPT_calc_distribution(AmitkDataSet * data_set, AmitkUpdateFunc update_func, gpointer update_data); AmitkDataSet * amitk_data_set_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_get_slice(AmitkDataSet * data_set, const amide_time_t start_time, const amide_time_t duration, const amide_intpoint_t gate, const AmitkCanvasPoint pixel_size, const AmitkVolume * slice_volume); AmitkDataSet * amitk_data_set_`'m4_Variable_Type`'_`'m4_Scale_Dim`'_INTERCEPT_get_slice(AmitkDataSet * data_set, const amide_time_t start_time, const amide_time_t duration, const amide_intpoint_t gate, const AmitkCanvasPoint pixel_size, const AmitkVolume * slice_volume); #endif /* __AMITK_DATA_SET_`'m4_Variable_Type`'_`'m4_Scale_Dim`'__ */ amide-1.0.5/src/amitk_raw_data_variable_type.h0000664000175000017500000000736512270274552021304 0ustar loeningloening/* amitk_raw_data_variable_type.h - used to generate the different amitk_raw_data_*.h files * * Part of amide - Amide's a Medical Image Data Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_RAW_DATA_`'m4_Variable_Type`'__ #define __AMITK_RAW_DATA_`'m4_Variable_Type`'__ /* header files that are always needed with this file */ #include "amitk_raw_data.h" /* defines */ #define AMITK_RAW_DATA_`'m4_Variable_Type`'_0D_SCALING_POINTER(amitk_raw_data,i) \ (((amitk_format_`'m4_Variable_Type`'_t *) (amitk_raw_data)->data)) #define AMITK_RAW_DATA_`'m4_Variable_Type`'_1D_SCALING_POINTER(amitk_raw_data,i) \ (((amitk_format_`'m4_Variable_Type`'_t *) (amitk_raw_data)->data)+(i).t) #define AMITK_RAW_DATA_`'m4_Variable_Type`'_2D_SCALING_POINTER(amitk_raw_data,i) \ (((amitk_format_`'m4_Variable_Type`'_t *) (amitk_raw_data)->data)+ \ (((((i).t) * ((amitk_raw_data)->dim.g) + \ (i).g) * ((amitk_raw_data)->dim.z)) + \ (i).z)) #define AMITK_RAW_DATA_`'m4_Variable_Type`'_POINTER(amitk_raw_data,i) \ (((amitk_format_`'m4_Variable_Type`'_t *) (amitk_raw_data)->data)+ \ ((((((((((i).t) * ((amitk_raw_data)->dim.g)) + \ (i).g) * ((amitk_raw_data)->dim.z)) + \ (i).z) * ((amitk_raw_data)->dim.y)) + \ (i).y) * ((amitk_raw_data)->dim.x)) + \ (i).x)) #define AMITK_RAW_DATA_`'m4_Variable_Type`'_3D_POINTER(amitk_raw_data,iz,iy,ix) \ (((amitk_format_`'m4_Variable_Type`'_t *) (amitk_raw_data)->data)+ \ ((((((iz)) * ((amitk_raw_data)->dim.y)) + \ (iy)) * ((amitk_raw_data)->dim.x)) + \ (ix))) #define AMITK_RAW_DATA_`'m4_Variable_Type`'_2D_POINTER(amitk_raw_data,iy,ix) \ (((amitk_format_`'m4_Variable_Type`'_t *) (amitk_raw_data)->data)+ \ ((((iy)) * ((amitk_raw_data)->dim.x)) + \ (ix))) #define AMITK_RAW_DATA_`'m4_Variable_Type`'_SET_CONTENT(amitk_raw_data,i) \ (*(AMITK_RAW_DATA_`'m4_Variable_Type`'_POINTER((amitk_raw_data),(i)))) #define AMITK_RAW_DATA_`'m4_Variable_Type`'_CONTENT(amitk_raw_data,i) \ (*(AMITK_RAW_DATA_`'m4_Variable_Type`'_POINTER((amitk_raw_data),(i)))) #define AMITK_RAW_DATA_`'m4_Variable_Type`'_2D_SET_CONTENT(amitk_raw_data,iy,ix) \ (*(AMITK_RAW_DATA_`'m4_Variable_Type`'_2D_POINTER((amitk_raw_data),(iy),(ix)))) #define AMITK_RAW_DATA_`'m4_Variable_Type`'_2D_CONTENT(amitk_raw_data,iy,ix) \ (*(AMITK_RAW_DATA_`'m4_Variable_Type`'_2D_POINTER((amitk_raw_data),(iy),(ix)))) #define AMITK_RAW_DATA_`'m4_Variable_Type`'_3D_SET_CONTENT(amitk_raw_data,iz,iy,ix) \ (*(AMITK_RAW_DATA_`'m4_Variable_Type`'_3D_POINTER((amitk_raw_data), (iz),(iy), (ix)))) #define AMITK_RAW_DATA_`'m4_Variable_Type`'_3D_CONTENT(amitk_raw_data,iz,iy,ix) \ (*(AMITK_RAW_DATA_`'m4_Variable_Type`'_3D_POINTER((amitk_raw_data),(iz),(iy),(ix)))) /* function declarations */ AmitkRawData * amitk_raw_data_`'m4_Variable_Type`'_0D_SCALING_init(amitk_format_`'m4_Variable_Type`'_t init_value); void amitk_raw_data_`'m4_Variable_Type`'_initialize_data(AmitkRawData * amitk_raw_data, amitk_format_`'m4_Variable_Type`'_t init_value); #endif /* __AMITK_RAW_DATA_`'m4_Variable_Type`'__ */ amide-1.0.5/src/tb_filter.c0000664000175000017500000003656412270274022015367 0ustar loeningloening/* tb_filter.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amide.h" #include "amitk_data_set.h" #include "amitk_progress_dialog.h" #include "tb_filter.h" #define LABEL_WIDTH 375 #define MIN_FIR_FILTER_SIZE 7 #define MAX_FIR_FILTER_SIZE 31 #define MIN_NONLINEAR_FILTER_SIZE 3 #define MAX_NONLINEAR_FILTER_SIZE 11 #define DEFAULT_GAUSSIAN_FILTER_SIZE 15 #define DEFAULT_MEDIAN_FILTER_SIZE 3 #define MAX_FWHM 100.0 /* mm */ #define MIN_FWHM 0.0 /* mm */ static const char * wizard_name = N_("Data Set Filtering Wizard"); static const char * finish_page_text = N_("When the apply button is hit, a new data set will be created " "and placed into the study's tree, consisting of the appropriately " "filtered data\n"); #ifdef AMIDE_LIBGSL_SUPPORT static const char * gaussian_filter_text = N_("The Gaussian filter is an effective smoothing filter"); #endif static const char * median_3d_filter_text = N_("Median filter work relatively well at preserving edges while\n" "removing speckle noise.\n" "\n" "This filter is the 3D median filter, so the neighborhood used for\n" "determining the median will be KSxKSxKS, KS=kernel size"); static const char * median_linear_filter_text = N_("Median filters work relatively well at preserving edges while\n" "removing speckle noise.\n" "\n" "This filter is the 1D median filter, so the neighboorhood used for\n" "determining the median will be of the given kernel size, and the\n" "data set will be filtered 3x (once for each direction)."); #ifndef AMIDE_LIBGSL_SUPPORT static const char *no_libgsl_text = N_("This filter requires support from the GNU Scientific Library (GSL).\n" "This version of AMIDE has not been compiled with GSL support enabled."); #endif typedef enum { PICK_FILTER_PAGE, GAUSSIAN_FILTER_PAGE, MEDIAN_LINEAR_FILTER_PAGE, MEDIAN_3D_FILTER_PAGE, CONCLUSION_PAGE, NUM_PAGES } which_page_t; /* data structures */ typedef struct tb_filter_t { GtkWidget * dialog; AmitkFilter filter; gint kernel_size; amide_real_t fwhm; AmitkDataSet * data_set; AmitkStudy * study; GtkWidget * page[NUM_PAGES]; GtkWidget * progress_dialog; guint reference_count; } tb_filter_t; static void filter_cb(GtkWidget * widget, gpointer data); static void kernel_size_spinner_cb(GtkSpinButton * spin_button, gpointer data); static void fwhm_spinner_cb(GtkSpinButton * spin_button, gpointer data); static void apply_cb(GtkAssistant * assistant, gpointer data); static void close_cb(GtkAssistant * assistant, gpointer data); static gint forward_page_function (gint current_page, gpointer data); static tb_filter_t * tb_filter_free(tb_filter_t * tb_filter); static tb_filter_t * tb_filter_init(void); static GtkWidget * create_page(tb_filter_t * tb_filter, which_page_t i_page); /* function to change the color table */ static void filter_cb(GtkWidget * widget, gpointer data) { tb_filter_t * tb_filter = data; tb_filter->filter = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); return; } static void kernel_size_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_filter_t * tb_filter = data; gint int_value; int_value = gtk_spin_button_get_value_as_int(spin_button); if (!(int_value & 0x1)) { int_value++; /* make it odd */ } tb_filter->kernel_size = int_value; g_signal_handlers_block_by_func(G_OBJECT(spin_button), G_CALLBACK(kernel_size_spinner_cb), tb_filter); gtk_spin_button_set_value(spin_button, tb_filter->kernel_size); g_signal_handlers_unblock_by_func(G_OBJECT(spin_button), G_CALLBACK(kernel_size_spinner_cb), tb_filter); return; } static void fwhm_spinner_cb(GtkSpinButton * spin_button, gpointer data) { tb_filter_t * tb_filter = data; amide_real_t value; value = gtk_spin_button_get_value(spin_button); if (value < MIN_FWHM) value = MIN_FWHM; else if (value > MAX_FWHM) value = MAX_FWHM; tb_filter->fwhm = value; g_signal_handlers_block_by_func(G_OBJECT(spin_button), G_CALLBACK(fwhm_spinner_cb), tb_filter); gtk_spin_button_set_value(spin_button, tb_filter->fwhm); g_signal_handlers_unblock_by_func(G_OBJECT(spin_button), G_CALLBACK(fwhm_spinner_cb), tb_filter); return; } /* function called when the finish button is hit */ static void apply_cb(GtkAssistant * assistant, gpointer data) { tb_filter_t * tb_filter = data; AmitkDataSet * filtered; /* disable the buttons */ gtk_widget_set_sensitive(GTK_WIDGET(assistant), FALSE); /* generate the new data set */ filtered = amitk_data_set_get_filtered(tb_filter->data_set, tb_filter->filter, tb_filter->kernel_size, tb_filter->fwhm, amitk_progress_dialog_update, tb_filter->progress_dialog); if (filtered != NULL) { /* and add the new data set to the study */ amitk_object_add_child(AMITK_OBJECT(tb_filter->study), AMITK_OBJECT(filtered)); /* this adds a reference to the data set*/ amitk_object_unref(filtered); /* so remove a reference */ } else g_warning("Failed to generate filtered data set"); return; } /* function called to cancel the dialog */ static void close_cb(GtkAssistant * assistant, gpointer data) { tb_filter_t * tb_filter = data; GtkWidget * dialog = tb_filter->dialog; tb_filter = tb_filter_free(tb_filter); /* trash collection */ gtk_widget_destroy(dialog); return; } static gint forward_page_function (gint current_page, gpointer data) { tb_filter_t * tb_filter=data; switch(current_page) { case PICK_FILTER_PAGE: return GAUSSIAN_FILTER_PAGE+tb_filter->filter; break; case GAUSSIAN_FILTER_PAGE: case MEDIAN_LINEAR_FILTER_PAGE: case MEDIAN_3D_FILTER_PAGE: return CONCLUSION_PAGE; break; default: return current_page+1; break; } } static tb_filter_t * tb_filter_free(tb_filter_t * tb_filter) { gboolean return_val; /* sanity checks */ g_return_val_if_fail(tb_filter != NULL, NULL); g_return_val_if_fail(tb_filter->reference_count > 0, NULL); /* remove a reference count */ tb_filter->reference_count--; /* things to do if we've removed all reference's */ if (tb_filter->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing tb_filter\n"); #endif if (tb_filter->data_set != NULL) { amitk_object_unref(tb_filter->data_set); tb_filter->data_set = NULL; } if (tb_filter->study != NULL) { amitk_object_unref(tb_filter->study); tb_filter->study = NULL; } if (tb_filter->progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(tb_filter->progress_dialog), "delete_event", NULL, &return_val); tb_filter->progress_dialog = NULL; } g_free(tb_filter); tb_filter = NULL; } return tb_filter; } static tb_filter_t * tb_filter_init(void) { tb_filter_t * tb_filter; /* alloc space for the data structure for passing ui info */ if ((tb_filter = g_try_new(tb_filter_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for tb_filter_t")); return NULL; } tb_filter->reference_count = 1; tb_filter->filter = AMITK_FILTER_GAUSSIAN; /* default filter */ tb_filter->dialog = NULL; tb_filter->study = NULL; tb_filter->kernel_size=3; tb_filter->fwhm = 1.0; return tb_filter; } static GtkWidget * create_page(tb_filter_t * tb_filter, which_page_t i_page) { GtkWidget * label; GtkWidget * spin_button; gint table_row; gint table_column; AmitkFilter i_filter; GtkWidget * table; GtkWidget * menu; table = gtk_table_new(3,3,FALSE); table_row=0; table_column=0; switch(i_page) { case PICK_FILTER_PAGE: label = gtk_label_new(_("Which Filter")); gtk_table_attach(GTK_TABLE(table), label, table_column,table_column+1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); menu = gtk_combo_box_new_text(); for (i_filter=0; i_filterfilter); g_signal_connect(G_OBJECT(menu), "changed", G_CALLBACK(filter_cb), tb_filter); gtk_table_attach(GTK_TABLE(table), menu, table_column+1, table_column+2, table_row, table_row+1, FALSE, FALSE, X_PADDING, Y_PADDING); gtk_widget_show_all(menu); table_row++; break; case GAUSSIAN_FILTER_PAGE: #ifdef AMIDE_LIBGSL_SUPPORT tb_filter->kernel_size = DEFAULT_GAUSSIAN_FILTER_SIZE; label = gtk_label_new(_(gaussian_filter_text)); gtk_table_attach(GTK_TABLE(table), label, table_column,table_column+2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* the kernel selection */ label = gtk_label_new(_("Kernel Size")); gtk_table_attach(GTK_TABLE(table), label, table_column,table_column+1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); spin_button = gtk_spin_button_new_with_range(MIN_FIR_FILTER_SIZE, MAX_FIR_FILTER_SIZE,2); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin_button),0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), tb_filter->kernel_size); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(kernel_size_spinner_cb), tb_filter); gtk_table_attach(GTK_TABLE(table), spin_button, table_column+1,table_column+2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("FWHM (mm)")); gtk_table_attach(GTK_TABLE(table), label, table_column,table_column+1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); spin_button = gtk_spin_button_new_with_range(MIN_FWHM, MAX_FWHM,0.2); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), tb_filter->fwhm); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(fwhm_spinner_cb), tb_filter); g_signal_connect(G_OBJECT(spin_button), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(table), spin_button, table_column+1,table_column+2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); #else /* no libgsl support */ label = gtk_label_new(_(no_libgsl_text)); gtk_table_attach(GTK_TABLE(table), label, table_column,table_column+2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; #endif break; case MEDIAN_3D_FILTER_PAGE: case MEDIAN_LINEAR_FILTER_PAGE: tb_filter->kernel_size = DEFAULT_MEDIAN_FILTER_SIZE; label = gtk_label_new((i_page == MEDIAN_3D_FILTER_PAGE) ? _(median_3d_filter_text) : _(median_linear_filter_text)); gtk_table_attach(GTK_TABLE(table), label, table_column,table_column+2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; /* the kernel selection */ label = gtk_label_new(_("Kernel Size")); gtk_table_attach(GTK_TABLE(table), label, table_column,table_column+1, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); spin_button = gtk_spin_button_new_with_range(MIN_NONLINEAR_FILTER_SIZE, MAX_NONLINEAR_FILTER_SIZE,2); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin_button),0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), tb_filter->kernel_size); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(kernel_size_spinner_cb), tb_filter); gtk_table_attach(GTK_TABLE(table), spin_button, table_column+1,table_column+2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); table_row++; break; default: table = NULL; g_error("unhandled case in %s at line %d\n", __FILE__, __LINE__); break; } return table; } void tb_filter(AmitkStudy * study, AmitkDataSet * active_ds, GtkWindow * parent) { tb_filter_t * tb_filter; GdkPixbuf * logo; which_page_t i_page; if (active_ds == NULL) { g_warning(_("No data set is currently marked as active")); return; } tb_filter = tb_filter_init(); tb_filter->study = amitk_object_ref(study); tb_filter->data_set = amitk_object_ref(active_ds); /* take a guess at a good fwhm */ tb_filter->fwhm = point_min_dim(AMITK_DATA_SET_VOXEL_SIZE(tb_filter->data_set)); tb_filter->dialog = gtk_assistant_new(); gtk_window_set_transient_for(GTK_WINDOW(tb_filter->dialog), parent); gtk_window_set_destroy_with_parent(GTK_WINDOW(tb_filter->dialog), TRUE); g_signal_connect(G_OBJECT(tb_filter->dialog), "cancel", G_CALLBACK(close_cb), tb_filter); g_signal_connect(G_OBJECT(tb_filter->dialog), "close", G_CALLBACK(close_cb), tb_filter); g_signal_connect(G_OBJECT(tb_filter->dialog), "apply", G_CALLBACK(apply_cb), tb_filter); gtk_assistant_set_forward_page_func(GTK_ASSISTANT(tb_filter->dialog), forward_page_function, tb_filter, NULL); tb_filter->progress_dialog = amitk_progress_dialog_new(GTK_WINDOW(tb_filter->dialog)); /* --------------intro page and the various filter pages ------------------- */ for (i_page=PICK_FILTER_PAGE; i_pagepage[i_page] = create_page(tb_filter, i_page); gtk_assistant_append_page(GTK_ASSISTANT(tb_filter->dialog), tb_filter->page[i_page]); } /* ---------------- conclusion page ---------------------------------- */ tb_filter->page[CONCLUSION_PAGE] = gtk_label_new(_(finish_page_text)); gtk_widget_set_size_request(tb_filter->page[CONCLUSION_PAGE],LABEL_WIDTH, -1); gtk_label_set_line_wrap(GTK_LABEL(tb_filter->page[CONCLUSION_PAGE]), TRUE); gtk_assistant_append_page(GTK_ASSISTANT(tb_filter->dialog), tb_filter->page[CONCLUSION_PAGE]); gtk_assistant_set_page_type(GTK_ASSISTANT(tb_filter->dialog), tb_filter->page[CONCLUSION_PAGE], GTK_ASSISTANT_PAGE_CONFIRM); /* things for all pages */ logo = gtk_widget_render_icon(GTK_WIDGET(tb_filter->dialog), "amide_icon_logo", GTK_ICON_SIZE_DIALOG, 0); for (i_page=0; i_pagedialog), tb_filter->page[i_page], logo); gtk_assistant_set_page_title(GTK_ASSISTANT(tb_filter->dialog), tb_filter->page[i_page], _(wizard_name)); gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_filter->dialog), tb_filter->page[i_page], TRUE); /* all pages have default values */ g_object_set_data(G_OBJECT(tb_filter->page[i_page]),"which_page", GINT_TO_POINTER(i_page)); } g_object_unref(logo); #ifndef AMIDE_LIBGSL_SUPPORT gtk_assistant_set_page_complete(GTK_ASSISTANT(tb_filter->dialog), tb_filter->page[GAUSSIAN_FILTER_PAGE], FALSE); #endif gtk_widget_show_all(tb_filter->dialog); return; } amide-1.0.5/src/amitk_point.c0000664000175000017500000006265612271013513015731 0ustar loeningloening/* amitk_point.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include "amitk_point.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" const AmitkAxes base_axes = {{1.0,0.0,0.0}, {0.0,1.0,0.0}, {0.0,0.0,1.0}}; GType amitk_point_get_type (void) { static GType our_type = 0; if (our_type == 0) our_type = g_boxed_type_register_static ("AmitkPoint", (GBoxedCopyFunc) amitk_point_copy, (GBoxedFreeFunc) amitk_point_free); return our_type; } AmitkPoint * amitk_point_copy(const AmitkPoint * point) { return (AmitkPoint *)g_memdup(point, sizeof(AmitkPoint)); } void amitk_point_free (AmitkPoint * point) { g_free (point); } AmitkPoint amitk_point_read_xml(xmlNodePtr nodes, gchar * descriptor, gchar **perror_buf) { gchar * temp_str; AmitkPoint return_rp; gint error=EOF; gchar * saved_locale; saved_locale = g_strdup(setlocale(LC_NUMERIC,NULL)); setlocale(LC_NUMERIC,"POSIX"); temp_str = xml_get_string(nodes, descriptor); if (temp_str != NULL) { xml_convert_radix_to_local(temp_str); #if (SIZE_OF_AMIDE_REAL_T == 8) /* convert to doubles */ error = sscanf(temp_str, "%lf\t%lf\t%lf", &(return_rp.x), &(return_rp.y), &(return_rp.z)); #elif (SIZE_OF_AMIDE_REAL_T == 4) /* convert to float */ error = sscanf(temp_str, "%f\t%f\t%f", &(return_rp.x), &(return_rp.y), &(return_rp.z)); #else #error "Unknown size for SIZE_OF_AMIDE_REAL_T" #endif g_free(temp_str); } if ((temp_str == NULL) || (error == EOF)) { return_rp = zero_point; amitk_append_str_with_newline(perror_buf,_("Couldn't read value for %s, substituting [%5.3f %5.3f %5.3f]"), descriptor, return_rp.x, return_rp.y, return_rp.z); } setlocale(LC_NUMERIC, saved_locale); g_free(saved_locale); return return_rp; } void amitk_point_write_xml(xmlNodePtr node, gchar * descriptor, AmitkPoint point) { #ifdef OLD_WIN32_HACKS gchar temp_str[128]; #else gchar * temp_str; #endif gchar * saved_locale; saved_locale = g_strdup(setlocale(LC_NUMERIC,NULL)); setlocale(LC_NUMERIC,"POSIX"); #ifdef OLD_WIN32_HACKS snprintf(temp_str, 128, "%10.9f\t%10.9f\t%10.9f", point.x,point.y,point.z); #else temp_str = g_strdup_printf("%10.9f\t%10.9f\t%10.9f",point.x, point.y,point.z); #endif xml_save_string(node, descriptor, temp_str); #ifndef OLD_WIN32_HACKS g_free(temp_str); #endif setlocale(LC_NUMERIC, saved_locale); g_free(saved_locale); return; } GType amitk_voxel_get_type (void) { static GType our_type = 0; if (our_type == 0) our_type = g_boxed_type_register_static ("AmitkVoxel", (GBoxedCopyFunc) amitk_voxel_copy, (GBoxedFreeFunc) amitk_voxel_free); return our_type; } AmitkVoxel * amitk_voxel_copy(const AmitkVoxel * voxel) { return (AmitkVoxel *)g_memdup(voxel, sizeof(AmitkVoxel)); } void amitk_voxel_free (AmitkVoxel * voxel) { g_free(voxel); } AmitkVoxel amitk_voxel_read_xml(xmlNodePtr nodes, gchar * descriptor, gchar **perror_buf) { gchar * temp_str; AmitkVoxel voxel; gint x,y,z,g,t; gint error=0; voxel = one_voxel; /* initialize */ temp_str = xml_get_string(nodes, descriptor); if (temp_str != NULL) { /* convert to a voxel */ error = sscanf(temp_str,"%d\t%d\t%d\t%d\t%d", &x,&y,&z, &g, &t); g_free(temp_str); voxel.x = x; voxel.y = y; voxel.z = z; voxel.g = g; voxel.t = t; } if ((temp_str == NULL) || (error == EOF)) { voxel = zero_voxel; amitk_append_str_with_newline(perror_buf,_("Couldn't read value for %s, substituting [%d %d %d %d %d]"), descriptor, voxel.x, voxel.y,voxel.z,voxel.g, voxel.t); } if (error < 5) { /* note, gate was added later, so if we only read 4, the 4th is most likely frames */ voxel.t = voxel.g; voxel.g = 1; amitk_append_str_with_newline(perror_buf, _("Couldn't read gate value for %s, substituting %d"), descriptor, voxel.g); } else if (error < 4) { voxel.t = 1; amitk_append_str_with_newline(perror_buf,_("Couldn't read frame value for %s, substituting %d"), descriptor, voxel.t); } return voxel; } void amitk_voxel_write_xml(xmlNodePtr node, gchar * descriptor, AmitkVoxel voxel) { gchar * temp_str; temp_str = g_strdup_printf("%d\t%d\t%d\t%d\t%d",voxel.x, voxel.y, voxel.z, voxel.g, voxel.t); xml_save_string(node, descriptor, temp_str); g_free(temp_str); return; } GType amitk_pixel_get_type (void) { static GType our_type = 0; if (our_type == 0) our_type = g_boxed_type_register_static ("AmitkPixel", (GBoxedCopyFunc) amitk_pixel_copy, (GBoxedFreeFunc) amitk_pixel_free); return our_type; } AmitkPixel * amitk_pixel_copy(const AmitkPixel * pixel) { return (AmitkPixel *)g_memdup(pixel, sizeof(AmitkPixel)); } void amitk_pixel_free (AmitkPixel * pixel) { g_free (pixel); } GType amitk_canvas_point_get_type (void) { static GType our_type = 0; if (our_type == 0) our_type = g_boxed_type_register_static ("AmitkCanvasPoint", (GBoxedCopyFunc) amitk_canvas_point_copy, (GBoxedFreeFunc) amitk_canvas_point_free); return our_type; } AmitkCanvasPoint * amitk_canvas_point_copy(const AmitkCanvasPoint * point) { return (AmitkCanvasPoint *)g_memdup(point, sizeof(AmitkCanvasPoint)); } void amitk_canvas_point_free (AmitkCanvasPoint * point) { g_free (point); } GType amitk_axes_get_type (void) { static GType our_type = 0; if (our_type == 0) our_type = g_boxed_type_register_static ("AmitkAxes", (GBoxedCopyFunc) amitk_axes_copy, (GBoxedFreeFunc) amitk_axes_free); return our_type; } AmitkAxes * amitk_axes_copy(const AmitkAxes * axes) { return (AmitkAxes *)g_memdup(axes, sizeof(AmitkAxes)); } void amitk_axes_free (AmitkAxes * axes) { g_free (axes); } void amitk_axes_copy_in_place(AmitkAxes dest_axes, const AmitkAxes src_axes) { AmitkAxis i_axis; for (i_axis=0; i_axis volume_corner.x) canvas_point.x = volume_corner.x; if (canvas_point.y > volume_corner.y) canvas_point.y = volume_corner.y; return canvas_point; } /* converts a point in the canvas's coordinate space to a gnome canvas event location */ AmitkCanvasPoint point_2_canvas_point(AmitkPoint volume_corner, gint width,gint height, gdouble x_offset, gdouble y_offset, AmitkPoint canvas_point) { AmitkCanvasPoint canvas_cpoint; canvas_cpoint.x = width * canvas_point.x/volume_corner.x + x_offset; canvas_cpoint.y = height * (volume_corner.y - canvas_point.y)/volume_corner.y + y_offset; return canvas_cpoint; } /* returns voxel1+voxel2 for voxelpoint structures */ AmitkVoxel voxel_add(const AmitkVoxel voxel1,const AmitkVoxel voxel2) { AmitkVoxel temp; temp.x = voxel1.x+voxel2.x; temp.y = voxel1.y+voxel2.y; temp.z = voxel1.z+voxel2.z; temp.g = voxel1.g+voxel2.g; temp.t = voxel1.t+voxel2.t; return temp; } /* returns voxel1-voxel2 for voxelpoint structures */ AmitkVoxel voxel_sub(const AmitkVoxel voxel1,const AmitkVoxel voxel2) { AmitkVoxel temp; temp.x = voxel1.x-voxel2.x; temp.y = voxel1.y-voxel2.y; temp.z = voxel1.z-voxel2.z; temp.g = voxel1.g-voxel2.g; temp.t = voxel1.t-voxel2.t; return temp; } /* returns voxel1 == voxel2 for voxelpoint structures */ gboolean voxel_equal(const AmitkVoxel voxel1, const AmitkVoxel voxel2) { return VOXEL_EQUAL(voxel1, voxel2); } /* returns the maximum dimension of the "box" defined by voxel1 */ amide_real_t voxel_max_dim(const AmitkVoxel voxel1) { AmitkPoint temp_point; VOXEL_TO_POINT(voxel1, one_point, temp_point); return point_mag(temp_point); } /* little utility function for debugging */ void voxel_print(gchar * message, const AmitkVoxel voxel) { g_print("%s\t%d\t%d\t%d\t%d\t%d\n",message, voxel.x, voxel.y, voxel.z, voxel.g, voxel.t); return; } amide_intpoint_t voxel_get_dim(const AmitkVoxel voxel, const AmitkDim which_dim) { switch(which_dim) { case AMITK_DIM_X: return voxel.x; break; case AMITK_DIM_Y: return voxel.y; break; case AMITK_DIM_Z: return voxel.z; break; case AMITK_DIM_G: return voxel.g; break; case AMITK_DIM_T: return voxel.t; break; default: g_error("inappropriate case in %s at %d\n", __FILE__, __LINE__); g_return_val_if_reached(0); } } void voxel_set_dim(AmitkVoxel * voxel, const AmitkDim which_dim, amide_intpoint_t value) { switch(which_dim) { case AMITK_DIM_X: voxel->x = value; break; case AMITK_DIM_Y: voxel->y = value; break; case AMITK_DIM_Z: voxel->z = value; break; case AMITK_DIM_G: voxel->g = value; break; case AMITK_DIM_T: voxel->t = value; break; default: g_error("inappropriate case in %s at %d\n", __FILE__, __LINE__); g_return_if_reached(); } } /* returns true if the realpoint is in the given box */ /* box first corner is zero point */ gboolean point_in_box(const AmitkPoint p, const AmitkPoint box_corner) { return (((p.z >= 0.0) && (p.z <= box_corner.z)) && ((p.y >= 0.0) && (p.y <= box_corner.y)) && ((p.x >= 0.0) && (p.x <= box_corner.x))); } /* returns true if the realpoint is in the elliptic cylinder, cylinder must be inline with the coordinate space center is in note: height is in the z direction, and radius.z isn't used for anything */ gboolean point_in_elliptic_cylinder(const AmitkPoint p, const AmitkPoint center, const amide_real_t height, const AmitkPoint radius) { AmitkPoint diff; diff.x = p.x-center.x; diff.y = p.y-center.y; return ((1.0 >= ((diff.x*diff.x)/(radius.x*radius.x) + (diff.y*diff.y)/(radius.y*radius.y))) && ((p.z >= (center.z-height/2.0)) && (p.z <= (center.z+height/2.0)))); } /* returns true if the realpoint is in the ellipsoid */ gboolean point_in_ellipsoid(const AmitkPoint p, const AmitkPoint center, const AmitkPoint radius) { AmitkPoint diff; diff = point_sub(p, center); return (1.0 >= (diff.x*diff.x)/(radius.x*radius.x) + (diff.y*diff.y)/(radius.y*radius.y) + (diff.z*diff.z)/(radius.z*radius.z)); } /* little utility function for debugging */ void point_print(gchar * message, const AmitkPoint point) { g_print("%s\t%5.3f\t%5.3f\t%5.3f\n",message, point.x, point.y, point.z); return; } /* rotate the vector on the given vector by the given rotation */ AmitkPoint point_rotate_on_vector(const AmitkPoint in, const AmitkPoint vector, const amide_real_t theta) { AmitkPoint return_vector; return_vector.x = (vector.x*vector.x + cos(theta) * (1.0 - vector.x*vector.x)) * in.x + (vector.x*vector.y*(1.0-cos(theta)) - vector.z * sin(theta)) * in.y + (vector.z*vector.x*(1.0-cos(theta)) + vector.y * sin(theta)) * in.z; return_vector.y = (vector.x*vector.y*(1.0-cos(theta)) + vector.z * sin(theta)) * in.x + (vector.y*vector.y + cos(theta) * (1.0 - vector.y*vector.y)) * in.y + (vector.y*vector.z*(1.0-cos(theta)) - vector.x * sin(theta)) * in.z; return_vector.z = (vector.z*vector.x*(1.0-cos(theta)) - vector.y * sin(theta)) * in.x + (vector.y*vector.z*(1.0-cos(theta)) + vector.x * sin(theta)) * in.y + (vector.z*vector.z + cos(theta) * (1.0 - vector.z*vector.z)) * in.z; return return_vector; } amide_real_t point_get_component(const AmitkPoint point, const AmitkAxis which_axis) { switch(which_axis) { case AMITK_AXIS_X: return point.x; break; case AMITK_AXIS_Y: return point.y; break; case AMITK_AXIS_Z: return point.z; break; default: g_return_val_if_reached(0.0); } } void point_set_component(AmitkPoint * point, const AmitkAxis which_axis, const amide_real_t value) { switch(which_axis) { case AMITK_AXIS_X: point->x = value; break; case AMITK_AXIS_Y: point->y = value; break; case AMITK_AXIS_Z: point->z = value; break; default: g_return_if_reached(); } return; } const gchar * amitk_view_get_name(const AmitkView view) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_VIEW); enum_value = g_enum_get_value(enum_class, view); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_dim_get_name(const AmitkDim dim) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_DIM); enum_value = g_enum_get_value(enum_class, dim); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_axis_get_name(const AmitkAxis axis) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_AXIS); enum_value = g_enum_get_value(enum_class, axis); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_length_unit_get_name(const AmitkLengthUnit length_unit) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_LENGTH_UNIT); enum_value = g_enum_get_value(enum_class, length_unit); g_type_class_unref(enum_class); return enum_value->value_nick; } amide-1.0.5/src/amitk_tree_view.c0000664000175000017500000014452712270273760016602 0ustar loeningloening/* amitk_tree_view.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* adapted from gtkcolorsel.c */ #include "amide_config.h" #include "amitk_tree_view.h" #include "amitk_study.h" #include "amitk_marshal.h" #include "amitk_progress_dialog.h" #include "image.h" #include #include #define AMITK_TREE_VIEW_DND_OBJECT_TYPE "pointer/object" #define AMITK_DND_URI_LIST_TYPE "text/uri-list" enum { AMITK_TREE_VIEW_DND_OBJECT, AMITK_DND_URI_LIST, }; static const GtkTargetEntry drag_types[] = { { AMITK_TREE_VIEW_DND_OBJECT_TYPE, 0, AMITK_TREE_VIEW_DND_OBJECT } }; static const GtkTargetEntry drop_types[] = { { AMITK_TREE_VIEW_DND_OBJECT_TYPE, 0, AMITK_TREE_VIEW_DND_OBJECT }, { AMITK_DND_URI_LIST_TYPE, 0, AMITK_DND_URI_LIST } }; enum { HELP_EVENT, ACTIVATE_OBJECT, POPUP_OBJECT, ADD_OBJECT, DELETE_OBJECT, LAST_SIGNAL } amitk_tree_view_signals; /* notes MULTIPLE_SELECTION - is only used in AMITK_TREE_VIEW_MODE_MULTIPLE_SELECTION VISIBLE_SINGLE/VISIBLE_LINKED_2WAY/VISIBLE_LINKED_3WAY - are used in AMITK_TREE_VIEW_MODE_MAIN, and directly correlate with the related AmitkObject parameters */ enum { COLUMN_MULTIPLE_SELECTION, COLUMN_VISIBLE_SINGLE, COLUMN_VISIBLE_LINKED_2WAY, COLUMN_VISIBLE_LINKED_3WAY, COLUMN_EXPANDER, COLUMN_ICON, COLUMN_NAME, COLUMN_OBJECT, NUM_COLUMNS }; typedef struct { AmitkObject * object; GtkTreeIter iter; gboolean found; } tree_view_find_t; static void tree_view_class_init (AmitkTreeViewClass *klass); static void tree_view_init (AmitkTreeView *tree_view); static void tree_view_destroy (GtkObject *object); static void tree_view_set_view_mode(AmitkTreeView * tree_view, AmitkViewMode view_mode); static void tree_view_add_roi_cb(GtkWidget * widget, gpointer data); static void tree_view_popup_roi_menu(AmitkTreeView * tree_view, AmitkObject * parent_object, guint button, guint32 activate_time); static gboolean tree_view_button_press_event(GtkWidget *tree_view,GdkEventButton *event); static gboolean tree_view_button_release_event(GtkWidget *tree_view, GdkEventButton *event); static gboolean tree_view_key_press_event(GtkWidget * tree_view, GdkEventKey * event); static void tree_view_emit_help_signal(AmitkTreeView * tree_view); static gboolean tree_view_motion_notify_event(GtkWidget *widget, GdkEventMotion *event); static gboolean tree_view_enter_notify_event(GtkWidget * tree_view, GdkEventCrossing *event); static GdkPixbuf * tree_view_get_object_pixbuf(AmitkTreeView * tree_view, AmitkObject * object); //static void tree_view_drop_cb(GtkWidget * menu, gpointer context); #if WORKING_ON_IT /* source drag-n-drop */ static void tree_view_drag_begin (GtkWidget *widget, GdkDragContext *context); static void tree_view_drag_end (GtkWidget *widget, GdkDragContext *context); static void tree_view_drag_data_get (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time); static void tree_view_drag_data_delete (GtkWidget *widget, GdkDragContext *context); /* target drag-n-drop */ static void tree_view_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time); static gboolean tree_view_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time); static gboolean tree_view_drag_drop (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time); static void tree_view_drag_data_received (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time); #endif static void tree_view_object_update_cb(AmitkObject * object, gpointer tree_view); static void tree_view_data_set_color_table_cb(AmitkDataSet * data_set, AmitkViewMode view_mode, gpointer tree_view); static void tree_view_object_add_child_cb(AmitkObject * parent, AmitkObject * child, gpointer tree_view); static void tree_view_object_remove_child_cb(AmitkObject * parent, AmitkObject * child, gpointer tree_view); static gboolean tree_view_find_recurse(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); static gboolean tree_view_find_object(AmitkTreeView * tree_view, AmitkObject * object, GtkTreeIter * iter); static void tree_view_add_object(AmitkTreeView * tree_view, AmitkObject * object); static void tree_view_remove_object(AmitkTreeView * tree_view, AmitkObject * object); static GtkTreeViewClass *parent_class; static guint tree_view_signals[LAST_SIGNAL]; GType amitk_tree_view_get_type (void) { static GType tree_view_type = 0; if (!tree_view_type) { static const GTypeInfo tree_view_info = { sizeof (AmitkTreeViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tree_view_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (AmitkTreeView), 0, /* # preallocs */ (GInstanceInitFunc) tree_view_init, NULL /* value table */ }; tree_view_type = g_type_register_static(GTK_TYPE_TREE_VIEW, "AmitkTreeView", &tree_view_info, 0); } return tree_view_type; } static void tree_view_class_init (AmitkTreeViewClass *klass) { GtkObjectClass *gtkobject_class; /* GtkTreeViewClass *tree_view_class; */ GtkWidgetClass *widget_class; gtkobject_class = (GtkObjectClass*) klass; widget_class = (GtkWidgetClass*) klass; /* tree_view_class = (GtkTreeViewClass*) klass; */ parent_class = g_type_class_peek_parent(klass); gtkobject_class->destroy = tree_view_destroy; widget_class->button_press_event = tree_view_button_press_event; widget_class->button_release_event = tree_view_button_release_event; widget_class->key_press_event = tree_view_key_press_event; widget_class->motion_notify_event = tree_view_motion_notify_event; widget_class->enter_notify_event = tree_view_enter_notify_event; #if WORKING_ON_IT widget_class->drag_begin = tree_view_drag_begin; widget_class->drag_end = tree_view_drag_end; widget_class->drag_data_get = tree_view_drag_data_get; widget_class->drag_data_delete = tree_view_drag_data_delete; widget_class->drag_leave = tree_view_drag_leave; widget_class->drag_motion = tree_view_drag_motion; widget_class->drag_drop = tree_view_drag_drop; widget_class->drag_data_received = tree_view_drag_data_received; #endif tree_view_signals[HELP_EVENT] = g_signal_new ("help_event", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkTreeViewClass, help_event), NULL, NULL, amitk_marshal_NONE__ENUM, G_TYPE_NONE, 1, AMITK_TYPE_HELP_INFO); tree_view_signals[ACTIVATE_OBJECT] = g_signal_new ("activate_object", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkTreeViewClass, activate_object), NULL, NULL, amitk_marshal_NONE__OBJECT, G_TYPE_NONE, 1, AMITK_TYPE_OBJECT); tree_view_signals[POPUP_OBJECT] = g_signal_new ("popup_object", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkTreeViewClass, popup_object), NULL, NULL, amitk_marshal_NONE__OBJECT, G_TYPE_NONE, 1, AMITK_TYPE_OBJECT); tree_view_signals[ADD_OBJECT] = g_signal_new ("add_object", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkTreeViewClass, add_object), NULL, NULL, amitk_marshal_NONE__OBJECT_ENUM_ENUM, G_TYPE_NONE,3, AMITK_TYPE_OBJECT, AMITK_TYPE_OBJECT_TYPE, AMITK_TYPE_ROI_TYPE); tree_view_signals[DELETE_OBJECT] = g_signal_new ("delete_object", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkTreeViewClass, delete_object), NULL, NULL, amitk_marshal_NONE__OBJECT, G_TYPE_NONE,1, AMITK_TYPE_OBJECT); } static void tree_view_init (AmitkTreeView * tree_view) { tree_view->study = NULL; tree_view->active_object = NULL; tree_view->mouse_x = -1; tree_view->mouse_y = -1; tree_view->current_path = NULL; tree_view->prev_view_mode = AMITK_VIEW_MODE_SINGLE; tree_view->press_x = -1; tree_view->press_y = -1; tree_view->drag_begin_possible = FALSE; tree_view->src_object = NULL; tree_view->dest_object = NULL; // tree_view->drag_list = gtk_target_list_new(drag_types, G_N_ELEMENTS(drag_types)); /* setup ability to do drag-n-drop */ // gtk_drag_dest_set (GTK_WIDGET (tree_view), // GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT, // drag_types, G_N_ELEMENTS(drag_types), // GDK_ACTION_ASK); #if WORKING_ON_IT gtk_drag_source_set (GTK_WIDGET(tree_view), GDK_BUTTON1_MASK | GDK_BUTTON3_MASK, drag_types, G_N_ELEMENTS (drag_types), GDK_ACTION_COPY); gtk_drag_dest_set (GTK_WIDGET(tree_view), GTK_DEST_DEFAULT_ALL, drop_types, G_N_ELEMENTS (drop_types), GDK_ACTION_COPY); #endif } static void tree_view_destroy (GtkObject * object) { AmitkTreeView * tree_view; g_return_if_fail (object != NULL); g_return_if_fail (AMITK_IS_TREE_VIEW (object)); tree_view = AMITK_TREE_VIEW (object); if (tree_view->current_path != NULL) { gtk_tree_path_free(tree_view->current_path); tree_view->current_path = NULL; } if (tree_view->active_object != NULL) { tree_view->active_object = amitk_object_unref(tree_view->active_object); } if (tree_view->study != NULL) { tree_view_remove_object(tree_view, AMITK_OBJECT(tree_view->study)); tree_view->study = NULL; } if (tree_view->preferences != NULL) { g_object_unref(tree_view->preferences); tree_view->preferences = NULL; } if (tree_view->progress_dialog != NULL) { g_object_unref(tree_view->progress_dialog); tree_view->progress_dialog = NULL; } if (tree_view->drag_list != NULL) { gtk_target_list_unref (tree_view->drag_list); tree_view->drag_list = NULL; } if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } /* function only for AMITK_TREE_VIEW_MODE_MAIN */ static void tree_view_set_view_mode(AmitkTreeView * tree_view, AmitkViewMode view_mode) { AmitkViewMode i_view_mode; if (tree_view->mode != AMITK_TREE_VIEW_MODE_MAIN) return; /* remove all linked columns, we'll add them back below if needed */ for (i_view_mode = 0; i_view_mode <= tree_view->prev_view_mode; i_view_mode++) { g_object_ref(tree_view->select_column[i_view_mode]); /* view_remove_column removes a reference */ gtk_tree_view_remove_column (GTK_TREE_VIEW (tree_view), tree_view->select_column[i_view_mode]); } tree_view->prev_view_mode = view_mode; /* insert_column doesn't add a reference */ for (i_view_mode = 0; i_view_mode <= view_mode; i_view_mode++) gtk_tree_view_insert_column (GTK_TREE_VIEW (tree_view), tree_view->select_column[i_view_mode], COLUMN_VISIBLE_SINGLE+i_view_mode); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_view), view_mode != AMITK_VIEW_MODE_SINGLE); return; } /* callback function for adding an roi */ static void tree_view_add_roi_cb(GtkWidget * widget, gpointer data) { AmitkTreeView * tree_view = data; AmitkRoiType roi_type; AmitkObject * parent_object; /* figure out which menu item called me */ roi_type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget),"roi_type")); parent_object = g_object_get_data(G_OBJECT(widget), "parent"); g_signal_emit(G_OBJECT(tree_view), tree_view_signals[ADD_OBJECT], 0, parent_object, AMITK_OBJECT_TYPE_ROI, roi_type); return; } static void tree_view_popup_roi_menu(AmitkTreeView * tree_view, AmitkObject * parent_object, guint button, guint32 activate_time) { GtkWidget * menu; GtkWidget * menuitem; AmitkRoiType i_roi_type; menu = gtk_menu_new(); for (i_roi_type=0; i_roi_typex, event->y, &(tree_view->current_path), &column, &cell_x, &cell_y); switch(AMITK_TREE_VIEW(tree_view)->mode) { case AMITK_TREE_VIEW_MODE_MAIN: if (event->button == 1) { tree_view->drag_begin_possible = TRUE; tree_view->press_x = event->x; tree_view->press_y = event->y; } /* making the selection mode none reduces some of the flickering caused by us manually trying to force which row is selected */ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); break; default: break; } /* run the tree widget's button press event first */ return_value = GTK_WIDGET_CLASS (parent_class)->button_press_event (widget, event); switch(AMITK_TREE_VIEW(tree_view)->mode) { case AMITK_TREE_VIEW_MODE_MAIN: /* reset what's the active mark */ gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); amitk_tree_view_set_active_object(tree_view, tree_view->active_object); if ((event->button == 3) && !valid_row) tree_view_popup_roi_menu(tree_view, NULL, event->button, event->time); break; default: break; } return return_value; } static gint path_compare(GtkTreePath * path1, GtkTreePath * path2) { if ((path1 == NULL) && (path2 == NULL)) return 0; else if ((path1 == NULL) || (path2 == NULL)) return 1; else return gtk_tree_path_compare(path1, path2); } static gboolean tree_view_button_release_event (GtkWidget *widget, GdkEventButton *event) { GtkTreePath * path=NULL; gint cell_x, cell_y; GtkTreeViewColumn * column; AmitkTreeView * tree_view; g_return_val_if_fail (AMITK_IS_TREE_VIEW (widget), FALSE); tree_view = AMITK_TREE_VIEW(widget); g_return_val_if_fail (event != NULL, FALSE); // g_print("release button\n"); tree_view->drag_begin_possible = FALSE; // gtk_drag_finish (tree_view->drag_context, // gboolean success, // gboolean del, // guint32 time) // gtk_grab_remove (widget); /* figure out if this click was on an item in the tree */ if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree_view), event->x, event->y, &path, &column, &cell_x, &cell_y)) { /* make sure this isn't the expand button, and we're trying to expand, also check that we're doing a button release on the object we started the button press with */ if (column != gtk_tree_view_get_expander_column(GTK_TREE_VIEW(tree_view)) && path_compare(path, tree_view->current_path)==0) { GtkTreeModel * model; GtkTreeIter iter; gboolean select = FALSE; gboolean unselect = FALSE; gboolean make_active = FALSE; gboolean popup = FALSE; gboolean add_object = FALSE; gboolean multiple_selection; gboolean visible[AMITK_VIEW_MODE_NUM]; gboolean visible_at_all; AmitkObjectType add_type = -1; AmitkObject * object=NULL; AmitkViewMode view_mode; AmitkViewMode i_view_mode; model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, COLUMN_OBJECT, &object, COLUMN_MULTIPLE_SELECTION, &multiple_selection, COLUMN_VISIBLE_SINGLE, &(visible[AMITK_VIEW_MODE_SINGLE]), COLUMN_VISIBLE_LINKED_2WAY, &(visible[AMITK_VIEW_MODE_LINKED_2WAY]), COLUMN_VISIBLE_LINKED_3WAY, &(visible[AMITK_VIEW_MODE_LINKED_3WAY]), -1); view_mode = AMITK_VIEW_MODE_SINGLE;/* default */ visible_at_all = visible[AMITK_VIEW_MODE_SINGLE]; for (i_view_mode = AMITK_VIEW_MODE_NUM-1; i_view_mode > 0; i_view_mode--) { visible_at_all = visible_at_all || visible[i_view_mode]; if (column == tree_view->select_column[i_view_mode]) { view_mode = i_view_mode; } } switch(tree_view->mode) { case AMITK_TREE_VIEW_MODE_MAIN: switch (event->button) { case 1: /* left button */ if (!AMITK_IS_STUDY(object)) { if (visible[view_mode]) unselect = TRUE; else select = TRUE; } break; case 2: /* middle button */ make_active = TRUE; if ((!visible_at_all) && (!AMITK_IS_STUDY(object))) select = TRUE; break; case 3: /* right button */ if (event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) { if (object != NULL) { if (AMITK_IS_DATA_SET(object)) { add_object=TRUE; if (event->state & GDK_SHIFT_MASK) add_type=AMITK_OBJECT_TYPE_ROI; else add_type=AMITK_OBJECT_TYPE_FIDUCIAL_MARK; } else if (AMITK_IS_STUDY(object)) { add_object=TRUE; add_type=AMITK_OBJECT_TYPE_ROI; } } } else { popup = TRUE; } break; default: g_error("unexpected case in %s at line %d",__FILE__, __LINE__); break; } if (select) amitk_object_select(object, view_mode); else if (unselect) amitk_object_unselect(object, view_mode); if (make_active) g_signal_emit(G_OBJECT(tree_view), tree_view_signals[ACTIVATE_OBJECT], 0,object); if (popup) g_signal_emit(G_OBJECT(tree_view), tree_view_signals[POPUP_OBJECT], 0, object); if ((add_object) && (add_type==AMITK_OBJECT_TYPE_FIDUCIAL_MARK)) g_signal_emit(G_OBJECT(tree_view), tree_view_signals[ADD_OBJECT], 0, object, add_type, 0); if ((add_object) && (add_type==AMITK_OBJECT_TYPE_ROI)) tree_view_popup_roi_menu(tree_view, object, event->button, event->time); break; case AMITK_TREE_VIEW_MODE_SINGLE_SELECTION: switch (event->button) { case 1: /* left button */ g_signal_emit(G_OBJECT(tree_view), tree_view_signals[ACTIVATE_OBJECT],0,object); break; } break; case AMITK_TREE_VIEW_MODE_MULTIPLE_SELECTION: switch (event->button) { case 1: /* left button */ if (multiple_selection) gtk_tree_store_set(GTK_TREE_STORE(model), &iter, COLUMN_MULTIPLE_SELECTION, FALSE, -1); else if (!AMITK_IS_STUDY(object)) gtk_tree_store_set(GTK_TREE_STORE(model), &iter, COLUMN_MULTIPLE_SELECTION, TRUE, -1); break; default: break; } break; default: break; } } gtk_tree_path_free(path); } if (tree_view->current_path != NULL) { gtk_tree_path_free(tree_view->current_path); tree_view->current_path = NULL; } return GTK_WIDGET_CLASS (parent_class)->button_release_event (widget, event); } static gboolean tree_view_key_press_event(GtkWidget * widget, GdkEventKey * event) { GtkTreePath * path; gint cell_x, cell_y; GtkTreeModel * model; GtkTreeIter iter; AmitkObject * object; AmitkTreeView * tree_view; g_return_val_if_fail(AMITK_IS_TREE_VIEW(widget), FALSE); tree_view = AMITK_TREE_VIEW(widget); switch (tree_view->mode) { case AMITK_TREE_VIEW_MODE_MAIN: if (event->state & GDK_CONTROL_MASK) if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree_view), tree_view->mouse_x, tree_view->mouse_y, &path, NULL, &cell_x, &cell_y)) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_path_free(path); gtk_tree_model_get(model, &iter, COLUMN_OBJECT, &object, -1); if ((event->keyval == GDK_x) || (event->keyval == GDK_X)) if (!AMITK_IS_STUDY(object)) g_signal_emit(G_OBJECT(tree_view), tree_view_signals[DELETE_OBJECT], 0, object); } break; default: break; } return GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event); } static void tree_view_emit_help_signal(AmitkTreeView * tree_view) { GtkTreePath * path=NULL; gint cell_x, cell_y; AmitkHelpInfo help_type; GtkTreeModel * model; GtkTreeIter iter; AmitkObject * object; if (tree_view->mode != AMITK_TREE_VIEW_MODE_MAIN) return; if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree_view), tree_view->mouse_x, tree_view->mouse_y, &path, NULL, &cell_x, &cell_y)) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_path_free(path); gtk_tree_model_get(model, &iter, COLUMN_OBJECT, &object, -1); if (AMITK_IS_STUDY(object)) help_type = AMITK_HELP_INFO_TREE_VIEW_STUDY; else if (AMITK_IS_DATA_SET(object)) help_type = AMITK_HELP_INFO_TREE_VIEW_DATA_SET; else if (AMITK_IS_ROI(object)) help_type = AMITK_HELP_INFO_TREE_VIEW_ROI; else if (AMITK_IS_FIDUCIAL_MARK(object)) help_type = AMITK_HELP_INFO_TREE_VIEW_FIDUCIAL_MARK; else { g_error("unknown object type in %s at %d\n", __FILE__, __LINE__); help_type = AMITK_HELP_INFO_TREE_VIEW_NONE; } } else { help_type = AMITK_HELP_INFO_TREE_VIEW_NONE; } g_signal_emit(G_OBJECT(tree_view), tree_view_signals[HELP_EVENT], 0,help_type); return; } /* we have to track motion notify for several reasons: 1. know which entry we're on for button_press events 2. context sensitive help 3. are we initiating a drag? */ static gboolean tree_view_motion_notify_event(GtkWidget *widget, GdkEventMotion *event) { AmitkTreeView * tree_view; g_return_val_if_fail(AMITK_IS_TREE_VIEW(widget), FALSE); tree_view = AMITK_TREE_VIEW(widget); tree_view->mouse_x = event->x; tree_view->mouse_y = event->y; switch(tree_view->mode) { case AMITK_TREE_VIEW_MODE_MAIN: tree_view_emit_help_signal(tree_view); break; default: break; } /* pass the signal on */ return GTK_WIDGET_CLASS (parent_class)->motion_notify_event (widget, event); } static gboolean tree_view_enter_notify_event(GtkWidget * widget, GdkEventCrossing *event) { GtkTreeSelection *selection; GtkTreeIter iter; AmitkTreeView * tree_view; g_return_val_if_fail(AMITK_IS_TREE_VIEW(widget), FALSE); tree_view = AMITK_TREE_VIEW(widget); switch(tree_view->mode) { case AMITK_TREE_VIEW_MODE_MAIN: tree_view_emit_help_signal(tree_view); gtk_widget_grab_focus(widget); /* move the keyboard entry focus into the tree */ /* double check that the right row is selected - gtk sometimes moves the selection to the 1st row */ if (tree_view->active_object != NULL) { if (tree_view_find_object(tree_view, tree_view->active_object, &iter)) { selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view)); if (!gtk_tree_selection_iter_is_selected(selection, &iter)) gtk_tree_selection_select_iter(selection, &iter); } } break; default: break; } /* pass the signal on */ return (* GTK_WIDGET_CLASS (parent_class)->enter_notify_event) (widget, event); } /* note, the contents of GdkPixbuf are shared, and should not be modified */ static GdkPixbuf * tree_view_get_object_pixbuf(AmitkTreeView * tree_view, AmitkObject * object) { GdkPixbuf * pixbuf=NULL; if (AMITK_IS_ROI(object)) { switch (AMITK_ROI_TYPE(object)) { case AMITK_ROI_TYPE_ELLIPSOID: pixbuf = gtk_widget_render_icon(GTK_WIDGET(tree_view), "amide_icon_roi_ellipsoid", GTK_ICON_SIZE_LARGE_TOOLBAR, 0); break; case AMITK_ROI_TYPE_CYLINDER: pixbuf = gtk_widget_render_icon(GTK_WIDGET(tree_view), "amide_icon_roi_cylinder", GTK_ICON_SIZE_LARGE_TOOLBAR, 0); break; case AMITK_ROI_TYPE_BOX: pixbuf = gtk_widget_render_icon(GTK_WIDGET(tree_view), "amide_icon_roi_box", GTK_ICON_SIZE_LARGE_TOOLBAR, 0); break; case AMITK_ROI_TYPE_ISOCONTOUR_2D: pixbuf = gtk_widget_render_icon(GTK_WIDGET(tree_view), "amide_icon_roi_isocontour_2d", GTK_ICON_SIZE_LARGE_TOOLBAR, 0); break; case AMITK_ROI_TYPE_ISOCONTOUR_3D: pixbuf = gtk_widget_render_icon(GTK_WIDGET(tree_view), "amide_icon_roi_isocontour_3d", GTK_ICON_SIZE_LARGE_TOOLBAR, 0); break; case AMITK_ROI_TYPE_FREEHAND_2D: pixbuf = gtk_widget_render_icon(GTK_WIDGET(tree_view), "amide_icon_roi_freehand_2d", GTK_ICON_SIZE_LARGE_TOOLBAR, 0); break; case AMITK_ROI_TYPE_FREEHAND_3D: pixbuf = gtk_widget_render_icon(GTK_WIDGET(tree_view), "amide_icon_roi_freehand_3d", GTK_ICON_SIZE_LARGE_TOOLBAR, 0); break; default: g_error("Unknown case in %s at %d\n", __FILE__, __LINE__); break; } } else if (AMITK_IS_DATA_SET(object)) { pixbuf = image_get_data_set_pixbuf(AMITK_DATA_SET(object)); } else if (AMITK_IS_STUDY(object)) { pixbuf = gtk_widget_render_icon(GTK_WIDGET(tree_view), "amide_icon_study", GTK_ICON_SIZE_LARGE_TOOLBAR, 0); } else if (AMITK_IS_FIDUCIAL_MARK(object)) { pixbuf = gtk_widget_render_icon(GTK_WIDGET(tree_view), "amide_icon_align_pt", GTK_ICON_SIZE_LARGE_TOOLBAR, 0); } else { g_error("Unknown case in %s at %d\n", __FILE__, __LINE__); } return pixbuf; } //static void tree_view_drop_cb(GtkWidget * menu, gpointer data) { // GdkDragContext * context =data; // AmitkTreeView * tree_view; // gboolean move; // move = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(menu), "move")); // tree_view = g_object_get_data(G_OBJECT(menu), "tree_view"); // return; //} #if WORKING_ON_IT static void tree_view_drag_begin (GtkWidget *widget, GdkDragContext *context) { GtkTreePath * path=NULL; GtkTreeIter iter; // GdkPixbuf * pixbuf; AmitkObject * object; gint cell_x, cell_y; GtkTreeModel * model; AmitkTreeView * tree_view; g_return_if_fail(AMITK_IS_TREE_VIEW(widget)); tree_view = AMITK_TREE_VIEW(widget); if (tree_view->mode != AMITK_TREE_VIEW_MODE_MAIN) return; g_print("drag begin from %s\n", AMITK_OBJECT_NAME(tree_view->study)); /* figure out what we're suppose to be dragging */ if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree_view), tree_view->mouse_x, tree_view->mouse_y, &path, NULL, &cell_x, &cell_y)) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view)); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_path_free(path); gtk_tree_model_get(model, &iter, COLUMN_OBJECT, &object, -1); g_return_if_fail(AMITK_IS_OBJECT(object)); /* if object is appropriate, start dragging */ if (!AMITK_IS_STUDY(object)) { tree_view->src_object = object; g_print("drag begin - figured out source\n"); // context = gtk_drag_begin(widget, tree_view->drag_list, // GDK_ACTION_ASK, 1, (GdkEvent*)event); // pixbuf = tree_view_get_object_pixbuf(tree_view, object); // gtk_drag_set_icon_pixbuf(context, pixbuf, -10,-10); // g_object_unref(pixbuf); } } } static void tree_view_drag_end (GtkWidget *widget, GdkDragContext *context) { AmitkTreeView * tree_view; g_return_if_fail(AMITK_IS_TREE_VIEW(widget)); tree_view = AMITK_TREE_VIEW(widget); if (tree_view->mode != AMITK_TREE_VIEW_MODE_MAIN) return; g_print("drag end %s\n", AMITK_OBJECT_NAME(tree_view->study)); tree_view->src_object = NULL; } static void tree_view_drag_data_get (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time) { // char *entry_text; AmitkTreeView * tree_view; g_return_if_fail(AMITK_IS_TREE_VIEW(widget)); g_return_if_fail(selection_data != NULL); tree_view = AMITK_TREE_VIEW(widget); if (tree_view->mode != AMITK_TREE_VIEW_MODE_MAIN) return; g_print("drag data get %s info %d\n", AMITK_OBJECT_NAME(tree_view->study), info); switch (info) { case AMITK_TREE_VIEW_DND_OBJECT: // gtk_selection_data_set_text(selection_data, AMITK_OBJECT_NAME(tree_view->src_object), -1); gtk_selection_data_set (selection_data, selection_data->target, 8, (guchar *) AMITK_OBJECT_NAME(tree_view->src_object), strlen (AMITK_OBJECT_NAME(tree_view->src_object))+1); break; case AMITK_DND_URI_LIST: default: g_assert_not_reached (); } } static void tree_view_drag_data_delete (GtkWidget *widget, GdkDragContext *context) { AmitkTreeView * tree_view; g_return_if_fail(AMITK_IS_TREE_VIEW(widget)); tree_view = AMITK_TREE_VIEW(widget); if (tree_view->mode != AMITK_TREE_VIEW_MODE_MAIN) return; g_print("drag data delete on %s\n", AMITK_OBJECT_NAME(tree_view->study)); } static void tree_view_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time) { AmitkTreeView * tree_view; g_return_if_fail(AMITK_IS_TREE_VIEW(widget)); tree_view = AMITK_TREE_VIEW(widget); if (tree_view->mode != AMITK_TREE_VIEW_MODE_MAIN) return; g_print("target leave on %s\n", AMITK_OBJECT_NAME(tree_view->study)); } static gboolean tree_view_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time) { AmitkTreeView * tree_view; g_return_val_if_fail(AMITK_IS_TREE_VIEW(widget), FALSE); tree_view = AMITK_TREE_VIEW(widget); if (tree_view->mode != AMITK_TREE_VIEW_MODE_MAIN) return; // g_print("target motion %d %d on %s\n", x, y, AMITK_OBJECT_NAME(tree_view->study)); // gdk_drag_status (context, 0, time); // gtk_drag_finish (context, FALSE, FALSE, time); // valid_row = gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tree_view), event->x, event->y, // &(AMITK_TREE_VIEW(tree_view)->current_path), // &column, &cell_x, &cell_y); return TRUE; } static gboolean tree_view_drag_drop (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time) { // GtkWidget * menu; // GtkWidget * menuitem; // GdkAtom target = GDK_NONE; AmitkTreeView * tree_view; g_return_val_if_fail(AMITK_IS_TREE_VIEW(widget), FALSE); tree_view = AMITK_TREE_VIEW(widget); if (tree_view->mode != AMITK_TREE_VIEW_MODE_MAIN) return; g_print("drop on %d %d %s\n", x, y, AMITK_OBJECT_NAME(tree_view->study)); /* check if drop is valid */ /* record which object we're moving/copying, and to where */ /* see if we want to copy or move */ // menu = gtk_menu_new(); // menuitem = gtk_menu_item_new_with_label("Move"); // gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); // g_object_set_data(G_OBJECT(menuitem), "move", GINT_TO_POINTER(TRUE)); // g_object_set(data(G_OBJECT(menuitem), "tree_view", tree_view); // g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(tree_view_drop_cb), context); // gtk_widget_show(menuitem); // menuitem = gtk_menu_item_new_with_label("Copy"); // gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); // g_object_set_data(G_OBJECT(menuitem), "move", GINT_TO_POINTER(FALSE)); // g_object_set(data(G_OBJECT(menuitem), "tree_view", tree_view); // g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(tree_view_drop_cb), context); // gtk_widget_show(menuitem); // gtk_widget_show(menu); // gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 1, time); // target = gtk_drag_dest_find_target (widget, context, NULL); // if (target != GDK_NONE) { // g_print("target\n"); // gtk_drag_get_data (widget, context, target, time); // } else { // gtk_drag_finish (context, FALSE, FALSE, time); // } /* Drag and drop didn't happen! */ // gtk_drag_finish (context, FALSE, FALSE, time); return TRUE; } static void tree_view_drag_data_received (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time) { gchar *str; gchar **uris; gint uris_index; AmitkTreeView * tree_view; AmitkDataSet * dropped_ds; gchar * import_filename; g_return_if_fail(AMITK_IS_TREE_VIEW(widget)); tree_view = AMITK_TREE_VIEW(widget); if (tree_view->mode != AMITK_TREE_VIEW_MODE_MAIN) return; g_print("target receive %s\n", AMITK_OBJECT_NAME(tree_view->study)); if (selection_data->length >= 0) g_print("selection data format %d\n", selection_data->format); g_print("context->action %d\n", context->action); switch (info) { case AMITK_TREE_VIEW_DND_OBJECT: str = selection_data->data; // str = gtk_selection_data_get_text (selection_data); g_print("target receive x %d y %d info %d suggested action %d\n", x,y,info, context->suggested_action); g_print("target receive x %d y %d info %d suggested action %d selection %s\n", x,y,info, context->suggested_action,str); g_free(str); break; case AMITK_DND_URI_LIST: uris = g_strsplit (selection_data->data, "\r\n", 0); for (uris_index=0; (uris[uris_index] != NULL && uris[uris_index][0] != '\0'); uris_index++) { if ((import_filename = g_filename_from_uri(uris[uris_index], NULL, NULL)) == NULL) g_warning("Could not generate filename for URI: %s", uris[uris_index]); else { dropped_ds = amitk_data_set_import_file(AMITK_IMPORT_METHOD_GUESS, 0, import_filename, NULL, tree_view->preferences, amitk_progress_dialog_update, tree_view->progress_dialog); g_free(import_filename); if (dropped_ds != NULL) { amitk_object_add_child(AMITK_OBJECT(tree_view->study), AMITK_OBJECT(dropped_ds)); /* this adds a reference to the data set*/ amitk_object_unref(dropped_ds); /* so remove a reference */ } } } g_strfreev (uris); break; default: g_assert_not_reached (); } gtk_drag_finish (context, FALSE, FALSE, time); } /* if ((data->length >= 0) && (data->format == 8)) */ /* { */ /* if (context->action == GDK_ACTION_ASK) */ /* { */ /* GtkWidget *dialog; */ /* gint response; */ /* dialog = gtk_message_dialog_new (NULL, */ /* GTK_DIALOG_MODAL | */ /* GTK_DIALOG_DESTROY_WITH_PARENT, */ /* GTK_MESSAGE_INFO, */ /* GTK_BUTTONS_YES_NO, */ /* "Move the data ?\n"); */ /* response = gtk_dialog_run (GTK_DIALOG (dialog)); */ /* gtk_widget_destroy (dialog); */ /* if (response == GTK_RESPONSE_YES) */ /* context->action = GDK_ACTION_MOVE; */ /* else */ /* context->action = GDK_ACTION_COPY; */ /* } */ /* gtk_drag_finish (context, TRUE, FALSE, time); */ /* return; */ /* } */ /* } */ #endif static void tree_view_study_view_mode_cb(AmitkStudy * study, gpointer data) { AmitkTreeView * tree_view = data; g_return_if_fail(AMITK_IS_TREE_VIEW(tree_view)); g_return_if_fail(AMITK_IS_STUDY(study)); if (tree_view->mode != AMITK_TREE_VIEW_MODE_MAIN) return; tree_view_set_view_mode(tree_view, AMITK_STUDY_VIEW_MODE(study)); return; } static void tree_view_object_update_cb(AmitkObject * object, gpointer data) { AmitkTreeView * tree_view = data; GtkTreeIter iter; GtkTreeModel * model; GdkPixbuf * pixbuf; g_return_if_fail(AMITK_IS_TREE_VIEW(tree_view)); g_return_if_fail(AMITK_IS_OBJECT(object)); if (tree_view_find_object(tree_view, object, &iter)) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view)); pixbuf = tree_view_get_object_pixbuf(tree_view, object); gtk_tree_store_set(GTK_TREE_STORE(model), &iter, COLUMN_ICON, pixbuf, COLUMN_NAME, AMITK_OBJECT_NAME(object), COLUMN_VISIBLE_SINGLE, amitk_object_get_selected(object, AMITK_SELECTION_SELECTED_0), COLUMN_VISIBLE_LINKED_2WAY, amitk_object_get_selected(object, AMITK_SELECTION_SELECTED_1), COLUMN_VISIBLE_LINKED_3WAY, amitk_object_get_selected(object, AMITK_SELECTION_SELECTED_2), -1); g_object_unref(pixbuf); } if (tree_view->mode == AMITK_TREE_VIEW_MODE_MAIN) { if (tree_view->active_object == object) { if (!amitk_object_get_selected(object, AMITK_SELECTION_ANY)) /* we're unselecting the active object */ g_signal_emit(G_OBJECT(tree_view), tree_view_signals[ACTIVATE_OBJECT], 0,NULL); } else if (tree_view->active_object == NULL) { /* currently no active object */ if (amitk_object_get_selected(object, AMITK_SELECTION_ANY)) /* we've selected something */ g_signal_emit(G_OBJECT(tree_view), tree_view_signals[ACTIVATE_OBJECT], 0,object); } } return; } static void tree_view_data_set_color_table_cb(AmitkDataSet * data_set, AmitkViewMode view_mode, gpointer data) { g_return_if_fail(AMITK_IS_DATA_SET(data_set)); if (view_mode == AMITK_VIEW_MODE_SINGLE) tree_view_object_update_cb(AMITK_OBJECT(data_set), data); } static void tree_view_object_add_child_cb(AmitkObject * parent, AmitkObject * child, gpointer data) { AmitkTreeView * tree_view = data; g_return_if_fail(AMITK_IS_TREE_VIEW(tree_view)); g_return_if_fail(AMITK_IS_OBJECT(child)); tree_view_add_object(AMITK_TREE_VIEW(tree_view), child); return; } static void tree_view_object_remove_child_cb(AmitkObject * parent, AmitkObject * child, gpointer data) { AmitkTreeView * tree_view = data; g_return_if_fail(AMITK_IS_TREE_VIEW(tree_view)); g_return_if_fail(AMITK_IS_OBJECT(child)); tree_view_remove_object(AMITK_TREE_VIEW(tree_view), child); return; } static gboolean tree_view_find_recurse(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { tree_view_find_t * tree_view_find=data; AmitkObject * object; gtk_tree_model_get(model, iter, COLUMN_OBJECT, &object, -1); g_return_val_if_fail(object != NULL, FALSE); if (object == tree_view_find->object) { tree_view_find->iter = *iter; tree_view_find->found = TRUE; return TRUE; } else { return FALSE; } } static gboolean tree_view_find_object(AmitkTreeView * tree_view, AmitkObject * object, GtkTreeIter * iter) { GtkTreeModel * model; tree_view_find_t tree_view_find; g_return_val_if_fail(AMITK_IS_TREE_VIEW(tree_view),FALSE); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view)); tree_view_find.object = object; tree_view_find.found = FALSE; gtk_tree_model_foreach(model, tree_view_find_recurse, &tree_view_find); if (tree_view_find.found) { *iter = tree_view_find.iter; return TRUE; } else return FALSE; } static void tree_view_add_object(AmitkTreeView * tree_view, AmitkObject * object) { GList * children; GtkTreeIter parent_iter; GtkTreeIter iter; GtkTreeModel * model; GdkPixbuf * pixbuf; amitk_object_ref(object); /* add a reference */ if (AMITK_IS_STUDY(object)) { /* save a pointer to thestudy object */ if (tree_view->study != NULL) { tree_view_remove_object(tree_view, AMITK_OBJECT(tree_view->study)); } tree_view->study = AMITK_STUDY(object); tree_view_set_view_mode(tree_view, AMITK_STUDY_VIEW_MODE(object)); } model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view)); if (AMITK_OBJECT_PARENT(object) == NULL) gtk_tree_store_append (GTK_TREE_STORE(model), &iter, NULL); /* Acquire a top-level iterator */ else { if (tree_view_find_object(tree_view, AMITK_OBJECT_PARENT(object), &parent_iter)) gtk_tree_store_append (GTK_TREE_STORE(model), &iter, &parent_iter); else g_return_if_reached(); } pixbuf = tree_view_get_object_pixbuf(tree_view, object); gtk_tree_store_set(GTK_TREE_STORE(model), &iter, COLUMN_MULTIPLE_SELECTION, amitk_object_get_selected(object, AMITK_SELECTION_SELECTED_0), /* default */ COLUMN_VISIBLE_SINGLE, amitk_object_get_selected(object, AMITK_SELECTION_SELECTED_0), COLUMN_VISIBLE_LINKED_2WAY, amitk_object_get_selected(object, AMITK_SELECTION_SELECTED_1), COLUMN_VISIBLE_LINKED_3WAY, amitk_object_get_selected(object, AMITK_SELECTION_SELECTED_2), COLUMN_EXPANDER, "*", COLUMN_ICON, pixbuf, COLUMN_NAME, AMITK_OBJECT_NAME(object), COLUMN_OBJECT, object, -1); g_object_unref(pixbuf); g_signal_connect(G_OBJECT(object), "object_name_changed", G_CALLBACK(tree_view_object_update_cb), tree_view); g_signal_connect(G_OBJECT(object), "object_selection_changed", G_CALLBACK(tree_view_object_update_cb), tree_view); if (AMITK_IS_DATA_SET(object)) { g_signal_connect(G_OBJECT(object), "modality_changed", G_CALLBACK(tree_view_object_update_cb), tree_view); g_signal_connect(G_OBJECT(object), "color_table_changed", G_CALLBACK(tree_view_data_set_color_table_cb), tree_view); } else if (AMITK_IS_ROI(object)) { g_signal_connect(G_OBJECT(object), "roi_type_changed", G_CALLBACK(tree_view_object_update_cb), tree_view); } else if (AMITK_IS_STUDY(object)) { g_signal_connect(G_OBJECT(object), "view_mode_changed", G_CALLBACK(tree_view_study_view_mode_cb), tree_view); } g_signal_connect(G_OBJECT(object), "object_add_child", G_CALLBACK(tree_view_object_add_child_cb), tree_view); g_signal_connect(G_OBJECT(object), "object_remove_child", G_CALLBACK(tree_view_object_remove_child_cb), tree_view); /* add children */ children = AMITK_OBJECT_CHILDREN(object); while (children != NULL) { tree_view_add_object(tree_view, children->data); children = children->next; } } static void tree_view_remove_object(AmitkTreeView * tree_view, AmitkObject * object) { GList * children; GtkTreeIter iter; GtkTreeModel * model; g_return_if_fail(AMITK_IS_TREE_VIEW(tree_view)); g_return_if_fail(tree_view_find_object(tree_view, object, &iter)); /* shouldn't fail */ /* unselect the object */ if (tree_view->mode == AMITK_TREE_VIEW_MODE_MAIN) amitk_object_unselect(object, AMITK_SELECTION_ALL); /* recursive remove children */ children = AMITK_OBJECT_CHILDREN(object); while (children != NULL) { tree_view_remove_object(tree_view, children->data); children = children->next; } /* disconnect the object's signals */ g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(tree_view_object_update_cb), tree_view); g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(tree_view_object_add_child_cb), tree_view); g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(tree_view_object_remove_child_cb), tree_view); if (AMITK_IS_STUDY(object)) { g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(tree_view_study_view_mode_cb), tree_view); } if (AMITK_IS_DATA_SET(object)) { g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(tree_view_data_set_color_table_cb), tree_view); } /* remove the object */ model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view)); gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); /* and unref */ amitk_object_unref(object); return; } /* preferences and progress_dialog can be NULL, nicer if they're not */ GtkWidget* amitk_tree_view_new (AmitkTreeViewMode tree_mode, AmitkPreferences * preferences, GtkWidget * progress_dialog) { AmitkTreeView * tree_view; AmitkViewMode i_view_mode; gchar * temp_string; GtkTreeStore * store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *selection; tree_view = g_object_new(amitk_tree_view_get_type(), NULL); tree_view->mode = tree_mode; /* if given preferences, save them */ if (preferences != NULL) tree_view->preferences = g_object_ref(preferences); else tree_view->preferences = NULL; /* if given a progress dialog, save it */ if (progress_dialog != NULL) tree_view->progress_dialog = g_object_ref(progress_dialog); else tree_view->progress_dialog = NULL; gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_view), FALSE); store = gtk_tree_store_new(NUM_COLUMNS, G_TYPE_BOOLEAN, /* COLUMN_MULTIPLE_SELECTION */ G_TYPE_BOOLEAN, /* COLUMN_VISIBLE_SINGLE */ G_TYPE_BOOLEAN,/* COLUMN_VISIBLE_LINKED_2WAY */ G_TYPE_BOOLEAN, /* COLUMN_VISIBLE_LINKED_3WAY */ G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER); gtk_tree_view_set_model (GTK_TREE_VIEW(tree_view), GTK_TREE_MODEL (store)); g_object_unref(store); renderer = gtk_cell_renderer_toggle_new (); column = gtk_tree_view_column_new_with_attributes("", renderer, /* "visible" */ "active", COLUMN_MULTIPLE_SELECTION, NULL); for (i_view_mode = 0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) { renderer = gtk_cell_renderer_toggle_new (); temp_string = g_strdup_printf("%d", i_view_mode+1); tree_view->select_column[i_view_mode] = gtk_tree_view_column_new_with_attributes(temp_string, renderer, /* "visible" */ "active", COLUMN_VISIBLE_SINGLE+i_view_mode, NULL); g_free(temp_string); } switch(tree_view->mode) { case AMITK_TREE_VIEW_MODE_MAIN: /* by default, only first select column is shown */ gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), tree_view->select_column[AMITK_VIEW_MODE_SINGLE]); break; case AMITK_TREE_VIEW_MODE_SINGLE_SELECTION: break; case AMITK_TREE_VIEW_MODE_MULTIPLE_SELECTION: gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column); break; default: g_error("unexpected case in %s at %d\n", __FILE__, __LINE__); break; } renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes("", renderer, /* "expand "*/ "text", COLUMN_EXPANDER, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column); gtk_tree_view_set_expander_column(GTK_TREE_VIEW(tree_view), column); renderer = gtk_cell_renderer_pixbuf_new (); column = gtk_tree_view_column_new_with_attributes("", renderer, /* "icon" */ "pixbuf", COLUMN_ICON, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes("name", renderer, "text", COLUMN_NAME, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)); switch (tree_view->mode) { case AMITK_TREE_VIEW_MODE_MAIN: case AMITK_TREE_VIEW_MODE_SINGLE_SELECTION: gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); break; case AMITK_TREE_VIEW_MODE_MULTIPLE_SELECTION: default: gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); break; } return GTK_WIDGET (tree_view); } void amitk_tree_view_set_study(AmitkTreeView * tree_view, AmitkStudy * study) { g_return_if_fail(AMITK_IS_TREE_VIEW(tree_view)); g_return_if_fail(AMITK_IS_STUDY(study)); tree_view_add_object(tree_view, AMITK_OBJECT(study)); return; } void amitk_tree_view_expand_object(AmitkTreeView * tree_view, AmitkObject * object) { GtkTreeIter iter; GtkTreeModel * model; GtkTreePath * path; g_return_if_fail(AMITK_IS_TREE_VIEW(tree_view)); g_return_if_fail(AMITK_IS_OBJECT(object)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view)); if (tree_view_find_object(tree_view, object, &iter)) { path = gtk_tree_model_get_path(model, &iter); gtk_tree_view_expand_row(GTK_TREE_VIEW(tree_view), path, FALSE); gtk_tree_path_free(path); } return; } /* this function can return NULL */ AmitkObject * amitk_tree_view_get_active_object(AmitkTreeView * tree_view) { g_return_val_if_fail(AMITK_IS_TREE_VIEW(tree_view), NULL); return tree_view->active_object; } void amitk_tree_view_set_active_object(AmitkTreeView * tree_view, AmitkObject * object) { GtkTreeSelection *selection; GtkTreeIter iter; g_return_if_fail(AMITK_IS_TREE_VIEW(tree_view)); g_return_if_fail((tree_view->mode == AMITK_TREE_VIEW_MODE_MAIN) || (tree_view->mode == AMITK_TREE_VIEW_MODE_SINGLE_SELECTION)); if (tree_view->active_object != NULL) { amitk_object_unref(tree_view->active_object); tree_view->active_object = NULL; } selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view)); if (object == NULL) { /* if any item is marked as active, unselect it */ if (gtk_tree_selection_get_selected (selection, NULL, &iter)) gtk_tree_selection_unselect_iter(selection, &iter); } else { g_return_if_fail(AMITK_IS_OBJECT(object)); if (tree_view_find_object(tree_view, object, &iter)) { tree_view->active_object = amitk_object_ref(object); if (!gtk_tree_selection_iter_is_selected(selection, &iter)) gtk_tree_selection_select_iter(selection, &iter); } } return; } gboolean multiple_selection_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { GList ** pobjects = data; gboolean multiple_selection; AmitkObject * object; gtk_tree_model_get(model, iter, COLUMN_OBJECT, &object, COLUMN_MULTIPLE_SELECTION, &multiple_selection, -1); if (multiple_selection) *pobjects = g_list_append(*pobjects, amitk_object_ref(object)); return FALSE; } GList * amitk_tree_view_get_multiple_selection_objects(AmitkTreeView * tree_view) { GList * objects=NULL; GtkTreeModel *tree_model; g_return_val_if_fail(AMITK_IS_TREE_VIEW(tree_view), NULL); g_return_val_if_fail(tree_view->mode == AMITK_TREE_VIEW_MODE_MULTIPLE_SELECTION, NULL); tree_model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view)); gtk_tree_model_foreach(tree_model, multiple_selection_foreach, &objects); return objects; } amide-1.0.5/src/ui_study_cb.h0000644000175000017500000001272412270274464015733 0ustar loeningloening/* ui_study_cb.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* external functions */ void ui_study_cb_open_xif_file(GtkAction * action, gpointer ui_study); void ui_study_cb_open_xif_dir(GtkAction * action, gpointer ui_study); void ui_study_cb_import_object_from_xif_file(GtkAction * action, gpointer data); void ui_study_cb_import_object_from_xif_dir(GtkAction * action, gpointer data); void ui_study_cb_recover_xif_file(GtkAction * action, gpointer data); void ui_study_cb_new_study(GtkAction * action, gpointer ui_study); void ui_study_cb_save_as_xif_file(GtkAction * action, gpointer data); void ui_study_cb_save_as_xif_dir(GtkAction * action, gpointer data); void ui_study_cb_import(GtkAction * action, gpointer data); void ui_study_cb_export_view(GtkAction * action, gpointer data); void ui_study_cb_export_data_set(GtkAction * action, gpointer data); gboolean ui_study_cb_update_help_info(GtkWidget * widget, GdkEventCrossing * event, gpointer data); void ui_study_cb_canvas_help_event(GtkWidget * canvas, AmitkHelpInfo help_type, AmitkPoint *location, amide_data_t value, gpointer ui_study); void ui_study_cb_canvas_view_changing(GtkWidget * canvas, AmitkPoint *position, amide_real_t thickness, gpointer ui_study); void ui_study_cb_canvas_view_changed(GtkWidget * canvas, AmitkPoint *position, amide_real_t thickness, gpointer ui_study); void ui_study_cb_canvas_erase_volume(GtkWidget * canvas, AmitkRoi * roi, gboolean outside, gpointer ui_study); void ui_study_cb_canvas_new_object(GtkWidget * canvas, AmitkObject * parent, AmitkObjectType type, AmitkPoint *position, gpointer ui_study); void ui_study_cb_tree_view_activate_object(GtkWidget * tree_view, AmitkObject * object, gpointer ui_study); void ui_study_cb_tree_view_popup_object(GtkWidget * tree_view, AmitkObject * object, gpointer ui_study); void ui_study_cb_tree_view_add_object(GtkWidget * tree_view, AmitkObject * parent, AmitkObjectType object_type, AmitkRoiType roi_type, gpointer ui_study); void ui_study_cb_tree_view_delete_object(GtkWidget * tree_view,AmitkObject * object, gpointer ui_study); void ui_study_cb_tree_view_help_event(GtkWidget * widget, AmitkHelpInfo help_type, gpointer ui_study); void ui_study_cb_zoom(GtkSpinButton * spin_button, gpointer ui_study); void ui_study_cb_fov(GtkSpinButton * spin_button, gpointer ui_study); void ui_study_cb_thickness(GtkSpinButton * spin_button, gpointer ui_study); void ui_study_cb_gate(GtkWidget * button, gpointer data); void ui_study_cb_time(GtkWidget * button, gpointer data); void ui_study_cb_series(GtkAction * action, gpointer ui_study); #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) void ui_study_cb_fly_through(GtkAction * action, gpointer ui_study); #endif #ifdef AMIDE_LIBVOLPACK_SUPPORT void ui_study_cb_render(GtkAction * action, gpointer data); #endif void ui_study_cb_roi_statistics(GtkAction * action, gpointer data); void ui_study_cb_alignment_selected(GtkAction * action, gpointer data); void ui_study_cb_crop_selected(GtkAction * action, gpointer data); void ui_study_cb_distance_selected(GtkAction * action, gpointer data); void ui_study_cb_fads_selected(GtkAction * action, gpointer data); void ui_study_cb_filter_selected(GtkAction * action, gpointer data); void ui_study_cb_profile_selected(GtkAction * action, gpointer data); void ui_study_cb_data_set_math_selected(GtkAction * action, gpointer data); void ui_study_cb_canvas_target(GtkToggleAction * action, gpointer data); void ui_study_cb_thresholding(GtkAction * action, gpointer data); void ui_study_cb_add_roi(GtkWidget * widget, gpointer data); void ui_study_cb_add_fiducial_mark(GtkAction * action, gpointer data); void ui_study_cb_preferences(GtkAction * action, gpointer data); void ui_study_cb_interpolation(GtkRadioAction * action, GtkRadioAction * current, gpointer data); void ui_study_cb_rendering(GtkWidget * widget, gpointer data); void ui_study_cb_study_changed(AmitkStudy * study, gpointer ui_study); void ui_study_cb_thickness_changed(AmitkStudy * study, gpointer data); void ui_study_cb_canvas_layout_changed(AmitkStudy * study, gpointer ui_study); void ui_study_cb_voxel_dim_or_zoom_changed(AmitkStudy * study, gpointer ui_study); void ui_study_cb_fov_changed(AmitkStudy * study, gpointer ui_study); void ui_study_cb_fuse_type(GtkRadioAction * action, GtkRadioAction * current, gpointer data); void ui_study_cb_canvas_visible(GtkToggleAction * action, gpointer ui_study); void ui_study_cb_view_mode(GtkRadioAction * action, GtkRadioAction * current, gpointer data); void ui_study_cb_quit(GtkAction* action, gpointer data); void ui_study_cb_close(GtkAction* action, gpointer data); gboolean ui_study_cb_delete_event(GtkWidget* widget, GdkEvent * event, gpointer data); amide-1.0.5/src/amitk_volume.h0000664000175000017500000001014112270274540016102 0ustar loeningloening/* amitk_volume.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_VOLUME_H__ #define __AMITK_VOLUME_H__ #include "amitk_object.h" G_BEGIN_DECLS #define AMITK_TYPE_VOLUME (amitk_volume_get_type ()) #define AMITK_VOLUME(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), AMITK_TYPE_VOLUME, AmitkVolume)) #define AMITK_VOLUME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_VOLUME, AmitkVolumeClass)) #define AMITK_IS_VOLUME(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), AMITK_TYPE_VOLUME)) #define AMITK_IS_VOLUME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_VOLUME)) #define AMITK_VOLUME_GET_CLASS(object) (G_TYPE_CHECK_GET_CLASS ((object), AMITK_TYPE_VOLUME, AmitkVolumeClass)) #define AMITK_VOLUME_CORNER(vol) (AMITK_VOLUME(vol)->corner) #define AMITK_VOLUME_X_CORNER(vol) (AMITK_VOLUME(vol)->corner.x) #define AMITK_VOLUME_Y_CORNER(vol) (AMITK_VOLUME(vol)->corner.y) #define AMITK_VOLUME_Z_CORNER(vol) (AMITK_VOLUME(vol)->corner.z) #define AMITK_VOLUME_VALID(vol) (AMITK_VOLUME(vol)->valid) typedef struct AmitkVolumeClass AmitkVolumeClass; typedef struct AmitkVolume AmitkVolume; struct AmitkVolume { AmitkObject parent; AmitkPoint corner; /* far corner, in volume's coord space. near corner always 0,0,0 in volume's coord space */ gboolean valid; /* if the corner is currently valid */ }; struct AmitkVolumeClass { AmitkObjectClass parent_class; void (*volume_corner_changed) (AmitkVolume * volume, AmitkPoint * new_corner); void (* volume_get_center) (const AmitkVolume * volume, AmitkPoint * center); void (* volume_changed) (AmitkVolume * volume); }; /* Application-level methods */ GType amitk_volume_get_type (void); AmitkVolume * amitk_volume_new (void); gboolean amitk_volume_point_in_bounds (const AmitkVolume * volume, const AmitkPoint point); AmitkPoint amitk_volume_place_in_bounds (const AmitkVolume * volume, const AmitkPoint point); AmitkPoint amitk_volume_get_center (const AmitkVolume * volume); void amitk_volume_set_corner (AmitkVolume * volume, AmitkPoint corner); void amitk_volume_set_z_corner (AmitkVolume * volume, amide_real_t z); void amitk_volume_set_center (AmitkVolume * volume, const AmitkPoint center); void amitk_volume_get_enclosing_corners (const AmitkVolume * volume, const AmitkSpace * space, AmitkCorners return_corners); gboolean amitk_volumes_get_enclosing_corners (const GList * volumes, const AmitkSpace * space, AmitkCorners return_corners); gboolean amitk_volume_volume_intersection_corners(const AmitkVolume * volume1, const AmitkVolume * volume2, AmitkCorners return_corners); amide_real_t amitk_volumes_get_max_size (GList * objects); gboolean amitk_volumes_calc_display_volume (const GList * volumes, const AmitkSpace * space, const AmitkPoint view_center, const amide_real_t thickness, const amide_real_t fov, AmitkVolume * volume); G_END_DECLS #endif /* __AMITK_VOLUME_H__ */ amide-1.0.5/src/ui_render_dialog.c0000644000175000017500000006114012270274036016677 0ustar loeningloening/* ui_render_dialog.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #ifdef AMIDE_LIBVOLPACK_SUPPORT #include "amide.h" #include "amide_gconf.h" #include "ui_common.h" #include "ui_render_dialog.h" #include "amitk_color_table_menu.h" #define GAMMA_CURVE_WIDTH -1 /* sets automatically */ #define GAMMA_CURVE_HEIGHT 100 static void change_quality_cb(GtkWidget * widget, gpointer data); static void change_pixel_type_cb(GtkWidget * widget, gpointer data); static void change_density_cb(GtkWidget * widget, gpointer data); static void change_eye_angle_cb(GtkWidget * widget, gpointer data); static void change_eye_width_cb(GtkWidget * widget, gpointer data); static void depth_cueing_toggle_cb(GtkWidget * widget, gpointer data); static void change_front_factor_cb(GtkWidget * widget, gpointer data); static void color_table_cb(GtkWidget * widget, gpointer data); static void change_opacity_cb(GtkWidget * widget, gpointer data); static void p_response_cb (GtkDialog * dialog, gint response_id, gpointer data); static void tf_response_cb (GtkDialog * dialog, gint response_id, gpointer data); static gboolean p_delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data); static gboolean tf_delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data); static void setup_curve(GtkWidget * gamma_curve, gpointer data, classification_t type); /* function to change the rendering quality */ static void change_quality_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render = data; rendering_quality_t new_quality; new_quality = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); if (ui_render->quality != new_quality) { ui_render->quality = new_quality; /* apply the new quality */ renderings_set_quality(ui_render->renderings, ui_render->quality); /* do updating */ ui_render_add_update(ui_render); } return; } /* function to change the return pixel type */ static void change_pixel_type_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render; rendering_t * rendering = data; pixel_type_t new_type; ui_render = g_object_get_data(G_OBJECT(widget), "ui_render"); new_type = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); if (rendering->pixel_type != new_type) { rendering->pixel_type = new_type; /* apply the new quality */ rendering_set_image(rendering, rendering->pixel_type, ui_render->zoom); /* do updating */ ui_render_add_update(ui_render); } return; } /* function to switch between click & drag versus click, drag, release */ static void update_without_release_toggle_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render = data; gboolean update_without_release; update_without_release = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); if (ui_render->update_without_release != update_without_release) { ui_render->update_without_release = update_without_release; /* save user preferences */ amide_gconf_set_bool(GCONF_AMIDE_RENDERING,"UpdateWithoutRelease", ui_render->update_without_release); } return; } /* function to change the stereo eye angle */ static void change_eye_angle_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render = data; gdouble temp_val; temp_val = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); if (temp_val > 90) /* 90 degrees seems like quite a bit... */ return; if (!REAL_EQUAL(ui_render->stereo_eye_angle, temp_val)) { ui_render->stereo_eye_angle = temp_val; /* save user preferences */ amide_gconf_set_float(GCONF_AMIDE_RENDERING,"EyeAngle", ui_render->stereo_eye_angle); /* do updating */ ui_render_add_update(ui_render); } return; } /* function to change the distance between stereo image pairs */ static void change_eye_width_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render = data; gdouble temp_val; temp_val = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); temp_val = temp_val*gdk_screen_width()/gdk_screen_width_mm(); if (temp_val < 0) /* weird mutants? */ return; if (temp_val > 1000) /* just plain wrong? */ return; if (!REAL_EQUAL(ui_render->stereo_eye_width, temp_val)) { ui_render->stereo_eye_width = temp_val; /* save user preferences */ amide_gconf_set_int(GCONF_AMIDE_RENDERING,"EyeWidth", ui_render->stereo_eye_width); /* do updating */ ui_render_add_update(ui_render); } return; } /* function to enable/disable depth cueing */ static void depth_cueing_toggle_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render = data; gboolean depth_cueing; depth_cueing = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); if (ui_render->depth_cueing != depth_cueing) { ui_render->depth_cueing = depth_cueing; /* apply the new quality */ renderings_set_depth_cueing(ui_render->renderings, ui_render->depth_cueing); ui_render_add_update(ui_render); } return; } /* function to change the front factor on depth cueing */ static void change_front_factor_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render = data; gdouble temp_val; temp_val = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); if (!REAL_EQUAL(ui_render->front_factor, temp_val)) { /* set the front factor */ ui_render->front_factor = temp_val; renderings_set_depth_cueing_parameters(ui_render->renderings, ui_render->front_factor, ui_render->density); ui_render_add_update(ui_render); } return; } /* function to change the density parameter on depth cueing */ static void change_density_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render = data; gdouble temp_val; temp_val = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); if (!REAL_EQUAL(ui_render->density, temp_val)) { ui_render->density = temp_val; /* set the density */ renderings_set_depth_cueing_parameters(ui_render->renderings, ui_render->front_factor, ui_render->density); ui_render_add_update(ui_render); } return; } /* changing the color table of a rendering context */ static void color_table_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render ; rendering_t * rendering = data; AmitkColorTable i_color_table; ui_render = g_object_get_data(G_OBJECT(widget), "ui_render"); i_color_table = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); if (rendering->color_table != i_color_table) { /* set the color table */ rendering->color_table = i_color_table; ui_render_add_update(ui_render); } return; } /* function called to change the opacity density or gradient for classification */ static void change_opacity_cb(GtkWidget * widget, gpointer data) { ui_render_t * ui_render; GtkWidget * gamma_curve[2]; gint i; guint num_points; rendering_t * rendering=data; curve_type_t curve_type; classification_t i_classification; g_return_if_fail(rendering!=NULL); /* get some pointers */ gamma_curve[DENSITY_CLASSIFICATION] = g_object_get_data(G_OBJECT(widget), "gamma_curve_density"); gamma_curve[GRADIENT_CLASSIFICATION] = g_object_get_data(G_OBJECT(widget), "gamma_curve_gradient"); ui_render = g_object_get_data(G_OBJECT(widget), "ui_render"); for (i_classification = 0; i_classification < NUM_CLASSIFICATIONS; i_classification++) { /* figure out the curve type */ switch (GTK_CURVE(GTK_GAMMA_CURVE(gamma_curve[i_classification])->curve)->curve_type) { case GTK_CURVE_TYPE_SPLINE: curve_type = CURVE_SPLINE; num_points = GTK_CURVE(GTK_GAMMA_CURVE(gamma_curve[i_classification])->curve)->num_ctlpoints; break; case GTK_CURVE_TYPE_LINEAR: default: curve_type = CURVE_LINEAR; num_points = GTK_CURVE(GTK_GAMMA_CURVE(gamma_curve[i_classification])->curve)->num_ctlpoints; break; } /* set the ramp table to what's in the curve widget */ gtk_curve_get_vector(GTK_CURVE(GTK_GAMMA_CURVE(gamma_curve[i_classification])->curve), (i_classification == DENSITY_CLASSIFICATION) ? RENDERING_DENSITY_MAX:RENDERING_GRADIENT_MAX, (i_classification == DENSITY_CLASSIFICATION) ? rendering->density_ramp : rendering->gradient_ramp); /* store the control points on the widget for later use */ g_free(rendering->ramp_x[i_classification]); /* free the old stuff */ g_free(rendering->ramp_y[i_classification]); /* free the old stuff */ rendering->num_points[i_classification] = num_points; rendering->curve_type[i_classification] = curve_type; /* allocate some new memory */ if ((rendering->ramp_x[i_classification] = g_try_new(gint,rendering->num_points[i_classification])) == NULL) { g_warning(_("couldn't allocate memory space for ramp x")); return; } if ((rendering->ramp_y[i_classification] = g_try_new(gfloat,rendering->num_points[i_classification])) == NULL) { g_warning(_("couldn't allocate memory space for ramp y")); return; } /* copy the new ctrl points */ for (i=0;inum_points[i_classification];i++) { rendering->ramp_x[i_classification][i] = GTK_CURVE(GTK_GAMMA_CURVE(gamma_curve[i_classification])->curve)->ctlpoint[i][0]; rendering->ramp_y[i_classification][i] = GTK_CURVE(GTK_GAMMA_CURVE(gamma_curve[i_classification])->curve)->ctlpoint[i][1]; } rendering->need_reclassify = TRUE; rendering->need_rerender = TRUE; } ui_render_add_update(ui_render); return; } static void p_response_cb (GtkDialog * dialog, gint response_id, gpointer data) { gint return_val; switch(response_id) { case GTK_RESPONSE_HELP: amide_call_help("rendering-dialog"); break; case GTK_RESPONSE_CLOSE: g_signal_emit_by_name(G_OBJECT(dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(dialog)); break; default: break; } return; } static void tf_response_cb (GtkDialog * dialog, gint response_id, gpointer data) { gint return_val; switch(response_id) { case GTK_RESPONSE_HELP: amide_call_help("transfer-function-dialog"); break; case GTK_RESPONSE_CLOSE: g_signal_emit_by_name(G_OBJECT(dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(dialog)); break; default: break; } return; } static gboolean p_delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { ui_render_t * ui_render = data; ui_render->parameter_dialog = NULL; return FALSE; } static gboolean tf_delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { ui_render_t * ui_render = data; ui_render->transfer_function_dialog = NULL; return FALSE; } /* function to set what's in the density or gradient opacity curves when it gets realized */ static void setup_curve(GtkWidget * gamma_curve, gpointer data, classification_t type) { GtkWidget * curve; rendering_t * rendering = data; gfloat (*curve_ctrl_points)[2]; guint i; curve = GTK_GAMMA_CURVE(gamma_curve)->curve; /* allocate some memory for the curve we're passing to the curve widget */ if ((curve_ctrl_points = g_try_malloc(rendering->num_points[type]*sizeof(gfloat)*2)) == NULL) { g_warning(_("Failed to Allocate Memory for Ramp")); return; } /* copy rampx and rampy into the curve array */ for (i=0; i< rendering->num_points[type]; i++) { curve_ctrl_points[i][0]=rendering->ramp_x[type][i]; curve_ctrl_points[i][1]=rendering->ramp_y[type][i]; } GTK_CURVE(curve)->num_ctlpoints = rendering->num_points[type]; g_free(GTK_CURVE(curve)->ctlpoint); GTK_CURVE(curve)->ctlpoint = curve_ctrl_points; /* doing some hackish stuff to get this to work as I'd like it (i.e. saving state) */ switch (rendering->curve_type[type]) { case CURVE_SPLINE: GTK_CURVE(curve)->curve_type = GTK_CURVE_TYPE_SPLINE; GTK_TOGGLE_BUTTON(GTK_GAMMA_CURVE(gamma_curve)->button[0])->active=TRUE; break; case CURVE_LINEAR: default: GTK_CURVE(curve)->curve_type = GTK_CURVE_TYPE_LINEAR; GTK_TOGGLE_BUTTON(GTK_GAMMA_CURVE(gamma_curve)->button[1])->active=TRUE; break; } return; } /* function that sets up the rendering options dialog */ void ui_render_dialog_create_parameters(ui_render_t * ui_render) { GtkWidget * dialog; gchar * temp_string = NULL; GtkWidget * packing_table; GtkWidget * label; GtkWidget * menu; GtkWidget * check_button; GtkWidget * spin_button; GtkWidget * hseparator; rendering_quality_t i_quality; guint table_row = 0; if (ui_render->parameter_dialog != NULL) return; temp_string = g_strdup_printf(_("%s: Rendering Parameters Dialog"),PACKAGE); dialog = gtk_dialog_new_with_buttons (temp_string, ui_render->window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_HELP, GTK_RESPONSE_HELP, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); g_free(temp_string); ui_render->parameter_dialog = dialog; /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(p_response_cb), ui_render); g_signal_connect(G_OBJECT(dialog), "delete_event", G_CALLBACK(p_delete_event_cb), ui_render); /* start making the widgets for this dialog box */ packing_table = gtk_table_new(4,2,FALSE); table_row=0; gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), packing_table); /* widgets to change the quality versus speed of rendering */ label = gtk_label_new(_("Speed versus Quality")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); menu = gtk_combo_box_new_text(); for (i_quality=0; i_qualityquality); g_signal_connect(G_OBJECT(menu), "changed", G_CALLBACK(change_quality_cb), ui_render); gtk_table_attach(GTK_TABLE(packing_table), menu, 1,2, table_row,table_row+1, GTK_EXPAND | GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* allow rendering to be click and drag */ check_button = gtk_check_button_new_with_label (_("update without button release")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button), ui_render->update_without_release); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(update_without_release_toggle_cb), ui_render); gtk_table_attach(GTK_TABLE(packing_table), check_button, 0,2, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator,0,2, table_row, table_row+1, GTK_FILL, GTK_FILL, X_PADDING, Y_PADDING); table_row++; /* widget for the stereo eye angle */ label = gtk_label_new(_("Stereo Angle")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); spin_button = gtk_spin_button_new_with_range(-90.0, 90.0, 0.2); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin_button), 2); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), ui_render->stereo_eye_angle); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(change_eye_angle_cb), ui_render); gtk_table_attach(GTK_TABLE(packing_table), spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* widget for the stereo eye width */ label = gtk_label_new(_("Eye Width (mm)")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); spin_button = gtk_spin_button_new_with_range(0, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin_button), 2); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), gdk_screen_width_mm()*ui_render->stereo_eye_width/ ((gdouble) gdk_screen_width())); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(change_eye_width_cb), ui_render); gtk_table_attach(GTK_TABLE(packing_table), spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator,0,2, table_row, table_row+1, GTK_FILL, GTK_FILL, X_PADDING, Y_PADDING); table_row++; /* the depth cueing enabling button */ check_button = gtk_check_button_new_with_label (_("enable/disable depth cueing")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button), ui_render->depth_cueing); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(depth_cueing_toggle_cb), ui_render); gtk_table_attach(GTK_TABLE(packing_table), check_button, 0,2, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("Front Factor")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); spin_button = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 0.2); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin_button), 2); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), ui_render->front_factor); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(change_front_factor_cb), ui_render); gtk_table_attach(GTK_TABLE(packing_table), spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("Density")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); spin_button = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 0.2); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_button), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin_button), 2); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), ui_render->density); g_signal_connect(G_OBJECT(spin_button), "value_changed", G_CALLBACK(change_density_cb), ui_render); gtk_table_attach(GTK_TABLE(packing_table), spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* and show all our widgets */ gtk_widget_show_all(dialog); return; } /* function that sets up the rendering options dialog */ void ui_render_dialog_create_transfer_function(ui_render_t * ui_render) { GtkWidget * dialog; gchar * temp_string = NULL; GtkWidget * packing_table; GtkWidget * label; GtkWidget * menu; GtkWidget * gamma_curve[2]; GtkWidget * button; GtkWidget * notebook; classification_t i_classification; GtkWidget * hseparator; pixel_type_t i_pixel_type; guint table_row = 0; renderings_t * temp_list; if (ui_render->transfer_function_dialog != NULL) return; temp_string = g_strdup_printf(_("%s: Transfer Function Dialog"),PACKAGE); dialog = gtk_dialog_new_with_buttons (temp_string, ui_render->window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_HELP, GTK_RESPONSE_HELP, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); g_free(temp_string); ui_render->transfer_function_dialog = dialog; /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(tf_response_cb), ui_render); g_signal_connect(G_OBJECT(dialog), "delete_event", G_CALLBACK(tf_delete_event_cb), ui_render); notebook = gtk_notebook_new(); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), notebook); temp_list = ui_render->renderings; while (temp_list != NULL) { packing_table = gtk_table_new(4,3,FALSE); table_row=0; label = gtk_label_new(temp_list->rendering->name); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), packing_table, label); /* widgets to change the returned pixel type of the rendering */ label = gtk_label_new(_("Return Type")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); menu = gtk_combo_box_new_text(); for (i_pixel_type=0; i_pixel_typerendering->pixel_type); g_signal_connect(G_OBJECT(menu), "changed", G_CALLBACK(change_pixel_type_cb), temp_list->rendering); gtk_table_attach(GTK_TABLE(packing_table), menu, 1,2, table_row,table_row+1, GTK_EXPAND | GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* color table selector */ label = gtk_label_new(_("color table:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); menu = amitk_color_table_menu_new(); g_object_set_data(G_OBJECT(menu), "ui_render", ui_render); gtk_table_attach(GTK_TABLE(packing_table), menu, 1,2, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_combo_box_set_active(GTK_COMBO_BOX(menu),temp_list->rendering->color_table); g_signal_connect(G_OBJECT(menu), "changed", G_CALLBACK(color_table_cb), temp_list->rendering); gtk_widget_show(menu); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator,0,2, table_row, table_row+1, GTK_FILL, GTK_FILL, X_PADDING, Y_PADDING); table_row++; /* widgets for changing the density and gradient classification parameters */ for (i_classification = 0; i_classification < NUM_CLASSIFICATIONS; i_classification++) { if (i_classification == DENSITY_CLASSIFICATION) label = gtk_label_new(_("Density\nDependent\nOpacity")); else /* gradient classification*/ label = gtk_label_new(_("Gradient\nDependent\nOpacity")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); gamma_curve[i_classification] = gtk_gamma_curve_new(); gtk_widget_set_size_request(gamma_curve[i_classification], GAMMA_CURVE_WIDTH, GAMMA_CURVE_HEIGHT); gtk_curve_set_range(GTK_CURVE(GTK_GAMMA_CURVE(gamma_curve[i_classification])->curve), 0.0, (i_classification == DENSITY_CLASSIFICATION) ? RENDERING_DENSITY_MAX: RENDERING_GRADIENT_MAX, 0.0, 1.0); setup_curve(gamma_curve[i_classification], temp_list->rendering, i_classification); /* disable the gamma button and free drawing button */ gtk_widget_destroy(GTK_GAMMA_CURVE(gamma_curve[i_classification])->button[3]); gtk_widget_destroy(GTK_GAMMA_CURVE(gamma_curve[i_classification])->button[2]); /* and attach */ gtk_table_attach(GTK_TABLE(packing_table), gamma_curve[i_classification], 1,3, table_row, table_row+1, GTK_EXPAND | GTK_FILL, GTK_FILL, X_PADDING, Y_PADDING); table_row++; } /* GTK no longer has a way to detect automatically when the GtkCurve has been changed, user will now have to explicitly change */ button = gtk_button_new_with_label(_("Apply Curve Changes")); g_object_set_data(G_OBJECT(button), "gamma_curve_density", gamma_curve[DENSITY_CLASSIFICATION]); g_object_set_data(G_OBJECT(button), "gamma_curve_gradient", gamma_curve[GRADIENT_CLASSIFICATION]); g_object_set_data(G_OBJECT(button), "ui_render", ui_render); /* and attach */ gtk_table_attach(GTK_TABLE(packing_table), button, 1,3, table_row, table_row+1, GTK_EXPAND | GTK_FILL, GTK_FILL, X_PADDING, Y_PADDING); gtk_widget_show(button); table_row++; g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(change_opacity_cb), temp_list->rendering); temp_list=temp_list->next; } /* and show all our widgets */ gtk_widget_show_all(dialog); return; } #endif amide-1.0.5/src/amitk_raw_data.h0000664000175000017500000001732412270274553016373 0ustar loeningloening/* amitk_raw_data.h * * Part of amide - Amide's a Medical Image Data Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_RAW_DATA_H__ #define __AMITK_RAW_DATA_H__ /* header files that are always needed with this file */ #include #include "amitk_object.h" G_BEGIN_DECLS #define AMITK_TYPE_RAW_DATA (amitk_raw_data_get_type ()) #define AMITK_RAW_DATA(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), AMITK_TYPE_RAW_DATA, AmitkRawData)) #define AMITK_RAW_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_RAW_DATA, AmitkRawDataClass)) #define AMITK_IS_RAW_DATA(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), AMITK_TYPE_RAW_DATA)) #define AMITK_IS_RAW_DATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_RAW_DATA)) #define AMITK_RAW_DATA_GET_CLASS(object) (G_TYPE_CHECK_GET_CLASS ((object), AMITK_TYPE_RAW_DATA, AmitkRawDataClass)) #define AMITK_RAW_DATA_FORMAT(rd) (AMITK_RAW_DATA(rd)->format) #define AMITK_RAW_DATA_DIM(rd) (AMITK_RAW_DATA(rd)->dim) #define AMITK_RAW_DATA_DIM_X(rd) (AMITK_RAW_DATA(rd)->dim.x) #define AMITK_RAW_DATA_DIM_Y(rd) (AMITK_RAW_DATA(rd)->dim.y) #define AMITK_RAW_DATA_DIM_Z(rd) (AMITK_RAW_DATA(rd)->dim.z) #define AMITK_RAW_DATA_DIM_G(rd) (AMITK_RAW_DATA(rd)->dim.g) #define AMITK_RAW_DATA_DIM_T(rd) (AMITK_RAW_DATA(rd)->dim.t) /* glib doesn't define these for PDP */ #ifdef G_BIG_ENDIAN #define GINT32_TO_PDP(val) ((gint32) GUINT32_SWAP_BE_PDP (val)) #define GUINT32_TO_PDP(val) ((guint32) GUINT32_SWAP_BE_PDP (val)) #else /* G_LITTLE_ENDIAN */ #define GINT32_TO_PDP(val) ((gint32) GUINT32_SWAP_LE_PDP (val)) #define GUINT32_TO_PDP(val) ((guint32) GUINT32_SWAP_LE_PDP (val)) #endif #define GINT32_FROM_PDP(val) (GINT32_TO_PDP (val)) #define GUINT32_FROM_PDP(val) (GUINT32_TO_PDP (val)) /* setup the types for various internal data formats */ /*the formats that data can take in memory */ typedef enum { AMITK_FORMAT_UBYTE, AMITK_FORMAT_SBYTE, AMITK_FORMAT_USHORT, AMITK_FORMAT_SSHORT, AMITK_FORMAT_UINT, AMITK_FORMAT_SINT, AMITK_FORMAT_FLOAT, AMITK_FORMAT_DOUBLE, AMITK_FORMAT_NUM } AmitkFormat; typedef guint8 amitk_format_UBYTE_t; typedef gint8 amitk_format_SBYTE_t; typedef guint16 amitk_format_USHORT_t; typedef gint16 amitk_format_SSHORT_t; typedef guint32 amitk_format_UINT_t; typedef gint32 amitk_format_SINT_t; typedef gfloat amitk_format_FLOAT_t; typedef gdouble amitk_format_DOUBLE_t; /*the formats that data can take on disk */ typedef enum { AMITK_RAW_FORMAT_UBYTE_8_NE, AMITK_RAW_FORMAT_SBYTE_8_NE, AMITK_RAW_FORMAT_USHORT_16_LE, AMITK_RAW_FORMAT_SSHORT_16_LE, AMITK_RAW_FORMAT_UINT_32_LE, AMITK_RAW_FORMAT_SINT_32_LE, AMITK_RAW_FORMAT_FLOAT_32_LE, AMITK_RAW_FORMAT_DOUBLE_64_LE, AMITK_RAW_FORMAT_USHORT_16_BE, AMITK_RAW_FORMAT_SSHORT_16_BE, AMITK_RAW_FORMAT_UINT_32_BE, AMITK_RAW_FORMAT_SINT_32_BE, AMITK_RAW_FORMAT_FLOAT_32_BE, AMITK_RAW_FORMAT_DOUBLE_64_BE, AMITK_RAW_FORMAT_UINT_32_PDP, AMITK_RAW_FORMAT_SINT_32_PDP, AMITK_RAW_FORMAT_FLOAT_32_PDP, AMITK_RAW_FORMAT_ASCII_8_NE, AMITK_RAW_FORMAT_NUM } AmitkRawFormat; typedef struct _AmitkRawDataClass AmitkRawDataClass; typedef struct _AmitkRawData AmitkRawData; struct _AmitkRawData { GObject parent; AmitkVoxel dim; gpointer data; AmitkFormat format; }; struct _AmitkRawDataClass { GObjectClass parent_class; }; /* -------- defines ----------- */ #define amitk_raw_data_includes_voxel(rd, vox) (!(((vox).x < 0) || \ ((vox).y < 0) || \ ((vox).z < 0) || \ ((vox).g < 0) || \ ((vox).t < 0) || \ ((vox).x >= (rd)->dim.x) || \ ((vox).y >= (rd)->dim.y) || \ ((vox).z >= (rd)->dim.z) || \ ((vox).g >= (rd)->dim.g) || \ ((vox).t >= (rd)->dim.t))) #define amitk_raw_data_num_voxels(rd) ((rd)->dim.x * (rd)->dim.y * (rd)->dim.z * (rd)->dim.g * (rd)->dim.t) #define amitk_raw_data_size_data_mem(rd) (amitk_raw_data_num_voxels(rd) * amitk_format_sizes[(rd)->format]) #define amitk_raw_data_get_data_mem(rd) (g_try_malloc(amitk_raw_data_size_data_mem(rd))) #define amitk_raw_data_get_data_mem0(rd) (g_try_malloc0(amitk_raw_data_size_data_mem(rd))) /* ------------ external functions ---------- */ GType amitk_raw_data_get_type (void); AmitkRawData* amitk_raw_data_new (void); AmitkRawData* amitk_raw_data_new_with_data (AmitkFormat format, AmitkVoxel dim); AmitkRawData* amitk_raw_data_new_with_data0 (AmitkFormat format, AmitkVoxel dim); AmitkRawData * amitk_raw_data_new_2D_with_data0 (AmitkFormat format, amide_intpoint_t y_dim, amide_intpoint_t x_dim); AmitkRawData * amitk_raw_data_new_3D_with_data0 (AmitkFormat format, amide_intpoint_t z_dim, amide_intpoint_t y_dim, amide_intpoint_t x_dim); AmitkRawData * amitk_raw_data_import_raw_file (const gchar * file_name, FILE * existing_file, AmitkRawFormat raw_format, AmitkVoxel dim, long file_offset, AmitkUpdateFunc update_func, gpointer update_data); void amitk_raw_data_write_xml (AmitkRawData * raw_data, const gchar * name, FILE * study_file, gchar ** output_filename, guint64 * location, guint64 * size); AmitkRawData * amitk_raw_data_read_xml (gchar * xml_filename, FILE * study_file, guint64 location, guint64 size, gchar ** perror_buf, AmitkUpdateFunc update_func, gpointer update_data); amide_data_t amitk_raw_data_get_value (const AmitkRawData * rd, const AmitkVoxel i); gpointer amitk_raw_data_get_pointer (const AmitkRawData * rd, const AmitkVoxel i); AmitkFormat amitk_raw_format_to_format(AmitkRawFormat raw_format); AmitkRawFormat amitk_format_to_raw_format(AmitkFormat data_format); #define amitk_raw_format_calc_num_bytes_per_slice(dim, raw_format) ((dim).x*(dim).y*amitk_raw_format_sizes[raw_format]) #define amitk_raw_format_calc_num_bytes(dim, raw_format) ((dim).z*(dim).g*(dim).t*amitk_raw_format_calc_num_bytes_per_slice(dim,raw_format)) const gchar * amitk_raw_format_get_name(const AmitkRawFormat raw_format); /* external variables */ extern guint amitk_format_sizes[]; extern gboolean amitk_format_signed[]; extern gchar * amitk_format_names[]; extern amide_data_t amitk_format_max[]; extern amide_data_t amitk_format_min[]; extern guint amitk_raw_format_sizes[]; extern gchar * amitk_raw_format_names[]; extern gchar * amitk_raw_format_legacy_names[]; /* variable type function declarations */ #include "amitk_raw_data_UBYTE.h" #include "amitk_raw_data_SBYTE.h" #include "amitk_raw_data_USHORT.h" #include "amitk_raw_data_SSHORT.h" #include "amitk_raw_data_UINT.h" #include "amitk_raw_data_SINT.h" #include "amitk_raw_data_FLOAT.h" #include "amitk_raw_data_DOUBLE.h" G_END_DECLS #endif /* __AMITK_RAW_DATA_H__ */ amide-1.0.5/src/tb_roi_analysis.c0000664000175000017500000012455012270274030016566 0ustar loeningloening/* tb_roi_analysis.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include #include "amide.h" #include "amide_gconf.h" #include "amitk_common.h" #include "analysis.h" #include "tb_roi_analysis.h" #include "ui_common.h" #define GCONF_AMIDE_ANALYSIS "ANALYSIS" #define ROI_STATISTICS_WIDTH 950 /* keep in sync with array below */ typedef enum { COLUMN_ROI_NAME, COLUMN_DATA_SET_NAME, COLUMN_FRAME, COLUMN_DURATION, COLUMN_TIME_MIDPT, COLUMN_GATE, COLUMN_GATE_TIME, /* COLUMN_TOTAL, */ COLUMN_MEDIAN, COLUMN_MEAN, COLUMN_VAR, COLUMN_STD_DEV, COLUMN_MIN, COLUMN_MAX, COLUMN_SIZE, COLUMN_FRAC_VOXELS, COLUMN_VOXELS, NUM_ANALYSIS_COLUMNS, } column_t; static gboolean column_use_my_renderer[NUM_ANALYSIS_COLUMNS] = { FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, TRUE, /* TRUE, */ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, }; static gchar * analysis_titles[] = { N_("ROI"), N_("Data Set"), N_("Frame"), N_("Duration (s)"), N_("Midpt (s)"), N_("Gate"), N_("Gate Time (s)"), /* N_("Total"), */ N_("Median"), N_("Mean"), N_("Var"), N_("Std Dev"), N_("Min"), N_("Max"), N_("Size (mm^3)"), N_("Frac. Voxels"), N_("Voxels") }; typedef struct tb_roi_analysis_t { GtkWidget * dialog; AmitkPreferences * preferences; analysis_roi_t * roi_analyses; guint reference_count; } tb_roi_analysis_t; static void export_data(tb_roi_analysis_t * tb_roi_analysis, gboolean raw_values); static void export_analyses(const gchar * save_filename, analysis_roi_t * roi_analyses, gboolean raw_data); static gchar * analyses_as_string(analysis_roi_t * roi_analyses); static void response_cb (GtkDialog * dialog, gint response_id, gpointer data); static void destroy_cb(GtkObject * object, gpointer data); static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * delete_event, gpointer data); static void add_pages(GtkWidget * notebook, AmitkStudy * study, analysis_roi_t * roi_analyses); static void read_preferences(gboolean * all_data_sets, gboolean * all_rois, analysis_calculation_t * calculation_type, gboolean * accurate, gdouble * subfraction, gdouble * threshold_percentage, gdouble * threshold_value); static tb_roi_analysis_t * tb_roi_analysis_free(tb_roi_analysis_t * tb_roi_analysis); static tb_roi_analysis_t * tb_roi_analysis_init(void); /* function to save the generated roi statistics */ static void export_data(tb_roi_analysis_t * tb_roi_analysis, gboolean raw_data) { analysis_roi_t * temp_analyses = tb_roi_analysis->roi_analyses; GtkWidget * file_chooser; gchar * temp_string; gchar * filename = NULL; /* sanity checks */ g_return_if_fail(tb_roi_analysis->roi_analyses != NULL); file_chooser = gtk_file_chooser_dialog_new ((!raw_data) ? _("Export Statistics") : _("Export ROI Raw Data Values"), GTK_WINDOW(tb_roi_analysis->dialog), /* parent window */ GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(tb_roi_analysis->preferences, file_chooser); /* set the default directory if applicable */ /* take a guess at the filename */ filename = g_strdup_printf("%s_%s_{%s", AMITK_OBJECT_NAME(tb_roi_analysis->roi_analyses->study), raw_data ? _("roi_raw_data"): _("analysis"), AMITK_OBJECT_NAME(tb_roi_analysis->roi_analyses->roi)); temp_analyses= tb_roi_analysis->roi_analyses->next_roi_analysis; while (temp_analyses != NULL) { temp_string = g_strdup_printf("%s+%s",filename,AMITK_OBJECT_NAME(temp_analyses->roi)); g_free(filename); filename = temp_string; temp_analyses= temp_analyses->next_roi_analysis; } temp_string = g_strdup_printf("%s}.tsv",filename); g_free(filename); filename = temp_string; gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (file_chooser), filename); g_free(filename); if (gtk_dialog_run (GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) { filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (file_chooser)); export_analyses(filename, tb_roi_analysis->roi_analyses, raw_data); /* allright, save the data */ g_free (filename); } gtk_widget_destroy (file_chooser); return; } static void export_analyses(const gchar * save_filename, analysis_roi_t * roi_analyses, gboolean raw_data) { FILE * file_pointer; time_t current_time; analysis_volume_t * volume_analyses; analysis_frame_t * frame_analyses; analysis_gate_t * gate_analyses; guint frame; guint gate; guint i; amide_real_t voxel_volume; gboolean title_printed; AmitkPoint location; analysis_element_t * element; /* sanity checks */ g_return_if_fail(save_filename != NULL); if ((file_pointer = fopen(save_filename, "w")) == NULL) { g_warning(_("couldn't open: %s for writing roi data"), save_filename); return; } /* intro information */ time(¤t_time); fprintf(file_pointer, _("# %s: ROI Analysis File - generated on %s"), PACKAGE, ctime(¤t_time)); fprintf(file_pointer, "#\n"); fprintf(file_pointer, _("# Study:\t%s\n"), AMITK_OBJECT_NAME(roi_analyses->study)); fprintf(file_pointer, "#\n"); while (roi_analyses != NULL) { fprintf(file_pointer, _("# ROI:\t%s\tType:\t%s"), AMITK_OBJECT_NAME(roi_analyses->roi), amitk_roi_type_get_name(AMITK_ROI_TYPE(roi_analyses->roi))); if (AMITK_ROI_TYPE_ISOCONTOUR(roi_analyses->roi)) { if (AMITK_ROI_ISOCONTOUR_RANGE(roi_analyses->roi) == AMITK_ROI_ISOCONTOUR_RANGE_ABOVE_MIN) fprintf(file_pointer, _("\tIsocontour Above Value:\t%g"), AMITK_ROI_ISOCONTOUR_MIN_VALUE(roi_analyses->roi)); else if (AMITK_ROI_ISOCONTOUR_RANGE(roi_analyses->roi) == AMITK_ROI_ISOCONTOUR_RANGE_BELOW_MAX) fprintf(file_pointer, _("\tIsocontour Below Value:\t%g"), AMITK_ROI_ISOCONTOUR_MAX_VALUE(roi_analyses->roi)); else /* AMITK_ROI_ISOCONTOUR_RANGE_BETWEEN_MIN_MAX */ fprintf(file_pointer, _("\tIsocontour Between Values:\t%g %g"), AMITK_ROI_ISOCONTOUR_MIN_VALUE(roi_analyses->roi), AMITK_ROI_ISOCONTOUR_MAX_VALUE(roi_analyses->roi)); } fprintf(file_pointer,"\n"); if (!raw_data) { switch(roi_analyses->calculation_type) { case ALL_VOXELS: fprintf(file_pointer, _("# Calculation done with all voxels in ROI\n")); break; case HIGHEST_FRACTION_VOXELS: fprintf(file_pointer, _("# Calculation done on %5.3f percentile of voxels in ROI\n"), roi_analyses->subfraction*100); break; case VOXELS_NEAR_MAX: fprintf(file_pointer, _("# Calculation done on voxels >= %5.3f percent of maximum value in ROI\n"), roi_analyses->threshold_percentage); break; case VOXELS_GREATER_THAN_VALUE: fprintf(file_pointer, _("# Calculation done on voxels >= %g in ROI\n"), roi_analyses->threshold_value); break; default: g_error("unexpected case in %s at line %d",__FILE__, __LINE__); } } title_printed = FALSE; volume_analyses = roi_analyses->volume_analyses; while (volume_analyses != NULL) { fprintf(file_pointer, _("# Data Set:\t%s\tScaling Factor:\t%g\n"), AMITK_OBJECT_NAME(volume_analyses->data_set), AMITK_DATA_SET_SCALE_FACTOR(volume_analyses->data_set)); switch(AMITK_DATA_SET_CONVERSION(volume_analyses->data_set)) { case AMITK_CONVERSION_PERCENT_ID_PER_CC: case AMITK_CONVERSION_SUV: fprintf(file_pointer, _("# Output Data Units: %s\n"), amitk_conversion_names[AMITK_DATA_SET_CONVERSION(volume_analyses->data_set)]); fprintf(file_pointer, _("# Injected Dose: %g [%s]\n"), amitk_dose_unit_convert_to(AMITK_DATA_SET_INJECTED_DOSE(volume_analyses->data_set), AMITK_DATA_SET_DISPLAYED_DOSE_UNIT(volume_analyses->data_set)), amitk_dose_unit_names[AMITK_DATA_SET_DISPLAYED_DOSE_UNIT(volume_analyses->data_set)]); fprintf(file_pointer, _("# Cylinder Factor: %g [%s]\n"), amitk_cylinder_unit_convert_to(AMITK_DATA_SET_CYLINDER_FACTOR(volume_analyses->data_set), AMITK_DATA_SET_DISPLAYED_CYLINDER_UNIT(volume_analyses->data_set)), amitk_cylinder_unit_names[AMITK_DATA_SET_DISPLAYED_CYLINDER_UNIT(volume_analyses->data_set)]); break; default: break; } switch(AMITK_DATA_SET_CONVERSION(volume_analyses->data_set)) { case AMITK_CONVERSION_SUV: fprintf(file_pointer, _("# Subject Weight: %g [%s]\n"), amitk_weight_unit_convert_to(AMITK_DATA_SET_SUBJECT_WEIGHT(volume_analyses->data_set), AMITK_DATA_SET_DISPLAYED_WEIGHT_UNIT(volume_analyses->data_set)), amitk_weight_unit_names[AMITK_DATA_SET_DISPLAYED_WEIGHT_UNIT(volume_analyses->data_set)]); break; default: break; } if ((!raw_data) && (!title_printed)) { fprintf(file_pointer, "# %s", _(analysis_titles[COLUMN_FRAME])); for (i=COLUMN_FRAME+1;idata_set); frame_analyses = volume_analyses->frame_analyses; frame = 0; while (frame_analyses != NULL) { gate_analyses = frame_analyses->gate_analyses; gate = 0; while (gate_analyses != NULL) { if (!raw_data) { fprintf(file_pointer, " %5d", frame); fprintf(file_pointer, "\t% 12.3f", gate_analyses->duration); fprintf(file_pointer, "\t% 12.3f", gate_analyses->time_midpoint); fprintf(file_pointer, "\t% 12d", gate); fprintf(file_pointer, "\t% 12.3f", gate_analyses->gate_time); /* fprintf(file_pointer, "\t% 12g", gate_analyses->total); */ fprintf(file_pointer, "\t% 12g", gate_analyses->median); fprintf(file_pointer, "\t% 12g", gate_analyses->mean); fprintf(file_pointer, "\t% 12g", gate_analyses->var); fprintf(file_pointer, "\t% 12g", sqrt(gate_analyses->var)); fprintf(file_pointer, "\t% 12g", gate_analyses->min); fprintf(file_pointer, "\t% 12g", gate_analyses->max); fprintf(file_pointer, "\t% 12g", gate_analyses->fractional_voxels*voxel_volume); fprintf(file_pointer, "\t% 12.2f", gate_analyses->fractional_voxels); fprintf(file_pointer, "\t% 12d", gate_analyses->voxels); fprintf(file_pointer, "\n"); } else { /* raw data */ fprintf(file_pointer, "# Frame %d, Gate %d, Gate Time %5.3f\n", frame, gate,gate_analyses->gate_time); fprintf(file_pointer, "# Value\t Weight\t X (mm)\t Y (mm)\t Z (mm)\n"); for (i=0; i < gate_analyses->data_array->len; i++) { element = g_ptr_array_index(gate_analyses->data_array, i); VOXEL_TO_POINT(element->ds_voxel, AMITK_DATA_SET_VOXEL_SIZE(volume_analyses->data_set),location); location = amitk_space_s2b(AMITK_SPACE(volume_analyses->data_set), location); fprintf(file_pointer, "%12g\t%12g\t%12g\t%12g\t%12g\n", element->value, element->weight, location.x, location.y, location.z); } } gate_analyses = gate_analyses->next_gate_analysis; gate++; } frame_analyses = frame_analyses->next_frame_analysis; frame++; } volume_analyses = volume_analyses->next_volume_analysis; } roi_analyses = roi_analyses->next_roi_analysis; if (roi_analyses != NULL) fprintf(file_pointer, "#\n"); } fclose(file_pointer); return; } static gchar * analyses_as_string(analysis_roi_t * roi_analyses) { gchar * roi_stats; time_t current_time; analysis_volume_t * volume_analyses; analysis_frame_t * frame_analyses; analysis_gate_t * gate_analyses; guint frame; guint gate; guint i; amide_real_t voxel_volume; /* intro information */ time(¤t_time); roi_stats = g_strdup_printf(_("# Stats for Study: %s\tGenerated on: %s"), AMITK_OBJECT_NAME(roi_analyses->study), ctime(¤t_time)); /* print the titles */ amitk_append_str(&roi_stats,"# %-10s", _(analysis_titles[COLUMN_ROI_NAME])); amitk_append_str(&roi_stats,"\t%-12s", _(analysis_titles[COLUMN_DATA_SET_NAME])); for (i=COLUMN_DATA_SET_NAME+1;ivolume_analyses; while (volume_analyses != NULL) { voxel_volume = AMITK_DATA_SET_VOXEL_VOLUME(volume_analyses->data_set); frame_analyses = volume_analyses->frame_analyses; frame = 0; while (frame_analyses != NULL) { gate_analyses = frame_analyses->gate_analyses; gate = 0; while (gate_analyses != NULL) { amitk_append_str(&roi_stats, "%-12s\t%-12s", AMITK_OBJECT_NAME(roi_analyses->roi), AMITK_OBJECT_NAME(volume_analyses->data_set)); amitk_append_str(&roi_stats, "\t% 12d", frame); amitk_append_str(&roi_stats, "\t% 12.3f", gate_analyses->duration); amitk_append_str(&roi_stats, "\t% 12.3f", gate_analyses->time_midpoint); amitk_append_str(&roi_stats, "\t% 12d", gate); amitk_append_str(&roi_stats, "\t% 12.3f", gate_analyses->gate_time); /* amitk_append_str(&roi_stats, "\t% 12g", gate_analyses->total); */ amitk_append_str(&roi_stats, "\t% 12g", gate_analyses->median); amitk_append_str(&roi_stats, "\t% 12g", gate_analyses->mean); amitk_append_str(&roi_stats, "\t% 12g", gate_analyses->var); amitk_append_str(&roi_stats, "\t% 12g", sqrt(gate_analyses->var)); amitk_append_str(&roi_stats, "\t% 12g", gate_analyses->min); amitk_append_str(&roi_stats, "\t% 12g", gate_analyses->max); amitk_append_str(&roi_stats, "\t% 12g", gate_analyses->fractional_voxels*voxel_volume); amitk_append_str(&roi_stats, "\t% 12.2f", gate_analyses->fractional_voxels); amitk_append_str(&roi_stats, "\t% 12d\n", gate_analyses->voxels); gate_analyses = gate_analyses->next_gate_analysis; gate++; } frame_analyses = frame_analyses->next_frame_analysis; frame++; } volume_analyses = volume_analyses->next_volume_analysis; } roi_analyses = roi_analyses->next_roi_analysis; } return roi_stats; } static void response_cb (GtkDialog * dialog, gint response_id, gpointer data) { tb_roi_analysis_t * tb_roi_analysis = data; gint return_val; GtkClipboard * clipboard; gchar * roi_stats; switch(response_id) { case AMITK_RESPONSE_SAVE_AS: export_data(tb_roi_analysis, FALSE); break; case AMITK_RESPONSE_SAVE_RAW_AS: export_data(tb_roi_analysis, TRUE); break; case AMITK_RESPONSE_COPY: roi_stats = analyses_as_string(tb_roi_analysis->roi_analyses); /* fill in select/button2 clipboard (X11) */ clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); gtk_clipboard_set_text(clipboard, roi_stats, -1); /* fill in copy/paste clipboard (Win32 and Gnome) */ clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); gtk_clipboard_set_text(clipboard, roi_stats, -1); g_free(roi_stats); break; case GTK_RESPONSE_HELP: amide_call_help("roi-terms"); break; case GTK_RESPONSE_CLOSE: g_signal_emit_by_name(G_OBJECT(dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(dialog)); break; default: break; } return; } /* function called to destroy the roi analysis dialog */ static void destroy_cb(GtkObject * object, gpointer data) { tb_roi_analysis_t * tb_roi_analysis = data; tb_roi_analysis = tb_roi_analysis_free(tb_roi_analysis); return; } static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { return FALSE; } /* create one page of our notebook */ static void add_pages(GtkWidget * notebook, AmitkStudy * study, analysis_roi_t * roi_analyses) { GtkWidget * table; GtkWidget * label; GtkWidget * entry; GtkWidget * list=NULL; GtkWidget * scrolled=NULL; GtkWidget * hbox; analysis_frame_t * frame_analyses; analysis_gate_t * gate_analyses; guint frame; guint gate; guint table_row=0; amide_real_t voxel_volume; GtkListStore * store=NULL; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *selection; GtkTreeIter iter; column_t i_column; gint width; analysis_volume_t * volume_analyses; analysis_roi_t * temp_roi_analyses; gboolean dynamic_data; gboolean gated_data; gboolean static_tree_created=FALSE; gboolean display; /* check if we have dynamic/gated data */ temp_roi_analyses = roi_analyses; dynamic_data = FALSE; gated_data=FALSE; while (temp_roi_analyses != NULL) { volume_analyses = temp_roi_analyses->volume_analyses; while (volume_analyses != NULL) { if (AMITK_DATA_SET_NUM_FRAMES(volume_analyses->data_set) > 1) dynamic_data = TRUE; if (AMITK_DATA_SET_NUM_GATES(volume_analyses->data_set) > 1) gated_data = TRUE; volume_analyses = volume_analyses->next_volume_analysis; } temp_roi_analyses = temp_roi_analyses->next_roi_analysis; } while (roi_analyses != NULL) { if ((dynamic_data) || (gated_data) || (!static_tree_created)) { if ((dynamic_data) || (gated_data)) label = gtk_label_new(AMITK_OBJECT_NAME(roi_analyses->roi)); else label = gtk_label_new(_("ROI Statistics")); table = gtk_table_new(5,3,FALSE); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), table, label); hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(hbox), 0,5, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); table_row++; gtk_widget_show(hbox); if ((dynamic_data) || (gated_data)){ /* tell us the type */ label = gtk_label_new(_("type:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); entry = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry), amitk_roi_type_get_name(AMITK_ROI_TYPE(roi_analyses->roi))); gtk_editable_set_editable(GTK_EDITABLE(entry), FALSE); gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 5); } /* try to get a reasonable estimate for how wide the statistics box should be */ width = 0.9*gdk_screen_width(); if (width > ROI_STATISTICS_WIDTH) width = ROI_STATISTICS_WIDTH; /* the scroll widget which the list will go into */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,width,250); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); /* and throw the scrolled widget into the packing table */ gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(scrolled), 0,5,table_row, table_row+1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); table_row++; /* and the list itself */ store = gtk_list_store_new(NUM_ANALYSIS_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, AMITK_TYPE_TIME, AMITK_TYPE_TIME, G_TYPE_INT, AMITK_TYPE_TIME, /* AMITK_TYPE_DATA, */ AMITK_TYPE_DATA, AMITK_TYPE_DATA, AMITK_TYPE_DATA, AMITK_TYPE_DATA, AMITK_TYPE_DATA, AMITK_TYPE_DATA, AMITK_TYPE_REAL, AMITK_TYPE_REAL, G_TYPE_INT); list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); g_object_unref(store); for (i_column=0; i_columnvolume_analyses; while (volume_analyses != NULL) { frame_analyses = volume_analyses->frame_analyses; voxel_volume = AMITK_DATA_SET_VOXEL_VOLUME(volume_analyses->data_set); /* iterate over the frames */ /* note, use to also include: COLUMN_STD_ERR, sqrt(frame_analyses->var/frame_analyses->voxels) but I'm pretty sure this is not strictly corrected for a weighted standard error... And most people won't (and shouldn't) be using this value anyway, as it's not the experimental standard error. */ frame = 0; while (frame_analyses != NULL) { gate_analyses = frame_analyses->gate_analyses; gate = 0; while (gate_analyses != NULL) { gtk_list_store_append (store, &iter); /* Acquire an iterator */ gtk_list_store_set (store, &iter, COLUMN_ROI_NAME, AMITK_OBJECT_NAME(roi_analyses->roi), COLUMN_DATA_SET_NAME,AMITK_OBJECT_NAME(volume_analyses->data_set), COLUMN_FRAME, frame, COLUMN_DURATION, gate_analyses->duration, COLUMN_TIME_MIDPT, gate_analyses->time_midpoint, COLUMN_GATE, gate, COLUMN_GATE_TIME, gate_analyses->gate_time, /* COLUMN_TOTAL, gate_analyses->total, */ COLUMN_MEDIAN, gate_analyses->median, COLUMN_MEAN, gate_analyses->mean, COLUMN_VAR, gate_analyses->var, COLUMN_STD_DEV, sqrt(gate_analyses->var), COLUMN_MIN,gate_analyses->min, COLUMN_MAX,gate_analyses->max, COLUMN_SIZE,gate_analyses->fractional_voxels*voxel_volume, COLUMN_FRAC_VOXELS,gate_analyses->fractional_voxels, COLUMN_VOXELS, gate_analyses->voxels, -1); gate_analyses = gate_analyses->next_gate_analysis; gate++; } frame++; frame_analyses = frame_analyses->next_frame_analysis; } volume_analyses = volume_analyses->next_volume_analysis; } /* if we made the list on this iteration, place the widget*/ if ((dynamic_data) || (gated_data) || (!static_tree_created)) { selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); gtk_container_add(GTK_CONTAINER(scrolled),list); /* and put it in the scrolled widget */ static_tree_created = TRUE; } roi_analyses = roi_analyses->next_roi_analysis; } return; } static void read_preferences(gboolean * all_data_sets, gboolean * all_rois, analysis_calculation_t * calculation_type, gboolean * accurate, gdouble * subfraction, gdouble * threshold_percentage, gdouble * threshold_value) { *all_data_sets = amide_gconf_get_bool(GCONF_AMIDE_ANALYSIS,"CalculateAllDataSets"); *all_rois = amide_gconf_get_bool(GCONF_AMIDE_ANALYSIS,"CalculateAllRois"); *calculation_type = amide_gconf_get_int(GCONF_AMIDE_ANALYSIS,"CalculationType"); *accurate = amide_gconf_get_bool(GCONF_AMIDE_ANALYSIS,"Accurate"); *subfraction = amide_gconf_get_float(GCONF_AMIDE_ANALYSIS,"SubFraction"); *threshold_percentage = amide_gconf_get_float(GCONF_AMIDE_ANALYSIS,"ThresholdPercentage"); *threshold_value = amide_gconf_get_float(GCONF_AMIDE_ANALYSIS,"ThresholdValue"); return; } static tb_roi_analysis_t * tb_roi_analysis_free(tb_roi_analysis_t * tb_roi_analysis) { /* sanity checks */ g_return_val_if_fail(tb_roi_analysis != NULL, NULL); g_return_val_if_fail(tb_roi_analysis->reference_count > 0, NULL); /* remove a reference count */ tb_roi_analysis->reference_count--; /* things to do if we've removed all reference's */ if (tb_roi_analysis->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing tb_roi_analysis\n"); #endif if (tb_roi_analysis->preferences != NULL) { g_object_unref(tb_roi_analysis->preferences); tb_roi_analysis->preferences = NULL; } if (tb_roi_analysis->roi_analyses != NULL) { tb_roi_analysis->roi_analyses = analysis_roi_unref(tb_roi_analysis->roi_analyses); } g_free(tb_roi_analysis); tb_roi_analysis = NULL; } return tb_roi_analysis; } static tb_roi_analysis_t * tb_roi_analysis_init(void) { tb_roi_analysis_t * tb_roi_analysis; /* alloc space for the data structure for passing ui info */ if ((tb_roi_analysis = g_try_new(tb_roi_analysis_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for tb_roi_analysis_t")); return NULL; } tb_roi_analysis->reference_count = 1; tb_roi_analysis->dialog = NULL; tb_roi_analysis->preferences = NULL; tb_roi_analysis->roi_analyses = NULL; return tb_roi_analysis; } void tb_roi_analysis(AmitkStudy * study, AmitkPreferences * preferences, GtkWindow * parent) { tb_roi_analysis_t * tb_roi_analysis; GtkWidget * notebook; gchar * title; GList * rois; GList * data_sets; gboolean all_data_sets; gboolean all_rois; analysis_calculation_t calculation_type; gboolean accurate; gdouble subfraction; gdouble threshold_percentage; gdouble threshold_value; read_preferences(&all_data_sets, &all_rois, &calculation_type, &accurate, &subfraction, &threshold_percentage, &threshold_value); tb_roi_analysis = tb_roi_analysis_init(); tb_roi_analysis->preferences = g_object_ref(preferences); /* figure out which data sets we're dealing with */ if (all_data_sets) data_sets = amitk_object_get_children_of_type(AMITK_OBJECT(study), AMITK_OBJECT_TYPE_DATA_SET, TRUE); else data_sets = amitk_object_get_selected_children_of_type(AMITK_OBJECT(study), AMITK_OBJECT_TYPE_DATA_SET, AMITK_SELECTION_ANY, TRUE); if (data_sets == NULL) { g_warning(_("No Data Sets selected for calculating analyses")); return; } /* get the list of roi's we're going to be calculating over */ if (all_rois) rois = amitk_object_get_children_of_type(AMITK_OBJECT(study), AMITK_OBJECT_TYPE_ROI, TRUE); else rois = amitk_object_get_selected_children_of_type(AMITK_OBJECT(study), AMITK_OBJECT_TYPE_ROI, AMITK_SELECTION_ANY, TRUE); if (rois == NULL) { g_warning(_("No ROI's selected for calculating analyses")); amitk_objects_unref(data_sets); return; } /* calculate all our data */ tb_roi_analysis->roi_analyses = analysis_roi_init(study, rois, data_sets, calculation_type, accurate, subfraction, threshold_percentage, threshold_value); rois = amitk_objects_unref(rois); data_sets = amitk_objects_unref(data_sets); g_return_if_fail(tb_roi_analysis->roi_analyses != NULL); /* start setting up the widget we'll display the info from */ title = g_strdup_printf(_("%s Roi Analysis: Study %s"), PACKAGE, AMITK_OBJECT_NAME(study)); tb_roi_analysis->dialog = gtk_dialog_new_with_buttons(title, GTK_WINDOW(parent), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_SAVE_AS, AMITK_RESPONSE_SAVE_AS, GTK_STOCK_COPY, AMITK_RESPONSE_COPY, "Save Raw Values", AMITK_RESPONSE_SAVE_RAW_AS, GTK_STOCK_HELP, GTK_RESPONSE_HELP, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); g_free(title); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(tb_roi_analysis->dialog), "response", G_CALLBACK(response_cb), tb_roi_analysis); g_signal_connect(G_OBJECT(tb_roi_analysis->dialog), "delete_event", G_CALLBACK(delete_event_cb), tb_roi_analysis); g_signal_connect(G_OBJECT(tb_roi_analysis->dialog), "destroy", G_CALLBACK(destroy_cb), tb_roi_analysis); gtk_window_set_resizable(GTK_WINDOW(tb_roi_analysis->dialog), TRUE); /* make the widgets for this dialog box */ notebook = gtk_notebook_new(); gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), TRUE); gtk_container_set_border_width(GTK_CONTAINER(tb_roi_analysis->dialog), 10); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(tb_roi_analysis->dialog)->vbox), notebook); /* add the data pages */ add_pages(notebook, study, tb_roi_analysis->roi_analyses); /* and show all our widgets */ gtk_widget_show_all(tb_roi_analysis->dialog); return; } static void radio_buttons_cb(GtkWidget * widget, gpointer data); static void subfraction_precentage_cb(GtkWidget * widget, gpointer data); static void threshold_percentage_cb(GtkWidget * widget, gpointer data); static void threshold_value_cb(GtkWidget * widget, gpointer data); static void radio_buttons_cb(GtkWidget * widget, gpointer data) { gboolean all_data_sets; gboolean all_rois; all_data_sets = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "all_data_sets")); all_rois = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "all_rois")); amide_gconf_set_bool(GCONF_AMIDE_ANALYSIS,"CalculateAllDataSets",all_data_sets); amide_gconf_set_bool(GCONF_AMIDE_ANALYSIS,"CalculateAllRois",all_rois); return; } static void calculation_type_cb(GtkWidget * widget, gpointer data) { analysis_calculation_t calculation_type; GtkWidget * spin_buttons[3]; calculation_type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "calculation_type")); spin_buttons[0] = g_object_get_data(G_OBJECT(widget), "spin_button_0"); spin_buttons[1] = g_object_get_data(G_OBJECT(widget), "spin_button_1"); spin_buttons[2] = g_object_get_data(G_OBJECT(widget), "spin_button_2"); gtk_widget_set_sensitive(spin_buttons[0], calculation_type == HIGHEST_FRACTION_VOXELS); gtk_widget_set_sensitive(spin_buttons[1], calculation_type == VOXELS_NEAR_MAX); gtk_widget_set_sensitive(spin_buttons[2], calculation_type == VOXELS_GREATER_THAN_VALUE); amide_gconf_set_int(GCONF_AMIDE_ANALYSIS,"CalculationType", calculation_type); } static void accurate_cb(GtkWidget * widget, gpointer data) { amide_gconf_set_bool(GCONF_AMIDE_ANALYSIS,"Accurate", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))); return; } static void subfraction_precentage_cb(GtkWidget * widget, gpointer data) { gdouble subfraction; subfraction = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget))/100.0; amide_gconf_set_float(GCONF_AMIDE_ANALYSIS,"SubFraction", subfraction); return; } static void threshold_percentage_cb(GtkWidget * widget, gpointer data) { gdouble threshold_percentage; threshold_percentage = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); amide_gconf_set_float(GCONF_AMIDE_ANALYSIS,"ThresholdPercentage", threshold_percentage); return; } static void threshold_value_cb(GtkWidget * widget, gpointer data) { gdouble threshold_value; threshold_value = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); amide_gconf_set_float(GCONF_AMIDE_ANALYSIS,"ThresholdValue", threshold_value); return; } /* function to setup a dialog to allow us to choice options for rendering */ GtkWidget * tb_roi_analysis_init_dialog(GtkWindow * parent) { GtkWidget * tb_roi_init_dialog; gchar * temp_string; GtkWidget * table; GtkWidget * label; guint table_row; GtkWidget * radio_button[4]; GtkWidget * hseparator; GtkObject * adjustment; GtkWidget * spin_buttons[3]; GtkWidget * check_button; analysis_calculation_t i_calculation_type; gboolean all_data_sets; gboolean all_rois; analysis_calculation_t calculation_type; gboolean accurate; gdouble subfraction; gdouble threshold_percentage; gdouble threshold_value; read_preferences(&all_data_sets, &all_rois, &calculation_type, &accurate, &subfraction, &threshold_percentage, &threshold_value); temp_string = g_strdup_printf(_("%s: ROI Analysis Initialization Dialog"), PACKAGE); tb_roi_init_dialog = gtk_dialog_new_with_buttons (temp_string, parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CLOSE, GTK_STOCK_EXECUTE, AMITK_RESPONSE_EXECUTE, NULL); gtk_window_set_title(GTK_WINDOW(tb_roi_init_dialog), temp_string); g_free(temp_string); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(tb_roi_init_dialog), "response", G_CALLBACK(ui_common_init_dialog_response_cb), NULL); gtk_container_set_border_width(GTK_CONTAINER(tb_roi_init_dialog), 10); /* start making the widgets for this dialog box */ table = gtk_table_new(5,3,FALSE); table_row=0; gtk_container_add(GTK_CONTAINER(GTK_DIALOG(tb_roi_init_dialog)->vbox), table); label = gtk_label_new(_("Calculate:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); label = gtk_label_new(_("All ROIS:")); gtk_table_attach(GTK_TABLE(table), label, 1,2, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); label = gtk_label_new(_("Selected ROIS:")); gtk_table_attach(GTK_TABLE(table), label, 2,3, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("On All Data Sets:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); radio_button[0] = gtk_radio_button_new(NULL); gtk_table_attach(GTK_TABLE(table), radio_button[0], 1,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[0]), "all_data_sets", GINT_TO_POINTER(TRUE)); g_object_set_data(G_OBJECT(radio_button[0]), "all_rois", GINT_TO_POINTER(TRUE)); radio_button[1] = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(radio_button[0])); gtk_table_attach(GTK_TABLE(table), radio_button[1], 2,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[1]), "all_data_sets", GINT_TO_POINTER(TRUE)); g_object_set_data(G_OBJECT(radio_button[1]), "all_rois", GINT_TO_POINTER(FALSE)); table_row++; label = gtk_label_new(_("On Selected Data Sets:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); radio_button[2] = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(radio_button[0])); gtk_table_attach(GTK_TABLE(table), radio_button[2], 1,2, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[2]), "all_data_sets", GINT_TO_POINTER(FALSE)); g_object_set_data(G_OBJECT(radio_button[2]), "all_rois", GINT_TO_POINTER(TRUE)); radio_button[3] = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(radio_button[0])); gtk_table_attach(GTK_TABLE(table), radio_button[3], 2,3, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[3]), "all_data_sets", GINT_TO_POINTER(FALSE)); g_object_set_data(G_OBJECT(radio_button[3]), "all_rois", GINT_TO_POINTER(FALSE)); table_row++; if (all_data_sets && all_rois) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[0]), TRUE); else if (all_data_sets && !all_rois) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[1]), TRUE); else if (!all_data_sets && all_rois) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[2]), TRUE); else /* !all_data_sets && !all_rois */ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[3]), TRUE); g_signal_connect(G_OBJECT(radio_button[0]), "clicked", G_CALLBACK(radio_buttons_cb), NULL); g_signal_connect(G_OBJECT(radio_button[1]), "clicked", G_CALLBACK(radio_buttons_cb), NULL); g_signal_connect(G_OBJECT(radio_button[2]), "clicked", G_CALLBACK(radio_buttons_cb), NULL); g_signal_connect(G_OBJECT(radio_button[3]), "clicked", G_CALLBACK(radio_buttons_cb), NULL); /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(table), hseparator, 0,3,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* do we want to calculate over a subfraction */ label = gtk_label_new(_("Calculate over all voxels (normal):")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); radio_button[0] = gtk_radio_button_new(NULL); gtk_table_attach(GTK_TABLE(table), radio_button[0], 1,2,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[0]), "calculation_type", GINT_TO_POINTER(ALL_VOXELS)); table_row++; /* do we want to calculate over a subfraction */ label = gtk_label_new(_("Calculate over % highest voxels:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); radio_button[1] = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(radio_button[0])); gtk_table_attach(GTK_TABLE(table), radio_button[1], 1,2,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[1]), "calculation_type", GINT_TO_POINTER(HIGHEST_FRACTION_VOXELS)); adjustment = gtk_adjustment_new(100.0*subfraction, 0.0, 100.0,1.0, 1.0, 0.0); spin_buttons[0] = gtk_spin_button_new(GTK_ADJUSTMENT(adjustment), 1.0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_buttons[0]),FALSE); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(spin_buttons[0]), FALSE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_buttons[0]), FALSE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin_buttons[0]), GTK_UPDATE_ALWAYS); g_signal_connect(G_OBJECT(spin_buttons[0]), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); g_signal_connect(G_OBJECT(spin_buttons[0]), "value_changed", G_CALLBACK(subfraction_precentage_cb), NULL); gtk_table_attach(GTK_TABLE(table), spin_buttons[0], 2,3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_set_sensitive(spin_buttons[0], calculation_type == HIGHEST_FRACTION_VOXELS); table_row++; /* do we want to calculate over a percentage of max */ label = gtk_label_new(_("Calculate for voxels >= % of Max:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); radio_button[2] = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(radio_button[0])); gtk_table_attach(GTK_TABLE(table), radio_button[2], 1,2,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[2]), "calculation_type", GINT_TO_POINTER(VOXELS_NEAR_MAX)); adjustment = gtk_adjustment_new(threshold_percentage, 0.0, 100.0,1.0, 1.0, 0.0); spin_buttons[1] = gtk_spin_button_new(GTK_ADJUSTMENT(adjustment), 1.0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_buttons[1]),FALSE); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(spin_buttons[1]), FALSE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_buttons[1]), FALSE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin_buttons[1]), GTK_UPDATE_ALWAYS); g_signal_connect(G_OBJECT(spin_buttons[1]), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); g_signal_connect(G_OBJECT(spin_buttons[1]), "value_changed", G_CALLBACK(threshold_percentage_cb), NULL); gtk_table_attach(GTK_TABLE(table), spin_buttons[1], 2,3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_set_sensitive(spin_buttons[1], calculation_type == VOXELS_NEAR_MAX); table_row++; /* do we want to calculate over a percentage of max */ label = gtk_label_new(_("Calculate for voxels >= Value:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); radio_button[3] = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(radio_button[0])); gtk_table_attach(GTK_TABLE(table), radio_button[3], 1,2,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[3]), "calculation_type", GINT_TO_POINTER(VOXELS_GREATER_THAN_VALUE)); spin_buttons[2] = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_buttons[2]), threshold_value); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_buttons[2]),FALSE); gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(spin_buttons[2]), FALSE); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_buttons[2]), FALSE); gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin_buttons[2]), GTK_UPDATE_ALWAYS); g_signal_connect(G_OBJECT(spin_buttons[2]), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); g_signal_connect(G_OBJECT(spin_buttons[2]), "value_changed", G_CALLBACK(threshold_value_cb), NULL); gtk_table_attach(GTK_TABLE(table), spin_buttons[2], 2,3, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_set_sensitive(spin_buttons[2], calculation_type == VOXELS_GREATER_THAN_VALUE); table_row++; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[calculation_type]), TRUE); for (i_calculation_type=0; i_calculation_type < NUM_CALCULATION_TYPES; i_calculation_type++) { g_object_set_data(G_OBJECT(radio_button[i_calculation_type]), "spin_button_0", spin_buttons[0]); g_object_set_data(G_OBJECT(radio_button[i_calculation_type]), "spin_button_1", spin_buttons[1]); g_object_set_data(G_OBJECT(radio_button[i_calculation_type]), "spin_button_2", spin_buttons[2]); g_signal_connect(G_OBJECT(radio_button[i_calculation_type]), "clicked", G_CALLBACK(calculation_type_cb), NULL); } /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(table), hseparator, 0,3,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* do we want more accurate quantitation */ check_button = gtk_check_button_new_with_label(_("More Accurate Quantitation (Slow)")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button), accurate); gtk_table_attach(GTK_TABLE(table), check_button, 0,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(accurate_cb), tb_roi_init_dialog); table_row++; /* and show all our widgets */ gtk_widget_show_all(tb_roi_init_dialog); return tb_roi_init_dialog; } amide-1.0.5/src/amitk_study.c0000664000175000017500000012013212270273755015747 0ustar loeningloening/* amitk_study.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include #include #include #include #include /* for g_mkdir */ #include "amitk_study.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" #include "legacy.h" enum { FILENAME_CHANGED, THICKNESS_CHANGED, TIME_CHANGED, CANVAS_VISIBLE_CHANGED, VIEW_MODE_CHANGED, CANVAS_TARGET_CHANGED, VOXEL_DIM_OR_ZOOM_CHANGED, FOV_CHANGED, FUSE_TYPE_CHANGED, VIEW_CENTER_CHANGED, CANVAS_ROI_PREFERENCE_CHANGED, CANVAS_GENERAL_PREFERENCE_CHANGED, CANVAS_TARGET_PREFERENCE_CHANGED, CANVAS_LAYOUT_PREFERENCE_CHANGED, PANEL_LAYOUT_PREFERENCE_CHANGED, LAST_SIGNAL }; static gchar * blank_name = N_("new"); static void study_class_init (AmitkStudyClass *klass); static void study_init (AmitkStudy *study); static void study_finalize (GObject *object); static AmitkObject * study_copy (const AmitkObject *object); static void study_copy_in_place (AmitkObject * dest_object, const AmitkObject * src_object); static void study_write_xml (const AmitkObject *object, xmlNodePtr nodes, FILE *study_file); static gchar * study_read_xml (AmitkObject *object, xmlNodePtr nodes, FILE *study_file, gchar *error_buf); static void study_recalc_voxel_dim (AmitkStudy *study); static void study_add_child (AmitkObject *object, AmitkObject *child); static void study_remove_child (AmitkObject *object, AmitkObject *child); static AmitkObjectClass * parent_class; static guint study_signals[LAST_SIGNAL]; GType amitk_study_get_type(void) { static GType study_type = 0; if (!study_type) { static const GTypeInfo study_info = { sizeof (AmitkStudyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) study_class_init, (GClassFinalizeFunc) NULL, NULL, /* class_data */ sizeof (AmitkStudy), 0, /* n_preallocs */ (GInstanceInitFunc) study_init, NULL /* value table */ }; study_type = g_type_register_static (AMITK_TYPE_OBJECT, "AmitkStudy", &study_info, 0); } return study_type; } static void study_class_init (AmitkStudyClass * class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); AmitkObjectClass * object_class = AMITK_OBJECT_CLASS(class); parent_class = g_type_class_peek_parent(class); object_class->object_copy = study_copy; object_class->object_copy_in_place = study_copy_in_place; object_class->object_write_xml = study_write_xml; object_class->object_read_xml = study_read_xml; object_class->object_add_child = study_add_child; object_class->object_remove_child = study_remove_child; gobject_class->finalize = study_finalize; study_signals[FILENAME_CHANGED] = g_signal_new ("filename_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, filename_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[THICKNESS_CHANGED] = g_signal_new ("thickness_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, thickness_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[TIME_CHANGED] = g_signal_new ("time_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, time_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[CANVAS_VISIBLE_CHANGED] = g_signal_new ("canvas_visible_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, canvas_visible_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[VIEW_MODE_CHANGED] = g_signal_new ("view_mode_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, view_mode_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[CANVAS_TARGET_CHANGED] = g_signal_new ("canvas_target_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, canvas_target_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[VOXEL_DIM_OR_ZOOM_CHANGED] = g_signal_new ("voxel_dim_or_zoom_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, voxel_dim_or_zoom_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[FOV_CHANGED] = g_signal_new ("fov_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, fov_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[FUSE_TYPE_CHANGED] = g_signal_new ("fuse_type_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, fuse_type_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[VIEW_CENTER_CHANGED] = g_signal_new ("view_center_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, view_center_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[CANVAS_ROI_PREFERENCE_CHANGED] = g_signal_new ("canvas_roi_preference_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, canvas_roi_preference_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[CANVAS_GENERAL_PREFERENCE_CHANGED] = g_signal_new ("canvas_general_preference_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, canvas_general_preference_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[CANVAS_TARGET_PREFERENCE_CHANGED] = g_signal_new ("canvas_target_preference_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, canvas_target_preference_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[CANVAS_LAYOUT_PREFERENCE_CHANGED] = g_signal_new ("canvas_layout_preference_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, canvas_layout_preference_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); study_signals[PANEL_LAYOUT_PREFERENCE_CHANGED] = g_signal_new ("panel_layout_preference_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkStudyClass, panel_layout_preference_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); } static void study_init (AmitkStudy * study) { time_t current_time; AmitkView i_view; study->filename = NULL; /* view parameters */ study->view_center = zero_point; study->view_thickness = 1.0; study->view_start_time = 0.0; study->view_duration = 1.0; study->zoom = 1.0; study->fov = 100.0; study->fuse_type = AMITK_FUSE_TYPE_BLEND; study->view_mode = AMITK_VIEW_MODE_SINGLE; study->voxel_dim = 1.0; study->voxel_dim_valid=FALSE; for (i_view=0; i_viewcanvas_visible[i_view] = TRUE; study->canvas_target = FALSE; /* preferences for the canvas */ study->canvas_roi_width = AMITK_PREFERENCES_DEFAULT_CANVAS_ROI_WIDTH; #ifdef AMIDE_LIBGNOMECANVAS_AA study->canvas_roi_transparency = AMITK_PREFERENCES_DEFAULT_CANVAS_ROI_TRANSPARENCY; #else study->canvas_line_style = AMITK_PREFERENCES_DEFAULT_CANVAS_LINE_STYLE; study->canvas_fill_roi = AMITK_PREFERENCES_DEFAULT_CANVAS_FILL_ROI; #endif study->canvas_layout = AMITK_PREFERENCES_DEFAULT_CANVAS_LAYOUT; study->canvas_maintain_size = AMITK_PREFERENCES_DEFAULT_CANVAS_LAYOUT; study->canvas_target_empty_area = AMITK_PREFERENCES_DEFAULT_CANVAS_TARGET_EMPTY_AREA; study->panel_layout = AMITK_PREFERENCES_DEFAULT_PANEL_LAYOUT; /* line profile stuff */ study->line_profile = amitk_line_profile_new(); /* set the creation date as today */ study->creation_date = NULL; time(¤t_time); amitk_study_set_creation_date(study, ctime(¤t_time)); g_strdelimit(study->creation_date, "\n", ' '); /* turns newlines to white space */ g_strstrip(study->creation_date); /* removes trailing and leading white space */ return; } static void study_finalize (GObject * object) { AmitkStudy * study = AMITK_STUDY(object); if (study->creation_date != NULL) { g_free(study->creation_date); study->creation_date = NULL; } if (study->filename != NULL) { g_free(study->filename); study->filename = NULL; } if (study->line_profile != NULL) { g_object_unref(study->line_profile); study->line_profile = NULL; } G_OBJECT_CLASS (parent_class)->finalize (object); } static AmitkObject * study_copy (const AmitkObject * object) { AmitkStudy * copy; g_return_val_if_fail(AMITK_IS_STUDY(object), NULL); copy = amitk_study_new(NULL); amitk_object_copy_in_place(AMITK_OBJECT(copy), object); return AMITK_OBJECT(copy); } static void study_copy_in_place(AmitkObject * dest_object, const AmitkObject * src_object) { AmitkStudy * dest_study; AmitkView i_view; g_return_if_fail(AMITK_IS_STUDY(src_object)); g_return_if_fail(AMITK_IS_STUDY(dest_object)); dest_study = AMITK_STUDY(dest_object); amitk_study_set_creation_date(dest_study, AMITK_STUDY_CREATION_DATE(src_object)); dest_study->view_center = AMITK_STUDY(src_object)->view_center; amitk_study_set_view_thickness(dest_study, AMITK_STUDY_VIEW_THICKNESS(src_object)); dest_study->view_start_time = AMITK_STUDY_VIEW_START_TIME(src_object); dest_study->view_duration = AMITK_STUDY_VIEW_DURATION(src_object); dest_study->zoom = AMITK_STUDY_ZOOM(src_object); dest_study->fov = AMITK_STUDY_FOV(src_object); dest_study->fuse_type = AMITK_STUDY_FUSE_TYPE(src_object); dest_study->view_mode = AMITK_STUDY_VIEW_MODE(src_object); dest_study->canvas_target = AMITK_STUDY_CANVAS_TARGET(src_object); for (i_view=0; i_viewcanvas_visible[i_view] = AMITK_STUDY_CANVAS_VISIBLE(src_object, i_view); /* preferences */ dest_study->canvas_roi_width = AMITK_STUDY_CANVAS_ROI_WIDTH(src_object); #ifdef AMIDE_LIBGNOMECANVAS_AA dest_study->canvas_roi_transparency = AMITK_STUDY_CANVAS_ROI_TRANSPARENCY(src_object); #else dest_study->canvas_line_style = AMITK_STUDY_CANVAS_LINE_STYLE(src_object); dest_study->canvas_fill_roi = AMITK_STUDY_CANVAS_FILL_ROI(src_object); #endif dest_study->canvas_layout = AMITK_STUDY_CANVAS_LAYOUT(src_object); dest_study->canvas_maintain_size = AMITK_STUDY_CANVAS_MAINTAIN_SIZE(src_object); dest_study->canvas_target_empty_area = AMITK_STUDY_CANVAS_TARGET_EMPTY_AREA(src_object); dest_study->panel_layout = AMITK_STUDY_PANEL_LAYOUT(src_object); /* line profile */ amitk_line_profile_copy_in_place(dest_study->line_profile, AMITK_STUDY_LINE_PROFILE(src_object)); /* make a separate copy in memory of the study's name and filename */ amitk_study_set_filename(dest_study, AMITK_STUDY_FILENAME(src_object)); AMITK_OBJECT_CLASS (parent_class)->object_copy_in_place (dest_object, src_object); } static void study_write_xml(const AmitkObject * object,xmlNodePtr nodes, FILE *study_file) { AmitkStudy * study; AmitkView i_view; gchar * temp_string; AMITK_OBJECT_CLASS(parent_class)->object_write_xml(object, nodes, study_file); study = AMITK_STUDY(object); xml_save_string(nodes, "creation_date", AMITK_STUDY_CREATION_DATE(study)); amitk_point_write_xml(nodes, "view_center", AMITK_STUDY_VIEW_CENTER(study)); xml_save_real(nodes, "view_thickness", AMITK_STUDY_VIEW_THICKNESS(study)); xml_save_time(nodes, "view_start_time", AMITK_STUDY_VIEW_START_TIME(study)); xml_save_time(nodes, "view_duration", AMITK_STUDY_VIEW_DURATION(study)); xml_save_real(nodes, "zoom", AMITK_STUDY_ZOOM(study)); xml_save_real(nodes, "fov", AMITK_STUDY_FOV(study)); xml_save_string(nodes, "fuse_type", amitk_fuse_type_get_name(AMITK_STUDY_FUSE_TYPE(study))); xml_save_string(nodes, "view_mode", amitk_view_mode_get_name(AMITK_STUDY_VIEW_MODE(study))); for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view++) { temp_string = g_strdup_printf("%s_canvas_visible", amitk_view_get_name(i_view)); xml_save_boolean(nodes, temp_string, AMITK_STUDY_CANVAS_VISIBLE(study, i_view)); g_free(temp_string); } xml_save_boolean(nodes, "canvas_target", AMITK_STUDY_CANVAS_TARGET(study)); /* preferences */ xml_save_int(nodes, "canvas_roi_width", AMITK_STUDY_CANVAS_ROI_WIDTH(study)); #ifdef AMIDE_LIBGNOMECANVAS_AA xml_save_real(nodes, "canvas_roi_transparency", AMITK_STUDY_CANVAS_ROI_TRANSPARENCY(study)); #else xml_save_int(nodes, "canvas_line_style", AMITK_STUDY_CANVAS_LINE_STYLE(study)); xml_save_int(nodes, "canvas_fill_roi", AMITK_STUDY_CANVAS_FILL_ROI(study)); #endif xml_save_string(nodes, "canvas_layout", amitk_layout_get_name(AMITK_STUDY_CANVAS_LAYOUT(study))); xml_save_boolean(nodes, "canvas_maintain_size", AMITK_STUDY_CANVAS_MAINTAIN_SIZE(study)); xml_save_int(nodes, "canvas_target_empty_area", AMITK_STUDY_CANVAS_TARGET_EMPTY_AREA(study)); xml_save_string(nodes, "panel_layout", amitk_panel_layout_get_name(AMITK_STUDY_PANEL_LAYOUT(study))); return; } static gchar * study_read_xml(AmitkObject * object, xmlNodePtr nodes, FILE * study_file, gchar * error_buf) { AmitkStudy * study; gchar * creation_date; AmitkFuseType i_fuse_type; AmitkViewMode i_view_mode; gchar * temp_string; AmitkView i_view; AmitkLayout i_layout; AmitkPanelLayout i_panel_layout; gboolean all_false; error_buf = AMITK_OBJECT_CLASS(parent_class)->object_read_xml(object, nodes, study_file, error_buf); study = AMITK_STUDY(object); creation_date = xml_get_string(nodes, "creation_date"); amitk_study_set_creation_date(study, creation_date); g_free(creation_date); /* get our view parameters */ amitk_study_set_view_center(study, amitk_point_read_xml(nodes, "view_center", &error_buf)); amitk_study_set_view_thickness(study, xml_get_real(nodes, "view_thickness", &error_buf)); amitk_study_set_view_start_time(study, xml_get_time(nodes, "view_start_time", &error_buf)); amitk_study_set_view_duration(study, xml_get_time(nodes, "view_duration", &error_buf)); amitk_study_set_zoom(study, xml_get_real(nodes, "zoom", &error_buf)); if (xml_node_exists(nodes, "fov")) amitk_study_set_fov(study, xml_get_real(nodes, "fov", &error_buf)); amitk_study_set_canvas_target(study, xml_get_boolean(nodes, "canvas_target", &error_buf)); /* preferences */ amitk_study_set_canvas_roi_width(study, xml_get_int_with_default(nodes, "canvas_roi_width", AMITK_STUDY_CANVAS_ROI_WIDTH(study))); #ifdef AMIDE_LIBGNOMECANVAS_AA amitk_study_set_canvas_roi_transparency(study, xml_get_real_with_default(nodes, "canvas_roi_transparency", AMITK_STUDY_CANVAS_ROI_TRANSPARENCY(study))); #else amitk_study_set_canvas_line_style(study, xml_get_int_with_default(nodes, "canvas_line_style", AMITK_STUDY_CANVAS_LINE_STYLE(study))); if (xml_node_exists(nodes, "canvas_fill_isocontour")) /* legacy */ amitk_study_set_canvas_fill_roi(study, xml_get_int_with_default(nodes, "canvas_fill_isocontour", AMITK_STUDY_CANVAS_FILL_ROI(study))); else amitk_study_set_canvas_fill_roi(study, xml_get_int_with_default(nodes, "canvas_fill_roi", AMITK_STUDY_CANVAS_FILL_ROI(study))); #endif amitk_study_set_canvas_maintain_size(study, xml_get_boolean_with_default(nodes, "canvas_maintain_size", AMITK_STUDY_CANVAS_MAINTAIN_SIZE(study))); amitk_study_set_canvas_target_empty_area(study, xml_get_int_with_default(nodes, "canvas_target_empty_area", AMITK_STUDY_CANVAS_TARGET_EMPTY_AREA(study))); /* get layout */ temp_string = xml_get_string(nodes, "canvas_layout"); if (temp_string != NULL) { for (i_layout=0; i_layout < AMITK_LAYOUT_NUM; i_layout++) if (g_ascii_strcasecmp(temp_string, amitk_layout_get_name(i_layout)) == 0) amitk_study_set_canvas_layout(study, i_layout); g_free(temp_string); } /* get panel layout */ temp_string = xml_get_string(nodes, "panel_layout"); if (temp_string != NULL) { for (i_panel_layout=0; i_panel_layout < AMITK_PANEL_LAYOUT_NUM; i_panel_layout++) if (g_ascii_strcasecmp(temp_string, amitk_panel_layout_get_name(i_panel_layout)) == 0) amitk_study_set_panel_layout(study, i_panel_layout); g_free(temp_string); } /* sanity check */ if (AMITK_STUDY_ZOOM(study) < EPSILON) { amitk_append_str_with_newline(&error_buf,_("inappropriate zoom (%5.3f) for study, reseting to 1.0"), AMITK_STUDY_ZOOM(study)); amitk_study_set_zoom(study, 1.0); } /* figure out the fuse type */ temp_string = xml_get_string(nodes, "fuse_type"); if (temp_string != NULL) { for (i_fuse_type=0; i_fuse_type < AMITK_FUSE_TYPE_NUM; i_fuse_type++) if (g_ascii_strcasecmp(temp_string, amitk_fuse_type_get_name(i_fuse_type)) == 0) amitk_study_set_fuse_type(study, i_fuse_type); g_free(temp_string); } /* figure out the view mode */ temp_string = xml_get_string(nodes, "view_mode"); if (temp_string != NULL) { for (i_view_mode=0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) if (g_ascii_strcasecmp(temp_string, amitk_view_mode_get_name(i_view_mode)) == 0) amitk_study_set_view_mode(study, i_view_mode); g_free(temp_string); } /* figure out which canvases are visible */ for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view++) { temp_string = g_strdup_printf("%s_canvas_visible", amitk_view_get_name(i_view)); study->canvas_visible[i_view] = xml_get_boolean(nodes, temp_string, &error_buf); g_free(temp_string); } /* ---- legacy cruft ---- */ /* canvas_"view"_visible added previous to amide 0.7.7, set all to TRUE if none set */ all_false = TRUE; for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view++) { all_false = all_false && !AMITK_STUDY_CANVAS_VISIBLE(study, i_view); } if (all_false) for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view++) study->canvas_visible[i_view] = TRUE; return error_buf; } static void set_voxel_dim_and_zoom(AmitkStudy * study, amide_real_t voxel_dim, amide_real_t zoom) { study->zoom = zoom; study->voxel_dim = voxel_dim; study->voxel_dim_valid=TRUE; g_signal_emit(G_OBJECT(study), study_signals[VOXEL_DIM_OR_ZOOM_CHANGED], 0); } static void study_recalc_voxel_dim(AmitkStudy * study) { amide_real_t voxel_dim; amide_real_t zoom; if (AMITK_OBJECT_CHILDREN(study) == NULL) return; /* no children, no voxel dim to recalculate */ voxel_dim = amitk_data_sets_get_max_min_voxel_size(AMITK_OBJECT_CHILDREN(study)); if (AMITK_STUDY_VOXEL_DIM_VALID(study) && !REAL_EQUAL(voxel_dim,AMITK_STUDY_VOXEL_DIM(study))) { /* update the zoom conservatively, so the canvas pixel size stays equal or gets smaller */ if (voxel_dim < AMITK_STUDY_VOXEL_DIM(study)) zoom = AMITK_STUDY_ZOOM(study)*voxel_dim/AMITK_STUDY_VOXEL_DIM(study); else zoom = AMITK_STUDY_ZOOM(study); set_voxel_dim_and_zoom(study, voxel_dim, zoom); } else { set_voxel_dim_and_zoom(study, voxel_dim,AMITK_STUDY_ZOOM(study)); } return; } static void study_add_child(AmitkObject *object, AmitkObject *child) { if (AMITK_IS_DATA_SET(child)) { /* if this is for the first dataset added, get a reasonable view center */ if (!amitk_objects_has_type(AMITK_OBJECT_CHILDREN(object), AMITK_OBJECT_TYPE_DATA_SET, TRUE)) amitk_study_set_view_center(AMITK_STUDY(object), amitk_volume_get_center(AMITK_VOLUME(child))); } /* run the parent class function so added child is in the object's child list */ AMITK_OBJECT_CLASS(parent_class)->object_add_child (object, child); /* keep the minimum voxel dimension accurate */ if (AMITK_IS_DATA_SET(child)) { study_recalc_voxel_dim(AMITK_STUDY(object)); g_signal_connect_swapped(G_OBJECT(child), "voxel_size_changed", G_CALLBACK(study_recalc_voxel_dim), object); } return; } static void study_remove_child(AmitkObject *object, AmitkObject *child) { gboolean data_set = FALSE; if (AMITK_IS_DATA_SET(child)) { data_set = TRUE; /* need to know now, child might get unrefed before recalc */ g_signal_handlers_disconnect_by_func(G_OBJECT(child), G_CALLBACK(study_recalc_voxel_dim), object); } AMITK_OBJECT_CLASS(parent_class)->object_remove_child (object, child); if (data_set) study_recalc_voxel_dim(AMITK_STUDY(object)); return; } AmitkStudy * amitk_study_new (AmitkPreferences * preferences) { AmitkStudy * study; study = g_object_new(amitk_study_get_type(), NULL); amitk_object_set_name(AMITK_OBJECT(study), blank_name); if (preferences != NULL) { study->canvas_roi_width = AMITK_PREFERENCES_CANVAS_ROI_WIDTH(preferences); #ifdef AMIDE_LIBGNOMECANVAS_AA study->canvas_roi_transparency = AMITK_PREFERENCES_CANVAS_ROI_TRANSPARENCY(preferences); #else study->canvas_line_style = AMITK_PREFERENCES_CANVAS_LINE_STYLE(preferences); study->canvas_fill_roi = AMITK_PREFERENCES_CANVAS_FILL_ROI(preferences); #endif study->canvas_layout = AMITK_PREFERENCES_CANVAS_LAYOUT(preferences); study->canvas_maintain_size = AMITK_PREFERENCES_CANVAS_MAINTAIN_SIZE(preferences); study->canvas_target_empty_area = AMITK_PREFERENCES_CANVAS_TARGET_EMPTY_AREA(preferences); study->panel_layout = AMITK_PREFERENCES_PANEL_LAYOUT(preferences); } return study; } /* sets the filename of a study */ void amitk_study_set_filename(AmitkStudy * study, const gchar * new_filename) { gchar * temp_string; g_return_if_fail(AMITK_IS_STUDY(study)); g_free(study->filename); /* free up the memory used by the old filename */ study->filename = NULL; if (new_filename == NULL) return; temp_string = g_strdup(new_filename); /* and assign the new name */ /* and remove any trailing slashes */ g_strreverse(temp_string); if (strchr(temp_string, '/') == temp_string) { study->filename = g_strdup(temp_string+1); g_free(temp_string); } else { study->filename=temp_string; } g_strreverse(study->filename); g_signal_emit(G_OBJECT(study), study_signals[FILENAME_CHANGED], 0); return; } void amitk_study_suggest_name(AmitkStudy * study, const gchar * suggested_name) { g_return_if_fail(AMITK_IS_STUDY(study)); if (suggested_name == 0) return; if (strlen(suggested_name) == 0) return; if ((AMITK_OBJECT_NAME(study) == NULL) || (g_strcmp0(AMITK_OBJECT_NAME(study), "") == 0) || (g_ascii_strncasecmp(blank_name, AMITK_OBJECT_NAME(study), strlen(AMITK_OBJECT_NAME(study))) == 0)) amitk_object_set_name(AMITK_OBJECT(study), suggested_name); return; } /* sets the date of a study note: no error checking of the date is currently done. */ void amitk_study_set_creation_date(AmitkStudy * study, const gchar * new_date) { g_return_if_fail(AMITK_IS_STUDY(study)); g_free(study->creation_date); /* free up the memory used by the old creation date */ study->creation_date = g_strdup(new_date); /* and assign the new name */ return; } /* new_center should be in the base coordinate space */ void amitk_study_set_view_center(AmitkStudy * study, const AmitkPoint new_center) { AmitkPoint temp; g_return_if_fail(AMITK_IS_STUDY(study)); temp = amitk_space_b2s(AMITK_SPACE(study), new_center); if (!POINT_EQUAL(study->view_center, temp)) { study->view_center = temp; g_signal_emit(G_OBJECT(study), study_signals[VIEW_CENTER_CHANGED], 0); } return; } /* refuses bad choices for thickness */ void amitk_study_set_view_thickness(AmitkStudy * study, const amide_real_t new_thickness) { amide_real_t min_voxel_size; amide_real_t temp; g_return_if_fail(AMITK_IS_STUDY(study)); min_voxel_size = amitk_data_sets_get_min_voxel_size(AMITK_OBJECT_CHILDREN(study)); if (min_voxel_size < 0) temp = new_thickness; else if (new_thickness < min_voxel_size) temp = min_voxel_size; else temp = new_thickness; if (!REAL_EQUAL(study->view_thickness, temp)) { study->view_thickness = temp; g_signal_emit(G_OBJECT(study), study_signals[THICKNESS_CHANGED], 0); } return; } void amitk_study_set_view_start_time (AmitkStudy * study, const amide_time_t new_start) { g_return_if_fail(AMITK_IS_STUDY(study)); if (!REAL_EQUAL(study->view_start_time, new_start)) { study->view_start_time = new_start; g_signal_emit(G_OBJECT(study), study_signals[TIME_CHANGED], 0); } return; } void amitk_study_set_view_duration (AmitkStudy * study, const amide_time_t new_duration) { g_return_if_fail(AMITK_IS_STUDY(study)); if (!REAL_EQUAL(study->view_duration, new_duration)) { study->view_duration = new_duration; g_signal_emit(G_OBJECT(study), study_signals[TIME_CHANGED], 0); } return; } void amitk_study_set_fuse_type(AmitkStudy * study, const AmitkFuseType new_fuse_type) { g_return_if_fail(AMITK_IS_STUDY(study)); if (study->fuse_type != new_fuse_type) { study->fuse_type = new_fuse_type; g_signal_emit(G_OBJECT(study), study_signals[FUSE_TYPE_CHANGED], 0); } return; } void amitk_study_set_view_mode(AmitkStudy * study, const AmitkViewMode new_view_mode) { g_return_if_fail(AMITK_IS_STUDY(study)); if (study->view_mode != new_view_mode) { study->view_mode = new_view_mode; g_signal_emit(G_OBJECT(study), study_signals[VIEW_MODE_CHANGED], 0); } return; } /* note, at least one canvas has to remain visible at all times, function won't set visible to FALSE for a canvas if this condition will not be met */ void amitk_study_set_canvas_visible(AmitkStudy * study, const AmitkView view, const gboolean visible) { AmitkView i_view; gboolean one_visible; g_return_if_fail(AMITK_IS_STUDY(study)); /* make sure one canvas will remain visible */ one_visible = FALSE; for (i_view = 0; i_view < AMITK_VIEW_NUM; i_view ++) { if (i_view == view) one_visible = one_visible || visible; else one_visible = one_visible || AMITK_STUDY_CANVAS_VISIBLE(study, i_view); } if (!one_visible) return; if (AMITK_STUDY_CANVAS_VISIBLE(study, view) != visible) { study->canvas_visible[view] = visible; g_signal_emit(G_OBJECT(study), study_signals[CANVAS_VISIBLE_CHANGED], 0); } return; } void amitk_study_set_zoom(AmitkStudy * study, const amide_real_t new_zoom) { g_return_if_fail(AMITK_IS_STUDY(study)); if (!REAL_EQUAL(AMITK_STUDY_ZOOM(study), new_zoom)) set_voxel_dim_and_zoom(study, AMITK_STUDY_VOXEL_DIM(study), new_zoom); return; } void amitk_study_set_fov(AmitkStudy * study, const amide_real_t new_fov) { g_return_if_fail(AMITK_IS_STUDY(study)); if (!REAL_EQUAL(AMITK_STUDY_FOV(study), new_fov)) { study->fov = new_fov; g_signal_emit(G_OBJECT(study), study_signals[FOV_CHANGED],0); } return; } void amitk_study_set_canvas_target(AmitkStudy * study, const gboolean always_on) { g_return_if_fail(AMITK_IS_STUDY(study)); if (AMITK_STUDY_CANVAS_TARGET(study) != always_on) { study->canvas_target = always_on; g_signal_emit(G_OBJECT(study), study_signals[CANVAS_TARGET_CHANGED], 0); } return; } void amitk_study_set_canvas_roi_width(AmitkStudy * study, gint roi_width) { g_return_if_fail(AMITK_IS_STUDY(study)); if (roi_width < AMITK_PREFERENCES_MIN_ROI_WIDTH) roi_width = AMITK_PREFERENCES_MIN_ROI_WIDTH; if (roi_width > AMITK_PREFERENCES_MAX_ROI_WIDTH) roi_width = AMITK_PREFERENCES_MAX_ROI_WIDTH; if (AMITK_STUDY_CANVAS_ROI_WIDTH(study) != roi_width) { study->canvas_roi_width = roi_width; g_signal_emit(G_OBJECT(study), study_signals[CANVAS_ROI_PREFERENCE_CHANGED], 0); } return; } #ifdef AMIDE_LIBGNOMECANVAS_AA void amitk_study_set_canvas_roi_transparency(AmitkStudy * study, const gdouble transparency) { g_return_if_fail(AMITK_IS_STUDY(study)); g_return_if_fail(transparency >= 0.0); g_return_if_fail(transparency <= 1.0); if (AMITK_STUDY_CANVAS_ROI_TRANSPARENCY(study) != transparency) { study->canvas_roi_transparency = transparency; g_signal_emit(G_OBJECT(study), study_signals[CANVAS_ROI_PREFERENCE_CHANGED], 0); } return; } #else void amitk_study_set_canvas_line_style(AmitkStudy * study, const GdkLineStyle line_style){ g_return_if_fail(AMITK_IS_STUDY(study)); if (AMITK_STUDY_CANVAS_LINE_STYLE(study) != line_style) { study->canvas_line_style = line_style; g_signal_emit(G_OBJECT(study), study_signals[CANVAS_ROI_PREFERENCE_CHANGED], 0); } return; } void amitk_study_set_canvas_fill_roi(AmitkStudy * study, const gboolean fill_roi){ g_return_if_fail(AMITK_IS_STUDY(study)); if (AMITK_STUDY_CANVAS_FILL_ROI(study) != fill_roi) { study->canvas_fill_roi = fill_roi; g_signal_emit(G_OBJECT(study), study_signals[CANVAS_ROI_PREFERENCE_CHANGED], 0); } return; } #endif void amitk_study_set_canvas_layout(AmitkStudy * study, const AmitkLayout layout) { g_return_if_fail(AMITK_IS_STUDY(study)); if (AMITK_STUDY_CANVAS_LAYOUT(study) != layout) { study->canvas_layout = layout; g_signal_emit(G_OBJECT(study), study_signals[CANVAS_LAYOUT_PREFERENCE_CHANGED], 0); } return; } void amitk_study_set_canvas_maintain_size(AmitkStudy * study, const gboolean maintain_size){ g_return_if_fail(AMITK_IS_STUDY(study)); if (AMITK_STUDY_CANVAS_MAINTAIN_SIZE(study) != maintain_size) { study->canvas_maintain_size = maintain_size; g_signal_emit(G_OBJECT(study), study_signals[CANVAS_GENERAL_PREFERENCE_CHANGED], 0); } return; } void amitk_study_set_canvas_target_empty_area(AmitkStudy * study, gint target_empty_area){ g_return_if_fail(AMITK_IS_STUDY(study)); /* sanity checks */ if (target_empty_area < AMITK_PREFERENCES_MIN_TARGET_EMPTY_AREA) target_empty_area = AMITK_PREFERENCES_MIN_TARGET_EMPTY_AREA; if (target_empty_area > AMITK_PREFERENCES_MAX_TARGET_EMPTY_AREA) target_empty_area = AMITK_PREFERENCES_MAX_TARGET_EMPTY_AREA; if (AMITK_STUDY_CANVAS_TARGET_EMPTY_AREA(study) != target_empty_area) { study->canvas_target_empty_area = target_empty_area; g_signal_emit(G_OBJECT(study), study_signals[CANVAS_TARGET_PREFERENCE_CHANGED], 0); } return; } void amitk_study_set_panel_layout(AmitkStudy * study, const AmitkPanelLayout panel_layout) { g_return_if_fail(AMITK_IS_STUDY(study)); if (AMITK_STUDY_PANEL_LAYOUT(study) != panel_layout) { study->panel_layout = panel_layout; g_signal_emit(G_OBJECT(study), study_signals[PANEL_LAYOUT_PREFERENCE_CHANGED], 0); } return; } /* try to recover a corrupted file */ AmitkStudy * amitk_study_recover_xml(const gchar * study_filename, AmitkPreferences * preferences) { AmitkStudy * study = NULL; AmitkObject * recovered_object; gchar * error_buf=NULL; FILE * study_file=NULL; guint64 size, counter, start_location=0, end_location=0; gint returned_char; gboolean have_start_location; if (amitk_is_xif_directory(study_filename, NULL, NULL)) { g_warning("Recover function only works with XIF flat files, not XIF directories"); return NULL; } /* open her on up */ if ((study_file = fopen(study_filename, "rb")) == NULL) { g_warning(_("Couldn't open file %s\n"), study_filename); return NULL; } have_start_location = FALSE; counter = 0; while ((returned_char = fgetc(study_file)) != EOF) { /* find the start of the amide xml object */ if (!have_start_location) { if (returned_char == amide_data_file_xml_start_tag[counter]) { if (counter == 0) start_location = ftell(study_file)-1; counter++; if (counter == strlen(amide_data_file_xml_start_tag)) { /* we've got the start of an object */ counter = 0; have_start_location = TRUE; } } else { counter = 0; } /* work on finding the end of the amide xml object */ } else { if (returned_char == amide_data_file_xml_end_tag[counter]) { counter++; if (counter == strlen(amide_data_file_xml_end_tag)) { counter = 0; /* back the start location to include the xml tag*/ start_location -= strlen(amide_data_file_xml_tag)+3; /* read in object */ end_location = ftell(study_file); size = end_location-start_location+1; recovered_object = amitk_object_read_xml(NULL, study_file, start_location, size, &error_buf); if (recovered_object != NULL) { if (!AMITK_IS_STUDY(recovered_object)) { if (study == NULL) study = amitk_study_new(preferences); amitk_object_add_child(AMITK_OBJECT(study), recovered_object); } amitk_object_unref(recovered_object); } /* return to the current spot in the file */ fseek(study_file, end_location,SEEK_SET); have_start_location = FALSE; } } else { counter = 0; } } } /* display accumulated warning messages */ if (error_buf != NULL) { amitk_append_str_with_newline(&error_buf, ""); amitk_append_str_with_newline(&error_buf, _("The above warnings may arise because portions of the XIF")); amitk_append_str_with_newline(&error_buf, _("file were corrupted.")); g_warning("%s",error_buf); g_free(error_buf); } /* remember the name of the file/directory for convience */ if (study != NULL) amitk_study_set_filename(study, study_filename); return study; } /* function to load in a study from disk in xml format */ AmitkStudy * amitk_study_load_xml(const gchar * study_filename) { AmitkStudy * study; gchar * old_dir=NULL; gchar * load_filename=NULL; gchar * error_buf=NULL; gboolean xif_directory=FALSE; gboolean legacy1=FALSE; FILE * study_file=NULL; guint64 location_le, size_le; guint64 location, size; /* are we dealing with a xif directory */ if (amitk_is_xif_directory(study_filename, &legacy1, &load_filename)) { xif_directory=TRUE; /* switch into our new directory */ old_dir = g_get_current_dir(); if (chdir(study_filename) != 0) { g_warning(_("Couldn't change directories in loading study")); return NULL; } } else if (amitk_is_xif_flat_file(study_filename, &location_le, &size_le)){ /* flat file */ if ((study_file = fopen(study_filename, "rb")) == NULL) { g_warning(_("Couldn't open file %s\n"), study_filename); return NULL; } } else { g_warning("Not a XIF study file: %s\n", study_filename); return NULL; } location = GUINT64_FROM_LE(location_le); size = GUINT64_FROM_LE(size_le); /* sanity check */ if ((((location == 0) || (size == 0))) && !xif_directory) { g_warning(_("File is corrupt. The file may have been incompletely saved. You can attempt recovering the file by using the recover function under the file menu.")); return NULL; } /* load in the study */ if (legacy1) study = legacy_load_xml(&error_buf); else study = AMITK_STUDY(amitk_object_read_xml(load_filename, study_file, location, size, &error_buf)); if (load_filename != NULL) g_free(load_filename); if (study_file != NULL) fclose(study_file); /* display accumulated warning messages */ if (error_buf != NULL) { amitk_append_str_with_newline(&error_buf, ""); amitk_append_str_with_newline(&error_buf, _("The above warnings most likely indicate changes to the")); amitk_append_str_with_newline(&error_buf, _("XIF file format, please resave the data as soon as possible.")); g_warning("%s",error_buf); g_free(error_buf); } /* remember the name of the file/directory for convience */ if (study != NULL) amitk_study_set_filename(study, study_filename); if (xif_directory) { /* and return to the old directory */ if (chdir(old_dir) != 0) { g_warning(_("Couldn't return to previous directory in load study")); if (study != NULL) study = amitk_object_unref(study); } g_free(old_dir); } return study; } /* function to writeout the study to disk in an xif file */ gboolean amitk_study_save_xml(AmitkStudy * study, const gchar * study_filename, gboolean save_as_directory) { gchar * old_dir=NULL; struct stat file_info; gchar * temp_string; DIR * directory; struct dirent * directory_entry; guint64 location, size; guint64 location_le, size_le; FILE * study_file=NULL; /* see if the filename already exists, remove stuff if needed */ if (stat(study_filename, &file_info) == 0) { /* and start deleting everything in the filename/directory */ if (S_ISDIR(file_info.st_mode)) { directory = opendir(study_filename); while ((directory_entry = readdir(directory)) != NULL) { temp_string = g_strdup_printf("%s%s%s", study_filename,G_DIR_SEPARATOR_S, directory_entry->d_name); if ((g_pattern_match_simple("*.xml",directory_entry->d_name)) || (g_pattern_match_simple("*.dat",directory_entry->d_name))) if (unlink(temp_string) != 0) g_warning(_("Couldn't unlink file: %s"),temp_string); g_free(temp_string); } if (!save_as_directory) /* get rid of the directory too if we're overwriting with a file*/ if (rmdir(study_filename) != 0) { g_warning(_("Couldn't remove directory: %s"), study_filename); return FALSE; } } else if (S_ISREG(file_info.st_mode)) { if (unlink(study_filename) != 0) { g_warning(_("Couldn't unlink file: %s"),study_filename); return FALSE; } } else { g_warning(_("Unrecognized file type for file: %s, couldn't delete"),study_filename); return FALSE; } } if (save_as_directory) { if (stat(study_filename, &file_info) != 0) { /* make the directory if needed */ if (g_mkdir(study_filename, 0766) != 0) { g_warning(_("Couldn't create amide directory: %s"),study_filename); return FALSE; } } } /* remember the name of the xif file/directory of this study */ amitk_study_set_filename(study, study_filename); /* get into the output directory/create output file */ if (save_as_directory) { old_dir = g_get_current_dir(); if (chdir(study_filename) != 0) { g_warning(_("Couldn't change directories in writing study, study not saved")); return FALSE; } } else { /* flat file */ if ((study_file = fopen(study_filename, "wb")) == NULL) { g_warning(_("Couldn't open file %s\n"), study_filename); return FALSE; } fprintf(study_file, "%s Version %s", AMITK_FLAT_FILE_MAGIC_STRING, AMITK_FILE_VERSION); fseek(study_file, 64+2*sizeof(guint64), SEEK_SET); } /* save the study */ amitk_object_write_xml(AMITK_OBJECT(study), study_file, NULL, &location, &size); if (save_as_directory) { if (chdir(old_dir) != 0) { g_warning(_("Couldn't return to previous directory in load study")); study = amitk_object_unref(study); } } else { /* flat file */ /* record location of study object xml, always little endian */ fseek(study_file, 64, SEEK_SET); location_le = GUINT64_TO_LE(location); size_le = GUINT64_TO_LE(size); fwrite(&location_le, 1, sizeof(guint64), study_file); fwrite(&size_le, 1, sizeof(guint64), study_file); fclose(study_file); } return TRUE; } const gchar * amitk_fuse_type_get_name(const AmitkFuseType fuse_type) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_FUSE_TYPE); enum_value = g_enum_get_value(enum_class, fuse_type); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_view_mode_get_name(const AmitkViewMode view_mode) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_VIEW_MODE); enum_value = g_enum_get_value(enum_class, view_mode); g_type_class_unref(enum_class); return enum_value->value_nick; } amide-1.0.5/src/tb_distance.c0000664000175000017500000002733712270274013015672 0ustar loeningloening/* tb_distance.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2012-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include "amide.h" #include "amitk_tree_view.h" gchar * explanation_text = N_("To make a distance measurement, pick two objects (fiducial marks or ROIs). " "For ROIs, the distance measurement will be with respect to the center of " "the ROI."); typedef struct tb_distance_t { GtkWidget * dialog; GtkTextBuffer * result_text_buffer; GtkWidget * tree_view1; GtkWidget * tree_view2; AmitkObject * object1; AmitkObject * object2; guint reference_count; } tb_distance_t; static tb_distance_t * tb_distance_free(tb_distance_t * tb_distance); static tb_distance_t * tb_distance_init(void); static void corner_changed_cb(gpointer unused1, AmitkPoint * unused2, gpointer data); static void space_changed_cb(gpointer unused, gpointer data); static void update_result_text(tb_distance_t * tb_distance); static void update_objects(tb_distance_t * tb_distance); static void tree_view_activate_object(GtkWidget * tree_view, AmitkObject * object, gpointer data); static void destroy_cb(GtkObject * object, gpointer data); static void response_cb (GtkDialog * dialog, gint response_id, gpointer data); static tb_distance_t * tb_distance_free(tb_distance_t * tb_distance) { /* sanity checks */ g_return_val_if_fail(tb_distance != NULL, NULL); g_return_val_if_fail(tb_distance->reference_count > 0, NULL); /* remove a reference count */ tb_distance->reference_count--; /* things to do if we've removed all references */ if (tb_distance->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing tb_distance\n"); #endif if (tb_distance->object1 != NULL) { if (AMITK_IS_ROI(tb_distance->object1)) g_signal_handlers_disconnect_by_func(G_OBJECT(tb_distance->object1), corner_changed_cb, tb_distance); g_signal_handlers_disconnect_by_func(G_OBJECT(tb_distance->object1), space_changed_cb, tb_distance); amitk_object_unref(tb_distance->object1); tb_distance->object1 = NULL; } if (tb_distance->object2 != NULL) { if (AMITK_IS_ROI(tb_distance->object2)) g_signal_handlers_disconnect_by_func(G_OBJECT(tb_distance->object2), corner_changed_cb, tb_distance); g_signal_handlers_disconnect_by_func(G_OBJECT(tb_distance->object2), space_changed_cb, tb_distance); amitk_object_unref(tb_distance->object2); tb_distance->object2 = NULL; } g_free(tb_distance); tb_distance = NULL; } return tb_distance; } static tb_distance_t * tb_distance_init(void) { tb_distance_t * tb_distance; if ((tb_distance = g_try_new(tb_distance_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for tb_distance_t")); return NULL; } tb_distance->reference_count=1; tb_distance->object1 = NULL; tb_distance->object2 = NULL; return tb_distance; } static void corner_changed_cb(gpointer unused1, AmitkPoint * unused2, gpointer data) { tb_distance_t * tb_distance = data; update_result_text(tb_distance); return; } static void space_changed_cb(gpointer unused, gpointer data) { tb_distance_t * tb_distance = data; update_result_text(tb_distance); return; } static void update_result_text(tb_distance_t * tb_distance) { AmitkPoint point1; AmitkPoint point2; amide_real_t distance; gchar * temp_string; if ((tb_distance->object1 == NULL) || (tb_distance->object2 == NULL) || (tb_distance->object1 == tb_distance->object2)) { gtk_text_buffer_set_text (tb_distance->result_text_buffer, _(explanation_text), -1); } else { /* allright, have two good objects, let's calculate distance */ if (AMITK_IS_ROI(tb_distance->object1)) point1 = amitk_volume_get_center(AMITK_VOLUME(tb_distance->object1)); else /* is fiducial */ point1 = AMITK_FIDUCIAL_MARK_GET(tb_distance->object1); if (AMITK_IS_ROI(tb_distance->object2)) point2 = amitk_volume_get_center(AMITK_VOLUME(tb_distance->object2)); else /* is fiducial */ point2 = AMITK_FIDUCIAL_MARK_GET(tb_distance->object2); distance = point_mag(point_sub(point1, point2)); temp_string = g_strdup_printf("Point1: %s\nPoint2: %s\nDistance %5.3f (mm)", AMITK_OBJECT_NAME(tb_distance->object1), AMITK_OBJECT_NAME(tb_distance->object2), distance); gtk_text_buffer_set_text(tb_distance->result_text_buffer, temp_string, -1); g_free(temp_string); } } static void update_objects(tb_distance_t * tb_distance) { AmitkObject * object; /* unref prior objects */ if (tb_distance->object1 != NULL) { if (AMITK_IS_ROI(tb_distance->object1)) g_signal_handlers_disconnect_by_func(G_OBJECT(tb_distance->object1), corner_changed_cb, tb_distance); g_signal_handlers_disconnect_by_func(G_OBJECT(tb_distance->object1), space_changed_cb, tb_distance); tb_distance->object1=amitk_object_unref(tb_distance->object1); } if (tb_distance->object2 != NULL) { if (AMITK_IS_ROI(tb_distance->object2)) g_signal_handlers_disconnect_by_func(G_OBJECT(tb_distance->object2), corner_changed_cb, tb_distance); g_signal_handlers_disconnect_by_func(G_OBJECT(tb_distance->object2), space_changed_cb, tb_distance); tb_distance->object2=amitk_object_unref(tb_distance->object2); } /* reference the new objects */ object = amitk_tree_view_get_active_object(AMITK_TREE_VIEW(tb_distance->tree_view1)); if (object != NULL) if ((AMITK_IS_ROI(object) || AMITK_IS_FIDUCIAL_MARK(object))) { tb_distance->object1=amitk_object_ref(object); if (AMITK_IS_VOLUME(object)) g_signal_connect_after(G_OBJECT(object), "volume_corner_changed", G_CALLBACK(corner_changed_cb), tb_distance); g_signal_connect_after(G_OBJECT(object), "space_changed", G_CALLBACK(space_changed_cb), tb_distance); } object = amitk_tree_view_get_active_object(AMITK_TREE_VIEW(tb_distance->tree_view2)); if (object != NULL) if ((AMITK_IS_ROI(object) || AMITK_IS_FIDUCIAL_MARK(object))) { tb_distance->object2=amitk_object_ref(object); if (AMITK_IS_VOLUME(object)) g_signal_connect_after(G_OBJECT(object), "volume_corner_changed", G_CALLBACK(corner_changed_cb), tb_distance); g_signal_connect_after(G_OBJECT(object), "space_changed", G_CALLBACK(space_changed_cb), tb_distance); } update_result_text(tb_distance); return; } static void tree_view_activate_object(GtkWidget * tree_view, AmitkObject * object, gpointer data) { tb_distance_t * tb_distance = data; if (AMITK_IS_ROI(object) || AMITK_IS_FIDUCIAL_MARK(object)) amitk_tree_view_set_active_object(AMITK_TREE_VIEW(tree_view), object); else amitk_tree_view_set_active_object(AMITK_TREE_VIEW(tree_view), NULL); update_objects(tb_distance); } static void destroy_cb(GtkObject * object, gpointer data) { tb_distance_t * tb_distance = data; tb_distance = tb_distance_free(tb_distance); return; } static void response_cb (GtkDialog * dialog, gint response_id, gpointer data) { switch(response_id) { case GTK_RESPONSE_CANCEL: gtk_widget_destroy(GTK_WIDGET(dialog)); break; default: break; } return; } void tb_distance(AmitkStudy * study, GtkWindow * parent_window) { GtkWidget * table; GtkWidget * label; GtkWidget * scrolled; GtkWidget * text_view; guint table_row=0; tb_distance_t * tb_distance; tb_distance = tb_distance_init(); tb_distance->dialog = gtk_dialog_new_with_buttons(_("Distance Measurement Tool"), parent_window, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); g_signal_connect(G_OBJECT(tb_distance->dialog), "destroy", G_CALLBACK(destroy_cb), tb_distance); g_signal_connect(G_OBJECT(tb_distance->dialog), "response", G_CALLBACK(response_cb), tb_distance); gtk_window_set_resizable(GTK_WINDOW(tb_distance->dialog), TRUE); /* make the widgets for this dialog box */ table = gtk_table_new(2,3,FALSE); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(tb_distance->dialog)->vbox), table); label = gtk_label_new(_("Starting Point")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); label = gtk_label_new(_("Ending Point")); gtk_table_attach(GTK_TABLE(table), label, 1,2, table_row,table_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* make the starting point tree view */ tb_distance->tree_view1 = amitk_tree_view_new(AMITK_TREE_VIEW_MODE_SINGLE_SELECTION,NULL, NULL); amitk_tree_view_set_study(AMITK_TREE_VIEW(tb_distance->tree_view1), study); amitk_tree_view_expand_object(AMITK_TREE_VIEW(tb_distance->tree_view1), AMITK_OBJECT(study)); g_signal_connect(G_OBJECT(tb_distance->tree_view1), "activate_object", G_CALLBACK(tree_view_activate_object), tb_distance); /* and a scrolled area for the tree */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,250,250); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), tb_distance->tree_view1); gtk_table_attach(GTK_TABLE(table), scrolled, 0,1, table_row, table_row+1,GTK_FILL, GTK_FILL | GTK_EXPAND, X_PADDING, Y_PADDING); /* and make the ending point tree view */ tb_distance->tree_view2 = amitk_tree_view_new(AMITK_TREE_VIEW_MODE_SINGLE_SELECTION,NULL, NULL); amitk_tree_view_set_study(AMITK_TREE_VIEW(tb_distance->tree_view2), study); amitk_tree_view_expand_object(AMITK_TREE_VIEW(tb_distance->tree_view2), AMITK_OBJECT(study)); g_signal_connect(G_OBJECT(tb_distance->tree_view2), "activate_object", G_CALLBACK(tree_view_activate_object), tb_distance); /* and a scrolled area for the tree */ scrolled = gtk_scrolled_window_new(NULL,NULL); gtk_widget_set_size_request(scrolled,250,250); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), tb_distance->tree_view2); gtk_table_attach(GTK_TABLE(table), scrolled, 1,2, table_row, table_row+1,GTK_FILL, GTK_FILL | GTK_EXPAND, X_PADDING, Y_PADDING); table_row++; /* and finally, the result buffer */ text_view = gtk_text_view_new(); tb_distance->result_text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view)); update_result_text(tb_distance); gtk_table_attach(GTK_TABLE(table), text_view, 0,2, table_row,table_row+1, FALSE,FALSE, X_PADDING, Y_PADDING); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text_view), GTK_WRAP_WORD); gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), FALSE); gtk_widget_set_size_request(text_view,400,-1); table_row++; gtk_widget_show_all(GTK_WIDGET(tb_distance->dialog)); /* needed, as the process of showing selects an object in the tree view */ amitk_tree_view_set_active_object(AMITK_TREE_VIEW(tb_distance->tree_view1), NULL); /* make sure nothing selected */ amitk_tree_view_set_active_object(AMITK_TREE_VIEW(tb_distance->tree_view2), NULL); /* make sure nothing selected */ return; } amide-1.0.5/src/amitk_object_dialog.h0000664000175000017500000000723312270274561017373 0ustar loeningloening/* amitk_object_dialog.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* adapated from gtkcolorsel.h */ #ifndef __AMITK_OBJECT_DIALOG_H__ #define __AMITK_OBJECT_DIALOG_H__ /* includes we always need with this widget */ #include #include #include "amitk_object.h" #include "amitk_data_set.h" G_BEGIN_DECLS /* ------------- Threshold---------- */ #define AMITK_TYPE_OBJECT_DIALOG (amitk_object_dialog_get_type ()) #define AMITK_OBJECT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AMITK_TYPE_OBJECT_DIALOG, AmitkObjectDialog)) #define AMITK_OBJECT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_THESHOLD, AmitkObjectDialogClass)) #define AMITK_IS_OBJECT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AMITK_TYPE_OBJECT_DIALOG)) #define AMITK_IS_OBJECT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_OBJECT_DIALOG)) typedef struct _AmitkObjectDialog AmitkObjectDialog; typedef struct _AmitkObjectDialogClass AmitkObjectDialogClass; struct _AmitkObjectDialog { GtkDialog parent; AmitkObject * object; AmitkObject * original_object; gboolean aspect_ratio; GtkWidget * name_entry; GtkWidget * roi_type_menu; GtkWidget * scan_date_entry; GtkWidget * subject_name_entry; GtkWidget * subject_id_entry; GtkWidget * subject_dob_entry; GtkWidget * modality_menu; GtkWidget * subject_orientation_menu; GtkWidget * subject_sex_menu; GtkWidget * scaling_factor_spin; GtkWidget * dose_spin; GtkWidget * dose_unit_menu; GtkWidget * weight_spin; GtkWidget * weight_unit_menu; GtkWidget * cylinder_spin; GtkWidget * cylinder_unit_menu; GtkWidget * creation_date_entry; GtkWidget * interpolation_button[AMITK_INTERPOLATION_NUM]; GtkWidget * rendering_menu; GtkWidget * conversion_button[AMITK_CONVERSION_NUM]; GtkWidget * center_spin[AMITK_AXIS_NUM]; GtkWidget * voxel_size_spin[AMITK_AXIS_NUM]; GtkWidget * dimension_spin[AMITK_AXIS_NUM]; GtkWidget * start_spin; GtkWidget * * duration_spins; GtkWidget * * gate_spins; GtkWidget * isocontour_min_value_entry; GtkWidget * isocontour_max_value_entry; GtkWidget * voxel_dim_entry; /* study preferences */ GtkWidget * roi_width_spin; GnomeCanvasItem * roi_item; #ifdef AMIDE_LIBGNOMECANVAS_AA GtkWidget * roi_transparency_spin; #else GtkWidget * line_style_menu; GtkWidget * fill_roi_button; #endif GtkWidget * layout_button1; GtkWidget * layout_button2; GtkWidget * panel_layout_button1; GtkWidget * panel_layout_button2; GtkWidget * panel_layout_button3; GtkWidget * maintain_size_button; GtkWidget * target_size_spin; }; struct _AmitkObjectDialogClass { GtkDialogClass parent_class; }; GType amitk_object_dialog_get_type (void); GtkWidget* amitk_object_dialog_new (AmitkObject * object); G_END_DECLS #endif /* __AMITK_OBJECT_DIALOG_H__ */ amide-1.0.5/src/pixmaps.c0000664000175000017500000001472012270274002015062 0ustar loeningloening/* pixmaps.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amitk_data_set.h" #include "amitk_study.h" #include "../pixmaps/amide_logo.h" #include "../pixmaps/interpolation_nearest_neighbor.h" #include "../pixmaps/interpolation_trilinear.h" #include "../pixmaps/transfer_function.h" #include "../pixmaps/fuse_type_blend.h" #include "../pixmaps/fuse_type_overlay.h" #include "../pixmaps/target.h" #include "../pixmaps/view_transverse.h" #include "../pixmaps/view_coronal.h" #include "../pixmaps/view_sagittal.h" #include "../pixmaps/view_single.h" #include "../pixmaps/view_linked.h" #include "../pixmaps/view_linked3.h" #include "../pixmaps/thresholding.h" #include "../pixmaps/thresholding_per_slice.h" #include "../pixmaps/thresholding_per_frame.h" #include "../pixmaps/thresholding_interpolate_frames.h" #include "../pixmaps/thresholding_global.h" #include "../pixmaps/threshold_style_min_max.h" #include "../pixmaps/threshold_style_center_width.h" /* #include "../pixmaps/window_bone_icon.h" */ /* #include "../pixmaps/window_soft_tissue_icon.h" */ #include "../pixmaps/window_abdomen.h" #include "../pixmaps/window_brain.h" #include "../pixmaps/window_extremities.h" #include "../pixmaps/window_liver.h" #include "../pixmaps/window_lung.h" #include "../pixmaps/window_pelvis_soft_tissue.h" #include "../pixmaps/window_skull_base.h" #include "../pixmaps/window_spine_a.h" #include "../pixmaps/window_spine_b.h" #include "../pixmaps/window_thorax_soft_tissue.h" #include "../pixmaps/roi_box.h" #include "../pixmaps/roi_cylinder.h" #include "../pixmaps/roi_ellipsoid.h" #include "../pixmaps/roi_isocontour_2d.h" #include "../pixmaps/roi_isocontour_3d.h" #include "../pixmaps/roi_freehand_2d.h" #include "../pixmaps/roi_freehand_3d.h" #include "../pixmaps/align_pt.h" #include "../pixmaps/study.h" #include "../pixmaps/layout_linear.h" #include "../pixmaps/layout_orthogonal.h" #include "../pixmaps/panels_mixed.h" #include "../pixmaps/panels_linear_x.h" #include "../pixmaps/panels_linear_y.h" static gboolean icons_initialized=FALSE; static struct { const guint8 * pixbuf_inline; const gchar * icon_id; } amide_icons[] = { { amide_logo, "amide_icon_logo" }, { align_pt, "amide_icon_align_pt" }, { fuse_type_blend, "amide_icon_fuse_type_blend" }, { fuse_type_overlay, "amide_icon_fuse_type_overlay" }, { interpolation_nearest_neighbor, "amide_icon_interpolation_nearest_neighbor" }, { interpolation_trilinear, "amide_icon_interpolation_trilinear" }, { layout_linear, "amide_icon_layout_linear" }, { layout_orthogonal, "amide_icon_layout_orthogonal" }, { panels_mixed, "amide_icon_panels_mixed" }, { panels_linear_x, "amide_icon_panels_linear_x" }, { panels_linear_y, "amide_icon_panels_linear_y" }, { roi_box, "amide_icon_roi_box" }, { roi_cylinder, "amide_icon_roi_cylinder" }, { roi_ellipsoid, "amide_icon_roi_ellipsoid" }, { roi_isocontour_2d, "amide_icon_roi_isocontour_2d"}, { roi_isocontour_3d, "amide_icon_roi_isocontour_3d"}, { roi_freehand_2d, "amide_icon_roi_freehand_2d"}, { roi_freehand_3d, "amide_icon_roi_freehand_3d"}, { study, "amide_icon_study"}, { target, "amide_icon_canvas_target" }, { transfer_function, "amide_icon_transfer_function" }, { threshold_style_min_max, "amide_icon_threshold_style_min_max" }, { threshold_style_center_width, "amide_icon_threshold_style_center_width" }, { thresholding, "amide_icon_thresholding" }, { thresholding_per_slice, "amide_icon_thresholding_per_slice" }, { thresholding_per_frame, "amide_icon_thresholding_per_frame" }, { thresholding_interpolate_frames, "amide_icon_thresholding_interpolate_frames" }, { thresholding_global, "amide_icon_thresholding_global" }, { view_transverse, "amide_icon_view_transverse" }, { view_coronal, "amide_icon_view_coronal" }, { view_sagittal, "amide_icon_view_sagittal" }, { view_single, "amide_icon_view_mode_single" }, { view_linked, "amide_icon_view_mode_linked_2way" }, { view_linked3, "amide_icon_view_mode_linked_3way" }, { window_abdomen, "amide_icon_window_abdomen" }, { window_brain, "amide_icon_window_brain" }, { window_extremities,"amide_icon_window_extremities" }, { window_liver,"amide_icon_window_window_liver" }, { window_lung,"amide_icon_window_lung" }, { window_pelvis_soft_tissue,"amide_icon_window_pelvis_soft_tissue" }, { window_skull_base,"amide_icon_window_skull_base"}, { window_spine_a,"amide_icon_window_spine_a"}, { window_spine_b,"amide_icon_window_spine_b"}, { window_thorax_soft_tissue,"amide_icon_window_soft_tissue"}, }; const gchar * windowing_icons[AMITK_WINDOW_NUM] = { "amide_icon_window_abdomen", "amide_icon_window_brain", "amide_icon_window_extremities", "amide_icon_window_window_liver", "amide_icon_window_lung", "amide_icon_window_pelvis_soft_tissue", "amide_icon_window_skull_base", "amide_icon_window_spine_a", "amide_icon_window_spine_b", "amide_icon_window_soft_tissue", }; // amide_icon_window_bone, // amide_icon_window_soft_tissue_icon void pixmaps_initialize_icons() { GtkIconFactory *icon_factory; GtkIconSet *icon_set; GdkPixbuf * pixbuf; gint i; if (icons_initialized) return; /* create amide's group of icons */ icon_factory = gtk_icon_factory_new(); for (i=0; i < G_N_ELEMENTS(amide_icons); i++) { pixbuf = gdk_pixbuf_new_from_inline(-1, amide_icons[i].pixbuf_inline, FALSE, NULL); icon_set = gtk_icon_set_new_from_pixbuf(pixbuf); g_object_unref(pixbuf); gtk_icon_factory_add (icon_factory, amide_icons[i].icon_id, icon_set); gtk_icon_set_unref (icon_set); } /* add this group of icon's to the list of icon's GTK will search for AMIDE */ gtk_icon_factory_add_default (icon_factory); g_object_unref (icon_factory); icons_initialized=TRUE; return; } amide-1.0.5/src/amitk_color_table.h0000664000175000017500000000575312270274574017104 0ustar loeningloening/* amitk_color_table.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __COLOR_TABLE_H__ #define __COLOR_TABLE_H__ /* header files that are always associated with this header file */ #include "amitk_type.h" G_BEGIN_DECLS /* typedef's */ typedef enum { AMITK_COLOR_TABLE_BW_LINEAR, AMITK_COLOR_TABLE_WB_LINEAR, AMITK_COLOR_TABLE_BWB_LINEAR, AMITK_COLOR_TABLE_WBW_LINEAR, AMITK_COLOR_TABLE_RED_TEMP, AMITK_COLOR_TABLE_INV_RED_TEMP, AMITK_COLOR_TABLE_BLUE_TEMP, AMITK_COLOR_TABLE_INV_BLUE_TEMP, AMITK_COLOR_TABLE_GREEN_TEMP, AMITK_COLOR_TABLE_INV_GREEN_TEMP, AMITK_COLOR_TABLE_HOT_METAL, AMITK_COLOR_TABLE_INV_HOT_METAL, AMITK_COLOR_TABLE_HOT_METAL_CONTOUR, AMITK_COLOR_TABLE_INV_HOT_METAL_CONTOUR, AMITK_COLOR_TABLE_HOT_BLUE, AMITK_COLOR_TABLE_INV_HOT_BLUE, AMITK_COLOR_TABLE_HOT_GREEN, AMITK_COLOR_TABLE_INV_HOT_GREEN, AMITK_COLOR_TABLE_SPECTRUM, AMITK_COLOR_TABLE_INV_SPECTRUM, AMITK_COLOR_TABLE_NIH_WHITE, AMITK_COLOR_TABLE_INV_NIH_WHITE, AMITK_COLOR_TABLE_NIH, AMITK_COLOR_TABLE_INV_NIH, AMITK_COLOR_TABLE_NUM } AmitkColorTable; #define AMITK_OBJECT_DEFAULT_COLOR 0x808000FF typedef guint8 color_data_t; typedef guint16 color_data16_t; typedef gdouble hsv_data_t; typedef struct rgba_t { color_data_t r; color_data_t g; color_data_t b; color_data_t a; } rgba_t; typedef struct rgba16_t { color_data16_t r; color_data16_t g; color_data16_t b; color_data16_t a; } rgba16_t; typedef struct rgb_t { color_data_t r; color_data_t g; color_data_t b; } rgb_t; typedef struct hsv_t { hsv_data_t h; hsv_data_t s; hsv_data_t v; } hsv_t; /* defines */ #define amitk_color_table_rgba_to_uint32(rgba) (((rgba).r<<24) | ((rgba).g<<16) | ((rgba).b<<8) | ((rgba).a<<0)) /* external functions */ rgba_t amitk_color_table_uint32_to_rgba(guint32 color_uint32); rgba_t amitk_color_table_outline_color(AmitkColorTable which, gboolean highlight); rgba_t amitk_color_table_lookup(amide_data_t datum, AmitkColorTable which, amide_data_t min, amide_data_t max); const gchar * amitk_color_table_get_name(const AmitkColorTable which); /* external variables */ extern gchar * color_table_menu_names[]; G_END_DECLS #endif /* __COLOR_TABLE_H__ */ amide-1.0.5/src/amide_gconf.c0000664000175000017500000004630112270273640015643 0ustar loeningloening/* amide_gconf.c * * Part of amide - Amide's a Medical Image Dataset Examiner * * Copyright (C) 2007-2014 Andy Loening except as follows * win32 registery code is derived directly from gnumeric * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_gconf.h" #if defined (G_PLATFORM_WIN32) /* --------------------------- win32 version --------------------------- */ /* Note, this stuff has been adapted from gnumeric, specifically the file gnm-conf-win32.c */ #include #include #ifndef ERANGE /* mingw has not defined ERANGE (yet), MSVC has it though */ # define ERANGE 34 #endif typedef struct _GOConfNode GOConfNode; struct _GOConfNode { HKEY hKey; gchar *path; }; static GOConfNode *root = NULL; static void go_conf_win32_clone (HKEY hSrcKey, gchar *key, HKEY hDstKey, gchar *buf1, gchar *buf2, gchar *buf3) { #define WIN32_MAX_REG_KEYNAME_LEN 256 #define WIN32_MAX_REG_VALUENAME_LEN 32767 #define WIN32_INIT_VALUE_DATA_LEN 2048 gint i; gchar *subkey, *value_name, *data; DWORD name_size, type, data_size; HKEY hSrcSK, hDstSK; FILETIME ft; LONG ret; if (RegOpenKeyEx (hSrcKey, key, 0, KEY_READ, &hSrcSK) != ERROR_SUCCESS) return; if (!buf1) { subkey = g_malloc (WIN32_MAX_REG_KEYNAME_LEN); value_name = g_malloc (WIN32_MAX_REG_VALUENAME_LEN); data = g_malloc (WIN32_INIT_VALUE_DATA_LEN); } else { subkey = buf1; value_name = buf2; data = buf3; } ret = ERROR_SUCCESS; for (i = 0; ret == ERROR_SUCCESS; ++i) { name_size = WIN32_MAX_REG_KEYNAME_LEN; ret = RegEnumKeyEx (hSrcSK, i, subkey, &name_size, NULL, NULL, NULL, &ft); if (ret != ERROR_SUCCESS) continue; if (RegCreateKeyEx (hDstKey, subkey, 0, NULL, 0, KEY_WRITE, NULL, &hDstSK, NULL) == ERROR_SUCCESS) { go_conf_win32_clone (hSrcSK, subkey, hDstSK, subkey, value_name, data); RegCloseKey (hDstSK); } } ret = ERROR_SUCCESS; for (i = 0; ret == ERROR_SUCCESS; ++i) { name_size = WIN32_MAX_REG_KEYNAME_LEN; data_size = WIN32_MAX_REG_VALUENAME_LEN; while ((ret = RegEnumValue (hSrcSK, i, value_name, &name_size, NULL, &type, data, &data_size)) == ERROR_MORE_DATA) data = g_realloc (data, data_size); if (ret != ERROR_SUCCESS) continue; RegSetValueEx (hDstKey, value_name, 0, type, data, data_size); } RegCloseKey (hSrcSK); if (!buf1) { g_free (subkey); g_free (value_name); g_free (data); } } static gboolean go_conf_win32_get_node (GOConfNode *node, HKEY *phKey, const gchar *key, gboolean *is_new) { gchar *path, *c; LONG ret; DWORD disposition; path = g_strconcat (node ? "" : "Software\\", key, NULL); for (c = path; *c; ++c) { if (*c == '/') *c = '\\'; } ret = RegCreateKeyEx (node ? node->hKey : HKEY_CURRENT_USER, path, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, phKey, &disposition); g_free (path); if (is_new) *is_new = disposition == REG_CREATED_NEW_KEY; #ifdef AMIDE_DEBUG if (ret != ERROR_SUCCESS) { LPTSTR msg_buf; FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, ret, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &msg_buf, 0, NULL); g_warning("Unable to save key '%s' : because %s", key, msg_buf); } #endif return ret == ERROR_SUCCESS; } GOConfNode * go_conf_get_node (GOConfNode *parent, const gchar *key) { HKEY hKey; GOConfNode *node = NULL; gboolean is_new; if (go_conf_win32_get_node (parent, &hKey, key, &is_new)) { if (!parent && is_new) { gchar *path; path = g_strconcat (".DEFAULT\\Software\\", key, NULL); go_conf_win32_clone (HKEY_USERS, path, hKey, NULL, NULL, NULL); g_free (path); } node = g_malloc (sizeof (GOConfNode)); node->hKey = hKey; node->path = g_strdup (key); } return node; } static gboolean go_conf_win32_set (GOConfNode *node, const gchar *key, gint type, guchar *data, gint size) { gchar *last_sep, *path = NULL; HKEY hKey; gboolean ok; gboolean newpath=FALSE; if ((last_sep = strrchr (key, '/')) != NULL) { path = g_strndup (key, last_sep - key); ok = go_conf_win32_get_node (node, &hKey, path, NULL); g_free (path); newpath=TRUE; if (!ok) { return FALSE; } key = last_sep + 1; } else hKey = node->hKey; ok = RegSetValueEx (hKey, key, 0, type, data, size); if (ok != ERROR_SUCCESS) { #ifdef AMIDE_DEBUG LPTSTR msg_buf; FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, ok, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &msg_buf, 0, NULL); g_warning("Unable to save key '%s' : because %s", key, msg_buf); #endif return FALSE; } if (newpath) RegCloseKey (hKey); return TRUE; } static gboolean go_conf_win32_get (GOConfNode *node, const gchar *key, gulong *type, guchar **data, gulong *size, gboolean realloc, gint *ret_code) { gchar *last_sep, *path = NULL; HKEY hKey; LONG ret; gboolean ok; if ((last_sep = strrchr (key, '/')) != NULL) { path = g_strndup (key, last_sep - key); ok = go_conf_win32_get_node (node, &hKey, path, NULL); g_free (path); if (!ok) { return FALSE; } key = last_sep + 1; } else hKey = node->hKey; if (!*data && realloc) { RegQueryValueEx (hKey, key, NULL, type, NULL, size); *data = g_new (guchar, *size); } while ((ret = RegQueryValueEx (hKey, key, NULL, type, *data, size)) == ERROR_MORE_DATA && realloc) *data = g_realloc (*data, *size); if (path) RegCloseKey (hKey); if (ret_code) *ret_code = ret; return ret == ERROR_SUCCESS; } static guchar * go_conf_get (GOConfNode *node, const gchar *key, gulong expected) { gulong type, size = 0; guchar *ptr = NULL; gint ret_code; if (!go_conf_win32_get (node, key, &type, &ptr, &size, TRUE, &ret_code)) { #ifdef AMIDE_DEBUG LPTSTR msg_buf; FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, ret_code, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &msg_buf, 0, NULL); g_warning("Unable to load key '%s' : because %s", key, msg_buf); LocalFree (msg_buf); #endif g_free (ptr); return NULL; } if (type != expected) { #ifdef AMIDE_DEBUG g_warning("Expected `%lu' got `%lu' for key %s of node %s", expected, type, key, node->path); #endif g_free (ptr); return NULL; } return ptr; } void amide_gconf_init(void) { root = go_conf_get_node (NULL, PACKAGE); return; } void amide_gconf_shutdown(void) { if (root) { RegCloseKey (root->hKey); g_free (root->path); g_free (root); } return; } gboolean amide_gconf_get_bool_with_default(const gchar * group, const gchar *key, gboolean default_val) { guchar * val; gboolean res; gchar * real_key; real_key = g_strdup_printf("%s/%s",group,key); val = go_conf_get (root, real_key, REG_BINARY); g_free(real_key); if (val) { res = (gboolean) *val; g_free (val); return res; } else { return default_val; } } gboolean amide_gconf_get_bool(const gchar * group, const gchar * key) { return amide_gconf_get_bool_with_default(group, key,FALSE); } gint amide_gconf_get_int_with_default(const gchar * group, const gchar *key, gint default_val) { guchar * val; gint res; gchar * real_key; real_key = g_strdup_printf("%s/%s",group,key); val = go_conf_get (root, real_key, REG_DWORD); g_free(real_key); if (val) { res = *(gint *) val; g_free (val); return res; } else { return default_val; } } gint amide_gconf_get_int(const gchar * group, const gchar * key) { return amide_gconf_get_int_with_default(group, key,0); } gdouble amide_gconf_get_float_with_default(const gchar * group, const gchar *key, gdouble default_val) { gdouble res = -1; gchar *val; gboolean valid=FALSE; gchar * real_key; real_key = g_strdup_printf("%s/%s",group,key); val = (gchar *) go_conf_get (root, real_key, REG_SZ); g_free(real_key); if (val) { res = g_ascii_strtod (val, NULL); if (errno != ERANGE) valid = TRUE; g_free(val); } if (!valid) return default_val; else return res; } gdouble amide_gconf_get_float(const gchar * group, const gchar * key) { return amide_gconf_get_float_with_default(group, key, 0.0); } /* returns an allocated string that'll need to be free'd */ gchar * amide_gconf_get_string_with_default(const gchar * group, const gchar * key, const gchar * default_str) { gchar * val; gchar * real_key; real_key = g_strdup_printf("%s/%s",group,key); val = (gchar *) go_conf_get(root, real_key, REG_SZ); g_free(real_key); if (val) return val; else return g_strdup(default_str); } /* returns an allocated string that'll need to be free'd */ gchar * amide_gconf_get_string (const gchar * group, const gchar *key) { return amide_gconf_get_string_with_default(group, key,NULL); } gboolean amide_gconf_set_int(const gchar * group, const gchar *key, gint val) { gchar * real_key; gboolean return_val; real_key = g_strdup_printf("%s/%s",group,key); return_val = go_conf_win32_set (root, real_key, REG_DWORD, (guchar *) &val, sizeof (DWORD)); g_free(real_key); return return_val; } gboolean amide_gconf_set_float(const gchar * group, const char *key, gdouble val) { gchar * real_key; gboolean return_val; gchar str[G_ASCII_DTOSTR_BUF_SIZE]; g_ascii_dtostr (str, sizeof (str), val); real_key = g_strdup_printf("%s/%s",group,key); return_val = go_conf_win32_set(root, real_key, REG_SZ, (guchar *) str, strlen (str) + 1); g_free(real_key); return return_val; } gboolean amide_gconf_set_bool(const gchar * group, const gchar *key, gboolean val) { gchar * real_key; gboolean return_val; guchar bool = val ? 1 : 0; real_key = g_strdup_printf("%s/%s",group,key); return_val = go_conf_win32_set (root, real_key, REG_BINARY, (guchar *) &bool, sizeof (bool)); g_free(real_key); return return_val; } gboolean amide_gconf_set_string (const gchar * group, const char *key, const gchar *str) { gchar * real_key; gboolean return_val; real_key = g_strdup_printf("%s/%s",group,key); return_val = go_conf_win32_set(root, real_key, REG_SZ, (guchar *) str, strlen (str) + 1); g_free(real_key); return return_val; } #elif defined(AMIDE_NATIVE_GTK_OSX) /* --------------------- flatfile version ----------------- */ #include #include static GKeyFile *key_file = NULL; static gchar * rcfilename = NULL; void amide_gconf_init(void) { const gchar *home; home = g_get_home_dir(); g_return_if_fail(home != NULL); rcfilename = g_build_filename (home, ".amiderc", NULL); g_return_if_fail(rcfilename != NULL); /* generate the key file, and load it in if a prior .ammiderc file exists */ key_file = g_key_file_new(); g_key_file_load_from_file(key_file, rcfilename, G_KEY_FILE_NONE, NULL); return; } void amide_gconf_shutdown(void) { FILE *fp = NULL; gchar *key_data; g_return_if_fail(rcfilename != NULL); g_return_if_fail(key_file != NULL); fp = g_fopen (rcfilename, "w"); if (fp == NULL) { g_warning ("Couldn't write configuration info to %s", rcfilename); return; } key_data = g_key_file_to_data (key_file, NULL, NULL); if (key_data != NULL) { fputs (key_data, fp); g_free (key_data); } fclose (fp); return; } gboolean amide_gconf_get_bool_with_default(const gchar * group, const gchar *key, gboolean default_val) { gboolean val; GError *error=NULL; g_return_val_if_fail(key_file != NULL, default_val); val = g_key_file_get_boolean (key_file, group, key, &error); if (error != NULL) { g_error_free(error); return default_val; } else return val; } gboolean amide_gconf_get_bool(const gchar * group, const gchar * key) { return amide_gconf_get_bool_with_default(group,key,FALSE); } gint amide_gconf_get_int_with_default(const gchar * group, const gchar *key, gint default_val) { gint val; GError *error=NULL; g_return_val_if_fail(key_file != NULL, default_val); val = g_key_file_get_integer(key_file, group, key, &error); if (error != NULL) { g_error_free(error); return default_val; } else return val; } gint amide_gconf_get_int(const gchar * group, const gchar * key) { return amide_gconf_get_int_with_default(group, key,0); } gdouble amide_gconf_get_float_with_default(const gchar * group, const gchar *key,gdouble default_val) { gchar *ptr; gdouble val; GError *error=NULL; gboolean valid = FALSE; g_return_val_if_fail(key_file != NULL, default_val); ptr = g_key_file_get_value (key_file, group, key, &error); if ((ptr != NULL) && (error == NULL)) { val = g_ascii_strtod (ptr, NULL); if (errno != ERANGE) valid = TRUE; } if (ptr != NULL) g_free (ptr); if (!valid) val = default_val; return val; } gdouble amide_gconf_get_float(const gchar * group, const gchar * key) { return amide_gconf_get_float_with_default(group, key, 0.0); } /* returns an allocated string that'll need to be free'd */ gchar * amide_gconf_get_string_with_default(const gchar * group, const gchar * key, const gchar * default_val) { gchar *val; GError *error=NULL; g_return_val_if_fail(key_file != NULL, NULL); val = g_key_file_get_string(key_file, group, key, &error); if(error == NULL) return val; else return g_strdup(default_val); } /* returns an allocated string that'll need to be free'd */ gchar * amide_gconf_get_string (const gchar * group, const gchar *key) { return amide_gconf_get_string_with_default(group, key,NULL); } gboolean amide_gconf_set_bool(const gchar * group, const gchar *key, gboolean val) { g_return_val_if_fail(key_file != NULL, FALSE); g_key_file_set_boolean(key_file, group, key, val); return TRUE; } gboolean amide_gconf_set_int(const gchar * group, const gchar *key, gint val) { g_return_val_if_fail(key_file != NULL, FALSE); g_key_file_set_integer(key_file, group, key, val); return TRUE; } gboolean amide_gconf_set_float(const gchar * group, const char *key, gdouble val) { g_return_val_if_fail(key_file != NULL, FALSE); g_key_file_set_double(key_file, group, key, val); return TRUE; } gboolean amide_gconf_set_string (const gchar * group, const char *key, const gchar *val) { g_return_val_if_fail(key_file != NULL, FALSE); g_key_file_set_string (key_file, group, key, val); return TRUE; } #else /* ------------------- gconf version ---------------------- */ #include #include /* internal variables */ static GConfClient * client=NULL; void amide_gconf_init(void) { client = gconf_client_get_default(); return; } void amide_gconf_shutdown(void) { g_object_unref(client); return; } gint amide_gconf_get_int(const gchar * group, const gchar * key) { gchar * real_key; gint return_val; real_key = g_strdup_printf("/apps/%s/%s/%s",PACKAGE,group,key); return_val = gconf_client_get_int(client,real_key,NULL); g_free(real_key); return return_val; } gdouble amide_gconf_get_float(const gchar * group, const gchar * key) { gchar * real_key; gdouble return_val; real_key = g_strdup_printf("/apps/%s/%s/%s",PACKAGE,group,key); return_val = gconf_client_get_float(client,real_key,NULL); g_free(real_key); return return_val; } gboolean amide_gconf_get_bool(const gchar * group, const gchar * key) { gchar * real_key; gboolean return_val; real_key = g_strdup_printf("/apps/%s/%s/%s",PACKAGE,group,key); return_val = gconf_client_get_bool(client,real_key,NULL); g_free(real_key); return return_val; } gchar * amide_gconf_get_string(const gchar * group, const gchar * key) { gchar * real_key; gchar * return_val; real_key = g_strdup_printf("/apps/%s/%s/%s",PACKAGE,group,key); return_val = gconf_client_get_string(client,real_key,NULL); g_free(real_key); return return_val; } gboolean amide_gconf_set_int(const gchar * group, const gchar * key, gint val) { gchar * real_key; gboolean return_val; real_key = g_strdup_printf("/apps/%s/%s/%s",PACKAGE,group,key); return_val = gconf_client_set_int(client,real_key,val,NULL); g_free(real_key); return return_val; } gboolean amide_gconf_set_float(const gchar * group, const gchar * key, gdouble val) { gchar * real_key; gboolean return_val; real_key = g_strdup_printf("/apps/%s/%s/%s",PACKAGE,group,key); return_val = gconf_client_set_float(client,real_key,val,NULL); g_free(real_key); return return_val; } gboolean amide_gconf_set_bool(const gchar * group, const gchar * key, gboolean val) { gchar * real_key; gboolean return_val; real_key = g_strdup_printf("/apps/%s/%s/%s",PACKAGE,group,key); return_val = gconf_client_set_bool(client,real_key,val,NULL); g_free(real_key); return return_val; } gboolean amide_gconf_set_string(const gchar * group, const gchar * key, const gchar * val) { gchar * real_key; gboolean return_val; real_key = g_strdup_printf("/apps/%s/%s/%s",PACKAGE,group, key); return_val = gconf_client_set_string(client,real_key,val,NULL); g_free(real_key); return return_val; } /* it's pretty retarded that gconf doesn't have a function that can do this more easily */ static gboolean amide_gconf_has_value(const gchar * group, const gchar *key) { GConfValue * temp_val; gchar * real_key; real_key = g_strdup_printf("/apps/%s/%s/%s",PACKAGE,group,key); temp_val = gconf_client_get(client, real_key, NULL); g_free(real_key); if (temp_val == NULL) return FALSE; gconf_value_free(temp_val); return TRUE; } /* some helper functions */ gint amide_gconf_get_int_with_default(const gchar * group, const gchar * key, const gint default_int) { if (amide_gconf_has_value(group, key)) return amide_gconf_get_int(group, key); else return default_int; } gdouble amide_gconf_get_float_with_default(const gchar * group, const gchar * key, const gdouble default_float) { if (amide_gconf_has_value(group, key)) return amide_gconf_get_float(group, key); else return default_float; } gboolean amide_gconf_get_bool_with_default(const gchar * group, const gchar * key, const gboolean default_bool) { if (amide_gconf_has_value(group, key)) return amide_gconf_get_bool(group, key); else return default_bool; } /* returns an allocated string that'll need to be free'd */ gchar * amide_gconf_get_string_with_default(const gchar * group, const gchar * key, const gchar * default_str) { if (amide_gconf_has_value(group, key)) return amide_gconf_get_string(group, key); else return g_strdup(default_str); } #endif amide-1.0.5/src/tb_crop.h0000664000175000017500000000203412270274515015042 0ustar loeningloening/* tb_crop.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2002-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* includes always needed with this */ #include "amitk_study.h" /* external functions */ void tb_crop(AmitkStudy * study, AmitkDataSet * active_ds, GtkWindow * parent_window); amide-1.0.5/src/amitk_space.h0000664000175000017500000001467512271013546015704 0ustar loeningloening/* amitk_space.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_SPACE_H__ #define __AMITK_SPACE_H__ #include "amitk_point.h" G_BEGIN_DECLS #define AMITK_TYPE_SPACE (amitk_space_get_type ()) #define AMITK_SPACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), AMITK_TYPE_SPACE, AmitkSpace)) #define AMITK_SPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_SPACE, AmitkSpaceClass)) #define AMITK_IS_SPACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), AMITK_TYPE_SPACE)) #define AMITK_IS_SPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_SPACE)) #define AMITK_SPACE_GET_CLASS(object) (G_TYPE_CHECK_GET_CLASS ((object), AMITK_TYPE_SPACE, AmitkSpaceClass)) #define AMITK_SPACE_AXES(space) (AMITK_SPACE(space)->axes) #define AMITK_SPACE_OFFSET(space) (AMITK_SPACE(space)->offset) typedef struct _AmitkSpaceClass AmitkSpaceClass; typedef struct _AmitkSpace AmitkSpace; #define AMITK_UNDO_LEVEL 10 /* The AmitkSpace structure is the base of the Amitk objects hierarchy. * It describes an euclidean reference frame with respect to the * base coordinate space. Offset is in the base coordinate frame. */ struct _AmitkSpace { GObject parent; /* private info */ AmitkPoint offset; /* with respect to the base coordinate frame */ AmitkAxes axes; }; struct _AmitkSpaceClass { GObjectClass parent_class; void (* space_shift) (AmitkSpace * space, AmitkPoint * shift); void (* space_rotate) (AmitkSpace * space, AmitkPoint * vector, amide_real_t theta, AmitkPoint * center_of_rotation); void (* space_invert) (AmitkSpace * space, AmitkAxis which_axis, AmitkPoint * center_of_inversion); void (* space_transform) (AmitkSpace * space, AmitkSpace * transform_space); void (* space_transform_axes) (AmitkSpace * space, AmitkAxes transform_axes, AmitkPoint * center_of_rotation); void (* space_scale) (AmitkSpace * space, AmitkPoint * ref_point, AmitkPoint * scaling); void (* space_changed) (AmitkSpace * space); }; /* Application-level methods */ GType amitk_space_get_type (void); AmitkSpace* amitk_space_new (void); void amitk_space_write_xml (xmlNodePtr node, gchar * descriptor, AmitkSpace * space); AmitkSpace * amitk_space_read_xml (xmlNodePtr nodes, gchar * descriptor, gchar ** perror_buf); void amitk_space_set_offset (AmitkSpace * space, const AmitkPoint new_offset); void amitk_space_shift_offset (AmitkSpace * space, const AmitkPoint shift); void amitk_space_set_axes (AmitkSpace * space, const AmitkAxes new_axes, const AmitkPoint center_of_rotation); AmitkSpace * amitk_space_calculate_transform (const AmitkSpace * dest_space, const AmitkSpace * src_space); void amitk_space_transform (AmitkSpace * space, const AmitkSpace * transform_space); void amitk_space_transform_axes (AmitkSpace * space, const AmitkAxes transform_axes, AmitkPoint center_of_rotation); void amitk_space_scale (AmitkSpace * space, AmitkPoint ref_point, AmitkPoint scaling); AmitkPoint amitk_space_get_axis (const AmitkSpace * space, const AmitkAxis which_axis); void amitk_space_get_enclosing_corners (const AmitkSpace * in_space, const AmitkCorners in_corners, const AmitkSpace * out_space, AmitkCorners out_corners); AmitkSpace * amitk_space_copy (const AmitkSpace * space); void amitk_space_copy_in_place (AmitkSpace * dest_space, const AmitkSpace * src_space); gboolean amitk_space_axes_equal (const AmitkSpace * space1, const AmitkSpace * space2); gboolean amitk_space_axes_close (const AmitkSpace * space1, const AmitkSpace * space2); gboolean amitk_space_equal (const AmitkSpace * space1, const AmitkSpace * space2); void amitk_space_invert_axis (AmitkSpace * space, const AmitkAxis which_axis, const AmitkPoint center_of_inversion); void amitk_space_rotate_on_vector (AmitkSpace * space, const AmitkPoint vector, const amide_real_t theta, const AmitkPoint center_of_rotation); AmitkSpace * amitk_space_get_view_space (const AmitkView view, const AmitkLayout layout); void amitk_space_set_view_space (AmitkSpace * set_space, const AmitkView view, const AmitkLayout layout); /* functions that need to be fast, they do no error checking */ AmitkPoint amitk_space_b2s (const AmitkSpace * space, AmitkPoint in_rp); AmitkPoint amitk_space_s2b (const AmitkSpace * space, const AmitkPoint in_rp); #define amitk_space_s2s(in_space, out_space, in) (amitk_space_b2s((out_space), amitk_space_s2b((in_space), (in)))) AmitkPoint amitk_space_s2b_dim (const AmitkSpace * space, const AmitkPoint in_rp); AmitkPoint amitk_space_b2s_dim (const AmitkSpace * space, const AmitkPoint in_rp); #define amitk_space_s2s_dim(in_space, out_space, in) (amitk_space_b2s_dim((out_space), amitk_space_s2b_dim((in_space), (in)))) /* debugging functions */ void amitk_space_print(AmitkSpace * space, gchar * message); G_END_DECLS #endif /* __AMITK_SPACE_H__ */ amide-1.0.5/src/alignment_procrustes.h0000664000175000017500000000276312270274606017673 0ustar loeningloening/* alignment.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef AMIDE_LIBGSL_SUPPORT #ifndef __ALIGNMENT_PROCRUSTES_H__ #define __ALIGNMENT_PROCRUSTES_H__ /* header files that are always needed with this file */ #include "amitk_data_set.h" /* external functions */ /* the space returned is the transform needed to change moving_ds's space to the aligned space, incoding an axes rotation, as well as the necessary shift with respect to the dataset's center */ AmitkSpace * alignment_procrustes(AmitkDataSet * moving_ds, AmitkDataSet * fixed_ds, GList * marks, gdouble * pointer_fiducial_registration_error); #endif /* __ALIGNMENT_PROCRUSTE_H__ */ #endif /* AMIDE_LIBGSL_SUPPORT */ amide-1.0.5/src/ui_render_movie.c0000644000175000017500000010016312270274040016551 0ustar loeningloening/* ui_render_movie_dialog.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #ifdef AMIDE_LIBVOLPACK_SUPPORT #if (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT) #include "amide.h" #include #include #include "ui_common.h" #include "ui_render_movie.h" #include "amitk_type_builtins.h" #include "amitk_progress_dialog.h" #include "mpeg_encode.h" #define MOVIE_DEFAULT_DURATION 10.0 typedef enum { NOT_DYNAMIC, OVER_TIME, OVER_FRAMES, OVER_FRAMES_SMOOTHED, OVER_GATES, DYNAMIC_TYPES } dynamic_t; /* data structures */ typedef struct ui_render_movie_t { ui_render_t * ui_render; /* a pointer back to the main rendering ui */ amide_time_t start_time; amide_time_t end_time; amide_time_t duration; /* movie duration */ guint start_frame; guint end_frame; gdouble rotation[AMITK_AXIS_NUM]; dynamic_t type; gboolean in_generation; gboolean quit_generation; GtkWidget * dialog; GtkWidget * progress_dialog; GtkWidget * start_time_label; GtkWidget * end_time_label; GtkWidget * start_frame_label; GtkWidget * end_frame_label; GtkWidget * start_time_spin_button; GtkWidget * end_time_spin_button; GtkWidget * start_frame_spin_button; GtkWidget * end_frame_spin_button; GtkWidget * duration_spin_button; GtkWidget * time_on_image_label; GtkWidget * time_on_image_button; GtkWidget * dynamic_type; GtkWidget * axis_spin_button[AMITK_AXIS_NUM]; guint reference_count; } ui_render_movie_t; static void change_frames_cb(GtkWidget * widget, gpointer data); static void change_rotation_cb(GtkWidget * widget, gpointer data); static void dynamic_type_cb(GtkWidget * widget, gpointer data); static void change_start_time_cb(GtkWidget * widget, gpointer data); static void change_start_frame_cb(GtkWidget * widget, gpointer data); static void change_end_time_cb(GtkWidget * widget, gpointer data); static void change_end_frame_cb(GtkWidget * widget, gpointer data); static void time_label_on_cb(GtkWidget * widget, gpointer data); static void response_cb (GtkDialog * dialog, gint response_id, gpointer data); static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data); static void dialog_set_sensitive(ui_render_movie_t * ui_render_movie, gboolean sensitive); static ui_render_movie_t * movie_unref(ui_render_movie_t * ui_render_movie); static ui_render_movie_t * movie_init(void); static void movie_generate(ui_render_movie_t * ui_render_movie, char * output_file_name); /* function to change the number of frames in the movie */ static void change_frames_cb(GtkWidget * widget, gpointer data) { ui_render_movie_t * ui_render_movie = data; ui_render_movie->duration = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } /* function to change the number of rotations on an axis */ static void change_rotation_cb(GtkWidget * widget, gpointer data) { ui_render_movie_t * ui_render_movie = data; AmitkAxis i_axis; /* figure out which axis this is for */ i_axis = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "which_entry")); /* set the rotation */ ui_render_movie->rotation[i_axis] = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } static void dynamic_type_cb(GtkWidget * widget, gpointer data) { ui_render_movie_t * ui_render_movie = data; dynamic_t type; type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "dynamic_type")); if (type != ui_render_movie->type) { ui_render_movie->type = type; if (type == OVER_TIME) { gtk_widget_show(ui_render_movie->start_time_label); gtk_widget_show(ui_render_movie->start_time_spin_button); gtk_widget_show(ui_render_movie->end_time_label); gtk_widget_show(ui_render_movie->end_time_spin_button); } if ((type == OVER_FRAMES) || (type == OVER_FRAMES_SMOOTHED)) { gtk_widget_show(ui_render_movie->start_frame_label); gtk_widget_show(ui_render_movie->start_frame_spin_button); gtk_widget_show(ui_render_movie->end_frame_label); gtk_widget_show(ui_render_movie->end_frame_spin_button); } if ((type == NOT_DYNAMIC) || (type == OVER_GATES)) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ui_render_movie->time_on_image_button), FALSE); gtk_widget_hide(ui_render_movie->time_on_image_label); gtk_widget_hide(ui_render_movie->time_on_image_button); } else { gtk_widget_show(ui_render_movie->time_on_image_label); gtk_widget_show(ui_render_movie->time_on_image_button); } if ((type != OVER_FRAMES) && (type != OVER_FRAMES_SMOOTHED)) { gtk_widget_hide(ui_render_movie->start_frame_label); gtk_widget_hide(ui_render_movie->start_frame_spin_button); gtk_widget_hide(ui_render_movie->end_frame_label); gtk_widget_hide(ui_render_movie->end_frame_spin_button); } if (type != OVER_TIME) { gtk_widget_hide(ui_render_movie->start_time_label); gtk_widget_hide(ui_render_movie->start_time_spin_button); gtk_widget_hide(ui_render_movie->end_time_label); gtk_widget_hide(ui_render_movie->end_time_spin_button); } } return; } /* function to change the start time */ static void change_start_time_cb(GtkWidget * widget, gpointer data) { ui_render_movie_t * ui_render_movie = data; ui_render_movie->start_time = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } /* function to change the start frame */ static void change_start_frame_cb(GtkWidget * widget, gpointer data) { ui_render_movie_t * ui_render_movie = data; gint temp_val; temp_val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget)); if (temp_val >= 0) ui_render_movie->start_frame = temp_val; return; } /* function to change the end time */ static void change_end_time_cb(GtkWidget * widget, gpointer data) { ui_render_movie_t * ui_render_movie = data; ui_render_movie->end_time = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } /* function to change the end frame */ static void change_end_frame_cb(GtkWidget * widget, gpointer data) { ui_render_movie_t * ui_render_movie = data; ui_render_movie->end_frame = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); return; } static void time_label_on_cb(GtkWidget * widget, gpointer data) { ui_render_movie_t * ui_render_movie = data; ui_render_movie->ui_render->time_label_on = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); return; } /* function called when we hit the apply button */ static void response_cb (GtkDialog * dialog, gint response_id, gpointer data) { ui_render_movie_t * ui_render_movie = data; renderings_t * temp_renderings; GtkWidget * file_chooser; gchar * filename; gchar * data_set_names = NULL; static guint save_image_num = 0; gboolean return_val; switch(response_id) { case AMITK_RESPONSE_EXECUTE: /* the rest of this function runs the file selection dialog box */ file_chooser = gtk_file_chooser_dialog_new(_("Output MPEG As"), GTK_WINDOW(dialog), /* parent window */ GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER (file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(ui_render_movie->ui_render->preferences, file_chooser); /* set the default directory if applicable */ /* take a guess at the filename */ temp_renderings = ui_render_movie->ui_render->renderings; data_set_names = g_strdup(temp_renderings->rendering->name); temp_renderings = temp_renderings->next; while (temp_renderings != NULL) { filename = g_strdup_printf("%s+%s",data_set_names, temp_renderings->rendering->name); g_free(data_set_names); data_set_names = filename; temp_renderings = temp_renderings->next; } filename = g_strdup_printf("Rendering%s%s_%d.mpg", ui_render_movie->ui_render->stereoscopic ? "_stereo_" : "_", data_set_names,save_image_num++); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER (file_chooser), filename); g_free(filename); /* run the dialog */ if (gtk_dialog_run(GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (file_chooser)); else filename = NULL; gtk_widget_destroy (file_chooser); if (filename == NULL) return; /* return to movie generate dialog */ else { /* generate the movie */ movie_generate(ui_render_movie, filename); g_free(filename); } /* and fall through to close out the dialog */ case GTK_RESPONSE_CANCEL: g_signal_emit_by_name(G_OBJECT(dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(dialog)); break; case GTK_RESPONSE_HELP: amide_call_help("rendering-movie-dialog"); break; default: break; } return; } /* function called to destroy the dialog */ static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { ui_render_movie_t * ui_render_movie = data; ui_render_t * ui_render = ui_render_movie->ui_render; /* trying to close while we're generating */ if (ui_render_movie->in_generation) { ui_render_movie->quit_generation=TRUE; /* signal we need to exit rendering */ return TRUE; } /* trash collection */ /* also informs the ui_render widget that the movie widget is gone */ ui_render->movie = movie_unref(ui_render->movie); return FALSE; } static void dialog_set_sensitive(ui_render_movie_t * ui_render_movie, gboolean sensitive) { AmitkAxis i_axis; gtk_widget_set_sensitive(ui_render_movie->duration_spin_button, sensitive); for (i_axis=0; i_axisaxis_spin_button[i_axis], sensitive); gtk_widget_set_sensitive(ui_render_movie->start_time_spin_button, sensitive); gtk_widget_set_sensitive(ui_render_movie->end_time_spin_button, sensitive); gtk_widget_set_sensitive(ui_render_movie->start_frame_spin_button, sensitive); gtk_widget_set_sensitive(ui_render_movie->end_frame_spin_button, sensitive); gtk_widget_set_sensitive(ui_render_movie->dynamic_type, sensitive); gtk_dialog_set_response_sensitive(GTK_DIALOG(ui_render_movie->dialog), AMITK_RESPONSE_EXECUTE, sensitive); } /* destroy a ui_render_movie data structure */ static ui_render_movie_t * movie_unref(ui_render_movie_t * ui_render_movie) { gboolean return_val; if (ui_render_movie == NULL) return ui_render_movie; /* sanity checks */ g_return_val_if_fail(ui_render_movie->reference_count > 0, NULL); ui_render_movie->reference_count--; /* things we do if we've removed all references */ if (ui_render_movie->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing ui_render_movie\n"); #endif if (ui_render_movie->progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(ui_render_movie->progress_dialog), "delete_event", NULL, &return_val); ui_render_movie->progress_dialog = NULL; } ui_render_movie->ui_render->time_label_on=FALSE; g_free(ui_render_movie); ui_render_movie = NULL; } return ui_render_movie; } /* allocate and initialize a ui_render_movie data structure */ static ui_render_movie_t * movie_init(void) { ui_render_movie_t * ui_render_movie; /* alloc space for the data structure */ if ((ui_render_movie = g_try_new(ui_render_movie_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for ui_render_movie_t")); return NULL; } ui_render_movie->reference_count = 1; ui_render_movie->duration = MOVIE_DEFAULT_DURATION; ui_render_movie->rotation[AMITK_AXIS_X] = 0; ui_render_movie->rotation[AMITK_AXIS_Y] = 1; ui_render_movie->rotation[AMITK_AXIS_Z] = 0; ui_render_movie->type = NOT_DYNAMIC; ui_render_movie->ui_render = NULL; ui_render_movie->start_time = 0.0; ui_render_movie->end_time = 1.0; ui_render_movie->start_frame = 0; ui_render_movie->end_frame = 0; ui_render_movie->in_generation=FALSE; ui_render_movie->quit_generation=FALSE; ui_render_movie->progress_dialog = NULL; return ui_render_movie; } /* perform the movie generation */ static void movie_generate(ui_render_movie_t * ui_render_movie, gchar * output_filename) { guint i_frame; gdouble rotation_step[AMITK_AXIS_NUM]; AmitkAxis i_axis; gint return_val = TRUE; amide_time_t initial_start, initial_duration; amide_time_t start_time, duration; ui_render_t * ui_render; AmitkDataSet * most_frames_ds=NULL; renderings_t * renderings; guint ds_frame=0; gdouble ds_frame_real; guint num_frames; gpointer mpeg_encode_context; gboolean continue_work=TRUE; gint ds_gate; GdkPixbuf * pixbuf; /* gray out anything that could screw up the movie */ dialog_set_sensitive(ui_render_movie, FALSE); ui_render_movie->in_generation=TRUE; /* indicate we're generating */ /* save the initial times so we can set it back later */ ui_render = ui_render_movie->ui_render; initial_start = ui_render->start; initial_duration = ui_render->duration; /* disable the normal rendering progress dialog */ ui_render->disable_progress_dialog = TRUE; /* figure out which data set has the most frames, need this if we're doing a movie over frames */ renderings = ui_render->renderings; while (renderings != NULL) { if (AMITK_IS_DATA_SET(renderings->rendering->object)) { if (most_frames_ds == NULL) most_frames_ds = AMITK_DATA_SET(renderings->rendering->object); else if (AMITK_DATA_SET_NUM_FRAMES(most_frames_ds) < AMITK_DATA_SET_NUM_FRAMES(renderings->rendering->object)) most_frames_ds = AMITK_DATA_SET(renderings->rendering->object); } renderings = renderings->next; } num_frames = ceil(ui_render_movie->duration*FRAMES_PER_SECOND); /* figure out each frame's duration, needed if we're doing a movie over time */ if ((ui_render_movie->type == OVER_FRAMES) || (ui_render_movie->type == OVER_FRAMES_SMOOTHED) || (ui_render_movie->type == OVER_TIME)) { ui_render->duration = (ui_render_movie->end_time-ui_render_movie->start_time) /((amide_time_t) num_frames); } mpeg_encode_context = mpeg_encode_setup(output_filename, ENCODE_MPEG1, ui_render->pixbuf_width, ui_render->pixbuf_height); g_return_if_fail(mpeg_encode_context != NULL); /* start generating the frames, continue while we haven't hit cancel */ for (i_frame = 0; ((i_frame < num_frames) && !ui_render_movie->quit_generation && return_val && continue_work); i_frame++) { /* update the progress bar */ continue_work = amitk_progress_dialog_set_fraction(AMITK_PROGRESS_DIALOG(ui_render_movie->progress_dialog), (gdouble) i_frame/((gdouble) num_frames)); /* figure out the rotation for this frame */ for (i_axis = 0; i_axis < AMITK_AXIS_NUM ; i_axis++) { rotation_step[i_axis] = (((gdouble) i_frame)*2.0*M_PI*ui_render_movie->rotation[i_axis]) / num_frames; renderings_set_rotation(ui_render->renderings, i_axis, rotation_step[i_axis]); } /* figure out the start interval for this frame */ switch (ui_render_movie->type) { case OVER_TIME: ui_render->start = ui_render_movie->start_time + i_frame*ui_render->duration; break; case OVER_FRAMES_SMOOTHED: case OVER_FRAMES: if (most_frames_ds) { ds_frame_real = (i_frame/((gdouble) num_frames)) * AMITK_DATA_SET_NUM_FRAMES(most_frames_ds); ds_frame = floor(ds_frame_real); start_time = amitk_data_set_get_start_time(most_frames_ds, ds_frame); duration = amitk_data_set_get_end_time(most_frames_ds, ds_frame) - start_time; ui_render->start = start_time + EPSILON*fabs(start_time) + ((ui_render_movie->type == OVER_FRAMES_SMOOTHED) ? ((ds_frame_real-ds_frame)*duration) : 0.0); ui_render->duration = duration - EPSILON*fabs(duration); } else { /* just have roi's.... doesn't make much sense if we get here */ ui_render->start = 0.0; ui_render->duration = 1.0; } break; case OVER_GATES: renderings = ui_render->renderings; while (renderings != NULL) { if (AMITK_IS_DATA_SET(renderings->rendering->object)) { ds_gate = floor((i_frame/((gdouble) num_frames))*AMITK_DATA_SET_NUM_GATES(renderings->rendering->object)); amitk_data_set_set_view_start_gate(AMITK_DATA_SET(renderings->rendering->object), ds_gate); amitk_data_set_set_view_end_gate(AMITK_DATA_SET(renderings->rendering->object), ds_gate); } renderings = renderings->next; } break; default: /* NOT_DYNAMIC */ break; } /* render the contexts */ ui_render_update_immediate(ui_render); if (ui_render->rendered_successfully) {/* if we rendered correct, encode the mpeg frame */ pixbuf = ui_render_get_pixbuf(ui_render); if (pixbuf == NULL) { g_warning(_("Canvas failed to return a valid image\n")); break; } return_val = mpeg_encode_frame(mpeg_encode_context, pixbuf); g_object_unref(pixbuf); } else return_val = FALSE; /* do any events pending, this allows the canvas to get displayed */ while (gtk_events_pending()) gtk_main_iteration(); /* and unrotate the rendering contexts so that we can properly rerotate for the next frame */ for (i_axis = AMITK_AXIS_NUM; i_axis > 0 ; i_axis--) { renderings_set_rotation(ui_render->renderings, i_axis-1, -rotation_step[i_axis-1]); } } mpeg_encode_close(mpeg_encode_context); amitk_progress_dialog_set_fraction(AMITK_PROGRESS_DIALOG(ui_render_movie->progress_dialog),2.0); /* and rerender one last time to back to the initial rotation and time */ ui_render->start = initial_start; ui_render->duration = initial_duration; ui_render->disable_progress_dialog = FALSE; ui_render_add_update(ui_render); ui_render_movie->in_generation = FALSE; /* done generating */ ui_render_movie->quit_generation = FALSE; dialog_set_sensitive(ui_render_movie, TRUE); /* let user change stuff again */ return; } /* function that sets up the rendering options dialog */ gpointer * ui_render_movie_dialog_create(ui_render_t * ui_render) { ui_render_movie_t * ui_render_movie; gchar * temp_string = NULL; GtkWidget * packing_table; GtkWidget * hseparator; GtkWidget * label; GtkWidget * radio_button1; GtkWidget * radio_button2; GtkWidget * radio_button3; GtkWidget * radio_button4; GtkWidget * radio_button5; GtkWidget * hbox; guint table_row = 0; AmitkAxis i_axis; renderings_t * renderings; AmitkDataSet * temp_ds; gboolean valid; gint temp_end_frame; amide_time_t temp_end_time; amide_time_t temp_start_time; if (ui_render->movie != NULL) return ui_render->movie; ui_render_movie = movie_init(); ui_render->movie = ui_render_movie; ui_render_movie->ui_render = ui_render; ui_render_movie->start_frame = 0; /* try to get reasonable default values */ renderings = ui_render->renderings; valid = FALSE; while (renderings != NULL) { if (AMITK_IS_DATA_SET(renderings->rendering->object)) { temp_ds = AMITK_DATA_SET(renderings->rendering->object); temp_end_frame = AMITK_DATA_SET_NUM_FRAMES(temp_ds)-1; temp_start_time = amitk_data_set_get_start_time(temp_ds,0); temp_end_time = amitk_data_set_get_end_time(temp_ds, temp_end_frame); if (!valid) { ui_render_movie->end_frame = temp_end_frame; ui_render_movie->start_time = temp_start_time; ui_render_movie->end_time = temp_end_time; } else { if (temp_end_frame > ui_render_movie->end_frame) ui_render_movie->end_frame = temp_end_frame; if (temp_start_time < ui_render_movie->start_time) ui_render_movie->start_time = temp_start_time; if (temp_end_time > ui_render_movie->end_time) ui_render_movie->end_time = temp_end_time; } valid = TRUE; } renderings = renderings->next; } temp_string = g_strdup_printf(_("%s: Rendering Movie Generation Dialog"),PACKAGE); ui_render_movie->dialog = gtk_dialog_new_with_buttons(temp_string, ui_render->window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_HELP, GTK_RESPONSE_HELP, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, _("_Generate Movie"), AMITK_RESPONSE_EXECUTE, NULL); g_free(temp_string); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(ui_render_movie->dialog), "response", G_CALLBACK(response_cb), ui_render_movie); g_signal_connect(G_OBJECT(ui_render_movie->dialog), "delete_event", G_CALLBACK(delete_event_cb), ui_render_movie); /* --------------------------- Basic Parameters page --------------------------- */ /* start making the widgets for this dialog box */ packing_table = gtk_table_new(5,3,FALSE); table_row=0; gtk_container_add (GTK_CONTAINER (GTK_DIALOG(ui_render_movie->dialog)->vbox), packing_table); /* widgets to specify how many frames */ label = gtk_label_new(_("Movie Duration (sec)")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); ui_render_movie->duration_spin_button = gtk_spin_button_new_with_range(0, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(ui_render_movie->duration_spin_button), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(ui_render_movie->duration_spin_button), ui_render_movie->duration); g_signal_connect(G_OBJECT(ui_render_movie->duration_spin_button), "value_changed", G_CALLBACK(change_frames_cb), ui_render_movie); g_signal_connect(G_OBJECT(ui_render_movie->duration_spin_button), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->duration_spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 0,3, table_row, table_row+1,GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* widgets to specify number of rotations on the axis */ for (i_axis=0;i_axisaxis_spin_button[i_axis] = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(ui_render_movie->axis_spin_button[i_axis]), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(ui_render_movie->axis_spin_button[i_axis]), 2); gtk_spin_button_set_value(GTK_SPIN_BUTTON(ui_render_movie->axis_spin_button[i_axis]), ui_render_movie->rotation[i_axis]); g_object_set_data(G_OBJECT(ui_render_movie->axis_spin_button[i_axis]), "which_entry", GINT_TO_POINTER(i_axis)); g_signal_connect(G_OBJECT(ui_render_movie->axis_spin_button[i_axis]), "value_changed", G_CALLBACK(change_rotation_cb), ui_render_movie); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->axis_spin_button[i_axis],1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; } /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(packing_table), hseparator, 0,3, table_row, table_row+1,GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* do we want to make a movie over time or over frames */ label = gtk_label_new(_("Dynamic Movie:")); gtk_table_attach(GTK_TABLE(packing_table), label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(packing_table), hbox,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hbox); table_row++; /* the radio buttons */ radio_button1 = gtk_radio_button_new_with_label(NULL, _("No")); gtk_box_pack_start(GTK_BOX(hbox), radio_button1, FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button1), "dynamic_type", GINT_TO_POINTER(NOT_DYNAMIC)); ui_render_movie->dynamic_type = radio_button1; radio_button2 = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button1), _("over time")); gtk_box_pack_start(GTK_BOX(hbox), radio_button2, FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button2), "dynamic_type", GINT_TO_POINTER(OVER_TIME)); radio_button3 = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button1), _("over frames")); gtk_box_pack_start(GTK_BOX(hbox), radio_button3, FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button3), "dynamic_type", GINT_TO_POINTER(OVER_FRAMES)); hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(packing_table), hbox,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hbox); table_row++; radio_button4 = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button1), _("over frames smoothed")); gtk_box_pack_start(GTK_BOX(hbox), radio_button4, FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button4), "dynamic_type", GINT_TO_POINTER(OVER_FRAMES_SMOOTHED)); radio_button5 = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(radio_button1), _("over gates")); gtk_box_pack_start(GTK_BOX(hbox), radio_button5, FALSE, FALSE, 3); g_object_set_data(G_OBJECT(radio_button5), "dynamic_type", GINT_TO_POINTER(OVER_GATES)); g_signal_connect(G_OBJECT(radio_button1), "clicked", G_CALLBACK(dynamic_type_cb), ui_render_movie); g_signal_connect(G_OBJECT(radio_button2), "clicked", G_CALLBACK(dynamic_type_cb), ui_render_movie); g_signal_connect(G_OBJECT(radio_button3), "clicked", G_CALLBACK(dynamic_type_cb), ui_render_movie); g_signal_connect(G_OBJECT(radio_button4), "clicked", G_CALLBACK(dynamic_type_cb), ui_render_movie); g_signal_connect(G_OBJECT(radio_button5), "clicked", G_CALLBACK(dynamic_type_cb), ui_render_movie); /* widgets to specify the start and end times */ ui_render_movie->start_time_label = gtk_label_new(_("Start Time (s)")); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->start_time_label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); ui_render_movie->start_frame_label = gtk_label_new(_("Start Frame")); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->start_frame_label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); ui_render_movie->start_time_spin_button = gtk_spin_button_new_with_range(ui_render_movie->start_time, ui_render_movie->end_time, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(ui_render_movie->start_time_spin_button), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(ui_render_movie->start_time_spin_button), ui_render_movie->start_time); g_signal_connect(G_OBJECT(ui_render_movie->start_time_spin_button), "value_changed", G_CALLBACK(change_start_time_cb), ui_render_movie); g_signal_connect(G_OBJECT(ui_render_movie->start_time_spin_button), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->start_time_spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); ui_render_movie->start_frame_spin_button = gtk_spin_button_new_with_range(ui_render_movie->start_frame,ui_render_movie->end_frame+0.1, 1.0); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(ui_render_movie->start_frame_spin_button),0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(ui_render_movie->start_frame_spin_button), ui_render_movie->start_frame); g_signal_connect(G_OBJECT(ui_render_movie->start_frame_spin_button), "value_changed", G_CALLBACK(change_start_frame_cb), ui_render_movie); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->start_frame_spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; ui_render_movie->end_time_label = gtk_label_new(_("End Time (s)")); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->end_time_label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); ui_render_movie->end_frame_label = gtk_label_new(_("End Frame")); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->end_frame_label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); ui_render_movie->end_time_spin_button = gtk_spin_button_new_with_range(ui_render_movie->start_time, ui_render_movie->end_time, 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(ui_render_movie->end_time_spin_button), FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(ui_render_movie->end_time_spin_button), ui_render_movie->end_time); g_signal_connect(G_OBJECT(ui_render_movie->end_time_spin_button), "value_changed", G_CALLBACK(change_end_time_cb), ui_render_movie); g_signal_connect(G_OBJECT(ui_render_movie->end_time_spin_button), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->end_time_spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); ui_render_movie->end_frame_spin_button = gtk_spin_button_new_with_range(ui_render_movie->start_frame,ui_render_movie->end_frame+0.1, 1.0); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(ui_render_movie->end_frame_spin_button),0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(ui_render_movie->end_frame_spin_button), ui_render_movie->end_frame); g_signal_connect(G_OBJECT(ui_render_movie->end_frame_spin_button), "value_changed", G_CALLBACK(change_end_frame_cb), ui_render_movie); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->end_frame_spin_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; ui_render_movie->time_on_image_label = gtk_label_new(_("Display time on image")); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->time_on_image_label, 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); ui_render_movie->time_on_image_button = gtk_check_button_new(); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ui_render_movie->time_on_image_button), ui_render_movie->ui_render->time_label_on); g_signal_connect(G_OBJECT(ui_render_movie->time_on_image_button), "toggled", G_CALLBACK(time_label_on_cb), ui_render_movie); gtk_table_attach(GTK_TABLE(packing_table), ui_render_movie->time_on_image_button,1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; /* progress dialog */ ui_render_movie->progress_dialog = amitk_progress_dialog_new(GTK_WINDOW(ui_render_movie->dialog)); amitk_progress_dialog_set_text(AMITK_PROGRESS_DIALOG(ui_render_movie->progress_dialog), _("Rendered Movie Progress")); /* show all our widgets */ gtk_widget_show_all(ui_render_movie->dialog); /* and hide the appropriate widgets */ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button1), TRUE); gtk_widget_hide(ui_render_movie->start_frame_label); gtk_widget_hide(ui_render_movie->start_frame_spin_button); gtk_widget_hide(ui_render_movie->end_frame_label); gtk_widget_hide(ui_render_movie->end_frame_spin_button); gtk_widget_hide(ui_render_movie->start_time_label); gtk_widget_hide(ui_render_movie->start_time_spin_button); gtk_widget_hide(ui_render_movie->end_time_label); gtk_widget_hide(ui_render_movie->end_time_spin_button); gtk_widget_hide(ui_render_movie->time_on_image_label); gtk_widget_hide(ui_render_movie->time_on_image_button); return (gpointer) ui_render_movie; } #endif /* AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT */ #endif /* LIBVOLPACK_SUPPORT */ amide-1.0.5/src/amide_gconf.h0000664000175000017500000000424712270274604015654 0ustar loeningloening/* amide_gconf.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2007-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMIDE_GCONF_H__ #define __AMIDE_GCONF_H__ /* header files that are always needed with this file */ #include #include "amide_config.h" G_BEGIN_DECLS void amide_gconf_init(); void amide_gconf_shutdown(); gint amide_gconf_get_int (const char * group, const char * key); gdouble amide_gconf_get_float (const char * group, const char * key); gboolean amide_gconf_get_bool (const char * group, const char * key); gchar * amide_gconf_get_string(const char * group, const char * key); gboolean amide_gconf_set_int (const char * group, const char * key, gint val); gboolean amide_gconf_set_float (const char * group, const char * key, gdouble val); gboolean amide_gconf_set_bool (const char * group, const char * key, gboolean val); gboolean amide_gconf_set_string(const char * group, const char * key, const gchar * val); gint amide_gconf_get_int_with_default (const char * group, const gchar * key, const gint default_int); gdouble amide_gconf_get_float_with_default (const char * group, const gchar * key, const gdouble default_float); gboolean amide_gconf_get_bool_with_default (const char * group, const gchar * key, const gboolean default_bool); gchar * amide_gconf_get_string_with_default(const char * group, const gchar * key, const gchar * default_str); G_END_DECLS #endif /* __AMIDE_GCONF_H__ */ amide-1.0.5/src/dcmtk_interface.h0000664000175000017500000000330312270274534016535 0ustar loeningloening/* dcmtk_interface.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2005-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef AMIDE_LIBDCMDATA_SUPPORT #ifndef __DCMTK_INTERFACE_H__ #define __DCMTK_INTERFACE_H__ /* includes always needed with this file */ #include "amitk_data_set.h" G_BEGIN_DECLS extern const gchar * dcmtk_version; /* external functions */ gboolean dcmtk_test_dicom(const gchar * filename); GList * dcmtk_import(const gchar * filename, gchar ** pstudyname, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data); gboolean dcmtk_export(AmitkDataSet * ds, const gchar * dir_or_filename, const gchar * studyname, const gboolean resliced, const AmitkPoint voxel_size, const AmitkVolume * bounding_box, AmitkUpdateFunc update_func, gpointer update_data); G_END_DECLS #endif /* __DCMTK_INTERFACE_H__ */ #endif /* AMIDE_LIBDCMDATA_SUPPORT */ amide-1.0.5/src/libmdc_interface.h0000644000175000017500000000547212270274525016674 0ustar loeningloening/* libmdc_interface.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef AMIDE_LIBMDC_SUPPORT #ifndef __LIBMDC_INTERFACE_H__ #define __LIBMDC_INTERFACE_H__ /* includes always needed with this file */ #include "amitk_data_set.h" typedef enum { LIBMDC_NONE, LIBMDC_RAW, LIBMDC_ASCII, LIBMDC_GIF, LIBMDC_ACR, LIBMDC_CONC, LIBMDC_ECAT6, LIBMDC_ECAT7, LIBMDC_INTF, LIBMDC_ANLZ, LIBMDC_DICM, LIBMDC_NIFTI, LIBMDC_NUM_FORMATS } libmdc_format_t; typedef enum { LIBMDC_IMPORT_GUESS, LIBMDC_IMPORT_GIF, LIBMDC_IMPORT_ACR, LIBMDC_IMPORT_CONC, LIBMDC_IMPORT_ECAT6, LIBMDC_IMPORT_ECAT7, LIBMDC_IMPORT_INTF, LIBMDC_IMPORT_ANLZ, LIBMDC_IMPORT_DICM, LIBMDC_IMPORT_NIFTI, LIBMDC_NUM_IMPORT_METHODS } libmdc_import_t; typedef enum { LIBMDC_EXPORT_ACR, LIBMDC_EXPORT_CONC, LIBMDC_EXPORT_ECAT6, LIBMDC_EXPORT_INTF, LIBMDC_EXPORT_ANLZ, LIBMDC_EXPORT_DICM, LIBMDC_EXPORT_NIFTI, LIBMDC_NUM_EXPORT_METHODS } libmdc_export_t; /* external functions */ gboolean libmdc_supports(libmdc_format_t format); AmitkDataSet * libmdc_import(const gchar * filename, const libmdc_format_t libmdc_format, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data); /* voxel_size only used if resliced=TRUE */ /* if bounding_box == NULL, will create its own using the minimal necessary */ gboolean libmdc_export(AmitkDataSet * ds, const gchar * filename, const libmdc_format_t libmdc_format, const gboolean resliced, const AmitkPoint voxel_size, const AmitkVolume * bounding_box, AmitkUpdateFunc update_func, gpointer update_data); extern libmdc_format_t libmdc_import_to_format[]; extern gchar * libmdc_import_menu_names[]; extern gchar * libmdc_import_menu_explanations[]; extern libmdc_format_t libmdc_export_to_format[]; extern gchar * libmdc_export_menu_names[]; extern gchar * libmdc_export_menu_explanations[]; #endif /* __LIBMDC_INTERFACE_H__ */ #endif /* AMIDE_LIBMDC_SUPPORT */ amide-1.0.5/src/libecat_interface.c0000644000175000017500000003735612270273776017055 0ustar loeningloening/* libecat_interface.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #ifdef AMIDE_LIBECAT_SUPPORT #include #include #include #include "libecat_interface.h" static char * libecat_data_types[] = { N_("Unknown Data Type"), /* UnknownMatDataType */ N_("Byte"), /* ByteData */ N_("Short (16 bit), Little Endian"), /* VAX_Ix2 */ N_("Integer (32 bit), Little Endian"), /* VAX_Ix4 */ N_("VAX Float (32 bit)"), /* VAX_Rx4 */ N_("IEEE Float (32 bit)"), /* IeeeFloat */ N_("Short (16 bit), Big Endian"), /* SunShort */ N_("Integer (32 bit), Big Endian") /* SunLong */ }; /* NumMatrixDataTypes */ AmitkDataSet * libecat_import(const gchar * libecat_filename, AmitkPreferences * preferences, AmitkUpdateFunc update_func, gpointer update_data) { MatrixFile * libecat_file=NULL; MatrixData * matrix_data=NULL; MatrixData * matrix_slice=NULL; AmitkVoxel i, j; gint matnum; AmitkDataSet * ds=NULL; guint slice, num_slices; gchar * name; gchar ** frags=NULL; time_t scan_time; AmitkPoint temp_point; AmitkPoint offset_rp; AmitkFormat format; AmitkVoxel dim; AmitkScalingType scaling_type; div_t x; gint divider; gint total_planes, i_plane; gboolean continue_work=TRUE; gchar * temp_string; const gchar * bad_char; Image_subheader * ish; Scan_subheader * ssh; Attn_subheader * ash; gchar * saved_time_locale; gchar * saved_numeric_locale; time_t dob; gint num_corrupted_planes = 0; gdouble calibration_factor = 1.0; saved_time_locale = g_strdup(setlocale(LC_TIME,NULL)); saved_numeric_locale = g_strdup(setlocale(LC_NUMERIC,NULL)); setlocale(LC_TIME,"POSIX"); setlocale(LC_NUMERIC,"POSIX"); if (!(libecat_file = matrix_open(libecat_filename, MAT_READ_ONLY, MAT_UNKNOWN_FTYPE))) { g_warning(_("Can't open file %s using libecat"), libecat_filename); goto error; } /* check if we can handle the file type */ switch(libecat_file->mhptr->file_type) { case PetImage: /* i.e. CTI 6.4 */ case PetVolume: /* i.e. CTI 7.0 */ case AttenCor: case Sinogram: case Normalization: case InterfileImage: break; case NoData: case PolarMap: case ByteProjection: case PetProjection: case Short3dSinogram: case Byte3dSinogram: case Norm3d: case Float3dSinogram: case ByteImage: case ByteVolume: default: g_warning(_("Don't know how to handle this CTI file type: %d"), libecat_file->mhptr->file_type); goto error; break; } /* we always start at the first iamge */ // matnum = mat_numcod(1,1,1,0,0); /* frame, plane, gate, data, bed */ matnum = libecat_file->dirlist->first->matnum; if (!(matrix_data = matrix_read(libecat_file, matnum, MAT_SUB_HEADER))) { g_warning(_("Libecat can't get header info at matrix %x in file %s"), matnum, libecat_filename); goto error; } /* make sure we know how to process the data type */ /* note that the libecat library handles endian issues */ switch (matrix_data->data_type) { case VAX_Ix2: /* little endian short */ case SunShort: /* big endian short */ format = AMITK_FORMAT_SSHORT; break; case IeeeFloat: /* big endian float */ case VAX_Rx4: /* PDP float */ format = AMITK_FORMAT_FLOAT; break; /* handled data types */ case UnknownMatDataType: case ByteData: case VAX_Ix4: /* little endian int */ case SunLong: /* big endian int? */ case ColorData: case BitData: default: g_warning(_("No support for importing CTI files with data type of: %d (%s)"), matrix_data->data_type, libecat_data_types[((matrix_data->data_type) < NumMatrixDataTypes) ? matrix_data->data_type : 0]); goto error; break; } /* start acquiring some useful information */ dim.x = matrix_data->xdim; dim.y = matrix_data->ydim; dim.z = (matrix_data->zdim == 1) ? libecat_file->mhptr->num_planes : matrix_data->zdim; dim.g = libecat_file->mhptr->num_gates; dim.t = libecat_file->mhptr->num_frames; num_slices = libecat_file->mhptr->num_planes/matrix_data->zdim; /* should we include the calibration factor in the conversion? */ if (libecat_file->mhptr->calibration_units == Calibrated) calibration_factor = libecat_file->mhptr->calibration_factor; /* figure out the size of our factor array */ if (matrix_data->zdim == 1) { /* slice image, non-float data, so we'll need a per/plane (2D) array of scaling factors */ scaling_type = AMITK_SCALING_TYPE_2D; } else { /* volume image, so we'll need a per/frame (1D) array of scaling factors */ scaling_type = AMITK_SCALING_TYPE_1D; } /* init our data structures, it's a CTI File, we'll guess it's PET data */ ds = amitk_data_set_new_with_data(preferences, AMITK_MODALITY_PET, format, dim, scaling_type); if (ds == NULL) { g_warning(_("Couldn't allocate memory space for the data set structure to hold CTI data")); goto error; } /* try figuring out the name */ if (libecat_file->mhptr->study_name[0] != '\0') name = g_strndup(libecat_file->mhptr->study_name, 12); else if (libecat_file->mhptr->original_file_name[0] != '\0') name = g_strndup(libecat_file->mhptr->original_file_name, 32); else {/* no original filename? */ temp_string = g_path_get_basename(libecat_filename); /* remove the extension of the file */ g_strreverse(temp_string); frags = g_strsplit(temp_string, ".", 2); g_free(temp_string); g_strreverse(frags[1]); name = g_strdup(frags[1]); g_strfreev(frags); /* free up now unused strings */ } /* validate the name to utf8 */ if (!g_utf8_validate(name, -1, &bad_char)) { gsize invalid_point = bad_char-name; name[invalid_point] = '\0'; } /* try adding on the reconstruction method */ switch(libecat_file->mhptr->file_type) { case PetImage: case PetVolume: case InterfileImage: ish = (Image_subheader *) matrix_data->shptr; temp_string = name; if (ish->annotation[0] != '\0') name = g_strdup_printf("%s - %s", temp_string, ish->annotation); else name = g_strdup_printf("%s, %d", temp_string, ish->recon_type); g_free(temp_string); break; case AttenCor: ash = (Attn_subheader *) matrix_data->shptr; temp_string = name; name = g_strdup_printf("%s,%d", temp_string, ash->attenuation_type); g_free(temp_string); break; case Sinogram: default: break; } amitk_object_set_name(AMITK_OBJECT(ds),name); #ifdef AMIDE_DEBUG g_print("data set name %s\n",AMITK_OBJECT_NAME(ds)); g_print("\tx size %d\ty size %d\tz size %d\tframes %d\n", dim.x, dim.y, dim.z, dim.t); g_print("\tslices/volume %d\n",num_slices); #endif /* try to enter in a scan date and addition data */ scan_time = libecat_file->mhptr->scan_start_time; amitk_data_set_set_scan_date(ds, ctime(&scan_time)); amitk_data_set_set_subject_name(ds, libecat_file->mhptr->patient_name); amitk_data_set_set_subject_id(ds, libecat_file->mhptr->patient_id); dob = libecat_file->mhptr->patient_birth_date; amitk_data_set_set_subject_dob(ds, ctime(&(dob))); switch(libecat_file->mhptr->patient_orientation) { case FeetFirstProne: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_PRONE_FEETFIRST); break; case HeadFirstProne: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_PRONE_HEADFIRST); break; case FeetFirstSupine: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_SUPINE_FEETFIRST); break; case HeadFirstSupine: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_SUPINE_HEADFIRST); break; case FeetFirstRight: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_FEETFIRST); break; case HeadFirstRight: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_RIGHT_DECUBITUS_HEADFIRST); break; case FeetFirstLeft: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_FEETFIRST); break; case HeadFirstLeft: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_LEFT_DECUBITUS_HEADFIRST); break; case UnknownOrientation: default: amitk_data_set_set_subject_orientation(ds, AMITK_SUBJECT_ORIENTATION_UNKNOWN); break; } /* get the voxel size */ temp_point.x = 10*matrix_data->pixel_size; temp_point.y = 10*matrix_data->y_size; temp_point.z = 10*matrix_data->z_size; if (isnan(temp_point.x) || isnan(temp_point.y) || isnan(temp_point.z)) {/*handle corrupted cti files */ g_warning(_("Detected corrupted CTI file, will try to continue by guessing voxel_size")); ds->voxel_size = one_point; } else if (EQUAL_ZERO(temp_point.x) || EQUAL_ZERO(temp_point.y) || EQUAL_ZERO(temp_point.z)) { g_warning(_("Detected zero voxel size in CTI file, will try to continue by guessing voxel_size")); ds->voxel_size = one_point; } else ds->voxel_size = temp_point; offset_rp.x = 10*matrix_data->x_origin; offset_rp.y = 10*matrix_data->y_origin; offset_rp.z = 10*matrix_data->z_origin; if (isnan(offset_rp.x) || isnan(offset_rp.y) || isnan(offset_rp.z)) { /*handle corrupted cti files */ g_warning(_("Detected corrupted CTI file, will try to continue by guessing offset")); offset_rp = zero_point; } /* guess the start of the scan is the same as the start of the first frame of data */ /* note, CTI files specify time as integers in msecs */ /* check if we can handle the file type */ switch(libecat_file->mhptr->file_type) { case PetImage: case PetVolume: case InterfileImage: ish = (Image_subheader *) matrix_data->shptr; ds->scan_start = ish->frame_start_time/1000.0; break; case AttenCor: ds->scan_start = 0.0; /* doesn't mean anything */ break; case Sinogram: ssh = (Scan_subheader *) matrix_data->shptr; ds->scan_start = ssh->frame_start_time/1000.0; break; default: break; /* should never get here */ } #ifdef AMIDE_DEBUG g_print("\tscan start time %5.3f\n",ds->scan_start); #endif if (update_func != NULL) { temp_string = g_strdup_printf(_("Importing CTI File:\n %s"), libecat_filename); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } total_planes = dim.z*dim.g*dim.t; divider = ((total_planes/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (total_planes/AMITK_UPDATE_DIVIDER); /* and load in the data */ for (i.t = 0, i_plane=0; (i.t < AMITK_DATA_SET_NUM_FRAMES(ds)) && (continue_work); i.t++) { #ifdef AMIDE_DEBUG g_print("\tloading frame:\t%d",i.t); #endif for (i.g = 0; (i.g < AMITK_DATA_SET_NUM_GATES(ds)) && (continue_work); i.g++) { for (slice=0; (slice < num_slices) && (continue_work) ; slice++) { matnum=mat_numcod(i.t+1,slice+1,i.g+1,0,0);/* frame, plane, gate, data, bed */ /* read in the corresponding cti slice */ if ((matrix_slice = matrix_read(libecat_file, matnum, 0)) == NULL) { num_corrupted_planes+=dim.z/num_slices; /* g_warning(_("Libecat can't get image matrix %x in file %s"), matnum, libecat_filename); */ /* goto error; */ } else { /* set the frame duration, note, CTI files specify time as integers in msecs */ switch(libecat_file->mhptr->file_type) { case PetImage: case PetVolume: case InterfileImage: ish = (Image_subheader *) matrix_slice->shptr; ds->frame_duration[i.t] = ish->frame_duration/1000.0; break; case Normalization: case AttenCor: ds->frame_duration[i.t] = 1.0; /* doesn't mean anything */ break; case Sinogram: ssh = (Scan_subheader *) matrix_slice->shptr; ds->frame_duration[i.t] = ssh->frame_duration/1000.0; break; default: break; /* should never get here */ } for (i.z = slice*(dim.z/num_slices); i.z < dim.z/num_slices + slice*(dim.z/num_slices); i.z++, i_plane++) { if (update_func != NULL) { x = div(i_plane,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, ((gdouble) i_plane)/((gdouble)total_planes)); } /* save the scale factor */ j.x = j.y = 0; j.z = slice; j.g = i.g; j.t = i.t; if (scaling_type == AMITK_SCALING_TYPE_2D) *AMITK_RAW_DATA_DOUBLE_2D_SCALING_POINTER(ds->internal_scaling_factor, j) = calibration_factor*matrix_slice->scale_factor; else if (i.z == 0) /* AMITK_SCALING_TYPE_1D */ *AMITK_RAW_DATA_DOUBLE_1D_SCALING_POINTER(ds->internal_scaling_factor, j) = calibration_factor*matrix_slice->scale_factor; switch (format) { case AMITK_FORMAT_SSHORT: /* copy the data into the volume */ /* note, we compensate here for the fact that we define our origin as the bottom left, not top left like the CTI file */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) AMITK_RAW_DATA_SSHORT_SET_CONTENT(ds->raw_data,i) = *(((amitk_format_SSHORT_t *) matrix_slice->data_ptr) + (dim.y*dim.x*(i.z-slice*(dim.z/num_slices)) +dim.x*(dim.y-i.y-1) +i.x)); break; case AMITK_FORMAT_FLOAT: /* copy the data into the volume */ /* note, we compensate here for the fact that we define our origin as the bottom left, not top left like the CTI file */ for (i.y = 0; i.y < dim.y; i.y++) for (i.x = 0; i.x < dim.x; i.x++) AMITK_RAW_DATA_FLOAT_SET_CONTENT(ds->raw_data,i) = *(((amitk_format_FLOAT_t *) matrix_slice->data_ptr) + (dim.y*dim.x*(i.z-slice*(dim.z/num_slices)) +dim.x*(dim.y-i.y-1) +i.x)); break; default: g_error("unexpected case in %s at %d\n", __FILE__, __LINE__); goto error; break; } /* format */ } /* i.z */ free_matrix_data(matrix_slice); } /* matrix_slice != NULL */ } /* slice */ } /* i.g */ #ifdef AMIDE_DEBUG g_print("\tduration:\t%5.3f\n",ds->frame_duration[i.t]); #endif } /* i.t */ if (num_corrupted_planes > 0) g_warning(_("Libecat returned %d blank planes... corrupted data file? Use data with caution."), num_corrupted_planes); if (!continue_work) goto error; /* setup remaining volume parameters */ amitk_data_set_set_injected_dose(ds, amitk_dose_unit_convert_from(libecat_file->mhptr->dosage, AMITK_DOSE_UNIT_MILLICURIE)); amitk_data_set_set_subject_weight(ds, libecat_file->mhptr->patient_weight); amitk_data_set_set_scale_factor(ds, 1.0); /* set the external scaling factor */ amitk_data_set_calc_far_corner(ds); /* set the far corner of the volume */ amitk_data_set_calc_min_max(ds, update_func, update_data); amitk_volume_set_center(AMITK_VOLUME(ds), offset_rp); goto function_end; error: if (ds != NULL) ds = amitk_object_unref(ds); function_end: if (update_func != NULL) /* remove progress bar */ (*update_func)(update_data, NULL, (gdouble) 2.0); if (libecat_file != NULL) matrix_close(libecat_file); if (matrix_data != NULL) free_matrix_data(matrix_data); setlocale(LC_NUMERIC, saved_time_locale); setlocale(LC_NUMERIC, saved_numeric_locale); g_free(saved_time_locale); g_free(saved_numeric_locale); return ds; } #endif amide-1.0.5/src/fads.c0000664000175000017500000021130612270273770014330 0ustar loeningloening/* fads.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #ifdef AMIDE_LIBGSL_SUPPORT #include #include #include #include #include "fads.h" #include "amitk_data_set_FLOAT_0D_SCALING.h" #define FINAL_MU 1e-07 gchar * fads_minimizer_algorithm_name[NUM_FADS_MINIMIZERS] = { // N_("Steepest Descent"), N_("Fletcher-Reeves conjugate gradient"), N_("Polak-Ribiere conjugate gradient"), // N_("vector BFGS conjugate gradient") }; gchar * fads_type_name[] = { N_("Principle Component Analysis"), N_("Penalized Least Squares Factor Analysis"), N_("2 compartment model") }; gchar * fads_type_explanation[] = { N_("Priniciple Component Analysis based on singular value " "decomposition."), N_("Principle component analysis with positivity constraints " "and a penalized least squares objective, an adaptation " "of Sitek, et al., IEEE Trans. Med. Imag., 2002. If beta " "is set to zero, this is normal factor analysis, similar to " "Di Paola, et al., IEEE Trans. Nuc. Sci., 1982"), N_("Standard 2 compartment model") }; #include "../pixmaps/two_compartment.h" const guint8 * fads_type_icon[NUM_FADS_TYPES] = { NULL, NULL, two_compartment }; static gint perform_svd(gsl_matrix * a, gsl_matrix * v, gsl_vector * s) { gint status; gsl_vector * w; w = gsl_vector_alloc(s->size); g_return_val_if_fail(w != NULL, -1); status = gsl_linalg_SV_decomp(a, v, s, w); gsl_vector_free(w); return status; } void fads_svd_factors(AmitkDataSet * data_set, gint * pnum_factors, gdouble ** pfactors) { gsl_matrix * matrix_a=NULL; gsl_matrix * matrix_v=NULL; gsl_vector * vector_s=NULL; AmitkVoxel dim, i_voxel; gint m,n, i; amide_data_t value; gdouble * factors; gint status; g_return_if_fail(AMITK_IS_DATA_SET(data_set)); dim = AMITK_DATA_SET_DIM(data_set); n = dim.t; m = dim.x*dim.y*dim.z*dim.g; if (n == 1) { g_warning(_("need dynamic data set in order to perform factor analysis")); goto ending; } /* do all the memory allocations upfront */ if ((matrix_a = gsl_matrix_alloc(m,n)) == NULL) { g_warning(_("Failed to allocate %dx%d array"), m,n); goto ending; } if ((matrix_v = gsl_matrix_alloc(n,n)) == NULL) { g_warning(_("Failed to allocate %dx%d array"), n,n); goto ending; } if ((vector_s = gsl_vector_alloc(n)) == NULL) { g_warning(_("Failed to allocate %d vector"), n); goto ending; } /* fill in the a matrix */ for (i_voxel.t = 0; i_voxel.t < dim.t; i_voxel.t++) { i = 0; for (i_voxel.g = 0; i_voxel.g < dim.g; i_voxel.g++) { for (i_voxel.z = 0; i_voxel.z < dim.z; i_voxel.z++) for (i_voxel.y = 0; i_voxel.y < dim.y; i_voxel.y++) for (i_voxel.x = 0; i_voxel.x < dim.x; i_voxel.x++, i++) { value = amitk_data_set_get_value(data_set, i_voxel); gsl_matrix_set(matrix_a, i, i_voxel.t, value); } } } /* get the singular value decomposition of the correlation matrix -> matrix_a = U*S*Vt notes: the function will place the value of U into matrix_a gsl_linalg_SV_decomp_jacobi will return an unsuitable matrix_v, don't use it */ status = perform_svd(matrix_a, matrix_v, vector_s); if (status != 0) g_warning(_("SV decomp returned error: %s"), gsl_strerror(status)); /* transferring data */ if (pnum_factors != NULL) *pnum_factors = n; if (pfactors != NULL) { factors = g_try_new(gdouble, n); if (factors == NULL) { g_warning(_("Failed to allocate %d factor array"), n); goto ending; } *pfactors=factors; for (i=0; i= 0) { if (status == GSL_SUCCESS) fprintf(file_pointer, "# found minimal after %d iterations\n", iter); else if (status == GSL_CONTINUE) fprintf(file_pointer, "# user terminated minization after %d iterations.\n", iter); else { fprintf(file_pointer, "# No minimum after %d iterations, exited with:\n", iter); fprintf(file_pointer, "# %s\n", gsl_strerror(status)); } fprintf(file_pointer, "#\n"); } return; } static gsl_multimin_fdfminimizer * alloc_fdfminimizer(fads_minimizer_algorithm_t minimizer_algorithm, gint num_variables) { switch(minimizer_algorithm) { // case FADS_MINIMIZER_STEEPEST_DESCENT: // return gsl_multimin_fdfminimizer_alloc(gsl_multimin_fdfminimizer_steepest_descent, // num_variables); // break; case FADS_MINIMIZER_CONJUGATE_FR: return gsl_multimin_fdfminimizer_alloc(gsl_multimin_fdfminimizer_conjugate_fr, num_variables); break; case FADS_MINIMIZER_CONJUGATE_PR: return gsl_multimin_fdfminimizer_alloc(gsl_multimin_fdfminimizer_conjugate_pr, num_variables); break; // case FADS_MINIMIZER_VECTOR_BFGS: // return gsl_multimin_fdfminimizer_alloc(gsl_multimin_fdfminimizer_vector_bfgs, // num_variables); // break; default: g_error("no such minimizer algorithm %d\n", minimizer_algorithm); return NULL; break; } } static void perform_pca(AmitkDataSet * data_set, gint num_factors, gsl_matrix ** return_u, gsl_vector ** return_s, gsl_matrix ** return_v) { AmitkVoxel dim, i_voxel; guint num_voxels, num_frames; gsl_matrix * u = NULL; gsl_matrix * v = NULL; gsl_vector * s = NULL; gsl_matrix * small_u; gsl_matrix * small_v; gsl_vector * small_s; guint i, f, j; gint status; gdouble total; dim = AMITK_DATA_SET_DIM(data_set); num_voxels = dim.x*dim.y*dim.z*dim.g; num_frames = dim.t; u = gsl_matrix_alloc(num_voxels, num_frames); if (u == NULL) { g_warning(_("failed to alloc matrix, size %dx%d"), num_voxels, num_frames); goto ending; } if ((v = gsl_matrix_alloc(num_frames,num_frames)) == NULL) { g_warning(_("Failed to allocate %dx%d array"), num_frames, num_frames); goto ending; } if ((s = gsl_vector_alloc(num_frames)) == NULL) { g_warning(_("Failed to allocate %d vector"), num_frames); goto ending; } /* copy the info into the matrix */ for (i_voxel.t = 0; i_voxel.t < num_frames; i_voxel.t++) { i = 0; for (i_voxel.g = 0; i_voxel.g < dim.g; i_voxel.g++) for (i_voxel.z = 0; i_voxel.z < dim.z; i_voxel.z++) for (i_voxel.y = 0; i_voxel.y < dim.y; i_voxel.y++) for (i_voxel.x = 0; i_voxel.x < dim.x; i_voxel.x++, i++) gsl_matrix_set(u, i, i_voxel.t, amitk_data_set_get_value(data_set, i_voxel)); } /* do Singular Value decomposition */ status = perform_svd(u, v, s); if (status != 0) g_warning(_("SV decomp returned error: %s"), gsl_strerror(status)); /* do some obvious flipping */ for (f=0; fsum_factors_equal_one) { for (k=0, i=p->alpha_offset; k < p->num_voxels; k++, i+=p->num_factors) { total = -1.0; for (f=0; fnum_factors; f++) total += gsl_vector_get(v, i+f); p->ec_a[k] = total; } } /* blood curve constraints */ for (i=0; inum_blood_curve_constraints; i++) { bc = gsl_vector_get(v, p->blood_curve_constraint_frame[i]); p->ec_bc[i] = bc - p->blood_curve_constraint_val[i]; } } static void pls_calc_forward_error(pls_params_t * p, const gsl_vector *v) { gint i, k, f; AmitkVoxel i_voxel; gdouble inner; gdouble alpha; gdouble factor; for (i_voxel.t=0; i_voxel.tdim.t; i_voxel.t++) { i=p->alpha_offset; /* what to skip in v to get to the coefficients */ k=0; for (i_voxel.g=0; i_voxel.gdim.g; i_voxel.g++) { for (i_voxel.z=0; i_voxel.zdim.z; i_voxel.z++) { for (i_voxel.y=0; i_voxel.ydim.y; i_voxel.y++) { for (i_voxel.x=0; i_voxel.xdim.x; i_voxel.x++, i+=p->num_factors, k+=p->num_frames) { inner = 0.0; for (f=0; f< p->num_factors; f++) { alpha = gsl_vector_get(v, i+f); factor = gsl_vector_get(v, f*p->num_frames+i_voxel.t); inner += alpha*factor; } p->forward_error[k+i_voxel.t] = inner - amitk_data_set_get_value(p->data_set,i_voxel); } } } } } return; } static gdouble pls_calc_function(pls_params_t * p, const gsl_vector *v) { gdouble ls_answer=0.0; gdouble neg_answer=0.0; gdouble orth_answer=0.0; gdouble blood_answer=0.0; gdouble temp, lambda, factor, alpha; gint i, j, f, l; /* the Least Squares objective */ ls_answer = 0.0; for (j=0; jnum_frames; j++) { for (i=0; inum_voxels; i++) { temp = p->forward_error[i*p->num_frames+j]; ls_answer += p->weight[j]*temp*temp; } } p->ls = ls_answer; /* the non-negativity constraints */ neg_answer = 0.0; for (f=0; fnum_factors; f++) { for (j=0; jnum_frames; j++) { factor = gsl_vector_get(v, f*p->num_frames+j); lambda = p->lmi_f[f*p->num_frames+j]; if ((factor-p->mu*lambda) < 0.0) neg_answer += factor*(factor/(2.0*p->mu) - lambda); else neg_answer -= lambda*lambda*p->mu/2.0; } } for (l=0, i=p->alpha_offset; lnum_voxels; l++, i+=p->num_factors) { for (f=0; fnum_factors; f++) { alpha = gsl_vector_get(v, i+f); lambda = p->lmi_a[l*p->num_factors+f]; if ((alpha-p->mu*lambda) < 0.0) neg_answer += alpha*(alpha/(2.0*p->mu) - lambda); else neg_answer -= lambda*lambda*p->mu/2.0; } } /* the sum of alpha's == 1 constraint */ if (p->sum_factors_equal_one) { for (i=0; i< p->num_voxels; i++) neg_answer += p->ec_a[i]*(p->ec_a[i]/(2.0*p->mu) - p->lme_a[i]); } p->neg = neg_answer; /* the orthogonality objective */ orth_answer = 0.0; #if 0 for (l=0; lnum_voxels; l++) if ((p->coef_total[l] < 1.0) && (p->coef_total[l] > 0)) orth_answer += (2*p->coef_total[l]-p->coef_squared_total[l]-p->coef_total[l]*p->coef_total[l]); orth_answer *= 0.5; p->orth = orth_answer; orth_answer *= 0.5*p->b; /* weight this objective by b */ #endif /* blood curve constraints */ blood_answer = 0; for (i=0; inum_blood_curve_constraints; i++) blood_answer += p->ec_bc[i]*(p->ec_bc[i]/(2.0*p->mu) - p->lme_bc[i]); p->blood = blood_answer; return ls_answer+neg_answer+orth_answer+blood_answer; } static void pls_calc_derivative(pls_params_t * p, const gsl_vector *v, gsl_vector *df) { gdouble ls_answer=0.0; gdouble neg_answer=0.0; gdouble orth_answer; gdouble blood_answer=0.0; gdouble factor, alpha, lambda; gint i, j, k, l, q; //f /* calculate first for the factor variables */ for (q= 0; q < p->num_factors; q++) { for (j=0; jnum_frames; j++) { factor = gsl_vector_get(v, q*p->num_frames+j); /* the Least Squares objective */ ls_answer = 0.0; /* p->coef_offset is what to skip in v to get to the coefficients */ for (i=p->alpha_offset, k=0; k < p->num_frames*p->num_voxels; i+=p->num_factors, k+=p->num_frames) { alpha = gsl_vector_get(v, i+q); ls_answer += alpha*p->forward_error[k+j]; } ls_answer *= 2.0*p->weight[j]; /* the non-negativity objective */ lambda = p->lmi_f[q*p->num_frames+j]; if ((factor - p->mu*lambda) < 0.0) neg_answer = factor/p->mu-lambda; else neg_answer = 0; /* blood curve constraints */ blood_answer = 0; if (q == 0) /* 1st factor is blood curve */ for (i=0; inum_blood_curve_constraints; i++) if (p->blood_curve_constraint_frame[i] == j) blood_answer += p->ec_bc[i]/p->mu - p->lme_bc[i]; gsl_vector_set(df, q*p->num_frames+j, ls_answer+neg_answer+blood_answer); } } /* now calculate for the coefficient variables */ for (q= 0; q < p->num_factors; q++) { for (i=p->alpha_offset, k=0, l=0; i < p->num_variables; i+=p->num_factors, k+=p->num_frames, l++) { alpha = gsl_vector_get(v, i+q); /* the Least Squares objective */ ls_answer = 0; for (j=0; jnum_frames; j++) { factor = gsl_vector_get(v, q*p->num_frames+j); ls_answer += p->weight[j]*p->forward_error[k+j]*factor; } ls_answer *= 2.0; /* the non-negativity and <= 1 objective */ lambda = p->lmi_a[l*p->num_factors+q]; if ((alpha-p->mu*lambda) < 0.0) neg_answer = alpha/p->mu-lambda; else neg_answer = 0; /* the sum of alpha's == 1 constraint */ if (p->sum_factors_equal_one) { neg_answer += p->ec_a[l]/p->mu - p->lme_a[l]; } /* the orthogonality objective */ #if 0 if ((p->coef_total[l] < 1.0) && (p->coef_total[l] > 0)) orth_answer = p->b*(1.0-alpha-p->coef_total[l]); else #endif orth_answer = 0; gsl_vector_set(df, i+q, ls_answer+neg_answer+orth_answer); } } return; } /* calculate the penalized least squares objective function */ static double pls_f (const gsl_vector *v, void *params) { pls_params_t * p = params; pls_calc_constraints(p,v); pls_calc_forward_error(p, v); return pls_calc_function(p, v); } /* The gradient of f, df = (df/dCip, df/dFpt). */ static void pls_df (const gsl_vector *v, void *params, gsl_vector *df) { pls_params_t * p = params; pls_calc_constraints(p,v); pls_calc_forward_error(p, v); pls_calc_derivative(p, v, df); return; } /* Compute both f and df together. */ static void pls_fdf (const gsl_vector *v, void *params, double *f, gsl_vector *df) { pls_params_t * p = params; pls_calc_constraints(p,v); pls_calc_forward_error(p, v); *f = pls_calc_function(p,v); pls_calc_derivative(p, v, df); return; } /* run the penalized least squares algorithm for factor analysis. -this method is described in: Sitek, et al., IEEE Trans Med Imaging, 21, 2002, pages 216-225 differences in my version: 1-instead of reweighting the coefficents at the end of the fitting, the coefficients are penalized for being greater then 1, and their total for each voxel has to equal 1. 2-weights the least square terms by their respective frame duration Constrained optimization is done by using an augmented lagrangian method, see Chapter 17.4 of "Numerical Optimization" - Nocedal & Wright. gsl supports minimizing on only a single vector space, so that vector is setup as follows M = num_voxels; N = num_frames F = num_factors; factors = [F*N] coefficients = [M*F] x = [factor(1,1) factor(1,2) ...... factor(1,N) factor(2,1) factor(2,2) ...... factor(2,N) .. .. .. factor(F,1 factor(F,2) ...... factor(F,N) alpha(1,1) alpha(1,2) ...... alpha(1,F) alpha(2,1) alpha(2,2) ...... alpha(2,F) .. .. .. alpha(M,1) alpha(M,2) ...... alpha(M,F)] forward_error is [M*N] */ void fads_pls(AmitkDataSet * data_set, gint num_factors, fads_minimizer_algorithm_t minimizer_algorithm, gint max_iterations, gdouble stopping_criteria, gboolean sum_factors_equal_one, gdouble beta, gchar * output_filename, gint num_blood_curve_constraints, gint * blood_curve_constraint_frame, gdouble * blood_curve_constraint_val, GArray * initial_curves, AmitkUpdateFunc update_func, gpointer update_data) { gsl_multimin_fdfminimizer * multimin_minimizer = NULL; gsl_multimin_function_fdf multimin_func; AmitkVoxel dim; pls_params_t p; gint inner_iter=0; gint outer_iter=0; gsl_vector * initial=NULL; gint i, f, j; gint status; FILE * file_pointer=NULL; gchar * temp_string; gboolean continue_work=TRUE; gdouble alpha, factor; amide_time_t frame_midpoint, frame_duration; gdouble init_value; gdouble magnitude; AmitkDataSet * new_ds; AmitkVoxel i_voxel; gdouble current_beta=0.0; AmitkViewMode i_view_mode; GTimer * timer=NULL; gboolean new_outer; #if AMIDE_DEBUG div_t x; #endif g_return_if_fail(AMITK_IS_DATA_SET(data_set)); dim = AMITK_DATA_SET_DIM(data_set); g_return_if_fail(num_factors <= dim.t); /* initialize our parameter structure */ p.data_set = data_set; p.dim = dim; p.mu = 1000; p.b = 0.0; p.ls = 0.0; p.neg = 0.0; p.orth = 0.0; p.blood = 0.0; p.num_voxels = dim.g*dim.z*dim.y*dim.x; p.num_frames = dim.t; p.num_factors = num_factors; p.alpha_offset = p.num_factors*p.num_frames; p.num_variables = p.alpha_offset+p.num_factors*p.num_voxels; p.sum_factors_equal_one = sum_factors_equal_one; p.num_blood_curve_constraints = num_blood_curve_constraints; p.blood_curve_constraint_frame = blood_curve_constraint_frame; p.blood_curve_constraint_val = blood_curve_constraint_val; p.forward_error = NULL; p.weight = NULL; p.ec_a = NULL; p.ec_bc = NULL; p.lme_a = NULL; p.lme_bc = NULL; p.lmi_a = NULL; p.lmi_f = NULL; /* more sanity checks */ for (i=0; ilen < p.num_frames*p.num_factors) { g_warning(_("Supplied initial curves have %d elements, need %d x %d = %d elements"), initial_curves->len, p.num_frames, p.num_factors, p.num_frames*p.num_factors); goto ending; } } p.forward_error = g_try_new(gdouble, p.num_frames*p.num_voxels); if (p.forward_error == NULL) { g_warning(_("failed forward error malloc")); goto ending; } /* calculate the weights and magnitude */ p.weight = calc_weights(p.data_set); if (p.weight == NULL) { g_warning(_("failed weight malloc")); goto ending; } magnitude = calc_magnitude(p.data_set, p.weight); if (p.sum_factors_equal_one) { p.ec_a = g_try_new(gdouble, p.num_voxels); if (p.ec_a == NULL) { g_warning(_("failed equality constraint alpha malloc")); goto ending; } } p.ec_bc = g_try_new(gdouble, p.num_blood_curve_constraints); if ((p.ec_bc == NULL) && (p.num_blood_curve_constraints > 0)) { g_warning(_("failed equality constraint blood curve malloc")); goto ending; } if (p.sum_factors_equal_one) { p.lme_a = g_try_new(gdouble, p.num_voxels); if (p.lme_a == NULL) { g_warning(_("failed malloc for equality lagrange multiplier - alpha")); goto ending; } for (i=0; i 0)) { g_warning(_("failed malloc for equality lagrange multiplier - blood curve")); goto ending; } for (i=0; igradient, stopping_criteria); if (timer != NULL) { /* we only update things if at least 1 second has passed or we're at the start of a new loop */ if ((g_timer_elapsed(timer,NULL) > 1.0) || (new_outer)) { new_outer = FALSE; if (update_func != NULL) continue_work = (*update_func)(update_data, NULL, (gdouble) inner_iter/max_iterations); g_timer_start(timer); /* reset the timer */ #if AMIDE_DEBUG g_print("iter %d-%d\t%10.9g = %5.3g + %5.3g + %5.3g + %5.3g\t%g\t%g \r", outer_iter, inner_iter, 100.0*gsl_multimin_fdfminimizer_minimum(multimin_minimizer)/magnitude, 100.0*p.ls/magnitude, 100.0*p.neg/magnitude, 100.0*p.b*p.orth/magnitude, 100.0*p.blood/magnitude, p.mu, (beta > 0) ? 100*(current_beta/beta) : 0.0); #endif /* AMIDE_DEBUG */ } #if AMIDE_DEBUG x = div(inner_iter,1000); if (x.rem == 0) g_print("\n"); #endif /* AMIDE_DEBUG */ } if (inner_iter >= max_iterations) status = GSL_EMAXITER; if (isnan(gsl_multimin_fdfminimizer_minimum(multimin_minimizer))) status = GSL_ERUNAWAY; else gsl_vector_memcpy(initial, multimin_minimizer->x); } while ((status == GSL_CONTINUE) && continue_work); /* inner loop */ #if AMIDE_DEBUG g_print("\n"); #endif /* AMIDE_DEBUG */ /* adjust lagrangian conditions */ if (((status == GSL_SUCCESS) || (status == GSL_ENOPROG) || (status == GSL_ERUNAWAY)) && continue_work && ((p.mu > FINAL_MU) || (current_beta < beta))) { #if AMIDE_DEBUG if (status == GSL_ENOPROG) g_print("--- previous iteration was not making progress towards a solution ---\n"); else if (status == GSL_ERUNAWAY) g_print("--- previous iteration ran away, reseting to last good value ---\n"); #endif if (status == GSL_ERUNAWAY) { /* need to recompute ec's */ pls_calc_constraints(&p, initial); } /* adjust lagrangian's */ for (i=0; i FINAL_MU) p.mu *= 0.7; status = GSL_CONTINUE; } } while ((status == GSL_CONTINUE) && continue_work); /* outer loop */ #if AMIDE_DEBUG if (status == GSL_SUCCESS) g_print("Minimum found after %d iterations\n", inner_iter); else if (status == GSL_CONTINUE) g_print("terminated minization \n"); else g_print("No minimum found after %d iterations, exited with: %s\n", inner_iter,gsl_strerror(status)); #endif /* AMIDE_DEBUG */ if (update_func != NULL) /* remove progress bar */ continue_work = (*update_func)(update_data, NULL, (gdouble) 2.0); /* add the different coefficients to the tree */ dim.t = 1; i_voxel.t = 0; for (f=0; fsum_factors_equal_one) { for (k=0, i=p->alpha_offset; k < p->num_voxels; k++, i+=p->num_factors) { total = -1.0; for (f=0; fnum_factors; f++) total += gsl_vector_get(v, i+f); p->ec_a[k] = total; } } /* blood curve constraints */ for (i=0; inum_blood_curve_constraints; i++) { bc = gsl_vector_get(v, p->blood_curve_constraint_frame[i]); p->ec_bc[i] = bc-p->blood_curve_constraint_val[i];; } } static void two_comp_calc_compartments(two_comp_params_t * p, const gsl_vector *v) { gint j, k, t; gdouble convolution_value, kernel; gdouble k12, bc; for (t=0; tnum_tissues; t++) { k12 = gsl_vector_get(v, p->k12_offset+t); for (j=0; jnum_frames; j++) { convolution_value=0; for (k=0; k < j; k++) { bc = gsl_vector_get(v, p->bc_offset+k); if (fabs(k12) < EPSILON) kernel = p->end[k]-p->start[k]; else kernel = (exp(-k12*(p->midpt[j]-p->end[k]))-exp(-k12*(p->midpt[j]-p->start[k])))/k12; convolution_value += bc*kernel; } /* k == j */ bc = gsl_vector_get(v, p->bc_offset+j); if (fabs(k12) < EPSILON) kernel = p->midpt[j]-p->start[j]; else kernel = (1-exp(-k12*(p->midpt[j]-p->start[j])))/k12; convolution_value += bc*kernel; p->tc_unscaled[j*p->num_tissues+t] = convolution_value; } } return; } static void two_comp_calc_forward_error(two_comp_params_t * p, const gsl_vector *v) { gint i, k, t; AmitkVoxel i_voxel; gdouble bc; gdouble k21; gdouble inner, alpha; for (i_voxel.t=0; i_voxel.tdim.t; i_voxel.t++) { i=p->alpha_offset; k=0; bc = gsl_vector_get(v, p->bc_offset+i_voxel.t); for (i_voxel.g=0; i_voxel.gdim.g; i_voxel.g++) { for (i_voxel.z=0; i_voxel.zdim.z; i_voxel.z++) { for (i_voxel.y=0; i_voxel.ydim.y; i_voxel.y++) { for (i_voxel.x=0; i_voxel.xdim.x; i_voxel.x++, k++, i+=p->num_factors) { inner=0; for (t=0; t < p->num_tissues; t++) { k21 = gsl_vector_get(v, p->k21_offset+t); alpha = gsl_vector_get(v, i+t); inner += alpha*k21*p->tc_unscaled[i_voxel.t*p->num_tissues+t]; } alpha = gsl_vector_get(v, i+p->num_tissues); p->forward_error[k*p->num_frames+i_voxel.t] = alpha*bc+inner-amitk_data_set_get_value(p->data_set,i_voxel); } } } } } return; } static gdouble two_comp_calc_function(two_comp_params_t * p, const gsl_vector *v) { gdouble ls_answer=0.0; gdouble neg_answer=0.0; gdouble blood_answer=0.0; gdouble temp, bc, k12, k21, alpha, lambda; gint i, k, j, f, t; /* the Least Squares objective */ ls_answer = 0.0; for (i=0; inum_voxels; i++) { for (j=0; jnum_frames; j++) { temp = p->forward_error[i*p->num_frames+j]; ls_answer += p->weight[j]*temp*temp; } } neg_answer = 0.0; /* non negativity for the k12's */ for (t=0; tnum_tissues; t++) { k12 = gsl_vector_get(v, p->k12_offset+t); lambda = p->lmi_k12[t]; if ((k12-p->mu*lambda) < 0.0) neg_answer += k12*(k12/(2.0*p->mu)-lambda); else neg_answer -= lambda*lambda*p->mu/2.0; } /* non negativity for the k21's */ for (t=0; tnum_tissues; t++) { k21 = gsl_vector_get(v, p->k21_offset+t); lambda = p->lmi_k21[t]; if ((k21-p->mu*lambda) < 0.0) neg_answer += k21*(k21/(2.0*p->mu)-lambda); else neg_answer -= lambda*lambda*p->mu/2.0; } /* non-negativity for the blood curve */ for (j=0; jnum_frames; j++) { bc = gsl_vector_get(v, p->bc_offset+j); lambda = p->lmi_bc[j]; if ((bc-p->mu*lambda) < 0.0) neg_answer += bc*(bc/(2.0*p->mu) - lambda); else neg_answer -= lambda*lambda*p->mu/2.0; } /* non-negativity for the alpha's */ for (k=0, i=p->alpha_offset; knum_voxels; k++, i+=p->num_factors) { for (f=0; fnum_factors; f++) { alpha = gsl_vector_get(v, i+f); lambda = p->lmi_a[k*p->num_factors+f]; if ((alpha-p->mu*lambda) < 0.0) neg_answer += alpha*(alpha/(2.0*p->mu) - lambda); else neg_answer -= lambda*lambda*p->mu/2.0; } } /* the sum of alpha's == 1 constraint */ if (p->sum_factors_equal_one) { for (k=0; k< p->num_voxels; k++) neg_answer += p->ec_a[k]*(p->ec_a[k]/(2.0*p->mu) - p->lme_a[k]); } /* blood curve constraints */ blood_answer = 0; for (i=0; inum_blood_curve_constraints; i++) blood_answer += p->ec_bc[i]*(p->ec_bc[i]/(2.0*p->mu) - p->lme_bc[i]); /* keep track of the three */ p->ls = ls_answer; p->neg = neg_answer; p->blood = blood_answer; return ls_answer+neg_answer+blood_answer; } static void two_comp_calc_derivative(two_comp_params_t * p, const gsl_vector *v, gsl_vector *df) { gdouble ls_answer, neg_answer, blood_answer; gint f, i, j, k, t; gdouble k12, k21, bc, inner, kernel, alpha; gdouble delta1, delta2, lambda; /* partial derivative of f wrt to the k12's */ for (t=0; tnum_tissues; t++) { k12 = gsl_vector_get(v, p->k12_offset+t); k21 = gsl_vector_get(v, p->k21_offset+t); ls_answer=0; for (i=0; inum_voxels; i++) { for (j=0; jnum_frames; j++) { inner = 0; for (k=0; kmidpt[j]-p->end[k]; delta2 = p->midpt[j]-p->start[k]; if (fabs(k12) < EPSILON) kernel = 0.5*(delta1*delta1-delta2*delta2); else kernel = (-delta1*exp(-k12*delta1)+delta2*exp(-k12*delta2))/k12; bc = gsl_vector_get(v, p->bc_offset+k); inner += bc*kernel; } /* k == j */ delta2 = p->midpt[j]-p->start[j]; if (fabs(k12) < EPSILON) kernel = -0.5*(delta2*delta2); else kernel = (delta2*exp(-k12*delta2))/k12; bc = gsl_vector_get(v, p->bc_offset+j); inner += bc*kernel; if (fabs(k12) > EPSILON) inner -= p->tc_unscaled[j*p->num_tissues+t]/k12; alpha = gsl_vector_get(v, p->alpha_offset+i*p->num_factors+t); ls_answer += p->weight[j]*p->forward_error[i*p->num_frames+j] * alpha*k21*inner; } } ls_answer *=2; /* the non-negatvity objective */ lambda = p->lmi_k12[t]; if ((k12 - p->mu*lambda) < 0.0) neg_answer = k12/p->mu - lambda; else neg_answer = 0.0; gsl_vector_set(df, p->k12_offset+t, ls_answer+neg_answer); } /* partial derivative of f wrt to the k21's */ for (t=0; tnum_tissues; t++) { k21 = gsl_vector_get(v, p->k21_offset+t); ls_answer=0; for (i=0; inum_voxels; i++) { alpha = gsl_vector_get(v, p->alpha_offset+i*p->num_factors +t); for (j=0; jnum_frames; j++) { ls_answer += p->weight[j]* p->forward_error[i*p->num_frames+j] * alpha* p->tc_unscaled[j*p->num_tissues+t]; } } ls_answer *=2; /* the non-negatvity objective */ lambda = p->lmi_k21[t]; if ((k21 - p->mu*lambda) < 0.0) neg_answer = k21/p->mu - lambda; else neg_answer = 0.0; gsl_vector_set(df, p->k21_offset+t, ls_answer+neg_answer); } /* partial derivative of f wrt to the blood curve */ for (j=0; jnum_frames; j++) { bc = gsl_vector_get(v, p->bc_offset+j); ls_answer=0; for (i=0; inum_voxels; i++) { /* k == j */ inner = gsl_vector_get(v, p->alpha_offset+i*p->num_factors+p->num_tissues); for (t=0; t< p->num_tissues; t++) { alpha = gsl_vector_get(v, p->alpha_offset+i*p->num_factors+t); k12 = gsl_vector_get(v, p->k12_offset+t); k21 = gsl_vector_get(v, p->k21_offset+t); if (fabs(k12) < EPSILON) { kernel = p->midpt[j]-p->start[j]; } else { kernel = (1-exp(-k12*(p->midpt[j]-p->start[j])))/k12; } inner += alpha*k21*kernel; } ls_answer += p->weight[j]*p->forward_error[i*p->num_frames+j]*inner; /* k > j */ for (k=j+1; knum_frames; k++) { inner = 0; for (t=0; t< p->num_tissues; t++) { alpha = gsl_vector_get(v, p->alpha_offset+i*p->num_factors+t); k12 = gsl_vector_get(v, p->k12_offset+t); k21 = gsl_vector_get(v, p->k21_offset+t); if (fabs(k12) < EPSILON) { kernel = p->end[j]-p->start[j]; } else { kernel = (exp(-k12*(p->midpt[k]-p->end[j]))-exp(-k12*(p->midpt[k]-p->start[j])))/k12; } inner += alpha*k21*kernel; } ls_answer += p->weight[k]*p->forward_error[i*p->num_frames+k]*inner; } } ls_answer *= 2; /* the non-negatvity objective */ lambda = p->lmi_bc[j]; if ((bc - p->mu*lambda) < 0.0) neg_answer = bc/p->mu - lambda; else neg_answer = 0.0; /* blood curve constraints */ blood_answer = 0; for (i=0; inum_blood_curve_constraints; i++) if (p->blood_curve_constraint_frame[i] == j) blood_answer += p->ec_bc[i]/p->mu - p->lme_bc[i]; gsl_vector_set(df, p->bc_offset+j, ls_answer+neg_answer+blood_answer); } /* partial derivative of f wrt to the alpha's */ for (i=0; inum_voxels; i++) { for (f=0; f< p->num_factors; f++) { alpha = gsl_vector_get(v, p->alpha_offset+i*p->num_factors+f); ls_answer = 0; for (j=0; j< p->num_frames; j++) { if (f < p->num_tissues) { k21 = gsl_vector_get(v, p->k21_offset+f); inner = k21*p->tc_unscaled[j*p->num_tissues+f]; } else { bc = gsl_vector_get(v, p->bc_offset+j); inner = bc; } ls_answer += p->weight[j]*p->forward_error[i*p->num_frames+j]*inner; } ls_answer *=2; /* the non-negatvity and <= 1 objective */ lambda = p->lmi_a[i*p->num_factors+f]; if ((alpha - p->mu*lambda) < 0.0) neg_answer = alpha/p->mu - lambda; else neg_answer = 0.0; /* the sum of alpha's == 1 constraint */ if (p->sum_factors_equal_one) { neg_answer += p->ec_a[i]/p->mu - p->lme_a[i]; } gsl_vector_set(df, p->alpha_offset+i*p->num_factors+f, ls_answer + neg_answer); } } return; } /* calculate the two compartment objective function */ static double two_comp_f (const gsl_vector *v, void *params) { two_comp_params_t * p = params; two_comp_calc_constraints(p, v); two_comp_calc_compartments(p,v); two_comp_calc_forward_error(p, v); return two_comp_calc_function(p, v); } /* The gradient of f, df = (df/dQt, df/dKij, df/dTi). */ static void two_comp_df (const gsl_vector *v, void *params, gsl_vector *df) { two_comp_params_t * p = params; two_comp_calc_constraints(p, v); two_comp_calc_compartments(p,v); two_comp_calc_forward_error(p, v); two_comp_calc_derivative(p, v, df); return; } /* Compute both f and df together. */ static void two_comp_fdf (const gsl_vector *v, void *params, double *f, gsl_vector *df) { two_comp_params_t * p = params; two_comp_calc_constraints(p, v); two_comp_calc_compartments(p,v); two_comp_calc_forward_error(p, v); *f = two_comp_calc_function(p,v); two_comp_calc_derivative(p, v, df); return; } /* run a two compartment algorithm for factor analysis gsl supports minimizing on only a single vector space, so that vector is setup as follows M = num_voxels; N = num_frames F = num_factors (the last factor is the blood curve) bc = blood curve alpha = coefficent's x = [k12(1) k12(2) ...... k12(F-1) k21(1) k21(2) ...... k21(F-1) bc(1) bc(2) ...... bc(N) alpha(1,1) alpha(1,2) ...... alpha(1, F) alpha(2,1) alpha(2,2) ...... alpha(2, F) ...... alpha(M,1) alpha(M,2) ...... alpha(M, F) ] forward_error is [M*N] tc_unscaled is [N*F] */ void fads_two_comp(AmitkDataSet * data_set, fads_minimizer_algorithm_t minimizer_algorithm, gint max_iterations, gint tissue_types, gdouble supplied_k12, gdouble supplied_k21, gdouble stopping_criteria, gboolean sum_factors_equal_one, gchar * output_filename, gint num_blood_curve_constraints, gint * blood_curve_constraint_frame, gdouble * blood_curve_constraint_val, AmitkUpdateFunc update_func, gpointer update_data) { gsl_multimin_fdfminimizer * multimin_minimizer = NULL; gsl_multimin_function_fdf multimin_func; AmitkVoxel dim; two_comp_params_t p; gint outer_iter=0; gint inner_iter=0; gsl_vector * initial=NULL; gint i, f, j, t; gint status; FILE * file_pointer=NULL; gchar * temp_string; gboolean continue_work=TRUE; gdouble temp, bc; amide_time_t frame_midpoint, frame_duration; amide_time_t time_constant; amide_time_t time_start; AmitkDataSet * new_ds; AmitkVoxel i_voxel; gdouble magnitude, k12, k21; gdouble init_value, alpha; AmitkViewMode i_view_mode; GTimer * timer=NULL; gboolean new_outer; #if AMIDE_DEBUG div_t x; #endif g_return_if_fail(AMITK_IS_DATA_SET(data_set)); dim = AMITK_DATA_SET_DIM(data_set); g_return_if_fail(tissue_types >= 1); /* initialize our parameter structure */ p.data_set = data_set; p.dim = dim; p.mu = 1000.0; p.ls = 0.0; p.neg = 0.0; p.blood = 0.0; p.num_voxels = dim.g*dim.z*dim.y*dim.x; p.num_frames = dim.t; p.num_factors = tissue_types+1; p.num_tissues = tissue_types; p.k12_offset = 0; p.k21_offset = p.k12_offset + p.num_tissues; p.bc_offset = p.k21_offset + p.num_tissues; p.alpha_offset = p.bc_offset+p.num_frames; p.num_variables = p.alpha_offset + p.num_factors*p.num_voxels; p.tc_unscaled = NULL; p.forward_error = NULL; p.start = NULL; p.end = NULL; p.ec_a = NULL; p.ec_bc = NULL; p.lme_a = NULL; p.lme_bc = NULL; p.lmi_a = NULL; p.lmi_bc = NULL; p.lmi_k12 = NULL; p.lmi_k12 = NULL; p.sum_factors_equal_one = sum_factors_equal_one; p.num_blood_curve_constraints = num_blood_curve_constraints; p.blood_curve_constraint_frame = blood_curve_constraint_frame; p.blood_curve_constraint_val = blood_curve_constraint_val; /* more sanity checks */ for (i=0; i 0)) { g_warning(_("failed malloc for equality constraint on blood curve")); goto ending; } if (p.sum_factors_equal_one) { p.lme_a = g_try_new(gdouble, p.num_voxels); if (p.lme_a == NULL) { g_warning(_("failed malloc for equality lagrange multiplier - alpha")); goto ending; } for (i=0; i 0)) { g_warning(_("failed malloc for equality lagrange multiplier - blood curve")); goto ending; } for (i=0; igradient, stopping_criteria); if (timer != NULL) { /* we only update things if at least 1 second has passed or we're at the start of a new loop */ if ((g_timer_elapsed(timer,NULL) > 1.0) || (new_outer)) { new_outer = FALSE; if (update_func != NULL) continue_work = (*update_func)(update_data, NULL, (gdouble) inner_iter/max_iterations); g_timer_start(timer); /* reset the timer */ #if AMIDE_DEBUG g_print("iter %d %d %10.9g=%5.3g+%5.3g+%5.3g mu=%g k12=%g k21=%g \r", outer_iter, inner_iter, 100.0*gsl_multimin_fdfminimizer_minimum(multimin_minimizer)/magnitude, 100.0*p.ls/magnitude, 100.0*p.neg/magnitude, 100.0*p.blood/magnitude, p.mu, gsl_vector_get(multimin_minimizer->x, p.k12_offset), gsl_vector_get(multimin_minimizer->x, p.k21_offset)); // g_print("bc %g %g tc %g %g alpha %g %g\n", // gsl_vector_get(multimin_minimizer->x, p.bc_offset), // gsl_vector_get(multimin_minimizer->x, p.bc_offset+1), // p.tc_unscaled[0], p.tc_unscaled[1], // gsl_vector_get(multimin_minimizer->x, p.alpha_offset), // gsl_vector_get(multimin_minimizer->x, p.alpha_offset+1)); #endif /* AMIDE_DEBUG */ } #if AMIDE_DEBUG x = div(inner_iter,1000); if (x.rem == 0) g_print("\n"); #endif /* AMIDE_DEBUG */ } if (inner_iter >= max_iterations) status = GSL_EMAXITER; if (isnan(gsl_multimin_fdfminimizer_minimum(multimin_minimizer))) status = GSL_ERUNAWAY; else gsl_vector_memcpy(initial, multimin_minimizer->x); } while ((status == GSL_CONTINUE) && continue_work); /* inner loop */ #if AMIDE_DEBUG g_print("\n"); #endif /* adjust lagrangian conditions */ if (((status == GSL_SUCCESS) || (status == GSL_ENOPROG) || (status == GSL_ERUNAWAY)) && continue_work && (p.mu > FINAL_MU)) { #if AMIDE_DEBUG if (status == GSL_ENOPROG) g_print("--- previous iteration was not making progress towards a solution ---\n"); else if (status == GSL_ERUNAWAY) g_print("--- previous iteration ran away, reseting to last good value ---\n"); #endif if (status == GSL_ERUNAWAY) { /* need to recompute ec's */ two_comp_calc_constraints(&p, initial); } /* adjust lagrangian's */ for (i=0; i FINAL_MU) { p.mu *= 0.7; } status = GSL_CONTINUE; } } while ((status == GSL_CONTINUE) && continue_work); /* outer loop */ #if AMIDE_DEBUG if (status == GSL_SUCCESS) g_print(_("Minimum found after %d iterations\n"), inner_iter); else if (status == GSL_CONTINUE) g_print(_("terminated minization \n")); else g_print(_("No minimum found after %d iterations, exited with: %s\n"), inner_iter,gsl_strerror(status)); #endif /* AMIDE_DEBUG */ if (update_func != NULL) /* remove progress bar */ continue_work = (*update_func)(update_data, NULL, (gdouble) 2.0); /* add the different coefficients to the tree */ dim.t = 1; i_voxel.t = 0; for (f=0; f < p.num_factors; f++) { new_ds = amitk_data_set_new_with_data(NULL, AMITK_DATA_SET_MODALITY(data_set), AMITK_FORMAT_FLOAT, dim, AMITK_SCALING_TYPE_0D); if (new_ds == NULL) { g_warning(_("failed to allocate new_ds")); goto ending; } for (i_view_mode = 0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) amitk_data_set_set_color_table(new_ds, i_view_mode, AMITK_DATA_SET_COLOR_TABLE(data_set, i_view_mode)); i=p.alpha_offset; /* what to skip in v to get to the coefficients */ for (i_voxel.g=0; i_voxel.g&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = amide$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/libfame.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/amide_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = amitk_marshal.$(OBJEXT) am__objects_2 = amitk_type_builtins.$(OBJEXT) am__objects_3 = am__objects_4 = amitk_raw_data_UBYTE.$(OBJEXT) \ amitk_raw_data_SBYTE.$(OBJEXT) amitk_raw_data_USHORT.$(OBJEXT) \ amitk_raw_data_SSHORT.$(OBJEXT) amitk_raw_data_UINT.$(OBJEXT) \ amitk_raw_data_SINT.$(OBJEXT) amitk_raw_data_FLOAT.$(OBJEXT) \ amitk_raw_data_DOUBLE.$(OBJEXT) am__objects_5 = amitk_data_set_UBYTE_0D_SCALING.$(OBJEXT) \ amitk_data_set_UBYTE_1D_SCALING.$(OBJEXT) \ amitk_data_set_UBYTE_2D_SCALING.$(OBJEXT) \ amitk_data_set_SBYTE_0D_SCALING.$(OBJEXT) \ amitk_data_set_SBYTE_1D_SCALING.$(OBJEXT) \ amitk_data_set_SBYTE_2D_SCALING.$(OBJEXT) \ amitk_data_set_USHORT_0D_SCALING.$(OBJEXT) \ amitk_data_set_USHORT_1D_SCALING.$(OBJEXT) \ amitk_data_set_USHORT_2D_SCALING.$(OBJEXT) \ amitk_data_set_SSHORT_0D_SCALING.$(OBJEXT) \ amitk_data_set_SSHORT_1D_SCALING.$(OBJEXT) \ amitk_data_set_SSHORT_2D_SCALING.$(OBJEXT) \ amitk_data_set_UINT_0D_SCALING.$(OBJEXT) \ amitk_data_set_UINT_1D_SCALING.$(OBJEXT) \ amitk_data_set_UINT_2D_SCALING.$(OBJEXT) \ amitk_data_set_SINT_0D_SCALING.$(OBJEXT) \ amitk_data_set_SINT_1D_SCALING.$(OBJEXT) \ amitk_data_set_SINT_2D_SCALING.$(OBJEXT) \ amitk_data_set_FLOAT_0D_SCALING.$(OBJEXT) \ amitk_data_set_FLOAT_1D_SCALING.$(OBJEXT) \ amitk_data_set_FLOAT_2D_SCALING.$(OBJEXT) \ amitk_data_set_DOUBLE_0D_SCALING.$(OBJEXT) \ amitk_data_set_DOUBLE_1D_SCALING.$(OBJEXT) \ amitk_data_set_DOUBLE_2D_SCALING.$(OBJEXT) \ amitk_data_set_UBYTE_0D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_UBYTE_1D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_UBYTE_2D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_SBYTE_0D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_SBYTE_1D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_SBYTE_2D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_USHORT_0D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_USHORT_1D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_USHORT_2D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_SSHORT_0D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_SSHORT_1D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_SSHORT_2D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_UINT_0D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_UINT_1D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_UINT_2D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_SINT_0D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_SINT_1D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_SINT_2D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_FLOAT_0D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_FLOAT_1D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_FLOAT_2D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_DOUBLE_0D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_DOUBLE_1D_SCALING_INTERCEPT.$(OBJEXT) \ amitk_data_set_DOUBLE_2D_SCALING_INTERCEPT.$(OBJEXT) am__objects_6 = amitk_roi_ELLIPSOID.$(OBJEXT) \ amitk_roi_CYLINDER.$(OBJEXT) amitk_roi_BOX.$(OBJEXT) \ amitk_roi_ISOCONTOUR_2D.$(OBJEXT) \ amitk_roi_ISOCONTOUR_3D.$(OBJEXT) \ amitk_roi_FREEHAND_2D.$(OBJEXT) \ amitk_roi_FREEHAND_3D.$(OBJEXT) am_amide_OBJECTS = $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) $(am__objects_3) $(am__objects_5) \ $(am__objects_3) $(am__objects_6) $(am__objects_3) \ amide.$(OBJEXT) amide_gconf.$(OBJEXT) amide_gnome.$(OBJEXT) \ amitk_common.$(OBJEXT) amitk_canvas.$(OBJEXT) \ amitk_canvas_object.$(OBJEXT) amitk_color_table.$(OBJEXT) \ amitk_color_table_menu.$(OBJEXT) amitk_data_set.$(OBJEXT) \ amitk_dial.$(OBJEXT) amitk_fiducial_mark.$(OBJEXT) \ amitk_filter.$(OBJEXT) amitk_line_profile.$(OBJEXT) \ amitk_object.$(OBJEXT) amitk_object_dialog.$(OBJEXT) \ amitk_point.$(OBJEXT) amitk_preferences.$(OBJEXT) \ amitk_progress_dialog.$(OBJEXT) amitk_raw_data.$(OBJEXT) \ amitk_roi.$(OBJEXT) amitk_space.$(OBJEXT) \ amitk_space_edit.$(OBJEXT) amitk_study.$(OBJEXT) \ amitk_threshold.$(OBJEXT) amitk_tree_view.$(OBJEXT) \ amitk_volume.$(OBJEXT) amitk_window_edit.$(OBJEXT) \ alignment_mutual_information.$(OBJEXT) \ alignment_procrustes.$(OBJEXT) analysis.$(OBJEXT) \ dcmtk_interface.$(OBJEXT) fads.$(OBJEXT) image.$(OBJEXT) \ legacy.$(OBJEXT) libecat_interface.$(OBJEXT) \ libmdc_interface.$(OBJEXT) mpeg_encode.$(OBJEXT) \ pixmaps.$(OBJEXT) raw_data_import.$(OBJEXT) render.$(OBJEXT) \ tb_alignment.$(OBJEXT) tb_crop.$(OBJEXT) tb_distance.$(OBJEXT) \ tb_export_data_set.$(OBJEXT) tb_fads.$(OBJEXT) \ tb_filter.$(OBJEXT) tb_fly_through.$(OBJEXT) tb_math.$(OBJEXT) \ tb_profile.$(OBJEXT) tb_roi_analysis.$(OBJEXT) \ ui_common.$(OBJEXT) ui_gate_dialog.$(OBJEXT) \ ui_preferences_dialog.$(OBJEXT) ui_render.$(OBJEXT) \ ui_render_dialog.$(OBJEXT) ui_render_movie.$(OBJEXT) \ ui_series.$(OBJEXT) ui_study.$(OBJEXT) ui_study_cb.$(OBJEXT) \ ui_time_dialog.$(OBJEXT) xml.$(OBJEXT) amide_OBJECTS = $(am_amide_OBJECTS) am__DEPENDENCIES_1 = @AMIDE_OS_WIN32_TRUE@am__DEPENDENCIES_2 = ../win32/amiderc.o amide_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = amide_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(amide_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(amide_SOURCES) DIST_SOURCES = $(amide_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMIDE_CHECK_OBSOLETE_CFLAGS = @AMIDE_CHECK_OBSOLETE_CFLAGS@ AMIDE_DEBUG_CFLAGS = @AMIDE_DEBUG_CFLAGS@ AMIDE_GTK_CFLAGS = @AMIDE_GTK_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_CFLAGS = @AMIDE_GTK_EXTRA_GCONF_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_LIBS = @AMIDE_GTK_EXTRA_GCONF_LIBS@ AMIDE_GTK_EXTRA_GVFS_CFLAGS = @AMIDE_GTK_EXTRA_GVFS_CFLAGS@ AMIDE_GTK_EXTRA_GVFS_LIBS = @AMIDE_GTK_EXTRA_GVFS_LIBS@ AMIDE_GTK_LIBS = @AMIDE_GTK_LIBS@ AMIDE_LIBDCMDATA_CFLAGS = @AMIDE_LIBDCMDATA_CFLAGS@ AMIDE_LIBDCMDATA_LIBS = @AMIDE_LIBDCMDATA_LIBS@ AMIDE_LIBECAT_LIBS = @AMIDE_LIBECAT_LIBS@ AMIDE_LIBVOLPACK_LIBS = @AMIDE_LIBVOLPACK_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HELP_DIR = @HELP_DIR@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFAME_CFLAGS = @LIBFAME_CFLAGS@ LIBFAME_CONFIG = @LIBFAME_CONFIG@ LIBFAME_LIBS = @LIBFAME_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ OPTIMIZATION_CFLAGS = @OPTIMIZATION_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMEDCON_CFLAGS = @XMEDCON_CFLAGS@ XMEDCON_CONFIG = @XMEDCON_CONFIG@ XMEDCON_LIBS = @XMEDCON_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ intltool__v_merge_options_ = @intltool__v_merge_options_@ intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ libgnomecanvas_greater_than_230_CFLAGS = @libgnomecanvas_greater_than_230_CFLAGS@ libgnomecanvas_greater_than_230_LIBS = @libgnomecanvas_greater_than_230_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ #INCLUDES = \ # -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" @AMIDE_OS_WIN32_FALSE@AMIDE_LDADD_WIN32 = @AMIDE_OS_WIN32_TRUE@AMIDE_LDADD_WIN32 = -lwsock32 ../win32/amiderc.o @AMIDE_OS_WIN32_FALSE@AMIDE_LDFLAGS_WIN32 = @AMIDE_OS_WIN32_TRUE@AMIDE_LDFLAGS_WIN32 = -mwindows INCLUDES = \ -DAMIDE_PREFIX=\""$(prefix)"\" \ -DAMIDE_SYSCONFDIR=\""$(sysconfdir)"\" \ -DAMIDE_DATADIR=\""$(datadir)"\" \ -DAMIDE_LIBDIR=\""$(libdir)"\" AM_CFLAGS = \ $(OPTIMIZATION_CFLAGS) \ $(GSL_CFLAGS) \ $(LIBFAME_CFLAGS) \ $(AMIDE_GTK_CFLAGS) \ $(AMIDE_DEBUG_CFLAGS) \ $(AMIDE_CHECK_OBSOLETE_CFLAGS) \ $(AMIDE_LIBDCMDATA_CFLAGS) \ -I/usr/local/include \ $(XMEDCON_CFLAGS) \ $(FFMPEG_CFLAGS) AM_CXXFLAGS = $(AM_CFLAGS) # for some reason, the -wsock32 added by AMIDE_LDADD_WIN32 on windows has # to be behind the DCMTK stuff amide_LDADD = \ $(GSL_LIBS) \ $(LIBFAME_LIBS) \ $(AMIDE_LIBECAT_LIBS) \ $(AMIDE_LIBVOLPACK_LIBS) \ $(AMIDE_GTK_LIBS) \ $(XMEDCON_LIBS) \ $(FFMPEG_LIBS) \ $(AMIDE_LIBDCMDATA_LIBS) \ $(AMIDE_LDADD_WIN32) amide_LDFLAGS = \ $(AMIDE_LDFLAGS_WIN32) amide_SOURCES = \ $(MARSHAL_SOURCES) \ $(TYPE_BUILTINS_SOURCES) \ $(AMITK_RAW_DATA_VARIABLE_H) \ $(AMITK_RAW_DATA_VARIABLE_C) \ $(AMITK_DATA_SET_VARIABLE_H) \ $(AMITK_DATA_SET_VARIABLE_C) \ $(AMITK_ROI_VARIABLE_H) \ $(AMITK_ROI_VARIABLE_C) \ $(AMITK_H_SOURCES) \ amide.h \ amide.c \ amide_intl.h \ amide_gconf.c \ amide_gconf.h \ amide_gnome.c \ amide_gnome.h \ amitk_common.c \ amitk_common.h \ amitk_canvas.c \ amitk_canvas_object.c \ amitk_color_table.c \ amitk_color_table_menu.c \ amitk_data_set.c \ amitk_dial.c \ amitk_fiducial_mark.c \ amitk_filter.c \ amitk_line_profile.c \ amitk_object.c \ amitk_object_dialog.c \ amitk_point.c \ amitk_preferences.c \ amitk_progress_dialog.c \ amitk_raw_data.c \ amitk_roi.c \ amitk_space.c \ amitk_space_edit.c \ amitk_study.c \ amitk_threshold.c \ amitk_tree_view.c \ amitk_volume.c \ amitk_window_edit.c \ alignment_mutual_information.c \ alignment_mutual_information.h \ alignment_procrustes.c \ alignment_procrustes.h \ analysis.c \ analysis.h \ dcmtk_interface.cc \ dcmtk_interface.h \ fads.c \ fads.h \ image.c \ image.h \ legacy.c \ legacy.h \ libecat_interface.c \ libecat_interface.h \ libmdc_interface.c \ libmdc_interface.h \ mpeg_encode.c \ mpeg_encode.h \ pixmaps.c \ pixmaps.h \ raw_data_import.c \ raw_data_import.h \ render.c \ render.h \ tb_alignment.c \ tb_alignment.h \ tb_crop.c \ tb_crop.h \ tb_distance.c \ tb_distance.h \ tb_export_data_set.c \ tb_export_data_set.h \ tb_fads.c \ tb_fads.h \ tb_filter.c \ tb_filter.h \ tb_fly_through.c \ tb_fly_through.h \ tb_math.c \ tb_math.h \ tb_profile.c \ tb_profile.h \ tb_roi_analysis.c \ tb_roi_analysis.h \ ui_common.c \ ui_common.h \ ui_gate_dialog.c \ ui_gate_dialog.h \ ui_preferences_dialog.c \ ui_preferences_dialog.h \ ui_render.c \ ui_render.h \ ui_render_dialog.c \ ui_render_dialog.h \ ui_render_movie.c \ ui_render_movie.h \ ui_series.c \ ui_series.h \ ui_study.c \ ui_study.h \ ui_study_cb.c \ ui_study_cb.h \ ui_time_dialog.c \ ui_time_dialog.h \ xml.c \ xml.h AMITK_H_SOURCES = \ amitk_canvas.h \ amitk_canvas_object.h \ amitk_color_table.h \ amitk_color_table_menu.h \ amitk_common.h \ amitk_dial.h \ amitk_data_set.h \ amitk_fiducial_mark.h \ amitk_filter.h \ amitk_line_profile.h \ amitk_object.h \ amitk_object_dialog.h \ amitk_point.h \ amitk_preferences.h \ amitk_progress_dialog.h \ amitk_raw_data.h \ amitk_roi.h \ amitk_space_edit.h \ amitk_space.h \ amitk_study.h \ amitk_threshold.h \ amitk_tree_view.h \ amitk_type.h \ amitk_volume.h \ amitk_window_edit.h AMITK_ROI_VARIABLE_C = \ amitk_roi_ELLIPSOID.c \ amitk_roi_CYLINDER.c \ amitk_roi_BOX.c \ amitk_roi_ISOCONTOUR_2D.c \ amitk_roi_ISOCONTOUR_3D.c \ amitk_roi_FREEHAND_2D.c \ amitk_roi_FREEHAND_3D.c AMITK_ROI_VARIABLE_H = \ amitk_roi_ELLIPSOID.h \ amitk_roi_CYLINDER.h \ amitk_roi_BOX.h \ amitk_roi_ISOCONTOUR_2D.h \ amitk_roi_ISOCONTOUR_3D.h \ amitk_roi_FREEHAND_2D.h \ amitk_roi_FREEHAND_3D.h AMITK_RAW_DATA_VARIABLE_C = \ amitk_raw_data_UBYTE.c \ amitk_raw_data_SBYTE.c \ amitk_raw_data_USHORT.c \ amitk_raw_data_SSHORT.c \ amitk_raw_data_UINT.c \ amitk_raw_data_SINT.c \ amitk_raw_data_FLOAT.c \ amitk_raw_data_DOUBLE.c AMITK_RAW_DATA_VARIABLE_H = \ amitk_raw_data_UBYTE.h \ amitk_raw_data_SBYTE.h \ amitk_raw_data_USHORT.h \ amitk_raw_data_SSHORT.h \ amitk_raw_data_UINT.h \ amitk_raw_data_SINT.h \ amitk_raw_data_FLOAT.h \ amitk_raw_data_DOUBLE.h AMITK_DATA_SET_VARIABLE_C = \ amitk_data_set_UBYTE_0D_SCALING.c \ amitk_data_set_UBYTE_1D_SCALING.c \ amitk_data_set_UBYTE_2D_SCALING.c \ amitk_data_set_SBYTE_0D_SCALING.c \ amitk_data_set_SBYTE_1D_SCALING.c \ amitk_data_set_SBYTE_2D_SCALING.c \ amitk_data_set_USHORT_0D_SCALING.c \ amitk_data_set_USHORT_1D_SCALING.c \ amitk_data_set_USHORT_2D_SCALING.c \ amitk_data_set_SSHORT_0D_SCALING.c \ amitk_data_set_SSHORT_1D_SCALING.c \ amitk_data_set_SSHORT_2D_SCALING.c \ amitk_data_set_UINT_0D_SCALING.c \ amitk_data_set_UINT_1D_SCALING.c \ amitk_data_set_UINT_2D_SCALING.c \ amitk_data_set_SINT_0D_SCALING.c \ amitk_data_set_SINT_1D_SCALING.c \ amitk_data_set_SINT_2D_SCALING.c \ amitk_data_set_FLOAT_0D_SCALING.c \ amitk_data_set_FLOAT_1D_SCALING.c \ amitk_data_set_FLOAT_2D_SCALING.c \ amitk_data_set_DOUBLE_0D_SCALING.c \ amitk_data_set_DOUBLE_1D_SCALING.c \ amitk_data_set_DOUBLE_2D_SCALING.c \ amitk_data_set_UBYTE_0D_SCALING_INTERCEPT.c \ amitk_data_set_UBYTE_1D_SCALING_INTERCEPT.c \ amitk_data_set_UBYTE_2D_SCALING_INTERCEPT.c \ amitk_data_set_SBYTE_0D_SCALING_INTERCEPT.c \ amitk_data_set_SBYTE_1D_SCALING_INTERCEPT.c \ amitk_data_set_SBYTE_2D_SCALING_INTERCEPT.c \ amitk_data_set_USHORT_0D_SCALING_INTERCEPT.c \ amitk_data_set_USHORT_1D_SCALING_INTERCEPT.c \ amitk_data_set_USHORT_2D_SCALING_INTERCEPT.c \ amitk_data_set_SSHORT_0D_SCALING_INTERCEPT.c \ amitk_data_set_SSHORT_1D_SCALING_INTERCEPT.c \ amitk_data_set_SSHORT_2D_SCALING_INTERCEPT.c \ amitk_data_set_UINT_0D_SCALING_INTERCEPT.c \ amitk_data_set_UINT_1D_SCALING_INTERCEPT.c \ amitk_data_set_UINT_2D_SCALING_INTERCEPT.c \ amitk_data_set_SINT_0D_SCALING_INTERCEPT.c \ amitk_data_set_SINT_1D_SCALING_INTERCEPT.c \ amitk_data_set_SINT_2D_SCALING_INTERCEPT.c \ amitk_data_set_FLOAT_0D_SCALING_INTERCEPT.c \ amitk_data_set_FLOAT_1D_SCALING_INTERCEPT.c \ amitk_data_set_FLOAT_2D_SCALING_INTERCEPT.c \ amitk_data_set_DOUBLE_0D_SCALING_INTERCEPT.c \ amitk_data_set_DOUBLE_1D_SCALING_INTERCEPT.c \ amitk_data_set_DOUBLE_2D_SCALING_INTERCEPT.c AMITK_DATA_SET_VARIABLE_H = \ amitk_data_set_UBYTE_0D_SCALING.h \ amitk_data_set_UBYTE_1D_SCALING.h \ amitk_data_set_UBYTE_2D_SCALING.h \ amitk_data_set_SBYTE_0D_SCALING.h \ amitk_data_set_SBYTE_1D_SCALING.h \ amitk_data_set_SBYTE_2D_SCALING.h \ amitk_data_set_USHORT_0D_SCALING.h \ amitk_data_set_USHORT_1D_SCALING.h \ amitk_data_set_USHORT_2D_SCALING.h \ amitk_data_set_SSHORT_0D_SCALING.h \ amitk_data_set_SSHORT_1D_SCALING.h \ amitk_data_set_SSHORT_2D_SCALING.h \ amitk_data_set_UINT_0D_SCALING.h \ amitk_data_set_UINT_1D_SCALING.h \ amitk_data_set_UINT_2D_SCALING.h \ amitk_data_set_SINT_0D_SCALING.h \ amitk_data_set_SINT_1D_SCALING.h \ amitk_data_set_SINT_2D_SCALING.h \ amitk_data_set_FLOAT_0D_SCALING.h \ amitk_data_set_FLOAT_1D_SCALING.h \ amitk_data_set_FLOAT_2D_SCALING.h \ amitk_data_set_DOUBLE_0D_SCALING.h \ amitk_data_set_DOUBLE_1D_SCALING.h \ amitk_data_set_DOUBLE_2D_SCALING.h VARIABLE_INPUT = \ variable_type.m4 AMITK_ROI_VARIABLE_C_SRC = amitk_roi_variable_type.c AMITK_ROI_VARIABLE_H_SRC = amitk_roi_variable_type.h AMITK_RAW_DATA_VARIABLE_C_SRC = amitk_raw_data_variable_type.c AMITK_RAW_DATA_VARIABLE_H_SRC = amitk_raw_data_variable_type.h AMITK_DATA_SET_VARIABLE_C_SRC = amitk_data_set_variable_type.c AMITK_DATA_SET_VARIABLE_H_SRC = amitk_data_set_variable_type.h MARSHAL_SOURCES = \ amitk_marshal.c \ amitk_marshal.h TYPE_BUILTINS_SOURCES = \ amitk_type_builtins.h \ amitk_type_builtins.c TEMP_FILES = \ xgen-atbh \ xgen-atbc STAMP_FILES = \ stamp-amitk_type_builtins.h \ stamp-amitk_type_builtins.c CLEANFILES = \ $(AMITK_ROI_VARIABLE_C) \ $(AMITK_ROI_VARIABLE_H) \ $(AMITK_DATA_SET_VARIABLE_C) \ $(AMITK_DATA_SET_VARIABLE_H) \ $(AMITK_RAW_DATA_VARIABLE_C) \ $(AMITK_RAW_DATA_VARIABLE_H) \ $(MARSHAL_SOURCES) \ $(TYPE_BUILTINS_SOURCES) \ $(TEMP_FILES) \ $(STAMP_FILES) DISTCLEANFILES = *~ all: all-am .SUFFIXES: .SUFFIXES: .c .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list amide$(EXEEXT): $(amide_OBJECTS) $(amide_DEPENDENCIES) $(EXTRA_amide_DEPENDENCIES) @rm -f amide$(EXEEXT) $(AM_V_CXXLD)$(amide_LINK) $(amide_OBJECTS) $(amide_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alignment_mutual_information.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alignment_procrustes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amide.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amide_gconf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amide_gnome.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_canvas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_canvas_object.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_color_table.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_color_table_menu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_DOUBLE_0D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_DOUBLE_0D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_DOUBLE_1D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_DOUBLE_1D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_DOUBLE_2D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_DOUBLE_2D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_FLOAT_0D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_FLOAT_0D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_FLOAT_1D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_FLOAT_1D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_FLOAT_2D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_FLOAT_2D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SBYTE_0D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SBYTE_0D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SBYTE_1D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SBYTE_1D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SBYTE_2D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SBYTE_2D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SINT_0D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SINT_0D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SINT_1D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SINT_1D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SINT_2D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SINT_2D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SSHORT_0D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SSHORT_0D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SSHORT_1D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SSHORT_1D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SSHORT_2D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_SSHORT_2D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UBYTE_0D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UBYTE_0D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UBYTE_1D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UBYTE_1D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UBYTE_2D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UBYTE_2D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UINT_0D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UINT_0D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UINT_1D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UINT_1D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UINT_2D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_UINT_2D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_USHORT_0D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_USHORT_0D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_USHORT_1D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_USHORT_1D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_USHORT_2D_SCALING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_data_set_USHORT_2D_SCALING_INTERCEPT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_dial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_fiducial_mark.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_filter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_line_profile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_marshal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_object.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_object_dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_point.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_preferences.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_progress_dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_raw_data.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_raw_data_DOUBLE.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_raw_data_FLOAT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_raw_data_SBYTE.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_raw_data_SINT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_raw_data_SSHORT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_raw_data_UBYTE.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_raw_data_UINT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_raw_data_USHORT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_roi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_roi_BOX.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_roi_CYLINDER.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_roi_ELLIPSOID.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_roi_FREEHAND_2D.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_roi_FREEHAND_3D.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_roi_ISOCONTOUR_2D.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_roi_ISOCONTOUR_3D.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_space.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_space_edit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_study.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_threshold.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_tree_view.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_type_builtins.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_volume.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amitk_window_edit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/analysis.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcmtk_interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fads.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/legacy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libecat_interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmdc_interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpeg_encode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixmaps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_data_import.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tb_alignment.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tb_crop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tb_distance.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tb_export_data_set.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tb_fads.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tb_filter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tb_fly_through.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tb_math.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tb_profile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tb_roi_analysis.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_gate_dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_preferences_dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_render.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_render_dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_render_movie.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_series.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_study.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_study_cb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_time_dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS $(AMITK_ROI_VARIABLE_H): $(VARIABLE_INPUT) $(AMITK_ROI_VARIABLE_H_SRC) @for i in $(AMITK_ROI_VARIABLE_H) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done $(AMITK_ROI_VARIABLE_C): $(VARIABLE_INPUT) $(AMITK_ROI_VARIABLE_C_SRC) $(AMITK_ROI_VARIABLE_H) @for i in $(AMITK_ROI_VARIABLE_C) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done $(AMITK_RAW_DATA_VARIABLE_C): $(VARIABLE_INPUT) $(AMITK_RAW_DATA_VARIABLE_C_SRC) $(AMITK_RAW_DATA_VARIABLE_H) @for i in $(AMITK_RAW_DATA_VARIABLE_C) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done $(AMITK_RAW_DATA_VARIABLE_H): $(VARIABLE_INPUT) $(AMITK_RAW_DATA_VARIABLE_H_SRC) @for i in $(AMITK_RAW_DATA_VARIABLE_H) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done $(AMITK_DATA_SET_VARIABLE_C): $(VARIABLE_INPUT) $(AMITK_DATA_SET_VARIABLE_C_SRC) $(AMITK_DATA_SET_VARIABLE_H) @for i in $(AMITK_DATA_SET_VARIABLE_C) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done $(AMITK_DATA_SET_VARIABLE_H): $(VARIABLE_INPUT) $(AMITK_DATA_SET_VARIABLE_H_SRC) @for i in $(AMITK_DATA_SET_VARIABLE_H) ; \ do \ rm -f $$i ;\ echo "$(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i" ;\ $(M4) -P -Dm4_SourceFile=$$i $(VARIABLE_INPUT) > $$i; \ chmod -w $$i; \ done amitk_marshal.h: amitk_marshal.list $(GLIB_GENMARSHAL) $(GLIB_GENMARSHAL) $< --header --prefix=amitk_marshal > $@ amitk_marshal.c: amitk_marshal.list $(GLIB_GENMARSHAL) amitk_marshal.h $(GLIB_GENMARSHAL) $< --body --prefix=amitk_marshal > $@ $(srcdir)/amitk_type_builtins.h: stamp-amitk_type_builtins.h $(AMITK_DATA_SET_VARIABLE_H) $(AMITK_RAW_DATA_VARIABLE_H) @true stamp-amitk_type_builtins.h: $(AMITK_H_SOURCES) Makefile ( cd $(srcdir) && glib-mkenums \ --fhead "#ifndef __AMITK_TYPE_BUILTINS_H__\n#define __AMITK_TYPE_BUILTINS_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ --fprod "/* enumerations from \"@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void);\n#define AMITK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ --ftail "G_END_DECLS\n\n#endif /* __AMITK_TYPE_BUILTINS_H__ */" \ $(AMITK_H_SOURCES)) >> xgen-atbh \ && (cmp -s xgen-atbh $(srcdir)/amitk_type_builtins.h || cp xgen-atbh $(srcdir)/amitk_type_builtins.h ) \ && rm -f xgen-atbh \ && echo timestamp > $(@F) $(srcdir)/amitk_type_builtins.c: stamp-amitk_type_builtins.c @true stamp-amitk_type_builtins.c: $(AMITK_H_SOURCES) Makefile amitk_type_builtins.h ( cd $(srcdir) && glib-mkenums \ --fhead "#include \n#include \"amide_config.h\"\n#include \"amitk_common.h\"\n#include \"amitk_canvas.h\"\n#include \"amitk_data_set.h\"\n#include \"amitk_filter.h\"\n#include \"amitk_object.h\"\n#include \"amitk_point.h\"\n#include \"amitk_raw_data.h\"\n#include \"amitk_roi.h\"\n#include \"amitk_space.h\"\n#include \"amitk_threshold.h\"\n#include \"amitk_tree_view.h\"\n" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ $(AMITK_H_SOURCES) ) > xgen-atbc \ && cp xgen-atbc $(srcdir)/amitk_type_builtins.c \ && rm -f xgen-atbc \ && echo timestamp > $(@F) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: amide-1.0.5/src/amitk_progress_dialog.c0000664000175000017500000001206312270273735017763 0ustar loeningloening/* amitk_progress_dialog.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* adapted from gtkcolorsel.c */ #include "amide_config.h" #include "amide_intl.h" #include "amitk_marshal.h" #include "amitk_progress_dialog.h" static void dialog_class_init (AmitkProgressDialogClass *klass); static void dialog_init (AmitkProgressDialog *progress_dialog); static void dialog_response(GtkDialog * dialog, gint response_id); static GtkDialogClass *progress_dialog_parent_class; GType amitk_progress_dialog_get_type (void) { static GType progress_dialog_type = 0; if (!progress_dialog_type) { GTypeInfo progress_dialog_info = { sizeof (AmitkProgressDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialog_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (AmitkProgressDialog), 0, /* # preallocs */ (GInstanceInitFunc) dialog_init, NULL /* value table */ }; progress_dialog_type = g_type_register_static(GTK_TYPE_DIALOG, "AmitkProgressDialog", &progress_dialog_info, 0); } return progress_dialog_type; } static void dialog_class_init (AmitkProgressDialogClass *klass) { /* GtkObjectClass *gtkobject_class; */ GtkDialogClass *gtkdialog_class = GTK_DIALOG_CLASS(klass); /* gtkobject_class = (GtkObjectClass*) klass; */ progress_dialog_parent_class = g_type_class_peek_parent(klass); gtkdialog_class->response = dialog_response; } static void dialog_init (AmitkProgressDialog * dialog) { gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); dialog->can_continue = TRUE; dialog->message_label = gtk_label_new(NULL); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), dialog->message_label, FALSE, FALSE, 0); dialog->progress_bar = gtk_progress_bar_new(); gtk_progress_bar_set_pulse_step(GTK_PROGRESS_BAR(dialog->progress_bar), 0.01); gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(dialog->progress_bar), GTK_PROGRESS_LEFT_TO_RIGHT); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), dialog->progress_bar, FALSE, FALSE, 0); return; } static void dialog_response(GtkDialog * dialog, gint response_id) { g_return_if_fail(AMITK_IS_PROGRESS_DIALOG(dialog)); AMITK_PROGRESS_DIALOG(dialog)->can_continue = FALSE; if (progress_dialog_parent_class->response) (* progress_dialog_parent_class->response) (dialog, response_id); return; } gboolean amitk_progress_dialog_update(gpointer dialog_pointer, char * message, gdouble fraction) { AmitkProgressDialog * dialog = AMITK_PROGRESS_DIALOG(dialog_pointer); if (message != NULL) amitk_progress_dialog_set_text(dialog, message); if ((fraction >= 0.0) || (fraction < -0.5)) return amitk_progress_dialog_set_fraction(dialog, fraction); else return AMITK_PROGRESS_DIALOG_CAN_CONTINUE(dialog); } void amitk_progress_dialog_set_text(AmitkProgressDialog * dialog, gchar * message) { g_return_if_fail(AMITK_IS_PROGRESS_DIALOG(dialog)); gtk_label_set_text(GTK_LABEL(dialog->message_label), message); } gboolean amitk_progress_dialog_set_fraction(AmitkProgressDialog * dialog, gdouble fraction) { if (fraction > 1.0) { if (GTK_WIDGET_VISIBLE(dialog)) gtk_widget_hide_all(GTK_WIDGET(dialog)); } else if (fraction >= 0.0) { if (!GTK_WIDGET_VISIBLE(dialog)) { gtk_widget_show_all(GTK_WIDGET(dialog)); dialog->can_continue = TRUE; } gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(dialog->progress_bar), fraction); } else if (fraction < -0.5) { if (!GTK_WIDGET_VISIBLE(dialog)) { gtk_widget_show_all(GTK_WIDGET(dialog)); dialog->can_continue = TRUE; } gtk_progress_bar_pulse(GTK_PROGRESS_BAR(dialog->progress_bar)); } /* let spin while events are pending, this allows cancel to happen */ while (gtk_events_pending()) gtk_main_iteration(); return AMITK_PROGRESS_DIALOG_CAN_CONTINUE(dialog); } GtkWidget* amitk_progress_dialog_new (GtkWindow * parent) { AmitkProgressDialog *dialog; dialog = g_object_new(AMITK_TYPE_PROGRESS_DIALOG, NULL); gtk_window_set_title (GTK_WINDOW (dialog), _("Progress Dialog")); gtk_window_set_transient_for(GTK_WINDOW (dialog), parent); gtk_window_set_destroy_with_parent(GTK_WINDOW (dialog), TRUE); gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); return GTK_WIDGET (dialog); } amide-1.0.5/src/amitk_roi_variable_type.c0000664000175000017500000012112612270273750020275 0ustar loeningloening/* amitk_roi_variable_type.c - used to generate the different amitk_roi_*.c files * * Part of amide - Amide's a Medical Image Data Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include #include #include "amitk_roi_`'m4_Variable_Type`'.h" #define ROI_TYPE_`'m4_Variable_Type`' #if defined(ROI_TYPE_CYLINDER) || defined(ROI_TYPE_ELLIPSOID) || defined (ROI_TYPE_BOX) static GSList * append_intersection_point(GSList * points_list, AmitkPoint new_point); static GSList * prepend_intersection_point(GSList * points_list, AmitkPoint new_point); static GSList * append_intersection_point(GSList * points_list, AmitkPoint new_point) { AmitkPoint * ppoint; ppoint = g_try_new(AmitkPoint,1); if (ppoint != NULL) { *ppoint = new_point; return g_slist_append(points_list, ppoint); } else { g_warning(_("Out of Memory")); return points_list; } } static GSList * prepend_intersection_point(GSList * points_list, AmitkPoint new_point) { AmitkPoint * ppoint; ppoint = g_try_new(AmitkPoint,1); if (ppoint != NULL) { *ppoint = new_point; return g_slist_prepend(points_list, ppoint); } else { g_warning(_("Out of Memory")); return points_list; } } /* returns a singly linked list of intersection points between the roi and the given canvas slice. returned points are in the canvas's coordinate space. */ GSList * amitk_roi_`'m4_Variable_Type`'_get_intersection_line(const AmitkRoi * roi, const AmitkVolume * canvas_slice, const amide_real_t pixel_dim) { GSList * return_points = NULL; AmitkPoint view_point,temp_point; AmitkCorners slice_corners; AmitkPoint canvas_corner; AmitkPoint * temp_pointp; AmitkVoxel i; AmitkVoxel canvas_dim; gboolean voxel_in=FALSE, prev_voxel_intersection, saved=TRUE; #if defined(ROI_TYPE_ELLIPSOID) || defined(ROI_TYPE_CYLINDER) AmitkPoint center, radius; #endif #if defined(ROI_TYPE_CYLINDER) amide_real_t height; #endif /* make sure we've already defined this guy */ g_return_val_if_fail(!AMITK_ROI_UNDRAWN(roi), NULL); #ifdef AMIDE_DEBUG // g_print("roi %s --------------------\n",AMITK_OBJECT_NAME(roi)); // point_print("\t\tcorner", AMITK_VOLUME_CORNER(roi)); #endif #if defined(ROI_TYPE_ELLIPSOID) || defined(ROI_TYPE_CYLINDER) radius = point_cmult(0.5, AMITK_VOLUME_CORNER(roi)); center = amitk_space_b2s(AMITK_SPACE(roi), amitk_volume_get_center(AMITK_VOLUME(roi))); #endif #ifdef ROI_TYPE_CYLINDER height = AMITK_VOLUME_Z_CORNER(roi); #endif /* get the corners of the canvas slice */ canvas_corner = AMITK_VOLUME_CORNER(canvas_slice); slice_corners[0] = amitk_space_b2s(AMITK_SPACE(canvas_slice), AMITK_SPACE_OFFSET(canvas_slice)); slice_corners[1] = canvas_corner; /* iterate through the slice, putting all edge points in the list */ i.t = i.g = i.z=0; view_point.z = (slice_corners[0].z+slice_corners[1].z)/2.0; view_point.y = slice_corners[0].y+pixel_dim/2.0; canvas_dim.t = 0; canvas_dim.z = ceil((canvas_corner.z)/AMITK_VOLUME_Z_CORNER(canvas_slice)); canvas_dim.y = ceil((canvas_corner.y)/pixel_dim); canvas_dim.x = ceil((canvas_corner.x)/pixel_dim); g_return_val_if_fail(canvas_dim.z == 1, NULL); for (i.y=0; i.y < canvas_dim.y ; i.y++) { view_point.x = slice_corners[0].x+pixel_dim/2.0; prev_voxel_intersection = FALSE; for (i.x=0; i.x < canvas_dim.x ; i.x++) { temp_point = amitk_space_s2s(AMITK_SPACE(canvas_slice), AMITK_SPACE(roi), view_point); #ifdef ROI_TYPE_BOX voxel_in = point_in_box(temp_point, AMITK_VOLUME_CORNER(roi)); #endif #ifdef ROI_TYPE_CYLINDER voxel_in = point_in_elliptic_cylinder(temp_point, center, height, radius); #endif #ifdef ROI_TYPE_ELLIPSOID voxel_in = point_in_ellipsoid(temp_point,center,radius); #endif /* is it an edge */ if (voxel_in != prev_voxel_intersection) { /* than save the point */ saved = TRUE; temp_point = view_point; if (voxel_in ) { return_points = prepend_intersection_point(return_points, temp_point); } else { /* previous voxel should be returned */ temp_point.x = view_point.x - pixel_dim; /* backup one voxel */ return_points = append_intersection_point(return_points, temp_point); } } else { saved = FALSE; } prev_voxel_intersection = voxel_in; view_point.x += pixel_dim; /* advance one voxel */ } /* check if the edge of this row is still in the roi, if it is, add it as a point */ if ((voxel_in) && !(saved)) return_points = append_intersection_point(return_points, view_point); view_point.y += pixel_dim; /* advance one row */ } /* make sure the two ends meet */ temp_pointp = g_slist_nth_data(return_points, 0); if (return_points != NULL) return_points = append_intersection_point(return_points, *temp_pointp); return return_points; } #endif #if defined(ROI_TYPE_ISOCONTOUR_2D) || defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_2D) || defined(ROI_TYPE_FREEHAND_3D) /* returns 0 for something not in the roi, returns 1 for an edge, and 2 for something in the roi */ static amitk_format_UBYTE_t map_roi_edge(AmitkRawData * map_roi_ds, AmitkVoxel voxel) { amitk_format_UBYTE_t edge_value=0; AmitkVoxel new_voxel; #if defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_3D) gint z; #endif #if defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_3D) for (z=-1; z<=1; z++) { #endif new_voxel = voxel; #if defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_3D) new_voxel.z += z; if (z != 0) /* don't reconsider the original point */ if (amitk_raw_data_includes_voxel(map_roi_ds, new_voxel)) if (AMITK_RAW_DATA_UBYTE_CONTENT(map_roi_ds,new_voxel) != 0) edge_value++; #endif new_voxel.x--; if (amitk_raw_data_includes_voxel(map_roi_ds, new_voxel)) if (AMITK_RAW_DATA_UBYTE_CONTENT(map_roi_ds,new_voxel) != 0) edge_value++; new_voxel.y--; if (amitk_raw_data_includes_voxel(map_roi_ds, new_voxel)) if (AMITK_RAW_DATA_UBYTE_CONTENT(map_roi_ds,new_voxel) != 0) edge_value++; new_voxel.x++; if (amitk_raw_data_includes_voxel(map_roi_ds, new_voxel)) if (AMITK_RAW_DATA_UBYTE_CONTENT(map_roi_ds,new_voxel) != 0) edge_value++; new_voxel.x++; if (amitk_raw_data_includes_voxel(map_roi_ds, new_voxel)) if (AMITK_RAW_DATA_UBYTE_CONTENT(map_roi_ds,new_voxel) != 0) edge_value++; new_voxel.y++; if (amitk_raw_data_includes_voxel(map_roi_ds, new_voxel)) if (AMITK_RAW_DATA_UBYTE_CONTENT(map_roi_ds,new_voxel) != 0) edge_value++; new_voxel.y++; if (amitk_raw_data_includes_voxel(map_roi_ds, new_voxel)) if (AMITK_RAW_DATA_UBYTE_CONTENT(map_roi_ds,new_voxel) != 0) edge_value++; new_voxel.x--; if (amitk_raw_data_includes_voxel(map_roi_ds, new_voxel)) if (AMITK_RAW_DATA_UBYTE_CONTENT(map_roi_ds,new_voxel) != 0) edge_value++; new_voxel.x--; if (amitk_raw_data_includes_voxel(map_roi_ds, new_voxel)) if (AMITK_RAW_DATA_UBYTE_CONTENT(map_roi_ds,new_voxel) != 0) edge_value++; #if defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_3D) } #endif #if defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_3D) if (edge_value == 26 ) edge_value = 2; else edge_value = 1; #else /* ROI_TYPE_ISOCONTOUR_2D or ROI_TYPE_FREEHAND_2D */ if (edge_value == 8 ) edge_value = 2; else edge_value = 1; #endif return edge_value; } #define FAST_INTERSECTION_SLICE 1 /* intersection data is returned in the form of a volume slice */ AmitkDataSet * amitk_roi_`'m4_Variable_Type`'_get_intersection_slice(const AmitkRoi * roi, const AmitkVolume * canvas_slice, const amide_real_t pixel_dim #ifndef AMIDE_LIBGNOMECANVAS_AA ,const gboolean fill_map_roi #endif ) { AmitkVoxel i_voxel; AmitkVoxel roi_voxel; AmitkVoxel start, end, dim; AmitkPoint view_point; AmitkPoint roi_point; AmitkCorners slice_corners; AmitkCorners intersection_corners; AmitkDataSet * intersection; AmitkPoint temp_point; AmitkPoint canvas_voxel_size; amitk_format_UBYTE_t value; #if FAST_INTERSECTION_SLICE AmitkPoint alt, start_point; AmitkPoint stride[AMITK_AXIS_NUM], last_point; AmitkAxis i_axis; #endif g_return_val_if_fail(!AMITK_ROI_UNDRAWN(roi), NULL); /* figure out the intersection between the canvas slice and the roi */ if (!amitk_volume_volume_intersection_corners(canvas_slice, AMITK_VOLUME(roi), intersection_corners)) return NULL; /* no intersection */ /* translate the intersection into voxel space */ canvas_voxel_size.x = canvas_voxel_size.y = pixel_dim; canvas_voxel_size.z = AMITK_VOLUME_Z_CORNER(canvas_slice); POINT_TO_VOXEL(intersection_corners[0], canvas_voxel_size, 0, 0, start); POINT_TO_VOXEL(intersection_corners[1], canvas_voxel_size, 0, 0, end); dim = voxel_add(voxel_sub(end, start), one_voxel); intersection = amitk_data_set_new(NULL, -1); intersection->raw_data = amitk_raw_data_new_2D_with_data0(AMITK_FORMAT_UBYTE,dim.y, dim.x); /* get the corners of the view slice in view coordinate space */ slice_corners[0] = amitk_space_b2s(AMITK_SPACE(canvas_slice), AMITK_SPACE_OFFSET(canvas_slice)); slice_corners[1] = AMITK_VOLUME_CORNER(canvas_slice); view_point.z = (slice_corners[0].z+slice_corners[1].z)/2.0; view_point.y = slice_corners[0].y+((double) start.y + 0.5)*pixel_dim; #if FAST_INTERSECTION_SLICE view_point.x = slice_corners[0].x+((double) start.x + 0.5)*pixel_dim; /* figure out what point in the roi we're going to start at */ start_point = amitk_space_s2s(AMITK_SPACE(canvas_slice),AMITK_SPACE(roi), view_point); /* figure out what stepping one voxel in a given direction in our slice coresponds to in our roi */ for (i_axis = 0; i_axis <= AMITK_AXIS_Y; i_axis++) { alt.x = (i_axis == AMITK_AXIS_X) ? pixel_dim : 0.0; alt.y = (i_axis == AMITK_AXIS_Y) ? pixel_dim : 0.0; alt.z = 0.0; alt = point_add(point_sub(amitk_space_s2b(AMITK_SPACE(canvas_slice), alt), AMITK_SPACE_OFFSET(canvas_slice)), AMITK_SPACE_OFFSET(roi)); stride[i_axis] = amitk_space_b2s(AMITK_SPACE(roi), alt); } roi_point = start_point; #endif i_voxel.z = i_voxel.g = i_voxel.t = 0; for (i_voxel.y=0; i_voxel.yvoxel_size, 0, 0, roi_voxel); if (amitk_raw_data_includes_voxel(roi->map_data, roi_voxel)) { value = AMITK_RAW_DATA_UBYTE_CONTENT(roi->map_data, roi_voxel); #if defined(ROI_TYPE_ISOCONTOUR_2D) || defined(ROI_TYPE_FREEHAND_2D) if (value > 0) AMITK_RAW_DATA_UBYTE_SET_CONTENT(intersection->raw_data, i_voxel) = 1; #else /* ISOCONTOUR_3D or FREEHAND_3D */ #ifdef AMIDE_LIBGNOMECANVAS_AA if (value > 0) AMITK_RAW_DATA_UBYTE_SET_CONTENT(intersection->raw_data, i_voxel) = value; #else if ((value == 1) || ((value > 0) && fill_map_roi)) AMITK_RAW_DATA_UBYTE_SET_CONTENT(intersection->raw_data, i_voxel) = 1; #endif #endif } #if FAST_INTERSECTION_SLICE POINT_ADD(roi_point, stride[AMITK_AXIS_X], roi_point); #else view_point.x += pixel_dim; #endif } #if FAST_INTERSECTION_SLICE POINT_ADD(last_point, stride[AMITK_AXIS_Y], roi_point); #else view_point.y += pixel_dim; #endif } #if defined(ROI_TYPE_ISOCONTOUR_2D) || defined(ROI_TYPE_FREEHAND_2D) #ifndef AMIDE_LIBGNOMECANVAS_AA if (!fill_map_roi) #endif { /* mark the edges as such on the 2D isocontour or freehand slices */ i_voxel.z = i_voxel.g = i_voxel.t = 0; for (i_voxel.y=0; i_voxel.yraw_data, i_voxel)) AMITK_RAW_DATA_UBYTE_SET_CONTENT(intersection->raw_data, i_voxel) = map_roi_edge(intersection->raw_data, i_voxel); } #endif amitk_space_copy_in_place(AMITK_SPACE(intersection), AMITK_SPACE(canvas_slice)); intersection->voxel_size = canvas_voxel_size; POINT_MULT(start, intersection->voxel_size, temp_point); amitk_space_set_offset(AMITK_SPACE(intersection), amitk_space_s2b(AMITK_SPACE(canvas_slice), temp_point)); temp_point = AMITK_SPACE_OFFSET(intersection); POINT_MULT(intersection->raw_data->dim, intersection->voxel_size, AMITK_VOLUME_CORNER(intersection)); return intersection; } #if defined(ROI_TYPE_ISOCONTOUR_2D) || defined(ROI_TYPE_ISOCONTOUR_3D) /* the data in temp_rd is setup as follows: bit 1 -> is the voxel in the isocontour bit 2 -> has the voxel been checked bit 3 -> increment x for backup bit 4 -> decrement x for backup bit 5 -> increment y for backup bit 6 -> decrement y for backup bit 7 -> increment z for backup bit 8 -> decrement z for backup */ static void isocontour_consider(const AmitkDataSet * ds, const AmitkRawData * temp_rd, AmitkVoxel ds_voxel, const amide_data_t iso_min_value, const amide_data_t iso_max_value, const AmitkRoiIsocontourRange iso_range) { AmitkVoxel i_voxel; AmitkVoxel roi_voxel; gboolean found; gboolean done; amide_data_t voxel_value; roi_voxel = ds_voxel; roi_voxel.t = roi_voxel.g = 0; i_voxel =roi_voxel; done=FALSE; /* the starting point is in by definition */ AMITK_RAW_DATA_UBYTE_SET_CONTENT(temp_rd, roi_voxel) |= 0x03; /* while we still have neighbor voxels to check */ while (!done) { found = FALSE; /* find a neighbor to check, consider the 8 adjoining voxels, or 26 in the case of 3D */ #ifdef ROI_TYPE_ISOCONTOUR_3D for (i_voxel.z = (roi_voxel.z >= 1) ? roi_voxel.z-1 : 0; (i_voxel.z < temp_rd->dim.z) && (i_voxel.z <= roi_voxel.z+1) && (!found); i_voxel.z++) #endif for (i_voxel.y = (roi_voxel.y >= 1) ? roi_voxel.y-1 : 0; (i_voxel.y < temp_rd->dim.y) && (i_voxel.y <= roi_voxel.y+1) && (!found); i_voxel.y++) for (i_voxel.x = (roi_voxel.x >= 1) ? roi_voxel.x-1 : 0; (i_voxel.x < temp_rd->dim.x) && (i_voxel.x <= roi_voxel.x+1) && (!found); i_voxel.x++) if (!(AMITK_RAW_DATA_UBYTE_CONTENT(temp_rd, i_voxel) & 0x02)) { /* don't recheck something we've already checked */ AMITK_RAW_DATA_UBYTE_SET_CONTENT(temp_rd,i_voxel) |= 0x02; /* it's been checked */ ds_voxel.z = i_voxel.z; ds_voxel.y = i_voxel.y; ds_voxel.x = i_voxel.x; voxel_value = amitk_data_set_get_value(ds, ds_voxel); if (((iso_range == AMITK_ROI_ISOCONTOUR_RANGE_ABOVE_MIN) && (voxel_value >= iso_min_value)) || ((iso_range == AMITK_ROI_ISOCONTOUR_RANGE_BELOW_MAX) && (voxel_value <= iso_max_value)) || ((iso_range == AMITK_ROI_ISOCONTOUR_RANGE_BETWEEN_MIN_MAX) && (voxel_value >= iso_min_value) && (voxel_value <= iso_max_value))) { AMITK_RAW_DATA_UBYTE_SET_CONTENT(temp_rd,i_voxel) |= 0x01; /* it's in */ /* store backup info */ #ifdef ROI_TYPE_ISOCONTOUR_3D if (i_voxel.z > roi_voxel.z) AMITK_RAW_DATA_UBYTE_SET_CONTENT(temp_rd,i_voxel) |= 0x40; else if (i_voxel.z < roi_voxel.z) AMITK_RAW_DATA_UBYTE_SET_CONTENT(temp_rd,i_voxel) |= 0x80; #endif if (i_voxel.y > roi_voxel.y) AMITK_RAW_DATA_UBYTE_SET_CONTENT(temp_rd,i_voxel) |= 0x10; else if (i_voxel.y < roi_voxel.y) AMITK_RAW_DATA_UBYTE_SET_CONTENT(temp_rd,i_voxel) |= 0x20; if (i_voxel.x > roi_voxel.x) AMITK_RAW_DATA_UBYTE_SET_CONTENT(temp_rd,i_voxel) |= 0x04; else if (i_voxel.x < roi_voxel.x) AMITK_RAW_DATA_UBYTE_SET_CONTENT(temp_rd,i_voxel) |= 0x08; /* start next iteration at this voxel */ roi_voxel = i_voxel; found = TRUE; } } if (!found) { /* all neighbors exhaustively checked, backup */ /* backup to previous voxel */ i_voxel = roi_voxel; #ifdef ROI_TYPE_ISOCONTOUR_3D if (AMITK_RAW_DATA_UBYTE_CONTENT(temp_rd, roi_voxel) & 0x80) i_voxel.z++; else if (AMITK_RAW_DATA_UBYTE_CONTENT(temp_rd, roi_voxel) & 0x40) i_voxel.z--; #endif if (AMITK_RAW_DATA_UBYTE_CONTENT(temp_rd, roi_voxel) & 0x20) i_voxel.y++; else if (AMITK_RAW_DATA_UBYTE_CONTENT(temp_rd, roi_voxel) & 0x10) i_voxel.y--; if (AMITK_RAW_DATA_UBYTE_CONTENT(temp_rd, roi_voxel) & 0x08) i_voxel.x++; else if (AMITK_RAW_DATA_UBYTE_CONTENT(temp_rd, roi_voxel) & 0x04) i_voxel.x--; /* the inital voxel will backup to itself, which is why we get out of the loop */ if (VOXEL_EQUAL(roi_voxel, i_voxel)) done = TRUE; else roi_voxel = i_voxel; } } return; } void amitk_roi_`'m4_Variable_Type`'_set_isocontour(AmitkRoi * roi, AmitkDataSet * ds, AmitkVoxel iso_voxel, amide_data_t iso_min_value, amide_data_t iso_max_value, AmitkRoiIsocontourRange iso_range) { AmitkRawData * temp_rd; AmitkPoint temp_point; AmitkVoxel min_voxel, max_voxel, i_voxel; amide_data_t temp_min_value, temp_max_value; g_return_if_fail(roi->type == AMITK_ROI_TYPE_`'m4_Variable_Type`'); /* what we're setting the isocontour too */ roi->isocontour_min_value = iso_min_value; roi->isocontour_max_value = iso_max_value; roi->isocontour_range = iso_range; /* we first make a raw data set the size of the data set to record the in/out values */ #if defined(ROI_TYPE_ISOCONTOUR_2D) temp_rd = amitk_raw_data_new_2D_with_data0(AMITK_FORMAT_UBYTE, ds->raw_data->dim.y, ds->raw_data->dim.x); #elif defined(ROI_TYPE_ISOCONTOUR_3D) temp_rd = amitk_raw_data_new_3D_with_data0(AMITK_FORMAT_UBYTE, ds->raw_data->dim.z, ds->raw_data->dim.y, ds->raw_data->dim.x); #endif /* epsilon guards for floating point rounding */ temp_min_value = roi->isocontour_min_value-EPSILON*fabs(roi->isocontour_min_value); temp_max_value = roi->isocontour_max_value+EPSILON*fabs(roi->isocontour_max_value); /* fill in the data set */ isocontour_consider(ds, temp_rd, iso_voxel, temp_min_value, temp_max_value, iso_range); /* figure out the min and max dimensions */ min_voxel = max_voxel = iso_voxel; i_voxel.t = i_voxel.g = 0; for (i_voxel.z=0; i_voxel.z < temp_rd->dim.z; i_voxel.z++) { for (i_voxel.y=0; i_voxel.y < temp_rd->dim.y; i_voxel.y++) { for (i_voxel.x=0; i_voxel.x < temp_rd->dim.x; i_voxel.x++) { if (AMITK_RAW_DATA_UBYTE_CONTENT(temp_rd, i_voxel) & 0x1) { if (min_voxel.x > i_voxel.x) min_voxel.x = i_voxel.x; if (max_voxel.x < i_voxel.x) max_voxel.x = i_voxel.x; if (min_voxel.y > i_voxel.y) min_voxel.y = i_voxel.y; if (max_voxel.y < i_voxel.y) max_voxel.y = i_voxel.y; #ifdef ROI_TYPE_ISOCONTOUR_3D if (min_voxel.z > i_voxel.z) min_voxel.z = i_voxel.z; if (max_voxel.z < i_voxel.z) max_voxel.z = i_voxel.z; #endif } } } } /* transfer the subset of the data set that contains positive information */ if (roi->map_data != NULL) g_object_unref(roi->map_data); #if defined(ROI_TYPE_ISOCONTOUR_2D) roi->map_data = amitk_raw_data_new_2D_with_data0(AMITK_FORMAT_UBYTE, max_voxel.y-min_voxel.y+1, max_voxel.x-min_voxel.x+1); #elif defined(ROI_TYPE_ISOCONTOUR_3D) roi->map_data = amitk_raw_data_new_3D_with_data0(AMITK_FORMAT_UBYTE, max_voxel.z-min_voxel.z+1, max_voxel.y-min_voxel.y+1, max_voxel.x-min_voxel.x+1); #endif i_voxel.t = i_voxel.g = 0; for (i_voxel.z=0; i_voxel.zmap_data->dim.z; i_voxel.z++) for (i_voxel.y=0; i_voxel.ymap_data->dim.y; i_voxel.y++) for (i_voxel.x=0; i_voxel.xmap_data->dim.x; i_voxel.x++) { #if defined(ROI_TYPE_ISOCONTOUR_2D) AMITK_RAW_DATA_UBYTE_SET_CONTENT(roi->map_data, i_voxel) = 0x01 & AMITK_RAW_DATA_UBYTE_2D_CONTENT(temp_rd, i_voxel.y+min_voxel.y, i_voxel.x+min_voxel.x); #elif defined(ROI_TYPE_ISOCONTOUR_3D) AMITK_RAW_DATA_UBYTE_SET_CONTENT(roi->map_data, i_voxel) = 0x01 & AMITK_RAW_DATA_UBYTE_3D_CONTENT(temp_rd, i_voxel.z+min_voxel.z,i_voxel.y+min_voxel.y, i_voxel.x+min_voxel.x); #endif } g_object_unref(temp_rd); /* mark the edges as such */ i_voxel.t = i_voxel.g = 0; for (i_voxel.z=0; i_voxel.zmap_data->dim.z; i_voxel.z++) for (i_voxel.y=0; i_voxel.ymap_data->dim.y; i_voxel.y++) for (i_voxel.x=0; i_voxel.xmap_data->dim.x; i_voxel.x++) if (AMITK_RAW_DATA_UBYTE_CONTENT(roi->map_data, i_voxel)) AMITK_RAW_DATA_UBYTE_SET_CONTENT(roi->map_data, i_voxel) = map_roi_edge(roi->map_data, i_voxel); /* and set the rest of the important info for the data set */ amitk_space_copy_in_place(AMITK_SPACE(roi), AMITK_SPACE(ds)); roi->voxel_size = ds->voxel_size; POINT_MULT(min_voxel, ds->voxel_size, temp_point); temp_point = amitk_space_s2b(AMITK_SPACE(ds), temp_point); amitk_space_set_offset(AMITK_SPACE(roi), temp_point); amitk_roi_calc_far_corner(roi); return; } #endif void amitk_roi_`'m4_Variable_Type`'_manipulate_area(AmitkRoi * roi, gboolean erase, AmitkVoxel voxel, gint area_size) { AmitkVoxel i_voxel, j_voxel; AmitkVoxel new_dim; AmitkVoxel offset; AmitkVoxel map_data_dim; AmitkPoint new_offset; AmitkRawData * temp_rd; gboolean dim_changed=FALSE; #if defined(ROI_TYPE_ISOCONTOUR_2D) || defined(ROI_TYPE_ISOCONTOUR_3D) g_return_if_fail(roi->map_data != NULL); #endif j_voxel = zero_voxel; i_voxel = zero_voxel; /* check if we need to increase the size of the roi */ if (!erase || (roi->map_data == NULL)) { /* never need to do for an erase, unless map_data hasn't yet been allocated */ if (roi->map_data != NULL) { new_dim = roi->map_data->dim; map_data_dim = roi->map_data->dim; } else { new_dim = zero_voxel; map_data_dim = zero_voxel; } offset = zero_voxel; #if defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_3D) if ((voxel.z-area_size) < 0) { offset.z = -(voxel.z-area_size); new_dim.z += offset.z; dim_changed = TRUE; } if ((voxel.z+area_size) > (map_data_dim.z-1)) { new_dim.z += (voxel.z-(map_data_dim.z-1))+area_size; dim_changed = TRUE; } #endif if ((voxel.y-area_size) < 0) { offset.y = -(voxel.y-area_size); new_dim.y += offset.y; dim_changed = TRUE; } if ((voxel.y+area_size) > (map_data_dim.y-1)) { new_dim.y += (voxel.y-(map_data_dim.y-1))+area_size; dim_changed = TRUE; } if ((voxel.x-area_size) < 0) { offset.x = -(voxel.x-area_size); new_dim.x += offset.x; dim_changed = TRUE; } if ((voxel.x+area_size) > (map_data_dim.x-1)) { new_dim.x += (voxel.x-(map_data_dim.x-1))+area_size; dim_changed = TRUE; } if (dim_changed) { #if defined(ROI_TYPE_ISOCONTOUR_2D) || defined(ROI_TYPE_FREEHAND_2D) temp_rd = amitk_raw_data_new_2D_with_data0(AMITK_FORMAT_UBYTE, new_dim.y, new_dim.x); #else /* ROI_TYPE_ISOCONTOUR_3D or ROI_TYPE_FREEHAND_3D */ temp_rd = amitk_raw_data_new_3D_with_data0(AMITK_FORMAT_UBYTE, new_dim.z, new_dim.y, new_dim.x); #endif /* copy the old map data over */ if (roi->map_data != NULL) { #if defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_3D) for (i_voxel.z = 0, j_voxel.z=offset.z; i_voxel.z < map_data_dim.z; i_voxel.z++, j_voxel.z++) #endif for (i_voxel.y = 0, j_voxel.y=offset.y; i_voxel.y < map_data_dim.y; i_voxel.y++, j_voxel.y++) for (i_voxel.x = 0, j_voxel.x=offset.x; i_voxel.x < map_data_dim.x; i_voxel.x++, j_voxel.x++) AMITK_RAW_DATA_UBYTE_SET_CONTENT(temp_rd,j_voxel)= AMITK_RAW_DATA_UBYTE_CONTENT(roi->map_data,i_voxel); g_object_unref(roi->map_data); } roi->map_data = temp_rd; /* shift the offset to account for the large ROI */ POINT_MULT(offset, roi->voxel_size, new_offset); new_offset = point_cmult(-(1.0+EPSILON), new_offset); new_offset = amitk_space_s2b(AMITK_SPACE(roi), new_offset); amitk_space_set_offset(AMITK_SPACE(roi), new_offset); amitk_roi_calc_far_corner(roi); } } /* sanity check */ g_return_if_fail(roi->map_data != NULL); /* do the erase or drawing */ #if defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_3D) for (i_voxel.z = voxel.z-area_size; i_voxel.z <= voxel.z+area_size; i_voxel.z++) #endif for (i_voxel.y = voxel.y-area_size; i_voxel.y <= voxel.y+area_size; i_voxel.y++) for (i_voxel.x = voxel.x-area_size; i_voxel.x <= voxel.x+area_size; i_voxel.x++) if (erase) { if (amitk_raw_data_includes_voxel(roi->map_data, i_voxel)) AMITK_RAW_DATA_UBYTE_SET_CONTENT(roi->map_data,i_voxel)=0; } else { if (amitk_raw_data_includes_voxel(roi->map_data, i_voxel)) AMITK_RAW_DATA_UBYTE_SET_CONTENT(roi->map_data,i_voxel)=1; } /* re edge the neighboring points */ #if defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_3D) for (i_voxel.z = voxel.z-1-area_size; i_voxel.z <= voxel.z+1+area_size; i_voxel.z++) #endif for (i_voxel.y = voxel.y-1-area_size; i_voxel.y <= voxel.y+1+area_size; i_voxel.y++) for (i_voxel.x = voxel.x-1-area_size; i_voxel.x <= voxel.x+1+area_size; i_voxel.x++) if (amitk_raw_data_includes_voxel(roi->map_data, i_voxel)) if (AMITK_RAW_DATA_UBYTE_CONTENT(roi->map_data, i_voxel)) AMITK_RAW_DATA_UBYTE_SET_CONTENT(roi->map_data, i_voxel) = map_roi_edge(roi->map_data, i_voxel); return; } void amitk_roi_`'m4_Variable_Type`'_calc_center_of_mass(AmitkRoi * roi) { AmitkVoxel i_voxel; guint voxels=0; AmitkPoint center_of_mass; AmitkPoint roi_voxel_size; AmitkPoint current_point; roi_voxel_size = AMITK_ROI_VOXEL_SIZE(roi); center_of_mass = zero_point; i_voxel.t = i_voxel.g = 0; for (i_voxel.z=0; i_voxel.zmap_data->dim.z; i_voxel.z++) for (i_voxel.y=0; i_voxel.ymap_data->dim.y; i_voxel.y++) for (i_voxel.x=0; i_voxel.xmap_data->dim.x; i_voxel.x++) if (AMITK_RAW_DATA_UBYTE_CONTENT(roi->map_data, i_voxel)) { voxels++; VOXEL_TO_POINT(i_voxel, roi_voxel_size, current_point); POINT_ADD(current_point, center_of_mass, center_of_mass); } roi->center_of_mass = point_cmult(1.0/((gdouble) voxels), center_of_mass); roi->center_of_mass_calculated=TRUE; } #endif /* iterates over the voxels in the given data set that are inside the given roi, and performs the specified calculation function for those points */ /* calulation should be a function taking the following arguments: calculation(AmitkVoxel dataset_voxel, amide_data_t value, amide_real_t voxel_fraction, gpointer data) */ void amitk_roi_`'m4_Variable_Type`'_calculate_on_data_set_fast(const AmitkRoi * roi, const AmitkDataSet * ds, const guint frame, const guint gate, const gboolean inverse, void (* calculation)(), gpointer data) { AmitkPoint roi_pt_corner, roi_pt_center, fine_roi_pt; AmitkPoint fine_ds_pt, far_ds_pt, center_ds_pt; amide_data_t value; amide_real_t voxel_fraction; AmitkVoxel i,j, k; AmitkVoxel start, dim, ds_dim; gboolean corner_in, center_in; AmitkRawData * next_plane_in; AmitkRawData * curr_plane_in; gboolean small_dimensions; AmitkCorners intersection_corners; AmitkPoint ds_voxel_size; AmitkPoint sub_voxel_size; amide_real_t grain_size; #if defined (ROI_TYPE_BOX) AmitkPoint box_corner; box_corner = AMITK_VOLUME_CORNER(roi); #endif #if defined(ROI_TYPE_ELLIPSOID) || defined(ROI_TYPE_CYLINDER) AmitkPoint center; AmitkPoint radius; #if defined(ROI_TYPE_CYLINDER) amide_real_t height; height = AMITK_VOLUME_Z_CORNER(roi); #endif center = amitk_space_b2s(AMITK_SPACE(roi), amitk_volume_get_center(AMITK_VOLUME(roi))); radius = point_cmult(0.5, AMITK_VOLUME_CORNER(roi)); #endif #if defined(ROI_TYPE_ISOCONTOUR_2D) || defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_2D) || defined(ROI_TYPE_FREEHAND_3D) AmitkPoint roi_voxel_size; AmitkVoxel roi_voxel; roi_voxel_size = AMITK_ROI_VOXEL_SIZE(roi); #endif ds_voxel_size = AMITK_DATA_SET_VOXEL_SIZE(ds); sub_voxel_size = point_cmult(1.0/AMITK_ROI_GRANULARITY, ds_voxel_size); ds_dim = AMITK_DATA_SET_DIM(ds); grain_size = 1.0/(AMITK_ROI_GRANULARITY*AMITK_ROI_GRANULARITY*AMITK_ROI_GRANULARITY); /* figure out the intersection between the data set and the roi */ if (inverse) { start = zero_voxel; dim = ds_dim; } else { if (!amitk_volume_volume_intersection_corners(AMITK_VOLUME(ds), AMITK_VOLUME(roi), intersection_corners)) { dim = zero_voxel; /* no intersection */ start = zero_voxel; } else { /* translate the intersection into voxel space */ POINT_TO_VOXEL(intersection_corners[0], ds_voxel_size, 0, 0, start); POINT_TO_VOXEL(intersection_corners[1], ds_voxel_size, 0, 0, dim); dim = voxel_add(voxel_sub(dim, start), one_voxel); } } /* check if we're done already */ if ((dim.x == 0) || (dim.y == 0) || (dim.z == 0)) { return; } /* if we have any small dimensions, make sure we always iterate over sub voxels */ if ((dim.x == 1) || (dim.y == 1) || (dim.z == 1) || (ds_dim.x == 1) || (ds_dim.y == 1) || (ds_dim.z == 1)) small_dimensions = TRUE; else small_dimensions = FALSE; /* over-iterate, as our initial edges will always be considered out of the roi */ start.x -= 1; start.y -= 1; start.z -= 1; dim.x += 1; dim.y += 1; dim.z += 1; /* check all dimensions */ if (start.x < 0) start.x = 0; if (start.y < 0) start.y = 0; if (start.z < 0) start.z = 0; if (dim.x+start.x > ds_dim.x) dim.x = ds_dim.x-start.x; if (dim.y+start.y > ds_dim.y) dim.y = ds_dim.y-start.y; if (dim.z+start.z > ds_dim.z) dim.z = ds_dim.z-start.z; /* start and dim specify (in the data set's voxel space) the voxels in the volume we should be iterating over */ /* these two arrays are used to store whether the voxel vertices are in the ROI or not */ next_plane_in = amitk_raw_data_new_2D_with_data0(AMITK_FORMAT_UBYTE, dim.y+1, dim.x+1); curr_plane_in = amitk_raw_data_new_2D_with_data0(AMITK_FORMAT_UBYTE, dim.y+1, dim.x+1); j.t = frame; j.g = gate; i.t = k.t = i.g = k.g = 0; for (i.z = 0; i.z < dim.z; i.z++) { j.z = i.z+start.z; far_ds_pt.z = (j.z+1)*ds_voxel_size.z; center_ds_pt.z = (j.z+0.5)*ds_voxel_size.z; for (i.y = 0; i.y < dim.y; i.y++) { j.y = i.y+start.y; far_ds_pt.y = (j.y+1)*ds_voxel_size.y; center_ds_pt.y = (j.y+0.5)*ds_voxel_size.y; for (i.x = 0; i.x < dim.x; i.x++) { j.x = i.x+start.x; far_ds_pt.x = (j.x+1)*ds_voxel_size.x; center_ds_pt.x = (j.x+0.5)*ds_voxel_size.x; /* figure out if the center and the next far corner is in the roi or not */ /* get the corresponding roi points */ roi_pt_corner = amitk_space_s2s(AMITK_SPACE(ds), AMITK_SPACE(roi), far_ds_pt); roi_pt_center = amitk_space_s2s(AMITK_SPACE(ds), AMITK_SPACE(roi), center_ds_pt); /* calculate the one corner of the voxel "box" to determine if it's in or not */ /* along with the center of the voxel */ #if defined (ROI_TYPE_BOX) corner_in = point_in_box(roi_pt_corner, box_corner); center_in = point_in_box(roi_pt_center, box_corner); #endif #if defined(ROI_TYPE_CYLINDER) corner_in = point_in_elliptic_cylinder(roi_pt_corner, center, height, radius); center_in = point_in_elliptic_cylinder(roi_pt_center, center, height, radius); #endif #if defined(ROI_TYPE_ELLIPSOID) corner_in = point_in_ellipsoid(roi_pt_corner,center,radius); center_in = point_in_ellipsoid(roi_pt_center,center,radius); #endif #if defined(ROI_TYPE_ISOCONTOUR_2D) || defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_2D) || defined(ROI_TYPE_FREEHAND_3D) POINT_TO_VOXEL(roi_pt_corner, roi_voxel_size, 0, 0,roi_voxel); corner_in = (amitk_raw_data_includes_voxel(roi->map_data, roi_voxel) && (AMITK_RAW_DATA_UBYTE_CONTENT(roi->map_data, roi_voxel) != 0)); POINT_TO_VOXEL(roi_pt_center, roi_voxel_size, 0, 0,roi_voxel); center_in = (amitk_raw_data_includes_voxel(roi->map_data, roi_voxel) && (AMITK_RAW_DATA_UBYTE_CONTENT(roi->map_data, roi_voxel) != 0)); #endif AMITK_RAW_DATA_UBYTE_2D_SET_CONTENT(next_plane_in,i.y+1,i.x+1)=corner_in; if (AMITK_RAW_DATA_UBYTE_2D_CONTENT(curr_plane_in,i.y,i.x) && AMITK_RAW_DATA_UBYTE_2D_CONTENT(curr_plane_in,i.y,i.x+1) && AMITK_RAW_DATA_UBYTE_2D_CONTENT(curr_plane_in,i.y+1,i.x) && AMITK_RAW_DATA_UBYTE_2D_CONTENT(curr_plane_in,i.y+1,i.x+1) && AMITK_RAW_DATA_UBYTE_2D_CONTENT(next_plane_in,i.y,i.x) && AMITK_RAW_DATA_UBYTE_2D_CONTENT(next_plane_in,i.y,i.x+1) && AMITK_RAW_DATA_UBYTE_2D_CONTENT(next_plane_in,i.y+1,i.x) && AMITK_RAW_DATA_UBYTE_2D_CONTENT(next_plane_in,i.y+1,i.x+1) && center_in) { /* this voxel is entirely in the ROI */ if (!inverse) { value = amitk_data_set_get_value(ds,j); (*calculation)(j, value, 1.0, data); } } else if (AMITK_RAW_DATA_UBYTE_2D_CONTENT(curr_plane_in,i.y,i.x) || AMITK_RAW_DATA_UBYTE_2D_CONTENT(curr_plane_in,i.y,i.x+1) || AMITK_RAW_DATA_UBYTE_2D_CONTENT(curr_plane_in,i.y+1,i.x) || AMITK_RAW_DATA_UBYTE_2D_CONTENT(curr_plane_in,i.y+1,i.x+1) || AMITK_RAW_DATA_UBYTE_2D_CONTENT(next_plane_in,i.y,i.x) || AMITK_RAW_DATA_UBYTE_2D_CONTENT(next_plane_in,i.y,i.x+1) || AMITK_RAW_DATA_UBYTE_2D_CONTENT(next_plane_in,i.y+1,i.x) || AMITK_RAW_DATA_UBYTE_2D_CONTENT(next_plane_in,i.y+1,i.x+1) || center_in || small_dimensions) { /* this voxel is partially in the ROI, will need to do subvoxel analysis */ value = amitk_data_set_get_value(ds,j); voxel_fraction=0; for (k.z = 0;k.zmap_data, roi_voxel) && (AMITK_RAW_DATA_UBYTE_CONTENT(roi->map_data, roi_voxel) != 0)) voxel_fraction += grain_size; #endif } /* k.x loop */ } /* k.y loop */ } /* k.z loop */ if (!inverse) { (*calculation)(j, value, voxel_fraction, data); } else { (*calculation)(j, value, 1.0-voxel_fraction, data); } } else { /* this voxel is outside the ROI */ if (inverse) { value = amitk_data_set_get_value(ds,j); (*calculation)(j, value, 1.0, data); } } } /* i.x loop */ } /* i.y loop */ /* need to copy over the info on which voxel corners are in the roi */ for (k.y=0;k.y < next_plane_in->dim.y; k.y++) for (k.x=0;k.x < next_plane_in->dim.x; k.x++) AMITK_RAW_DATA_UBYTE_2D_SET_CONTENT(curr_plane_in,k.y,k.x) = AMITK_RAW_DATA_UBYTE_2D_CONTENT(next_plane_in,k.y,k.x); } /* i.z loop */ /* trash collection */ g_object_unref(curr_plane_in); g_object_unref(next_plane_in); return; } /* iterates over the voxels in the given data set that are inside the given roi, and performs the specified calculation function for those points */ /* calulation should be a function taking the following arguments: calculation(AmitkVoxel dataset_voxel, amide_data_t value, amide_real_t voxel_fraction, gpointer data) */ void amitk_roi_`'m4_Variable_Type`'_calculate_on_data_set_accurate(const AmitkRoi * roi, const AmitkDataSet * ds, const guint frame, const guint gate, const gboolean inverse, void (* calculation)(), gpointer data) { AmitkPoint fine_roi_pt, fine_ds_pt; amide_data_t value; amide_real_t voxel_fraction; AmitkVoxel j, k; AmitkVoxel start, end, ds_dim; AmitkCorners intersection_corners; AmitkPoint ds_voxel_size; AmitkPoint sub_voxel_size; amide_real_t grain_size; #if defined (ROI_TYPE_BOX) AmitkPoint box_corner; box_corner = AMITK_VOLUME_CORNER(roi); #endif #if defined(ROI_TYPE_ELLIPSOID) || defined(ROI_TYPE_CYLINDER) AmitkPoint center; AmitkPoint radius; #if defined(ROI_TYPE_CYLINDER) amide_real_t height; height = AMITK_VOLUME_Z_CORNER(roi); #endif center = amitk_space_b2s(AMITK_SPACE(roi), amitk_volume_get_center(AMITK_VOLUME(roi))); radius = point_cmult(0.5, AMITK_VOLUME_CORNER(roi)); #endif #if defined(ROI_TYPE_ISOCONTOUR_2D) || defined(ROI_TYPE_ISOCONTOUR_3D) || defined(ROI_TYPE_FREEHAND_2D) || defined(ROI_TYPE_FREEHAND_3D) AmitkPoint roi_voxel_size; AmitkVoxel roi_voxel; roi_voxel_size = AMITK_ROI_VOXEL_SIZE(roi); #endif ds_voxel_size = AMITK_DATA_SET_VOXEL_SIZE(ds); sub_voxel_size = point_cmult(1.0/AMITK_ROI_GRANULARITY, ds_voxel_size); ds_dim = AMITK_DATA_SET_DIM(ds); grain_size = 1.0/(AMITK_ROI_GRANULARITY*AMITK_ROI_GRANULARITY*AMITK_ROI_GRANULARITY); /* figure out the intersection between the data set and the roi */ if (inverse) { start = zero_voxel; end = voxel_sub(ds_dim, one_voxel); } else { if (!amitk_volume_volume_intersection_corners(AMITK_VOLUME(ds), AMITK_VOLUME(roi), intersection_corners)) { end = zero_voxel; /* no intersection */ start = one_voxel; } else { /* translate the intersection into voxel space */ POINT_TO_VOXEL(intersection_corners[0], ds_voxel_size, 0, 0, start); POINT_TO_VOXEL(intersection_corners[1], ds_voxel_size, 0, 0, end); } } /* check if we're done already */ if ((start.x > end.x) || (start.y > end.y) || (start.z > end.z)) return; /* check all dimensions */ if (start.x < 0) start.x = 0; if (start.y < 0) start.y = 0; if (start.z < 0) start.z = 0; if (end.x >= ds_dim.x) end.x = ds_dim.x-1; if (end.y >= ds_dim.y) end.y = ds_dim.y-1; if (end.z >= ds_dim.z) end.z = ds_dim.z-1; /* start and end specify (in the data set's voxel space) the voxels in the volume we should be iterating over */ j.t = frame; j.g = gate; k.t = k.g = 0; for (j.z = start.z; j.z <= end.z; j.z++) { for (j.y = start.y; j.y <= end.y; j.y++) { for (j.x = start.x; j.x <= end.x; j.x++) { value = amitk_data_set_get_value(ds,j); voxel_fraction=0; for (k.z = 0;k.zmap_data, roi_voxel) && (AMITK_RAW_DATA_UBYTE_CONTENT(roi->map_data, roi_voxel) != 0)) voxel_fraction+=grain_size; #endif fine_ds_pt.x += sub_voxel_size.x; } /* k.x loop */ } /* k.y loop */ } /* k.z loop */ if (!inverse) { if (voxel_fraction > 0.0) { (*calculation)(j, value, voxel_fraction, data); } } else { if (voxel_fraction < 1.0) { (*calculation)(j, value, 1.0-voxel_fraction, data); } } } /* i.x loop */ } /* i.y loop */ } /* i.z loop */ return; } amide-1.0.5/src/render.c0000644000175000017500000013442512270274005014666 0ustar loeningloening/* rendering.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #ifdef AMIDE_LIBVOLPACK_SUPPORT #include #include #include "render.h" #include "amitk_roi.h" #include "amitk_data_set_DOUBLE_0D_SCALING.h" #include #include #ifdef AMIDE_DEBUG #include #endif /* external variables */ gchar * rendering_quality_names[] = { N_("Highest Quality and Slowest"), N_("High Quality and Medium Speed"), N_("Medium Quality and Fast"), N_("Low Quality and Fastest") }; gchar * pixel_type_names[] = { N_("Opacity"), N_("Grayscale") }; rendering_t * rendering_unref(rendering_t * rendering) { classification_t i_class; if (rendering== NULL) return rendering; /* sanity checks */ g_return_val_if_fail(rendering->ref_count > 0, NULL); rendering->ref_count--; #ifdef AMIDE_DEBUG if (rendering->ref_count == 0) g_print("freeing rendering context of %s\n",rendering->name); #endif /* if we've removed all reference's, free the context */ if (rendering->ref_count == 0) { if (rendering->object != NULL) { amitk_object_unref(rendering->object); rendering->object = NULL; } if (rendering->rendering_data != NULL) { g_free(rendering->rendering_data); rendering->rendering_data = NULL; } if (rendering->name != NULL) { g_free(rendering->name); rendering->name = NULL; } if (rendering->vpc != NULL) { vpDestroyContext(rendering->vpc); rendering->vpc = NULL; } if (rendering->image != NULL) { g_free(rendering->image); rendering->image = NULL; } for (i_class = 0; i_class < NUM_CLASSIFICATIONS; i_class++) { g_free(rendering->ramp_x[i_class]); g_free(rendering->ramp_y[i_class]); } if (rendering->transformed_volume != NULL) { amitk_object_unref(rendering->transformed_volume); rendering->transformed_volume = NULL; } if (rendering->extraction_volume != NULL) { amitk_object_unref(rendering->extraction_volume); rendering->extraction_volume = NULL; } g_free(rendering); rendering = NULL; } return rendering; } /* either volume or object must be NULL */ rendering_t * rendering_init(const AmitkObject * object, AmitkVolume * rendering_volume, const amide_real_t voxel_size, const amide_time_t start, const amide_time_t duration, const gboolean zero_fill, const gboolean optimize_rendering, const gboolean no_gradient_opacity, AmitkUpdateFunc update_func, gpointer update_data) { rendering_t * new_rendering = NULL; gint i; gint init_density_ramp_x[] = RENDERING_DENSITY_RAMP_X; gfloat init_density_ramp_y[] = RENDERING_DENSITY_RAMP_Y; gint init_gradient_ramp_x[] = RENDERING_GRADIENT_RAMP_X; gfloat init_gradient_ramp_y[] = RENDERING_GRADIENT_RAMP_Y; gfloat init_gradient_ramp_y_flat[] = RENDERING_GRADIENT_RAMP_Y_FLAT; if (!(AMITK_IS_DATA_SET(object) || AMITK_IS_ROI(object))) return NULL; if ((new_rendering = g_try_new(rendering_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for rendering context")); return NULL; } new_rendering->ref_count = 1; new_rendering->need_rerender = TRUE; new_rendering->need_reclassify = TRUE; /* start initializing what we can */ new_rendering->vpc = vpCreateContext(); new_rendering->object = amitk_object_copy(object); new_rendering->name = g_strdup(AMITK_OBJECT_NAME(object)); if (AMITK_IS_DATA_SET(object)) new_rendering->color_table = AMITK_DATA_SET_COLOR_TABLE(object, AMITK_VIEW_MODE_SINGLE); else new_rendering->color_table = AMITK_COLOR_TABLE_BW_LINEAR; if (no_gradient_opacity) new_rendering->pixel_type = OPACITY; else new_rendering->pixel_type = RENDERING_DEFAULT_PIXEL_TYPE; new_rendering->image = NULL; new_rendering->rendering_data = NULL; new_rendering->curve_type[DENSITY_CLASSIFICATION] = CURVE_LINEAR; new_rendering->curve_type[GRADIENT_CLASSIFICATION] = CURVE_LINEAR; new_rendering->transformed_volume = AMITK_VOLUME(amitk_object_copy(AMITK_OBJECT(rendering_volume))); new_rendering->extraction_volume = AMITK_VOLUME(amitk_object_copy(AMITK_OBJECT(rendering_volume))); new_rendering->start = start; new_rendering->duration = duration; if (AMITK_IS_DATA_SET(object)) new_rendering->view_start_gate = AMITK_DATA_SET_VIEW_START_GATE(object); else new_rendering->view_start_gate = 0; if (AMITK_IS_DATA_SET(object)) new_rendering->view_end_gate = AMITK_DATA_SET_VIEW_END_GATE(object); else new_rendering->view_end_gate = 0; new_rendering->zero_fill = zero_fill; new_rendering->optimize_rendering = optimize_rendering; /* figure out the size of our context */ new_rendering->dim.x = ceil((AMITK_VOLUME_X_CORNER(rendering_volume))/voxel_size); new_rendering->dim.y = ceil((AMITK_VOLUME_Y_CORNER(rendering_volume))/voxel_size); new_rendering->dim.z = ceil((AMITK_VOLUME_Z_CORNER(rendering_volume))/voxel_size); new_rendering->dim.g = 1; new_rendering->dim.t = 1; new_rendering->voxel_size = voxel_size; /* adjust the thresholding if needed */ if (AMITK_IS_DATA_SET(new_rendering->object)) if (AMITK_DATA_SET_THRESHOLDING(new_rendering->object) == AMITK_THRESHOLDING_PER_SLICE) { amitk_data_set_set_thresholding(AMITK_DATA_SET(new_rendering->object), AMITK_THRESHOLDING_GLOBAL); g_warning(_("\"Per Slice\" thresholding illogical for conversion to volume rendering, using \"Global\" thresholding ")); } #if AMIDE_DEBUG g_print("\tSetting up a Rendering Context\n"); #endif /* setup the density and gradient ramps */ new_rendering->num_points[DENSITY_CLASSIFICATION] = RENDERING_DENSITY_RAMP_POINTS; if ((new_rendering->ramp_x[DENSITY_CLASSIFICATION] = g_try_new(gint, new_rendering->num_points[DENSITY_CLASSIFICATION])) == NULL) { g_warning(_("couldn't allocate memory space for density ramp x")); return NULL; } if ((new_rendering->ramp_y[DENSITY_CLASSIFICATION] = g_try_new(gfloat,new_rendering->num_points[DENSITY_CLASSIFICATION])) == NULL) { g_warning(_("couldn't allocate memory space for density ramp y")); return NULL; } for (i=0;inum_points[DENSITY_CLASSIFICATION];i++) { new_rendering->ramp_x[DENSITY_CLASSIFICATION][i] = init_density_ramp_x[i]; new_rendering->ramp_y[DENSITY_CLASSIFICATION][i] = init_density_ramp_y[i]; } new_rendering->num_points[GRADIENT_CLASSIFICATION] = RENDERING_GRADIENT_RAMP_POINTS; if ((new_rendering->ramp_x[GRADIENT_CLASSIFICATION] = g_try_new(gint,new_rendering->num_points[GRADIENT_CLASSIFICATION])) == NULL) { g_warning(_("couldn't allocate memory space for gradient ramp x")); return NULL; } if ((new_rendering->ramp_y[GRADIENT_CLASSIFICATION] = g_try_new(gfloat,new_rendering->num_points[GRADIENT_CLASSIFICATION])) == NULL) { g_warning(_("couldn't allocate memory space for gradient ramp y")); return NULL; } for (i=0;inum_points[GRADIENT_CLASSIFICATION];i++) { new_rendering->ramp_x[GRADIENT_CLASSIFICATION][i] = init_gradient_ramp_x[i]; if (no_gradient_opacity) new_rendering->ramp_y[GRADIENT_CLASSIFICATION][i] = init_gradient_ramp_y_flat[i]; else new_rendering->ramp_y[GRADIENT_CLASSIFICATION][i] = init_gradient_ramp_y[i]; } /* setup the context's classification function */ if (vpRamp(new_rendering->density_ramp, sizeof(gfloat), new_rendering->num_points[DENSITY_CLASSIFICATION], new_rendering->ramp_x[DENSITY_CLASSIFICATION], new_rendering->ramp_y[DENSITY_CLASSIFICATION]) != VP_OK){ g_warning(_("Error Setting the Rendering Density Ramp")); new_rendering = rendering_unref(new_rendering); return new_rendering; } /* setup the context's gradient classification */ if (vpRamp(new_rendering->gradient_ramp, sizeof(gfloat), new_rendering->num_points[GRADIENT_CLASSIFICATION], new_rendering->ramp_x[GRADIENT_CLASSIFICATION], new_rendering->ramp_y[GRADIENT_CLASSIFICATION]) != VP_OK) { g_warning(_("Error Setting the Rendering Gradient Ramp")); new_rendering = rendering_unref(new_rendering); return new_rendering; } /* tell the rendering context info on the voxel structure */ if (vpSetVoxelSize(new_rendering->vpc, RENDERING_BYTES_PER_VOXEL, RENDERING_VOXEL_FIELDS, RENDERING_SHADE_FIELDS, RENDERING_CLSFY_FIELDS) != VP_OK) { g_warning(_("Error Setting the Rendering Voxel Size (%s): %s"), new_rendering->name, vpGetErrorString(vpGetError(new_rendering->vpc))); new_rendering = rendering_unref(new_rendering); return new_rendering; } /* now tell the rendering context the location of each field in voxel, do this for each field in the context */ if (vpSetVoxelField (new_rendering->vpc,RENDERING_NORMAL_FIELD, RENDERING_NORMAL_SIZE, RENDERING_NORMAL_OFFSET, RENDERING_NORMAL_MAX) != VP_OK) { g_warning(_("Error Specifying the Rendering Voxel Fields (%s, NORMAL): %s"), new_rendering->name, vpGetErrorString(vpGetError(new_rendering->vpc))); new_rendering = rendering_unref(new_rendering); return new_rendering; } if (vpSetVoxelField (new_rendering->vpc,RENDERING_DENSITY_FIELD, RENDERING_DENSITY_SIZE, RENDERING_DENSITY_OFFSET, RENDERING_DENSITY_MAX) != VP_OK) { g_warning(_("Error Specifying the Rendering Voxel Fields (%s, DENSITY): %s"), new_rendering->name, vpGetErrorString(vpGetError(new_rendering->vpc))); new_rendering = rendering_unref(new_rendering); return new_rendering; } if (vpSetVoxelField (new_rendering->vpc,RENDERING_GRADIENT_FIELD, RENDERING_GRADIENT_SIZE, RENDERING_GRADIENT_OFFSET, RENDERING_GRADIENT_MAX) != VP_OK) { g_warning(_("Error Specifying the Rendering Voxel Fields (%s, GRADIENT): %s"), new_rendering->name, vpGetErrorString(vpGetError(new_rendering->vpc))); new_rendering = rendering_unref(new_rendering); return new_rendering; } /* apply density classification to the vpc */ if (vpSetClassifierTable(new_rendering->vpc, RENDERING_DENSITY_PARAM, RENDERING_DENSITY_FIELD, new_rendering->density_ramp, sizeof(new_rendering->density_ramp)) != VP_OK){ g_warning(_("Error Setting the Rendering Classifier Table (%s, DENSITY): %s"), new_rendering->name, vpGetErrorString(vpGetError(new_rendering->vpc))); new_rendering = rendering_unref(new_rendering); return new_rendering; } /* apply it to the different vpc's */ if (vpSetClassifierTable(new_rendering->vpc, RENDERING_GRADIENT_PARAM, RENDERING_GRADIENT_FIELD, new_rendering->gradient_ramp, sizeof(new_rendering->gradient_ramp)) != VP_OK){ g_warning(_("Error Setting the Classifier Table (%s, GRADIENT): %s"), new_rendering->name, vpGetErrorString(vpGetError(new_rendering->vpc))); new_rendering = rendering_unref(new_rendering); return new_rendering; } /* now copy the object data into the rendering context */ if (rendering_load_object(new_rendering, update_func, update_data) != TRUE) { new_rendering = rendering_unref(new_rendering); return new_rendering; } /* and finally, set up the structure into which the rendering will be returned */ rendering_set_image(new_rendering, new_rendering->pixel_type, RENDERING_DEFAULT_ZOOM); return new_rendering; } /* function to reload the rendering context's concept of an object when necessary */ gboolean rendering_reload_object(rendering_t * rendering, const amide_time_t new_start, const amide_time_t new_duration, AmitkUpdateFunc update_func, gpointer update_data) { amide_time_t old_start, old_duration; guint frame; old_start = rendering->start; old_duration = rendering->duration; rendering->start = new_start; rendering->duration = new_duration; /* only need to do stuff for dynamic data sets */ if (!AMITK_IS_DATA_SET(rendering->object)) return TRUE; if (!(AMITK_DATA_SET_DYNAMIC(rendering->object) || AMITK_DATA_SET_GATED(rendering->object))) return TRUE; // changed as of 0.8.12 -- delete when sure everything works // if (amitk_data_set_get_frame(AMITK_DATA_SET(rendering->object), new_start) == // amitk_data_set_get_frame(AMITK_DATA_SET(rendering->object), old_start)) // if (amitk_data_set_get_frame(AMITK_DATA_SET(rendering->object), new_start+new_duration) == // amitk_data_set_get_frame(AMITK_DATA_SET(rendering->object), old_start+old_duration)) frame = amitk_data_set_get_frame(AMITK_DATA_SET(rendering->object), new_start); /* if we're completely inside one frame, or we haven't changed time */ if (((frame == amitk_data_set_get_frame(AMITK_DATA_SET(rendering->object), old_start)) && (frame == amitk_data_set_get_frame(AMITK_DATA_SET(rendering->object), new_start+new_duration)) && (frame == amitk_data_set_get_frame(AMITK_DATA_SET(rendering->object), old_start+old_duration))) || (REAL_EQUAL(new_start, old_start) && REAL_EQUAL(new_duration, old_duration))) if (AMITK_DATA_SET_VIEW_START_GATE(rendering->object) == rendering->view_start_gate) if (AMITK_DATA_SET_VIEW_END_GATE(rendering->object) == rendering->view_end_gate) return TRUE; rendering->view_start_gate = AMITK_DATA_SET_VIEW_START_GATE(rendering->object); rendering->view_end_gate = AMITK_DATA_SET_VIEW_END_GATE(rendering->object); /* allright, reload the rendering context's data */ rendering->need_rerender = TRUE; rendering->need_reclassify = TRUE; return rendering_load_object(rendering, update_func, update_data); } /* function to update the rendering structure's concept of the object */ gboolean rendering_load_object(rendering_t * rendering, AmitkUpdateFunc update_func, gpointer update_data) { AmitkVoxel i_voxel, j_voxel; rendering_density_t * density; /* buffer for density data */ guint density_size;/* size of density data */ guint context_size;/* size of context */ div_t x; gint divider; gchar * temp_string; gboolean continue_work=TRUE; #ifdef AMIDE_DEBUG struct timeval tv1; struct timeval tv2; gdouble time1; gdouble time2; /* let's do some timing */ gettimeofday(&tv1, NULL); #endif /* tell the volpack context the dimensions of our rendering context */ if (vpSetVolumeSize(rendering->vpc, rendering->dim.x, rendering->dim.y, rendering->dim.z) != VP_OK) { g_warning(_("Error Setting the Context Size (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); return FALSE; } /* allocate space for the raw data and the context */ density_size = rendering->dim.x * rendering->dim.y * rendering->dim.z * RENDERING_DENSITY_SIZE; context_size = rendering->dim.x * rendering->dim.y * rendering->dim.z * RENDERING_BYTES_PER_VOXEL; if ((density = (rendering_density_t * ) g_try_malloc0(density_size)) == NULL) { g_warning(_("Could not allocate memory space for density data for %s"), rendering->name); return FALSE; } if (rendering->rendering_data != NULL) { g_free(rendering->rendering_data); rendering->rendering_data = NULL; } if ((rendering->rendering_data = (rendering_voxel_t * ) g_try_malloc(context_size)) == NULL) { g_warning(_("Could not allocate memory space for rendering context volume for %s"), rendering->name); g_free(density); return FALSE; } vpSetRawVoxels(rendering->vpc, rendering->rendering_data, context_size, RENDERING_BYTES_PER_VOXEL, rendering->dim.x * RENDERING_BYTES_PER_VOXEL, rendering->dim.x* rendering->dim.y * RENDERING_BYTES_PER_VOXEL); /* setup the progress information */ if (update_func != NULL) { temp_string = g_strdup_printf(_("Converting for rendering: %s"), rendering->name); continue_work = (*update_func)(update_data, temp_string, (gdouble) 0.0); g_free(temp_string); } divider = ((rendering->dim.z/AMITK_UPDATE_DIVIDER) < 1) ? 1 : (rendering->dim.z/AMITK_UPDATE_DIVIDER); if (AMITK_IS_ROI(rendering->object)) { AmitkPoint center, radius; amide_real_t height; AmitkPoint temp_point; AmitkPoint box_corner; gint temp_int; AmitkVoxel start, end; AmitkCorners intersection_corners; AmitkPoint voxel_size; voxel_size.x = voxel_size.y = voxel_size.z = rendering->voxel_size; radius = point_cmult(0.5, AMITK_VOLUME_CORNER(rendering->object)); center = amitk_space_b2s(AMITK_SPACE(rendering->object), amitk_volume_get_center(AMITK_VOLUME(rendering->object))); height = AMITK_VOLUME_Z_CORNER(rendering->object); box_corner = AMITK_VOLUME_CORNER(rendering->object); j_voxel.t = j_voxel.g = j_voxel.z = i_voxel.t= i_voxel.g = 0; /* figure out the intersection between the rendering volume and the roi */ if (!amitk_volume_volume_intersection_corners(rendering->extraction_volume, AMITK_VOLUME(rendering->object), intersection_corners)) { start = end = zero_voxel; } else { // intersection_corners[1] = point_cmult(1.0-EPSILON, intersection_corners[1]); POINT_TO_VOXEL(intersection_corners[0], voxel_size, 0, 0, start); POINT_TO_VOXEL(intersection_corners[1], voxel_size, 1, 1, end); end = voxel_sub(end, one_voxel); } g_return_val_if_fail(end.x < rendering->dim.x, FALSE); g_return_val_if_fail(end.y < rendering->dim.y, FALSE); g_return_val_if_fail(end.z < rendering->dim.z, FALSE); for (i_voxel.z = start.z; (i_voxel.z <= end.z) && (continue_work); i_voxel.z++) { if (update_func != NULL) { x = div(i_voxel.z,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, (gdouble) i_voxel.z/(end.z-start.z)); } for (i_voxel.y = start.y; i_voxel.y <= end.y; i_voxel.y++) for (i_voxel.x = start.x; i_voxel.x <= end.x; i_voxel.x++) { VOXEL_TO_POINT(i_voxel, voxel_size, temp_point); temp_point = amitk_space_s2s(AMITK_SPACE(rendering->extraction_volume), AMITK_SPACE(rendering->object),temp_point); switch(AMITK_ROI_TYPE(rendering->object)) { case AMITK_ROI_TYPE_ISOCONTOUR_2D: case AMITK_ROI_TYPE_ISOCONTOUR_3D: case AMITK_ROI_TYPE_FREEHAND_2D: case AMITK_ROI_TYPE_FREEHAND_3D: POINT_TO_VOXEL(temp_point, AMITK_ROI(rendering->object)->voxel_size, 0, 0, j_voxel); if (amitk_raw_data_includes_voxel(AMITK_ROI(rendering->object)->map_data, j_voxel)) { temp_int = *AMITK_RAW_DATA_UBYTE_POINTER(AMITK_ROI(rendering->object)->map_data, j_voxel); if (temp_int == 2) temp_int = RENDERING_DENSITY_MAX; else if (temp_int == 1) temp_int = RENDERING_DENSITY_MAX/2.0; } else temp_int = 0; break; case AMITK_ROI_TYPE_ELLIPSOID: if (point_in_ellipsoid(temp_point, center, radius)) temp_int = RENDERING_DENSITY_MAX; else temp_int = 0; break; case AMITK_ROI_TYPE_BOX: if (point_in_box(temp_point, box_corner)) temp_int = RENDERING_DENSITY_MAX; else temp_int = 0; break; case AMITK_ROI_TYPE_CYLINDER: if (point_in_elliptic_cylinder(temp_point, center, height, radius)) temp_int = RENDERING_DENSITY_MAX; else temp_int = 0; break; default: temp_int=0; g_assert(TRUE); /* assert if we ever get here */ break; } /* note, volpack needs a mirror reversal on the z axis */ density[i_voxel.x + i_voxel.y*rendering->dim.x+ (rendering->dim.z-i_voxel.z-1)*rendering->dim.y*rendering->dim.x] = temp_int; } } } else { /* DATA SET */ AmitkVolume * slice_volume; AmitkDataSet * slice; AmitkPoint new_offset; AmitkPoint temp_corner; amide_data_t temp_val, scale; amide_data_t max, min; AmitkVoxel dim; gboolean unmatched_dimensions = FALSE; AmitkCanvasPoint pixel_size; slice_volume = AMITK_VOLUME(amitk_object_copy(AMITK_OBJECT(rendering->extraction_volume))); /* define the slice that we're trying to pull out of the data set */ temp_corner = AMITK_VOLUME_CORNER(slice_volume); temp_corner.z = rendering->voxel_size; amitk_volume_set_corner(slice_volume, temp_corner); new_offset = zero_point; /* in slice_volume space */ new_offset.z = rendering->voxel_size; /* copy the info from a data set structure into our rendering_volume structure */ j_voxel.t = j_voxel.g = j_voxel.z = i_voxel.t= i_voxel.g = 0; for (i_voxel.z = 0; ((i_voxel.z < rendering->dim.z) && continue_work); i_voxel.z++) { if (update_func != 0) { x = div(i_voxel.z,divider); if (x.rem == 0) continue_work = (*update_func)(update_data, NULL, (gdouble) i_voxel.z/rendering->dim.z); } pixel_size.x = pixel_size.y = rendering->voxel_size; slice = amitk_data_set_get_slice(AMITK_DATA_SET(rendering->object), rendering->start, rendering->duration, -1, pixel_size, slice_volume); if (!unmatched_dimensions && ((rendering->dim.x != AMITK_DATA_SET_DIM_X(slice)) || (rendering->dim.y != AMITK_DATA_SET_DIM_Y(slice)))) { g_warning("unmatched dimensions between rendering and slices (%dx%d != %dx%d) in %s\n", rendering->dim.x, rendering->dim.y, AMITK_DATA_SET_DIM_X(slice), AMITK_DATA_SET_DIM_Y(slice), __FILE__); unmatched_dimensions = TRUE; } dim.x = MIN(rendering->dim.x, AMITK_DATA_SET_DIM_X(slice)); dim.y = MIN(rendering->dim.y, AMITK_DATA_SET_DIM_Y(slice)); amitk_data_set_get_thresholding_min_max(AMITK_DATA_SET_SLICE_PARENT(slice), AMITK_DATA_SET(slice), rendering->start, rendering->duration, &min, &max); scale = ((amide_data_t) RENDERING_DENSITY_MAX) / (max-min); /* note, volpack needs a mirror reversal on the z axis */ if (rendering->zero_fill) { for (j_voxel.y = i_voxel.y = 0; i_voxel.y < dim.y; j_voxel.y++, i_voxel.y++) for (j_voxel.x = i_voxel.x = 0; i_voxel.x < dim.x; j_voxel.x++, i_voxel.x++) { temp_val = scale * (AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(slice,j_voxel)-min); if (temp_val > RENDERING_DENSITY_MAX) temp_val = 0.0; if (temp_val < 0.0) temp_val = 0.0; density[i_voxel.x+ i_voxel.y*rendering->dim.x+ (rendering->dim.z-i_voxel.z-1)* rendering->dim.y* rendering->dim.x] = temp_val; } } else { for (j_voxel.y = i_voxel.y = 0; i_voxel.y < dim.y; j_voxel.y++, i_voxel.y++) for (j_voxel.x = i_voxel.x = 0; i_voxel.x < dim.x; j_voxel.x++, i_voxel.x++) { temp_val = scale * (AMITK_DATA_SET_DOUBLE_0D_SCALING_CONTENT(slice,j_voxel)-min); if (temp_val > RENDERING_DENSITY_MAX) temp_val = RENDERING_DENSITY_MAX; if (temp_val < 0.0) temp_val = 0.0; density[i_voxel.x+ i_voxel.y*rendering->dim.x+ (rendering->dim.z-i_voxel.z-1)* rendering->dim.y* rendering->dim.x] = temp_val; } } amitk_object_unref(slice); /* advance the requested slice volume for next iteration */ amitk_space_set_offset(AMITK_SPACE(slice_volume), amitk_space_s2b(AMITK_SPACE(slice_volume), new_offset)); } amitk_object_unref(slice_volume); } /* if we quit, get out of here */ if (update_func != NULL) continue_work = (*update_func)(update_data, NULL, (gdouble) 2.0); /* remove progress bar */ if (!continue_work) { g_free(density); return FALSE; } /* compute surface normals (for shading) and gradient magnitudes (for classification) */ if (vpVolumeNormals(rendering->vpc, density, density_size, RENDERING_DENSITY_FIELD, RENDERING_GRADIENT_FIELD, RENDERING_NORMAL_FIELD) != VP_OK) { g_warning(_("Error Computing the Rendering Normals (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); g_free(density); return FALSE; } /* we're now done with the density volume, free it */ g_free(density); #ifdef AMIDE_DEBUG /* and wrapup our timing */ gettimeofday(&tv2, NULL); time1 = ((double) tv1.tv_sec) + ((double) tv1.tv_usec)/1000000.0; time2 = ((double) tv2.tv_sec) + ((double) tv2.tv_usec)/1000000.0; g_print("######## Loading object %s took %5.3f (s) #########\n", AMITK_OBJECT_NAME(rendering->object), time2-time1); #endif /* we'll be using min-max octree's as the classifying functions will probably be changed a lot */ /* octrees supposedly allow faster classification */ if (rendering->optimize_rendering) { #if AMIDE_DEBUG g_print("\tCreating the Min/Max Octree\n"); #endif /* set the thresholds on the min-max octree */ if (vpMinMaxOctreeThreshold(rendering->vpc, RENDERING_DENSITY_PARAM, RENDERING_OCTREE_DENSITY_THRESH) != VP_OK) { g_warning(_("Error Setting Rendering Octree Threshold (%s, DENSITY): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); return FALSE; } if (vpMinMaxOctreeThreshold(rendering->vpc, RENDERING_GRADIENT_PARAM, RENDERING_OCTREE_GRADIENT_THRESH) != VP_OK) { g_warning(_("Error Setting Rendering Octree Threshold (%s, GRADIENT): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); return FALSE; } /* create the min/max octree */ if (vpCreateMinMaxOctree(rendering->vpc, 0, RENDERING_OCTREE_BASE_NODE_SIZE) != VP_OK) { g_warning(_("Error Generating Octree (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); return FALSE; } } /* set the initial ambient property, as I don't like the volpack default */ /* if (vpSetMaterial(vpc[which], VP_MATERIAL0, VP_AMBIENT, VP_BOTH_SIDES, 0.0, 0.0, 0.0) != VP_OK){ g_warning(_("Error Setting the Material (%s, AMBIENT): %s"),vol_name[which], vpGetErrorString(vpGetError(vpc[which]))); return FALSE; }*/ /* if (vpSetMaterial(vpc[PET_VOLUME], VP_MATERIAL0, VP_DIFFUSE, VP_BOTH_SIDES, 0.35, 0.35, 0.35) != VP_OK){ g_warning(_("Error Setting the Material (PET_VOLUME, DIFFUSE): %s"),vpGetErrorString(vpGetError(vpc[PET_VOLUME]))); return FALSE; }*/ /* if (vpSetMaterial(vpc[PET_VOLUME], VP_MATERIAL0, VP_SPECULAR, VP_BOTH_SIDES, 0.39, 0.39, 0.39) != VP_OK){ g_warning(_("Error Setting the Material (PET_VOLUME, SPECULAR): %s"),vpGetErrorString(vpGetError(vpc[PET_VOLUME]))); return FALSE; } */ /* set the initial shinyness, volpack's default is something shiny, I set shiny to zero */ if (vpSetMaterial(rendering->vpc, VP_MATERIAL0, VP_SHINYNESS, VP_BOTH_SIDES,0.0,0.0,0.0) != VP_OK){ g_warning(_("Error Setting the Rendering Material (%s, SHINYNESS): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); return FALSE; } /* set the shading parameters */ if (vpSetLookupShader(rendering->vpc, 1, 1, RENDERING_NORMAL_FIELD, rendering->shade_table, sizeof(rendering->shade_table), 0, NULL, 0) != VP_OK){ g_warning(_("Error Setting the Rendering Shader (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); return FALSE; } /* and do the shade table stuff (this fills in the shade table I believe) */ if (vpShadeTable(rendering->vpc) != VP_OK){ g_warning(_("Error Shading Table for Rendering (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); return FALSE; } return TRUE; } static void set_space(rendering_t * rendering) { vpMatrix4 m; guint i,j; AmitkPoint axis; /* initalize */ for (i=0;i<4;i++) for (j=0;j<4;j++) if (i == j) m[i][j]=1; else m[i][j]=0; /* and setup the matrix we're feeding into volpack */ for (i=0;i<3;i++) { axis = amitk_space_get_axis(AMITK_SPACE(rendering->transformed_volume), i); m[i][0] = axis.x; m[i][1] = axis.y; m[i][2] = axis.z; } /* we want to rotate the data set */ if (vpCurrentMatrix(rendering->vpc, VP_MODEL) != VP_OK) g_warning(_("Error Setting The Item To Rotate (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); /* set the rotation */ if (vpSetMatrix(rendering->vpc, m) != VP_OK) g_warning(_("Error Rotating Rendering (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); } /* set the rotation space for a rendering context */ void rendering_set_space(rendering_t * rendering, AmitkSpace * space) { rendering->need_rerender = TRUE; amitk_space_copy_in_place(AMITK_SPACE(rendering->transformed_volume), space); set_space(rendering); return; } /* sets the rotation transform for a rendering context */ void rendering_set_rotation(rendering_t * rendering, AmitkAxis dir, gdouble rotation) { rendering->need_rerender = TRUE; /* rotate the axis */ amitk_space_rotate_on_vector(AMITK_SPACE(rendering->transformed_volume), amitk_space_get_axis(AMITK_SPACE(rendering->transformed_volume), dir), rotation, zero_point); set_space(rendering); return; } /* reset the rotation transform for a rendering context */ void rendering_reset_rotation(rendering_t * rendering) { AmitkSpace * new_space; rendering->need_rerender = TRUE; /* reset the coord frame */ new_space = amitk_space_new(); /* base space */ amitk_space_copy_in_place(AMITK_SPACE(rendering->transformed_volume), new_space); g_object_unref(new_space); /* reset the rotation */ rendering_set_rotation(rendering, AMITK_AXIS_X, 0.0); return; } /* set the speed versus quality parameters of a rendering context */ void rendering_set_quality(rendering_t * rendering, rendering_quality_t quality) { gdouble max_ray_opacity, min_voxel_opacity; rendering->need_rerender = TRUE; /* set the rendering speed parameters MAX_RAY_OPACITY and MIN_VOXEL_OPACITY*/ switch (quality) { case HIGH: max_ray_opacity = 0.99; min_voxel_opacity = 0.01; break; break; case FAST: max_ray_opacity = 0.95; min_voxel_opacity = 0.05; break; case FASTEST: max_ray_opacity = 0.9; min_voxel_opacity = 0.1; break; case HIGHEST: default: max_ray_opacity = 1.0; min_voxel_opacity = 0.0; break; } /* set the maximum ray opacity (the renderer quits follow a ray if this value is reached */ if (vpSetd(rendering->vpc, VP_MAX_RAY_OPACITY, max_ray_opacity) != VP_OK){ g_warning(_("Error Setting Rendering Max Ray Opacity (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); } /* set the minimum voxel opacity (the render ignores voxels with values below this*/ if (vpSetd(rendering->vpc, VP_MIN_VOXEL_OPACITY, min_voxel_opacity) != VP_OK) { g_warning(_("Error Setting the Min Voxel Opacity (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); } rendering->need_reclassify = TRUE; return; } /* function to set up the image that we'll be getting back from the rendering */ void rendering_set_image(rendering_t * rendering, pixel_type_t pixel_type, gdouble zoom) { guint volpack_pixel_type; amide_intpoint_t size_dim; /* size in one dimension, note that height == width */ rendering->need_rerender = TRUE; switch (pixel_type) { case GRAYSCALE: volpack_pixel_type = VP_LUMINANCE; break; case OPACITY: default: volpack_pixel_type = VP_ALPHA; break; } size_dim = ceil(zoom*POINT_MAX(rendering->dim)); g_free(rendering->image); if ((rendering->image = g_try_new(guchar,size_dim*size_dim)) == NULL) { g_warning(_("Could not allocate memory space for Rendering Image for %s"), rendering->name); return; } rendering->pixel_type = pixel_type; if (vpSetImage(rendering->vpc, (guchar *) rendering->image, size_dim, size_dim, size_dim* RENDERING_DENSITY_SIZE, volpack_pixel_type)) { g_warning(_("Error Switching the Rendering Image Pixel Return Type (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); } return; } /* switch the state of depth cueing (TRUE is on) */ void rendering_set_depth_cueing(rendering_t * rendering, gboolean state) { rendering->need_rerender = TRUE; if (vpEnable(rendering->vpc, VP_DEPTH_CUE, state) != VP_OK) { g_warning(_("Error Setting the Rendering Depth Cue (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); } return; } /* set the depth cueing parameters*/ void rendering_set_depth_cueing_parameters(rendering_t * rendering, gdouble front_factor, gdouble density) { rendering->need_rerender = TRUE; /* the defaults should be 1.0 and 1.0 */ if (vpSetDepthCueing(rendering->vpc, front_factor, density) != VP_OK){ g_warning(_("Error Enabling Rendering Depth Cueing (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); } return; } /* to render a rendering context... */ void rendering_render(rendering_t * rendering) { #ifdef AMIDE_COMMENT_OUT struct timeval tv1; struct timeval tv2; gdouble time1; gdouble time2; /* let's do some timing */ gettimeofday(&tv1, NULL); #endif if (rendering->need_rerender) { if (rendering->vpc != NULL) { if (rendering->optimize_rendering) { if (rendering->need_reclassify) { #if AMIDE_DEBUG g_print("\tClassifying\n"); #endif if (vpClassifyVolume(rendering->vpc) != VP_OK) { g_warning(_("Error Classifying the Volume (%s): %s"), rendering->name,vpGetErrorString(vpGetError(rendering->vpc))); return; } } if (vpRenderClassifiedVolume(rendering->vpc) != VP_OK) { g_warning(_("Error Rendering the Classified Volume (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); return; } } else { if (vpRenderRawVolume(rendering->vpc) != VP_OK) { g_warning(_("Error Rendering the Volume (%s): %s"), rendering->name, vpGetErrorString(vpGetError(rendering->vpc))); return; } } } } #ifdef AMIDE_COMMENT_OUT /* and wrapup our timing */ gettimeofday(&tv2, NULL); time1 = ((double) tv1.tv_sec) + ((double) tv1.tv_usec)/1000000.0; time2 = ((double) tv2.tv_sec) + ((double) tv2.tv_usec)/1000000.0; g_print("######## Rendering object %s took %5.3f (s) #########\n", AMITK_OBJECT_NAME(rendering->object), time2-time1); #endif rendering->need_rerender = FALSE; rendering->need_reclassify = FALSE; return; } /* free up a list of rendering contexts */ renderings_t * renderings_unref(renderings_t * renderings) { if (renderings == NULL) return renderings; /* sanity check */ g_return_val_if_fail(renderings->ref_count > 0, NULL); renderings->ref_count--; /* things to do if our ref count is zero */ if (renderings->ref_count == 0) { /* recursively delete rest of list */ renderings->next = renderings_unref(renderings->next); renderings->rendering = rendering_unref(renderings->rendering); g_free(renderings); renderings = NULL; } return renderings; } /* the recursive part of renderings_init */ static renderings_t * renderings_init_recurse(GList * objects, AmitkVolume * render_volume, const amide_real_t voxel_size, const amide_time_t start, const amide_time_t duration, const gboolean zero_fill, const gboolean optimize_rendering, const gboolean no_gradient_opacity, AmitkUpdateFunc update_func, gpointer update_data) { renderings_t * temp_renderings; rendering_t * new_rendering; renderings_t * rest_of_list; if (objects == NULL) return NULL; /* recurse first */ rest_of_list = renderings_init_recurse(objects->next, render_volume, voxel_size, start, duration, zero_fill, optimize_rendering, no_gradient_opacity, update_func, update_data); new_rendering = rendering_init(objects->data, render_volume,voxel_size, start, duration, zero_fill, optimize_rendering, no_gradient_opacity, update_func, update_data); if (new_rendering != NULL) { if ((temp_renderings = g_try_new(renderings_t, 1)) == NULL) { return temp_renderings; } temp_renderings->ref_count = 1; temp_renderings->rendering = new_rendering; temp_renderings->next = rest_of_list; return temp_renderings; } else { return rest_of_list; } } /* returns an initialized rendering list */ renderings_t * renderings_init(GList * objects,const amide_time_t start, const amide_time_t duration, const gboolean zero_fill, const gboolean optimize_rendering, const gboolean no_gradient_opacity, const amide_real_t fov, const AmitkPoint view_center, AmitkUpdateFunc update_func, gpointer update_data) { AmitkCorners render_corner; amide_real_t voxel_size; AmitkVolume * render_volume; renderings_t * return_list; AmitkPoint width; amide_real_t max_width; if (objects == NULL) return NULL; /* figure out all encompasing corners for the slices based on our viewing axis */ render_volume = amitk_volume_new(); /* base coordinate frame */ amitk_volumes_get_enclosing_corners(objects, AMITK_SPACE(render_volume), render_corner); /* compensate for field of view */ width = point_sub(render_corner[1], render_corner[0]); max_width = (fov/100.0)*POINT_MAX(width); if (width.x > max_width) { if ((view_center.x-max_width/2.0) < render_corner[0].x) render_corner[1].x = render_corner[0].x+max_width; else if ((view_center.x+max_width/2.0) > render_corner[1].x) render_corner[0].x = render_corner[1].x-max_width; else { render_corner[0].x = view_center.x - max_width/2.0; render_corner[1].x = view_center.x + max_width/2.0; } } if (width.y > max_width) { if ((view_center.y-max_width/2.0) < render_corner[0].y) render_corner[1].y = render_corner[0].y+max_width; else if ((view_center.y+max_width/2.0) > render_corner[1].y) render_corner[0].y = render_corner[1].y-max_width; else { render_corner[0].y = view_center.y - max_width/2.0; render_corner[1].y = view_center.y + max_width/2.0; } } if (width.z > max_width) { if ((view_center.z-max_width/2.0) < render_corner[0].z) render_corner[1].z = render_corner[0].z+max_width; else if ((view_center.z+max_width/2.0) > render_corner[1].z) render_corner[0].z = render_corner[1].z-max_width; else { render_corner[0].z = view_center.z - max_width/2.0; render_corner[1].z = view_center.z + max_width/2.0; } } amitk_space_set_offset(AMITK_SPACE(render_volume), render_corner[0]); amitk_volume_set_corner(render_volume, amitk_space_b2s(AMITK_SPACE(render_volume), render_corner[1])); /* figure out what size our rendering voxels will be */ voxel_size = amitk_data_sets_get_min_voxel_size(objects); if (voxel_size < 0.0) voxel_size = amitk_rois_get_max_min_voxel_size(objects); if (voxel_size < 0.0) voxel_size = 1.0; /* and generate our rendering list */ return_list = renderings_init_recurse(objects, render_volume,voxel_size, start, duration, zero_fill, optimize_rendering, no_gradient_opacity, update_func, update_data); amitk_object_unref(render_volume); return return_list; } /* reloads the rendering list when needed, returns FALSE if not everything was done correctly */ gboolean renderings_reload_objects(renderings_t * renderings, const amide_time_t start, const amide_time_t duration, AmitkUpdateFunc update_func, gpointer update_data) { gboolean correct=TRUE; if (renderings != NULL) { /* reload this rendering context */ correct = rendering_reload_object(renderings->rendering, start, duration, update_func, update_data); /* and do the next */ correct = correct && renderings_reload_objects(renderings->next, start, duration, update_func, update_data); } return correct; } /* sets the space for a list of rendering context */ void renderings_set_space(renderings_t * renderings, AmitkSpace * space) { while (renderings != NULL) { rendering_set_space(renderings->rendering, space); renderings = renderings->next; } return; } /* sets the rotation transform for a list of rendering context */ void renderings_set_rotation(renderings_t * renderings, AmitkAxis dir, gdouble rotation) { while (renderings != NULL) { rendering_set_rotation(renderings->rendering, dir, rotation); renderings = renderings->next; } return; } /* resets the rotation transform for a list of rendering context */ void renderings_reset_rotation(renderings_t * renderings) { while (renderings != NULL) { rendering_reset_rotation(renderings->rendering); renderings = renderings->next; } return; } /* to set the quality on a list of rendering contexts */ void renderings_set_quality(renderings_t * renderings, rendering_quality_t quality) { while (renderings != NULL) { rendering_set_quality(renderings->rendering, quality); renderings = renderings->next; } return; } /* set the return image parameters for a list of rendering contexts */ void renderings_set_zoom(renderings_t * renderings, gdouble zoom) { while (renderings != NULL) { rendering_set_image(renderings->rendering, renderings->rendering->pixel_type, zoom); renderings = renderings->next; } return; } /* turn depth cueing on/off for a list of rendering contexts */ void renderings_set_depth_cueing(renderings_t * renderings, gboolean state) { while (renderings != NULL) { rendering_set_depth_cueing(renderings->rendering, state); renderings = renderings->next; } return; } /* sets the depth cueing parameters for a list of rendering contexts */ void renderings_set_depth_cueing_parameters(renderings_t * renderings, gdouble front_factor, gdouble density) { while (renderings != NULL) { rendering_set_depth_cueing_parameters(renderings->rendering, front_factor, density); renderings = renderings->next; } return; } /* to render a list of rendering contexts... */ void renderings_render(renderings_t * renderings) { while (renderings != NULL) { rendering_render(renderings->rendering); renderings = renderings->next; } return; } /* count the rendering lists */ guint renderings_count(renderings_t * renderings) { if (renderings != NULL) return (1+renderings_count(renderings->next)); else return 0; } /* function to set a material parameter */ /* gboolean render_set_material_shinyness(gint material_num, gdouble shinyness) */ /* { */ /* gint i; */ /* for (i=0; i */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include "amide.h" #include "amide_gconf.h" #include "amitk_progress_dialog.h" #include "tb_export_data_set.h" #ifdef AMIDE_LIBMDC_SUPPORT #include "libmdc_interface.h" #endif #ifdef AMIDE_LIBDCMDATA_SUPPORT #include "dcmtk_interface.h" #endif #define GCONF_AMIDE_EXPORT "EXPORT" typedef struct tb_export_t { AmitkStudy * study; AmitkDataSet * active_ds; AmitkPreferences * preferences; GtkWidget * dialog; GtkWidget * progress_dialog; GtkWidget * vs_spin_button[AMITK_AXIS_NUM]; GtkWidget * bb_radio_button[2]; guint reference_count; } tb_export_t; static tb_export_t * tb_export_unref(tb_export_t * tb_export) { g_return_val_if_fail(tb_export != NULL, NULL); gboolean return_val; /* sanity checks */ g_return_val_if_fail(tb_export->reference_count > 0, NULL); /* remove a reference count */ tb_export->reference_count--; /* things to do if we've removed all reference's */ if (tb_export->reference_count == 0) { #ifdef AMIDE_DEBUG g_print("freeing tb_export\n"); #endif if (tb_export->study != NULL) { amitk_object_unref(tb_export->study); tb_export->study = NULL; } if (tb_export->active_ds != NULL) { amitk_object_unref(tb_export->active_ds); tb_export->active_ds = NULL; } if (tb_export->preferences != NULL) { g_object_unref(tb_export->preferences); tb_export->preferences = NULL; } if (tb_export->progress_dialog != NULL) { g_signal_emit_by_name(G_OBJECT(tb_export->progress_dialog), "delete_event", NULL, &return_val); tb_export->progress_dialog = NULL; } g_free(tb_export); tb_export = NULL; } return tb_export; } /* allocate and initialize a tb_export data structure */ static tb_export_t * tb_export_init(void) { tb_export_t * tb_export; /* alloc space for the data structure for passing ui info */ if ((tb_export = g_try_new(tb_export_t,1)) == NULL) { g_warning(_("couldn't allocate memory space for tb_export_t")); return NULL; } tb_export->reference_count = 1; /* set any needed parameters */ tb_export->study = NULL; tb_export->active_ds = NULL; tb_export->preferences = NULL; tb_export->progress_dialog = NULL; return tb_export; } static void destroy_cb(GtkObject * object, gpointer data) { tb_export_t * tb_export = data; tb_export = tb_export_unref(tb_export); /* free the associated data structure */ } static gboolean delete_event_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { // tb_export_t * tb_export = data; return FALSE; } static void read_preferences(gboolean * resliced, gboolean * all_visible, gboolean * inclusive_bounding_box, AmitkExportMethod * method, gint * submethod, AmitkPoint * voxel_size) { if (resliced != NULL) *resliced = amide_gconf_get_bool(GCONF_AMIDE_EXPORT,"ResliceDataSet"); if (all_visible != NULL) *all_visible = amide_gconf_get_bool(GCONF_AMIDE_EXPORT,"AllVisibleDataSets"); if (inclusive_bounding_box != NULL) *inclusive_bounding_box = amide_gconf_get_bool(GCONF_AMIDE_EXPORT,"InclusiveBoundingBox"); if (method != NULL) *method = amide_gconf_get_int(GCONF_AMIDE_EXPORT,"Method"); if (submethod != NULL) *submethod = amide_gconf_get_int(GCONF_AMIDE_EXPORT,"Submethod"); if (voxel_size != NULL) { (*voxel_size).z = amide_gconf_get_float(GCONF_AMIDE_EXPORT,"VoxelSizeZ"); if (EQUAL_ZERO((*voxel_size).z)) (*voxel_size).z = 1.0; (*voxel_size).y = amide_gconf_get_float(GCONF_AMIDE_EXPORT,"VoxelSizeY"); if (EQUAL_ZERO((*voxel_size).y)) (*voxel_size).y = 1.0; (*voxel_size).x = amide_gconf_get_float(GCONF_AMIDE_EXPORT,"VoxelSizeX"); if (EQUAL_ZERO((*voxel_size).x)) (*voxel_size).x = 1.0; } return; } /* function called when we hit "ok" on the export file dialog */ static gboolean export_data_set(tb_export_t * tb_export, gchar * filename) { GList * data_sets; AmitkVolume * bounding_box = NULL; gboolean resliced; gboolean all_visible; gboolean inclusive_bounding_box; AmitkExportMethod method; gint submethod; AmitkPoint voxel_size; gboolean successful = FALSE; g_return_val_if_fail(filename != NULL, FALSE); read_preferences(&resliced, &all_visible, &inclusive_bounding_box, &method, &submethod, &voxel_size); /* get total bounding box if needed */ if (inclusive_bounding_box) { AmitkCorners corner; bounding_box = amitk_volume_new(); /* in base coordinate frame */ g_return_val_if_fail(bounding_box != NULL, FALSE); data_sets = amitk_object_get_children_of_type(AMITK_OBJECT(tb_export->study), AMITK_OBJECT_TYPE_DATA_SET, TRUE); amitk_volumes_get_enclosing_corners(data_sets, AMITK_SPACE(bounding_box), corner); amitk_space_set_offset(AMITK_SPACE(bounding_box), corner[0]); amitk_volume_set_corner(bounding_box, amitk_space_b2s(AMITK_SPACE(bounding_box), corner[1])); amitk_objects_unref(data_sets); } if (!all_visible) { successful = amitk_data_set_export_to_file(tb_export->active_ds, method, submethod, filename, AMITK_OBJECT_NAME(tb_export->study), resliced, voxel_size, bounding_box, amitk_progress_dialog_update, tb_export->progress_dialog); } else { data_sets = amitk_object_get_selected_children_of_type(AMITK_OBJECT(tb_export->study), AMITK_OBJECT_TYPE_DATA_SET, AMITK_SELECTION_SELECTED_0, TRUE); if (data_sets == NULL) { g_warning(_("No Data Sets are current visible")); } else { successful = amitk_data_sets_export_to_file(data_sets, method, submethod, filename, AMITK_OBJECT_NAME(tb_export->study), voxel_size, bounding_box, amitk_progress_dialog_update, tb_export->progress_dialog); amitk_objects_unref(data_sets); } } if (bounding_box != NULL) bounding_box = amitk_object_unref(bounding_box); return successful; } static void response_cb (GtkDialog * main_dialog, gint response_id, gpointer data) { tb_export_t * tb_export = data; GtkWidget * file_chooser; gint return_val; gchar * filename; AmitkExportMethod method; gboolean close_dialog=FALSE; switch(response_id) { case AMITK_RESPONSE_EXECUTE: /* the rest of this function runs the file selection dialog box */ file_chooser = gtk_file_chooser_dialog_new(_("Export to File"), GTK_WINDOW(main_dialog), /* parent window */ GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); amitk_preferences_set_file_chooser_directory(tb_export->preferences, file_chooser); /* set the default directory if applicable */ /* for DCMTK dicom files we don't want to complain about file existing, as we might be appending */ read_preferences(NULL, NULL, NULL, &method, NULL, NULL); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(file_chooser), #ifdef AMIDE_LIBDCMDATA_SUPPORT method!=AMITK_EXPORT_METHOD_DCMTK #else TRUE #endif ); if (gtk_dialog_run(GTK_DIALOG (file_chooser)) == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (file_chooser)); else filename = NULL; gtk_widget_destroy(file_chooser); if (filename == NULL) return; /* return to export dialog */ else { /* export the dataset */ close_dialog = export_data_set(tb_export, filename); /* close if successful */ g_free(filename); } break; case GTK_RESPONSE_CANCEL: close_dialog = TRUE; break; default: break; } if (close_dialog) { g_signal_emit_by_name(G_OBJECT(main_dialog), "delete_event", NULL, &return_val); if (!return_val) gtk_widget_destroy(GTK_WIDGET(main_dialog)); } return; } static void write_voxel_size(AmitkPoint voxel_size) { amide_gconf_set_float(GCONF_AMIDE_EXPORT,"VoxelSizeZ", voxel_size.z); amide_gconf_set_float(GCONF_AMIDE_EXPORT,"VoxelSizeY", voxel_size.y); amide_gconf_set_float(GCONF_AMIDE_EXPORT,"VoxelSizeX", voxel_size.x); return; } static void write_inclusive_bounding_box(gboolean inclusive) { amide_gconf_set_bool(GCONF_AMIDE_EXPORT,"InclusiveBoundingBox", inclusive); return; } static void change_voxel_size_cb(GtkWidget * widget, gpointer data) { gdouble size; AmitkAxis which_axis; gboolean resliced; gboolean all_visible; gboolean inclusive_bounding_box; AmitkExportMethod method; gint submethod; AmitkPoint voxel_size; read_preferences(&resliced, &all_visible, &inclusive_bounding_box, &method, &submethod, &voxel_size); /* figure out which widget this is */ which_axis = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "axis")); size = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); switch(which_axis) { case (AMITK_AXIS_X): voxel_size.x = size; break; case (AMITK_AXIS_Y): voxel_size.y = size; break; case (AMITK_AXIS_Z): voxel_size.z = size; break; default: break; /* do nothing */ } write_voxel_size(voxel_size); return; } static void recommend_voxel_size(tb_export_t * tb_export) { GList * data_sets; AmitkAxis i_axis; gboolean resliced; gboolean all_visible; gboolean inclusive_bounding_box; AmitkExportMethod method; gint submethod; AmitkPoint voxel_size; read_preferences(&resliced, &all_visible, &inclusive_bounding_box, &method, &submethod, &voxel_size); if (all_visible) { data_sets = amitk_object_get_selected_children_of_type(AMITK_OBJECT(tb_export->study), AMITK_OBJECT_TYPE_DATA_SET, AMITK_SELECTION_SELECTED_0, TRUE); if (data_sets == NULL) { g_warning(_("No Data Sets are current visible")); } else { /* for all visible datasets */ voxel_size.z = voxel_size.y = voxel_size.x = amitk_data_sets_get_min_voxel_size(data_sets); amitk_objects_unref(data_sets); } } else if (resliced) { voxel_size.z = voxel_size.y = voxel_size.x = point_min_dim(AMITK_DATA_SET_VOXEL_SIZE(tb_export->active_ds)); } else {/* if not resliced */ voxel_size = AMITK_DATA_SET_VOXEL_SIZE(tb_export->active_ds); } write_voxel_size(voxel_size); /* update entries */ for (i_axis=0; i_axisvs_spin_button[i_axis])); g_signal_handlers_block_by_func(G_OBJECT(tb_export->vs_spin_button[i_axis]), change_voxel_size_cb, tb_export); gtk_spin_button_set_value(GTK_SPIN_BUTTON(tb_export->vs_spin_button[i_axis]), point_get_component(voxel_size, i_axis)); g_signal_handlers_unblock_by_func(G_OBJECT(tb_export->vs_spin_button[i_axis]), change_voxel_size_cb, tb_export); } return; } static void reslice_radio_buttons_cb(GtkWidget * widget, gpointer data) { tb_export_t * tb_export = data; AmitkAxis i_axis; gboolean resliced; gboolean all_visible; gboolean inclusive_bounding_box; resliced = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "resliced")); all_visible = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "all_visible")); amide_gconf_set_bool(GCONF_AMIDE_EXPORT,"ResliceDataSet", resliced); amide_gconf_set_bool(GCONF_AMIDE_EXPORT,"AllVisibleDataSets", all_visible); /* recalculate voxel sizes */ recommend_voxel_size(tb_export); /* whether or not we can change the voxel sizes */ for (i_axis=0; i_axisvs_spin_button[i_axis]), resliced || all_visible); } /* whether or not we can change the bounding box type */ gtk_widget_set_sensitive(tb_export->bb_radio_button[0], resliced || all_visible); gtk_widget_set_sensitive(tb_export->bb_radio_button[1], resliced || all_visible); if (!resliced && !all_visible) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb_export->bb_radio_button[0]), TRUE); inclusive_bounding_box=FALSE; write_inclusive_bounding_box(inclusive_bounding_box); } return; } static void bb_radio_buttons_cb(GtkWidget * widget, gpointer data) { gboolean inclusive_bounding_box; inclusive_bounding_box = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "inclusive_bounding_box")); write_inclusive_bounding_box(inclusive_bounding_box); return; } /* function called when the export type of a data set gets changed */ static void change_export_cb(GtkWidget * widget, gpointer data) { AmitkExportMethod method=0; gint submethod=0; gint counter; gint combo_method; AmitkImportMethod i_export_method; #ifdef AMIDE_LIBMDC_SUPPORT libmdc_export_t i_libmdc_export; #endif combo_method = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); counter = 0; for (i_export_method = AMITK_EXPORT_METHOD_RAW; i_export_method < AMITK_EXPORT_METHOD_NUM; i_export_method++) { #ifdef AMIDE_LIBMDC_SUPPORT if (i_export_method == AMITK_EXPORT_METHOD_LIBMDC) { for (i_libmdc_export=0; i_libmdc_export < LIBMDC_NUM_EXPORT_METHODS; i_libmdc_export++) { if (libmdc_supports(libmdc_export_to_format[i_libmdc_export])) { if (counter == combo_method) { method = i_export_method; submethod = libmdc_export_to_format[i_libmdc_export]; } counter++; } } } else #endif { if (counter == combo_method) { method = i_export_method; submethod = 0; } counter++; } } amide_gconf_set_int(GCONF_AMIDE_EXPORT,"Method", method); amide_gconf_set_int(GCONF_AMIDE_EXPORT,"Submethod", submethod); return; } /* function to setup a dialog to allow us to choice options for rendering */ void tb_export_data_set(AmitkStudy * study, AmitkDataSet * active_ds, AmitkPreferences * preferences, GtkWindow * parent) { gchar * temp_string; GtkWidget * table; GtkWidget * label; guint table_row; GtkWidget * radio_button[3]; GtkWidget * hseparator; GtkWidget * export_menu; // GtkObject * adjustment; // GtkWidget * spin_buttons[3]; gint counter; gint current; AmitkExportMethod i_export_method; tb_export_t * tb_export; AmitkAxis i_axis; #ifdef AMIDE_LIBMDC_SUPPORT libmdc_export_t i_libmdc_export; #endif gboolean resliced; gboolean all_visible; gboolean inclusive_bounding_box; AmitkExportMethod method; gint submethod; AmitkPoint voxel_size; read_preferences(&resliced, &all_visible, &inclusive_bounding_box, &method, &submethod, &voxel_size); /* sanity checks */ g_return_if_fail(AMITK_IS_STUDY(study)); g_return_if_fail(AMITK_IS_DATA_SET(active_ds)); tb_export = tb_export_init(); tb_export->study = AMITK_STUDY(amitk_object_ref(AMITK_OBJECT(study))); tb_export->active_ds = amitk_object_ref(active_ds); tb_export->preferences = g_object_ref(preferences); temp_string = g_strdup_printf(_("%s: Export Data Set Dialog"), PACKAGE); tb_export->dialog = gtk_dialog_new_with_buttons (temp_string, parent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_EXECUTE, AMITK_RESPONSE_EXECUTE, NULL); gtk_window_set_title(GTK_WINDOW(tb_export->dialog), temp_string); g_free(temp_string); /* setup the callbacks for the dialog */ g_signal_connect(G_OBJECT(tb_export->dialog), "delete_event", G_CALLBACK(delete_event_cb), tb_export); g_signal_connect(G_OBJECT(tb_export->dialog), "destroy", G_CALLBACK(destroy_cb), tb_export); g_signal_connect(G_OBJECT(tb_export->dialog), "response", G_CALLBACK(response_cb), tb_export); gtk_container_set_border_width(GTK_CONTAINER(tb_export->dialog), 10); /* create the progress dialog */ tb_export->progress_dialog = amitk_progress_dialog_new(GTK_WINDOW(tb_export->dialog)); amitk_progress_dialog_set_text(AMITK_PROGRESS_DIALOG(tb_export->progress_dialog), _("Exporting Data Sets")); /* start making the widgets for this dialog box */ table = gtk_table_new(5,4,FALSE); table_row=0; gtk_container_add(GTK_CONTAINER(GTK_DIALOG(tb_export->dialog)->vbox), table); label = gtk_label_new(_("Export:")); gtk_table_attach(GTK_TABLE(table), label, 0,1, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); // tooltip N_("Export the data set in its original orientation (unresliced)") temp_string = g_strdup_printf(_("Original Orientation - %s"), AMITK_OBJECT_NAME(tb_export->active_ds)); radio_button[0] = gtk_radio_button_new_with_label(NULL, temp_string); g_free(temp_string); gtk_table_attach(GTK_TABLE(table), radio_button[0], 1,4, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[0]), "resliced", GINT_TO_POINTER(FALSE)); g_object_set_data(G_OBJECT(radio_button[0]), "all_visible", GINT_TO_POINTER(FALSE)); table_row++; // tooltip N_("Export the data set in its current orientation (resliced)") temp_string = g_strdup_printf(_("Resliced Orientation - %s"), AMITK_OBJECT_NAME(tb_export->active_ds)); radio_button[1] = gtk_radio_button_new_with_label(gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio_button[0])), temp_string); g_free(temp_string); gtk_table_attach(GTK_TABLE(table), radio_button[1], 1,4, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[1]), "resliced", GINT_TO_POINTER(TRUE)); g_object_set_data(G_OBJECT(radio_button[1]), "all_visible", GINT_TO_POINTER(FALSE)); table_row++; // tooltip N_("Export all the visible data sets into a single file") radio_button[2] = gtk_radio_button_new_with_label(gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio_button[0])), _("All Visible Data Sets (resliced)")); gtk_table_attach(GTK_TABLE(table), radio_button[2], 1,4, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(radio_button[2]), "resliced", GINT_TO_POINTER(TRUE)); g_object_set_data(G_OBJECT(radio_button[2]), "all_visible", GINT_TO_POINTER(TRUE)); table_row++; if (!resliced && !all_visible) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[0]), TRUE); else if (resliced && !all_visible) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[1]), TRUE); else // all_visible gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_button[2]), TRUE); g_signal_connect(G_OBJECT(radio_button[0]), "clicked", G_CALLBACK(reslice_radio_buttons_cb), tb_export); g_signal_connect(G_OBJECT(radio_button[1]), "clicked", G_CALLBACK(reslice_radio_buttons_cb), tb_export); g_signal_connect(G_OBJECT(radio_button[2]), "clicked", G_CALLBACK(reslice_radio_buttons_cb), tb_export); /* a separator for clarity */ hseparator = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(table), hseparator, 0,4,table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); table_row++; label = gtk_label_new(_("export format:")); gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(label), 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); /* select the export type */ export_menu = gtk_combo_box_new_text(); counter = 0; current = 0; for (i_export_method = AMITK_EXPORT_METHOD_RAW; i_export_method < AMITK_EXPORT_METHOD_NUM; i_export_method++) { #ifdef AMIDE_LIBMDC_SUPPORT if (i_export_method == AMITK_EXPORT_METHOD_LIBMDC) { for (i_libmdc_export=0; i_libmdc_export < LIBMDC_NUM_EXPORT_METHODS; i_libmdc_export++) { if (libmdc_supports(libmdc_export_to_format[i_libmdc_export])) { gtk_combo_box_append_text(GTK_COMBO_BOX(export_menu), libmdc_export_menu_names[i_libmdc_export]); // add tooltips at some point libmdc_export_menu_explanations[i_libmdc_export] if ((method == i_export_method) && (submethod == libmdc_export_to_format[i_libmdc_export])) current = counter; counter++; } } } else #endif { gtk_combo_box_append_text(GTK_COMBO_BOX(export_menu), amitk_export_menu_names[i_export_method]); // add tooltips at some point amitk_export_menu_explanations[i_export_method], if (method == i_export_method) current = counter; counter++; } } g_signal_connect(G_OBJECT(export_menu), "changed", G_CALLBACK(change_export_cb), NULL); gtk_combo_box_set_active(GTK_COMBO_BOX(export_menu), current); /* done after signal attachment, in case current never got matched and is still zero */ gtk_table_attach(GTK_TABLE(table), export_menu, 1,4, table_row,table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(export_menu); table_row++; /* widgets to change the voxel size of the data set */ label = gtk_label_new(_("voxel size (mm) [x,y,z]:")); gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(label), 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); for (i_axis=0; i_axisvs_spin_button[i_axis] = gtk_spin_button_new_with_range(0.0, G_MAXDOUBLE, 0.2); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(tb_export->vs_spin_button[i_axis]), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tb_export->vs_spin_button[i_axis]), 4); g_object_set_data(G_OBJECT(tb_export->vs_spin_button[i_axis]), "axis", GINT_TO_POINTER(i_axis)); g_signal_connect(G_OBJECT(tb_export->vs_spin_button[i_axis]), "value_changed", G_CALLBACK(change_voxel_size_cb), tb_export); gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(tb_export->vs_spin_button[i_axis]),i_axis+1,i_axis+2, table_row, table_row+1, X_PACKING_OPTIONS, 0, X_PADDING, Y_PADDING); gtk_widget_set_sensitive(GTK_WIDGET(tb_export->vs_spin_button[i_axis]), resliced || all_visible); } recommend_voxel_size(tb_export); /* updates voxel size guestimate, and updates the entry boxes */ table_row++; // gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_buttons[0]),FALSE); // gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(spin_buttons[0]), FALSE); // gtk_spin_button_set_update_policy(GTK_SPIN_BUTTON(spin_buttons[0]), GTK_UPDATE_ALWAYS); label = gtk_label_new(_("bounding box:")); gtk_table_attach(GTK_TABLE(table), GTK_WIDGET(label), 0,1, table_row, table_row+1, 0, 0, X_PADDING, Y_PADDING); // tooltip N_("Export the data set in its original orientation (unresliced)") tb_export->bb_radio_button[0] = gtk_radio_button_new_with_label(NULL, "tight"); gtk_table_attach(GTK_TABLE(table), tb_export->bb_radio_button[0], 1,2, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(tb_export->bb_radio_button[0]), "inclusive_bounding_box", GINT_TO_POINTER(FALSE)); // tooltip N_("Export the data set in its current orientation (resliced)") tb_export->bb_radio_button[1] = gtk_radio_button_new_with_label(gtk_radio_button_get_group(GTK_RADIO_BUTTON(tb_export->bb_radio_button[0])), "inclusive (of all data sets)"); gtk_table_attach(GTK_TABLE(table), tb_export->bb_radio_button[1], 2,4, table_row, table_row+1, GTK_FILL, 0, X_PADDING, Y_PADDING); g_object_set_data(G_OBJECT(tb_export->bb_radio_button[1]), "inclusive_bounding_box", GINT_TO_POINTER(TRUE)); table_row++; if (!inclusive_bounding_box) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb_export->bb_radio_button[0]), TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb_export->bb_radio_button[1]), TRUE); g_signal_connect(G_OBJECT(tb_export->bb_radio_button[0]), "clicked", G_CALLBACK(bb_radio_buttons_cb), NULL); g_signal_connect(G_OBJECT(tb_export->bb_radio_button[1]), "clicked", G_CALLBACK(bb_radio_buttons_cb), NULL); gtk_widget_set_sensitive(tb_export->bb_radio_button[0], resliced || all_visible); gtk_widget_set_sensitive(tb_export->bb_radio_button[1], resliced || all_visible); /* and show all our widgets */ gtk_widget_show_all(tb_export->dialog); return; } amide-1.0.5/src/amide.c0000644000175000017500000002453612270273633014475 0ustar loeningloening/* amide.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" //#include #include #include //#include //#include #include "amide.h" #include "amide_gconf.h" #include "amide_gnome.h" //#include "amitk_type_builtins.h" #include "amitk_common.h" #include "amitk_study.h" #include "pixmaps.h" #include "ui_study.h" #include "ui_common.h" /* external variables */ gchar * object_menu_names[] = { N_("_Study"), N_("Selected _Data Sets"), N_("Selected _ROIs"), N_("Selected _Alignment Points") }; void amide_log_handler_nopopup(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) { AmitkPreferences * preferences = user_data; if (AMITK_PREFERENCES_WARNINGS_TO_CONSOLE(preferences)) g_print("AMIDE WARNING: %s\n", message); return; } void amide_log_handler(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) { AmitkPreferences * preferences = user_data; GtkWidget * dialog; GtkWidget * message_area; GtkWidget * scrolled; GtkWidget * label; if (AMITK_PREFERENCES_WARNINGS_TO_CONSOLE(preferences)) { if (log_level == G_LOG_LEVEL_MESSAGE) g_print("AMIDE MESSAGE: %s\n", message); else /* G_LOG_LEVEL_WARNING */ g_print("AMIDE WARNING: %s\n", message); } else { dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT, (log_level == G_LOG_LEVEL_MESSAGE) ? GTK_MESSAGE_INFO : GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "AMIDE %s", (log_level == G_LOG_LEVEL_MESSAGE) ? _("MESSAGE") : _("WARNING")); message_area = gtk_message_dialog_get_message_area(GTK_MESSAGE_DIALOG(dialog)); scrolled = gtk_scrolled_window_new(NULL, NULL); gtk_widget_set_size_request(scrolled, -1, 75); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_box_pack_start(GTK_BOX(message_area), scrolled, TRUE, TRUE, Y_PADDING); label = gtk_label_new(message); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), label); gtk_widget_show_all(message_area); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } return; } void missing_functionality_warning(AmitkPreferences * preferences) { gchar * comments; gchar * already_warned; #if (AMIDE_LIBGSL_SUPPORT && AMIDE_LIBMDC_SUPPORT && AMIDE_LIBDCMDATA_SUPPORT && AMIDE_LIBVOLPACK_SUPPORT && (AMIDE_FFMPEG_SUPPORT || AMIDE_LIBFAME_SUPPORT)) return; /* nothing to complain about */ #endif already_warned = amide_gconf_get_string_with_default("MISSING_FUNCTIONALITY", "AlreadyWarned", "0.0.0"); if (g_strcmp0(already_warned, VERSION) == 0) return; else { comments = g_strconcat(_("This version of AMIDE has been compiled without the following functionality:"), "\n\n", #ifndef AMIDE_LIBGSL_SUPPORT _("Line profiles, factor analysis, some filtering, and some alignment (missing libgsl)."),")\n", #endif #ifndef AMIDE_LIBMDC_SUPPORT _("Reading of most medical imaging formats except raw and DICOM (missing libmdc)."),"\n", #endif #ifndef AMIDE_LIBDCMDATA_SUPPORT _("Reading of most DICOM files (missing libdcmdata/dcmtk)."),"\n", #endif #ifndef AMIDE_LIBVOLPACK_SUPPORT _("Volume rendering (missing libvolpack)."),")\n", #endif #if !(defined(AMIDE_FFMPEG_SUPPORT) || defined(AMIDE_LIBFAME_SUPPORT)) _("Saving MPEG output (missing ffmpeg and missing libfame)."),")\n", #endif NULL); g_warning("%s", comments); g_free(comments); amide_gconf_set_string("MISSING_FUNCTIONALITY", "AlreadyWarned", VERSION); return; } } static gchar **remaining_args = NULL; static GOptionEntry command_line_entries[] = { // { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL }, { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &remaining_args, "Special option that collects any remaining arguments for us" }, { NULL } }; /********************************************* */ int main (int argc, char *argv []) { gint studies_launched=0; AmitkPreferences * preferences; struct stat file_info; AmitkStudy * imported_study = NULL; AmitkStudy * study = NULL; const gchar * input_filename; GList * new_data_sets; AmitkDataSet * new_ds; amide_real_t min_voxel_size; gint i; gint num_args; gchar * studyname=NULL; // GOptionContext *context; /* setup i18n */ // setlocale(LC_ALL, ""); // // setlocale(LC_NUMERIC, "POSIX"); /* don't switch radix sign (it's a period not a comma dammit */ // bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR); // textdomain(GETTEXT_PACKAGE); #if defined (G_PLATFORM_WIN32) /* if setlocale is called on win32, we can't seem to reset the locale back to "C" to allow correct reading in of text data */ gtk_disable_setlocale(); /* prevent gtk_init from calling setlocale, etc. */ #endif if (!gtk_init_with_args(&argc, &argv, _("[FILE1] [FILE2] ..."), command_line_entries, NULL, NULL)) { return 1; } // context = g_option_context_new ("- analyize medical images"); // g_option_context_add_main_entries (context, command_line_entries, GETTEXT_PACKAGE); // g_option_context_add_group (context, gtk_get_option_group (TRUE)); // g_option_context_parse (context, &argc, &argv, NULL); amide_gconf_init(); /* translations */ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); #ifdef AMIDE_DEBUG /* restore the normal segmentation fault signalling so we can get core dumps and don't get the gnome crash dialog */ signal(SIGSEGV, SIG_DFL); #endif /* load in the default preferences */ preferences = amitk_preferences_new(); /* specify my own error handler */ g_log_set_handler (NULL, G_LOG_LEVEL_WARNING, amide_log_handler, preferences); /* specify my message handler */ g_log_set_handler (NULL, G_LOG_LEVEL_MESSAGE, amide_log_handler, preferences); /* specify the default directory */ ui_common_set_last_path_used(AMITK_PREFERENCES_DEFAULT_DIRECTORY(preferences)); #ifdef OLD_WIN32_HACKS /* ignore gdk warnings on win32 */ /* as of gtk 2.2.4, get "General case not implemented" warnings from gdkproperty-win32.c that appear to be unwarrented */ g_log_set_handler ("Gdk", G_LOG_LEVEL_WARNING, amide_log_handler_nopopup, preferences); /* have those annoying UTF-8 error warnings go to a console, instead of distracting the user */ g_log_set_handler ("Pango", G_LOG_LEVEL_WARNING, amide_log_handler_nopopup, preferences); #endif /* startup initializations */ amitk_common_font_init(); pixmaps_initialize_icons(); /* complain about important missing functionality if appropriate */ missing_functionality_warning(preferences); /* if we specified files on the command line, load them in */ if (remaining_args != NULL) { num_args = g_strv_length (remaining_args); for (i = 0; i < num_args; ++i) { /* input_filename is just pointers into the amide_ctx structure, and shouldn't be freed */ input_filename = remaining_args[i]; /* check to see that the filename exists and it's a directory */ if (stat(input_filename, &file_info) != 0) { g_warning(_("%s does not exist"),input_filename); } else if (amitk_is_xif_flat_file(input_filename, NULL, NULL) || amitk_is_xif_directory(input_filename, NULL, NULL)) { if ((study=amitk_study_load_xml(input_filename)) == NULL) g_warning(_("Failed to load in as XIF file: %s"), input_filename); } else if (!S_ISDIR(file_info.st_mode)) { /* not a directory... maybe an import file? */ if ((new_data_sets = amitk_data_set_import_file(AMITK_IMPORT_METHOD_GUESS, 0, input_filename, &studyname, preferences, NULL, NULL)) != NULL) { while (new_data_sets != NULL) { new_ds = new_data_sets->data; if (imported_study == NULL) { imported_study = amitk_study_new(preferences); if (studyname != NULL) { amitk_study_suggest_name(imported_study, studyname); g_free(studyname); studyname = NULL; } else if (AMITK_DATA_SET_SUBJECT_NAME(new_ds) != NULL) amitk_study_suggest_name(imported_study, AMITK_DATA_SET_SUBJECT_NAME(new_ds)); else amitk_study_suggest_name(imported_study, AMITK_OBJECT_NAME(new_ds)); } amitk_object_add_child(AMITK_OBJECT(imported_study), AMITK_OBJECT(new_ds)); min_voxel_size = amitk_data_sets_get_min_voxel_size(AMITK_OBJECT_CHILDREN(imported_study)); amitk_study_set_view_thickness(imported_study, min_voxel_size); new_data_sets = g_list_remove(new_data_sets, new_ds); new_ds = amitk_object_unref(new_ds); } } else g_warning(_("%s is not an AMIDE study or importable file type"), input_filename); } else { g_warning(_("%s is not an AMIDE XIF Directory"), input_filename); } if (study != NULL) { /* each whole study gets it's own window */ ui_study_create(study, preferences); studies_launched++; study = amitk_object_unref(study); } } g_strfreev (remaining_args); remaining_args = NULL; } if (imported_study != NULL) { /* all imported data sets go into one study */ ui_study_create(imported_study, preferences); studies_launched++; imported_study = amitk_object_unref(imported_study); } /* start up an empty study if we haven't loaded in anything */ if (studies_launched < 1) ui_study_create(NULL, preferences); /* remove left over references */ g_object_unref(preferences); /* the main event loop */ gtk_main(); /* clean-up */ amide_gconf_shutdown(); return 0; } amide-1.0.5/src/amitk_type.h0000664000175000017500000000335312270274541015564 0ustar loeningloening/* amitk_type.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_TYPE_H__ #define __AMITK_TYPE_H__ #include G_BEGIN_DECLS /* setup the types for various internal data formats */ /* note, don't change these unless you want to go digging through the code for locations where the signal marshallers expect the type to be DOUBLE. Would also need to update the REAL_EQUAL type functions in amitk_point.h */ typedef gdouble amide_data_t; #define SIZE_OF_AMIDE_DATA_T 8 #define AMITK_TYPE_DATA G_TYPE_DOUBLE typedef gdouble amide_time_t; #define SIZE_OF_AMIDE_TIME_T 8 #define AMITK_TYPE_TIME G_TYPE_DOUBLE typedef gdouble amide_real_t; #define SIZE_OF_AMIDE_REAL_T 8 #define AMITK_TYPE_REAL G_TYPE_DOUBLE /* size of a point in integer space */ typedef gint16 amide_intpoint_t; #define SIZE_OF_AMIDE_INTPOINT_T 2; typedef gboolean (*AmitkUpdateFunc) (gpointer, char *, gdouble); G_END_DECLS #endif /* __AMITK_TYPE_H__ */ amide-1.0.5/src/amitk_object.c0000664000175000017500000011132312270273727016046 0ustar loeningloening/* amitk_object.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2000-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "amide_config.h" #include #include #include "amitk_object.h" #include "amitk_marshal.h" #include "amitk_type_builtins.h" #include "amitk_study.h" enum { OBJECT_NAME_CHANGED, OBJECT_SELECTION_CHANGED, OBJECT_CHILD_SELECTION_CHANGED, OBJECT_COPY, OBJECT_COPY_IN_PLACE, OBJECT_WRITE_XML, OBJECT_READ_XML, OBJECT_ADD_CHILD, OBJECT_REMOVE_CHILD, LAST_SIGNAL }; static void object_class_init (AmitkObjectClass *klass); static void object_init (AmitkObject *object); static void object_finalize (GObject *object); static void object_rotate_on_vector (AmitkSpace *space, AmitkPoint *vector, gdouble theta, AmitkPoint *rotation_point); static void object_invert_axis (AmitkSpace *space, AmitkAxis which_axis, AmitkPoint *center_of_inversion); static void object_shift_offset (AmitkSpace *space, AmitkPoint *shift); static void object_transform (AmitkSpace *space, AmitkSpace *transform_space); static void object_transform_axes (AmitkSpace *space, AmitkAxes transform_axes, AmitkPoint * center_of_rotation); static void object_scale (AmitkSpace * space, AmitkPoint * ref_point, AmitkPoint * scaling); static void object_child_selection_changed(AmitkObject * object); static AmitkObject * object_copy (const AmitkObject * object); static void object_copy_in_place (AmitkObject * dest_object, const AmitkObject * src_object); static void object_write_xml (const AmitkObject * object, xmlNodePtr nodes, FILE *study_file); static gchar * object_read_xml (AmitkObject *object, xmlNodePtr nodes, FILE *study_file, gchar *error_buf); static void object_add_child (AmitkObject * object, AmitkObject * child); static void object_remove_child (AmitkObject * object, AmitkObject * child); static AmitkSpaceClass * parent_class; static guint object_signals[LAST_SIGNAL]; GType amitk_object_get_type(void) { static GType object_type = 0; if (!object_type) { static const GTypeInfo object_info = { sizeof (AmitkObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) object_class_init, (GClassFinalizeFunc) NULL, NULL, /* class_data */ sizeof (AmitkObject), 0, /* n_preallocs */ (GInstanceInitFunc) object_init, NULL /* value table */ }; object_type = g_type_register_static (AMITK_TYPE_SPACE, "AmitkObject", &object_info, 0); } return object_type; } static void object_class_init (AmitkObjectClass * class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); AmitkSpaceClass * space_class = AMITK_SPACE_CLASS(class); parent_class = g_type_class_peek_parent(class); gobject_class->finalize = object_finalize; space_class->space_shift = object_shift_offset; space_class->space_rotate = object_rotate_on_vector; space_class->space_invert = object_invert_axis; space_class->space_transform = object_transform; space_class->space_transform_axes = object_transform_axes; space_class->space_scale = object_scale; class->object_name_changed = NULL; class->object_selection_changed = NULL; class->object_child_selection_changed = object_child_selection_changed; class->object_copy = object_copy; class->object_copy_in_place = object_copy_in_place; class->object_write_xml = object_write_xml; class->object_read_xml = object_read_xml; class->object_add_child = object_add_child; class->object_remove_child = object_remove_child; object_signals[OBJECT_NAME_CHANGED] = g_signal_new ("object_name_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkObjectClass, object_name_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE,0); object_signals[OBJECT_SELECTION_CHANGED] = g_signal_new ("object_selection_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkObjectClass, object_selection_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); object_signals[OBJECT_CHILD_SELECTION_CHANGED] = g_signal_new ("object_child_selection_changed", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkObjectClass, object_child_selection_changed), NULL, NULL, amitk_marshal_NONE__NONE, G_TYPE_NONE, 0); object_signals[OBJECT_COPY] = g_signal_new ("object_copy", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkObjectClass, object_copy), NULL, NULL, amitk_marshal_OBJECT__NONE, AMITK_TYPE_OBJECT,0); object_signals[OBJECT_COPY_IN_PLACE] = g_signal_new ("object_copy_in_place", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkObjectClass, object_copy_in_place), NULL, NULL, amitk_marshal_NONE__OBJECT, G_TYPE_NONE, 1, AMITK_TYPE_OBJECT); object_signals[OBJECT_WRITE_XML] = g_signal_new ("object_write_xml", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkObjectClass, object_write_xml), NULL, NULL, amitk_marshal_NONE__POINTER_POINTER, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER); object_signals[OBJECT_READ_XML] = g_signal_new ("object_read_xml", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(AmitkObjectClass, object_read_xml), NULL, NULL, amitk_marshal_POINTER__POINTER_POINTER_POINTER, G_TYPE_POINTER, 3, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_POINTER); /* for some reason, G_TYPE_STRING is a no no */ object_signals[OBJECT_ADD_CHILD] = g_signal_new ("object_add_child", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET(AmitkObjectClass, object_add_child), NULL, NULL, amitk_marshal_NONE__OBJECT, G_TYPE_NONE, 1, AMITK_TYPE_OBJECT); object_signals[OBJECT_REMOVE_CHILD] = g_signal_new ("object_remove_child", G_TYPE_FROM_CLASS(class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET(AmitkObjectClass, object_remove_child), NULL, NULL, amitk_marshal_NONE__OBJECT, G_TYPE_NONE, 1, AMITK_TYPE_OBJECT); } static void object_init (AmitkObject * object) { AmitkSelection i_selection; object->name = NULL; object->parent = NULL; object->children = NULL; object->dialog = NULL; for (i_selection = 0; i_selection < AMITK_SELECTION_NUM; i_selection++) object->selected[i_selection] = FALSE; } static void object_finalize (GObject *object) { AmitkObject * amitk_object = AMITK_OBJECT(object); AmitkObject * child; /* propogate signal to children */ /* can't call amitk_object_remove_children, as this leads to a g_signal_emit, which we can't do on amitk_object as ref count is now zero */ while (amitk_object->children != NULL) { child = amitk_object->children->data; child->parent = NULL; amitk_object->children = g_list_remove(amitk_object->children, child); amitk_object_unref(child); } amitk_object_set_parent(amitk_object, NULL); if (amitk_object->name != NULL) { #ifdef AMIDE_DEBUG if (!AMITK_IS_DATA_SET(amitk_object)) g_print("\tfreeing %s\n", AMITK_OBJECT_NAME(amitk_object)); #endif g_free(amitk_object->name); amitk_object->name = NULL; } G_OBJECT_CLASS (parent_class)->finalize (object); } static void object_rotate_on_vector(AmitkSpace * space, AmitkPoint * vector, gdouble theta, AmitkPoint * rotation_point) { AmitkObject * object; GList * children; g_return_if_fail(AMITK_IS_OBJECT(space)); object = AMITK_OBJECT(space); /* rotate children */ children = object->children; while (children != NULL) { amitk_space_rotate_on_vector(children->data, *vector, theta, *rotation_point); children = children->next; } AMITK_SPACE_CLASS(parent_class)->space_rotate (space, vector, theta, rotation_point); return; } static void object_invert_axis (AmitkSpace * space, AmitkAxis which_axis, AmitkPoint * center_of_inversion) { AmitkObject * object; GList * children; g_return_if_fail(AMITK_IS_OBJECT(space)); object = AMITK_OBJECT(space); /* invert children */ children = object->children; while (children != NULL) { amitk_space_invert_axis(children->data, which_axis, *center_of_inversion); children = children->next; } AMITK_SPACE_CLASS(parent_class)->space_invert (space, which_axis, center_of_inversion); } static void object_shift_offset(AmitkSpace * space, AmitkPoint * shift) { AmitkObject * object; GList * children; g_return_if_fail(AMITK_IS_OBJECT(space)); object = AMITK_OBJECT(space); children = object->children; while (children != NULL) { amitk_space_shift_offset(children->data, *shift); children = children->next; } AMITK_SPACE_CLASS(parent_class)->space_shift (space, shift); } static void object_transform(AmitkSpace * space, AmitkSpace * transform_space) { AmitkObject * object; GList * children; AmitkPoint shift, new_offset; AmitkSpace * new_space; AmitkSpace * child_transform_space; g_return_if_fail(AMITK_IS_OBJECT(space)); object = AMITK_OBJECT(space); children = object->children; if (children != NULL) { /* figure out what the parent's space is going to look like */ new_space = amitk_space_copy(space); amitk_space_transform(new_space, transform_space); while (children != NULL) { /* need to compensate, as the children shoould rotate around the parent's origin, not their own */ new_offset = amitk_space_b2s(AMITK_SPACE(space), AMITK_SPACE_OFFSET(children->data)); /* child offset wrt the parent space */ new_offset = amitk_space_s2b(AMITK_SPACE(new_space), new_offset); /* child offset post transformation */ shift = point_sub(new_offset, AMITK_SPACE_OFFSET(children->data)); /* the required shift */ /* setup the new transform space */ child_transform_space = amitk_space_copy(transform_space); amitk_space_set_offset(child_transform_space, shift); /* and apply */ amitk_space_transform(children->data, child_transform_space); g_object_unref(child_transform_space); children = children->next; } g_object_unref(new_space); } /* and finally do the transformation on the actually object */ AMITK_SPACE_CLASS(parent_class)->space_transform (space, transform_space); } static void object_transform_axes(AmitkSpace * space, AmitkAxes transform_axes, AmitkPoint * center_of_rotation) { AmitkObject * object; GList * children; g_return_if_fail(AMITK_IS_OBJECT(space)); object = AMITK_OBJECT(space); children = object->children; while (children != NULL) { amitk_space_transform_axes(children->data, transform_axes, *center_of_rotation); children = children->next; } AMITK_SPACE_CLASS(parent_class)->space_transform_axes (space, transform_axes, center_of_rotation); } static void object_scale(AmitkSpace * space, AmitkPoint * ref_point, AmitkPoint * scaling) { AmitkObject * object; GList * children; g_return_if_fail(AMITK_IS_OBJECT(space)); object = AMITK_OBJECT(space); children = object->children; while (children != NULL) { amitk_space_scale(children->data, *ref_point, *scaling); children = children->next; } AMITK_SPACE_CLASS(parent_class)->space_scale (space, ref_point, scaling); } static void object_child_selection_changed(AmitkObject * object) { /* propogate the signal up the tree */ if (AMITK_OBJECT_PARENT(object) != NULL) g_signal_emit(G_OBJECT(AMITK_OBJECT_PARENT(object)), object_signals[OBJECT_CHILD_SELECTION_CHANGED], 0); return; } static AmitkObject * object_copy (const AmitkObject * object) { AmitkObject * copy; copy = amitk_object_new(); amitk_object_copy_in_place(copy, object); return copy; } void object_copy_in_place(AmitkObject * dest_object, const AmitkObject * src_object) { AmitkSelection i_selection; GList * children; AmitkObject * child; amitk_space_copy_in_place(AMITK_SPACE(dest_object), AMITK_SPACE(src_object)); amitk_object_set_name(dest_object, AMITK_OBJECT_NAME(src_object)); for (i_selection=0; i_selectiondialog, as that's the dialog for modifying the old object */ /* delete the old children */ // I need to do the below... but doesn't currently play nice with canvas... // amitk_object_remove_children(dest_object, dest_object->children); /* and recurse to copy in the new children */ children = src_object->children; while (children != NULL) { child = amitk_object_copy(children->data); #if AMIDE_DEBUG g_print("copying %s\n", AMITK_OBJECT_NAME(child)); #endif amitk_object_add_child(dest_object, child); amitk_object_unref(child); children = children->next; } return; } static void object_write_xml (const AmitkObject * object, xmlNodePtr nodes, FILE * study_file) { xmlNodePtr children_nodes; AmitkSelection i_selection; amitk_space_write_xml(nodes, "coordinate_space", AMITK_SPACE(object)); children_nodes = xmlNewChild(nodes, NULL, (xmlChar*) "children", NULL); amitk_objects_write_xml(AMITK_OBJECT_CHILDREN(object), children_nodes, study_file); for (i_selection = 0; i_selection < AMITK_SELECTION_NUM; i_selection++) xml_save_boolean(nodes, amitk_selection_get_name(i_selection), object->selected[i_selection]); return; } static gchar * object_read_xml (AmitkObject * object, xmlNodePtr nodes, FILE *study_file, gchar *error_buf) { AmitkSpace * space; xmlNodePtr children_nodes; GList * children; AmitkSelection i_selection; space = amitk_space_read_xml(nodes, "coordinate_space", &error_buf); amitk_space_copy_in_place(AMITK_SPACE(object), space); g_object_unref(space); children_nodes = xml_get_node(nodes, "children"); children = amitk_objects_read_xml(children_nodes->children, study_file, &error_buf); amitk_object_add_children(object, children); children = amitk_objects_unref(children); for (i_selection = 0; i_selection < AMITK_SELECTION_NUM; i_selection++) object->selected[i_selection] = xml_get_boolean(nodes, amitk_selection_get_name(i_selection), &error_buf); return error_buf; } static void object_add_child(AmitkObject * object, AmitkObject * child) { amitk_object_ref(child); object->children = g_list_append(object->children, child); child->parent = object; return; } static void object_remove_child(AmitkObject * object, AmitkObject * child) { child->parent = NULL; object->children = g_list_remove(object->children, child); amitk_object_unref(child); return; } AmitkObject * amitk_object_new (void) { AmitkObject * object; object = g_object_new(amitk_object_get_type(), NULL); return object; } /* amide_data_file_xml_start_tag and amide_data_file_end_tag are used by amitk_study_recover_xml as it searches through the file looking for xml objects to load in */ gchar * amide_data_file_version_str = "amide_data_file_version"; gchar * amide_data_file_xml_tag = ""; gchar * amide_data_file_xml_start_tag = ""; gchar * amide_data_file_xml_end_tag = ""; /* if study_file is NULL, we're saving as a directory, and output_filename will be set (if not NULL), otherwise location will be set */ void amitk_object_write_xml(AmitkObject * object, FILE * study_file, gchar ** output_filename, guint64 * plocation, guint64 *psize) { gchar * xml_filename=NULL; const gchar * object_name; guint count; struct stat file_info; xmlDocPtr doc; xmlNodePtr nodes; g_return_if_fail(AMITK_IS_OBJECT(object)); if (AMITK_IS_DATA_SET(object)) object_name = amitk_object_type_get_name(AMITK_OBJECT_TYPE_DATA_SET); else if (AMITK_IS_STUDY(object)) object_name = amitk_object_type_get_name(AMITK_OBJECT_TYPE_STUDY); else if (AMITK_IS_FIDUCIAL_MARK(object)) object_name = amitk_object_type_get_name(AMITK_OBJECT_TYPE_FIDUCIAL_MARK); else if (AMITK_IS_ROI(object)) object_name = amitk_object_type_get_name(AMITK_OBJECT_TYPE_ROI); else if (AMITK_IS_VOLUME(object)) object_name = amitk_object_type_get_name(AMITK_OBJECT_TYPE_VOLUME); else g_return_if_reached(); if (study_file == NULL) { /* if we're saving in directory format, come up with a filename for this object */ count = 1; xml_filename = g_strdup_printf("%s_%s.xml", object_name, AMITK_OBJECT_NAME(object)); /* see if this file already exists */ while (stat(xml_filename, &file_info) == 0) { g_free(xml_filename); count++; xml_filename = g_strdup_printf("%s_%s_%d.xml", object_name, AMITK_OBJECT_NAME(object), count); } /* and we now have a unique filename */ #ifdef AMIDE_DEBUG g_print("\t- saving object %s in %s\n",AMITK_OBJECT_NAME(object), xml_filename); #endif } else { #ifdef AMIDE_DEBUG g_print("\t- saving object %s\n",AMITK_OBJECT_NAME(object)); #endif } /* write the xml file */ doc = xmlNewDoc((xmlChar *) "1.0"); doc->children = xmlNewDocNode(doc, NULL, (xmlChar *) amide_data_file_version_str, AMITK_FILE_VERSION); nodes = xmlNewChild(doc->children, NULL, (xmlChar *) object_name, (xmlChar *) AMITK_OBJECT_NAME(object)); g_signal_emit(G_OBJECT(object), object_signals[OBJECT_WRITE_XML], 0, nodes, study_file); /* and save */ if (study_file == NULL) { /* save as directory */ xmlSaveFile(xml_filename, doc); if (output_filename != NULL) *output_filename = xml_filename; else g_free(xml_filename); } else { *plocation = ftell(study_file); xmlDocDump(study_file, doc); *psize = ftell(study_file)-*plocation; } /* and we're done */ xmlFreeDoc(doc); return; } AmitkObject * amitk_object_read_xml(gchar * xml_filename, FILE * study_file, guint64 location, guint64 size, gchar ** perror_buf) { AmitkObject * new_object; xmlDocPtr doc; xmlNodePtr doc_nodes; xmlNodePtr type_node; xmlNodePtr version_node; xmlNodePtr object_node; gchar * version; gchar * name; AmitkObjectType i_type, type; if ((doc = xml_open_doc(xml_filename, study_file, location, size, perror_buf))==NULL) return NULL; /* error message appended by function */ /* get the root of our document */ if ((doc_nodes = xmlDocGetRootElement(doc)) == NULL) { amitk_append_str_with_newline(perror_buf, _("AMIDE xml file doesn't appear to have a root.")); return NULL; } version_node = doc_nodes->children; /* look at the file version */ version = xml_get_string(version_node, "text"); g_return_val_if_fail(version != NULL, NULL); /* figure out what type of object is in here */ i_type = 0; type = AMITK_OBJECT_TYPE_NUM; while ((type == AMITK_OBJECT_TYPE_NUM) && (i_type < AMITK_OBJECT_TYPE_NUM)) { type_node = xml_get_node(version_node, amitk_object_type_get_name(i_type)); if (type_node != NULL) type = i_type; i_type++; } switch(type) { case AMITK_OBJECT_TYPE_STUDY: new_object = AMITK_OBJECT(amitk_study_new(NULL)); break; case AMITK_OBJECT_TYPE_FIDUCIAL_MARK: new_object = AMITK_OBJECT(amitk_fiducial_mark_new()); break; case AMITK_OBJECT_TYPE_DATA_SET: new_object = AMITK_OBJECT(amitk_data_set_new(NULL, -1)); break; case AMITK_OBJECT_TYPE_ROI: new_object = AMITK_OBJECT(amitk_roi_new(0)); break; case AMITK_OBJECT_TYPE_VOLUME: new_object = AMITK_OBJECT(amitk_volume_new()); break; default: g_return_val_if_reached(NULL); break; } object_node = type_node->children; name = xml_get_string(object_node, "text"); amitk_object_set_name(new_object, name); g_free(name); #ifdef AMIDE_DEBUG g_print("\treading: %s\ttype: %s\tfile version: %s\n", AMITK_OBJECT_NAME(new_object), amitk_object_type_get_name(type), version); #endif g_signal_emit(G_OBJECT(new_object), object_signals[OBJECT_READ_XML], 0, object_node, study_file, *perror_buf, perror_buf); g_free(version); xmlFreeDoc(doc); return new_object; } AmitkObject * amitk_object_copy(const AmitkObject * object) { AmitkObject * new_object; g_return_val_if_fail(AMITK_IS_OBJECT(object), NULL); g_signal_emit(G_OBJECT(object), object_signals[OBJECT_COPY],0, &new_object); return new_object; } void amitk_object_copy_in_place(AmitkObject * dest_object, const AmitkObject * src_object) { g_return_if_fail(AMITK_IS_OBJECT(src_object)); g_return_if_fail(AMITK_IS_OBJECT(dest_object)); g_signal_emit(G_OBJECT(dest_object), object_signals[OBJECT_COPY_IN_PLACE],0, src_object); return; } void amitk_object_set_name(AmitkObject * object, const gchar * new_name) { g_return_if_fail(AMITK_IS_OBJECT(object)); if (object->name != NULL) g_free(object->name); object->name = g_strdup(new_name); g_signal_emit(G_OBJECT(object), object_signals[OBJECT_NAME_CHANGED],0); return; } /* note, AMITK_SELECTION_ANY means any selections */ gboolean amitk_object_get_selected(const AmitkObject * object, const AmitkSelection which_selection) { AmitkSelection i_selection; gboolean return_val = FALSE; g_return_val_if_fail(AMITK_IS_OBJECT(object), FALSE); g_return_val_if_fail(which_selection >= 0, FALSE); g_return_val_if_fail(which_selection <= AMITK_SELECTION_ANY, FALSE); g_return_val_if_fail(which_selection != AMITK_SELECTION_NUM, FALSE); if (which_selection == AMITK_SELECTION_ANY) { for (i_selection=0; i_selection < AMITK_SELECTION_NUM; i_selection++) return_val = object->selected[i_selection] || return_val; } else return_val = object->selected[which_selection]; return return_val; } /* note, AMITK_SELECTION_ALL means all selections */ void amitk_object_set_selected(AmitkObject * object, const gboolean selection, const AmitkSelection which_selection) { AmitkSelection i_selection; GList * children; gboolean changed=FALSE; g_return_if_fail(AMITK_IS_OBJECT(object)); g_return_if_fail(which_selection >= 0); g_return_if_fail((which_selection < AMITK_SELECTION_NUM) || (which_selection == AMITK_SELECTION_ALL)); if (which_selection == AMITK_SELECTION_ALL) { for (i_selection=0; i_selection < AMITK_SELECTION_NUM; i_selection++) { if (object->selected[i_selection] != selection) { object->selected[i_selection] = selection; changed = TRUE; } } } else { if (object->selected[which_selection] != selection) { object->selected[which_selection] = selection; changed = TRUE; } } if (selection == FALSE) { /* propagate unselect to children */ children = AMITK_OBJECT_CHILDREN(object); while (children != NULL) { amitk_object_set_selected(children->data, selection, which_selection); children = children->next; } } if (changed) { g_signal_emit(G_OBJECT(object), object_signals[OBJECT_SELECTION_CHANGED], 0); if (AMITK_OBJECT_PARENT(object) != NULL) { g_signal_emit(G_OBJECT(AMITK_OBJECT_PARENT(object)), object_signals[OBJECT_CHILD_SELECTION_CHANGED], 0); } } return; } void amitk_object_set_parent(AmitkObject * object,AmitkObject * parent) { gboolean ref_added = FALSE; g_return_if_fail(AMITK_IS_OBJECT(object)); g_return_if_fail(AMITK_IS_OBJECT(parent) || (parent == NULL)); if (object->parent != NULL) { amitk_object_ref(object); ref_added = TRUE; amitk_object_remove_child(object->parent, object); } if (parent != NULL) { amitk_object_add_child(parent, object); } if (ref_added == TRUE) amitk_object_unref(object); return; } void amitk_object_add_child(AmitkObject * object, AmitkObject * child) { g_return_if_fail(AMITK_IS_OBJECT(object)); g_return_if_fail(AMITK_IS_OBJECT(child)); /* check that it's not already in the list */ g_return_if_fail(g_list_find(object->children, child) == NULL); /* check that it doesn't already have a parent */ g_return_if_fail(AMITK_OBJECT_PARENT(child) == NULL); g_signal_emit(G_OBJECT(object), object_signals[OBJECT_ADD_CHILD], 0, child); return; } void amitk_object_add_children(AmitkObject * object, GList * children) { if (children == NULL) return; amitk_object_add_child(object, AMITK_OBJECT(children->data)); amitk_object_add_children(object, children->next); return; } gboolean amitk_object_remove_child(AmitkObject * object, AmitkObject * child) { g_return_val_if_fail(AMITK_IS_OBJECT(object), FALSE); g_return_val_if_fail(AMITK_IS_OBJECT(child), FALSE); /* check if it's not in the list */ g_return_val_if_fail(g_list_find(object->children, child) != NULL, FALSE); g_signal_emit(G_OBJECT(object), object_signals[OBJECT_REMOVE_CHILD], 0, child); return TRUE; } gboolean amitk_object_remove_children(AmitkObject * object, GList * children) { gboolean valid; g_return_val_if_fail(AMITK_IS_OBJECT(object), FALSE); if (children == NULL) return TRUE; valid = amitk_object_remove_children(object, children->next); valid = valid && amitk_object_remove_child(object, AMITK_OBJECT(children->data)); return valid; } /* returns the type of the given object */ gboolean amitk_object_compare_object_type(AmitkObject * object, AmitkObjectType type) { switch(type) { case AMITK_OBJECT_TYPE_STUDY: return AMITK_IS_STUDY(object); break; case AMITK_OBJECT_TYPE_FIDUCIAL_MARK: return AMITK_IS_FIDUCIAL_MARK(object); break; case AMITK_OBJECT_TYPE_DATA_SET: return AMITK_IS_DATA_SET(object); break; case AMITK_OBJECT_TYPE_ROI: return AMITK_IS_ROI(object); break; case AMITK_OBJECT_TYPE_VOLUME: return AMITK_IS_VOLUME(object); break; default: g_return_val_if_reached(FALSE); break; } } /* returns an unreferenced pointer goes up the tree from the given object, finding the first parent of type "type" returns NULL if no appropriate parent found */ AmitkObject * amitk_object_get_parent_of_type(AmitkObject * object, const AmitkObjectType type) { g_return_val_if_fail(AMITK_IS_OBJECT(object), NULL); if (AMITK_OBJECT_PARENT(object) == NULL) /* top node */ return NULL; else if (amitk_object_compare_object_type(AMITK_OBJECT_PARENT(object),type)) return AMITK_OBJECT_PARENT(object); else return amitk_object_get_parent_of_type(AMITK_OBJECT_PARENT(object), type); /* recurse */ } /* returns a referenced list of children of the given object which are of the given type. Will recurse if specified */ GList * amitk_object_get_children_of_type(AmitkObject * object, const AmitkObjectType type, const gboolean recurse) { GList * children; GList * return_objects=NULL; GList * children_objects; AmitkObject * child; g_return_val_if_fail(AMITK_IS_OBJECT(object), NULL); children = AMITK_OBJECT_CHILDREN(object); while(children != NULL) { child = AMITK_OBJECT(children->data); if (amitk_object_compare_object_type(child,type)) return_objects = g_list_append(return_objects, amitk_object_ref(child)); if (recurse) { /* get child's objects */ children_objects = amitk_object_get_children_of_type(AMITK_OBJECT(child), type, recurse); return_objects = g_list_concat(return_objects, children_objects); } children = children->next; } return return_objects; } /* indicates if any children of the given node has been selected */ gboolean amitk_object_selected_children(AmitkObject * object, const AmitkSelection which_selection, gboolean recurse) { GList * children; AmitkObject * child; g_return_val_if_fail(AMITK_IS_OBJECT(object), FALSE); children = AMITK_OBJECT_CHILDREN(object); while(children != NULL) { child = AMITK_OBJECT(children->data); if (amitk_object_get_selected(child, which_selection)) return TRUE; if (recurse) { /* check child's objects */ if (amitk_object_selected_children(AMITK_OBJECT(child), which_selection, recurse)) return TRUE; } children = children->next; } return FALSE; } /* returns a referenced list of selected objects that are children of the given node (usually the study object). Will recurse if specified*/ GList * amitk_object_get_selected_children(AmitkObject * object, const AmitkSelection which_selection, gboolean recurse) { GList * children; GList * return_objects=NULL; GList * children_objects; AmitkObject * child; g_return_val_if_fail(AMITK_IS_OBJECT(object), NULL); children = AMITK_OBJECT_CHILDREN(object); while(children != NULL) { child = AMITK_OBJECT(children->data); if (amitk_object_get_selected(child, which_selection)) return_objects = g_list_append(return_objects, amitk_object_ref(child)); if (recurse) { /* get child's objects */ children_objects = amitk_object_get_selected_children(AMITK_OBJECT(child), which_selection, recurse); return_objects = g_list_concat(return_objects, children_objects); } children = children->next; } return return_objects; } /* returns a referenced list of selected objects of type "type" that are children of the given node (usually the study object). Will recurse if specified*/ GList * amitk_object_get_selected_children_of_type(AmitkObject * object, const AmitkObjectType type, const AmitkSelection which_selection, gboolean recurse) { GList * children; GList * return_objects=NULL; GList * children_objects; AmitkObject * child; g_return_val_if_fail(AMITK_IS_OBJECT(object), NULL); children = AMITK_OBJECT_CHILDREN(object); while(children != NULL) { child = AMITK_OBJECT(children->data); if ((amitk_object_compare_object_type(child,type)) && (amitk_object_get_selected(child, which_selection))) return_objects = g_list_append(return_objects, amitk_object_ref(child)); if (recurse) { /* get child's objects */ children_objects = amitk_object_get_selected_children_of_type(AMITK_OBJECT(child), type, which_selection, recurse); return_objects = g_list_concat(return_objects, children_objects); } children = children->next; } return return_objects; } /* this function is used mainly so that I can debug referencing within amide */ gpointer amitk_object_ref(gpointer object) { g_return_val_if_fail(object != NULL, NULL); g_return_val_if_fail(AMITK_IS_OBJECT(object), NULL); return g_object_ref(object); } gpointer amitk_object_unref(gpointer object) { g_return_val_if_fail(object != NULL, NULL); g_return_val_if_fail(AMITK_IS_OBJECT(object), NULL); g_object_unref(object); return NULL; } /* returns a copy of a list of objects, with a reference added for each copy */ GList * amitk_objects_ref(GList * objects) { GList * return_list; if (objects == NULL) return NULL; return_list = amitk_objects_ref(objects->next); /* recurse */ amitk_object_ref(G_OBJECT(objects->data)); /* add ref to this item */ return_list = g_list_prepend(return_list, objects->data); return return_list; } /* unrefs the objects in the given list and frees the list */ GList * amitk_objects_unref(GList * objects) { AmitkObject * object; if (objects == NULL) return NULL; objects->next = amitk_objects_unref(objects->next); /* recurse */ g_return_val_if_fail(AMITK_IS_OBJECT(objects->data), NULL); object = objects->data; objects = g_list_remove(objects, object); /* should return NULL */ amitk_object_unref(object); return NULL; } gint amitk_objects_count(GList * objects) { gint count; if (objects == NULL) return 0; if (AMITK_IS_OBJECT(objects->data)) count = 1; else count = 0; /* count data sets that are children */ count += amitk_objects_count(AMITK_OBJECT_CHILDREN(objects->data)); /* add this count too the counts from the rest of the objects */ return count+amitk_objects_count(objects->next); } /* return a pointer (unreferenced) to the first amitk_object in the list with the given name */ AmitkObject * amitk_objects_find_object_by_name(GList * objects, const gchar * name) { AmitkObject * object; if (objects == NULL) return NULL; object = objects->data; if (AMITK_IS_OBJECT(object)) if (strcmp(AMITK_OBJECT_NAME(object), name) == 0) return object; return amitk_objects_find_object_by_name(objects->next, name); } /* goes through the two pairs of lists, and counts the number of names in list 1 that match a name in list 2 */ gint amitk_objects_count_pairs_by_name(GList * objects1, GList * objects2) { gint count=0; g_return_val_if_fail(objects1 != NULL, 0); g_return_val_if_fail(objects2 != NULL, 0); while (objects1 != NULL) { if (AMITK_IS_OBJECT(objects1->data)) if (amitk_objects_find_object_by_name(objects2, AMITK_OBJECT_NAME(objects1->data))) count++; objects1 = objects1->next; } return count; } /* returns a referenced list of objects of type "type" from the given list, will recurse if specified */ GList * amitk_objects_get_of_type(GList * objects, const AmitkObjectType type, const gboolean recurse) { GList * return_objects; GList * children_objects; if (objects == NULL) return NULL; /* recurse first */ return_objects = amitk_objects_get_of_type(objects->next, type, recurse); g_return_val_if_fail(AMITK_IS_OBJECT(objects->data), return_objects); if (amitk_object_compare_object_type(objects->data, type)) return_objects = g_list_append(return_objects, amitk_object_ref(objects->data)); if (recurse) { children_objects = amitk_objects_get_of_type(AMITK_OBJECT_CHILDREN(objects->data), type, recurse); return_objects = g_list_concat(return_objects, children_objects); } return return_objects; } gboolean amitk_objects_has_type(GList * objects, const AmitkObjectType type, const gboolean recurse) { GList * return_objects; return_objects = amitk_objects_get_of_type(objects, type, recurse); if (return_objects == NULL) return FALSE; amitk_objects_unref(return_objects); return TRUE; } void amitk_objects_write_xml(GList * objects, xmlNodePtr node_list, FILE * study_file) { gchar * object_filename=NULL;; guint64 location; guint64 size; if (objects == NULL) return; amitk_object_write_xml(objects->data, study_file, &object_filename, &location, &size); if (study_file == NULL) xmlNewChild(node_list, NULL, (xmlChar*) "object_file", (xmlChar *) object_filename); else xml_save_location_and_size(node_list, "object_location_and_size", location, size); if (object_filename != NULL) g_free(object_filename); /* and recurse */ amitk_objects_write_xml(objects->next, node_list, study_file); return; } GList * amitk_objects_read_xml(xmlNodePtr node_list, FILE * study_file, gchar **perror_buf) { GList * objects; AmitkObject * object; gchar * filename=NULL; guint64 location; guint64 size; if (node_list == NULL) return NULL; /* recurse */ objects = amitk_objects_read_xml(node_list->next, study_file, perror_buf); /* and add this node */ if (study_file == NULL) filename = xml_get_string(node_list, "object_file"); else xml_get_location_and_size(node_list, "object_location_and_size", &location, &size, perror_buf); object = amitk_object_read_xml(filename, study_file, location, size, perror_buf); if (object != NULL) objects = g_list_prepend(objects, object); if (filename != NULL) g_free(filename); return objects; } const gchar * amitk_object_type_get_name(const AmitkObjectType type) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_OBJECT_TYPE); enum_value = g_enum_get_value(enum_class, type); g_type_class_unref(enum_class); return enum_value->value_nick; } const gchar * amitk_selection_get_name(const AmitkSelection type) { GEnumClass * enum_class; GEnumValue * enum_value; enum_class = g_type_class_ref(AMITK_TYPE_SELECTION); enum_value = g_enum_get_value(enum_class, type); g_type_class_unref(enum_class); return enum_value->value_nick; } amide-1.0.5/src/amitk_threshold.c0000644000175000017500000025173112270273757016605 0ustar loeningloening/* amitk_threshold.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2001-2014 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* adapted from gtkcolorsel.c */ #include "amide_config.h" #include "amitk_common.h" #include "amitk_progress_dialog.h" #include "amitk_threshold.h" #include "pixmaps.h" #include "image.h" #include "amitk_marshal.h" #include "amitk_color_table_menu.h" #define THRESHOLD_COLOR_SCALE_SEPARATION 30.0 #define THRESHOLD_COLOR_SCALE_WIDTH 16.0 #define THRESHOLD_COLOR_SCALES_WIDTH (2.0*THRESHOLD_COLOR_SCALE_WIDTH+THRESHOLD_COLOR_SCALE_SEPARATION) #define THRESHOLD_COLOR_SCALE_HEIGHT (gdouble) AMITK_DATA_SET_DISTRIBUTION_SIZE #define THRESHOLD_HISTOGRAM_WIDTH (gdouble) IMAGE_DISTRIBUTION_WIDTH #define THRESHOLD_TRIANGLE_WIDTH 16.0 #define THRESHOLD_TRIANGLE_HEIGHT 12.0 /* internal variables */ static gchar * thresholding_names[] = { N_("per slice"), N_("per frame"), N_("interpolated between frames"), N_("global") }; /* thresholding explanations: per slice - threshold the images based on the max and min values in the current slice per frame - threshold the images based on the max and min values in the current frame interpolated between frames - threshold the images based on max and min values interpolated from the reference frame thresholds global - threshold the images based on the max and min values of the entire data set */ static gchar * threshold_style_names[] = { N_("Min/Max"), N_("Center/Width") }; /* threshold style explanations Min/Max - threshold by setting min and max values - Nuclear Medicine Style Center/Width - theshold by setting a window center and width - Radiology Style */ static void threshold_class_init (AmitkThresholdClass *klass); static void threshold_init (AmitkThreshold *threshold); static void threshold_destroy (GtkObject *object); static void threshold_show_all (GtkWidget * widget); static void threshold_construct(AmitkThreshold * threshold, AmitkThresholdLayout layout); static void threshold_add_data_set(AmitkThreshold * threshold, AmitkDataSet * ds); static void threshold_remove_data_set(AmitkThreshold * threshold); static gint threshold_visible_refs(AmitkDataSet * data_set); static void threshold_update_histogram(AmitkThreshold * threshold); static void threshold_update_spin_buttons(AmitkThreshold * threshold); static void threshold_update_arrow(AmitkThreshold * threshold, AmitkThresholdArrow arrow); static void threshold_update_color_scale(AmitkThreshold * threshold, AmitkThresholdScale scale); static void threshold_update_connector_lines(AmitkThreshold * threshold, AmitkThresholdScale scale); static void threshold_update_color_scales(AmitkThreshold * threshold); static void threshold_update_layout(AmitkThreshold * threshold); static void threshold_update_style(AmitkThreshold * threshold); static void threshold_update_type(AmitkThreshold * threshold); static void threshold_update_absolute_label(AmitkThreshold * threshold); static void threshold_update_windowing(AmitkThreshold * threshold); static void threshold_update_ref_frames(AmitkThreshold * threshold); static void threshold_update_color_table(AmitkThreshold * threshold, AmitkViewMode view_mode); static void threshold_update_color_tables(AmitkThreshold * threshold); static void ds_scale_factor_changed_cb(AmitkDataSet * ds, AmitkThreshold* threshold); static void ds_color_table_changed_cb(AmitkDataSet * ds, AmitkViewMode view_mode, AmitkThreshold* threshold); static void ds_thresholding_changed_cb(AmitkDataSet * ds, AmitkThreshold* threshold); static void ds_threshold_style_changed_cb(AmitkDataSet * ds, AmitkThreshold* threshold); static void ds_thresholds_changed_cb(AmitkDataSet * ds, AmitkThreshold* threshold); static void ds_conversion_changed_cb(AmitkDataSet * ds, AmitkThreshold* threshold); static void ds_modality_changed_cb(AmitkDataSet * ds, AmitkThreshold* threshold); static void study_view_mode_changed_cb(AmitkStudy * study, AmitkThreshold * threshold); static gint threshold_arrow_cb(GtkWidget* widget, GdkEvent * event, gpointer AmitkThreshold); static void color_table_cb(GtkWidget * widget, gpointer data); static void color_table_independent_cb(GtkWidget * widget, gpointer AmitkThreshold); static void threshold_ref_frame_cb(GtkWidget* widget, gpointer data); static void threshold_spin_button_cb(GtkWidget* widget, gpointer data); static void thresholding_cb(GtkWidget * widget, gpointer data); static void threshold_style_cb(GtkWidget * widget, gpointer data); static void windowing_cb(GtkWidget * widget, gpointer data); static void init_common(GtkWindow * threshold_dialog); static void threshold_dialog_class_init (AmitkThresholdDialogClass *klass); static void threshold_dialog_init (AmitkThresholdDialog *threshold_dialog); static void threshold_dialog_construct(AmitkThresholdDialog * dialog, GtkWindow * parent, AmitkDataSet * data_set); static void thresholds_dialog_class_init (AmitkThresholdsDialogClass *klass); static void thresholds_dialog_init (AmitkThresholdsDialog *thresholds_dialog); static void thresholds_dialog_construct(AmitkThresholdsDialog * thresholds_dialog, GtkWindow * parent, GList * data_sets); static GtkVBoxClass *threshold_parent_class; static GtkDialogClass *threshold_dialog_parent_class; static GtkDialogClass *thresholds_dialog_parent_class; static GdkCursor * threshold_cursor = NULL; GType amitk_threshold_get_type (void) { static GType threshold_type = 0; if (!threshold_type) { static const GTypeInfo threshold_info = { sizeof (AmitkThresholdClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) threshold_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (AmitkThreshold), 0, /* # preallocs */ (GInstanceInitFunc) threshold_init, NULL /* value table */ }; threshold_type = g_type_register_static(GTK_TYPE_VBOX, "AmitkThreshold", &threshold_info, 0); } return threshold_type; } static void threshold_class_init (AmitkThresholdClass *klass) { GtkObjectClass *gtkobject_class; GtkWidgetClass *widget_class; gtkobject_class = (GtkObjectClass*) klass; widget_class = (GtkWidgetClass*) klass; threshold_parent_class = g_type_class_peek_parent(klass); gtkobject_class->destroy = threshold_destroy; widget_class->show_all = threshold_show_all; } static void threshold_init (AmitkThreshold *threshold) { AmitkThresholdScale i_scale; AmitkThresholdLine i_line; guint i_ref; /* initialize some critical stuff */ for (i_ref=0; i_ref<2; i_ref++) { for (i_scale=0;i_scalecolor_scale_image[i_ref][i_scale] = NULL; } for (i_line=0;i_lineconnector_line[i_ref][i_line] = NULL; } threshold->histogram_image = NULL; if (threshold_cursor == NULL) threshold_cursor = gdk_cursor_new(GDK_SB_V_DOUBLE_ARROW); } static void threshold_destroy (GtkObject * object) { AmitkThreshold * threshold; g_return_if_fail (object != NULL); g_return_if_fail (AMITK_IS_THRESHOLD (object)); threshold = AMITK_THRESHOLD (object); threshold_remove_data_set(threshold); if (GTK_OBJECT_CLASS (threshold_parent_class)->destroy) (* GTK_OBJECT_CLASS (threshold_parent_class)->destroy) (object); } /* this is used to catch the show_all signal, which would show the widgets that we're currently might be hiding */ static void threshold_show_all (GtkWidget * widget) { /* AmitkThreshold * threshold; */ g_return_if_fail (widget != NULL); g_return_if_fail (AMITK_IS_THRESHOLD(widget)); /* threshold = AMITK_THRESHOLD(widget); */ gtk_widget_show(widget); } void amitk_threshold_style_widgets(GtkWidget ** radio_buttons, GtkWidget * hbox) { AmitkThresholdStyle i_threshold_style; GtkWidget * image; for (i_threshold_style = 0; i_threshold_style < AMITK_THRESHOLD_STYLE_NUM; i_threshold_style++) { radio_buttons[i_threshold_style] = gtk_radio_button_new(NULL); switch(i_threshold_style) { case AMITK_THRESHOLD_STYLE_MIN_MAX: image = gtk_image_new_from_stock("amide_icon_threshold_style_min_max",GTK_ICON_SIZE_LARGE_TOOLBAR); break; case AMITK_THRESHOLD_STYLE_CENTER_WIDTH: image = gtk_image_new_from_stock("amide_icon_threshold_style_center_width",GTK_ICON_SIZE_LARGE_TOOLBAR); break; default: image = NULL; g_error("unexpected case in %s at line %d",__FILE__, __LINE__); break; } gtk_button_set_image(GTK_BUTTON(radio_buttons[i_threshold_style]), image); gtk_box_pack_start(GTK_BOX(hbox), radio_buttons[i_threshold_style], FALSE, FALSE, 3); gtk_widget_show(radio_buttons[i_threshold_style]); gtk_widget_set_tooltip_text(radio_buttons[i_threshold_style], threshold_style_names[i_threshold_style]); g_object_set_data(G_OBJECT(radio_buttons[i_threshold_style]), "threshold_style", GINT_TO_POINTER(i_threshold_style)); if (i_threshold_style != 0) gtk_radio_button_set_group(GTK_RADIO_BUTTON(radio_buttons[i_threshold_style]), gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio_buttons[0]))); } } /* this gets called after we have a data set */ static void threshold_construct(AmitkThreshold * threshold, AmitkThresholdLayout layout) { GtkWidget * right_table; GtkWidget * left_table; GtkWidget * main_box; GtkWidget * hbox; guint right_row; guint left_row; gchar * temp_string; GtkWidget * label; GtkWidget * button; GtkWidget * image; AmitkThresholding i_thresholding; AmitkWindow i_window; guint i_ref; AmitkThresholdEntry i_entry; AmitkThresholdStyle i_threshold_style; AmitkLimit i_limit; AmitkViewMode i_view_mode; div_t x; /* we're using two tables packed into a box */ if (layout == AMITK_THRESHOLD_BOX_LAYOUT) main_box = gtk_hbox_new(FALSE,0); else /* layout == AMITK_THRESHOLD_LINEAR_LAYOUT */ main_box = gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(threshold), main_box); /*--------------------------------------- left table --------------------------------------- */ left_table = gtk_table_new(8,5,FALSE); left_row=0; gtk_box_pack_start(GTK_BOX(main_box), left_table, TRUE,TRUE,0); if (!threshold->minimal) { for (i_ref=0; i_ref<2; i_ref++) { threshold->percent_label[i_ref] = gtk_label_new(_("Percent")); gtk_table_attach(GTK_TABLE(left_table), threshold->percent_label[i_ref], 1+2*i_ref,2+2*i_ref,left_row,left_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); /* show/hide taken care of by threshold_update_layout */ threshold->absolute_label[i_ref] = gtk_label_new(""); gtk_table_attach(GTK_TABLE(left_table), threshold->absolute_label[i_ref], 2+2*i_ref,3+2*i_ref,left_row,left_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); /* show/hide taken care of by threshold_update_layout */ } left_row++; for (i_limit=0; i_limit < AMITK_LIMIT_NUM; i_limit++) { threshold->min_max_label[i_limit] = gtk_label_new(NULL); gtk_table_attach(GTK_TABLE(left_table), threshold->min_max_label[i_limit], 0,1,left_row+1-i_limit,left_row+2-i_limit, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(threshold->min_max_label[i_limit]); } for (i_ref=0; i_ref<2; i_ref++) { threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MAX_ABSOLUTE] = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MIN_ABSOLUTE] = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MAX_PERCENT] = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MIN_PERCENT] = gtk_spin_button_new_with_range(-G_MAXDOUBLE, G_MAXDOUBLE, 1.0); g_signal_connect(G_OBJECT(threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MAX_ABSOLUTE]), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); g_signal_connect(G_OBJECT(threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MIN_ABSOLUTE]), "output", G_CALLBACK(amitk_spin_button_scientific_output), NULL); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MAX_PERCENT]), 1); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MIN_PERCENT]), 1); for (i_entry=0; i_entry< AMITK_THRESHOLD_ENTRY_NUM_ENTRIES; i_entry++) { gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(threshold->spin_button[i_ref][i_entry]), FALSE); g_object_set_data(G_OBJECT(threshold->spin_button[i_ref][i_entry]), "type", GINT_TO_POINTER(i_entry)); g_object_set_data(G_OBJECT(threshold->spin_button[i_ref][i_entry]), "which_ref", GINT_TO_POINTER(i_ref)); g_signal_connect(G_OBJECT(threshold->spin_button[i_ref][i_entry]), "value_changed", G_CALLBACK(threshold_spin_button_cb), threshold); } gtk_table_attach(GTK_TABLE(left_table), threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MAX_PERCENT], 1+2*i_ref,2+2*i_ref, left_row,left_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_table_attach(GTK_TABLE(left_table), threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MAX_ABSOLUTE], 2+2*i_ref,3+2*i_ref, left_row,left_row+1,X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_table_attach(GTK_TABLE(left_table), threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MIN_PERCENT], 1+2*i_ref,2+2*i_ref, left_row+1,left_row+2, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_table_attach(GTK_TABLE(left_table), threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MIN_ABSOLUTE], 2+2*i_ref,3+2*i_ref, left_row+1, left_row+2, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); /* show/hide taken care of by threshold_update_layout */ } left_row+=2; } /* color table selectors */ for (i_view_mode=0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) { if (i_view_mode == AMITK_VIEW_MODE_SINGLE) threshold->color_table_label[i_view_mode] = gtk_label_new(_("Color Table:")); else { temp_string = g_strdup_printf(_("Color Table %d:"), i_view_mode+1); threshold->color_table_label[i_view_mode] = gtk_label_new(temp_string); g_free(temp_string); } gtk_table_attach(GTK_TABLE(left_table), threshold->color_table_label[i_view_mode], 0,1, left_row,left_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); threshold->color_table_hbox[i_view_mode] = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(left_table), threshold->color_table_hbox[i_view_mode], 1,5, left_row,left_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); if (i_view_mode == AMITK_VIEW_MODE_SINGLE) { threshold->color_table_independent[i_view_mode] = NULL; } else { threshold->color_table_independent[i_view_mode] = gtk_check_button_new(); g_object_set_data(G_OBJECT(threshold->color_table_independent[i_view_mode]), "view_mode", GINT_TO_POINTER(i_view_mode)); g_signal_connect(G_OBJECT(threshold->color_table_independent[i_view_mode]), "toggled", G_CALLBACK(color_table_independent_cb), threshold); gtk_box_pack_start(GTK_BOX(threshold->color_table_hbox[i_view_mode]), threshold->color_table_independent[i_view_mode], FALSE, FALSE, 0); gtk_widget_set_tooltip_text(threshold->color_table_independent[i_view_mode], _("if not enabled, the primary color table will be used for this set of views")); gtk_widget_show(threshold->color_table_independent[i_view_mode]); } threshold->color_table_menu[i_view_mode] = amitk_color_table_menu_new(); g_object_set_data(G_OBJECT(threshold->color_table_menu[i_view_mode]), "view_mode", GINT_TO_POINTER(i_view_mode)); g_signal_connect(G_OBJECT(threshold->color_table_menu[i_view_mode]), "changed", G_CALLBACK(color_table_cb), threshold); gtk_box_pack_start(GTK_BOX(threshold->color_table_hbox[i_view_mode]), threshold->color_table_menu[i_view_mode], TRUE, TRUE, 0); gtk_widget_show(threshold->color_table_menu[i_view_mode]); left_row++; } if (!threshold->minimal) { /* threshold type selection */ label = gtk_label_new(_("Threshold Type")); gtk_table_attach(GTK_TABLE(left_table), label, 0,1, left_row,left_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); hbox = gtk_hbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(left_table), hbox, 1,5, left_row,left_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(hbox); left_row++; for (i_thresholding = 0; i_thresholding < AMITK_THRESHOLDING_NUM; i_thresholding++) { threshold->type_button[i_thresholding] = gtk_radio_button_new(NULL); switch(i_thresholding) { case AMITK_THRESHOLDING_PER_SLICE: image = gtk_image_new_from_stock("amide_icon_thresholding_per_slice",GTK_ICON_SIZE_LARGE_TOOLBAR); break; case AMITK_THRESHOLDING_PER_FRAME: image = gtk_image_new_from_stock("amide_icon_thresholding_per_frame",GTK_ICON_SIZE_LARGE_TOOLBAR); break; case AMITK_THRESHOLDING_INTERPOLATE_FRAMES: image = gtk_image_new_from_stock("amide_icon_thresholding_interpolate_frames",GTK_ICON_SIZE_LARGE_TOOLBAR); break; case AMITK_THRESHOLDING_GLOBAL: image = gtk_image_new_from_stock("amide_icon_thresholding_global",GTK_ICON_SIZE_LARGE_TOOLBAR); break; default: image = NULL; g_error("unexpected case in %s at line %d",__FILE__, __LINE__); break; } gtk_button_set_image(GTK_BUTTON(threshold->type_button[i_thresholding]), image); gtk_box_pack_start(GTK_BOX(hbox), threshold->type_button[i_thresholding], FALSE, FALSE, 3); gtk_widget_show(threshold->type_button[i_thresholding]); gtk_widget_set_tooltip_text(threshold->type_button[i_thresholding], thresholding_names[i_thresholding]); g_object_set_data(G_OBJECT(threshold->type_button[i_thresholding]), "thresholding", GINT_TO_POINTER(i_thresholding)); if (i_thresholding != 0) gtk_radio_button_set_group(GTK_RADIO_BUTTON(threshold->type_button[i_thresholding]), gtk_radio_button_get_group(GTK_RADIO_BUTTON(threshold->type_button[0]))); g_signal_connect(G_OBJECT(threshold->type_button[i_thresholding]), "clicked", G_CALLBACK(thresholding_cb), threshold); } } /* windowing buttons */ if (!threshold->minimal) { /* threshold type selection */ label = gtk_label_new(_("Threshold Style")); gtk_table_attach(GTK_TABLE(left_table), label, 0,1, left_row,left_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_show(label); hbox = gtk_hbox_new(FALSE, 0); amitk_threshold_style_widgets(threshold->style_button, hbox); gtk_table_attach(GTK_TABLE(left_table), hbox, 1,5, left_row,left_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); for (i_threshold_style = 0; i_threshold_style < AMITK_THRESHOLD_STYLE_NUM; i_threshold_style++) g_signal_connect(G_OBJECT(threshold->style_button[i_threshold_style]), "clicked", G_CALLBACK(threshold_style_cb), threshold); gtk_widget_show(hbox); left_row++; threshold->window_label = gtk_label_new("Apply Window"); gtk_table_attach(GTK_TABLE(left_table), threshold->window_label, 0,1,left_row,left_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); /* show/hide taken care of by threshold_update_window */ threshold->window_vbox = gtk_vbox_new(FALSE, 0); gtk_table_attach(GTK_TABLE(left_table), threshold->window_vbox, 1,5,left_row,left_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); /* show/hide taken care of by threshold_update_window */ for (i_window=0; i_window < AMITK_WINDOW_NUM; i_window++) { x = div(i_window, 5); if (x.rem == 0) { hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(threshold->window_vbox), hbox, FALSE, FALSE, 3); gtk_widget_show(hbox); } button = gtk_button_new(); image = gtk_image_new_from_stock(windowing_icons[i_window],GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_button_set_image(GTK_BUTTON(button), image); g_object_set_data(G_OBJECT(button), "which_window",GINT_TO_POINTER(i_window)); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 3); gtk_widget_show(button); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(windowing_cb), threshold); gtk_widget_set_tooltip_text(button, _(amitk_window_names[i_window])); } left_row++; } /*--------------------------------------- right table --------------------------------------- */ right_table = gtk_table_new(4,5,FALSE); right_row=0; gtk_box_pack_start(GTK_BOX(main_box), right_table, TRUE,TRUE,0); /* color table selector */ threshold->ref_frame_label[0] = gtk_label_new(_("ref. frame 0:")); gtk_table_attach(GTK_TABLE(right_table), threshold->ref_frame_label[0], 1,2, right_row,right_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); /* show/hide taken care of by threshold_update_layout */ threshold->ref_frame_label[1] = gtk_label_new(_("ref. frame 1:")); gtk_table_attach(GTK_TABLE(right_table), threshold->ref_frame_label[1], 3,4, right_row,right_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); /* show/hide taken care of by threshold_update_layout */ for (i_ref=0; i_ref<2; i_ref++) { threshold->threshold_ref_frame_menu[i_ref] = gtk_combo_box_new_text(); gtk_table_attach(GTK_TABLE(right_table), threshold->threshold_ref_frame_menu[i_ref], 2+i_ref*2,3+i_ref*2, right_row,right_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); gtk_widget_set_size_request(threshold->threshold_ref_frame_menu[i_ref], 50, -1); g_object_set_data(G_OBJECT(threshold->threshold_ref_frame_menu[i_ref]), "which_ref", GINT_TO_POINTER(i_ref)); g_signal_connect(G_OBJECT(threshold->threshold_ref_frame_menu[i_ref]), "changed", G_CALLBACK(threshold_ref_frame_cb), threshold); /* show/hide taken care of by threshold_update_layout */ } /* puts these labels on bottom for a linear layout */ if (layout == AMITK_THRESHOLD_LINEAR_LAYOUT) right_row = 3; else right_row++; if (!threshold->minimal) { threshold->histogram_label = gtk_label_new(_("distribution")); gtk_table_attach(GTK_TABLE(right_table), threshold->histogram_label, 0,1, right_row, right_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); /* show/hide taken care of by threshold_update_layout */ } for (i_ref=0; i_ref<2; i_ref++) { threshold->full_label[i_ref] = gtk_label_new(_("full")); gtk_table_attach(GTK_TABLE(right_table), threshold->full_label[i_ref], 1+2*i_ref,2+2*i_ref, right_row, right_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); /* show/hide taken care of by threshold_update_layout */ threshold->scaled_label[i_ref] = gtk_label_new(_("scaled")); gtk_table_attach(GTK_TABLE(right_table), threshold->scaled_label[i_ref], 2+2*i_ref,3+2*i_ref, right_row, right_row+1, X_PACKING_OPTIONS | GTK_FILL, 0, X_PADDING, Y_PADDING); /* show/hide taken care of by threshold_update_layout */ } if (layout == AMITK_THRESHOLD_LINEAR_LAYOUT) right_row = 1; else right_row++; /* the histogram */ if (!threshold->minimal) { #ifdef AMIDE_LIBGNOMECANVAS_AA threshold->histogram = gnome_canvas_new_aa(); #else threshold->histogram = gnome_canvas_new(); #endif gtk_table_attach(GTK_TABLE(right_table), threshold->histogram, 0,1,right_row,right_row+1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); gtk_widget_set_size_request(threshold->histogram, IMAGE_DISTRIBUTION_WIDTH, AMITK_DATA_SET_DISTRIBUTION_SIZE + 2*THRESHOLD_TRIANGLE_HEIGHT); gnome_canvas_set_scroll_region(GNOME_CANVAS(threshold->histogram), 0.0, THRESHOLD_TRIANGLE_WIDTH/2.0, IMAGE_DISTRIBUTION_WIDTH, (THRESHOLD_TRIANGLE_WIDTH/2.0 + AMITK_DATA_SET_DISTRIBUTION_SIZE)); /* show/hide taken care of by threshold_update_layout */ } /* the color scale */ for (i_ref=0; i_ref<2; i_ref++) { #ifdef AMIDE_LIBGNOMECANVAS_AA threshold->color_scales[i_ref] = gnome_canvas_new_aa(); #else threshold->color_scales[i_ref] = gnome_canvas_new(); #endif gtk_table_attach(GTK_TABLE(right_table), threshold->color_scales[i_ref], 1+2*i_ref,3+2*i_ref,right_row,right_row+1, X_PACKING_OPTIONS | GTK_FILL, Y_PACKING_OPTIONS | GTK_FILL, X_PADDING, Y_PADDING); gnome_canvas_set_scroll_region(GNOME_CANVAS(threshold->color_scales[i_ref]), 0.0, 0.0, THRESHOLD_COLOR_SCALES_WIDTH+2* THRESHOLD_TRIANGLE_WIDTH, THRESHOLD_COLOR_SCALE_HEIGHT + 2*THRESHOLD_TRIANGLE_HEIGHT + 1); gtk_widget_set_size_request(threshold->color_scales[i_ref], THRESHOLD_COLOR_SCALES_WIDTH+2* THRESHOLD_TRIANGLE_WIDTH, THRESHOLD_COLOR_SCALE_HEIGHT + 2*THRESHOLD_TRIANGLE_HEIGHT + 1); /* show/hide taken care of by threshold_update_layout */ } right_row++; gtk_widget_show(left_table); gtk_widget_show(right_table); gtk_widget_show(main_box); return; } static void threshold_add_data_set(AmitkThreshold * threshold, AmitkDataSet * ds) { gint i; AmitkStudy * study; g_return_if_fail(threshold->data_set == NULL); threshold->data_set = amitk_object_ref(ds); /* explicitly make sure the min/max values have been calculated on the new data set, this is to make sure a progress box gets pushed up if these haven't been calculated eyt */ amitk_data_set_calc_min_max_if_needed(threshold->data_set, amitk_progress_dialog_update, threshold->progress_dialog); for (i=0; i<2; i++) { threshold->threshold_max[i] = AMITK_DATA_SET_THRESHOLD_MAX(ds, i); threshold->threshold_min[i] = AMITK_DATA_SET_THRESHOLD_MIN(ds, i); } study = AMITK_STUDY(amitk_object_get_parent_of_type(AMITK_OBJECT(ds), AMITK_OBJECT_TYPE_STUDY)); /* unreferenced pointer */ if (study != NULL) threshold->view_mode = AMITK_STUDY_VIEW_MODE(study); else threshold->view_mode = AMITK_VIEW_MODE_SINGLE; g_signal_connect(G_OBJECT(ds), "scale_factor_changed", G_CALLBACK(ds_scale_factor_changed_cb), threshold); g_signal_connect(G_OBJECT(ds), "color_table_changed", G_CALLBACK(ds_color_table_changed_cb), threshold); g_signal_connect(G_OBJECT(ds), "color_table_independent_changed", G_CALLBACK(ds_color_table_changed_cb), threshold); g_signal_connect(G_OBJECT(ds), "thresholding_changed", G_CALLBACK(ds_thresholding_changed_cb), threshold); g_signal_connect(G_OBJECT(ds), "threshold_style_changed", G_CALLBACK(ds_threshold_style_changed_cb), threshold); g_signal_connect(G_OBJECT(ds), "thresholds_changed", G_CALLBACK(ds_thresholds_changed_cb), threshold); g_signal_connect(G_OBJECT(ds), "conversion_changed", G_CALLBACK(ds_conversion_changed_cb), threshold); g_signal_connect(G_OBJECT(ds), "modality_changed", G_CALLBACK(ds_modality_changed_cb), threshold); if (study != NULL) g_signal_connect(G_OBJECT(study), "view_mode_changed", G_CALLBACK(study_view_mode_changed_cb), threshold); return; } static void threshold_remove_data_set(AmitkThreshold * threshold) { AmitkStudy * study; if (threshold->data_set == NULL) return; study = AMITK_STUDY(amitk_object_get_parent_of_type(AMITK_OBJECT(threshold->data_set), AMITK_OBJECT_TYPE_STUDY)); /* unreferenced pointer */ AMITK_OBJECT(threshold->data_set)->dialog = NULL; g_signal_handlers_disconnect_by_func(G_OBJECT(threshold->data_set), ds_scale_factor_changed_cb, threshold); g_signal_handlers_disconnect_by_func(G_OBJECT(threshold->data_set), ds_color_table_changed_cb, threshold); g_signal_handlers_disconnect_by_func(G_OBJECT(threshold->data_set), ds_thresholding_changed_cb, threshold); g_signal_handlers_disconnect_by_func(G_OBJECT(threshold->data_set), ds_threshold_style_changed_cb, threshold); g_signal_handlers_disconnect_by_func(G_OBJECT(threshold->data_set), ds_thresholds_changed_cb, threshold); g_signal_handlers_disconnect_by_func(G_OBJECT(threshold->data_set), ds_conversion_changed_cb, threshold); g_signal_handlers_disconnect_by_func(G_OBJECT(threshold->data_set), ds_modality_changed_cb, threshold); if (study != NULL) g_signal_handlers_disconnect_by_func(G_OBJECT(study), study_view_mode_changed_cb, threshold); threshold->data_set = amitk_object_unref(threshold->data_set); return; } /* return how many visible reference points we should have */ static gint threshold_visible_refs(AmitkDataSet * data_set) { if (AMITK_DATA_SET_THRESHOLDING(data_set) == AMITK_THRESHOLDING_INTERPOLATE_FRAMES) return 2; else return 1; } /* refresh what's on the histogram */ static void threshold_update_histogram(AmitkThreshold * threshold) { rgb_t fg; GtkStyle * widget_style; GdkPixbuf * pixbuf; if (threshold->minimal) return; /* no histogram in minimal configuration */ /* figure out what colors to use for the distribution image */ widget_style = gtk_widget_get_style(GTK_WIDGET(threshold)); if (widget_style == NULL) { g_warning(_("Threshold has no style?\n")); widget_style = gtk_style_new(); } fg.r = widget_style->fg[GTK_STATE_NORMAL].red >> 8; fg.g = widget_style->fg[GTK_STATE_NORMAL].green >> 8; fg.b = widget_style->fg[GTK_STATE_NORMAL].blue >> 8; pixbuf = image_of_distribution(threshold->data_set, fg, amitk_progress_dialog_update, threshold->progress_dialog); if (pixbuf != NULL) { if (threshold->histogram_image != NULL) gnome_canvas_item_set(threshold->histogram_image, "pixbuf", pixbuf, NULL); else threshold->histogram_image = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(threshold->histogram)), gnome_canvas_pixbuf_get_type(), "pixbuf", pixbuf, "x", 0.0, "y", ((gdouble) THRESHOLD_TRIANGLE_HEIGHT), NULL); g_object_unref(pixbuf); } return; } /* function to update the spin button widgets */ static void threshold_update_spin_buttons(AmitkThreshold * threshold) { guint i_ref; AmitkThresholdEntry i_entry; amide_data_t scale; amide_data_t step; amide_data_t min_val, max_val, min_percent, max_percent; if (threshold->minimal) return; /* no spin buttons in minimal configuration */ g_return_if_fail(AMITK_IS_DATA_SET(threshold->data_set)); scale = (amitk_data_set_get_global_max(threshold->data_set) - amitk_data_set_get_global_min(threshold->data_set)); step = scale / 100.0; if (scale < EPSILON) { scale = EPSILON; step = EPSILON; } for (i_ref=0; i_ref< threshold_visible_refs(threshold->data_set); i_ref++) { switch (AMITK_DATA_SET_THRESHOLD_STYLE(threshold->data_set)) { case AMITK_THRESHOLD_STYLE_CENTER_WIDTH: max_val = (threshold->threshold_max[i_ref]+threshold->threshold_min[i_ref])/2; /* center */ min_val = (threshold->threshold_max[i_ref]-threshold->threshold_min[i_ref]); /* width */ max_percent = 100*(max_val-amitk_data_set_get_global_min(threshold->data_set))/scale; min_percent = 100*min_val/scale; break; case AMITK_THRESHOLD_STYLE_MIN_MAX: default: max_val = threshold->threshold_max[i_ref]; min_val = threshold->threshold_min[i_ref]; max_percent = 100*(max_val-amitk_data_set_get_global_min(threshold->data_set))/scale; min_percent = 100*(min_val-amitk_data_set_get_global_min(threshold->data_set))/scale; break; } for (i_entry=0; i_entry< AMITK_THRESHOLD_ENTRY_NUM_ENTRIES; i_entry++) g_signal_handlers_block_by_func(G_OBJECT(threshold->spin_button[i_ref][i_entry]), G_CALLBACK(threshold_spin_button_cb), threshold); gtk_spin_button_set_value(GTK_SPIN_BUTTON(threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MAX_PERCENT]),max_percent); gtk_spin_button_set_increments(GTK_SPIN_BUTTON(threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MAX_ABSOLUTE]), step, 10.0*step); gtk_spin_button_set_value(GTK_SPIN_BUTTON(threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MAX_ABSOLUTE]),max_val); gtk_spin_button_set_value(GTK_SPIN_BUTTON(threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MIN_PERCENT]),min_percent); gtk_spin_button_set_increments(GTK_SPIN_BUTTON(threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MIN_ABSOLUTE]), step, 10.0*step); gtk_spin_button_set_value(GTK_SPIN_BUTTON(threshold->spin_button[i_ref][AMITK_THRESHOLD_ENTRY_MIN_ABSOLUTE]), min_val); for (i_entry=0; i_entry< AMITK_THRESHOLD_ENTRY_NUM_ENTRIES; i_entry++) g_signal_handlers_unblock_by_func(G_OBJECT(threshold->spin_button[i_ref][i_entry]), G_CALLBACK(threshold_spin_button_cb), threshold); } return; } static void threshold_update_arrow(AmitkThreshold * threshold, AmitkThresholdArrow arrow) { GnomeCanvasPoints * points; gdouble left, right, point, top, bottom; gboolean up_pointing=FALSE; gboolean down_pointing=FALSE; gchar * fill_color; guint i_ref; amide_data_t initial_diff; amide_data_t global_diff; guint i; amide_data_t center; global_diff = amitk_data_set_get_global_max(threshold->data_set)- amitk_data_set_get_global_min(threshold->data_set); if (global_diff < EPSILON) global_diff = 1.0; /* non sensicle */ for (i_ref=0; i_ref< threshold_visible_refs(threshold->data_set); i_ref++) { points = gnome_canvas_points_new(3); initial_diff = threshold->initial_max[i_ref]- threshold->initial_min[i_ref]; if (initial_diff < EPSILON) initial_diff = EPSILON; switch (arrow) { case AMITK_THRESHOLD_ARROW_FULL_MIN: left = 0; right = THRESHOLD_TRIANGLE_WIDTH; if (EQUAL_ZERO(global_diff)) point = THRESHOLD_TRIANGLE_HEIGHT+THRESHOLD_COLOR_SCALE_HEIGHT; else point = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * (1-(threshold->threshold_min[i_ref]- amitk_data_set_get_global_min(threshold->data_set))/global_diff); top = point; bottom = point+THRESHOLD_TRIANGLE_HEIGHT; if (threshold->threshold_min[i_ref] < amitk_data_set_get_global_min(threshold->data_set)) down_pointing=TRUE; fill_color = "white"; break; case AMITK_THRESHOLD_ARROW_FULL_CENTER: center = (threshold->threshold_max[i_ref]+threshold->threshold_min[i_ref])/2.0; left = 0; right = THRESHOLD_TRIANGLE_WIDTH; if (EQUAL_ZERO(global_diff)) point = THRESHOLD_TRIANGLE_HEIGHT+THRESHOLD_COLOR_SCALE_HEIGHT; else point = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * (1-(center - amitk_data_set_get_global_min(threshold->data_set))/global_diff); top = point-THRESHOLD_TRIANGLE_HEIGHT/1.5; bottom = point+THRESHOLD_TRIANGLE_HEIGHT/1.5; if (center < amitk_data_set_get_global_min(threshold->data_set)) down_pointing=TRUE; else if (center > amitk_data_set_get_global_max(threshold->data_set)) up_pointing = TRUE; fill_color = "gray"; break; case AMITK_THRESHOLD_ARROW_FULL_MAX: left = 0; right = THRESHOLD_TRIANGLE_WIDTH; if (EQUAL_ZERO(global_diff)) point = THRESHOLD_TRIANGLE_HEIGHT+THRESHOLD_COLOR_SCALE_HEIGHT; else point = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * (1-(threshold->threshold_max[i_ref]-amitk_data_set_get_global_min(threshold->data_set))/global_diff); top = point-THRESHOLD_TRIANGLE_HEIGHT; bottom = point; if (threshold->threshold_max[i_ref] > amitk_data_set_get_global_max(threshold->data_set)) up_pointing=TRUE; /* want upward pointing max arrow */ fill_color = "black"; break; case AMITK_THRESHOLD_ARROW_SCALED_MIN: left = THRESHOLD_COLOR_SCALES_WIDTH+2*THRESHOLD_TRIANGLE_WIDTH; right = THRESHOLD_COLOR_SCALES_WIDTH+THRESHOLD_TRIANGLE_WIDTH; if (EQUAL_ZERO(initial_diff)) point = THRESHOLD_TRIANGLE_HEIGHT+THRESHOLD_COLOR_SCALE_HEIGHT; else point = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * (1-(threshold->threshold_min[i_ref]-threshold->initial_min[i_ref])/initial_diff); top = point; bottom = point+THRESHOLD_TRIANGLE_HEIGHT; if (threshold->threshold_min[i_ref] < threshold->initial_min[i_ref]) down_pointing=TRUE; else if (threshold->threshold_min[i_ref] > threshold->initial_max[i_ref]) up_pointing=TRUE; fill_color = "white"; break; case AMITK_THRESHOLD_ARROW_SCALED_CENTER: center = (threshold->threshold_max[i_ref]+threshold->threshold_min[i_ref])/2.0; left = THRESHOLD_COLOR_SCALES_WIDTH+2*THRESHOLD_TRIANGLE_WIDTH; right = THRESHOLD_COLOR_SCALES_WIDTH+THRESHOLD_TRIANGLE_WIDTH; if (EQUAL_ZERO(initial_diff)) point = THRESHOLD_TRIANGLE_HEIGHT+THRESHOLD_COLOR_SCALE_HEIGHT; else point = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * (1-(center-threshold->initial_min[i_ref])/initial_diff); top = point-THRESHOLD_TRIANGLE_HEIGHT/1.5; bottom = point+THRESHOLD_TRIANGLE_HEIGHT/1.5; if (center < threshold->initial_min[i_ref]) down_pointing=TRUE; else if (center > threshold->initial_max[i_ref]) up_pointing=TRUE; fill_color = "gray"; break; case AMITK_THRESHOLD_ARROW_SCALED_MAX: left = THRESHOLD_COLOR_SCALES_WIDTH+2*THRESHOLD_TRIANGLE_WIDTH; right = THRESHOLD_COLOR_SCALES_WIDTH+THRESHOLD_TRIANGLE_WIDTH; if (EQUAL_ZERO(initial_diff)) point = THRESHOLD_TRIANGLE_HEIGHT; else point = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * (1-(threshold->threshold_max[i_ref]-threshold->initial_min[i_ref])/initial_diff); top = point-THRESHOLD_TRIANGLE_HEIGHT; bottom = point; if (threshold->threshold_max[i_ref] > threshold->initial_max[i_ref]) up_pointing=TRUE; else if (threshold->threshold_max[i_ref] < threshold->initial_min[i_ref]) down_pointing=TRUE; fill_color = "black"; break; default: return; } /* end switch (arrow) */ if (up_pointing) { points->coords[0] = left; points->coords[1] = THRESHOLD_TRIANGLE_HEIGHT; points->coords[2] = (left+right)/2.0; points->coords[3] = 0; points->coords[4] = right; points->coords[5] = THRESHOLD_TRIANGLE_HEIGHT; } else if (down_pointing) { points->coords[0] = left; points->coords[1] = THRESHOLD_COLOR_SCALE_HEIGHT + THRESHOLD_TRIANGLE_HEIGHT; points->coords[2] = (left+right)/2.0; points->coords[3] = THRESHOLD_COLOR_SCALE_HEIGHT + 2*THRESHOLD_TRIANGLE_HEIGHT; points->coords[4] = right; points->coords[5] = THRESHOLD_COLOR_SCALE_HEIGHT + THRESHOLD_TRIANGLE_HEIGHT; } else { points->coords[0] = left; points->coords[1] = bottom; points->coords[2] = left; points->coords[3] = top; points->coords[4] = right; points->coords[5] = point; } /* sanity check */ for (i=0; i < 6; i++) if (!finite(points->coords[i])) points->coords[i] = 0.0; /* destroy the center arrow if needed */ if ((AMITK_DATA_SET_THRESHOLD_STYLE(threshold->data_set) == AMITK_THRESHOLD_STYLE_MIN_MAX) && ((arrow == AMITK_THRESHOLD_ARROW_FULL_CENTER) || (arrow == AMITK_THRESHOLD_ARROW_SCALED_CENTER)) ) { if (threshold->arrow[i_ref][arrow] != NULL) { gtk_object_destroy(GTK_OBJECT(threshold->arrow[i_ref][arrow])); threshold->arrow[i_ref][arrow] = NULL; } } else { /* otherwise, do all the drawing */ if (threshold->arrow[i_ref][arrow] != NULL) gnome_canvas_item_set(threshold->arrow[i_ref][arrow], "points", points, NULL); else { threshold->arrow[i_ref][arrow] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(threshold->color_scales[i_ref])), gnome_canvas_polygon_get_type(), "points", points, "fill_color", fill_color, "outline_color", "black", "width_pixels", 2, NULL); g_object_set_data(G_OBJECT(threshold->arrow[i_ref][arrow]), "type", GINT_TO_POINTER(arrow)); g_object_set_data(G_OBJECT(threshold->arrow[i_ref][arrow]), "which_ref", GINT_TO_POINTER(i_ref)); g_signal_connect(G_OBJECT(threshold->arrow[i_ref][arrow]), "event", G_CALLBACK(threshold_arrow_cb), threshold); } } gnome_canvas_points_unref(points); } return; } /* function called to update the color scales */ static void threshold_update_color_scale(AmitkThreshold * threshold, AmitkThresholdScale scale) { gdouble x,y; guint i_ref; GdkPixbuf * pixbuf; for (i_ref=0; i_ref< threshold_visible_refs(threshold->data_set); i_ref++) { switch (scale) { case AMITK_THRESHOLD_SCALE_FULL: pixbuf = image_from_colortable(AMITK_DATA_SET_COLOR_TABLE(threshold->data_set, AMITK_VIEW_MODE_SINGLE), THRESHOLD_COLOR_SCALE_WIDTH, THRESHOLD_COLOR_SCALE_HEIGHT, threshold->threshold_min[i_ref], threshold->threshold_max[i_ref], amitk_data_set_get_global_min(threshold->data_set), amitk_data_set_get_global_max(threshold->data_set), FALSE); x = THRESHOLD_TRIANGLE_WIDTH; y = THRESHOLD_TRIANGLE_HEIGHT; break; case AMITK_THRESHOLD_SCALE_SCALED: pixbuf = image_from_colortable(AMITK_DATA_SET_COLOR_TABLE(threshold->data_set, AMITK_VIEW_MODE_SINGLE), THRESHOLD_COLOR_SCALE_WIDTH, THRESHOLD_COLOR_SCALE_HEIGHT, threshold->threshold_min[i_ref], threshold->threshold_max[i_ref], threshold->initial_min[i_ref], threshold->initial_max[i_ref], FALSE); x = THRESHOLD_COLOR_SCALE_WIDTH+THRESHOLD_TRIANGLE_WIDTH+THRESHOLD_COLOR_SCALE_SEPARATION; y = THRESHOLD_TRIANGLE_HEIGHT; break; default: pixbuf = NULL; x = y = 0.0; g_return_if_reached(); break; } if (threshold->color_scale_image[i_ref][scale] != NULL) { gnome_canvas_item_set(threshold->color_scale_image[i_ref][scale], "pixbuf", pixbuf, NULL); } else { threshold->color_scale_image[i_ref][scale] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(threshold->color_scales[i_ref])), gnome_canvas_pixbuf_get_type(), "pixbuf", pixbuf, "x", x, "y", y, NULL); } g_object_unref(pixbuf); } return; } static void threshold_update_connector_lines(AmitkThreshold * threshold, AmitkThresholdScale scale) { gdouble temp; GnomeCanvasPoints * line_points; guint i_ref; amide_data_t initial_diff; amide_data_t global_diff; global_diff = amitk_data_set_get_global_max(threshold->data_set)- amitk_data_set_get_global_min(threshold->data_set); if (global_diff < EPSILON) global_diff = 1.0; /* non-sensicle */ for (i_ref=0; i_ref< threshold_visible_refs(threshold->data_set); i_ref++) { initial_diff = threshold->initial_max[i_ref]- threshold->initial_min[i_ref]; if (initial_diff < EPSILON) initial_diff = EPSILON; /* update the line that connect the max arrows of each color scale */ line_points = gnome_canvas_points_new(2); line_points->coords[0] = THRESHOLD_COLOR_SCALE_WIDTH+THRESHOLD_TRIANGLE_WIDTH; temp = (1.0-(threshold->threshold_max[i_ref]- amitk_data_set_get_global_min(threshold->data_set))/global_diff); if (temp < 0.0) temp = 0.0; line_points->coords[1] = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * temp; line_points->coords[2] = THRESHOLD_COLOR_SCALE_WIDTH+ THRESHOLD_TRIANGLE_WIDTH+THRESHOLD_COLOR_SCALE_SEPARATION; temp = (1.0-(threshold->threshold_max[i_ref]-threshold->initial_min[i_ref])/initial_diff); if ((temp < 0.0) || (scale==AMITK_THRESHOLD_SCALE_FULL) || isnan(temp)) temp = 0.0; else if (temp > 1.0) temp = 1.0; line_points->coords[3] = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * temp; if (threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_MAX] != NULL) gnome_canvas_item_set(threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_MAX], "points", line_points, NULL); else threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_MAX] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(threshold->color_scales[i_ref])), gnome_canvas_line_get_type(), "points", line_points, "fill_color", "black", "width_units", 1.0, NULL); gnome_canvas_points_unref(line_points); /* update the line that connect the min arrows of each color scale */ line_points = gnome_canvas_points_new(2); line_points->coords[0] = THRESHOLD_COLOR_SCALE_WIDTH+THRESHOLD_TRIANGLE_WIDTH; temp = (1.0-(threshold->threshold_min[i_ref]- amitk_data_set_get_global_min(threshold->data_set))/global_diff); if (temp > 1.0) temp = 1.0; line_points->coords[1] = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * temp; line_points->coords[2] = THRESHOLD_COLOR_SCALE_WIDTH+ THRESHOLD_TRIANGLE_WIDTH+THRESHOLD_COLOR_SCALE_SEPARATION; temp = (1.0-(threshold->threshold_min[i_ref]-threshold->initial_min[i_ref])/initial_diff); if ((temp > 1.0) || (scale==AMITK_THRESHOLD_SCALE_FULL) || isnan(temp)) temp = 1.0; else if (temp < 0.0) temp = 0.0; line_points->coords[3] = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * temp; if (threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_MIN] != NULL) gnome_canvas_item_set(threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_MIN], "points", line_points, NULL); else threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_MIN] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(threshold->color_scales[i_ref])), gnome_canvas_line_get_type(), "points", line_points, "fill_color", "black", "width_units", 1.0, NULL); gnome_canvas_points_unref(line_points); /* update the line that connects the center arrows of each color scale */ if (AMITK_DATA_SET_THRESHOLD_STYLE(threshold->data_set) == AMITK_THRESHOLD_STYLE_CENTER_WIDTH) { line_points = gnome_canvas_points_new(2); line_points->coords[0] = THRESHOLD_COLOR_SCALE_WIDTH+THRESHOLD_TRIANGLE_WIDTH; temp = (1.0-((threshold->threshold_max[i_ref]+threshold->threshold_min[i_ref])/2.0- amitk_data_set_get_global_min(threshold->data_set))/global_diff); if (temp > 1.0) temp = 1.0; else if (temp < 0.0) temp = 0.0; line_points->coords[1] = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * temp; line_points->coords[2] = THRESHOLD_COLOR_SCALE_WIDTH+ THRESHOLD_TRIANGLE_WIDTH+THRESHOLD_COLOR_SCALE_SEPARATION; temp = (1.0-((threshold->threshold_max[i_ref]+threshold->threshold_min[i_ref])/2.0- threshold->initial_min[i_ref])/initial_diff); if ((scale == AMITK_THRESHOLD_SCALE_FULL) || isnan(temp)) temp = 0.5; else if (temp > 1.0) temp = 1.0; else if (temp < 0.0) temp = 0.0; line_points->coords[3] = THRESHOLD_TRIANGLE_HEIGHT + THRESHOLD_COLOR_SCALE_HEIGHT * temp; if (threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_CENTER] != NULL) gnome_canvas_item_set(threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_CENTER], "points", line_points, NULL); else threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_CENTER] = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(threshold->color_scales[i_ref])), gnome_canvas_line_get_type(), "points", line_points, "fill_color", "black", "width_units", 1.0, NULL); gnome_canvas_points_unref(line_points); } else { /* hide if not CENTER_WIDTH style */ if (threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_CENTER] != NULL) { gtk_object_destroy(GTK_OBJECT(threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_CENTER])); threshold->connector_line[i_ref][AMITK_THRESHOLD_LINE_CENTER] = NULL; } } } return; } /* update all the color scales */ static void threshold_update_color_scales(AmitkThreshold * threshold) { guint i_ref; threshold_update_color_scale(threshold, AMITK_THRESHOLD_SCALE_FULL); for (i_ref=0; i_ref< threshold_visible_refs(threshold->data_set); i_ref++) { threshold->initial_min[i_ref] = threshold->threshold_min[i_ref]; threshold->initial_max[i_ref] = threshold->threshold_max[i_ref]; } threshold_update_color_scale(threshold, AMITK_THRESHOLD_SCALE_SCALED); threshold_update_connector_lines(threshold, AMITK_THRESHOLD_SCALE_SCALED); return; } /* update which widgets are shown or hidden */ static void threshold_update_layout(AmitkThreshold * threshold) { guint i_ref; AmitkThresholdEntry i_entry; g_return_if_fail(AMITK_IS_DATA_SET(threshold->data_set)); for (i_ref=0; i_ref<2; i_ref++) { if ((i_ref==1) && (AMITK_DATA_SET_THRESHOLDING(threshold->data_set) != AMITK_THRESHOLDING_INTERPOLATE_FRAMES)) { if (!threshold->minimal) { gtk_widget_hide(threshold->percent_label[i_ref]); gtk_widget_hide(threshold->absolute_label[i_ref]); gtk_widget_hide(threshold->full_label[i_ref]); gtk_widget_hide(threshold->scaled_label[i_ref]); gtk_widget_hide(threshold->color_scales[i_ref]); for (i_entry=0; i_entry< AMITK_THRESHOLD_ENTRY_NUM_ENTRIES; i_entry++) gtk_widget_hide(threshold->spin_button[i_ref][i_entry]); } } else { gtk_widget_show(threshold->color_scales[i_ref]); if (!threshold->minimal) { gtk_widget_show(threshold->percent_label[i_ref]); gtk_widget_show(threshold->absolute_label[i_ref]); gtk_widget_show(threshold->full_label[i_ref]); gtk_widget_show(threshold->scaled_label[i_ref]); for (i_entry=0; i_entry< AMITK_THRESHOLD_ENTRY_NUM_ENTRIES; i_entry++) gtk_widget_show(threshold->spin_button[i_ref][i_entry]); } } if (!threshold->minimal) { if (AMITK_DATA_SET_THRESHOLDING(threshold->data_set) == AMITK_THRESHOLDING_GLOBAL) { gtk_widget_show(threshold->histogram_label); gtk_widget_show(threshold->histogram); } else { gtk_widget_hide(threshold->histogram_label); gtk_widget_hide(threshold->histogram); } if (AMITK_DATA_SET_THRESHOLDING(threshold->data_set) != AMITK_THRESHOLDING_INTERPOLATE_FRAMES) { gtk_widget_hide(threshold->ref_frame_label[i_ref]); gtk_widget_hide(threshold->threshold_ref_frame_menu[i_ref]); } else { gtk_widget_show(threshold->ref_frame_label[i_ref]); gtk_widget_show_all(threshold->threshold_ref_frame_menu[i_ref]); } } } return; } static void threshold_update_style(AmitkThreshold * threshold) { AmitkThresholdStyle i_style; if (threshold->minimal) return; /* no style in minimal configuration */ switch(AMITK_DATA_SET_THRESHOLD_STYLE(threshold->data_set)) { case AMITK_THRESHOLD_STYLE_CENTER_WIDTH: gtk_label_set_text(GTK_LABEL(threshold->min_max_label[AMITK_LIMIT_MAX]), _("Center")); gtk_label_set_text(GTK_LABEL(threshold->min_max_label[AMITK_LIMIT_MIN]), _("Width")); break; case AMITK_THRESHOLD_STYLE_MIN_MAX: default: gtk_label_set_text(GTK_LABEL(threshold->min_max_label[AMITK_LIMIT_MAX]), _("Max Threshold")); gtk_label_set_text(GTK_LABEL(threshold->min_max_label[AMITK_LIMIT_MIN]), _("Min Threshold")); break; } for (i_style=0; i_stylestyle_button[i_style]), G_CALLBACK(threshold_style_cb), threshold); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(threshold->style_button[AMITK_DATA_SET_THRESHOLD_STYLE(threshold->data_set)]), TRUE); for (i_style=0; i_stylestyle_button[i_style]), G_CALLBACK(threshold_style_cb), threshold); return; } /* set which toggle button is depressed */ static void threshold_update_type(AmitkThreshold * threshold) { AmitkThresholding i_thresholding; if (threshold->minimal) return; /* no changing of threshold type in minimal setup */ g_return_if_fail(AMITK_IS_DATA_SET(threshold->data_set)); for (i_thresholding=0; i_thresholding < AMITK_THRESHOLDING_NUM; i_thresholding++) g_signal_handlers_block_by_func(G_OBJECT(threshold->type_button[i_thresholding]), G_CALLBACK(thresholding_cb), threshold); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(threshold->type_button[AMITK_DATA_SET_THRESHOLDING(threshold->data_set)]), TRUE); for (i_thresholding=0; i_thresholding < AMITK_THRESHOLDING_NUM; i_thresholding++) g_signal_handlers_unblock_by_func(G_OBJECT(threshold->type_button[i_thresholding]), G_CALLBACK(thresholding_cb), threshold); gtk_widget_set_sensitive(threshold->type_button[AMITK_THRESHOLDING_PER_FRAME], (AMITK_DATA_SET_DYNAMIC(threshold->data_set))); gtk_widget_set_sensitive(threshold->type_button[AMITK_THRESHOLDING_INTERPOLATE_FRAMES], (AMITK_DATA_SET_DYNAMIC(threshold->data_set))); return; } /* set what the "absolute" label says */ static void threshold_update_absolute_label(AmitkThreshold * threshold) { guint i_ref; if (threshold->minimal) return; /* not shown in minimal setup */ g_return_if_fail(AMITK_IS_DATA_SET(threshold->data_set)); for (i_ref=0; i_ref<2; i_ref++) { switch (AMITK_DATA_SET_CONVERSION(threshold->data_set)) { case AMITK_CONVERSION_SUV: case AMITK_CONVERSION_PERCENT_ID_PER_CC: gtk_label_set_text(GTK_LABEL(threshold->absolute_label[i_ref]), amitk_conversion_names[AMITK_DATA_SET_CONVERSION(threshold->data_set)]); break; case AMITK_CONVERSION_STRAIGHT: default: gtk_label_set_text(GTK_LABEL(threshold->absolute_label[i_ref]), _("Absolute")); break; } } return; } /* function to update whether windowing buttons are shown */ static void threshold_update_windowing(AmitkThreshold * threshold) { if (threshold->minimal) return; /* not shown in minimal setup */ g_return_if_fail(AMITK_IS_DATA_SET(threshold->data_set)); if (AMITK_DATA_SET_MODALITY(threshold->data_set) == AMITK_MODALITY_CT) { gtk_widget_show(threshold->window_label); gtk_widget_show(threshold->window_vbox); } else { gtk_widget_hide(threshold->window_label); gtk_widget_hide(threshold->window_vbox); } return; } /* function to update what are in the ref frame menus */ static void threshold_update_ref_frames(AmitkThreshold * threshold) { GtkTreeModel * model; guint i_ref, i_frame; gchar * temp_string; if (threshold->minimal) return; /* not shown in minimal setup */ g_return_if_fail(AMITK_IS_DATA_SET(threshold->data_set)); for (i_ref=0; i_ref<2; i_ref++) { g_signal_handlers_block_by_func(G_OBJECT(threshold->threshold_ref_frame_menu[i_ref]), G_CALLBACK(threshold_ref_frame_cb), threshold); /* remove the old menu */ model = gtk_combo_box_get_model (GTK_COMBO_BOX(threshold->threshold_ref_frame_menu[i_ref])); gtk_list_store_clear(GTK_LIST_STORE(model)); /* make new menu */ for (i_frame=0; i_framedata_set); i_frame++) { temp_string = g_strdup_printf("%d",i_frame); gtk_combo_box_append_text(GTK_COMBO_BOX(threshold->threshold_ref_frame_menu[i_ref]), temp_string); g_free(temp_string); } gtk_combo_box_set_active(GTK_COMBO_BOX(threshold->threshold_ref_frame_menu[i_ref]), AMITK_DATA_SET_THRESHOLD_REF_FRAME(threshold->data_set,i_ref)); g_signal_handlers_unblock_by_func(G_OBJECT(threshold->threshold_ref_frame_menu[i_ref]), G_CALLBACK(threshold_ref_frame_cb), threshold); } return; } static void threshold_update_color_table(AmitkThreshold * threshold, AmitkViewMode view_mode) { g_return_if_fail(AMITK_IS_DATA_SET(threshold->data_set)); g_signal_handlers_block_by_func(G_OBJECT(threshold->color_table_menu[view_mode]), G_CALLBACK(color_table_cb), threshold); gtk_combo_box_set_active(GTK_COMBO_BOX(threshold->color_table_menu[view_mode]), AMITK_DATA_SET_COLOR_TABLE(threshold->data_set, view_mode)); g_signal_handlers_unblock_by_func(G_OBJECT(threshold->color_table_menu[view_mode]), G_CALLBACK(color_table_cb), threshold); if (view_mode == AMITK_VIEW_MODE_SINGLE) { } else { g_signal_handlers_block_by_func(G_OBJECT(threshold->color_table_independent[view_mode]), G_CALLBACK(color_table_independent_cb), threshold); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(threshold->color_table_independent[view_mode]), AMITK_DATA_SET_COLOR_TABLE_INDEPENDENT(threshold->data_set, view_mode)); g_signal_handlers_unblock_by_func(G_OBJECT(threshold->color_table_independent[view_mode]), G_CALLBACK(color_table_independent_cb), threshold); gtk_widget_set_sensitive(threshold->color_table_menu[view_mode], AMITK_DATA_SET_COLOR_TABLE_INDEPENDENT(threshold->data_set, view_mode)); } return; } static void threshold_update_color_tables(AmitkThreshold * threshold) { AmitkViewMode i_view_mode; for (i_view_mode=0; i_view_mode < AMITK_VIEW_MODE_NUM; i_view_mode++) { if (i_view_mode <= threshold->view_mode) { gtk_widget_show(threshold->color_table_label[i_view_mode]); gtk_widget_show(threshold->color_table_hbox[i_view_mode]); } else { /* never reached for AMITK_VIEW_MODE_SINGLE */ gtk_widget_hide(threshold->color_table_label[i_view_mode]); gtk_widget_hide(threshold->color_table_hbox[i_view_mode]); } threshold_update_color_table(threshold, i_view_mode); } return; } static void ds_scale_factor_changed_cb(AmitkDataSet * ds, AmitkThreshold * threshold) { gint i; g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(AMITK_IS_THRESHOLD(threshold)); for (i=0; i<2; i++) { threshold->threshold_max[i] = AMITK_DATA_SET_THRESHOLD_MAX(ds, i); threshold->threshold_min[i] = AMITK_DATA_SET_THRESHOLD_MIN(ds, i); } threshold_update_spin_buttons(threshold); return; } static void ds_color_table_changed_cb(AmitkDataSet * ds, AmitkViewMode view_mode, AmitkThreshold * threshold) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(AMITK_IS_THRESHOLD(threshold)); threshold_update_color_table(threshold, view_mode); threshold_update_color_scales(threshold); return; } static void ds_thresholding_changed_cb(AmitkDataSet * ds, AmitkThreshold * threshold) { AmitkThresholdArrow i_arrow; g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(AMITK_IS_THRESHOLD(threshold)); /* need to make sure the second reference items are made before they're shown in update_layout */ threshold_update_color_scales(threshold); for (i_arrow=0;i_arrow< AMITK_THRESHOLD_ARROW_NUM_ARROWS;i_arrow++) threshold_update_arrow(threshold, i_arrow); threshold_update_type(threshold); #if 0 threshold_update_ref_frames(threshold); #endif threshold_update_layout(threshold); return; } static void ds_threshold_style_changed_cb(AmitkDataSet * ds, AmitkThreshold * threshold) { AmitkThresholdScale i_scale; threshold_update_style(threshold); threshold_update_spin_buttons(threshold); for (i_scale=0; i_scale < AMITK_THRESHOLD_SCALE_NUM_SCALES; i_scale++) threshold_update_connector_lines(threshold, i_scale); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_CENTER); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_CENTER); return; } static void ds_thresholds_changed_cb(AmitkDataSet * ds, AmitkThreshold * threshold) { gint i; g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(AMITK_IS_THRESHOLD(threshold)); for (i=0; i<2; i++) { threshold->threshold_max[i] = AMITK_DATA_SET_THRESHOLD_MAX(ds, i); threshold->threshold_min[i] = AMITK_DATA_SET_THRESHOLD_MIN(ds, i); } threshold_update_connector_lines(threshold, AMITK_THRESHOLD_SCALE_FULL); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_MIN); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_CENTER); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_MAX); threshold_update_ref_frames(threshold); threshold_update_spin_buttons(threshold); return; } static void ds_conversion_changed_cb(AmitkDataSet * ds, AmitkThreshold * threshold) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(AMITK_IS_THRESHOLD(threshold)); threshold_update_spin_buttons(threshold); threshold_update_absolute_label(threshold); return; } static void ds_modality_changed_cb(AmitkDataSet * ds, AmitkThreshold * threshold) { g_return_if_fail(AMITK_IS_DATA_SET(ds)); g_return_if_fail(AMITK_IS_THRESHOLD(threshold)); threshold_update_windowing(threshold); return; } static void study_view_mode_changed_cb(AmitkStudy * study, AmitkThreshold * threshold) { g_return_if_fail(AMITK_IS_STUDY(study)); g_return_if_fail(AMITK_IS_THRESHOLD(threshold)); threshold->view_mode = AMITK_STUDY_VIEW_MODE(study); threshold_update_color_tables(threshold); return; } /* function called when the max or min triangle is moved * mostly taken from Pennington's fine book */ static gint threshold_arrow_cb(GtkWidget* widget, GdkEvent * event, gpointer data) { AmitkThreshold * threshold = data; gdouble item_x, item_y; gdouble delta; amide_data_t temp, center, width, max, min; AmitkThresholdArrow which_threshold_arrow; guint which_ref; which_ref = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "which_ref")); /* get the location of the event, and convert it to our coordinate system */ item_x = event->button.x; item_y = event->button.y; gnome_canvas_item_w2i(GNOME_CANVAS_ITEM(widget)->parent, &item_x, &item_y); /* figure out which of the arrows triggered the callback */ which_threshold_arrow = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "type")); /* switch on the event which called this */ switch (event->type) { case GDK_BUTTON_PRESS: threshold->initial_y[which_ref] = item_y; threshold->initial_min[which_ref] = threshold->threshold_min[which_ref]; threshold->initial_max[which_ref] = threshold->threshold_max[which_ref]; gnome_canvas_item_grab(GNOME_CANVAS_ITEM(threshold->arrow[which_ref][which_threshold_arrow]), GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, threshold_cursor, event->button.time); break; case GDK_MOTION_NOTIFY: delta = threshold->initial_y[which_ref] - item_y; if (event->motion.state & GDK_BUTTON1_MASK) { delta /= THRESHOLD_COLOR_SCALE_HEIGHT; /* calculate how much the arrow has been moved in terms of data values */ switch(which_threshold_arrow) { case AMITK_THRESHOLD_ARROW_FULL_MAX: case AMITK_THRESHOLD_ARROW_FULL_CENTER: case AMITK_THRESHOLD_ARROW_FULL_MIN: delta *= (amitk_data_set_get_global_max(threshold->data_set) - amitk_data_set_get_global_min(threshold->data_set)); break; case AMITK_THRESHOLD_ARROW_SCALED_MAX: case AMITK_THRESHOLD_ARROW_SCALED_CENTER: case AMITK_THRESHOLD_ARROW_SCALED_MIN: delta *= (threshold->initial_max[which_ref] - threshold->initial_min[which_ref]); break; default: delta=0; /* shouldn't get here */ break; } switch (which_threshold_arrow) { case AMITK_THRESHOLD_ARROW_FULL_MAX: case AMITK_THRESHOLD_ARROW_SCALED_MAX: temp = threshold->initial_max[which_ref] + delta; if (temp < amitk_data_set_get_global_min(threshold->data_set)) temp = amitk_data_set_get_global_min(threshold->data_set); if (AMITK_DATA_SET_THRESHOLD_STYLE(threshold->data_set) == AMITK_THRESHOLD_STYLE_CENTER_WIDTH) { center = (threshold->initial_max[which_ref]+threshold->initial_min[which_ref])/2.0; if ((temp-EPSILON*fabs(temp)) < center) temp = center+EPSILON*fabs(center); width = 2.0*(temp-center); threshold->threshold_max[which_ref] = center+width/2.0; threshold->threshold_min[which_ref] = center-width/2.0; threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_MIN); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_MAX); if (which_threshold_arrow == AMITK_THRESHOLD_ARROW_SCALED_MAX) { threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_MAX); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_MIN); } } else { if ((temp-EPSILON*fabs(temp)) < threshold->threshold_min[which_ref]) temp = threshold->threshold_min[which_ref]+EPSILON*fabs(threshold->threshold_min[which_ref]); threshold->threshold_max[which_ref] = temp; threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_MAX); if (which_threshold_arrow == AMITK_THRESHOLD_ARROW_SCALED_MAX) threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_MAX); } if (which_threshold_arrow == AMITK_THRESHOLD_ARROW_FULL_MAX) threshold_update_connector_lines(threshold, AMITK_THRESHOLD_SCALE_FULL); else { threshold_update_color_scale(threshold, AMITK_THRESHOLD_SCALE_SCALED); threshold_update_connector_lines(threshold, AMITK_THRESHOLD_SCALE_SCALED); } break; case AMITK_THRESHOLD_ARROW_FULL_CENTER: case AMITK_THRESHOLD_ARROW_SCALED_CENTER: g_return_val_if_fail(AMITK_DATA_SET_THRESHOLD_STYLE(threshold->data_set) == AMITK_THRESHOLD_STYLE_CENTER_WIDTH, FALSE); center = (threshold->initial_max[which_ref]+threshold->initial_min[which_ref])/2.0; width = (threshold->initial_max[which_ref]-threshold->initial_min[which_ref]); temp = center+delta; if (temp < amitk_data_set_get_global_min(threshold->data_set)) temp = amitk_data_set_get_global_min(threshold->data_set); if (temp > amitk_data_set_get_global_max(threshold->data_set)) temp = amitk_data_set_get_global_max(threshold->data_set); threshold->threshold_max[which_ref] = temp+width/2.0; threshold->threshold_min[which_ref] = temp-width/2.0; threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_MIN); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_CENTER); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_MAX); if (which_threshold_arrow == AMITK_THRESHOLD_ARROW_SCALED_CENTER) { threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_MIN); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_CENTER); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_MAX); } if (which_threshold_arrow == AMITK_THRESHOLD_ARROW_FULL_CENTER) threshold_update_connector_lines(threshold, AMITK_THRESHOLD_SCALE_FULL); else { threshold_update_color_scale(threshold, AMITK_THRESHOLD_SCALE_SCALED); threshold_update_connector_lines(threshold, AMITK_THRESHOLD_SCALE_SCALED); } break; case AMITK_THRESHOLD_ARROW_FULL_MIN: case AMITK_THRESHOLD_ARROW_SCALED_MIN: temp = threshold->initial_min[which_ref] + delta; if (temp > amitk_data_set_get_global_max(threshold->data_set)) temp = amitk_data_set_get_global_max(threshold->data_set); // if (temp < amitk_data_set_get_global_min(threshold->data_set)) // temp = amitk_data_set_get_global_min(threshold->data_set); if (AMITK_DATA_SET_THRESHOLD_STYLE(threshold->data_set) == AMITK_THRESHOLD_STYLE_CENTER_WIDTH) { center = (threshold->initial_max[which_ref]+threshold->initial_min[which_ref])/2.0; if ((temp+EPSILON*fabs(temp)) > center) temp = center-EPSILON*fabs(center); width = 2.0*(center-temp); threshold->threshold_max[which_ref] = center+width/2.0; threshold->threshold_min[which_ref] = center-width/2.0; threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_MIN); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_MAX); if (which_threshold_arrow == AMITK_THRESHOLD_ARROW_SCALED_MIN) { threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_MAX); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_MIN); } } else { if ((temp+EPSILON*fabs(temp)) > threshold->threshold_max[which_ref]) temp = threshold->threshold_max[which_ref]-EPSILON*fabs(threshold->threshold_max[which_ref]); threshold->threshold_min[which_ref] = temp; threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_FULL_MIN); if (which_threshold_arrow == AMITK_THRESHOLD_ARROW_SCALED_MIN) threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_MIN); } if (which_threshold_arrow == AMITK_THRESHOLD_ARROW_FULL_MIN) threshold_update_connector_lines(threshold, AMITK_THRESHOLD_SCALE_FULL); else { threshold_update_color_scale(threshold, AMITK_THRESHOLD_SCALE_SCALED); threshold_update_connector_lines(threshold, AMITK_THRESHOLD_SCALE_SCALED); } break; default: break; } threshold_update_color_scale(threshold, AMITK_THRESHOLD_SCALE_FULL); threshold_update_spin_buttons(threshold); /* show the current val in the spin button's */ } break; case GDK_BUTTON_RELEASE: if (AMITK_DATA_SET_THRESHOLD_STYLE(threshold->data_set) == AMITK_THRESHOLD_STYLE_MIN_MAX) { switch (which_threshold_arrow) { case AMITK_THRESHOLD_ARROW_SCALED_MAX: case AMITK_THRESHOLD_ARROW_FULL_MAX: amitk_data_set_set_threshold_max(threshold->data_set, which_ref, threshold->threshold_max[which_ref]); break; case AMITK_THRESHOLD_ARROW_SCALED_MIN: case AMITK_THRESHOLD_ARROW_FULL_MIN: amitk_data_set_set_threshold_min(threshold->data_set, which_ref, threshold->threshold_min[which_ref]); break; default: g_return_val_if_reached(FALSE); break; } } else { /* AMITK_THRESHOLD_STYLE_CENTER_WIDTH */ /* need to do this, as the first set_threshold call will cause threshold->threshold_* to change due to a callback */ max = threshold->threshold_max[which_ref]; min = threshold->threshold_min[which_ref]; amitk_data_set_set_threshold_max(threshold->data_set, which_ref,max); amitk_data_set_set_threshold_min(threshold->data_set, which_ref,min); } gnome_canvas_item_ungrab(GNOME_CANVAS_ITEM(widget), event->button.time); /* reset the scaled color scale */ threshold->initial_max[which_ref] = threshold->threshold_max[which_ref]; threshold->initial_min[which_ref] = threshold->threshold_min[which_ref]; threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_MAX); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_CENTER); threshold_update_arrow(threshold, AMITK_THRESHOLD_ARROW_SCALED_MIN); threshold_update_color_scale(threshold, AMITK_THRESHOLD_SCALE_SCALED); threshold_update_connector_lines(threshold, AMITK_THRESHOLD_SCALE_SCALED); break; default: break; } return FALSE; } /* function to change the color table */ static void color_table_cb(GtkWidget * widget, gpointer data) { AmitkColorTable i_color_table; AmitkThreshold * threshold = data; AmitkViewMode view_mode; i_color_table = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); view_mode = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "view_mode")); /* check if we actually changed values */ if (AMITK_DATA_SET_COLOR_TABLE(threshold->data_set, view_mode) != i_color_table) amitk_data_set_set_color_table(AMITK_DATA_SET(threshold->data_set), view_mode, i_color_table); return; } static void color_table_independent_cb(GtkWidget * widget, gpointer data) { AmitkThreshold * threshold = data; AmitkViewMode view_mode; gboolean state; view_mode = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "view_mode")); /* get the state of the button */ state = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); if (AMITK_DATA_SET_COLOR_TABLE_INDEPENDENT(threshold->data_set, view_mode) != state) amitk_data_set_set_color_table_independent(AMITK_DATA_SET(threshold->data_set), view_mode, state); return; } /* function to update the reference frames */ static void threshold_ref_frame_cb(GtkWidget * widget, gpointer data) { guint which_ref,frame; AmitkThreshold * threshold = data; /* figure out which menu item called me */ which_ref = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget),"which_ref")); frame = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); /* check if we actually changed values */ if (frame != AMITK_DATA_SET_THRESHOLD_REF_FRAME(threshold->data_set, which_ref)) { if ((which_ref==0) && (frame > AMITK_DATA_SET_THRESHOLD_REF_FRAME(threshold->data_set,1))) frame =AMITK_DATA_SET_THRESHOLD_REF_FRAME(threshold->data_set,1); else if ((which_ref==1) && (frame < AMITK_DATA_SET_THRESHOLD_REF_FRAME(threshold->data_set,0))) frame = AMITK_DATA_SET_THRESHOLD_REF_FRAME(threshold->data_set,0); /* and inact the changes */ amitk_data_set_set_threshold_ref_frame(threshold->data_set, which_ref, frame); } return; } static void threshold_spin_button_cb(GtkWidget* widget, gpointer data) { AmitkThreshold * threshold = data; amide_data_t global_diff, temp; amide_data_t center, width; amide_data_t min_val=0.0; amide_data_t max_val=0.0; gboolean max_val_changed=FALSE; gboolean min_val_changed=FALSE; AmitkThresholdEntry which_threshold_entry; guint which_ref; /* figure out which of the arrows triggered the callback */ which_threshold_entry = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "type")); which_ref = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "which_ref")); temp = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)); global_diff = amitk_data_set_get_global_max(threshold->data_set)- amitk_data_set_get_global_min(threshold->data_set); if (global_diff < EPSILON) global_diff = EPSILON; /* non sensicle */ switch (AMITK_DATA_SET_THRESHOLD_STYLE(threshold->data_set)) { case AMITK_THRESHOLD_STYLE_CENTER_WIDTH: switch (which_threshold_entry) { /* max are the "center" entries */ case AMITK_THRESHOLD_ENTRY_MAX_PERCENT: temp = (global_diff*temp/100.0)+amitk_data_set_get_global_min(threshold->data_set); case AMITK_THRESHOLD_ENTRY_MAX_ABSOLUTE: center = temp; width = threshold->threshold_max[which_ref]-threshold->threshold_min[which_ref]; break; /* min are the "width" entries */ case AMITK_THRESHOLD_ENTRY_MIN_PERCENT: temp = (global_diff*temp/100.0); case AMITK_THRESHOLD_ENTRY_MIN_ABSOLUTE: default: center = (threshold->threshold_max[which_ref]+threshold->threshold_min[which_ref])/2.0; width = temp; break; } max_val = center+width/2.0; min_val = center-width/2.0; max_val_changed=TRUE; min_val_changed=TRUE; break; case AMITK_THRESHOLD_STYLE_MIN_MAX: default: switch (which_threshold_entry) { case AMITK_THRESHOLD_ENTRY_MAX_PERCENT: temp = (global_diff*temp/100.0)+amitk_data_set_get_global_min(threshold->data_set); case AMITK_THRESHOLD_ENTRY_MAX_ABSOLUTE: max_val = temp; max_val_changed = TRUE; break; case AMITK_THRESHOLD_ENTRY_MIN_PERCENT: temp = (global_diff * temp/100.0)+amitk_data_set_get_global_min(threshold->data_set); case AMITK_THRESHOLD_ENTRY_MIN_ABSOLUTE: default: min_val = temp; min_val_changed = TRUE; break; } } if (min_val_changed) { /* make sure it's a valid floating point */ if ((min_val < amitk_data_set_get_global_max(threshold->data_set)) && (min_val < threshold->threshold_max[which_ref])) { } amitk_data_set_set_threshold_min(threshold->data_set, which_ref, min_val); threshold->threshold_min[which_ref] = min_val; } if (max_val_changed) { if ((max_val > threshold->threshold_min[which_ref]) && (max_val > amitk_data_set_get_global_min(threshold->data_set))) { } amitk_data_set_set_threshold_max(threshold->data_set, which_ref, max_val); threshold->threshold_max[which_ref] = max_val; } /* need to manually twiddle the spin button's, rejected values of amitk_data_set_set_threshold_whatever won't elicit a signal */ threshold_update_spin_buttons(threshold); return; } static void thresholding_cb(GtkWidget * widget, gpointer data) { AmitkThreshold * threshold = data; AmitkThresholding thresholding; thresholding = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget),"thresholding")); /* check if we actually changed values */ if (AMITK_DATA_SET_THRESHOLDING(threshold->data_set) != thresholding) amitk_data_set_set_thresholding(threshold->data_set, thresholding); return; } static void threshold_style_cb(GtkWidget * widget, gpointer data) { AmitkThreshold * threshold = data; amitk_data_set_set_threshold_style(threshold->data_set, GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "threshold_style"))); return; } static void windowing_cb(GtkWidget * widget, gpointer data) { AmitkThreshold * threshold = data; AmitkWindow window; gint i; window = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "which_window")); for (i=0; i<2; i++) { amitk_data_set_set_threshold_min(threshold->data_set, i, AMITK_DATA_SET_THRESHOLD_WINDOW(threshold->data_set, window, AMITK_LIMIT_MIN)); amitk_data_set_set_threshold_max(threshold->data_set, i, AMITK_DATA_SET_THRESHOLD_WINDOW(threshold->data_set, window, AMITK_LIMIT_MAX)); } } /* function to load a new data set into the widget */ void amitk_threshold_new_data_set(AmitkThreshold * threshold, AmitkDataSet * new_data_set) { AmitkThresholdArrow i_arrow; g_return_if_fail(AMITK_IS_THRESHOLD(threshold)); g_return_if_fail(AMITK_IS_DATA_SET(new_data_set)); threshold_remove_data_set(threshold); threshold_add_data_set(threshold, new_data_set); threshold_update_histogram(threshold); threshold_update_layout(threshold); threshold_update_color_tables(threshold); threshold_update_color_scales(threshold); threshold_update_spin_buttons(threshold); threshold_update_type(threshold); threshold_update_style(threshold); threshold_update_absolute_label(threshold); threshold_update_windowing(threshold); threshold_update_ref_frames(threshold); /* FULL Arrows obviously need to get redrawn. SCALED arrows are also redrawn, as they may not have yet been drawn */ for (i_arrow=0;i_arrow< AMITK_THRESHOLD_ARROW_NUM_ARROWS;i_arrow++) threshold_update_arrow(threshold, i_arrow); return; } /* data set can be NULL */ GtkWidget* amitk_threshold_new (AmitkDataSet * ds, AmitkThresholdLayout layout, GtkWindow * parent, gboolean minimal) { AmitkThreshold * threshold; g_return_val_if_fail(AMITK_IS_DATA_SET(ds), NULL); g_return_val_if_fail(parent != NULL, NULL); threshold = g_object_new (amitk_threshold_get_type (), NULL); threshold->minimal = minimal; threshold->progress_dialog = amitk_progress_dialog_new(parent); /* gets killed with parent */ threshold_construct(threshold, layout); if (ds != NULL) amitk_threshold_new_data_set(threshold, ds); return GTK_WIDGET (threshold); } GType amitk_threshold_dialog_get_type (void) { static GType threshold_dialog_type = 0; if (!threshold_dialog_type) { GTypeInfo threshold_dialog_info = { sizeof (AmitkThresholdDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) threshold_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (AmitkThresholdDialog), 0, /* # preallocs */ (GInstanceInitFunc) threshold_dialog_init, NULL /* value table */ }; threshold_dialog_type = g_type_register_static(GTK_TYPE_DIALOG, "AmitkThresholdDialog", &threshold_dialog_info, 0); } return threshold_dialog_type; } static void threshold_dialog_class_init (AmitkThresholdDialogClass *klass) { /* GtkObjectClass *gtkobject_class; */ /* gtkobject_class = (GtkObjectClass*) klass; */ threshold_dialog_parent_class = g_type_class_peek_parent(klass); } static void init_common(GtkWindow * dialog) { GdkPixbuf * pixbuf; g_return_if_fail(GTK_IS_WINDOW(dialog)); pixbuf = gtk_widget_render_icon(GTK_WIDGET(dialog), "amide_icon_thresholding", -1, 0); gtk_window_set_icon(dialog, pixbuf); g_object_unref(pixbuf); return; } static void threshold_dialog_init (AmitkThresholdDialog * dialog) { init_common(GTK_WINDOW(dialog)); gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); dialog->vbox = gtk_vbox_new (FALSE, 10); gtk_container_set_border_width (GTK_CONTAINER (dialog), 10); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), dialog->vbox); gtk_widget_show (dialog->vbox); /* make the data set title thingie */ dialog->data_set_label = gtk_label_new(NULL); gtk_box_pack_start(GTK_BOX(dialog->vbox), dialog->data_set_label, FALSE, FALSE,0); gtk_widget_show(dialog->data_set_label); return; } /* this gets called after we have a data_set */ static void threshold_dialog_construct(AmitkThresholdDialog * dialog, GtkWindow * parent, AmitkDataSet * data_set) { gchar * temp_string; dialog->threshold = amitk_threshold_new(data_set, AMITK_THRESHOLD_LINEAR_LAYOUT, parent, FALSE); gtk_box_pack_end(GTK_BOX(dialog->vbox), dialog->threshold, TRUE, TRUE, 0); gtk_widget_show(dialog->threshold); /* reset the title */ temp_string = g_strdup_printf(_("Data Set: %s\n"),AMITK_OBJECT_NAME(data_set)); gtk_label_set_text (GTK_LABEL(dialog->data_set_label), temp_string); g_free(temp_string); return; } GtkWidget* amitk_threshold_dialog_new (AmitkDataSet * data_set, GtkWindow * parent) { AmitkThresholdDialog *dialog; g_return_val_if_fail(AMITK_IS_DATA_SET(data_set), NULL); if (AMITK_OBJECT(data_set)->dialog != NULL) return NULL; dialog = g_object_new(AMITK_TYPE_THRESHOLD_DIALOG, NULL); threshold_dialog_construct(dialog, parent, data_set); gtk_window_set_title (GTK_WINDOW (dialog), _("Threshold Dialog")); gtk_window_set_transient_for(GTK_WINDOW (dialog), parent); gtk_window_set_destroy_with_parent(GTK_WINDOW (dialog), TRUE); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); /* allows auto shrink */ return GTK_WIDGET (dialog); } /* function to load a new data set into the widget */ void amitk_threshold_dialog_new_data_set(AmitkThresholdDialog * dialog, AmitkDataSet * new_data_set) { gchar * temp_string; g_return_if_fail(AMITK_IS_THRESHOLD_DIALOG(dialog)); g_return_if_fail(AMITK_IS_DATA_SET(new_data_set)); amitk_threshold_new_data_set(AMITK_THRESHOLD(dialog->threshold), new_data_set); /* reset the title */ temp_string = g_strdup_printf(_("Data Set: %s\n"),AMITK_OBJECT_NAME(new_data_set)); gtk_label_set_text (GTK_LABEL(dialog->data_set_label), temp_string); g_free(temp_string); return; } /* function to return a pointer to the data set that this dialog currently referes to */ AmitkDataSet * amitk_threshold_dialog_data_set(AmitkThresholdDialog * dialog) { return AMITK_THRESHOLD(dialog->threshold)->data_set; } /* -------------- thresholds_dialog ---------------- */ GType amitk_thresholds_dialog_get_type (void) { static GType thresholds_dialog_type = 0; if (!thresholds_dialog_type) { GTypeInfo thresholds_dialog_info = { sizeof (AmitkThresholdsDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) thresholds_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (AmitkThresholdsDialog), 0, /* # preallocs */ (GInstanceInitFunc) thresholds_dialog_init, NULL /* value table */ }; thresholds_dialog_type = g_type_register_static(GTK_TYPE_DIALOG, "AmitkThresholdsDialog", &thresholds_dialog_info, 0); } return thresholds_dialog_type; } static void thresholds_dialog_class_init (AmitkThresholdsDialogClass *klass) { /* GtkObjectClass *gtkobject_class; */ /* gtkobject_class = (GtkObjectClass*) klass; */ thresholds_dialog_parent_class = g_type_class_peek_parent(klass); } static void thresholds_dialog_init (AmitkThresholdsDialog * dialog) { GtkWidget * main_vbox; init_common(GTK_WINDOW(dialog)); dialog->thresholds = NULL; gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); main_vbox = gtk_vbox_new (FALSE, 10); gtk_container_set_border_width (GTK_CONTAINER (dialog), 10); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); dialog->notebook = gtk_notebook_new(); gtk_container_add (GTK_CONTAINER (main_vbox), dialog->notebook); gtk_widget_show (dialog->notebook); } /* this gets called after we have a list of data set */ static void thresholds_dialog_construct(AmitkThresholdsDialog * dialog, GtkWindow * parent, GList * data_sets) { GtkWidget * threshold; GtkWidget * label; while (data_sets != NULL) { g_return_if_fail(AMITK_IS_DATA_SET(data_sets->data)); threshold = amitk_threshold_new(data_sets->data, AMITK_THRESHOLD_LINEAR_LAYOUT, parent, FALSE); dialog->thresholds = g_list_append(dialog->thresholds, threshold); label = gtk_label_new(AMITK_OBJECT_NAME(data_sets->data)); gtk_notebook_append_page(GTK_NOTEBOOK(dialog->notebook), threshold, label); gtk_widget_show(threshold); gtk_widget_show(label); data_sets = data_sets->next; } return; } GtkWidget* amitk_thresholds_dialog_new (GList * objects, GtkWindow * parent) { AmitkThresholdsDialog *dialog; GList * data_sets; g_return_val_if_fail(objects != NULL, NULL); /* check that the list contains at leat 1 data set */ data_sets = amitk_objects_get_of_type(objects, AMITK_OBJECT_TYPE_DATA_SET, FALSE); g_return_val_if_fail(data_sets != NULL, NULL); dialog = g_object_new(AMITK_TYPE_THRESHOLDS_DIALOG, NULL); thresholds_dialog_construct(dialog, parent, data_sets); gtk_window_set_title (GTK_WINDOW (dialog), _("Threshold Dialog")); gtk_window_set_transient_for(GTK_WINDOW (dialog), parent); gtk_window_set_destroy_with_parent(GTK_WINDOW (dialog), TRUE); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); /* allows auto shrink */ amitk_objects_unref(data_sets); return GTK_WIDGET (dialog); } amide-1.0.5/configure0000775000175000017500000245455512271346302014401 0ustar loeningloening#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for amide 1.0.5. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: amide-users@lists.sourceforge.net about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='amide' PACKAGE_TARNAME='amide' PACKAGE_VERSION='1.0.5' PACKAGE_STRING='amide 1.0.5' PACKAGE_BUGREPORT='amide-users@lists.sourceforge.net' PACKAGE_URL='' ac_unique_file="src/amide.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS HAVE_DOCBOOK_FALSE HAVE_DOCBOOK_TRUE DB2HTML HAVE_GNOME_DOC_UTILS_FALSE HAVE_GNOME_DOC_UTILS_TRUE DISTCHECK_CONFIGURE_FLAGS ENABLE_SK_FALSE ENABLE_SK_TRUE DOC_USER_FORMATS OMF_DIR HELP_DIR DISABLE_DOC_FALSE DISABLE_DOC_TRUE GTK_DOC_USE_REBASE_FALSE GTK_DOC_USE_REBASE_TRUE GTK_DOC_USE_LIBTOOL_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_BUILD_PDF_FALSE GTK_DOC_BUILD_PDF_TRUE GTK_DOC_BUILD_HTML_FALSE GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE GTKDOC_DEPS_LIBS GTKDOC_DEPS_CFLAGS HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE GTKDOC_CHECK libgnomecanvas_greater_than_230_LIBS libgnomecanvas_greater_than_230_CFLAGS GDK_PIXBUF_CSOURCE GLIB_GENMARSHAL AMIDE_GTK_EXTRA_GVFS_LIBS AMIDE_GTK_EXTRA_GVFS_CFLAGS AMIDE_GTK_EXTRA_GCONF_LIBS AMIDE_GTK_EXTRA_GCONF_CFLAGS AMIDE_GTK_LIBS AMIDE_GTK_CFLAGS AMIDE_LIBDCMDATA_CFLAGS AMIDE_LIBDCMDATA_LIBS LIBFAME_LIBS LIBFAME_CFLAGS LIBFAME_CONFIG AMIDE_LIBVOLPACK_LIBS AMIDE_LIBECAT_LIBS AMIDE_OS_WIN32_FALSE AMIDE_OS_WIN32_TRUE AMIDE_CHECK_OBSOLETE_CFLAGS AMIDE_DEBUG_CFLAGS FFMPEG_LIBS FFMPEG_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG XMEDCON_LIBS XMEDCON_CFLAGS XMEDCON_CONFIG GSL_LIBS GSL_CFLAGS GSL_CONFIG OPTIMIZATION_CFLAGS M4 ALL_LINGUAS INTLTOOL_PERL MSGMERGE INTLTOOL_POLICY_RULE INTLTOOL_SERVICE_RULE INTLTOOL_THEME_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_CAVES_RULE INTLTOOL_XML_NOMERGE_RULE INTLTOOL_XML_RULE INTLTOOL_KBD_RULE INTLTOOL_XAM_RULE INTLTOOL_UI_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_SHEET_RULE INTLTOOL_SERVER_RULE INTLTOOL_PONG_RULE INTLTOOL_OAF_RULE INTLTOOL_PROP_RULE INTLTOOL_KEYS_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_DESKTOP_RULE intltool__v_merge_options_0 intltool__v_merge_options_ INTLTOOL_V_MERGE_OPTIONS INTLTOOL__v_MERGE_0 INTLTOOL__v_MERGE_ INTLTOOL_V_MERGE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE GETTEXT_PACKAGE MKINSTALLDIRS POSUB POFILES PO_IN_DATADIR_FALSE PO_IN_DATADIR_TRUE INTLLIBS INSTOBJEXT GMOFILES DATADIRNAME CATOBJEXT CATALOGS XGETTEXT GMSGFMT MSGFMT_OPTS MSGFMT USE_NLS CXXCPP CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_nls with_gsl_prefix with_gsl_exec_prefix enable_gsltest with_xmedcon_prefix with_xmedcon_exec_prefix enable_xmedcontest enable_amide_debug enable_amide_check_obsolete enable_native_gtk_osx enable_libgsl enable_libecat enable_libmdc enable_libvolpack enable_ffmpeg with_libfame_prefix with_libfame_exec_prefix enable_libfametest enable_libfame enable_libdcmdata with_html_dir enable_gtk_doc enable_gtk_doc_html enable_gtk_doc_pdf enable_doc with_help_dir with_omf_dir with_help_formats enable_scrollkeeper ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR FFMPEG_CFLAGS FFMPEG_LIBS AMIDE_GTK_CFLAGS AMIDE_GTK_LIBS AMIDE_GTK_EXTRA_GCONF_CFLAGS AMIDE_GTK_EXTRA_GCONF_LIBS AMIDE_GTK_EXTRA_GVFS_CFLAGS AMIDE_GTK_EXTRA_GVFS_LIBS libgnomecanvas_greater_than_230_CFLAGS libgnomecanvas_greater_than_230_LIBS GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures amide 1.0.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/amide] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of amide 1.0.5:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --disable-maintainer-mode disable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-nls do not use Native Language Support --disable-gsltest Do not try to compile and run a test GSL program --disable-xmedcontest Do not try to compile and run a test XMEDCON program --enable-amide-debug Compile with debugging messages and gdb debugging support default=yes --enable-amide-check-obsolete Compile with checks for old GLib/GTK functions default=no --enable-native-gtk-osx Compile with native GTK support on Mac OS X default=no --enable-libgsl Compile with the GNU Scientific Library default=yes --enable-libecat Compile with the libecat/CTI library default=yes --enable-libmdc Compile with the xmedcon/libmdc library default=yes --enable-libvolpack Compile in libvolpack rendering support default=yes --enable-ffmpeg Compile in ffmpeg (libavcodec) mpeg encoding support default=yes --disable-libfametest Do not try to compile and run a test libfame program --enable-libfame Compile in libfame mpeg encoding support if not using ffmpeg default=no --enable-libdcmdata Compile in DCMTK support for DICOM files default=yes --enable-gtk-doc use gtk-doc to build documentation [[default=no]] --enable-gtk-doc-html build documentation in html format [[default=yes]] --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] --disable-doc Do not build documentation. --disable-scrollkeeper do not make updates to the scrollkeeper database Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gsl-prefix=PFX Prefix where GSL is installed (optional) --with-gsl-exec-prefix=PFX Exec prefix where GSL is installed (optional) --with-xmedcon-prefix=PFX Prefix where XMEDCON is installed (optional) --with-xmedcon-exec-prefix=PFX Exec prefix where XMEDCON is installed (optional) --with-libfame-prefix=PFX Prefix where libfame is installed (optional) --with-libfame-exec-prefix=PFX Exec prefix where libfame is installed (optional) --with-html-dir=PATH path to installed docs --with-help-dir=DIR path to help docs --with-omf-dir=DIR path to OMF files --with-help-formats=FORMATS list of formats Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path FFMPEG_CFLAGS C compiler flags for FFMPEG, overriding pkg-config FFMPEG_LIBS linker flags for FFMPEG, overriding pkg-config AMIDE_GTK_CFLAGS C compiler flags for AMIDE_GTK, overriding pkg-config AMIDE_GTK_LIBS linker flags for AMIDE_GTK, overriding pkg-config AMIDE_GTK_EXTRA_GCONF_CFLAGS C compiler flags for AMIDE_GTK_EXTRA_GCONF, overriding pkg-config AMIDE_GTK_EXTRA_GCONF_LIBS linker flags for AMIDE_GTK_EXTRA_GCONF, overriding pkg-config AMIDE_GTK_EXTRA_GVFS_CFLAGS C compiler flags for AMIDE_GTK_EXTRA_GVFS, overriding pkg-config AMIDE_GTK_EXTRA_GVFS_LIBS linker flags for AMIDE_GTK_EXTRA_GVFS, overriding pkg-config libgnomecanvas_greater_than_230_CFLAGS C compiler flags for libgnomecanvas_greater_than_230, overriding pkg-config libgnomecanvas_greater_than_230_LIBS linker flags for libgnomecanvas_greater_than_230, overriding pkg-config GTKDOC_DEPS_CFLAGS C compiler flags for GTKDOC_DEPS, overriding pkg-config GTKDOC_DEPS_LIBS linker flags for GTKDOC_DEPS, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF amide configure 1.0.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------------------ ## ## Report this to amide-users@lists.sourceforge.net ## ## ------------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by amide $as_me 1.0.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers amide_config.h" am__api_version='1.13' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='amide' VERSION='1.0.5' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; powerpcle-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF $as_echo "#define HAVE_UNISTD_H 1" >>confdefs.h fi done # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 $as_echo "$ac_cv_sizeof_long_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF for ac_func in strptime do : ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime" if test "x$ac_cv_func_strptime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRPTIME 1 _ACEOF fi done for ac_header in locale.h do : ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALE_H 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if ${am_cv_val_LC_MESSAGES+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_val_LC_MESSAGES=yes else am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes; then : gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 $as_echo_n "checking for ngettext in libc... " >&6; } if ${gt_cv_func_ngettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_ngettext_libc=yes else gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 $as_echo "$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 $as_echo_n "checking for dgettext in libc... " >&6; } if ${gt_cv_func_dgettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_dgettext_libc=yes else gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 $as_echo "$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; } if ${ac_cv_lib_intl_bindtextdomain+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_bindtextdomain=yes else ac_cv_lib_intl_bindtextdomain=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if ${ac_cv_lib_intl_ngettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } if ${ac_cv_lib_intl_dgettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dgettext=yes else ac_cv_lib_intl_dgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = xyes; then : gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if ${ac_cv_lib_intl_ngettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 $as_echo_n "checking for dcgettext in -lintl... " >&6; } if ${ac_cv_lib_intl_dcgettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dcgettext=yes else ac_cv_lib_intl_dcgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; } if test "x$ac_cv_lib_intl_dcgettext" = xyes; then : gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do : ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" if test "x$ac_cv_func_dcgettext" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi done MSGFMT_OPTS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 $as_echo_n "checking if msgfmt accepts -c... " >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : CATOBJEXT=.gmo DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *-*-openbsd*) CATOBJEXT=.mo DATADIRNAME=share ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 $as_echo "$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES GETTEXT_PACKAGE=amide cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF ALL_LINGUAS="zh_CN zh_TW" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } case "$am__api_version" in 1.01234) as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5 ;; *) ;; esac INTLTOOL_REQUIRED_VERSION_AS_INT=`echo | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` if test -n ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= " >&5 $as_echo_n "checking for intltool >= ... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; } test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || as_fn_error $? "Your intltool is too old. You need intltool or later." "$LINENO" 5 fi # Extract the first word of "intltool-update", so it can be a program name with args. set dummy intltool-update; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_UPDATE in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE if test -n "$INTLTOOL_UPDATE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5 $as_echo "$INTLTOOL_UPDATE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "intltool-merge", so it can be a program name with args. set dummy intltool-merge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_INTLTOOL_MERGE+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_MERGE in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE if test -n "$INTLTOOL_MERGE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5 $as_echo "$INTLTOOL_MERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "intltool-extract", so it can be a program name with args. set dummy intltool-extract; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_EXTRACT in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT if test -n "$INTLTOOL_EXTRACT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5 $as_echo "$INTLTOOL_EXTRACT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5 fi if test -z "$AM_DEFAULT_VERBOSITY"; then AM_DEFAULT_VERBOSITY=1 fi INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))' INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))' INTLTOOL__v_MERGE_0='@echo " ITMRG " $@;' INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))' intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))' intltool__v_merge_options_0='-q' INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< $@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< $@' else INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.$$RANDOM && mkdir $$_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u $$_it_tmp_dir $< $@ && rmdir $$_it_tmp_dir' fi INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' # Check the gettext tools to make sure they are GNU # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case $XGETTEXT in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi XGETTEXT=$ac_cv_path_XGETTEXT if test -n "$XGETTEXT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGMERGE in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MSGMERGE=$ac_cv_path_MSGMERGE if test -n "$MSGMERGE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MSGFMT=$ac_cv_path_MSGFMT if test -n "$MSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5 fi xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5 fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_INTLTOOL_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $INTLTOOL_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL if test -n "$INTLTOOL_PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5 $as_echo "$INTLTOOL_PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$INTLTOOL_PERL"; then as_fn_error $? "perl not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5 $as_echo_n "checking for perl >= 5.8.1... " >&6; } $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 if test $? -ne 0; then as_fn_error $? "perl 5.8.1 is required for intltool" "$LINENO" 5 else IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5 $as_echo "$IT_PERL_VERSION" >&6; } fi if test "x" != "xno-xml"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5 $as_echo_n "checking for XML::Parser... " >&6; } if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } else as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5 fi fi # Substitute ALL_LINGUAS so we can use it in po/Makefile # Set DATADIRNAME correctly if it is not set yet # (copied from glib-gettext.m4) if test -z "$DATADIRNAME"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : DATADIRNAME=share else DATADIRNAME=lib fi ;; *) DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi for ac_prog in gnum4 gm4 m4 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_M4+:} false; then : $as_echo_n "(cached) " >&6 else case $M4 in [\\/]* | ?:[\\/]*) ac_cv_path_M4="$M4" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_M4="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi M4=$ac_cv_path_M4 if test -n "$M4"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4" >&5 $as_echo "$M4" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$M4" && break done test -n "$M4" || M4="NOT_FOUND" if test $M4 = "NOT_FOUND"; then echo "Could not find m4 on this system, please install to compile AMIDE." exit 1 fi OPTIMIZATION_CFLAGS="-O2" echo "setting optimization level to $OPTIMIZATION_CFLAGS" ############################################################## ### Checks for optional libraries ############################################################## # Check whether --with-gsl-prefix was given. if test "${with_gsl_prefix+set}" = set; then : withval=$with_gsl_prefix; gsl_prefix="$withval" else gsl_prefix="" fi # Check whether --with-gsl-exec-prefix was given. if test "${with_gsl_exec_prefix+set}" = set; then : withval=$with_gsl_exec_prefix; gsl_exec_prefix="$withval" else gsl_exec_prefix="" fi # Check whether --enable-gsltest was given. if test "${enable_gsltest+set}" = set; then : enableval=$enable_gsltest; else enable_gsltest=yes fi if test "x${GSL_CONFIG+set}" != xset ; then if test "x$gsl_prefix" != x ; then GSL_CONFIG="$gsl_prefix/bin/gsl-config" fi if test "x$gsl_exec_prefix" != x ; then GSL_CONFIG="$gsl_exec_prefix/bin/gsl-config" fi fi # Extract the first word of "gsl-config", so it can be a program name with args. set dummy gsl-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GSL_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $GSL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GSL_CONFIG="$GSL_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GSL_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GSL_CONFIG" && ac_cv_path_GSL_CONFIG="no" ;; esac fi GSL_CONFIG=$ac_cv_path_GSL_CONFIG if test -n "$GSL_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSL_CONFIG" >&5 $as_echo "$GSL_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi min_gsl_version=1.1.1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSL - version >= $min_gsl_version" >&5 $as_echo_n "checking for GSL - version >= $min_gsl_version... " >&6; } no_gsl="" if test "$GSL_CONFIG" = "no" ; then no_gsl=yes else GSL_CFLAGS=`$GSL_CONFIG --cflags` GSL_LIBS=`$GSL_CONFIG --libs` gsl_major_version=`$GSL_CONFIG --version | \ sed 's/^\([0-9]*\).*/\1/'` if test "x${gsl_major_version}" = "x" ; then gsl_major_version=0 fi gsl_minor_version=`$GSL_CONFIG --version | \ sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\2/'` if test "x${gsl_minor_version}" = "x" ; then gsl_minor_version=0 fi gsl_micro_version=`$GSL_CONFIG --version | \ sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\3/'` if test "x${gsl_micro_version}" = "x" ; then gsl_micro_version=0 fi if test "x$enable_gsltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GSL_CFLAGS" LIBS="$LIBS $GSL_LIBS" rm -f conf.gsltest if test "$cross_compiling" = yes; then : echo $ac_n "cross compiling; assumed OK... $ac_c" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include char* my_strdup (const char *str); char* my_strdup (const char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (void) { int major = 0, minor = 0, micro = 0; int n; char *tmp_version; system ("touch conf.gsltest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_gsl_version"); n = sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) ; if (n != 2 && n != 3) { printf("%s, bad version string\n", "$min_gsl_version"); exit(1); } if (($gsl_major_version > major) || (($gsl_major_version == major) && ($gsl_minor_version > minor)) || (($gsl_major_version == major) && ($gsl_minor_version == minor) && ($gsl_micro_version >= micro))) { exit(0); } else { exit(1); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else no_gsl=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gsl" = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FOUND_LIBGSL=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$GSL_CONFIG" = "no" ; then echo "*** The gsl-config script installed by GSL could not be found" echo "*** If GSL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GSL_CONFIG environment variable to the" echo "*** full path to gsl-config." else if test -f conf.gsltest ; then : else echo "*** Could not run GSL test program, checking why..." CFLAGS="$CFLAGS $GSL_CFLAGS" LIBS="$LIBS $GSL_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GSL or finding the wrong" echo "*** version of GSL. If it is not finding GSL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GSL was incorrectly installed" echo "*** or that you have moved GSL since it was installed. In the latter case, you" echo "*** may want to edit the gsl-config script: $GSL_CONFIG" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi # GSL_CFLAGS="" # GSL_LIBS="" FOUND_LIBGSL=no fi rm -f conf.gsltest { $as_echo "$as_me:${as_lineno-$LINENO}: checking for matrix_open in -lecat" >&5 $as_echo_n "checking for matrix_open in -lecat... " >&6; } if ${ac_cv_lib_ecat_matrix_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lecat -L/sw/lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char matrix_open (); int main () { return matrix_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ecat_matrix_open=yes else ac_cv_lib_ecat_matrix_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ecat_matrix_open" >&5 $as_echo "$ac_cv_lib_ecat_matrix_open" >&6; } if test "x$ac_cv_lib_ecat_matrix_open" = xyes; then : FOUND_LIBECAT=yes else FOUND_LIBECAT=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vpGetErrorString in -lvolpack" >&5 $as_echo_n "checking for vpGetErrorString in -lvolpack... " >&6; } if ${ac_cv_lib_volpack_vpGetErrorString+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lvolpack -lm -L/sw/lib -L/usr/local/lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char vpGetErrorString (); int main () { return vpGetErrorString (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_volpack_vpGetErrorString=yes else ac_cv_lib_volpack_vpGetErrorString=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_volpack_vpGetErrorString" >&5 $as_echo "$ac_cv_lib_volpack_vpGetErrorString" >&6; } if test "x$ac_cv_lib_volpack_vpGetErrorString" = xyes; then : FOUND_VOLPACK=yes else FOUND_VOLPACK=no fi # Check whether --with-xmedcon-prefix was given. if test "${with_xmedcon_prefix+set}" = set; then : withval=$with_xmedcon_prefix; xmedcon_prefix="$withval" else xmedcon_prefix="" fi # Check whether --with-xmedcon-exec-prefix was given. if test "${with_xmedcon_exec_prefix+set}" = set; then : withval=$with_xmedcon_exec_prefix; xmedcon_exec_prefix="$withval" else xmedcon_exec_prefix="" fi # Check whether --enable-xmedcontest was given. if test "${enable_xmedcontest+set}" = set; then : enableval=$enable_xmedcontest; else enable_xmedcontest=yes fi if test x$xmedcon_exec_prefix != x ; then xmedcon_args="$xmedcon_args --exec-prefix=$xmedcon_exec_prefix" if test x${XMEDCON_CONFIG+set} = xset ; then XMEDCON_CONFIG=$xmedcon_exec_prefix/xmedcon-config fi fi if test x$xmedcon_prefix != x ; then xmedcon_args="$xmedcon_args --prefix=$xmedcon_prefix" if test x${XMEDCON_CONFIG+set} = xset ; then XMEDCON_CONFIG=$xmedcon_prefix/bin/xmedcon-config fi fi # Extract the first word of "xmedcon-config", so it can be a program name with args. set dummy xmedcon-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XMEDCON_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $XMEDCON_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_XMEDCON_CONFIG="$XMEDCON_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XMEDCON_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_XMEDCON_CONFIG" && ac_cv_path_XMEDCON_CONFIG="no" ;; esac fi XMEDCON_CONFIG=$ac_cv_path_XMEDCON_CONFIG if test -n "$XMEDCON_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMEDCON_CONFIG" >&5 $as_echo "$XMEDCON_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi min_xmedcon_version=0.10.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMEDCON - version >= $min_xmedcon_version" >&5 $as_echo_n "checking for XMEDCON - version >= $min_xmedcon_version... " >&6; } no_xmedcon="" if test "$XMEDCON_CONFIG" = "no" ; then no_xmedcon=yes else XMEDCON_CFLAGS=`$XMEDCON_CONFIG $xmedconconf_args --cflags` XMEDCON_LIBS=`$XMEDCON_CONFIG $xmedconconf_args --libs` xmedcon_major_version=`$XMEDCON_CONFIG $xmedcon_args --version | \ sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'` xmedcon_minor_version=`$XMEDCON_CONFIG $xmedcon_args --version | \ sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'` xmedcon_micro_version=`$XMEDCON_CONFIG $xmedcon_config_args --version | \ sed 's/^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'` if test "x$enable_xmedcontest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $XMEDCON_CFLAGS" LIBS="$LIBS $XMEDCON_LIBS" rm -f conf.xmedcontest if test "$cross_compiling" = yes; then : echo $ac_n "cross compiling; assumed OK... $ac_c" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *) malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main () { int major, minor, micro; char *tmp_version; system ("touch conf.xmedcontest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_xmedcon_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_xmedcon_version"); exit(1); } if (($xmedcon_major_version > major) || (($xmedcon_major_version == major) && ($xmedcon_minor_version > minor)) || (($xmedcon_major_version == major) && ($xmedcon_minor_version == minor) && ($xmedcon_micro_version >= micro))) { return 0; } else { printf("\n*** 'xmedcon-config --version' returned %d.%d.%d, but the minimum version\n", $xmedcon_major_version, $xmedcon_minor_version, $xmedcon_micro_version); printf("*** of XMEDCON required is %d.%d.%d. If xmedcon-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If xmedcon-config was wrong, set the environment variable XMEDCON_CONFIG\n"); printf("*** to point to the correct copy of xmedcon-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else no_xmedcon=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_xmedcon" = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FOUND_XMEDCON=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$XMEDCON_CONFIG" = "no" ; then echo "*** The xmedcon-config script installed by XMEDCON could not be found" echo "*** If XMEDCON was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the XMEDCON_CONFIG environment variable to the" echo "*** full path to xmedcon-config." else if test -f conf.xmedcontest ; then : else echo "*** Could not run XMEDCON test program, checking why..." CFLAGS="$CFLAGS $XMEDCON_CFLAGS" LIBS="$LIBS $XMEDCON_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding XMEDCON or finding the wrong" echo "*** version of XMEDCON. If it is not finding XMEDCON, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means XMEDCON was incorrectly installed" echo "*** or that you have moved XMEDCON since it was installed. In the latter case, you" echo "*** may want to edit the xmedcon-config script: $XMEDCON_CONFIG" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi XMEDCON_CFLAGS="" XMEDCON_LIBS="" FOUND_XMEDCON=no fi rm -f conf.xmedcontest { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : THREAD_LIBS="-lpthread" else THREAD_LIBS="" fi AMIDE_LIBDCMDATA_LIBS="-L/usr/local/dicom/lib -L/usr/lib64/dcmtk -L/usr/lib/dcmtk -ldcmdata -loflog -lofstd -lz $THREAD_LIBS" AMIDE_LIBDCMDATA_CFLAGS="-I/usr/local/dicom/include" saved_libs="${LIBS}" LIBS="${LIBS} ${AMIDE_LIBDCMDATA_LIBS}" saved_cxxflags="${CXXFLAGS}" CXXFLAGS="${CXXFLAGS} ${AMIDE_LIBDCMDATA_CFLAGS} -DHAVE_CONFIG_H" FOUND_DCMDATA=no ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { DicomDirInterface dcm_dir; dcm_dir.writeDicomDir(); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : FOUND_DCMDATA=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdcmdata was not found." >&5 $as_echo "$as_me: WARNING: libdcmdata was not found." >&2;} fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="${saved_libs}" CXXFLAGS="${saved_cxxflags}" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFMPEG" >&5 $as_echo_n "checking for FFMPEG... " >&6; } if test -n "$FFMPEG_CFLAGS"; then pkg_cv_FFMPEG_CFLAGS="$FFMPEG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libavcodec >= 51.45.0, libavutil \""; } >&5 ($PKG_CONFIG --exists --print-errors " libavcodec >= 51.45.0, libavutil ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FFMPEG_CFLAGS=`$PKG_CONFIG --cflags " libavcodec >= 51.45.0, libavutil " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$FFMPEG_LIBS"; then pkg_cv_FFMPEG_LIBS="$FFMPEG_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libavcodec >= 51.45.0, libavutil \""; } >&5 ($PKG_CONFIG --exists --print-errors " libavcodec >= 51.45.0, libavutil ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FFMPEG_LIBS=`$PKG_CONFIG --libs " libavcodec >= 51.45.0, libavutil " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then FFMPEG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " libavcodec >= 51.45.0, libavutil " 2>&1` else FFMPEG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " libavcodec >= 51.45.0, libavutil " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$FFMPEG_PKG_ERRORS" >&5 FOUND_FFMPEG=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } FOUND_FFMPEG=no else FFMPEG_CFLAGS=$pkg_cv_FFMPEG_CFLAGS FFMPEG_LIBS=$pkg_cv_FFMPEG_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FOUND_FFMPEG=yes fi; # Check whether --enable-amide_debug was given. if test "${enable_amide_debug+set}" = set; then : enableval=$enable_amide_debug; enable_amide_debug="$enableval" else enable_amide_debug=yes fi if test $enable_amide_debug = yes; then echo "compiling with AMIDE debugging messages" AMIDE_DEBUG_CFLAGS="-ggdb -Wall" $as_echo "#define AMIDE_DEBUG 1" >>confdefs.h else echo "compiling without AMIDE debugging messages" fi # Check whether --enable-amide_check_obsolete was given. if test "${enable_amide_check_obsolete+set}" = set; then : enableval=$enable_amide_check_obsolete; enable_amide_check_obsolete="$enableval" else enable_amide_check_obsolete=no fi if test $enable_amide_check_obsolete = yes; then echo "compiling with checks for obsolete GLib/GTK functions" AMIDE_CHECK_OBSOLETE_CFLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGDK_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES" $as_echo "#define AMIDE_CHECK_OBSOLETE 1" >>confdefs.h else echo "compiling without checks for obsolete GLib/GTK functions" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native Win32" >&5 $as_echo_n "checking for native Win32... " >&6; } case "$host" in *-*-mingw*) native_win32=yes ;; *) native_win32=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $native_win32" >&5 $as_echo "$native_win32" >&6; } if test "$native_win32" = yes; then AMIDE_OS_WIN32_TRUE= AMIDE_OS_WIN32_FALSE='#' else AMIDE_OS_WIN32_TRUE='#' AMIDE_OS_WIN32_FALSE= fi # Check whether --enable-native_gtk_osx was given. if test "${enable_native_gtk_osx+set}" = set; then : enableval=$enable_native_gtk_osx; enable_native_gtk_osx="$enableval" else enable_native_gtk_osx=no fi case "$host" in *-apple-*) on_a_macintosh=yes ;; *) on_a_macintosh=no ;; esac if (test $enable_native_gtk_osx = yes) && (test $on_a_macintosh = yes); then echo "compiling with native GTK support on Mac OS X" $as_echo "#define AMIDE_NATIVE_GTK_OSX 1" >>confdefs.h fi if (test $enable_native_gtk_osx = no) && (test $on_a_macintosh = yes); then echo "compiling with X11 GTK support (non-native) on Mac OS X" fi if (test $enable_native_gtk_osx = yes) && (test $on_a_macintosh = no); then echo "ignoring --enable-native-gtk-osx option, as OS other than Mac OS X" fi # Check whether --enable-libgsl was given. if test "${enable_libgsl+set}" = set; then : enableval=$enable_libgsl; enable_libgsl="$enableval" else enable_libgsl=yes fi if (test $enable_libgsl = yes) && (test $FOUND_LIBGSL = yes); then echo "compiling with GNU Scientific Library support" $as_echo "#define AMIDE_LIBGSL_SUPPORT 1" >>confdefs.h else echo "compiling without the GNU Scientific Library" fi # Check whether --enable-libecat was given. if test "${enable_libecat+set}" = set; then : enableval=$enable_libecat; enable_libecat="$enableval" else enable_libecat=yes fi if (test $enable_libecat = yes) && (test $FOUND_LIBECAT = yes); then echo "compiling with libecat/CTI file support" AMIDE_LIBECAT_LIBS="-lecat" $as_echo "#define AMIDE_LIBECAT_SUPPORT 1" >>confdefs.h else echo "compiling without libecat/CTI file support" fi # Check whether --enable-libmdc was given. if test "${enable_libmdc+set}" = set; then : enableval=$enable_libmdc; enable_libmdc="$enableval" else enable_libmdc=yes fi if (test $enable_libmdc = yes) && (test $FOUND_XMEDCON = yes); then echo "compiling with xmedcon/libmdc file support" $as_echo "#define AMIDE_LIBMDC_SUPPORT 1" >>confdefs.h else echo "compiling without xmedcon/libmdc file support" fi # Check whether --enable-libvolpack was given. if test "${enable_libvolpack+set}" = set; then : enableval=$enable_libvolpack; enable_libvolpack="$enableval" else enable_libvolpack=yes fi if (test $enable_libvolpack = yes) && (test $FOUND_VOLPACK = yes); then echo "compiling with libvolpack rendering support " AMIDE_LIBVOLPACK_LIBS="-lvolpack" $as_echo "#define AMIDE_LIBVOLPACK_SUPPORT 1" >>confdefs.h else echo "compiling without libvolpack rendering support" fi # Check whether --enable-ffmpeg was given. if test "${enable_ffmpeg+set}" = set; then : enableval=$enable_ffmpeg; enable_ffmpeg="$enableval" else enable_ffmpeg=yes fi if (test $enable_ffmpeg = yes) && (test $FOUND_FFMPEG = yes); then echo "compiling with ffmpeg (libavcodec) mpeg encoding support " $as_echo "#define AMIDE_FFMPEG_SUPPORT 1" >>confdefs.h else echo "compiling without ffmpeg (libavcodec) mpeg encoding support" # Check whether --with-libfame-prefix was given. if test "${with_libfame_prefix+set}" = set; then : withval=$with_libfame_prefix; libfame_config_prefix="$withval" else libfame_config_prefix="" fi # Check whether --with-libfame-exec-prefix was given. if test "${with_libfame_exec_prefix+set}" = set; then : withval=$with_libfame_exec_prefix; libfame_config_exec_prefix="$withval" else libfame_config_exec_prefix="" fi # Check whether --enable-libfametest was given. if test "${enable_libfametest+set}" = set; then : enableval=$enable_libfametest; else enable_libfametest=yes fi if test x$libfame_config_exec_prefix != x ; then libfame_config_args="$libfame_config_args --exec-prefix=$libfame_config_exec_prefix" if test x${LIBFAME_CONFIG+set} != xset ; then LIBFAME_CONFIG=$libfame_config_exec_prefix/bin/libfame-config fi fi if test x$libfame_config_prefix != x ; then libfame_config_args="$libfame_config_args --prefix=$libfame_config_prefix" if test x${LIBFAME_CONFIG+set} != xset ; then LIBFAME_CONFIG=$libfame_config_prefix/bin/libfame-config fi fi # Extract the first word of "libfame-config", so it can be a program name with args. set dummy libfame-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_LIBFAME_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $LIBFAME_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LIBFAME_CONFIG="$LIBFAME_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_LIBFAME_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_LIBFAME_CONFIG" && ac_cv_path_LIBFAME_CONFIG="no" ;; esac fi LIBFAME_CONFIG=$ac_cv_path_LIBFAME_CONFIG if test -n "$LIBFAME_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFAME_CONFIG" >&5 $as_echo "$LIBFAME_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi min_libfame_version=0.9.1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfame - version >= $min_libfame_version" >&5 $as_echo_n "checking for libfame - version >= $min_libfame_version... " >&6; } no_libfame="" if test "$LIBFAME_CONFIG" = "no" ; then no_libfame=yes else LIBFAME_CFLAGS=`$LIBFAME_CONFIG $libfame_config_args --cflags` LIBFAME_LIBS=`$LIBFAME_CONFIG $libfame_config_args --libs` libfame_config_major_version=`$LIBFAME_CONFIG $libfame_config_args --version | \ sed -e 's,[^0-9.],,g' -e 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` libfame_config_minor_version=`$LIBFAME_CONFIG $libfame_config_args --version | \ sed -e 's,[^0-9.],,g' -e 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` libfame_config_micro_version=`$LIBFAME_CONFIG $libfame_config_args --version | \ sed -e 's,[^0-9.],,g' -e 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_libfametest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBFAME_CFLAGS" LIBS="$LIBFAME_LIBS $LIBS" rm -f conf.libfametest if test "$cross_compiling" = yes; then : echo $ac_n "cross compiling; assumed OK... $ac_c" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.libfametest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = strdup("$min_libfame_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_libfame_version"); exit(1); } if ((libfame_major_version != $libfame_config_major_version) || (libfame_minor_version != $libfame_config_minor_version) || (libfame_micro_version != $libfame_config_micro_version)) { printf("\n*** 'libfame-config --version' returned %d.%d.%d, but Libfame (%d.%d.%d)\n", $libfame_config_major_version, $libfame_config_minor_version, $libfame_config_micro_version, libfame_major_version, libfame_minor_version, libfame_micro_version); printf ("*** was found! If libfame-config was correct, then it is best\n"); printf ("*** to remove the old version of libfame. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libfame-config was wrong, set the environment variable LIBFAME_CONFIG\n"); printf("*** to point to the correct copy of libfame-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (LIBFAME_MAJOR_VERSION) && defined (LIBFAME_MINOR_VERSION) && defined (LIBFAME_MICRO_VERSION) else if ((libfame_major_version != LIBFAME_MAJOR_VERSION) || (libfame_minor_version != LIBFAME_MINOR_VERSION) || (libfame_micro_version != LIBFAME_MICRO_VERSION)) { printf("*** libfame header files (version %d.%d.%d) do not match\n", LIBFAME_MAJOR_VERSION, LIBFAME_MINOR_VERSION, LIBFAME_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", libfame_major_version, libfame_minor_version, libfame_micro_version); } #endif /* defined (LIBFAME_MAJOR_VERSION) ... */ else { if ((libfame_major_version > major) || ((libfame_major_version == major) && (libfame_minor_version > minor)) || ((libfame_major_version == major) && (libfame_minor_version == minor) && (libfame_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of libfame (%d.%d.%d) was found.\n", libfame_major_version, libfame_minor_version, libfame_micro_version); printf("*** You need a version of libfame newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** libfame is always available from http://www-eleves.enst-bretagne.fr/~chappeli/fame\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libfame-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of libfame, but you can also set the LIBFAME_CONFIG environment to point to the\n"); printf("*** correct copy of libfame-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : else no_libfame=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_libfame" = x ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } FOUND_LIBFAME=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$LIBFAME_CONFIG" = "no" ; then echo "*** The libfame-config script installed by libfame could not be found" echo "*** If libfame was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBFAME_CONFIG environment variable to the" echo "*** full path to libfame-config." else if test -f conf.libfametest ; then : else echo "*** Could not run libfame test program, checking why..." CFLAGS="$CFLAGS $LIBFAME_CFLAGS" LIBS="$LIBS $LIBFAME_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return ((libfame_major_version) || (libfame_minor_version) || (libfame_micro_version)); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding libfame or finding the wrong" echo "*** version of LIBFAME. If it is not finding libfame, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" else echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means libfame was incorrectly installed" echo "*** or that you have moved libfame since it was installed. In the latter case, you" echo "*** may want to edit the libfame-config script: $LIBFAME_CONFIG" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi LIBFAME_CFLAGS="" LIBFAME_LIBS="" FOUND_LIBFAME=no fi rm -f conf.libfametest # Check whether --enable-libfame was given. if test "${enable_libfame+set}" = set; then : enableval=$enable_libfame; enable_libfame="$enableval" else enable_libfame=no fi if (test $enable_libfame = yes) && (test $FOUND_LIBFAME = yes); then echo "compiling with libfame mpeg encoding support " $as_echo "#define AMIDE_LIBFAME_SUPPORT 1" >>confdefs.h else echo "compiling without libfame mpeg encoding support" fi fi # Check whether --enable-libdcmdata was given. if test "${enable_libdcmdata+set}" = set; then : enableval=$enable_libdcmdata; enable_libdcmdata="$enableval" else enable_libdcmdata=yes fi if (test $enable_libdcmdata = yes) && (test $FOUND_DCMDATA = yes); then echo "compiling with DCMTK support for DICOM files" $as_echo "#define AMIDE_LIBDCMDATA_SUPPORT 1" >>confdefs.h else echo "compiling without DCMTK support for DICOM files" fi ############################### # Check for gtk/gnome stuff ############################## pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AMIDE_GTK" >&5 $as_echo_n "checking for AMIDE_GTK... " >&6; } if test -n "$AMIDE_GTK_CFLAGS"; then pkg_cv_AMIDE_GTK_CFLAGS="$AMIDE_GTK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.16.0 gobject-2.0 >= 2.16.0 gtk+-2.0 >= 2.16.0 libxml-2.0 >= 2.4.12 libgnomecanvas-2.0 >= 2.0.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.16.0 gobject-2.0 >= 2.16.0 gtk+-2.0 >= 2.16.0 libxml-2.0 >= 2.4.12 libgnomecanvas-2.0 >= 2.0.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AMIDE_GTK_CFLAGS=`$PKG_CONFIG --cflags " glib-2.0 >= 2.16.0 gobject-2.0 >= 2.16.0 gtk+-2.0 >= 2.16.0 libxml-2.0 >= 2.4.12 libgnomecanvas-2.0 >= 2.0.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$AMIDE_GTK_LIBS"; then pkg_cv_AMIDE_GTK_LIBS="$AMIDE_GTK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.16.0 gobject-2.0 >= 2.16.0 gtk+-2.0 >= 2.16.0 libxml-2.0 >= 2.4.12 libgnomecanvas-2.0 >= 2.0.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.16.0 gobject-2.0 >= 2.16.0 gtk+-2.0 >= 2.16.0 libxml-2.0 >= 2.4.12 libgnomecanvas-2.0 >= 2.0.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AMIDE_GTK_LIBS=`$PKG_CONFIG --libs " glib-2.0 >= 2.16.0 gobject-2.0 >= 2.16.0 gtk+-2.0 >= 2.16.0 libxml-2.0 >= 2.4.12 libgnomecanvas-2.0 >= 2.0.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then AMIDE_GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " glib-2.0 >= 2.16.0 gobject-2.0 >= 2.16.0 gtk+-2.0 >= 2.16.0 libxml-2.0 >= 2.4.12 libgnomecanvas-2.0 >= 2.0.0 " 2>&1` else AMIDE_GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " glib-2.0 >= 2.16.0 gobject-2.0 >= 2.16.0 gtk+-2.0 >= 2.16.0 libxml-2.0 >= 2.4.12 libgnomecanvas-2.0 >= 2.0.0 " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$AMIDE_GTK_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ( glib-2.0 >= 2.16.0 gobject-2.0 >= 2.16.0 gtk+-2.0 >= 2.16.0 libxml-2.0 >= 2.4.12 libgnomecanvas-2.0 >= 2.0.0 ) were not met: $AMIDE_GTK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables AMIDE_GTK_CFLAGS and AMIDE_GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables AMIDE_GTK_CFLAGS and AMIDE_GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else AMIDE_GTK_CFLAGS=$pkg_cv_AMIDE_GTK_CFLAGS AMIDE_GTK_LIBS=$pkg_cv_AMIDE_GTK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi ## add in gconf if not on win32 or macos x ## gconf stuff is encapsulated in amide_gconf.c if (test $native_win32 = no) && (test $enable_native_gtk_osx = no); then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AMIDE_GTK_EXTRA_GCONF" >&5 $as_echo_n "checking for AMIDE_GTK_EXTRA_GCONF... " >&6; } if test -n "$AMIDE_GTK_EXTRA_GCONF_CFLAGS"; then pkg_cv_AMIDE_GTK_EXTRA_GCONF_CFLAGS="$AMIDE_GTK_EXTRA_GCONF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gconf-2.0 >= 2.14.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " gconf-2.0 >= 2.14.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AMIDE_GTK_EXTRA_GCONF_CFLAGS=`$PKG_CONFIG --cflags " gconf-2.0 >= 2.14.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$AMIDE_GTK_EXTRA_GCONF_LIBS"; then pkg_cv_AMIDE_GTK_EXTRA_GCONF_LIBS="$AMIDE_GTK_EXTRA_GCONF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gconf-2.0 >= 2.14.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " gconf-2.0 >= 2.14.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AMIDE_GTK_EXTRA_GCONF_LIBS=`$PKG_CONFIG --libs " gconf-2.0 >= 2.14.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then AMIDE_GTK_EXTRA_GCONF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " gconf-2.0 >= 2.14.0 " 2>&1` else AMIDE_GTK_EXTRA_GCONF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " gconf-2.0 >= 2.14.0 " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$AMIDE_GTK_EXTRA_GCONF_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ( gconf-2.0 >= 2.14.0 ) were not met: $AMIDE_GTK_EXTRA_GCONF_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables AMIDE_GTK_EXTRA_GCONF_CFLAGS and AMIDE_GTK_EXTRA_GCONF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables AMIDE_GTK_EXTRA_GCONF_CFLAGS and AMIDE_GTK_EXTRA_GCONF_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else AMIDE_GTK_EXTRA_GCONF_CFLAGS=$pkg_cv_AMIDE_GTK_EXTRA_GCONF_CFLAGS AMIDE_GTK_EXTRA_GCONF_LIBS=$pkg_cv_AMIDE_GTK_EXTRA_GCONF_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi AMIDE_GTK_LIBS="$AMIDE_GTK_LIBS $AMIDE_GTK_EXTRA_GCONF_LIBS" AMIDE_GTK_CFLAGS="$AMIDE_GTK_CFLAGS $AMIDE_GTK_EXTRA_GCONF_CFLAGS" fi ## add in gnome-vfs if not on win32 or gtk-osx ## gnome-vfs is only used by amide_gnome.c and only on unix if (test $native_win32 = no) && (test $enable_native_gtk_osx = no); then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AMIDE_GTK_EXTRA_GVFS" >&5 $as_echo_n "checking for AMIDE_GTK_EXTRA_GVFS... " >&6; } if test -n "$AMIDE_GTK_EXTRA_GVFS_CFLAGS"; then pkg_cv_AMIDE_GTK_EXTRA_GVFS_CFLAGS="$AMIDE_GTK_EXTRA_GVFS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gnome-vfs-2.0 >= 2.16.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " gnome-vfs-2.0 >= 2.16.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AMIDE_GTK_EXTRA_GVFS_CFLAGS=`$PKG_CONFIG --cflags " gnome-vfs-2.0 >= 2.16.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$AMIDE_GTK_EXTRA_GVFS_LIBS"; then pkg_cv_AMIDE_GTK_EXTRA_GVFS_LIBS="$AMIDE_GTK_EXTRA_GVFS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gnome-vfs-2.0 >= 2.16.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " gnome-vfs-2.0 >= 2.16.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_AMIDE_GTK_EXTRA_GVFS_LIBS=`$PKG_CONFIG --libs " gnome-vfs-2.0 >= 2.16.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then AMIDE_GTK_EXTRA_GVFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " gnome-vfs-2.0 >= 2.16.0 " 2>&1` else AMIDE_GTK_EXTRA_GVFS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " gnome-vfs-2.0 >= 2.16.0 " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$AMIDE_GTK_EXTRA_GVFS_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ( gnome-vfs-2.0 >= 2.16.0 ) were not met: $AMIDE_GTK_EXTRA_GVFS_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables AMIDE_GTK_EXTRA_GVFS_CFLAGS and AMIDE_GTK_EXTRA_GVFS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables AMIDE_GTK_EXTRA_GVFS_CFLAGS and AMIDE_GTK_EXTRA_GVFS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else AMIDE_GTK_EXTRA_GVFS_CFLAGS=$pkg_cv_AMIDE_GTK_EXTRA_GVFS_CFLAGS AMIDE_GTK_EXTRA_GVFS_LIBS=$pkg_cv_AMIDE_GTK_EXTRA_GVFS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi AMIDE_GTK_LIBS="$AMIDE_GTK_LIBS $AMIDE_GTK_EXTRA_GVFS_LIBS" AMIDE_GTK_CFLAGS="$AMIDE_GTK_CFLAGS $AMIDE_GTK_EXTRA_GVFS_CFLAGS" fi # Extract the first word of "glib-genmarshal", so it can be a program name with args. set dummy glib-genmarshal; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GLIB_GENMARSHAL+:} false; then : $as_echo_n "(cached) " >&6 else case $GLIB_GENMARSHAL in [\\/]* | ?:[\\/]*) ac_cv_path_GLIB_GENMARSHAL="$GLIB_GENMARSHAL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GLIB_GENMARSHAL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GLIB_GENMARSHAL=$ac_cv_path_GLIB_GENMARSHAL if test -n "$GLIB_GENMARSHAL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_GENMARSHAL" >&5 $as_echo "$GLIB_GENMARSHAL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gdk-pixbuf-csource", so it can be a program name with args. set dummy gdk-pixbuf-csource; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GDK_PIXBUF_CSOURCE+:} false; then : $as_echo_n "(cached) " >&6 else case $GDK_PIXBUF_CSOURCE in [\\/]* | ?:[\\/]*) ac_cv_path_GDK_PIXBUF_CSOURCE="$GDK_PIXBUF_CSOURCE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GDK_PIXBUF_CSOURCE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GDK_PIXBUF_CSOURCE=$ac_cv_path_GDK_PIXBUF_CSOURCE if test -n "$GDK_PIXBUF_CSOURCE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDK_PIXBUF_CSOURCE" >&5 $as_echo "$GDK_PIXBUF_CSOURCE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$GDK_PIXBUF_CSOURCE" && as_fn_error $? " *** You need the gdk-pixbuf-csource tool which is installed *** from GTK+ 2's gdk-pixbuf. *** *** Either the location where you installed your GTK+ 2 is *** not in your PATH or something is screwed up with your *** GTK+ 2 installation " "$LINENO" 5 pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgnomecanvas_greater_than_230" >&5 $as_echo_n "checking for libgnomecanvas_greater_than_230... " >&6; } if test -n "$libgnomecanvas_greater_than_230_CFLAGS"; then pkg_cv_libgnomecanvas_greater_than_230_CFLAGS="$libgnomecanvas_greater_than_230_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgnomecanvas-2.0 >= 2.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libgnomecanvas-2.0 >= 2.3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libgnomecanvas_greater_than_230_CFLAGS=`$PKG_CONFIG --cflags "libgnomecanvas-2.0 >= 2.3.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libgnomecanvas_greater_than_230_LIBS"; then pkg_cv_libgnomecanvas_greater_than_230_LIBS="$libgnomecanvas_greater_than_230_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgnomecanvas-2.0 >= 2.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libgnomecanvas-2.0 >= 2.3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libgnomecanvas_greater_than_230_LIBS=`$PKG_CONFIG --libs "libgnomecanvas-2.0 >= 2.3.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libgnomecanvas_greater_than_230_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libgnomecanvas-2.0 >= 2.3.0" 2>&1` else libgnomecanvas_greater_than_230_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libgnomecanvas-2.0 >= 2.3.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libgnomecanvas_greater_than_230_PKG_ERRORS" >&5 enable_antialiasing=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_antialiasing=no else libgnomecanvas_greater_than_230_CFLAGS=$pkg_cv_libgnomecanvas_greater_than_230_CFLAGS libgnomecanvas_greater_than_230_LIBS=$pkg_cv_libgnomecanvas_greater_than_230_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } enable_antialiasing=yes fi if test $enable_antialiasing = yes; then echo "compiling with libgnomecanvas antialiasing support" $as_echo "#define AMIDE_LIBGNOMECANVAS_AA 1" >>confdefs.h else echo "compiling without libgnomecanvas antialiasing support" $as_echo "#define AMIDE_LIBGNOMECANVAS_AA 0" >>confdefs.h fi ################################################################ # Checks for gtk-doc and docbook-tools, from gtk's configure.in ################################################################ # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_CHECK+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_CHECK in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK if test -n "$GTKDOC_CHECK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 $as_echo "$GTKDOC_CHECK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_prog in gtkdoc-rebase do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_REBASE+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_REBASE in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE if test -n "$GTKDOC_REBASE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5 $as_echo "$GTKDOC_REBASE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GTKDOC_REBASE" && break done test -n "$GTKDOC_REBASE" || GTKDOC_REBASE="true" # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args. set dummy gtkdoc-mkpdf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GTKDOC_MKPDF+:} false; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_MKPDF in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF if test -n "$GTKDOC_MKPDF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5 $as_echo "$GTKDOC_MKPDF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then : withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then : enableval=$enable_gtk_doc; else enable_gtk_doc=no fi if test x$enable_gtk_doc = xyes; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.10") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else as_fn_error $? "You need to have gtk-doc >= 1.10 installed to build $PACKAGE_NAME" "$LINENO" 5 fi if test "x$PACKAGE_NAME" != "xglib"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 $as_echo_n "checking for GTKDOC_DEPS... " >&6; } if test -n "$GTKDOC_DEPS_CFLAGS"; then pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTKDOC_DEPS_LIBS"; then pkg_cv_GTKDOC_DEPS_LIBS="$GTKDOC_DEPS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` else GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTKDOC_DEPS_PKG_ERRORS" >&5 : elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : else GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 $as_echo_n "checking whether to build gtk-doc documentation... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 $as_echo "$enable_gtk_doc" >&6; } # Check whether --enable-gtk-doc-html was given. if test "${enable_gtk_doc_html+set}" = set; then : enableval=$enable_gtk_doc_html; else enable_gtk_doc_html=yes fi # Check whether --enable-gtk-doc-pdf was given. if test "${enable_gtk_doc_pdf+set}" = set; then : enableval=$enable_gtk_doc_pdf; else enable_gtk_doc_pdf=no fi if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi if test -z "$AM_DEFAULT_VERBOSITY"; then AM_DEFAULT_VERBOSITY=1 fi if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test x$enable_gtk_doc_html = xyes; then GTK_DOC_BUILD_HTML_TRUE= GTK_DOC_BUILD_HTML_FALSE='#' else GTK_DOC_BUILD_HTML_TRUE='#' GTK_DOC_BUILD_HTML_FALSE= fi if test x$enable_gtk_doc_pdf = xyes; then GTK_DOC_BUILD_PDF_TRUE= GTK_DOC_BUILD_PDF_FALSE='#' else GTK_DOC_BUILD_PDF_TRUE='#' GTK_DOC_BUILD_PDF_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi if test -n "$GTKDOC_REBASE"; then GTK_DOC_USE_REBASE_TRUE= GTK_DOC_USE_REBASE_FALSE='#' else GTK_DOC_USE_REBASE_TRUE='#' GTK_DOC_USE_REBASE_FALSE= fi # Check whether --enable-doc was given. if test "${enable_doc+set}" = set; then : enableval=$enable_doc; fi if test "x${enable_doc}" = "x" ; then enable_doc=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether documentation should be built" >&5 $as_echo_n "checking whether documentation should be built... " >&6; } if test ${enable_doc} = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test ${enable_doc} = no; then DISABLE_DOC_TRUE= DISABLE_DOC_FALSE='#' else DISABLE_DOC_TRUE='#' DISABLE_DOC_FALSE= fi if test ${enable_doc} = yes; then gdu_cv_version_required=0.3.2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gnome-doc-utils >= $gdu_cv_version_required" >&5 $as_echo_n "checking gnome-doc-utils >= $gdu_cv_version_required... " >&6; } if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnome-doc-utils >= \$gdu_cv_version_required\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnome-doc-utils >= $gdu_cv_version_required") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then gdu_cv_have_gdu=yes else gdu_cv_have_gdu=no fi if test "$gdu_cv_have_gdu" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "gnome-doc-utils >= $gdu_cv_version_required not found" "$LINENO" 5 fi # Check whether --with-help-dir was given. if test "${with_help_dir+set}" = set; then : withval=$with_help_dir; else with_help_dir='${datadir}/gnome/help' fi HELP_DIR="$with_help_dir" # Check whether --with-omf-dir was given. if test "${with_omf_dir+set}" = set; then : withval=$with_omf_dir; else with_omf_dir='${datadir}/omf' fi OMF_DIR="$with_omf_dir" # Check whether --with-help-formats was given. if test "${with_help_formats+set}" = set; then : withval=$with_help_formats; else with_help_formats='' fi DOC_USER_FORMATS="$with_help_formats" # Check whether --enable-scrollkeeper was given. if test "${enable_scrollkeeper+set}" = set; then : enableval=$enable_scrollkeeper; else enable_scrollkeeper=yes fi if test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"; then ENABLE_SK_TRUE= ENABLE_SK_FALSE='#' else ENABLE_SK_TRUE='#' ENABLE_SK_FALSE= fi DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS" if test "$gdu_cv_have_gdu" = "yes"; then HAVE_GNOME_DOC_UTILS_TRUE= HAVE_GNOME_DOC_UTILS_FALSE='#' else HAVE_GNOME_DOC_UTILS_TRUE='#' HAVE_GNOME_DOC_UTILS_FALSE= fi else ENABLE_SK_TRUE="#" ENABLE_SK_FALSE="" HAVE_GNOME_DOC_UTILS_TRUE="#" HAVE_GNOME_DOC_UTILS_FALSE="" fi # Extract the first word of "db2html", so it can be a program name with args. set dummy db2html; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DB2HTML+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DB2HTML"; then ac_cv_prog_DB2HTML="$DB2HTML" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DB2HTML="true" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_DB2HTML" && ac_cv_prog_DB2HTML="false" fi fi DB2HTML=$ac_cv_prog_DB2HTML if test -n "$DB2HTML"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DB2HTML" >&5 $as_echo "$DB2HTML" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if $DB2HTML; then HAVE_DOCBOOK_TRUE= HAVE_DOCBOOK_FALSE='#' else HAVE_DOCBOOK_TRUE='#' HAVE_DOCBOOK_FALSE= fi ac_config_files="$ac_config_files Makefile pixmaps/Makefile src/Makefile win32/Makefile macosx/Makefile macosx/amide.plist doc/Makefile doc/reference/Makefile doc/reference/version.xml help/Makefile etc/Makefile etc/amide-$VERSION-1.info:etc/amide.info.in etc/amide-$VERSION-1.iss:etc/amide.iss.in etc/amide.spec man/Makefile po/Makefile.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi ac_config_commands="$ac_config_commands po/stamp-it" if test -z "${AMIDE_OS_WIN32_TRUE}" && test -z "${AMIDE_OS_WIN32_FALSE}"; then as_fn_error $? "conditional \"AMIDE_OS_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_HTML_TRUE}" && test -z "${GTK_DOC_BUILD_HTML_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_BUILD_HTML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_BUILD_PDF_TRUE}" && test -z "${GTK_DOC_BUILD_PDF_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_BUILD_PDF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_REBASE_TRUE}" && test -z "${GTK_DOC_USE_REBASE_FALSE}"; then as_fn_error $? "conditional \"GTK_DOC_USE_REBASE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DISABLE_DOC_TRUE}" && test -z "${DISABLE_DOC_FALSE}"; then as_fn_error $? "conditional \"DISABLE_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_SK_TRUE}" && test -z "${ENABLE_SK_FALSE}"; then as_fn_error $? "conditional \"ENABLE_SK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GNOME_DOC_UTILS_TRUE}" && test -z "${HAVE_GNOME_DOC_UTILS_FALSE}"; then as_fn_error $? "conditional \"HAVE_GNOME_DOC_UTILS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DOCBOOK_TRUE}" && test -z "${HAVE_DOCBOOK_FALSE}"; then as_fn_error $? "conditional \"HAVE_DOCBOOK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by amide $as_me 1.0.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ amide config.status 1.0.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "amide_config.h") CONFIG_HEADERS="$CONFIG_HEADERS amide_config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "win32/Makefile") CONFIG_FILES="$CONFIG_FILES win32/Makefile" ;; "macosx/Makefile") CONFIG_FILES="$CONFIG_FILES macosx/Makefile" ;; "macosx/amide.plist") CONFIG_FILES="$CONFIG_FILES macosx/amide.plist" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/reference/Makefile") CONFIG_FILES="$CONFIG_FILES doc/reference/Makefile" ;; "doc/reference/version.xml") CONFIG_FILES="$CONFIG_FILES doc/reference/version.xml" ;; "help/Makefile") CONFIG_FILES="$CONFIG_FILES help/Makefile" ;; "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; "etc/amide-$VERSION-1.info") CONFIG_FILES="$CONFIG_FILES etc/amide-$VERSION-1.info:etc/amide.info.in" ;; "etc/amide-$VERSION-1.iss") CONFIG_FILES="$CONFIG_FILES etc/amide-$VERSION-1.iss:etc/amide.iss.in" ;; "etc/amide.spec") CONFIG_FILES="$CONFIG_FILES etc/amide.spec" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; "po/stamp-it":C) if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5 fi rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp" >"po/stamp-it.tmp" sed '/^#/d s/^[[].*] *// /^[ ]*$/d '"s|^| $ac_top_srcdir/|" \ "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES" sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r po/POTFILES } ' "po/Makefile.in" >"po/Makefile" rm -f "po/Makefile.tmp" mv "po/stamp-it.tmp" "po/stamp-it" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi if test -f etc/amide.spec ; then echo "Moving SPEC file to base directory" mv etc/amide.spec ./ fi amide-1.0.5/doc/0000755000175000017500000000000012271346313013213 5ustar loeningloeningamide-1.0.5/doc/Makefile.am0000644000175000017500000000015111702661661015250 0ustar loeningloening## Process this file with automake to produce Makefile.in. SUBDIRS = \ reference DISTCLEANFILES = *~ amide-1.0.5/doc/reference/0000775000175000017500000000000012271346313015153 5ustar loeningloeningamide-1.0.5/doc/reference/version.xml.in0000664000175000017500000000002210061123002017740 0ustar loeningloening@PACKAGE_VERSION@ amide-1.0.5/doc/reference/tmpl.stamp0000664000175000017500000000001111721761603017167 0ustar loeningloeningtimestampamide-1.0.5/doc/reference/scan-build.stamp0000664000175000017500000000000011721761602020231 0ustar loeningloeningamide-1.0.5/doc/reference/setup-build.stamp0000664000175000017500000000000011721760720020445 0ustar loeningloeningamide-1.0.5/doc/reference/amitk.signals0000664000175000017500000002255411721761602017653 0ustar loeningloening AmitkCanvas::erase-volume void l AmitkCanvas *amitkcanvas AmitkRoi *arg1 gboolean arg2 AmitkCanvas::help-event void l AmitkCanvas *amitkcanvas AmitkHelpInfo arg1 AmitkPoint *arg2 gdouble arg3 AmitkCanvas::new-object void l AmitkCanvas *amitkcanvas AmitkObject *arg1 AmitkObjectType arg2 AmitkPoint *arg3 AmitkCanvas::view-changed void l AmitkCanvas *amitkcanvas AmitkPoint *arg1 gdouble arg2 AmitkCanvas::view-changing void l AmitkCanvas *amitkcanvas AmitkPoint *arg1 gdouble arg2 AmitkDataSet::color-table-changed void l AmitkDataSet *amitkdataset AmitkViewMode arg1 AmitkDataSet::color-table-independent-changed void l AmitkDataSet *amitkdataset AmitkViewMode arg1 AmitkDataSet::conversion-changed void l AmitkDataSet *amitkdataset AmitkDataSet::data-set-changed void l AmitkDataSet *amitkdataset AmitkDataSet::interpolation-changed void l AmitkDataSet *amitkdataset AmitkDataSet::invalidate-slice-cache void l AmitkDataSet *amitkdataset AmitkDataSet::modality-changed void l AmitkDataSet *amitkdataset AmitkDataSet::scale-factor-changed void l AmitkDataSet *amitkdataset AmitkDataSet::subject-orientation-changed void l AmitkDataSet *amitkdataset AmitkDataSet::subject-sex-changed void l AmitkDataSet *amitkdataset AmitkDataSet::threshold-style-changed void l AmitkDataSet *amitkdataset AmitkDataSet::thresholding-changed void l AmitkDataSet *amitkdataset AmitkDataSet::thresholds-changed void l AmitkDataSet *amitkdataset AmitkDataSet::time-changed void l AmitkDataSet *amitkdataset AmitkDataSet::view-gates-changed void l AmitkDataSet *amitkdataset AmitkDataSet::voxel-size-changed void l AmitkDataSet *amitkdataset AmitkDataSet::windows-changed void l AmitkDataSet *amitkdataset AmitkLineProfile::line-profile-changed void l AmitkLineProfile *amitklineprofile AmitkObject::object-add-child void f AmitkObject *amitkobject AmitkObject *arg1 AmitkObject::object-child-selection-changed void l AmitkObject *amitkobject AmitkObject::object-copy AmitkObject* l AmitkObject *amitkobject AmitkObject::object-copy-in-place void l AmitkObject *amitkobject AmitkObject *arg1 AmitkObject::object-name-changed void l AmitkObject *amitkobject AmitkObject::object-read-xml gpointer l AmitkObject *amitkobject gpointer arg1 gpointer arg2 gpointer arg3 AmitkObject::object-remove-child void f AmitkObject *amitkobject AmitkObject *arg1 AmitkObject::object-selection-changed void l AmitkObject *amitkobject AmitkObject::object-write-xml void l AmitkObject *amitkobject gpointer arg1 gpointer arg2 AmitkPreferences::data-set-preferences-changed void l AmitkPreferences *amitkpreferences AmitkPreferences::misc-preferences-changed void l AmitkPreferences *amitkpreferences AmitkPreferences::study-preferences-changed void l AmitkPreferences *amitkpreferences AmitkRoi::roi-changed void l AmitkRoi *amitkroi AmitkRoi::roi-type-changed void l AmitkRoi *amitkroi AmitkSpace::space-changed void l AmitkSpace *amitkspace AmitkSpace::space-invert void l AmitkSpace *amitkspace AmitkAxis arg1 AmitkPoint *arg2 AmitkSpace::space-rotate void l AmitkSpace *amitkspace AmitkPoint *arg1 gdouble arg2 AmitkPoint *arg3 AmitkSpace::space-scale void l AmitkSpace *amitkspace AmitkPoint *arg1 AmitkPoint *arg2 AmitkSpace::space-shift void l AmitkSpace *amitkspace AmitkPoint *arg1 AmitkSpace::space-transform void l AmitkSpace *amitkspace AmitkSpace *arg1 AmitkSpace::space-transform-axes void l AmitkSpace *amitkspace AmitkAxes *arg1 AmitkPoint *arg2 AmitkStudy::canvas-general-preference-changed void l AmitkStudy *amitkstudy AmitkStudy::canvas-layout-preference-changed void l AmitkStudy *amitkstudy AmitkStudy::canvas-roi-preference-changed void l AmitkStudy *amitkstudy AmitkStudy::canvas-target-changed void l AmitkStudy *amitkstudy AmitkStudy::canvas-target-preference-changed void l AmitkStudy *amitkstudy AmitkStudy::canvas-visible-changed void l AmitkStudy *amitkstudy AmitkStudy::filename-changed void l AmitkStudy *amitkstudy AmitkStudy::fov-changed void l AmitkStudy *amitkstudy AmitkStudy::fuse-type-changed void l AmitkStudy *amitkstudy AmitkStudy::panel-layout-preference-changed void l AmitkStudy *amitkstudy AmitkStudy::thickness-changed void l AmitkStudy *amitkstudy AmitkStudy::time-changed void l AmitkStudy *amitkstudy AmitkStudy::view-center-changed void l AmitkStudy *amitkstudy AmitkStudy::view-mode-changed void l AmitkStudy *amitkstudy AmitkStudy::voxel-dim-or-zoom-changed void l AmitkStudy *amitkstudy AmitkTreeView::activate-object void l AmitkTreeView *amitktreeview AmitkObject *arg1 AmitkTreeView::add-object void l AmitkTreeView *amitktreeview AmitkObject *arg1 AmitkObjectType arg2 AmitkRoiType arg3 AmitkTreeView::delete-object void l AmitkTreeView *amitktreeview AmitkObject *arg1 AmitkTreeView::help-event void l AmitkTreeView *amitktreeview AmitkHelpInfo arg1 AmitkTreeView::popup-object void l AmitkTreeView *amitktreeview AmitkObject *arg1 AmitkVolume::volume-changed void l AmitkVolume *amitkvolume AmitkVolume::volume-corner-changed void l AmitkVolume *amitkvolume AmitkPoint *arg1 AmitkVolume::volume-get-center void l AmitkVolume *amitkvolume gpointer arg1 amide-1.0.5/doc/reference/html.stamp0000664000175000017500000000001211721761613017161 0ustar loeningloeningtimestamp amide-1.0.5/doc/reference/tmpl/0000775000175000017500000000000011721762055016133 5ustar loeningloeningamide-1.0.5/doc/reference/theory.sgml0000644000175000017500000000113007527267207017356 0ustar loeningloening Theory behind the AMITK Library 1 AMITK Library Theory behind the AMITK Library Mathematical underpinnings of the AMITK Library Basics nothing written yet amide-1.0.5/doc/reference/amitk.args0000664000175000017500000000000011721761602017125 0ustar loeningloeningamide-1.0.5/doc/reference/amitk.prerequisites0000664000175000017500000000017611721761602021113 0ustar loeningloeningGtkBuildable GObject GtkOrientable GObject GtkCellLayout GObject GtkCellEditable GtkWidget GtkTreeModel GObject GIcon GObject amide-1.0.5/doc/reference/amitk-overrides.txt0000664000175000017500000000000010715014767021015 0ustar loeningloeningamide-1.0.5/doc/reference/Makefile.am0000644000175000017500000000652711703102320017202 0ustar loeningloening## Process this file with automake to produce Makefile.in # The name of the module. DOC_MODULE=amitk # The top-level SGML file. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml # Extra options to supply to gtkdoc-scan #SCAN_OPTIONS=--deprecated-guards="GTK_ENABLE_BROKEN|GTK_DISABLE_DEPRECATED" # The directory containing the source code. Relative to $(srcdir) DOC_SOURCE_DIR=../../src # Extra options to pass to gtkdoc-scangobj # SCANGOBJ_OPTIONS=--type-init-func="gtk_type_init(0)" SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-mkdb #MKDB_OPTIONS=--main-sgml-file=$(DOC_MAIN_SGML_FILE) --sgml-mode --output-format=xml MKDB_OPTIONS=--sgml-mode --output-format=xml # Extra options to supply to gtkdoc-mktmpl # e.g. MKTMPL_OPTIONS=--only-section-tmpl MKTMPL_OPTIONS= # Extra options to supply to gtkdoc-fixref #FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXREF_OPTIONS= # Used for dependencies HFILE_GLOB=$(top_srcdir)/src/*.h CFILE_GLOB=$(top_srcdir)/src/*.c # Header files to ignore when scanning IGNORE_HFILES= \ alignment_mutal_information.h \ alignment_procrustes.h \ amide_intl.h \ amitk_dial.h \ analysis.h \ dcmtk_interface.h \ fads.h \ image.h \ legacy.h \ libecat_interface.h \ libmdc_interface.h \ mpeg_encode.h \ pixmaps.h \ raw_data_import.h \ render.h \ tb_alignment.h \ tb_crop.h \ tb_fads.h \ tb_filter.h \ tb_fly_through.h \ tb_math.h \ tb_profile.h \ tb_roi_analysis.h \ ui_common.h \ ui_gate_dialog.h \ ui_preferences_dialog.h \ ui_render.h \ ui_render_dialog.h \ ui_render_movie.h \ ui_series.h \ ui_study.h \ ui_study_cb.h \ ui_study_menus.h \ ui_time_dialog.h \ xml.h ALL_OBJ_FILES= \ $(shell ls ${top_srcdir}/src/*.o) IGNORE_OBJ_FILES= \ ${top_srcdir}/src/amide.o OBJ_FILES= $(filter-out $(IGNORE_OBJ_FILES),$(ALL_OBJ_FILES)) # Images to copy into HTML directory HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) content_files = \ version.xml \ theory.sgml # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. GTKDOC_CFLAGS= \ -I$(top_srcdir)/src \ -I$(top_builddir)/src \ -I$(top_srcdir) \ -I$(top_builddir) \ $(GSL_CFLAGS) \ $(LIBFAME_CFLAGS) \ $(AMIDE_GTK_CFLAGS) \ $(AMIDE_DEBUG_CFLAGS) \ -I/usr/local/include \ $(XMEDCON_CFLAGS) \ -DG_DISABLE_DEPRECATED \ -UAMIDE_LIBDCMDATA_SUPPORT GTKDOC_LIBS= \ $(GSL_LIBS) \ $(LIBFAME_LIBS) \ $(AMIDE_LIBECAT_LIBS) \ $(AMIDE_LIBVOLPACK_LIBS) \ $(AMIDE_GTK_LIBS) \ $(XMEDCON_LIBS) \ $(FFMPEG_LIBS) \ $(AMIDE_LIBDCMDATA_LIBS) \ $(AMIDE_LDADD_WIN32) \ $(OBJ_FILES) # CFLAGS and LDFLAGS for compiling scan program. Only needed # if $(DOC_MODULE).types is non-empty. INCLUDES = \ @CFLAGS@ \ -I$(top_srcdir) \ -I$(top_builddir) \ -DAMIDE_LIBECAT_SUPPORT \ -DAMIDE_LIBMDC_SUPPORT # Extra options to supply to gtkdoc-fixref # FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html include $(top_srcdir)/gtk-doc.make # Other files to distribute EXTRA_DIST += version.xml.in CLEANFILES = \ tmpl/* \ xml/* DISTCLEANFILES = \ *~ \ amitk-sections.txt \ amitk-undocumented.txt \ amitk-decl.txt \ amitk-decl-list.txt \ amitk-scan.c \ amitk-scan.o \ amitk.types amide-1.0.5/doc/reference/tmpl-build.stamp0000664000175000017500000000000011721761603020262 0ustar loeningloeningamide-1.0.5/doc/reference/amitk-docs.sgml0000644000175000017500000001120112112211711020046 0ustar loeningloening ]> AMITK Reference Manual Andy Loening
loening at alum dot mit dot edu
2000-2013 Andy Loening Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to:
The Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and those trademarks are made aware to the members of the GNOME Documentation Project, the names have been printed in caps or initial caps.
AMITK+ Overview AMITK is an extension of the GTK library designed for handling objects of a medical imaging nature. AMITK is released under the GNU General Public License (GNU GPL). AMITK has a C-based object-oriented architecture that allows for maximum flexibility and the creation of bindings for other languages. &amitk-Theory; AMITK Core Objects &AmitkColorTable; &AmitkCommon; &AmitkFilter; &AmitkLineProfile; &AmitkObject; &AmitkPreferences; &AmitkPoint; &AmitkRawData; &AmitkSpace; &AmitkType; &AmitkVolume; AMITK Objects AMITK Object Hierarchy &index-Object-Tree; Medical Image Objects &AmitkDataSet; &AmitkFiducialMark; &AmitkRoi; &AmitkStudy; Amitk Widgets &AmitkCanvas; &AmitkCanvasObject; &AmitkColorTableMenu; &AmitkObjectDialog; &AmitkProgressDialog; &AmitkSpaceEdit; &AmitkThreshold; &AmitkTreeView; &AmitkWindowEdit;
amide-1.0.5/doc/reference/sgml.stamp0000664000175000017500000000001111721761603017155 0ustar loeningloeningtimestampamide-1.0.5/doc/reference/amitk.interfaces0000664000175000017500000000210611721761602020325 0ustar loeningloeningGtkWidget AtkImplementorIface GtkBuildable GtkContainer AtkImplementorIface GtkBuildable GtkBox AtkImplementorIface GtkBuildable GtkOrientable GtkVBox AtkImplementorIface GtkBuildable GtkOrientable AmitkCanvas AtkImplementorIface GtkBuildable GtkOrientable AmitkSpaceEdit AtkImplementorIface GtkBuildable GtkOrientable AmitkThreshold AtkImplementorIface GtkBuildable GtkOrientable AmitkWindowEdit AtkImplementorIface GtkBuildable GtkOrientable GtkBin AtkImplementorIface GtkBuildable GtkComboBox AtkImplementorIface GtkBuildable GtkCellLayout GtkCellEditable AmitkColorTableMenu AtkImplementorIface GtkBuildable GtkCellLayout GtkCellEditable GtkWindow AtkImplementorIface GtkBuildable GtkDialog AtkImplementorIface GtkBuildable AmitkObjectDialog AtkImplementorIface GtkBuildable AmitkProgressDialog AtkImplementorIface GtkBuildable AmitkThresholdDialog AtkImplementorIface GtkBuildable AmitkThresholdsDialog AtkImplementorIface GtkBuildable GtkTreeView AtkImplementorIface GtkBuildable AmitkTreeView AtkImplementorIface GtkBuildable GtkTreeViewColumn GtkCellLayout GtkBuildable GdkPixbuf GIcon amide-1.0.5/doc/reference/amitk.hierarchy0000664000175000017500000000435011721761602020163 0ustar loeningloeningGObject GInitiallyUnowned GtkObject GtkWidget GtkContainer GtkBox GtkVBox AmitkCanvas AmitkSpaceEdit AmitkThreshold AmitkWindowEdit GtkBin GtkComboBox AmitkColorTableMenu GtkWindow GtkDialog AmitkObjectDialog AmitkProgressDialog AmitkThresholdDialog AmitkThresholdsDialog GtkTreeView AmitkTreeView GtkAdjustment GtkTreeViewColumn AmitkSpace AmitkObject AmitkVolume AmitkDataSet AmitkRoi AmitkFiducialMark AmitkStudy AmitkLineProfile AmitkPreferences AmitkRawData GtkStyle GdkDrawable GdkWindow GdkDragContext GtkTooltip GdkScreen GdkPixbuf GInterface GTypePlugin AtkImplementorIface GtkBuildable GtkOrientable GtkCellLayout GtkCellEditable GtkTreeModel GIcon GBoxed GValueArray AmitkAxes AmitkCanvasPoint AmitkCorners AmitkPixel AmitkPoint AmitkVoxel GtkRequisition GdkRectangle GdkEvent GtkSelectionData GdkColor GtkBorder GtkTreePath GtkTreeIter GStrv GEnum AmitkAxis AmitkCanvasTargetAction AmitkCanvasType AmitkColorTable AmitkConversion AmitkCylinderUnit AmitkDim AmitkDoseUnit AmitkFilter AmitkFormat AmitkFuseType AmitkHelpInfo AmitkInterpolation AmitkLayout AmitkLengthUnit AmitkLimit AmitkModality AmitkObjectType AmitkOperation AmitkPanelLayout AmitkRawFormat AmitkRoiIsocontourRange AmitkRoiType AmitkScalingType AmitkSelection AmitkSubjectOrientation AmitkSubjectSex AmitkThresholdArrow AmitkThresholdEntry AmitkThresholdLayout AmitkThresholdLine AmitkThresholdScale AmitkThresholdStyle AmitkThresholding AmitkTreeViewMode AmitkView AmitkViewMode AmitkWeightUnit AmitkWhichDefaultDirectory AmitkWindow GdkExtensionMode GtkStateType GtkTextDirection GtkDirectionType GtkDragResult GtkWidgetHelpType GtkResizeMode GtkOrientation GtkPackType GtkScrollType GtkSensitivityType GtkShadowType GtkWindowType GtkWindowPosition GdkWindowTypeHint GdkGravity GtkTreeViewGridLines GtkMovementStep amide-1.0.5/doc/reference/html-build.stamp0000664000175000017500000000000011721761613020253 0ustar loeningloeningamide-1.0.5/doc/reference/sgml-build.stamp0000664000175000017500000000000011721761603020250 0ustar loeningloeningamide-1.0.5/doc/reference/Makefile.in0000664000175000017500000006764512271346300017236 0ustar loeningloening# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/gtk-doc.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/mkinstalldirs \ $(srcdir)/version.xml.in subdir = doc/reference ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/libfame.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/amide_config.h CONFIG_CLEAN_FILES = version.xml CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMIDE_CHECK_OBSOLETE_CFLAGS = @AMIDE_CHECK_OBSOLETE_CFLAGS@ AMIDE_DEBUG_CFLAGS = @AMIDE_DEBUG_CFLAGS@ AMIDE_GTK_CFLAGS = @AMIDE_GTK_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_CFLAGS = @AMIDE_GTK_EXTRA_GCONF_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_LIBS = @AMIDE_GTK_EXTRA_GCONF_LIBS@ AMIDE_GTK_EXTRA_GVFS_CFLAGS = @AMIDE_GTK_EXTRA_GVFS_CFLAGS@ AMIDE_GTK_EXTRA_GVFS_LIBS = @AMIDE_GTK_EXTRA_GVFS_LIBS@ AMIDE_GTK_LIBS = @AMIDE_GTK_LIBS@ AMIDE_LIBDCMDATA_CFLAGS = @AMIDE_LIBDCMDATA_CFLAGS@ AMIDE_LIBDCMDATA_LIBS = @AMIDE_LIBDCMDATA_LIBS@ AMIDE_LIBECAT_LIBS = @AMIDE_LIBECAT_LIBS@ AMIDE_LIBVOLPACK_LIBS = @AMIDE_LIBVOLPACK_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HELP_DIR = @HELP_DIR@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFAME_CFLAGS = @LIBFAME_CFLAGS@ LIBFAME_CONFIG = @LIBFAME_CONFIG@ LIBFAME_LIBS = @LIBFAME_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ OPTIMIZATION_CFLAGS = @OPTIMIZATION_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMEDCON_CFLAGS = @XMEDCON_CFLAGS@ XMEDCON_CONFIG = @XMEDCON_CONFIG@ XMEDCON_LIBS = @XMEDCON_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ intltool__v_merge_options_ = @intltool__v_merge_options_@ intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ libgnomecanvas_greater_than_230_CFLAGS = @libgnomecanvas_greater_than_230_CFLAGS@ libgnomecanvas_greater_than_230_LIBS = @libgnomecanvas_greater_than_230_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # The name of the module. DOC_MODULE = amitk # The top-level SGML file. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # Extra options to supply to gtkdoc-scan #SCAN_OPTIONS=--deprecated-guards="GTK_ENABLE_BROKEN|GTK_DISABLE_DEPRECATED" # The directory containing the source code. Relative to $(srcdir) DOC_SOURCE_DIR = ../../src # Extra options to pass to gtkdoc-scangobj # SCANGOBJ_OPTIONS=--type-init-func="gtk_type_init(0)" SCANGOBJ_OPTIONS = # Extra options to supply to gtkdoc-mkdb #MKDB_OPTIONS=--main-sgml-file=$(DOC_MAIN_SGML_FILE) --sgml-mode --output-format=xml MKDB_OPTIONS = --sgml-mode --output-format=xml # Extra options to supply to gtkdoc-mktmpl # e.g. MKTMPL_OPTIONS=--only-section-tmpl MKTMPL_OPTIONS = # Extra options to supply to gtkdoc-fixref #FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXREF_OPTIONS = # Used for dependencies HFILE_GLOB = $(top_srcdir)/src/*.h CFILE_GLOB = $(top_srcdir)/src/*.c # Header files to ignore when scanning IGNORE_HFILES = \ alignment_mutal_information.h \ alignment_procrustes.h \ amide_intl.h \ amitk_dial.h \ analysis.h \ dcmtk_interface.h \ fads.h \ image.h \ legacy.h \ libecat_interface.h \ libmdc_interface.h \ mpeg_encode.h \ pixmaps.h \ raw_data_import.h \ render.h \ tb_alignment.h \ tb_crop.h \ tb_fads.h \ tb_filter.h \ tb_fly_through.h \ tb_math.h \ tb_profile.h \ tb_roi_analysis.h \ ui_common.h \ ui_gate_dialog.h \ ui_preferences_dialog.h \ ui_render.h \ ui_render_dialog.h \ ui_render_movie.h \ ui_series.h \ ui_study.h \ ui_study_cb.h \ ui_study_menus.h \ ui_time_dialog.h \ xml.h ALL_OBJ_FILES = \ $(shell ls ${top_srcdir}/src/*.o) IGNORE_OBJ_FILES = \ ${top_srcdir}/src/amide.o OBJ_FILES = $(filter-out $(IGNORE_OBJ_FILES),$(ALL_OBJ_FILES)) # Images to copy into HTML directory HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) content_files = \ version.xml \ theory.sgml # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. GTKDOC_CFLAGS = \ -I$(top_srcdir)/src \ -I$(top_builddir)/src \ -I$(top_srcdir) \ -I$(top_builddir) \ $(GSL_CFLAGS) \ $(LIBFAME_CFLAGS) \ $(AMIDE_GTK_CFLAGS) \ $(AMIDE_DEBUG_CFLAGS) \ -I/usr/local/include \ $(XMEDCON_CFLAGS) \ -DG_DISABLE_DEPRECATED \ -UAMIDE_LIBDCMDATA_SUPPORT GTKDOC_LIBS = \ $(GSL_LIBS) \ $(LIBFAME_LIBS) \ $(AMIDE_LIBECAT_LIBS) \ $(AMIDE_LIBVOLPACK_LIBS) \ $(AMIDE_GTK_LIBS) \ $(XMEDCON_LIBS) \ $(FFMPEG_LIBS) \ $(AMIDE_LIBDCMDATA_LIBS) \ $(AMIDE_LDADD_WIN32) \ $(OBJ_FILES) # CFLAGS and LDFLAGS for compiling scan program. Only needed # if $(DOC_MODULE).types is non-empty. INCLUDES = \ @CFLAGS@ \ -I$(top_srcdir) \ -I$(top_builddir) \ -DAMIDE_LIBECAT_SUPPORT \ -DAMIDE_LIBMDC_SUPPORT @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt # Extra options to supply to gtkdoc-fixref # FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html # Other files to distribute EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) version.xml.in DOC_STAMPS = setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ tmpl.stamp sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = \ tmpl/* \ xml/* @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp #### setup #### GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; #### scan #### GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; #### templates #### GTK_DOC_V_TMPL = $(GTK_DOC_V_TMPL_$(V)) GTK_DOC_V_TMPL_ = $(GTK_DOC_V_TMPL_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_TMPL_0 = @echo " DOC Rebuilding template files"; #### xml #### GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0 = @echo " DOC Building XML"; #### html #### GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; #### pdf #### GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; DISTCLEANFILES = \ *~ \ amitk-sections.txt \ amitk-undocumented.txt \ amitk-decl.txt \ amitk-decl-list.txt \ amitk-scan.c \ amitk-scan.o \ amitk.types all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/reference/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/reference/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/gtk-doc.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local cscopelist-am ctags-am dist-hook \ distclean distclean-generic distclean-libtool distclean-local \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-data-local \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-local @ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) @ENABLE_GTK_DOC_FALSE@all-local: docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ test -f $(abs_srcdir)/$$file && \ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ test -d $(abs_srcdir)/tmpl && \ { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ chmod -R u+w $(abs_builddir)/tmpl; } \ fi $(AM_V_at)touch setup-build.stamp scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ if test -w $(abs_srcdir) ; then \ cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ fi \ fi $(AM_V_at)touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true $(srcdir)/tmpl/*.sgml: @true sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) $(GTK_DOC_V_XML)-chmod -R u+w $(srcdir) && _source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/html; \ fi; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ rm -rf tmpl; \ fi maintainer-clean-local: @rm -rf xml html install-data-local: @installfiles=`echo $(builddir)/html/*`; \ if test "$$installfiles" = '$(builddir)/html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: docs @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local @mkdir $(distdir)/tmpl @mkdir $(distdir)/html @-cp ./tmpl/*.sgml $(distdir)/tmpl @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: amide-1.0.5/doc/README0000664000175000017500000000100511703102615014063 0ustar loeningloening In the doc/reference directory is a Makefile and supporting files to generate basic API documentation for the "toolkit" portion of AMIDE. Currently, this toolkit is not distributed as an independent library, so this documentation is of limited utility and is only regenerated intermittently. The API documentation generation is based on that used for gtk. It can be enabled with the --enable-gtk-doc configuration switch. As of 2012.01.10, it does not build correctly if libdcmdata support is also configured in. amide-1.0.5/doc/Makefile.in0000664000175000017500000005105312271346300015262 0ustar loeningloening# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/libfame.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/amide_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMIDE_CHECK_OBSOLETE_CFLAGS = @AMIDE_CHECK_OBSOLETE_CFLAGS@ AMIDE_DEBUG_CFLAGS = @AMIDE_DEBUG_CFLAGS@ AMIDE_GTK_CFLAGS = @AMIDE_GTK_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_CFLAGS = @AMIDE_GTK_EXTRA_GCONF_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_LIBS = @AMIDE_GTK_EXTRA_GCONF_LIBS@ AMIDE_GTK_EXTRA_GVFS_CFLAGS = @AMIDE_GTK_EXTRA_GVFS_CFLAGS@ AMIDE_GTK_EXTRA_GVFS_LIBS = @AMIDE_GTK_EXTRA_GVFS_LIBS@ AMIDE_GTK_LIBS = @AMIDE_GTK_LIBS@ AMIDE_LIBDCMDATA_CFLAGS = @AMIDE_LIBDCMDATA_CFLAGS@ AMIDE_LIBDCMDATA_LIBS = @AMIDE_LIBDCMDATA_LIBS@ AMIDE_LIBECAT_LIBS = @AMIDE_LIBECAT_LIBS@ AMIDE_LIBVOLPACK_LIBS = @AMIDE_LIBVOLPACK_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HELP_DIR = @HELP_DIR@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFAME_CFLAGS = @LIBFAME_CFLAGS@ LIBFAME_CONFIG = @LIBFAME_CONFIG@ LIBFAME_LIBS = @LIBFAME_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ OPTIMIZATION_CFLAGS = @OPTIMIZATION_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMEDCON_CFLAGS = @XMEDCON_CFLAGS@ XMEDCON_CONFIG = @XMEDCON_CONFIG@ XMEDCON_LIBS = @XMEDCON_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ intltool__v_merge_options_ = @intltool__v_merge_options_@ intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ libgnomecanvas_greater_than_230_CFLAGS = @libgnomecanvas_greater_than_230_CFLAGS@ libgnomecanvas_greater_than_230_LIBS = @libgnomecanvas_greater_than_230_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = \ reference DISTCLEANFILES = *~ all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: amide-1.0.5/amide_config.h.in0000664000175000017500000000632012271034746015637 0ustar loeningloening/* amide_config.h.in. Generated from configure.ac by autoheader. */ /* Define to compile with checks for obsolete GLib/GTK functions */ #undef AMIDE_CHECK_OBSOLETE /* Define to compile AMIDE with debugging information */ #undef AMIDE_DEBUG /* Define to compile with ffmpeg */ #undef AMIDE_FFMPEG_SUPPORT /* Define to compile with DCMTK */ #undef AMIDE_LIBDCMDATA_SUPPORT /* Define to compile with libecat */ #undef AMIDE_LIBECAT_SUPPORT /* Define to compile with Libfame */ #undef AMIDE_LIBFAME_SUPPORT /* Define to compile AMIDE with an antialiased canvas */ #undef AMIDE_LIBGNOMECANVAS_AA /* Define to compile with the GNU Scientific Library */ #undef AMIDE_LIBGSL_SUPPORT /* Define to compile with (X)MedCon */ #undef AMIDE_LIBMDC_SUPPORT /* Define to compile with VolPack */ #undef AMIDE_LIBVOLPACK_SUPPORT /* Define to compile with native GTK support on Mac OS X */ #undef AMIDE_NATIVE_GTK_OSX /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Define the gettext package to be used */ #undef GETTEXT_PACKAGE /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strptime' function. */ #undef HAVE_STRPTIME /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION amide-1.0.5/NEWS0000664000175000017500000000004507570754203013155 0ustar loeningloeningNo news here. Check the ChangeLog. amide-1.0.5/INSTALL0000644000175000017500000003660512235260752013513 0ustar loeningloeningInstallation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. amide-1.0.5/missing0000755000175000017500000001533112235260752014052 0ustar loeningloening#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2012-06-26.16; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'automa4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: amide-1.0.5/aclocal.m40000664000175000017500000025302612271346277014331 0ustar loeningloening# generated automatically by aclocal 1.13.4 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *-*-openbsd*) CATOBJEXT=.mo DATADIRNAME=share ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.ac. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_ac,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) # Configure path for the GNU Scientific Library # Christopher R. Gabriel , April 2000 AC_DEFUN([AX_PATH_GSL], [ AC_ARG_WITH(gsl-prefix,[ --with-gsl-prefix=PFX Prefix where GSL is installed (optional)], gsl_prefix="$withval", gsl_prefix="") AC_ARG_WITH(gsl-exec-prefix,[ --with-gsl-exec-prefix=PFX Exec prefix where GSL is installed (optional)], gsl_exec_prefix="$withval", gsl_exec_prefix="") AC_ARG_ENABLE(gsltest, [ --disable-gsltest Do not try to compile and run a test GSL program], , enable_gsltest=yes) if test "x${GSL_CONFIG+set}" != xset ; then if test "x$gsl_prefix" != x ; then GSL_CONFIG="$gsl_prefix/bin/gsl-config" fi if test "x$gsl_exec_prefix" != x ; then GSL_CONFIG="$gsl_exec_prefix/bin/gsl-config" fi fi AC_PATH_PROG(GSL_CONFIG, gsl-config, no) min_gsl_version=ifelse([$1], ,0.2.5,$1) AC_MSG_CHECKING(for GSL - version >= $min_gsl_version) no_gsl="" if test "$GSL_CONFIG" = "no" ; then no_gsl=yes else GSL_CFLAGS=`$GSL_CONFIG --cflags` GSL_LIBS=`$GSL_CONFIG --libs` gsl_major_version=`$GSL_CONFIG --version | \ sed 's/^\([[0-9]]*\).*/\1/'` if test "x${gsl_major_version}" = "x" ; then gsl_major_version=0 fi gsl_minor_version=`$GSL_CONFIG --version | \ sed 's/^\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\).*/\2/'` if test "x${gsl_minor_version}" = "x" ; then gsl_minor_version=0 fi gsl_micro_version=`$GSL_CONFIG --version | \ sed 's/^\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\).*/\3/'` if test "x${gsl_micro_version}" = "x" ; then gsl_micro_version=0 fi if test "x$enable_gsltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GSL_CFLAGS" LIBS="$LIBS $GSL_LIBS" rm -f conf.gsltest AC_TRY_RUN([ #include #include #include char* my_strdup (const char *str); char* my_strdup (const char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (void) { int major = 0, minor = 0, micro = 0; int n; char *tmp_version; system ("touch conf.gsltest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_gsl_version"); n = sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) ; if (n != 2 && n != 3) { printf("%s, bad version string\n", "$min_gsl_version"); exit(1); } if (($gsl_major_version > major) || (($gsl_major_version == major) && ($gsl_minor_version > minor)) || (($gsl_major_version == major) && ($gsl_minor_version == minor) && ($gsl_micro_version >= micro))) { exit(0); } else { exit(1); } } ],, no_gsl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gsl" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GSL_CONFIG" = "no" ; then echo "*** The gsl-config script installed by GSL could not be found" echo "*** If GSL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GSL_CONFIG environment variable to the" echo "*** full path to gsl-config." else if test -f conf.gsltest ; then : else echo "*** Could not run GSL test program, checking why..." CFLAGS="$CFLAGS $GSL_CFLAGS" LIBS="$LIBS $GSL_LIBS" AC_TRY_LINK([ #include ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GSL or finding the wrong" echo "*** version of GSL. If it is not finding GSL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GSL was incorrectly installed" echo "*** or that you have moved GSL since it was installed. In the latter case, you" echo "*** may want to edit the gsl-config script: $GSL_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi # GSL_CFLAGS="" # GSL_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GSL_CFLAGS) AC_SUBST(GSL_LIBS) rm -f conf.gsltest ]) AU_ALIAS([AM_PATH_GSL], [AX_PATH_GSL]) dnl -*- mode: autoconf -*- # serial 1 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first dnl check for tools we added during development AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) dnl for overriding the documentation installation directory AC_ARG_WITH([html-dir], AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST([HTML_DIR]) dnl enable/disable documentation building AC_ARG_ENABLE([gtk-doc], AS_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) if test x$enable_gtk_doc = xyes; then ifelse([$1],[], [PKG_CHECK_EXISTS([gtk-doc],, AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) dnl don't check for glib if we build glib if test "x$PACKAGE_NAME" != "xglib"; then dnl don't fail if someone does not have glib PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) fi fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) dnl enable/disable output formats AC_ARG_ENABLE([gtk-doc-html], AS_HELP_STRING([--enable-gtk-doc-html], [build documentation in html format [[default=yes]]]),, [enable_gtk_doc_html=yes]) AC_ARG_ENABLE([gtk-doc-pdf], AS_HELP_STRING([--enable-gtk-doc-pdf], [build documentation in pdf format [[default=no]]]),, [enable_gtk_doc_pdf=no]) if test -z "$GTKDOC_MKPDF"; then enable_gtk_doc_pdf=no fi if test -z "$AM_DEFAULT_VERBOSITY"; then AM_DEFAULT_VERBOSITY=1 fi AC_SUBST([AM_DEFAULT_VERBOSITY]) AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) ]) dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) # serial 42 IT_PROG_INTLTOOL AC_DEFUN([IT_PROG_INTLTOOL], [ AC_PREREQ([2.50])dnl AC_REQUIRE([AM_NLS])dnl case "$am__api_version" in 1.[01234]) AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) ;; *) ;; esac INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` if test -n "$1"; then AC_MSG_CHECKING([for intltool >= $1]) AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) fi AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) fi if test -z "$AM_DEFAULT_VERBOSITY"; then AM_DEFAULT_VERBOSITY=1 fi AC_SUBST([AM_DEFAULT_VERBOSITY]) INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))' INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))' INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;' AC_SUBST(INTLTOOL_V_MERGE) AC_SUBST(INTLTOOL__v_MERGE_) AC_SUBST(INTLTOOL__v_MERGE_0) INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))' intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))' intltool__v_merge_options_0='-q' AC_SUBST(INTLTOOL_V_MERGE_OPTIONS) AC_SUBST(intltool__v_merge_options_) AC_SUBST(intltool__v_merge_options_0) INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@' else INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir' fi INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' _IT_SUBST(INTLTOOL_DESKTOP_RULE) _IT_SUBST(INTLTOOL_DIRECTORY_RULE) _IT_SUBST(INTLTOOL_KEYS_RULE) _IT_SUBST(INTLTOOL_PROP_RULE) _IT_SUBST(INTLTOOL_OAF_RULE) _IT_SUBST(INTLTOOL_PONG_RULE) _IT_SUBST(INTLTOOL_SERVER_RULE) _IT_SUBST(INTLTOOL_SHEET_RULE) _IT_SUBST(INTLTOOL_SOUNDLIST_RULE) _IT_SUBST(INTLTOOL_UI_RULE) _IT_SUBST(INTLTOOL_XAM_RULE) _IT_SUBST(INTLTOOL_KBD_RULE) _IT_SUBST(INTLTOOL_XML_RULE) _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) _IT_SUBST(INTLTOOL_CAVES_RULE) _IT_SUBST(INTLTOOL_SCHEMAS_RULE) _IT_SUBST(INTLTOOL_THEME_RULE) _IT_SUBST(INTLTOOL_SERVICE_RULE) _IT_SUBST(INTLTOOL_POLICY_RULE) # Check the gettext tools to make sure they are GNU AC_PATH_PROG(XGETTEXT, xgettext) AC_PATH_PROG(MSGMERGE, msgmerge) AC_PATH_PROG(MSGFMT, msgfmt) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi AC_PATH_PROG(INTLTOOL_PERL, perl) if test -z "$INTLTOOL_PERL"; then AC_MSG_ERROR([perl not found]) fi AC_MSG_CHECKING([for perl >= 5.8.1]) $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 if test $? -ne 0; then AC_MSG_ERROR([perl 5.8.1 is required for intltool]) else IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"` AC_MSG_RESULT([$IT_PERL_VERSION]) fi if test "x$2" != "xno-xml"; then AC_MSG_CHECKING([for XML::Parser]) if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then AC_MSG_RESULT([ok]) else AC_MSG_ERROR([XML::Parser perl module is required for intltool]) fi fi # Substitute ALL_LINGUAS so we can use it in po/Makefile AC_SUBST(ALL_LINGUAS) # Set DATADIRNAME correctly if it is not set yet # (copied from glib-gettext.m4) if test -z "$DATADIRNAME"; then AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr]])], [DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share dnl in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [DATADIRNAME=share], [DATADIRNAME=lib]) ;; *) [DATADIRNAME=lib] ;; esac]) fi AC_SUBST(DATADIRNAME) IT_PO_SUBDIR([po]) ]) # IT_PO_SUBDIR(DIRNAME) # --------------------- # All po subdirs have to be declared with this macro; the subdir "po" is # declared by IT_PROG_INTLTOOL. # AC_DEFUN([IT_PO_SUBDIR], [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. dnl dnl The following CONFIG_COMMANDS should be executed at the very end dnl of config.status. AC_CONFIG_COMMANDS_PRE([ AC_CONFIG_COMMANDS([$1/stamp-it], [ if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) fi rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" >"$1/stamp-it.tmp" [sed '/^#/d s/^[[].*] *// /^[ ]*$/d '"s|^| $ac_top_srcdir/|" \ "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" ] [sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r $1/POTFILES } ' "$1/Makefile.in" >"$1/Makefile"] rm -f "$1/Makefile.tmp" mv "$1/stamp-it.tmp" "$1/stamp-it" ]) ])dnl ]) # _IT_SUBST(VARIABLE) # ------------------- # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST # AC_DEFUN([_IT_SUBST], [ AC_SUBST([$1]) m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) ] ) # deprecated macros AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) # A hint is needed for aclocal from Automake <= 1.9.4: # AC_DEFUN([AC_PROG_INTLTOOL], ...) # nls.m4 serial 5 (gettext-0.18) dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ([2.50]) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE([nls], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT([$USE_NLS]) AC_SUBST([USE_NLS]) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_INSTALLDIR # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------- # Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])# PKG_CHECK_VAR # Configure paths for (X)MedCon library # fix by Hannes Hofmann 2007-06-28 for more than 3 version numbers # stolen from Elliot Lee 2000-01-10 # stolen from Raph Levien 98-11-18 # stolen from Manish Singh 98-9-30 # stolen back from Frank Belew # stolen from Manish Singh # Shamelessly stolen from Owen Taylor dnl AM_PATH_XMEDCON([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for XMEDCON, and define XMEDCON_CFLAGS and XMEDCON_LIBS dnl AC_DEFUN([AM_PATH_XMEDCON], [dnl dnl Get the cflags and libraries from the xmedcon-config script dnl AC_ARG_WITH(xmedcon-prefix,[ --with-xmedcon-prefix=PFX Prefix where XMEDCON is installed (optional)], xmedcon_prefix="$withval", xmedcon_prefix="") AC_ARG_WITH(xmedcon-exec-prefix,[ --with-xmedcon-exec-prefix=PFX Exec prefix where XMEDCON is installed (optional)], xmedcon_exec_prefix="$withval", xmedcon_exec_prefix="") AC_ARG_ENABLE(xmedcontest, [ --disable-xmedcontest Do not try to compile and run a test XMEDCON program], , enable_xmedcontest=yes) if test x$xmedcon_exec_prefix != x ; then xmedcon_args="$xmedcon_args --exec-prefix=$xmedcon_exec_prefix" if test x${XMEDCON_CONFIG+set} = xset ; then XMEDCON_CONFIG=$xmedcon_exec_prefix/xmedcon-config fi fi if test x$xmedcon_prefix != x ; then xmedcon_args="$xmedcon_args --prefix=$xmedcon_prefix" if test x${XMEDCON_CONFIG+set} = xset ; then XMEDCON_CONFIG=$xmedcon_prefix/bin/xmedcon-config fi fi AC_PATH_PROG(XMEDCON_CONFIG, xmedcon-config, no) min_xmedcon_version=ifelse([$1], ,0.5.2,$1) AC_MSG_CHECKING(for XMEDCON - version >= $min_xmedcon_version) no_xmedcon="" if test "$XMEDCON_CONFIG" = "no" ; then no_xmedcon=yes else XMEDCON_CFLAGS=`$XMEDCON_CONFIG $xmedconconf_args --cflags` XMEDCON_LIBS=`$XMEDCON_CONFIG $xmedconconf_args --libs` xmedcon_major_version=`$XMEDCON_CONFIG $xmedcon_args --version | \ sed 's/^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` xmedcon_minor_version=`$XMEDCON_CONFIG $xmedcon_args --version | \ sed 's/^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` xmedcon_micro_version=`$XMEDCON_CONFIG $xmedcon_config_args --version | \ sed 's/^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` if test "x$enable_xmedcontest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $XMEDCON_CFLAGS" LIBS="$LIBS $XMEDCON_LIBS" dnl dnl Now check if the installed XMEDCON is sufficiently new. (Also sanity dnl checks the results of xmedcon-config to some extent dnl rm -f conf.xmedcontest AC_TRY_RUN([ #include #include #include #include char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *) malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main () { int major, minor, micro; char *tmp_version; system ("touch conf.xmedcontest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_xmedcon_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_xmedcon_version"); exit(1); } if (($xmedcon_major_version > major) || (($xmedcon_major_version == major) && ($xmedcon_minor_version > minor)) || (($xmedcon_major_version == major) && ($xmedcon_minor_version == minor) && ($xmedcon_micro_version >= micro))) { return 0; } else { printf("\n*** 'xmedcon-config --version' returned %d.%d.%d, but the minimum version\n", $xmedcon_major_version, $xmedcon_minor_version, $xmedcon_micro_version); printf("*** of XMEDCON required is %d.%d.%d. If xmedcon-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If xmedcon-config was wrong, set the environment variable XMEDCON_CONFIG\n"); printf("*** to point to the correct copy of xmedcon-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } ],, no_xmedcon=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_xmedcon" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$XMEDCON_CONFIG" = "no" ; then echo "*** The xmedcon-config script installed by XMEDCON could not be found" echo "*** If XMEDCON was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the XMEDCON_CONFIG environment variable to the" echo "*** full path to xmedcon-config." else if test -f conf.xmedcontest ; then : else echo "*** Could not run XMEDCON test program, checking why..." CFLAGS="$CFLAGS $XMEDCON_CFLAGS" LIBS="$LIBS $XMEDCON_LIBS" AC_TRY_LINK([ #include #include ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding XMEDCON or finding the wrong" echo "*** version of XMEDCON. If it is not finding XMEDCON, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means XMEDCON was incorrectly installed" echo "*** or that you have moved XMEDCON since it was installed. In the latter case, you" echo "*** may want to edit the xmedcon-config script: $XMEDCON_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi XMEDCON_CFLAGS="" XMEDCON_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(XMEDCON_CFLAGS) AC_SUBST(XMEDCON_LIBS) rm -f conf.xmedcontest ]) # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.13.4], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.4])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/gnome-doc-utils.m4]) m4_include([m4/libfame.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) amide-1.0.5/install-sh0000755000175000017500000003325512235260752014464 0ustar loeningloening#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: amide-1.0.5/mkinstalldirs0000755000175000017500000000672212235260752015265 0ustar loeningloening#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the 'mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because '.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: amide-1.0.5/Makefile.am0000644000175000017500000000074512235261275014513 0ustar loeningloeningACLOCAL_AMFLAGS = -I m4 if DISABLE_DOC HELPDIR = else HELPDIR = help endif # note, win32 needs to be before src SUBDIRS = \ pixmaps \ win32 \ macosx \ src \ doc \ man \ po \ etc \ $(HELPDIR) EXTRA_DIST = \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ gnome-doc-utils.make \ m4 CLEANFILES = \ intltool-extract \ intltool-merge \ intltool-update DISTCLEANFILES = *~ DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --enable-gtk-doc amide-1.0.5/ChangeLog0000664000175000017500000013111712271037054014225 0ustar loeningloening1.0.5 2014.01.25 * raw_data_import now shows correct file size if file > 2GB * new math functions: remove-negatives, t2* calc * increased bitrate of ffmpeg encoding by 5-fold * fixed func definition for amitk_color_table_menu_new [1] * default ROI transparency increased to 0.5 * switch to non-deprecated libavcodec functions [1] * various edits for hardening using strings [1] * workaround for gtk+ bug of endless loop when spin buttons in toolbars are double or triple clicked * remove "inline" on functions in amitk_point and amitk_space, was causing issues with clang on osx as wasn't C99 compliant, and didn't seem to increase speed as -O2 optimization probably already inlines these [1] Reported by Andreas Tille 1.0.4 2012.11.20 * fixed exporting views, height incorrectly substituted with width * initialize scaling_intercept to 0 when creating new data set - was problem importing DICOM on Mac, as mem not init'ed to 0 * amide_gconf_set_float had bug on OS X, only saved integer value - seen as error in export dataset - wrong voxel size [1] [1] Reported by Daniel Vonwil 1.0.3 2012.10.04 * reinabling gnomecanvas antialiased support, hopefully now stable - roi's now filled in, alpha of fill can be customized * resets view center if initial dataset loaded * error message dialog now scrollable, so won't cover entire screen * added "threshold" and "multiple" math operations * autoplay feature for flipping between gates on gated study * reexpanded the local slice cache size, now 3 * # frames or gates * now keeps track of gate times (dicom trigger time) * when reading in xmedcon, tries to use orientation/offset provided for DICM data, and orientation for ECAT. * fixed scroll wheel on win32 (required libgnomecanvas-2.30.3) * now able to specify colors of ROIs and fiducial marks [1] * added a tool for measuring distances between fiducials/ROIs [2] * ffmpeg library fix, switch avcodec_init to avcodec_register_all [3] [1] Requested by Ajay Kumar and Janet O'Sullivan [2] Requested by Josef Vizkelety, Michael Braden, A. Mehranian, etc. [3] Contributed by Peter Bloomfield 1.0.2 2012.04.27 * Added MIP and MINIP rendering methods for thick slices * mac bundle now is able to export JPEG images [1] * will now separate diffusion data into two volumes * enabled scrollwheel use on canvases * widend the tree box * mutual information alignment now handles negative values * cleaned up spec file * zh_TW translation file [2] * fixed several bugs related to translations * thickness now not overwritten when loading in .xif * try to read in DICOMDIR files with lower/upper case reference issues * canvas slice cache size now fixed, was getting too large if multiple datasets * nearest neighbor/trilinear algorithm now more graceful at data set edges * POINT_TO_VOXEL macro now casts instead of floor, slight speed boost for slicing * configure fix to us LIBS instead of LDFLAGS for dcmtk detection [3] [1] Noticed by Youngho Seo [2] contributed by William Chao [3] contributed by Gert Wollny 1.0.1 2011.11.11 * conversion between different raw data formats in dcmtk_export no longer fails * data_set_copy_in_place no longer forces calculation of max/min values * now reads in injected dose correctly from DCMTK [1] * default injected dose/weight now NaN * additional tags in exported DICOM files for compliance [2] * "default directory" preference fixed [3] * added preference to utilize exec directory as default * will now separate multi-TI dicom data * added flat-file preferences (used on mac os x) [1] Noticed by Wangxi Hai [2] Requested by Chih-Ann Yang [3] Noticed by Victor Yushmanov 1.0.0 2011.07.22 * fixed color table for inverse hot metal contour * fixed uninitialized iterator in data_set_reduce_scaling_dimensions [1] * fixed manual entry of voxel size on tb_export_data_set dialog [2] * updated configure.in for 3.6.0 [3] * zoom no longer corrupted if no data sets [4] * fixed orientation errors on dcmtk_export [5] * added a mutual information alignment algorithm [6] * updates to Mac OSX package to allow saving prefs [7] [1] Encountered by Done Ugarte [2] Noticed by Morton Ostergard [3] Noticed by Wolfgang Pichl [4] Noticed by Erik Nolf [5] Noticed by Chih-Ann Yang [6] Contribution by Ian Miller [7] Noticed by Janet O'Sullivan 0.9.3 2011.03.06 * altered ffmpeg include paths for compiling on non-fedora systems [1] * more gtk deprecated cleanups [2] * converted GtkFileSelection to GtkFileChooserDialog * got rid of AmitkXifSel widget (old GTK code) * saving studies as XIF directories now done via a separate File menu item removed "save as XIF directory" preference * use xmedcon's pixdim[4] for frame duration on static analyze [3] * incorrect initialization of affine[] in amitk_canvas (also noted by [4]) * we're dependent on gtk >= 2.16 [4] * updates for dcmtk 3.6.0 * multiframe dicom file support via DCMTK [5] * problems deleting objects in amitk_tree_view [6] * exporting in mac os x version broken due to dbus issues [7] [1] Suggested by Peter Bloomfield [2] Suggested by Ian Miller [3] Suggested by Felix Gremse [4] Found by Henrique Rocha [5] Suggested by Robert Miletich [6] Found by Otto Muzik [7] Found by Jul Lea 0.9.2 2009.12.17 * switched from libfame based mpeg encoding to ffmpeg * more acurate gnome-vfs/gconf requirements in configure [1] * fixed error compiling without DCMTK [2] * fixed error with warning message strings containing '%' [3] * G_DISABLE_DEPRECATED and GTK_DISABLE_DEPRECATED now off by default [4] * Fix on win32 DCMTK build to allow exporting DICOM on win32 [1] Suggested by Peter Bloomfield [2] Found by Marko Kauzlaric [3] Found by Kris Thielemans [4] Found by Wolfram Brenig [5] Found by Joe Paugh 0.9.1 2007.12.16 * added gtk_disable_locale on win32 to keep i18n from screwing up * import raw on win32 was crashing due to NULL string [1] * transformed help docs into gnome-doc-utils format * fixed .spec file, rpm build now working again [1] Found by Kai-Hsiang Chuang 0.9.0 2007.12.02 * removing gtk 2.2 dependencies, now dependent on gtk >= 2.10 -gtk_option_menu switched to gtk_combo -gnome_config use switched to GConf on unix -config settings now saved in registry on win32 -bug with dragging of off canvases now gone * removed dependencies on libgnome and libgnomeui -GNOMEUI menu/toolbar switched to GtkAction -GnomeDruid replaced with GtkAssistant -gnome_program_init replaced with gtk_init * amitk_space_transform now propagates correctly through children * xpm icons removed, all icons now from .h pixbuf data * dicom import now reads in full series date and time [1] * now can export data sets via libdcmdata [2,3] * fixed errors with cropping type conversion * change Categories in .desktop file [4] * extended math capabilities for multi-frame data sets [5] * changed labeling of %ID/g to %ID/cc to make explicit [6] [1] Requested by David Yerushalmi [2] Requested by Aurlie Dutour [3] Requested by Matthew Leonard [4] Change by Dominique Belhachemi [5] Requested by Michael Braden [6] Requested by James Yu 0.8.23 * help window incorrect for freehand roi's [1] * changed erase outside roi to shift-m3 from shift-ctrl-m3 * incorrect exporting of multi-frame data sets, values zero [2] * poor threshold setting on all negative value data sets [3] * import file dialog now closed prior to importing [1] Found by Marco Bucci [2] Found by Andre Manook [3] Noticed by David Yerushalmi 0.8.22 2007.09.28 * fixed bug with drawing 1st voxel of freehand (introduced 0.8.21) [1] * autodetect xmedcon format support (requires xmedcon > 0.9.10) * button to set the view center as origin [2] [1] Found by Jeff Arkles [2] Requested by Michael Braden 0.8.21 2007.07.14 * switched index to strchr in xml.c, amitk_point.c * man page fix [1] * freehand roi's now initially line up with the voxels of the dataset * hopefully finally now have a true radix sign fix, as mingw can't really use setlocale * flip around NIFTI images to get right orientation [2] [1] From Dominique Belhachemi [2] Suggested by Buyean Lee 0.8.20 2007.06.29 * message popup for export raw data dimensions * init allocated density memory to 0 in render.c * check that voxel sizes are valid in imported data sets [1] * tightened up raw_data_import dialog * added millimeter indicators to crop dialog [2] * update for NIFTI support in XMedCon [3] * even more correct placement/orientation of dicom data [3] * added ability to output PNG instead of JPG [4] * added a contour form of hot metal [4] * add a preference for the initial directory to look in [4] * added ability to manually enter in the rotation transform [4] * fixed a bug with rotations * internationalization, now uses en_US instead of POSIX on windows, also guesses if incorrect radix sign, and tries to fix [1] Suggested by Gokhan Ozer [2] Suggested by Luca Guerrieri [3] Suggested by Buyean Lee [4] Suggested by Andre Manook 0.8.19 2006.10.22 * fixed string error in dcmtk_interface.cc [1] * somewhat more correct placement/orientation of dicom data * fixed bug for reading in dynamic dicom data * DCMTK returns number strings as POSIX [2] * added progress bars for filters * object movement in alignment wizard now propagates correctly [1] Found by Kris Thielemans [2] Found by Marco Bucci 0.8.18 2006.10.08 * validate strings from xmedcon as utf8 [1] * another potential fix for 64bit check xml_check_file_32bit_okay [2] * added export dataset dialog - allows selection of output voxel size [3] - allows selecting bounding box (tight or inclusive) [3] * better guessing for reading in DICOM datasets [4,5] * first try at DICOM gated support [5] * added ability to import objects (like ROI's) from previous .xif's [6] * better handling of edges in tri-linear interpolation [7] * active data set now required to be visible when moved/rotated [1] Found by Buyean Lee [2] Found by Marco Bucci [3] Suggested by Luca Guerrieri [4] Help from Han Chunlei [5] Help from Kris Thielemans [6] Suggested by Marco Bucci and many others [7] Suggested by Patrick Chow 0.8.17 2006.08.30 * added toolbox for doing image math between data sets [1] * now saves weight/dob/dose/etc. when exporting with xmedcon [1] * fixed bug loading DICOM on windows [2] [1] with help from Matthew Leonard [2] found by Martin Rodriguez-Porcel 0.8.16 2006.06.29 * wasn't reading in intercepts correctly from .xif files [1] * potential fix for 64 bit check in xml_check_file_32bit_okay [2] * fixed bug with rendering of ROI's [3] * in help panel, button "1" now refered to as "m1" for clarity [1] Found by Peter Bloomfield and Marwan Elkoussy [2] Found by Jose Manuel Quesada [3] Found by John Storey-Bishoff 0.8.15.3 2006.05 * export->series for dynamic data sets led to core dump [1] * now handles DICOM files without scale factors (eg MR) [1] Found by Tove Olafsen 0.8.15.2 2006.04.15 * fix to libecat support - includes calibration when possible * fixed 64bit/32bit file detection on Mac OS X * fixed several glitches with DICOM handling [1] - better guestimation of slice thickness - correctly handles patient orientation [1] Found by Andre Manook 0.8.15.1 2006.04.09 * slight xmedcon tweaks - now require xmedcon >= 0.9.9.0 * various small fixes for gcc 4.1 (fedora core 5) * fixed independent threshold - menu now gets enabled properly * modified libmdc/libecat support, allow reading in truncated data sets * fix for exporting data sets 0.8.15 2006.02.21 * added independent color tables for 2nd and 3rd sets of views [1] * strip NaN's on export->resliced data set to make xmedcon happy * added internal scaling intercept - more compatible with dicom - intercept gets removed if all are zero * added additional support for DICOM through the DCMTK library - has support for reading in DICOMDIR files * updates for MinGW build * added a field of view parameter - to look at only a subset of data * now reduces scale factor dimension of imported data when possible * can now specify how multiple canvases are layed out (panel_layout option) [1] Suggested by Freimut Juengling [2] Suggested by Kris Thielemans 0.8.14 2005.11.17 * faster functions for initialized amitk_raw_data structures [1] * fast roi quantitation now gives more accurate median value * freehand/isocontour drawing speed-ups * can export underlying raw roi values to file [2] * canvases and tree/help can torn off as separate windows [3] * removed 'logic' for placing orthogonal sets of canvases -now simply left to right * Default rendering opacity can now be specified as density only [4] * raw data import dialog values are now persistent [5] * distribution on threshold now only shown for global thresholding * can now display thresholds as center/window as well as min/max [6] * additional CT windowing options [6] * added "subject orientation", and appropriate displays on canvas [6] * added subject name, id, and dob entries [6] * toolbox dialogs now correctly free memory on destroy signal [1] Requested by Buyean Lee [2] Requested by Daniel Rubin [3] Suggested by Jonathan Bailleul [4] Suggested by Jeff Tseng [5] Suggested by Robert Hunter [6] Suggested by Freimut Juengling 0.8.13 2005.06.24 * added freehand ROI's [1] * added drawing mode for isocontour ROI's * Makefile update for gnome 2.10 [2] [1] Requested by Buyean Lee and many other people [2] Found by CG Hsu 0.8.12.1 2005.06.16 * slight tweek to the zoom setting code 0.8.12 2005.06.15 * added an option to recover corrupted xif files * various small bug fixes for some warnings generated by gcc 4.0 * changing voxel_dim (from adding or removing data sets) now compensates zoom [1] * analysis now uses NAN for undefined stuff if available * slice functions now return NAN for undefined pixels instead of zero * implemented function to output multiple data sets as single file [2] * can now put a time label on flythrough and rendered movies [3] * new dynamic movie type - frame with smoothing * three isocontour ranges - above min, below max, between min/max [4] [1] Found by Steve Jones [2] Requested by Sheena Lee [3] Requested by Anna Wu [4] Requested by Karen Herbst 0.8.11 2005.03.12 * ROI analysis wasn't correctly freeing the pointer array [1] * disabled reporting of "total" statistic, as this is often wrong depending on the underlying data type * error in saving of .xif files with dynamic data on win32 [2] [1] Found by Michael Kreissl [2] Found by Steve Jones 0.8.10 2005.01.26 * ui_series no longer requires corresponding ui_study canvas to be shown [1] * Slices of thickness greater then the voxel size were offset in the depth direction [2] [1] Found by Peter Bloomfield [2] Found by Jeff Tseng 0.8.9.1 2005.01.13 * another try at a win32 internationalization fix [1] Found by Alien and Liesje 0.8.9 2005.01.08 * Makefile.am problems for compiling w/o xmedcon [1] * saving roi statistics records isocontour value [2] * ui_study titlebar includes filename as well as study name[2] * internationalization problems [3,4] * set default action on dialogs [3] * clean building without scrollkeeper [3] * center of an isocontour now defined as the center of mass [5] [1] Found by Iain [2] Requested by Steve Jones [3] Found/Requested by Alien [4] Found by Erik Nolf [5] Requested by Steve Jones 0.8.8.1 2004.11.10 * updates for x86_64 compilation 0.8.8 2004.11.02 * crash when poping up object dialog of non-viewed data set [1] * accurate roi quantitation algorithm didn't work in inverse mode [2] * isocontour's were overdrawing by one voxel [3] * can now add roi to study object in tree * new preference: can have isocontours drawn as filled * incorrect use of MdcSwapBytes was causing rotated images on big endian [4] * added ability to specify isocontour value (lower value) [3] * updates for (X)MedCon 0.9.8.0 [1] Found by Patrick Chow [2] Found by David Stout [3] Found/Requested by Steve Jones [4] Found by Anna Wu 0.8.7 2004.08.22 * spin buttons on roi initial popup didn't take decimal places [1] * ui_series panel size can now be adjusted [2] * new isocontour, wasn't showing image value on help window [3] * fixed isocontour erasing [3] * fixed error in profile tool, incorrect values for view_duration < frame_duration [4] * users now have the option of a more accurate roi quantitation algorithm [5] * increased accuracy of the fast roi quantitation algorithm [1] Found by Keon Kang [2] Requested by Freimut Juengling [3] Found by Steve Jones [4] Found by Patrick Chow [5] Found by Peter Bloomfield 0.8.6 2004.06.22 * raw data import dialog didn't take gates into account for calculating bytes * fixed rendered movie generation * can now calculate inside ROI for values greater than specific value * amitk_xif_sel crashed when browsing "/" directory [1] * fixed importing of analyze files [2] * get configure script to end if m4 not found [3] * rpm now builds correctly on FC2 [1] Found by Peter Bloomfield [2] Found by Charles Henri Malbert [3] Found by Emily Heath 0.8.5 2004.06.07 * fixed fopen binary versus text bug on windows [1] * export view function now includes roi's, etc. [1] * fly through mpeg's now include roi's, etc. * data sets can now also be exported resliced [2] * slice generation slightly more accurate for iterating over depth * fixed core dumps with filtering [3] * added export jpeg abilities to ui_series * added gated study support to ui_series * added ability to select which objects go onto series on init * added ability to select which objects go into rendering on init * libecat strings aren't necesarrily NULL terminated [4] * some gtk 2.4 updates (switch to g_idle) * switched to libmdc progressive loader * values read through libmdc are now quantified & calibrated, they had only been quantified before (branching factor hadn't been added) * updates to gtk-doc reference doc generation process [1] Found/Requested by Steve Jones [2] Requested by Jayashree Kanchana [3] Found by Vania Kenanova [4] Found by Kris Thielemans 0.8.4 2004.04.26 * fixed bug in *_calc_frame_max_min [1] [1] Found by Peter Bloomfield 0.8.3 2004.04.21 * added support for gated files [1,3] * profile tool now updated automatically on data set (de)select * fixed small graphical glitch with line between full/scaled bars * fixed errors with scale_factor and filtering/cropping [1] * fixed crash with double clicking finish on filter/crop * can now validly pop up a dialog on an undrawn roi [2] * added ROI quantitation based on Lee et al, Nuc Med Comm 2000 21:685-690 [1] Found/Suggested by Chris Deroose [2] Found/Suggested by Keon Kang [3] Suggested by David Stout 0.8.2 2004.02.16 * incorrect loading of frame duration through libecat [1] * rendering conversion had diff. dimension between slice and rendering lead to core dump on Mac OS X, and with some gcc's [2, 5] * SUV calculations were off by a factor of 1000 [3] * ignore gdk warnings on win32 work around for gdkproperty.c "Not Implemented" warnings (gtk 2.2.4) * got popt/icons working on win32 * updated win32 install. .xif files now associated with AMIDE * updated most of the icons (exception of the toolbar icons) * better interactivity on threshold for remote displays [1] * roi analysis "copy to clipboard" now left justifies roi names [3] * max/min calculations now done on demand * changed mechanism for changing isocontours old mechanism wasn't working on win32 * added x limits to the gaussian fit on the profile tool [1] * added scientific notation support to most of the spin buttons [2] [1] Found/Suggested by Kris Thielemans [2] Found by Anna Wu [3] Found/Suggested by Chris Deroose [4] Found by Keon Kang [5] Found by Chris Heier 0.8.1 2004.01.13 * specifying import types was messed up [1] [1] Found by Patrick Chow & Peter Bloomfield 0.8.0 2004.01.11 * finally added a (much requested) profile tool * improved (correct) loading of non-float data files via (X)MedCon * can drag file's from Nautilus onto the tree * updated for new dynamic data structure coming in (X)MedCon 0.9.0 * preferences now saved on a per study/data set basis default preferences used only for new studies/data sets * added the ability to set a bone and soft tissue window for CT data sets * removed standard error from roi stats. wasn't sure if it was calculated correctly (wasn't weighted), and it's not the experimental std. err. anyway * added copy button to roi statistics window (for copy and paste of values) * various AmitkThreshold cleanups * saving on windows to samba share crashed for large files [1] not sure why... work around is saving in 16MB chunks in amitk_raw_data.c * default roi stat file is probably annotated as .tsv (was .csv) * warning messages to console/dialogs is now a preference, (was compiled in) * added ability to export data sets * i18n broke reading in .xif's, concorde files for European locales [2] * was trying to change permissions on non-existant files [3] * reading from libecat7 versus libmdc was setting offset inconsistently [3] * filter fwhm was off by a factor of 2 * roi analysis results now have more precision, as does the time dialog * Spanish translation of the manual [4] * got rid of console on windows [1] Found by Patrick Chow [2] Found by Chris Deroose [3] Found by Kris Thielemans [4] Contributed by Pablo Sao 0.7.14 2003.08.15 * disabled anti-aliasing on canvas, was getting core dumps on ROI resizing. * problems with self-referencing with slice_parent fixed, data sets now freed * crop wizard now allows data type/scaling conversions too * updates to help in rois.xml * added help button to several dialogs * fixed small bug with rendering isocontours alone * removed data type specific crop and projection functions complexity not worth incremental performance improvement * amitk_data_set_get_projection now does all 3 planes at once * cursor color now changes immediately when data set changed * erase outside roi no longer core dumps * when voxel sizes of a data set are changed, the children now try to follow the scaling changes. 0.7.13 2003.07.09 * fixed problems with selecting XIF files in the file selector 0.7.12 2003.07.05 * added ability to save XIF files as flat file, made default * put in configure ability to detect libgnomecanvas version, disable anti-aliases canvases previous to libgnomecanvas 2.2.0 * .iss file now configure time generated * configure.in file tweaks * zh_CN i18n update from Wales Wang * threshold "abolute" legend now reflects current conversion (%id/g, etc.) * file/xif selection widgets paths are set to last used 0.7.11 2003.06.20 * zh_CN i18n contributed by Wales Wang * added back in support for internationalization * ui_common axis works on OS X (was a double free bug, that didn't manifest on linux) * variance is now calculated correctly (was overconservative previously). * generalized FIR filtering added * gaussian filtering done with FIR filtering code, 50% slower, but eliminates a lot of otherwise redundent code * median/filter code no longer data type specific. * ui_series now tracks changes to data sets/rois/and fiducial marks * fiducial mark "point" parameter eliminated. redundant * switched over to anti-aliased canvases for all canvases * misc. fly through canvas fixups * switched form of raw format entry in .xif files * rewrote isocontour selecting function, no longer recurseive * changed look of rendering window/added toolbar 0.7.10 2003.05.27 * enable-win32-hacks option, allows compilation on cygwin/mingw32 * multiple small fixes for cygwin/mingw32 * amitk_dir_sel, slight update, and copied _gtk_fnmatch from gtk * added slice caching system * various canvas cleanups * study can now be active_object -> can rotate entire study from canvas * default color tables (set in preference dialog) applied to imported data * enabled subject_weight/injected_dose in medcon_import.c * resets initial study name on first data set load * canvas target on/off is now a study parameter, not a preference * fixes for how multi-frame slices are weighted * fixed problem with "flashing" canvases -> inadvertent update_layout call * stereoscopic rendering on inverse background no longer gives gray background * roi's can now be drawn center-out and edge-to-edge * smaller font for ui_series * various ui_series fixes for dealing with no data sets in object list * can now compile w/o gsl again * compilation now detects that it's being compiled on OS X - disables axis guide, errant font handling on OS X was causing crashes - disables esd, esd was locking files after amide crash * roi stats are now on a single pane for static studies * versions of various compiled in libraries shown in about box 0.7.9 2003.04.22 * added subject_weight, injected_dose, and cylinder_factor to data_set object * can now easily calculate scale factor for %ID/g and SUV * amitk_object_copy now recurses, children also copied * dynamic, rotating rendered movies now generated correctly - was due to a problem with handling of context volume * series now keeps the correct zoom even if all data sets not shown * canvas now minimizes thickness correctly if not all data sets shown * threshold widget more bullet proof, good for retarded data sets * spin buttons can now accept scientific notation input * ROI's now calculated correctly for data sets with one of the dim ==1 * fixed filtering (got screwed up in 0.7.7 with add. of scaling_type) * fixed filtering of dynamic data sets * fixes for initializing the toolbar * was not removing the active_object ref. appropriately in amitk_tree * fixed selection incorrectly going to study row in amitk_tree * slightly less idiotic handling of cursors * now requests to change read permissions if import file can't be read * more intelligent CTI/ECAT data set naming * more intelligent medcon data set naming * remove iscontour_3d signal from amitk_canvas by moving code from ui_study_cb.c * user now asked to specify the depth of geometric ROI's on drawing * all warnings on reading xml are condensed into a single warning message * stats now point out difference between voxels and fractional voxels * variance now calculated using voxels, not fractional voxels * building rpm/deb files without libecat by default - xmedcon now supports ECAT 7 * building rpm with enable-amide-debug=no * fixed help window not popping up problem 0.7.8 * fixed "crazy spin button" bug, again * stats can now be calculated on only a percentile of the voxels in an ROI * added principle component analysis to the factor analysis wizard 0.7.7 2003.03.03 * added ability to only look at a subset of the canvases at a time * added new preference - canvas size can now be fixed to the dimensions of all data sets, not just the visible ones. * now have a 3-way linked view too * view mode is now saved with the study, and is kept with the study object * fixed problem with amitk_data_set_set_scale_factor not always running when needed * added scaling_type to amitk_data_set, to indicate dimensionality of scaling array * ui_time_dialog won't crash if destroyed while event pending * on data_set_copy min threshold set was getting ignored * canvas now only uses data sets as bounds. avoids problems with pathologic ROI's * added .info file generation for fink building 0.7.6 2003.01.18 * fixed long standing bug, dealing with slices generated via nearest neighbhor over multiple frames. Would cause "flickering" in dynamic movies * added a factor analysis tool - implemented Sitek, et al. penalized least squares algorithm * ui_fly_through's can now be done over time * ui_series now shows roi's and fiducial marks too * added an option so that moving of rendered object can be click-n-drag * encoding of selected objects now in amitk_object - new signal, "object_selection_changed" - canvas and tree now automatically adjust for changed in selection - canvas and tree also keep track of the entire object tree * more progress bar popups - histograming - flythrough and rendering movie progress bars now popup - cropping - importing * dropped the "IDL" file type * was crashing on interpolation change after object dialog is closed, fixed * crop dialog: added idle loop handler for canvas update, fixs spin button bug * scrollbar's on canvas now do a better job of guessing their adjustment values * managed to get rid of dump double clicking bug on canvas * study_copy wasn't copying view_start_time 0.7.5 2002.12.17 * medcon importing now allows negative values (had been set to zero) * added progress bars for rendering context initialization * added progress bars for series slicing * added option to set values above threshold to zero when rendering - a poor man's "strip" function * projection image voxel units are now in terms of 1/mm^3 * object dialog now lists memory usage of data sets * fixed unref'ing bug with gtkdial * compiling without libmdc works again * slices correctly generated for data sets with negative values * added ability to leave cross hairs on canvases (in preferences dialog) * added ability to increase the central "empty area" of cross hairs (in preferences dialog) * removed annoying characters from suggested export file names * switched over to using g_try_malloc, g_malloc crashes on failed allocations * fixed bug in rendering, was allocating 5x more memory then it needed * allowing optimized versus non-optimized (less memory) rendering * switched all numerical entries to spin buttons for better behavior on focus out * rendering is now done in idle loop * series slicing is now done in idle loop * ui_series wasn't disconnecting data_set handlers * added popup dialogs before roi analysis and rendering to allow picking of options 0.7.4 2002.11.26 * switched mpeg encoding to using libfame * number of voxels now displayed on roi_analysis dialog * fixed problem with spin_button callback's running on delete_event of program * better medcon data set name guessing * threshold doesn't crash now when dealing with negative values * fixed multiple misuses of EPSILON * isocontour drawing on dynamic scan frames > 0 caused crashes, fixed * resizing of 2D isocontour's thickness now works 0.7.3 2002.11.11 * added median filtering to the filter dialog * distribution data now saved in .xif file when available * corrected an error in the generation of roi stats * fixed some small bugs with dual cursor display * on roi clear, max and min are now recalculated, along with the distribution * no longer moving canvas view when shifting roi * now sets thickness correctly when loaded up directly with an imported data set * added ability to erase data set outside of an roi * removed slop in moving fiducial marks * dual cursor display weirdness is now (hopefully) fixed for real * help is working again 0.7.2 2002.10.20 * anisotropic filtering added, low pass gaussian filter current implemented * fixed some bugs with rotating/moving data sets * changed rendering x axis again, think it's right now * interpolation is now specified per data set * several entries in amitk_object_dialog are now spinners * disabled main window resizability, this allows the window to autoshrink * roi stat's page now comes up as a better size on small screens * time dialog now resizeable 0.7.1 2002.10.06 * can now generate fly through mpeg movies * can now choose between blended and overlay fusion modes * adding a data set cropping wizard * added the ability to erase a portion of a data set * most internal formats are now double * shifting and rotating data sets now uses an overlay image * can now compile correctly without libgsl support * alignment's only need 3 points now. problem was with SVD decomposition * rendering flipped left and right. that's now fixed * object modification dialog reads in entries a little more sensible now * big endian raw data importing works again * speed increase in reslicing. loops now iterate only over portion of slice that encompases the data set * fixed some small bugs with changing the view thickness on the canvas * fixed some small bugs with setting the minimum thickness of a multi data set study * data set icons now change with the data set's color scale * added black/white/black and white/black/white colormaps * cursor now shows current voxel value on active volume * removed extraneous memory consumption of raw_data_import * now ignores "per slice" scaling when converting to rendering 0.7.0 2002.8.16 A complete rewrite of almost all of the code in AMIDE Major Changes: * ported program to GTK 2.0 and GNOME 2.0 * data set's, roi's, etc. code has now been totally rewritten - these items are now subclasses of GObject - any object can be a child of any object - single object modification dialog that handles all objects * new .xif format (2.0) that follows new object code * old .xif format supported via legacy.c * dropped notion of having a "view coordinate frame", same as base * canvas updates are now done by an idle handler * switched internally used data type to double (was float) Minor Changes: * when threshold or popup button hit, and dialog already up, brought to front * dropped all remaining uses of imlib - can now only export images as jpeg... * user is prompted/warned on inverting an axis * ROI's can also be used as fiducial markers for alignments. * added total counts to roi analysis * single tree now used for linked viewing * EPSILON value is now used correctly for comparing floats * ROI rendering conversion speeded up greatly 0.6.4 2002.8.16 * view center notifier on help panel now gives correct location * fixed subtle floating point rounding error in drawing isocontours 0.6.3 2003.05.27 * Mac OS X doesn't have lround, using rint instead * canvas arrows weren't being updated with canvas slider change * with dual cursor display, second display wasn't being adjusted with canvas slider change * canvas voxel size adjusted when volume's voxel size adjusted * now better at guessing names from xmedcon imported files * can now shift data sets around on the canvas * help info panel slightly rewritten, more legible 0.6.2 2003.05.07 * fixed brown bag type error concerning active volume 0.6.1 2003.05.06 * added a "linked" view mode, so that data sets can be looked at simultaneously but not superimposed * spin buttons (zoom, thickness) no longer "go crazy", required a cludge widget, amitk_spin_button * when volume/roi/align_pt is changed on canvas, modification dialog also changes * when changing layout, canvases now reset coord frame's appropriately * objects no longer get unselected when ok/apply hit in the modification dialog * loading a new study replaces the old study if it's empty * deleting objects works again * now confirms quit when unsaved changes exist * cursors now handled better * 3D isocontour's now warn if drawn over multiple data frames * switched all canvases to antialiased except for amit_canvas and ui_preferences 0.6.0 2003.04.11 * realspace_t's are now a referenced object type * widgetized the coord frame rotate panel as amitk_coord_frame_edit * widgetized the canvas as amitk_canvas * widgetized the tree, got rid of ui_volume, ui_roi, ui_align_pt * raw_data_read_volume/read_file no longer requires preinitialized structures * added "per frame" scaling ability * added ability to generate movies "over frames" * added "interpolate between frames" scaling ability. * changed threshold dialog to a linear layout * threshold types (per slice/global/etc.) are now for each volume * setrlimit no longer screws up on MacOS X compile * threshold widget is no longer so picky about inputs * fixed some compile/installation problems (thanks to Juha Koivisto) -unnecessary include of matrix.h (from libecat) -unintended install of amide_export.h -libxml include file location changes 0.5.0 2002.02.05 * added ability to place fiducial reference points and align data sets using a rigid body transform (procrustes method) * stereoscopic rendering support added * roi's are now also rendered * improved alpha blending algorithm * fixed bug with loading in ASCII data * imported files now are centered on 0,0,0 to begin with * added ability to import CTI attenuation and sinogram files * dropped the use of an inverse axis in the coord frame, as we can just use the transpose * cheasy eye candy color scales on option menu in amitk_threshold * removed colons from default exported file names * roi statistics dialog now is resizeable, scrollable, and lists frame duration * zoom is now based on all data sets in study, not just currently selected ones * fixed small configuration bug when compiling without libmdc (thanks Adam Hupp) 0.4.7 2003.12.20 * can now pick between linear and orthogonal layouts for the 3 views * alignment lines work again * series views were showing incorrect locations * can now erase points from an isocontour ROI * dropped double click activating in tree list, too annoying to support in GDK * configure script checks for gcc 2.96, and complains loudly if found 0.4.6 2001.12.09 * added 2D and 3D isocontour ROI's * no more notion of an "active" roi. All roi's are now always moveable * multiple fixes for closing widgets * fix for crashing study parameter window * fixed cti import bug that screwed up the value for small frame durations * added more logic for dealing with corrupted CTI files * canvas event processing functions combined and rewritten for clarity * (X)medcon importing now (hopefully) get's scaling constants right * specific (X)medcon import fallbacks can be specified by the user * added ability to load in PDP and VAX raw data formats * can now handle data set with inf and nan values * fixed the bug with saving ROI statistics * gcc requirement is now listed as gcc 3.0.2 0.4.5 2003.11.18 * removed notion of "grains" for calculating ROI statistics * added a "scaled" color strip to the threshold widget * redesigned the roi analysis dialog box * added a button to the roi analysis dialog save stats info to a text file * fixed minor bug with time button display * fixed minor bug with threshold changes getting lost in volume dialog * can now import files from the command line * dropped 2x2x1 and 2x2x2 interpolations * gtkgammacurve setting is now faster in ui_rendering_dialog * can now set the width of drawn roi's as a user preference * added a gtkdirsel widget, this means .xif directories look more like files * better (but still not perfect) ROI resizing. * axis indicators on the roi and data set dialogs 0.4.4 2003.10.31 * rendering dialog changed considerably - user can now grab canvas and spin it using buttons 1 and 2 - x,y,z rotations have been moved - all rotations are now relative to the canvas * rendering parameters dialog fixed up, now allows colormap changing * rendering movies can now be done over time * can now change the name of the output movie * medcon importing importing was a little off, hopefully we have the right scale factors now * rewrote the threshold widget as a gtk style widget * added toolbar and menu to series widget * allow independent thresholding of series display * added captions to the series pic's * now importing correcting the frame durations of dynamic CTI files * now adding in image offsets from CTI files 0.4.3 2001.10.18 * multiple speed improvements (at least 2x faster now for slice generation) -changed multiple functions to defines (based on profiling) -inverse matrix is now pregenerated and stored -default compile is now -O6 * now have multiple internal data representations (not just float) * can have multi-dimensional scaling constants, useful for CTI files and such that have a scaling constant for each plane (let alone frame) * changed color compositing to an alpha based method, so that colormaps with white backgrounds can be composited together * changed voxelpoint_t to 4D, volumes are now considered 4D, rather than 3D with multiple frames * new data type, data_set_t. The volume's data set and distribution array are kept in this format * interpolation type used for conversion to a rendering context can now be specified * can now export renderings to graphics files * added "reset axis" button to rendering dialog * fixed a bunch of stupid bugs with the threshold widget * no longer save max/min in xml files, as these are regenerated * no longer save far corner in volume .xml files, redundant information * fixed stupid bug with the raw data import dialog box * fixed problem with adjusting the dimension of ROI's that were not lined up with the transverse plane * wait cursor no longer stays on erroneously when series widget used * library no longer built by default 0.4.2 2001.10.01 * global scaling is now default for new studies * threshold arrows now move better with relation to the cursor * keeps better track of which directory we're current working/saving in * can now export the views as image files (jpeg/tiff/ps/eps/png/etc.) * fixed endian issues with loading in floats and doubles * now ensures save files end with .xif * numerous build chain bugfixes (now compiles and runs on Mac OS X) * rewrote trilinear interpolation (much faster) * dropped bilinear interpolation (doing it correctly would be slower then trilinear) * fixed interpolation bug for slices of depth != volume->voxel_size.z * upgraded almost all the program from using gdk_imlib to gdk_pixbuf * changed the origin of our image volume to the far left bottom corner - world coordinate system is now right handed (this is a good thing) - new .xif version (y axis now points in opposite direction) - medcon, idl, and pem inputs also updated - many many updates to make this change work * elimination of several unneeded and confusing realspace functions * got rid of the "main" window * changes with command line parsing, no longer use "-i" to specify the input file. Also can specify multiple input files * fixed a long standing problem with destroying already dereferenced roi_item canvas objects - thanks to awu * updated config.guess, config.sub, libtool, etc. 0.4.1 * MPEG-1 movie generation capabilities added. Currently, all output files are saved as "out.mpg", due to an obscure gtk? bug. * added the ability to do horiz. and vert. leveling with the mouse * added an ascii file format for the raw data file input function * added a new menu item, so that users can specify the import method * added the ability to load in studies from the command line * you can now compile and run amide as a library, exported functions are in amide_export.h * add a creation date to the study data structure * add 'scan_date to the volume structure 0.4.0 * moved the functionality in the right column to a toolbar on top * fixed some dumb errors with the mouse-depth change * couple small documentation updates * more sensible initial classification function for rendering * the density and gradient classification functions now work correctly for multiple volumes * fixed stupid bug in rendering_context_free() * rendering parameters dialog changes now make more sense * did a first-draft of user documentation for rendering 0.3.5 * added Hot Blue/Hot Green colormaps * changed study tree from GtkCTree to GtkTree * context sensitive help window working better * add/edit/delete buttons removed from main panel * when moving an ROI, the view_center is now linked to the center of the ROI * disabled bug-reporting, as I only read the sourceforge bug reports 0.3.4 * corrected stupid roi-zooming error, although roi-zooming still not correct * added a little display to indicate the current coordinates * added a continously running help window to indicate what the different mouse buttons indicate at any given time. * corrected activating an object without selecting it (now not possible) 0.3.3 * added "targets" onto the canvases * can now change thickness by click-n-dragging on canvases * fixed rotating of roi's by mouse-click-n-dragging. Zooming still doesn't work right * mouse cursors now work correctly * fixed fatal errors in loading in many types of raw data (unsigned shorts, unsigned ints, etc.) * fixed a fatal error in referencing a free'd ui_threshold structure * blank images are now background color, not black * the currently active object is now noted in the study tree * code cleanups 0.3.2 2001.06.11 * big endian compile fix * additional viewing parameters saved in amide study files 0.3.1 * multiple fixes with viewing series of images * multiple fixes with calculating roi statistics 0.3.0 * added study parameter modification dialog * accelerated nearest neighbhor reslicing by a factor of 5 * massive bug hunt 0.2.4 * added loading/saving support in an XML file format 0.2.3 * added volume rendering support * numerous bug fixes 0.1 2001.01.03 * first released version amide-1.0.5/RELEASE_NOTES0000664000175000017500000000043507563645237014444 0ustar loeningloeningAMIDE is a tool for viewing and analyzing medical image data sets. It's capabilities include the simultaneous handling of multiple data sets imported from a variety of file formats, image fusion, 3D region of interest drawing and analysis, volume rendering, and rigid body alignments. amide-1.0.5/help/0000755000175000017500000000000012271346313013376 5ustar loeningloeningamide-1.0.5/help/C/0000775000175000017500000000000012270306773013567 5ustar loeningloeningamide-1.0.5/help/C/amide.xml0000664000175000017500000023042612270275056015376 0ustar loeningloening ]>
The <application>&app;</application> User's Manual V&manrevision; AMIDE stands for Amide's a Medical Image Data Examiner. This program is a tool for viewing and analyzing volumetric medical imaging data sets, and has been designed from the ground up with support for multi-modality imaging. 2000-2014 Andy Loening Andy Loening
loening at alum dot mit dot edu
Pablo Sau CDMEDICS PACS WEB (http://cdmedicpacsweb.sourceforge.net)
pablosau at users dot sourceforge dot net
Spanish translation
This is release &manrevision; of the &app; User's Manual. AMIDE Manual V0.3 2003-06-09 Andy Loening
&app; Introduction Licensing AMIDE is released under the terms of the GNU General Public Library (GPL). The text of the license is fairly verbose. A quick summary follows: You are free to run the program, for any purpose. Please note that, although the GPL makes no restrictions on use of the program, your government probably does. For instance, in the United States, AMIDE is not FDA approved and cannot be used clinically. You are free to study the source code of the program, and adapt it to your needs. You are free to redistribute the program. You are free to release modified versions of the program, as long as you also redistribute the source code to the modified program, and you label your modified version of the program appropriately. Availability of Source Code The source code for AMIDE is readily available from the AMIDE web site. Supported Platforms In addition to source code, binary versions of AMIDE along with installation instructions can be found for several systems on the AMIDE web site. The currently supported systems are Linux/i386, Microsoft Windows, and Macintosh OS X (achieved through the use of the fink add-on packages). Contact Information Questions and bug reports can be addressed to the AMIDE users list amide-users@lists.sourceforge.net. Information on joining the list and/or viewing archived messages can be found here. AMIDE Basics As the use of AMIDE is bound to be completely intuitive only to the one who wrote the program (i.e. me), this section provides a brief overview of operating within the program. It assumes you already have a data set loaded in. For instructions on getting a data set into AMIDE, see A Quick Theory of Operations AMIDE Objects AMIDE can work with and display a large number of objects simultaneous (limited only be available memory). The object types current implemented in AMIDE are as follows: Data Set A data set object contains the raw information from a medical imaging study, along with the corresponding parameters needed for interpreting that information (thresholds, colormaps, etc.). ROI A region of interest object defines a volume of space over which statistics can be calculated. All ROI's in AMIDE are volumetric. Currently, AMIDE implements ellipsoid, cylinderical, rectangular, and isocontour based ROI geometries. Fiducial Mark A very simple object, fiducial marks encode only the location of a reference point in space, and are used for rigid body alignment. Study Each AMIDE session has a single study object, which is used for grouping together a number of related data sets, ROI's, and fiducial marks. Object Tree
Study Tree An example of a study's tree structure within AMIDE. The two data sets (FDG PET and microCT) and 1 ROI (bladder) are children of the study object (m2862). The remaining ROI's are children of the data sets.
In order to facilitate working with a large number of objects simultaneously, AMIDE conceptually groups all objects into a tree hierarchy, with the study object as the root of the tree (see ). Data set objects will generally be primary branches off of the study object, while ROI's can be branches off of the study object or off of individual data sets. Why is this important? Because the structure of the tree determines how movements are mapped within the program. If a data set is moved relative to the rest of the study, the ROI's that are branches from that data set object will be correspondingly moved, so that they will maintain the correct orientation and position with respect to the data set that is their parent.
Real World Units An important thing to realize when working with AMIDE is that the program will try to abstract away the underlying digital format of the data as much as possible. When you listen to digital audio, the CD player automatically converts the series of 0's and 1's encoded on the compact disc into an analog format so that you don't have to worry about the underlying digital format. Similarly, AMIDE presents the digital data to you in analog form. When ever possible, units are given in terms of real world units (e.g. mm's, seconds), and most operations are not constrained by the discrete nature of the underlying data. For example, data in AMIDE is viewed in terms of "slices", not fixed image planes. These slices can be taken from the data set at arbitary angles, and can be of any thickness (they are not constrained to be integer multiples of the underlying voxel size). You may be used to looking at medical images in terms of voxels and integers, but remember that the object or subject scanned is an item in the real world, and AMIDE tries to recreate this "analog signal" for you. The only place the abstraction starts to break down is when dealing with dynamic data sets. Einstein understood time to be a "special" dimension, and AMIDE agrees. The reason for this, is that trying to represent dynamic data as anything but separate frames of data becomes overly complex from a computational standpoint, primarily because dynamic data is generally not equally spaced. While moving 1 voxel in the x, y, or z directions will always move you a constant unit of measurement (say 0.4 mm) in the appropriate direction, moving 1 voxel in the t direction may move you 30 seconds or 30 minutes in time, depending on what frame you're looking at. Because of this, AMIDE deals with dynamic data in terms of frames, although it should always tell you the time that those frames correspond to.
Components of the Display
AMIDE Main Window A diagram pointing out the salient features of the main window
Context Sensitive Help Located in the lower left corner of the window, the context sensitive help window shows what different mouse buttons and key strokes can accomplish given the current cursor position. Note that mouse buttons are labelled in UNIX fashion. Buttons 1, 2, and 3 correspond to the left, middle, and right mouse buttons, respectively. Under Macintosh OS X, the middle and right buttons are emulated by pressing the option key or the open apple key, respectively, while pressing the mouse button. Tree View of Study Data Located on the left side of the window is a tree listing of all the objects in the study. The tree structure shows how movements will be propogated to other objects in the study. For instance, if a data set is rotated, all of its children will be correspondingly rotated. Objects in the tree can be selected for display by left clicking on the name of the object. Middle clicking on a data set will make that data set the "active" data set. The "active" data set is designated by being highlights, and when a function is chosen that can logically apply to only one data set (e.g. filtering), the active data set is the one chosen. Object modification dialog boxes can be brought up by right clicking on the corresponding object. ROI's can be added by right clicking on the blank area of the tree, or shift-right clicking on one of the objects. These functions are further described in and . Orthogonal Views Most of the main window display consists of the orthogonal views used for visually displaying the data sets being studied. Data is usually presented as three orthogonal slices taken from the data sets, but the user can choose to display fewer of these views if desired by using the view selector (described below in ). The three views shown are the transverse, coronal, and sagittal planes. Note that the views may be incorrectly labeled for you. This could be because the data in the file you imported was not in the order that AMIDE expected it to be in. It could also be because you want to use the transverse/coronal/sagittal terminology differently then the program does (e.g. a coronal section of a rat brain is not the same as a coronal section of a rat). Below the views are sliders for adjusting where in the data set the slices are being taken from. The location can also be changed by directly clicking on any of the canvases. The appropriate mouse clicks are as follows Left Mouse Button Changes the location in the data set that the slices are taken from, without changing the thickness of the slices. Middle Mouse Button Change the location in the data set that the slices are taken from, along with setting the thickness of the slices to the minimum reasonable. Right Mouse Button Clicking an dragging with this button changes the thickness of the slices without changing the location. The thickness of the viewed slices can also be altered by adjusting the slice thickness setting spin button (see ). Other Additional functionality of the mouse buttons for manipulating data sets and ROI's is explained in and View Selector Which of the three orthogonal views are shown can be selected by using these toggle buttons. By default, all three views are shown. Linked Viewing In addition to the three orthogonal views, AMIDE can display mutiple sets of these orthogonal views, all looking at the same point ("linked") in three dimension space. This is most often used for looking at fusion images of two data sets, with one set of views used for the first data set, the next set of views used for the second data set, and the third set of views used for the fusion of the two data sets. Thresholding Tool This button on the toolbar will pop-up a thresholding and colormap selection dialog for the currently active data set. In the dialog, the maximum and minimum thresholding levels can be changed by either directly typing in the values (in absolute or percentage units), or by using sliders on the color bar. The color scale can be changed using the corresponding drop-down menu. A log normalized histogram is shown to give an idea of the distribution of the data set's value. Finally, the thresholding type can be changed. The thresholding type determines how the maximum and minimum threshold values are applied to the data set, and are: Per Slice The max and min threshold values will be applied in proportion to the max and min values in the current slice of data Per Frame The max and min threshold values will be applied in proportion to the max and min values in the current frame of the data set Interpolate Between Frames This threshold mode only makes sense for dynamic studies. In this mode, two sets of max and min threshold values are specified, along with which frame of data each of these sets corresponds to. For data frames before and including the first reference frame, the first set of threshold values are used. For data frames after and including the second reference frame, the second set of threshold values are used. For data frames between the two reference frames, the max and min threshold values are derived by interpolating (as a function of time) between the two sets of thresholding values. Global The max and min threshold values will be applied in proportion to the max and min values in the entire data set If the data set's modality is set to CT, buttons will be shown for applying bone and soft tissue windows as the thresholds. Zoom Selector This specifies how much to enlarge the views. AMIDE tries to make an educated guess about how large the display of the data should be, by using the smallest voxel dimension from the data set with the largest voxels to correspond to a displayed pixel. Zoom can be used in addition to that guesswork. Slice Thickness Setting Thickness specifies how deep the slices displayed on the views are. The minimum slice thickness is determined by the smallest voxel dimension of any of the data sets in the study. Frame Selector This button pops up a dialog for picking which frames of data to show from a dynamic data set. A frame (i.e. time period) to display can be selected by clicking on a list element. Multiple frames can be selected by holding down the shift key and selecting additional frames. Note, that for each data set selected for view, at least one frame from that data set will be displayed. If the choosen time period does not encompass a frame from that data set, the closest appropriate frame will be choosen. Gate Selector This button pops up a dialog for picking which gates of data to show from a gated data set. A gate to display can be selected by clicking on a list element. Multiple gates can be selected by holding down the shift key and selecting additional frames. Note that by using the entries, a span of gates can be choosen that loops around (e.g. gates 8, 0, and 1). Target Selector The target cross hairs are generally only displayed when one of the mouse buttons is depressed. With this toggle button, you can tell the program that you want the target cross hairs left on the views. Interpolation Interpolation refers to the method whereby AMIDE extracts data from the original medical imaging data set in order for it to be viewed on the screen. The interpolation selection button lets the user specify what type of interpolation to use when generating slices from the active data set. Nearest neighbor is faster, while tri-linear interpolation produces better looking (smoother) images with the penalty of being ~8x slower. Rendering Three rendering methods are available, MPR (multiplanar reformation), MIP (maximum intensity projection), and MINIP (minimum intensity projection). These rendering algorithms are utilized to combine data in the depth direction of the slice and/or over multiple frames of data. As such, the effects are most noticeable when the view thickness of the slices is increased and/or several frames of data are being combined. For MPR, each displayed pixel corresponds to the weighted average of the underlying data. For MIP and MINIP, each displayed pixel corresponds to the maximum or minimum value of the underlying data, respectively. Fusion/Overlay Selector By default, AMIDE displays multiple data sets as fused images. With the fused/overlay selector, you can tell AMIDE that you want the active data set to simply be overlayed on the other data sets, rather than fused. Preferences Dialog Box Underneath the edit menu is the preferences menu item. This will pop-up a dialog box that allows you to change preferences as to how things in AMIDE are displayed. The preferences will be saved in a configuration file for use by future AMIDE sessions (note: saved preferences are not currently supported on MS Windows). ROI/View Preferences Here are several preferences for changing how ROI's are the view canvas are drawn, more thoroughly described in . Note that these preferences are only used when a new study is created. To change these preferences for an existing study, you need to use the study modification Threshold Windows The window preferences are more throughly described in . Note that these preferences are only used for new data sets. To change the window levels for an existing data set, use the data set modification dialog. Default Colortable Preferences The program uses the specified color tables by default on a newly imported data set. Misc. Preferences The "Send Warning Messages to Console" option does exactly that. This is useful if enough warning messages are popping up that they're becoming annoying. With the "Don't Prompt for 'Save Changes' on Exit" option, you can tell the program to not prompt you to save changes done on the study when exiting an AMIDE session. The "Which Default Directory" controls which directory the file chooser dialog (used for save/import/open operations) will use as it's default location. "None" will cause the file chooser to show a list of recent locations as default. "Specified Directory" will cause the file chooser to utilize the directory specified as the default directory. "Working Directory" will utilize the directory from which the AMIDE program was executed as the default directory - this is most useful if you're often envoking AMIDE from the command line.
Importing Data and Saving Studies Importation of Data Sets AMIDE uses its own format (described below: ) for saving data between session. To get new data into AMIDE, it needs to be imported (located under the file menu). You can either let AMIDE try to guess the file format (which works for most data types) or tell AMIDE explicitly which format the file to be imported is suppose to be in. Importing of all data types except for raw data is done using Erik Nolf's (X)medcon medical imaging conversion library. Raw Data Files AMIDE will generally attempt to load any file ending in ".dat" or ".raw" as a raw data file. The user will be prompted for the dimensions of the study, the offset of the data in the file, and the data format of the data in the file. Both big endian, little endian, and PDP endian files can be loaded (endian refers to the order in which bytes are arranged in memory). The following data formats are supported: 8 bit signed or unsigned integer, 16 bit signed or unsigned integer, 32 bit signed or unsigned integer, 32 bit IEEE floating point, 64 bit IEEE floating point, and ASCII data. ECAT Files Static and dynamic ECAT 6.4 and 7.2 files are supported through (X)MedCon. AMIDE will generally try to load any file ending in ".img" as ECAT 6.4, and any file ending in ".v" as ECAT 7. Please note that ECAT 6.4 files are very difficult to autodetect, so if the file does not end in .img, you will probably have to tell AMIDE explicitly to import the file as ECAT 6.4. Although not compiled in by default, AMIDE can be configured to use the z_matrix_7/libecat library for handling ECAT files instead of (X)MedCon. DICOM Files DICOM 3.0 is supported through (X)MedCon, which actually uses a slightly modified version of Tony Voet's VT-DICOM library. The level of support for DICOM 3.0 is entirely determined by (X)MedCon/VT-DICOM. DICOM data is often distributed as a series of single slice data files. To read these into AMIDE as a single data set, you will need to stack these slices into a single, volumetric file. Notes on how to do this can be found at the (X)medcon website. Concorde microPET files Concorde format files are generated by the Concorde company's series of microPET scanners. It's a two file format (a data file and a header file), with the header in easily read ASCII format. Please note that you will need to tell AMIDE to open the header file (.img.hdr), not the raw data file (.img). Acr/Nema 2.0, Analyze (SPM), InterFile3.3, Gif87a/89a A variety of additional file formats are supported through (X)MedCon, including: Acr/Nema 2.0, Analyze (SPM), InterFile3.3, and Gif87a/89a. For more information, please see the (X)MedCon documentation, or the corresponding webpage (http://xmedcon.sf.net) . XIF Files AMIDE saves studies in an extensible XML based format called XIF (Xml Image Format). This format can be stored as either a single file (flat file format XIF) or as a XIF directory. The flat file format is the default, and simplifies file moving and handling. The directory format on the other hand allows easy access to the raw study data external to the AMIDE program, and will be of interest to developers. The directory format can be utilized via the "Save as XIF Directory" and "Open XIF Directory" menu items under the File menu. In any case, these files or directories will characteristically end with ".xif", and are treated identically within the AMIDE program. Opening Studies From the main window, select "File->Open", and a file selection widget will open up. Select an XIF filename in the right column, and then hit the "OK" button (or double click on the filename). Saving Studies To save a study, from the study window select "File->Save As" and a file selection dialog will appear. Look at the "selection:" line near the bottom of the window, if this is the desired XIF filename, hit "OK" and the file will be saved. If this is not the desired XIF filename, select or enter in the correct XIF study, and hit the "OK" button. Note that the original data set files are no longer needed by AMIDE, as all the information AMIDE needs is saved inside the .XIF file. You should however still archive the original data files, as AMIDE only reads in and stores the information from the header that it needs (which is generally not all the information enclosed within the header). XIF Directory Format Although admittedly annoying from a data transfer standpoint, using a directory structure for saving study information has the decisive advantage of making the saved information easily accessible using standard command-line utilities and text-based tools. Each XIF directory contains a file called "study_*.xml" which contains the basic study parameters. Additional files can also be found in the XIF directory, such as ROI_*.xml files which contain ROI's, and data-set_*.xml files and their corresponding data-set_*_raw-data files, which contain the image data set parameters and the raw data respectively. The raw data file format is arbitrary (double/float/int, 64/32/16/8 bit, little or big endian, per plane/per frame/single scale factor), and is determined by the format of the originally imported data. XIF Flat File Format The flat file format is basically a concatenation of the information enclosed within the directory format. It is not meant to be editable or developer friendly. Instead, it allows easy management of studies for casual users. If you wish to access the information in a XIF flat file external to AMIDE, you'll be much better off resaving the data as in XIF directory format. The format is as follows: The first 64 bytes of the file contain a magic string for format identification. The next 16 bytes contain 2 64bit unsigned little endian integers, the first one being the location of the study xml data within the file, and the second integer being the size of this xml data. Within the study xml data, is encased the information as to where in the file the children's xml data is. And within the children's xml data, is enclosed the location information of the raw data and subchildren. Exporting a View to JPEG/PNG To export one of the views (transverse/coronal/sagittal) to an external image file, select "File->Export View->[view]" from the menu. The saved data format by default is jpeg. If the saved filename ends in ".png", the saved data format will be PNG. Manipulating Medical Data Sets After being loaded in, medical images can be manipulated in a variety of ways with AMIDE. An important point to remember is that AMIDE deals with all data sets as 3 or 4 dimensional data sets. While 2D slices extracted from the the data set are displayed on the computer screen, at no time does AMIDE handle images as anything less than 3 dimensional data. Manipulating Data Sets on Screen Displaying Data Sets When initially loaded into the program, a data set is not displayed on the canvases. Rather, the name of the data set is contained in the study list, and the user needs to select the data set in the study list so that it is displayed on the canvases. Displaying multiple data sets is as simple as importing more than one data set, and then selecting the data sets that you wish to view from the study list. The time period over which the slices are drawn is determined by the time dialog, described in more detail in Pertinent Mouse Actions The following mouse actions can be used when the mouse is hovering over a data set on any of the orthogonal views Shift-Left Mouse Button This combination allows shifting of the active data set in space (usually used for aligning two data sets). While holding the shift key, left click (and release) on the canvas, and you'll grab the active data set. You can now shift the active data around on the canvas. At this point, to enact the shift, click the right button (button 3). Any other mouse button will cancel the shift action. Shift-Right Mouse Button This combination allows rotating of the active data set in space (usually used for aligning two data sets). While holding the shift key, middle click (and release) on the canvas, and you'll grab the active data set. You can now rotate the active data around on the canvas. At this point, to enact the rotation, click the right button (button 3). Any other mouse button will cancel the rotation. Ctrl-Right Mouse Button This combination will place an alignment point at the current cursor location. A dialog will popup for entry of the alignment point's name. Manually Aligning Data Sets What follows is a quick guide to manually aligning data sets in AMIDE First rotate each of the data sets so that they are level with respect to the transverse, coronal, and sagittal views. This is easily done using the shift-2 mouse combination, but can also be done from the data set modification dialog. Choose one of the data sets to be the active data set. The other data set will be the "fixed" data set. Shift the active data set so that the two data sets line up appropriately. This is easily done using the shift-1 mouse combination, but can also be done from the data set modification dialog. If fine tuning adjustments are needed, these are best done from the data set modification dialog. Data Set Modification Dialog To modify parameters of a data set, right click on the name of the data set in the study tree to pop-up the data set modification dialog box. Parameters that can be modified are divided into the following pages. Basic Info On this page are options to alter the data set name, type of modality, subject name, subject id, subject date of birth (DOB), conversion factor, and the interpolation type to use for this data set (described at ). The conversion factor is a parameter that is multiplied to the data set before it is used for viewing or quantitation. Since the data set is in ECAT/MAP/abitrary scale units, the conversion factor can be used in order to analyze the data set in another type of reference unit (e.g. Percent Injected Dose [%ID]). There is also a built in calculator, where parameters such as subject weight and injected dose can be entered, and the conversion factor will be generated. Note that 1 cc is assumed to equal 1 g when generating the %ID/g and SUV. Center The data set can be shifted by respecifing the center of the data set with respect to the origin. The x, y, and z dimensions are in millimeters. Voxel Size The size of the data set's voxels (again, in millimeters) can be altered on this page. The "keep aspect ratio" button specifies that when altering the size of any voxel component (x, y, or z), the relative sizes between the components should be kept the same. Rotate The data set can be rotated around its center in this page. There is one dial for each of the three slice planes. The transverse dial will spin the data set in the transverse plane (i.e. rotate on the z-axis). The coronal dial will spin the data set in the coronal plane (i.e. rotate on the y-axis). And the sagittal dial will spin the data set in the sagittal plane (i.e. rotate on the x-axis). The "reset to default" button allows the data set to be rotated back to the default orientation. On the bottom of this page is a matrix showing the coordinate frame of the data set with respect to the base coordinate frame. Colormap/Threshold This page is analogous to the thresholding tool dialog (described at ) above). Time From this page, the timing information of the data set can be altered. Scan start time can be used for altering the start time of the scan with respect to other data sets. Corrections in the duration of each data frame can also be made on this page. Windowing Preferences The max and min threshold levels used for the bone and soft tissue CT window buttons can be explicitly set here. The "Insert Current Thresholds" button will reset the max and min values with the data set's currently used threshold levels. Immutables This panel lists information about the data set that cannot be altered. The underlying internal data format of the data set and the data set dimensions in voxels are displayed on this page. Using Regions of Interest (ROI's) ROI stands for Region of Interest. An ROI designated a volume in space over which statistics should be calculated. ROI Types The following ROI types are currently supported in AMIDE: Geometric ROI's Ellipsoid An ellipsoid is similar to a sphere, but with a diameter specified for each direction [x,y,z]. In the case of x=y=z, the ellipsoid is a sphere. Elliptic Cylinder An elliptic cylinder is similar to a regular cylinder, except it has an ellipse as its base instead of a circle. Box Exactly what it says, a 3D box. Isocontour ROI's Isocontour ROI's are regions selected from the data set such that the edge values of the ROI are always the same value. There are two types, 2D and 3D isocontours. Additionally, both these ROI types can be defined so that they encompass all neighboring values either above a certain minimum value, below a certain maximum value, or between a minimum and maximum value. After drawing of these ROI's, they can be modified by using manual drawing or erasing operations. 2D Isocontour A 2D isocontour is derived by considering a value on one of the displayed 2D slices. The depth of a 2D isocontour is specified initially by the depth of the viewed slices. 3D Isocontour A 3D isocontour is derived by considering a value on the current frame of the active data set. Freehand ROI's Freehand ROI's are regions of interest that are drawn manually. 2D Freehand A 2D Freehand ROI is similar to a 3D Freehand, except that it is constrained to be only one voxel thick. By default, the depth is the current slice thickness, although this can be changed by the user. 3D Freehand An ROI that can be drawn freely in all 3 dimensions.. Drawing ROI's To draw an ROI, you first need to create a new ROI. You can add a new ROI to either the study, or a particular data set. To add an ROI to the study, you can either select the ROI desired under the "Edit->add ROI:" menu item, or right click on the blank area of the study tree. To add an ROI to a data set, shift-right click on the data set that you'd like to add the ROI to. In both cases, a dialog box will pop-up for you to enter in the new ROI's name. When first added, the new (undrawn) ROI will be selected in the study tree. When an undrawn ROI is selected in the study tree, the program will use the next mouse input on any of the displayed views to begin the process of drawing this ROI. For ellipsoid, elliptic cylinder, and box ROI's, a click with the left button will begin an edge-to-edge drawing, while a click with the middle button will begin a center-out drawing. The x and y dimensions of the ROI are determined by this process. The z dimension (thickness) of the ROI can be specified by the pop-up dialog that will appear on the completion of the mouse movement. For isocontour's, the value of the data set at the clicked upon location will be used to derive the isocontour. For freehand's, the point on the screen that is clicked upon will be included in the ROI. Manipulating ROI's After an ROI is drawn, it can be further manipulated to adjust its size, placement, and orientation. You can directly manipulate the ROI by clicking on it in any of the viewing windows. Mouse button 1 is used to shift ROIs. Mouse button 2 is used for zooming ellipsoid, elliptic cylinder and box ROI, and is used for entering drawing mode for isocontour and freehand ROI's. Mouse button 3 is used to rotate ellipsoid, elliptic cylinder, and box ROIs, and for redefining the isocontour value for isocontour ROI's. For isocontour and freehand ROI's, drawing mode can be entered by using thie middle mouse button (button 2). Once entered, points can be added or removed from the ROI by using the left (button 1) or right (button 3) mouse buttons, respectively. Holding down the shift key while using these buttons increases the size of the action. The middle button (button 2) allows the user to leave drawing mode. You can also edit the ROI size/placement/orientation/name etc. by clicking on mouse button 3 while over the ROI's name in the study item list. This brings up the ROI modification dialog (described at ). Calculating Statistics Statistics on an ROI can be calculated via the "Tools->calulate ROI statistics" menu item. Choosing this will pop-up a dialog that lets you choose which ROI's (selected or all) and which data sets (selected or all) you'd like to calculate statistics over. You will also have three options as to how you what the values to be calculated. Calculate over all voxels. Calculate over highest x percent of voxels. For example, if you choose this and pick 25% as the number, your ROI will be calculated from the 25% of the voxels in the ROI that have the highest values. Calculate for voxels >= % of Max. This method is based on Lee, Madsen, Bushnel, and Menda, Nuc Med Comm 2000, 21:685-690. As an example, if you choose this and pick 50% as the number, the highest valued voxel in the ROI will be found, and then the ROI statistics will be calculated for all voxels that are greater or equal to 50% of the highest valued voxel. Calculate for voxel >= Value. This algorithm only does calculations for voxels in the ROI that have a value greater than the value specified. There's also a check box to enable "more accurate quantitation". The default algorithm (corresponding to unchecked) makes some approximations in deciding which voxel are in our out of the ROI. If this check boxed is checked, the ROI results will be more accurate, but will take much longer to compute. After hitting execute, the program will crank for a while, and then show the calculated values in a new dialog window. Hitting "Save as" button allows saving these values as a tab separated values (TSV) file. This file should be easily imported into most spreadsheet applications (Excel's a little stupid, you may have to explicitly tell it you're importing a TSV file). Pressing the "Copy" button copies the information into the operating systems clipboard, allowing pasting of the results into other programs. The "Save Raw Values" button allows you to export the underlying raw data values for the ROI's in case you wish to do your own statistical analysis. Gotcha's to ROI calculations Variance and Standard Deviation Fallacies Currently, AMIDE generates variance and standard deviation values that may occasionally be of interest to imaging physicists. It is very important to remember, that these numbers represent the noise in the data set, NOT the noise in your experiment. The variance of an experiment can only truly be measured by taking multiple samples (i.e. performing multiple scans) and calculating the variance between these different samples. Changing Calculated Volume Short story: The calculated volume shown by the ROI statistics dialog is correct. Use this value as the volume of the ROI, not the value you might calculate by hand based on the ROI's dimensions. Long story: AMIDE calculates ROI's by translating the ROI's dimensions into the data set's coordinate space. It then computes statistics for all the data set voxels that are in the ROI. For voxels that lie on the edge of the ROI, AMIDE will subdivide the voxel into a finite number of subvoxels, and calculate over the subvoxels. This approach yields correct statistics, but it is important to realize that the computed ROI is a discrete representation of the specified analytical ROI. So while the true volume of an ellipse is pi*r1*r2*r3, the computed volume of the ellipse in AMIDE will depend on the number of voxels and subvoxels that were determined to lie within the ellipse, which in turn can depend on the orientation of the ROI with respect to the data set in question. Since the computed volume given by AMIDE represents the volume in the data set that was used for the ROI calculation, you will want to use that value (not the real ellipse value). Why isn't a "total" statistic calculated for the ROI? AMIDE doesn't present the "total" value in the ROI, as it doesn't necessarily know what the units of the underlying data are. If you're using PET or SPECT data, your voxel values are most likely proportional to activity/volume/time. To calculate the total in your ROI, you should multiple the mean value of the ROI times the ROI volume and the frame duration. If you're using CT data, your values are probably proportional to density, so to calculate the total you would multiple the mean ROI value by the ROI volume. Explanations of ROI Statistical Values Median This is the median value of all the voxels that are enclosed (partially or totally) within the ROI. For an even number of voxels, the median is defined as the average of the center 2 values. Mean The mean value of the voxels in the ROI. Voxels that are partially enclosed within the ROI are appropriately weighted. Variance The variance of the voxels in the ROI. This is a weighted variance calculation so that voxels that are partially enclosed within the ROI are correctly handled. Standard Deviation The square root of the variance. Standard Error The square root of the variance, divided by the square root of the total number of voxels in (totally or partially) the ROI. Minimum/Maximum The minimum and maximum values for all voxels enclosed totally or partially within the ROI. Size The volume of an ROI (mm^3). Details as to its calculation are above in: . Fractional Voxels The is the sum of the voxel weights, and gives an indication of how large the ROI is in voxel space. Voxels This is the total number of voxels used in calculating the ROI, both partial and total. In contrast to the "Fraction Voxels" measure, the "Voxels" measure gives a better indication of the statistical validity of the mean, variance, etc. ROI Modification Dialog To directly modify parameters of an ROI, right click on the name of the ROI in the study tree to pop-up the modification dialog. Parameters that can be modified are divided into the following pages. Basic Info The name and type of ROI can be altered on this page. Center The center of the ROI can be shifted with respect to the origin on this page. The x, y, and z parameters are in millimeters. Dimensions The size of the ROI can be altered from this page. The x', y', and z' dimensions are in millimeters and are orientated with respect to the orientation of the ROI. Rotate The ROI can be rotated around its center in this page. There is one dial for each of the three slice planes. The transverse dial will spin the ROI in the transverse plane (i.e. rotate on the z-axis). The coronal dial will spin the ROI in the coronal plane (i.e. rotate on the y-axis). And the sagittal dial will spin the ROI in the sagittal plane (i.e. rotate on the x-axis). The "reset to default" button allows the ROI to be rotated back to the default orientation. On the bottom of this page is a matrix showing the coordinate frame of the ROI with respect to the base coordinate frame. The Study The "Study object" in AMIDE is used for grouping a set of related data sets and ROI's. Note that the use of the word "Study" here diverges from the traditional nuclear medicine use of the word, in which study generally connotates a single scan (or occasionally multiple but highly coupled scans) done on a single patient. A study in AMIDE is often used to group an entire experiment (several patients, several animals, whatever) into a single file. The study object itself is used mostly for storing parameters that effect all other objects stored in the study. Study Modification Dialog Similarly to the data set and ROI modification dialogs, the study modification dialog can be used to alter parameters relevant to the entire study. Right click on the name of the study in the study tree to pop-up the study modification dialog box. Parameters that can be modified are divided into the following pages. Basic Info On this page are options to alter the name and creation date of the study. View Center From this page, the point that the study is currently viewing can be explicitly changed. The x, y, and z dimensions are in millimeters. Rotate The entire study (including all objects within it) can be rotated around the view center in this page. There is one dial for each of the three slice planes. The transverse dial will spin the study in the transverse plane (i.e. rotate on the z-axis). The coronal dial will spin the study in the coronal plane (i.e. rotate on the y-axis). And the sagittal dial will spin the study in the sagittal plane (i.e. rotate on the x-axis). The "reset to default" button allows the study to be rotated back to the default orientation. On the bottom of this page is a matrix showing the coordinate frame of the study with respect to the base coordinate frame. ROI/View Preferences The width of the line used to draw geometric ROIs can be altered here (1-5 pixels). This parameter is not relevant for isocontour ROI's. For isocontour ROI's, you can choose to have them draw as filled in or hollow. Canvas layout allows you to switch the three views (transverse, coronal, and sagittal) between a linear style layout more commonly seen in PET software, and an orthogonal style layout more commonly seen in MRI software. "Maintain view size constant" allows you to pick if you want the size of the view to remain constant or not. If not checked, the size of the views shown will depend only on the data sets selected. If the checkbox is checked, the size of the views will depend on all the data sets in the study. Finally, "target empty area" is for setting the size of the empty area in the middle of the target (the crosshairs on the views when changing the view location). Immutables This panel lists information about the study that cannot be altered. "Voxel dim" is the preferred voxel dimension, this is what the canvas will use as the "basic" voxel dimension, from which the zoom factor is relative too. Viewing Series of Slices Instead of looking at three orthogonal slices through the data set, a series of slices (all of the same orientation) can also be examined. Select: "View->Series", and a dialog box will come up allowing you to pick which objects you'd like to display on the series viewer, along with if you'd like to display the slices over space, time, or gates. The thickness of the slices are determined at the time the series window is brought up. A slider appears on the top of the window which allows moving through the data set. Note that since slices are cached in memory after being displayed, already displayed slices do not need to be regenerated from the data set and reviewing these slices is significantly faster. Rendering Data Rendering in AMIDE is accomplished using the Volpack volume rendering library. This software library is both portable, and provides for true volume rendering (as opposed to the surface rendering used by many other libraries and hardware accelerators). To start a rendering window, select the "View->Rendering" menu item. A small dialog window will pop-up allowing you to select which objects you'd like rendered, along with some additional options. The first "Set values greater than max threshold to zero" allows you to strip high level voxels out of the rendering process. In general you won't want this, but it might be useful if you have high valued areas in your data set that obscures what you'd like to see. The second option "Accelerate Rendering" tells VolPack to use a faster method for doing the volume rendering. You will in general want to use this option, as it causes a significance performance enhancement (around 10 fold). It does, however, require around 3 fold as much rendering as the non-accelerated option, so if you're running out of memory, you'll want to try to rendering without the acceleration. The third option "Initial opacity functions only density dependent" sets things such that the initial gradient opacity function does not contribute to the rendering. This is useful for data sets (e.g. PET) where one is more interested in having an accurate view of the data, rather than a view where gradients in the data set are highlighted. After hitting "Execute" the program will reslice the data sets and ROI's into a data structure that the volpack library can handle, and then perform some initial renderin gcalculations. For data sets, the interpolation type specified for the data set will be used. This whole process will take some time, so be patient. Please also note that, when converting the data set, the data is scaled between the current minimum and maximum threshold, with all data above the current maximum threshold set to the maximum threshold value (or zero, if specified), and all data below the current minimum threshold set to the minimum threshold value. This scaling can be relative to the data set's "Global" maximum and minimum, to the "Per Frame" maximum and minimum, or can be from maximum and minimum values "Interpolated Between Frames". "Per slice" scaling does not make sense in the context of volume rendering, and is interpreted as "Global" scaling. When all this is completed, the rendering window should pop-up. Its use is described below. Rendering Window Main Rendering Canvas The result of the rendering process is presented on the canvas in the center of the window. This canvas can accept user input to change the orientation of the rendering. Button 1 allows rotating on the x and y axis, and button 2 allows rotating on the z axis. Spin Sliders You should notice two slider type widgets, one on top of the rendered image, and one on the right side. These are both appropriately labeled with the axis around which the rendering will be spun if they are changed. Additionally you should notice a dial widget (labeled 'z'). The dial is for rotating on the z axis (which comes out of the plane of the display). Note that the effect of rotations are cumulative. Reset Axis This button will reset the rendering's orientation back to the default orientation. Toolbar Transfer Function Button This will pop-up a dialog with a panel for each object being rendered. The available options are described below: Return Type This setting determines whether the rendering returns an image which looks more analogous to an x-ray (the "opacity" setting), or returns an image which looks more like a surface (the "grayscale" setting). The "grayscale" setting does this by specifying a light source, material properties, and using depth cueing. Color Table The color table of each rendered object can be changed here. Classification Functions This is the most confusing part of rendering, so hang on here. The classification functions are used to map between the value in each voxel and how much that voxel should be represented in the final rendered image. On the x axis is the possible values of the different voxels. On the y-axis is the opacity that will be given a voxel based on its value. Both classification functions have several buttons on the right side of their graphs. The top button allows the classification function to be drawn as a spline. The second button allows the classification function to be drawn as a series of straight lines. Finally, the last button resets the classification function to a straight line. There are two classification functions: Density Dependent: This function tells you how opaque each voxel will be based on its current value. In a sense, this is analogous to an x-ray, where the amount of the x-rays that are absorbed in a structure is related to the density of that structure. of the display. Gradient Dependent: Instead of relating the density of a voxel to its opacity, this function relates the gradient of a voxel (how much the value changes between this voxel and its neighbors) to its opacity. This has the effect of giving added weight to surfaces. Monoscopic/Stereoscopic Buttons You can choose between generating a single rendered image (monoscopic), or a stereoscopic image pair. A stereoscopic image pair is a pair of images that have been generated at slightly different angles. When viewed correctly, these two images can be interpreted by the viewer's eyes as a single image containing depth information. Zoom Determines the size at which the resultant rendered image will be displayed. Note that changing the zoom will not affect the speed of the rendering, and increasing the zoom past 1 will not increase the resolution of the rendered image. Rendering Menus File->Export Rendering This menu item allows you to export the rendered image to an external image file. The saved data format is jpeg. File->Create Movie This causes the movie generation dialog box to pop up. This dialog box is further described below: . Edit->Rendering Parameters This causes the rendering parameters dialog box to pop up. This dialog box is described below: . Rendering Parameters Dialog Speed versus Quality With this drop-down menu, the user can choose between rendering speed and rendering quality. To increase speed, voxels with values either close to zero or close to unity can be counted as completely translucent or completely opaque, respectively. The highest quality doesn't use this approximation at all, the lowest quality setting uses this approximation big-time. Stereosopic parameters These parameters are used for controlling the results when the "stereoscopic" option has been chosen. Stereo Angle This is the angle offset (in degrees) between a pair of rendered images. Increasing this number will generally give a greater sensation of depth in the image pair. A Reasonable value for this parameter is between 2 and 5 degrees. Note that this parameter will be saved between different sessions of the program (not currently done on MS Windows). Eye Width (mm) Ideally, this should be (roughly) the distance between the two rendered images, and corresponds to the distance between the user's eyes. It is impossible for a person to resolve a stereoscopic pair if the images are farther apart then the person's eyes, since human eyes cannot move independently. While this parameter is specified in millimeters, the actually distance between the pair of images that gets displayed on the monitor depends on the setup of the computer. If the monitor information reported by the operating system is not correct (usually the case), the "eye width" parameter will not be in true millimeters. Note that this parameter will be saved between different sessions of the program (not currently done on MS windows). Depth Cueing These parameters are only used if the "grayscale" output type has been chosen. Enable/Disable Depth Cueing Specify whether or not we want depth cueing. Depth cueing puts in a "fog" that causes more distant voxels to appear less bright. Front Factor This is the transparency of the fog at the front of the data set. If this number is greater than 1.0, voxels toward the front of the data set will be brightened. If this parameter is less than 1.0, voxels toward the front of the data set will be darker, respectively. Density This is how thick the "fog" is. The thicker the fog, the darker distant objects seem. Rendering Movie Dialog Frames How many frames should be in the MPEG1 movie. The MPEG1 movies generated will be set to run at 30 frames/second, so the default of 300 frames will give a ten second movie. Rotations on [x,y,z] This setting determines how many times the data set will be rotated around the given axis over the course of the movie. The rotation for each frame is done in x->y->z order (rotate on x first, then y, then z). Dynamic Movie: No/Over Time/Over Frames Smoothed/Over Gates This option allows a rendered movie to be made over a time period, which is useful for dynamic data sets. Note that every time a frame boundary in the data set is passed over, the rendering process must slice and load in a new frame of data. This makes creating a rendered movie over time significantly slower than a movie with just rotations. Picking "over time" will allow entry of a start and end time for which the data from the data sets should be drawn. With the "over time" option, each second is given equal waiting in terms of how many images from that time period are generated for the output movie. Picking "over frames" allows entry of a start and end frame (note that this really only makes sense with a single data set). The advantage of "over frames", is that each frame is weighted equally in terms of how many images are generated for the output movie, so for data sets were the dynamics of interest correspond closely to the dynamics of the data set framing sequence, "over frames" may give a more appealing result. The "over frames smoothed" option is almost the same as "over frames", except that data will be interpolated between frames. This makes for a smoother movie (no jumps) but takes much longer as nearly every movie frame has to be reloaded. Additional Tools Alignment Wizard In addition to manually aligning data sets (described at ), data sets can also be aligned using the alignment wizard utilizing either mutual information or fiducial markers. Alignment with Mutal Information A rigid body alignment can be performed utilizing mutual information between two data sets. This algorithm works by taking orthogonal slices from one data set (transverse, coronal, and sagittal) and computing a transform to best allow matching of these slices to the second data set. This algorithm works best when the two data sets have already been roughly aligned. Note that the orthogonal slices utilized for the matching are derived utilizing the current viewing parameters (current viewing location, slice width, interpolation method, etc). Alignment with Fiducial Markers A rigid body alignment can be performed utilizing fiducial markers. The process is basically: Draw at least three pairs of fiducial makers between the two data sets that you wish to align. Drawing fiducial markers is described below as . Run the alignment wizard (under tools->alignment wizard). For the alignment wizard to recognize two fiducial markers as a pair, they must have exactly the same name. So if you have a marker labeled "1" under the first data set, you will need another marker, also labeled "1", under the second data set. Drawing Fiducial Markers Fiducial markers can be added to any of the data sets in the study in a variety of ways. For the currently active data set, hitting the "Edit->Add fiducial mark" menu item will drop a fiducial maker at the currently viewed location. Fiducial marks can be added for the active data set directly from the views by pressing ctrl-right mouse button, which will drop a fiducial marker at the point that the mouse is currently at. Finally, fiducial markers can be added to non-active data sets by pressing ctrl-right mouse button while hovering over a data set's name in the study list. After being created, the fiducial marker can be moved by clicking on the marker point shown in any of the views. Fiducial Marker Modification Dialog Box To modify parameters of a fiducial mark, right click the point in the study list to pop-up the Fiducial Marker Modification Dialog. From this dialog, the name and location of the fiducial marker can be altered. Crop Wizard Coming soon. Note that only what is strictly inside the cursor lines is saved. What's underneath and outside the cursor lines is cropped away. Factor Analysis Wizard The factor analysis wizard is currently being developed. It probably won't work for you, and is only included in AMIDE for those who might be interested in working on it (rather than with it). Filter Wizard Nothing written yet... Fly Through Wizard Nothing written yet... Note, will generally get much better results for fly through if using trilinear interpolation. Profile Tool A complete description of this tool has not yet been written. The left and right limits of the gaussian fit can be altered by clicking on the profile with the left and right mouse buttons, respectively. The x value used for initializing the gaussian fit can be picked by clicking on the profile with the middle mouse button. Note that the line profile is extracted from the currently viewed image, not the underlying raw data itself. This means things like the current interpolation and FOV will effect the line profile that's generated, and as such may effect the FWHM that's fitted. ROI Statistics A description of the ROI statistics tool can be found at: .
amide-1.0.5/help/C/legal.xml0000664000175000017500000000314110731357632015374 0ustar loeningloening Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to the below address. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to:
The Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
For more details see the file COPYING in the source distribution of AMIDE.
amide-1.0.5/help/C/figures/0000775000175000017500000000000007672431371015236 5ustar loeningloeningamide-1.0.5/help/C/figures/amide_main_window.png0000664000175000017500000017570707671752736021451 0ustar loeningloening‰PNG  IHDRôD^~[¨bKGDÿÿÿ ½§“ pHYs."."ªâÝ’tIMEÓ &R¿Ô$ IDATxœìw@×ÖÀïÌl¯”¥J¤ŠRDT‚ ±Ç“ÅhŒ1úib5y)ÆŸ1XbÆ RTš¨ ˆ…€ÂÒ;Ëö:3ßc6•X€…¼ý…àîÝ»÷žvÎÜ9÷ÇqðÚH¥Ò;wî@A@£ÑTVKètæKó’ô‚н6Jw˜t¡ ússs{{û>™I=zž©WFÉËË333Óh4G­VÃ0|òÜ}I¥" % C@®@»ö76¢¶w(‰Çt¢RclY,Q³˜…Rƒa8Šâ$Ã@­ÆÄ5A@Oþ#Z´ ]žÀ_—­'ÏŸ¼Jü=õ) øoÖíå¿=ìv]€´¯âÀË ãp(B¡L&TVVZXXÐéôç==zôèéuzG¹„Bá·ß~;{öì„„„={ötv 1 13–òkÔÆÙµ´ãjµŠN#wtªèTÌÆ‚‡£*‘¥qR[™â˜D*Ájø¥£†—Þ¯75å¡ ãJ.‹®Rá$^]'ûóÆ‚ @<† ¿ô<Aü§–…†áü©õ» UñÐß_F¸k7í¦ÝŸ(ô®ïÖÃiwµ†ÖÑ!9|ø0Š¢k×®500hmmµ±±yÅ#«G=/O¯)wKKËåË—=zt×®]d2Y*)”•KeXKkÇÈá×oÕ˜óLÚZÛí†Y‹%b#\ÐÑdfa0ЉT*T"‘·w(ZÚı™Fjµr¨­añ½&‘&•ÕâÎΉü§v×*wˆPëÄc‚@„ú…´Êý¯eúÔŸ‰.ë}¿® €b[c]žBO-ûI^p4‹Å"“ÉQ©T©×²=zô¼ ½£w "“ÉžžžcÆŒ¡R©2™ S‹¦ªo¨<,WW76·•Je§P&“I¤2Áj5ÚÜÜ¡Pj ¸ ‰D©Rã6CØåå*•€‰TQRúØ€K»}GbkeˆkD(ÿ©ÃŸ,Û„‚ CiÐ'*ˆ•û_ÿïºV'‘má€Ðhþf{Áÿ®Üµ›Ä?¤¿/óUüÉƱ°°ß¾};™Lf³ÙÍÍͽrõèÑ£çÅéå®R©š››ét: á(:u’ öwå8Ò…€ €öÔOZl‡üÙBPÉжúù­O–åO–âà/­ÜuúÛ?àé÷ß ç8Ž?ý-ðßÞÜ}ïòËØ€,‰ R«Õ---íííçéõèÑ£§ïèåÎ`0 —ËÕ¶DÏê•‘;R©”ÍfëZ =zôüÏÿs=zôèÑ3ØÐ+w=zôèù2P”;Žã¥¥¥µZýÌO· ‚ÆÆÆ²²²¦¦&>Ÿ¢hyy¹R©|ðàaohhhkk“Ëå---¯#›~GT=ƒŽá¥'—ËÓÓÓ[ZZ¤R©P(ôññ¹wïž··÷ãdž …ÂÎÎÎÉ“'3™Ì””µZM¡Pp700ÉdT*õêÕ«0 »¸¸Ü¿ßÕÕ5..ŽN§+•J‰Dâëë+‹MMM«ªª¤R)†a4­µµÕØØØÅÅPZZÊápîÞ½khhˆ ˆT*µ¶¶®««ãr¹‰„N§755…‡‡ëú éÑ£GÏK0 Vîííí­­­B¡0;;[,‹Åâ[·n …Bccã¼¼¼û÷ï·´´˜™™ã ­­­555T*U¥RÙÙÙÕ××S(E©TªT*}øðammmmm- ÃõõõJ¥’B¡¤¥¥•••Û¿r¹\,„B!‰D’H$b±¸¤¤Çñªª* à ëêêêëëõ;¢zôèt@½’[&''ÇÄĤ«·ÌË"“É`V«Õ$‰L&+•J*•Šã8±HW( AA”Ê'y Ñh4†F£)•J&“)•J †D"¡Ñh0 «T*FC¥Rår9‹ÅÂ0L¥RÑh4…BA£Ñ&&&J¥Çq†5J¥jmm¥R© ÃÐÐP.—“H$Ç_9y€T*‰D<O¡ªGžþd (÷+zå®G0 Ì2z^œ¶¶¶‹/¾ÿþû>>>_|ñ…®ÅÑ£GÏe@l¨êé™ÖÖÖüüü´´´¬¬¬h‡|||t+˜=z,ú•û¥££ãüùó6lðôô´±±™1cÆwß}WRRòÐßxüøqDD„•••§§ç‰'žÙ§©©‰ðãhoooooìÝ»÷‡~è yôÊ}!bbb¼½½MMM###¿ýöÛ¢¢"…B¡kÑt F³±±AQ411‘Á`ØØØH¤ÄÄÄÎÎÎW0%%¥¾¾¾‡­­­‰‰‰]w¤._¾ 077©dA„À …"11ÑÀÀÀÆÆ†ØÏï™öööÄÄD¬{U—ÃÊÊÊÆÆÆÆÆ¦¾¾þÒ¥Kº](Ѝ¨(GGÇÔÔT__ß™3g …²²²ÜÜ\€©©©Á?BÀd2mll¤Ribb¢±±±Z­NLL”J¥Ú> ÅÆÆ†»«¸ÚÚÚÔÔÔÞúP]Y³fX,¾téÒÚµkW®\yûöí§ûL›6í¿ÿý/`Æ 111gddÔòèÍ2:¦¥¥%///+++--íEt]ùã?Nž<ÙG‚éssó)S¦<Ýîìì|àÀ‹/&%%}øá‡îîî„ZÿöÛo/\¸àêêšœœ¬R©ÞxãI“&ååå>|xáÂ…ÅÅÅ“'O>~ü8F[°`Á•+W,--: 8wîܺuëx<ÞŋϞ=»qãÆæææÙ³g=zT;uMMÍܹsKKK‰–üü|‹¥T*ýýý=<ýøñãþþþvvvgΜ;v¬««ëÑ£G'Nœ˜””D¥R_G‰DÒØØ8iÒ$77·;wr¹\F£}µ  †aÇ·lÙrèÐ!&“¹ÿþ%K–:tèã?Öh4[·nýàƒˆÜ«žžžžžž±±±W¯^ýä“O† òèÑ#À®]»NŸ>íëë› ‰®\¹¢ÑhÊËË,XPRR2a„ß~û˜N£Ñ,_¾œÍföÙgÓ¦M=zô/¿üâì윞žÎår7mÚtäÈ÷ÝwßEDD|óÍ7Ÿ|ò‰\._ºté÷ߟŸŸ¿|ùòŠŠŠñãÇÇÅÅYYYc–——/Z´ÈÍÍmÔ¨Q„ÿ^ggçâÅ‹SRRFŒ›——÷èÑ£ï¾ûŽF£]¾|‚ K—.ݽ{—¸ªM›6ÍÞÞ>>>žË妤¤8;;oÛ¶í›o¾‰ŠŠJIIùý÷ßýüü^ê€ë•».ùé§Ÿâââ233_mvåÊ•+W®ôºT:$((è™ÊýyØÙÙݼysüøñ©©©ãÇÏÏÏwuuݵk׆ ¬­­/\¸ðÆoìܹÓÛÛ;??ÿîÝ»W®\9uê¡Üi4Ú;wüýýããã7mÚ´bÅŠ7.\¸pÒ¤I‡vss#¦Ø´i“ɬ¨¨xûí·‰>ŸßÞÞŽaX~~þ¤I“JJJÆŒ“””dbbò믿fee]ºt©±±EÑ牭R©V­ZºeË–°°°}ûö-X°àã?þå—_lll‚‚‚yù"‘hþüùžžžŸ}öàã?–J¥•••»wï^³fMNNΪU«f̘±yóæÐÐÐýû÷öÙg·oß7nÜÍ›7=<<&L˜=nܸ’’’×Üã144ŒŠŠZ¶lÙ‡~èéé9{öì®+Öššš¡C‡Þ¼yóÀW¯^---ݸqãèÑ£cbbNž<Éårg̘8nܸ¦5jÔºuë&L˜pãÆ ccã²²2E?úè# ‹ÄÄÄÈÈÈÿüç?#GŽÄqüÃ?,--%LCùùùÓ¦M+..öööNMM¥Ñh„"NMM}óÍ7ÇŽ»mÛ¶Ý»w‡††®\¹²¼¼ü³Ï>³··¿zõêÖ­[“““W¯^M̾fÍšO>ùäèÑ£S¦Lqppؽ{weeeUUÕ¶mÛV¯^}àÀ ¬X±";;A©S§;vŒ¸5/**233#–¿ýö[xxøþýûÏŸ?ßÐЫR©^ö€ë•».Y¹råÊ•+«««322²³³³²²ª««{P Ý Y±bEŸJØÏ˜šš¾TÿY³f9ÒÈÈHk¹Ú²eËðáÃ###­¬¬6lØ nݺµjÕ*Aüüü&Nœ¸jÕ*¢ghh¨ƒƒƒB¡¨¨¨ …«W¯¶°° ÊÏÏ×*÷ìììýû÷2dΜ9YYYÝ ³··766–Ëå£Göññár¹Ÿ|òIb·µµUWW¯\¹ÒÆÆ&,,,??ßÅÅÅÄÄdöìÙ‚¸ººæççûúú¾Ô¡x&†­[·®££#%%…B¡ /^lcc³`Á‚ãÇ×ÕÕÕÔÔ¬ZµÊÆÆ&444??Ÿx£¿¿ÿ¨Q£îîî€WP.Ý@ääɓ۷o¿sçNZZÚÒ¥Ky<^·>%%%ÖÖÖãÇ;vldddvv¶Z­>qâ…BÁ0¬   gåaooODÆh‹‹‹7lØ0dÈôôtÇ[[[¿þúë7ß|ÓÐиœ9s¦££#—Ë•ËåwïÞ… h÷îÝ"‘H ðù|ÿíÛ·ÇÅÅÍœ9ÓÎÎ.00pûöí~~~S§NúhñâŹ¹¹ü1Š¢ùùùR©tãÆÕÕÕ>T*•‚Ðh4F¡P`&þ(Z¦M›6dÈ[[[¹\~çÎ ‹éÓ§«Tª5kÖ¼Â×+÷@¥R©T*‹¥mioo766îÅ)lmm—-[¶lÙ2@uuunnnZZZNNNeeeÏotpp˜3gN/J2耞ª‰E„13Œ… ¶µµ5ʯ^½Z[[ûÓO?EEE …Ânïb³Ù577[XX477ko´†††„u¾µµµgètº@ ÀqœØ(ë*•J¥R‰Ý¿¦¦&ƒÁáp¤R©D"a±X­­­LæË—6ß}÷Ý… ®\¹bffF´p8í¼t:Á`P(”¦¦&ww÷¦¦¦Þš÷™ÔÖÖFGGïß¿?::zÞ¼y555Ýú°X,‰D¢V«›ššŽ92zôh‰´yóf.—»xñbâzó²°X,@HNN&¾L&sÏž=ï¿ÿþ[o½5tèÐný™L¦©©éŽ;T*ÑáóÏ?Ç0,55uÏž=Ó§OŸ:ujAAÁ¾}û„Ba||<@©T¾ñÆÑÑÑ‹-ŠŒŒ|øðauu5ƒÁ5jÔŽ;ÄbqGGÇ?Þn_'™L¦T*;::^áSƒrÏÉÉ)++³²²²¶¶f±X„.¶¶¶æóù\.W¥RuvvzxxÉä—Y&“ÅÅÅMš4éêÕ«Ó§O·oßž={¶T*mll400àp8Ú3çõ±µµµµµŽŽÆ0¬®®.;;;;;;33ó•ÝBþ7!*>J$’sçÎmÙ²¥²²ò½÷Þ[²dIGGÇ37Ù‚ƒƒ.\èåå•‘‘Aä/"^zçw>üðÃêêêÄÄÄž'9sæîÝ»,XððáÞ{Ïž={íÚµAAAñññ'Ož æñx³fÍb2™ …bÖ¬Y|>ÿU?ý_|úé§2™, €xúû￯Zµêí·ß‹Å/^\´h‘¥¥åìٳ׬Yôûï¿ÿòË/¯?éó°°° R©sçΈˆxôè‘T*6mÚO?ýÔµOHHÈÆçÍ›×ÔÔD¨u[[ÛÝ»weggß¼yóæ]´hÑçŸ^__êÔ)b:&“ùÎ;ïœ={6&&æiǧٳgÿç?ÿùâ‹/¤RiBB”)SÆŒcmmã¸Í¶mÛÊÊÊBBBd2±­ R©ŽŽŽëÖ­ËÉÉ‹ÅYYY›7oË—/ÿᇲ³³}||f̘A§ÓÏž=»`Á–™™YXXø<±ƒƒƒqŸ7oÞ+{ úÕ¬¬¬ÚÚZww÷sçÎ 2$00P¥Rµ´´…BµZmkkK&“=<<^aäìììÒÒRKKK‰DÒÐÐàíímhhhaaqèСˆˆ ÃD"Qee¥››[wн¡Šãxuu5¡è³²²ªªªÓÍÛo¿ýý÷ß¿ò°ƒŽæææ‚‚‚‰'r8µZ––æççg``píÚ5GGGcc㌌ŒÀÀ@&“©ÑhÎ;÷ðáC__ß)S¦à8žššZPPÀd2çÍ›gee•žžîææfiiyëÖ-CCCggg‰Dò믿677O›6ÍÇǧ­­-///,, ð„„„‡ …©S§æææš™™ :4%%Å×××ÈÈ(33sèСfff™™™·oßvrrZ°`ÁãÇ»® ŠŠŠ&MšÄ`0 …âôéÓÄ-@@A¿ýö›R©œ;w®ƒƒCGGÇÍ›7§OŸþô¥èÅIKKëê!Cxa]¹råæÍ›öööóçÏ'“É …">>¾ºº: Àßß‚ Ë—/{zzš™™%%%;ÖÐÐPûI_çÏËå.\øã?ŒŒŒÂÃÃmmmÿøãŽŽ__ß›7o;99=~üø÷ßg±X .444lllŒ‹‹Ã0lîܹ¶¶¶]G«««+)) ¢ÑhR©433“8¼)))4íúõëS§N…a8!!¡´´ÔÏÏ/((¨¡¡ááÇÁÁÁ|>ÿÁƒãÇÏÍÍíúE²¶¶.--½xñ¢¡¡á‚ ?~œ •J}}}ƒƒƒÅbñ™3gø|>q µ¾O&--­°°F£M™2eôèÑ8Žgddäää8;;GFFR(”üüüË—/¯]»V*•ž:uê7Þ Ò^92==ÝÕÕuÈ!yyy\.×ÞÞ>///33ÓÇÇ'$$$++Ëßßÿ¥Žö WîÀÐÐÇñ{÷î1 KKËGÙØØTVVššš2 ¥Rijjú gHkk«¡¡!±{fccÓÜÜìèèXQQÁ`0Pe³Ù‚ˆÅb‹eiiù¼Aú"ý@mmmFFFff¦››Û¦M›zkX=¯Éµk×f̘SXXØÔÔ”——×Í¢ªGÏ‹SVVæéé¹råʶ¶¶œœœÒÒÒw%ôÊ}€£Ï-ó?Eiié­[·¸\nhhh×}=z^ÇgeeQ©ÔWØçô6w=z#GŽ9r¤®¥Ðó/ÁÁÁÁÁÁá•ß>”;†a¯§×3‚@„ãø‹û ¾È€½2”=}JTTÔðáÃwîÜ©kA^…eË–µ´´üüóÏæææº–e 2”;‘u½wÇäóù8Ž …B†y<žH$"ÜÂ^m@¡PHÄï©T*Ç_*<]]‘˜˜øÊžvºE$ÅÇÇÓétý¹ö<úJ¹ ‡# »î°«Õêúúz2™L”ÂèÖ_Ûòøñcm ‰DºYØ™\&*`22¤kPŒN#©Õ˜J¢(î9Êâý·_.⣽½½©©éÑ£GÚ»‰‰‰B¡ Óé4­¥¥…ËåŠD"A:::x<žB¡èaÃp]]]aaá”)S´åDôèÑÓG$''+ŠE‹ÞGzž¦¯”ûÏ?ÿûÁ´¶¶’H$A¬­­¯\¹B„KŒ9²©©‰J¥R(‘AaÆUUUŽ=Z.—k£¿,ÌX^£-¯dVøÙæßiðo++üÑÊåP^ÚC ÇqÇGŒ¡P(ººÀaóçÏ¿v튢(Š>~üØÊÊJ­VÏž=ûyK{Çñññ‘Éd½8®Gžçñ믿ôÅ{ ¯²BÞ¾}›F£uttÔÕÕݽ{·¥¥…Á`xyyùøøXZZvvv’ÉäÂÂÂŽŽŽÖÖÖ¦¦&CCÃŠŠ ssóÆÆÆŽŽŽ®d©LÍ “ @‰•"±òF^͵œ*&ƒ,•©•Ê—¶•k4¢r^·U¶‘‘‘D"ÁqœÐÚÚ†áaÆYYYÙÛÛ÷`ú×gë38ꡌD…w=½ŽH$ÊÈÈ066ž:uª®e¸ôÕÊÝÏÏÇãµ¶¶BD£ÑFŒA¨QÂ#PÜA†a eÔ¨Ql6ÛÚÚ:+++::Z(vM3¢Tjªj:YL*CM-:įº»™ÕÕ  ŠPüÒú”L&óùüÆÆÆñãÇwÝGµ°°5jT{{;AóæÍ+++svv¦Ñh7nÜè!S+•J‹ÅwîÜ™5k–Þ,£G­VWVV œu-Ë¿ .H$’9sæè# z`ø¹···[[Û¢èsWÍ0 ‘H/w R^^Îf³5 QM›Çã …B÷"‰¶Ÿ'¤B¡À0 EQ2™¬ÝäÑû¹ÿorïÞ½‘#G ð´ c„ iiiºä刌Œ<þü¥K—ÂÂÂt-ËÀexËp¹\à21½,Ä6/™L¦Óé„ÍÃáH$’§ë¶¼8Úl×úÕ„'''++«¬¬,‘H¤wçè]Ajjª‘‘‘Þ&Ó3ƒ@¹“H$"—[ŸAÐkÖ"УG …B™>}ú‘#G’’’,X kqþU$%%Éd²ÈÈÈWÈø?Å PîD¢Ç¾ŸN§#‚a˜L&ë• Æë${Òóï€PîÙÙÙzåÞ»œ;w°dÉ] 2ÐÊ]"‘ôºÁº¢¢bÈ!8Žwvv '‹y<Þ+/Þ;::´AL‰D'®',,ŒL&Ÿ;wî믿~å½=Ý …IIIÆÆÆ&Lе,>Tî†D"¡( A±’U«Õ(Švvv> ÔÒÒB¸Çh4‘HD"‘( qJÀ0Ìf³U*aË&2dªÕj‰Dø&Bô²®åT*õþýû………]7d˜L&™L†a†aµZ Š¢‚h42™¬V«{0¦Ëåòòòò”””•+W¾”$zþ­P(”©S§&%%Ý»wÏÛÛ[×âüK¸|ù²J¥ '\™õô@*÷­[·Î;—p+¤ÓémmmÇŽ›4iRyy¹\.§P(b±ØÒÒÒØØ¸¼¼ÜÜÜ\*•B¤R©š››‰4ÍÄPååå|>†a++«æææ;wî888H¥Rccc‚H$Ò¤I“^J6E ÆäÉ“…Ba×ì}.\ ÂÞ._¾ÜÖÖf`` ÌÌ̪««íì삃ƒŸ·´'çßxã @ ™ÓC””tùòe½rï-N:ø/@ö‚ô¡iØÛÛûîÝ»l6`aaannN¥R---ËÊʪªªD"©¬¬411Á0¬¢¢¢½½ýÞ½{Ý’`F§ÓÅb1ñ@¥RJAA^ÍÀM¤è¶'n5”J%™LÆ0ŒøM£Ñ´3>lj҈vW6%%eâĉ---Ú–Ý»wE“»QUU5qâͶ¶óâÅ‹sçÎí:ŤI“ˆ"vÍÍÍ9996løñÇ_Pȉ'öiž¸þ$**ŠD"?^ׂüK …×®]366 |ýÑ=z4± ëׯý1»’íééI§ÓãââžîP]]Ýí”|ååå/Ò­}¸rŸ>}:a?áñxZøàà`.—K"‘fÍšeee•ŸŸÏãñH$‘ÌØØ†a??¿ÚÚÚ®fk'''©TÈápòòò6nÜøðáCooo¡PAÐ+lš#ÒÔÔTSS3vìØ®AL#FŒ044T(VVV¾¾¾µµµ•••k×®½ÿ~Š›L&‹ÅbÂÎ30ƒ˜š››¯_¿ÞU6ggç®nH‰†aƒ!“É®_¿Nd@#lkI¥REµ•J¥P(š››oß¾­ÁÝÝýÖ­[ééé………Úb&b±‚ Lœ8Q›SS.—k4be@<&¸Aáojmmmoo÷îÝšš} ÃësñâE™L¶`Á‚^±ÉH¥ÒëׯGEE999.‘•8ŽËårâDP*•l6[{š¨Õj™LF“ËåZµÖíì (ºdÉ’ÄÄÄ .,]ºtüøñ¶¶¶F,cÊårí)©T*år9‡Ã!–ªDNC*•J|Ò Ì›7ïƒ> z2tµEK¥RƒÑ-m®Ü¹\.‘³ÍÚÚZû±‰Ç1€[² IDAT cèСd2ÙÏÏÏÙÙÙÁÁÃáp8+++CCCwww­ÊV«ÕmmmÖÖÖjµº½½}ذa(вX,&“I¡PZ^‰DbffæååÕµ>a[[‡Ã!Vîfff*•ÊÌÌL¡PXZZŠÅb›$¬1'NüÇâȇœœœÜÜ\À„ ˆâsvvvÚ¢Ž8ŽoÞ¼9,,L"‘|÷ÝwVVVëׯÇ0ìîÝ»®®®Çï: ¥¥¥ŸŸßåË—ÉÉÉÓ§Og±XiiiwîÜlÛ¶ÍÒÒÒÒÒrÏž=?vvv.))9s挓“SeeåÁƒ§L™R__üøqÇß|óÍÈÈH ¢Êevv¶££ãŒ3^­¼N CQ455Uׂü ¾ ½›O&**jÇŽ;vìXºti^^ž££ãš5kV­ZuòäIkkkSSSŸ¦¦¦‹/º»»Oš4ÉÔÔtÕªU#GŽ433ûüóÏÚ³ãÝwßÕÞt¢(ÚÐÐ0lØ0SSÓuëÖ}÷Ýw4íÑ£GDýÂ1cÆüñÇZ®_¿îììlffÜÞÞ®T*çÌ™cnnnkkûÛo¿›Í®¯¯·´´ÔÖ þá‡NŸ>}äÈ‘ÎÎÎ-[¶ÄÆÆÞºuë§Ÿ~JMM}çwÆŒÓÒÒòtݯ¹sç^¾|Y&“]»v-** ÐÖÖ& ÷ïßõêÕ„„„;v…BF“•••‘‘Q__Ÿ———ššjoo¯V« mmmåååaaaÄ%dÓ¦M¡¡¡%%%•••O,o¼ñ`Ð…€@´6™ÐÐÐ^6""‚ˆ¤9vì˜\.ôè‘ÝG}”’’òÿ÷ÍÍÍUUUéé鉤¢¢â§Ÿ~Ú¶mÛo¿ý–””sâĉÚÚZâìÈËË;zôhJJ 1,™Lމ‰Ù¾}»±±±¿¿¿X,622Úºu«@ °²²Ú¼y3ÑðuëÖ½ñÆÍÍÍ---{÷î=wî\ffæ£G¶nݺ}ûöU«V¹ººnÚ´iĈï¼óNXXX{{;‹Å"²ðóùüŠŠŠ3gÎ<í‘5\!õô&L`2™–––Ú‚½{÷Ž9ÒÒÒòÚµk*•êË/¿¤R©(ŠߺuëìÙ³L&344´´´´ë8ëׯU©T]‹‹‹[¶laðû÷ï߸q£¢¢bñâÅ7oÞ¼}ûv7Óü˜1cX,–­­-ñÞ’’’;w§Êë÷3>>></55U¡Pè"_"ŸÌìÙ³{7ëê§Ÿ~J¸>|8±šŽ‰‰¡ÑhóçÏÿñÇ9"•J ã$“Étqq±±±1446l˜µµµF£yðàA·³ƒ¸ö@ôÅ_ÄÄÄgffnÛ¶ÍÌ̬¸¸ðY³fUUUi —+•Ê7ÄmmmEEET*ÕÍÍÍÊÊê½÷Þ[·nÖ†A¸ä>|˜Íf‡„„üöÛoDû¢E‹üüüžþhƒ@¹wvvä“Çñn¦.“»­*“Ɉƒù6ëcÇŽ­]»öèÑ££G† è›o¾177/))quu=tèPEE ¦¦¦Û»LMM'Nœøÿ÷Ó§O×ÚÊÁŸ6ºÃ‡Óéô¢¢"6›½víZ"Áò¢E‹„Ba@@€Ö(ô4§±±Çñ†††Áro R©S¦L‰‹‹ËÊÊš6mš®ÅÄ$$$ˆÛÁ^dÔ¨QÚÔâ„r‡aX"‘,Z´èë¯¿ŽŒŒtvvîáí}ýõ×ÄÙA´wttøûûïÙ³'<<<88øÜ¹s­­­\.w„ [¶l©««ÓÞ}"Âf³×¬YùèÑ#ƒ‘ÝÒÒ‚aXqqq\\œÖëL&s¹\>ŸïïïÏçóµ÷ÍÏ»Ú å®P(ìììt-ÅsQ©Tl6[»Q©P(Z[[-,,t+Õópqq!üceµÉ“'¿ýöÛ;wî,**3fÌš5kÌÌÌŠŠŠnܸ±iÓ¦íÛ·ß¼yóÚµk]58‚ ¹sç^½zµÛI8uêTSSÓ•+W’H¤ººº[·nŠD¢ÀÀ@///‘H4~üøž‹»/^¼xûöí—.]ÊÍÍ>}úÓ\.×nÞ‚ƒƒãââ’““õÊý•—/_æñx/ëôüjH$‡sèСӧO …B±Xü¼».Ÿ5kÖ˜›››XCCÃÑ£G/[¶,$$¤¡¡¡½½=""‚Ëå¾ÿþû---111³fÍP(”+VìÝ»7777%%%66622rÏž=aaaååå~~~ …Édž:ujÞ¼y«W¯Ž‰‰¹xñâÅ‹;Öó§è׬ÏL¢¤T*©T*ñû™ïjjjÈ5Õj5›ÍÖ¦q—ËåÄ~/ñtàd…lmm}ôè‘ö©•••B¡€ hذa………ÄÞÑÇétº©©iII‰———J¥*--utt¤R©çÏŸW©T3gÎ433Ãq<==ÏçJ$OOÏ®I$’ÒÒR///âæàÁƒL&ÓÖÖ¶­­-!!AˆˆBs¹Ü¡C‡Þ¹sÇØØØÖÖV(>xðÀ××÷áÇ ÃÖÖ¶ººZ*•ºººVTT\»vËå&&&‚?k5h©¯¯1b„­­mNNN·ëÎiii±¶¶vtt,))h…\KVÈS§N-Z´héÒ¥ÿ¨Ñ^™LVRRâââ¢u¼‰D÷ïß7nA|>?99y„ „?Ç«ªª"¶šjkk½¼¼ššš=<<Äb1qv̘1£«¦Â0,##ãÁƒ'$$ÄÌÌ ““S\\ìéééçç'—ˉÇd29))©¦¦Æßߟ(°^]]œœljj:kÖ,2™\VV–žžÅãñÒÒÒÊËËÇ7fÌ@aa¡Í3 ‘ö¹r¯««ãóùDNÝ{÷î™››;::R(@€ã8±•G"‘ ètºP(äp8Çï:‚V¹3 IÆokÌPò _ *¨`é–-#FzýO¡åÎ;nnn¦¹¹Çq{{{"h–F£I$’ööö!C†(•J>ŸïîîN(÷âââãÇoÞ¼™N§Lå>Ø™?þýû÷§N{äÈ‘na,(ŠN™2%##cùòå?ÿü³®„|~~~7nÜ())qww×µ,c°(÷ðððÄÄÄÔÔT}&ȧÏÍ2ÕÕÕcÇŽ%Ö,---~~~¹¹¹‹-b2™2™L­V—”” 6¬¾¾¾µµÕÍÍ­›fÿ›¬$œJªÁ;³ÐòÎ,P«(`foGü766j4™LVVVæææfhhøë¯¿š™™Ñh´û÷ï[XXÌš5ë›o¾3fŒö\uqqyóÍ7ŒŒ_l=½Î/¿ü’››ÛÞÞ¾víZÂ1¹+‚œ9sfÔ¨Q±±±ÞÞÞëÖ­Ó‰Ï#44ôÆ™™™M¹ „B!‘ãWŸOæ¥èsånggWSSC8Œ‡‡‡K¥Ò€€bgÃ0*•êååE£ÑÌÌ̤R©R©lmm}æ-@¡€5P î`DÖØO(p`Ž=îx¼ÄQKKˈ#ˆÝQ___ÂÞÈÈÈÌÌL"‘^Ú· (JØ+zW=ZÈdrÏq‰FFF§OŸ Ü´iÓ˜1cˆ›Ö´iÓ>þøã .ôzäÿÉÉÉJ¥rÉ’%úÄ/EŸ+÷!C†<³B¡˜™™v(‚®ºò™¨T ¸sW’90À´çÞ¯aBéjHñòòêÖÇÚÚºëSA‘ Ç¿___ÂÿlÞ¼yEEE=ïÐö'ÞÞÞvvv·nÝêèè Åèyq~ùå@DD„®d oFSYY©k)ž †aÚü”FóW)=}ÇÆ O:•””4p60'MšôóÏ?_¹reÞ¼yº–e0! ³²²x<^PP®ed ånee¥kô &}:QjÈ!¿ýö‹ÅR©T|>„ eeeD·ÆÆÆ‡å­MmÖÖR&“YUUµ~ýz6lذÚÚÚ‰'«®žnÐéô¸¸¸Ñ£G8p`üøñóçÏ×­<Ç÷òò*((¨««Ó» ü#—.]211 ±Keee_ý5—Ë=tè®ey!újåN§Óííí‡.‘Hˆ¬&­­­†††ÆÚÚ:55ÕÉÉ©©© †aCCC¢ G||<ñàÔ©SæææÄºž@¡P888 BèßæU*•D9'mFÍç•â377§Ñhl6‚ "³ã¬Y³œ½½½ù|¾Ö±EQ„ÌINÉÅ!2±êg2™,‹Åbu-c¤g`bmm}ìØ1‚Þzë­®åtE`` ŽãúÅû‹œœ¬V«gΜ9Lj†­^½Z¡P|òÉ'ÚšMœ>TOfffÄ_ÅÚÚº±±‘Ãá‚!C†H$'''"-Akk+‡Ãa2™ÞÞÞ<ÏÚÚúîݻ˗//++뚆ÍÔÔ´¶¶¶££C.—÷œpÑÕÕõîÝ»$‰èÃ0Žãuuu …B[Å @dW©TDP •Jmoo×h4\.×ÜÜ\;‹©©)Š5ïÞB‚UDbe Ãd2Y[[›H$ºqãÆLC¨§+3gÎܹsçÎ;###óòòz(òׄ††~õÕWIII«W¯Ö¡ƒ"7Üñ=|øpNNŽ——× úÃõkVÈž!ÊR^¤àõÖ­[µÉ+++'MšôÌ ÕüüüÚÚZÇÕj5 ÃÏÜMÅ0,..ÎÈÈH¥RY[[5êy8?Ž÷öö¦R©W¯^>ÞØØ¸££ÃÊÊŠˆâ{)6oÞìææ¶aÃWW×>úèé™™™l6[ë9ÚgÏžMOOYúŸ}ûö©Õꨨ¨ööv]‰H"‘._¾¬+>B¡033“Çãé<‚¤¥¥…0²8p@·»5¯€^¹¿‰ä›o¾©­­ÕÉìsçÎmhh(**$''O™2…ÇãíÛ·Ø~hoo?wî\nn.Žã„ GG¢ÙÜܬuÉojj:pàÀ™3gJJJâãã¿üòK"P ¤¤äôéÓOºœ>}ºªªŠx*‰ÒÓÓÕjµH$úá‡Nž>Ã0GGÇ   í.…ÎAäСCîîî—.]Òþ'44EѳgÏêJ€Q [ç~2ÙÙÙÿýïÍÍÍ¿üòKÝJòjè•û ãøÉ“'CBBtŠ HdddRRRQQ‘D"™9s¦ö¥ãÇS©Ôk×®ýðÃtvv¦Óéùùù,«¤¤äöíÛÚºÒfff?ýôSaaapp°­­mLLŒR©üâ‹/Þ{ï½ôôô‰'vý6ïÛ·oåÊ•iiiaaa{÷îMOO¯¯¯ÏÍÍ=þ¼\.7nœÏÌ™3Çÿå—_®_¿>##cýúõ{÷î%Þ>{öì’’’þ|øðá:ÜÁŸ;wnAAÁ±cÇ‚‚‚º–}àóùãÆÛµk—³³3`üøñ„þ5kÖñãÇÕjµ¶’‘B¡ðóó»uëV{{û¯¿þš’’’œœÌçó‰u|>¿kŸÏ'¼?KKK™Lf}}½©©)—Ë=zôÅ‹»ú¿ÖÕÕ=àêêZ]]M4Ž;Vi<@9rä±cLj³·¢¢¢ÿpuuµ±±!nƒúöNRR’B¡ Óí×fçÎ?_²d‰Åx™rW*•±±±Úܯ …BaüÉóœ^D¢6CÃ`hØl|óæ·¯vÁÕÕõ5xeÜÜÜccc£¢¢º¶;::ZZZÞ¸qãĉÑÑÑÖÖÖ!!!qqq~~~'Nœ7nœ¶Ê{]]‹‹ËÏ?ÿL£Ñ\]]I$ƒÁptt\²dÉ;w¶lÙÒõŽØÑÑqΜ9wîÜÙ¾}{tt´££c}}=ŸÏOIIqqq …Â]ÇÅÅ%--M­V§§§;::öãQyiæÌ™óî»ïÖÕÕ-]ºT¡Pôóìd29<<èóÌ<‹3gÎ]ç“)**úꫯ8Î 5È 2åN¥R—/_îââÒsAáŸ?Å)†á¨¨(SSS­#‡Ã¡P(+V¬àr¹¶¶¶“'OÆqœB¡„††’Éd*•Jh‚aÃ†íØ±ãƒ>°°°3fLXXØ”)SöíÛwèÐ!KKË;wÚÚÚ’H$bUþÙgŸÅÅÅYZZnÞ¼ÙÚÚ:(((((ÈÃÃcþüùóçÏçr¹Ã† ‹MMMýâ‹/’““---“““?ûì3—Ë}f’†œ9sæE\qú‚öïßïíí}óæÍg: õ5„ÍAïÙÎÎÎË—/óxLøçDFF†`nnÃðÚµkµî›ýƒÁhmmíçy8'Nœ:­»ÔÐаk×.*•züøq]ÉÐ[ 2åN"‘<<<ú¡µP(d±ÈÐ,óïÀËËëîÝ»#FŒ¸páBhh¨‹%M:uÛ¶mR©tîܹ]‘ö„¡L·¹n ;;ÛÄÄD»óßÏà8þÎ;ï…Â-[¶¸»»ëD†^d)÷ÞÚPýGø|¾^¹÷)C† ¹råJPPÐ7&L˜P^^®+IvîÜ9cÆŒû÷ï/_¾¼W¬”/ÈŒ3 ÊÈÈè·8‰‰‰2™ìyÙýú³gÏž?ÞÑÑqóæÍ: wdÊAÑ£G÷Ãʽ¦¦†É$uQîƒÀ,3è033KNNŽˆˆ¨¯¯7nœ®"òaŽ:tèéÓ§¿ÿþû~›×ÊÊÊÞÞ¾¤¤D_Ì‹€ð“‰ˆˆÐÉìmmm6lÄÆÆ²ÙlÈл 2åÞof‡ƒ ê.6wq_Ïø¿ …B9{öìîÝ»AddäÉ“'u"Ç;~ü8›Íމ‰)((è·y-Z¤Ñhô>3@píÚ5cccm¨]?óÁÔ××/[¶L‡Ž:½ËJù; 055@@çŸ ºO½ýo†á?þØØØ8&&féÒ¥uuu~øaÿ‹1qâÄ}ûö½õÖ[]÷™ûŽÀÀÀ]»v%%%EDD\»víâÅ‹W¯^MIIÑÖ*èuº «ÕêÊÊÊÝ»wk[Ö¬YcffÖG³wÃÔÔ4(((<<|æÌ™ 2™lþüù:ñžÊÍÍ=qâ„¥¥åW_}Õÿ³÷ƒÌ²·øGWÈ¢¢¢‰ã¥læâ©JmÝ.\ñ é‹u¼8 óçÏW*•‹/>zô(Q¹¥?AQtáÂ…ñññÓ§OOHHÐ €aXUUU¯»<ã8^TTäïïa†aJ¥’h¿uëÖ3+Ïô „Ÿßó^¥R©B¡°ßLÞZ=Îáp8N]]]jjêÔ©Sûz^>Ÿ?gΜøúúÄb±——WEEÅ©S§Eåëd™ed2Ù‡~˜——×§³%UZ ¤Â'? ½Í½Ï /**277?yòä¼yóZ[[ûYAŽ92zôèË—/ïÙ³‡hìèè˜5kÖŒ3Pí•Y”Jejjê»ï¾kggçåå%•Jår¹V³÷5S¦LéáÕÀÀÀ~Óì÷ïß×>‰Duuu€ÈÈÈÙ³gŸ;wN$õÝÔ/^,,,?~üúõëÁW_}UQQ1sæÌ“fƒN¹“H$///“>E(r¹\ Q™ðÉBï-Ó >üÚµkcÆŒ¹páBpppÿëw6›Ï`0öìÙC$hswwOJJ*++ë­ý^F³fÍšï¿ÿþyeR5×GŒ1ÂØØøy¯úûû÷ÝÔÝxf^©Tzîܹٳg;99õSœÖýôÀÇß¿?›ÍþñÇûh:]1È”»D"Y¿~ýõë×ût–ÖÖV### Ri瓽rï/†žšš|÷îÝÑ£Gw}566¶¯+;99ý÷¿ÿEQtÅŠãÆÓº²|õÕW½bÃd2™_~ùe–円†×Ÿ¥zÐàý©Ü{N>ÚGYFjkkïܹ£}ÚÜÜ,“Élmmûb.Ý2È”;—ËÍÌÌìš&¥/¨¯¯§Óé3ËÈõʽÿ044¼|ùò’%K¦L™¢ Ž?}úôš5kŽ9rúôé>`îܹÇonn&ÊêdffÞ»w¯WÆŸ3gNÏæ‘>% à™í‡HêÙ?ôà•dbbòé§ŸöѼ§OŸ~ºN˽{÷FŽyðàÁ>šT' 2åA…Bá¾»±±‘L&uW³ŒÞæÞ¯H¤ØØØÏ?ÿ¼½½=,,ìøñãÅÅÅëÖ­#NË7ö]Pëýû÷===KKË>üüùóÏlïèèxçwüüüt˜£wdÊ]Ô˜Uý IDAT©Tž;wN[ï­`0M× Uýʽ¿axëÖ­¤ÑhË–-óõõÕ>mhhxë­·zk‡³+.\˜8qb×½¾®œ;w®©©©W&6lØ[o½Õ+C½,îîîÏŒ êO1žWÕ}Ê”)K—.í£I‰:3Ï{‚ éÓ§"¯¿ždÊL&Oš4©ï®êOü|Õj “>ùé÷”ßzÞzë­ØØX@·¬ë)))½MªV«¿ûî»§ýbµH$’C‡õÖt;vì2dÈÓí?î­)ž ‚ ÏLÞ2yòä>·] ßZØlö?üÐw®îñññÏ{ ‚ ]»vmß¾½¦îYS\\\iiidddß©â8þ¤‘ªKÒAvœþ±X¬Ãt]/űcÇžÙ¾mÛ677·Þ¸ùæ›o>úè£K—.=¯Ã?þ8gΜޚnþüùÿùϺ5>~ü¸´´´·¦x&OïÒh4†ûzÞ®tvv>Ý-—ËûNŒ”{TTTDDÄëLÍb±†úÊoïu™Òš0aBYYYŸÚÜ1 {2¾º‹rXuâ^—êêêÔÔT###AH$ñ»¤ôá­?0©C‡p‚a ú®Ôp@ñÂq,÷ò ÕÏ0d2Ù܍œߨD"ÓpÀ0ôçP8Àq‚0‡!Ã1‚Ÿ´  à &žá8 A8ÝjêäH×ìKßkTÏHÙÒÒ²ê½/l]ÆCÇpý9J|mˆ¡0‡`Â1Œø,‚pÇq 0 á(†Ã„á6<‹amºNq·¬aÏÙÄ›q C8ŠÂq GH$T£`䯡PA` ÃaF1 €`€á8 ‘ á?‡‚ À¸“Öís˜û2ö  £Ã†i`Ç0”J£Ñ ©ëP00 GHÈ© à €£8€BQ †Cµ/A†áC…w»ß ð,†µá®{~Ì~2 Žá8„ã(€Â5ÄP8 ÃF€a8„ Fƒ’H$Ãpâc†‰ãᆞ %5åçç?ý7…²WÀ"Ûc÷÷Ž“H$ {r¸‰D‚Y-MŒÙÄ™Bœ,$‰Ø™Óž>‚(в²²É“'ë0AW™r§ÓéÚLâ}AGGQŽSÍŸÊÕYÍÔ>!--ÍÓÓAâÛIü–ÈÑ”ûBï®Ü!p€CD&Á,Y Tü©~ŸœØ ãO´*A†=Qµ0 ?¹Xâ)51…`Ç5D†€Å`4”D"kP5 !a¨ÀäÊ;§ª{JwÞÙÞt'?ËuüRµJ“è¦Ðà$*Rª1 V©Õd2Õ(LC€JƒÁ2¤Ti(ŠJ)§PY¨F‚A4 ‚*U8• +U¦TJ©&>"vä§|+5>=iÙ½[û0–*4l&U*•Ð\T#D!V©1•„Ë“!“ ÉT6ŽÊ0ŒNEÔr`1È"±”É⪔B@b’€ÂqÜ›í>ú›“%B£&.SbIÕ6S®¨,c8“ Ë% ²›$JÙ®RÙIF8¨FŒ!,¢ÉpC]$–ÒL•\„@—)Q*‹†‰¥j“!WHîp2•­Vþ•1‰ih«FÌä2)•ÁA5" aÓ¹T 3é$©\Ag0•r™d°%ÊdQ1±LÍb2$r)‹Å’KlL‚„R%•M¥†É Êe2*ƒ­Ñtb›Š¨ä*ˆŠÍf‰E“'tüý{¹NX-QÑØÆEj5NÁ$r “N•HÄ,ޱJÕV)T0ƒŠ‹d¨‡) è,†wÈQ6R*Ô¤2›Í–K…0…™FM£SP‘ïlxFð#ŒÝ&®¶v  t¦F)0›  5…Br5¢„¨æ–Cl‡ðºž,d2ÙÌÌL$a¦R©Œ;;;ÝÜÜÊËË HvšAfsg³Ù—.]z^ôG¯ÐÒÒbjj @5@-{ò£ùw™Üy<A±±±yyymmmû÷ﯬ¬ÔÞÍ ´q0Ç­y§ Ï҄Π“Œ¹t*qw2çfH£’˜tƒN†!ÃpSc¦•Óڂà“ì,Ù^F†lòH{ú“m&ûXYc,dÄPºï(3Â-LYž.€`à4#ÐhP„DÂ05 #ª0 (ËØÃû‡ûÜêÒäÖºR¡B¸ d (U !.¨F ` ©5DB€JR©TT­&S˜F†C42Œ*Õ…Œ¨5¡ô2ÂädŽÝ„ÈOŒ,G>=£°µRÚþH©Ô°™TJ¥±0µƒªÁRª1:&—‰IT6À”(N!¥R 4ŠH,c0Ùj…"3IJ©AL̬-&u_©Â*Ucd:È”‡ÍT*¤  r  ‘€B®¡°H§HÊfsÔrLfkTfPa•T qÙ4¡HÄ`²4*@8*Õ`dKU :M¡Rh,×[þÍ‹ÜÜ~œR© Q¥‡TX)UÀ4 ,—+‰¡ ¨…jÀdPP±LM E§ÓåRLá’p±BCeÓ!™BÃf1”J‰J×(Å8¦"j¹C1Y,±XH¡àj!ò÷ûok×ét–Lå’p± %“aµ\¡a3éJ¥’É2P+:‰EÕr ’L‰sXt±HHeàj¡°`\¦ÔÀ *¬Pjè º\*D¨lWªQ2VÉ—E~ü°»rÿöÎ;ΊêlüÏôÛÛîÝ^i[Ø K¯"*¨ADLb%F?ƒ-Q“¼‰‰%ÆÄüôUc¢&x£ Q°Å Ò¥wX¶7¶ÜÞgîv~ {½nc]–]î÷³™{æœ3ýÏ<óœ§àU4÷Ñãçü>•Æ$‹œŒkp™H¤Š."8`4Mw‘ìJñHš¦;öÆoüõ¯}÷ÝwI’ÌËË»ô%y{c˜ w¥(è jîÊ[•,:û7„;A ÃôÑG¯¼òŠÙlÎÎÎ&pœ p‚ÀÛí¼1éj­^¯ÅSÌ0:Ÿ_ž|ãœL‚5­8qâ8‰‹&‘qÃìôéÅ ù™ôè4ºÃÅÑ´J¸)%éHÇd0cR¼–˜ÂqÇ1Qˆ¢Hà€I ')@4Cc $c2AQ$N¤ž<}éïÊÿB­ïu‰!¹b럑ÀpŠ¡0IB*ƒLRI14FÒ4jµ ÉNQ88©¦)YB˜ZE#$3 %ËŨI\@£¦ µs–ýfôÄ%Nt´öÈÇ­šç#*­CŒÔ0”$J V‘¢ŒT*Z´ZOb„Q4)ɩժIÔô²ÈŒŽÂEQ&Ô &ÊDñô[Hú›ÌtbØ…*­š$Ðh>ÂÒj=<Âi†eŒÒk.ÌŒFI*… ­QѲ€HƒŽf9N«7ÊR#U$Îc¤J£&¼¬×k%)¢êì*1-ï›ïI›¬$­ÂP„ µg»Ò3’,kuº³]a<"µFóH¯×HRD¥Ñ+—IÔ: Á†ƒAÇ ŠVcr„ µ*Jà%L«!•®$1¢Ö ÄJf¿ñ8Ô’ &]O«õ41µŠF2àzƒ–xŠV!‰Åi=CмŒkÔ¤„V˄ÜZg$‹H†Îè´´ É*µJ”Æ@b¼¤ŠF2zƒÆÖÑìwÖÇþ#â5ñê•£ÇÏ ‡YµÎˆ#á …ó€3: %J Ñ¨0 #Œ¦i’$ý~¿Ëår¹\Jb„Ã0“'O–$©¦¦fÁ‚Q¡™pM¥?`–””­÷6Øl6eCŠYPEÜà 8(™ 0 S[[»bÅ ‹Å‚&½Š$iÀ™Úf_~޾Í ³R5iVM8"ùLz·7œ—›´÷H½^§gIFˆe¹PsûE“ÍUÛpftNúþãgæMÓÚf×ëõ£RéñãL{µYŒj–“¸0n6èÃd8k¨‚Àda˜ ˜ªÓ„$¸Úbš9º`jýñÿžÚ¿!è³u¿œpÈUs`ÍŒÅH2.IŽ«dIÄ €„€ 0Y’ pI’@à I HB‚,Ó$I’LZQ½É"`“14)ˆÒô…÷f*ÙýŸW#Ü7ÙNœgŽK¬=Éš%‰À0åêü¿Ò.ýÚÛ§_µ¬úè—»¿ø?Ÿ§«ˆo8ñÕ¸ñS‹Ë¯=»|*K8Ž#„SÌýÊ€ÒÕÙu9e @î\‰Å1!Ô0 €œ’¼pôØüÿñ{ÛÙ•OYl »Çæ„Q–EŽ! HFˆ Y–0ܲˆ0½b{Â!„‚”$ÃuÈèìb LXŠõ{ÍUÛí­µ@Ñ”ÅlÄ@–ÑÙ†ëIFà8ˆ$Z(!’$E‘Çp=†$„’”ÕEI’Ò$ yò¤Ûí>wÓ ÂëõFÓI<¡³âÈò–é¿þõ¯U«Ví߿߾}o¿ýv-Y–ýÕ¯~µjÕ*E€®Y³fÇŽ§N²ÛíÝ#„6mÚ¤“«¬ì+)–?üðg?ûÙgŸ}ÖåøöíÛ{;Ål6ÿüç?ä‘G}ôQI’î»ï>Q·nÝZ]]ÝÏAÏ—1cÆlذá{ßûÞßþö·íùÞ{ïí1áÌ 1mÚ´iÓ¦]²áb¹ÿþû¼ralÞ¼yÒ¤IkÖ¬‰êmWÃÌ,3~üøAíßáp)Û²ð-›ûF’¤”””ìììO?ý!ôÒK/1 síµ×Ž;¶{KQSRR^{í5žçEQãÆS"¿bÁ0Ìét666ž:u*33Ón·ƒA‡Ã‘žž¾}ûöâââï~÷»Ý'sóÍ7Ûl¶ë¯¿þßÿþ7AÓ§OߺukJJ I’Ÿ~ú©Õj-++ë±¼ê©S§®¿þúï}ï{§Nºùæ›-Zäõz×®]›’’rÿý÷Ô½Š¢ÔÜøÇ?þQSSÓýF]0æ×¿þõ%+}ë­·^š±b)((˜={ö¥Ëçóýë_ÿ*ÓÓ2Ì4w„P(¼—Ö¨“;Hâ•b–IHH˜8q¢N§Sn¬Ãá˜5kVoKÖ™™™'NTþH’EÑh4öÖxÁ‚Ï=÷ÜĉeYv:III³gÏ>pà€Á`è±ÊZ„ÛíÎÈÈp»ÝF£Qv&L¨­­ý7Š%99yâĉ‰‰‰EEEO=õTBB‚,Ë“&MŒÌÀ 8ޝX±b%»Â7ÞxÉ$ÑÂ… /q¿;×\sÍ F«ÄòÐC]’†æ~ôèÑõë×/Y²dÊ”)ƒÑ¬0Vs§F®peY»ÝÞÞÞž——G’äĉOž<Ùc$Çã9xð`mmíUW]5jÔ(ŸÏ—“““žžÎ²=äØ»ÝžŸŸÏ²,BhöìÙ›6m*------))é-‡DUU•$I'NliiY²dICCCrr2MÓJðpŽãôz½Ýn§(êºë®«ªªÊÌÌaóæÍwÞy):YžuGÜúŒ.mxŽ«­¬,,+‹º 鬱t¶Ëå:räH]]Ýœ9sòòò”kìÒǦM›RSS§M›¦Õj»|:°/Ú6›çù´´´¾ß“T›6Ñ(ÛBawó2EÑétžoV%‡ÃÎÙ !}Ì˲œ””tñ.4§j´QdY¦éoêœÆsÖ§Þ±c‡ÑhÀ—Ëu‰‹ƒ_†™p?|øp0,(( ‡w¯×«ÉŽxÍ|>Ÿ’A¬ËñÇ?zÏ=ŸmÝÚÑÑÑcL,ËUUUÜ|ó?¿üòÆoìMZÕ1uÿø2ÿ²‰6ÅžŒ¿õV[Ade@…o%n}_|?üf !ìX¹’¸újˆîçÅÛo¿]ZZZPP°ÿþÆÆÆE‹õØì/ùËÌ™3ívûš5kî½÷ÞۜӒGþüç?ÏŸ?¯°°°$-[w†ªªê§N:é÷ûçÍ›gµZ{ÔõhÇNmíß•í€þ:¿á»ï¾»mÛ¶šššóͽãxiié9ßêêê22Î>\].Çq/ÜBÑì‰}P[[›­˜9Žkmm=§pgfÊ”)‘Hä"g¥ªªê܆!ÃÉÏÝãñ,X°à†n$ͽ­­-vWÑÜ•¿‘*Ü Côw« ùý~ÿOŸîã܀߯[¿¾G'Hžç£±ǧ óE¾©Ì {ãÜ¿ÿ=¶*mcBãrõòV±UÙøýŽG)ûâ EòɲÜ=SGGG[[[V«µ¦¦¦±±Ñf³õ‘ :--­¡¡ÁçóuùR¹\.eƒã¸ßþö·ï¼óN]]ךŸQÔutÜîry?ýôÓÕ«W÷LÛn£,‰Å‚ H’´eË–.“ŽÈ/ƒà«gÿŽN¯Z¸páóÏ?¿k×®î-ûƒ¦à8‡×¬YãñxÂá° }èûý2Q©Tçš ˆH$²qãÆÖÖVŽã`ðâϯ4†“æît:Ÿ|òÉP(ôûßÿ~Ô¨QÞ5êJÐÜ€b‰!Vå|î¹çÌÇŽýØé4çç÷x"Ã0O<ñDú§Ÿ>xóÍÝ ÷’$}“£‡Šiï}ø•ð+f•YÿÊ+¹ï½×=l 1±ñç-kÃk“üßO”}þy4Ç,ËÊÏZZZjkk+++išVªÝNœ8Ñh4ÆF…B¡Ï>ûŒ¢(—Ë B•••¡‰'v¿“Étúôi‚ JKKcGZgÎ$z½ÿ³t©{ÿþÍ}ô‘Åb™Ø²eKT¾G[ö“M›6=Zq]=zô¨ËåRÞE £½S§Navøðáüü|I’Âápcc#MÓÍÍÍ .t¹\ʈ²,ïÞ½{Μ9ýúøñã†ÀîÝ»A(//ß¼ysQQQnnnçÝ;Ž9¢¬^„B¡öööììlŸÏןL mmm&LHNNnlllhhè’ ­ººÚëõ*Þ½»víŠD"sçÎí§Á°f8 wN÷Ê+¯Üwß}ƒÔƒæˆ÷–NÇó|wé<~üx&=]óï{´ÚO”e9'779--Ü/r NN9ù³=?yû r׬§zŒ kJlºÃqÇ/ÿ–{×¾êqe*¬[·.33S£ÑÜrË-+W®,((سgO0|衇¢%çý~ÿ‘#GRRRüqhmm}þùçC¡PÂýË/¿ÌÎÎNNN>~üx‹±»v9wìø|Ù²çÿøÇëÂáðÎ;ŸþyÇó«_ýJ‘YpÓM`·oXµJ4&Lè- ?//Ï`Êÿdsó²Çïÿû„„„{î¹§û3`+¤ÿÎ>iCö"€eË–-]º4ö%Éét¾óÎ;™™™E9Ž™3gîÚµ+%%¥¥¥…çùôôt£ÑXTT¤t®R©š››á>~üøÕ«WkµZ³Ù].z½~Ò¤Iàp8ôz½(Šo½õÖ’%KvíÚ ­V«,Ë 7ß|óÉ“'-Ë_|……… ØL&„Ð’%KþßÿûK—.MNNVt…ÂÂÂÍ›7K’ªªª(Š*++[·nÝc=,Ëâ8®4ttt(ö÷ 6L™2ÅçóíÝ»7++KÅ%K–üç?ÿ!¢{ÈñgŸ}vóÍ7òÉ'+V¬hi_'€ë IDATi1 GÍm™™¹sçÎ)S¦(iŽŒFc 0 /½ôRaaáõ×_ßã?Ö`8™eRSSwìØ1}úôÁ(ÖÁ²l´L‡‚|˜eB¡PoQà¼É„i4ç\þW±ìÞ÷ßW\·lÙÒÑÑÑc3 KÓ*Œ³Ö ú¾²NÖYëž¾û«í½¬§à8®Ñhü~¿Rƒ8;;›ã¸`0HQT—d–&“I£Ñèt:N§˜zód Âh4êõúÞ ÓÙÙ–ôôÅcDz{öìùë_ÿºfÍš¬¬¬|0j¤†ÁxàÎûï¿¿£cÒgŸ|ï½÷6mÚtº'£–^'4ÜŸ••Õ[¾(Ýæÿ¤ü â= 8°cÇŽh­VKÄ-·Üb·Û³³³Ož<9fÌ˜ŽŽŠ¢æÎ»páBŠ¢¢j¯bøƒ‚ |üñÇsçÎ]¶lYNNŽ" @¥Rew¢èò$IŽ?>55uÆŒ&“I’$Žã–/_®V«;f2™†™;wîéÓ§}>ߨQ£ÊÊÊ”‚ &´´´¤¤¤(÷S:s'ŽãE…B¡¨>AÓtff¦2tô–¦¤¤äææŠ¢8zôè’’’E‹µ´´„B¡¬¬¬‚‚‚.J7Ã0¡Pˆ¦iŸÏ‚ x½ÞþóŸQŸ:¥½(Š‚ (¾J¾ëÉ“'G‹ŒH†“æK—.ýå/9€k)Ql6[á~%hîjµÚï÷÷˜yœæ8îðáì²²`0¸fÍš[o½5ª»ÝnÛ×_8ðßÏ>Ûàõæ/\øõ×_¯_¿þÉ'ŸìÞÆÃ#mð‹\ €Ú¤=ã‡Ôæ p×?á?×Âøn)d´ZíwÜáñxöîÝûÆo`–ššzýõ׫TªÁKøW^î+(øÓþБ˜˜xÍ5×Ü{ï½Ý—L1 £iZèwßu?ôн>JíÛ·ï±Ç»ýöÛ»$GÓj੟•­y¿J‡²³³{ï‡FCóÙ¦¦HÕúÈzžçgÍškjooo×h4œ1cFCCÃâÅ‹7oÞ;;»££C¹K›6mª¨¨HOO×h4JTsiiéªU«n¹åe’$kjj8@Óôµ×^ÛyÏË=Ϙ1cX–MMMÕëõ‹Åçóavúôé.šû7ÞøñÇ/]º´²²277wß¾}7ÜpCô‹ û÷ïŠèŸ6mšÛíÖëõ²,+O‹óû6 +†™p§(jÚ´i]¤ð€ »ÄÇÚÜ…î'Œ$I2 ¡¨pT’_/Y²Çñ?ž8Qn0d—•×_}Ñ¢EÊoÆï÷Ÿ^»–^¿>xÿý«Ö¯w 8ŽðÁ,Ë*ý¨T*¡ÓÓÀ¯œðT8À臠‘Íã}ͪµ ]sv—$É軚^¯×ëõ™™™Ê+¼Ùlî®q¡¤¦ù¦ÃÖVEÙïŽãGŽ™4iRÛTFF†’1X­&~øÃ›233†éÛ‘™¢ø‡Êðùþú³Ÿ5þíoë^¬ðìììm»=/ýn^kó¶|ð¶Ûn[¸p¡2¢ÒF³3¯9{÷R&ãÞ^‹ÅbµZ£ŒŒ Ã|ðAeW¹Ò¨¤VPLCÊó ¶zÉO~òe£K$`yyù¾}ûÊÊÊ‚Á J¥JHHè>y¥ŽB¬Ñ)+++ºV¡XÌo»í6eWY½öÚk£";ºNÖ%Iç˜1cÜnw429##£ÇÔ7Ýt“²±oß¾Øãf³Y¹À©S§BÌmŒ2kÖ¬hÎúصŠn¸¡û(#‰a&ÜÃáð å–‘$©ËëÞ• ¹ó<¯q©©©Y·n’Î…Òé“’€¢(µZ}466îkl||ãÆƒ!°mÛKÏ?¯×ëU*Õ /¼ dõŠ AŒ‡§ÚàFÙyk1²•ðQõKhø¶æÝª…Þ„—›aœrÖ·¥ª¢³÷vQV«õøÃþð‡uëÖ€Çã)))‰ .°,[RR »8DG$¢ÿy-"y~FJJ‹Ì±ÌŸ~jÿžŠ‰‹_zé¥h´èˆI¡OÇ9Ïú¹Q…÷Þ{o(:zôèÎ;çÏŸç,‰DZZZÎé éñxÕ»½½½»}ò¡µµõœ®' %&&:NQU*U®N„|}© *†“p÷x<ï¿ÿ¾’ÖuÀ;ï¹._AL†$ÉX'ÈiÓ¦?^yÎýô§?UüÍfóúõë•ÕW(((ÈüÅ/$ƒž}öY³ÙŒaØã?n2™ºÜÃù©óuliu7ã³4 ’ØÄ––602ÆÝªÝ=Üâ|H(>Ÿ(†¥§§ÿüç?þh—/_Þ[Râçž{N¹üÉ|ÛO±øðÊ¥ Ãô&s—?6mѽg—jÕ5hµÚéÓ§÷|Û#‰‰‰ÑW¨>貈5 õT- Ïóç”›]†Ž5§ôFvvvCCÃy• ë›Ø(ª‘ÄpîÍÍÍõõõ—l¸¯¹+ Ù»üüp7ŠWlñÊvRR’(Š¢(ºÝp8Ê)Ñ@DÅÀóüœ9sDQljjêSL´8A0 KS÷êr£Œ>Ÿ¯ïÊJ’$…B¡Ûpçt:•«ãy¾·6Êüq§išçyŸÏ×ÞÞÞLjі}´é‚ úðWëÕjý7†ø è?–óÍ0’$ ˆ2{C˲|ÎëÍî7P\äMVÀçÍ€0œ„»Åb)..ŒÙ²,w·ÉŽx?÷ ø ÑK%Bˆ$I%ïnßôÿ÷°dÉ’~¶ì›òòòþ4“$)êéxΖ7£8#„xVÈ Çl6®ZµJÑÂ%qG—ƒ#>· Ã0*•*.›¢(n!C=‹8ÕË-0j8 w·Û½nݺ’’’ó Ï뱎·QF¼æÁ`Ðãñôf¾`GZ MÓ—m‚\–e1 ë^ 6NœaÊpîz½¾¤¤dõêÕýÉ6w^¸\®h]ì(#Þæ®™™9ൊ¶lÙÒå…@qFÊÊʤZÏçkllêYĉ3` 'á®Ñh ¾•·d€£GîrðJð–Q¨®®Ž]©ž6mÚEêׂ |þùç'NT‚$B[¶lY¸paÜè'Î%cØ÷æææW_}uÍš5ƒÔw¹s…hîÐÐÐ0mÚ4%‰$Iíííƒ!êÎã¸â­\YY™ŸŸß …’’’ªªª|>Ÿâ7M’äÞ½{ƒÁ`—õXŽãþýï/Z´H‰;½é¦›Ÿ/‹¢ØØØh4oºé&†aÔjõŒ3BcÆŒ‘ey0*]b†pß¼y³’»õâA½óÎ;»víZ¿~ýøñgëý°,ÛcÅí+Ds_ýÑI»ÿÍ/½±{Õ÷r$q^*ÌÏpp¼_‹íu",câøë~9°c :•ôô½q+ÿ… T5êr06¯ºJ¥ð(è €¢(eÕG™Œ×ëmkk»û™ë¯äËp¹ ÷ŽŽŽW_}u@ººãŽ;¢ÛùËïŸ{îgJz¹üü¤p¸Õõ ÑÜG}“7MÄu.*KFÀã`ÙTÂ}FJχcÛàå;µ/¯ }qÑSg 0™L×\sÍ¹Û [.káþå—_>óÌ3•æ÷Å_ŒnäuZöI`ÔØÄ0¾²{û+DsÞöä}s†A¸°ðì_ ¸ñœg©’‹ô|cR¾ÔþWú¢°½ • ïLè¶ïþ@x¢Y q‚NC‡8!âU aÔ1\Dôy‚À­f5BÈå '˜T†±œ QSÀ…E_pà‹,ƹB/¿ü2EQÑÀfÇ“˜˜xûí·íÄb ƒ¯¼òJ¬Xkkëĉ¯»îº¡Øàq™ ÷ÚÚÚÇ{ìèÑ£ƒd¤c¿>9ü¹²-–áÆÚ\9Þ2†åååkµÚ¿üûøÕÓ²Žui òl]5mê¿ßÿÁ—U Ô 9«,­¢ÆÕáìÁ8Of#h)H! N„1äJ—ÅQ8Ò“us&eœnpg$ë|ÁˆFE}}¸uÆ„4—/ñ§‚®”ÍâÙ¹ÕÍÃ&%o?x¦Ãɦ$hfMJßðUm\¸_n`¶`Á‚ßþö·7n´Z­<Ïßyç ,êy} N—››{øðáüã$I^)5õþ•gZý~ÿOúÓ²²2 .ìž"xøÂcf·c¹h¯÷¼³–ç9C;ۯݲÃwÂÿÊÔ¢+BHB¢$+R$ IÒÙg(B(ºÔŽY³6Žç¼À0L­V‹¢8 µR‡ —H¸766ÆÚÐ÷ïßߨØh2™æÌ™s½]XÖQúÓŸ~úé§.—ë׿ýí9SK*Áñ <ϯ]»–¦éxàøñã0+)áç²Ü„YoÙ‰\Éæ–¶Í™C=µ8ƒ†a©©©Æét†B¡‹ Ç0ìâ “ªTªk¯½¶¤¤„¦i¿ß¿eË–'ND"#Yþ ÷œœœœœœèn¬Ü¼dp÷ꫯ ‚ðãÿø|«Ò4}×]wíØ±ãÙgŸ¿¯¹©i¨g1¼=zô]wÝ•žž>zôh·ÛýñÇ>|¸¦¦†ã¸!œÕŒ3žxâ Q«««srrŠ‹‹¿úê«7úýþsŸ<œ9Bꜜ>}ú'?ùIì3æ|™3gNyyùO=8Îòòòƒž:uêâ;¿œ¹‚„û_ @€¤Z­~ýõ×/¾ŸËŠ#GŽœ9sFÙFMŸ>=}Áü÷¿ÿ]¹r¥J¥:zôhEEÅ®]»²³³zè¡‹žlœË”„„„»îº«¬¬LI"‰‰‰Ë–-=zô±cǪªª†jbMMM²,gdd¤¤¤Œ?^’¤`0(IÒ¯ýë‘­¼›bq»Ý>kÖ¬k¯½vÂäÙ£ ¦\@™QwíÚ›9Ù^Sƒ56(T©òçÌAY9ooo¯¨¨$IÉá¼{÷î+j™k¤BQ”F£QtmY–U š¦‡ÖŒ™““#I’Ýnn·›$IN÷À¼öÚkJ’‘J\¸ÇóÈááÿ÷Ýc‰æ ÉÊËó|kkkì{.GÓ€ Š‘Hö5×´µ·“)1#§¥¥… ˆcÇŽ±,»sçÎ Ng°Ápâ\.T8@Fj*‰a>‡ÃyæLGSSGs³«­Ík³1f5),æïœ#8àno¯:ujß®]'³µ¶ºm6Íðx–ÜxãsÏ>«×hFª=nÈ„ûæÍ›•äìJ–g„Ж-[¢ /n·»²²r@:yò$˲P__ñijÂáp[[›²=PIo.ÚÁ§ßØsÍÌìD³úNW«Õ×_}qq±²ËqÜ“#Ž£GC­­+î¹§ËY¥¥¥þóŸ§NÚŸ¢Ûq† € z—Š,VQÔÕW_‹bØél;uêè–-§÷ïw77‹.—ÕhüÎ 70¡´Äû!ßÀЀ0û¡C§öìaív[]òû½--A›ÍÑÜì±ÛoZ²äÇ+WšGV2È(Cóº´aÆcÇŽ¥¥¥íÝ»×jµVUUaÖÑÑáóùH’ÌÏÏÿè£ÒÒÒ|>ŸR¸Ël6———_ØX­­­²,“$yaÁ;wîLKKóx<)))^¯7766J’D’¤,Ë#£b BˆF¾GnÍ" ¡¾¾þôh ôZmt×f³½ò׿ò'Nd\u©ÕF<ž îÚΤ¯jµzçÎn·ûŽ;îX¿~½’…5Îå‰Ê×›oÖ©ÔO>}ö¬Y:FÏ´¶º¼^ätúމååÀ­·Ý¶þÃ÷<(wŠõ>Äw—  Çqz½~ëÖ­ ‡ã8¿ßŸ•ÕßÀȱZ­n·ûÌ™3JÓ°gÏžôôtŠ¢¾øâ‹””FÓÜÜœ’’r¾þ”—-ƒ‘/‰Üó K: 5™1ósss_xáeûå—_ð¡ã ,(&B»GÑœ`±ÜvÇŽööTµZaãÆŽÝè ¦[­X$"ƒ¤Fóàúûn!¹2úœÏ€~ö€LZ¸pÚ¼y<Ç…Üîƒ{öäGºFî QSYQ_Ÿ9cÆ|°ººzÛ¶mòÆpù04Â}ÅŠ<Ï3 “——GÓ´,ˆÝpà ²,«TªH$¢èÅA(:òÅŒURR"˲$IfØ2eÊ”)Sp—eyìØ±8ŽSÅqEQâ§5"1™LO<ñ„Õj]¹²‡\Êq† ý‘°@É„ IZ[l(!;K0'h,–„””Q‰‰Œß^s¨AÎURT”h±´»\¨"»Ç6ýÿ½á €¹W]5cþü[¶ AÈHKƒp8Áð'¦f¨ªäv_k똢¢ï|ç;;·oGÖ/zh„;I’ŠÈŽzMAL9fµZÛò"Ç"‚ ˆ ^²c¦ûÁx-о1™LûÛ߆zq.–ûµF3Á5Ah„HN›Ýb6Sxh“,Ëa·MeÈÏÉËë8sFÅ0ß»í¶& ærìN¶¡y(ëš_¶øƒbũ˴$ô ÂóüêÕ«?ÿüóòzŠs™ëÑH%˜Í‰ÉÉ93®æšR‡…°¬C!IâƒÂ}Ü ~•.Íår?žÂ°szUÂE{Ë Ø?„NŸ–EQeŒ¢XÂÌU樂{¥–€Vp¤ºzÿ·ýâþgTNÎH’ïc–©oôyChBqƹ›^aØ‘m»ó/$=Ú¥£¶¶6êJ„ÊÌ̼ø"{÷î½úê«M&ÓÛo¿½aÃ’$ÇŽ»téÒ‹žlœK #j±o[á1š$Ë&M² I FÓ,¯ ‡B.Èx½ŽÚÈösjžUÔl³Ñ4­×ëÝ~ß²{ #2€°åà ‹‹§Íœ †2'´6ÛidPgN­­«#µÚ°ÇÓR]=&?ÿÇ+W>ùøã€ÎaᎠydÜ+‘ººº©S§*¾Œ’$uttœ¯páôéÓYYYFãÙâ«ÇWR~>úè£Ê‘?ÿùÏMMMÙÙÙn·[q‚ªªª*((¨¨¨(,,Œºíܹ³°°0!!aÀ./ÎE€¾½bä;@QàjkKT«$yIª¨©q¹Ý€ãIêqNQ­g΄ƒÁüü|A’ìv;Ã0B8ìjk;qøðò[o}ó/©©¯N‘#é-$Î…£¬9+\Àé¢(ÖÔÔÔÔÔôÖàèÑ£áp8;;:::N:…ãø¶mÛÀ矮¸Eýþ÷¿ß·o˲•••ÍÍÍúÓŸjjj^}õÕ—^zihÓ ^!ôÓœuwÁ4*MQ<ÇI¢æù#G¶ut°á0Çq\$âôùì>_D1„p„Äp˜¢¨ÞFéçèçÕLî¬,;ÚÛ+OžÜþå—÷쩯­µy<ÞH„Òë%‚°,¥ÑP$ÙÑÒôûoºé¦#Ì[F’‘ÇûÍ/P­ºr³ì "ÂÙ²,+Œ,÷ªžQ©T‹-Šš²,{àÀØ.—ëÞ{ïírVYYÙ믿>kÖ,ÀqÜ`0´¶¶jµÚP(T[[{ß}÷qwìØ±òòr¿ßëCg0¸×rŠ¢X–í„QcÆTŸ>]ÝÜ ’’„à*NQ‘`PUSSTTdooG"$E) uC÷óDé§P‰^‹p8!Žc&ØÜLj4b$râôé‰ee“fÌ8UQ!sI’H:Z[—ÿû¯¿öš0p¥‡î…yIÿÚØúú;'•]AþÈDš!1>çËžƒö{Ϧ($‰ÄýéééC;¥¾AUUU)n©²,_€£§Ré&ºk·ÛŸ~úéØ'NœX°`²­ÕjwïÞív»o»í¶ÿüç?Jì±  Ã$©ärÊÈÈxë­·-Z4gÎ%úá"®/N¿¸eŒ¦i•ZM£×[1¬Íf#x^ŠD$ŽC‚@h42†…ÁætúC!‰ Ô:]÷Qú¶Ò`1’¢ÑØ IDATbìBçD9EØPÈãv'Z,ŽkhZ éÇ©Õjš¦C@$TQ”† øP(½°P«Ñ°~ÿ(ú50Â}ñ¢9&ÓÁöŽh cª©qää]9_ 4úYãCkfLÿþeË:sæÌØÜ§J2î‹„$ÉýèG?øÁ”Ý3fD?ÊÎÎþío«l?óÌ3ÊMÓ?üác{xä‘G`ܸq?™8ýá„»ŒÇë•Õê° 4ÖÕ¹Z[ÇææÒ&Sݱc*’T -v;Žaiii>–EEÐt9Žõ.Ü£˜ ³2ŠQùEŽ£ÇÉ&r\br²ËïsÜéÊÊ…×^ëho?²(pµ·K‚0{îÜ>ù¤ŸÁV—3#ÜqŸ5sÊ€tçÒ£×ëõzývh±XþøÇ?¶¶¶N™ÿVŒd0‡Ó‰'$ìýúë×KÉò¨Ü\—ËE Ù¹¹–¤$»Óôù*OŸв»\J]˜XûOo4šµF>—jßrg(„ø ‚ÀËrZNŽÞlnkmu9¥¥¥&£‘¦i—ÍÖÑØôzC@YYÙ'Ÿ|rA^^\AÅ:â\2 ÃsÏ=7Ô³ˆ3ˆ(— (6BK˜eσ,Þ·D|¡P‡ÛÒ‘$+~¯§ižç ’ÄcrÄþ·‹Å?jAý{ô8Cž/È‚ ãŽ××׃A1ikj*((‚ Âá°V¥YfYÖ`6ãR¼u¨‰ ÷8ƒˆ(ŠJŽ ËÜ0Î3s @˜,–e½>ŸA­‚ðƒ ŠÎæf‹ÁPg·K²ÌJ’Š @Àï§)ªK êi»‹æÞO›{l À„@Ó€ÐÜÒ"cX¤¦†¢é3f IJJNnt8 ‰‰:½Þf·8I"/ãæ`îqI’Ö®]ûÉ'Ÿœ:uj̘1?ûÙϦN:Ô“ŠÓ¨›âÜ#Ñ´-I&¥¤ Yƒ2B¼(Š<¯Yöù|‚(r‘'2E18ît8ì6›)1±7[6ê¶Ûãúï-m)„H’1›A§Ã9Ž”$.’$)*äó…STvnîØÑ£$OUV6ÔÕááß¾!Ѹp›6mòûý8Ž€,ËS§N½È4Ëð»ßýnêÔ©k×®Uúüâ‹/^ýu%I¤ ¢(ªÕjŽãb}lü~¿Á`ày^’¤¸ã㥧K$j4en΋WTDÓ´ßëÆH€Ê2:{&(š–dYE·ÛMéõE…C¡ìqã!6`Y¶âøñP(ÄÐtX’Á xAþ——qá +Ͱ»¢ñï–Ä…¼ÌqÍ5×Äáw¿û]vvöÚµk¿óïøý~sg™=(++S*è®[·.99¹½½=111‰‚ V«yž—eùî»ïþä“O²cJ8Ål°˜˨¿ Ö)Ö)€D‹å'ÿó?¥ÅÅzµÚd0à8² ’T>uê?ÿ<ÂójšQÄ$I–$ŽçQ$B‘ä’%Kôô™3+++?ûôS£N7jôèúº:!,ƽËÐó&q¾ ª]:”d¹¥±‘7™†iT*I³rs§Ìš%!ÔØÔT{ú´ÓfchZ—Ï'uJö‹¯5´Ä…{HHH8¸ϸD¢ªÂQh„ ÙaVVI’O?ý´V«½ë®»t:]}}ýªU«”O³³³Y–2e I’………~¿_«Õ:Î+V¨Õj·Û]^^îv»EQ¼å–[âµ³/%±f÷X€Ã&•—O()I4›iúýÁ`0Éj•dy×öía–ÅÒÒ4NÓ’VKhµÃp<¯V©Âáp‚ÅÂÐôŒ©SÇäälÞºõdu5Ô×ÖÊ1y`P7™­Î+g‘4dÙd‹… ‰çÕÍÄI“(† †BÇNœ#>Â% ×j].—J¥Â;ÏÖ_¾¸p“'OØqñÅŸ~úé)S¦$%%ùýþ;w>øàƒÊ§Z­6vD%7Ct W1Â$''씆–H$BQ”²d=,@16€`tFcFFÆÑpI|n7ÇqÅ%%‚(º::€J­ÖéõA`’“uV+†ãÀq‘PèÔÉ“IÊ¢h0-–ïï{Y~ãÍ7W76FDQîÉõjïÍm¦ob J$€^«Í5jBi)˲›--%%#3Çñ`(áyãp ãyžÑhxž×¨ÕDgqíá«¶C\¸Ç$’’’~þóŸoÙ²å_ÿú׊+ž}öÙ+9?Ì|0yòd¥J{kkë˜1cª««1 3áp8%%E¿ß¯×ëív{RRÒéÓ§322DQÌÊʪ®®¦iº¨¨è¼ÄÄZØðÎ?À0sr2MÓí­­Ï“$IFG ø|¿_‰ý_\ìòxBápÑäÉmÍ;†—ÓÙÚÜ|òÈØ,–¢’’¤”•V;&77A§óz½@ê6“XSL—ž×Ñfƒa\^^JF òápYy9MÓ2@k[›â"†$)IJ¸V+ ‚N§#1Œö1LqágÐHHHX¾|ùòåËcr‡aÏójµ: ªT*Y–BA(^:JZù†(Љ‰‰üñ¸qãDQ¬­­­««s8‹%!!!11ñý÷ßgÆf³Í›7¯ººº¹¹YIƒÌqÜöíÛišÎÉÉØ=ÒÝÚ1®2ÃB!Ã4:¥RáÉ'  é4£F“’žžžšªÓëI†›ŸŸh4Jçq8øPˆ#J­öƒÛ·m#R³²€¦GܳG–$9Ƴ%:¼—ü‘ç•8 à¦Ñh4 ÓÚÒÒÜÔTRXhÒé,‡y¾õÌ™p($±, ‡iŠÂp!””œ¬¢¨ÏÇ5÷8qz!TYYùÔSO)Â:‰„B¡§Ÿ~Úl6›ÍfŸÏgµZ‡Ùl–$I’$†axžw:¹¹¹—@Š]b,‹"Ê¿þúk«Õ*Ërff&Çq¥¥¥­­­ÍÍÍ<Ï_}õÕUUU4MÏœ93 åææ:tˆ$I­V;sæÌ µ,Qiëç]™”Ôz½^¯'HÇ0$’(J’D BÃdh4“©æÔ)R¥B‚ÐÚØˆûýfŽÓ¹Ýl$"‰"Æ0”J…h: 657›’’ò «Oœ@^/Ömpq‚5öÉDD‚Án±œ®¬$Ž8™””Æ0\0(rœÄóÏ ‚`´X  AQ:N£R…x^êö>1¼ˆ ÷8pôèÑ3gÎ(Û¡éÓ§'&&^L‡‘HäOúÓ»ï¾;a„¿ÿýïííí=öXuuµbsPä;†aÝ3>â8~^ö—?7ÜpäååÅœ9s&€¾;~üxå£{î¹O¡¹sç^²yvOö¢ì "@ˆç †„Ã’ Há0ŽaáHÄH…z”‘@ÖÚí €Áb y½œÃ‘­Veê„:éP;$’aš–qœÂ0.t»Ýj&1+ËÈ’ ;Ššà{ dígú¼ÓànÒéL{ö Yƒ'«ªLV+aF½ÞëõJ¤óŽž`hs¹«}>ÞïçU*Ša†Ñ’$à¸$Ë*FñI—cÌA}HÕ~¦ˆ¾v`fF‹aa·;¤Ñ NV©êÚÚR›š’Çv8žU*Õáy Bg0`ßîm8 úa³|gPñùÚfï‹?h1^Ȳ§(Šuuu'NœPv+**xàŠŠŠ%K–œß‘={8–µ&$ŒÎÈžO°ZAx¼^šaÔ £Ñôæ:ŒˆkIq¼þð[Vß~}¾QÏø½ç}:Ã07ß|s\ý233+++ƒÁ`GGEQN§óºë®ûꫯƌ³oß>§Ó #Û¯æ“O>©¨¨ˆºðWVV;vì©§žêyõ@—ÕKI’‚¡V¥’0,Ìó€Å$’”ƒ¡Ý'NÒ3 fD!DiµAðƒ!^½ûá„Ñ&½á°Æht·´´ýöÞ;ήªÜÿ_e·Ó{™rf&3™dRH#… A å*"P½z¿¨÷§ˆ\¤ˆ^ Ær¯\.ˆ(H %4i)†LSH›dz9gΙÓÛîkýþØäx2%LH$<ï?òÚgŸµ×^{Oγ×~Öó|ž®.W}½×ïçx^‘er,.åþ¸÷1qFǯ¬V«ß錧ÓTUEB]§…B±PØ¿g„úÉ“3Édx` S(¨„ „TM3Y,§Åõf©ÌÜ+BHOûžËf)éÈþ×_ý}ô!´X,#Õ¾ÚÚÚÖ­[—Ïçÿð‡?<þøã€ööö`0¸`ÁUUY–;w®Åb9ï¼óŽ=šÉd‚Áà‡o5uW^yeÿ¡C‡.¼ðÂÙ³g?ûì³7Þxã™ÔèÐãs‹!’$™,Áng³C‰UÕY3gZl6Ñlá ¬¢ÔŽg·[ÁápXý~.ÌšLöÚ†*‹PÓŠ¹\!›ííê:xà@$á¡\ÅåÄ–t¤øÌ Z2z¢®§ +‚öLÆ”JYTÕA)I$⑈Ž`·»ý~‡Ã!§Ój&C$)‹YÌæñ‡åœµTfîÀå—_^.½wZrmöìÙóä“OnÙ²pï½÷nÞ¼yéÒ¥+W®Ìf³‡£©©iñâťƄ†††`0˜L&m6Û).çžý<üðÃwÜqǶmÛºººÖ®] …>àüô§?½æškF–öé\6â"‹ª¦„t]%#ËC‰D¬§Ç…AÐFÌl¡WaDJ¡¦aŒ‰×»óŠ+$I,ûÑgŸÒ™t*•×4ÊqJˆÀó¼ PÉø‚Ê˵o¿ýö¾}û>ÿùÏ¿üå/ßÿý¥ )¹qx“‰3›qaÈΰ9 („»=“Ímk»ôòËÏ[¾| ¿Ÿêº–Í2ºžÇaÙo`ÔYMÓnºé¦Gyälö"VŒû‡ EQ2™Œ±MÙ¹sgé«ÖÖÖÒvOOÇqmmmùÈGn¸ááéMY¾|y[[Û /¼ðÒK/æÎû‰O|âãÿ8 ‹)Šb6›3™ŒÇãÉçó!„дiÓ†Ñuý}”çþ`øÔ§>U~?OMÓŒkçw¾ónGrÑE­[·nØN–e¿öµ¯ýèG?¶,ûnš(!¢(RJ9Ž39Š$!›m0fÅtþ³Wíyû‡u‰0ŠBF§´àõ&=žéßýî¶ÿ÷ÿæg2DQ4MãŽ|*…²Ùlª¦Å¢Ñ“-ydüOݶmÛ7¿ùÍ5kÖ”ö§Óé¯ýëF ({á°{<ÞPH.t°<²q47ˆ!„vM“5­³­íMŽ[²té”™39Aè=tˆ¦Óª¢0&f i ,â¾4JY–ï¸ãŽ·ß~û¤†ýÁS1î›O|âÉdòÈ‘#ÆGQÇs`MMÍ~ðƒPË.»ÌÐ3žƯWQ„Pss³Ñƈ«ù·Où|>>ùåˆB9í}£$ÕYÎ¥—^zõÕW_ýõš¦¿+H©¢( ÃpçõzÃ==MÍÍÎþžÔÇnþÿnj}Ì%uó³²\ÄXaU’8YQTtÝ4e íêÊåóŽ`0U(˜L&«Í–ˆÇÓ©Ô{Ÿw„pØÑ£G¿ýío?úè£åÅN¯ºê*Aî¼óÎòÉd²«¯o²‹µ¸´bb†åî´(C½©„‰x\.÷ìÞM-–ÌÐPQ–MV+Ã0ðØÍ&pûí·üãïììÿ­;#T|î›ÁÁÁ—_~¹ëã±ì&“éË_þòóÏ?þùçÿƒFe³Ùxž÷z½ýèGo»í¶«®ºÊëõò<¿jÕªÐ+œ,óæÍ[¶lÙIw€T(hšf½ñ<ïp8¼ÇÛW^]àÌ—¾ü¢&*x´—Ïç §¶®#†7Οïin–ûˆ$Ë¢(Žút?±oËåþú׿Ž\žùüç?o¬ÆÓ²³ÕZ[_ÏÛT[­Ä0ÄBåþ¥Óåé&.MööîÚ¶mãsϱ ³jÕª‹×Nš¤CˆÂǪGJßÌ™3çæ›o>©ûvF¨÷‰ÍÊ•+Çßc¼zõê#GެY³¦ÜW‰DZË(‹§>°êêêoûÛµµµ·Þzë…^ø…/|á¬õ·œYƳpWª’q²5+N@4}ë­·Æï26ÎȰ,Ëq’$¥ ‹Ùîêêm;jUŠ_ßôs6/ÕN—ëfK›Îär™p8/Iº®Ë’¤òâK/É„@–ä Š¢`2)ª:¬Q$d”Á@hxù†±iÓ&CJÚ@@@!$_(’@/bÎBëZäèüÆž¢UÁÁXV”ÁH¤ýàA¡B&SU]íöùžç,8Æ 饗Î~Ÿ ¨÷‰Îš5kÆ™õ3mÚ´çž{îOúSmmí°¯öíÛêëëkkë¬_,yøþð‡ÔñoБHd¬s±,»|ùòßüæ76løìg?»nݺ¿þõ¯—\rI©AOOÏo¼±}ûöW_}õÕW_M$㹄+ïérÜ}Šñy>úè—¾ô¥_ÿú×åT Ñö±0¬›Ùb±ÙlÙlVÅ€ßïñz3é¼}e¨„§°÷Þxg>®ÅS$ƒ±% 57çfÍÚÿÃÝîÃû÷[l6áÐÐP4ʲL)UTµÔéƶïFƒÙ³gßzë­×_}ù×­[÷Ì3Ïüð‡?e=hT5-Ëá>Ô·‡I U’¯|âö¯]ùš:“ß/Øí}½½{·oš¶háÂ@ Pߨ¨ëºÍé,ï¼ü†ÿïÿþïsÏ=Wò…žµT|î„ÉdÊår'hãp8î¼óÎ;î¸ãñ㇋L÷ý÷Ž›>6¨£xûûûß~ûíóÎ;Ϩ¹‘Ïç_zé¥óÏ?XJ½Óé$„¤R)›ÍÖÝÝm,ó®^½Úx'èïïß¼yó¼yó „Ùl|ØÛOÀø'àåJ^§ÎÂ… —/_>ì]ʰ­c©©p{½šªÊ’d³Û›'ƒÙ²9°y`n{4—'ÿrô©ýaoÚ.¨‹Åln¤ô¦G¥šVâêëÏ_º´«¿?žN‹¢èDQ$”*ÇÊ(–gK£BháÂ…ÿýßÿ]¾Ä½víÚ›o¾¹£££ÔsËø›šŽ=*¦(@dL„ås!“Éno°XTUõõõuv†»»uu›­¶º:Ë£‡š›êr¹n½õVI’Îòbã>!Ù¾}û³Ï>»aÆRaÒ±¸öÚkï¿ÿþ÷¬T×Îþß »g5{CA[_ß(Æçù)S¦ìß¿ÿ‚ .X,–‹.ºÈçóÚ[0Ôu½±±±¶¶6N§ÓéT*•Íf'MšˆÅbgúôéŽã(¥J%Ȱ,±¾|稆l˜`˜·÷t%Ô\yå•'{ˆqj—Ë”D±®ººË BÈÔ7 ¨*îUtlQxU÷)Ãþn¤ª®XŒèºCÓLm‡ù}>›Í–Éå¢Ñh0Ô Át}¼;g‡ã8E–K7ŸÂ …Ê£Ho¹å–òÑ’cÓ|B©Ýç#Á`\–!Ç„(Æc†çx|¾bOÏŽ-[®¸îºi--˜ã"Ñ(ƒ>V«odvBèë_ÿúÉÞØŠqŸ0d³Ù;vüþ÷¿ß¸qãàà ¥”eÙE‹Í›7od¬`ÆŒ?þñ/½ôÒñtîsÀ+/¨n™ä*ER£X,öôô”a „cõær¹|>_OOÏóÇív§R)·ÛmÌÜ›ššZ[[_ýõššš -ó>@e––…Ó¡2çr¹ J¹CcØwpZk–3Vê Žçmv{2·ÛlÍ“'756îüë_UŽS8X,€aËBŒBŠ$AY–…!©®Eéêì_>Ÿ—$iëÖ­%IÛ ›XªjTnL¦™³fÕ74ðÖ£eã30ÞˆªªšV,³Ù̲˜a „DÓ„ ËB)¥,Ï#Œs™L2wx<>ŸoêÔ©.»=›H¨ïûÆi*Æý,B×õíÛ·oܸqýúõ‡6lz}}ýêÕ«W®\¹|ùò±c®¸âЇ~xÆŒ?ýéO—/_~Æ×yxà]×!„v»eYJi.—kll|O×ÿDd¬i{ùN€‰eçΟ?mút1“ÉÇã„*!:¥ˆR†3BVŒÝµµ-Ó¦EâñÖ·ß–…–¹hάÈ=€ÀçõZ-–ºPÈÊqºª&³YÈq„UU·¢ëB„1%„B(5,;€B¨¨j,‘¨on6q\•× êéës:‚  …ÑÏ;Bßÿ=}GåcÆ`dYÆ,Ëåp±ØèrQBˆ‘^!€h€eYã|.×ßߨ©-<ZæædžlíYCŸŸyDQüË_þ²~ýú7ß|³«« ÀqÜŒ3®½öÚ}ìcS¦L)W•‹/¾øg?ûÙç>÷¹³Ä…ý•¯|åLáƒcÔ_þ0ï9й ´47çûûÍ”ri‚`q»] +Ï£lÖ¤iãD.t:—^tѶM›Š²\š¼ãã3àÉë(€8œNŸ×ÛP_ï´ÙÂ==²ª–]WUJÄRJ¡`Œ)!€®i!@)%„‚yþ2‰„Ýá˜ÒÔ ûF @:M¿Ï¡î¢˜N&3™ ÇqDÓ(„˜aŒ'@×4¡Dkµj‡ÃáúXÌéóùüþK—nß±è:¨¸e>HŒçù*'?’T*õâ‹/>þøãÛ·oO&“Az‹ IDATV¬XqÅW\{íµÁ`pü] ‚ðå/ù6Ò 'AyveÉÉ>cÖ¬ÉS¦äb1«®{¬Vg(dªª²8ïjÞªªœË‰ƒƒ åãñ„ `‡céòå[_=¯(¤ìQñAZóò3RB¡Pss3ƒP¾P°{½ˆatJYEPÊ d!%D‘e@)€ê:€²ì»þwcS׫}>Y–®×ÖÔx<—ÛÝÓÓ3R&a¤Ï[t%?NH¾P „ºˆa!:!Dׄ@×EQL$üÒ´Á|À2 ÕõI“&±Eñƒ¼ó§fÍš5ÝÝݥϋ/þÙÏ~v²½ÜrË-V«õÁüæ7¿yúé§ûÛß^uÕUO?ýô)¾‰«ªzóÍ7§R©gŸ}ÖØ“L&oºé¦W^y!´víÚŸþô§6›m÷îÝÕÕÕ@à]ÍŸ?ÿá‡KMå™gž¹÷Þ{Fù·ï|ç;£FpïÚµ«®®n¬ÀñÐÞÞþç?ÿyÆ †b"Àçó]ýõûØÇ.¿üò½àí‡ TfþÊw‚2WµÛã™6k–,Š»}åe—M9 B®PàXV–¤|6ër8ò’dâ8Òdoïÿ>òH¸§Ç^SÓ8eÊ¡ýûµ²7z,°Œá uÿû üÍÃÏxèС}ûöµ¶¶¾ñÆ?ùÉO×\s͆ Fí288¨(Ê®]»Œ”™QÚµk×Ê•+¯ºêª½{÷^~ùåFP $Iáp¸ä\µjÕÆ”Ò¡¡¡Ò8OŒ,Ë[¶lùîw¿;mÚ´©S§~ãߨ²eË”)S¾öµ¯½ôÒKýýýO<ñÄÚµk+–}bQS¾³€?”D±ÍšM¦ƒï¼óÐ~ôƒüÛŽÂl:ÝÓÝmQ}ôч~øÃW7ovTU¹=UQ¦Í˜¬ªbʦ«°ì¼#9• æ°k¡ÇnZÌæ¦ÆF„Ë0‚ 0,Ëó<1 Çqc„1FèºQr ¢R‰¦)²œ/ÄbQ•e­PP³Y5—‹õôô´µIÙ,‡ÐÜÙ³-e‰lÃòþOeɸ†ã¬6ƒ1€èº^,šÆi³QJ)B&‹…g*Ib.WÌf­‹ÇëE±,+0ÌÄu Ï}îswÞy§ÝnŸ={öwÞyÝu×Ý~ûí«W¯ž>}úæÍ›ö³ŸMš4©±±ñ†nÐ4mçÎÓ§Oonn^¸pa¹(ÚêÕ«3™Lkkk<omm]»vm>ŸÿùÏžJ¥¶lÙÒÒÒÒÜܼxñâ믿þ«_ýª$IÓ¦M»ë®»b±X}}ýæÍ›K]Ý}÷Ý MMMk×®Eñ–[n¡”~ÿûß/5ˆD".—‹çù©S§>öØc—\rɽ÷ÞÛßßÿï|§»»{Þ¼yO?ý4à“Ÿüä÷¿ÿ}Y–×®]ÛØØ¸bÅ ãð;î¸Ã/ߺuk}}ý0¥­Ûo¿ý?þã?þøÇ?öõõmذaÇŽ“'Ož2eJSSÓ믿þ½ï}/‹ÝyçýýýŸúÔ§?ñ‰Oèú‰Öù3™ÌäÉ“/¸à‚»ï¾ûèÑ£çœsÎøÃÖÖÖƒ>ôÐC+V¬à8î´ü-+|ÀŒŒ7/EÅ”öc†©®©Ñ5í¼Å‹ç/Z´}Û¶Ãííþæ7Ÿ¾º¾~Áyçéè¸÷®»žËç·»Ý/#´à /]µÊãóÙŽsæÎeFX·ñXð÷giÙFùEÕÖÕ™L&Õˆ ¤Ô¨¤Ê`Œ0F,‹9³,„PUM–UYÖu]QUUuT]ïïééhkRTUÖ4 !ävd9<0 ær@Qëëêêðñ èxWÌûHÓU5a‡Ã¡éº"Ëšªê² ŠE„»A¨éº®ªñp8ç‰hOÃéäx^>¶æ1Aå±”L&wîÜù»ßý. ýû¿ÿû/ùË}ûö²$_ÿú×/¼ðÂX,æt:¿ûÝï– …B‹-zá…Þzë-›Í¶|ùrBH<×uý«_ýêG?úÑh4Š1þþ÷¿?gΜ_|±­­­¿¿ÿµ×^Û±cG:ž={¶ÑO{{û=÷ÜóÈ#>|ø­·Þzê©§Œ¿_|±t®[n¹%‰Lš4iÊ”)ëÖ­óx<ßúÖ·jkk§Âàà ‘)Ç3™ÌO<±iÓ¦ÜqÇÆá—]vÙ_þò—þþþ^x¡¾¾~T×vKK‹ÉdjkkÛ¼yóÚµk“ÉdKKË“O>ùÝï~×ï÷ßwß}ãH$²yóæ§žzêü£Qn,Guuõå—_þ«_ýª³³sÏž=ÿöoÿ¶`Á‚³Yæ¿Â{2–¤Ü|xçÎ<ðÀç>÷¹7ß|s¬Ëkmm]²dɤI“JiÊ—\r‰ßïöÙg7nÜ8V*QåÝår-[¶ì®»îš?~___yB¦×ë=ÿüó¿ð…/$“I#qã·°mÛ¶ ½öûÏŒ,ËcÅ 4¯´,¡Ñ°ò.§S*ÆýÝÝÝíí‚ P„,{Íæb,öêóÏ#ŽKf³Þêj.Ÿo¼çžØ¬YñhTÊfm6[>7[,U¡PG[[¹QYÙ&›Í–~h£2VL'F¨®¡R*I’Àóº¢è„@†Ágø]!Bªªjš&K’*ITÓH¡€XVS1ŸèîV2¡nGQÓ…DH0›‹¢˜ŒFy·›Ã¸¹¹ÙãvGãñ‘AýäøWŠqRJ“% Ah$R骪È2ÔuFÆf–e[,„s93ÆUõõŠ®]×uQŠ&f¨ kq°DF¦Ìºuëž{î¹õë×ßtÓMn·û¦›nzþùçׯ_ÿ‹_ü¢üÕ«W:thýúõ×^{mù~·Û}Ë-·<ÿüóÏ<óÌüãéÓ§×××ÿâ¿X±bEMMÍÿýßÿ]~ù奯~¿_UÕîînUU»ºº<ÏȱÝ|óÍÿú¯ÿ:mÚ´OúÓ×_}j„Ø¿$I”Rý^[[ÛÞÞ.ËrɉÄqÜÚµk×­[×ÕÕuõÕW;6‘H >ðÀ„•+WÞ~ûí¡PhÛ¶mÖa_yå•ÿøÇO<ñįýë1oíˆûYa"òøãïØ±cä~:bmLñtôc¹‘×kµÙÁàÂE‹Ì ãF¨V‘²©ÙR¼!áp1™¬®­%ºN(¥ R)6}ºáô(‹Í3fØìö’’Áû[5íììüÁ~p‚'pm³ƒÁb>ŸËf}€ÇífŽ™<žã „!JÐu‹1Dz,ÆRM–3©Ñ4C(8HDBf«Q `†A” ú\®¦ÆÆ‘c8•×£@6Q¡Ãn‡`9ŒŒY‹…³Ù8“ ³¬,Š©h4“Lj²Ì0ŒÍéœÚÒ°ì®;‹càONdtZZZ.»ì²o¼ñãÿøg>óJém·Ýö_ÿõ_ŸýìgW®\ÙÞÞ^Þ8 -X°Àn·—–d n»í¶ûï¿ÿ¦›núÈG>ÒÛÛË0Ì%—\288xþùç/X° ‹]qÅ¥ÆóæÍ»à‚ V®\¹lÙ²t:=ªdóµ×^»aÆ /¼pÕªU÷ß¿1û¶Ùl¿øÅ/çÌ™sÏ=÷¬\¹²­­ pã7ÆãñeË–]wÝu¥n¸á†ƒ.]ºt¤OfÚ´iUUU=ôÐÝwß=cÆŒêêêõë×_wÝu­­­ÆÓÂf³ýä'?Á+ŠòÅ/~ñ«_ý*`,=– þçþçW¿úÕ°ý'x[/M±9ž·:Âd*Õºe‹×éjË%çì_÷øàg/ý¨k–ËìcY’Íf)!†ð€¦ª¯¿òJd`@–eCzpÖÂ…µ ï;‰á‰'žøÿøòWí±yQ«Ýα,àâË.[´d‰'p8º¢ä3™t2™N$ÒCCùx\Îç!„š®çD1JõwttwvF‡† Ƭɤ@¨ HR"&²Œ4Ñ4¢i‚ÍÆšÍB€†††‘ž:¶‹æ=y7ÚG×ó™L!ÖeY,TU%P–• ‘T•áyžãl.oµ„°Å‚XÖxÅb’ª’“?ïY»7óÅ_,…jüçþ§‘;€Ú°aà /¼P,W¬Xá÷û¿ò•¯ÌŸ?ÿðáÃwß}÷9çœ3¬¯'Ÿ|R–eÃ' wïÞÝÐÐð­o}kÉ’%÷Þ{¯!xï½÷ÞvÛm¡Pè®»îºõÖ[ËÝ,ËnܸqãÆ¹\î²Ë.«ªª’$i÷îÝå1Ž—]vÙ¡C‡6oÞ¬(Ê=÷Ü3kÖ,ãÔ[·nµX,?þøóÏ?ߨØXUUe2™ª««wíÚõÊ+¯,X°@Ó´¦¦&ÀܹsTþòÁ¯Y³¦4=…BÆKÃ#<òç?ÿ¹®®®±±1•JQJŸ~úé·ß~û /ܲeËáÇW¬X‰D>ôÿ™©®®þÝï~÷ío{ß¾}åûGõÉ”o „š›yA ”ò¶s§4»ªò_¿ï×¹ø/¯îÐî¶q§&R)Ê0òäÉ€ãf/X`w»åÎNÁnÌæH$b±Xæ,X0ÐßßÚÚJG¬Þ—Ïåáño<­­­S¦LÙ¸qã§?ýé_éHI#2 r—;÷ÜsM&Óx®tØÁ?A¿àñzYŽ“eyϾ}“C55˜arù|*•"ºî°Û!Æñ¡¡!B€Ì0v—Ëãõš1fY–BHU•‚"Ën'™HÄm<_eµÆb1‹Åâr:‹±X¹==ñO@©vÀêpxü~Y’DMKg2b¡py<¾šUUuJ!„DQ¬6›·¶¶åœs0˦“Ép8,+Š>Ñlz‰‰š¡ú¾±X,<ðÀܹsO¼¸T¡B‰^xáÕW_:uªáëc`8q)B̲>¿ŸeYJ@,÷ìÞm® 6›Ð3‹›~îy½¯ºì*ÑHz ²ìÔ´†GÉçóv§³}îÜöövF ©ÅØà`_gg4 9±ˆÍ¨ëY³g¿öÚk†NÙ <ª_ÛX“´Y­MÓ†ihh¸ùæ›=n7$Ä$’,'‰H$¢êºÕáÈ !̲T×UYÖU5‹± CÌf‡Ã!˜ÍãD"açyžeyŽs8ˆaX†é ÃqœÛåŠ3î¥ñ”ž¦cs¬+*m°ÇšLáp¸?&ò‚PÓÐ`6›!„½==—  HÏq»Ýára–ýëÖ­½==ú±›6íû?qç8®| ·B…³{÷î_|ñç?ÿyéý¯ä8Á^”¤­›6Õ…B MM‡ÃátF‰í’4/Æ\0õÍ_|âö#‹g_³íOÖçŽæ!ƒ% ¤Óš¢ª«CÍÍÑT Z,€®îî¡x<ÜÛk¨gR2âØFiª>rT>¯÷[ßúÖ×¾öµ§SŒ|0–EÈl³a„òù|$éîîö¸ÝC‘H&VWs<ïöûSÙlgo/Ñu¢ª!«Ùl7›‹Ù,ÂØd±È¢Ø‡B¡`0ˆ16Ûl! Ï#JBª®‹ª*‚ ,Ï{|>ØÖ6ìOœ&6%ù€b±8‹õ H²Ì3›‹erSSwww>ŸW 9›µÚlv»=ºÜît:D!ø„oig3ÿtƽB…“¢®®nݺuåéÆãù¥HŠÒÑÑ‘ÎdjC¡@0èôz ÇõšÍþ÷sÕûú n^ˆæÌf»G0gÃaÎb™sÞyîêjQQÂét[{{{{{AK!•c…ŽðÌ”Ëz<žG}ôOúÓ‰Ç<êEå¥Ùt:ëšM$Þ~ã “ PM³8Çy}>VTEÁPBLçt:Ýn·Éj%ŠÒÛÑ¡RÚÛ×§)ŠÇëE§)JA× …Ëq¬ÙœÊd(‚ÉD(L&:bH#C’Æ =æYÒTUR c›ÉeIŠÇbBŒq.›%ñ¸©X¬jjš:}z2öƒ€ØÀ t­£–¨÷ NÄX+Låz£N댉v<OÄãc 0µ¥Ehiµ¡ž!´/m²š®XXv뫯Ö8œßK$ö8°éµ×2Ùlɹ>jÚNÉ CËRJ‹Åâ°™{ùå‹g'¸¢ï˜#$˜L”RUU1ÆË–-;|àÀ¡]»€ª:L&EQÌ‚àõz“i('ª*æóP–U“ ²¬®ë¹L¦˜Ja„Ìv;k2J¥|^•e‹Í¦(ŠÀóA»Ýëñ$’I¡/`Yvä0ÆRÑçå@J!&³™åyjnª*€ÓáÈf³Ñh´˜Ï;(5éz±PàÍæ`]Ý;ôööJ¹Ü¨/L…Šq¯Pá¤)ŸSO,§dt]‡ÃáÖÍ›'75UUU™xÞírµŠ0ÞßÓ“H¥²ÅbGGG6“!ÇÏÇK“÷r‹VšËBEQ–9¦Á±ÁÈ'™õ3Ú^h¶X¥¬É  Åâ´Ù³{È A†¡‚ iZ6›E‘AHQ”\±¨#ä uMÓuñ¼×fà c¶X0ÃBAÊd4E‘TÕb6›¬Vß_  ŠÅa NÅRºo@)Bh6™4M“D1›JUÕÕ ¢(DÓ4–n·5èîéIår‘HD’eI–õã cM,çLŸW¨prhŽwœ x¦øa˜é¢ª9|¸ïða€€€v¬jhIНdJ@YŸå¿èø' ø‡ª@Èr\ÿÀ@o__¶X¬ª®noo—r¹I--™¾>(Ë!JÃ0,Ëò,[ĸ¡©iÞyçI¢ˆ’ý~]UM3<Ÿ/9Œ¥LI²XjL&Sx`s\äIùlv ¯OÓ´_-³¶ï1ð²?M¾P Ñ(!$KÏóf«3 ³,FHÕõYK–„&M*HR­Í†&JeY-û N8*™“*œ4å6·4g/ŸËl_Ú¯ P € €vü í¨özXçôXìé5èÃJ˜¾k!d9®P,Z¬ÖD"‰Dê,v{<•²ºÝ ËUe²˜LUUUf³Ùaµ†B!#T†gYAxŽËg³‚ÙLIÅ㉡!б?d¦³½=:0 ©ªQLUQUI’NãQ40ËRJ „2™8› BX,ÂÅ|âu:® &“Ûç£r9±P(Š¢ªëÕµµV‡CØw8 !‰p8ŸÉ¸<—ËE(õ&³YÑ´Óåã¦e·—RʳlÐëõX­>»E(•Häs9±PeÙl±XœÎÁ¡!UÓ B›ÞzK–¤l6;q#Ü *n™ N züüýK¬'˜qj¬éñÛã©}*Œ:KÕ!Ì ˜e3ɤÝn8zôèâÅ‹mVk&OE£=ûöu÷÷gDàu: =Ȳ Ç%ãñX8 !ÄfsdpÐd±ø«ª¢ÑèP:/U­mh8g·Ã1>rôh:›ÅãSa§“û—A¨¡®ŽUU¥P( ª( 6[8fÆåv{½Þšššh,!”$ "”J&'âl½œŠq¯PáT¡clã,»5œœá¸T*%B6›UU"´{÷n§ÓÙ8iÑõή®Þh4Ëi”¦âq+ÇIÊæóýá°$Ë…b‘g˜‹s‚Ð~äH:™ôx<—KUUI–5fΙӟw95µµ<Çñ,«kZuuµÀóû÷ïW ”dY,€®ãqÇÔŸTŒ{… (ggY®ayöä˜eTT•R êïﯫ¯ÏærŠ¢%D „FQ J¥À ¤Êr´¯Ïi³IŠ¢H€êºB) “ËÅ –eé´ÕbÙ½gÏàà Íáhœ<¹¯¯! „1Ž*Ç»ŒÆ_zøïÒ4”RB „B€&Ë6«•A@u@XS[‹ äYÖj2Åãq©X¤º>—Ê©÷ ND$)×Sìêê:ÙÚ,„|>oÔ•ÎÎN£ÂÁéE–åò¡Θ1cü‡^UÓ 'Šb&“ ƒáp˜RJ)ÅSJ!Ã]/z¢ª6Jš5›ÉdÓrN Ë„ ÆcB©¦ëj±(JRAAh˜4 cì÷û-K$‘% B8,Ñx–ëßì¾0ƒ„êºJˆçpð—ËdtEX­^Ê$ IDATVža¥sæÎ Åã¢(jïYù¬§bÜ+œöìÙãõzË«µ¼'ñx|BT°2L®ë½½½uuu;wîgüI UU)¥¥R0¹\Îf³õ†(¥,ËÆb±QËŸ"<Ï{<žL&ãp8ï¼óÎÉö@EQ'À0L±P˜Ô؈1îëëSÅ<¥TÓ4tÌ?ÃRzټ査‰HÊöÿýÅãoÑM& !¥Ô§×tݼÑr9—ÛÍ Ã0N§cìr:=Ê2̰ì\rüÌý¤äÐ1ãŽF‡PÊ`LE1‹e³Y·ËeáùÚš]Ó Bv»½»»1Œ®ë¥Z¸—Šq¯p „Äãñ’qïïïóÍ7Bû÷ïoii …BãÎÎÎÁÁÁ/|á  ‡Ã‡òûý”R³Ù‰DÎ=÷ÜK/½ôÌ^ŠذaÃk¯½öàƒžb?™LÆf³Åãq‹Å"˲ÛíÖ4í´Œp,~þóŸŸsÎ9«V­zÇBˆ®ëºŽ¦¦¦&TWÇó¼Ãá`¦¯¯Ï(M…1Æ뺎0”šE1°öâ;æúUõÓŸøÒ9½÷ °®L&£i„P×uC£Bh³Z«««„MUBµµµV³9†Ãáa7¥Üš«ã3îå9·„›Å"I!„UUœJe3ãx‡cÙªš€¦(Åb±¯·W§´(ŠݲƒŠq¯pZÐ4eÙÒGžç/¾øbJi, …Buuu{÷î9sæìÙ³ÍfóÌ™3c±Ø‚ L&S èîî®­­-/¥{RSSN1`±P(Øíöt:]UU•H$\.×ðê …Nây R„P ˜:u*˲Š,c„Bµµ‚ ôôô J)Bc €ê²üû÷¿äó]—¨4Íž. ʲ,¯/¾ëPÁÕÖÖ² “ŒÇs¹˲‹—.=k–Ïã ƒGŽ 5ªñG(–’‡U5›ÍÆhuJuEº)eM&³ÃÑ8y2¥”êúá¤br\|hhü˶g-ã^á4°páÂò%òwÜal¥É xžÿØÇ>VúX*~{Ö¢iÚìÙ³›šš ÏÃû袪*Çqš¦Y­Öb±h2™ ÏÌ?Ô¾«ªzÍ5×p§ªê{6F#T8~ÿ¢… )¥¹lVE#TÜëñ`„zûú …‚ªª!]×1Æ2êáXó4)Ê0Zxä&d@’$UUuM£„ „¥^ÇîtªªJ ™î¹-_ uMÓ¥¡¾~ê”)CÉäÈ‚± ll㡤 QEMÓòù<Æ@Y–§”¡N§ÕfSdùð‘#‰tšPªIRl`€ß+Wö,§bÜ+œ4…BÁb±PJ÷ìÙ3gÎGÿ­Í}}}<Ï•ÄE–OóÏrr¹ÜáÇK&clåñCÚºuëX xž?Ù>ÇC&“ééé)=Œ¿ÅX ø2ýazlgUmí5«WÏœ9S”¤ýï¼søàÁŽŽÁd²:Ï[ÌæD"aøßUU%„àb±j_ûÍ+>íUÕ‹Sñb*‹F£‘ˆ¦i˜aŒ©®;\.—ÛM)uy<Í“'/Y²Ä¨’L$ÂÝÝõ‹/>ÚÑ1088ÖPO]×EÉf³š¦aB,Ç9].‡Õª®&š¶gï^§Ëes:³ù|:.¤R`b*A–S1îN‚ŽŽŽ`0ø“Ÿü䦛nÚ»wo>Ÿ/‹K–,yã7|>ßÌ™3fŠ¢tvv¶¶¶Î›7eÙ;vx½Þ%K–`Œ_zé%Çc±X<ÏŽ;šššêëë½^ï¡C‡:;;=Ïo¼qýõןÙ+-ÑÔÔTþÚñþ˜>}úiÌ?Ž’‡ºdÙ1<z¡ÐÞÖ6cút§Ã±ô‚ /^Üß×·aýúp$B( €B.§iDˆè:-kŸ|ìß—.ä¾v­¦i¿üõ¯óÅb)¶½¤«~²Ú2ÆÊ¥”ã8–aÄ|>©(„ãì>_ß_ãñ¤ãñÞînŸßŸN§!„ÑÁAEUµ ä*ƽÂIqàÀY–ÍfóË/¿œÉd-Z”Ïç»»»Ngù ,˯½öšÉdÚ¾}»ÓéäyÞb±‚ðÊ+¯H’ÔÕÕÅó|WW×ÁƒívûÞ½{GE<?|øðÔ©S+rg„aU‡XxBŽ<øx6ëöù¦Ï˜<^ïe+W¾þúë©tšaY³ x]®t&C!dYVÅ£Éäsß¹çÜÅ DIÎðÁÚZl±Ù ƼÉÄ0ŒÓnW5ãy–e%IÊd³‘H$‹¥’IÃU•™3Ç̲…TÊL©Q̤äþ&'9›.]‹ác·ÃAT•g˜¹Ë–Í[¼A˜N&†Ù·o_±X4›ÍCá°®ë]{TŒ{…“bîܹ Ã\qÅBH0Ìf³uuuªª–/6 ‚pþùç[,ÃýÂ0 Ï󺮟{î¹ýýý”R«ÕÊó| ðûýUUU€Å‹›ÍfŸÏçõz+ŠgŠr=wže/¼âŠå_¬0‰lxöY¡×ëE fsÕJ)‹Eªë,Çi„¨ªšJ&ãCCG2¹7Ï›Lš•·ræy]×­v;FH×u^xžÇ†\Bét:›ÍÖÕ×{·Éä²Ûû»º¼^¯ÃãÉ JÉñNöñ;ÁK”!BˆÝn'ºjkjZ¦LYvá…H×)!á¶¶pØêppW(»::&®Ÿ½œŠq¯p„B!€aŽ œN' ¹¹¹¼˲sçÎyx0,7Üå2õõõàØJ섈ÿpƒŒÕTžŸqÎ9·;šHp<fhhHÓu·ÛÍñ_ßà Ñ4zÊE…†aÆl6«ª …êëmVk:“ :!éBAVUFuMËf³}ÝÝÆKè0Ì 7‘?3¡+L86oÞÜßßR‡>|øßJ’T.ÀbÐÚÚZþQ–åa{*œ.Þ)2E£€Žeý>Ÿªªííí‰DB×uJ)!¤X,ŠE#5•Ljºn·Ù/^lµÙ8žw¹\,]j³XlV«Édx€2–y¿r*™ôù|‹…ç8ŒqrhH×užãÌfó0‡Ìqc¯€H©ª(ªªz=‹ÙœÉdÚÚÚöìÙƒ9 4[-@©Ífëéê*éA“¢œp‘‘•™{…ÓÀ¬Y³:;;KIL‰DbÓ¦M¡b±èr¹†L§ÓË—/oooç8n×®]Éd²X,rÇëêêæÏŸxì±ÇB&“‰²{÷î+¯¼’aUUÿò—¿´··G£Ñººº¶¶¶`0¸uëVJiooïš5kÎèÕH #> Éx2ŒDÈbµöôöŸ/8Žc¦iòäyóç4]W5Íç÷#<ØßÕõá°ì 2s¯pê@׬YS¾ Z[[kü,zè!„˲ .4"ÄÈ™o|ãFBÈ» k&“I«Õzà 7PJ>)¥n·{Íš5!C:¼»»{ÕªUô˜’ø™¸è!Êj(ºžÎdtJ1B!»Íf·ÛEQ”%©¿·Pꌿ)!!ÄqœÅçËg³{ÿö7YUMs{½ç.\øÖ[oe³YI–`sÃñât:¡uβÏs³r „tEQu`LÇNe?B†a!FÈf°ªê’+,f³®iÏ›ÍæB±H)ÝÓÚªªª~ìŒU¸|¢P1îNš’IUÅPL¡¼AI8»´ß›)}5ßXG+¿‰çùÒöêÕ«Où"*Ç(>TMèë+Ìžm6™4MÓ TdY–åI“&u´·Ûl6–e“É$@‹ÅÂ0 ƒñÊ•+#‘Ȇ?ýIS ¡NˆÏï—%‹åóy]×A`YB(É2ÂXÕ4›ÍæöxXã9¯ªšªæ"YQ0ÃÐé]'õ0G†¿žR›Í†16<3˜a8ŽÃSB¥8göìž®®ÎƒÕc!¡‚€™Šq¯pÒ<õÔS×^{í¾}ûR©ÔôéÓ}>ß[o½åv»G-DwèÐ!C` ´QáìÇp˨„ûû‡‰¦ÆF@) ”çy·ÛÝÛÛ«jZ*&ÇÒkld«Õê°Û7oÙ’²X,f·@Ø×Û{×]w©šf¨cŒ5MSŘé[m6@i¡PÐuÝjµ25-[(D‹Å"y_bÃ.„ éºÉd¢”ÚíöX,†Ú»o_ã¤I¡½{÷Zl6BÈŸ{¬ IÚDžª£bÜ+œO>ùäÅ_ÜÖÖöøãÇb±¹sçnÚ´Éëõ:N“ÉTjÖ××÷ÛßþvÕªU}}}‡êìììííM¥R/¼ð‚×ë½ñÆÏÜT/:©Tª§··®¡Áf·y³¹±±±«»›ãùB¡Éd ©t„P¡PÈf³ápøÀþý „¡P߯(J{{{N–B†«Íèa†ã¸×^{-N·´´pxèX,Š¢ZZZ6½õV:“1.ùÃ1mã^ᤘ5kV8>ï¼ón·»©©ÉãñœsÎ9/½ôÒ¢E‹JÍAX¾|9 ±±±··×étBB¡BhêÔ©glôN€.Ëm‡‚Á–éÓ!ÆÑ¡¡ÎÎΞž¡ÅbyWë!£p‡Qo¢Q*æršÅ"‹b.‘-†ÑuçùT*µsÇŽ¢(öìÙSÈçÏ?ß,éDB,†††Š…‚~šôóù¼¢(º¦)ª à8.“ɤS)žãv»ªªÛÞxƒ3ë•™{…FFj¤ÔÕÕV®\Y¾Óçó•„!K‚3&"„ÒÁÎÎ-¦2«Ý>ïhmÅb!‡ÃÑ4y²Ûã1,¥òLDÓX­V+ÏqšªbŒ!¥Bcn¬ÇikëîêÒɱBÚ 8a0Ʋ,ç3¢i§%{(—ˉ¢È0 C)˲„C©Íëó9]®ýûöI…Â)Ÿä¬£bÜ+œÂá°Ãá¦;FÀ{;²™$I²,õƒ*œ)þ^ìBU#éTгXñx&›%]O%“Û¹Óë÷O™:ÕjµiMèX‘k³Å `«Ý®Ë2bYr,üiëæÍéÿ¿½3kâÚÿÿ™l$,a“E6qÅQ±  xYTТŠPÛêU{[í­Kë‚E/Z-W½Õ^ýâóXmÁ­¶ Š¢€‚(‹€€ !,’²gf~ÌÜ”MÈD8¯‡‡gæÌÉáhÞsæ,ŸOKK‡õ…8ŽK„B¹X¬E§k+ Ewkûd÷¨\ÞÒÒbmmMÄÉ …2™LOOoĈl=½¤«W•“´°çü…êêj*•ªŒêÞÜÜÌçóÓÒÒfÍšeaaÁår ëëë---…B!‹Å‹Å:::&&&‡˜ž%’Ï566ÊÊÊd2Ù‚ `uÒÙÔðö‘wºL&ârùHU¢w!àÖP_ßÜÔä0y²X,–ËåŽSµ´‚ÈQ “Åj•˱D ÇÓÓÒˆ­ X§¿…€` P,–EA[Û€8;AC}ý˜1c( 1«Ë1ÃÈØ˜Ïã‰Õ´MChî€Åb¡*ë‘ïܹãïïÈËË“Édyyyl6[*•Ž=Z*•VWWO›6ÍÄÄäÆ #..ÎÐÐÐÐÐÇãûÚ>|ø~Éá ÖnîXûšBÕQi¥*Š’§O©Tê¨Q£„B!A´X,‘L†¢(NgêéQE"Aärù£‡ gïε1 ¡Ré †¼­ CÑ.«õ)Þ^¹©±±¥¥ÅÔÔT,3µ´t--ÇŒ+nk»~ñ"Ò÷x“ÐÜ!€L&S z¾`Á‚üüü¹sçÒét™L6aÂ===CCCEïß¿?iÒ$sss===€··w]]]iiikk«¥¥å¬Y³ªªªŒŒŒ(¸}Z­  …·÷ÜåÐ(•ª@QÅ_G©ÆÔ-|ò„ûæÍdGG‘Pø²¶`˜\.K¥€Báñxe¥¥©´‡‘A‚0´´D<Ò)9ÔûAø;†ã>œ2mšƒÁb±´µµ_”–åäà(Šwºo  ¹C€iö æÎ«%Púîï8(†! F!J$”öÐZx{–’¡äìš;!è`܈Ja‡Ÿ.Qæ’VœÄÛ½O6¨í•xØûš»R!®ò:‹„æ@† Ên,Þî¡ÄµÝOß™4Wi¡óñ;ÁUzëTh(Ú°öQÔ÷|‹ÿû+ }̧¯"?  ¹C  )8 ¶ÿÐÚ'6{ß_÷æŽ k·xz{B(¥ *,}x[Ýþ-¼S~ˆÍÒ/ärywq ˆí‹Äo‰DB§Ó‰­ê]†ê%ªõ¾2€h€ m¡¶ôi=‰r8å=LUY\¯€Ö~k¡µ+Ñ@æ»[ê•H0Dm~a }†Øh^\\ŒaØo¿ýHMMÍÏÏW­@,™Ã0ìÒ¥K8Ž_ºt ðË/¿â8^RR‚«ðüùs¢~QQñZ"¶Q(Éy«Ã =ôÚûÅtgÇ @Ö>6҈ʰøû¹'F„’@Üþ#€1C€€v¿{îª3CµÛ`ÏòÄÆÆ.^¼øöíÛIII …"==ÈŠ§¬Àáp222lmmß¼yS[[{ùòe@@¤ÂIMMmkkc0€G…„„$&&–——5 Çñ§OŸ¦§§ûÔi4š··÷íÛ· æÏŸ¯Ò2à°@ oï¡c*ýèÞ/WÖ÷'ˆrVÑ>&C€Þ~›égþÕ™adèú;4wHŸ155åóù¶¶¶DøÔÔTe¤0‡ÃÑÑÑ!¶zO˜0A¡P˜››S©Ô©S§Yôtuuy<‹Å²°°hll$Æj¤R©©©)‚ ÎÎ΀ÌÌÌ1cÆGGG‹ÅápˆñABÖ>ä-owO\e@¦—öGQ™ŒíÓ0}—`*íýwI?Úì°ìg¨:;€æy/^ T¶&ˆ¿J”á;lnòòòê²A;;;ÕS[[[€«««²Dõ2H@µ÷Ü•ôÉþT—Ù`]­‹ï+ª7´ý cr¦¾ jîCØÙ4wB j÷Íwzô<˜Þ§Ø/ïDyoÀP´Ûñ{GyïÜmÂ@s‡@ ï]O¶ggÄÛÛ€Á‰Ö‚ªü~?”`ˆî]R;I¥Râ¸ÿY±X,‰hZZ,]]ÐïÖz@—Íîî•J566îáµ|>_¡Pèéé¹Ý߃.Wñj ÐÜ!áKnnî@5%‘HÂÂÂ|}}“““£££Éšý?~|QQQwWëêê>ùä“âââƒjkk«S›šëÜ!H‘J¥Ë—/ŠŠúþûïùå—Ÿ~úI.—“-ª#uuuAAAiiióæÍû¿ÿû?² .°ç@úŽãáááõõõëׯ'J$Éþýû÷íÛG®0UÚÚÚÂÂÂ0 ›3gÃ0¹\nbbB¶´Áš;邜={–lï@WW÷Þ½{d«P+pX@† °ç ;rssq\™@ ¯¨¨è°¬g8Ž‘‘“Ùuü.E_¾|©ºÇmáóùìö¥2†Éd2wwwâôêÕ«666ÊK---¬¿xñÂÎÎÿ‡T*­««=zt—W‰OI™+¸¬¬,44T“ãÙAs‡¼………S§Ní°&Œˆ ãèèøÎšŽã™™™nnnƒúW† £G666‰D=š7o—Ë522êýËù|þŒ3ˆ¥&2™ŒJ¥ŠD"]]ÝÖÖV6›-‘HûÔ`ï±²²200ÈÈÈðööV(=R^²±±qvv~ýúuSS“ƒƒCAAAg :::...Äd¯T*¥ÓéB¡POOO °Ùl>Ÿ/ºSÎf³çÌ™“ŸŸ¯««kee%ã  ÐÜ!ïCjjª……ƒÁ@„N§ã8.—Ë_¿~]__ßÁܳ²²¦L™’@Ä{ñâEpppuuuee¥™™Yrrrhh¨¹¹9àæÍ›cÆŒyþüùرc§L™òäÉ“ÂÂB:¾téR@KKKZZÚÌ™3ãââ>ýôS Ã&L˜PQQ1räÈŠŠ hî½Çñÿþ÷¿fffýiD.—K$F¡P(y=@§ÓïÞ½+—Ë}||:\‹Å‡ {g#B¡èøÓh´––ccãîºó‰ˆˆˆ‰‰é³nµ£¹ÏM†ÉdÆÆÆ¶´´…Âäääúúz™L–MäAÍÏÏÿꫯž={ÐÒÒª®®.//óæÍˆ#lmme2YIIIssó˜1clllÌÌ̈!ƒ¦¦¦/^¼yó†ˆ5†a˜P( … …ðìÙ³¶¶¶ŒŒ '''.—+—ËE"Çkmm­¨¨Ðmß8é ‚*w0½b±XOOÃ0---6›­žÝ=R©ÔÜÜ\5»‹ÈçóßÙFc2™DÄ:##£Þ;ûÛ·oȨ¥Î ¢ˆÅb///‰D‚ Huuõĉ>|H§ÓNNNNNNÊʶ¶¶+V¬J¥&&&¥¥¥~~~¯^½ªªªúè£D"‘D"144,))ñóó³²²Â0ìÙ³g …bôèÑ‚0Œ¬¬,ww÷9sæXZZ²ÙìÌÌL"œäèѣǎËb±´µµ Éû<>0ˆû¥¶¶öâÅ‹¹\®B¡ÉúŒ EѦ¦&"³X,&T^•Éd}m°÷ÈårABBBÚÚÚ:˜¸P(är¹&L466Êd²ÎPmhhèNñ±twU¡Pp¹Ü±cǸ\®H$€÷3˜ ÊyÈð!==ÝÈÈH[[û;ô0 {ðà‡‡Gw ECCƒ©©)àýº3DR*µ§¼˜‰¤»é»áƒL&knn9rdÿ›ª­­mkkSž2™Ì>íÕ”Ëå­­­Ý]åp8ãÆc±Xý’Ø |>_9¥ 055U(//W½¤««Û9À€T*%îCr¹¼¥¥…ø«ŠŽŽNwiÄb1q'S2qâDÕÓúúz}}ýŠŠ __ß¾½«Áö܇#WSª¦pÍ»ž¿Ñ999?þøã²eËz¨£ÌªÑCææf…BaffÖÖÖööí[“ºº:kkëW¯^;–B¡ôììèì ÃvìØqêÔ©þoš·¶¶I]rôèÑãÇRf•& z¿àÇñM›6mÛ¶.=PÜÍã=¯ªš;IS"ÏÀ1÷áˆ@¨¨k–õ0ÌXQQ±víÚ€€*•ÜájMMMEEÅÇoܸÑÐБ‘‘ŸŸÿäÉ“¤¤¤ÆÆF†a‡¨çÎbüýÖ­[………gÏž­®®ŽŽŽ~ûöíÝ»wëM9˜L&†a«V­Òä‰D’””T^^N¶žØ¹sçãÇÖÙ.’10¤ÿé»hî¿ÐÐаgÏŸ¤¤$}}ýèèèÎÝjSSÓK—.577[[[¿|ù²¾¾þÑ£GmmmÊgÞ”””'Ožõ¡P(b±EQ*•ªP(ˆß4­÷Y€»»{VVÖæÍ›5ösËÉÉÁ0Lu…¢¦}þüy²… :pXòÿ3±-IDAT‰D±±±111MMMDÉæÍ›---;×d2™Ÿþ9ƒÁ¨®®677_ºtiCCƒµµuMM ‘xOKKëÿø‡²¾››1»åããSWWçîî^YY¹}ûö§OŸv—› Ò%D\”7nDDDìÛ·OwÐdee233×­[G¶–.ˆ‰‰9räš;dX€aØ•+WNœ8QQQ¡,œ>}úš5kº{‰……@¹Ãí<=E z‡ vˆL›6 @äJ…ô{{{CCÖ––ØØX&“¹{÷n²u„è³?~üX&“½wÀôAâÖ­[ Ž¡¹C†,‚4ñ$€²’¼£Gdgg«^e2™QQQ …‚X`ÑÓÒÒ'Ož;vl@@ÙŠþ‡D")((ðùü‚‚‚É“'“­è¤¦¦nܸ‘Ø›:räH ‹~N](0ŠHò—”P T³VBsŽèÓšÝ*örvö˜ªÒìÎ s¶nÝ »Õš‰§§'aî8ŽoÛ¶F£õfC¦zHOO—H$ÄñÓ§O5gÃpYYYxx¸2ļ»»»A?Û,©â_M©Uýîˆ$X}Mñ¤÷Í’\ç>©¬¬tu÷næÖbXÙ(µµµ?ûì³AZ§ é''>>^yª¥¥µfÍ ùÇzüøqff&q–_Ö¢Ú/a¤ýýÖ0¹súÙò@Í}x! ÿóŸÿ8p@uK¡* åñãÇ3gÎT³0Hï144äñxÊS6›}ëÖ-WWW%¸»»gddÇúúúª"É‚Ëå:::r¹\ÕB‡CL m4n¶2HÈåò .Œ7n×®]Ý9;àÛo¿…ήát«",Xðúõk²ôã쪧999$ê477ûûûwpöÉ“'È._Íšûp¡  `íÚµõõõ=Ô™4iÒ®]»Ô& ò~tŽ™%¼½½•»ÆHáÉ“'ª! ©©©d‰‚ùóççååu(÷ððPO€3Òæ>\pvvŽïyuÚ‘#G†v>ø¡ŸŸ_ç²²2//¯ÞD$îß¿ÿε¢èÆ;;; ‡@IC hîÈ€€€~ø¡»«7nÔ€Gž™8q¢2å*eee!!!Êõ*j&99¹CÉ£G)6dÏ(ŠO?ýôâÅ‹]^í2VðšûðbË–-+V¬è\>jÔ¨¨¨(õë¼Ý9Ô­[·–-[Ö!x¡hmmÍÏÏïPØÜÜ\RR¢f%€;vüúë¯]^²··ïg~’hîÃÇøá‡k×®Q©TÕaG*•zöìÙþ¯ü…¨ºŸ7oÞܽ{·šWÁeggwùÄ þa÷ÿûßGí§§µ 4÷aÄÎ;wîÜI£Ñ’““ÃÃÕåÁÁÁÞÞÞ$ ƒô•žŽ9²ÿ~µ‰¤§§wYž’’¢Nçϟߺuk76"_ãp‡ vìØÐÖÖNIIÁq\*•LMMß¼yC¶:HßËåVVV]~£uuuwìØÁårÕ©§»› ‘†[m2ärùþýû »Ãd2ß¾}«61¤Í}è#‰Ö¯_°°°¸s玲\&“_½z•Dm÷&44´ƒy!²råʺº:5+!rdw×}ÌÉÉQ³ž·oßþóŸÿìªÚÙÙYÍJÈË q$IPPPLLŒÍƒT‡_ètú¥K—zN´ÑXT£%#BÍß²e‹¹¹¹š•¤§§÷`Ný " ¿ýö["¶²|ø,‚$€æ>”‘H$K—.MJJ²±±IOO3f ÙŠ †rNuÞ¼yiii§NBQ4""BýJz¶ïî†ã•Ÿ~úI ¬Zµª  `ñâÅDá°[éKö£d°àp8Dä&;;»ÊÊJ²å@ ÃÖ­[—˜˜ˆaŽã"‘ÈÎÎA¨YIPPe;DL6›­,qppP³ž—/_²ÙlƒQSSC”<~üøÓO?miiQ³ræ>4©­­µ··xzz ²å@ÔABBÀÉÉI¡P¥!77I–Ç?ÿüsÒ5hpXfÂáp¼¼¼ÊÊÊ<<<õôôÈVQ .œ9sf~~~bb"ÙZH£¼¼üÂ… ÆÆÆ›7o&[ É@sjTVVzzz–——{zzÞ¸qCGG‡lE5A¥R£££;wîTÿ&UMÇñ­[·*ŠmÛ¶é|‡3Ð܇™™™3f̨¨¨øòË/“““¡³7<<<ž={vöìY²µ@fffBBÂøñã·lÙB¶òæ>tÈÌÌô÷÷çóù›6m:v옦¥'†¨‡={öP©ÔÇ÷3G臱/wûöíZZZdk!hîC„‡.\¸Ï燇‡?~œBÿ²Ã”3f|ú駯_¿>|ø0ÙZÔÊåË—oß¾íèèHL¨B  Μ9ãáá!‹úé§ãÇ“-B2,ëÈ‘#MMMdkQ …"22AÇ÷°]vXÍýƒ'&&fÆ 8ŽŸ9sæË/¿&Yf =`kkûù矷¶¶ó«Ãøøø’’—a·S©{ ¹Øœ9s†pö³gϧQˆ’ƒ9r¤¬¬Œl-ƒŽP(üç?ÿI£ÑŽ;F¶ šû‡ †aß|óÍúõëõõõ¯_¿¢Š¾¾þöíÛårydd$ÙZ˜˜˜†††€€€Y³f‘­Eƒ€æþA‚¢hxxø‘#G oÞ¼©Œž(Ù°aƒ¹¹ù•+Wž>}J¶–A„Ëå:tˆJ¥’WG“æþáaXxxø©S§ôõõoݺõÑG‘­¢‰°ÙìC‡Éåò¡½WóðáÃ\.7<<|êÔ©dkÑ, ¹`´¶¶ž>}ÚÎÎîöíÛð9Ò!!!ãÇOOOWÜ]õÀápN:¥­­½sçN²µhÐÜ?$ŸŸßõë×ÒÒÒ ³Cz†Á`:tÇñmÛ¶¡(J¶œg×®]"‘hÓ¦MÃ'íuïæþÁ üýý322&Nœ˜’’2räH²A>ÜÝݳ³³ãããÉÖ2À]¸pÁÜÜ|Ïž=dkÑD ¹TVVúùùeddÌœ9óîÝ»ÐÙ!½„B¡|ÿý÷€ýë_2™Œl9ÉPýúë¯uuuÉÖ¢‰@sÿxñâ…§§gffæÇœ‘‘Ò'æÍ›·dÉ’çÏŸŸ>}šl-ÆÝ»wãââÆN¶ š»¦S^^îååõúõ뀀€K—.ÁˆH¾‚ Èþýû©TjTTTkk+Ùr ÃöîÝ Ø¿? }ÚÐÜ5š¼¼ðòåË“'OêééýðÃdkù0€æN>„³_¼xÑÔÔ4%%ÅÍÍlE¡ úÇñï¿ÿÃ0²åô–èèh±X¼aÆ#F­åÚ;ÉÈåò°°°øøxssó{÷îMž<™lE¡O@@À¼yó?~üÛo¿‘­¥Wäææž>}ÚÂÂbÇŽdkù`€æN&MMMÞÞÞ—.]š1cÆÝ»wÈVÐéôýû÷öîÝ+•JÉ–ón"##Qݵk—‘‘ÙZ> ¹“FSS“Ïýû÷gΜyûömèìu2{ölŸÊÊJÍï¼?yò$11qÔ¨Q«W¯&[ˇ• Q3„³Îû#5ƒ ˆ‹‹‹ŽŽNHH›Í¨f †½½½§§çÆ.Õ××9rägŸ}6a„js8€à8N¶†aGAAÁªU«Š‹‹çÏŸg``@¶"2Ô€æ®n ½½½›ššV­Z #A Á޹«•ÂÂBèìd°æ®>îܹãííÝØØ¸~ýúsçÎAg‡@ ƒGOæ^TTäíímhh8mÚ´ëׯ÷²E‡SWW×›š<OyJìP077755ýâ‹/ø|~/ÿ¢*/^ܸq# ±±±ººpúôé>­=pàÀš5kˆã„„///@СÎÏ?ÿ¼k×®> ‹÷óó{ûöíÑ£GOŸ>M¥RûôräýÈÈȘ={¶««kzzz‡«r¹üùóç2™ìõë×^^^\.w°õ¬_¿^5U÷Æ:DŸ={vÅŠ555^^^ ƒ­dÈÓ­¹óx<.—{âÄ WW×åË—gee0  …r¹\µ²T*•H$Äñ7ß|³{÷nâX.—‹D¢î†õ½¼¼®\¹¢<‰‰ùý÷߯]»vëÖ­{÷î8p@Ù¸H$R}!Š¢B¡PÙ,Q89r$1¥~üøñU«V¬¬¬Æ×¥€.å•””<~ü˜8æp8÷îÝ#Þ¬T*‹ÅDù‹/ˆ¸Kr¹EQ‰DÒáé@||üªU«0 û÷¿ÿ½eË–jB Hiié¢E‹ØlöéÓ§íììüüüã¸P(TúCvvvMM²¦™™ÙÉ“'‰²çÎ322b2™3fÌ RÓnÓ¡ñÎÈd2¡Pøí¶Ux7\¸pB¡dggã8®P(6mÚߨØèååE£Ñ¬¬¬nܸãxPPÐÊ•+MLL ÒÒÒÙl¶ÁŸþ™œœlmmM§ÓÛÚÚ:äêêÚÜܼbÅŠÏ>ûlÿþýt:Ý¢ººšø‹[¶lqttlhhÀq<555))‰abbÂd2×®]«P(Nœ8±`Á‚éÓ§Óétb õ±cÇ  FPPD"9qâÄâÅ‹‹‹‹MLL´µµ?õÉ'Ÿ$$$899ñx<7uêÔää䤤$+++:LÜ*BCCG›››››ûÝwßšššNž—7n\ºtéܹs©©©iiiË—/ÿöÛoOœ8¡££»dÉ"†§¿¿¿µµuBBÂ?þñ;;»yóæmÛ¶ÍÞÞ>%%%55µÃßB$44”˜2•J¥ãÇWöÁµµµKJJ••}}}e2™T*]°`“É\¶lÙ¾}ûfÍšuãÆ«W¯öðMŸ>}ÆŒ›7o¶°°ÈÊÊÊÌÌT½zùòå–––Û·o¯[·®‡»¢~¾øâ‹k×®yzzÚÙÙUUUÙÛÛGFF677++0 :~èСÎ+ÊÖ¬YsæÌ™%K–”––zxxL˜0aåÊ•K—. U®º ˆˆÈÎξzõê?þØY€¾¾~uuõž={222 E—AÊ&Nœhoo/ ]\\TË×­[·qãFEÓÒÒÂÂÂ|}}.\¸mÛ6777"$Ž¿¿?àË/¿Ä0lÚ´immm0‰‡*=íPÅ0,55µ  `äÈ‘‹/&îÌiiiæææË–-c0yyy¦¦¦ÖÖÖeee†Mœ8±¦¦æÊ•+‹-²µµ½zõ*—Ëõññ™4iR~~>ŽãÓ§O///olltuu}òäIzzúºu딡-*++ïܹ#‹œœæÎK¡PÚÚÚ®\¹ÒÚÚºhѢѣG¿zõª¥¥ÅÉÉ©©©©´´ÔÍÍËå&$$ggg777bøhúôé---.\˜5k–‰‰I[[ÛÔ©SÄGGG€T*½víZCCƒêÓÜóçÏÛÚÚœoÞ¼yñâÅìÙ³E"ÑåË—e2ÙÇleeUQQ!‘H&OžìääôñÇ[ZZ/Y².p„h2™,))éÅ‹£Gö÷÷g±Xb±8;;û£>b2™€ëׯ766†……åää…ð;wîOŸ>ÝÓÓAœœ KKËçÏŸS(”qãÆ]»vÏçÏŸ?¿ªªÊÉÉéÅ‹„c¨Š,--EQtÒ¤I‘H”““ãâ⢥¥uÿþýœœœÉ“'ûúú"òöíÛ¢¢"ggg±X\\\}zSS“ŸŸMÓ,V·ya±Xëׯ‹ÅN"ª1Œ&Ñ4­Õjù|þ’%Kôz½P(Ôëõl6›ÔÒ …B§Óñx¼ææf±X  ®®ÎÃÃÅb)Ї:´¡¡ÁÛÛ{ óaú GDDô>« (J­VûùùQ%ø|~VVVaaá{ï½WUU•——wòäÉ;wîìÞ½[§Ó)Š={ö|ñÅEåççïÚµë—_~ùôÓO¿ýö[kãmmm]ºt©X,Ó§O/..&¥O>ùä°aÃÁäÉ“sss´µµ­ZµÊ××W(®[·ÎÌãýÊ¿î®3ÓbíÛ·ïÌ™33fÌ8wîÜ®]»ì\MÓl6»½½¦éàà`ÆÆÆööö¦¦&‡ãááÁf³)Šrssc±Xùùù|>¿¡¡ÁÝÝÝÃâ(>ŸÏápD"‘µñjµÚ§žzª¢¢B&“.[¶Œ¸/^¼xÅŠõõõ2™ì™gžyöÙg¼þúëwîÜ‘J¥ «V­2óx¿òoIýF›ÝôQgÏž]ZZºzõê«W¯Î;×É%PÅår+**¾ÿþûˆˆ6›÷öÛo‹Åâ‰' ‚ðððàà`‹URR²fÍš¸¸8>ŸûÄOLœ8qìØ±úÓŸL†œœœ&8pþüy___‘HtæÌÞÞÞ/¾ø"ŸÏwwwòÉ'oܸAžª©© d±Xîîî111"‘¨®®îðáÃ;wîôññáp8áááfïW~WEÓ4ݵ¤’^¨É‡%INNÎÝ»w³³³CCCû+¦`±X‰äüùó/^$‰>|ø°aÃØl¶J¥âñxäÕÔétîîî¾¾¾|>_­Vóx<Z­¶»NÙþýûSSS7mÚ´~ýú¯¿þº°°ð?þã?vîÜÙÉ[nnî”)SÈõ‡~8sæÌõë×MÓééé£F ŸOÜÛÚÚ©Æ[[[IUÌf³===[ZZ<==Í»yóæˆˆˆÉ“'·µµ}öÙg“&MR(Æ~RRR~üñÇC‡‘ŸãÆ6lX~~þk¯½ÔÐЀÇãUTT¼÷Þ{‰‰‰---Ý=Þ¯˜x‹ ›W€@ Xºt)€çž{ÎÎÒ+W®xyy-^¼˜ülkk3(GÄÖét¤42„8òx<•Jexºƒd„üŒ¯ |ùå—Û·o¿xñ¢D" T*/^|ðàÁK—.¥¥¥]¼xqÙ²e\.À«¯¾JQÔ /¼ÐÚÚZRRbòñþÆt5E4Ì{………xÔ1Ä£R @¯×«T*RX‰–:@mm­@ ÐëõEUUUÙïáÇ·oßž™™dH‰L&›5kEQO>ùäÇœžžNFJ¥›Í@Óõñþ¦ÛaÒ`V—¦é–––æææúúz‡CÓ´Z­vss«ªªºyó¦N§c±Xžžžuuuæúõëä§T*MOOçóù6d°¢¢bÅŠ7nÔh4÷ïß¿ÿ>€ÐÐP.—ûé§ŸjµÚÖÖÖÔÔÔ‰'FGGGFFnß¾]§Ó?~|Ô¨Qááá&ïo9“EQ”B¡8|øð‘#GFŒAFD©©©û÷ïW©T 33óܹsW®\ñð𨮮þüóÏþùg__ß«W¯Þ¸qÃÓÓÓ†Y­‚‚‚ööö•+Wú?€ŸŸßwß}—’’" ƒƒƒu:Ý7ß|Ãb±HWK(îÙ³'%%…Íf›|¼¿aêL–Oyy9EQ‰‰‰F•ššêçç¦×ë¥R©J¥b±X?ÿüs@@@[[ŸÏŸ={6©Ã» ™\Ì›7Ïp½jÕ*2}öÙgM–ûùóçÏŸ?¿“ãc=–ŸŸoìÒÝãýÊ nh»ãóÏ?—J¥Z­–Ãáᙚ3fŒ——€Â‘#GRåíí­R©êëëÉ|5ŸÏ×ëõW¯^ë ;:Y‚)Šê4ì¦(*::ÚðóøƒášÇã…„„k¹\^[[›››ûüóÏÛ%¥S¶íÁ†††}ûö …ÂÀÀ@'YYb¤ÀèfÒ­Gw//¯±cÇÆÅÅ‘¡‹3ÀHÍL›w‹Å¯¿þº?Ž#v’ÚµO`d/Ú…åP/ÿíÜ@§ÁE?ÂÈ*úËmÓ€F h”Ð][„ %ù§Ñ¡Æ¢Õ(Σó®Q£¸ŽBøk€¨FÀ@ `ùæë•~‡‘†€#xx Þ!¸U¿ë£Ü½¸Ð@´ÿgUu¨tP?†+‹6\ñýï§à÷4Ð ü Ì|î@gÁ0T`5 ªÇk-ÿóÁïâÐŒZE8 ° @æ'õÉÿµáßî?S»îP(*ppÐãŠ;j@ Ä:  èÈöƒÇ€Ç€ hùïxM¼ó ~Äœ »ÀÈÕ$ hšqí¿OeCÌó'#ðh€<Ñ#0ó?1ˆäÀGï¢æ•Ïí£ Àña¨ÀE@(4Í+Je€'0ˆ|Á3ŠÇ€`$Œš ¯9,Ln)ÉÀ½ß€1ÀíÎ…=`fÝX‚¡j|™”yÀ@ÄBk=üÆaÒˆ|€‡w¡–Ão¼Ÿ@ý?Qq5 n5ïf~p«wÎ2f <4ïßþ@Ðëá^„ac1d2Ç{n”÷ÍkPãÂq»TÓ 9Ð È5Ð Ôß@ ü<}€±“~Ç®ïX7ãÿíÊ냀6â»c×¾C+@C/@ëTþC;êµrŒ‹wîƒ<Ô_ƒ x@àêeŒúà¤ð¯Ïu øËm ;¹$Ÿ.ʹRmp×ëéfe{IEÓ÷Ùu­ÄñaÃæO9j„·€ç®Õéå õ½ûÊ=_ÿf&p½žV¶j.]«ýæü-𦻯[U§üߓ׷­Þ5‘ßeKOýhiûb‹À‡·/2ï¡ëìØœI#*ÛËîÈþ6̨çùKwlˆ÷ßèµÍ7q`£ Z`»CÝ º¼…ÚU *«›Ê iÅðPÔ–£àÞ@P™ áCM†½ï›ëù…u&ݹqŸëÎá'x6>ìÖLÝz ¿ªN¹pZÈó ;ýÓí¤7+Ú¹œÀá‚ÇF ÍNQŸË‰'.Ž,©”]/kè.Þå›ÓÉÅ—Ûv—0óØÒÉ"úugarî³´Bæ?Ìó§_ï…zK›lˆôwg7ÜDÀ6@¶ÂV]Dý ”žF}RiKFue*ꮂ+„¼M@; Úúk€ÜêMÓªvííªæ¿¼ªlÕüy^˜·Àýùʼý}vES³Z§§[U·îʿϮ0N«ª#ÿz-€!žî6þ,ÃÆ*úå¿ëº¯–¢ºÙ~ k Õ5´FŒ¥_¸c[¤F4×@p=à´m€ˆÃÕÐÖaZx@àLR€'İ&°F š ®Üæè5º_‹îÇÅEŒöe³©K×j­zœÅ¢|}x‹ã$šÝÍÞ¿îf±½ upØÔ…ßj®Þ¬g³(6›B‡ÍÑοÿ[5-Ð4# º@x:à,Àé@œôMhÊ  Éû‹àc"ìUÏ_ùÜ¿vü”Þ‘}øÅe“IP¶j¸lRþ­í&|õ ãW¿0€J­½]%ÿà௲‡ê®ñxgïÏUu Ó¡XC¯:YÍ« @­Ñ‘öã×¢>Ø ¬/W«! †l ú¢¥ ñ€0ÿuð‡‚· øž~T í€P²r ÆDàûOXÔÔù ñ=loSk½¸rqß½)nˆÀÍ¢ Íçï/üõFž6±ãÀÂx­¥·½h¢±×Þ€6€Ä͆w0hUS p"†Œü‡ÎÕ8G–à 1j.n¦ ¿ ÷€@ @õbŽÇÝéWPR_V)£iÄÅ̸En½ùaVl”ø¿–N0ù MÓ:½]àû`˜dÿe/ðÜ€zà1 0mððB»òJ4–‚íÞ8ÄÂXxx÷F­x<eh:.à5–¨Ý8¬à¯gç‡Ñ4R³¤ÊVMZnÅS³Fs8¬ì_ï=·±Y,oAÿö›¬‚‘nžh\€È+@±ááY9nEa3Ä€PÓâ ïPm[5ê í€x øÕŠHIóIÓtc³º ¤þïÇ®)Û4R~¼uï¾2nbÐ;¯Oáyp´Z}c³ÊÚnŒšgkwd=TZÚºw#wt|¹fwÑ‹é²!ôÀ8`êq7¿)pxD<à0 Œ‹‡‡¤¸¤@%à ü‰‹…÷/ÿtå@g¥ßad F@\Ô×Ðþ9½.*À¨¿Ë ü ´2@´Õ@+p ¸—±n(í@;0ˆsßÃ1ÔNö} CW“8xzÂJ„ž¤cÜ Àîå@p¸ÜTøCTþÀ¢¿þ/6t.ì3Ö•üŸÙ  ¸¡€ ZPÜ~Ô ûM@^Õ¿ö{,Z¼ö6à©Q°ÃÁLÙ¡@) `¯ýßÿ|ã5 |@ø ðÚ7à `Ãf„ÿ°”€5ÐÙ°ÌO#€†ïù"á·ðɾhî=šÃ ô€ hZ€``n,žKçzoý+ØàÀâ:ö€™, þü”S0áí9>õΕs'0ˆ$O  7€ ¢îøþ%£GK5:ÔΦ#€»‘~‡‘Ã$–ã2]qpÚ»°—ÀŽK`‡¡½èÎ,†]]ŠN8‚ÀD]"­KéN8B/Úäî°®Þ §6Àx-ù¦f'½™že«p„*ºGŒ5œÃ2€é±'Œ8”Çû*2Òðó¥žB [GãA:L²ü ÀKÅŤý*2²Óq'Òv§.EQÇ7vyóÍ7cb:フ߻w¯…)`L( {÷î=}úôk¯½vöìÙO?ý´GÿÆY82v¬ñ-ãŸGÆŽ%?ÍgÀ±cÇŒ]ŠŠŠ\¾|ÙàRYYÉçóåryi ºlóAÆuWHù–ôô¹÷®DFFNŸ>}ß¾}—C‡=óÌ3>>ÌØ/0èî׃><že+W®Ðh.+l±öár¹Ë—/ß¿?MÓ_|ñÅ+¯¼Â o)2x´@þË냂ž2ÄàhèKw*ʽþP]]^ssa;vlÉ’%ÜKKK#""N:µlÙ²òòrû|¿O`ö8Øðv9»¿T\ÈåÖ¨Õ6G>kÖ¬ÄÄÄyóæ1H]`ð “,ǪÄ[˜ÙNÿOOOícÇŽHMMµ%­³«h«ï<³WÆ0»Š6À ^q׃]tbÐ “l€þýR¿ c˜-°kÿF0»ßáÌ+ùÂl]ô³«h=âØÁq ìà¸vp\;8Ž0“eL×é'&8Î0ÉüL–ÃdÓZAà糜y‹ñ[.žs®I8B'‹¬l[â η&Ál­UËÙŠ/­À–›®Ø ™™×ÂñLWÀûöí;sæÌŒ3Î;·k×.3>ÍëÔWéY±bÅÕ«W¯\¹bp¹sçÎÅ‹ÿò—¿ôUýÊ Ø*ÓCñµ|ÝÐÚoƒé EQÉÉÉaaaàÀçÏŸ÷õõ‰DgΜ°hÑ¢7ß|“øÔëõ!!!—.]pûöí øøøˆÅâ7ZµéßöÙÛg9ííí .<}úôܹsÛÚÚÌø´- æAã3š¦9Âãñˆµ™V« ÊÎÎ6EllìÍ›7ß{ï=>Ÿ¿lÙ²êêêåË—O™2…„6|øðŽŽš¦322ÂÃÃõz½F£‘H$kÖ¬Ñh4ÕÕÕ¡¡¡›7o¶*_Ý&¦OBéC”JåÑ£Giš>qâDss³Ÿ¶½ 6¬R©D"ÑîÝ»išNOO Õëõæ£8sæ MÓH.öîÝIÓ´R©äóùçÏŸ§iú…^øè£hšÎÎÎPSSCBøàƒ‚‚‚¬ÍšI]m•é Yì÷ØèZèÍ$6˜®”oÆ×ABBÂ×_ÝÔÔ”––¶lÙ2uuuüüüˆ±XL\zÏ ØZh£fØ Ï´M#¥+V”””œ>}:--mùòå½Ló‹/¾øí·ß"0}.ÚÚé徎69R:wîÜ”)Sz|öüã„ ¶mÛÖ')1³†•š ó¤[·nEDDܺuK"‘ôw\ ®¢ ¶¬6w¡û•JuäÈ;¨ (Áó‹†Î¹PHpáÚÑÑ Ž#°c¥/wÖ※0†ñ,æq ìà¸vp\;8.1]qæ­íæq]§®˜ÁÆÁ®SWÌÀx]§®˜Ç):Y}²©£— ÐjµvŽ”à3 çä丹¹Ù3FƒT`ËMW¬e`O]ÉÎζó»5è¶ÜtÅ>ô­éÊ„ ²²²ú.u=3è¶ùÔK°¡ôXkºBÓô–-[¼½½E"QRR’ñÝk×®ÅÅÅ‘ëÒÒÒE‹yzzzzz.Z´ˆ8æççOš4I,:tÈÚÔšNРÂrÓ‚UYèÑ3zmºRXX ¬¬Œ¦éÖÖÖúúzš¦I©5¾hkk Z¼xqCCƒV«-//§iZ&“ …ÂÇÓ4]PPÀápJKK-ÏI] ¶ùÔ•±¹ñ³êÔ‡óùçŸ_¿~Çã >ܤ·Ÿ~úéÞ½{üñСCÙl6ÙŸuöìY•J|áÂ…ÖÖV??¿Ÿ~úɶ4t[{êŠUÓ6€­2] :wî\QQQttôرc/\¸`Ò±L9r¤±cCCEQ{öìÙµk×®]»&Ož,‹mHðïèe 0€X›~K<ÃTMÓtII €S§NñùüÚÚZK¢kjjzõÕWýýýiSUtZZÕäNŸ>íææ¦P(, ßB] ¶ Úš-ï–{îŠå¦+÷îÝËÍÍíèè …cƌ鮬ϙ3'88ø7Þ¨ªªR*•¹¹¹.\´zõj™Làþýûwîܱ9Íÿ¢_;cUâ-Ìl§Ž §®”••ÅÄÄxyyy{{ÇÄÄäææÒ¦J0MÓ%%%qqqnnn¤M+++† "$Iïyað\ô€ŸºÒÓ»á [ØÛbnfmÆÑÖƒ]t‚Ù,í”_8³f ìÚ¿Ñ# nƒáÜ+ùÂl]ô³«h=âØÁq ìà¸vp\;8Ž0“eÀª¹'>8N vÍd™ÄJ°…ÓÎù0¾[(›sª F—à®_Ó1©¢…ÞÆ—`‚ñ‡ìL~H–õª8NNNN¥r ¤÷hºÒOû)u:µ½kû[£XÅ «¢÷íÛçïïOLWÊÊÊÖ­[gÞ¿±]Wþí𯷿5ŠU ºܯ¦+– •JÇÏçó×®]«×ëPõÑGùùùeffîÞ½{̘1^^^b±899¿·F¡(ê›o¾™7ož››[BB‚N§³ú;ÓËM{}Ž…¦+&ÓßKÞŒo…„„ddd¤§§³X¬'NǨ¨¨‚‚¥R™™™ÙÐР×ëwîÜ)‰èßo” ‘HΞ=ûóÏ?¸|ù²Mÿƒ¾dÐ lá©+ý'01 ¢izêÔ©‰‰‰ÄñäÉ“ÆÞ ÅÉ“'Ñe',€/¿ü’¦iRvüñG‹òÜŸ º6ØØte@D.üýýår9¹:t(¹HJJJJJ S*•&'Ö(,Ö`iûÀƒ‡†††qãÆ»¯X±B*•Ž=:;;û»ï¾¨´YÎ`yÑ%%%¿üòË‹/¾hìØÔÔ ®®®¾¾>%%@eeåÀ¤ÏbœNàNK–,™4iÒÒ¥K“““;Ù(L›6mÙ²eqqqÓ¦M‹‹‹›8qâìÙ³û1­}S7Ý™Ü0ëZ.ìŠã´Á&MŒßçü¼#l‰éŠsª Ø*Ã$§’–Àx –´¾N¨.˜Û‹¶V-çTÌíE»°¦–`âØÁqN–¼¼<•J%‘HD"Çår:Q‰C ,—Ëe2™\.—J¥ÄE$ …ÂØØX¡P8°i(¤“%—Ë‹ŠŠˆº2™¬¶¶¶¦¦&** €H$‰D111ö9Îu°á———Ëår•J@¥R}òÉ'äVbbb@@¹ŽwBßÉ*..ÎÍÍÍÈÈ8~ü¸¡ …ÂÄÄD•J%“ÉT*Ç“Éd©©©µµµ^{ÃlÕjuyy9Ç«­­ ذaÃ믿¯V«·nÝÊãñfΜ)‰öîÝ»oß>¹\ž‘‘aؤá$0¸ŠV«Õ¹¹¹¤PFEEI$GnÕÔÔ¬Y³fõêÕ ,P©TR©””fR¸4áv…Á%X*•ÖÖÖªTªØØXÒŸ2ÔɉdëÖ­¡¡¡\.—ÇãÄÆÆ†††pªŠÚ®÷íQ5552™L*• …BÒÐ’¬R©ÔjµD" 0îyEFFÆÆÆnÛ¶­Ó±–Ó{#š¦Oœ81kÖ,///‹%‰¦NúÙgŸQ¦xë­·zÁM¦Æ¤9>?jC­V×ÖÖæåå …Â€€Ã07 €P"6é^‰D"¢úŒ3È{`[KÜ{#†÷Þ{綾^JHH¸}ûv{{{AAÁÚµkccc »\aôÁê­[·ö&.‚-ÓÝÊݬÛô¹½)—3fÌX²d‰Z­&Ã_¤•@~ är¹d°¤R©D"‘a&¤E%''‡…… ‚œ?Þ××W$9s©alqûöí øøøˆÅâ7j4šššš÷ßëÖ­6lðóósss Y²dÉäÉ“{ÿég²È˜NZšù^¯D"ÉÉÉ ÏÎÎÞ¸q£m‘CZS2‰@¥RÉåòÚÚZÒ“’Ëå†Ê™ø$É <þüÌ™3»ž†DØ¿jjjJJÊúõëÿüç?nÞ¼yç΋/6øQ©TñññÑÑÑwïÞ …ÆŸí>|øpzzzHHHllìÂ… øá‡Ìž=›Çã…‡‡ëtºN;5ûÛ§*;ilþk̆£6:::4¡»k3$„ãÇ'$$©+•555ÆÞÈår.—+‰._¾L ±ÉyÍ›7GDDLž<¹­­í³Ï>óööž4i’ñ¹Ixt¤Fvv6ÙoÎ;ï¼óøãçääH¥Ò¿ýíonnn¯¼òÊÞ½{É›íçç×˼[E¯æ¢ ÷ø­í¾µWP«Õ†ØPLÉ…Z­îänhŒ‰»L&KLL 4øì9 „ô$Œ¯1y¤HN<´‹Åuuu¤©©© ¶1çÖÓÛ^´%êö9555¤'o<æ!]'C_ºdáA*•’®uo–H‹^QQÑr®C}}=ùY[[ëïï?{öl‹uàÀ›ãµ>&ÙªD$TLMM5ü4 V« ºÖÖÖ’µ©TJÜÉøŠ”'Û0y¤†1S§N ݱc‡V«­®®>xðàË/¿´iÓ¦>ø`Ó¦M¥¥¥>¼uëÖÞ½{É ,ý#':jkk «¼555¤&u²Òµ&…•tÁ¤Réùóçåryll¬D"éÍ:1—ËMOOïèè õ÷÷ß±cG'nnniiiÅÅž¾¾ÑÑÑO?ýô–-[lÛ¶íÿøGnnntt´ÏŒ3²³³GmsJz„‘S•d€Kô›9s¦P(,**2ÝvÒæ¹y<žó¬2²“"˜@Dº|ù2‘HD ¥¡ÃÕ ØÔtö•IDATG&¥%‰“¨ † Lf¯)h™LvüøqÃT¥¡yîú©ÉÉSN#6@¶ãˆD¢¼¼<2ÙD¦-祉ҤøŠD¢ØØX§Ú¥Å~÷Ýw: ½" @©T>¼¬¬,++«££ƒŒ’7nÜ,‰d2™R©,**¢(*&&&>>~ “lWÙÉê ÙµCÆÄdÂÒ0ÅUTTåTÅ#0LG Ud1‘,9 hê‡ØEW˜ÝÉrÑ#.—ÀŽK`ÇAl“\§Tv‡#lü™—Òp„a’ÉÝa]½9@Nm€ñ[²ŸÄ™O¡uŠNV§½Ön^///7¹þØ5­Vkcû Æ—à1|þ;£F~¾T\Üã#V}Z‹øÏÊÊêñ³”ÙÙÙqqqƒíÿ9H;Y%%%–øôápðHׯ"# îÆ×âÇþ[ ¤¥¥ÅÄÄØyÛì «¢­5r¹¢Tš,µÄñ¥âbòS’Û™§žzÊ·¶tÛläb^?¢±„Ï7㇦é-[¶x{{‹D¢¤¤$ã»:nÚ´i{öì!?óóó'Mš$‹ƒƒƒ:Ô)¨®wç͛੧žZ¿~=€®†-è§3=,úð¿±ðP†,;öÈØ±Æ·ºþ'˜ ª°°@YYMÓ­­­õõõ†(²²²vìØ1kÖ,r°’L& …ät‡‚‚‡SZZj8¼Áä]C84Mk4‰D²fÍFS]]ºyófºÎôt%Ø`ä²råJò^[©ŠÍ—c³ýg‡óùçŸ_¿~Çã >ÜpëÆ;wîLNN&‡1œ={V¥R_¸p¡µµÕÏÏï§Ÿ~2x6À¥K—:¶>|˜ÜÚ²eË¢E‹&Nœ ¹¹ÙòìwÇ ëdYeäBQ”»eÇ_|ù@£¹¬P˜ñtîܹíÛ·GGG3&))iúôéäVRRÒØ±cCBBÈφ†Š¢ ÕõäÉ“Åb±!ówÑa ¹îó3=À–CF;kK­¡ÃE ·4zý醆 =…9oÞ¼yóæÉd²M›6=ÿüó»˜wß}wݺu~øá_ÿúW!!!Z­öСCC† 1<›M.LÞ5Æ`ØBö†Ã«òn9ƒ®Š¶ š¦?©ª2ˆÚÝ ø¥ââ·++ózªñîÝ»—››ÛÑÑ! ÇŒc<"‰Ž=úî»ïþóŸÿ°pá   Õ«W¸û÷ïwW 444 ÃÛÿ æé}3>PX•xK2[VVãåååíí“››kx–t޶nÝ:lذ{÷îÑ4]YY™0dÈ@ ‘HRSSOÈêz—¦é÷ߟÏç““³ÊÊÊæÌ™ãåå5|øð 6´··GD®ûä\-ÏdY;e1€SƒÛ`có¯‹#líܲSÁìNv¾ƒÛ-‡Ù»öoô³ûμ’o!ÌØE0»ŠvÑ#.—ÀŽK`Ç%°ƒã3YÆtîpòa‚ã “ÌÏd9L6­Åîq>Ë™'¼/°åâ9çš„#t² +ä=zƒõkô 4H±f lƒZæ=p8œœœc—œœ777 ÃïúxwŽvƒÁ§®l¨rͼd۳͉1ùx/Ãì%v&íÛ·Ïßߟ¤”••­[·®÷ašÑÉ9wç˜ÄN%¸ÏO]!T´|ݰGá¥Réøñãù|þÚµkõz½ñ­Ý»w3ÆËËK,'''ÇëׯϞ=ûñÇ7þ¿IG“Ö.Ƶôœaèý¾=K°Ö ÅlË‚ùG„„„ddd¤§§³X¬'Nï•ÌÌÌlhhÐëõ;wî‰D4M·´´ˆÅâ½{÷ÏÊÊ2éhÆž%**ª  @©TZÿ?° ¿ýhW”JåÑ£Giš>qâDsssŸ„iÛ Ú£ÀDš¦§Nš˜˜h,0A¡Pœ§b•€ÙU4mýô²S© ¦ ‹5îî`c‡‡ÙU´óƒ%'¬™ 8ˆÀpíèèÇØ€±ÒŽ—;kq@]ÃøN– ó¸vp\;8.—ÀŽK`Ç%°ƒãØÁq ìà¸vpþ?ø8,JƳ·IEND®B`‚amide-1.0.5/help/amide.omf.in0000644000175000017500000000047710727021054015571 0ustar loeningloening user's guide amide-1.0.5/help/Makefile.am0000644000175000017500000000046111722016661015433 0ustar loeningloening## Process this file with automake to produce Makefile.in. include $(top_srcdir)/gnome-doc-utils.make dist-hook: doc-dist-hook DOC_MODULE = amide DOC_ENTITIES = legal.xml DOC_INCLUDES = DOC_FIGURES = \ figures/amide_main_window.png \ figures/study_tree.png DOC_LINGUAS = es DISTCLEANFILES = *~ */*~ amide-1.0.5/help/ChangeLog0000664000175000017500000000017510731367710015160 0ustar loeningloening2007.12.16 * converted to gnome-doc-utils.make setup for compiling help files * converted es translation to using .po file amide-1.0.5/help/es/0000775000175000017500000000000012271036742014011 5ustar loeningloeningamide-1.0.5/help/es/es.po0000664000175000017500000040622510731371014014762 0ustar loeningloening# translation of amide manual to spanish # Pablo Sau , 2002 msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2007-12-16 19:37-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../C/amide.xml.translate:13(title) msgid "The AMIDE User's Manual V0.3" msgstr "Manual de Usuario de AMIDE V0.3" #: ../C/amide.xml.translate:16(para) msgid "" "AMIDE stands for Amide's a Medical Image Data Examiner. This program is a " "tool for viewing and analyzing volumetric medical imaging data sets, and has " "been designed from the ground up with support for multi-modality imaging." msgstr "" "AMIDE (Amide's a Medical Image Data Examiner). Este programa es una " "herramienta para ver y analizar datos multidimensionales médicos , y ha sido " "diseñado en el terreno de la imagen multimodalidad." #: ../C/amide.xml.translate:23(year) msgid "2000-2005" msgstr "" #: ../C/amide.xml.translate:23(holder) ../C/amide.xml.translate:47(para) msgid "Andy Loening" msgstr "" #: ../C/amide.xml.translate:28(firstname) msgid "Andy" msgstr "" #: ../C/amide.xml.translate:28(surname) msgid "Loening" msgstr "" #: ../C/amide.xml.translate:32(email) msgid "loening at alum dot mit dot edu" msgstr "" #: ../C/amide.xml.translate:38(releaseinfo) msgid "This is release 0.3 of the AMIDE User's Manual." msgstr "Revisión número 0.3 del Manual de AMIDE." #: ../C/amide.xml.translate:44(revnumber) msgid "AMIDE Manual V0.3" msgstr "" #: ../C/amide.xml.translate:45(date) msgid "2003-06-09" msgstr "" #: ../C/amide.xml.translate:65(title) msgid "Introduction" msgstr "Introducción" #: ../C/amide.xml.translate:67(title) msgid "Licensing" msgstr "" #: ../C/amide.xml.translate:69(para) msgid "" "AMIDE is released under the terms of the GNU General Public Library (GPL)." msgstr "" "AMIDE se ha liberado bajo los términos de GNU General Public Library (GPL)." #: ../C/amide.xml.translate:73(para) msgid "The text of the license is fairly verbose. A quick summary follows:" msgstr "El texto de la licencia es el siguiente:" #: ../C/amide.xml.translate:79(para) msgid "" "You are free to run the program, for any purpose. Please note that, although " "the GPL makes no restrictions on use of the program, your government " "probably does. For instance, in the United States, AMIDE is not FDA approved " "and cannot be used clinically." msgstr "" "Usted es libre de usar este programa para cualquier propósito. Por favor " "note que, aunque la GPL no hace restricciónes sobre el uso del programa, su " "gobierno probablablemte sí. Por ejemplo, en Estados Unidos, AMIDE no está " "aprovado por la FDA y no puede darse uso clínico allí ." #: ../C/amide.xml.translate:88(para) msgid "" "You are free to study the source code of the program, and adapt it to your " "needs." msgstr "" "Usted es libre de estudiar el código fuente y adaptarlo a sus necesidades." #: ../C/amide.xml.translate:94(para) msgid "You are free to redistribute the program." msgstr "Usted es libre de redistribuir el programa." #: ../C/amide.xml.translate:99(para) msgid "" "You are free to release modified versions of the program, as long as you " "also redistribute the source code to the modified program, and you label " "your modified version of the program appropriately." msgstr "" "Usted es libre de sacar versiones modificadas del programa, siempre que " "también redistribuya el código fuente del programa modificado, y etiquete " "apropiadamente la versión como modificada." #: ../C/amide.xml.translate:112(title) msgid "Availability of Source Code" msgstr "Disponibilidad del Código Fuente" #: ../C/amide.xml.translate:114(para) msgid "" "The source code for AMIDE is readily available from the AMIDE web site." msgstr "" "El Código Fuente de AMIDE está disponble en el sitio web de AMIDE." #: ../C/amide.xml.translate:122(title) msgid "Supported Platforms" msgstr "Platformas soportadas" #: ../C/amide.xml.translate:124(para) msgid "" "In addition to source code, binary versions of AMIDE along with installation " "instructions can be found for several systems on the AMIDE web site. The currently " "supported systems are Linux/i386, Microsoft Windows, and Macintosh OS X " "(achieved through the use of the fink add-on packages)." msgstr "" "Además del Código Fuente, las versiones binarias de AMIDE junto con " "instruciones de instalacion se pueden encontar en el sitio web de AMIDE web. Los " "sistemas soportados actualmente son Linux/i386, Microsoft Windows, y " "Macintosh OS X (logrado mediante el uso del paquete complementario fink)." #: ../C/amide.xml.translate:136(title) msgid "Contact Information" msgstr "Información de Contacto" #: ../C/amide.xml.translate:138(para) msgid "" "Questions and bug reports can be addressed to the AMIDE users list " "amide-users@lists.sourceforge.net. Information on joining the list " "and/or viewing archived messages can be found here." msgstr "" "Pueden dirigir sus preguntas a lista de usuarios AMIDE amide-" "users@lists.sourceforge.net . La informacion para unirse a la lista " "y/o ver mensajes archivados se puede encontrar aquí." #: ../C/amide.xml.translate:150(title) msgid "AMIDE Basics" msgstr "Fundamentos del Amide" #: ../C/amide.xml.translate:152(para) msgid "" "As the use of AMIDE is bound to be completely intuitive only to the one who " "wrote the program (i.e. me), this section provides a brief overview of " "operating within the program. It assumes you already have a data set loaded " "in. For instructions on getting a data set into AMIDE, see " msgstr "" "Com el uso de AMIDE es completamente intuitivo sólo para el escribió el " "programa (es decir yo), este sección proporcióna una breve panorámica de del " "uso del programa. se asume que tiene estudios cargados. Para ver " "lasinstruciones para cargar estudios en el AMIDE referirse a ." #: ../C/amide.xml.translate:163(title) msgid "A Quick Theory of Operations" msgstr "Teoría Rápida de Operaciones" #: ../C/amide.xml.translate:165(title) msgid "AMIDE Objects" msgstr "Objetos AMIDE" #: ../C/amide.xml.translate:173(term) msgid "Data Set" msgstr "Volumen de Datos" #: ../C/amide.xml.translate:175(para) msgid "" "A data set object contains the raw information from a medical imaging study, " "along with the corresponding parameters needed for interpreting that " "information (thresholds, colormaps, etc.)." msgstr "" "Un volumen de datos contiene la información cruda de un estudio de imagen " "médica, junto con los parámetros necesarios para su correcta interpretación " "con esa información (umbrales, mapas de color, etc.)." #: ../C/amide.xml.translate:183(term) msgid "ROI" msgstr "" #: ../C/amide.xml.translate:185(para) msgid "" "A region of interest object defines a volume of space over which statistics " "can be calculated. All ROI's in AMIDE are volumetric. Currently, AMIDE " "implements ellipsoid, cylinderical, rectangular, and isocontour based ROI " "geometries." msgstr "" "Región de Interés(Region Of Interest,ROI), este objeto define un subvolumen " "del volumen de datos sobre el cual pueden calcularse estadísticas. Todos los " "ROI's en AMIDE son volumétricos. Actualmente, AMIDE implementa las " "siguieintes geometrías en los ROI: elipsoide, cilídrico, rectangular, and " "isocontornos." #: ../C/amide.xml.translate:194(term) msgid "Fiducial Mark" msgstr "Marcador Fiducial" #: ../C/amide.xml.translate:196(para) msgid "" "A very simple object, fiducial marks encode only the location of a reference " "point in space, and are used for rigid body alignment." msgstr "" "Es un objeto muy simple , los Marcadores Fiduciales sólo tiene la " "información sobre la referencia a un punto del espacio, y son usadas para el " "alíneamiento de cuerpos rigidos." #: ../C/amide.xml.translate:203(term) msgid "Study" msgstr "Estudio" #: ../C/amide.xml.translate:205(para) msgid "" "Each AMIDE session has a single study object, which is used for grouping " "together a number of related data sets, ROI's, and fiducial marks." msgstr "" "Cada sesión de AMIDE tiene un simple objeto de estudio, que se usa para " "agrupar un número de volúmenes de datos, ROI's, y marcas fiduciales." #: ../C/amide.xml.translate:167(para) msgid "" "AMIDE can work with and display a large number of objects simultaneous " "(limited only be available memory). The object types current implemented in " "AMIDE are as follows: " msgstr "" "AMIDE pude trabajar y visualizar multiplicidad de objetos simultáneamente " "(limitado sólo por la RAM disponible). Los tipos de objetos actualmente " "implementados en AMIDE son los siguientes: " #: ../C/amide.xml.translate:218(title) msgid "Object Tree" msgstr "Objeto Arbol" #: ../C/amide.xml.translate:222(title) msgid "Study Tree" msgstr "Arbol de Estudio" #: ../C/amide.xml.translate:229(phrase) msgid "" "An example of a study's tree structure within AMIDE. The two data sets (FDG " "PET and microCT) and 1 ROI (bladder) are children of the study object " "(m2862). The remaining ROI's are children of the data sets." msgstr "" "Un ejemplo de árbol de estudio en AMIDE. Los dos volúmenes de datos (FDG PET " "y microCT) y 1 ROI (vegiga) son hijos del objeto estudio (m2862). Los ROI's " "restantes son hijos del volumen de datos." #: ../C/amide.xml.translate:240(para) msgid "" "In order to facilitate working with a large number of objects " "simultaneously, AMIDE conceptually groups all objects into a tree hierarchy, " "with the study object as the root of the tree (see ). Data set objects will generally be primary branches off of the " "study object, while ROI's can be branches off of the study object or off of " "individual data sets. Why is this important? Because the structure of the " "tree determines how movements are mapped within the program. If a data set " "is moved relative to the rest of the study, the ROI's that are branches from " "that data set object will be correspondingly moved, so that they will " "maintain the correct orientation and position with respect to the data set " "that is their parent." msgstr "" "Para facilitar el trabajo con un gran número de objetos simultáneamente, " "AMIDE conceptualmente agrupa todos objetos en una jerarquía de árbol, con el " "object estudio como raiz del árbol (ver ). " "Los objetos de volúmenes de datos serán ramas principales del objeto " "estudio, mientras que los ROI's pueden ser ramas del objeto estudio o de los " "objetos de volúmenes de datos. Por qué es esto importante. Porque la " "estructura del árbol determina como los movimientos son seguidos por el " "programa. Si un volumen de datos es movido con respecto al resto del " "estudio, los ROI's que son ramas de ese volumen de datos son movidos " "acordemente con aquel, así se mantendrá la correcta orientación y posión con " "respecto al volumen de datos padre." #: ../C/amide.xml.translate:255(title) msgid "Real World Units" msgstr "Unidades del mundo real" #: ../C/amide.xml.translate:257(para) msgid "" "An important thing to realize when working with AMIDE is that the program " "will try to abstract away the underlying digital format of the data as much " "as possible. When you listen to digital audio, the CD player automatically " "converts the series of 0's and 1's encoded on the compact disc into an " "analog format so that you don't have to worry about the underlying digital " "format. Similarly, AMIDE presents the digital data to you in analog form. " "When ever possible, units are given in terms of real world units (e.g. mm's, " "seconds), and most operations are not constrained by the discrete nature of " "the underlying data. For example, data in AMIDE is viewed in terms of " "\"slices\", not fixed image planes. These slices can be taken from the data " "set at arbitary angles, and can be of any thickness (they are not " "constrained to be integer multiples of the underlying voxel size). You may " "be used to looking at medical images in terms of voxels and integers, but " "remember that the object or subject scanned is an item in the real world, " "and AMIDE tries to recreate this \"analog signal\" for you." msgstr "" "Es importante darse cuenta trabajando con AMIDE que el programa intentará " "abstraer el formato de sobreimpresión digital tanto como sea posible. Cuando " "eschucha un CD de audio, el reproductor convierte automáticamente una serie " "de ceros y unos codificdos en el disco en formato digital, y así usted no " "tiene que preocuparse del formato digital subyaccente. De manera similar, " "AMIDE presenta los datos digitales de forma analógica. Siempre que sea " "posible las unidades empleadas son unidades del mundo real (mm, seg..), y al " "mayoría de operaciones no estan limitadas por la la naturaleza discreta de " "los datos subyaccentes. Por ejemplo, los datos son vistos en término de " "\"cortes\" y no de planos fijos de imágenes. Estos cortes pueden extraerse " "del volumen de datos en cualquier ángulo, y con cualquier grosor (no sólo " "limitado a múltiplos del tamaño del voxel). Usted pude estar acostumbrado a " "mirar las imágenes médicas en términos de de vóxeles y de enteros, pero " "recuerde que el sujeto escaneado es parte del mundo real, y AMIDE intentará " "recrear esta \"señal analógica\" para usted." #: ../C/amide.xml.translate:276(para) msgid "" "The only place the abstraction starts to break down is when dealing with " "dynamic data sets. Einstein understood time to be a \"special\" dimension, " "and AMIDE agrees. The reason for this, is that trying to represent dynamic " "data as anything but separate frames of data becomes overly complex from a " "computational standpoint, primarily because dynamic data is generally not " "equally spaced. While moving 1 voxel in the x, y, or z directions will " "always move you a constant unit of measurement (say 0.4 mm) in the " "appropriate direction, moving 1 voxel in the t direction may move you 30 " "seconds or 30 minutes in time, depending on what frame you're looking at. " "Because of this, AMIDE deals with dynamic data in terms of frames, although " "it should always tell you the time that those frames correspond to." msgstr "" "El único sitio donde la abstracció empieza a romperse y cuando se trabaja " "con volúmenes de datos dinámicos. Einstein entendió que el tiempo es una " "\"dimensión\" especial, y AMIDE está de acuerdo. La razón de esto es que " "intentando representar datos dinámicos pero en segmentos de tiempo separados " "resulta complejo desde el punto de vista computacional, primeramente por que " "los datos dinánicos no suelen estar igualmente espaciados. Mientras que " "moverse en el espacio 1 voxel en las direciones x, y o z siempre equivale a " "una unidad constante de medida (por ejemplo 0.4 mm) en la dirección " "apropiada, mover un voxel en la dirección t puede ser de 30 segundos o de 30 " "minutos, dependiendo que segmento de tiempo este mirando. Por esto, AMIDE " "trabaja con el tiempo en términos de segmentos (frames), aunque AMIDE " "siempre nos dirá el tiempo al que corresponede cada segmento." #: ../C/amide.xml.translate:303(title) msgid "Components of the Display" msgstr "Componentes del Display" #: ../C/amide.xml.translate:306(title) msgid "AMIDE Main Window" msgstr "Ventana Principal de AMIDE" #: ../C/amide.xml.translate:313(phrase) msgid "A diagram pointing out the salient features of the main window" msgstr "Diagrama señalando lo más destacable de la ventana principal" #: ../C/amide.xml.translate:320(title) msgid "Context Sensitive Help" msgstr "Ayuda Sensible al Contexto" #: ../C/amide.xml.translate:322(para) msgid "" "Located in the lower left corner of the window, the context sensitive help " "window shows what different mouse buttons and key strokes can accomplish " "given the current cursor position. Note that mouse buttons are labelled in " "UNIX fashion. Buttons 1, 2, and 3 correspond to the left, middle, and right " "mouse buttons, respectively. Under Macintosh OS X, the middle and right " "buttons are emulated by pressing the option key or the open apple key, " "respectively, while pressing the mouse button." msgstr "" "Localizada en la esquina inferior izquierda de la ventana, la ayuda sensible " "al contexto mostrará que lo que sucederá al apretar los diferentes botones " "del ratón o las combinaciones de teclas. Los botones estan marcados a la " "manera UNIX, correspondiendo el 1, 2 y 3 a izquierdo, medio y derecho " "respectivamente. En los ratones con sólo dos botones, el del medio es " "emulado apretando los dos botones a la vez." #: ../C/amide.xml.translate:336(title) msgid "Tree View of Study Data" msgstr "Vista del Arbol de Datos del Estudio" #: ../C/amide.xml.translate:338(para) msgid "" "Located on the left side of the window is a tree listing of all the objects " "in the study. The tree structure shows how movements will be propogated to " "other objects in the study. For instance, if a data set is rotated, all of " "its children will be correspondingly rotated." msgstr "" "Localizado en la parte izquierda de la ventana esta una árbol que lista " "todos los objetos del estudio. La estructura de árbol muestra como los " "movimientos serán propagados a los objetos del estudio. Por ejemplo si un " "volumen de datos es rotado, todos sus objetos hijos serán rotados " "acordemente." #: ../C/amide.xml.translate:344(para) msgid "" "Objects in the tree can be selected for display by left clicking on the name " "of the object. Middle clicking on a data set will make that data set the " "\"active\" data set. The \"active\" data set is designated by being " "highlights, and when a function is chosen that can logically apply to only " "one data set (e.g. filtering), the active data set is the one chosen." msgstr "" "Objetos del árbol pueden ser selecionados con pulsación en el botón 1, en el " "nombre del objeto. Click en el 2 \"activa\" el objeto. El \"volumen activo " "de datos\" aparecerá remarcado, y cuando se una selecciona una función (por " "ejemplo un filtro), esta será aplicada sólo al \"volumen activo de datos\"." #: ../C/amide.xml.translate:351(para) msgid "" "Object modification dialog boxes can be brought up by right clicking on the " "corresponding object. ROI's can be added by right clicking on the blank area " "of the tree, or shift-right clicking on one of the objects. These functions " "are further described in and ." msgstr "" "Al diálogo de modificación de objetos se pude acceder con el botón 3, " "haciendo pulsación sobre el objeto, correspondiente. Los ROI's se pueden " "añadir haciendo pulsación con el botón 1 en un área desnuda del árbol, o con " "MAYUSCULAS+botón 3 en un objeto. . Estas funciónes se describen con mayor " "detalle en and ." #: ../C/amide.xml.translate:359(title) msgid "Orthogonal Views" msgstr "Vistas Ortogonales" #: ../C/amide.xml.translate:361(para) msgid "" "Most of the main window display consists of the orthogonal views used for " "visually displaying the data sets being studied. Data is usually presented " "as three orthogonal slices taken from the data sets, but the user can choose " "to display fewer of these views if desired by using the view selector " "(described below in ). The three views " "shown are the transverse, coronal, and sagittal planes. Note that the views " "may be incorrectly labeled for you. This could be because the data in the " "file you imported was not in the order that AMIDE expected it to be in. It " "could also be because you want to use the transverse/coronal/sagittal " "terminology differently then the program does (e.g. a coronal section of a " "rat brain is not the same as a coronal section of a rat)." msgstr "" "La mayoría de la ventana principal corresponde a vistas ortogonales del los " "volúmenes de datos a visualizar. Los datos usualmente se presentan como tres " "vistas ortogonales, pero el usuario pude decidir usar menos, usando le " "selector de vistas (descrito abajo en ). " "Las tres vistas mostradas son los planos axial , coronal, and sagital. " "Nótese que las vistas pueden aparecer incorrectamente marcadas. esto puede " "ocurrir si si el fichero importado no esta en el orden que AMIDE espera. " "Podría ser por que usa una terminología diferente de orientación al la del " "programa (por ejemplo la sección coronal del cerebro de una rata no es la " "misma orientación coronal de la rata)." #: ../C/amide.xml.translate:376(para) msgid "" "Below the views are sliders for adjusting where in the data set the slices " "are being taken from. The location can also be changed by directly clicking " "on any of the canvases. The appropriate mouse clicks are as follows" msgstr "" "Bajo las vistas hay barras desplazables para cambiar el lugar de donde las " "vistas son tomadas. La localización también puede cambiarse haciendo " "pulsación directamente sobre imagen de la vista. Las pulsacións de ratón " "apropiadas son:" #: ../C/amide.xml.translate:384(term) msgid "Left Mouse Button" msgstr "Boton 1 del ratón" #: ../C/amide.xml.translate:386(para) msgid "" "Changes the location in the data set that the slices are taken from, without " "changing the thickness of the slices." msgstr "Cambia localización de los cortes sin cambiar su grosor." #: ../C/amide.xml.translate:391(term) msgid "Middle Mouse Button" msgstr "Boton 2 del ratón" #: ../C/amide.xml.translate:393(para) msgid "" "Change the location in the data set that the slices are taken from, along " "with setting the thickness of the slices to the minimum reasonable." msgstr "" "Cambia la localización de los cortes, poniendo el grosor de los cortes a un " "mínimo razónable." #: ../C/amide.xml.translate:400(term) msgid "Right Mouse Button" msgstr "Boton 3 del ratón" #: ../C/amide.xml.translate:402(para) msgid "" "Clicking an dragging with this button changes the thickness of the slices " "without changing the location. The thickness of the viewed slices can also " "be altered by adjusting the slice thickness setting spin button (see )." msgstr "" "Haciendo pulsación y arrastrando sin soltar cambia el grosor de los cortes " "sin cambiar su localización. El grosor de los cortes también puede alterarse " "con el botón rotatorio de ajuste de grosor de corte (ver )." #: ../C/amide.xml.translate:412(term) msgid "Other" msgstr "Otras" #: ../C/amide.xml.translate:414(para) msgid "" "Additional functionality of the mouse buttons for manipulating data sets and " "ROI's is explained in and " msgstr "" "Funcionalidades Adicionales de los botones del ratón se explican en y ." #: ../C/amide.xml.translate:425(title) msgid "View Selector" msgstr "Selector de Vistas" #: ../C/amide.xml.translate:427(para) msgid "" "Which of the three orthogonal views are shown can be selected by using these " "toggle buttons. By default, all three views are shown." msgstr "" "Cual de las tres vistas ortogonales se puden selecionar usndo esos botones. " "Por defecto las tres son mostradas." #: ../C/amide.xml.translate:434(title) msgid "Linked Viewing" msgstr "Visión Sincronizada" #: ../C/amide.xml.translate:436(para) msgid "" "In addition to the three orthogonal views, AMIDE can display mutiple sets of " "these orthogonal views, all looking at the same point (\"linked\") in three " "dimension space. This is most often used for looking at fusion images of two " "data sets, with one set of views used for the first data set, the next set " "of views used for the second data set, and the third set of views used for " "the fusion of the two data sets." msgstr "" "Además de esas tres vistas, AMIDE pude mostrar múltiples conjuntos de vistas " "ortogonales, todos mirando al mismo punto (\"sincronizado\") del espacio 3D. " "Esto se usa más a menudo para ver la fusión de dos volúmenes de datos, con " "un grupo de vistas del primer volumen, y el siguiente usado para el segundo, " "y el tercero para la fusión de los dos volúmenes." #: ../C/amide.xml.translate:447(title) msgid "Thresholding Tool" msgstr "Herramienta de Cambio de Umbral" #: ../C/amide.xml.translate:449(para) msgid "" "This button on the toolbar will pop-up a thresholding and colormap selection " "dialog for the currently active data set. In the dialog, the maximum and " "minimum thresholding levels can be changed by either directly typing in the " "values (in absolute or percentage units), or by using sliders on the color " "bar. The color scale can be changed using the corresponding drop-down menu. " "A log normalized histogram is shown to give an idea of the distribution of " "the data set's value. Finally, the thresholding type can be changed. The " "thresholding type determines how the maximum and minimum threshold values " "are applied to the data set, and are:" msgstr "" "Este botón en la barra de herramientas lanza el selector de mapas de color " "del volumen de datos activo. En el diálogo, los niveles máximos y mínimos de " "umbral pueden cambiarse directamente escribiendo los valores (en unidades " "absolutas o porcentage) , o usando las barras de desplazamiento en la brara " "de color. La escala de color se puede cambiar usando el correspondiente menú " "desplegable. Un histograma normalizado da una idea de la distribución de los " "valores del volumen de datos. Finalmente el tipo de umbral se puede cambiar. " "El tipo de umbral determina como los valores de umbral mínimos y máximos se " "aplican al conjunto de datos, y son:" #: ../C/amide.xml.translate:464(term) msgid "Per Slice" msgstr "Por Corte" #: ../C/amide.xml.translate:465(para) msgid "" "The max and min threshold values will be applied in proportion to the max " "and min values in the current slice of data" msgstr "" "Los valores mínimos y máximos se aplicarán en proporción al corte " "selecionado." #: ../C/amide.xml.translate:470(term) msgid "Per Frame" msgstr "Por Marco" #: ../C/amide.xml.translate:471(para) msgid "" "The max and min threshold values will be applied in proportion to the max " "and min values in the current frame of the data set" msgstr "" "Los valores mínimos y máximos se aplicarán en proporción al segmento de " "tiempo selecionado." #: ../C/amide.xml.translate:476(term) msgid "Interpolate Between Frames" msgstr "Interpolación entre Segmentos de Tiempo" #: ../C/amide.xml.translate:477(para) msgid "" "This threshold mode only makes sense for dynamic studies. In this mode, two " "sets of max and min threshold values are specified, along with which frame " "of data each of these sets corresponds to. For data frames before and " "including the first reference frame, the first set of threshold values are " "used. For data frames after and including the second reference frame, the " "second set of threshold values are used. For data frames between the two " "reference frames, the max and min threshold values are derived by " "interpolating (as a function of time) between the two sets of thresholding " "values." msgstr "" "Este umbral sólo tiene sentido para estudios dinámicos. En este modo dos " "pares de valores máximos y mínimos son selecionados para cada segmento de " "tiempo. Para cada segmento anterior e incluyendo el primer segmento " "seleccionado se usa el primer par de valores. Para el segmento segundo y " "subsiguientes se aplica el segundo par de valores. Para los segmentos " "incluidos entre el primer y segundo segmentos seleccionados los valores " "máximos y mínimos son interpolados como función del tiempo entre los dos " "pares de valores establecidos." #: ../C/amide.xml.translate:491(term) msgid "Global" msgstr "" #: ../C/amide.xml.translate:492(para) msgid "" "The max and min threshold values will be applied in proportion to the max " "and min values in the entire data set" msgstr "" "Los valores mínimo y máximos serán aplicados en proporción al los valores " "mínimos y máximos del conjunto total de datos." #: ../C/amide.xml.translate:499(para) msgid "" "If the data set's modality is set to CT, buttons will be shown for applying " "bone and soft tissue windows as the thresholds." msgstr "" #: ../C/amide.xml.translate:507(title) msgid "Zoom Selector" msgstr "Selector de Zoom" #: ../C/amide.xml.translate:509(para) msgid "" "This specifies how much to enlarge the views. AMIDE tries to make an " "educated guess about how large the display of the data should be, by using " "the smallest voxel dimension from the data set with the largest voxels to " "correspond to a displayed pixel. Zoom can be used in addition to that " "guesswork." msgstr "" "Este especifica cuanto se magnificarán las vistas. AMIDE intenta hacer una " "educada adivinanza de cuan grande han de ser las imágenes usando la " "dimensión más pequeña con los vóxeles más grandes correspondiendo al pixel " "representado. El zoom se pude utilizar en adicció a esto." #: ../C/amide.xml.translate:519(title) msgid "Slice Thickness Setting" msgstr "Ajuste del Grosor de Corte" #: ../C/amide.xml.translate:521(para) msgid "" "Thickness specifies how deep the slices displayed on the views are. The " "minimum slice thickness is determined by the smallest voxel dimension of any " "of the data sets in the study." msgstr "" "El grosor especifica cómo de profundas han de ser la vistas representadas. " "El grosor de corte mínimo viene determinado por la dimensión del voxel más " "pequeño del conjunto de datos." #: ../C/amide.xml.translate:530(title) msgid "Frame Selector" msgstr "Selector de Segmentos de Tiempo(Frames)" #: ../C/amide.xml.translate:532(para) msgid "" "This button pops up a dialog for picking which frames of data to show from a " "dynamic data set. A frame (i.e. time period) to display can be selected by " "clicking on a list element. Multiple frames can be selected by holding down " "the shift key and selecting additional frames. Note, that for each data set " "selected for view, at least one frame from that data set will be displayed. " "If the choosen time period does not encompass a frame from that data set, " "the closest appropriate frame will be choosen." msgstr "" "Este botón abre un diálogo para seleccionar el segmento a mostrar de un " "conjunto de datos dinámicos. Un segmento (p.e. periodo de tiempo) para " "mostrar puede ser seleccionado haciendo pulsación en una lista de elementos. " "Múltiples segmentos puden ser seleccionados a la vez con pulsación y " "simultáneamente apretando la tecla MAYUSC para seleccionar segmentos " "adicionales. Nótese que por cada conjunto de datos seleccionados al menos un " "segmento será visulaizado. Si elige un periodo de tiempo que no incluye un " "segmento de tiempo de ese conjunto de datos, el segmento más aproximado será " "elegido." #: ../C/amide.xml.translate:545(title) msgid "Gate Selector" msgstr "" #: ../C/amide.xml.translate:547(para) msgid "" "This button pops up a dialog for picking which gates of data to show from a " "gated data set. A gate to display can be selected by clicking on a list " "element. Multiple gates can be selected by holding down the shift key and " "selecting additional frames. Note that by using the entries, a span of gates " "can be choosen that loops around (e.g. gates 8, 0, and 1)." msgstr "" #: ../C/amide.xml.translate:557(title) msgid "Target Selector" msgstr "Selector de Puntero(Target)" #: ../C/amide.xml.translate:559(para) msgid "" "The target cross hairs are generally only displayed when one of the mouse " "buttons is depressed. With this toggle button, you can tell the program that " "you want the target cross hairs left on the views." msgstr "" "El puntero en forma de cruz generalmente sólo resulta visible cuando " "apretamos un botón del ratón. Con este botón la cruz permanece siempre " "visible." #: ../C/amide.xml.translate:567(title) msgid "Interpolation" msgstr "Interpolación" #: ../C/amide.xml.translate:569(para) msgid "" "Interpolation refers to the method whereby AMIDE extracts data from the " "original medical imaging data set in order for it to be viewed on the " "screen. The interpolation selection button lets the user specify what type " "of interpolation to use when generating slices from the active data set. " "Nearest neighbor is faster, while tri-linear interpolation produces better " "looking (smoother) images with the penalty of being ~8x slower." msgstr "" "Interpolación se refiere al método con el que AMIDE extrae datos del " "conjunto de datos de imagen médica original para ser representados en " "pantalla. El botón que seleciona la interpolación permite al usuario " "especificar que tipo de interpolación usar para generar cortes del volumen " "activo de datos. \"Nearest neighbor\" es el más rápido, pero tri-línear " "produce imágenes de mejor aspecto, con la penalización de que es casi 8 " "veces más lento." #: ../C/amide.xml.translate:581(title) msgid "Fusion/Overlay Selector" msgstr "Selector Fusión/Sobreimpresión" #: ../C/amide.xml.translate:583(para) msgid "" "By default, AMIDE displays multiple data sets as fused images. With the " "fused/overlay selector, you can tell AMIDE that you want the active data set " "to simply be overlayed on the other data sets, rather than fused." msgstr "" "Por defecto AMIDE muestra múltiples volúmens de datos como imágenes " "fusionadas. Con el selector fusión/sobrimpresión(fused/overlay) usted elige " "si quiere mejor los volúmenes sobreimpresiónados mejor que fusionados." #: ../C/amide.xml.translate:590(title) msgid "Preferences Dialog Box" msgstr "Diálogo de Preferences" #: ../C/amide.xml.translate:591(para) msgid "" "Underneath the edit menu is the preferences menu item. This will pop-up a " "dialog box that allows you to change preferences as to how things in AMIDE " "are displayed. The preferences will be saved in a configuration file for use " "by future AMIDE sessions (note: saved preferences are not currently " "supported on MS Windows)." msgstr "" "Debajo del menú de Edición esta el de preferencias. Este desplegará un menú " "de como las cosas deben de ser mostradas por AMIDE. Las preferencias se " "guardaran in un fichero de configuración para su futuro uso en AMIDE." #: ../C/amide.xml.translate:602(term) ../C/amide.xml.translate:1543(term) msgid "ROI/View Preferences" msgstr "Preferencias de Dibujo de ROI" #: ../C/amide.xml.translate:603(para) msgid "" "Here are several preferences for changing how ROI's are the view canvas are " "drawn, more thoroughly described in . Note " "that these preferences are only used when a new study is created. To change " "these preferences for an existing study, you need to use the study " "modification" msgstr "" "El grosor de la línea para dibujar ROIs pude ser cambiado aquí. El grosor " "oscila entre 1 y 5 pixel." #: ../C/amide.xml.translate:612(term) msgid "Threshold Windows" msgstr "Preferences de la Disposión de las Vistas" #: ../C/amide.xml.translate:613(para) msgid "" "The window preferences are more throughly described in . Note that these preferences are only used for new data sets. " "To change the window levels for an existing data set, use the data set " "modification dialog." msgstr "" "La primera opción le permite usar tres vistas (axial, coronal y sagital) con " "un estilo lineal usualmente usado por los software de PET, y un estilo " "ortogonal usado por el software de RNM. La segunda opción le permite fijar " "si el tamaño de la vista ha de permenecer constante o no. Si no esta " "activada, el tamaño de las vistas mostradas dependerá sólo de los volúmenes " "seleccionados. Si esta activada, el tamaño del las vistas dependerá de todos " "volúmenes del estudio. La opción final es para ajustar el tamaño del área " "vacía en medio del puntero (la cruz mostrada cunado se cambia la " "localización de la vista)" #: ../C/amide.xml.translate:621(term) msgid "Default Colortable Preferences" msgstr "Preferencias de las Tablas de Color" #: ../C/amide.xml.translate:622(para) msgid "" "The program uses the specified color tables by default on a newly imported " "data set." msgstr "" "El programa usa por defecto la Tabla de Color del conjunto de datos más " "recientemente importado." #: ../C/amide.xml.translate:628(term) msgid "Misc. Preferences" msgstr "Misc. Preferencias." #: ../C/amide.xml.translate:631(para) msgid "" "The \"Send Warning Messages to Console\" option does exactly that. This is " "useful if enough warning messages are popping up that they're becoming " "annoying." msgstr "" #: ../C/amide.xml.translate:635(para) msgid "" "With the \"Don't Prompt for 'Save Changes' on Exit\" option, you can tell " "the program to not prompt you to save changes done on the study when exiting " "an AMIDE session." msgstr "" "Con la opción \"Don't prompt for 'save changes' on exit\" No notificación " "para guardar los cambios al salir, evitará que AMIDE le notifique al salir " "del programa si quiere gurdar los cambios." #: ../C/amide.xml.translate:640(para) msgid "" "The 'Save .XIF file as directory' option allows AMIDE's XIF file's to be " "saved in a directory structure, instead of as a single flat file (the " "default). This option is of interest mainly to developers" msgstr "" "La opción segunda 'save .XIF file as directory' (Guarde fichero .XIF como " "directorio) permite que el fichero de AMIDE XIF se guarde como una " "estructura de directorio y no como un fichero plano (por defecto). Esta " "opción intersa sobre todo a los desarrolladores." #: ../C/amide.xml.translate:659(title) msgid "Importing Data and Saving Studies" msgstr "Importando Datos y Guardando Estudios" #: ../C/amide.xml.translate:662(title) msgid "Importation of Data Sets" msgstr "Importación de Conjuntos de Datos" #: ../C/amide.xml.translate:664(para) msgid "" "AMIDE uses its own format (described below: ) " "for saving data between session. To get new data into AMIDE, it needs to be " "imported (located under the file menu). You can either let AMIDE try to " "guess the file format (which works for most data types) or tell AMIDE " "explicitly which format the file to be imported is suppose to be in. " "Importing of all data types except for raw data is done using Erik Nolf's " "(X)medcon medical imaging conversion library." msgstr "" "AMIDE usa propio formato (descrito abajo: ) " "para guardar datos entre sesiones. Para cargar datos al AMIDE, es necesario " "importarlos (localizado bajo el menú \"File\" ). Puede optar entre que AMIDE " "adivine el formato ( funciona para la mayoría de los tipos) o decir a AMIDE " "explícitamente que formato de fichero debe importar. Importando todos los " "tipos de datos excepto datos crudos(raw) se hace a través de la librería de " "conversión medica de Erik Nolf's (X)medcon." #: ../C/amide.xml.translate:674(title) msgid "Raw Data Files" msgstr "Ficheros de datos crudos (raw data)" #: ../C/amide.xml.translate:676(para) msgid "" "AMIDE will generally attempt to load any file ending in \".dat\" or \".raw\" " "as a raw data file. The user will be prompted for the dimensions of the " "study, the offset of the data in the file, and the data format of the data " "in the file. Both big endian, little endian, and PDP endian files can be " "loaded (endian refers to the order in which bytes are arranged in memory)." msgstr "" "AMIDE intentará cargar cualquier fichero que tenga el sufijo \".dat\" or \"." "raw\" como fichero de datos crudos. Al usuario se le pedirán las " "dimensiones , los bits que existen desde el pricipio del fichero hasta los " "datos, y el tipo y formato de datos. Ficheros en big endian, little endian, " "y PDP pueden ser cargados (endian se refiere al orden en que los bits son " "dispuestos en la memoria)." #: ../C/amide.xml.translate:683(para) msgid "" "The following data formats are supported: 8 bit signed or unsigned integer, " "16 bit signed or unsigned integer, 32 bit signed or unsigned integer, 32 bit " "IEEE floating point, 64 bit IEEE floating point, and ASCII data." msgstr "" "Los siguientes formatos de datos son soportados: enteros con o sin signo de " "8 bit , 16 , enteros con o sin signo de 32 bit , coma flotante de 32 bit " "IEEE , coma flotante de 64 bit IEEE , y datos ASCII ." #: ../C/amide.xml.translate:690(title) msgid "ECAT Files" msgstr "" #: ../C/amide.xml.translate:692(para) msgid "" "Static and dynamic ECAT 6.4 and 7.2 files are supported through (X)MedCon. " "AMIDE will generally try to load any file ending in \".img\" as ECAT 6.4, " "and any file ending in \".v\" as ECAT 7. Please note that ECAT 6.4 files are " "very difficult to autodetect, so if the file does not end in .img, you will " "probably have to tell AMIDE explicitly to import the file as ECAT 6.4." msgstr "" "Ficheros ECAT 6.4 y 7.2 , tanto estáticos como dinámicos se soportan a " "través de (X)MedCon. AMIDE intentará cargar cualquier fichero que tenga el " "sufijo \".img\" como el ECAT 6.4, y cualquier fichero con sufijo \".v\" como " "el ECAT 7. Por favor nótese que los ficheros ECAT 6.4 son muy difíciles de " "autodetectar , así si el fichero no acaba en .img tendrá que comunicar " "explícitamente a AMIDE para que importe el fichero como ECAT 6.4." #: ../C/amide.xml.translate:700(para) msgid "" "Although not compiled in by default, AMIDE can be configured to use the " "z_matrix_7/libecat library for handling ECAT files instead of (X)MedCon." msgstr "" "Aunque no se compila por defecto, AMIDE se puede configurar para usar la " "librería z_matrix_7/libecat para el manejo de ficheros ECAT en vez de (X)" "MedCon." #: ../C/amide.xml.translate:707(title) msgid "DICOM Files" msgstr "Ficheros DICOM" #: ../C/amide.xml.translate:709(para) msgid "" "DICOM 3.0 is supported through (X)MedCon, which actually uses a slightly " "modified version of Tony Voet's VT-DICOM library. The level of support for " "DICOM 3.0 is entirely determined by (X)MedCon/VT-DICOM." msgstr "" "DICOM 3.0 se soporta con (X)MedCon, el cual tiene una librería ligeramente " "modificada de Tony Voet's VT-DICOM . El nivel de soporte de DICOM 3.0 viene " "enteramente determinado por (X)MedCon/VT-DICOM." #: ../C/amide.xml.translate:715(para) msgid "" "DICOM data is often distributed as a series of single slice data files. To " "read these into AMIDE as a single data set, you will need to stack these " "slices into a single, volumetric file. Notes on how to do this can be found " "at the (X)medcon website." msgstr "" "Los datos DICOM normalmente aparecen distribuidos en un grupo de ficheros. " "Para que los lea AMIDE como un conjunto único de datos, necesitará agrupar " "esos ficheros en un único fichero de todo el volumen. Notas de cómo hacer " "esto se encuentran en el website de (X)medcon. ." #: ../C/amide.xml.translate:725(title) msgid "Concorde microPET files" msgstr "" #: ../C/amide.xml.translate:727(para) msgid "" "Concorde format files are generated by the Concorde company's series of " "microPET scanners. It's a two file format (a data file and a header file), " "with the header in easily read ASCII format. Please note that you will need " "to tell AMIDE to open the header file (.img.hdr), not the raw data file (." "img)." msgstr "" "Los ficheros Concorde son generados por los tomógrafos de microPET de la " "compañía Concorde. Es un formato con dos ficheros (uno de datos y otro de " "encabezamiento), con el de encabezamiento fácilmente leíble en ASCII. Usted " "tendrá que decir al AMIDE que abra el fichero de encabezamiento (.img.hdr), " "no el fichero de datos (.img)." #: ../C/amide.xml.translate:735(title) msgid "Acr/Nema 2.0, Analyze (SPM), InterFile3.3, Gif87a/89a" msgstr "" #: ../C/amide.xml.translate:737(para) msgid "" "A variety of additional file formats are supported through (X)MedCon, " "including: Acr/Nema 2.0, Analyze (SPM), InterFile3.3, and Gif87a/89a. For " "more information, please see the (X)MedCon documentation, or the " "corresponding " "webpage (http://xmedcon.sf.net) ." msgstr "" "Una variedad de formatos adicionales pueden ser soportados a través de (X)" "MedCon, incluyendo: Acr/Nema 2.0, Analyze (SPM), InterFile3.3, y Gif87a/89a. " "Para mas información , por favor refiérase a la documentación de (X)MedCon " "sitio web " "(http://xmedcon.sf.net)." #: ../C/amide.xml.translate:751(title) msgid "XIF Files" msgstr "Ficheros XIF" #: ../C/amide.xml.translate:753(para) msgid "" "AMIDE saves studies in an extensible XML based format called XIF (Xml Image " "Format). This format can be stored as either a single file (flat file format " "XIF) or as a XIF directory. The flat file format is the default, and " "simplifies file moving and handling. The directory format on the other hand " "allows easy access to the raw study data external to the AMIDE program, and " "will be of interest to developers. Which of these two formats you wish to " "save in can be selected from the preferences dialog." msgstr "" "AMIDE guarda los estudios en un formato extensible XIF (Xml Image Format). " "Este formato puede guardarse como fichero (formato plano XIF) o como un " "directorio XIF . El formato por defecto es el plano, lo que simplifica el " "manejo y movimiento de los ficheros. Por otro lado el formato en directorio " "permite el fácil acceso a los datos del estudio AMIDE por parte de otros " "programas, lo que será de interés para los desarrolladores. En el diálogo de " "preferencias puede elegir cual de los dos formatos XIF usar." #: ../C/amide.xml.translate:762(para) msgid "" "In any case, these files or directories will characteristically end with \"." "xif\", and are treated identically within the AMIDE program." msgstr "" "En cualquier caso los ficheros o directorios tendrán el sufijo \".xif\", y " "serán tratados idénticamente por el programa AMIDE ." #: ../C/amide.xml.translate:766(title) msgid "Opening Studies" msgstr "Abriendo Estudios" #: ../C/amide.xml.translate:768(para) msgid "" "From the main window, select \"File->Open\", and a file selection widget " "will open up. Select an XIF filename in the right column, and then hit the " "\"OK\" button (or double click on the filename)." msgstr "" "De la ventana principal, selecciónar \"File->Open\", y se abrirá un " "diálogo de selección. Seleccione un nombre de fichero XIF en la columna de " "la derecha, y pulse el boton \"OK\" (o haga click doble en el nombre del " "fichero)." #: ../C/amide.xml.translate:775(title) msgid "Saving Studies" msgstr "Guardando Estudios" #: ../C/amide.xml.translate:777(para) msgid "" "To save a study, from the study window select \"File->Save As\" and a " "file selection dialog will appear. Look at the \"selection:\" line near the " "bottom of the window, if this is the desired XIF filename, hit \"OK\" and " "the file will be saved. If this is not the desired XIF filename, select or " "enter in the correct XIF study, and hit the \"OK\" button." msgstr "" "Para guardar un estudio, de la ventana de selección de estudios \"File->" "Save As\" y un diálogo de selcción de ficheros aparecerá. Mire la línea " "\"selection:\" cerca del pie de la ventana, si este es el fichero XIF " "deseado , pulse \"OK\" y el fichero sera guradado. Si no fuera el fichero " "XIF deseado , seleccione o entre el nombre correcto de estudio XIF, y pulse " "el boton \"OK\" ." #: ../C/amide.xml.translate:784(para) msgid "" "Note that the original data set files are no longer needed by AMIDE, as all " "the information AMIDE needs is saved inside the .XIF file. You should " "however still archive the original data files, as AMIDE only reads in and " "stores the information from the header that it needs (which is generally not " "all the information enclosed within the header)." msgstr "" "Note que los ficheros de datos originales ya no son necesraios para AMIDE, " "ya que toda la información que AMIDE necesita esta guardada en el fichero ." "XIF . De todas las maneras debería guardar los ficheros originales, ya que " "AMIDE solamente lee la información que necesita del encabezamiento." #: ../C/amide.xml.translate:795(title) msgid "XIF Directory Format" msgstr "Formato XIF en Directorio" #: ../C/amide.xml.translate:797(para) msgid "" "Although admittedly annoying from a data transfer standpoint, using a " "directory structure for saving study information has the decisive advantage " "of making the saved information easily accessible using standard command-" "line utilities and text-based tools." msgstr "" "Aunque desde le punto de vista de tranferecia es bastante engorroso, usando " "la estructura de directorio para guardarlos tiene la ventaja decisiva de " "hacer la información mas fácilmente accessible usando linea de comandos y " "herramientas estandar de texto." #: ../C/amide.xml.translate:803(para) msgid "" "Each XIF directory contains a file called \"study_*.xml\" which contains the " "basic study parameters. Additional files can also be found in the XIF " "directory, such as ROI_*.xml files which contain ROI's, and data-set_*.xml " "files and their corresponding data-set_*_raw-data files, which contain the " "image data set parameters and the raw data respectively. The raw data file " "format is arbitrary (double/float/int, 64/32/16/8 bit, little or big endian, " "per plane/per frame/single scale factor), and is determined by the format of " "the originally imported data." msgstr "" "Cada directorio XIF contiene un fichero llamado \"study_*.xml\" el cual " "guarda los paramnetros básicos del estudio. Ficheros adicionales se " "encuentran en el directorio XIF como los ficheros ROI_*.xml que guardan " "ROI's, y data-set_*.xml con sus correspondientes conjuntos de datos, data-" "set_*_raw-data files, que contienen los parámetros de imagen y los datos " "crudos respectivamente. El fichero crudo (raw) (double/float/int, 64/32/16/8 " "bit, little or big endian, por plano/por segmento de tiempo(frame)/factor " "simple de escala), y está determinado por el formato original de los datos." #: ../C/amide.xml.translate:814(title) msgid "XIF Flat File Format" msgstr "Formato Plano XIF" #: ../C/amide.xml.translate:816(para) msgid "" "The flat file format is basically a concatenation of the information " "enclosed within the directory format. It is not meant to be editable or " "developer friendly. Instead, it allows easy manigment of studies for casual " "users. If you wish to access the information in a XIF flat file external to " "AMIDE, you'll be much better off resaving the data as in XIF directory " "format." msgstr "" "El formato palno XIF es una concatenación de la información encerrada en el " "directorio XIF. No es de ninguna manera para ser editado o fácil para los " "desarrolladores. En cambio, facilita el manejo para los usuarios. Si desea " "acceder al al información a un fichero palno XIF por un programa externo, " "mejor vuélvalo a guardar como formato XIF en directorio." #: ../C/amide.xml.translate:823(para) msgid "" "The format is as follows: The first 64 bytes of the file contain a magic " "string for format identification. The next 16 bytes contain 2 64bit unsigned " "little endian integers, the first one being the location of the study xml " "data within the file, and the second integer being the size of this xml " "data. Within the study xml data, is encased the information as to where in " "the file the children's xml data is. And within the children's xml data, is " "enclosed the location information of the raw data and subchildren." msgstr "" "El formato es el siguiente: Los primeros 64 bits contienen una cadena mágica " "de identificación del formato. Los siguientes 16 bits contienen 2 enteros de " "64 bit little endian, el primero siendo la localización del estudio xml en " "el fichero, y el segundo correspondiendo al tamaño de los datos xml. Dentro " "de los datos xml esta incluída la información de donde se hallan ubicados " "los hijos de los datos xml, y dentro de los datos xml de los hijos se " "encuentra la localización de los datos de los subhijos." #: ../C/amide.xml.translate:839(title) msgid "Exporting a View to JPEG/PNG" msgstr "Exportando una Vista a JPEG" #: ../C/amide.xml.translate:841(para) msgid "" "To export one of the views (transverse/coronal/sagittal) to an external " "image file, select \"File->Export View->[view]\" from the menu. The " "saved data format by default is jpeg. If the saved filename ends in \".png" "\", the saved data format will be PNG." msgstr "" "Para exportar una de las vistas (transversa/coronal/sagital) a un fichero " "externo de imagen, seleccione \"File->Export View->[view]\" desde el " "menú. . La vista será guardada como jpeg." #: ../C/amide.xml.translate:857(title) msgid "Manipulating Medical Data Sets" msgstr "Manipulando Conjunto de Datos Médicos" #: ../C/amide.xml.translate:859(para) msgid "" "After being loaded in, medical images can be manipulated in a variety of " "ways with AMIDE. An important point to remember is that AMIDE deals with all " "data sets as 3 or 4 dimensional data sets. While 2D slices extracted from " "the the data set are displayed on the computer screen, at no time does AMIDE " "handle images as anything less than 3 dimensional data." msgstr "" "Despues de ser cargados los datos médicos pueden ser manipulados de varias " "maneras en AMIDE. Es importante recordar que AMIDE trabaja con volúmenes de " "datos 3D y 4D. Mientras que los cortes 2D son representados en la pantalla " "del ordenador , AMIDE maneja siempre datos tridimensionales." #: ../C/amide.xml.translate:869(title) msgid "Manipulating Data Sets on Screen" msgstr "Manipulando Volúmenes en la Pantalla" #: ../C/amide.xml.translate:871(title) msgid "Displaying Data Sets" msgstr "Viendo Volúmenes" #: ../C/amide.xml.translate:873(para) msgid "" "When initially loaded into the program, a data set is not displayed on the " "canvases. Rather, the name of the data set is contained in the study list, " "and the user needs to select the data set in the study list so that it is " "displayed on the canvases." msgstr "" "Cuando inicialmente se carga un conjunto de datos en el programa este no es " "visualizado. En vez de esto el nombre del conjunto de datos aparece en la " "lista del estudio, y el usuario debe seleccionar este conjunto de la lista " "para visualizarlo." #: ../C/amide.xml.translate:879(para) msgid "" "Displaying multiple data sets is as simple as importing more than one data " "set, and then selecting the data sets that you wish to view from the study " "list." msgstr "" "Ver múltiple conjuntos de datos es tan simple como importar mas de un " "conjunto de datos, y entonces selecionar que conjuntos queremos ver de la " "lista del estudio." #: ../C/amide.xml.translate:883(para) msgid "" "The time period over which the slices are drawn is determined by the time " "dialog, described in more detail in " msgstr "" "El periodo de tiempo se selecciona del diálogo de tiempo y se describe en " "mas detalle en " #: ../C/amide.xml.translate:889(title) msgid "Pertinent Mouse Actions" msgstr "Manejo del Ratón" #: ../C/amide.xml.translate:891(para) msgid "" "The following mouse actions can be used when the mouse is hovering over a " "data set on any of the orthogonal views" msgstr "" "Las siguientes acciones del ratón puden ser usadas sobre los datos de las " "vistas ortogonales" #: ../C/amide.xml.translate:896(term) msgid "Shift-Left Mouse Button" msgstr "MAYUSC+Botón 1" #: ../C/amide.xml.translate:897(para) msgid "" "This combination allows shifting of the active data set in space (usually " "used for aligning two data sets). While holding the shift key, left click " "(and release) on the canvas, and you'll grab the active data set. You can " "now shift the active data around on the canvas. At this point, to enact the " "shift, click the right button (button 3). Any other mouse button will cancel " "the shift action." msgstr "" "Esta combinación permite desplazar el volumen en el espacio (normalmente " "usado para alinear volúmenes de datos). Mientras se aprieta MAYUSC, al " "pulsar el el botón 1 en la imagen, se cojerá el volumen activo. Ahora puede " "desplazarlo alrededor del marco. Cuado el volumen se halla en la posición " "deseada para soltarlo pulsar el botón 3. Cualquier otro botón del ratón " "cancelará el desplazamiento." #: ../C/amide.xml.translate:906(term) msgid "Shift-Right Mouse Button" msgstr "MAYUSC+Botón 2" #: ../C/amide.xml.translate:907(para) msgid "" "This combination allows rotating of the active data set in space (usually " "used for aligning two data sets). While holding the shift key, middle click " "(and release) on the canvas, and you'll grab the active data set. You can " "now rotate the active data around on the canvas. At this point, to enact the " "rotation, click the right button (button 3). Any other mouse button will " "cancel the rotation." msgstr "" "Esta combinación rota el volumen en el espacio (normalmente usado para " "alinear volúmenes de datos). Mientras se mantiene pulsada MAYUSC, pulsar (y " "soltar) con el botón 2 en la imagen, se cojera al volumen. Ahora puede rotar " "el volumen activo. En este punto para soltar el volumen, pulsar el botón 3. " "Cualquier otro botón cancelará la rotación." #: ../C/amide.xml.translate:916(term) msgid "Ctrl-Right Mouse Button" msgstr "Ctrl+Botón 3" #: ../C/amide.xml.translate:917(para) msgid "" "This combination will place an alignment point at the current cursor " "location. A dialog will popup for entry of the alignment point's name." msgstr "" "Esta combinación situa un punto de alineación en la posición donde este el " "cursor. Un diálogo pedirá el nombre del punto." #: ../C/amide.xml.translate:930(title) msgid "Manually Aligning Data Sets" msgstr "Alineación Manual de Volúmenes" #: ../C/amide.xml.translate:932(para) msgid "What follows is a quick guide to manually aligning data sets in AMIDE" msgstr "" "Lo que sigue es una guía rápida para alinear manualmente volúmenes en AMIDE" #: ../C/amide.xml.translate:937(para) msgid "" "First rotate each of the data sets so that they are level with respect to " "the transverse, coronal, and sagittal views. This is easily done using the " "shift-2 mouse combination, but can also be done from the data set " "modification dialog." msgstr "" "Primero rotar los volúmenes para que esten a nivel respecto a las vista " "axiales, coronales, and sagitales . Esto se hace fácilmente con la " "combinación MAYUSC+2 botón , pero también pude hacerse desde el diálogo de " "modificación de los conjuntos de datos." #: ../C/amide.xml.translate:945(para) msgid "" "Choose one of the data sets to be the active data set. The other data set " "will be the \"fixed\" data set." msgstr "" "Elija un volumen como activo, este se moverá. El otro permanecerá \"fijo\" ." #: ../C/amide.xml.translate:951(para) msgid "" "Shift the active data set so that the two data sets line up appropriately. " "This is easily done using the shift-1 mouse combination, but can also be " "done from the data set modification dialog." msgstr "" "Desplace el volumen activo hasta alinearlo con el fijo. Esto se hace " "fácilmente con la combinación MAYUSC+Botón 1 , pero también puede hacerse " "desde el diálogo de modificación de los conjuntos de datos." #: ../C/amide.xml.translate:958(para) msgid "" "If fine tuning adjustments are needed, these are best done from the data set " "modification dialog." msgstr "" "Los ajustes finos es mejor llevarlos a cabo desde el diálogo de modificación " "de los conjuntos de datos." #: ../C/amide.xml.translate:968(title) msgid "Data Set Modification Dialog" msgstr "Diálogo de Modificación de Conjuntos de Datos" #: ../C/amide.xml.translate:970(para) msgid "" "To modify parameters of a data set, right click on the name of the data set " "in the study tree to pop-up the data set modification dialog box. Parameters " "that can be modified are divided into the following pages." msgstr "" "Para modificar los Parametros de un volumen, pulsar con el botón 3 en le " "volumen del arbol del estudio para que aparezca el diálogo de modificación. " "Los parámetros modificables se dividen en las siguientes páginas." #: ../C/amide.xml.translate:977(term) ../C/amide.xml.translate:1445(term) #: ../C/amide.xml.translate:1513(term) #, fuzzy msgid "Basic Info" msgstr "" "#-#-#-#-# es.po (PACKAGE VERSION) #-#-#-#-#\n" "Informacion Básica\n" "#-#-#-#-# es.po (PACKAGE VERSION) #-#-#-#-#\n" "Información Básica\n" "#-#-#-#-# es.po (PACKAGE VERSION) #-#-#-#-#\n" "Información Básica" #: ../C/amide.xml.translate:978(para) msgid "" "On this page are options to alter the data set name, type of modality, " "subject name, subject id, subject date of birth (DOB), conversion factor, " "and the interpolation type to use for this data set (described at ). The conversion factor is a parameter that is " "multiplied to the data set before it is used for viewing or quantitation. " "Since the data set is in ECAT/MAP/abitrary scale units, the conversion " "factor can be used in order to analyze the data set in another type of " "reference unit (e.g. Percent Injected Dose [%ID]). There is also a built in " "calculator, where parameters such as subject weight and injected dose can be " "entered, and the conversion factor will be generated. Note that 1 cc is " "assumed to equal 1 g when generating the %ID/g and SUV." msgstr "" "En esta página hay opciones para modificar el nombre, tipo de modalidad, " "factor de conversión, y tipo de interpolación usado en este volumen de datos " "(descrito en ). El factor de conversión es " "el parámentro por el que se multipilican el volumen de datos antes de verlo " "o cuantificarlo. Al estar los datos en una escala arbitraria de valores ECAT/" "MAP, el factor de conversión se puede utilizar para analizar los datos con " "otro tipo de unidad d e referencia(p.e. Porcentaje de Dosis Inyectada [%" "ID]). También hay una calculadora incluida, donde se pueden meter los " "parámetros como el peso del sujeto y la dosis inyectada, generandos el " "factor de conversión." #: ../C/amide.xml.translate:997(term) ../C/amide.xml.translate:1451(term) msgid "Center" msgstr "Centro" #: ../C/amide.xml.translate:998(para) msgid "" "The data set can be shifted by respecifing the center of the data set with " "respect to the origin. The x, y, and z dimensions are in millimeters." msgstr "" "Se puede desplazar el volumen de datos con respecto al origen de " "coordenadas. Las dimensiones xyz son en milímetros." #: ../C/amide.xml.translate:1005(term) msgid "Voxel Size" msgstr "Tamaño del Voxel" #: ../C/amide.xml.translate:1006(para) msgid "" "The size of the data set's voxels (again, in millimeters) can be altered on " "this page. The \"keep aspect ratio\" button specifies that when altering the " "size of any voxel component (x, y, or z), the relative sizes between the " "components should be kept the same." msgstr "" "El Tamaño del voxel de los datos (también en milímetros) pude ser alterado " "en esta página. El botón \"keep aspect ratio\" especifica que cuando se " "altera cualquier dimensión del voxel (x, y, or z), las demás dimensiones se " "alteraran en la misma proporción." #: ../C/amide.xml.translate:1015(term) ../C/amide.xml.translate:1466(term) #: ../C/amide.xml.translate:1527(term) msgid "Rotate" msgstr "Rotar" #: ../C/amide.xml.translate:1016(para) msgid "" "The data set can be rotated around its center in this page. There is one " "dial for each of the three slice planes. The transverse dial will spin the " "data set in the transverse plane (i.e. rotate on the z-axis). The coronal " "dial will spin the data set in the coronal plane (i.e. rotate on the y-" "axis). And the sagittal dial will spin the data set in the sagittal plane (i." "e. rotate on the x-axis). The \"reset to default\" button allows the data " "set to be rotated back to the default orientation. On the bottom of this " "page is a matrix showing the coordinate frame of the data set with respect " "to the base coordinate frame." msgstr "" "El volumen de datos puede ser rotado sobre su cento en esta página. Hay una " "ruedecita por cada plano. La ruedecita axial rotará el volumen en el plano " "transversal (rota sobrel el eje z). La ruedecita coronal rotará el volumen " "en el plano coronal (rota sobrel el eje y). Y la rudecita sagital lo hará " "sobre el plano sagital (rota sobrel el eje x). El botón \"reset to default\" " "deshace las rotaciones dejando el volumen como al principio. Al pie de " "página existe una matriz con las tranformaciones de las coordenadas del " "volumen con respecto al las coordenadas de origen." #: ../C/amide.xml.translate:1031(term) msgid "Colormap/Threshold" msgstr "Mapa de Color/Umbral(Threshold)" #: ../C/amide.xml.translate:1032(para) msgid "" "This page is analogous to the thresholding tool dialog (described at ) above)." msgstr "" "Esta página es análoga al del diálogo de Umbral (descrita en )." #: ../C/amide.xml.translate:1038(term) msgid "Time" msgstr "Tiempo" #: ../C/amide.xml.translate:1039(para) msgid "" "From this page, the timing information of the data set can be altered. Scan " "start time can be used for altering the start time of the scan with respect " "to other data sets. Corrections in the duration of each data frame can also " "be made on this page." msgstr "" "Desde esta página se puede alterar la información respecto al los tiempos de " "los datos. El tiempo de comienzo del scan puede cambiarse con respecto al " "tiempo de otros scans. También pueden hacerse correciones en la duración de " "cada marco de tiempo(Frame Time) ." #: ../C/amide.xml.translate:1047(term) msgid "Windowing Preferences" msgstr "" #: ../C/amide.xml.translate:1048(para) msgid "" "The max and min threshold levels used for the bone and soft tissue CT window " "buttons can be explicitly set here. The \"Insert Current Thresholds\" button " "will reset the max and min values with the data set's currently used " "threshold levels." msgstr "" #: ../C/amide.xml.translate:1056(term) ../C/amide.xml.translate:1565(term) msgid "Immutables" msgstr "" #: ../C/amide.xml.translate:1057(para) msgid "" "This panel lists information about the data set that cannot be altered. The " "underlying internal data format of the data set and the data set dimensions " "in voxels are displayed on this page." msgstr "" "Este panel lista la información que no puede ser alterada. El formato " "interno subyaccente y las dimensiones del voxel se muestran en esta página." #: ../C/amide.xml.translate:1075(title) msgid "Using Regions of Interest (ROI's)" msgstr "Usando Regiones de Interés (ROI's)" #: ../C/amide.xml.translate:1077(para) msgid "" "ROI stands for Region of Interest. An ROI designated a volume in space over " "which statistics should be calculated." msgstr "" "ROI(Region of Interést) es decir Región de Interés. Un ROI designa un " "subvolumen del volumen de datos sobre el que serán calculadas las " "estadísticas." #: ../C/amide.xml.translate:1082(title) msgid "ROI Types" msgstr "" #: ../C/amide.xml.translate:1084(para) msgid "The following ROI types are currently supported in AMIDE:" msgstr "Lo siguientes tipos de ROI son soportados por AMIDE:" #: ../C/amide.xml.translate:1088(title) msgid "Geometric ROI's" msgstr "" #: ../C/amide.xml.translate:1092(term) msgid "Ellipsoid" msgstr "Elipsoide" #: ../C/amide.xml.translate:1093(para) msgid "" "An ellipsoid is similar to a sphere, but with a radius specified for each " "direction [x,y,z]. In the case of x=y=z, the ellipsoid is a sphere." msgstr "" "Un elipsoide es similar a una esfera, pero con un radio que puede ser " "diferente en cada dirección [x,y,z]. Si x=y=z el elipsoide se convierte en " "una esfera." #: ../C/amide.xml.translate:1098(term) msgid "Elliptic Cylinder" msgstr "Cilindro Elíptico" #: ../C/amide.xml.translate:1099(para) msgid "" "An elliptic cylinder is similar to a regular cylinder, except it has an " "ellipse as its base instead of a circle." msgstr "" "Similar al cilindro excepto que su base en vez de un círculo es una elipse." #: ../C/amide.xml.translate:1104(term) msgid "Box" msgstr "" #: ../C/amide.xml.translate:1105(para) msgid "Exactly what it says, a 3D box." msgstr "Caja 3D." #: ../C/amide.xml.translate:1112(title) msgid "Isocontour ROI's" msgstr "ROI Isocontorno" #: ../C/amide.xml.translate:1114(para) msgid "" "Isocontour ROI's are regions selected from the data set such that the edge " "values of the ROI are always the same value. There are two types, 2D and 3D " "isocontours. Additionally, both these ROI types can be defined so that they " "encompass all neighboring values either above a certain minimum value, below " "a certain maximum value, or between a minimum and maximum value. After " "drawing of these ROI's, they can be modified by using manual drawing or " "erasing operations." msgstr "" "ROI Isocontorno, son regiones seleccionadas del volumen cuyos límites tienen " "el mismo valor. Hay dos tipos, isocontronos 2D y 3D ." #: ../C/amide.xml.translate:1125(term) msgid "2D Isocontour" msgstr "Isocontorno 2D" #: ../C/amide.xml.translate:1126(para) msgid "" "A 2D isocontour is derived by considering a value on one of the displayed 2D " "slices. The depth of a 2D isocontour is specified initially by the depth of " "the viewed slices." msgstr "" "El isocontorno 2D se deriva del dibujado en uno de los cortes. . La " "profundidad del isocontorno 2D esta determinada por el grosor del corte " "visualizado." #: ../C/amide.xml.translate:1132(term) msgid "3D Isocontour" msgstr "Isocontorno 3D" #: ../C/amide.xml.translate:1133(para) msgid "" "A 3D isocontour is derived by considering a value on the current frame of " "the active data set." msgstr "" "El isocontorno 3D se deriva considerando un valor del marco de tiempo " "selecionado del volumen activo." #: ../C/amide.xml.translate:1141(title) msgid "Freehand ROI's" msgstr "" #: ../C/amide.xml.translate:1143(para) msgid "Freehand ROI's are regions of interest that are drawn manually." msgstr "" #: ../C/amide.xml.translate:1148(term) msgid "2D Freehand" msgstr "" #: ../C/amide.xml.translate:1150(para) msgid "" "A 2D Freehand ROI is similar to a 3D Freehand, except that it is constrained " "to be only one voxel thick. By default, the depth is the current slice " "thickness, although this can be changed by the user." msgstr "" #: ../C/amide.xml.translate:1156(term) msgid "3D Freehand" msgstr "" #: ../C/amide.xml.translate:1157(para) msgid "An ROI that can be drawn freely in all 3 dimensions.." msgstr "" #: ../C/amide.xml.translate:1167(title) msgid "Drawing ROI's" msgstr "Dibujando ROI's" #: ../C/amide.xml.translate:1169(para) msgid "" "To draw an ROI, you first need to create a new ROI. You can add a new ROI to " "either the study, or a particular data set. To add an ROI to the study, you " "can either select the ROI desired under the \"Edit->add ROI:\" menu item, " "or right click on the blank area of the study tree. To add an ROI to a data " "set, shift-right click on the data set that you'd like to add the ROI to. In " "both cases, a dialog box will pop-up for you to enter in the new ROI's name." msgstr "" "Para dibujar un ROI, primero necesita crear un ROI nuevo. Puede añadir un " "ROI a todo el estudio o a un volumen en particular. Para añadirlo al " "estudio, puede seleccionar el ROI en el menu item \"Edit->add ROI:\" , o " "hacer pulsar el botón 3 en el área desnuda el árbol del estudio. Para añadir " "un ROI a un volumen , hacer SHIF+botón 3 sobre el volumen a añadir. En ambos " "casos emergerá una cajita de diálogo para entrar el nombre del ROI." #: ../C/amide.xml.translate:1179(para) msgid "" "When first added, the new (undrawn) ROI will be selected in the study tree. " "When an undrawn ROI is selected in the study tree, the program will use the " "next mouse input on any of the displayed views to begin the process of " "drawing this ROI." msgstr "" "Al añirlo al pricipio , el ROI nuevo (todavía no dibujado) sera seleccionado " "en el árbol del estudio. Cuando un ROI todavia no dibujado es seleccionado, " "el programa usara el la siguiente acción del ratón sobre una vista para " "empezar el proceso de dibujo del ROI." #: ../C/amide.xml.translate:1186(para) msgid "" "For ellipsoid, elliptic cylinder, and box ROI's, a click with the left " "button will begin an edge-to-edge drawing, while a click with the middle " "button will begin a center-out drawing. The x and y dimensions of the ROI " "are determined by this process. The z dimension (thickness) of the ROI can " "be specified by the pop-up dialog that will appear on the completion of the " "mouse movement." msgstr "" "Para ROI's elipsoide, cilindroide y caja 3D, una pulsación d el botón 1 " "empezará un dibujo de borde a borde , mientras que si pulsamos el botón 3 " "empezará el dibujo por el centro. Las dimensiones xy del ROI se determinan " "con este proceso. La dimensión z (grosor) del ROI se puede especificar en el " "diálogo que emergerá al acabar de dibujar el ROI." #: ../C/amide.xml.translate:1195(para) msgid "" "For isocontour's, the value of the data set at the clicked upon location " "will be used to derive the isocontour." msgstr "" "Para los isocontornos, el valor de donde este situado el cursor sera usado " "para derivar el isocontorno." #: ../C/amide.xml.translate:1200(para) msgid "" "For freehand's, the point on the screen that is clicked upon will be " "included in the ROI." msgstr "" #: ../C/amide.xml.translate:1207(title) msgid "Manipulating ROI's" msgstr "Manipulando ROI's" #: ../C/amide.xml.translate:1209(para) msgid "" "After an ROI is drawn, it can be further manipulated to adjust its size, " "placement, and orientation. You can directly manipulate the ROI by clicking " "on it in any of the viewing windows. Mouse button 1 is used to shift ROIs. " "Mouse button 2 is used for zooming ellipsoid, elliptic cylinder and box ROI, " "and is used for entering drawing mode for isocontour and freehand ROI's. " "Mouse button 3 is used to rotate ellipsoid, elliptic cylinder, and box ROIs, " "and for redefining the isocontour value for isocontour ROI's." msgstr "" "Después de haber dibujado un ROI, puede ser manipulado ajustando su volumen, " "posición y orientación. Puede manipular directamente el ROI pulsando en " "cualquiera de las ventanas. El botón 1 se usa para desplazar los ROIs. El " "botón 2 para rotar los ROIs elpisoides, cilindroides y cajas 3D y en el caso " "de los ROI de isocontorno para borrar puntos. El botón 3 se usa para hacer " "zoom de los ROI's elipsoide, cylindro elíptioco y caja 3D, y redefine le " "valor del isocontrono en el caso de esos ROIs." #: ../C/amide.xml.translate:1219(para) msgid "" "For isocontour and freehand ROI's, drawing mode can be entered by using thie " "middle mouse button (button 2). Once entered, points can be added or removed " "from the ROI by using the left (button 1) or right (button 3) mouse buttons, " "respectively. Holding down the shift key while using these buttons increases " "the size of the action. The middle button (button 2) allows the user to " "leave drawing mode." msgstr "" #: ../C/amide.xml.translate:1228(para) msgid "" "You can also edit the ROI size/placement/orientation/name etc. by clicking " "on mouse button 3 while over the ROI's name in the study item list. This " "brings up the ROI modification dialog (described at )." msgstr "" "También puede editar el tamaño,situación, orientación, nombre etc.. pulsando " "el botón 3 sobre el nombre del ROI en la lista de items del estudio. Esto " "hace que aparezca el diálogo de Modificación de ROIs (descrito en en )." #: ../C/amide.xml.translate:1239(title) msgid "Calculating Statistics" msgstr "Calculando Estadísticas" #: ../C/amide.xml.translate:1241(para) msgid "" "Statistics on an ROI can be calculated via the \"Tools->calulate ROI " "statistics\" menu item. Choosing this will pop-up a dialog that lets you " "choose which ROI's (selected or all) and which data sets (selected or all) " "you'd like to calculate statistics over. You will also have three options as " "to how you what the values to be calculated." msgstr "" "Las estadísticas dentro de un ROI se pueden calcular con el menu item " "\"Tools->calulate ROI statistics\" . Eligiendo este emergerá un diálogo " "que le permitirá elegir entre que ROI (o todos) y entre que volúmenes (o " "todos) quiere que se calculen las estadísticas. También pude elegir que se " "calcule sobre subconjuntos de vóxeles, significando el cálculo sobre el x% " "de vóxeles con valor máximo del ROI." #: ../C/amide.xml.translate:1253(para) msgid "Calculate over all voxels." msgstr "" #: ../C/amide.xml.translate:1257(para) msgid "" "Calculate over highest x percent of voxels. For example, if you choose this " "and pick 25% as the number, your ROI will be calculated from the 25% of the " "voxels in the ROI that have the highest values." msgstr "" #: ../C/amide.xml.translate:1265(para) msgid "" "Calculate for voxels >= % of Max. This method is based on Lee, Madsen, " "Bushnel, and Menda, Nuc Med Comm 2000, 21:685-690. As an example, if you " "choose this and pick 50% as the number, the highest valued voxel in the ROI " "will be found, and then the ROI statistics will be calculated for all voxels " "that are greater or equal to 50% of the highest valued voxel." msgstr "" #: ../C/amide.xml.translate:1275(para) msgid "" "Calculate for voxel >= Value. This algorithm only does calculations for " "voxels in the ROI that have a value greater than the value specified." msgstr "" #: ../C/amide.xml.translate:1283(para) msgid "" "There's also a check box to enable \"more accurate quantitation\". The " "default algorithm (corresponding to unchecked) makes some approximations in " "deciding which voxel are in our out of the ROI. If this check boxed is " "checked, the ROI results will be more accurate, but will take much longer to " "compute." msgstr "" #: ../C/amide.xml.translate:1290(para) msgid "" "After hitting execute, the program will crank for a while, and then show the " "calculated values in a new dialog window. Hitting \"Save as\" button allows " "saving these values as a tab separated values (TSV) file. This file should " "be easily imported into most spreadsheet applications (Excel's a little " "stupid, you may have to explicitly tell it you're importing a TSV file). " "Pressing the \"Copy\" button copies the information into the operating " "systems clipboard, allowing pasting of the results into other programs. The " "\"Save Raw Values\" button allows you to export the underlying raw data " "values for the ROI's in case you wish to do your own statistical analysis." msgstr "" "Despues de pulse 'execute' , ejecutar, tras unos instantes el programa " "mostrará los valores calculados. Seleccionando \"save as\" permite guardarlo " "es un fichero con los valores separados por una tab (TSV). Este fichero " "debería ser importado fácilmente a cualquier hoja de cálculo (Excel es un " "poco estúpido, tiene que expecificarle que esta importando un fichero TSV, " "Tab Separated Values)." #: ../C/amide.xml.translate:1308(title) msgid "Gotcha's to ROI calculations" msgstr "Facilidades para los Cálculos de los ROI" #: ../C/amide.xml.translate:1310(title) msgid "Variance and Standard Deviation Fallacies" msgstr "Varianza/Std. Dev./Std. Err." #: ../C/amide.xml.translate:1312(para) msgid "" "Currently, AMIDE generates variance and standard deviation values that may " "occasionally be of interest to imaging physicists. It is very important to " "remember, that these numbers represent the noise in the data set, NOT the " "noise in your experiment." msgstr "" "A día de hoy, AMIDE genera valores de varianza/std. dev./std. error que " "ocasionalmente pueden interesar para los investigadores. Es muy importante " "recordar , que esos números representan el ruido en los datos, NO el ruido " "en su experiemento." #: ../C/amide.xml.translate:1319(para) msgid "" "The variance of an experiment can only truly be measured by taking multiple " "samples (i.e. performing multiple scans) and calculating the variance " "between these different samples." msgstr "" "La varianza del experimento solo puede ser tomada repitiendo multiples " "muestras (p.e. haciendo multiples scans) y calculando la varianza entre " "diferentes muestras." #: ../C/amide.xml.translate:1326(title) msgid "Changing Calculated Volume" msgstr "Cambiando el Volumen Calculado" #: ../C/amide.xml.translate:1328(para) msgid "" "Short story: The calculated volume shown by the ROI " "statistics dialog is correct. Use this value as the volume of the ROI, not " "the value you might calculate by hand based on the ROI's dimensions." msgstr "" "Historia corta: El volumen calculado mostrado por el " "diálogo de estadísticas del ROI es correcto. Use este valor como volumen del " "ROI, no el que podría calcular a man basándose en las dimensiónes del ROI." #: ../C/amide.xml.translate:1334(para) msgid "" "Long story: AMIDE calculates ROI's by translating the " "ROI's dimensions into the data set's coordinate space. It then computes " "statistics for all the data set voxels that are in the ROI. For voxels that " "lie on the edge of the ROI, AMIDE will subdivide the voxel into a finite " "number of subvoxels, and calculate over the subvoxels. This approach yields " "correct statistics, but it is important to realize that the computed ROI is " "a discrete representation of the specified analytical ROI. So while the true " "volume of an ellipse is pi*r1*r2*r3, the computed volume of the ellipse in " "AMIDE will depend on the number of voxels and subvoxels that were determined " "to lie within the ellipse, which in turn can depend on the orientation of " "the ROI with respect to the data set in question. Since the computed volume " "given by AMIDE represents the volume in the data set that was used for the " "ROI calculation, you will want to use that value (not the real ellipse " "value)." msgstr "" "Historia larga: AMIDE calcula el ROI's trasladando las " "dimensiónes del ROI al las coordenadas del espacio del volumen de datos. " "Entonces calcula las estadísticas de todos los volúmenes de datos que hay en " "el ROI. Para los vóxeles que caen en el límite del ROI, AMIDE subdividirá el " "voxel en un número finito de subvóxeles, y hace el cálculo sobre los " "subvóxeles. Esta aproximación resulta en estadísticas correctas, pero es " "importante darse cuenta que el ROI calculado es una representación " "discretizada del ROI analítico. Así que mientras el verdadero volumen de un " "elipsoide es pi*r1*r2*r3, el volumen calculado por AMIDE dependerá del " "número de vóxeles y subvóxeles que se determinan dentro del elipsoide, que a " "su vez puede depender de la orientación del ROI respecto al volumen de datos " "en cuestión. Como el volumen dado por AMIDE representa el subvolumen en el " "volumen de datos para el cálculo del ROI, querrá usar ese valor (no el valor " "real elipsoide)." #: ../C/amide.xml.translate:1353(title) msgid "Why isn't a \"total\" statistic calculated for the ROI?" msgstr "" #: ../C/amide.xml.translate:1355(para) msgid "" "AMIDE doesn't present the \"total\" value in the ROI, as it doesn't " "necessarily know what the units of the underlying data are. If you're using " "PET or SPECT data, your voxel values are most likely proportional to " "activity/volume/time. To calculate the total in your ROI, you should " "multiple the mean value of the ROI times the ROI volume and the frame " "duration. If you're using CT data, your values are probably proportional to " "density, so to calculate the total you would multiple the mean ROI value by " "the ROI volume." msgstr "" #: ../C/amide.xml.translate:1369(title) msgid "Explanations of ROI Statistical Values" msgstr "Explicaciones de los Valores Estadísticos de los ROI's" #: ../C/amide.xml.translate:1373(term) msgid "Median" msgstr "Mediana" #: ../C/amide.xml.translate:1374(para) msgid "" "This is the median value of all the voxels that are enclosed (partially or " "totally) within the ROI. For an even number of voxels, the median is defined " "as the average of the center 2 values." msgstr "" "Es el valor de mediana value de todos los vóxeles que estan total o " "parcialmente incluidos en el ROI. Para un numero par de vóxeles , la mediana " "se define como el promedio de los 2 valores centrales." #: ../C/amide.xml.translate:1380(term) msgid "Mean" msgstr "Media" #: ../C/amide.xml.translate:1381(para) msgid "" "The mean value of the voxels in the ROI. Voxels that are partially enclosed " "within the ROI are appropriately weighted." msgstr "" "El valor media de los vóxeles del ROI. Los vóxeles parcialmente incluidos en " "el ROI son proporcionalmente sopesados." #: ../C/amide.xml.translate:1386(term) msgid "Variance" msgstr "Varianza" #: ../C/amide.xml.translate:1387(para) msgid "" "The variance of the voxels in the ROI. This is a weighted variance " "calculation so that voxels that are partially enclosed within the ROI are " "correctly handled." msgstr "" "La varianza de los vóxeles en el ROI. Esta es de hecho un cálculo de " "varianza sopesada asi los vóxeles parcialmente incluídos en el ROI son " "correctamente manejados." #: ../C/amide.xml.translate:1393(term) msgid "Standard Deviation" msgstr "Desviación Estandard" #: ../C/amide.xml.translate:1394(para) msgid "The square root of the variance." msgstr "La raiz cuadrada de la varianza." #: ../C/amide.xml.translate:1397(term) msgid "Standard Error" msgstr "Error Estandard" #: ../C/amide.xml.translate:1398(para) msgid "" "The square root of the variance, divided by the square root of the total " "number of voxels in (totally or partially) the ROI." msgstr "" "La raiz cuadrada de la varianza , dividido por la raiz cuadrada del numero " "total de vóxeles (total o parcialmente) en el ROI." #: ../C/amide.xml.translate:1403(term) msgid "Minimum/Maximum" msgstr "Mínimo/Máximo" #: ../C/amide.xml.translate:1404(para) msgid "" "The minimum and maximum values for all voxels enclosed totally or partially " "within the ROI." msgstr "" "El valor mínimo y máximo de todos los vóxeles parcial o totalmente incluidos " "en el ROI." #: ../C/amide.xml.translate:1408(term) msgid "Size" msgstr "Tamaño" #: ../C/amide.xml.translate:1409(para) msgid "" "The volume of an ROI (mm^3). Details as to its calculation are above in: " "." msgstr "" "El volumen de un ROI (en mm cúbicos). Detalles de este cálculo arriba en: " "." #: ../C/amide.xml.translate:1414(term) msgid "Fractional Voxels" msgstr "" #: ../C/amide.xml.translate:1415(para) msgid "" "The is the sum of the voxel weights, and gives an indication of how large " "the ROI is in voxel space." msgstr "" "Es la suma del peso de los vóxeles, y da una indicación de cuan grande es el " "ROI en el espacio de vóxeles." #: ../C/amide.xml.translate:1420(term) msgid "Voxels" msgstr "Vóxeles" #: ../C/amide.xml.translate:1421(para) msgid "" "This is the total number of voxels used in calculating the ROI, both partial " "and total. In contrast to the \"Fraction Voxels\" measure, the \"Voxels\" " "measure gives a better indication of the statistical validity of the mean, " "variance, etc." msgstr "" "Es el número total de vóxeles incluidos calculando el ROI, tanto parcial " "como totalmente. En contraste a la medida \"Fraction Voxels\", los \"Vóxeles" "\" dan mejor indicación de la valided estadística de la median, varianza, " "etc .." #: ../C/amide.xml.translate:1435(title) msgid "ROI Modification Dialog" msgstr "Diálogo de Modificación de ROI" #: ../C/amide.xml.translate:1437(para) msgid "" "To directly modify parameters of an ROI, right click on the name of the ROI " "in the study tree to pop-up the modification dialog. Parameters that can be " "modified are divided into the following pages." msgstr "" "Para modificar directamente los parámetros del ROI, pulsar el botón 3 en el " "nombre del ROI en el árbol del estudio, para que emerga el diálogo de " "modificación. Los parámetros que se pueden modificar se dividen en dos " "páginas. pages." #: ../C/amide.xml.translate:1446(para) msgid "The name and type of ROI can be altered on this page." msgstr "El nombre y tipo de ROI se puede alterar en esta página." #: ../C/amide.xml.translate:1452(para) msgid "" "The center of the ROI can be shifted with respect to the origin on this " "page. The x, y, and z parameters are in millimeters." msgstr "" "El centro del ROI puede despalzarse en esta página . Los parámetros xyz " "estan en milímetros." #: ../C/amide.xml.translate:1458(term) msgid "Dimensions" msgstr "Dimensiones" #: ../C/amide.xml.translate:1459(para) msgid "" "The size of the ROI can be altered from this page. The x', y', and z' " "dimensions are in millimeters and are orientated with respect to the " "orientation of the ROI." msgstr "" "El tamaño del ROI se puede alterar en esta página. Las dimensiónes x, y, y z " "estan milímetros y orientadas con respecto a la orientación del ROI." #: ../C/amide.xml.translate:1467(para) msgid "" "The ROI can be rotated around its center in this page. There is one dial for " "each of the three slice planes. The transverse dial will spin the ROI in the " "transverse plane (i.e. rotate on the z-axis). The coronal dial will spin the " "ROI in the coronal plane (i.e. rotate on the y-axis). And the sagittal dial " "will spin the ROI in the sagittal plane (i.e. rotate on the x-axis). The " "\"reset to default\" button allows the ROI to be rotated back to the default " "orientation. On the bottom of this page is a matrix showing the coordinate " "frame of the ROI with respect to the base coordinate frame." msgstr "" "El ROI puede rotarse sobre su centro en esta página . Hay una ruedecilla " "para cada uno de los tres planos. La ruedecilla transversal rotará el ROIen " "el plano transverso (rota sobre el eje z). La rudecilla coronal rotará el " "ROI en el plano coronal (rota sobre el eje y). Y la ruedecilla sagital " "girará el ROI en el plano sagital (rota sobre el eje x). El botón \"reset to " "default\" deshace los giros dejando la orientación original. Al pie de esta " "página hay una matriz que muestra las coordinadas del ROI respecto a las " "coordenadas de origen." #: ../C/amide.xml.translate:1490(title) msgid "The Study" msgstr "" #: ../C/amide.xml.translate:1492(para) msgid "" "The \"Study object\" in AMIDE is used for grouping a set of related data " "sets and ROI's. Note that the use of the word \"Study\" here diverges from " "the traditional nuclear medicine use of the word, in which study generally " "connotates a single scan (or occasionally multiple but highly coupled scans) " "done on a single patient. A study in AMIDE is often used to group an entire " "experiment (several patients, several animals, whatever) into a single file. " "The study object itself is used mostly for storing parameters that effect " "all other objects stored in the study." msgstr "" #: ../C/amide.xml.translate:1502(title) msgid "Study Modification Dialog" msgstr "Diálogo de Modificación de Estudio" #: ../C/amide.xml.translate:1504(para) msgid "" "Similarly to the data set and ROI modification dialogs, the study " "modification dialog can be used to alter parameters relevant to the entire " "study. Right click on the name of the study in the study tree to pop-up the " "study modification dialog box. Parameters that can be modified are divided " "into the following pages." msgstr "" "Para modificar los parámetros globales del estudio, pulse el botón 3 del " "ratón en el nobre del estudio en el árbol del estudio o en la caja de " "diálogo de modificación de estudio. Los parámetros pueden dividirse de las " "siguientes categorias." #: ../C/amide.xml.translate:1514(para) msgid "" "On this page are options to alter the name and creation date of the study." msgstr "" "En esta página estan las opciónes para alterar el nombre y fecha de creación " "del estudio." #: ../C/amide.xml.translate:1519(term) msgid "View Center" msgstr "Ver Centro" #: ../C/amide.xml.translate:1520(para) msgid "" "From this page, the point that the study is currently viewing can be " "explicitly changed. The x, y, and z dimensions are in millimeters." msgstr "" "Desde esta página se pude cambiar expliícitamente el centro desde el cual el " "estudio es visto. Las dimensiónes xyz son en milímetros. También se pueden " "cambiar explícitamente. The x, y, and z" #: ../C/amide.xml.translate:1528(para) msgid "" "The entire study (including all objects within it) can be rotated around the " "view center in this page. There is one dial for each of the three slice " "planes. The transverse dial will spin the study in the transverse plane (i." "e. rotate on the z-axis). The coronal dial will spin the study in the " "coronal plane (i.e. rotate on the y-axis). And the sagittal dial will spin " "the study in the sagittal plane (i.e. rotate on the x-axis). The \"reset to " "default\" button allows the study to be rotated back to the default " "orientation. On the bottom of this page is a matrix showing the coordinate " "frame of the study with respect to the base coordinate frame." msgstr "" "El estudio completo(incluyendo todos su objetos) puede ser rotado sobre el " "centro de vista de la imagen. Hay una ruedecilla por cada vista ortogonal. " "La ruedecilla axial rota sobre el plano axial (rota sobre el eje z). La " "ruedecilla coronal rotará el plano coronal (rota sobre el eje y) . Y la " "sagital rotará sobre le plano sagital(rota sobre el eje x). El botón \"reset " "to default\" permite volver a la rotación original del estudio. A pie de " "página hay una matriz mostrando las coordenadas del estudio con respecto a " "las de referencia." #: ../C/amide.xml.translate:1544(para) msgid "" "The width of the line used to draw geometric ROIs can be altered here (1-5 " "pixels). This parameter is not relevant for isocontour ROI's. For isocontour " "ROI's, you can choose to have them draw as filled in or hollow." msgstr "" "The width of the line used to draw geometric ROIs can be altered here (1-5 " "pixels). This parameter is not relevant for isocontour ROI's." #: ../C/amide.xml.translate:1549(para) msgid "" "Canvas layout allows you to switch the three views (transverse, coronal, and " "sagittal) between a linear style layout more commonly seen in PET software, " "and an orthogonal style layout more commonly seen in MRI software. " "\"Maintain view size constant\" allows you to pick if you want the size of " "the view to remain constant or not. If not checked, the size of the views " "shown will depend only on the data sets selected. If the checkbox is " "checked, the size of the views will depend on all the data sets in the " "study. Finally, \"target empty area\" is for setting the size of the empty " "area in the middle of the target (the crosshairs on the views when changing " "the view location)." msgstr "" #: ../C/amide.xml.translate:1566(para) msgid "" "This panel lists information about the study that cannot be altered. \"Voxel " "dim\" is the preferred voxel dimension, this is what the canvas will use as " "the \"basic\" voxel dimension, from which the zoom factor is relative too." msgstr "" "Este panel lista las características del estudio que no puden ser alteradas. " "\"Voxel dim\" es la dimensión preferida del voxel, este será usado como " "dimensión \"básica\" del voxel, a la cual el zoom es relativa." #: ../C/amide.xml.translate:1585(title) msgid "Viewing Series of Slices" msgstr "Viendo Series de Cortes" #: ../C/amide.xml.translate:1586(para) msgid "" "Instead of looking at three orthogonal slices through the data set, a series " "of slices (all of the same orientation) can also be examined. Select: \"View-" ">Series\", and a dialog box will come up allowing you to pick which " "objects you'd like to display on the series viewer, along with if you'd like " "to display the slices over space, time, or gates. The thickness of the " "slices are determined at the time the series window is brought up. A slider " "appears on the top of the window which allows moving through the data set. " "Note that since slices are cached in memory after being displayed, already " "displayed slices do not need to be regenerated from the data set and " "reviewing these slices is significantly faster." msgstr "" "En vez de examinar las vistas ortogonales , se pueden observar series de " "cortes (todos en la misma orientación). Seleccione: \"View->Series->" "Space->[view]\" del menú para para extraer la serie de cortes de una " "misma orientación. Alternativamente, seleccione: \"View->Series->Time-" ">[view]\" desde el menú para ver un mismo corte a lo largo del tiempo en " "un estudio dinámico. El grosor de los cortes es el que había antes de " "deplegar el menu. Una barra de desplazmiento aparecera encima de la imagen " "para moverse por el volumen de datos. Notese que una vez vistos los cortes " "quedan en la memoria lo que hace que su revisión sea mucho más rápida." #: ../C/amide.xml.translate:1608(title) msgid "Rendering Data" msgstr "Renderizado de Datos" #: ../C/amide.xml.translate:1610(para) msgid "" "Rendering in AMIDE is accomplished using the Volpack volume rendering " "library. This software library is both portable, and provides for " "true volume rendering (as opposed to the surface rendering used by many " "other libraries and hardware accelerators)." msgstr "" "El Renderizado en AMIDE se lleva a cabo usando la librería de renderizado de " "volumenes Volpack. Esta librería de software es portable y , " "permite renderizado verdadero del volumen (en oposición al renderiazado de " "superficie usado por otras librerías de software para aceleradoras de " "hardware)." #: ../C/amide.xml.translate:1617(para) msgid "" "To start a rendering window, select the \"View->Rendering\" menu item. A " "small dialog window will pop-up allowing you to select which objects you'd " "like rendered, along with some additional options. The first \"Set values " "greater than max threshold to zero\" allows you to strip high level voxels " "out of the rendering process. In general you won't want this, but it might " "be useful if you have high valued areas in your data set that obscures what " "you'd like to see. The second option \"Accelerate Rendering\" tells VolPack " "to use a faster method for doing the volume rendering. You will in general " "want to use this option, as it causes a significance performance enhancement " "(around 10 fold). It does, however, require around 3 fold as much rendering " "as the non-accelerated option, so if you're running out of memory, you'll " "want to try to rendering without the acceleration. The third option " "\"Initial opacity functions only density dependent\" sets things such that " "the initial gradient opacity function does not contribute to the rendering. " "This is useful for data sets (e.g. PET) where one is more interested in " "having an accurate view of the data, rather than a view where gradients in " "the data set are highlighted." msgstr "" "Para comenzar la ventana de Renderizado, seleccionar los volumenes y ROI's " "que deseara incluir en el rederizado, y pulse el item del menúg \"View->" "Rendering\" . Se desplegará una pequeña ventana de diálogo con dos opciónes. " "La primera \"Set values greater than max threshold to zero(Poner los valores " "mayores que max a cero)\" permite excluir del proceso los valores máximos. " "En general no deseará esto, pero prodría ser útil cuando hay valores muy " "altos que obscurecen zonas que quisiera ver. La segunda opción \"Accelerate " "Rendering(Acelerear Renderizado)\" hace que VolPack use un método de " "aceleración del proceso de renderizado. Obtendrá un aumento de velocidad " "(sobre 10 veces). Sin embargo requiere aproximadamente tres veces mas de " "memoria RAM, así si dispone de poca RAM no use esta opción." #: ../C/amide.xml.translate:1637(para) msgid "" "After hitting \"Execute\" the program will reslice the data sets and ROI's " "into a data structure that the volpack library can handle, and then perform " "some initial renderin gcalculations. For data sets, the interpolation type specified for the data set will " "be used. This whole process will take some time, so be patient. Please also " "note that, when converting the data set, the data is scaled between the " "current minimum and maximum threshold, with all data above the current " "maximum threshold set to the maximum threshold value (or zero, if " "specified), and all data below the current minimum threshold set to the " "minimum threshold value. This scaling can be relative to the data set's " "\"Global\" maximum and minimum, to the \"Per Frame\" maximum and minimum, or " "can be from maximum and minimum values \"Interpolated Between Frames\". " "\"Per slice\" scaling does not make sense in the context of volume " "rendering, and is interpreted as \"Global\" scaling." msgstr "" "Despues de pulsar \"Execute\" el programa convertirá los volúmenes y ROI's, " "al formato utilizado por Volpack y hará los cálculos iniciales de " "renderizado. Para los volúmenes se utilizará el tipo de interpolación especificado. Este procedimiento tarda algo " "de tiempo , luego sea paciente. Por favor note tambien,que al convertir los " "volámenes, los datos se escalan entre los límites mínimo y máximos " "establecidos, luego todos los datos mayores del valor máximo se igualaran al " "valor máximo y todos los valores por debajo del mínimo se igualaran al " "mínimo. Este escalado pude ser relativo al mínimo y máximo \"Global\", al " "mínimo y máximo \"Por Segmento de Tiempo(Frame)\" , o al mínimo y máximo " "\"Interpolado Entre Segmentos\". El escalado \"por Corte\" carece de sentido " "en el contexto de rederizado volumétrico, y sera interpretado como escaldo " "\"Global\"." #: ../C/amide.xml.translate:1654(para) msgid "" "When all this is completed, the rendering window should pop-up. Its use is " "described below." msgstr "" "Cuando se finaliza esto se despliega una ventana. Su uso se describe abajo." #: ../C/amide.xml.translate:1659(title) msgid "Rendering Window" msgstr "Ventana de Renderizado" #: ../C/amide.xml.translate:1661(title) msgid "Main Rendering Canvas" msgstr "Panel Principal de Renderizado" #: ../C/amide.xml.translate:1662(para) msgid "" "The result of the rendering process is presented on the canvas in the center " "of the window. This canvas can accept user input to change the orientation " "of the rendering. Button 1 allows rotating on the x and y axis, and button 2 " "allows rotating on the z axis." msgstr "" "El resultado del renderizado se representa en el centro de la ventana . Esta " "ventana permite la interacción con el usuario. El botón 1 permite rotar en " "el eje xy , y el botón 2 permite rotar en el eje z." #: ../C/amide.xml.translate:1672(title) msgid "Spin Sliders" msgstr "Barras de Giro" #: ../C/amide.xml.translate:1673(para) msgid "" "You should notice two slider type widgets, one on top of the rendered image, " "and one on the right side. These are both appropriately labeled with the " "axis around which the rendering will be spun if they are changed. " "Additionally you should notice a dial widget (labeled 'z'). The dial is for " "rotating on the z axis (which comes out of the plane of the display). Note " "that the effect of rotations are cumulative." msgstr "" "Existe dos barra de desplazamiento, una encima de la imagen renderizada, y " "otra en el lado derecho. Estas estan marcadas apropiadamente con el eje " "sobre el cual rota el volumen. Adicionalmente existe una rudecilla marcada " "con la 'z'. esta ruedecilla es para rotar sobre el eje z, que es el " "perpendicular a la imagen. Nótese que los efectos de rotación son " "acumulativos." #: ../C/amide.xml.translate:1684(title) msgid "Reset Axis" msgstr "" #: ../C/amide.xml.translate:1685(para) msgid "" "This button will reset the rendering's orientation back to the default " "orientation." msgstr "Este botón situará el volumen en su posición original." #: ../C/amide.xml.translate:1692(title) msgid "Toolbar" msgstr "Barra de Herramientas" #: ../C/amide.xml.translate:1694(title) msgid "Transfer Function Button" msgstr "Botón de Función de Transferencia" #: ../C/amide.xml.translate:1696(para) msgid "" "This will pop-up a dialog with a panel for each object being rendered. The " "available options are described below:" msgstr "Este desplegará un diálogo con las opciónes abajo descritas:" #: ../C/amide.xml.translate:1702(term) msgid "Return Type" msgstr "Tipo Retornado" #: ../C/amide.xml.translate:1703(para) msgid "" "This setting determines whether the rendering returns an image which looks " "more analogous to an x-ray (the \"opacity\" setting), or returns an image " "which looks more like a surface (the \"grayscale\" setting). The \"grayscale" "\" setting does this by specifying a light source, material properties, and " "using depth cueing." msgstr "" "Este determina si el renderizado sera mas análogo a una radiografía (the " "\"opacity\" setting), o mas pareciado a una superficie (the \"grayscale\" " "setting). El \"grayscale\" hace esto especificando la iluminación, el " "material y usa indicación de profundidad." #: ../C/amide.xml.translate:1711(term) msgid "Color Table" msgstr "Tabla de Color" #: ../C/amide.xml.translate:1712(para) msgid "The color table of each rendered object can be changed here." msgstr "Aquí se puede cambiar la tabla de color de cada volumen renderizado." #: ../C/amide.xml.translate:1718(term) msgid "Classification Functions" msgstr "Funciones de Clasificación" #: ../C/amide.xml.translate:1720(para) msgid "" "This is the most confusing part of rendering, so hang on here. The " "classification functions are used to map between the value in each voxel and " "how much that voxel should be represented in the final rendered image. On " "the x axis is the possible values of the different voxels. On the y-axis is " "the opacity that will be given a voxel based on its value." msgstr "" "Esta el la parte más confusa del renderizado. Las funciónes de clasificación " "se usan para la correspondencia entre el valor de cada voxel y su " "representación final en el renderizado. El el eje x son posibles valores de " "diferentes vóxeles. En ele eje y es la opacidad lo que otorgara el valor en " "función del valor del voxel." #: ../C/amide.xml.translate:1728(para) msgid "" "Both classification functions have several buttons on the right side of " "their graphs. The top button allows the classification function to be drawn " "as a spline. The second button allows the classification function to be " "drawn as a series of straight lines. Finally, the last button resets the " "classification function to a straight line." msgstr "" "Las funciónes de clasificación tiene varios botónes a la derecha de sus " "gráficas. El botón de arriba permite dibujar la función como segmentos " "curvos. El segundo permite dibujar la función como varias segmentos rectos. " "Finalmente el último dibuja de nuevo la linea recta inicial." #: ../C/amide.xml.translate:1736(para) msgid "There are two classification functions:" msgstr "Hay dos funciónes de clasificación:" #: ../C/amide.xml.translate:1742(para) msgid "" "Density Dependent: This function tells you how opaque " "each voxel will be based on its current value. In a sense, this is analogous " "to an x-ray, where the amount of the x-rays that are absorbed in a structure " "is related to the density of that structure. of the display." msgstr "" "Dependientes de la Densidad: Esta función dice cuan " "opaca es en fución del valor del voxel. De alguna manera , tiene analogía " "con los rayos X , donde la cantidad de rayos X absorbidos depende de la " "densidad de la estructura." #: ../C/amide.xml.translate:1749(para) msgid "" "Gradient Dependent: Instead of relating the density of " "a voxel to its opacity, this function relates the gradient of a voxel (how " "much the value changes between this voxel and its neighbors) to its opacity. " "This has the effect of giving added weight to surfaces." msgstr "" "Dependiente del Gradiente: En vez de relacionar la " "opacidad con la estructura, esta función depende la opacidad del gradiente " "entre vóxeles (es decir cuanto cambia el valor de un voxel con respectoa sus " "vecinos). Este tiene un efecto de realzar las superficies." #: ../C/amide.xml.translate:1764(title) msgid "Monoscopic/Stereoscopic Buttons" msgstr "Botón Monoscópico/Estereoscópico" #: ../C/amide.xml.translate:1765(para) msgid "" "You can choose between generating a single rendered image (monoscopic), or a " "stereoscopic image pair. A stereoscopic image pair is a pair of images that " "have been generated at slightly different angles. When viewed correctly, " "these two images can be interpreted by the viewer's eyes as a single image " "containing depth information." msgstr "" "Puede elegir entre renderizar una imagen única (monoscópica), o un par de " "imágenes esteroscópicas. Un par esteroscópico de imágenes es cuando se " "generar a un ángulo ligeramente diferente la una de la otra. Cuando se las " "mira de manera adecuada pueden ser percibidas por el observador como una " "imagen única tridimensional." #: ../C/amide.xml.translate:1774(title) msgid "Zoom" msgstr "" #: ../C/amide.xml.translate:1775(para) msgid "" "Determines the size at which the resultant rendered image will be displayed. " "Note that changing the zoom will not affect the speed of the rendering, and " "increasing the zoom past 1 will not increase the resolution of the rendered " "image." msgstr "" "Determina el tamaño de la imagen resultante renderizada. Nótese que el " "cambio de zoom no afecta a la velocidad de renderizado, e incrementando por " "encima de factor 1 de zoom tampoco se incrementara la resolución de imagen " "renderizada." #: ../C/amide.xml.translate:1786(title) msgid "Rendering Menus" msgstr "" #: ../C/amide.xml.translate:1787(title) msgid "File->Export Rendering" msgstr "" #: ../C/amide.xml.translate:1788(para) msgid "" "This menu item allows you to export the rendered image to an external image " "file. The saved data format is jpeg." msgstr "" "Este menú le permite exportar la imagen renderizada a un fichero con formato " "jpg." #: ../C/amide.xml.translate:1794(title) msgid "File->Create Movie" msgstr "" #: ../C/amide.xml.translate:1795(para) msgid "" "This causes the movie generation dialog box to pop up. This dialog box is " "further described below: ." msgstr "" "Este causa el desplige de la ventana de generación de video. Este diálogo se " "describe en mayor detalle abajo: ." #: ../C/amide.xml.translate:1802(title) msgid "Edit->Rendering Parameters" msgstr "" #: ../C/amide.xml.translate:1803(para) msgid "" "This causes the rendering parameters dialog box to pop up. This dialog box " "is described below: ." msgstr "" "Este despliega el diálogo del parámetros del renderizado. Este dialogo se " "describe abajo en: ." #: ../C/amide.xml.translate:1813(title) msgid "Rendering Parameters Dialog" msgstr "Diálogo de los Parámeters de Renderizado" #: ../C/amide.xml.translate:1815(title) msgid "Speed versus Quality" msgstr "Velocidad vs. Calidad" #: ../C/amide.xml.translate:1816(para) msgid "" "With this drop-down menu, the user can choose between rendering speed and " "rendering quality. To increase speed, voxels with values either close to " "zero or close to unity can be counted as completely translucent or " "completely opaque, respectively. The highest quality doesn't use this " "approximation at all, the lowest quality setting uses this approximation big-" "time." msgstr "" "Con este menúg desplegable el usuario puede elegir la velocidad y calidad " "del renderizado. Para incrementar la velocidad, los vóxeles cuyos valores " "sean el máximo y el mínimo, seran tratados como totalmente opacos o " "translúcidos respectivamente. La mayor calidad en cambio no usa esta " "aproximación, la menor calidad si." #: ../C/amide.xml.translate:1825(title) msgid "Stereosopic parameters" msgstr "Parámetros Estereoscópicos" #: ../C/amide.xml.translate:1827(para) msgid "" "These parameters are used for controlling the results when the \"stereoscopic" "\" option has been chosen." msgstr "" "Estos parámetros son usados para controlar el resultado cuando se ha elegido " "la opción \"estereoscópica\"." #: ../C/amide.xml.translate:1830(title) msgid "Stereo Angle" msgstr "" #: ../C/amide.xml.translate:1831(para) msgid "" "This is the angle offset (in degrees) between a pair of rendered images. " "Increasing this number will generally give a greater sensation of depth in " "the image pair. A Reasonable value for this parameter is between 2 and 5 " "degrees. Note that this parameter will be saved between different sessions " "of the program (not currently done on MS Windows)." msgstr "" "este es el angulo (en grados) entre el par de imágenes renderizadas. " "Incrementándolo dara mas sensación de profundidad. Un valor razonable para " "este parámetro es de 2 a 5 grados. Este valor se puede guardar entre " "diferentes sesiones." #: ../C/amide.xml.translate:1839(title) msgid "Eye Width (mm)" msgstr "" #: ../C/amide.xml.translate:1840(para) msgid "" "Ideally, this should be (roughly) the distance between the two rendered " "images, and corresponds to the distance between the user's eyes. It is " "impossible for a person to resolve a stereoscopic pair if the images are " "farther apart then the person's eyes, since human eyes cannot move " "independently. While this parameter is specified in millimeters, the " "actually distance between the pair of images that gets displayed on the " "monitor depends on the setup of the computer. If the monitor information " "reported by the operating system is not correct (usually the case), the " "\"eye width\" parameter will not be in true millimeters. Note that this " "parameter will be saved between different sessions of the program (not " "currently done on MS windows)." msgstr "" "Idealmente correspondería a la distancia entre los ojos del observador. " "Aunque este parámetro está especificado en miliímetros, la distancia real " "entre las dos imágenes depende de el ajuste de pantalla de cada ordenador. " "Si la información del monitor que tiene el sitema ioperativo (que " "normalmente es el caso), the \"eye width\" el parámetro no estara realmente " "en milímetros. este parámetro pude ser guardado entre sesiones." #: ../C/amide.xml.translate:1856(title) msgid "Depth Cueing" msgstr "Indicación de Profundidad(Depth Cueing)" #: ../C/amide.xml.translate:1858(para) msgid "" "These parameters are only used if the \"grayscale\" output type has been " "chosen." msgstr "" "Este parámetro sólo se usa cuando los resultados son \"en escala de grises\"." #: ../C/amide.xml.translate:1861(title) msgid "Enable/Disable Depth Cueing" msgstr "Permitir/Anular Depth Cueing" #: ../C/amide.xml.translate:1862(para) msgid "" "Specify whether or not we want depth cueing. Depth cueing puts in a \"fog\" " "that causes more distant voxels to appear less bright." msgstr "" "Especifica si queremos o no 'Depth cueing'. Depth cueing pone una \"niebla\" " "que ocasiona que los vóxeles mas distantes aparezcan menos brillantes." #: ../C/amide.xml.translate:1867(title) msgid "Front Factor" msgstr "Factor Frontal(Front Factor)" #: ../C/amide.xml.translate:1868(para) msgid "" "This is the transparency of the fog at the front of the data set. If this " "number is greater than 1.0, voxels toward the front of the data set will be " "brightened. If this parameter is less than 1.0, voxels toward the front of " "the data set will be darker, respectively." msgstr "" "Es la transparencia de la niebla que se halla por delante del volumen. Si es " "un número mayor que 1.0, los vóxeles de delante del volumen apareceran mas " "brillantes. Si fuera menor que 1.0, los vóxeles de delante del volumen " "apareceran mas obscuros." #: ../C/amide.xml.translate:1875(title) msgid "Density" msgstr "Densidad" #: ../C/amide.xml.translate:1877(para) msgid "" "This is how thick the \"fog\" is. The thicker the fog, the darker distant " "objects seem." msgstr "" "Es cuan gruesa el la \"niebla\" . A mayor grosor de niebla los vóxeles " "aparecen más obscuros." #: ../C/amide.xml.translate:1884(title) msgid "Rendering Movie Dialog" msgstr "Diálogo de Animación del Renderizado" #: ../C/amide.xml.translate:1886(title) msgid "Frames" msgstr "" #: ../C/amide.xml.translate:1887(para) msgid "" "How many frames should be in the MPEG1 movie. The MPEG1 movies generated " "will be set to run at 30 frames/second, so the default of 300 frames will " "give a ten second movie." msgstr "" "Cuantas imágenes debería haber en el video MPEG1 . Los MPEG1 se generan a 30 " "imágenes/segundo, así el valor por defecto, 300 imágenes dará un video de 10 " "segundos de duración." #: ../C/amide.xml.translate:1895(title) msgid "Rotations on [x,y,z]" msgstr "Rotatciones en [x,y,z]" #: ../C/amide.xml.translate:1896(para) msgid "" "This setting determines how many times the data set will be rotated around " "the given axis over the course of the movie. The rotation for each frame is " "done in x->y->z order (rotate on x first, then y, then z)." msgstr "" "Esto determina cuantas vueltas sobre un eje dado ocurrirán a lo largo del " "video. La rotación de cada eje sigue este orden x->y->z (rota primero " "x , luego y, y al final z)." #: ../C/amide.xml.translate:1904(title) msgid "Dynamic Movie: No/Over Time/Over Frames Smoothed/Over Gates" msgstr "Static/Over Time/Over Frames" #: ../C/amide.xml.translate:1906(para) msgid "" "This option allows a rendered movie to be made over a time period, which is " "useful for dynamic data sets." msgstr "" #: ../C/amide.xml.translate:1910(para) msgid "" "Note that every time a frame boundary in the data set is passed over, the " "rendering process must slice and load in a new frame of data. This makes " "creating a rendered movie over time significantly slower than a movie with " "just rotations." msgstr "" "Nótese que cada vez que se atraviesa un marco de tiempo del volumen, el " "proceso de renderizado debe de cargar y prepara otro marco de tiempo. Esto " "hace que crear un video de renderizado dinámico es significativamente mas " "lento que crear un video solo con rotaciones." #: ../C/amide.xml.translate:1916(para) msgid "" "Picking \"over time\" will allow entry of a start and end time for which the " "data from the data sets should be drawn. With the \"over time\" option, each " "second is given equal waiting in terms of how many images from that time " "period are generated for the output movie." msgstr "" "Esta opción permite la creación de un video de un estudio dinámico. " "Seleccionando \"over time\" le permitiría definir el tiempo de inicio y " "finalización dentro del volumen dinámico. Con la opción \"over time\", cada " "segundo es igual en terminos de cuantas imágenes de ese periodo de tiempo " "seran generadas para el video." #: ../C/amide.xml.translate:1922(para) msgid "" "Picking \"over frames\" allows entry of a start and end frame (note that " "this really only makes sense with a single data set). The advantage of " "\"over frames\", is that each frame is weighted equally in terms of how many " "images are generated for the output movie, so for data sets were the " "dynamics of interest correspond closely to the dynamics of the data set " "framing sequence, \"over frames\" may give a more appealing result." msgstr "" "Seleccionando \"over frames\" permite la la entrada de la primera y última " "imagen (esto sólo tiene sentido cuando se trata de un volumen único). La " "ventaja de la opción \"over frames\", es que cada marco de tiempo repercute " "por igual en el video final, asi cuando la dinámica de interés corresponden " "a la dinámica de la secuencia del marcos de tiempo del volumen, dando un " "resultado mas atractivo." #: ../C/amide.xml.translate:1931(para) msgid "" "The \"over frames smoothed\" option is almost the same as \"over frames\", " "except that data will be interpolated between frames. This makes for a " "smoother movie (no jumps) but takes much longer as nearly every movie frame " "has to be reloaded." msgstr "" #: ../C/amide.xml.translate:1948(title) msgid "Additional Tools" msgstr "Herramientas Adicionales" #: ../C/amide.xml.translate:1950(title) msgid "Alignment Wizard" msgstr "Herramienta de Alineamiento(Alignment Wizard)" #: ../C/amide.xml.translate:1952(para) msgid "" "In addition to manually aligning data sets (described at ), data sets can also be aligned using the alignment " "wizard. The process is basically:" msgstr "" "En adición al alineamiento manual (descrito en ), los volúmenes tambien pueden alinearse con el " "\"alignement wizard\". El proceso es básicamente:" #: ../C/amide.xml.translate:1958(para) msgid "" "Draw at least three pairs of fiducial makers between the two data sets that " "you wish to align. Drawing fiducial markers is described below as ." msgstr "" "Dibujar al menos 3 pares de puntos fiduciales en los volúmenes que desee " "alinear. El dibujo de puntos fiduciales se describe debajo como ." #: ../C/amide.xml.translate:1965(para) msgid "" "Run the alignment wizard (under tools->alignment wizard). For the " "alignment wizard to recognize two fiducial markers as a pair, they must have " "exactly the same name. So if you have a marker labeled \"1\" under the first " "data set, you will need another marker, also labeled \"1\", under the second " "data set." msgstr "" "Corra el \"alignment wizard\" (bajo tools->alignment wizard). para que el " "\"alignment wizard\" reconozca 2 marcadores fiduciales como par, deben de " "tener exactamente el mismo nombre. Así si tiene un marcador llamado \"1\" en " "el primer volumen, tendrá que tener un marcador, también llamado \"1\", en " "el segundo volumen." #: ../C/amide.xml.translate:1976(title) msgid "Drawing Fiducial Markers" msgstr "Dibujando Marcadores Fiduciales" #: ../C/amide.xml.translate:1977(para) msgid "" "Fiducial markers can be added to any of the data sets in the study in a " "variety of ways. For the currently active data set, hitting the \"Edit->" "Add fiducial mark\" menu item will drop a fiducial maker at the currently " "viewed location. Fiducial marks can be added for the active data set " "directly from the views by pressing ctrl-right mouse button, which will drop " "a fiducial marker at the point that the mouse is currently at. Finally, " "fiducial markers can be added to non-active data sets by pressing ctrl-right " "mouse button while hovering over a data set's name in the study list." msgstr "" "Se pueden añadir marcadores fiduciales de varias maneras. Para el volumen " "activo, seleccionar el item del menu \"Edit->Add fiducial mark\" y " "añadirá una marca fiducial en la vista seleccionada. Las marcas fiduciales " "se pueden añadir directamente a la vista activa pulsando CTRL+botón 3 del " "raton, que dispondrá una marca fiducial en el lugar que apunte el ratón. " "Finalmente, los marcadores fiduciales se pueden añadir a volúmenes inactivos " "pulsando CTRL+botón 3 del ratón mientras se selecciona el volumen de la " "lista del estudio." #: ../C/amide.xml.translate:1988(para) msgid "" "After being created, the fiducial marker can be moved by clicking on the " "marker point shown in any of the views." msgstr "" "Después de crear, el marcador fiducial puede ser movido pulsando el punto de " "marcaje en cualquiera de las tres vistas." #: ../C/amide.xml.translate:1993(title) msgid "Fiducial Marker Modification Dialog Box" msgstr "Caja de Diálogo de Modificación de Marcadores Fiduciales" #: ../C/amide.xml.translate:1994(para) msgid "" "To modify parameters of a fiducial mark, right click the point in the study " "list to pop-up the Fiducial Marker Modification Dialog. From this dialog, " "the name and location of the fiducial marker can be altered." msgstr "" "Para modificar los parámetros de una marca fiducial, pulse el botón 3 en la " "lista del estudio para desplegar la Caja de Diálogo de Modificación de " "Marcadores Fiduciales. Desde este diálogo, se pueden modificar el nombre y " "localización del marcador fiducial." #: ../C/amide.xml.translate:2006(title) msgid "Crop Wizard" msgstr "Herramienta de Recorte(Crop Wizard)" #: ../C/amide.xml.translate:2008(para) msgid "" "Coming soon. Note that only what is strictly inside the cursor lines is " "saved. What's underneath and outside the cursor lines is cropped away." msgstr "" "Permite recortar los volúmenes quitando de ellos las partes carentes de " "interés. Se abrirá un diálogo con el MIP del plano axial, existiendo unos " "modificadores de dimensión que dibujarán una caja en el MIP, una vez " "seleccionado pulsar Next y aparecerá el MIP coronal, ajustarlo y pulsar Next " "de nuevo aparecerá el MIP sagital, recortando así, el volumen desde los 2 " "planos." #: ../C/amide.xml.translate:2014(title) msgid "Factor Analysis Wizard" msgstr "" #: ../C/amide.xml.translate:2015(para) msgid "" "The factor analysis wizard is currently being developed. It probably won't " "work for you, and is only included in AMIDE for those who might be " "interested in working on it (rather than with it)." msgstr "" #: ../C/amide.xml.translate:2022(title) msgid "Filter Wizard" msgstr "Herramienta de Filtrado" #: ../C/amide.xml.translate:2023(para) ../C/amide.xml.translate:2028(para) #, fuzzy msgid "Nothing written yet..." msgstr "" "#-#-#-#-# es.po (PACKAGE VERSION) #-#-#-#-#\n" "Permite aplicar filtros de Mediana lineal y 3D, y Gaussiano al volumen " "activo.\n" "#-#-#-#-# es.po (PACKAGE VERSION) #-#-#-#-#\n" "Crea un video de los cortes extraidos e cualquiera de los planos, axial, " "coronal o sagital, determinando el corte de inicio y el corte final." #: ../C/amide.xml.translate:2027(title) msgid "Fly Through Wizard" msgstr "Creación de video en una Orientación(Fly Through Wizard)" #: ../C/amide.xml.translate:2029(para) msgid "" "Note, will generally get much better results for fly through if using " "trilinear interpolation." msgstr "Nota, los resultados son mejores si se usa interpolación trilineal." #: ../C/amide.xml.translate:2034(title) msgid "Profile Tool" msgstr "" #: ../C/amide.xml.translate:2035(para) msgid "A complete description of this tool has not yet been written." msgstr "" #: ../C/amide.xml.translate:2037(para) msgid "" "The left and right limits of the gaussian fit can be altered by clicking on " "the profile with the left and right mouse buttons, respectively. The x value " "used for initializing the gaussian fit can be picked by clicking on the " "profile with the middle mouse button." msgstr "" #: ../C/amide.xml.translate:2046(title) msgid "ROI Statistics" msgstr "ROI Estadísticas" #: ../C/amide.xml.translate:2047(para) msgid "" "A description of the ROI statistics tool can be found at: ." msgstr "" "La descripción de la estadísticas del ROI en: ." #: ../C/legal.xml:2(para) msgid "" "Permission is granted to copy, distribute and/or modify this document under " "the terms of the GNU Free Documentation License, " "Version 1.1 or any later version published by the Free Software Foundation " "with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. " "You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to the " "below address." msgstr "" "Se garantiza la copia, distribución y/o modificación de este documento bajo " "los términos de la Licencia de Documentación GNU, Versión 1.1 o posterior " "publicado por la Free Software Foundation Puede obtener una copia de GNU " "Free Documentation License de Free Software Foundation visitando su sitio web o escribiendo a la " "dirección abajo indicada." #: ../C/legal.xml:13(para) msgid "" "This program is free software; you can redistribute it and/or modify it " "under the terms of the GNU General Public License as published by the Free " "Software Foundation; either version 2 of the License, or (at your option) " "any later version." msgstr "" "Este programa es software libre; puede distribuirlo y/o modificarlo bajo los " "términos GNU General Public License publicada por el Free Software " "Foundation; o version 2 de la Licencia, o (bajo su criterio) cualquier " "versión posterior." #: ../C/legal.xml:18(para) msgid "" "This program is distributed in the hope that it will be useful, but WITHOUT " "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or " "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for " "more details." msgstr "" "Este programa se distribuye con la esperanza de ser útil, pero SIN NINGUNA " "GARANTIA, sin incluso ninguna garantía MERCANTIL implícita o sin garantizar " "la CONVENIENCIA PARA UN PROPÓSITO PARTICULAR. Véase la Licencia Pública " "General de GNU para más detalles." #: ../C/legal.xml:23(para) msgid "" "You should have received a copy of the GNU General Public License along with " "this program; if not, write to:
The Free Software Foundation, " "Inc., 59 Temple Place - Suite 330, Boston, " "MA02111-1307, USA" msgstr "" "Debería haber recibido una copia de la Licencia Pública General junto con " "este programa. Si no ha sido así, escriba a la Free Software Foundation, " "
The Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA02111-" "1307, USA
" #: ../C/legal.xml:35(para) msgid "" "For more details see the file COPYING in the source distribution of AMIDE." msgstr "Para más detalles vea la copia distribuida con uAMIDE" #. Put one translator per line, in the form of NAME , YEAR1, YEAR2. #: C/amide.xml:0(None) msgid "translator-credits" msgstr "" "Pablo Sau , 2002" amide-1.0.5/help/es/figures/0000775000175000017500000000000007672431371015463 5ustar loeningloeningamide-1.0.5/help/es/figures/amide_main_window.png0000664000175000017500000017570707671752736021676 0ustar loeningloening‰PNG  IHDRôD^~[¨bKGDÿÿÿ ½§“ pHYs."."ªâÝ’tIMEÓ &R¿Ô$ IDATxœìw@×ÖÀïÌl¯”¥J¤ŠRDT‚ ±Ç“ÅhŒ1úib5y)ÆŸ1XbÆ RTš¨ ˆ…€ÂÒ;Ëö:3ßc6•X€…¼ý…àîÝ»÷žvÎÜ9÷ÇqðÚH¥Ò;wî@A@£ÑTVKètæKó’ô‚н6Jw˜t¡ ússs{{û>™I=zž©WFÉËË333Óh4G­VÃ0|òÜ}I¥" % C@®@»ö76¢¶w(‰Çt¢RclY,Q³˜…Rƒa8Šâ$Ã@­ÆÄ5A@Oþ#Z´ ]žÀ_—­'ÏŸ¼Jü=õ) øoÖíå¿=ìv]€´¯âÀË ãp(B¡L&TVVZXXÐéôç==zôèéuzG¹„Bá·ß~;{öì„„„={ötv 1 13–òkÔÆÙµ´ãjµŠN#wtªèTÌÆ‚‡£*‘¥qR[™â˜D*Ájø¥£†—Þ¯75å¡ ãJ.‹®Rá$^]'ûóÆ‚ @<† ¿ô<Aü§–…†áü©õ» UñÐß_F¸k7í¦ÝŸ(ô®ïÖÃiwµ†ÖÑ!9|ø0Š¢k×®500hmmµ±±yÅ#«G=/O¯)wKKËåË—=zt×®]d2Y*)”•KeXKkÇÈá×oÕ˜óLÚZÛí†Y‹%b#\ÐÑdfa0ЉT*T"‘·w(ZÚı™Fjµr¨­añ½&‘&•ÕâÎΉü§v×*wˆPëÄc‚@„ú…´Êý¯eúÔŸ‰.ë}¿® €b[c]žBO-ûI^p4‹Å"“ÉQ©T©×²=zô¼ ½£w "“ÉžžžcÆŒ¡R©2™ S‹¦ªo¨<,WW76·•Je§P&“I¤2Áj5ÚÜÜ¡Pj ¸ ‰D©Rã6CØåå*•€‰TQRúØ€K»}GbkeˆkD(ÿ©ÃŸ,Û„‚ CiÐ'*ˆ•û_ÿïºV'‘má€Ðhþf{Áÿ®Üµ›Ä?¤¿/óUüÉƱ°°ß¾};™Lf³ÙÍÍͽrõèÑ£çÅéå®R©š››ét: á(:u’ öwå8Ò…€ €öÔOZl‡üÙBPÉжúù­O–åO–âà/­ÜuúÛ?àé÷ß ç8Ž?ý-ðßÞÜ}ïòËØ€,‰ R«Õ---íííçéõèÑ£§ïèåÎ`0 —ËÕ¶DÏê•‘;R©”ÍfëZ =zôüÏÿs=zôèÑ3ØÐ+w=zôèù2P”;Žã¥¥¥µZýÌO· ‚ÆÆÆ²²²¦¦&>Ÿ¢hyy¹R©|ðàaohhhkk“Ëå---¯#›~GT=ƒŽá¥'—ËÓÓÓ[ZZ¤R©P(ôññ¹wïž··÷ãdž …ÂÎÎÎÉ“'3™Ì””µZM¡Pp700ÉdT*õêÕ«0 »¸¸Ü¿ßÕÕ5..ŽN§+•J‰Dâëë+‹MMM«ªª¤R)†a4­µµÕØØØÅÅPZZÊápîÞ½khhˆ ˆT*µ¶¶®««ãr¹‰„N§755…‡‡ëú éÑ£GÏK0 Vîííí­­­B¡0;;[,‹Åâ[·n …Bccã¼¼¼û÷ï·´´˜™™ã ­­­555T*U¥RÙÙÙÕ××S(E©TªT*}øðammmmm- ÃõõõJ¥’B¡¤¥¥•••Û¿r¹\,„B!‰D’H$b±¸¤¤Çñªª* à ëêêêëëõ;¢zôèt@½’[&''ÇÄĤ«·ÌË"“É`V«Õ$‰L&+•J*•Šã8±HW( AA”Ê'y Ñh4†F£)•J&“)•J †D"¡Ñh0 «T*FC¥Rår9‹ÅÂ0L¥RÑh4…BA£Ñ&&&J¥Çq†5J¥jmm¥R© ÃÐÐP.—“H$Ç_9y€T*‰D<O¡ªGžþd (÷+zå®G0 Ì2z^œ¶¶¶‹/¾ÿþû>>>_|ñ…®ÅÑ£GÏe@l¨êé™ÖÖÖüüü´´´¬¬¬h‡|||t+˜=z,ú•û¥££ãüùó6lðôô´±±™1cÆwß}WRRòÐßxüøqDD„•••§§ç‰'žÙ§©©‰ðãhoooooìÝ»÷‡~è yôÊ}!bbb¼½½MMM###¿ýöÛ¢¢"…B¡kÑt F³±±AQ411‘Á`ØØØH¤ÄÄÄÎÎÎW0%%¥¾¾¾‡­­­‰‰‰]w¤._¾ 077©dA„À …"11ÑÀÀÀÆÆ†ØÏï™öööÄÄD¬{U—ÃÊÊÊÆÆÆÆÆ¦¾¾þÒ¥Kº](Ѝ¨(GGÇÔÔT__ß™3g …²²²ÜÜ\€©©©Á?BÀd2mll¤Ribb¢±±±Z­NLL”J¥Ú> ÅÆÆ†»«¸ÚÚÚÔÔÔÞúP]Y³fX,¾téÒÚµkW®\yûöí§ûL›6í¿ÿý/`Æ 111gddÔòèÍ2:¦¥¥%///+++--íEt]ùã?Nž<ÙG‚éssó)S¦<Ýîìì|àÀ‹/&%%}øá‡îîî„ZÿöÛo/\¸àêêšœœ¬R©ÞxãI“&ååå>|xáÂ…ÅÅÅ“'O>~ü8F[°`Á•+W,--: 8wîܺuëx<ÞŋϞ=»qãÆæææÙ³g=zT;uMMÍܹsKKK‰–üü|‹¥T*ýýý=<ýøñãþþþvvvgΜ;v¬««ëÑ£G'Nœ˜””D¥R_G‰DÒØØ8iÒ$77·;wr¹\F£}µ  †aÇ·lÙrèÐ!&“¹ÿþ%K–:tèã?Öh4[·nýàƒˆÜ«žžžžžž±±±W¯^ýä“O† òèÑ#À®]»NŸ>íëë› ‰®\¹¢ÑhÊËË,XPRR2a„ß~û˜N£Ñ,_¾œÍföÙgÓ¦M=zô/¿üâì윞žÎår7mÚtäÈ÷ÝwßEDD|óÍ7Ÿ|ò‰\._ºté÷ߟŸŸ¿|ùòŠŠŠñãÇÇÅÅYYYc–——/Z´ÈÍÍmÔ¨Q„ÿ^ggçâÅ‹SRRFŒ›——÷èÑ£ï¾ûŽF£]¾|‚ K—.ݽ{—¸ªM›6ÍÞÞ>>>žË妤¤8;;oÛ¶í›o¾‰ŠŠJIIùý÷ßýüü^ê€ë•».ùé§Ÿâââ233_mvåÊ•+W®ôºT:$((è™ÊýyØÙÙݼysüøñ©©©ãÇÏÏÏwuuݵk׆ ¬­­/\¸ðÆoìܹÓÛÛ;??ÿîÝ»W®\9uê¡Üi4Ú;wüýýããã7mÚ´bÅŠ7.\¸pÒ¤I‡vss#¦Ø´i“ɬ¨¨xûí·‰>ŸßÞÞŽaX~~þ¤I“JJJÆŒ“””dbbò믿fee]ºt©±±EÑ牭R©V­ZºeË–°°°}ûö-X°àã?þå—_lll‚‚‚yù"‘hþüùžžžŸ}öàã?–J¥•••»wï^³fMNNΪU«f̘±yóæÐÐÐýû÷öÙg·oß7nÜÍ›7=<<&L˜=nܸ’’’×Üã144ŒŠŠZ¶lÙ‡~èéé9{öì®+Öššš¡C‡Þ¼yóÀW¯^---ݸqãèÑ£cbbNž<Éårg̘8nܸ¦5jÔºuë&L˜pãÆ ccã²²2E?úè# ‹ÄÄÄÈÈÈÿüç?#GŽÄqüÃ?,--%LCùùùÓ¦M+..öööNMM¥Ñh„"NMM}óÍ7ÇŽ»mÛ¶Ý»w‡††®\¹²¼¼ü³Ï>³··¿zõêÖ­[“““W¯^M̾fÍšO>ùäèÑ£S¦Lqppؽ{weeeUUÕ¶mÛV¯^}àÀ ¬X±";;A©S§;vŒ¸5/**233#–¿ýö[xxøþýûÏŸ?ßÐЫR©^ö€ë•».Y¹råÊ•+«««322²³³³²²ª««{P Ý Y±bEŸJØÏ˜šš¾TÿY³f9ÒÈÈHk¹Ú²eËðáÃ###­¬¬6lØ nݺµjÕ*Aüüü&Nœ¸jÕ*¢ghh¨ƒƒƒB¡¨¨¨ …«W¯¶°° ÊÏÏ×*÷ìììýû÷2dΜ9YYYÝ ³··766–Ëå£Göññár¹Ÿ|òIb·µµUWW¯\¹ÒÆÆ&,,,??ßÅÅÅÄÄdöìÙ‚¸ººæççûúú¾Ô¡x&†­[·®££#%%…B¡ /^lcc³`Á‚ãÇ×ÕÕÕÔÔ¬ZµÊÆÆ&444??Ÿx£¿¿ÿ¨Q£îîî€WP.Ý@ääɓ۷o¿sçNZZÚÒ¥Ky<^·>%%%ÖÖÖãÇ;vldddvv¶Z­>qâ…BÁ0¬   gåaooODÆh‹‹‹7lØ0dÈôôtÇ[[[¿þúë7ß|ÓÐиœ9s¦££#—Ë•ËåwïÞ… h÷îÝ"‘H ðù|ÿíÛ·ÇÅÅÍœ9ÓÎÎ.00pûöí~~~S§NúhñâŹ¹¹ü1Š¢ùùùR©tãÆÕÕÕ>T*•‚Ðh4F¡P`&þ(Z¦M›6dÈ[[[¹\~çÎ ‹éÓ§«Tª5kÖ¼Â×+÷@¥R©T*‹¥mioo766îÅ)lmm—-[¶lÙ2@uuunnnZZZNNNeeeÏotpp˜3gN/J2耞ª‰E„13Œ… ¶µµ5ʯ^½Z[[ûÓO?EEE …Ânïb³Ù577[XX477ko´†††„u¾µµµgètº@ ÀqœØ(ë*•J¥R‰Ý¿¦¦&ƒÁáp¤R©D"a±X­­­LæË—6ß}÷Ý… ®\¹bffF´p8í¼t:Á`P(”¦¦&ww÷¦¦¦Þš÷™ÔÖÖFGGïß¿?::zÞ¼y555Ýú°X,‰D¢V«›ššŽ92zôh‰´yóf.—»xñbâzó²°X,@HNN&¾L&sÏž=ï¿ÿþ[o½5tèÐný™L¦©©éŽ;T*ÑáóÏ?Ç0,55uÏž=Ó§OŸ:ujAAÁ¾}û„Ba||<@©T¾ñÆÑÑÑ‹-ŠŒŒ|øðauu5ƒÁ5jÔŽ;ÄbqGGÇ?Þn_'™L¦T*;::^áSƒrÏÉÉ)++³²²²¶¶f±X„.¶¶¶æóù\.W¥RuvvzxxÉä—Y&“ÅÅÅMš4éêÕ«Ó§O·oßž={¶T*mll400àp8Ú3çõ±µµµµµŽŽÆ0¬®®.;;;;;;33ó•ÝBþ7!*>J$’sçÎmÙ²¥²²ò½÷Þ[²dIGGÇ37Ù‚ƒƒ.\èåå•‘‘Aä/"^zçw>üðÃêêêÄÄÄž'9sæîÝ»,XððáÞ{Ïž={íÚµAAAñññ'Ož æñx³fÍb2™ …bÖ¬Y|>ÿU?ý_|úé§2™, €xúû￯Zµêí·ß‹Å/^\´h‘¥¥åìٳ׬Yôûï¿ÿòË/¯?éó°°° R©sçΈˆxôè‘T*6mÚO?ýÔµOHHÈÆçÍ›×ÔÔD¨u[[ÛÝ»weggß¼yóæ]´hÑçŸ^__êÔ)b:&“ùÎ;ïœ={6&&æiǧٳgÿç?ÿùâ‹/¤RiBB”)SÆŒcmmã¸Í¶mÛÊÊÊBBBd2±­ R©ŽŽŽëÖ­ËÉÉ‹ÅYYY›7oË—/ÿᇲ³³}||f̘A§ÓÏž=»`Á–™™YXXø<±ƒƒƒqŸ7oÞ+{ úÕ¬¬¬ÚÚZww÷sçÎ 2$00P¥Rµ´´…BµZmkkK&“=<<^aäìììÒÒRKKK‰DÒÐÐàíímhhhaaqèСˆˆ ÃD"Qee¥››[wн¡Šãxuu5¡è³²²ªªªÓÍÛo¿ýý÷ß¿ò°ƒŽæææ‚‚‚‰'r8µZ––æççg``píÚ5GGGcc㌌ŒÀÀ@&“©ÑhÎ;÷ðáC__ß)S¦à8žššZPPÀd2çÍ›gee•žžîææfiiyëÖ-CCCggg‰Dò믿677O›6ÍÇǧ­­-///,, ð„„„‡ …©S§æææš™™ :4%%Å×××ÈÈ(33sèСfff™™™·oßvrrZ°`ÁãÇ»® ŠŠŠ&MšÄ`0 …âôéÓÄ-@@A¿ýö›R©œ;w®ƒƒCGGÇÍ›7§OŸþô¥èÅIKKëê!Cxa]¹råæÍ›öööóçÏ'“É …">>¾ºº: Àßß‚ Ë—/{zzš™™%%%;ÖÐÐPûI_çÏËå.\øã?ŒŒŒÂÃÃmmmÿøãŽŽ__ß›7o;99=~üø÷ßg±X .444lllŒ‹‹Ã0lîܹ¶¶¶]G«««+)) ¢ÑhR©433“8¼)))4íúõëS§N…a8!!¡´´ÔÏÏ/((¨¡¡ááÇÁÁÁ|>ÿÁƒãÇÏÍÍíúE²¶¶.--½xñ¢¡¡á‚ ?~œ •J}}}ƒƒƒÅbñ™3gø|>q µ¾O&--­°°F£M™2eôèÑ8Žgddäää8;;GFFR(”üüüË—/¯]»V*•ž:uê7Þ Ò^92==ÝÕÕuÈ!yyy\.×ÞÞ>///33ÓÇÇ'$$$++Ëßßÿ¥Žö WîÀÐÐÇñ{÷î1 KKËGÙØØTVVššš2 ¥Rijjú gHkk«¡¡!±{fccÓÜÜìèèXQQÁ`0Pe³Ù‚ˆÅb‹eiiù¼Aú"ý@mmmFFFff¦››Û¦M›zkX=¯Éµk×f̘SXXØÔÔ”——×Í¢ªGÏ‹SVVæéé¹råʶ¶¶œœœÒÒÒw%ôÊ}€£Ï-ó?Eiié­[·¸\nhhh×}=z^ÇgeeQ©ÔWØçô6w=z#GŽ9r¤®¥Ðó/ÁÁÁÁÁÁá•ß>”;†a¯§×3‚@„ãø‹û ¾È€½2”=}JTTÔðáÃwîÜ©kA^…eË–µ´´üüóÏæææº–e 2”;‘u½wÇäóù8Ž …B†y<žH$"ÜÂ^m@¡PHÄï©T*Ç_*<]]‘˜˜øÊžvºE$ÅÇÇÓétý¹ö<úJ¹ ‡# »î°«Õêúúz2™L”ÂèÖ_Ûòøñcm ‰DºYØ™\&*`22¤kPŒN#©Õ˜J¢(î9Êâý·_.⣽½½©©éÑ£GÚ»‰‰‰B¡ Óé4­¥¥…ËåŠD"A:::x<žB¡èaÃp]]]aaá”)S´åDôèÑÓG$''+ŠE‹ÞGzž¦¯”ûÏ?ÿûÁ´¶¶’H$A¬­­¯\¹B„KŒ9²©©‰J¥R(‘AaÆUUUŽ=Z.—k£¿,ÌX^£-¯dVøÙæßiðo++üÑÊåP^ÚC ÇqÇGŒ¡P(ººÀaóçÏ¿v튢(Š>~üØÊÊJ­VÏž=ûyK{Çñññ‘Éd½8®Gžçñ믿ôÅ{ ¯²BÞ¾}›F£uttÔÕÕݽ{·¥¥…Á`xyyùøøXZZvvv’ÉäÂÂÂŽŽŽÖÖÖ¦¦&CCÃŠŠ ssóÆÆÆŽŽŽ®d©LÍ “ @‰•"±òF^͵œ*&ƒ,•©•Ê—¶•k4¢r^·U¶‘‘‘D"ÁqœÐÚÚ†áaÆYYYÙÛÛ÷`ú×gë38ꡌD…w=½ŽH$ÊÈÈ066ž:uª®e¸ôÕÊÝÏÏÇãµ¶¶BD£ÑFŒA¨QÂ#PÜA†a eÔ¨Ql6ÛÚÚ:+++::Z(vM3¢Tjªj:YL*CM-:įº»™ÕÕ  ŠPüÒú”L&óùüÆÆÆñãÇwÝGµ°°5jT{{;AóæÍ+++svv¦Ñh7nÜè!S+•J‹ÅwîÜ™5k–Þ,£G­VWVV œu-Ë¿ .H$’9sæè# z`ø¹···[[Û¢èsWÍ0 ‘H/w R^^Îf³5 QM›Çã …B÷"‰¶Ÿ'¤B¡À0 EQ2™¬ÝäÑû¹ÿorïÞ½‘#G ð´ c„ iiiºä刌Œ<þü¥K—ÂÂÂt-ËÀexËp¹\à21½,Ä6/™L¦Óé„ÍÃáH$’§ë¶¼8Úl×úÕ„'''++«¬¬,‘H¤wçè]Ajjª‘‘‘Þ&Ó3ƒ@¹“H$"—[ŸAÐkÖ"УG …B™>}ú‘#G’’’,X kqþU$%%Éd²ÈÈÈWÈø?Å PîD¢Ç¾ŸN§#‚a˜L&ë• Æë${Òóï€PîÙÙÙzåÞ»œ;w°dÉ] 2ÐÊ]"‘ôºÁº¢¢bÈ!8Žwvv '‹y<Þ+/Þ;::´AL‰D'®',,ŒL&Ÿ;wî믿~å½=Ý …IIIÆÆÆ&Lе,>Tî†D"¡( A±’U«Õ(Švvv> ÔÒÒB¸Çh4‘HD"‘( qJÀ0Ìf³U*aË&2dªÕj‰Dø&Bô²®åT*õþýû………]7d˜L&™L†a†aµZ Š¢‚h42™¬V«{0¦Ëåòòòò”””•+W¾”$zþ­P(”©S§&%%Ý»wÏÛÛ[×âüK¸|ù²J¥ '\™õô@*÷­[·Î;—p+¤ÓémmmÇŽ›4iRyy¹\.§P(b±ØÒÒÒØØ¸¼¼ÜÜÜ\*•B¤R©š››‰4ÍÄPååå|>†a++«æææ;wî888H¥Rccc‚H$Ò¤I“^J6E ÆäÉ“…Ba×ì}.\ ÂÞ._¾ÜÖÖf`` ÌÌ̪««íì삃ƒŸ·´'çßxã @ ™ÓC””tùòe½rï-N:ø/@ö‚ô¡iØÛÛûîÝ»l6`aaannN¥R---ËÊʪªªD"©¬¬411Á0¬¢¢¢½½ýÞ½{Ý’`F§ÓÅb1ñ@¥RJAA^ÍÀM¤è¶'n5”J%™LÆ0ŒøM£Ñ´3>lj҈vW6%%eâĉ---Ú–Ý»wE“»QUU5qâͶ¶óâÅ‹sçÎí:ŤI“ˆ"vÍÍÍ9996løñÇ_Pȉ'öiž¸þ$**ŠD"?^ׂüK …×®]366 |ýÑ=z4± ëׯý1»’íééI§ÓãââžîP]]Ýí”|ååå/Ò­}¸rŸ>}:a?áñxZøàà`.—K"‘fÍšeee•ŸŸÏãñH$‘ÌØØ†a??¿ÚÚÚ®fk'''©TÈápòòò6nÜøðáCooo¡PAÐ+lš#ÒÔÔTSS3vìØ®AL#FŒ044T(VVV¾¾¾µµµ•••k×®½ÿ~Š›L&‹ÅbÂÎ30ƒ˜š››¯_¿ÞU6ggç®nH‰†aƒ!“É®_¿Nd@#lkI¥REµ•J¥P(š››oß¾­ÁÝÝýÖ­[ééé………Úb&b±‚ Lœ8Q›SS.—k4be@<&¸Aáojmmmoo÷îÝšš} ÃësñâE™L¶`Á‚^±ÉH¥ÒëׯGEE999.‘•8ŽËårâDP*•l6[{š¨Õj™LF“ËåZµÖíì (ºdÉ’ÄÄÄ .,]ºtüøñ¶¶¶F,cÊårí)©T*år9‡Ã!–ªDNC*•J|Ò Ì›7ïƒ> z2tµEK¥RƒÑ-m®Ü¹\.‘³ÍÚÚZû±‰Ç1€[² IDAT cèСd2ÙÏÏÏÙÙÙÁÁÃáp8+++CCCwww­ÊV«ÕmmmÖÖÖjµº½½}ذa(вX,&“I¡PZ^‰DbffæååÕµ>a[[‡Ã!Vîfff*•ÊÌÌL¡PXZZŠÅb›$¬1'NüÇâȇœœœÜÜ\À„ ˆâsvvvÚ¢Ž8ŽoÞ¼9,,L"‘|÷ÝwVVVëׯÇ0ìîÝ»®®®Çï: ¥¥¥ŸŸßåË—ÉÉÉÓ§Og±XiiiwîÜlÛ¶ÍÒÒÒÒÒrÏž=?vvv.))9s挓“SeeåÁƒ§L™R__üøqÇß|óÍÈÈH ¢Êevv¶££ãŒ3^­¼N CQ455Uׂü ¾ ½›O&**jÇŽ;vìXºti^^ž££ãš5kV­ZuòäIkkkSSSŸ¦¦¦‹/º»»Oš4ÉÔÔtÕªU#GŽ433ûüóÏÚ³ãÝwßÕÞt¢(ÚÐÐ0lØ0SSÓuëÖ}÷Ýw4íÑ£GDýÂ1cÆüñÇZ®_¿îììlffÜÞÞ®T*çÌ™cnnnkkûÛo¿›Í®¯¯·´´ÔÖ þá‡NŸ>}äÈ‘ÎÎÎ-[¶ÄÆÆÞºuë§Ÿ~JMM}çwÆŒÓÒÒòtݯ¹sç^¾|Y&“]»v-** ÐÖÖ& ÷ïßõêÕ„„„;v…BF“•••‘‘Q__Ÿ———ššjoo¯V« mmmåååaaaÄ%dÓ¦M¡¡¡%%%•••O,o¼ñ`Ð…€@´6™ÐÐÐ^6""‚ˆ¤9vì˜\.ôè‘ÝG}”’’òÿ÷ÍÍÍUUUéé鉤¢¢â§Ÿ~Ú¶mÛo¿ý–””sâĉÚÚZâìÈËË;zôhJJ 1,™Lމ‰Ù¾}»±±±¿¿¿X,622Úºu«@ °²²Ú¼y3ÑðuëÖ½ñÆÍÍÍ---{÷î=wî\ffæ£G¶nݺ}ûöU«V¹ººnÚ´iĈï¼óNXXX{{;‹Å"²ðóùüŠŠŠ3gÎ<í‘5\!õô&L`2™–––Ú‚½{÷Ž9ÒÒÒòÚµk*•êË/¿¤R©(ŠߺuëìÙ³L&344´´´´ë8ëׯU©T]‹‹‹[¶laðû÷ï߸q£¢¢bñâÅ7oÞ¼}ûv7Óü˜1cX,–­­-ñÞ’’’;w§Êë÷3>>></55U¡Pè"_"ŸÌìÙ³{7ëê§Ÿ~J¸>|8±šŽ‰‰¡ÑhóçÏÿñÇ9"•J ã$“Étqq±±±1446l˜µµµF£yðàA·³ƒ¸ö@ôÅ_ÄÄÄgffnÛ¶ÍÌ̬¸¸ðY³fUUUi —+•Ê7ÄmmmEEET*ÕÍÍÍÊÊê½÷Þ[·nÖ†A¸ä>|˜Íf‡„„üöÛoDû¢E‹üüüžþhƒ@¹wvvä“Çñn¦.“»­*“Ɉƒù6ëcÇŽ­]»öèÑ££G† è›o¾177/))quu=tèPEE ¦¦¦Û»LMM'Nœøÿ÷Ó§O×ÚÊÁŸ6ºÃ‡Óéô¢¢"6›½víZ"Áò¢E‹„Ba@@€Ö(ô4§±±Çñ†††Áro R©S¦L‰‹‹ËÊÊš6mš®ÅÄ$$$ˆÛÁ^dÔ¨QÚÔâ„r‡aX"‘,Z´èë¯¿ŽŒŒtvvîáí}ýõ×ÄÙA´wttøûûïÙ³'<<<88øÜ¹s­­­\.w„ [¶l©««ÓÞ}"Âf³×¬YùèÑ#ƒ‘ÝÒÒ‚aXqqq\\œÖëL&s¹\>ŸïïïÏçóµ÷ÍÏ»Ú å®P(ìììt-ÅsQ©Tl6[»Q©P(Z[[-,,t+Õópqq!üceµÉ“'¿ýöÛ;wî,**3fÌš5kÌÌÌŠŠŠnܸ±iÓ¦íÛ·ß¼yóÚµk]58‚ ¹sç^½zµÛI8uêTSSÓ•+W’H¤ººº[·nŠD¢ÀÀ@///‘H4~üøž‹»/^¼xûöí—.]ÊÍÍ>}úÓ\.×nÞ‚ƒƒãââ’““õÊý•—/_æñx/ëôüjH$‡sèСӧO …B±Xü¼».Ÿ5kÖ˜›››XCCÃÑ£G/[¶,$$¤¡¡¡½½=""‚Ëå¾ÿþû---111³fÍP(”+VìÝ»7777%%%66622rÏž=aaaååå~~~ …Édž:ujÞ¼y«W¯Ž‰‰¹xñâÅ‹;Öó§è׬ÏL¢¤T*©T*ñû™ïjjjÈ5Õj5›ÍÖ¦q—ËåÄ~/ñtàd…lmm}ôè‘ö©•••B¡€ hذa………ÄÞÑÇétº©©iII‰———J¥*--utt¤R©çÏŸW©T3gÎ433Ãq<==ÏçJ$OOÏ®I$’ÒÒR///âæàÁƒL&ÓÖÖ¶­­-!!AˆˆBs¹Ü¡C‡Þ¹sÇØØØÖÖV(>xðÀ××÷áÇ ÃÖÖ¶ººZ*•ºººVTT\»vËå&&&‚?k5h©¯¯1b„­­mNNN·ëÎiii±¶¶vtt,))h…\KVÈS§N-Z´héÒ¥ÿ¨Ñ^™LVRRâââ¢u¼‰D÷ïß7nA|>?99y„ „?Ç«ªª"¶šjkk½¼¼ššš=<<Äb1qv̘1£«¦Â0,##ãÁƒ'$$ÄÌÌ ““S\\ìéééçç'—ˉÇd29))©¦¦Æßߟ(°^]]œœljj:kÖ,2™\VV–žžÅãñÒÒÒÊËËÇ7fÌ@aa¡Í3 ‘ö¹r¯««ãóùDNÝ{÷î™››;::R(@€ã8±•G"‘ ètºP(äp8Çï:‚V¹3 IÆokÌPò _ *¨`é–-#FzýO¡åÎ;nnn¦¹¹Çq{{{"h–F£I$’ööö!C†(•J>ŸïîîN(÷âââãÇoÞ¼™N§Lå>Ø™?þýû÷§N{äÈ‘na,(ŠN™2%##cùòå?ÿü³®„|~~~7nÜ())qww×µ,c°(÷ðððÄÄÄÔÔT}&ȧÏÍ2ÕÕÕcÇŽ%Ö,---~~~¹¹¹‹-b2™2™L­V—”” 6¬¾¾¾µµÕÍÍ­›fÿ›¬$œJªÁ;³ÐòÎ,P«(`foGü766j4™LVVVæææfhhøë¯¿š™™Ñh´û÷ï[XXÌš5ë›o¾3fŒö\uqqyóÍ7ŒŒ_l=½Î/¿ü’››ÛÞÞ¾víZÂ1¹+‚œ9sfÔ¨Q±±±ÞÞÞëÖ­Ó‰Ï#44ôÆ™™™M¹ „B!‘ãWŸOæ¥èsånggWSSC8Œ‡‡‡K¥Ò€€bgÃ0*•êååE£ÑÌÌ̤R©R©lmm}æ-@¡€5P î`DÖØO(p`Ž=îx¼ÄQKKˈ#ˆÝQ___ÂÞÈÈÈÌÌL"‘^Ú· (JØ+zW=ZÈdrÏq‰FFF§OŸ Ü´iÓ˜1cˆ›Ö´iÓ>þøã .ôzäÿÉÉÉJ¥rÉ’%úÄ/EŸ+÷!C†<³B¡˜™™v(‚®ºò™¨T ¸sW’90À´çÞ¯aBéjHñòòêÖÇÚÚºëSA‘ Ç¿___ÂÿlÞ¼yEEE=ïÐö'ÞÞÞvvv·nÝêèè Åèyq~ùå@DD„®d oFSYY©k)ž †aÚü”FóW)=}ÇÆ O:•””4p60'MšôóÏ?_¹reÞ¼yº–e0! ³²²x<^PP®ed ånee¥kô &}:QjÈ!¿ýö‹ÅR©T|>„ eeeD·ÆÆÆ‡å­MmÖÖR&“YUUµ~ýz6lذÚÚÚ‰'«®žnÐéô¸¸¸Ñ£G8p`üøñóçÏ×­<Ç÷òò*((¨««Ó» ü#—.]211 ±Keee_ý5—Ë=tè®ey!újåN§Óííí‡.‘Hˆ¬&­­­†††ÆÚÚ:55ÕÉÉ©©© †aCCC¢ G||<ñàÔ©SæææÄºž@¡P888 BèßæU*•D9'mFÍç•â377§Ñhl6‚ "³ã¬Y³œ½½½ù|¾Ö±EQ„ÌINÉÅ!2±êg2™,‹Åbu-c¤g`bmm}ìØ1‚Þzë­®åtE`` ŽãúÅû‹œœ¬V«gΜ9Lj†­^½Z¡P|òÉ'ÚšMœ>TOfffÄ_ÅÚÚº±±‘Ãá‚!C†H$'''"-Akk+‡Ãa2™ÞÞÞ<ÏÚÚúîݻ˗//++뚆ÍÔÔ´¶¶¶££C.—÷œpÑÕÕõîÝ»$‰èÃ0Žãuuu …B[Å @dW©TDP •Jmoo×h4\.×ÜÜ\;‹©©)Š5ïÞB‚UDbe Ãd2Y[[›H$ºqãÆLC¨§+3gÎܹsçÎ;###óòòz(òׄ††~õÕWIII«W¯Ö¡ƒ"7Üñ=|øpNNŽ——× úÃõkVÈž!ÊR^¤àõÖ­[µÉ+++'MšôÌ ÕüüüÚÚZÇÕj5 ÃÏÜMÅ0,..ÎÈÈH¥RY[[5êy8?Ž÷öö¦R©W¯^>ÞØØ¸££ÃÊÊŠˆâ{)6oÞìææ¶aÃWW×>úèé™™™l6[ë9ÚgÏžMOOYúŸ}ûö©Õꨨ¨ööv]‰H"‘._¾¬+>B¡033“Çãé<‚¤¥¥…0²8p@·»5¯€^¹¿‰ä›o¾©­­ÕÉìsçÎmhh(**$''O™2…ÇãíÛ·Ø~hoo?wî\nn.Žã„ GG¢ÙÜܬuÉojj:pàÀ™3gJJJâãã¿üòK"P ¤¤äôéÓOºœ>}ºªªŠx*‰ÒÓÓÕjµH$úá‡Nž>Ã0GGÇ   í.…ÎAäСCîîî—.]Òþ'44EѳgÏêJ€Q [ç~2ÙÙÙÿýïÍÍÍ¿üòKÝJòjè•û ãøÉ“'CBBtŠ HdddRRRQQ‘D"™9s¦ö¥ãÇS©Ôk×®ýðÃtvv¦Óéùùù,«¤¤äöíÛÚºÒfff?ýôSaaapp°­­mLLŒR©üâ‹/Þ{ï½ôôô‰'vý6ïÛ·oåÊ•iiiaaa{÷îMOO¯¯¯ÏÍÍ=þ¼\.7nœÏÌ™3Çÿå—_®_¿>##cýúõ{÷î%Þ>{öì’’’þ|øðá:ÜÁŸ;wnAAÁ±cÇ‚‚‚º–}àóùãÆÛµk—³³3`üøñ„þ5kÖñãÇÕjµ¶’‘B¡ðóó»uëV{{û¯¿þš’’’œœÌçó‰u|>¿kŸÏ'¼?KKK™Lf}}½©©)—Ë=zôÅ‹»ú¿ÖÕÕ=àêêZ]]M4Ž;Vi<@9rä±cLj³·¢¢¢ÿpuuµ±±!nƒúöNRR’B¡ Óí×fçÎ?_²d‰Åx™rW*•±±±Úܯ …BaüÉóœ^D¢6CÃ`hØl|óæ·¯vÁÕÕõ5xeÜÜÜccc£¢¢º¶;::ZZZÞ¸qãĉÑÑÑÖÖÖ!!!qqq~~~'Nœ7nœ¶Ê{]]‹‹ËÏ?ÿL£Ñ\]]I$ƒÁptt\²dÉ;w¶lÙÒõŽØÑÑqΜ9wîÜÙ¾}{tt´££c}}=ŸÏOIIqqq …Â]ÇÅÅ%--M­V§§§;::öãQyiæÌ™óî»ïÖÕÕ-]ºT¡Pôóìd29<<èóÌ<‹3gÎ]ç“)**úꫯ8Î 5È 2åN¥R—/_îââÒsAáŸ?Å)†á¨¨(SSS­#‡Ã¡P(+V¬àr¹¶¶¶“'OÆqœB¡„††’Éd*•Jh‚aÃ†íØ±ãƒ>°°°3fLXXØ”)SöíÛwèÐ!KKË;wÚÚÚ’H$bUþÙgŸÅÅÅYZZnÞ¼ÙÚÚ:(((((ÈÃÃcþüùóçÏçr¹Ã† ‹MMMýâ‹/’““---“““?ûì3—Ë}f’†œ9sæE\qú‚öïßïíí}óæÍg: õ5„ÍAïÙÎÎÎË—/óxLøçDFF†`nnÃðÚµkµî›ýƒÁhmmíçy8'Nœ:­»ÔÐаk×.*•züøq]ÉÐ[ 2åN"‘<<<ú¡µP(d±ÈÐ,óïÀËËëîÝ»#FŒ¸páBhh¨‹%M:uÛ¶mR©tîܹ]‘ö„¡L·¹n ;;ÛÄÄD»óßÏà8þÎ;ï…Â-[¶¸»»ëD†^d)÷ÞÚPýGø|¾^¹÷)C† ¹råJPPÐ7&L˜P^^®+IvîÜ9cÆŒû÷ï/_¾¼W¬”/ÈŒ3 ÊÈÈè·8‰‰‰2™ìyÙýú³gÏž?ÞÑÑqóæÍ: wdÊAÑ£G÷Ãʽ¦¦†É$uQîƒÀ,3è033KNNŽˆˆ¨¯¯7nœ®"òaŽ:tèéÓ§¿ÿþû~›×ÊÊÊÞÞ¾¤¤D_Ì‹€ð“‰ˆˆÐÉìmmm6lÄÆÆ²ÙlÈл 2åÞof‡ƒ ê.6wq_Ïø¿ …B9{öìîÝ»AddäÉ“'u"Ç;~ü8›Íމ‰)((è·y-Z¤Ñhô>3@píÚ5cccm¨]?óÁÔ××/[¶L‡Ž:½ËJù; 055@@çŸ ºO½ýo†á?þØØØ8&&féÒ¥uuu~øaÿ‹1qâÄ}ûö½õÖ[]÷™ûŽÀÀÀ]»v%%%EDD\»víâÅ‹W¯^MIIÑÖ*èuº «ÕêÊÊÊÝ»wk[Ö¬YcffÖG³wÃÔÔ4(((<<|æÌ™ 2™lþüù:ñžÊÍÍ=qâ„¥¥åW_}Õÿ³÷ƒÌ²·øGWÈ¢¢¢‰ã¥læâ©JmÝ.\ñ é‹u¼8 óçÏW*•‹/>zô(Q¹¥?AQtáÂ…ñññÓ§OOHHÐ €aXUUU¯»<ã8^TTäïïa†aJ¥’h¿uëÖ3+Ïô „Ÿßó^¥R©B¡°ßLÞZ=Îáp8N]]]jjêÔ©Sûz^>Ÿ?gΜøúúÄb±——WEEÅ©S§Eåëd™ed2Ù‡~˜——×§³%UZ ¤Â'? ½Í½Ï /**277?yòä¼yóZ[[ûYAŽ92zôèË—/ïÙ³‡hìèè˜5kÖŒ3Pí•Y”Jejjê»ï¾kggçåå%•Jår¹V³÷5S¦LéáÕÀÀÀ~Óì÷ïß×>‰Duuu€ÈÈÈÙ³gŸ;wN$õÝÔ/^,,,?~üúõëÁW_}UQQ1sæÌ“fƒN¹“H$///“>E(r¹\ Q™ðÉBï-Ó >üÚµkcÆŒ¹páBpppÿëw6›Ï`0öìÙC$hswwOJJ*++ë­ý^F³fÍšï¿ÿþyeR5×GŒ1ÂØØøy¯úûû÷ÝÔÝxf^©Tzîܹٳg;99õSœÖýôÀÇß¿?›ÍþñÇûh:]1È”»D"Y¿~ýõë×ût–ÖÖV### Ri瓽rï/†žšš|÷îÝÑ£Gw}566¶¯+;99ý÷¿ÿEQtÅŠãÆÓº²|õÕW½bÃd2™_~ùe–円†×Ÿ¥zÐàý©Ü{N>ÚGYFjkkïܹ£}ÚÜÜ,“Élmmûb.Ý2È”;—ËÍÌÌìš&¥/¨¯¯§Óé3ËÈõʽÿ044¼|ùò’%K¦L™¢ Ž?}úôš5kŽ9rúôé>`îܹÇonn&ÊêdffÞ»w¯WÆŸ3gNÏæ‘>% à™í‡HêÙ?ôà•dbbòé§ŸöѼ§OŸ~ºN˽{÷FŽyðàÁ>šT' 2åA…Bá¾»±±‘L&uW³ŒÞæÞ¯H¤ØØØÏ?ÿ¼½½=,,ìøñãÅÅÅëÖ­#NË7ö]Pëýû÷===KKË>üüùóÏlïèèxçwüüüt˜£wdÊ]Ô˜Uý IDAT©Tž;wN[ï­`0M× Uýʽ¿axëÖ­¤ÑhË–-óõõÕ>mhhxë­·zk‡³+.\˜8qb×½¾®œ;w®©©©W&6lØ[o½Õ+C½,îîîÏŒ êO1žWÕ}Ê”)K—.í£I‰:3Ï{‚ éÓ§"¯¿ždÊL&Oš4©ï®êOü|Õj “>ùé÷”ßzÞzë­ØØX@·¬ë)))½MªV«¿ûî»§ýbµH$’C‡õÖt;vì2dÈÓí?î­)ž ‚ ÏLÞ2yòä>·] ßZØlö?üÐw®îñññÏ{ ‚ ]»vmß¾½¦îYS\\\iiidddß©â8þ¤‘ªKÒAvœþ±X¬Ãt]/űcÇžÙ¾mÛ677·Þ¸ùæ›o>úè£K—.=¯Ã?þ8gΜޚnþüùÿùϺ5>~ü¸´´´·¦x&OïÒh4†ûzÞ®tvv>Ý-—ËûNŒ”{TTTDDÄëLÍb±†úÊoïu™Òš0aBYYYŸÚÜ1 {2¾º‹rXuâ^—êêêÔÔT###AH$ñ»¤ôá­?0©C‡p‚a ú®Ôp@ñÂq,÷ò ÕÏ0d2Ù܍œߨD"ÓpÀ0ôçP8Àq‚0‡!Ã1‚Ÿ´  à &žá8 A8ÝjêäH×ìKßkTÏHÙÒÒ²ê½/l]ÆCÇpý9J|mˆ¡0‡`Â1Œø,‚pÇq 0 á(†Ã„á6<‹amºNq·¬aÏÙÄ›q C8ŠÂq GH$T£`䯡PA` ÃaF1 €`€á8 ‘ á?‡‚ À¸“Öís˜û2ö  £Ã†i`Ç0”J£Ñ ©ëP00 GHÈ© à €£8€BQ †Cµ/A†áC…w»ß ð,†µá®{~Ì~2 Žá8„ã(€Â5ÄP8 ÃF€a8„ Fƒ’H$Ãpâc†‰ãᆞ %5åçç?ý7…²WÀ"Ûc÷÷Ž“H$ {r¸‰D‚Y-MŒÙÄ™Bœ,$‰Ø™Óž>‚(в²²É“'ë0AW™r§ÓéÚLâ}AGGQŽSÍŸÊÕYÍÔ>!--ÍÓÓAâÛIü–ÈÑ”ûBï®Ü!p€CD&Á,Y Tü©~ŸœØ ãO´*A†=Qµ0 ?¹Xâ)51…`Ç5D†€Å`4”D"kP5 !a¨ÀäÊ;§ª{JwÞÙÞt'?ËuüRµJ“è¦Ðà$*Rª1 V©Õd2Õ(LC€JƒÁ2¤Ti(ŠJ)§PY¨F‚A4 ‚*U8• +U¦TJ©&>"vä§|+5>=iÙ½[û0–*4l&U*•Ð\T#D!V©1•„Ë“!“ ÉT6ŽÊ0ŒNEÔr`1È"±”É⪔B@b’€ÂqÜ›í>ú›“%B£&.SbIÕ6S®¨,c8“ Ë% ²›$JÙ®RÙIF8¨FŒ!,¢ÉpC]$–ÒL•\„@—)Q*‹†‰¥j“!WHîp2•­Vþ•1‰ih«FÌä2)•ÁA5" aÓ¹T 3é$©\Ag0•r™d°%ÊdQ1±LÍb2$r)‹Å’KlL‚„R%•M¥†É Êe2*ƒ­Ñtb›Š¨ä*ˆŠÍf‰E“'tüý{¹NX-QÑØÆEj5NÁ$r “N•HÄ,ޱJÕV)T0ƒŠ‹d¨‡) è,†wÈQ6R*Ô¤2›Í–K…0…™FM£SP‘ïlxFð#ŒÝ&®¶v  t¦F)0›  5…Br5¢„¨æ–Cl‡ðºž,d2ÙÌÌL$a¦R©Œ;;;ÝÜÜÊËË HvšAfsg³Ù—.]z^ôG¯ÐÒÒbjj @5@-{ò£ùw™Üy<A±±±yyymmmû÷ﯬ¬ÔÞÍ ´q0Ç­y§ Ï҄Π“Œ¹t*qw2çfH£’˜tƒN†!ÃpSc¦•Óڂà“ì,Ù^F†lòH{ú“m&ûXYc,dÄPºï(3Â-LYž.€`à4#ÐhP„DÂ05 #ª0 (ËØÃû‡ûÜêÒäÖºR¡B¸ d (U !.¨F ` ©5DB€JR©TT­&S˜F†C42Œ*Õ…Œ¨5¡ô2ÂädŽÝ„ÈOŒ,G>=£°µRÚþH©Ô°™TJ¥±0µƒªÁRª1:&—‰IT6À”(N!¥R 4ŠH,c0Ùj…"3IJ©AL̬-&u_©Â*Ucd:È”‡ÍT*¤  r  ‘€B®¡°H§HÊfsÔrLfkTfPa•T qÙ4¡HÄ`²4*@8*Õ`dKU :M¡Rh,×[þÍ‹ÜÜ~œR© Q¥‡TX)UÀ4 ,—+‰¡ ¨…jÀdPP±LM E§ÓåRLá’p±BCeÓ!™BÃf1”J‰J×(Å8¦"j¹C1Y,±XH¡àj!ò÷ûok×ét–Lå’p± %“aµ\¡a3éJ¥’É2P+:‰EÕr ’L‰sXt±HHeàj¡°`\¦ÔÀ *¬Pjè º\*D¨lWªQ2VÉ—E~ü°»rÿöÎ;ΊêlüÏôÛÛîÝ^i[Ø K¯"*¨ADLb%F?ƒ-Q“¼‰‰%ÆÄüôUc¢&x£ Q°Å Ò¥wX¶7¶ÜÞgîv~ {½nc]–]î÷³™{æœ3ýÏ<óœ§àU4÷Ñãçü>•Æ$‹œŒkp™H¤Š."8`4Mw‘ìJñHš¦;öÆoüõ¯}÷ÝwI’ÌËË»ô%y{c˜ w¥(è jîÊ[•,:û7„;A ÃôÑG¯¼òŠÙlÎÎÎ&pœ p‚ÀÛí¼1éj­^¯ÅSÌ0:Ÿ_ž|ãœL‚5­8qâ8‰‹&‘qÃìôéÅ ù™ôè4ºÃÅÑ´J¸)%éHÇd0cR¼–˜ÂqÇ1Qˆ¢Hà€I ')@4Cc $c2AQ$N¤ž<}éïÊÿB­ïu‰!¹b럑ÀpŠ¡0IB*ƒLRI14FÒ4jµ ÉNQ88©¦)YB˜ZE#$3 %ËŨI\@£¦ µs–ýfôÄ%Nt´öÈÇ­šç#*­CŒÔ0”$J V‘¢ŒT*Z´ZOb„Q4)ɩժIÔô²ÈŒŽÂEQ&Ô &ÊDñô[Hú›ÌtbØ…*­š$Ðh>ÂÒj=<Âi†eŒÒk.ÌŒFI*… ­QѲ€HƒŽf9N«7ÊR#U$Îc¤J£&¼¬×k%)¢êì*1-ï›ïI›¬$­ÂP„ µg»Ò3’,kuº³]a<"µFóH¯×HRD¥Ñ+—IÔ: Á†ƒAÇ ŠVcr„ µ*Jà%L«!•®$1¢Ö ÄJf¿ñ8Ô’ &]O«õ41µŠF2àzƒ–xŠV!‰Åi=CмŒkÔ¤„V˄ÜZg$‹H†Îè´´ É*µJ”Æ@b¼¤ŠF2zƒÆÖÑìwÖÇþ#â5ñê•£ÇÏ ‡YµÎˆ#á …ó€3: %J Ñ¨0 #Œ¦i’$ý~¿Ëår¹\Jb„Ã0“'O–$©¦¦fÁ‚Q¡™pM¥?`–””­÷6Øl6eCŠYPEÜà 8(™ 0 S[[»bÅ ‹Å‚&½Š$iÀ™Úf_~޾Í ³R5iVM8"ùLz·7œ—›´÷H½^§gIFˆe¹PsûE“ÍUÛpftNúþãgæMÓÚf×ëõ£RéñãL{µYŒj–“¸0n6èÃd8k¨‚Àda˜ ˜ªÓ„$¸Úbš9º`jýñÿžÚ¿!è³u¿œpÈUs`ÍŒÅH2.IŽ«dIÄ €„€ 0Y’ pI’@à I HB‚,Ó$I’LZQ½É"`“14)ˆÒô…÷f*ÙýŸW#Ü7ÙNœgŽK¬=Éš%‰À0åêü¿Ò.ýÚÛ§_µ¬úè—»¿ø?Ÿ§«ˆo8ñÕ¸ñS‹Ë¯=»|*K8Ž#„SÌýÊ€ÒÕÙu9e @î\‰Å1!Ô0 €œ’¼pôØüÿñ{ÛÙ•OYl »Çæ„Q–EŽ! HFˆ Y–0ܲˆ0½b{Â!„‚”$ÃuÈèìb LXŠõ{ÍUÛí­µ@Ñ”ÅlÄ@–ÑÙ†ëIFà8ˆ$Z(!’$E‘Çp=†$„’”ÕEI’Ò$ yò¤Ûí>wÓ ÂëõFÓI<¡³âÈò–é¿þõ¯U«Ví߿߾}o¿ýv-Y–ýÕ¯~µjÕ*E€®Y³fÇŽ§N²ÛíÝ#„6mÚ¤“«¬ì+)–?üðg?ûÙgŸ}ÖåøöíÛ{;Ål6ÿüç?ä‘G}ôQI’î»ï>Q·nÝZ]]ÝÏAÏ—1cÆlذá{ßûÞßþö·íùÞ{ïí1áÌ 1mÚ´iÓ¦]²áb¹ÿþû¼ralÞ¼yÒ¤IkÖ¬‰êmWÃÌ,3~üøAíßáp)Û²ð-›ûF’¤”””ìììO?ý!ôÒK/1 síµ×Ž;¶{KQSRR^{í5žçEQãÆS"¿bÁ0Ìét666ž:u*33Ón·ƒA‡Ã‘žž¾}ûöâââï~÷»Ý'sóÍ7Ûl¶ë¯¿þßÿþ7AÓ§OߺukJJ I’Ÿ~ú©Õj-++ë±¼ê©S§®¿þúï}ï{§Nºùæ›-Zäõz×®]›’’rÿý÷Ô½Š¢ÔÜøÇ?þQSSÓýF]0æ×¿þõ%+}ë­·^š±b)((˜={ö¥Ëçóýë_ÿ*ÓÓ2Ì4w„P(¼—Ö¨“;Hâ•b–IHH˜8q¢N§Sn¬Ãá˜5kVoKÖ™™™'NTþH’EÑh4öÖxÁ‚Ï=÷ÜĉeYv:III³gÏ>pà€Á`è±ÊZ„ÛíÎÈÈp»ÝF£Qv&L¨­­ý7Š%99yâĉ‰‰‰EEEO=õTBB‚,Ë“&MŒÌÀ 8ޝX±b%»Â7ÞxÉ$ÑÂ… /q¿;×\sÍ F«ÄòÐC]’†æ~ôèÑõë×/Y²dÊ”)ƒÑ¬0Vs§F®peY»ÝÞÞÞž——G’äĉOž<Ùc$Çã9xð`mmíUW]5jÔ(ŸÏ—“““žžÎ²=äØ»ÝžŸŸÏ²,BhöìÙ›6m*------))é-‡DUU•$I'NliiY²dICCCrr2MÓJðpŽãôz½Ýn§(êºë®«ªªÊÌÌaóæÍwÞy):YžuGÜúŒ.mxŽ«­¬,,+‹º 鬱t¶Ëå:räH]]Ýœ9sòòò”kìÒǦM›RSS§M›¦Õj»|:°/Ú6›çù´´´¾ß“T›6Ñ(ÛBawó2EÑétžoV%‡ÃÎÙ !}Ì˲œ””tñ.4§j´QdY¦éoêœÆsÖ§Þ±c‡ÑhÀ—Ëu‰‹ƒ_†™p?|øp0,(( ‡w¯×«ÉŽxÍ|>Ÿ’A¬ËñÇ?zÏ=ŸmÝÚÑÑÑcL,ËUUUÜ|ó?¿üòÆoìMZÕ1uÿø2ÿ²‰6ÅžŒ¿õV[Ade@…o%n}_|?üf !ìX¹’¸újˆîçÅÛo¿]ZZZPP°ÿþÆÆÆE‹õØì/ùËÌ™3ívûš5kî½÷ÞۜӒGþüç?ÏŸ?¯°°°$-[w†ªªê§N:é÷ûçÍ›gµZ{ÔõhÇNmíß•í€þ:¿á»ï¾»mÛ¶šššóͽãxiié9ßêêê22Î>\].Çq/ÜBÑì‰}P[[›­˜9Žkmm=§pgfÊ”)‘Hä"g¥ªªê܆!ÃÉÏÝãñ,X°à†n$ͽ­­-vWÑÜ•¿‘*Ü Côw« ùý~ÿOŸîã܀߯[¿¾G'Hžç£±ǧ óE¾©Ì {ãÜ¿ÿ=¶*mcBãrõòV±UÙøýŽG)ûâ EòɲÜ=SGGG[[[V«µ¦¦¦±±Ñf³õ‘ :--­¡¡ÁçóuùR¹\.eƒã¸ßþö·ï¼óN]]ךŸQÔutÜîry?ýôÓÕ«W÷LÛn£,‰Å‚ H’´eË–.“ŽÈ/ƒà«gÿŽN¯Z¸páóÏ?¿k×®î-ûƒ¦à8‡×¬YãñxÂá° }èûý2Q©Tçš ˆH$²qãÆÖÖVŽã`ðâϯ4†“æît:Ÿ|òÉP(ôûßÿ~Ô¨QÞ5êJÐÜ€b‰!Vå|î¹çÌÇŽýØé4çç÷x"Ã0O<ñDú§Ÿ>xóÍÝ ÷’$}“£‡Šiï}ø•ð+f•YÿÊ+¹ï½×=l 1±ñç-kÃk“üßO”}þy4Ç,ËÊÏZZZjkk+++išVªÝNœ8Ñh4ÆF…B¡Ï>ûŒ¢(—Ë B•••¡‰'v¿“Étúôi‚ JKKcGZgÎ$z½ÿ³t©{ÿþÍ}ô‘Åb™Ø²eKT¾G[ö“M›6=Zq]=zô¨ËåRÞE £½S§Navøðáüü|I’Âápcc#MÓÍÍÍ .t¹\ʈ²,ïÞ½{Μ9ýúøñã†ÀîÝ»A(//ß¼ysQQQnnnçÝ;Ž9¢¬^„B¡öööììlŸÏןL mmm&LHNNnlllhhè’ ­ººÚëõ*Þ½»víŠD"sçÎí§Á°f8 wN÷Ê+¯Üwß}ƒÔƒæˆ÷–NÇó|wé<~üx&=]óï{´ÚO”e9'779--Ü/r NN9ù³=?yû r׬§zŒ kJlºÃqÇ/ÿ–{×¾êqe*¬[·.33S£ÑÜrË-+W®,((سgO0|衇¢%çý~ÿ‘#GRRRüqhmm}þùçC¡PÂýË/¿ÌÎÎNNN>~üx‹±»v9wìø|Ù²çÿøÇëÂáðÎ;ŸþyÇó«_ýJ‘YpÓM`·oXµJ4&Lè- ?//Ï`Êÿdsó²Çïÿû„„„{î¹§û3`+¤ÿÎ>iCö"€eË–-]º4ö%Éét¾óÎ;™™™E9Ž™3gîÚµ+%%¥¥¥…çùôôt£ÑXTT¤t®R©š››á>~üøÕ«WkµZ³Ù].z½~Ò¤Iàp8ôz½(Šo½õÖ’%KvíÚ ­V«,Ë 7ß|óÉ“'-Ë_|……… ØL&„Ð’%KþßÿûK—.MNNVt…ÂÂÂÍ›7K’ªªª(Š*++[·nÝc=,Ëâ8®4ttt(ö÷ 6L™2ÅçóíÝ»7++KÅ%K–üç?ÿ!¢{ÈñgŸ}vóÍ7òÉ'+V¬hi_'€ë IDATi1 GÍm™™¹sçÎ)S¦(iŽŒFc 0 /½ôRaaáõ×_ßã?Ö`8™eRSSwìØ1}úôÁ(ÖÁ²l´L‡‚|˜eB¡PoQà¼É„i4ç\þW±ìÞ÷ßW\·lÙÒÑÑÑc3 KÓ*Œ³Ö ú¾²NÖYëž¾û«í½¬§à8®Ñhü~¿Rƒ8;;›ã¸`0HQT—d–&“I£Ñèt:N§˜zód Âh4êõúÞ ÓÙÙ–ôôÅcDz{öìùë_ÿºfÍš¬¬¬|0j¤†ÁxàÎûï¿¿£cÒgŸ|ï½÷6mÚtº'£–^'4ÜŸ••Õ[¾(Ýæÿ¤ü â= 8°cÇŽh­VKÄ-·Üb·Û³³³Ož<9fÌ˜ŽŽŠ¢æÎ»páBŠ¢¢j¯bøƒ‚ |üñÇsçÎ]¶lYNNŽ" @¥Rew¢èò$IŽ?>55uÆŒ&“I’$Žã–/_®V«;f2™†™;wîéÓ§}>ߨQ£ÊÊÊ”‚ &´´´¤¤¤(÷S:s'ŽãE…B¡¨>AÓtff¦2tô–¦¤¤äææŠ¢8zôè’’’E‹µ´´„B¡¬¬¬‚‚‚.J7Ã0¡Pˆ¦iŸÏ‚ x½ÞþóŸQŸ:¥½(Š‚ (¾J¾ëÉ“'G‹ŒH†“æK—.ýå/9€k)Ql6[á~%hîjµÚï÷÷˜yœæ8îðáì²²`0¸fÍš[o½5ª»ÝnÛ×_8ðßÏ>Ûàõæ/\øõ×_¯_¿þÉ'ŸìÞÆÃ#mð‹\ €Ú¤=ã‡Ôæ p×?á?×Âøn)d´ZíwÜáñxöîÝûÆo`–ššzýõ׫TªÁKøW^î+(øÓþБ˜˜xÍ5×Ü{ï½Ý—L1 £iZèwßu?ôн>JíÛ·ï±Ç»ýöÛ»$GÓj੟•­y¿J‡²³³{ï‡FCóÙ¦¦HÕúÈzžçgÍškjooo×h4œ1cFCCÃâÅ‹7oÞ;;»££C¹K›6mª¨¨HOO×h4JTsiiéªU«n¹åe’$kjj8@Óôµ×^ÛyÏË=Ϙ1cX–MMMÕëõ‹Åçóavúôé.šû7ÞøñÇ/]º´²²277wß¾}7ÜpCô‹ û÷ïŠèŸ6mšÛíÖëõ²,+O‹óû6 +†™p§(jÚ´i]¤ð€ »ÄÇÚÜ…î'Œ$I2 ¡¨pT’_/Y²Çñ?ž8Qn0d—•×_}Ñ¢EÊoÆï÷Ÿ^»–^¿>xÿý«Ö¯w 8ŽðÁ,Ë*ý¨T*¡ÓÓÀ¯œðT8À臠‘Íã}ͪµ ]sv—$É軚^¯×ëõ™™™Ê+¼Ùlî®q¡¤¦ù¦ÃÖVEÙïŽãGŽ™4iRÛTFF†’1X­&~øÃ›233†éÛ‘™¢ø‡Êðùþú³Ÿ5þíoë^¬ðìììm»=/ýn^kó¶|ð¶Ûn[¸p¡2¢ÒF³3¯9{÷R&ãÞ^‹ÅbµZ£ŒŒ Ã|ðAeW¹Ò¨¤VPLCÊó ¶zÉO~òe£K$`yyù¾}ûÊÊÊ‚Á J¥JHHè>y¥ŽB¬Ñ)+++ºV¡XÌo»í6eWY½öÚk£";ºNÖ%Iç˜1cÜnw429##£ÇÔ7Ýt“²±oß¾Øãf³Y¹À©S§BÌmŒ2kÖ¬hÎúصŠn¸¡û(#‰a&ÜÃáð å–‘$©ËëÞ• ¹ó<¯q©©©Y·n’Î…Òé“’€¢(µZ}466îkl||ãÆƒ!°mÛKÏ?¯×ëU*Õ /¼ dõŠ AŒ‡§ÚàFÙyk1²•ðQõKhø¶æÝª…Þ„—›aœrÖ·¥ª¢³÷vQV«õøÃþð‡uëÖ€Çã)))‰ .°,[RR »8DG$¢ÿy-"y~FJJ‹Ì±ÌŸ~jÿžŠ‰‹_zé¥h´èˆI¡OÇ9Ïú¹Q…÷Þ{o(:zôèÎ;çÏŸç,‰DZZZÎé éñxÕ»½½½»}ò¡µµõœ®' %&&:NQU*U®N„|}© *†“p÷x<ï¿ÿ¾’ÖuÀ;ï¹._AL†$ÉX'ÈiÓ¦?^yÎýô§?UüÍfóúõë•ÕW(((ÈüÅ/$ƒž}öY³ÙŒaØã?n2™ºÜÃù©óuliu7ã³4 ’ØÄ––602ÆÝªÝ=Üâ|H(>Ÿ(†¥§§ÿüç?þh—/_Þ[Râçž{N¹üÉ|ÛO±øðÊ¥ Ãô&s—?6mѽg—jÕ5hµÚéÓ§÷|Û#‰‰‰ÑW¨>貈5 õT- Ïóç”›]†Ž5§ôFvvvCCÃy• ë›Ø(ª‘ÄpîÍÍÍõõõ—l¸¯¹+ Ù»üüp7ŠWlñÊvRR’(Š¢(ºÝp8Ê)Ñ@DÅÀóüœ9sDQljjêSL´8A0 KS÷êr£Œ>Ÿ¯ïÊJ’$…B¡Ûpçt:•«ãy¾·6Êüq§išçyŸÏ×ÞÞÞLjі}´é‚ úðWëÕjý7†ø è?–óÍ0’$ ˆ2{C˲|ÎëÍî7P\äMVÀçÍ€0œ„»Åb)..ŒÙ²,w·ÉŽx?÷ ø ÑK%Bˆ$I%ïnßôÿ÷°dÉ’~¶ì›òòòþ4“$)êéxΖ7£8#„xVÈ Çl6®ZµJÑÂ%qG—ƒ#>· Ã0*•*.›¢(n!C=‹8ÕË-0j8 w·Û½nݺ’’’ó Ï뱎·QF¼æÁ`Ðãñôf¾`GZ MÓ—m‚\–e1 ë^ 6NœaÊpîz½¾¤¤dõêÕýÉ6w^¸\®h]ì(#Þæ®™™9ൊ¶lÙÒå…@qFÊÊʤZÏçkllêYĉ3` 'á®Ñh ¾•·d€£GîrðJð–Q¨®®Ž]©ž6mÚEêׂ |þùç'NT‚$B[¶lY¸paÜè'Î%cØ÷æææW_}uÍš5ƒÔw¹s…hîÐÐÐ0mÚ4%‰$Iíííƒ!êÎã¸â­\YY™ŸŸß …’’’ªªª|>Ÿâ7M’äÞ½{ƒÁ`—õXŽãþýï/Z´H‰;½é¦›Ÿ/‹¢ØØØh4oºé&†aÔjõŒ3BcÆŒ‘ey0*]b†pß¼y³’»õâA½óÎ;»víZ¿~ýøñgëý°,ÛcÅí+Ds_ýÑI»ÿÍ/½±{Õ÷r$q^*ÌÏpp¼_‹íu",câøë~9°c :•ôô½q+ÿ… T5êr06¯ºJ¥ð(è €¢(eÕG™Œ×ëmkk»û™ë¯äËp¹ ÷ŽŽŽW_}u@ººãŽ;¢ÛùËïŸ{îgJz¹üü¤p¸Õõ ÑÜG}“7MÄu.*KFÀã`ÙTÂ}FJχcÛàå;µ/¯ }qÑSg 0™L×\sÍ¹Û [.káþå—_>óÌ3•æ÷Å_ŒnäuZöI`ÔØÄ0¾²{û+DsÞöä}s†A¸°ðì_ ¸ñœg©’‹ô|cR¾ÔþWú¢°½ • ïLè¶ïþ@x¢Y q‚NC‡8!âU aÔ1\Dôy‚À­f5BÈå '˜T†±œ QSÀ…E_pà‹,ƹB/¿ü2EQÑÀfÇ“˜˜xûí·íÄb ƒ¯¼òJ¬Xkkëĉ¯»îº¡Øàq™ ÷ÚÚÚÇ{ìèÑ£ƒd¤c¿>9ü¹²-–áÆÚ\9Þ2†åååkµÚ¿üûøÕÓ²Žui òl]5mê¿ßÿÁ—U Ô 9«,­¢ÆÕáìÁ8Of#h)H! N„1äJ—ÅQ8Ò“us&eœnpg$ë|ÁˆFE}}¸uÆ„4—/ñ§‚®”ÍâÙ¹ÕÍÃ&%o?x¦Ãɦ$hfMJßðUm\¸_n`¶`Á‚ßþö·7n´Z­<Ïßyç ,êy} N—››{øðáüã$I^)5õþ•gZý~ÿOúÓ²²2 .ìž"xøÂcf·c¹h¯÷¼³–ç9C;ۯݲÃwÂÿÊÔ¢+BHB¢$+R$ IÒÙg(B(ºÔŽY³6Žç¼À0L­V‹¢8 µR‡ —H¸766ÆÚÐ÷ïßߨØh2™æÌ™s½]XÖQúÓŸ~úé§.—ë׿ýí9SK*Áñ <ϯ]»–¦éxàøñã0+)áç²Ü„YoÙ‰\Éæ–¶Í™C=µ8ƒ†a©©©Æét†B¡‹ Ç0ìâ “ªTªk¯½¶¤¤„¦i¿ß¿eË–'ND"#Yþ ÷œœœœœœèn¬Ü¼dp÷ꫯ ‚ðãÿø|«Ò4}×]wíØ±ãÙgŸ¿¯¹©i¨g1¼=zô]wÝ•žž>zôh·ÛýñÇ>|¸¦¦†ã¸!œÕŒ3žxâ Q«««srrŠ‹‹¿úê«7úýþsŸ<œ9Bꜜ>}ú'?ùIì3æ|™3gNyyùO=8Îòòòƒž:uêâ;¿œ¹‚„û_ @€¤Z­~ýõ×/¾ŸËŠ#GŽœ9sFÙFMŸ>=}Áü÷¿ÿ]¹r¥J¥:zôhEEÅ®]»²³³zè¡‹žlœË”„„„»îº«¬¬LI"‰‰‰Ë–-=zô±cǪªª†jbMMM²,gdd¤¤¤Œ?^’¤`0(IÒ¯ýë‘­¼›bq»Ý>kÖ¬k¯½vÂäÙ£ ¦\@™QwíÚ›9Ù^Sƒ56(T©òçÌAY9ooo¯¨¨$IÉá¼{÷î+j™k¤BQ”F£QtmY–U š¦‡ÖŒ™““#I’Ýnn·›$IN÷À¼öÚkJ’‘J\¸ÇóÈááÿ÷Ýc‰æ ÉÊËó|kkkì{.GÓ€ Š‘Hö5×´µ·“)1#§¥¥… ˆcÇŽ±,»sçÎ Ng°Ápâ\.T8@Fj*‰a>‡ÃyæLGSSGs³«­Ík³1f5),æïœ#8àno¯:ujß®]'³µ¶ºm6Íðx–ÜxãsÏ>«×hFª=nÈ„ûæÍ›•äìJ–g„Ж-[¢ /n·»²²r@:yò$˲P__ñijÂáp[[›²=PIo.ÚÁ§ßØsÍÌìD³úNW«Õ×_}qq±²ËqÜ“#Ž£GC­­+î¹§ËY¥¥¥þóŸ§NÚŸ¢Ûq† € z—Š,VQÔÕW_‹bØél;uêè–-§÷ïw77‹.—ÕhüÎ 70¡´Äû!ßÀЀ0û¡C§öìaív[]òû½--A›ÍÑÜì±ÛoZ²äÇ+WšGV2È(Cóº´aÆcÇŽ¥¥¥íÝ»×jµVUUaÖÑÑáóùH’ÌÏÏÿè£ÒÒÒ|>ŸR¸Ël6———_ØX­­­²,“$yaÁ;wîLKKóx<)))^¯7766J’D’¤,Ë#£b BˆF¾GnÍ" ¡¾¾þôh ôZmt×f³½ò׿ò'Nd\u©ÕF<ž îÚΤ¯jµzçÎn·ûŽ;îX¿~½’…5Îå‰Ê×›oÖ©ÔO>}ö¬Y:FÏ´¶º¼^ätúމååÀ­·Ý¶þÃ÷<(wŠõ>Äw—  Çqz½~ëÖ­ ‡ã8¿ßŸ•ÕßÀȱZ­n·ûÌ™3JÓ°gÏžôôtŠ¢¾øâ‹””FÓÜÜœ’’r¾þ”—-ƒ‘/‰Üó K: 5™1ósss_xáeûå—_ð¡ã ,(&B»GÑœ`±ÜvÇŽööTµZaãÆŽÝè ¦[­X$"ƒ¤Fóàúûn!¹2úœÏ€~ö€LZ¸pÚ¼y<Ç…Üîƒ{öäGºFî QSYQ_Ÿ9cÆ|°ººzÛ¶mòÆpù04Â}ÅŠ<Ï3 “——GÓ´,ˆÝpà ²,«TªH$¢èÅA(:òÅŒURR"˲$IfØ2eÊ”)Sp—eyìØ±8ŽSÅqEQâ§5"1™LO<ñ„Õj]¹²‡\Êq† ý‘°@É„ IZ[l(!;K0'h,–„””Q‰‰Œß^s¨AÎURT”h±´»\¨"»Ç6ýÿ½á €¹W]5cþü[¶ AÈHKƒp8Áð'¦f¨ªäv_k똢¢ï|ç;;·oGÖ/zh„;I’ŠÈŽzMAL9fµZÛò"Ç"‚ ˆ ^²c¦ûÁx-о1™LûÛ߆zq.–ûµF3Á5Ah„HN›Ýb6Sxh“,Ëa·MeÈÏÉËë8sFÅ0ß»í¶& ærìN¶¡y(ëš_¶øƒbũ˴$ô ÂóüêÕ«?ÿüóòzŠs™ëÑH%˜Í‰ÉÉ93®æšR‡…°¬C!IâƒÂ}Ü ~•.Íår?žÂ°szUÂE{Ë Ø?„NŸ–EQeŒ¢XÂÌU樂{¥–€Vp¤ºzÿ·ýâþgTNÎH’ïc–©oôyChBqƹ›^aØ‘m»ó/$=Ú¥£¶¶6êJ„ÊÌ̼ø"{÷î½úê«M&ÓÛo¿½aÃ’$ÇŽ»téÒ‹žlœK #j±o[á1š$Ë&M² I FÓ,¯ ‡B.Èx½ŽÚÈösjžUÔl³Ñ4­×ëÝ~ß²{ #2€°åà ‹‹§Íœ †2'´6ÛidPgN­­«#µÚ°ÇÓR]=&?ÿÇ+W>ùøã€ÎaᎠydÜ+‘ººº©S§*¾Œ’$uttœ¯páôéÓYYYFãÙâ«ÇWR~>úè£Ê‘?ÿùÏMMMÙÙÙn·[q‚ªªª*((¨¨¨(,,Œºíܹ³°°0!!aÀ./ÎE€¾½bä;@QàjkKT«$yIª¨©q¹Ý€ãIêqNQ­g΄ƒÁüü|A’ìv;Ã0B8ìjk;qøðò[o}ó/©©¯N‘#é-$Î…£¬9+\Àé¢(ÖÔÔÔÔÔôÖàèÑ£áp8;;:::N:…ãø¶mÛÀ矮¸Eýþ÷¿ß·o˲•••ÍÍÍúÓŸjjj^}õÕ—^zihÓ ^!ôÓœuwÁ4*MQ<ÇI¢æù#G¶ut°á0Çq\$âôùì>_D1„p„Äp˜¢¨ÞFéçèçÕLî¬,;ÚÛ+OžÜþå—÷쩯­µy<ÞH„Òë%‚°,¥ÑP$ÙÑÒôûoºé¦#Ì[F’‘ÇûÍ/P­ºr³ì "ÂÙ²,+Œ,÷ªžQ©T‹-Šš²,{àÀØ.—ëÞ{ïírVYYÙ믿>kÖ,ÀqÜ`0´¶¶jµÚP(T[[{ß}÷qwìØ±òòr¿ßëCg0¸×rŠ¢X–í„QcÆTŸ>]ÝÜ ’’„à*NQ‘`PUSSTTdooG"$E) uC÷óDé§P‰^‹p8!Žc&ØÜLj4b$râôé‰ee“fÌ8UQ!sI’H:Z[—ÿû¯¿öš0p¥‡î…yIÿÚØúú;'•]AþÈDš!1>çËžƒö{Ϧ($‰ÄýéééC;¥¾AUUU)n©²,_€£§Ré&ºk·ÛŸ~úéØ'NœX°`²­ÕjwïÞív»o»í¶ÿüç?Jì±  Ã$©ärÊÈÈxë­·-Z4gÎ%úá"®/N¿¸eŒ¦i•ZM£×[1¬Íf#x^ŠD$ŽC‚@h42†…ÁætúC!‰ Ô:]÷Qú¶Ò`1’¢ÑØ IDATbìBçD9EØPÈãv'Z,ŽkhZ éÇ©Õjš¦C@$TQ”† øP(½°P«Ñ°~ÿ(ú50Â}ñ¢9&ÓÁöŽh cª©qää]9_ 4úYãCkfLÿþeË:sæÌØÜ§J2î‹„$ÉýèG?øÁ”Ý3fD?ÊÎÎþío«l?óÌ3ÊMÓ?üác{xä‘G`ܸq?™8ýá„»ŒÇë•Õê° 4ÖÕ¹Z[ÇææÒ&Sݱc*’T -v;Žaiii>–EEÐt9Žõ.Ü£˜ ³2ŠQùEŽ£ÇÉ&r\br²ËïsÜéÊÊ…×^ëho?²(pµ·K‚0{îÜ>ù¤ŸÁV—3#ÜqŸ5sÊ€tçÒ£×ëõzývh±XþøÇ?¶¶¶N™ÿVŒd0‡Ó‰'$ìýúë×KÉò¨Ü\—ËE Ù¹¹–¤$»Óôù*OŸв»\J]˜XûOo4šµF>—jßrg(„ø ‚ÀËrZNŽÞlnkmu9¥¥¥&£‘¦i—ÍÖÑØôzC@YYÙ'Ÿ|rA^^\AÅ:â\2 ÃsÏ=7Ô³ˆ3ˆ(— (6BK˜eσ,Þ·D|¡P‡ÛÒ‘$+~¯§ižç ’ÄcrÄþ·‹Å?jAý{ô8Cž/È‚ ãŽ××׃A1ikj*((‚ Âá°V¥YfYÖ`6ãR¼u¨‰ ÷8ƒˆ(ŠJŽ ËÜ0Î3s @˜,–e½>ŸA­‚ðƒ ŠÎæf‹ÁPg·K²ÌJ’Š @Àï§)ªK êi»‹æÞO›{l À„@Ó€ÐÜÒ"cX¤¦†¢é3f IJJNnt8 ‰‰:½Þf·8I"/ãæ`îqI’Ö®]ûÉ'Ÿœ:uj̘1?ûÙϦN:Ô“ŠÓ¨›âÜ#Ñ´-I&¥¤ Yƒ2B¼(Š<¯Yöù|‚(r‘'2E18ît8ì6›)1±7[6ê¶Ûãúï-m)„H’1›A§Ã9Ž”$.’$)*äó…STvnîØÑ£$OUV6ÔÕááß¾!Ѹp›6mòûý8Ž€,ËS§N½È4Ëð»ßýnêÔ©k×®Uúüâ‹/^ýu%I¤ ¢(ªÕjŽãb}lü~¿Á`ày^’¤¸ã㥧K$j4en΋WTDÓ´ßëÆH€Ê2:{&(š–dYE·ÛMéõE…C¡ìqã!6`Y¶âøñP(ÄÐtX’Á xAþ——qá +Ͱ»¢ñï–Ä…¼ÌqÍ5×Äáw¿û]vvöÚµk¿óïøý~sg™=(++S*è®[·.99¹½½=111‰‚ V«yž—eùî»ïþä“O²cJ8Ål°˜˨¿ Ö)Ö)€D‹å'ÿó?¥ÅÅzµÚd0à8² ’T>uê?ÿ<ÂójšQÄ$I–$ŽçQ$B‘ä’%Kôô™3+++?ûôS£N7jôèúº:!,ƽËÐó&q¾ ª]:”d¹¥±‘7™†iT*I³rs§Ìš%!ÔØÔT{ú´ÓfchZ—Ï'uJö‹¯5´Ä…{HHH8¸ϸD¢ªÂQh„ ÙaVVI’O?ý´V«½ë®»t:]}}ýªU«”O³³³Y–2e I’………~¿_«Õ:Î+V¨Õj·Û]^^îv»EQ¼å–[âµ³/%±f÷X€Ã&•—O()I4›iúýÁ`0Éj•dy×öía–ÅÒÒ4NÓ’VKhµÃp<¯V©Âáp‚ÅÂÐôŒ©SÇäälÞºõdu5Ô×ÖÊ1y`P7™­Î+g‘4dÙd‹… ‰çÕÍÄI“(† †BÇNœ#>Â% ×j].—J¥Â;ÏÖ_¾¸p“'OØqñÅŸ~úé)S¦$%%ùýþ;w>øàƒÊ§Z­6vD%7Ct W1Â$''씆–H$BQ”²d=,@16€`tFcFFÆÑpI|n7ÇqÅ%%‚(º::€J­ÖéõA`’“uV+†ãÀq‘PèÔÉ“IÊ¢h0-–ïï{Y~ãÍ7W76FDQîÉõjïÍm¦ob J$€^«Í5jBi)˲›--%%#3Çñ`(áyãp ãyžÑhxž×¨ÕDgqíá«¶C\¸Ç$’’’~þóŸoÙ²å_ÿú׊+ž}öÙ+9?Ì|0yòd¥J{kkë˜1cª««1 3áp8%%E¿ß¯×ëív{RRÒéÓ§322DQÌÊʪ®®¦iº¨¨è¼ÄÄZØðÎ?À0sr2MÓí­­Ï“$IFG ø|¿_‰ý_\ìòxBápÑäÉmÍ;†—ÓÙÚÜ|òÈØ,–¢’’¤”•V;&77A§óz½@ê6“XSL—ž×Ñfƒa\^^JF òápYy9MÓ2@k[›â"†$)IJ¸V+ ‚N§#1Œö1LqágÐHHHX¾|ùòåËcr‡aÏójµ: ªT*Y–BA(^:JZù†(Љ‰‰üñ¸qãDQ¬­­­««s8‹%!!!11ñý÷ßgÆf³Í›7¯ººº¹¹YIƒÌqÜöíÛišÎÉÉØ=ÒÝÚ1®2ÃB!Ã4:¥RáÉ'  é4£F“’žžžšªÓëI†›ŸŸh4Jçq8øPˆ#J­öƒÛ·m#R³²€¦GܳG–$9Ƴ%:¼—ü‘ç•8 à¦Ñh4 ÓÚÒÒÜÔTRXhÒé,‡y¾õÌ™p($±, ‡iŠÂp!””œ¬¢¨ÏÇ5÷8qz!TYYùÔSO)Â:‰„B¡§Ÿ~Úl6›ÍfŸÏgµZ‡Ùl–$I’$†axžw:¹¹¹—@Š]b,‹"Ê¿þúk«Õ*Ërff&Çq¥¥¥­­­ÍÍÍ<Ï_}õÕUUU4MÏœ93 åææ:tˆ$I­V;sæÌ µ,Qiëç]™”Ôz½^¯'HÇ0$’(J’D BÃdh4“©æÔ)R¥B‚ÐÚØˆûýfŽÓ¹Ýl$"‰"Æ0”J…h: 657›’’ò «Oœ@^/Ömpq‚5öÉDD‚Án±œ®¬$Ž8™””Æ0\0(rœÄóÏ ‚`´X  AQ:N£R…x^êö>1¼ˆ ÷8pôèÑ3gÎ(Û¡éÓ§'&&^L‡‘HäOúÓ»ï¾;a„¿ÿýïííí=öXuuµbsPä;†aÝ3>â8~^ö—?7ÜpäååÅœ9s&€¾;~üxå£{î¹O¡¹sç^²yvOö¢ì "@ˆç †„Ã’ Há0ŽaáHÄH…z”‘@ÖÚí €Áb y½œÃ‘­Veê„:éP;$’aš–qœÂ0.t»Ýj&1+ËÈ’ ;Ššà{ dígú¼ÓànÒéL{ö Yƒ'«ªLV+aF½ÞëõJ¤óŽž`hs¹«}>ÞïçU*Ša†Ñ’$à¸$Ë*FñI—cÌA}HÕ~¦ˆ¾v`fF‹aa·;¤Ñ NV©êÚÚR›š’Çv8žU*Õáy Bg0`ßîm8 úa³|gPñùÚfï‹?h1^Ȳ§(Šuuu'NœPv+**xàŠŠŠ%K–œß‘={8–µ&$ŒÎÈžO°ZAx¼^šaÔ £Ñôæ:ŒˆkIq¼þð[Vß~}¾QÏø½ç}:Ã07ß|s\ý233+++ƒÁ`GGEQN§óºë®ûꫯƌ³oß>§Ó #Û¯æ“O>©¨¨ˆºðWVV;vì©§žêyõ@—ÕKI’‚¡V¥’0,Ìó€Å$’”ƒ¡Ý'NÒ3 fD!DiµAðƒ!^½ûá„Ñ&½á°Æht·´´ýöÞ;ήªÜÿ_e·Ó{™rf&3™dRH#… A å*"P½z¿¨÷§ˆ\¤ˆ^ Ær¯\.ˆ(H %4i)†LSH›dz9gΙÓÛîkýþØäx2%LH$<ï?òÚgŸµ×^{Oγ×~Öó|ž®.W}½×ïçx^‘er,.åþ¸÷1qFǯ¬V«ß錧ÓTUEB]§…B±PØ¿g„úÉ“3Édx` S(¨„ „TM3Y,§Åõf©ÌÜ+BHOûžËf)éÈþ×_ý}ô!´X,#Õ¾ÚÚÚÖ­[—Ïçÿð‡?<þøã€ööö`0¸`ÁUUY–;w®Åb9ï¼óŽ=šÉd‚Áà‡o5uW^yeÿ¡C‡.¼ðÂÙ³g?ûì³7Þxã™ÔèÐãs‹!’$™,Áng³C‰UÕY3gZl6Ñlá ¬¢ÔŽg·[ÁápXý~.ÌšLöÚ†*‹PÓŠ¹\!›ííê:xà@$á¡\ÅåÄ–t¤øÌ Z2z¢®§ +‚öLÆ”JYTÕA)I$⑈Ž`·»ý~‡Ã!§Ój&C$)‹YÌæñ‡åœµTfîÀå—_^.½wZrmöìÙóä“OnÙ²pï½÷nÞ¼yéÒ¥+W®Ìf³‡£©©iñâťƄ†††`0˜L&m6Û).çžý<üðÃwÜqǶmÛºººÖ®] …>àüô§?½æškF–öé\6â"‹ª¦„t]%#ËC‰D¬§Ç…AÐFÌl¡WaDJ¡¦aŒ‰×»óŠ+$I,ûÑgŸÒ™t*•×4ÊqJˆÀó¼ PÉø‚Ê˵o¿ýö¾}û>ÿùÏ¿üå/ßÿý¥ )¹qx“‰3›qaÈΰ9 („»=“Ímk»ôòËÏ[¾| ¿Ÿêº–Í2ºžÇaÙo`ÔYMÓnºé¦Gyälö"VŒû‡ EQ2™Œ±MÙ¹sgé«ÖÖÖÒvOOÇqmmmùÈGn¸ááéMY¾|y[[Û /¼ðÒK/æÎû‰O|âãÿ8 ‹)Šb6›3™ŒÇãÉçó!„дiÓ†Ñuý}”çþ`øÔ§>U~?OMÓŒkçw¾ónGrÑE­[·nØN–e¿öµ¯ýèG?¶,ûnš(!¢(RJ9Ž39Š$!›m0fÅtþ³Wíyû‡u‰0ŠBF§´àõ&=žéßýî¶ÿ÷ÿæg2DQ4MãŽ|*…²Ùlª¦Å¢Ñ“-ydüOݶmÛ7¿ùÍ5kÖ”ö§Óé¯ýëF ({á°{<ÞPH.t°<²q47ˆ!„vM“5­³­íMŽ[²té”™39Aè=tˆ¦Óª¢0&f i ,â¾4JY–ï¸ãŽ·ß~û¤†ýÁS1î›O|âÉdòÈ‘#ÆGQÇs`MMÍ~ðƒPË.»ÌÐ3žƯWQ„Pss³Ñƈ«ù·Où|>>ùåˆB9í}£$ÕYÎ¥—^zõÕW_ýõš¦¿+H©¢( ÃpçõzÃ==MÍÍÎþžÔÇnþÿnj}Ì%uó³²\ÄXaU’8YQTtÝ4e íêÊåóŽ`0U(˜L&«Í–ˆÇÓ©Ô{Ÿw„pØÑ£G¿ýío?úè£åÅN¯ºê*Aî¼óÎòÉd²«¯o²‹µ¸´bb†åî´(C½©„‰x\.÷ìÞM-–ÌÐPQ–MV+Ã0ðØÍ&pûí·üãïììÿ­;#T|î›ÁÁÁ—_~¹ëã±ì&“éË_þòóÏ?þùçÿƒFe³Ùxž÷z½ýèGo»í¶«®ºÊëõò<¿jÕªÐ+œ,óæÍ[¶lÙIw€T(hšf½ñ<ïp8¼ÇÛW^]àÌ—¾ü¢&*x´—Ïç §¶®#†7Οïin–ûˆ$Ë¢(Žút?±oËåþú׿Ž\žùüç?o¬ÆÓ²³ÕZ[_ÏÛT[­Ä0ÄBåþ¥Óåé&.MööîÚ¶mãsϱ ³jÕª‹×Nš¤CˆÂǪGJßÌ™3çæ›o>©ûvF¨÷‰ÍÊ•+Çßc¼zõê#GެY³¦ÜW‰DZË(‹§>°êêêoûÛµµµ·Þzë…^ø…/|á¬õ·œYƳpWª’q²5+N@4}ë­·Æï26ÎȰ,Ëq’$¥ ‹Ùîêêm;jUŠ_ßôs6/ÕN—ëfK›Îär™p8/Iº®Ë’¤òâK/É„@–ä Š¢`2)ª:¬Q$d”Á@hxù†±iÓ&CJÚ@@@!$_(’@/bÎBëZäèüÆž¢UÁÁXV”ÁH¤ýàA¡B&SU]íöùžç,8Æ 饗Î~Ÿ ¨÷‰Îš5kÆ™õ3mÚ´çž{îOúSmmí°¯öíÛêëëkkë¬_,yøþð‡ÔñoБHd¬s±,»|ùòßüæ76løìg?»nݺ¿þõ¯—\rI©AOOÏo¼±}ûöW_}õÕW_M$㹄+ïérÜ}Šñy>úè—¾ô¥_ÿú×åT Ñö±0¬›Ùb±ÙlÙlVÅ€ßïñz3é¼}e¨„§°÷Þxg>®ÅS$ƒ±% 57çfÍÚÿÃÝîÃû÷[l6áÐÐP4ʲL)UTµÔéƶïFƒÙ³gßzë­×_}ù×­[÷Ì3Ïüð‡?e=hT5-Ëá>Ô·‡I U’¯|âö¯]ùš:“ß/Øí}½½{·oš¶háÂ@ Pߨ¨ëºÍé,ï¼ü†ÿïÿþïsÏ=Wò…žµT|î„ÉdÊår'hãp8î¼óÎ;î¸ãñ㇋L÷ý÷Ž›>6¨£xûûûß~ûíóÎ;Ϩ¹‘Ïç_zé¥óÏ?XJ½Óé$„¤R)›ÍÖÝÝm,ó®^½Úx'èïïß¼yó¼yó „Ùl|ØÛOÀø'àåJ^§ÎÂ… —/_>ì]ʰ­c©©p{½šªÊ’d³Û›'ƒÙ²9°y`n{4—'ÿrô©ýaoÚ.¨‹Åln¤ô¦G¥šVâêëÏ_º´«¿?žN‹¢èDQ$”*ÇÊ(–gK£BháÂ…ÿýßÿ]¾Ä½víÚ›o¾¹£££ÔsËø›šŽ=*¦(@dL„ås!“Éno°XTUõõõuv†»»uu›­¶º:Ë£‡š›êr¹n½õVI’Îòbã>!Ù¾}û³Ï>»aÆRaÒ±¸öÚkï¿ÿþ÷¬T×Îþß »g5{CA[_ß(Æçù)S¦ìß¿ÿ‚ .X,–‹.ºÈçóÚ[0Ôu½±±±¶¶6N§ÓéT*•Íf'MšˆÅbgúôéŽã(¥J%Ȱ,±¾|稆l˜`˜·÷t%Ô\yå•'{ˆqj—Ë”D±®ººË BÈÔ7 ¨*îUtlQxU÷)Ãþn¤ª®XŒèºCÓLm‡ù}>›Í–Éå¢Ñh0Ô Át}¼;g‡ã8E–K7ŸÂ …Ê£Ho¹å–òÑ’cÓ|B©Ýç#Á`\–!Ç„(Æc†çx|¾bOÏŽ-[®¸îºi--˜ã"Ñ(ƒ>V«odvBèë_ÿúÉÞØŠqŸ0d³Ù;vüþ÷¿ß¸qãàà ¥”eÙE‹Í›7od¬`ÆŒ?þñ/½ôÒñtîsÀ+/¨n™ä*ER£X,öôô”a „cõær¹|>_OOÏóÇív§R)·ÛmÌÜ›ššZ[[_ýõššš -ó>@e––…Ó¡2çr¹ J¹CcØwpZk–3Vê Žçmv{2·ÛlÍ“'756îüë_UŽS8X,€aËBŒBŠ$AY–…!©®Eéêì_>Ÿ—$iëÖ­%IÛ ›XªjTnL¦™³fÕ74ðÖ£eã30ÞˆªªšV,³Ù̲˜a „DÓ„ ËB)¥,Ï#Œs™L2wx<>ŸoêÔ©.»=›H¨ïûÆi*Æý,B×õíÛ·oܸqýúõ‡6lz}}ýêÕ«W®\¹|ùò±c®¸âЇ~xÆŒ?ýéO—/_~Æ×yxà]×!„v»eYJi.—kll|O×ÿDd¬i{ùN€‰eçΟ?mút1“ÉÇã„*!:¥ˆR†3BVŒÝµµ-Ó¦EâñÖ·ß–…–¹hάÈ=€ÀçõZ-–ºPÈÊqºª&³YÈq„UU·¢ëB„1%„B(5,;€B¨¨j,‘¨on6q\•× êéës:‚  …ÑÏ;Bßÿ=}GåcÆ`dYÆ,Ëåp±ØèrQBˆ‘^!€h€eYã|.×ßߨ©-<ZæædžlíYCŸŸyDQüË_þ²~ýú7ß|³«« ÀqÜŒ3®½öÚ}ìcS¦L)W•‹/¾øg?ûÙç>÷¹³Ä…ý•¯|åLáƒcÔ_þ0ï9й ´47çûûÍ”ri‚`q»] +Ï£lÖ¤iãD.t:—^tѶM›Š²\š¼ãã3àÉë(€8œNŸ×ÛP_ï´ÙÂ==²ª–]WUJÄRJ¡`Œ)!€®i!@)%„‚yþ2‰„Ýá˜ÒÔ ûF @:M¿Ï¡î¢˜N&3™ ÇqDÓ(„˜aŒ'@×4¡Dkµj‡ÃáúXÌéóùüþK—nß±è:¨¸e>HŒçù*'?’T*õâ‹/>þøãÛ·oO&“Az‹ IDATV¬XqÅW\{íµÁ`pü] ‚ðå/ù6Ò 'AyveÉÉ>cÖ¬ÉS¦äb1«®{¬Vg(dªª²8ïjÞªªœË‰ƒƒ åãñ„ `‡céòå[_=¯(¤ìQñAZóò3RB¡Pss3ƒP¾P°{½ˆatJYEPÊ d!%D‘e@)€ê:€²ì»þwcS׫}>Y–®×ÖÔx<—ÛÝÓÓ3R&a¤Ï[t%?NH¾P „ºˆa!:!Dׄ@×EQL$üÒ´Á|À2 ÕõI“&±Eñƒ¼ó§fÍš5ÝÝݥϋ/þÙÏ~v²½ÜrË-V«õÁüæ7¿yúé§ûÛß^uÕUO?ýô)¾‰«ªzóÍ7§R©gŸ}ÖØ“L&oºé¦W^y!´víÚŸþô§6›m÷îÝÕÕÕ@à]ÍŸ?ÿá‡KMå™gž¹÷Þ{Fù·ï|ç;£FpïÚµ«®®n¬ÀñÐÞÞþç?ÿyÆ †b"Àçó]ýõûØÇ.¿üò½àí‡ TfþÊw‚2WµÛã™6k–,Š»}åe—M9 B®PàXV–¤|6ër8ò’dâ8Òdoïÿ>òH¸§Ç^SÓ8eÊ¡ýûµ²7z,°Œá uÿû üÍÃÏxèС}ûöµ¶¶¾ñÆ?ùÉO×\s͆ Fí288¨(Ê®]»Œ”™QÚµk×Ê•+¯ºêª½{÷^~ùåFP $Iáp¸ä\µjÕÆ”Ò¡¡¡Ò8OŒ,Ë[¶lùîw¿;mÚ´©S§~ãߨ²eË”)S¾öµ¯½ôÒKýýýO<ñÄÚµk+–}bQS¾³€?”D±ÍšM¦ƒï¼óÐ~ôƒüÛŽÂl:ÝÓÝmQ}ôч~øÃW7ovTU¹=UQ¦Í˜¬ªbʦ«°ì¼#9• æ°k¡ÇnZÌæ¦ÆF„Ë0‚ 0,Ëó<1 Çqc„1FèºQr ¢R‰¦)²œ/ÄbQ•e­PP³Y5—‹õôô´µIÙ,‡ÐÜÙ³-e‰lÃòþOeɸ†ã¬6ƒ1€èº^,šÆi³QJ)B&‹…g*Ib.WÌf­‹ÇëE±,+0ÌÄu Ï}îswÞy§ÝnŸ={öwÞyÝu×Ý~ûí«W¯ž>}úæÍ›ö³ŸMš4©±±ñ†nÐ4mçÎÓ§Oonn^¸pa¹(ÚêÕ«3™Lkkk<omm]»vm>ŸÿùÏžJ¥¶lÙÒÒÒÒÜܼxñâ믿þ«_ýª$IÓ¦M»ë®»b±X}}ýæÍ›K]Ý}÷Ý MMMk×®Eñ–[n¡”~ÿûß/5ˆD".—‹çù©S§>öØc—\rɽ÷ÞÛßßÿï|§»»{Þ¼yO?ý4à“Ÿüä÷¿ÿ}Y–×®]ÛØØ¸bÅ ãð;î¸Ã/ߺuk}}ý0¥­Ûo¿ý?þã?þøÇ?öõõmذaÇŽ“'Ož2eJSSÓ믿þ½ï}/‹ÝyçýýýŸúÔ§?ñ‰Oèú‰Öù3™ÌäÉ“/¸à‚»ï¾ûèÑ£çœsÎøÃÖÖÖƒ>ôÐC+V¬à8î´ü-+|ÀŒŒ7/EÅ”öc†©®©Ñ5í¼Å‹ç/Z´}Û¶Ãííþæ7Ÿ¾º¾~Áyçéè¸÷®»žËç·»Ý/#´à /]µÊãóÙŽsæÎeFX·ñXð÷giÙFùEÕÖÕ™L&Õˆ ¤Ô¨¤Ê`Œ0F,‹9³,„PUM–UYÖu]QUUuT]ïïééhkRTUÖ4 !ävd9<0 ær@Qëëêêðñ èxWÌûHÓU5a‡Ã¡éº"Ëšªê² ŠE„»A¨éº®ªñp8ç‰hOÃéäx^>¶æ1Aå±”L&wîÜù»ßý. ýû¿ÿû/ùË}ûö²$_ÿú×/¼ðÂX,æt:¿ûÝï– …B‹-zá…Þzë-›Í¶|ùrBH<×uý«_ýêG?úÑh4Š1þþ÷¿?gΜ_|±­­­¿¿ÿµ×^Û±cG:ž={¶ÑO{{û=÷ÜóÈ#>|ø­·Þzê©§Œ¿_|±t®[n¹%‰Lš4iÊ”)ëÖ­óx<ßúÖ·jkk§Âàà ‘)Ç3™ÌO<±iÓ¦ÜqÇÆá—]vÙ_þò—þþþ^x¡¾¾~T×vKK‹ÉdjkkÛ¼yóÚµk“ÉdKKË“O>ùÝï~×ï÷ßwß}ãH$²yóæ§žzêü£Qn,Guuõå—_þ«_ýª³³sÏž=ÿöoÿ¶`Á‚³Yæ¿Â{2–¤Ü|xçÎ<ðÀç>÷¹7ß|s¬Ëkmm]²dɤI“JiÊ—\r‰ßïöÙg7nÜ8V*QåÝår-[¶ì®»îš?~___yB¦×ë=ÿüó¿ð…/$“I#qã·°mÛ¶ ½öûÏŒ,ËcÅ 4¯´,¡Ñ°ò.§S*ÆýÝÝÝíí‚ P„,{Íæb,öêóÏ#ŽKf³Þêj.Ÿo¼çžØ¬YñhTÊfm6[>7[,U¡PG[[¹QYÙ&›Í–~h£2VL'F¨®¡R*I’Àóº¢è„@†Ágø]!Bªªjš&K’*ITÓH¡€XVS1ŸèîV2¡nGQÓ…DH0›‹¢˜ŒFy·›Ã¸¹¹ÙãvGãñ‘AýäøWŠqRJ“% Ah$R骪È2ÔuFÆf–e[,„s93ÆUõõŠ®]×uQŠ&f¨ kq°DF¦Ìºuëž{î¹õë×ßtÓMn·û¦›nzþùçׯ_ÿ‹_ü¢üÕ«W:thýúõ×^{mù~·Û}Ë-·<ÿüóÏ<óÌüãéÓ§×××ÿâ¿X±bEMMÍÿýßÿ]~ù奯~¿_UÕîînUU»ºº<ÏȱÝ|óÍÿú¯ÿ:mÚ´OúÓ×_}j„Ø¿$I”Rý^[[ÛÞÞ.ËrɉÄqÜÚµk×­[×ÕÕuõÕW;6‘H >ðÀ„•+WÞ~ûí¡PhÛ¶mÖa_yå•ÿøÇO<ñįýë1oíˆûYa"òøãïØ±cä~:bmLñtôc¹‘×kµÙÁàÂE‹Ì ãF¨V‘²©ÙR¼!áp1™¬®­%ºN(¥ R)6}ºáô(‹Í3fØìö’’Áû[5íììüÁ~p‚'pm³ƒÁb>ŸËf}€ÇífŽ™<žã „!JÐu‹1Dz,ÆRM–3©Ñ4C(8HDBf«Q `†A” ú\®¦ÆÆ‘c8•×£@6Q¡Ãn‡`9ŒŒY‹…³Ù8“ ³¬,Š©h4“Lj²Ì0ŒÍéœÚÒ°ì®;‹càONdtZZZ.»ì²o¼ñãÿøg>óJém·Ýö_ÿõ_ŸýìgW®\ÙÞÞ^Þ8 -X°Àn·—–d n»í¶ûï¿ÿ¦›núÈG>ÒÛÛË0Ì%—\288xþùç/X° ‹]qÅ¥ÆóæÍ»à‚ V®\¹lÙ²t:=ªdóµ×^»aÆ /¼pÕªU÷ß¿1û¶Ùl¿øÅ/çÌ™sÏ=÷¬\¹²­­ pã7ÆãñeË–]wÝu¥n¸á†ƒ.]ºt¤OfÚ´iUUU=ôÐÝwß=cÆŒêêêõë×_wÝu­­­ÆÓÂf³ýä'?Á+ŠòÅ/~ñ«_ý*`,=– þçþçW¿úÕ°ý'x[/M±9ž·:Âd*Õºe‹×éjË%çì_÷øàg/ý¨k–ËìcY’Íf)!†ð€¦ª¯¿òJd`@–eCzpÖÂ…µ ï;‰á‰'žøÿøòWí±yQ«Ýα,àâË.[´d‰'p8º¢ä3™t2™N$ÒCCùx\Îç!„š®çD1JõwttwvF‡† Ƭɤ@¨ HR"&²Œ4Ñ4¢i‚ÍÆšÍB€†††‘ž:¶‹æ=y7ÚG×ó™L!ÖeY,TU%P–• ‘T•áyžãl.oµ„°Å‚XÖxÅb’ª’“?ïY»7óÅ_,…jüçþ§‘;€Ú°aà /¼P,W¬Xá÷û¿ò•¯ÌŸ?ÿðáÃwß}÷9çœ3¬¯'Ÿ|R–eÃ' wïÞÝÐÐð­o}kÉ’%÷Þ{¯!xï½÷ÞvÛm¡Pè®»îºõÖ[ËÝ,ËnܸqãÆ¹\î²Ë.«ªª’$i÷îÝå1Ž—]vÙ¡C‡6oÞ¬(Ê=÷Ü3kÖ,ãÔ[·nµX,?þøóÏ?ߨØXUUe2™ª««wíÚõÊ+¯,X°@Ó´¦¦&ÀܹsTþòÁ¯Y³¦4=…BÆKÃ#<òç?ÿ¹®®®±±1•JQJŸ~úé·ß~û /ܲeËáÇW¬X‰D>ôÿ™©®®þÝï~÷ío{ß¾}åûGõÉ”o „š›yA ”ò¶s§4»ªò_¿ï×¹ø/¯îÐî¶q§&R)Ê0òäÉ€ãf/X`w»åÎNÁnÌæH$b±Xæ,X0ÐßßÚÚJG¬Þ—Ïåáño<­­­S¦LÙ¸qã§?ýé_éHI#2 r—;÷ÜsM&Óx®tØÁ?A¿àñzYŽ“eyϾ}“C55˜arù|*•"ºî°Û!Æñ¡¡!B€Ì0v—Ëãõš1fY–BHU•‚"Ën'™HÄm<_eµÆb1‹Åâr:‹±X¹==ñO@©vÀêpxü~Y’DMKg2b¡py<¾šUUuJ!„DQ¬6›·¶¶åœs0˦“Ép8,+Š>Ñlz‰‰š¡ú¾±X,<ðÀܹsO¼¸T¡B‰^xáÕW_:uªáëc`8q)B̲>¿ŸeYJ@,÷ìÞm® 6›Ð3‹›~îy½¯ºì*ÑHz ²ìÔ´†GÉçóv§³}îÜöövF ©ÅØà`_gg4 9±ˆÍ¨ëY³g¿öÚk†NÙ <ª_ÛX“´Y­MÓ†ihh¸ùæ›=n7$Ä$’,'‰H$¢êºÕáÈ !̲T×UYÖU5‹± CÌf‡Ã!˜ÍãD"açyžeyŽs8ˆaX†é ÃqœÛåŠ3î¥ñ”ž¦cs¬+*m°ÇšLáp¸?&ò‚PÓÐ`6›!„½==—  HÏq»Ýára–ýëÖ­½==ú±›6íû?qç8®| ·B…³{÷î_|ñç?ÿyéý¯ä8Á^”¤­›6Õ…B MM‡ÃátF‰í’4/Æ\0õÍ_|âö#‹g_³íOÖçŽæ!ƒ% ¤Óš¢ª«CÍÍÑT Z,€®îî¡x<ÜÛk¨gR2âØFiª>rT>¯÷[ßúÖ×¾öµ§SŒ|0–EÈl³a„òù|$éîîö¸ÝC‘H&VWs<ïöûSÙlgo/Ñu¢ª!«Ùl7›‹Ù,ÂØd±È¢Ø‡B¡`0ˆ16Ûl! Ï#JBª®‹ª*‚ ,Ï{|>ØÖ6ìOœ&6%ù€b±8‹õ H²Ì3›‹erSSwww>ŸW 9›µÚlv»=ºÜît:D!ø„oig3ÿtƽB…“¢®®nݺuåéÆãù¥HŠÒÑÑ‘ÎdjC¡@0èôz ÇõšÍþ÷sÕûú n^ˆæÌf»G0gÃaÎb™sÞyîêjQQÂét[{{{{{AK!•c…ŽðÌ”Ëz<žG}ôOúÓ‰Ç<êEå¥Ùt:ëšM$Þ~ã “ PM³8Çy}>VTEÁPBLçt:Ýn·Éj%ŠÒÛÑ¡RÚÛ×§)ŠÇëE§)JA× …Ëq¬ÙœÊd(‚ÉD(L&:bH#C’Æ =æYÒTUR c›ÉeIŠÇbBŒq.›%ñ¸©X¬jjš:}z2öƒ€ØÀ t­£–¨÷ NÄX+Låz£N댉v<OÄãc 0µ¥Ehiµ¡ž!´/m²š®XXv뫯Ö8œßK$ö8°éµ×2Ùlɹ>jÚNÉ CËRJ‹Åâ°™{ùå‹g'¸¢ï˜#$˜L”RUU1ÆË–-;|àÀ¡]»€ª:L&EQÌ‚àõz“i('ª*æóP–U“ ²¬®ë¹L¦˜Ja„Ìv;k2J¥|^•e‹Í¦(ŠÀóA»Ýëñ$’I¡/`Yvä0ÆRÑçå@J!&³™åyjnª*€ÓáÈf³Ñh´˜Ï;(5éz±PàÍæ`]Ý;ôööJ¹Ü¨/L…Šq¯Pá¤)ŸSO,§dt]‡ÃáÖÍ›'75UUU™xÞírµŠ0ÞßÓ“H¥²ÅbGGG6“!ÇÏÇK“÷r‹VšËBEQ–9¦Á±ÁÈ'™õ3Ú^h¶X¥¬É  Åâ´Ù³{È A†¡‚ iZ6›E‘AHQ”\±¨#ä uMÓuñ¼×fà c¶X0ÃBAÊd4E‘TÕb6›¬Vß_  ŠÅa NÅRºo@)Bh6™4M“D1›JUÕÕ ¢(DÓ4–n·5èîéIår‘HD’eI–õã cM,çLŸW¨prhŽwœ x¦øa˜é¢ª9|¸ïða€€€v¬jhIНdJ@YŸå¿èø' ø‡ª@Èr\ÿÀ@o__¶X¬ª®noo—r¹I--™¾>(Ë!JÃ0,Ëò,[ĸ¡©iÞyçI¢ˆ’ý~]UM3<Ÿ/9Œ¥LI²XjL&Sx`s\äIùlv ¯OÓ´_-³¶ï1ð²?M¾P Ñ(!$KÏóf«3 ³,FHÕõYK–„&M*HR­Í†&JeY-û N8*™“*œ4å6·4g/ŸËl_Ú¯ P € €vü í¨özXçôXìé5èÃJ˜¾k!d9®P,Z¬ÖD"‰Dê,v{<•²ºÝ ËUe²˜LUUUf³Ùaµ†B!#T†gYAxŽËg³‚ÙLIÅ㉡!б?d¦³½=:0 ©ªQLUQUI’NãQ40ËRJ „2™8› BX,ÂÅ|âu:® &“Ûç£r9±P(Š¢ªëÕµµV‡CØw8 !‰p8ŸÉ¸<—ËE(õ&³YÑ´Óåã¦e·—RʳlÐëõX­>»E(•Häs9±PeÙl±XœÎÁ¡!UÓ B›ÞzK–¤l6;q#Ü *n™ N züüýK¬'˜qj¬éñÛã©}*Œ:KÕ!Ì ˜e3ɤÝn8zôèâÅ‹mVk&OE£=ûöu÷÷gDàu: =Ȳ Ç%ãñX8 !ÄfsdpÐd±ø«ª¢ÑèP:/U­mh8g·Ã1>rôh:›ÅãSa§“û—A¨¡®ŽUU¥P( ª( 6[8fÆåv{½Þšššh,!”$ "”J&'âl½œŠq¯PáT¡clã,»5œœá¸T*%B6›UU"´{÷n§ÓÙ8iÑõή®Þh4Ëi”¦âq+ÇIÊæóýá°$Ë…b‘g˜‹s‚Ð~äH:™ôx<—KUUI–5fΙӟw95µµ<Çñ,«kZuuµÀóû÷ïW ”dY,€®ãqÇÔŸTŒ{… (ggY®ayöä˜eTT•R êïﯫ¯ÏærŠ¢%D „FQ J¥À ¤Êr´¯Ïi³IŠ¢H€êºB) “ËÅ –eé´ÕbÙ½gÏàà Íáhœ<¹¯¯! „1Ž*Ç»ŒÆ_zøïÒ4”RB „B€&Ë6«•A@u@XS[‹ äYÖj2Åãq©X¤º>—Ê©÷ ND$)×Sìêê:ÙÚ,„|>oÔ•ÎÎN£ÂÁéE–åò¡Θ1cü‡^UÓ 'Šb&“ ƒáp˜RJ)ÅSJ!Ã]/z¢ª6Jš5›ÉdÓrN Ë„ ÆcB©¦ëj±(JRAAh˜4 cì÷û-K$‘% B8,Ñx–ëßì¾0ƒ„êºJˆçpð—ËdtEX­^Ê$ IDATVža¥sæÎ Åã¢(jïYù¬§bÜ+œöìÙãõzË«µ¼'ñx|BT°2L®ë½½½uuu;wîgüI UU)¥¥R0¹\Îf³õ†(¥,ËÆb±QËŸ"<Ï{<žL&ãp8ï¼óÎÉö@EQ'À0L±P˜Ô؈1îëëSÅ<¥TÓ4tÌ?ÃRzټ査‰HÊöÿýÅãoÑM& !¥Ô§×tݼÑr9—ÛÍ Ã0N§cìr:=Ê2̰ì\rüÌý¤äÐ1ãŽF‡PÊ`LE1‹e³Y·ËeáùÚš]Ó Bv»½»»1Œ®ë¥Z¸—Šq¯p „Äãñ’qïïïóÍ7Bû÷ïoii …BãÎÎÎÁÁÁ/|á  ‡Ã‡òûý”R³Ù‰DÎ=÷ÜK/½ôÌ^ŠذaÃk¯½öàƒžb?™LÆf³Åãq‹Å"˲ÛíÖ4í´Œp,~þóŸŸsÎ9«V­zÇBˆ®ëºŽ¦¦¦&TWÇó¼Ãá`¦¯¯Ï(M…1Æ뺎0”šE1°öâ;æúUõÓŸøÒ9½÷ °®L&£i„P×uC£Bh³Z«««„MUBµµµV³9†Ãáa7¥Üš«ã3îå9·„›Å"I!„UUœJe3ãx‡cÙªš€¦(Åb±¯·W§´(ŠݲƒŠq¯pZÐ4eÙÒGžç/¾øbJi, …Buuu{÷î9sæìÙ³ÍfóÌ™3c±Ø‚ L&S èîî®­­-/¥{RSSN1`±P(Øíöt:]UU•H$\.×ðê …Nây R„P ˜:u*˲Š,c„Bµµ‚ ôôô J)Bc €ê²üû÷¿äó]—¨4Íž. ʲ,¯/¾ëPÁÕÖÖ² “ŒÇs¹˲‹—.=k–Ïã ƒGŽ 5ªñG(–’‡U5›ÍÆhuJuEº)eM&³ÃÑ8y2¥”êúá¤br\|hhü˶g-ã^á4°páÂò%òwÜal¥É xžÿØÇ>VúX*~{Ö¢iÚìÙ³›šš ÏÃû袪*Çqš¦Y­Öb±h2™ ÏÌ?Ô¾«ªzÍ5×p§ªê{6F#T8~ÿ¢… )¥¹lVE#TÜëñ`„zûú …‚ªª!]×1Æ2êáXó4)Ê0Zxä&d@’$UUuM£„ „¥^ÇîtªªJ ™î¹-_ uMÓ¥¡¾~ê”)CÉäÈ‚± ll㡤 QEMÓòù<Æ@Y–§”¡N§ÕfSdùð‘#‰tšPªIRl`€ß+Wö,§bÜ+œ4…BÁb±PJ÷ìÙ3gÎGÿ­Í}}}<Ï•ÄE–OóÏrr¹ÜáÇK&clåñCÚºuëX xž?Ù>ÇC&“ééé)=Œ¿ÅX ø2ýazlgUmí5«WÏœ9S”¤ýï¼søàÁŽŽÁd²:Ï[ÌæD"aøßUU%„àb±j_ûÍ+>íUÕ‹Sñb*‹F£‘ˆ¦i˜aŒ©®;\.—ÛM)uy<Í“'/Y²Ä¨’L$ÂÝÝõ‹/>ÚÑ1088ÖPO]×EÉf³š¦aB,Ç9].‡Õª®&š¶gï^§Ëes:³ù|:.¤R`b*A–S1îN‚ŽŽŽ`0ø“Ÿü䦛nÚ»wo>Ÿ/‹K–,yã7|>ßÌ™3fŠ¢tvv¶¶¶Î›7eÙ;vx½Þ%K–`Œ_zé%Çc±X<ÏŽ;šššêëë½^ï¡C‡:;;=Ïo¼qýõןÙ+-ÑÔÔTþÚñþ˜>}úiÌ?Ž’‡ºdÙ1<z¡ÐÞÖ6cút§Ã±ô‚ /^Üß×·aýúp$B( €B.§iDˆè:-kŸ|ìß—.ä¾v­¦i¿üõ¯óÅb)¶½¤«~²Ú2ÆÊ¥”ã8–aÄ|>©(„ãì>_ß_ãñ¤ãñÞînŸßŸN§!„ÑÁAEUµ ä*ƽÂIqàÀY–ÍfóË/¿œÉd-Z”Ïç»»»Ngù ,˯½öšÉdÚ¾}»ÓéäyÞb±‚ðÊ+¯H’ÔÕÕÅó|WW×ÁƒívûÞ½{GE<?|øðÔ©S+rg„aU‡XxBŽ<øx6ëöù¦Ï˜<^ïe+W¾þúë©tšaY³ x]®t&C!dYVÅ£Éäsß¹çÜÅ DIÎðÁÚZl±Ù ƼÉÄ0ŒÓnW5ãy–e%IÊd³‘H$‹¥’IÃU•™3Ç̲…TÊL©Q̤äþ&'9›.]‹ác·ÃAT•g˜¹Ë–Í[¼A˜N&†Ù·o_±X4›ÍCá°®ë]{TŒ{…“bîܹ Ã\qÅBH0Ìf³uuuªª–/6 ‚pþùç[,ÃýÂ0 Ï󺮟{î¹ýýý”R«ÕÊó| ðûýUUU€Å‹›ÍfŸÏçõz+ŠgŠr=wže/¼âŠå_¬0‰lxöY¡×ëE fsÕJ)‹Eªë,Çi„¨ªšJ&ãCCG2¹7Ï›Lš•·ræy]×­v;FH×u^xžÇ†\Bét:›ÍÖÕ×{·Éä²Ûû»º¼^¯ÃãÉ JÉñNöñ;ÁK”!BˆÝn'ºjkjZ¦LYvá…H×)!á¶¶pØêppW(»::&®Ÿ½œŠq¯p„B!€aŽ œN' ¹¹¹¼˲sçÎyx0,7Üå2õõõàØJ섈ÿpƒŒÕTžŸqÎ9·;šHp<fhhHÓu·ÛÍñ_ßà Ñ4zÊE…†aÆl6«ª …êëmVk:“ :!éBAVUFuMËf³}ÝÝÆKè0Ì 7‘?3¡+L86oÞÜßßR‡>|øßJ’T.ÀbÐÚÚZþQ–åa{*œ.Þ)2E£€Žeý>Ÿªªííí‰DB×uJ)!¤X,ŠE#5•Ljºn·Ù/^lµÙ8žw¹\,]j³XlV«Édx€2–y¿r*™ôù|‹…ç8ŒqrhH×užãÌfó0‡Ìqc¯€H©ª(ªªz=‹ÙœÉdÚÚÚöìÙƒ9 4[-@©Ífëéê*éA“¢œp‘‘•™{…ÓÀ¬Y³:;;KIL‰DbÓ¦M¡b±èr¹†L§ÓË—/oooç8n×®]Éd²X,rÇëêêæÏŸxì±ÇB&“‰²{÷î+¯¼’aUUÿò—¿´··G£Ñººº¶¶¶`0¸uëVJiooïš5kÎèÕH #> Éx2ŒDÈbµöôöŸ/8Žc¦iòäyóç4]W5Íç÷#<ØßÕõá°ì 2s¯pê@׬YS¾ Z[[kü,zè!„˲ .4"ÄÈ™o|ãFBÈ» k&“I«Õzà 7PJ>)¥n·{Íš5!C:¼»»{ÕªUô˜’ø™¸è!Êj(ºžÎdtJ1B!»Íf·ÛEQ”%©¿·Pꌿ)!!ÄqœÅçËg³{ÿö7YUMs{½ç.\øÖ[oe³YI–`sÃñât:¡uβÏs³r „tEQu`LÇNe?B†a!FÈf°ªê’+,f³®iÏ›ÍæB±H)ÝÓÚªªª~ìŒU¸|¢P1îNš’IUÅPL¡¼AI8»´ß›)}5ßXG+¿‰çùÒöêÕ«Où"*Ç(>TMèë+Ìžm6™4MÓ TdY–åI“&u´·Ûl6–e“É$@‹ÅÂ0 ƒñÊ•+#‘Ȇ?ýIS ¡NˆÏï—%‹åóy]×A`YB(É2ÂXÕ4›ÍæöxXã9¯ªšªæ"YQ0ÃÐé]'õ0G†¿žR›Í†16<3˜a8ŽÃSB¥8göìž®®ÎƒÕc!¡‚€™Šq¯pÒ<õÔS×^{í¾}ûR©ÔôéÓ}>ß[o½åv»G-DwèÐ!C` ´QáìÇp˨„ûû‡‰¦ÆF@) ”çy·ÛÝÛÛ«jZ*&ÇÒkld«Õê°Û7oÙ’²X,f·@Ø×Û{×]w©šf¨cŒ5MSŘé[m6@i¡PÐuÝjµ25-[(D‹Å"y_bÃ.„ éºÉd¢”ÚíöX,†Ú»o_ã¤I¡½{÷Zl6BÈŸ{¬ IÚDžª£bÜ+œO>ùäÅ_ÜÖÖöøãÇb±¹sçnÚ´Éëõ:N“ÉTjÖ××÷ÛßþvÕªU}}}‡êìììííM¥R/¼ð‚×ë½ñÆÏÜT/:©Tª§··®¡Áf·y³¹±±±«»›ãùB¡Éd ©t„P¡PÈf³ápøÀþý „¡P߯(J{{{N–B†«Íèa†ã¸×^{-N·´´pxèX,Š¢ZZZ6½õV:“1.ùÃ1mã^ᤘ5kV8>ï¼ón·»©©ÉãñœsÎ9/½ôÒ¢E‹JÍAX¾|9 ±±±··×étBB¡BhêÔ©glôN€.Ëm‡‚Á–éÓ!ÆÑ¡¡ÎÎΞž¡ÅbyWë!£p‡Qo¢Q*æršÅ"‹b.‘-†ÑuçùT*µsÇŽ¢(öìÙSÈçÏ?ß,éDB,†††Š…‚~šôóù¼¢(º¦)ª à8.“ɤS)žãv»ªªÛÞxƒ3ë•™{…FFj¤ÔÕÕV®\Y¾Óçó•„!K‚3&"„ÒÁÎÎ-¦2«Ý>ïhmÅb!‡ÃÑ4y²Ûã1,¥òLDÓX­V+ÏqšªbŒ!¥Bcn¬ÇikëîêÒɱBÚ 8a0Ʋ,ç3¢i§%{(—ˉ¢È0 C)˲„C©Íëó9]®ýûöI…Â)Ÿä¬£bÜ+œÂá°Ãá¦;FÀ{;²™$I²,õƒ*œ)þ^ìBU#éTгXñx&›%]O%“Û¹Óë÷O™:ÕjµiMèX‘k³Å `«Ý®Ë2bYr,üiëæÍéÿ¿½3kâÚÿÿ™l$,a“E6qÅQ±  xYTТŠPÛêU{[í­Kë‚E/Z-W½Õ^ýâóXmÁ­¶ Š¢€‚(‹€€ !,’²gf~ÌÜ”MÈD8¯‡‡gæÌÉáhÞsæ,ŸOKK‡õ…8ŽK„B¹X¬E§k+ Ewkûd÷¨\ÞÒÒbmmMÄÉ …2™LOOoĈl=½¤«W•“´°çü…êêj*•ªŒêÞÜÜÌçóÓÒÒfÍšeaaÁår ëëë---…B!‹Å‹Å:::&&&‡˜ž%’Ï566ÊÊÊd2Ù‚ `uÒÙÔðö‘wºL&ârùHU¢w!àÖP_ßÜÔä0y²X,–ËåŽSµ´‚ÈQ “Åj•˱D ÇÓÓÒˆ­ X§¿…€` P,–EA[Û€8;AC}ý˜1c( 1«Ë1ÃÈØ˜Ïã‰Õ´MChî€Åb¡*ë‘ïܹãïïÈËË“Édyyyl6[*•Ž=Z*•VWWO›6ÍÄÄäÆ #..ÎÐÐÐÐÐÇãûÚ>|ø~Éá ÖnîXûšBÕQi¥*Š’§O©Tê¨Q£„B!A´X,‘L†¢(NgêéQE"Aärù£‡ gïε1 ¡Ré †¼­ CÑ.«õ)Þ^¹©±±¥¥ÅÔÔT,3µ´t--ÇŒ+nk»~ñ"Ò÷x“ÐÜ!€L&S z¾`Á‚üüü¹sçÒét™L6aÂ===CCCEïß¿?iÒ$sss===€··w]]]iiikk«¥¥å¬Y³ªªªŒŒŒ(¸}Z­  …·÷ÜåÐ(•ª@QÅ_G©ÆÔ-|ò„ûæÍdGG‘Pø²¶`˜\.K¥€Báñxe¥¥©´‡‘A‚0´´D<Ò)9ÔûAø;†ã>œ2mšƒÁb±´µµ_”–åäà(Šwºo  ¹C€iö æÎ«%Púîï8(†! F!J$”öÐZx{–’¡äìš;!è`܈Ja‡Ÿ.Qæ’VœÄÛ½O6¨í•xØûš»R!®ò:‹„æ@† Ên,Þî¡ÄµÝOß™4Wi¡óñ;ÁUzëTh(Ú°öQÔ÷|‹ÿû+ }̧¯"?  ¹C  )8 ¶ÿÐÚ'6{ß_÷æŽ k·xz{B(¥ *,}x[Ýþ-¼S~ˆÍÒ/ärywq ˆí‹Äo‰DB§Ó‰­ê]†ê%ªõ¾2€h€ m¡¶ôi=‰r8å=LUY\¯€Ö~k¡µ+Ñ@æ»[ê•H0Dm~a }†Øh^\\ŒaØo¿ýHMMÍÏÏW­@,™Ã0ìÒ¥K8Ž_ºt ðË/¿â8^RR‚«ðüùs¢~QQñZ"¶Q(Éy«Ã =ôÚûÅtgÇ @Ö>6҈ʰøû¹'F„’@Üþ#€1C€€v¿{îª3CµÛ`ÏòÄÆÆ.^¼øöíÛIII …"==ÈŠ§¬Àáp222lmmß¼yS[[{ùòe@@¤ÂIMMmkkc0€G…„„$&&–——5 Çñ§OŸ¦§§ûÔi4š··÷íÛ· æÏŸ¯Ò2à°@ oï¡c*ýèÞ/WÖ÷'ˆrVÑ>&C€Þ~›égþÕ™adèú;4wHŸ155åóù¶¶¶DøÔÔTe¤0‡ÃÑÑÑ!¶zO˜0A¡P˜››S©Ô©S§Yôtuuy<‹Å²°°hll$Æj¤R©©©)‚ ÎÎ΀ÌÌÌ1cÆGGG‹ÅápˆñABÖ>ä-owO\e@¦—öGQ™ŒíÓ0}—`*íýwI?Úì°ìg¨:;€æy/^ T¶&ˆ¿J”á;lnòòòê²A;;;ÕS[[[€«««²Dõ2H@µ÷Ü•ôÉþT—Ù`]­‹ï+ª7´ý cr¦¾ jîCØÙ4wB j÷Íwzô<˜Þ§Ø/ïDyoÀP´Ûñ{GyïÜmÂ@s‡@ ï]O¶ggÄÛÛ€Á‰Ö‚ªü~?”`ˆî]R;I¥Râ¸ÿY±X,‰hZZ,]]ÐïÖz@—Íîî•J566îáµ|>_¡Pèéé¹Ý߃.Wñj ÐÜ!áKnnî@5%‘HÂÂÂ|}}“““£££Éšý?~|QQQwWëêê>ùä“âââƒjkk«S›šëÜ!H‘J¥Ë—/ŠŠúþûïùå—Ÿ~úI.—“-ª#uuuAAAiiióæÍû¿ÿû?² .°ç@úŽãáááõõõëׯ'J$Éþýû÷íÛG®0UÚÚÚÂÂÂ0 ›3gÃ0¹\nbbB¶´Áš;邜={–lï@WW÷Þ½{d«P+pX@† °ç ;rssq\™@ ¯¨¨è°¬g8Ž‘‘“Ùuü.E_¾|©ºÇmáóùìö¥2†Éd2wwwâôêÕ«666ÊK---¬¿xñÂÎÎÿ‡T*­««=zt—W‰OI™+¸¬¬,44T“ãÙAs‡¼………S§Ní°&Œˆ ãèèøÎšŽã™™™nnnƒúW† £G666‰D=š7o—Ë522êýËù|þŒ3ˆ¥&2™ŒJ¥ŠD"]]ÝÖÖV6›-‘HûÔ`ï±²²200ÈÈÈðööV(=R^²±±qvv~ýúuSS“ƒƒCAAAg :::...Äd¯T*¥ÓéB¡POOO °Ùl>Ÿ/ºSÎf³çÌ™“ŸŸ¯««kee%ã  ÐÜ!ïCjjª……ƒÁ@„N§ã8.—Ë_¿~]__ßÁܳ²²¦L™’@Ä{ñâEpppuuuee¥™™Yrrrhh¨¹¹9àæÍ›cÆŒyþüùرc§L™òäÉ“ÂÂB:¾téR@KKKZZÚÌ™3ãââ>ýôS Ã&L˜PQQ1räÈŠŠ hî½Çñÿþ÷¿fffýiD.—K$F¡P(y=@§ÓïÞ½+—Ë}||:\‹Å‡ {g#B¡èøÓh´––ccãîºó‰ˆˆˆ‰‰é³nµ£¹ÏM†ÉdÆÆÆ¶´´…Âäääúúz™L–MäAÍÏÏÿꫯž={ÐÒÒª®®.//óæÍˆ#lmme2YIIIssó˜1clllÌÌ̈!ƒ¦¦¦/^¼yó†ˆ5†a˜P( … …ðìÙ³¶¶¶ŒŒ '''.—+—ËE"Çkmm­¨¨Ðmß8é ‚*w0½b±XOOÃ0---6›­žÝ=R©ÔÜÜ\5»‹ÈçóßÙFc2™DÄ:##£Þ;ûÛ·oȨ¥Î ¢ˆÅb///‰D‚ Huuõĉ>|H§ÓNNNNNNÊʶ¶¶+V¬J¥&&&¥¥¥~~~¯^½ªªªúè£D"‘D"144,))ñóó³²²Â0ìÙ³g …bôèÑ‚0Œ¬¬,ww÷9sæXZZ²ÙìÌÌL"œäèѣǎËb±´µµ Éû<>0ˆû¥¶¶öâÅ‹¹\®B¡ÉúŒ EѦ¦&"³X,&T^•Éd}m°÷ÈårABBBÚÚÚ:˜¸P(är¹&L466Êd²ÎPmhhèNñ±twU¡Pp¹Ü±cǸ\®H$€÷3˜ ÊyÈð!==ÝÈÈH[[û;ô0 {ðà‡‡Gw ECCƒ©©)àýº3DR*µ§¼˜‰¤»é»áƒL&knn9rdÿ›ª­­mkkSž2™Ì>íÕ”Ëå­­­Ý]åp8ãÆc±Xý’Ø |>_9¥ 055U(//W½¤««Û9À€T*%îCr¹¼¥¥…ø«ŠŽŽNwiÄb1q'S2qâDÕÓúúz}}ýŠŠ __ß¾½«Áö܇#WSª¦pÍ»ž¿Ñ999?þøã²eËz¨£ÌªÑCææf…BaffÖÖÖööí[“ºº:kkëW¯^;–B¡ôììèì ÃvìØqêÔ©þoš·¶¶I]rôèÑãÇRf•& z¿àÇñM›6mÛ¶.=PÜÍã=¯ªš;IS"ÏÀ1÷áˆ@¨¨k–õ0ÌXQQ±víÚ€€*•ÜájMMMEEÅÇoܸÑÐБ‘‘ŸŸÿäÉ“¤¤¤ÆÆF†a‡¨çÎbüýÖ­[………gÏž­®®ŽŽŽ~ûöíÝ»wëM9˜L&†a«V­Òä‰D’””T^^N¶žØ¹sçãÇÖÙ.’10¤ÿé»hî¿ÐÐаgÏŸ¤¤$}}ýèèèÎÝjSSÓK—.577[[[¿|ù²¾¾þÑ£GmmmÊgÞ”””'Ožõ¡P(b±EQ*•ªP(ˆß4­÷Y€»»{VVÖæÍ›5ösËÉÉÁ0Lu…¢¦}þüy²… :pXòÿ3±-IDAT‰D±±±111MMMDÉæÍ›---;×d2™Ÿþ9ƒÁ¨®®677_ºtiCCƒµµuMM ‘xOKKëÿø‡²¾››1»åããSWWçîî^YY¹}ûö§OŸv—› Ò%D\”7nDDDìÛ·OwÐdee233×­[G¶–.ˆ‰‰9räš;dX€aØ•+WNœ8QQQ¡,œ>}úš5kº{‰……@¹Ãí<=E z‡ vˆL›6 @äJ…ô{{{CCÖ––ØØX&“¹{÷n²u„è³?~üX&“½wÀôAâÖ­[ Ž¡¹C†,‚4ñ$€²’¼£Gdgg«^e2™QQQ …‚X`ÑÓÒÒ'Ož;vl@@ÙŠþ‡D")((ðùü‚‚‚É“'“­è¤¦¦nܸ‘Ø›:räH ‹~N](0ŠHò—”P T³VBsŽèÓšÝ*örvö˜ªÒìÎ s¶nÝ »Õš‰§§'aî8ŽoÛ¶F£õfC¦zHOO—H$ÄñÓ§O5gÃpYYYxx¸2ļ»»»A?Û,©â_M©Uýîˆ$X}Mñ¤÷Í’\ç>©¬¬tu÷næÖbXÙ(µµµ?ûì³AZ§ é''>>^yª¥¥µfÍ ùÇzüøqff&q–_Ö¢Ú/a¤ýýÖ0¹súÙò@Í}x! ÿóŸÿ8p@uK¡* åñãÇ3gÎT³0Hï144äñxÊS6›}ëÖ-WWW%¸»»gddÇúúúª"É‚Ëå:::r¹\ÕB‡CL m4n¶2HÈåò .Œ7n×®]Ý9;àÛo¿…ήát«",Xðúõk²ôã쪧999$ê477ûûûwpöÉ“'È._Íšûp¡  `íÚµõõõ=Ô™4iÒ®]»Ô& ò~tŽ™%¼½½•»ÆHáÉ“'ª! ©©©d‰‚ùóççååu(÷ððPO€3Òæ>\pvvŽïyuÚ‘#G†v>ø¡ŸŸ_ç²²2//¯ÞD$îß¿ÿε¢èÆ;;; ‡@IC hîÈ€€€~ø¡»«7nÔ€Gž™8q¢2å*eee!!!Êõ*j&99¹CÉ£G)6dÏ(ŠO?ýôâÅ‹]^í2VðšûðbË–-+V¬è\>jÔ¨¨¨(õë¼Ý9Ô­[·–-[Ö!x¡hmmÍÏÏïPØÜÜ\RR¢f%€;vüúë¯]^²··ïg~’hîÃÇøá‡k×®Q©TÕaG*•zöìÙþ¯ü…¨ºŸ7oÞܽ{·šWÁeggwùÄ þa÷ÿûßGí§§µ 4÷aÄÎ;wîÜI£Ñ’““ÃÃÕåÁÁÁÞÞÞ$ ƒô•žŽ9²ÿ~µ‰¤§§wYž’’¢Nçϟߺuk76"_ãp‡ vìØÐÖÖNIIÁq\*•LMMß¼yC¶:HßËåVVV]~£uuuwìØÁårÕ©§»› ‘†[m2ärùþýû »Ãd2ß¾}«61¤Í}è#‰Ö¯_°°°¸s玲\&“_½z•Dm÷&44´ƒy!²råʺº:5+!rdw×}ÌÉÉQ³ž·oßþóŸÿìªÚÙÙYÍJÈË q$IPPPLLŒÍƒT‡_ètú¥K—zN´ÑXT£%#BÍß²e‹¹¹¹š•¤§§÷`Ný " ¿ýö["¶²|ø,‚$€æ>”‘H$K—.MJJ²±±IOO3f ÙŠ †rNuÞ¼yiii§NBQ4""BýJz¶ïî†ã•Ÿ~úI ¬Zµª  `ñâÅDá°[éKö£d°àp8Dä&;;»ÊÊJ²å@ ÃÖ­[—˜˜ˆaŽã"‘ÈÎÎA¨YIPPe;DL6›­,qppP³ž—/_²ÙlƒQSSC”<~üøÓO?miiQ³ræ>4©­­µ··xzz ²å@ÔABBÀÉÉI¡P¥!77I–Ç?ÿüsÒ5hpXfÂáp¼¼¼ÊÊÊ<<<õôôÈVQ .œ9sf~~~bb"ÙZH£¼¼üÂ… ÆÆÆ›7o&[ É@sjTVVzzz–——{zzÞ¸qCGG‡lE5A¥R£££;wîTÿ&UMÇñ­[·*ŠmÛ¶é|‡3Ð܇™™™3f̨¨¨øòË/“““¡³7<<<ž={vöìY²µ@fffBBÂøñã·lÙB¶òæ>tÈÌÌô÷÷çóù›6m:v옦¥'†¨‡={öP©ÔÇ÷3G臱/wûöíZZZdk!hîC„‡.\¸Ï燇‡?~œBÿ²Ã”3f|ú駯_¿>|ø0ÙZÔÊåË—oß¾íèèHL¨B  Μ9ãáá!‹úé§ãÇ“-B2,ëÈ‘#MMMdkQ …"22AÇ÷°]vXÍýƒ'&&fÆ 8ŽŸ9sæË/¿&Yf =`kkûù矷¶¶ó«Ãøøø’’—a·S©{ ¹Øœ9s†pö³gϧQˆ’ƒ9r¤¬¬Œl-ƒŽP(üç?ÿI£ÑŽ;F¶ šû‡ †aß|óÍúõëõõõ¯_¿¢Š¾¾þöíÛårydd$ÙZ˜˜˜†††€€€Y³f‘­Eƒ€æþA‚¢hxxø‘#G oÞ¼©Œž(Ù°aƒ¹¹ù•+Wž>}J¶–A„Ëå:tˆJ¥’WG“æþáaXxxø©S§ôõõoݺõÑG‘­¢‰°ÙìC‡Éåò¡½WóðáÃ\.7<<|êÔ©dkÑ, ¹`´¶¶ž>}ÚÎÎîöíÛð9Ò!!!ãÇOOOWÜ]õÀápN:¥­­½sçN²µhÐÜ?$ŸŸßõë×ÒÒÒ ³Cz†Á`:tÇñmÛ¶¡(J¶œg×®]"‘hÓ¦MÃ'íuïæþÁ üýý322&Nœ˜’’2räH²A>ÜÝݳ³³ãããÉÖ2À]¸pÁÜÜ|Ïž=dkÑD ¹TVVúùùeddÌœ9óîÝ»ÐÙ!½„B¡|ÿý÷€ýë_2™Œl9ÉPýúë¯uuuÉÖ¢‰@sÿxñâ…§§gffæÇœ‘‘Ò'æÍ›·dÉ’çÏŸŸ>}šl-ÆÝ»wãââÆN¶ š»¦S^^îååõúõ뀀€K—.ÁˆH¾‚ Èþýû©TjTTTkk+Ùr ÃöîÝ Ø¿? }ÚÐÜ5š¼¼ðòåË“'OêééýðÃdkù0€æN>„³_¼xÑÔÔ4%%ÅÍÍlE¡ úÇñï¿ÿÃ0²åô–èèh±X¼aÆ#F­åÚ;ÉÈåò°°°øøxssó{÷îMž<™lE¡O@@À¼yó?~üÛo¿‘­¥Wäææž>}ÚÂÂbÇŽdkù`€æN&MMMÞÞÞ—.]š1cÆÝ»wÈVÐéôýû÷öîÝ+•JÉ–ón"##Qݵk—‘‘ÙZ> ¹“FSS“Ïýû÷gΜyûömèìu2{ölŸÊÊJÍï¼?yò$11qÔ¨Q«W¯&[ˇ• Q3„³Îû#5ƒ ˆ‹‹‹ŽŽNHH›Í¨f †½½½§§çÆ.Õ××9rägŸ}6a„js8€à8N¶†aGAAÁªU«Š‹‹çÏŸg``@¶"2Ô€æ®n ½½½›ššV­Z #A Á޹«•ÂÂBèìd°æ®>îܹãííÝØØ¸~ýúsçÎAg‡@ ƒGOæ^TTäíímhh8mÚ´ëׯ÷²E‡SWW×›š<OyJìP077755ýâ‹/ø|~/ÿ¢*/^ܸq# ±±±ººpúôé>­=pàÀš5kˆã„„///@СÎÏ?ÿ¼k×®> ‹÷óó{ûöíÑ£GOŸ>M¥RûôräýÈÈȘ={¶««kzzz‡«r¹üùóç2™ìõë×^^^\.w°õ¬_¿^5U÷Æ:DŸ={vÅŠ555^^^ ƒ­dÈÓ­¹óx<.—{âÄ WW×åË—gee0  …r¹\µ²T*•H$Äñ7ß|³{÷nâX.—‹D¢î†õ½¼¼®\¹¢<‰‰ùý÷߯]»vëÖ­{÷î8p@Ù¸H$R}!Š¢B¡PÙ,Q89r$1¥~üøñU«V¬¬¬Æ×¥€.å•””<~ü˜8æp8÷îÝ#Þ¬T*‹ÅDù‹/ˆ¸Kr¹EQ‰DÒáé@||üªU«0 û÷¿ÿ½eË–jB Hiié¢E‹ØlöéÓ§íììüüüã¸P(TúCvvvMM²¦™™ÙÉ“'‰²çÎ322b2™3fÌ RÓnÓ¡ñÎÈd2¡Pøí¶Ux7\¸pB¡dggã8®P(6mÚߨØèååE£Ñ¬¬¬nܸãxPPÐÊ•+MLL ÒÒÒÙl¶ÁŸþ™œœlmmM§ÓÛÚÚ:äêêÚÜܼbÅŠÏ>ûlÿþýt:Ý¢ººšø‹[¶lqttlhhÀq<555))‰abbÂd2×®]«P(Nœ8±`Á‚éÓ§Óétb õ±cÇ  FPPD"9qâÄâÅ‹‹‹‹MLL´µµ?õÉ'Ÿ$$$899ñx<7uêÔää䤤$+++:LÜ*BCCG›››››ûÝwßšššNž—7n\ºtéܹs©©©iiiË—/ÿöÛoOœ8¡££»dÉ"†§¿¿¿µµuBBÂ?þñ;;»yóæmÛ¶ÍÞÞ>%%%55µÃßB$44”˜2•J¥ãÇWöÁµµµKJJ••}}}e2™T*]°`“É\¶lÙ¾}ûfÍšuãÆ«W¯öðMŸ>}ÆŒ›7o¶°°ÈÊÊÊÌÌT½zùòå–––Û·o¯[·®‡»¢~¾øâ‹k×®yzzÚÙÙUUUÙÛÛGFF677++0 :~èСÎ+ÊÖ¬YsæÌ™%K–”––zxxL˜0aåÊ•K—. U®º ˆˆÈÎξzõê?þØY€¾¾~uuõž={222 E—AÊ&Nœhoo/ ]\\TË×­[·qãFEÓÒÒÂÂÂ|}}.\¸mÛ6777"$Ž¿¿?àË/¿Ä0lÚ´immm0‰‡*=íPÅ0,55µ  `äÈ‘‹/&îÌiiiæææË–-c0yyy¦¦¦ÖÖÖeee†Mœ8±¦¦æÊ•+‹-²µµ½zõ*—Ëõññ™4iR~~>ŽãÓ§O///olltuu}òäIzzúºu딡-*++ïܹ#‹œœæÎK¡PÚÚÚ®\¹ÒÚÚºhѢѣG¿zõª¥¥ÅÉÉ©©©©´´ÔÍÍËå&$$ggg777bøhúôé---.\˜5k–‰‰I[[ÛÔ©SÄGGG€T*½víZCCƒêÓÜóçÏÛÚÚœoÞ¼yñâÅìÙ³E"ÑåË—e2ÙÇleeUQQ!‘H&OžìääôñÇ[ZZ/Y².p„h2™,))éÅ‹£Gö÷÷g±Xb±8;;û£>b2™€ëׯ766†……åää…ð;wîOŸ>ÝÓÓAœœ KKËçÏŸS(”qãÆ]»vÏçÏŸ?¿ªªÊÉÉéÅ‹„c¨Š,--EQtÒ¤I‘H”““ãâ⢥¥uÿþýœœœÉ“'ûúú"òöíÛ¢¢"ggg±X\\\}zSS“ŸŸMÓ,V·ya±Xëׯ‹ÅN"ª1Œ&Ñ4­Õjù|þ’%Kôz½P(Ôëõl6›ÔÒ …B§Óñx¼ææf±X  ®®ÎÃÃÅb)Ї:´¡¡ÁÛÛ{ óaú GDDô>« (J­VûùùQ%ø|~VVVaaá{ï½WUU•——wòäÉ;wîìÞ½[§Ó)Š={ö|ñÅEåççïÚµë—_~ùôÓO¿ýö[kãmmm]ºt©X,Ó§O/..&¥O>ùä°aÃÁäÉ“sss´µµ­ZµÊ××W(®[·ÎÌãýÊ¿î®3ÓbíÛ·ïÌ™33fÌ8wîÜ®]»ì\MÓl6»½½¦éàà`ÆÆÆööö¦¦&‡ãááÁf³)Šrssc±Xùùù|>¿¡¡ÁÝÝÝÃâ(>ŸÏápD"‘µñjµÚ§žzª¢¢B&“.[¶Œ¸/^¼xÅŠõõõ2™ì™gžyöÙg¼þúëwîÜ‘J¥ «V­2óx¿òoIýF›ÝôQgÏž]ZZºzõê«W¯Î;×É%PÅår+**¾ÿþûˆˆ6›÷öÛo‹Åâ‰' ‚ðððàà`‹URR²fÍš¸¸8>ŸûÄOLœ8qìØ±úÓŸL†œœœ&8pþüy___‘HtæÌÞÞÞ/¾ø"ŸÏwwwòÉ'oܸAžª©© d±Xîîî111"‘¨®®îðáÃ;wîôññáp8áááfïW~WEÓ4ݵ¤’^¨É‡%INNÎÝ»w³³³CCCû+¦`±X‰äüùó/^$‰>|ø°aÃØl¶J¥âñxäÕÔétîîî¾¾¾|>_­Vóx<Z­¶»NÙþýûSSS7mÚ´~ýú¯¿þº°°ð?þã?vîÜÙÉ[nnî”)SÈõ‡~8sæÌõë×MÓééé£F ŸOÜÛÚÚ©Æ[[[IUÌf³===[ZZ<==Í»yóæˆˆˆÉ“'·µµ}öÙg“&MR(Æ~RRR~üñÇC‡‘ŸãÆ6lX~~þk¯½ÔÐЀÇãUTT¼÷Þ{‰‰‰---Ý=Þ¯˜x‹ ›W€@ Xºt)€çž{ÎÎÒ+W®xyy-^¼˜ülkk3(GÄÖét¤42„8òx<•Jexºƒd„üŒ¯ |ùå—Û·o¿xñ¢D" T*/^|ðàÁK—.¥¥¥]¼xqÙ²e\.À«¯¾JQÔ /¼ÐÚÚZRRbòñþÆt5E4Ì{………xÔ1Ä£R @¯×«T*RX‰–:@mm­@ ÐëõEUUUÙïáÇ·oßž™™dH‰L&›5kEQO>ùäÇœžžNFJ¥›Í@Óõñþ¦ÛaÒ`V—¦é–––æææúúz‡CÓ´Z­vss«ªªºyó¦N§c±Xžžžuuuæúõëä§T*MOOçóù6d°¢¢bÅŠ7nÔh4÷ïß¿ÿ>€ÐÐP.—ûé§ŸjµÚÖÖÖÔÔÔ‰'FGGGFFnß¾]§Ó?~|Ô¨Qááá&ïo9“EQ”B¡8|øð‘#GFŒAFD©©©û÷ïW©T 33óܹsW®\ñð𨮮þüóÏþùg__ß«W¯Þ¸qÃÓÓÓ†Y­‚‚‚ööö•+Wú?€ŸŸßwß}—’’" ƒƒƒu:Ý7ß|Ãb±HWK(îÙ³'%%…Íf›|¼¿aêL–Oyy9EQ‰‰‰F•ššêçç¦×ë¥R©J¥b±X?ÿüs@@@[[ŸÏŸ={6©Ã» ™\Ì›7Ïp½jÕ*2}öÙgM–ûùóçÏŸ?¿“ãc=–ŸŸoìÒÝãýÊ nh»ãóÏ?—J¥Z­–Ãáᙚ3fŒ——€Â‘#GRåíí­R©êëëÉ|5ŸÏ×ëõW¯^ë ;:Y‚)Šê4ì¦(*::ÚðóøƒášÇã…„„k¹\^[[›››ûüóÏÛ%¥S¶íÁ†††}ûö …ÂÀÀ@'YYb¤ÀèfÒ­Gw//¯±cÇÆÅÅ‘¡‹3ÀHÍL›w‹Å¯¿þº?Ž#v’ÚµO`d/Ú…åP/ÿíÜ@§ÁE?ÂÈ*úËmÓ€F h”Ð][„ %ù§Ñ¡Æ¢Õ(Σó®Q£¸ŽBøk€¨FÀ@ `ùæë•~‡‘†€#xx Þ!¸U¿ë£Ü½¸Ð@´ÿgUu¨tP?†+‹6\ñýï§à÷4Ð ü Ì|î@gÁ0T`5 ªÇk-ÿóÁïâÐŒZE8 ° @æ'õÉÿµáßî?S»îP(*ppÐãŠ;j@ Ä:  èÈöƒÇ€Ç€ hùïxM¼ó ~Äœ »ÀÈÕ$ hšqí¿OeCÌó'#ðh€<Ñ#0ó?1ˆäÀGï¢æ•Ïí£ Àña¨ÀE@(4Í+Je€'0ˆ|Á3ŠÇ€`$Œš ¯9,Ln)ÉÀ½ß€1ÀíÎ…=`fÝX‚¡j|™”yÀ@ÄBk=üÆaÒˆ|€‡w¡–Ão¼Ÿ@ý?Qq5 n5ïf~p«wÎ2f <4ïßþ@Ðëá^„ac1d2Ç{n”÷ÍkPãÂq»TÓ 9Ð È5Ð Ôß@ ü<}€±“~Ç®ïX7ãÿíÊ냀6â»c×¾C+@C/@ëTþC;êµrŒ‹wîƒ<Ô_ƒ x@àêeŒúà¤ð¯Ïu øËm ;¹$Ÿ.ʹRmp×ëéfe{IEÓ÷Ùu­ÄñaÃæO9j„·€ç®Õéå õ½ûÊ=_ÿf&p½žV¶j.]«ýæü-𦻯[U§üߓ׷­Þ5‘ßeKOýhiûb‹À‡·/2ï¡ëìØœI#*ÛËîÈþ6̨çùKwlˆ÷ßèµÍ7q`£ Z`»CÝ º¼…ÚU *«›Ê iÅðPÔ–£àÞ@P™ áCM†½ï›ëù…u&ݹqŸëÎá'x6>ìÖLÝz ¿ªN¹pZÈó ;ýÓí¤7+Ú¹œÀá‚ÇF ÍNQŸË‰'.Ž,©”]/kè.Þå›ÓÉÅ—Ûv—0óØÒÉ"úugarî³´Bæ?Ìó§_ï…zK›lˆôwg7ÜDÀ6@¶ÂV]Dý ”žF}RiKFue*ꮂ+„¼M@; Úúk€ÜêMÓªvííªæ¿¼ªlÕüy^˜·Àýùʼý}vES³Z§§[U·îʿϮ0N«ª#ÿz-€!žî6þ,ÃÆ*úå¿ëº¯–¢ºÙ~ k Õ5´FŒ¥_¸c[¤F4×@p=à´m€ˆÃÕÐÖaZx@àLR€'İ&°F š ®Üæè5º_‹îÇÅEŒöe³©K×j­zœÅ¢|}x‹ã$šÝÍÞ¿îf±½ upØÔ…ßj®Þ¬g³(6›B‡ÍÑοÿ[5-Ð4# º@x:à,Àé@œôMhÊ  Éû‹àc"ìUÏ_ùÜ¿vü”Þ‘}øÅe“IP¶j¸lRþ­í&|õ ãW¿0€J­½]%ÿà௲‡ê®ñxgïÏUu Ó¡XC¯:YÍ« @­Ñ‘öã×¢>Ø ¬/W«! †l ú¢¥ ñ€0ÿuð‡‚· øž~T í€P²r ÆDàûOXÔÔù ñ=loSk½¸rqß½)nˆÀÍ¢ Íçï/üõFž6±ãÀÂx­¥·½h¢±×Þ€6€Ä͆w0hUS p"†Œü‡ÎÕ8G–à 1j.n¦ ¿ ÷€@ @õbŽÇÝéWPR_V)£iÄÅ̸En½ùaVl”ø¿–N0ù MÓ:½]àû`˜dÿe/ðÜ€zà1 0mððB»òJ4–‚íÞ8ÄÂXxx÷F­x<eh:.à5–¨Ý8¬à¯gç‡Ñ4R³¤ÊVMZnÅS³Fs8¬ì_ï=·±Y,oAÿö›¬‚‘nžh\€È+@±ááY9nEa3Ä€PÓâ ïPm[5ê í€x øÕŠHIóIÓtc³º ¤þïÇ®)Û4R~¼uï¾2nbÐ;¯Oáyp´Z}c³ÊÚnŒšgkwd=TZÚºw#wt|¹fwÑ‹é²!ôÀ8`êq7¿)pxD<à0 Œ‹‡‡¤¸¤@%à ü‰‹…÷/ÿtå@g¥ßad F@\Ô×Ðþ9½.*À¨¿Ë ü ´2@´Õ@+p ¸—±n(í@;0ˆsßÃ1ÔNö} CW“8xzÂJ„ž¤cÜ Àîå@p¸ÜTøCTþÀ¢¿þ/6t.ì3Ö•üŸÙ  ¸¡€ ZPÜ~Ô ûM@^Õ¿ö{,Z¼ö6à©Q°ÃÁLÙ¡@) `¯ýßÿ|ã5 |@ø ðÚ7à `Ãf„ÿ°”€5ÐÙ°ÌO#€†ïù"á·ðɾhî=šÃ ô€ hZ€``n,žKçzoý+ØàÀâ:ö€™, þü”S0áí9>õΕs'0ˆ$O  7€ ¢îøþ%£GK5:ÔΦ#€»‘~‡‘Ã$–ã2]qpÚ»°—ÀŽK`‡¡½èÎ,†]]ŠN8‚ÀD]"­KéN8B/Úäî°®Þ §6Àx-ù¦f'½™že«p„*ºGŒ5œÃ2€é±'Œ8”Çû*2Òðó¥žB [GãA:L²ü ÀKÅŤý*2²Óq'Òv§.EQÇ7vyóÍ7cb:フ߻w¯…)`L( {÷î=}úôk¯½vöìÙO?ý´GÿÆY82v¬ñ-ãŸGÆŽ%?ÍgÀ±cÇŒ]ŠŠŠ\¾|ÙàRYYÉçóåryi ºlóAÆuWHù–ôô¹÷®DFFNŸ>}ß¾}—C‡=óÌ3>>ÌØ/0èî׃><že+W®Ðh.+l±öár¹Ë—/ß¿?MÓ_|ñÅ+¯¼Â o)2x´@þË냂ž2ÄàhèKw*ʽþP]]^ssa;vlÉ’%ÜKKK#""N:µlÙ²òòrû|¿O`ö8Øðv9»¿T\ÈåÖ¨Õ6G>kÖ¬ÄÄÄyóæ1H]`ð “,ǪÄ[˜ÙNÿOOOícÇŽHMMµ%­³«h«ï<³WÆ0»Š6À ^q׃]tbÐ “l€þýR¿ c˜-°kÿF0»ßáÌ+ùÂl]ô³«h=âØÁq ìà¸vp\;8Ž0“eL×é'&8Î0ÉüL–ÃdÓZAà糜y‹ñ[.žs®I8B'‹¬l[â η&Ál­UËÙŠ/­À–›®Ø ™™×ÂñLWÀûöí;sæÌŒ3Î;·k×.3>ÍëÔWéY±bÅÕ«W¯\¹bp¹sçÎÅ‹ÿò—¿ôUýÊ Ø*ÓCñµ|ÝÐÚoƒé EQÉÉÉaaaàÀçÏŸ÷õõ‰DgΜ°hÑ¢7ß|“øÔëõ!!!—.]pûöí øøøˆÅâ7ZµéßöÙÛg9ííí .<}úôܹsÛÚÚÌø´- æAã3š¦9Âãñˆµ™V« ÊÎÎ6EllìÍ›7ß{ï=>Ÿ¿lÙ²êêêåË—O™2…„6|øðŽŽš¦322ÂÃÃõz½F£‘H$kÖ¬Ñh4ÕÕÕ¡¡¡›7o¶*_Ý&¦OBéC”JåÑ£Giš>qâDss³Ÿ¶½ 6¬R©D"ÑîÝ»išNOO Õëõæ£8sæ MÓH.öîÝIÓ´R©äóùçÏŸ§iú…^øè£hšÎÎÎPSSCBøàƒ‚‚‚¬ÍšI]m•é Yì÷ØèZèÍ$6˜®”oÆ×ABBÂ×_ÝÔÔ”––¶lÙ2uuuüüüˆ±XL\zÏ ØZh£fØ Ï´M#¥+V”””œ>}:--mùòå½Ló‹/¾øí·ß"0}.ÚÚé徎69R:wîÜ”)Sz|öüã„ ¶mÛÖ')1³†•š ó¤[·nEDDܺuK"‘ôw\ ®¢ ¶¬6w¡û•JuäÈ;¨ (Áó‹†Î¹PHpáÚÑÑ Ž#°c¥/wÖ※0†ñ,æq ìà¸vp\;8.1]qæ­íæq]§®˜ÁÆÁ®SWÌÀx]§®˜Ç):Y}²©£— ÐjµvŽ”à3 çä丹¹Ù3FƒT`ËMW¬e`O]ÉÎζó»5è¶ÜtÅ>ô­éÊ„ ²²²ú.u=3è¶ùÔK°¡ôXkºBÓô–-[¼½½E"QRR’ñÝk×®ÅÅÅ‘ëÒÒÒE‹yzzzzz.Z´ˆ8æççOš4I,:tÈÚÔšNРÂrÓ‚UYèÑ3zmºRXX ¬¬Œ¦éÖÖÖúúzš¦I©5¾hkk Z¼xqCCƒV«-//§iZ&“ …ÂÇÓ4]PPÀápJKK-ÏI] ¶ùÔ•±¹ñ³êÔ‡óùçŸ_¿~Çã >ܤ·Ÿ~úéÞ½{üñСCÙl6ÙŸuöìY•J|áÂ…ÖÖV??¿Ÿ~úɶ4t[{êŠUÓ6€­2] :wî\QQQttôرc/\¸`Ò±L9r¤±cCCEQ{öìÙµk×®]»&Ož,‹mHðïèe 0€X›~K<ÃTMÓtII €S§NñùüÚÚZK¢kjjzõÕWýýýiSUtZZÕäNŸ>íææ¦P(, ßB] ¶ Úš-ï–{îŠå¦+÷îÝËÍÍíèè …cƌ鮬ϙ3'88ø7Þ¨ªªR*•¹¹¹.\´zõj™Làþýûwîܱ9Íÿ¢_;cUâ-Ìl§Ž §®”••ÅÄÄxyyy{{ÇÄÄäææÒ¦J0MÓ%%%qqqnnn¤M+++† "$Iïyað\ô€ŸºÒÓ»á [ØÛbnfmÆÑÖƒ]t‚Ù,í”_8³f ìÚ¿Ñ# nƒáÜ+ùÂl]ô³«h=âØÁq ìà¸vp\;8Ž0“eÀª¹'>8N vÍd™ÄJ°…ÓÎù0¾[(›sª F—à®_Ó1©¢…ÞÆ—`‚ñ‡ìL~H–õª8NNNN¥r ¤÷hºÒOû)u:µ½kû[£XÅ «¢÷íÛçïïOLWÊÊÊÖ­[gÞ¿±]Wþí𯷿5ŠU ºܯ¦+– •JÇÏçó×®]«×ëPõÑGùùùeffîÞ½{̘1^^^b±899¿·F¡(ê›o¾™7ož››[BB‚N§³ú;ÓËM{}Ž…¦+&ÓßKÞŒo…„„ddd¤§§³X¬'NǨ¨¨‚‚¥R™™™ÙÐР×ëwîÜ)‰èßo” ‘HΞ=ûóÏ?¸|ù²Mÿƒ¾dÐ lá©+ý'01 ¢izêÔ©‰‰‰ÄñäÉ“ÆÞ ÅÉ“'Ñe',€/¿ü’¦iRvüñG‹òÜŸ º6ØØte@D.üýýår9¹:t(¹HJJJJJ S*•&'Ö(,Ö`iûÀƒ‡†††qãÆ»¯X±B*•Ž=:;;û»ï¾¨´YÎ`yÑ%%%¿üòË‹/¾hìØÔÔ ®®®¾¾>%%@eeåÀ¤ÏbœNàNK–,™4iÒÒ¥K“““;Ù(L›6mÙ²eqqqÓ¦M‹‹‹›8qâìÙ³û1­}S7Ý™Ü0ëZ.ìŠã´Á&MŒßçü¼#l‰éŠsª Ø*Ã$§’–Àx –´¾N¨.˜Û‹¶V-çTÌíE»°¦–`âØÁqN–¼¼<•J%‘HD"Çår:Q‰C ,—Ëe2™\.—J¥ÄE$ …ÂØØX¡P8°i(¤“%—Ë‹ŠŠˆº2™¬¶¶¶¦¦&** €H$‰D111ö9Îu°á———Ëår•J@¥R}òÉ'äVbbb@@¹ŽwBßÉ*..ÎÍÍÍÈÈ8~ü¸¡ …ÂÄÄD•J%“ÉT*Ç“Éd©©©µµµ^{ÃlÕjuyy9Ç«­­ ذaÃ믿¯V«·nÝÊãñfΜ)‰öîÝ»oß>¹\ž‘‘aؤá$0¸ŠV«Õ¹¹¹¤PFEEI$GnÕÔÔ¬Y³fõêÕ ,P©TR©””fR¸4áv…Á%X*•ÖÖÖªTªØØXÒŸ2ÔɉdëÖ­¡¡¡\.—ÇãÄÆÆ†††pªŠÚ®÷íQ5552™L*• …BÒÐ’¬R©ÔjµD" 0îyEFFÆÆÆnÛ¶­Ó±–Ó{#š¦Oœ81kÖ,///‹%‰¦NúÙgŸQ¦xë­·zÁM¦Æ¤9>?jC­V×ÖÖæåå …Â€€Ã07 €P"6é^‰D"¢úŒ3È{`[KÜ{#†÷Þ{綾^JHH¸}ûv{{{AAÁÚµkccc »\aôÁê­[·ö&.‚-ÓÝÊݬÛô¹½)—3fÌX²d‰Z­&Ã_¤•@~ är¹d°¤R©D"‘a&¤E%''‡…… ‚œ?Þ××W$9s©alqûöí øøøˆÅâ7j4šššš÷ßëÖ­6lðóósss Y²dÉäÉ“{ÿég²È˜NZšù^¯D"ÉÉÉ ÏÎÎÞ¸q£m‘CZS2‰@¥RÉåòÚÚZÒ“’Ëå†Ê™ø$É <þüÌ™3»ž†DØ¿jjjJJÊúõëÿüç?nÞ¼yç΋/6øQ©TñññÑÑÑwïÞ …ÆŸí>|øpzzzHHHllìÂ… øá‡Ìž=›Çã…‡‡ëtºN;5ûÛ§*;ilþk̆£6:::4¡»k3$„ãÇ'$$©+•555ÆÞÈår.—+‰._¾L ±ÉyÍ›7GDDLž<¹­­í³Ï>óööž4i’ñ¹Ixt¤Fvv6ÙoÎ;ï¼óøãçääH¥Ò¿ýíonnn¯¼òÊÞ½{É›íçç×˼[E¯æ¢ ÷ø­í¾µWP«Õ†ØPLÉ…Z­îänhŒ‰»L&KLL 4øì9 „ô$Œ¯1y¤HN<´‹Åuuu¤©©© ¶1çÖÓÛ^´%êö9555¤'o<æ!]'C_ºdáA*•’®uo–H‹^QQÑr®C}}=ùY[[ëïï?{öl‹uàÀ›ãµ>&ÙªD$TLMM5ü4 V« ºÖÖÖ’µ©TJÜÉøŠ”'Û0y¤†1S§N ݱc‡V«­®®>xðàË/¿´iÓ¦>ø`Ó¦M¥¥¥>¼uëÖÞ½{É ,ý#':jkk «¼555¤&u²Òµ&…•tÁ¤Réùóçåryll¬D"éÍ:1—ËMOOïèè õ÷÷ß±cG'nnniiiÅÅž¾¾ÑÑÑO?ýô–-[lÛ¶íÿøGnnntt´ÏŒ3²³³GmsJz„‘S•d€Kô›9s¦P(,**2ÝvÒæ¹y<žó¬2²“"˜@Dº|ù2‘HD ¥¡ÃÕ ØÔtö•IDATG&¥%‰“¨ † Lf¯)h™LvüøqÃT¥¡yîú©ÉÉSN#6@¶ãˆD¢¼¼<2ÙD¦-祉ҤøŠD¢ØØX§Ú¥Å~÷Ýw: ½" @©T>¼¬¬,++«££ƒŒ’7nÜ,‰d2™R©,**¢(*&&&>>~ “lWÙÉê ÙµCÆÄdÂÒ0ÅUTTåTÅ#0LG Ud1‘,9 hê‡ØEW˜ÝÉrÑ#.—ÀŽK`ÇAl“\§Tv‡#lü™—Òp„a’ÉÝa]½9@Nm€ñ[²ŸÄ™O¡uŠNV§½Ön^///7¹þØ5­Vkcû Æ—à1|þ;£F~¾T\Üã#V}Z‹øÏÊÊêñ³”ÙÙÙqqqƒíÿ9H;Y%%%–øôápðHׯ"# îÆ×âÇþ[ ¤¥¥ÅÄÄØyÛì «¢­5r¹¢Tš,µÄñ¥âbòS’Û™§žzÊ·¶tÛläb^?¢±„Ï7㇦é-[¶x{{‹D¢¤¤$ã»:nÚ´i{öì!?óóó'Mš$‹ƒƒƒ:Ô)¨®wç͛੧žZ¿~=€®†-è§3=,úð¿±ðP†,;öÈØ±Æ·ºþ'˜ ª°°@YYMÓ­­­õõõ†(²²²vìØ1kÖ,r°’L& …ät‡‚‚‡SZZj8¼Áä]C84Mk4‰D²fÍFS]]ºyófºÎôt%Ø`ä²råJò^[©ŠÍ—c³ýg‡óùçŸ_¿~Çã >ÜpëÆ;wîLNN&‡1œ={V¥R_¸p¡µµÕÏÏï§Ÿ~2x6À¥K—:¶>|˜ÜÚ²eË¢E‹&Nœ ¹¹ÙòìwÇ ëdYeäBQ”»eÇ_|ù@£¹¬P˜ñtîܹíÛ·GGG3&))iúôéäVRRÒØ±cCBBÈφ†Š¢ ÕõäÉ“Åb±!ówÑa ¹îó3=À–CF;kK­¡ÃE ·4zý醆 =…9oÞ¼yóæÉd²M›6=ÿüó»˜wß}wݺu~øá_ÿúW!!!Z­öСCC† 1<›M.LÞ5Æ`ØBö†Ã«òn9ƒ®Š¶ š¦?©ª2ˆÚÝ ø¥ââ·++ózªñîÝ»—››ÛÑÑ! ÇŒc<"‰Ž=úî»ïþóŸÿ°pá   Õ«W¸û÷ïwW 444 ÃÛÿ æé}3>PX•xK2[VVãåååíí“››kx–t޶nÝ:lذ{÷îÑ4]YY™0dÈ@ ‘HRSSOÈêz—¦é÷ߟÏç““³ÊÊÊæÌ™ãåå5|øð 6´··GD®ûä\-ÏdY;e1€SƒÛ`có¯‹#líܲSÁìNv¾ƒÛ-‡Ù»öoô³ûμ’o!ÌØE0»ŠvÑ#.—ÀŽK`Ç%°ƒã3YÆtîpòa‚ã “ÌÏd9L6­Åîq>Ë™'¼/°åâ9çš„#t² +ä=zƒõkô 4H±f lƒZæ=p8œœœc—œœ777 ÃïúxwŽvƒÁ§®l¨rͼd۳͉1ùx/Ãì%v&íÛ·Ïßߟ¤”••­[·®÷ašÑÉ9wç˜ÄN%¸ÏO]!T´|ݰGá¥Réøñãù|þÚµkõz½ñ­Ý»w3ÆËËK,'''ÇëׯϞ=ûñÇ7þ¿IG“Ö.Ƶôœaèý¾=K°Ö ÅlË‚ùG„„„ddd¤§§³X¬'Nï•ÌÌÌlhhÐëõ;wî‰D4M·´´ˆÅâ½{÷ÏÊÊ2éhÆž%**ª  @©TZÿ?° ¿ýhW”JåÑ£Giš>qâDsssŸ„iÛ Ú£ÀDš¦§Nš˜˜h,0A¡Pœ§b•€ÙU4mýô²S© ¦ ‹5îî`c‡‡ÙU´óƒ%'¬™ 8ˆÀpíèèÇØ€±ÒŽ—;kq@]ÃøN– ó¸vp\;8.—ÀŽK`Ç%°ƒãØÁq ìà¸vpþ?ø8,JƳ·IEND®B`‚amide-1.0.5/help/README0000664000175000017500000000012707476466521014277 0ustar loeningloeningTo check the validness of these doc's, run: xmllint --valid --noent --noout amide.xml amide-1.0.5/help/Makefile.in0000664000175000017500000011242412271346301015446 0ustar loeningloening# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # gnome-doc-utils.make - make magic for building documentation # Copyright (C) 2004-2005 Shaun McCance # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. ################################################################################ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(top_srcdir)/gnome-doc-utils.make $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/mkinstalldirs ChangeLog \ README subdir = help ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/libfame.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/amide_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMIDE_CHECK_OBSOLETE_CFLAGS = @AMIDE_CHECK_OBSOLETE_CFLAGS@ AMIDE_DEBUG_CFLAGS = @AMIDE_DEBUG_CFLAGS@ AMIDE_GTK_CFLAGS = @AMIDE_GTK_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_CFLAGS = @AMIDE_GTK_EXTRA_GCONF_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_LIBS = @AMIDE_GTK_EXTRA_GCONF_LIBS@ AMIDE_GTK_EXTRA_GVFS_CFLAGS = @AMIDE_GTK_EXTRA_GVFS_CFLAGS@ AMIDE_GTK_EXTRA_GVFS_LIBS = @AMIDE_GTK_EXTRA_GVFS_LIBS@ AMIDE_GTK_LIBS = @AMIDE_GTK_LIBS@ AMIDE_LIBDCMDATA_CFLAGS = @AMIDE_LIBDCMDATA_CFLAGS@ AMIDE_LIBDCMDATA_LIBS = @AMIDE_LIBDCMDATA_LIBS@ AMIDE_LIBECAT_LIBS = @AMIDE_LIBECAT_LIBS@ AMIDE_LIBVOLPACK_LIBS = @AMIDE_LIBVOLPACK_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HELP_DIR = @HELP_DIR@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFAME_CFLAGS = @LIBFAME_CFLAGS@ LIBFAME_CONFIG = @LIBFAME_CONFIG@ LIBFAME_LIBS = @LIBFAME_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ OPTIMIZATION_CFLAGS = @OPTIMIZATION_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMEDCON_CFLAGS = @XMEDCON_CFLAGS@ XMEDCON_CONFIG = @XMEDCON_CONFIG@ XMEDCON_LIBS = @XMEDCON_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ intltool__v_merge_options_ = @intltool__v_merge_options_@ intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ libgnomecanvas_greater_than_230_CFLAGS = @libgnomecanvas_greater_than_230_CFLAGS@ libgnomecanvas_greater_than_230_LIBS = @libgnomecanvas_greater_than_230_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ _clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header) _DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS)) _DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)), \ $(filter $(LINGUAS),$(DOC_LINGUAS)), \ $(DOC_LINGUAS)) _DOC_ABS_SRCDIR = @abs_srcdir@ _xml2po_mode = $(if $(DOC_ID),mallard,docbook) @ENABLE_SK_TRUE@_ENABLE_SK = true ################################################################################ GDU_V_XML2PO = $(GDU__v_XML2PO_$(V)) GDU__v_XML2PO_ = $(GDU__v_XML2PO_$(AM_DEFAULT_VERBOSITY)) GDU__v_XML2PO_0 = @echo " XML2PO" $@; GDU_V_MSGFMT = $(GDU__v_MSGFMT_$(V)) GDU__v_MSGFMT_ = $(GDU__v_MSGFMT_$(AM_DEFAULT_VERBOSITY)) GDU__v_MSGFMT_0 = @echo " MSGFMT" $@; GDU_V_DB2OMF = $(GDU__v_DB2OMF_$(V)) GDU__v_DB2OMF_ = $(GDU__v_DB2OMF_$(AM_DEFAULT_VERBOSITY)) GDU__v_DB2OMF_0 = @echo " DB2OMF" $@; GDU_V_DB2HTM = $(GDU__v_DB2HTM_$(V)) GDU__v_DB2HTM_ = $(GDU__v_DB2HTM_$(AM_DEFAULT_VERBOSITY)) GDU__v_DB2HTM_0 = @echo " DB2HTM" $@; ################################################################################ db2omf_args = \ --stringparam db2omf.basename $(DOC_MODULE) \ --stringparam db2omf.format $(3) \ --stringparam db2omf.dtd \ $(shell xmllint --format $(2) | grep -h PUBLIC | head -n 1 \ | sed -e 's/.*PUBLIC \(\"[^\"]*\"\).*/\1/') \ --stringparam db2omf.lang $(notdir $(patsubst %/$(notdir $(2)),%,$(2))) \ --stringparam db2omf.omf_dir "$(OMF_DIR)" \ --stringparam db2omf.help_dir "$(HELP_DIR)" \ --stringparam db2omf.omf_in "$(_DOC_OMF_IN)" \ $(if $(_ENABLE_SK), \ --stringparam db2omf.scrollkeeper_cl "$(_skcontentslist)") \ $(_db2omf) $(2) _DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(_DOC_ABS_SRCDIR)/$(DOC_MODULE).omf.in)) _DOC_OMF_DB = $(if $(_DOC_OMF_IN), \ $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-$(lc).omf)) _DOC_OMF_HTML = $(if $(_DOC_OMF_IN), \ $(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-html-$(lc).omf)) # FIXME _DOC_OMF_ALL = \ $(if $(filter docbook,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_DB)) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_HTML)) ################################################################################ _DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml) _DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page)) _DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent)) _DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc)) _DOC_C_DOCS = \ $(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \ $(_DOC_C_PAGES) $(_DOC_C_MODULE) _DOC_C_DOCS_NOENT = \ $(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \ $(_DOC_C_PAGES) _DOC_C_FIGURES = $(if $(DOC_FIGURES), \ $(foreach fig,$(DOC_FIGURES),C/$(fig)), \ $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C/figures/*.png))) # FIXME: probably have to shell escape to determine the file names _DOC_C_HTML = $(foreach f, \ $(shell xsltproc --xinclude \ --stringparam db.chunk.basename "$(DOC_MODULE)" \ $(_chunks) "C/$(DOC_MODULE).xml"), \ C/$(f).xhtml) ############################################################################### _DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po)) _DOC_MOFILES = $(patsubst %.po,%.mo,$(_DOC_POFILES)) _DOC_LC_MODULES = $(if $(DOC_MODULE), \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml)) _DOC_LC_PAGES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES), \ $(lc)/$(notdir $(page)) )) _DOC_LC_INCLUDES = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \ $(lc)/$(notdir $(inc)) )) # FIXME: probably have to shell escape to determine the file names _DOC_LC_HTML = \ $(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_DOC_C_HTML), \ $(lc)/$(notdir $(doc)) )) _DOC_LC_DOCS = \ $(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) $(_DOC_LC_PAGES) \ $(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML)) _DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS), \ $(patsubst C/%,$(lc)/%,$(_DOC_C_FIGURES)) ) _DOC_SRC_FIGURES = \ $(foreach fig,$(_DOC_C_FIGURES), $(foreach lc,C $(_DOC_REAL_LINGUAS), \ $(wildcard $(srcdir)/$(lc)/$(patsubst C/%,%,$(fig))) )) _DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot,$(if $(DOC_ID),$(DOC_ID).pot)) ################################################################################ _DOC_HTML_ALL = $(if $(filter html HTML,$(_DOC_REAL_FORMATS)), \ $(_DOC_C_HTML) $(_DOC_LC_HTML)) _DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml) _clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf) _clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk) _clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc) _clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir) _doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE)) DOC_MODULE = amide DOC_ENTITIES = legal.xml DOC_INCLUDES = DOC_FIGURES = \ figures/amide_main_window.png \ figures/study_tree.png DOC_LINGUAS = es DISTCLEANFILES = *~ */*~ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gnome-doc-utils.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu help/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu help/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/gnome-doc-utils.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool \ mostlyclean-local pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local cscopelist-am ctags-am dist-hook distclean \ distclean-generic distclean-libtool distclean-local distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am uninstall-local DOC_H_FILE ?= DOC_H_DOCS ?= $(DOC_H_FILE): $(DOC_H_DOCS); @rm -f $@.tmp; touch $@.tmp; echo 'const gchar* documentation_credits[] = {' >> $@.tmp list='$(DOC_H_DOCS)'; for doc in $$list; do \ xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ xsltproc --path "$$xmlpath" $(_credits) $$doc; \ done | sort | uniq \ | awk 'BEGIN{s=""}{n=split($$0,w,"<");if(s!=""&&s!=substr(w[1],1,length(w[1])-1)){print s};if(n>1){print $$0;s=""}else{s=$$0}};END{if(s!=""){print s}}' \ | sed -e 's/\\/\\\\/' -e 's/"/\\"/' -e 's/\(.*\)/\t"\1",/' >> $@.tmp echo ' NULL' >> $@.tmp echo '};' >> $@.tmp echo >> $@.tmp list='$(DOC_H_DOCS)'; for doc in $$list; do \ xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \ if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \ docid=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \ | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \ echo $$xmlpath; \ ids=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \ for id in $$ids; do \ echo '#define HELP_'`echo $$docid`'_'`echo $$id \ | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \ done; \ echo >> $@.tmp; \ done; cp $@.tmp $@ && rm -f $@.tmp dist-check-gdu: @HAVE_GNOME_DOC_UTILS_FALSE@ @echo "*** GNOME Doc Utils must be installed in order to make dist" @HAVE_GNOME_DOC_UTILS_FALSE@ @false .PHONY: dist-doc-header dist-doc-header: $(DOC_H_FILE) @if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \ $(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)"; doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header) .PHONY: clean-doc-header clean-local: $(_clean_doc_header) distclean-local: $(_clean_doc_header) mostlyclean-local: $(_clean_doc_header) maintainer-clean-local: $(_clean_doc_header) clean-doc-header: rm -f $(DOC_H_FILE) all: $(DOC_H_FILE) ################################################################################ DOC_MODULE ?= DOC_ID ?= DOC_PAGES ?= DOC_ENTITIES ?= DOC_INCLUDES ?= DOC_FIGURES ?= DOC_FORMATS ?= docbook DOC_LINGUAS ?= ################################################################################ _xml2po ?= `which xml2po` _db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils` _db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils` _chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl _credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl _ids ?= $(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl @ENABLE_SK_TRUE@_skpkgdatadir ?= `scrollkeeper-config --pkgdatadir` @ENABLE_SK_TRUE@_sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir` @ENABLE_SK_TRUE@_skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml $(_DOC_OMF_DB) : $(_DOC_OMF_IN) $(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ echo "The file '$(_skcontentslist)' does not exist." >&2; \ echo "Please check your ScrollKeeper installation." >&2; \ exit 1; } $(GDU_V_DB2OMF)xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; } $(_DOC_OMF_HTML) : $(_DOC_OMF_IN) $(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml @ENABLE_SK_TRUE@ @test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \ @ENABLE_SK_TRUE@ echo "The file '$(_skcontentslist)' does not exist" >&2; \ @ENABLE_SK_TRUE@ echo "Please check your ScrollKeeper installation." >&2; \ @ENABLE_SK_TRUE@ exit 1; } $(GDU_V_DB2OMF)xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; } .PHONY: omf omf: $(_DOC_OMF_ALL) .PHONY: po po: $(_DOC_POFILES) .PHONY: mo mo: $(_DOC_MOFILES) $(_DOC_POFILES): @if ! test -d $(dir $@); then \ echo "mkdir $(dir $@)"; \ mkdir "$(dir $@)"; \ fi @if test ! -f $@ -a -f $(srcdir)/$@; then \ echo "cp $(srcdir)/$@ $@"; \ cp "$(srcdir)/$@" "$@"; \ fi; @docs=; \ list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \ docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \ done; \ if ! test -f $@; then \ echo "(cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \ else \ echo "(cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \ fi $(_DOC_MOFILES): %.mo: %.po $(AM_V_at)if ! test -d $(dir $@); then mkdir "$(dir $@)"; fi $(GDU_V_MSGFMT)msgfmt -o $@ $< # FIXME: fix the dependancy # FIXME: hook xml2po up $(_DOC_LC_DOCS) : $(_DOC_MOFILES) $(_DOC_LC_DOCS) : $(_DOC_C_DOCS) $(AM_V_at)if ! test -d $(dir $@); then mkdir $(dir $@); fi $(GDU_V_XML2PO)if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \ mo="$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo"; \ if [ -f "$${mo}" ]; then mo="../$${mo}"; else mo="$(_DOC_ABS_SRCDIR)/$${mo}"; fi; \ (cd $(dir $@) && \ $(_xml2po) -m $(_xml2po_mode) -e -t "$${mo}" \ "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp) .PHONY: pot pot: $(_DOC_POT) $(_DOC_POT): $(_DOC_C_DOCS_NOENT) $(GDU_V_XML2PO)$(_xml2po) -m $(_xml2po_mode) -e -o $@ $^ $(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(GDU_V_DB2HTM)xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@) ################################################################################ all: \ $(_DOC_C_DOCS) $(_DOC_LC_DOCS) \ $(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) $(_DOC_POFILES) ################################################################################ .PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML) clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML) clean-doc-lc: rm -f $(_DOC_LC_DOCS) rm -f $(_DOC_MOFILES) @list='$(_DOC_POFILES)'; for po in $$list; do \ if ! test "$$po" -ef "$(srcdir)/$$po"; then \ echo "rm -f $$po"; \ rm -f "$$po"; \ fi; \ done # .xml2.po.mo cleaning is obsolete as of 0.18.1 and could be removed in 0.20.x @for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc/.xml2po.mo"; then \ echo "rm -f $$lc/.xml2po.mo"; \ rm -f "$$lc/.xml2po.mo"; \ fi; \ done clean-doc-dir: clean-doc-lc @for lc in C $(_DOC_REAL_LINGUAS); do \ for dir in `find $$lc -depth -type d`; do \ if ! test $$dir -ef $(srcdir)/$$dir; then \ echo "rmdir $$dir"; \ rmdir "$$dir"; \ fi; \ done; \ done clean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) distclean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) mostlyclean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) maintainer-clean-local: \ $(_clean_omf) $(_clean_dsk) \ $(_clean_lc) $(_clean_dir) ################################################################################ .PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk doc-dist-hook: \ $(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \ $(if $(_DOC_C_FIGURES),dist-doc-figs) \ $(if $(_DOC_OMF_IN),dist-doc-omf) # $(if $(_DOC_DSK_IN),dist-doc-dsk) dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES) @for lc in C $(_DOC_REAL_LINGUAS); do \ echo " $(mkinstalldirs) $(distdir)/$$lc"; \ $(mkinstalldirs) "$(distdir)/$$lc"; \ done @list='$(_DOC_C_DOCS)'; \ for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$docdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$docdir"; \ $(mkinstalldirs) "$(distdir)/$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \ $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \ done @list='$(_DOC_LC_DOCS)'; \ for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$docdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$docdir"; \ $(mkinstalldirs) "$(distdir)/$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \ $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \ done @list='$(_DOC_POFILES)'; \ for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$docdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$docdir"; \ $(mkinstalldirs) "$(distdir)/$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \ $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \ done dist-doc-figs: $(_DOC_SRC_FIGURES) @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \ for fig in $$list; do \ if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$fig"; then \ figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ if ! test -d "$(distdir)/$$figdir"; then \ echo "$(mkinstalldirs) $(distdir)/$$figdir"; \ $(mkinstalldirs) "$(distdir)/$$figdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \ $(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \ fi; \ done; dist-doc-omf: @if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))" dist-doc-dsk: @if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \ echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \ $(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))" ################################################################################ .PHONY: check-doc-docs check-doc-omf check: \ $(if $(DOC_MODULE),check-doc-docs) \ $(if $(DOC_ID),check-doc-pages) \ $(if $(_DOC_OMF_IN),check-doc-omf) check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) @for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc"; \ then d=; \ xmlpath="$$lc"; \ else \ d="$(srcdir)/"; \ xmlpath="$$lc:$(srcdir)/$$lc"; \ fi; \ echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \ xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \ done check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES) for lc in C $(_DOC_REAL_LINGUAS); do \ if test -f "$$lc"; \ then d=; \ xmlpath="$$lc"; \ else \ d="$(srcdir)/"; \ xmlpath="$$lc:$(srcdir)/$$lc"; \ fi; \ for page in $(DOC_PAGES); do \ echo "xmllint --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \ xmllint --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \ done; \ done check-doc-omf: $(_DOC_OMF_ALL) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \ xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \ done ################################################################################ .PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk install-data-local: \ $(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \ $(if $(_DOC_HTML_ALL),install-doc-html) \ $(if $(_DOC_C_FIGURES),install-doc-figs) \ $(if $(_DOC_OMF_IN),install-doc-omf) # $(if $(_DOC_DSK_IN),install-doc-dsk) install-doc-docs: @for lc in C $(_DOC_REAL_LINGUAS); do \ echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \ $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \ done @list='$(_DOC_C_DOCS)'; for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ if ! test -d "$$docdir"; then \ echo "$(mkinstalldirs) $$docdir"; \ $(mkinstalldirs) "$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ done @list='$(_DOC_LC_DOCS)'; for doc in $$list; do \ if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \ docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \ if ! test -d "$$docdir"; then \ echo "$(mkinstalldirs) $$docdir"; \ $(mkinstalldirs) "$$docdir"; \ fi; \ echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \ done install-doc-figs: @list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \ for lc in C $(_DOC_REAL_LINGUAS); do \ figsymlink=false; \ if test -f "$$lc/$$fig"; then \ figfile="$$lc/$$fig"; \ elif test -f "$(srcdir)/$$lc/$$fig"; then \ figfile="$(srcdir)/$$lc/$$fig"; \ else \ figsymlink=true; \ fi; \ figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \ figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \ if ! test -d "$$figdir"; then \ echo "$(mkinstalldirs) $$figdir"; \ $(mkinstalldirs) "$$figdir"; \ fi; \ figbase=`echo $$fig | sed -e 's/^.*\///'`; \ if $$figsymlink; then \ echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \ ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \ else \ echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \ $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \ fi; \ done; \ done install-doc-html: echo install-html install-doc-omf: $(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir) @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \ done @if test "x$(_ENABLE_SK)" = "xtrue"; then \ echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \ fi; install-doc-dsk: echo install-dsk ################################################################################ .PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk uninstall-local: \ $(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \ $(if $(_DOC_HTML_ALL),uninstall-doc-html) \ $(if $(_DOC_C_FIGURES),uninstall-doc-figs) \ $(if $(_DOC_OMF_IN),uninstall-doc-omf) # $(if $(_DOC_DSK_IN),uninstall-doc-dsk) uninstall-doc-docs: @list='$(_DOC_C_DOCS)'; for doc in $$list; do \ echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ done @list='$(_DOC_LC_DOCS)'; for doc in $$list; do \ echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \ done uninstall-doc-figs: @list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \ echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \ done; uninstall-doc-omf: @list='$(_DOC_OMF_ALL)'; for omf in $$list; do \ if test "x$(_ENABLE_SK)" = "xtrue"; then \ echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ fi; \ echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \ done dist-hook: doc-dist-hook # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: amide-1.0.5/gtk-doc.make0000644000175000017500000002277312235260665014655 0ustar loeningloening# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = $(LIBTOOL) --mode=execute else GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) GTKDOC_RUN = endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) SETUP_FILES = \ $(content_files) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt EXTRA_DIST = \ $(HTML_IMAGES) \ $(SETUP_FILES) DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ html-build.stamp pdf-build.stamp \ tmpl.stamp sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals REPORT_FILES = \ $(DOC_MODULE)-undocumented.txt \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) if ENABLE_GTK_DOC if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else HTML_BUILD_STAMP= endif if GTK_DOC_BUILD_PDF PDF_BUILD_STAMP=pdf-build.stamp else PDF_BUILD_STAMP= endif all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) else all-local: endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp #### setup #### GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ test -f $(abs_srcdir)/$$file && \ cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ test -d $(abs_srcdir)/tmpl && \ { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \ chmod -R u+w $(abs_builddir)/tmpl; } \ fi $(AM_V_at)touch setup-build.stamp #### scan #### GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ scanobj_options="--verbose"; \ fi; \ fi; \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### templates #### GTK_DOC_V_TMPL=$(GTK_DOC_V_TMPL_$(V)) GTK_DOC_V_TMPL_=$(GTK_DOC_V_TMPL_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_TMPL_0=@echo " DOC Rebuilding template files"; tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(GTK_DOC_V_TMPL)gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) $(AM_V_at)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ if test -w $(abs_srcdir) ; then \ cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \ fi \ fi $(AM_V_at)touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true $(srcdir)/tmpl/*.sgml: @true #### xml #### GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XML_0=@echo " DOC Building XML"; sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) $(GTK_DOC_V_XML)-chmod -R u+w $(srcdir) && _source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkhtml_options="$$mkhtml_options --verbose"; \ fi; \ fi; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ fi; \ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ if test -f $(abs_srcdir)/$$file ; then \ cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ fi; \ if test -f $(abs_builddir)/$$file ; then \ cp $(abs_builddir)/$$file $(abs_builddir)/html; \ fi; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp #### pdf #### GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ mkpdf_options="$$mkpdf_options --verbose"; \ fi; \ fi; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ part=`dirname $$img`; \ echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ if test $$? != 0; then \ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ fi; \ done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ rm -rf tmpl; \ fi maintainer-clean-local: @rm -rf xml html install-data-local: @installfiles=`echo $(builddir)/html/*`; \ if test "$$installfiles" = '$(builddir)/html/*'; \ then echo 1>&2 'Nothing to install' ; \ else \ if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ $(mkinstalldirs) $${installdir} ; \ for i in $$installfiles; do \ echo ' $(INSTALL_DATA) '$$i ; \ $(INSTALL_DATA) $$i $${installdir}; \ done; \ if test -n "$(DOC_MODULE_VERSION)"; then \ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: @if test -n "$(DOC_MODULE_VERSION)"; then \ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ else \ installdir="$(DESTDIR)$(TARGET_DIR)"; \ fi; \ rm -rf $${installdir} # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: docs else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local @mkdir $(distdir)/tmpl @mkdir $(distdir)/html @-cp ./tmpl/*.sgml $(distdir)/tmpl @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ @-cp ./$(DOC_MODULE).types $(distdir)/ @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ @cd $(distdir) && rm -f $(DISTCLEANFILES) @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html .PHONY : dist-hook-local docs amide-1.0.5/COPYING0000644000175000017500000004311010053303575013477 0ustar loeningloening GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. amide-1.0.5/m4/0000775000175000017500000000000012271016651012767 5ustar loeningloeningamide-1.0.5/m4/libfame.m40000644000175000017500000002056111300151754014626 0ustar loeningloeningdnl AM_PATH_LIBFAME([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for libfame, and define LIBFAME_CFLAGS and LIBFAME_LIBS dnl Vivien Chappelier 12/11/00 dnl stolen from ORBit autoconf dnl AC_DEFUN([AM_PATH_LIBFAME], [dnl dnl Get the cflags and libraries from the libfame-config script dnl AC_ARG_WITH(libfame-prefix,[ --with-libfame-prefix=PFX Prefix where libfame is installed (optional)], libfame_config_prefix="$withval", libfame_config_prefix="") AC_ARG_WITH(libfame-exec-prefix,[ --with-libfame-exec-prefix=PFX Exec prefix where libfame is installed (optional)], libfame_config_exec_prefix="$withval", libfame_config_exec_prefix="") AC_ARG_ENABLE(libfametest, [ --disable-libfametest Do not try to compile and run a test libfame program], , enable_libfametest=yes) if test x$libfame_config_exec_prefix != x ; then libfame_config_args="$libfame_config_args --exec-prefix=$libfame_config_exec_prefix" if test x${LIBFAME_CONFIG+set} != xset ; then LIBFAME_CONFIG=$libfame_config_exec_prefix/bin/libfame-config fi fi if test x$libfame_config_prefix != x ; then libfame_config_args="$libfame_config_args --prefix=$libfame_config_prefix" if test x${LIBFAME_CONFIG+set} != xset ; then LIBFAME_CONFIG=$libfame_config_prefix/bin/libfame-config fi fi AC_PATH_PROG(LIBFAME_CONFIG, libfame-config, no) min_libfame_version=ifelse([$1], , 0.9.1, $1) AC_MSG_CHECKING(for libfame - version >= $min_libfame_version) no_libfame="" if test "$LIBFAME_CONFIG" = "no" ; then no_libfame=yes else LIBFAME_CFLAGS=`$LIBFAME_CONFIG $libfame_config_args --cflags` LIBFAME_LIBS=`$LIBFAME_CONFIG $libfame_config_args --libs` libfame_config_major_version=`$LIBFAME_CONFIG $libfame_config_args --version | \ sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` libfame_config_minor_version=`$LIBFAME_CONFIG $libfame_config_args --version | \ sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` libfame_config_micro_version=`$LIBFAME_CONFIG $libfame_config_args --version | \ sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_libfametest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBFAME_CFLAGS" LIBS="$LIBFAME_LIBS $LIBS" dnl dnl Now check if the installed LIBFAME is sufficiently new. (Also sanity dnl checks the results of libfame-config to some extent dnl rm -f conf.libfametest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.libfametest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = strdup("$min_libfame_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_libfame_version"); exit(1); } if ((libfame_major_version != $libfame_config_major_version) || (libfame_minor_version != $libfame_config_minor_version) || (libfame_micro_version != $libfame_config_micro_version)) { printf("\n*** 'libfame-config --version' returned %d.%d.%d, but Libfame (%d.%d.%d)\n", $libfame_config_major_version, $libfame_config_minor_version, $libfame_config_micro_version, libfame_major_version, libfame_minor_version, libfame_micro_version); printf ("*** was found! If libfame-config was correct, then it is best\n"); printf ("*** to remove the old version of libfame. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If libfame-config was wrong, set the environment variable LIBFAME_CONFIG\n"); printf("*** to point to the correct copy of libfame-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (LIBFAME_MAJOR_VERSION) && defined (LIBFAME_MINOR_VERSION) && defined (LIBFAME_MICRO_VERSION) else if ((libfame_major_version != LIBFAME_MAJOR_VERSION) || (libfame_minor_version != LIBFAME_MINOR_VERSION) || (libfame_micro_version != LIBFAME_MICRO_VERSION)) { printf("*** libfame header files (version %d.%d.%d) do not match\n", LIBFAME_MAJOR_VERSION, LIBFAME_MINOR_VERSION, LIBFAME_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", libfame_major_version, libfame_minor_version, libfame_micro_version); } #endif /* defined (LIBFAME_MAJOR_VERSION) ... */ else { if ((libfame_major_version > major) || ((libfame_major_version == major) && (libfame_minor_version > minor)) || ((libfame_major_version == major) && (libfame_minor_version == minor) && (libfame_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of libfame (%d.%d.%d) was found.\n", libfame_major_version, libfame_minor_version, libfame_micro_version); printf("*** You need a version of libfame newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** libfame is always available from http://www-eleves.enst-bretagne.fr/~chappeli/fame\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the libfame-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of libfame, but you can also set the LIBFAME_CONFIG environment to point to the\n"); printf("*** correct copy of libfame-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_libfame=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_libfame" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$LIBFAME_CONFIG" = "no" ; then echo "*** The libfame-config script installed by libfame could not be found" echo "*** If libfame was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the LIBFAME_CONFIG environment variable to the" echo "*** full path to libfame-config." else if test -f conf.libfametest ; then : else echo "*** Could not run libfame test program, checking why..." CFLAGS="$CFLAGS $LIBFAME_CFLAGS" LIBS="$LIBS $LIBFAME_LIBS" AC_TRY_LINK([ #include #include ], [ return ((libfame_major_version) || (libfame_minor_version) || (libfame_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding libfame or finding the wrong" echo "*** version of LIBFAME. If it is not finding libfame, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means libfame was incorrectly installed" echo "*** or that you have moved libfame since it was installed. In the latter case, you" echo "*** may want to edit the libfame-config script: $LIBFAME_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi LIBFAME_CFLAGS="" LIBFAME_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(LIBFAME_CFLAGS) AC_SUBST(LIBFAME_LIBS) rm -f conf.libfametest ]) amide-1.0.5/m4/libtool.m40000644000175000017500000105756012271016651014711 0ustar loeningloening# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; powerpcle-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS amide-1.0.5/m4/ltversion.m40000644000175000017500000000126212271016651015255 0ustar loeningloening# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) amide-1.0.5/m4/lt~obsolete.m40000644000175000017500000001375612271016651015615 0ustar loeningloening# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) amide-1.0.5/m4/ltoptions.m40000644000175000017500000003007312271016651015265 0ustar loeningloening# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) amide-1.0.5/m4/ltsugar.m40000644000175000017500000001042412271016651014711 0ustar loeningloening# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) amide-1.0.5/m4/gnome-doc-utils.m40000644000175000017500000000342311753153111016234 0ustar loeningloeningdnl Do not call GNOME_DOC_DEFINES directly. It is split out from dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself. AC_DEFUN([GNOME_DOC_DEFINES], [ AC_ARG_WITH([help-dir], AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),, [with_help_dir='${datadir}/gnome/help']) HELP_DIR="$with_help_dir" AC_SUBST(HELP_DIR) AC_ARG_WITH([omf-dir], AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),, [with_omf_dir='${datadir}/omf']) OMF_DIR="$with_omf_dir" AC_SUBST(OMF_DIR) AC_ARG_WITH([help-formats], AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),, [with_help_formats='']) DOC_USER_FORMATS="$with_help_formats" AC_SUBST(DOC_USER_FORMATS) AC_ARG_ENABLE([scrollkeeper], [AC_HELP_STRING([--disable-scrollkeeper], [do not make updates to the scrollkeeper database])],, enable_scrollkeeper=yes) AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"]) dnl disable scrollkeeper automatically for distcheck DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS" AC_SUBST(DISTCHECK_CONFIGURE_FLAGS) AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"]) ]) # GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) # AC_DEFUN([GNOME_DOC_INIT], [AC_REQUIRE([AC_PROG_LN_S])dnl ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1]) AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required]) PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required], [gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no]) if test "$gdu_cv_have_gdu" = "yes"; then AC_MSG_RESULT([yes]) ifelse([$2],,[:],[$2]) else AC_MSG_RESULT([no]) ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3]) fi GNOME_DOC_DEFINES ]) amide-1.0.5/macosx/0000775000175000017500000000000012271346313013742 5ustar loeningloeningamide-1.0.5/macosx/amide.bundle0000600000175000017500000001164512053015134016201 0ustar loeningloening ${env:JHBUILD_PREFIX} ${env:HOME}/Desktop ${project}/launcher.sh gtk+-2.0 ${project}/amide.plist ${prefix}/bin/amide ${prefix}/lib/${gtkdir}/modules/*.so ${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/engines/*.so ${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/*.so ${prefix}/share/locale ${prefix}/share/themes ${project}/amide.icns ${project}/gtkrc amide-1.0.5/macosx/gtkrc0000600000175000017500000000006711340370357014771 0ustar loeningloeninggtk-icon-theme-name = "Tango" gtk-enable-mnemonics = 0 amide-1.0.5/macosx/launcher.sh0000775000175000017500000001315512037400363016103 0ustar loeningloening#!/bin/sh if test "x$GTK_DEBUG_LAUNCHER" != x; then set -x fi if test "x$GTK_DEBUG_GDB" != x; then EXEC="gdb --args" else EXEC=exec fi name=`basename "$0"` tmp="$0" tmp=`dirname "$tmp"` tmp=`dirname "$tmp"` bundle=`dirname "$tmp"` bundle_contents="$bundle"/Contents bundle_res="$bundle_contents"/Resources bundle_lib="$bundle_res"/lib bundle_bin="$bundle_res"/bin bundle_data="$bundle_res"/share bundle_etc="$bundle_res"/etc export DYLD_LIBRARY_PATH="$bundle_lib" export XDG_CONFIG_DIRS="$bundle_etc"/xdg export XDG_DATA_DIRS="$bundle_data" export GTK_DATA_PREFIX="$bundle_res" export GTK_EXE_PREFIX="$bundle_res" export GTK_PATH="$bundle_res" export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc" export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules" export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders" export PANGO_RC_FILE="$bundle_etc/pango/pangorc" APP=name I18NDIR="$bundle_data/locale" # Set the locale-related variables appropriately: unset LANG LC_MESSAGES LC_MONETARY LC_COLLATE # Has a language ordering been set? # If so, set LC_MESSAGES and LANG accordingly; otherwise skip it. # First step uses sed to clean off the quotes and commas, to change - to _, and change the names for the chinese scripts from "Hans" to CN and "Hant" to TW. APPLELANGUAGES=`defaults read .GlobalPreferences AppleLanguages | sed -En -e 's/\-/_/' -e 's/Hant/TW/' -e 's/Hans/CN/' -e 's/[[:space:]]*\"?([[:alnum:]_]+)\"?,?/\1/p' ` if test "$APPLELANGUAGES"; then # A language ordering exists. # Test, item per item, to see whether there is an corresponding locale. for L in $APPLELANGUAGES; do #test for exact matches: if test -f "$I18NDIR/${L}/LC_MESSAGES/$APP.mo"; then export LANG=$L break fi #This is a special case, because often the original strings are in US #English and there is no translation file. if test "x$L" == "xen_US"; then export LANG=$L break fi #OK, now test for just the first two letters: if test -f "$I18NDIR/${L:0:2}/LC_MESSAGES/$APP.mo"; then export LANG=${L:0:2} break fi #Same thing, but checking for any english variant. if test "x${L:0:2}" == "xen"; then export LANG=$L break fi; done fi unset APPLELANGUAGES L # If we didn't get a language from the language list, try the Collation preference, in case it's the only setting that exists. # AML doesn't seem to exist # APPLECOLLATION=`defaults read .GlobalPreferences AppleCollationOrder` # if test -z ${LANG}; then # if test -a -n $APPLECOLLATION; then # if test -f "$I18NDIR/${APPLECOLLATION:0:2}/LC_MESSAGES/$APP.mo"; then # export LANG=${APPLECOLLATION:0:2} # fi # fi #fi if test ! -z $APPLECOLLATION; then export LC_COLLATE=$APPLECOLLATION fi unset APPLECOLLATION # Continue by attempting to find the Locale preference. APPLELOCALE=`defaults read .GlobalPreferences AppleLocale` if test -f "$I18NDIR/${APPLELOCALE:0:5}/LC_MESSAGES/$APP.mo"; then if test -z $LANG; then export LANG="${APPLELOCALE:0:5}" fi elif test -z $LANG -a -f "$I18NDIR/${APPLELOCALE:0:2}/LC_MESSAGES/$APP.mo"; then export LANG="${APPLELOCALE:0:2}" fi #Next we need to set LC_MESSAGES. If at all possilbe, we want a full #5-character locale to avoid the "Locale not supported by C library" #warning from Gtk -- even though Gtk will translate with a #two-character code. if test -n $LANG; then #If the language code matches the applelocale, then that's the message #locale; otherwise, if it's longer than two characters, then it's #probably a good message locale and we'll go with it. if test $LANG == ${APPLELOCALE:0:5} -o $LANG != ${LANG:0:2}; then export LC_MESSAGES=$LANG #Next try if the Applelocale is longer than 2 chars and the language #bit matches $LANG elif [ $LANG == ${APPLELOCALE:0:2} ] && [[ ${APPLELOCALE} > ${APPLELOCALE:0:2} ]]; then export LC_MESSAGES=${APPLELOCALE:0:5} #Fail. Get a list of the locales in $PREFIX/share/locale that match #our two letter language code and pick the first one, special casing #english to set en_US elif test $LANG == "en"; then export LC_MESSAGES="en_US" else LOC=`find $PREFIX/share/locale -name $LANG???` for L in $LOC; do export LC_MESSAGES=$L done fi else #All efforts have failed, so default to US english export LANG="en_US" export LC_MESSAGES="en_US" fi CURRENCY=`echo $APPLELOCALE | sed -En 's/.*currency=([[:alpha:]]+).*/\1/p'` if test "x$CURRENCY" != "x"; then #The user has set a special currency. Gtk doesn't install LC_MONETARY files, but Apple does in /usr/share/locale, so we're going to look there for a locale to set LC_CURRENCY to. if test -f /usr/local/share/$LC_MESSAGES/LC_MONETARY; then if test -a `cat /usr/local/share/$LC_MESSAGES/LC_MONETARY` == $CURRENCY; then export LC_MONETARY=$LC_MESSAGES fi fi if test -z "$LC_MONETARY"; then FILES=`find /usr/share/locale -name LC_MONETARY -exec grep -H $CURRENCY {} \;` if test -n "$FILES"; then export LC_MONETARY=`echo $FILES | sed -En 's%/usr/share/locale/([[:alpha:]_]+)/LC_MONETARY.*%\1%p'` fi fi fi #No currency value means that the AppleLocale governs: if test -z "$LC_MONETARY"; then LC_MONETARY=${APPLELOCALE:0:5} fi #For Gtk, which only looks at LC_ALL: export LC_ALL=$LC_MESSAGES unset APPLELOCALE FILES LOC if test -f "$bundle_lib/charset.alias"; then export CHARSETALIASDIR="$bundle_lib" fi # Extra arguments can be added in environment.sh. EXTRA_ARGS= if test -f "$bundle_res/environment.sh"; then source "$bundle_res/environment.sh" fi # Strip out the argument added by the OS. if /bin/expr "x$1" : '^x-psn_' > /dev/null; then shift 1 fi $EXEC "$bundle_contents/MacOS/$name-bin" "$@" $EXTRA_ARGS amide-1.0.5/macosx/Makefile.am0000664000175000017500000000021411412300213015754 0ustar loeningloeningEXTRA_DIST = \ amide.bundle \ amide.icns \ amide.plist.in \ amide.plist \ gtkrc \ launcher.sh DISTCLEANFILES = \ *~ \ amide.plist amide-1.0.5/macosx/amide.icns0000600000175000017500000011650611340370357015677 0ustar loeningloeningicnsFis32¿€Œ€ƒ :36547 -*--,/$ƒ 6()40‚ '888 67 ;:0 !>,0?>1A$#DE&A;?BDDBG>€P'EBC@ACJGM=J MR3.FG) .OQM#+WINVO @cSZUi'ACDF'#GJLL@ €Œ€„ 814315 +(+,*."ƒ 3&&0,‚ %30. 0/ 0-&ƒ 3$&/. (2102+.010,/*€A1./--.1-1,201!"/.  1.-7-143(9.2.9*€+ )*++%€€€ƒƒ 9?@@D2‚ P´ž§Ÿš™# 0t€œœˆ†M >Û‡h¦m € „àE+¨….¹» ”VSÏ~]Žu€sˆÄR ;†…:#ž”žš•‘€…cS‘|~vrq|€~~‹) yˆD W‰xDDz€o/ L¡€…—y_œ„|‘1]dcb3,]`a`Q ‚s8mk6@<=?3iÿøÿÿùÿenÿôüûùÿàZÂÿôïýÿe  ÿ̬ÿÿ´éÿ·Xéÿí1]ÿî˜ ©ÿÿ}´ÿÚzeÿÿÉ $öüõïééùýúB rÿ÷ÿþÿþÿùÿŽÃÿÕ ¬© ¯ÿÿ× túÿØ` {öÿÿ†€ÿôÿþõ5ªÿõÿõÿ‰iÿøÿýÿøÿüÿ·NŒ†‹€KVŒ‡Š‡hil32d…†ˆ„Œ98>;„<:!Œ$7*-†+5Š"1-0/ƒ12/1Š"7031….0+‹/0//0/3 1./0*2115#‹$4-1."61442‹ ;.13#7374:‹;0456787;,‹/72600;8:9; ‰D269# @8=:@‰&>489 >;>9:?!D>C?G(‡-B9==6,/3519G@DCF=‰;>=??BGGHHJHDEEFDJ…D=@?>>=>>??@CDFHEM0… ,D>BCGHIJJK€LMHIIKEƒEABD<ƒ' ((&1IJLJQƒ IBCI‚ GMNLR;‚ 3JBH@ 6SLPPO  6HFGHD! ‚%1MRORPU;'QMIGIIJPNQ=\XVPR€S XZ\(LCKJL IQ,IPNRUU€V2WQZ(THKJJKKNNVJZSTSTTUUVY\DMQQRRSSQ33LVZ‚[YT,€‚ƒ Œ‚‡ƒ„……€…ˆˆ„Œ76<9„:8 Œ$4(*†)3Š!.,/.ƒ/0-/Š!4.0/…,.*-.--.,/ /,-.'.-,0 ‹#1+.+1+.-,‹ 8+-/ 0+.+0‹7*...,.,/%Œ+/,.)*/,.,. ‰=)./3+/,1‰$4*-. 1-/-/(Œ//,.)*0-/-0‡2+,02,/,1‡'3+/.*$'*+'.4,/..+‰/€./0‚3 2././-1…4,/--,ƒ+--./-1#…$1-//11ƒ2 11..//.ƒ5-./)„ "./0-2ƒ 4,.1‚ 0/0.1(‚(2,/+‚ #2.0.0  -3-..,‚(8€/ .0% 73/€. /315-953.€/ .1280*0/€0 /-1!,.,/ƒ0,05€.--./.4)2./„.3 .03‚21$#.1„20€‚ ‚‚ ‹”ƒ„„€…†ˆ'$‚%$'Œœº¹¶‚·¸¶°O‰W¹‚††€ˆ†ƒ‚€ˆ{ˆPŽ~Ž•™—•Žˆ„~/Š6‚‘¦¦£¥ Ÿ•‹‡UŒ+4>–·°­‰’˜‰‚s¶Ä¿«a§‘†ƒ7‹ lܺІN©™†^Œ´Å½ÈM&¡’„y‰BϹñ~¦“„ƒC‰}̱ȄX¤”†‚h ‹½º´ÁI /–“†~%‡QÆ®»£ t’ƒ~…K‰‰À©½v Nˆ€‚o‡®°¬´8y€~1…\ºœ©ª{Zchker˜‚}…X‡‡¡Ÿ¬²¯­¨¢Ÿ‹€€v… ¢ƒ‡ŠŒŠ‡„yvv|}}ƒ;ƒ [¡z‚ƒ‰‰Šˆ‡€ˆ ††€€}ƒ_…’Ž|ƒ^3„4 2>s€z 0¡€| „a‚~}„Fƒ cžxˆ]€A„}‚i V’‰}„g1+‚S Dm…}€~K%A¢Ÿ€€~…”•ˆ#W“‹€~}‚yH‘s€~~|{}/qw}~||zxwo|%<Œ‚€€ƒzh‰~~yy€w x|x#\p‚vto>€ 8`pttssttrj1€ ‚ƒ €…‚‡ƒƒ…„€l8mk ‘àâäãããããåàæ„fÿ÷ÿþÿÿÿÿÿÿÿûÿF‡ÿòÿúüüüüýüþøÿË-jÿ÷ÿþÿÿÿÿÿþÿÿÿø©ôôôüþþþþþýÿüÿ°,H™üÿüÿáëÿþýÿàV +¡ÿüüÿ¦¿ÿùÿþý‹Çÿúÿù„ÿûÿüÿÀ47ÿþýÿÒywàÿýÿÿée…ÿøÿÿ¤„?…ÿõÿüÿ›×ÿúÿõ„…5ÿùÿüÿÌAGÿüýÿÍvl Ôÿüÿÿðr œÿùÿÿ§ƒRÿöÿüÿ©%æÿûÿï{q'þýÿýÿØMYÿùÿÿ껹ƒ}€îÿýÿÿ÷‚®ÿøÿþÿÿÿÿÿÿÿÿÿþÿüÿ·/ñÿþÿÿþûû÷÷÷÷þÿþÿýÿâ\ kÿ÷ÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿüÂÿúÿýýýüüûûûüûúýÿÿüÿÄ:-ûþþÿ–™˜˜˜—˜«ýÿÿþÿëk ~ÿùþÿ»ju^]^]]`[FÉÿúÿýÿœDÖÿüÿÿµ¢R )>—ÿùÿüÿÙr Aõþþþþþþÿÿî;dýüÿþþþþÿýÿÙ ˆÿòÿþÿÿþÿøÿ°Ôÿ÷ÿÿÿÿÿþÿöÿŒ †ÿõÿùûûúýúþÜg×ÿûþúûûûúþùÿÈR xÿöÿþÿÿþÿûÿ¹{6«ÿøÿþÿÿÿÿÿüÿ¨urÐÚÕÖÖÖÖÔ´|ƒ4‰×ØÖÖÖÖÖÖÓ©{~>{|€~{ƒlH||€~{…^$@AAAAAB4*@AAAAAAB. it32L÷Å‚~’{y~áƒbNY]’\ZL@_Þ‰UN@–;?JEÝOA™;H€G€IJJE%€ ".@GG@J__\€OPRSG$©—›€—‚aQJ‚d?EE_88@@:=BB=ƒ6=MGIJ9€ 2CJGGWJ__]R€PRST9 ¨——›€—ƒaQQdJ„dR_@:?€=??B‚6BHPIIJ€K=$/0045JMGGWW@aa]‚R€STB¦›——n—n}€akakrr†dR€_@@ÅÉGEƒBQQHIRJ‚KLLHHIJMO]dccbafhgfRR€ST€UR*¦€›n€akahrr†d__‚ÅÉB?€Q­pKL€NRUXXWY\]\]]^ZSTUW7¤€‰’‚n}a€khhr†d„_‚ÅÇ‚ÉmMM€Ñ½RKKL€NO‚PR€ST‚UWXXN¤€‰‚n€}mkphhr‚d܂ԂŃɀm€Ñ‘L€N‚OPRSTUWXYY#£‰‚n}m€hr…Ñ€ÔńɀÿÑÑÍaLNOPRSTU‚W€XYZA ¡‚‰nƒ}r…Ñ€Ô€ÌłɃÿѵQNNO‚PR€ST‚UW€XYZY ‰‡‰‚R‚}humhr̆рԀÌÇÉ…ÿƒPOOPRSTUWXYZ\Z*ž‡‰‡‰‰RRƒZ}huhh³Ì„тԀÌÇÎdžÿêlP‚R€ST‚UW€XY‚Z\€]Jž‰€RƒZah³Ì†Ñ€Ô€ÌLjÿÁ_PPR€S‚TUW€X‚YZ\€]€^T"‡R‚Zcch³Ì̄р³Ìˆÿô†RSTTS‚P‚R€S„TUX€\]^_\= ›‚‡€R„Zhh³Ì̃ѿ€³ÌˆÿÖrRR€STG8.),4G€]^‚_Lš€m€‡GRRVVOZŒ‚³Ì̸¸Ì¿³²‰ÿü´[SST UUO$‹/R^_€aW/™mBBGE‚OÿŒ€ÿ€¼ÌÌ€¸‚¿³ŠÿTUWW?0>q$ L€_‚a€ba:™€m‚B€O…ÿ²²‚¸‚¿³ŠÿÔi‚U€WS.,oF€€Ž!%S_a€bcM —€m‚BOO‡ÿ€º„¸³²€³²‰ÿù°€UW XXLL€€‚„‡ˆI+;Xabcee_,–__\\‚B=ˆÿåÉ‚º··°ƒ³‰ÿW€X YFd€€ˆ˜§ªŒ«[6=abbceff;–__€fB‰ÿå€Ü··—M—ƒL‰ÿþÖaWW€XYF4x€€„”¿âäzzyZcefY"•ƒ^B‰ÿƒ#3‚H€L‡ÿ÷ìéŸXXYZW]‚ˆ¦ÝŒŒÿø—–—_€e‚f€ghhO9’„^€‰ÿƒ#„HLL…ÿò°€{zd€Y‚Z\\[a€glHŒƒ$ƒÿýä­Šrqrcef€g‚hfYZTtƒ‰„^€‰ÿ€#€3ƒHLƒÿè|^‚YZ\]€^a]|&ƒ$ÿþÊqi€efghj€kilt_h^^a^dx‰ÿ#‚3ƒHLƒÿ“YZ\]^_Q'ƒ$)âmee‚f€ghj‚k€lmKh^^a^kkˆÿ5++33hhƒHLƒÿdY‚Z\€]^‚_aaT+ƒ$)Ž‚f€gh‚jk€l€mk,Œpp^^kkpa€k†ÿ++5€+3h‚HL=‚ÿeZ\]^_‚abbU% $1€)of€ghj‚k€l„mgŒ€}akkaa€kÔƒÿ,5,,33ƒh€H‚=‚ÿf€\€]^‚_a€b ccP#$$1Zgh‚jk€l‡mg‹{OkkOOkk‚Ô€ÿ,5,,33„h3„=ÿf€]‚^_a€b‚cF!))1[€hjkl‰mg‹{OkkOOkk‚Ô€ÿ€,ƒ3„h:„=C€ÿg]^_abcee\).,11==]i€jkl‹mj;‹}}E„OƒÔ³33,+30‚3ƒh3:„=C€ÿiT^_‚a€bce aB--11€=R\gk€lmgE Š€z‚EOO„ÔG33:)30ƒ:hhdd33ƒ: ==rrÿÿ‰'FT^a€b‚ce _P9 $+,‚=@3DT^glmkcT9‹€z‚E€OƒÔ‚:30„:‚d„:=CRÿÿÚd 2BEFEE‡F B* CG+7ƒ=2$8GŒJIA( ‹u„E=›ÿƒÔ‚:30„:‚d‚: ?)$$°°ÿþç¶D-‚.… 1BCIY7ƒ=<-©e7„.€  ŒuaEa‚E=„ÿƒ:3…:‚d;L=ƒ$°ÿýù¢|‚y‚66789€BDLb9ƒ=$$üÍ”~yxx€) ‚56uaEau=…ÿ8Œ:‚d }^$$))$$)EEW¾•ˆƒ‚‚ƒ ƒ9C)?COj=ƒç´“…€‚€F!‚80pnpaz€C†ÿ8Œ: ;}};;}^$$))$!)€R€WžZFD))‚ƒ<F-588…ß°™Šˆ‡J!‚;2Œppnpannh‡ÿ8Š:^…)ERR€WTi`SJD„!‚EOQ88† åÓ³¤š™SSƒBB88B8Œ€nann_‡ÿ,::==Jƒ^^$))$!)€RTpojfc.ƒ/€g\\g€-† ¯ª§¦ƒ&ccTŒ‚‚‚W‡ÿƒ,$$„ $$0)!))!!E€RTpRRpp55@@66ffQahhQ€)€†¼Ç›+ƒ'p_‹‚W‡ÿƒ,€€…€$00))!VOOdVTTWW__Rpp_6;;66ffQaah)&€…¼ÇŒ‚+€p_‹ƒzWW†ÿ„,„'€$00))ƒV TZZW__ZZ__E@@‘€fQhh‚)&€…€ÿ€Ç’’'{km_‹‚Wh…ÿ„,‚„€$05ƒVTZZ€_Z€_VVE‚‘))$€)$&€€ ‚…ÿ’€{m_‹‚–W@…ÿƒ,$‚ƒ00$€0;G‚VZ_ZWZ€_VVƒ‘@@$ƒ)€  †ÿê:OO{{……_€OŠ‚„ƒ@QQÉÿ01,‚‚€0;0;OVVƒZ__WW€_HVƒ‘€@)=))=„  †ÿêƒ:m^€OŠ‚‚ƒ@QQÉÿ00,,$$ƒ01'0;ƒ8VVƒZ__WW€THTƒ‘€@)=ƒ)$$ ‚&†ÿGGO:p^€\Š‚‚‚@;QQÉ΂€,$‚ƒ01'0;ƒ8VV„Zc^^‚Tƒ‘@@+==,,)$$„&†ÿá1W:p\Šƒ‚@;QQÉ΂3$$$‚E01'0;€8;8=VV„Zc^^€TOT‘‘mZ€@ƒ+€,)$$„&†ÿ@1:^^::c€\‹ƒ‚@8@‚Éÿÿ€3$==$$ƒE01‚0;€8;8=LL‚Z€c‚T88€mZZMƒ+,5€)$$„&†ÿ@‚1:c€\‹ƒ‚@8ÉÉ„ÿ€;==$$=ƒE?1€=5;;‚8=LLZZ„cO88\\B€Mƒ+‚5,,€'„&†ÿ@ƒ.c€\Š€d€‚ƒ8É…ÿ;3;‚=ƒE?‚=Q„8Lƒc€M88?‚@‚+‚5,'&&&†ÿ@.1.h€\Šdxd€x‚E8·…ÿ;3;=„EL‚=Q°°‚8Lƒc^^G88?@@?€3‚+5,€$ƒ&&…ÿ..1.€h‹{{d€{E€QEGL…ÿ;6;‚=EEƒLG²hQ…°T›L„c^^€8?@@?33ƒ+€5‚$ƒ„ÿ@…3hh‹€d‚QEG‡ÿ66‚=E„L²²hQ‚°ƒ²°°dd€sdZZ„?@?€0+))$)‚$ƒ&ƒÎ†3^^‹ƒHQQHHG†ÿ8„6R³„²‚°€²º²²°ººsO‰O„?@?€0+‹$€&ƒÎ86„35^‹ƒHQQ€:z…ÿ0ƒ6ƒ³ƒ²€¼¿¿º¿¿…º¸ss ‰‰„?@?€0+$)†$‚ƒÉÎ86„3^ŒƒHQQ€:3…ÿ06,,ƒ³ƒ²¼¼€¿º¿¿…º¸ºº ’‚?@€0++‹$##€ƒÉÎ86„3\‹„HH:3:ƒÿ‚0€,ƒ³²¿¿¼¿º¿¿¼„º¸°°‚ ’?€6‚5Œ$€#&&ƒÉÎÎ66‚53^‹€m:H3:3:ƒÿƒ0m¿¼·³²·²²ˆ¿„º‚²€ ’W€6‚5Œ$#!„ÉÎT6TJTJ€3Œƒc:;;:3:zƒÔ‚0¼‚¿‚·‰¿„º…²™W66„5‹$€#&ÿ‚ÉT€HJHJH^^Œƒc :;3:3::3zzƒÔ€8€«€¿³··³³··‰¿ºº¼¼º‡²™™W…5Œ$#&„ÿ€ÉT€HJ€HddcRRcc:3::35=‚ÔÞÜÞn€«€¿‚¼¸Š¿‚¼ˆ²™WW„5€)…$;‚&…ÿÉTT€HJTJBBŽc„3;3;?‚ÔÞÜÞÞ€«¿Àƒ¼¸‹¿¼‰²€W…500€$5€1;&†ÿTT„HmŽc€353355;;À‚ÔÞÜÞÞ€«€¿¼··¼¼‚¿Ì†¿Â‰²«œL…500€15€1€;&&‡ÿCC„H\3…5;?Ô€ÜÞÞÜÿ¿¿‚·¼·¿„̃¿Â²¸³‡²œ„„5B5B:0€15€1;£†ÿ.HBB\3…56?ÔÜ„ÿ¿¿·Ì¼Ï΄ÌÉɃƒ¸†²€„T„BG:885„;£†ÿ,.B\3…566ÛÜ…ÿ·ÌÑÑ€ÌÑ¿„ÌÉɃƒ¸³…²„BGBGGOH::ƒ;££…ÿ.,.B\3…5==Û†ÿ„ÌÑ¿Ì̃¿É‚¼„¸³‚²„OGGOG€HOHEE;;€'€£…ÿ.,‚.,’\u…5==@?ÛÛ†ÿ„ÌÑÏÌ…¿‚¼…¸€³‚²—cGG€OH€O3E‚'€£…ÿ.,‚.,’\u…5=€?ÛÛ‡ÿØ€ÑÔ²…¿ƒ¼„¸‚³²²³—cGG„O3'³««ÿ€B.‚,•‚uh€5‚B@@La‡ÿØØÑ„²†¿¼‚¸³²³²²³³—cGJƒO'€'€³€«BH€,–‚u hJG=B@B@B@@LB‡ÿØØ†²…¿€¼ƒ¸†³‚—ƒOHO##€‚³€¸««„QT˜‚u JEBB@B@B@@BB‡ÿ¼¼†²…¿¼³€¸‚³²‚³—O+O€'#€€¸³€¸³³J€Q_Qc™‚u€QB€@B@?€B…ÿ€¼†²†¿€¼¸¸³¸€³€²‚³—_WW„+''¸¸³€¸³³J€Q_Qcš}ss}uhBB€@B@?BB)…ÿ¼¼¿¿†²„¿¼¸³³²€¥³¡¡uW…+''#‚¡‚©€³f_^œ€}ZGBB@B?B??BB)BB€ÿ‚‚¿ƒ²€¸ƒ¿¼¿¸¸€³¨²€¥€¡u@…+''#€¡¡¸¸€«¸dJ€fHH}}ƒZEEBB):€B:B5ÂÂÌÌÀ‡¿²‚¸ƒ¿€¸©©„¨€¥¡u11…+'€#››¡™™°€«²ddfddHHžfZZ_€ZEE11):ƒB€̈¿‚¸²²€°­¸©‚¨‚¥¡C11†+##›™«²ddfdd¢Zf€ZEE11))ƒB€̈¿‚¸²²€°­‚©ƒ¨¥¡C11…+''€¥›™«²d¥ZML1))ƒB³Â‰¿€¸€²€°­‚©„¨¥¥€€1„+)¥›™¥­­«°dd¨€ZkLZ11ƒB‚³··‡¿ƒ²€°ƒ©„¨¥¥¡C€1+11++€œ¥‚›€­«­«ZdkkZL:ƒBƒ³·‡¿ƒ²°°¥„©ƒ¨«ƒ1z©€œ¥›¥¥›¥­°ZL€BQƒ³··†¿ƒ²­€¨¥‚©‚¨¥«Cpz©œœÉ„¥­­µ‚Q„³·†¿ƒ²¨ƒ¥©©„ÿ‚^RR„„̀ɥ««¥ºQQƒ³º·‰¿²²€¨£¥‡ÿR„„†Ì€É¥¨Â­­¾³º‰¿²€œ££­­‹ÿ„ÿ„„†Ì‚ÉÂÂÁ³³ƒº¿¿¼„¿¼–ÿ†Ì‚ÉŃº‡¿¼–ÿ†Ì€Éɺ‡¿Ì–ÿˆÌ̉¿Ì–ÿ…ÌÑ€À‚¿ÂÀÌ–ÿå‘ÿÿÿÿÿÿªÅ{’zv}á‚aKWZ’YXJ?^ÞˆSL=–8†8„aD;„897·€Œ€zz}}}‰:n8nƒ6BQ=…87*..ƒ;8„98"³’’ŒLE?EEŠ:8ƒ6BM@†8,../7-78‡93±’ŒJJOOE?EE‰:=8ƒ6BM@†8-..1;W$‰94°‚’QJJ@OO€ER‡:B:=Bƒ6ED;…8. ./4CY\f6‰9, ®ƒ’QJJZOOE‡:B:=Bƒ6JD†8$ .07OFGfJ_0‰91¬——’’aQJ‚d?Eˆ:B:=:ƒ6ˆ8$€ ".@GG@J__V‰98#©—›€—‚aQJ‚d?EE_88@@:=BB=ƒ6q$ Š;)™€m‚B€O…ÿ²²‚¸‚¿³ŠÿÎS†9(,oF€€Ž!%:‰;7—€m‚BOO‡ÿ€º„¸³²€³²‰ÿø¤†94L€€‚„‡ˆI+1Š;!–__\\‚B=ˆÿåÉ‚º··°ƒ³‰ÿët†9 /d€€ˆ˜§ªŒ«[67=‰;+–__€fB‰ÿå€Ü··—M—ƒL‰ÿþÏG†914x€€„”¿âäzzvBŠ;•ƒ^B‰ÿƒ#3‚H€L‡ÿöè厇9:U{~}ˆ¦ÝŒŒÿö“’‘LŠ;2.’„^€‰ÿƒ#„HLL…ÿð¢jcbH‡9p%ƒ$ÿý¼KA“;:q$ UŒ Ÿƒ ›{<™€m‚B€O…ÿ²²‚¸‚¿³ŠÿëÅDz££¢¢Ÿy1,oF€€Ž!%ZšŸŸ‚ ŸŸ‹V"—€m‚BOO‡ÿ€º„¸³²€³²‰ÿûßÅ¿«£¢¢ Ÿ–_M€€‚„‡ˆI+;h–Ÿƒ ŸŸ–q-–__\\‚B=ˆÿåÉ‚º··°ƒ³‰ÿöÊĶ¥€¢  ŸJd€€ˆ˜§ªŒ«[6?r”Ÿ… ‚@–__€fB‰ÿå€Ü··—M—ƒL‰ÿþîÂÀ°¤£¢¢ ŸŒI5x€€„”¿âäzz{o–¤„ ŸŸg$•ƒ^B‰ÿƒ#3‚H€L‡ÿü÷öÙÀº©£€¢  Ÿ”mdˆŒŒˆ¦ÝŒŒÿûžžŸ|£§¢… _ "F’„^€‰ÿƒ#„HLL…ÿ úáÐÍÍ¿´¥£€¢  ŸŸž£¬­­©¹VŒƒ$ƒÿþðѾ€§§¥¢„  ŸŸž”‚‚zž¤£„^€‰ÿ€#€3ƒHLƒÿöÍÁ¿¿¾¼¶¨£¢¢  ŸŸ¢¬€µ´´±“Œ&ƒ$ÿ þ௫¨§§¥¥¤£ƒ  ŸŸžž››š–™‹_h^^a^dx‰ÿ#‚3ƒHLƒÿ Í¿¾ºµ°«¥£¢ƒ ¢¤¨­€°®a(ƒ$)쬧§¥¥¤¤££¢¢  ŸŸžž››šš™™——}Kh^^a^kkˆÿ5++33hhƒHLƒÿ¥»´©¤£€¢„ ¢££¤¥”b,ƒ$)¬¤¥¤££€¢  ŸŸžž››šš™™——€–‹,Œpp^^kkpa€k†ÿ++5€+3h‚HL=‚ÿ˜°¥£¢ Ÿa% $1€)“££¢¢  €Ÿžž€›šš™™——ƒ–Œ€}akkaa€kÔƒÿ,5,,33ƒh€H‚=‚ÿ£¢  ŸžŒZ#$$1w ¢  ŸŸžž››šš™™——†–‹{OkkOOkk‚Ô€ÿ,5,,33„h3„=ÿžŸŸ  ž›†L!))1s€Ÿ žž››šš™™——ˆ–”z‹{OkkOOkk‚Ô€ÿ€,ƒ3„h:„=C€ÿ‹•€Ÿ‹ Ÿžž–s*.,11==p”›››šš™™——Š–”{<‹}}E„OƒÔ³33,+30‚3ƒh3:„=C€ÿ|l‰–™šš‰›šš™”}J--11€=Vf–—™——Š–••”‘~J Š€z‚EOO„ÔG33:)30ƒ:hhdd33ƒ: ==rrÿÿŠ(Pkzƒ„ˆ† „„‚yb= $+,‚=@3E]q}ƒ„„‰†„„va=‹€z‚E€OƒÔ‚:30„:‚d„: =CRÿÿÚd"3G‰L KKE- CG+7ƒ=2%8I‹LKKA( ‹u„E=›ÿƒÔ‚:30„:‚d‚:?)$$°°ÿþç¶ŽD-00€.… 1BCIY7ƒ=<-ªe7/00.€  ŒuaEa‚E=„ÿƒ:3…:‚d;L=ƒ$°ÿýù¢|‚y‚66789€BDLb9ƒ=$$üÍ”~yxx€) ‚56uaEau=…ÿ8Œ:‚d }^$$))$$)EEW¾•ˆƒ‚‚ƒ ƒ9C)?COj=ƒç´“…€‚€F!‚80pnpaz€C†ÿ8Œ: ;}};;}^$$))$!)€R€WžZFD))‚ƒ<F-588…ß°™Šˆ‡J!‚;2Œppnpannh‡ÿ8Š:^…)ERR€WTi`SJD„!‚EOQ88† åÓ³¤š™SSƒBB88B8Œ€nann_‡ÿ,::==Jƒ^^$))$!)€RTpojfc.ƒ/€g\\g€-† ¯ª§¦ƒ&ccTŒ‚‚‚W‡ÿƒ,$$„ $$0)!))!!E€RTpRRpp55@@66ffQahhQ€)€†¼Ç›+ƒ'p_‹‚W‡ÿƒ,€€…€$00))!VOOdVTTWW__Rpp_6;;66ffQaah)&€…¼ÇŒ‚+€p_‹ƒzWW†ÿ„,„'€$00))ƒV TZZW__ZZ__E@@‘€fQhh‚)&€…€ÿ€Ç’’'{km_‹‚Wh…ÿ„,‚„€$05ƒVTZZ€_Z€_VVE‚‘))$€)$&€€ ‚…ÿ’€{m_‹‚–W@…ÿƒ,$‚ƒ00$€0;G‚VZ_ZWZ€_VVƒ‘@@$ƒ)€  †ÿê:OO{{……_€OŠ‚„ƒ@QQÉÿ01,‚‚€0;0;OVVƒZ__WW€_HVƒ‘€@)=))=„  †ÿêƒ:m^€OŠ‚‚ƒ@QQÉÿ00,,$$ƒ01'0;ƒ8VVƒZ__WW€THTƒ‘€@)=ƒ)$$ ‚&†ÿGGO:p^€\Š‚‚‚@;QQÉ΂€,$‚ƒ01'0;ƒ8VV„Zc^^‚Tƒ‘@@+==,,)$$„&†ÿá1W:p\Šƒ‚@;QQÉ΂3$$$‚E01'0;€8;8=VV„Zc^^€TOT‘‘mZ€@ƒ+€,)$$„&†ÿ@1:^^::c€\‹ƒ‚@8@‚Éÿÿ€3$==$$ƒE01‚0;€8;8=LL‚Z€c‚T88€mZZMƒ+,5€)$$„&†ÿ@‚1:c€\‹ƒ‚@8ÉÉ„ÿ€;==$$=ƒE?1€=5;;‚8=LLZZ„cO88\\B€Mƒ+‚5,,€'„&†ÿ@ƒ.c€\Š€d€‚ƒ8É…ÿ;3;‚=ƒE?‚=Q„8Lƒc€M88?‚@‚+‚5,'&&&†ÿ@.1.h€\Šdxd€x‚E8·…ÿ;3;=„EL‚=Q°°‚8Lƒc^^G88?@@?€3‚+5,€$ƒ&&…ÿ..1.€h‹{{d€{E€QEGL…ÿ;6;‚=EEƒLG²hQ…°T›L„c^^€8?@@?33ƒ+€5‚$ƒ„ÿ@…3hh‹€d‚QEG‡ÿ66‚=E„L²²hQ‚°ƒ²°°dd€sdZZ„?@?€0+))$)‚$ƒ&ƒÎ†3^^‹ƒHQQHHG†ÿ8„6R³„²‚°€²º²²°ººsO‰O„?@?€0+‹$€&ƒÎ86„35^‹ƒHQQ€:z…ÿ0ƒ6ƒ³ƒ²€¼¿¿º¿¿…º¸ss ‰‰„?@?€0+$)†$‚ƒÉÎ86„3^ŒƒHQQ€:3…ÿ06,,ƒ³ƒ²¼¼€¿º¿¿…º¸ºº ’‚?@€0++‹$##€ƒÉÎ86„3\‹„HH:3:ƒÿ‚0€,ƒ³²¿¿¼¿º¿¿¼„º¸°°‚ ’?€6‚5Œ$€#&&ƒÉÎÎ66‚53^‹€m:H3:3:ƒÿƒ0m¿¼·³²·²²ˆ¿„º‚²€ ’W€6‚5Œ$#!„ÉÎT6TJTJ€3Œƒc:;;:3:zƒÔ‚0¼‚¿‚·‰¿„º…²™W66„5‹$€#&ÿ‚ÉT€HJHJH^^Œƒc :;3:3::3zzƒÔ€8€«€¿³··³³··‰¿ºº¼¼º‡²™™W…5Œ$#&„ÿ€ÉT€HJ€HddcRRcc:3::35=‚ÔÞÜÞn€«€¿‚¼¸Š¿‚¼ˆ²™WW„5€)…$;‚&…ÿÉTT€HJTJBBŽc„3;3;?‚ÔÞÜÞÞ€«¿Àƒ¼¸‹¿¼‰²€W…500€$5€1;&†ÿTT„HmŽc€353355;;À‚ÔÞÜÞÞ€«€¿¼··¼¼‚¿Ì†¿Â‰²«œL…500€15€1€;&&‡ÿCC„H\3…5;?Ô€ÜÞÞÜÿ¿¿‚·¼·¿„̃¿Â²¸³‡²œ„„5B5B:0€15€1;£†ÿ.HBB\3…56?ÔÜ„ÿ¿¿·Ì¼Ï΄ÌÉɃƒ¸†²€„T„BG:885„;£†ÿ,.B\3…566ÛÜ…ÿ·ÌÑÑ€ÌÑ¿„ÌÉɃƒ¸³…²„BGBGGOH::ƒ;££…ÿ.,.B\3…5==Û†ÿ„ÌÑ¿Ì̃¿É‚¼„¸³‚²„OGGOG€HOHEE;;€'€£…ÿ.,‚.,’\u…5==@?ÛÛ†ÿ„ÌÑÏÌ…¿‚¼…¸€³‚²—cGG€OH€O3E‚'€£…ÿ.,‚.,’\u…5=€?ÛÛ‡ÿØ€ÑÔ²…¿ƒ¼„¸‚³²²³—cGG„O3'³««ÿ€B.‚,•‚uh€5‚B@@La‡ÿØØÑ„²†¿¼‚¸³²³²²³³—cGJƒO'€'€³€«BH€,–‚u hJG=B@B@B@@LB‡ÿØØ†²…¿€¼ƒ¸†³‚—ƒOHO##€‚³€¸««„QT˜‚u JEBB@B@B@@BB‡ÿ¼¼†²…¿¼³€¸‚³²‚³—O+O€'#€€¸³€¸³³J€Q_Qc™‚u€QB€@B@?€B…ÿ€¼†²†¿€¼¸¸³¸€³€²‚³—_WW„+''¸¸³€¸³³J€Q_Qcš}ss}uhBB€@B@?BB)…ÿ¼¼¿¿†²„¿¼¸³³²€¥³¡¡uW…+''#‚¡‚©€³f_^œ€}ZGBB@B?B??BB)BB€ÿ‚‚¿ƒ²€¸ƒ¿¼¿¸¸€³¨²€¥€¡u@…+''#€¡¡¸¸€«¸dJ€fHH}}ƒZEEBB):€B:B5ÂÂÌÌÀ‡¿²‚¸ƒ¿€¸©©„¨€¥¡u11…+'€#››¡™™°€«²ddfddHHžfZZ_€ZEE11):ƒB€̈¿‚¸²²€°­¸©‚¨‚¥¡C11†+##›™«²ddfdd¢Zf€ZEE11))ƒB€̈¿‚¸²²€°­‚©ƒ¨¥¡C11…+''€¥›™«²d¥ZML1))ƒB³Â‰¿€¸€²€°­‚©„¨¥¥€€1„+)¥›™¥­­«°dd¨€ZkLZ11ƒB‚³··‡¿ƒ²€°ƒ©„¨¥¥¡C€1+11++€œ¥‚›€­«­«ZdkkZL:ƒBƒ³·‡¿ƒ²°°¥„©ƒ¨«ƒ1z©€œ¥›¥¥›¥­°ZL€BQƒ³··†¿ƒ²­€¨¥‚©‚¨¥«Cpz©œœÉ„¥­­µ‚Q„³·†¿ƒ²¨ƒ¥©©„ÿ‚^RR„„̀ɥ««¥ºQQƒ³º·‰¿²²€¨£¥‡ÿR„„†Ì€É¥¨Â­­¾³º‰¿²€œ££­­‹ÿ„ÿ„„†Ì‚ÉÂÂÁ³³ƒº¿¿¼„¿¼–ÿ†Ì‚ÉŃº‡¿¼–ÿ†Ì€Éɺ‡¿Ì–ÿˆÌ̉¿Ì–ÿ…ÌÑ€À‚¿ÂÀÌ–ÿå‘ÿÿÿÿÿÿªt8mk@ (ClT8 pÈõÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿî#nïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõ‰'ÑÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÝ8fìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿý† nîÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿßh< nîÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ c< nîÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÑt[$VçÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿôŠl= Õÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþ±tXVëýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÜ|f-X±ÙìóôôôôùþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðšpN LŒ©¯°°°ßýÿÿÿÿÿÿÿÿÿêúÿÿÿÿÿÿÿÿÿÿÿûÃw_Bl{~~ßÿÿÿÿÿÿÿÿÿÿ½Ûÿÿÿÿÿÿÿÿÿÿÿÿ܈j=&Vox{ªñÿÿÿÿÿÿÿÿÿô£¤ÿÿÿÿÿÿÿÿÿÿÿÿð©sV,O_m½þÿÿÿÿÿÿÿÿÿÛ’‚òÿÿÿÿÿÿÿÿÿÿÿþÅ~b&ZÕÿÿÿÿÿÿÿÿÿý¾‚Çÿÿÿÿÿÿÿÿÿÿÿÿâ•oEaöÿÿÿÿÿÿÿÿÿûÿÿÿÿÿÿÿÿÿÿÿú®yS ›ÿÿÿÿÿÿÿÿÿÿÙŒ‹ãÿÿÿÿÿÿÿÿÿÿÿÿÌ…d.(Úÿÿÿÿÿÿÿÿÿù½~¹ÿÿÿÿÿÿÿÿÿÿÿÿì‘pBjüÿÿÿÿÿÿÿÿÿîž~s‹óÿÿÿÿÿÿÿÿÿÿÿý´xVÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÞ€|h]»ÿÿÿÿÿÿÿÿÿÿÿÿài2ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿû¸~yW"zùÿÿÿÿÿÿÿÿÿÿÿÿšqJÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ}rEKÛÿÿÿÿÿÿÿÿÿÿÿÿÄw^ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿh1¶ÿÿÿÿÿÿÿÿÿÿÿÿèj6ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ†õÿÿÿÿÿÿÿÿÿÿÿ÷§rTÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿàÿÿÿÿÿÿÿÿÿÿÿýÐzc%ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿç’nJÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿö´v\ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÒ„g0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿë qOÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿý¹{\ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÚk9ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿó¡uJ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÄ_(ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿèˆl;ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿý¨tQÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÖyd)ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿúˆnCÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿý¹v[ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÜg/ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿîšpO ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûÃx_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÞlDÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿñªtYÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈc"ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ”oAÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ­xSÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ†e1ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿpAÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿY!ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ—.ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿêZÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÞ'ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿù€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿý¾)ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÝdLÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿâynÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÔ{ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ´~ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ~ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ{rÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿjYÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ: ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿicnV Bþamide-1.0.5/macosx/amide.plist.in0000600000175000017500000000211412270275006016466 0ustar loeningloening CFBundleDevelopmentRegion English CFBundleExecutable AMIDE CFBundleGetInfoString @VERSION@, Copyright 2000-2014 Andreas Loening http://amide.sf.net CFBundleIconFile amide.icns CFBundleIdentifier net.sf.amide CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType APPL CFBundleShortVersionString @VERSION@ CFBundleSignature ???? CFBundleVersion @VERSION@ NSHumanReadableCopyright Copyright 2000-2014 Andreas Loening, GNU General Public License. LSMinimumSystemVersion 10.4 amide-1.0.5/macosx/Makefile.in0000664000175000017500000003510712271346301016012 0ustar loeningloening# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = macosx DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs $(srcdir)/amide.plist.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/libfame.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/amide_config.h CONFIG_CLEAN_FILES = amide.plist CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMIDE_CHECK_OBSOLETE_CFLAGS = @AMIDE_CHECK_OBSOLETE_CFLAGS@ AMIDE_DEBUG_CFLAGS = @AMIDE_DEBUG_CFLAGS@ AMIDE_GTK_CFLAGS = @AMIDE_GTK_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_CFLAGS = @AMIDE_GTK_EXTRA_GCONF_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_LIBS = @AMIDE_GTK_EXTRA_GCONF_LIBS@ AMIDE_GTK_EXTRA_GVFS_CFLAGS = @AMIDE_GTK_EXTRA_GVFS_CFLAGS@ AMIDE_GTK_EXTRA_GVFS_LIBS = @AMIDE_GTK_EXTRA_GVFS_LIBS@ AMIDE_GTK_LIBS = @AMIDE_GTK_LIBS@ AMIDE_LIBDCMDATA_CFLAGS = @AMIDE_LIBDCMDATA_CFLAGS@ AMIDE_LIBDCMDATA_LIBS = @AMIDE_LIBDCMDATA_LIBS@ AMIDE_LIBECAT_LIBS = @AMIDE_LIBECAT_LIBS@ AMIDE_LIBVOLPACK_LIBS = @AMIDE_LIBVOLPACK_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HELP_DIR = @HELP_DIR@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFAME_CFLAGS = @LIBFAME_CFLAGS@ LIBFAME_CONFIG = @LIBFAME_CONFIG@ LIBFAME_LIBS = @LIBFAME_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ OPTIMIZATION_CFLAGS = @OPTIMIZATION_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMEDCON_CFLAGS = @XMEDCON_CFLAGS@ XMEDCON_CONFIG = @XMEDCON_CONFIG@ XMEDCON_LIBS = @XMEDCON_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ intltool__v_merge_options_ = @intltool__v_merge_options_@ intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ libgnomecanvas_greater_than_230_CFLAGS = @libgnomecanvas_greater_than_230_CFLAGS@ libgnomecanvas_greater_than_230_LIBS = @libgnomecanvas_greater_than_230_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ amide.bundle \ amide.icns \ amide.plist.in \ amide.plist \ gtkrc \ launcher.sh DISTCLEANFILES = \ *~ \ amide.plist all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu macosx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu macosx/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): amide.plist: $(top_builddir)/config.status $(srcdir)/amide.plist.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: amide-1.0.5/attic/0000775000175000017500000000000011336120612013545 5ustar loeningloeningamide-1.0.5/attic/amitk_xif_sel.h0000644000175000017500000001040111300201500016511 0ustar loeningloening/* amitk_xif_sel.h - this is gtkfilesel, but slightly modified so that it lists .xif files in the file list, and compiles cleanly under AMIDE */ /* GTK - The GIMP Toolkit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #ifndef __AMITK_XIF_SEL_H__ #define __AMITK_XIF_SEL_H__ #include G_BEGIN_DECLS #define AMITK_TYPE_XIF_SELECTION (amitk_xif_selection_get_type ()) #define AMITK_XIF_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AMITK_TYPE_XIF_SELECTION, AmitkXifSelection)) #define AMITK_XIF_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AMITK_TYPE_XIF_SELECTION, AmitkXifSelectionClass)) #define AMITK_IS_XIF_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AMITK_TYPE_XIF_SELECTION)) #define AMITK_IS_XIF_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_XIF_SELECTION)) #define AMITK_XIF_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), AMITK_TYPE_XIF_SELECTION, AmitkXifSelectionClass)) typedef struct _AmitkXifSelection AmitkXifSelection; typedef struct _AmitkXifSelectionClass AmitkXifSelectionClass; struct _AmitkXifSelection { /*< private >*/ GtkDialog parent_instance; /*< public >*/ GtkWidget *dir_list; GtkWidget *file_list; GtkWidget *selection_entry; GtkWidget *selection_text; GtkWidget *main_vbox; GtkWidget *ok_button; GtkWidget *cancel_button; GtkWidget *help_button; GtkWidget *history_pulldown; GtkWidget *history_menu; GList *history_list; GtkWidget *fileop_dialog; GtkWidget *fileop_entry; gchar *fileop_file; gpointer cmpl_state; GtkWidget *fileop_c_dir; GtkWidget *fileop_del_file; GtkWidget *fileop_ren_file; GtkWidget *button_area; GtkWidget *action_area; GPtrArray *selected_names; gchar *last_selected; }; struct _AmitkXifSelectionClass { GtkDialogClass parent_class; /* Padding for future expansion */ void (*_gtk_reserved1) (void); void (*_gtk_reserved2) (void); void (*_gtk_reserved3) (void); void (*_gtk_reserved4) (void); }; GType amitk_xif_selection_get_type (void) G_GNUC_CONST; GtkWidget* amitk_xif_selection_new (const gchar *title); void amitk_xif_selection_set_filename (AmitkXifSelection *filesel, const gchar *filename); /* This function returns the selected filename in the C runtime's * multibyte string encoding, which may or may not be the same as that * used by GDK (UTF-8). To convert to UTF-8, call g_filename_to_utf8(). * The returned string points to a statically allocated buffer and * should be copied away. */ G_CONST_RETURN gchar* amitk_xif_selection_get_filename (AmitkXifSelection *filesel); void amitk_xif_selection_complete (AmitkXifSelection *filesel, const gchar *pattern); void amitk_xif_selection_show_fileop_buttons (AmitkXifSelection *filesel); void amitk_xif_selection_hide_fileop_buttons (AmitkXifSelection *filesel); gchar** amitk_xif_selection_get_selections (AmitkXifSelection *filesel); void amitk_xif_selection_set_select_multiple (AmitkXifSelection *filesel, gboolean select_multiple); gboolean amitk_xif_selection_get_select_multiple (AmitkXifSelection *filesel); G_END_DECLS #endif /* __AMITK_XIF_SEL_H__ */ amide-1.0.5/attic/amitk_list_view.h0000664000175000017500000000422710032360555017121 0ustar loeningloening/* amitk_list_view.h * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2004 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AMITK_LIST_VIEW_H__ #define __AMITK_LIST_VIEW_H__ /* includes we always need with this widget */ #include #include "amide.h" #include "amitk_type_builtins.h" #include "amitk_study.h" G_BEGIN_DECLS #define AMITK_TYPE_LIST_VIEW (amitk_list_view_get_type ()) #define AMITK_LIST_VIEW(obj) (GTK_CHECK_CAST ((obj), AMITK_TYPE_LIST_VIEW, AmitkListView)) #define AMITK_LIST_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), AMITK_TYPE_THESHOLD, AmitklistViewClass)) #define AMITK_IS_LIST_VIEW(obj) (GTK_CHECK_TYPE ((obj), AMITK_TYPE_LIST_VIEW)) #define AMITK_IS_LIST_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), AMITK_TYPE_LIST_VIEW)) typedef struct _AmitkListView AmitkListView; typedef struct _AmitkListViewClass AmitkListViewClass; struct _AmitkListView { GtkTreeView tree; AmitkStudy * study; }; struct _AmitkListViewClass { GtkTreeViewClass parent_class; void (* select_object) (AmitkListView * list, AmitkObject * object); }; GType amitk_list_view_get_type (void); GtkWidget* amitk_list_view_new (void); void amitk_list_view_set_study (AmitkListView * list_view, AmitkStudy * study); G_END_DECLS #endif /* __AMITK_LIST_VIEW_H__ */ amide-1.0.5/attic/amitk_xif_sel.c0000644000175000017500000034534211320025616016541 0ustar loeningloening/* amitk_xif_sel.c - this is gtkfilesel, but slightly modified so that it lists .xif files and directories in the file list, and compiles cleanly under AMIDE */ /* GTK - The GIMP Toolkit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #include "amide_config.h" #include "amitk_common.h" #include "amitk_xif_sel.h" #include /* for g_mkdir */ #include #include #include #ifdef HAVE_SYS_PARAM_H #include #endif #include #ifndef G_PLATFORM_WIN32 #ifdef HAVE_UNISTD_H #include #endif #endif #include #include #ifdef HAVE_PWD_H #include #endif #include /* Include early to get G_OS_WIN32 etc */ #if defined(G_PLATFORM_WIN32) #include #define STRICT #include #undef STRICT #endif /* G_PLATFORM_WIN32 */ #ifdef G_OS_WIN32 #include /* For gethostname */ #endif #include /* gtkfilesel still uses gtkoptionmenu... */ #undef GTK_DISABLE_DEPRECATED #include #define GTK_DISABLE_DEPRECATED #define WANT_HPANED 1 #ifdef G_OS_WIN32 #include #include #ifndef S_ISDIR #define S_ISDIR(mode) ((mode)&_S_IFDIR) #endif #endif /* G_OS_WIN32 */ #ifdef G_WITH_CYGWIN #include /* For cygwin_conv_to_posix_path */ #endif #define DIR_LIST_WIDTH 180 #define DIR_LIST_HEIGHT 180 #define FILE_LIST_WIDTH 180 #define FILE_LIST_HEIGHT 180 /* The Hurd doesn't define either PATH_MAX or MAXPATHLEN, so we put this * in here, since the rest of the code in the file does require some * fixed maximum. */ #ifndef MAXPATHLEN # ifdef PATH_MAX # define MAXPATHLEN PATH_MAX # else # define MAXPATHLEN 2048 # endif #endif /* I've put this here so it doesn't get confused with the * file completion interface */ typedef struct _HistoryCallbackArg HistoryCallbackArg; struct _HistoryCallbackArg { gchar *directory; GtkWidget *menu_item; }; typedef struct _CompletionState CompletionState; typedef struct _CompletionDir CompletionDir; typedef struct _CompletionDirSent CompletionDirSent; typedef struct _CompletionDirEntry CompletionDirEntry; typedef struct _CompletionUserDir CompletionUserDir; typedef struct _PossibleCompletion PossibleCompletion; /* Non-external file completion decls and structures */ /* A contant telling PRCS how many directories to cache. Its actually * kept in a list, so the geometry isn't important. */ #define CMPL_DIRECTORY_CACHE_SIZE 10 /* A constant used to determine whether a substring was an exact * match by first_diff_index() */ #define PATTERN_MATCH -1 #define CMPL_ERRNO_TOO_LONG ((1<<16)-1) #define CMPL_ERRNO_DID_NOT_CONVERT ((1<<16)-2) /* This structure contains all the useful information about a directory * for the purposes of filename completion. These structures are cached * in the CompletionState struct. CompletionDir's are reference counted. */ struct _CompletionDirSent { #ifndef G_PLATFORM_WIN32 ino_t inode; time_t mtime; dev_t device; #endif gint entry_count; struct _CompletionDirEntry *entries; }; struct _CompletionDir { CompletionDirSent *sent; gchar *fullname; gint fullname_len; struct _CompletionDir *cmpl_parent; gint cmpl_index; gchar *cmpl_text; }; /* This structure contains pairs of directory entry names with a flag saying * whether or not they are a valid directory. NOTE: This information is used * to provide the caller with information about whether to update its completions * or try to open a file. Since directories are cached by the directory mtime, * a symlink which points to an invalid file (which will not be a directory), * will not be reevaluated if that file is created, unless the containing * directory is touched. I consider this case to be worth ignoring (josh). */ struct _CompletionDirEntry { gboolean is_dir; gchar *entry_name; gchar *sort_key; }; struct _CompletionUserDir { gchar *login; gchar *homedir; }; struct _PossibleCompletion { /* accessible fields, all are accessed externally by functions * declared above */ gchar *text; gint is_a_completion; gboolean is_directory; /* Private fields */ gint text_alloc; }; struct _CompletionState { gint last_valid_char; gchar *updated_text; gint updated_text_len; gint updated_text_alloc; gboolean re_complete; gchar *user_dir_name_buffer; gint user_directories_len; gchar *last_completion_text; gint user_completion_index; /* if >= 0, currently completing ~user */ struct _CompletionDir *completion_dir; /* directory completing from */ struct _CompletionDir *active_completion_dir; struct _PossibleCompletion the_completion; struct _CompletionDir *reference_dir; /* initial directory */ GList* directory_storage; GList* directory_sent_storage; struct _CompletionUserDir *user_directories; }; enum { PROP_0, PROP_SHOW_FILEOPS, PROP_FILENAME, PROP_SELECT_MULTIPLE }; enum { DIR_COLUMN }; enum { FILE_COLUMN }; /* File completion functions which would be external, were they used * outside of this file. */ static CompletionState* cmpl_init_state (void); static void cmpl_free_state (CompletionState *cmpl_state); static gint cmpl_state_okay (CompletionState* cmpl_state); static const gchar* cmpl_strerror (gint); static PossibleCompletion* cmpl_completion_matches(gchar *text_to_complete, gchar **remaining_text, CompletionState *cmpl_state); /* Returns a name for consideration, possibly a completion, this name * will be invalid after the next call to cmpl_next_completion. */ static char* cmpl_this_completion (PossibleCompletion*); /* True if this completion matches the given text. Otherwise, this * output can be used to have a list of non-completions. */ static gint cmpl_is_a_completion (PossibleCompletion*); /* True if the completion is a directory */ static gboolean cmpl_is_directory (PossibleCompletion*); /* Obtains the next completion, or NULL */ static PossibleCompletion* cmpl_next_completion (CompletionState*); /* Updating completions: the return value of cmpl_updated_text() will * be text_to_complete completed as much as possible after the most * recent call to cmpl_completion_matches. For the present * application, this is the suggested replacement for the user's input * string. You must CALL THIS AFTER ALL cmpl_text_completions have * been received. */ static gchar* cmpl_updated_text (CompletionState* cmpl_state); /* After updating, to see if the completion was a directory, call * this. If it was, you should consider re-calling completion_matches. */ static gboolean cmpl_updated_dir (CompletionState* cmpl_state); /* Current location: if using file completion, return the current * directory, from which file completion begins. More specifically, * the cwd concatenated with all exact completions up to the last * directory delimiter('/'). */ static gchar* cmpl_reference_position (CompletionState* cmpl_state); /* backing up: if cmpl_completion_matches returns NULL, you may query * the index of the last completable character into cmpl_updated_text. */ static gint cmpl_last_valid_char (CompletionState* cmpl_state); /* When the user selects a non-directory, call cmpl_completion_fullname * to get the full name of the selected file. */ static const gchar* cmpl_completion_fullname (const gchar*, CompletionState* cmpl_state); /* Directory operations. */ static CompletionDir* open_ref_dir (gchar* text_to_complete, gchar** remaining_text, CompletionState* cmpl_state); #ifndef G_PLATFORM_WIN32 static gboolean check_dir (gchar *dir_name, struct stat *result, gboolean *stat_subdirs); #endif static CompletionDir* open_dir (gchar* dir_name, CompletionState* cmpl_state); #ifdef HAVE_PWD_H static CompletionDir* open_user_dir (const gchar* text_to_complete, CompletionState *cmpl_state); #endif static CompletionDir* open_relative_dir (gchar* dir_name, CompletionDir* dir, CompletionState *cmpl_state); static CompletionDirSent* open_new_dir (gchar* dir_name, struct stat* sbuf, gboolean stat_subdirs); static gint correct_dir_fullname (CompletionDir* cmpl_dir); static gint correct_parent (CompletionDir* cmpl_dir, struct stat *sbuf); #ifndef G_PLATFORM_WIN32 static gchar* find_parent_dir_fullname (gchar* dirname); #endif static CompletionDir* attach_dir (CompletionDirSent* sent, gchar* dir_name, CompletionState *cmpl_state); static void free_dir_sent (CompletionDirSent* sent); static void free_dir (CompletionDir *dir); static void prune_memory_usage(CompletionState *cmpl_state); /* Completion operations */ #ifdef HAVE_PWD_H static PossibleCompletion* attempt_homedir_completion(gchar* text_to_complete, CompletionState *cmpl_state); #endif static PossibleCompletion* attempt_file_completion(CompletionState *cmpl_state); static CompletionDir* find_completion_dir(gchar* text_to_complete, gchar** remaining_text, CompletionState* cmpl_state); static PossibleCompletion* append_completion_text(gchar* text, CompletionState* cmpl_state); #ifdef HAVE_PWD_H static gint get_pwdb(CompletionState* cmpl_state); static gint compare_user_dir(const void* a, const void* b); #endif static gint first_diff_index(gchar* pat, gchar* text); static gint compare_cmpl_dir(const void* a, const void* b); static void update_cmpl(PossibleCompletion* poss, CompletionState* cmpl_state); static void amitk_xif_selection_class_init (AmitkXifSelectionClass *klass); static void amitk_xif_selection_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); static void amitk_xif_selection_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void amitk_xif_selection_init (AmitkXifSelection *filesel); static void amitk_xif_selection_finalize (GObject *object); static void amitk_xif_selection_destroy (GtkObject *object); static void amitk_xif_selection_map (GtkWidget *widget); static gint amitk_xif_selection_key_press (GtkWidget *widget, GdkEventKey *event, gpointer user_data); static gint amitk_xif_selection_insert_text (GtkWidget *widget, const gchar *new_text, gint new_text_length, gint *position, gpointer user_data); static void amitk_xif_selection_update_fileops (AmitkXifSelection *filesel); static void amitk_xif_selection_file_activate (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data); static void amitk_xif_selection_file_changed (GtkTreeSelection *selection, gpointer user_data); static void amitk_xif_selection_dir_activate (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data); static void amitk_xif_selection_populate (AmitkXifSelection *fs, gchar *rel_path, gboolean try_complete, gboolean reset_entry); static void amitk_xif_selection_abort (AmitkXifSelection *fs); static void amitk_xif_selection_update_history_menu (AmitkXifSelection *fs, gchar *current_dir); static void amitk_xif_selection_create_dir (GtkWidget *widget, gpointer data); static void amitk_xif_selection_delete_file (GtkWidget *widget, gpointer data); static void amitk_xif_selection_rename_file (GtkWidget *widget, gpointer data); static void free_selected_names (GPtrArray *names); static gboolean _amitk_fnmatch (const char *pattern, const char *string); #ifndef G_PLATFORM_WIN32 #define compare_utf8_filenames(a, b) strcmp(a, b) #define compare_sys_filenames(a, b) strcmp(a, b) #else static gint compare_utf8_filenames (const gchar *a, const gchar *b) { gchar *a_folded, *b_folded; gint retval; a_folded = g_utf8_strdown (a, -1); b_folded = g_utf8_strdown (b, -1); retval = strcmp (a_folded, b_folded); g_free (a_folded); g_free (b_folded); return retval; } static gint compare_sys_filenames (const gchar *a, const gchar *b) { gchar *a_utf8, *b_utf8; gint retval; a_utf8 = g_filename_to_utf8 (a, -1, NULL, NULL, NULL); b_utf8 = g_filename_to_utf8 (b, -1, NULL, NULL, NULL); retval = compare_utf8_filenames (a_utf8, b_utf8); g_free (a_utf8); g_free (b_utf8); return retval; } #endif static GtkWindowClass *parent_class = NULL; /* Saves errno when something cmpl does fails. */ static gint cmpl_errno; #ifdef G_WITH_CYGWIN /* * Take the path currently in the file selection * entry field and translate as necessary from * a WIN32 style to Cygwin style path. For * instance translate: * x:\somepath\file.jpg * to: * /cygdrive/x/somepath/file.jpg * * Replace the path in the selection text field. * Return a boolean value concerning whether a * translation had to be made. */ static int translate_win32_path (AmitkXifSelection *filesel) { int updated = 0; const gchar *path; gchar newPath[MAX_PATH]; /* * Retrieve the current path */ path = gtk_entry_get_text (GTK_ENTRY (filesel->selection_entry)); cygwin_conv_to_posix_path (path, newPath); updated = (strcmp (path, newPath) != 0); if (updated) gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), newPath); return updated; } #endif GType amitk_xif_selection_get_type (void) { static GType file_selection_type = 0; if (!file_selection_type) { static const GTypeInfo filesel_info = { sizeof (AmitkXifSelectionClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc) amitk_xif_selection_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (AmitkXifSelection), 0, /* n_preallocs */ (GInstanceInitFunc) amitk_xif_selection_init, NULL /* value table */ }; file_selection_type = g_type_register_static (GTK_TYPE_DIALOG, "AmitkXifSelection", &filesel_info, 0); } return file_selection_type; } static void amitk_xif_selection_class_init (AmitkXifSelectionClass *class) { GObjectClass *gobject_class; GtkObjectClass *object_class; GtkWidgetClass *widget_class; gobject_class = (GObjectClass*) class; object_class = (GtkObjectClass*) class; widget_class = (GtkWidgetClass*) class; parent_class = g_type_class_peek_parent (class); gobject_class->finalize = amitk_xif_selection_finalize; gobject_class->set_property = amitk_xif_selection_set_property; gobject_class->get_property = amitk_xif_selection_get_property; g_object_class_install_property (gobject_class, PROP_FILENAME, g_param_spec_string ("filename", _("Filename"), _("The currently selected filename"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_SHOW_FILEOPS, g_param_spec_boolean ("show_fileops", _("Show file operations"), _("Whether buttons for creating/manipulating files should be displayed"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_SELECT_MULTIPLE, g_param_spec_boolean ("select_multiple", _("Select multiple"), _("Whether to allow multiple files to be selected"), FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE)); object_class->destroy = amitk_xif_selection_destroy; widget_class->map = amitk_xif_selection_map; } static void amitk_xif_selection_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { AmitkXifSelection *filesel; filesel = AMITK_XIF_SELECTION (object); switch (prop_id) { case PROP_FILENAME: amitk_xif_selection_set_filename (filesel, g_value_get_string (value)); break; case PROP_SHOW_FILEOPS: if (g_value_get_boolean (value)) amitk_xif_selection_show_fileop_buttons (filesel); else amitk_xif_selection_hide_fileop_buttons (filesel); break; case PROP_SELECT_MULTIPLE: amitk_xif_selection_set_select_multiple (filesel, g_value_get_boolean (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void amitk_xif_selection_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { AmitkXifSelection *filesel; filesel = AMITK_XIF_SELECTION (object); switch (prop_id) { case PROP_FILENAME: g_value_set_string (value, amitk_xif_selection_get_filename(filesel)); break; case PROP_SHOW_FILEOPS: /* This is a little bit hacky, but doing otherwise would require * adding a field to the object. */ g_value_set_boolean (value, (filesel->fileop_c_dir && filesel->fileop_del_file && filesel->fileop_ren_file)); break; case PROP_SELECT_MULTIPLE: g_value_set_boolean (value, amitk_xif_selection_get_select_multiple (filesel)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static gboolean grab_default (GtkWidget *widget) { gtk_widget_grab_default (widget); return FALSE; } static void amitk_xif_selection_init (AmitkXifSelection *filesel) { GtkWidget *entry_vbox; GtkWidget *label; GtkWidget *list_hbox, *list_container; GtkWidget *confirm_area; GtkWidget *pulldown_hbox; GtkWidget *scrolled_win; GtkWidget *eventbox; GtkWidget *spacer; GtkDialog *dialog; GtkListStore *model; GtkTreeViewColumn *column; gtk_widget_push_composite_child (); dialog = GTK_DIALOG (filesel); filesel->cmpl_state = cmpl_init_state (); /* The dialog-sized vertical box */ filesel->main_vbox = dialog->vbox; gtk_container_set_border_width (GTK_CONTAINER (filesel), 10); /* The horizontal box containing create, rename etc. buttons */ filesel->button_area = gtk_hbutton_box_new (); gtk_button_box_set_layout (GTK_BUTTON_BOX (filesel->button_area), GTK_BUTTONBOX_START); gtk_box_set_spacing (GTK_BOX (filesel->button_area), 0); gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->button_area, FALSE, FALSE, 0); gtk_widget_show (filesel->button_area); amitk_xif_selection_show_fileop_buttons (filesel); /* hbox for pulldown menu */ pulldown_hbox = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (filesel->main_vbox), pulldown_hbox, FALSE, FALSE, 0); gtk_widget_show (pulldown_hbox); /* Pulldown menu */ filesel->history_pulldown = gtk_option_menu_new(); gtk_widget_show (filesel->history_pulldown); gtk_box_pack_start (GTK_BOX (pulldown_hbox), filesel->history_pulldown, FALSE, FALSE, 0); /* The horizontal box containing the directory and file listboxes */ spacer = gtk_hbox_new (FALSE, 0); gtk_widget_set_size_request (spacer, -1, 5); gtk_box_pack_start (GTK_BOX (filesel->main_vbox), spacer, FALSE, FALSE, 0); gtk_widget_show (spacer); list_hbox = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (filesel->main_vbox), list_hbox, TRUE, TRUE, 0); gtk_widget_show (list_hbox); if (WANT_HPANED) list_container = g_object_new (GTK_TYPE_HPANED, "visible", TRUE, "parent", list_hbox, "border_width", 0, NULL); else list_container = list_hbox; spacer = gtk_hbox_new (FALSE, 0); gtk_widget_set_size_request (spacer, -1, 5); gtk_box_pack_start (GTK_BOX (filesel->main_vbox), spacer, FALSE, FALSE, 0); gtk_widget_show (spacer); /* The directories list */ model = gtk_list_store_new (1, G_TYPE_STRING); filesel->dir_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); g_object_unref (model); column = gtk_tree_view_column_new_with_attributes (_("Folders"), gtk_cell_renderer_text_new (), "text", DIR_COLUMN, NULL); label = gtk_label_new_with_mnemonic (_("Fol_ders")); gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->dir_list); gtk_widget_show (label); gtk_tree_view_column_set_widget (column, label); gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->dir_list), column); gtk_widget_set_size_request(filesel->dir_list, DIR_LIST_WIDTH, DIR_LIST_HEIGHT); g_signal_connect (G_OBJECT(filesel->dir_list), "row_activated", G_CALLBACK (amitk_xif_selection_dir_activate), filesel); /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->dir_list)); */ scrolled_win = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), GTK_SHADOW_IN); gtk_container_add (GTK_CONTAINER (scrolled_win), filesel->dir_list); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 0); if (GTK_IS_PANED (list_container)) gtk_paned_pack1 (GTK_PANED (list_container), scrolled_win, TRUE, TRUE); else gtk_container_add (GTK_CONTAINER (list_container), scrolled_win); gtk_widget_show (filesel->dir_list); gtk_widget_show (scrolled_win); /* The files list */ model = gtk_list_store_new (1, G_TYPE_STRING); filesel->file_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); g_object_unref (model); column = gtk_tree_view_column_new_with_attributes (_("XIF Files"), gtk_cell_renderer_text_new (), "text", FILE_COLUMN, NULL); label = gtk_label_new_with_mnemonic (_("XIF _Files")); gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->file_list); gtk_widget_show (label); gtk_tree_view_column_set_widget (column, label); gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->file_list), column); gtk_widget_set_size_request (filesel->file_list, FILE_LIST_WIDTH, FILE_LIST_HEIGHT); g_signal_connect (G_OBJECT(filesel->file_list), "row_activated", G_CALLBACK (amitk_xif_selection_file_activate), filesel); g_signal_connect (G_OBJECT(gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->file_list))), "changed", G_CALLBACK (amitk_xif_selection_file_changed), filesel); /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->file_list)); */ scrolled_win = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), GTK_SHADOW_IN); gtk_container_add (GTK_CONTAINER (scrolled_win), filesel->file_list); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 0); gtk_container_add (GTK_CONTAINER (list_container), scrolled_win); gtk_widget_show (filesel->file_list); gtk_widget_show (scrolled_win); /* action area for packing buttons into. */ filesel->action_area = gtk_hbox_new (TRUE, 0); gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->action_area, FALSE, FALSE, 0); gtk_widget_show (filesel->action_area); /* The OK/Cancel button area */ confirm_area = dialog->action_area; /* The Cancel button */ filesel->cancel_button = gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); /* The OK button */ filesel->ok_button = gtk_dialog_add_button (dialog, GTK_STOCK_OK, GTK_RESPONSE_OK); gtk_widget_grab_default (filesel->ok_button); /* The selection entry widget */ entry_vbox = gtk_vbox_new (FALSE, 2); gtk_box_pack_end (GTK_BOX (filesel->main_vbox), entry_vbox, FALSE, FALSE, 2); gtk_widget_show (entry_vbox); eventbox = gtk_event_box_new (); filesel->selection_text = label = gtk_label_new (""); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_container_add (GTK_CONTAINER (eventbox), label); gtk_box_pack_start (GTK_BOX (entry_vbox), eventbox, FALSE, FALSE, 0); gtk_widget_show (label); gtk_widget_show (eventbox); filesel->selection_entry = gtk_entry_new (); g_signal_connect(G_OBJECT (filesel->selection_entry), "key_press_event", G_CALLBACK(amitk_xif_selection_key_press), filesel); g_signal_connect(G_OBJECT (filesel->selection_entry), "insert_text", G_CALLBACK(amitk_xif_selection_insert_text), NULL); g_signal_connect_swapped (G_OBJECT(filesel->selection_entry), "changed", G_CALLBACK (amitk_xif_selection_update_fileops), filesel); g_signal_connect_swapped (G_OBJECT (filesel->selection_entry), "focus_in_event", G_CALLBACK(grab_default), G_OBJECT (filesel->ok_button)); g_signal_connect_swapped (G_OBJECT (filesel->selection_entry), "activate", G_CALLBACK(gtk_button_clicked), G_OBJECT (filesel->ok_button)); gtk_box_pack_start (GTK_BOX (entry_vbox), filesel->selection_entry, TRUE, TRUE, 0); gtk_widget_show (filesel->selection_entry); gtk_label_set_mnemonic_widget (GTK_LABEL (filesel->selection_text), filesel->selection_entry); if (!cmpl_state_okay (filesel->cmpl_state)) { gchar err_buf[256]; g_snprintf (err_buf, sizeof (err_buf), _("Folder unreadable: %s"), cmpl_strerror (cmpl_errno)); gtk_label_set_text (GTK_LABEL (filesel->selection_text), err_buf); } else { amitk_xif_selection_populate (filesel, "", FALSE, TRUE); } gtk_widget_grab_focus (filesel->selection_entry); gtk_widget_pop_composite_child (); } static gchar * uri_list_extract_first_uri (const gchar* uri_list) { const gchar *p, *q; g_return_val_if_fail (uri_list != NULL, NULL); p = uri_list; /* We don't actually try to validate the URI according to RFC * 2396, or even check for allowed characters - we just ignore * comments and trim whitespace off the ends. We also * allow LF delimination as well as the specified CRLF. * * We do allow comments like specified in RFC 2483. */ while (p) { if (*p != '#') { while (g_ascii_isspace(*p)) p++; q = p; while (*q && (*q != '\n') && (*q != '\r')) q++; if (q > p) { q--; while (q > p && g_ascii_isspace (*q)) q--; if (q > p) return g_strndup (p, q - p + 1); } } p = strchr (p, '\n'); if (p) p++; } return NULL; } static void dnd_really_drop (GtkWidget *dialog, gint response_id, AmitkXifSelection *fs) { gchar *filename; if (response_id == GTK_RESPONSE_YES) { filename = g_object_get_data (G_OBJECT (dialog), "gtk-fs-dnd-filename"); amitk_xif_selection_set_filename (fs, filename); } gtk_widget_destroy (dialog); } static void filenames_dropped (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time) { char *uri = NULL; char *filename = NULL; char *hostname; char this_hostname[257]; int res; GError *error = NULL; if (!selection_data->data) return; uri = uri_list_extract_first_uri ((char *)selection_data->data); if (!uri) return; filename = g_filename_from_uri (uri, &hostname, &error); g_free (uri); if (!filename) { g_warning (_("Error getting dropped filename: %s\n"), error->message); g_error_free (error); return; } res = gethostname (this_hostname, 256); this_hostname[256] = 0; if ((hostname == NULL) || (res == 0 && strcmp (hostname, this_hostname) == 0) || (strcmp (hostname, "localhost") == 0)) amitk_xif_selection_set_filename (AMITK_XIF_SELECTION (widget), filename); else { GtkWidget *dialog; gchar *filename_utf8; /* Conversion back to UTF-8 should always succeed for the result * of g_filename_from_uri() */ filename_utf8 = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); g_assert (filename_utf8); dialog = gtk_message_dialog_new (GTK_WINDOW (widget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("The file \"%s\" resides on another machine (called %s) and may not be available to this program.\n" "Are you sure that you want to select it?"), filename_utf8, hostname); g_free (filename_utf8); g_object_set_data_full (G_OBJECT (dialog), "gtk-fs-dnd-filename", g_strdup (filename), g_free); g_signal_connect_data (G_OBJECT(dialog), "response", (GCallback) dnd_really_drop, widget, NULL, 0); gtk_widget_show (dialog); } g_free (hostname); g_free (filename); } enum { TARGET_URILIST, TARGET_UTF8_STRING, TARGET_STRING, TARGET_TEXT, TARGET_COMPOUND_TEXT }; static void filenames_drag_get (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time, AmitkXifSelection *filesel) { const gchar *file; gchar *uri_list; char hostname[256]; int res; GError *error=NULL; file = amitk_xif_selection_get_filename (filesel); if (file) { if (info == TARGET_URILIST) { res = gethostname (hostname, 256); error = NULL; uri_list = g_filename_to_uri (file, (!res)?hostname:NULL, &error); if (!uri_list) { g_warning (_("Error getting filename: %s\n"), error->message); g_error_free (error); return; } gtk_selection_data_set (selection_data, selection_data->target, 8, (void *)uri_list, strlen((char *)uri_list)); g_free (uri_list); } else { gchar *filename_utf8 = g_filename_to_utf8 (file, -1, NULL, NULL, NULL); g_assert (filename_utf8); gtk_selection_data_set_text (selection_data, filename_utf8, -1); g_free (filename_utf8); } } } static void file_selection_setup_dnd (AmitkXifSelection *filesel) { GtkWidget *eventbox; static const GtkTargetEntry drop_types[] = { { "text/uri-list", 0, TARGET_URILIST} }; static gint n_drop_types = sizeof(drop_types)/sizeof(drop_types[0]); static const GtkTargetEntry drag_types[] = { { "text/uri-list", 0, TARGET_URILIST}, { "UTF8_STRING", 0, TARGET_UTF8_STRING }, { "STRING", 0, 0 }, { "TEXT", 0, 0 }, { "COMPOUND_TEXT", 0, 0 } }; static gint n_drag_types = sizeof(drag_types)/sizeof(drag_types[0]); gtk_drag_dest_set (GTK_WIDGET (filesel), GTK_DEST_DEFAULT_ALL, drop_types, n_drop_types, GDK_ACTION_COPY); g_signal_connect (G_OBJECT(filesel), "drag_data_received", G_CALLBACK(filenames_dropped), NULL); eventbox = gtk_widget_get_parent (filesel->selection_text); gtk_drag_source_set (eventbox, GDK_BUTTON1_MASK, drag_types, n_drag_types, GDK_ACTION_COPY); g_signal_connect (G_OBJECT (eventbox),"drag_data_get", G_CALLBACK(filenames_drag_get), filesel); } GtkWidget* amitk_xif_selection_new (const gchar *title) { AmitkXifSelection *filesel; filesel = g_object_new (AMITK_TYPE_XIF_SELECTION, NULL); gtk_window_set_title (GTK_WINDOW (filesel), title); gtk_dialog_set_has_separator (GTK_DIALOG (filesel), FALSE); file_selection_setup_dnd (filesel); return GTK_WIDGET (filesel); } void amitk_xif_selection_show_fileop_buttons (AmitkXifSelection *filesel) { g_return_if_fail (AMITK_IS_XIF_SELECTION (filesel)); /* delete, create directory, and rename */ if (!filesel->fileop_c_dir) { filesel->fileop_c_dir = gtk_button_new_with_mnemonic (_("_New Folder")); g_signal_connect (G_OBJECT (filesel->fileop_c_dir), "clicked", G_CALLBACK(amitk_xif_selection_create_dir), filesel); gtk_box_pack_start (GTK_BOX (filesel->button_area), filesel->fileop_c_dir, TRUE, TRUE, 0); gtk_widget_show (filesel->fileop_c_dir); } if (!filesel->fileop_del_file) { filesel->fileop_del_file = gtk_button_new_with_mnemonic (_("De_lete File")); g_signal_connect (G_OBJECT (filesel->fileop_del_file), "clicked", G_CALLBACK(amitk_xif_selection_delete_file), filesel); gtk_box_pack_start (GTK_BOX (filesel->button_area), filesel->fileop_del_file, TRUE, TRUE, 0); gtk_widget_show (filesel->fileop_del_file); } if (!filesel->fileop_ren_file) { filesel->fileop_ren_file = gtk_button_new_with_mnemonic (_("_Rename File")); g_signal_connect (G_OBJECT (filesel->fileop_ren_file), "clicked", G_CALLBACK(amitk_xif_selection_rename_file), filesel); gtk_box_pack_start (GTK_BOX (filesel->button_area), filesel->fileop_ren_file, TRUE, TRUE, 0); gtk_widget_show (filesel->fileop_ren_file); } amitk_xif_selection_update_fileops (filesel); g_object_notify (G_OBJECT (filesel), "show_fileops"); } void amitk_xif_selection_hide_fileop_buttons (AmitkXifSelection *filesel) { g_return_if_fail (AMITK_IS_XIF_SELECTION (filesel)); if (filesel->fileop_ren_file) { gtk_widget_destroy (filesel->fileop_ren_file); filesel->fileop_ren_file = NULL; } if (filesel->fileop_del_file) { gtk_widget_destroy (filesel->fileop_del_file); filesel->fileop_del_file = NULL; } if (filesel->fileop_c_dir) { gtk_widget_destroy (filesel->fileop_c_dir); filesel->fileop_c_dir = NULL; } g_object_notify (G_OBJECT (filesel), "show_fileops"); } /** * amitk_file_selection_set_filename: * @xifsel: a #AmitkFileSelection. * @dirname: a string to set as the default directory name. * * Sets a default path for the file requestor. If dirname includes a * directory path, then the requestor will open with that path as its * current working directory. * * The encoding of @dirname is the on-disk encoding, which * may not be UTF-8. See g_filename_from_utf8(). **/ void amitk_xif_selection_set_filename (AmitkXifSelection *filesel, const gchar *filename) { gchar *buf; const char *name, *last_slash; char *filename_utf8; g_return_if_fail (AMITK_IS_XIF_SELECTION (filesel)); g_return_if_fail (filename != NULL); filename_utf8 = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL); g_return_if_fail (filename_utf8 != NULL); last_slash = strrchr (filename_utf8, G_DIR_SEPARATOR); if (!last_slash) { buf = g_strdup (""); name = filename_utf8; } else { buf = g_strdup (filename_utf8); buf[last_slash - filename_utf8 + 1] = 0; name = last_slash + 1; } amitk_xif_selection_populate (filesel, buf, FALSE, TRUE); if (filesel->selection_entry) gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), name); g_free (buf); g_object_notify (G_OBJECT (filesel), "filename"); g_free (filename_utf8); } /** * amitk_xif_selection_get_filename: * @filesel: a #AmitkXifSelection * * This function returns the selected filename in the on-disk encoding * (see g_filename_from_utf8()), which may or may not be the same as that * used by GTK+ (UTF-8). To convert to UTF-8, call g_filename_to_utf8(). * The returned string points to a statically allocated buffer and * should be copied if you plan to keep it around. * * If no file is selected then the selected directory path is returned. * * Return value: currently-selected filename in the on-disk encoding. **/ G_CONST_RETURN gchar* amitk_xif_selection_get_filename (AmitkXifSelection *filesel) { static const gchar nothing[2] = ""; static gchar something[MAXPATHLEN*2]; char *sys_filename; const char *text; g_return_val_if_fail (AMITK_IS_XIF_SELECTION (filesel), nothing); #ifdef G_WITH_CYGWIN translate_win32_path (filesel); #endif text = gtk_entry_get_text (GTK_ENTRY (filesel->selection_entry)); if (text) { sys_filename = g_filename_from_utf8 (cmpl_completion_fullname (text, filesel->cmpl_state), -1, NULL, NULL, NULL); if (!sys_filename) return nothing; strncpy (something, sys_filename, sizeof (something)); g_free (sys_filename); return something; } return nothing; } void amitk_xif_selection_complete (AmitkXifSelection *filesel, const gchar *pattern) { g_return_if_fail (AMITK_IS_XIF_SELECTION (filesel)); g_return_if_fail (pattern != NULL); if (filesel->selection_entry) gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), pattern); amitk_xif_selection_populate (filesel, (gchar*) pattern, TRUE, TRUE); } static void amitk_xif_selection_destroy (GtkObject *object) { AmitkXifSelection *filesel; GList *list; HistoryCallbackArg *callback_arg; g_return_if_fail (AMITK_IS_XIF_SELECTION (object)); filesel = AMITK_XIF_SELECTION (object); if (filesel->fileop_dialog) { gtk_widget_destroy (filesel->fileop_dialog); filesel->fileop_dialog = NULL; } if (filesel->history_list) { list = filesel->history_list; while (list) { callback_arg = list->data; g_free (callback_arg->directory); g_free (callback_arg); list = list->next; } g_list_free (filesel->history_list); filesel->history_list = NULL; } if (filesel->cmpl_state) { cmpl_free_state (filesel->cmpl_state); filesel->cmpl_state = NULL; } if (filesel->selected_names) { free_selected_names (filesel->selected_names); filesel->selected_names = NULL; } if (filesel->last_selected) { g_free (filesel->last_selected); filesel->last_selected = NULL; } GTK_OBJECT_CLASS (parent_class)->destroy (object); } static void amitk_xif_selection_map (GtkWidget *widget) { AmitkXifSelection *filesel = AMITK_XIF_SELECTION (widget); /* Refresh the contents */ amitk_xif_selection_populate (filesel, "", FALSE, FALSE); GTK_WIDGET_CLASS (parent_class)->map (widget); } static void amitk_xif_selection_finalize (GObject *object) { AmitkXifSelection *filesel = AMITK_XIF_SELECTION (object); g_free (filesel->fileop_file); G_OBJECT_CLASS (parent_class)->finalize (object); } /* Begin file operations callbacks */ static void amitk_xif_selection_fileop_error (AmitkXifSelection *fs, gchar *error_message) { GtkWidget *dialog; g_return_if_fail (error_message != NULL); /* main dialog */ dialog = gtk_message_dialog_new (GTK_WINDOW (fs), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", error_message); /* yes, we free it */ g_free (error_message); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); g_signal_connect_swapped (G_OBJECT (dialog), "response", G_CALLBACK(gtk_widget_destroy), dialog); gtk_widget_show (dialog); } static void amitk_xif_selection_fileop_destroy (GtkWidget *widget, gpointer data) { AmitkXifSelection *fs = data; g_return_if_fail (AMITK_IS_XIF_SELECTION (fs)); fs->fileop_dialog = NULL; } static gboolean entry_is_empty (GtkEntry *entry) { const gchar *text = gtk_entry_get_text (entry); return *text == '\0'; } static void amitk_xif_selection_fileop_entry_changed (GtkEntry *entry, GtkWidget *button) { gtk_widget_set_sensitive (button, !entry_is_empty (entry)); } static void amitk_xif_selection_create_dir_confirmed (GtkWidget *widget, gpointer data) { AmitkXifSelection *fs = data; const gchar *dirname; gchar *path; gchar *full_path; gchar *sys_full_path; gchar *buf; GError *error = NULL; CompletionState *cmpl_state; g_return_if_fail (AMITK_IS_XIF_SELECTION (fs)); dirname = gtk_entry_get_text (GTK_ENTRY (fs->fileop_entry)); cmpl_state = (CompletionState*) fs->cmpl_state; path = cmpl_reference_position (cmpl_state); full_path = g_strconcat (path, G_DIR_SEPARATOR_S, dirname, NULL); sys_full_path = g_filename_from_utf8 (full_path, -1, NULL, NULL, &error); if (error) { if (g_error_matches (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE)) buf = g_strdup_printf (_("The folder name \"%s\" contains symbols that are not allowed in filenames"), dirname); else buf = g_strdup_printf (_("Error creating folder \"%s\": %s\n%s"), dirname, error->message, _("You probably used symbols not allowed in filenames.")); amitk_xif_selection_fileop_error (fs, buf); g_error_free (error); goto out; } if (g_mkdir (sys_full_path, 0755) < 0) { buf = g_strdup_printf (_("Error creating folder \"%s\": %s\n"), dirname, g_strerror (errno)); amitk_xif_selection_fileop_error (fs, buf); } out: g_free (full_path); g_free (sys_full_path); gtk_widget_destroy (fs->fileop_dialog); amitk_xif_selection_populate (fs, "", FALSE, FALSE); } static void amitk_xif_selection_create_dir (GtkWidget *widget, gpointer data) { AmitkXifSelection *fs = data; GtkWidget *label; GtkWidget *dialog; GtkWidget *vbox; GtkWidget *button; g_return_if_fail (AMITK_IS_XIF_SELECTION (fs)); if (fs->fileop_dialog) return; /* main dialog */ dialog = gtk_dialog_new (); fs->fileop_dialog = dialog; g_signal_connect (G_OBJECT (dialog), "destroy", G_CALLBACK(amitk_xif_selection_fileop_destroy), fs); gtk_window_set_title (GTK_WINDOW (dialog), _("New Folder")); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (fs)); /* If file dialog is grabbed, grab option dialog */ /* When option dialog is closed, file dialog will be grabbed again */ if (GTK_WINDOW (fs)->modal) gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox), 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox, FALSE, FALSE, 0); gtk_widget_show( vbox); label = gtk_label_new_with_mnemonic (_("_Folder name:")); gtk_misc_set_alignment(GTK_MISC (label), 0.0, 0.0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 5); gtk_widget_show (label); /* The directory entry widget */ fs->fileop_entry = gtk_entry_new (); gtk_label_set_mnemonic_widget (GTK_LABEL (label), fs->fileop_entry); gtk_box_pack_start (GTK_BOX (vbox), fs->fileop_entry, TRUE, TRUE, 5); GTK_WIDGET_SET_FLAGS (fs->fileop_entry, GTK_CAN_DEFAULT); gtk_widget_show (fs->fileop_entry); /* buttons */ button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); g_signal_connect_swapped (G_OBJECT (button), "clicked", G_CALLBACK(gtk_widget_destroy), dialog); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), button, TRUE, TRUE, 0); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_grab_focus (fs->fileop_entry); button = gtk_button_new_with_mnemonic (_("C_reate")); gtk_widget_set_sensitive (button, FALSE); g_signal_connect (button, "clicked", G_CALLBACK (amitk_xif_selection_create_dir_confirmed), fs); g_signal_connect (fs->fileop_entry, "changed", G_CALLBACK (amitk_xif_selection_fileop_entry_changed), button); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), button, TRUE, TRUE, 0); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_show (button); gtk_widget_show (dialog); } static void amitk_xif_selection_delete_file_response (GtkDialog *dialog, gint response_id, gpointer data) { AmitkXifSelection *fs = data; CompletionState *cmpl_state; gchar *path; gchar *full_path; gchar *sys_full_path; GError *error = NULL; gchar *buf; g_return_if_fail (AMITK_IS_XIF_SELECTION (fs)); if (response_id != GTK_RESPONSE_OK) { gtk_widget_destroy (GTK_WIDGET (dialog)); return; } cmpl_state = (CompletionState*) fs->cmpl_state; path = cmpl_reference_position (cmpl_state); full_path = g_strconcat (path, G_DIR_SEPARATOR_S, fs->fileop_file, NULL); sys_full_path = g_filename_from_utf8 (full_path, -1, NULL, NULL, &error); if (error) { if (g_error_matches (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE)) buf = g_strdup_printf (_("The filename \"%s\" contains symbols that are not allowed in filenames"), fs->fileop_file); else buf = g_strdup_printf (_("Error deleting file \"%s\": %s\n%s"), fs->fileop_file, error->message, _("It probably contains symbols not allowed in filenames.")); amitk_xif_selection_fileop_error (fs, buf); g_error_free (error); goto out; } if (unlink (sys_full_path) < 0) { buf = g_strdup_printf (_("Error deleting file \"%s\": %s"), fs->fileop_file, g_strerror (errno)); amitk_xif_selection_fileop_error (fs, buf); } out: g_free (full_path); g_free (sys_full_path); gtk_widget_destroy (fs->fileop_dialog); amitk_xif_selection_populate (fs, "", FALSE, TRUE); } static void amitk_xif_selection_delete_file (GtkWidget *widget, gpointer data) { AmitkXifSelection *fs = data; GtkWidget *dialog; const gchar *filename; g_return_if_fail (AMITK_IS_XIF_SELECTION (fs)); if (fs->fileop_dialog) return; #ifdef G_WITH_CYGWIN translate_win32_path (fs); #endif filename = gtk_entry_get_text (GTK_ENTRY (fs->selection_entry)); if (strlen (filename) < 1) return; g_free (fs->fileop_file); fs->fileop_file = g_strdup (filename); /* main dialog */ fs->fileop_dialog = dialog = gtk_message_dialog_new (GTK_WINDOW (fs), GTK_WINDOW (fs)->modal ? GTK_DIALOG_MODAL : 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, _("Really delete file \"%s\" ?"), filename); g_signal_connect (G_OBJECT (dialog), "destroy", G_CALLBACK(amitk_xif_selection_fileop_destroy), fs); gtk_window_set_title (GTK_WINDOW (dialog), _("Delete File")); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); /* buttons */ gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_DELETE, GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL); g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (amitk_xif_selection_delete_file_response), fs); gtk_widget_show (dialog); } static void amitk_xif_selection_rename_file_confirmed (GtkWidget *widget, gpointer data) { AmitkXifSelection *fs = data; gchar *buf; const gchar *file; gchar *path; gchar *new_filename; gchar *old_filename; gchar *sys_new_filename; gchar *sys_old_filename; CompletionState *cmpl_state; GError *error = NULL; g_return_if_fail (AMITK_IS_XIF_SELECTION (fs)); file = gtk_entry_get_text (GTK_ENTRY (fs->fileop_entry)); cmpl_state = (CompletionState*) fs->cmpl_state; path = cmpl_reference_position (cmpl_state); new_filename = g_strconcat (path, G_DIR_SEPARATOR_S, file, NULL); old_filename = g_strconcat (path, G_DIR_SEPARATOR_S, fs->fileop_file, NULL); sys_new_filename = g_filename_from_utf8 (new_filename, -1, NULL, NULL, &error); if (error) { if (g_error_matches (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE)) buf = g_strdup_printf (_("The file name \"%s\" contains symbols that are not allowed in filenames"), new_filename); else buf = g_strdup_printf (_("Error renaming file to \"%s\": %s\n%s"), new_filename, error->message, _("You probably used symbols not allowed in filenames.")); amitk_xif_selection_fileop_error (fs, buf); g_error_free (error); goto out1; } sys_old_filename = g_filename_from_utf8 (old_filename, -1, NULL, NULL, &error); if (error) { if (g_error_matches (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE)) buf = g_strdup_printf (_("The file name \"%s\" contains symbols that are not allowed in filenames"), old_filename); else buf = g_strdup_printf (_("Error renaming file \"%s\": %s\n%s"), old_filename, error->message, _("It probably contains symbols not allowed in filenames.")); amitk_xif_selection_fileop_error (fs, buf); g_error_free (error); goto out2; } if (rename (sys_old_filename, sys_new_filename) < 0) { buf = g_strdup_printf (_("Error renaming file \"%s\" to \"%s\": %s"), sys_old_filename, sys_new_filename, g_strerror (errno)); amitk_xif_selection_fileop_error (fs, buf); goto out2; } amitk_xif_selection_populate (fs, "", FALSE, FALSE); gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), file); out2: g_free (sys_old_filename); out1: g_free (new_filename); g_free (old_filename); g_free (sys_new_filename); gtk_widget_destroy (fs->fileop_dialog); } static void amitk_xif_selection_rename_file (GtkWidget *widget, gpointer data) { AmitkXifSelection *fs = data; GtkWidget *label; GtkWidget *dialog; GtkWidget *vbox; GtkWidget *button; gchar *buf; g_return_if_fail (AMITK_IS_XIF_SELECTION (fs)); if (fs->fileop_dialog) return; g_free (fs->fileop_file); fs->fileop_file = g_strdup (gtk_entry_get_text (GTK_ENTRY (fs->selection_entry))); if (strlen (fs->fileop_file) < 1) return; /* main dialog */ fs->fileop_dialog = dialog = gtk_dialog_new (); g_signal_connect (G_OBJECT (dialog), "destroy", G_CALLBACK(amitk_xif_selection_fileop_destroy), fs); gtk_window_set_title (GTK_WINDOW (dialog), _("Rename File")); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (fs)); /* If file dialog is grabbed, grab option dialog */ /* When option dialog closed, file dialog will be grabbed again */ if (GTK_WINDOW (fs)->modal) gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox), 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox, FALSE, FALSE, 0); gtk_widget_show(vbox); buf = g_strdup_printf (_("Rename file \"%s\" to:"), fs->fileop_file); label = gtk_label_new (buf); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 5); gtk_widget_show (label); g_free (buf); /* New filename entry */ fs->fileop_entry = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (vbox), fs->fileop_entry, TRUE, TRUE, 5); GTK_WIDGET_SET_FLAGS (fs->fileop_entry, GTK_CAN_DEFAULT); gtk_widget_show (fs->fileop_entry); gtk_entry_set_text (GTK_ENTRY (fs->fileop_entry), fs->fileop_file); gtk_editable_select_region (GTK_EDITABLE (fs->fileop_entry), 0, strlen (fs->fileop_file)); /* buttons */ button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); g_signal_connect_swapped (G_OBJECT (button), "clicked", G_CALLBACK(gtk_widget_destroy), dialog); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), button, TRUE, TRUE, 0); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_grab_default (button); gtk_widget_show (button); gtk_widget_grab_focus (fs->fileop_entry); button = gtk_button_new_with_mnemonic (_("_Rename")); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK(amitk_xif_selection_rename_file_confirmed), fs); g_signal_connect (fs->fileop_entry, "changed", G_CALLBACK (amitk_xif_selection_fileop_entry_changed), button); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), button, TRUE, TRUE, 0); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_widget_show (button); gtk_widget_show (dialog); } static gint amitk_xif_selection_insert_text (GtkWidget *widget, const gchar *new_text, gint new_text_length, gint *position, gpointer user_data) { gchar *filename; filename = g_filename_from_utf8 (new_text, new_text_length, NULL, NULL, NULL); if (!filename) { // requires gtk+ > 2.2 gdk_display_beep (gtk_widget_get_display (widget)); g_signal_stop_emission_by_name (widget, "insert_text"); return FALSE; } g_free (filename); return TRUE; } static void amitk_xif_selection_update_fileops (AmitkXifSelection *fs) { gboolean sensitive; if (!fs->selection_entry) return; sensitive = !entry_is_empty (GTK_ENTRY (fs->selection_entry)); if (fs->fileop_del_file) gtk_widget_set_sensitive (fs->fileop_del_file, sensitive); if (fs->fileop_ren_file) gtk_widget_set_sensitive (fs->fileop_ren_file, sensitive); } static gint amitk_xif_selection_key_press (GtkWidget *widget, GdkEventKey *event, gpointer user_data) { AmitkXifSelection *fs; char *text; g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (event != NULL, FALSE); if ((event->keyval == GDK_Tab || event->keyval == GDK_KP_Tab) && (event->state & gtk_accelerator_get_default_mod_mask ()) == 0) { fs = AMITK_XIF_SELECTION (user_data); #ifdef G_WITH_CYGWIN translate_win32_path (fs); #endif text = g_strdup (gtk_entry_get_text (GTK_ENTRY (fs->selection_entry))); amitk_xif_selection_populate (fs, text, TRUE, TRUE); g_free (text); return TRUE; } return FALSE; } static void amitk_xif_selection_history_callback (GtkWidget *widget, gpointer data) { AmitkXifSelection *fs = data; HistoryCallbackArg *callback_arg; GList *list; g_return_if_fail (AMITK_IS_XIF_SELECTION (fs)); list = fs->history_list; while (list) { callback_arg = list->data; if (callback_arg->menu_item == widget) { amitk_xif_selection_populate (fs, callback_arg->directory, FALSE, FALSE); break; } list = list->next; } } static void amitk_xif_selection_update_history_menu (AmitkXifSelection *fs, gchar *current_directory) { HistoryCallbackArg *callback_arg; GtkWidget *menu_item; GList *list; gchar *current_dir; gint dir_len; gint i; g_return_if_fail (AMITK_IS_XIF_SELECTION (fs)); g_return_if_fail (current_directory != NULL); list = fs->history_list; if (fs->history_menu) { while (list) { callback_arg = list->data; g_free (callback_arg->directory); g_free (callback_arg); list = list->next; } g_list_free (fs->history_list); fs->history_list = NULL; gtk_widget_destroy (fs->history_menu); } fs->history_menu = gtk_menu_new (); current_dir = g_strdup (current_directory); dir_len = strlen (current_dir); for (i = dir_len; i >= 0; i--) { /* the i == dir_len is to catch the full path for the first * entry. */ if ( (current_dir[i] == G_DIR_SEPARATOR) || (i == dir_len)) { /* another small hack to catch the full path */ if (i != dir_len) current_dir[i + 1] = '\0'; #ifdef G_WITH_CYGWIN if (!strcmp (current_dir, "//")) continue; #endif menu_item = gtk_menu_item_new_with_label (current_dir); callback_arg = g_new (HistoryCallbackArg, 1); callback_arg->menu_item = menu_item; /* since the autocompletion gets confused if you don't * supply a trailing '/' on a dir entry, set the full * (current) path to "" which just refreshes the filesel */ if (dir_len == i) { callback_arg->directory = g_strdup (""); } else { callback_arg->directory = g_strdup (current_dir); } fs->history_list = g_list_append (fs->history_list, callback_arg); g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK( amitk_xif_selection_history_callback), (gpointer) fs); gtk_menu_shell_append (GTK_MENU_SHELL (fs->history_menu), menu_item); gtk_widget_show (menu_item); } } gtk_option_menu_set_menu (GTK_OPTION_MENU (fs->history_pulldown), fs->history_menu); g_free (current_dir); } static gchar * get_real_filename (gchar *filename, gboolean free_old) { #ifdef G_WITH_CYGWIN /* Check to see if the selection was a drive selector */ if (isalpha (filename[0]) && (filename[1] == ':')) { gchar temp_filename[MAX_PATH]; int len; cygwin_conv_to_posix_path (filename, temp_filename); /* we need trailing '/'. */ len = strlen (temp_filename); if (len > 0 && temp_filename[len-1] != '/') { temp_filename[len] = '/'; temp_filename[len+1] = '\0'; } if (free_old) g_free (filename); return g_strdup (temp_filename); } #endif /* G_WITH_CYGWIN */ return filename; } static void amitk_xif_selection_file_activate (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data) { AmitkXifSelection *fs = AMITK_XIF_SELECTION (user_data); GtkTreeModel *model = gtk_tree_view_get_model (tree_view); GtkTreeIter iter; gchar *filename; gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, FILE_COLUMN, &filename, -1); filename = get_real_filename (filename, TRUE); gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), filename); gtk_button_clicked (GTK_BUTTON (fs->ok_button)); g_free (filename); } static void amitk_xif_selection_dir_activate (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data) { AmitkXifSelection *fs = AMITK_XIF_SELECTION (user_data); GtkTreeModel *model = gtk_tree_view_get_model (tree_view); GtkTreeIter iter; gchar *filename; gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, DIR_COLUMN, &filename, -1); filename = get_real_filename (filename, TRUE); amitk_xif_selection_populate (fs, filename, FALSE, FALSE); g_free (filename); } #ifdef G_PLATFORM_WIN32 static void win32_gtk_add_drives_to_dir_list (GtkListStore *model) { gchar *textPtr; gchar buffer[128]; char formatBuffer[128]; GtkTreeIter iter; /* Get the drives string */ GetLogicalDriveStrings (sizeof (buffer), buffer); /* Add the drives as necessary */ textPtr = buffer; while (*textPtr != '\0') { /* Ignore floppies (?) */ if ((tolower (textPtr[0]) != 'a') && (tolower (textPtr[0]) != 'b')) { /* Build the actual displayable string */ g_snprintf (formatBuffer, sizeof (formatBuffer), "%c:\\", toupper (textPtr[0])); /* Add to the list */ gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, DIR_COLUMN, formatBuffer, -1); } textPtr += (strlen (textPtr) + 1); } } #endif static gchar * escape_underscores (const gchar *str) { GString *result = g_string_new (NULL); while (*str) { if (*str == '_') g_string_append_c (result, '_'); g_string_append_c (result, *str); str++; } return g_string_free (result, FALSE); } static void amitk_xif_selection_populate (AmitkXifSelection *fs, gchar *rel_path, gboolean try_complete, gboolean reset_entry) { CompletionState *cmpl_state; PossibleCompletion* poss; GtkTreeIter iter; GtkListStore *dir_model; GtkListStore *file_model; gchar* filename; const gchar* fullname; gchar* rem_path = rel_path; gchar* sel_text; gint did_recurse = FALSE; gint possible_count = 0; gint selection_index = -1; g_return_if_fail (AMITK_IS_XIF_SELECTION (fs)); cmpl_state = (CompletionState*) fs->cmpl_state; poss = cmpl_completion_matches (rel_path, &rem_path, cmpl_state); if (!cmpl_state_okay (cmpl_state)) { /* Something went wrong. */ amitk_xif_selection_abort (fs); return; } g_assert (cmpl_state->reference_dir); dir_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->dir_list))); file_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->file_list))); gtk_list_store_clear (dir_model); gtk_list_store_clear (file_model); /* Set the dir list to include ./ and ../ */ gtk_list_store_append (dir_model, &iter); gtk_list_store_set (dir_model, &iter, DIR_COLUMN, "." G_DIR_SEPARATOR_S, -1); gtk_list_store_append (dir_model, &iter); gtk_list_store_set (dir_model, &iter, DIR_COLUMN, ".." G_DIR_SEPARATOR_S, -1); while (poss) { if (cmpl_is_a_completion (poss)) { possible_count += 1; filename = cmpl_this_completion (poss); fullname = cmpl_completion_fullname(filename, cmpl_state); if (strcmp (filename, "." G_DIR_SEPARATOR_S) != 0 && strcmp (filename, ".." G_DIR_SEPARATOR_S) != 0) { if ( amitk_is_xif_flat_file(fullname, NULL, NULL) || amitk_is_xif_directory(fullname, NULL, NULL)) { gchar *xifname; gint length; /* remove any trailing directory characters */ length = strlen(filename); if ((length >= 1) && (strcmp(filename+length-1, G_DIR_SEPARATOR_S) == 0)) length--; xifname = g_strndup(filename, length); gtk_list_store_append (file_model, &iter); gtk_list_store_set (file_model, &iter, DIR_COLUMN, xifname, -1); g_free(xifname); } else if (cmpl_is_directory (poss)) { gtk_list_store_append (dir_model, &iter); gtk_list_store_set (dir_model, &iter, DIR_COLUMN, filename, -1); } } } poss = cmpl_next_completion (cmpl_state); } #ifdef G_PLATFORM_WIN32 /* For Windows, add drives as potential selections */ win32_gtk_add_drives_to_dir_list (dir_model); #endif /* File lists are set. */ g_assert (cmpl_state->reference_dir); if (try_complete) { /* User is trying to complete filenames, so advance the user's input * string to the updated_text, which is the common leading substring * of all possible completions, and if its a directory attempt * attempt completions in it. */ if (cmpl_updated_text (cmpl_state)[0]) { if (cmpl_updated_dir (cmpl_state)) { gchar* dir_name = g_strdup (cmpl_updated_text (cmpl_state)); did_recurse = TRUE; amitk_xif_selection_populate (fs, dir_name, TRUE, TRUE); g_free (dir_name); } else { if (fs->selection_entry) gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), cmpl_updated_text (cmpl_state)); } } else { selection_index = cmpl_last_valid_char (cmpl_state) - (strlen (rel_path) - strlen (rem_path)); if (fs->selection_entry) gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), rem_path); } } else if (reset_entry) { if (fs->selection_entry) gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), ""); } if (!did_recurse) { if (fs->selection_entry) gtk_editable_set_position (GTK_EDITABLE (fs->selection_entry), selection_index); if (fs->selection_entry) { char *escaped = escape_underscores (cmpl_reference_position (cmpl_state)); sel_text = g_strconcat (_("_Selection: "), escaped, NULL); g_free (escaped); gtk_label_set_text_with_mnemonic (GTK_LABEL (fs->selection_text), sel_text); g_free (sel_text); } if (fs->history_pulldown) { amitk_xif_selection_update_history_menu (fs, cmpl_reference_position (cmpl_state)); } } } static void amitk_xif_selection_abort (AmitkXifSelection *fs) { gchar err_buf[256]; g_snprintf (err_buf, sizeof (err_buf), _("Folder unreadable: %s"), cmpl_strerror (cmpl_errno)); /* BEEP gdk_beep(); */ if (fs->selection_entry) gtk_label_set_text (GTK_LABEL (fs->selection_text), err_buf); } /** * amitk_xif_selection_set_select_multiple: * @filesel: a #AmitkXifSelection * @select_multiple: whether or not the user is allowed to select multiple * files in the file list. * * Sets whether the user is allowed to select multiple files in the file list. * Use amitk_xif_selection_get_selections () to get the list of selected files. **/ void amitk_xif_selection_set_select_multiple (AmitkXifSelection *filesel, gboolean select_multiple) { GtkTreeSelection *sel; GtkSelectionMode mode; g_return_if_fail (AMITK_IS_XIF_SELECTION (filesel)); sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->file_list)); mode = select_multiple ? GTK_SELECTION_MULTIPLE : GTK_SELECTION_SINGLE; if (mode != gtk_tree_selection_get_mode (sel)) { gtk_tree_selection_set_mode (sel, mode); g_object_notify (G_OBJECT (filesel), "select-multiple"); } } /** * amitk_xif_selection_get_select_multiple: * @filesel: a #AmitkXifSelection * * Determines whether or not the user is allowed to select multiple files in * the file list. See amitk_xif_selection_set_select_multiple(). * * Return value: %TRUE if the user is allowed to select multiple files in the * file list **/ gboolean amitk_xif_selection_get_select_multiple (AmitkXifSelection *filesel) { GtkTreeSelection *sel; g_return_val_if_fail (AMITK_IS_XIF_SELECTION (filesel), FALSE); sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->file_list)); return (gtk_tree_selection_get_mode (sel) == GTK_SELECTION_MULTIPLE); } static void multiple_changed_foreach (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { GPtrArray *names = data; gchar *filename; gtk_tree_model_get (model, iter, FILE_COLUMN, &filename, -1); g_ptr_array_add (names, filename); } static void free_selected_names (GPtrArray *names) { gint i; for (i = 0; i < names->len; i++) g_free (g_ptr_array_index (names, i)); g_ptr_array_free (names, TRUE); } static void amitk_xif_selection_file_changed (GtkTreeSelection *selection, gpointer user_data) { AmitkXifSelection *fs = AMITK_XIF_SELECTION (user_data); GPtrArray *new_names; gchar *filename; const gchar *entry; gint index = -1; new_names = g_ptr_array_sized_new (8); gtk_tree_selection_selected_foreach (selection, multiple_changed_foreach, new_names); /* nothing selected */ if (new_names->len == 0) { g_ptr_array_free (new_names, TRUE); if (fs->selected_names != NULL) { free_selected_names (fs->selected_names); fs->selected_names = NULL; } goto maybe_clear_entry; } if (new_names->len != 1) { GPtrArray *old_names = fs->selected_names; if (old_names != NULL) { /* A common case is selecting a range of files from top to bottom, * so quickly check for that to avoid looping over the entire list */ if (compare_utf8_filenames (g_ptr_array_index (old_names, old_names->len - 1), g_ptr_array_index (new_names, new_names->len - 1)) != 0) index = new_names->len - 1; else { gint i = 0, j = 0, cmp; /* do a quick diff, stopping at the first file not in the * old list */ while (i < old_names->len && j < new_names->len) { cmp = compare_utf8_filenames (g_ptr_array_index (old_names, i), g_ptr_array_index (new_names, j)); if (cmp < 0) { i++; } else if (cmp == 0) { i++; j++; } else if (cmp > 0) { index = j; break; } } /* we ran off the end of the old list */ if (index == -1 && i < new_names->len) index = j; } } else { /* A phantom anchor still exists at the point where the last item * was selected, which is used for subsequent range selections. * So search up from there. */ if (fs->last_selected && compare_utf8_filenames (fs->last_selected, g_ptr_array_index (new_names, 0)) == 0) index = new_names->len - 1; else index = 0; } } else index = 0; if (fs->selected_names != NULL) free_selected_names (fs->selected_names); fs->selected_names = new_names; if (index != -1) { if (fs->last_selected != NULL) g_free (fs->last_selected); fs->last_selected = g_strdup (g_ptr_array_index (new_names, index)); filename = get_real_filename (fs->last_selected, FALSE); gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), filename); if (filename != fs->last_selected) g_free (filename); return; } maybe_clear_entry: entry = gtk_entry_get_text (GTK_ENTRY (fs->selection_entry)); if ((entry != NULL) && (fs->last_selected != NULL) && (compare_utf8_filenames (entry, fs->last_selected) == 0)) gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), ""); } /** * amitk_xif_selection_get_selections: * @filesel: a #AmitkXifSelection * * Retrieves the list of file selections the user has made in the dialog box. * This function is intended for use when the user can select multiple files * in the file list. The first file in the list is equivalent to what * amitk_xif_selection_get_filename() would return. * * The filenames are in the encoding of g_filename_from_utf8(), which may or * may not be the same as that used by GTK+ (UTF-8). To convert to UTF-8, call * The filenames are in the encoding of g_filename_from_utf8, which may or may * not be the same as that used by GTK+ (UTF-8). To convert to UTF-8, call * g_filename_to_utf8() on each string. * * Return value: a newly-allocated %NULL-terminated array of strings. Use * g_strfreev() to free it. **/ gchar ** amitk_xif_selection_get_selections (AmitkXifSelection *filesel) { GPtrArray *names; gchar **selections; gchar *filename, *dirname; gchar *current, *buf; gint i, count; gboolean unselected_entry; g_return_val_if_fail (AMITK_IS_XIF_SELECTION (filesel), NULL); filename = g_strdup (amitk_xif_selection_get_filename (filesel)); if (strlen (filename) == 0) { g_free (filename); return NULL; } names = filesel->selected_names; if (names != NULL) selections = g_new (gchar *, names->len + 2); else selections = g_new (gchar *, 2); count = 0; unselected_entry = TRUE; if (names != NULL) { dirname = g_path_get_dirname (filename); for (i = 0; i < names->len; i++) { buf = g_filename_from_utf8 (g_ptr_array_index (names, i), -1, NULL, NULL, NULL); current = g_build_filename (dirname, buf, NULL); g_free (buf); selections[count++] = current; if (unselected_entry && compare_sys_filenames (current, filename) == 0) unselected_entry = FALSE; } g_free (dirname); } if (unselected_entry) selections[count++] = filename; else g_free (filename); selections[count] = NULL; return selections; } /**********************************************************************/ /* External Interface */ /**********************************************************************/ /* The four completion state selectors */ static gchar* cmpl_updated_text (CompletionState *cmpl_state) { return cmpl_state->updated_text; } static gboolean cmpl_updated_dir (CompletionState *cmpl_state) { return cmpl_state->re_complete; } static gchar* cmpl_reference_position (CompletionState *cmpl_state) { return cmpl_state->reference_dir->fullname; } static gint cmpl_last_valid_char (CompletionState *cmpl_state) { return cmpl_state->last_valid_char; } static const gchar* cmpl_completion_fullname (const gchar *text, CompletionState *cmpl_state) { static const char nothing[2] = ""; if (!cmpl_state_okay (cmpl_state)) { return nothing; } else if (g_path_is_absolute (text)) { strcpy (cmpl_state->updated_text, text); } #ifdef HAVE_PWD_H else if (text[0] == '~') { CompletionDir* dir; char* slash; dir = open_user_dir (text, cmpl_state); if (!dir) { /* spencer says just return ~something, so * for now just do it. */ strcpy (cmpl_state->updated_text, text); } else { strcpy (cmpl_state->updated_text, dir->fullname); slash = strchr (text, G_DIR_SEPARATOR); if (slash) strcat (cmpl_state->updated_text, slash); } } #endif else { strcpy (cmpl_state->updated_text, cmpl_state->reference_dir->fullname); if (cmpl_state->updated_text[strlen (cmpl_state->updated_text) - 1] != G_DIR_SEPARATOR) strcat (cmpl_state->updated_text, G_DIR_SEPARATOR_S); strcat (cmpl_state->updated_text, text); } return cmpl_state->updated_text; } /* The three completion selectors */ static gchar* cmpl_this_completion (PossibleCompletion* pc) { return pc->text; } static gboolean cmpl_is_directory (PossibleCompletion* pc) { return pc->is_directory; } static gint cmpl_is_a_completion (PossibleCompletion* pc) { return pc->is_a_completion; } /**********************************************************************/ /* Construction, deletion */ /**********************************************************************/ static CompletionState* cmpl_init_state (void) { gchar *sys_getcwd_buf; gchar *utf8_cwd; CompletionState *new_state; new_state = g_new (CompletionState, 1); /* g_get_current_dir() returns a string in the "system" charset */ sys_getcwd_buf = g_get_current_dir (); utf8_cwd = g_filename_to_utf8 (sys_getcwd_buf, -1, NULL, NULL, NULL); g_free (sys_getcwd_buf); tryagain: new_state->reference_dir = NULL; new_state->completion_dir = NULL; new_state->active_completion_dir = NULL; new_state->directory_storage = NULL; new_state->directory_sent_storage = NULL; new_state->last_valid_char = 0; new_state->updated_text = g_new (gchar, MAXPATHLEN); new_state->updated_text_alloc = MAXPATHLEN; new_state->the_completion.text = g_new (gchar, MAXPATHLEN); new_state->the_completion.text_alloc = MAXPATHLEN; new_state->user_dir_name_buffer = NULL; new_state->user_directories = NULL; new_state->reference_dir = open_dir (utf8_cwd, new_state); if (!new_state->reference_dir) { /* Directories changing from underneath us, grumble */ strcpy (utf8_cwd, G_DIR_SEPARATOR_S); goto tryagain; } g_free (utf8_cwd); return new_state; } static void cmpl_free_dir_list (GList* dp0) { GList *dp = dp0; while (dp) { free_dir (dp->data); dp = dp->next; } g_list_free (dp0); } static void cmpl_free_dir_sent_list (GList* dp0) { GList *dp = dp0; while (dp) { free_dir_sent (dp->data); dp = dp->next; } g_list_free (dp0); } static void cmpl_free_state (CompletionState* cmpl_state) { g_return_if_fail (cmpl_state != NULL); cmpl_free_dir_list (cmpl_state->directory_storage); cmpl_free_dir_sent_list (cmpl_state->directory_sent_storage); if (cmpl_state->user_dir_name_buffer) g_free (cmpl_state->user_dir_name_buffer); if (cmpl_state->user_directories) g_free (cmpl_state->user_directories); if (cmpl_state->the_completion.text) g_free (cmpl_state->the_completion.text); if (cmpl_state->updated_text) g_free (cmpl_state->updated_text); g_free (cmpl_state); } static void free_dir (CompletionDir* dir) { g_free (dir->cmpl_text); g_free (dir->fullname); g_free (dir); } static void free_dir_sent (CompletionDirSent* sent) { gint i; for (i = 0; i < sent->entry_count; i++) { g_free (sent->entries[i].entry_name); g_free (sent->entries[i].sort_key); } g_free (sent->entries); g_free (sent); } static void prune_memory_usage (CompletionState *cmpl_state) { GList* cdsl = cmpl_state->directory_sent_storage; GList* cdl = cmpl_state->directory_storage; GList* cdl0 = cdl; gint len = 0; for (; cdsl && len < CMPL_DIRECTORY_CACHE_SIZE; len += 1) cdsl = cdsl->next; if (cdsl) { cmpl_free_dir_sent_list (cdsl->next); cdsl->next = NULL; } cmpl_state->directory_storage = NULL; while (cdl) { if (cdl->data == cmpl_state->reference_dir) cmpl_state->directory_storage = g_list_prepend (NULL, cdl->data); else free_dir (cdl->data); cdl = cdl->next; } g_list_free (cdl0); } /**********************************************************************/ /* The main entrances. */ /**********************************************************************/ static PossibleCompletion* cmpl_completion_matches (gchar *text_to_complete, gchar **remaining_text, CompletionState *cmpl_state) { #ifdef HAVE_PWD_H gchar* first_slash; #endif PossibleCompletion *poss; prune_memory_usage (cmpl_state); g_assert (text_to_complete != NULL); cmpl_state->user_completion_index = -1; cmpl_state->last_completion_text = text_to_complete; cmpl_state->the_completion.text[0] = 0; cmpl_state->last_valid_char = 0; cmpl_state->updated_text_len = -1; cmpl_state->updated_text[0] = 0; cmpl_state->re_complete = FALSE; #ifdef HAVE_PWD_H first_slash = strchr (text_to_complete, G_DIR_SEPARATOR); if (text_to_complete[0] == '~' && !first_slash) { /* Text starts with ~ and there is no slash, show all the * home directory completions. */ poss = attempt_homedir_completion (text_to_complete, cmpl_state); update_cmpl (poss, cmpl_state); return poss; } #endif cmpl_state->reference_dir = open_ref_dir (text_to_complete, remaining_text, cmpl_state); if (!cmpl_state->reference_dir) return NULL; cmpl_state->completion_dir = find_completion_dir (*remaining_text, remaining_text, cmpl_state); cmpl_state->last_valid_char = *remaining_text - text_to_complete; if (!cmpl_state->completion_dir) return NULL; cmpl_state->completion_dir->cmpl_index = -1; cmpl_state->completion_dir->cmpl_parent = NULL; cmpl_state->completion_dir->cmpl_text = g_strdup (*remaining_text); cmpl_state->active_completion_dir = cmpl_state->completion_dir; cmpl_state->reference_dir = cmpl_state->completion_dir; poss = attempt_file_completion (cmpl_state); update_cmpl (poss, cmpl_state); return poss; } static PossibleCompletion* cmpl_next_completion (CompletionState* cmpl_state) { PossibleCompletion* poss = NULL; cmpl_state->the_completion.text[0] = 0; #ifdef HAVE_PWD_H if (cmpl_state->user_completion_index >= 0) poss = attempt_homedir_completion (cmpl_state->last_completion_text, cmpl_state); else poss = attempt_file_completion (cmpl_state); #else poss = attempt_file_completion (cmpl_state); #endif update_cmpl (poss, cmpl_state); return poss; } /**********************************************************************/ /* Directory Operations */ /**********************************************************************/ /* Open the directory where completion will begin from, if possible. */ static CompletionDir* open_ref_dir (gchar *text_to_complete, gchar **remaining_text, CompletionState *cmpl_state) { gchar* first_slash; CompletionDir *new_dir; first_slash = strchr (text_to_complete, G_DIR_SEPARATOR); #ifdef G_WITH_CYGWIN if (text_to_complete[0] == '/' && text_to_complete[1] == '/') { char root_dir[5]; g_snprintf (root_dir, sizeof (root_dir), "//%c", text_to_complete[2]); new_dir = open_dir (root_dir, cmpl_state); if (new_dir) { *remaining_text = text_to_complete + 4; } } #else if (FALSE) ; #endif #ifdef HAVE_PWD_H else if (text_to_complete[0] == '~') { new_dir = open_user_dir (text_to_complete, cmpl_state); if (new_dir) { if (first_slash) *remaining_text = first_slash + 1; else *remaining_text = text_to_complete + strlen (text_to_complete); } else { return NULL; } } #endif else if (g_path_is_absolute (text_to_complete) || !cmpl_state->reference_dir) { gchar *tmp = g_strdup (text_to_complete); gchar *p; p = tmp; while (*p && *p != '*' && *p != '?') p++; *p = '\0'; p = strrchr (tmp, G_DIR_SEPARATOR); if (p) { if (p + 1 == g_path_skip_root (tmp)) p++; *p = '\0'; new_dir = open_dir (tmp, cmpl_state); if (new_dir) *remaining_text = text_to_complete + ((p == g_path_skip_root (tmp)) ? (p - tmp) : (p + 1 - tmp)); } else { /* If no possible candidates, use the cwd */ gchar *sys_curdir = g_get_current_dir (); gchar *utf8_curdir = g_filename_to_utf8 (sys_curdir, -1, NULL, NULL, NULL); g_free (sys_curdir); new_dir = open_dir (utf8_curdir, cmpl_state); if (new_dir) *remaining_text = text_to_complete; g_free (utf8_curdir); } g_free (tmp); } else { *remaining_text = text_to_complete; new_dir = open_dir (cmpl_state->reference_dir->fullname, cmpl_state); } if (new_dir) { new_dir->cmpl_index = -1; new_dir->cmpl_parent = NULL; } return new_dir; } #ifdef HAVE_PWD_H /* open a directory by user name */ static CompletionDir* open_user_dir (const gchar *text_to_complete, CompletionState *cmpl_state) { CompletionDir *result; gchar *first_slash; gint cmp_len; g_assert (text_to_complete && text_to_complete[0] == '~'); first_slash = strchr (text_to_complete, G_DIR_SEPARATOR); if (first_slash) cmp_len = first_slash - text_to_complete - 1; else cmp_len = strlen (text_to_complete + 1); if (!cmp_len) { /* ~/ */ const gchar *homedir = g_get_home_dir (); gchar *utf8_homedir = g_filename_to_utf8 (homedir, -1, NULL, NULL, NULL); if (utf8_homedir) result = open_dir (utf8_homedir, cmpl_state); else result = NULL; g_free (utf8_homedir); } else { /* ~user/ */ gchar* copy = g_new (char, cmp_len + 1); gchar *utf8_dir; struct passwd *pwd; strncpy (copy, text_to_complete + 1, cmp_len); copy[cmp_len] = 0; pwd = getpwnam (copy); g_free (copy); if (!pwd) { cmpl_errno = errno; return NULL; } utf8_dir = g_filename_to_utf8 (pwd->pw_dir, -1, NULL, NULL, NULL); result = open_dir (utf8_dir, cmpl_state); g_free (utf8_dir); } return result; } #endif /* open a directory relative the the current relative directory */ static CompletionDir* open_relative_dir (gchar *dir_name, CompletionDir *dir, CompletionState *cmpl_state) { CompletionDir *result; GString *path; path = g_string_sized_new (dir->fullname_len + strlen (dir_name) + 10); g_string_assign (path, dir->fullname); if (dir->fullname_len > 1 && path->str[dir->fullname_len - 1] != G_DIR_SEPARATOR) g_string_append_c (path, G_DIR_SEPARATOR); g_string_append (path, dir_name); result = open_dir (path->str, cmpl_state); g_string_free (path, TRUE); return result; } /* after the cache lookup fails, really open a new directory */ static CompletionDirSent* open_new_dir (gchar *dir_name, struct stat *sbuf, gboolean stat_subdirs) { CompletionDirSent *sent; GDir *directory; const char *dirent; GError *error = NULL; gint entry_count = 0; gint n_entries = 0; gint i; struct stat ent_sbuf; GString *path; gchar *sys_dir_name; sent = g_new (CompletionDirSent, 1); #ifndef G_PLATFORM_WIN32 sent->mtime = sbuf->st_mtime; sent->inode = sbuf->st_ino; sent->device = sbuf->st_dev; #endif path = g_string_sized_new (2*MAXPATHLEN + 10); sys_dir_name = g_filename_from_utf8 (dir_name, -1, NULL, NULL, NULL); if (!sys_dir_name) { cmpl_errno = CMPL_ERRNO_DID_NOT_CONVERT; return NULL; } directory = g_dir_open (sys_dir_name, 0, &error); if (!directory) { cmpl_errno = error->code; /* ??? */ g_free (sys_dir_name); return NULL; } while ((dirent = g_dir_read_name (directory)) != NULL) entry_count++; entry_count += 2; /* For ".",".." */ sent->entries = g_new (CompletionDirEntry, entry_count); sent->entry_count = entry_count; g_dir_rewind (directory); for (i = 0; i < entry_count; i += 1) { GError *error = NULL; if (i == 0) dirent = "."; else if (i == 1) dirent = ".."; else { dirent = g_dir_read_name (directory); if (!dirent) /* Directory changed */ break; } sent->entries[n_entries].entry_name = g_filename_to_utf8 (dirent, -1, NULL, NULL, &error); if (sent->entries[n_entries].entry_name == NULL || !g_utf8_validate (sent->entries[n_entries].entry_name, -1, NULL)) { gchar *escaped_str = g_strescape (dirent, NULL); g_message (_("The filename \"%s\" couldn't be converted to UTF-8 " "(try setting the environment variable G_BROKEN_FILENAMES): %s"), escaped_str, error->message ? error->message : _("Invalid Utf-8")); g_free (escaped_str); g_clear_error (&error); continue; } g_clear_error (&error); sent->entries[n_entries].sort_key = g_utf8_collate_key (sent->entries[n_entries].entry_name, -1); g_string_assign (path, sys_dir_name); if (path->str[path->len-1] != G_DIR_SEPARATOR) { g_string_append_c (path, G_DIR_SEPARATOR); } g_string_append (path, dirent); if (stat_subdirs) { /* Here we know path->str is a "system charset" string */ if (stat (path->str, &ent_sbuf) >= 0 && S_ISDIR (ent_sbuf.st_mode)) sent->entries[n_entries].is_dir = TRUE; else /* stat may fail, and we don't mind, since it could be a * dangling symlink. */ sent->entries[n_entries].is_dir = FALSE; } else sent->entries[n_entries].is_dir = 1; n_entries++; } sent->entry_count = n_entries; g_free (sys_dir_name); g_string_free (path, TRUE); qsort (sent->entries, sent->entry_count, sizeof (CompletionDirEntry), compare_cmpl_dir); g_dir_close (directory); return sent; } #ifndef G_PLATFORM_WIN32 static gboolean check_dir (gchar *dir_name, struct stat *result, gboolean *stat_subdirs) { /* A list of directories that we know only contain other directories. * Trying to stat every file in these directories would be very * expensive. */ static struct { gchar *name; gboolean present; struct stat statbuf; } no_stat_dirs[] = { { "/afs", FALSE, { 0 } }, { "/net", FALSE, { 0 } } }; static const gint n_no_stat_dirs = G_N_ELEMENTS (no_stat_dirs); static gboolean initialized = FALSE; gchar *sys_dir_name; gint i; if (!initialized) { initialized = TRUE; for (i = 0; i < n_no_stat_dirs; i++) { if (stat (no_stat_dirs[i].name, &no_stat_dirs[i].statbuf) == 0) no_stat_dirs[i].present = TRUE; } } sys_dir_name = g_filename_from_utf8 (dir_name, -1, NULL, NULL, NULL); if (!sys_dir_name) { cmpl_errno = CMPL_ERRNO_DID_NOT_CONVERT; return FALSE; } if (stat (sys_dir_name, result) < 0) { g_free (sys_dir_name); cmpl_errno = errno; return FALSE; } g_free (sys_dir_name); *stat_subdirs = TRUE; for (i = 0; i < n_no_stat_dirs; i++) { if (no_stat_dirs[i].present && (no_stat_dirs[i].statbuf.st_dev == result->st_dev) && (no_stat_dirs[i].statbuf.st_ino == result->st_ino)) { *stat_subdirs = FALSE; break; } } return TRUE; } #endif /* open a directory by absolute pathname */ static CompletionDir* open_dir (gchar *dir_name, CompletionState *cmpl_state) { #ifndef G_PLATFORM_WIN32 struct stat sbuf; gboolean stat_subdirs; GList* cdsl; #endif CompletionDirSent *sent; #ifndef G_PLATFORM_WIN32 if (!check_dir (dir_name, &sbuf, &stat_subdirs)) return NULL; cdsl = cmpl_state->directory_sent_storage; while (cdsl) { sent = cdsl->data; if (sent->inode == sbuf.st_ino && sent->mtime == sbuf.st_mtime && sent->device == sbuf.st_dev) return attach_dir (sent, dir_name, cmpl_state); cdsl = cdsl->next; } sent = open_new_dir (dir_name, &sbuf, stat_subdirs); #else sent = open_new_dir (dir_name, NULL, TRUE); #endif if (sent) { cmpl_state->directory_sent_storage = g_list_prepend (cmpl_state->directory_sent_storage, sent); return attach_dir (sent, dir_name, cmpl_state); } return NULL; } static CompletionDir* attach_dir (CompletionDirSent *sent, gchar *dir_name, CompletionState *cmpl_state) { CompletionDir* new_dir; new_dir = g_new (CompletionDir, 1); cmpl_state->directory_storage = g_list_prepend (cmpl_state->directory_storage, new_dir); new_dir->sent = sent; new_dir->fullname = g_strdup (dir_name); new_dir->fullname_len = strlen (dir_name); new_dir->cmpl_text = NULL; return new_dir; } static gint correct_dir_fullname (CompletionDir* cmpl_dir) { gint length = strlen (cmpl_dir->fullname); gchar *first_slash = strchr (cmpl_dir->fullname, G_DIR_SEPARATOR); gchar *sys_filename; struct stat sbuf; /* Does it end with /. (\.) ? */ if (length >= 2 && strcmp (cmpl_dir->fullname + length - 2, G_DIR_SEPARATOR_S ".") == 0) { /* Is it just the root directory (on a drive) ? */ if (cmpl_dir->fullname + length - 2 == first_slash) { cmpl_dir->fullname[length - 1] = 0; cmpl_dir->fullname_len = length - 1; return TRUE; } else { cmpl_dir->fullname[length - 2] = 0; } } /* Ends with /./ (\.\)? */ else if (length >= 3 && strcmp (cmpl_dir->fullname + length - 3, G_DIR_SEPARATOR_S "." G_DIR_SEPARATOR_S) == 0) cmpl_dir->fullname[length - 2] = 0; /* Ends with /.. (\..) ? */ else if (length >= 3 && strcmp (cmpl_dir->fullname + length - 3, G_DIR_SEPARATOR_S "..") == 0) { /* Is it just /.. (X:\..)? */ if (cmpl_dir->fullname + length - 3 == first_slash) { cmpl_dir->fullname[length - 2] = 0; cmpl_dir->fullname_len = length - 2; return TRUE; } sys_filename = g_filename_from_utf8 (cmpl_dir->fullname, -1, NULL, NULL, NULL); if (!sys_filename) { cmpl_errno = CMPL_ERRNO_DID_NOT_CONVERT; return FALSE; } if (stat (sys_filename, &sbuf) < 0) { g_free (sys_filename); cmpl_errno = errno; return FALSE; } g_free (sys_filename); cmpl_dir->fullname[length - 3] = 0; if (!correct_parent (cmpl_dir, &sbuf)) return FALSE; } /* Ends with /../ (\..\)? */ else if (length >= 4 && strcmp (cmpl_dir->fullname + length - 4, G_DIR_SEPARATOR_S ".." G_DIR_SEPARATOR_S) == 0) { /* Is it just /../ (X:\..\)? */ if (cmpl_dir->fullname + length - 4 == first_slash) { cmpl_dir->fullname[length - 3] = 0; cmpl_dir->fullname_len = length - 3; return TRUE; } sys_filename = g_filename_from_utf8 (cmpl_dir->fullname, -1, NULL, NULL, NULL); if (!sys_filename) { cmpl_errno = CMPL_ERRNO_DID_NOT_CONVERT; return FALSE; } if (stat (sys_filename, &sbuf) < 0) { g_free (sys_filename); cmpl_errno = errno; return FALSE; } g_free (sys_filename); cmpl_dir->fullname[length - 4] = 0; if (!correct_parent (cmpl_dir, &sbuf)) return FALSE; } cmpl_dir->fullname_len = strlen (cmpl_dir->fullname); return TRUE; } static gint correct_parent (CompletionDir *cmpl_dir, struct stat *sbuf) { struct stat parbuf; gchar *last_slash; gchar *first_slash; #ifndef G_PLATFORM_WIN32 gchar *new_name; #endif gchar *sys_filename; gchar c = 0; last_slash = strrchr (cmpl_dir->fullname, G_DIR_SEPARATOR); g_assert (last_slash); first_slash = strchr (cmpl_dir->fullname, G_DIR_SEPARATOR); /* Clever (?) way to check for top-level directory that works also on * Win32, where there is a drive letter and colon prefixed... */ if (last_slash != first_slash) { last_slash[0] = 0; } else { c = last_slash[1]; last_slash[1] = 0; } sys_filename = g_filename_from_utf8 (cmpl_dir->fullname, -1, NULL, NULL, NULL); if (!sys_filename) { cmpl_errno = CMPL_ERRNO_DID_NOT_CONVERT; if (!c) last_slash[0] = G_DIR_SEPARATOR; return FALSE; } if (stat (sys_filename, &parbuf) < 0) { g_free (sys_filename); cmpl_errno = errno; if (!c) last_slash[0] = G_DIR_SEPARATOR; return FALSE; } g_free (sys_filename); #ifndef G_PLATFORM_WIN32 /* No inode numbers on Win32 */ if (parbuf.st_ino == sbuf->st_ino && parbuf.st_dev == sbuf->st_dev) /* it wasn't a link */ return TRUE; if (c) last_slash[1] = c; else last_slash[0] = G_DIR_SEPARATOR; /* it was a link, have to figure it out the hard way */ new_name = find_parent_dir_fullname (cmpl_dir->fullname); if (!new_name) return FALSE; g_free (cmpl_dir->fullname); cmpl_dir->fullname = new_name; #endif return TRUE; } #ifndef G_PLATFORM_WIN32 static gchar* find_parent_dir_fullname (gchar* dirname) { gchar *sys_orig_dir; gchar *result; gchar *sys_cwd; gchar *sys_dirname; sys_orig_dir = g_get_current_dir (); sys_dirname = g_filename_from_utf8 (dirname, -1, NULL, NULL, NULL); if (!sys_dirname) { g_free (sys_orig_dir); cmpl_errno = CMPL_ERRNO_DID_NOT_CONVERT; return NULL; } if (chdir (sys_dirname) != 0 || chdir ("..") != 0) { cmpl_errno = errno; chdir (sys_orig_dir); g_free (sys_dirname); g_free (sys_orig_dir); return NULL; } g_free (sys_dirname); sys_cwd = g_get_current_dir (); result = g_filename_to_utf8 (sys_cwd, -1, NULL, NULL, NULL); g_free (sys_cwd); if (chdir (sys_orig_dir) != 0) { cmpl_errno = errno; g_free (sys_orig_dir); return NULL; } g_free (sys_orig_dir); return result; } #endif /**********************************************************************/ /* Completion Operations */ /**********************************************************************/ #ifdef HAVE_PWD_H static PossibleCompletion* attempt_homedir_completion (gchar *text_to_complete, CompletionState *cmpl_state) { gint index, length; if (!cmpl_state->user_dir_name_buffer && !get_pwdb (cmpl_state)) return NULL; length = strlen (text_to_complete) - 1; cmpl_state->user_completion_index += 1; while (cmpl_state->user_completion_index < cmpl_state->user_directories_len) { index = first_diff_index (text_to_complete + 1, cmpl_state->user_directories [cmpl_state->user_completion_index].login); switch (index) { case PATTERN_MATCH: break; default: if (cmpl_state->last_valid_char < (index + 1)) cmpl_state->last_valid_char = index + 1; cmpl_state->user_completion_index += 1; continue; } cmpl_state->the_completion.is_a_completion = 1; cmpl_state->the_completion.is_directory = TRUE; append_completion_text ("~", cmpl_state); append_completion_text (cmpl_state-> user_directories[cmpl_state->user_completion_index].login, cmpl_state); return append_completion_text (G_DIR_SEPARATOR_S, cmpl_state); } if (text_to_complete[1] || cmpl_state->user_completion_index > cmpl_state->user_directories_len) { cmpl_state->user_completion_index = -1; return NULL; } else { cmpl_state->user_completion_index += 1; cmpl_state->the_completion.is_a_completion = 1; cmpl_state->the_completion.is_directory = TRUE; return append_completion_text ("~" G_DIR_SEPARATOR_S, cmpl_state); } } #endif #ifdef G_PLATFORM_WIN32 /* FIXME: determine whether we should casefold all Unicode letters * here, too (and in in first_diff_index() walk through the strings with * g_utf8_next_char()), or if this folding isn't actually needed at * all. */ #define FOLD(c) (tolower(c)) #else #define FOLD(c) (c) #endif /* returns the index (>= 0) of the first differing character, * PATTERN_MATCH if the completion matches */ static gint first_diff_index (gchar *pat, gchar *text) { gint diff = 0; while (*pat && *text && FOLD (*text) == FOLD (*pat)) { pat += 1; text += 1; diff += 1; } if (*pat) return diff; return PATTERN_MATCH; } static PossibleCompletion* append_completion_text (gchar *text, CompletionState *cmpl_state) { gint len, i = 1; if (!cmpl_state->the_completion.text) return NULL; len = strlen (text) + strlen (cmpl_state->the_completion.text) + 1; if (cmpl_state->the_completion.text_alloc > len) { strcat (cmpl_state->the_completion.text, text); return &cmpl_state->the_completion; } while (i < len) i <<= 1; cmpl_state->the_completion.text_alloc = i; cmpl_state->the_completion.text = (gchar*) g_realloc (cmpl_state->the_completion.text, i); if (!cmpl_state->the_completion.text) return NULL; else { strcat (cmpl_state->the_completion.text, text); return &cmpl_state->the_completion; } } static CompletionDir* find_completion_dir (gchar *text_to_complete, gchar **remaining_text, CompletionState *cmpl_state) { gchar* first_slash = strchr (text_to_complete, G_DIR_SEPARATOR); CompletionDir* dir = cmpl_state->reference_dir; CompletionDir* next; *remaining_text = text_to_complete; while (first_slash) { gint len = first_slash - *remaining_text; gint found = 0; gchar *found_name = NULL; /* Quiet gcc */ gint i; gchar* pat_buf = g_new (gchar, len + 1); strncpy (pat_buf, *remaining_text, len); pat_buf[len] = 0; for (i = 0; i < dir->sent->entry_count; i += 1) { if (dir->sent->entries[i].is_dir && _amitk_fnmatch (pat_buf, dir->sent->entries[i].entry_name)) { if (found) { g_free (pat_buf); return dir; } else { found = 1; found_name = dir->sent->entries[i].entry_name; } } } if (!found) { /* Perhaps we are trying to open an automount directory */ found_name = pat_buf; } next = open_relative_dir (found_name, dir, cmpl_state); if (!next) { g_free (pat_buf); return NULL; } next->cmpl_parent = dir; dir = next; if (!correct_dir_fullname (dir)) { g_free (pat_buf); return NULL; } *remaining_text = first_slash + 1; first_slash = strchr (*remaining_text, G_DIR_SEPARATOR); g_free (pat_buf); } return dir; } static void update_cmpl (PossibleCompletion *poss, CompletionState *cmpl_state) { gint cmpl_len; if (!poss || !cmpl_is_a_completion (poss)) return; cmpl_len = strlen (cmpl_this_completion (poss)); if (cmpl_state->updated_text_alloc < cmpl_len + 1) { cmpl_state->updated_text = (gchar*)g_realloc (cmpl_state->updated_text, cmpl_state->updated_text_alloc); cmpl_state->updated_text_alloc = 2*cmpl_len; } if (cmpl_state->updated_text_len < 0) { strcpy (cmpl_state->updated_text, cmpl_this_completion (poss)); cmpl_state->updated_text_len = cmpl_len; cmpl_state->re_complete = cmpl_is_directory (poss); } else if (cmpl_state->updated_text_len == 0) { cmpl_state->re_complete = FALSE; } else { gint first_diff = first_diff_index (cmpl_state->updated_text, cmpl_this_completion (poss)); cmpl_state->re_complete = FALSE; if (first_diff == PATTERN_MATCH) return; if (first_diff > cmpl_state->updated_text_len) strcpy (cmpl_state->updated_text, cmpl_this_completion (poss)); cmpl_state->updated_text_len = first_diff; cmpl_state->updated_text[first_diff] = 0; } } static PossibleCompletion* attempt_file_completion (CompletionState *cmpl_state) { gchar *pat_buf, *first_slash; CompletionDir *dir = cmpl_state->active_completion_dir; dir->cmpl_index += 1; if (dir->cmpl_index == dir->sent->entry_count) { if (dir->cmpl_parent == NULL) { cmpl_state->active_completion_dir = NULL; return NULL; } else { cmpl_state->active_completion_dir = dir->cmpl_parent; return attempt_file_completion (cmpl_state); } } g_assert (dir->cmpl_text); first_slash = strchr (dir->cmpl_text, G_DIR_SEPARATOR); if (first_slash) { gint len = first_slash - dir->cmpl_text; pat_buf = g_new (gchar, len + 1); strncpy (pat_buf, dir->cmpl_text, len); pat_buf[len] = 0; } else { gint len = strlen (dir->cmpl_text); pat_buf = g_new (gchar, len + 2); strcpy (pat_buf, dir->cmpl_text); /* Don't append a * if the user entered one herself. * This way one can complete *.h and don't get matches * on any .help files, for instance. */ if (strchr (pat_buf, '*') == NULL) strcpy (pat_buf + len, "*"); } if (first_slash) { if (dir->sent->entries[dir->cmpl_index].is_dir) { if (_amitk_fnmatch (pat_buf, dir->sent->entries[dir->cmpl_index].entry_name)) { CompletionDir* new_dir; new_dir = open_relative_dir (dir->sent->entries[dir->cmpl_index].entry_name, dir, cmpl_state); if (!new_dir) { g_free (pat_buf); return NULL; } new_dir->cmpl_parent = dir; new_dir->cmpl_index = -1; new_dir->cmpl_text = g_strdup (first_slash + 1); cmpl_state->active_completion_dir = new_dir; g_free (pat_buf); return attempt_file_completion (cmpl_state); } else { g_free (pat_buf); return attempt_file_completion (cmpl_state); } } else { g_free (pat_buf); return attempt_file_completion (cmpl_state); } } else { if (dir->cmpl_parent != NULL) { append_completion_text (dir->fullname + strlen (cmpl_state->completion_dir->fullname) + 1, cmpl_state); append_completion_text (G_DIR_SEPARATOR_S, cmpl_state); } append_completion_text (dir->sent->entries[dir->cmpl_index].entry_name, cmpl_state); cmpl_state->the_completion.is_a_completion = _amitk_fnmatch (pat_buf, dir->sent->entries[dir->cmpl_index].entry_name); cmpl_state->the_completion.is_directory = dir->sent->entries[dir->cmpl_index].is_dir; if (dir->sent->entries[dir->cmpl_index].is_dir) append_completion_text (G_DIR_SEPARATOR_S, cmpl_state); g_free (pat_buf); return &cmpl_state->the_completion; } } #ifdef HAVE_PWD_H static gint get_pwdb (CompletionState* cmpl_state) { struct passwd *pwd_ptr; gchar* buf_ptr; gchar *utf8; gint len = 0, i, count = 0; if (cmpl_state->user_dir_name_buffer) return TRUE; setpwent (); while ((pwd_ptr = getpwent ()) != NULL) { utf8 = g_filename_to_utf8 (pwd_ptr->pw_name, -1, NULL, NULL, NULL); len += strlen (utf8); g_free (utf8); utf8 = g_filename_to_utf8 (pwd_ptr->pw_dir, -1, NULL, NULL, NULL); len += strlen (utf8); g_free (utf8); len += 2; count += 1; } setpwent (); cmpl_state->user_dir_name_buffer = g_new (gchar, len); cmpl_state->user_directories = g_new (CompletionUserDir, count); cmpl_state->user_directories_len = count; buf_ptr = cmpl_state->user_dir_name_buffer; for (i = 0; i < count; i += 1) { pwd_ptr = getpwent (); if (!pwd_ptr) { cmpl_errno = errno; goto error; } utf8 = g_filename_to_utf8 (pwd_ptr->pw_name, -1, NULL, NULL, NULL); strcpy (buf_ptr, utf8); g_free (utf8); cmpl_state->user_directories[i].login = buf_ptr; buf_ptr += strlen (buf_ptr); buf_ptr += 1; utf8 = g_filename_to_utf8 (pwd_ptr->pw_dir, -1, NULL, NULL, NULL); strcpy (buf_ptr, utf8); g_free (utf8); cmpl_state->user_directories[i].homedir = buf_ptr; buf_ptr += strlen (buf_ptr); buf_ptr += 1; } qsort (cmpl_state->user_directories, cmpl_state->user_directories_len, sizeof (CompletionUserDir), compare_user_dir); endpwent (); return TRUE; error: if (cmpl_state->user_dir_name_buffer) g_free (cmpl_state->user_dir_name_buffer); if (cmpl_state->user_directories) g_free (cmpl_state->user_directories); cmpl_state->user_dir_name_buffer = NULL; cmpl_state->user_directories = NULL; return FALSE; } static gint compare_user_dir (const void *a, const void *b) { return strcmp ((((CompletionUserDir*)a))->login, (((CompletionUserDir*)b))->login); } #endif static gint compare_cmpl_dir (const void *a, const void *b) { return strcmp (((CompletionDirEntry*)a)->sort_key, (((CompletionDirEntry*)b))->sort_key); } static gint cmpl_state_okay (CompletionState* cmpl_state) { return cmpl_state && cmpl_state->reference_dir; } static const gchar* cmpl_strerror (gint err) { if (err == CMPL_ERRNO_TOO_LONG) return _("Name too long"); else if (err == CMPL_ERRNO_DID_NOT_CONVERT) return _("Couldn't convert filename"); else return g_strerror (err); } /* stolen from fnmatch.c from gtk */ /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ /* * Stripped down, converted to UTF-8 and test cases added * * Owen Taylor, 13 December 2002; */ /* We need to make sure that all constants are defined * to properly compile this file */ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif static gunichar get_char (const char **str) { gunichar c = g_utf8_get_char (*str); *str = g_utf8_next_char (*str); #ifdef G_PLATFORM_WIN32 c = g_unichar_tolower (c); #endif return c; } #if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN) #define DO_ESCAPE 0 #else #define DO_ESCAPE 1 #endif static gunichar get_unescaped_char (const char **str, gboolean *was_escaped) { gunichar c = get_char (str); *was_escaped = DO_ESCAPE && c == '\\'; if (*was_escaped) c = get_char (str); return c; } /* Match STRING against the filename pattern PATTERN, returning zero if it matches, nonzero if not. */ static gboolean amitk_fnmatch_intern (const char *pattern, const char *string, gboolean component_start) { const char *p = pattern, *n = string; while (*p) { const char *last_n = n; gunichar c = get_char (&p); gunichar nc = get_char (&n); switch (c) { case '?': if (nc == '\0') return FALSE; else if (nc == G_DIR_SEPARATOR) return FALSE; else if (nc == '.' && component_start) return FALSE; break; case '\\': if (DO_ESCAPE) c = get_char (&p); if (nc != c) return FALSE; break; case '*': if (nc == '.' && component_start) return FALSE; { const char *last_p = p; for (last_p = p, c = get_char (&p); c == '?' || c == '*'; last_p = p, c = get_char (&p)) { if (c == '?') { if (nc == '\0') return FALSE; else if (nc == G_DIR_SEPARATOR) return FALSE; else { last_n = n; nc = get_char (&n); } } } /* If the pattern ends with wildcards, we have a * guaranteed match unless there is a dir separator * in the remainder of the string. */ if (c == '\0') { if (strchr (last_n, G_DIR_SEPARATOR) != NULL) return FALSE; else return TRUE; } if (DO_ESCAPE && c == '\\') c = get_char (&p); for (p = last_p; nc != '\0';) { if ((c == '[' || nc == c) && amitk_fnmatch_intern (p, last_n, component_start)) return TRUE; component_start = (nc == G_DIR_SEPARATOR); last_n = n; nc = get_char (&n); } return FALSE; } case '[': { /* Nonzero if the sense of the character class is inverted. */ gboolean not; gboolean was_escaped; if (nc == '\0' || nc == G_DIR_SEPARATOR) return FALSE; if (nc == '.' && component_start) return FALSE; not = (*p == '!' || *p == '^'); if (not) ++p; c = get_unescaped_char (&p, &was_escaped); for (;;) { register gunichar cstart = c, cend = c; if (c == '\0') /* [ (unterminated) loses. */ return FALSE; c = get_unescaped_char (&p, &was_escaped); if (!was_escaped && c == '-' && *p != ']') { cend = get_unescaped_char (&p, &was_escaped); if (cend == '\0') return FALSE; c = get_char (&p); } if (nc >= cstart && nc <= cend) goto matched; if (!was_escaped && c == ']') break; } if (!not) return FALSE; break; matched:; /* Skip the rest of the [...] that already matched. */ /* XXX 1003.2d11 is unclear if was_escaped is right. */ while (was_escaped || c != ']') { if (c == '\0') /* [... (unterminated) loses. */ return FALSE; c = get_unescaped_char (&p, &was_escaped); } if (not) return FALSE; } break; default: if (c != nc) return FALSE; } component_start = (nc == G_DIR_SEPARATOR); } if (*n == '\0') return TRUE; return FALSE; } /* Match STRING against the filename pattern PATTERN, returning zero if * it matches, nonzero if not. * * GTK+ used to use a old version of GNU fnmatch() that was buggy * in various ways and didn't handle UTF-8. The following is * converted to UTF-8. To simplify the process of making it * correct, this is special-cased to the combinations of flags * that gtkfilesel.c uses. * * FNM_FILE_NAME - always set * FNM_LEADING_DIR - never set * FNM_PERIOD - always set * FNM_NOESCAPE - set only on windows * FNM_CASEFOLD - set only on windows */ static gboolean _amitk_fnmatch (const char *pattern, const char *string) { return amitk_fnmatch_intern (pattern, string, TRUE); } #if 0 /* the rest of this function runs the file selection dialog box */ file_chooser = gtk_file_chooser_dialog_new(_("Export to File"), GTK_WINDOW(main_dialog), /* parent window */ GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, AMITK_RESPONSE_EXECUTE, /* intercept the save signal */ NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(file_chooser), TRUE); gtk_dialog_set_default_response (GTK_DIALOG (file_chooser), AMITK_RESPONSE_EXECUTE); /* notes from failed attempt */ #ifdef AMIDE_LIBDCMDATA_SUPPORT gboolean check_if_dicom_dir(gchar * path) { gchar * test_path; gboolean result; test_path = g_strdup_printf("%s%s%s",path, G_DIR_SEPARATOR_S, "DICOMDIR"); result = dcmtk_test_dicom(test_path); g_print("dicom test %d\n", result); g_free(test_path); return result; } static void fc_response_cb(GObject * file_chooser, gint response_id, gpointer data) { gchar * current_folder; gboolean is_dicom_dir=FALSE; gchar * filename; g_print("response id %d\n", response_id); /* intercept the AMITK_RESPONSE_ACCEPT, and resend a GTK_RESPONSE_ACCEPT to get normal GtkFileChooserDialog functionality unless this a DCMTK directory */ if (response_id == AMITK_RESPONSE_EXECUTE) { g_signal_stop_emission_by_name (GTK_DIALOG(file_chooser), "response"); /* kill this emission */ /* see if we've got a folder containing a DICOMDIR file */ current_folder = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(file_chooser)); is_dicom_dir = check_if_dicom_dir(current_folder); #if 0 /* shove the DICOMDIR filename into the dialog box */ if (is_dicom_dir) { filename = g_strdup_printf("%s%s%s",current_folder, G_DIR_SEPARATOR_S, "DICOMDIR"); gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(file_chooser), filename); g_free(filename); } #endif if (current_folder != NULL) g_free(current_folder); /* and go down the usual pathway */ if (!is_dicom_dir) gtk_dialog_response(GTK_DIALOG(file_chooser), GTK_RESPONSE_ACCEPT); } return; } static void fc_file_activated(GObject * file_chooser, gpointer data) { g_print("activated\n"); gtk_dialog_response(GTK_DIALOG(file_chooser), GTK_RESPONSE_ACCEPT); return; } static gboolean avoid_first_signal=TRUE; /* when we change to a folder that has a DICOMDIR file in it, we just go ahead and send the AMITK_RESPONSE_EXECUTE response signal to the dialog */ static void fc_folder_changed(GObject * file_chooser, gpointer data) { gchar * current_folder; gboolean is_dicom_dir; /* this prevents automatically exporting the DICOM file if we've started in a DICOMDIR containing directory */ if (avoid_first_signal) { avoid_first_signal=FALSE; return; } g_print("folder change\n"); current_folder = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(file_chooser)); is_dicom_dir = check_if_dicom_dir(current_folder); if (current_folder != NULL) g_free(current_folder); if (is_dicom_dir) { g_signal_stop_emission_by_name(G_OBJECT(file_chooser), "current_folder_changed"); gtk_dialog_response(GTK_DIALOG(file_chooser), AMITK_RESPONSE_EXECUTE); } return; } #endif #ifdef AMIDE_LIBDCMDATA_SUPPORT /* for DCMTK dicom directories, we might be selecting a preexisting folder */ if (method == AMITK_EXPORT_METHOD_DCMTK) { g_signal_connect(file_chooser, "response", G_CALLBACK (fc_response_cb), NULL); /* this next one is needed as we're using AMITK_RESPONSE_EXECUTE for the save button */ g_signal_connect(GTK_FILE_CHOOSER(file_chooser), "file_activated", G_CALLBACK(fc_file_activated), NULL); /* and this next one monitors if we double click on a DICOMDIR containing folder */ g_signal_connect(GTK_FILE_CHOOSER(file_chooser), "current_folder_changed", G_CALLBACK(fc_folder_changed), NULL); } #endif #endif amide-1.0.5/attic/amitk_list_view.c0000664000175000017500000002621210032360555017112 0ustar loeningloening/* amitk_list_view.c * * Part of amide - Amide's a Medical Image Dataset Examiner * Copyright (C) 2003-2004 Andy Loening * * Author: Andy Loening */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* adapted from gtkcolorsel.c */ #include "amide_config.h" #include "amitk_list_view.h" #include "amitk_study.h" #include "amitk_marshal.h" #include "image.h" enum { SELECT_OBJECT, LAST_SIGNAL } amitk_list_view_signals; enum { COLUMN_ICON, COLUMN_NAME, COLUMN_OBJECT, NUM_COLUMNS }; typedef struct { AmitkObject * object; GtkTreeIter iter; gboolean found; } list_view_find_t; static void list_view_class_init (AmitkListViewClass *klass); static void list_view_init (AmitkListView *list_view); static void list_view_destroy (GtkObject *object); static void list_view_object_update_cb(AmitkObject * object, gpointer list); static void list_view_object_add_child_cb(AmitkObject * parent, AmitkObject * child, gpointer list_view); static void list_view_object_remove_child_cb(AmitkObject * parent, AmitkObject * child, gpointer list_view); static gboolean list_view_find_recurse(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); static gboolean list_view_find_object(AmitkListView * list_view, AmitkObject * object, GtkTreeIter * iter); static void list_view_add_object(AmitkListView * list_view, AmitkObject * object); static void list_view_remove_object(AmitkListView * list_view, AmitkObject * object); static GtkTreeViewClass *parent_class; static guint list_view_signals[LAST_SIGNAL]; GType amitk_list_view_get_type (void) { static GType list_view_type = 0; if (!list_view_type) { static const GTypeInfo list_view_info = { sizeof (AmitkListViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) list_view_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (AmitkListView), 0, /* # preallocs */ (GInstanceInitFunc) list_view_init, NULL /* value table */ }; list_view_type = g_type_register_static(GTK_TYPE_TREE_VIEW, "AmitkListView", &list_view_info, 0); } return list_view_type; } static void list_view_class_init (AmitkListViewClass *klass) { GtkObjectClass *gtkobject_class; GtkTreeViewClass *list_view_class; GtkWidgetClass *widget_class; gtkobject_class = (GtkObjectClass*) klass; widget_class = (GtkWidgetClass*) klass; list_view_class = (GtkTreeViewClass*) klass; parent_class = g_type_class_peek_parent(klass); gtkobject_class->destroy = list_view_destroy; list_view_signals[SELECT_OBJECT] = g_signal_new ("select_object", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AmitkListViewClass, select_object), NULL, NULL, amitk_marshal_NONE__OBJECT, G_TYPE_NONE, 1, AMITK_TYPE_OBJECT); } static void list_view_init (AmitkListView * list_view) { list_view->study = NULL; } static void list_view_destroy (GtkObject * object) { AmitkListView * list_view; g_return_if_fail (object != NULL); g_return_if_fail (AMITK_IS_LIST_VIEW (object)); list_view = AMITK_LIST_VIEW (object); if (list_view->study != NULL) { list_view_remove_object(list_view, AMITK_OBJECT(list_view->study)); list_view->study = NULL; } if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } static void list_view_object_update_cb(AmitkObject * object, gpointer data) { AmitkListView * list_view = data; GtkTreeIter iter; GtkTreeModel * model; GdkPixbuf * pixbuf; g_return_if_fail(AMITK_IS_LIST_VIEW(list_view)); g_return_if_fail(AMITK_IS_OBJECT(object)); if (list_view_find_object(list_view, object, &iter)) { model = gtk_tree_view_get_model(GTK_TREE_VIEW(list_view)); pixbuf = image_get_object_pixbuf(object); gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_ICON, pixbuf, COLUMN_NAME, AMITK_OBJECT_NAME(object), -1); g_object_unref(pixbuf); } // g_signal_emit(G_OBJECT(list_view), list_view_signals[SELECT_OBJECT], 0,object); return; } static void list_view_object_add_child_cb(AmitkObject * parent, AmitkObject * child, gpointer data) { AmitkListView * list_view = data; g_return_if_fail(AMITK_IS_LIST_VIEW(list_view)); g_return_if_fail(AMITK_IS_OBJECT(child)); list_view_add_object(AMITK_LIST_VIEW(list_view), child); return; } static void list_view_object_remove_child_cb(AmitkObject * parent, AmitkObject * child, gpointer data) { AmitkListView * list_view = data; g_return_if_fail(AMITK_IS_LIST_VIEW(list_view)); g_return_if_fail(AMITK_IS_OBJECT(child)); list_view_remove_object(AMITK_LIST_VIEW(list_view), child); return; } static gboolean list_view_find_recurse(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { list_view_find_t * list_view_find=data; AmitkObject * object; gtk_tree_model_get(model, iter, COLUMN_OBJECT, &object, -1); g_return_val_if_fail(object != NULL, FALSE); if (object == list_view_find->object) { list_view_find->iter = *iter; list_view_find->found = TRUE; return TRUE; } else { return FALSE; } } static gboolean list_view_find_object(AmitkListView * list_view, AmitkObject * object, GtkTreeIter * iter) { GtkTreeModel * model; list_view_find_t list_view_find; g_return_val_if_fail(AMITK_IS_LIST_VIEW(list_view),FALSE); model = gtk_tree_view_get_model(GTK_TREE_VIEW(list_view)); list_view_find.object = object; list_view_find.found = FALSE; gtk_tree_model_foreach(model, list_view_find_recurse, &list_view_find); if (list_view_find.found) { *iter = list_view_find.iter; return TRUE; } else return FALSE; } static void list_view_add_object(AmitkListView * list_view, AmitkObject * object) { GList * children; GtkTreeIter parent_iter; GtkTreeIter iter; GtkTreeModel * model; GdkPixbuf * pixbuf; amitk_object_ref(object); /* add a reference */ if (AMITK_IS_STUDY(object)) { /* save a pointer to thestudy object */ if (list_view->study != NULL) { list_view_remove_object(list_view, AMITK_OBJECT(list_view->study)); } list_view->study = AMITK_STUDY(object); } model = gtk_tree_view_get_model(GTK_TREE_VIEW(list_view)); if (AMITK_OBJECT_PARENT(object) == NULL) gtk_list_store_append (GTK_LIST_STORE(model), &iter); /* Acquire a top-level iterator */ else { if (list_view_find_object(list_view, AMITK_OBJECT_PARENT(object), &parent_iter)) gtk_list_store_insert_after (GTK_LIST_STORE(model), &iter, &parent_iter); else g_return_if_reached(); } pixbuf = image_get_object_pixbuf(object); gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_ICON, pixbuf, COLUMN_NAME, AMITK_OBJECT_NAME(object), COLUMN_OBJECT, object, -1); g_object_unref(pixbuf); g_signal_connect(G_OBJECT(object), "object_name_changed", G_CALLBACK(list_view_object_update_cb), list_view); g_signal_connect(G_OBJECT(object), "object_selection_changed", G_CALLBACK(list_view_object_update_cb), list_view); if (AMITK_IS_DATA_SET(object)) { g_signal_connect(G_OBJECT(object), "modality_changed", G_CALLBACK(list_view_object_update_cb), list_view); g_signal_connect(G_OBJECT(object), "color_table_changed", G_CALLBACK(list_view_object_update_cb), list_view); } else if (AMITK_IS_ROI(object)) { g_signal_connect(G_OBJECT(object), "roi_type_changed", G_CALLBACK(list_view_object_update_cb), list_view); } g_signal_connect(G_OBJECT(object), "object_add_child", G_CALLBACK(list_view_object_add_child_cb), list_view); g_signal_connect(G_OBJECT(object), "object_remove_child", G_CALLBACK(list_view_object_remove_child_cb), list_view); /* add children */ children = AMITK_OBJECT_CHILDREN(object); while (children != NULL) { list_view_add_object(list_view, children->data); children = children->next; } } static void list_view_remove_object(AmitkListView * list_view, AmitkObject * object) { GList * children; GtkTreeIter iter; GtkTreeModel * model; g_return_if_fail(AMITK_IS_LIST_VIEW(list_view)); g_return_if_fail(list_view_find_object(list_view, object, &iter)); /* shouldn't fail */ /* unselect the object */ amitk_object_unselect(object, AMITK_SELECTION_ALL); /* recursive remove children */ children = AMITK_OBJECT_CHILDREN(object); while (children != NULL) { list_view_remove_object(list_view, children->data); children = children->next; } /* disconnect the object's signals */ g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(list_view_object_update_cb), list_view); g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(list_view_object_add_child_cb), list_view); g_signal_handlers_disconnect_by_func(G_OBJECT(object), G_CALLBACK(list_view_object_remove_child_cb), list_view); /* remove the object */ model = gtk_tree_view_get_model(GTK_TREE_VIEW(list_view)); gtk_list_store_remove(GTK_LIST_STORE(model), &iter); /* and unref */ amitk_object_unref(object); return; } GtkWidget* amitk_list_view_new (void) { AmitkListView * list_view; GtkListStore * store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *selection; list_view = g_object_new(amitk_list_view_get_type(), NULL); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(list_view), FALSE); store = gtk_list_store_new(NUM_COLUMNS, G_TYPE_BOOLEAN, /* COLUMN_VISIBLE_SINGLE */ G_TYPE_BOOLEAN,/* COLUMN_VISIBLE_LINKED_2WAY */ G_TYPE_BOOLEAN, /* COLUMN_VISIBLE_LINKED_3WAY */ G_TYPE_STRING, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER); gtk_tree_view_set_model (GTK_TREE_VIEW(list_view), GTK_TREE_MODEL (store)); g_object_unref(store); /* icon */ renderer = gtk_cell_renderer_pixbuf_new (); column = gtk_tree_view_column_new_with_attributes("", renderer, "pixbuf", COLUMN_ICON, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), column); /* name */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes("name", renderer, "text", COLUMN_NAME, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), column); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list_view)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); return GTK_WIDGET (list_view); } void amitk_list_view_set_study(AmitkListView * list_view, AmitkStudy * study) { g_return_if_fail(AMITK_IS_LIST_VIEW(list_view)); g_return_if_fail(AMITK_IS_STUDY(study)); list_view_add_object(list_view, AMITK_OBJECT(study)); return; } amide-1.0.5/depcomp0000755000175000017500000005601612235260752014035 0ustar loeningloening#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: amide-1.0.5/todo0000644000175000017500000003076512270305113013341 0ustar loeningloeningmisc list of things todo: for next release? ----------------- * gnome_canvas font looks bad on windows, switched to Tahoma looks a little better but not true type'd. Figure out what font gtk's using. * calling help on win32 creates coredump * exporting gated studies via DICOM and reloading doesn't work. May be an error in exporting, or an error in importing gated DICOM * change wait cursor to be whole dialog, not just canvas * revert on dialogs doesn't work correctly... children get readded * freehand/isocontour roi's - draw them at high mag - will see they're shifted just slightly off voxel lines [2] [x] noticed by Mark Huisman * Gate picker -> multiple selection still screwed up Mac OS X -------- * clicking on a .xif study loads up AMIDE, but without the file. [x] noticed by Eric Wolsztynski Win32 ---------------- * g_win32_get_package_installation_subdirectoy in amide_gnome is deprecated, currently commented out. Need to fix starting up help * help works in cygwin setup, but not in installed package. Seems to know the right place to look, just isn't doing something correctly.... * Copy to clipboard function in roi analysis widget doesn't work on Windows 7, although it does work on Windows XP, likely a win32 bug in gtk_clipboard on win32... (noticed by Arutselvan Natarajan) * export pixel size text boxes get ignored - likely using wrong "update" event (noticed by Priti Madhav and Ian Miller) * zdial on rendering doesn't work big things: ----------- * figuring out orientation from files loaded from xmedcon isn't strictly correct, and screws up with NIFTI format look at notes in libmdc_interface.c. Also would likely need fixes in libmdc itself (see 0.10.3_nifti_unsubmitted changes) * polygonal ROI's (requested by A.Mehranian) * add drag-n-drop capabilities between study windows don't use treeview reorderable stuff, too limited, * toolbox dialog for generating polar maps (requested by Jeff Arkles and others) * should be able to specify units the image/display info is in, and request different output units. -allow changing of displayed units (mm, cm, m, s, min, uCi, Beq, etc.) -study would have an output units variable -each data set, can specify it's original units, and (if needed), a scaling factor to output unit -ui_preferences would change default units -need gobject based approach, so widgets can listen for change -> start with mm/cm/m * add a data sets list item, -would allow reading in multi-bed data sets -raw_data type could have amitk_space made its parent, so it has its own space... * calculating PV correction. Correction factors could be calculated for each volume's resolution and then cached. * multi-step undo/redo, look into how other GTK apps do it -once this is done, drop the enact/cancel bit of shifting data sets and study's as we can now just undo such a change * create an AmitkAnalysis type, holding voxel statistics -when created, passed a study -use callbacks, so that stats are marked as current or obsolete, stats also marked as obsolete if a AmitkAnalysis calculation type changed from "fast" to "accurate" or back -stats are only (re)calculated as needed (i.e. when stat values/raw values are requested) -has a callback "amitk_analysis_changed", so that the roi_analysis_widget knows to update it's table. -function to request stats as an array of structs -function to request raw values as array of structs * ability to import and export AIR .air files -probably from rotate axis page -need object list widget: should update automatically when something is removed somewhere else small things: ------------- * boolean operators between ROI's, would allow subtracting one from another (requested by A. Mehranian) * be able to export the color scale (with appropriate numerical values) to an image file (requested by Frezghi Habte) * pop-up widget allowing value underneath cursor to be shown for all data sets (not just active). (requested by Axel Moeller) * hot key to cycle through time frames (requested by Michael Braden) * allow direct entry of transformation matrix in amitk_space_edit * data set icons in amitk_tree could be generated from the actual respective data sets * .xif files should try to compress data. * amitk_preferences.c : default color table, panel layout, layout should be saved in gsettings as they associated strings for these values, not as the enumerated numbers * change tb_filter, tb_crop, tb_fads, so that an amitk_tree is used for the initial popup letting you change which data set will be used * export ROI's to external file? and allow import? * continue implementing progress bars for various functions: -roi analysis -loading in data sets * could probably subclass isocontour's from AmitkRoi -> AimtkIsocontourRoi would allow simplification of amitk_canvas event cruft also probably get rid of amitk_roi_variable_types.c... not worth the performance improvement * add sqrt and log abilities into color table lookup? * should have option to use rigid body registration with scaling * try to work in the max/min/distribution calculations into the loading loop * fix zooming of off angle roi's on the canvas * roi analysis dialog should probably be updated for any change of the roi's * add key combination that sets current pixel value to max/min threshold * rendered movies aren't smooth when looping in an external player, this happened when switching to ffmpeg small short range things -------------- * try to change all dialog box buttons to verbs * add tooltips to everything.... * add more help buttons to the dialogs longer range things ---------------- * add report generation. This would add colormaps, location, thickness study name, volume name, scan date, etc. to the export function. Would handle multiple images. * rendering alterations -> 3D red/green imaging allow rotation of light source and view in addition to object allow changing of material properties transformation to rendering structure is inefficient when doing multiple volumes, each volume should be transfered using it's minimal voxel size, not the group's maximum minimal voxel size. the rendered images should then be scaled and overlapped. MIP rendering would be nice.... More likely, will switch to using VTK at some point * aligning of data using automated registration? libgnomecanvas/pixbuf issues --------------------- These problems will probably never be rectified, as libgnomecanvas is now deprecated. More likely course of action will be likely to rewrite the parts that use libgnomecanvas to use a new canvas system. A new canvas system has not yet been agreed on for gtk (as of 3.0 at least). Goocanvas would have seemed to be the obvious choice, as it's similar to libgnomecanvas but with cairo as the backend rather than libart, but development of this seems to have stalled. May need to go directly to cairo as the canvas. * antialiased canvases have been unstable in the past, due to instabilities with ROI resizing starts spewing "*** attempt to put segment in horiz list twice" errors and eventually core dumps. Either a libart or libgnomecanvas bug. At the current time (amide 1.0.3) things seem to be working, so the appropriate lines in configure.in have been reenabled to allow building in support for antialiased canvases. To disable antialiasing, disable these lines again. last tested versions: libart_lgpl-2.3.21 libgnomecanvas-2.30.3 -make sure to check that lines in tb_crop are placed correctly -need to check that the export jpeg functions work, they have not been tested * anti-aliased canvases doesn't support GDK line styles (as of libgnomecanvas 2.2.0) -ui_preferences_dialog, and amitk_object_dialog define out the appropriate code when antialiasing support is compiled in. Add back in once (if ever) anti-aliased canvases support line styles. * currently, alpha blending is done inside of image.c, a single pixbuf is generated, and this is handed to gnome_canvas. It'd be nice to use separate pixbuf's but each data set, and throwing them on the canvas. The single biggest problem with this is that the background buffer in gnome_canvas is RGB, not RGBA, so the buffer has an effective alpha of 0xFF, and you're just blending the image with whatever that background is, screwing up the color levels. may have to rewrite libgnomecanvas to use a 32bit buffer -would allow the use of cursor keys for moving data sets around each other * using the gdk_pixbuf_scale functions Slicing from all data sets at zoom=1.0, and then scaling using the gdk_pixbuf_scale type functions doesn't work well, as the scale functions don't do a great job of interpolation (circa gdk-pixbuf-0.18.0). things dependent on other things: -------------- * dependent on gtk fixing the GTK_FILE_CHOOSER_CREATE_FOLDER properties of gtkfilechooser. Currently, the gtkfilechooser widget puts out an error if you try to select a folder that's currently a filename (rather than allowing overwriting). This comes up really only when trying to overwrite a .xif file as a .xif directory using the same name. * dependent on gtk > 2.14: -gtk (as of 2.14) doesn't have any version of gnome_help_display. As such, the relevant code from libgnome has been copied into amide_gnome.c. When gtk has this capability, the code in amide_gnome.c can be deleted. * not currently implemented in gtk (at least as of 2.12): handle_box's don't get minimized with the main window... but no way to minimize them independently... * amide_gconf.c is used to encapsulate configuration support (gconf for unix, registry entries based on code stolen from gnumeric for win32, and g_key_file (flat file) for mac os x). GConf is likely to be deprecated at some point in the future. GSettings doesn't seem appropriate, as it absolutely requires a schema to be in place (as of glib 2.30) or the program aborts... If GSettings ever becomes more user friendly will switch the GConf support to GSettings, otherwise will go with the g_key_file in place of gconf. * setlocale is disabled on win32, this is because further setlocale commands seem to be ignored, and so reading in text hdr files (e.g. Concorde format ) gets screwed up for locales that use the comma for the radix. This is as of mingw 3.13 at least. * in xml.c and amitk_point.c, have a bunch of G_PLATFORM_WIN32 ifdef's, because g_strdup_printf wasn't obeying the setlocale command on windows as of glib 2.2 This was causing errors in locales that use a comma as the radix sign. Need to test if g_strdup_printf will work with later versions of glib. * ui_time_dialog specifies AmitkDataSet as G_TYPE_POINTER instead of AMITK_TYPE_OBJECT when setting up gtk_list_store - this is due to a gtk bug, adds a reference with G_TYPE_OBJECT but doesn't remove it - also in amitk_tree.c, ui_alignment_dialog.c * at some point, GtkGammaCurve will probably be deprecated from Gtk, can either copy the code into amide, or come up with something more fitting * when bug-buddy supports sourceforge bug reporting, delete the following line from amide.c so we can have bug reporting "signal(SIGSEGV, SIG_DFL);" * remove no-ops in raw_data.c I've needed this (at least) for gcc <= 3.0.3. Left in for the moment as I haven't tested gcc 3.1 for this bug, and other people may be using old versions of gcc. * Current implementation is cooperative multitasking, if that. Should turn program into a true, multi-threaded design. Note that gtk for windows (as of 2003.04.30) does not handle multi-threaded program.... so will have to wait for that. * amitk_data_sets_export_to_file is very wasteful of memory. It reslices the requisite data sets into a new data set, and then an additional copy data set is made inside of libmdc. If medcon/libmdc ever supports slice-by-slice saving of data sets (instead of as an entire volume at once), we would only need to allocate one slice in amide, and one slice in libmdc, rather than one volume in amide, and one volume in libmdc. factor analysis things: ----------------------- * factor analysis -> should be able to do from ROI's too. should be simple. 1 iteration to find the # of voxels, second iteration to fill in probable use weight >=0.5 as cutoff * need to add orthogonality component back into PLS * principle component analysis should probably be demeaned * need to extend 2 comp to 3 comp (or n-comp) * should be able to combine main function for fads and comp models amide-1.0.5/intltool-merge.in0000644000175000017500000010714110657234431015746 0ustar loeningloening#!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Merger # # Copyright (C) 2000, 2003 Free Software Foundation. # Copyright (C) 2000, 2001 Eazel, Inc # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 published by the Free Software Foundation. # # Intltool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Maciej Stachowiak # Kenneth Christiansen # Darin Adler # # Proper XML UTF-8'ification written by Cyrille Chepelov # ## Release information my $PROGRAM = "intltool-merge"; my $PACKAGE = "intltool"; my $VERSION = "0.35.5"; ## Loaded modules use strict; use Getopt::Long; use Text::Wrap; use File::Basename; my $must_end_tag = -1; my $last_depth = -1; my $translation_depth = -1; my @tag_stack = (); my @entered_tag = (); my @translation_strings = (); my $leading_space = ""; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $BA_STYLE_ARG = 0; my $XML_STYLE_ARG = 0; my $KEYS_STYLE_ARG = 0; my $DESKTOP_STYLE_ARG = 0; my $SCHEMAS_STYLE_ARG = 0; my $RFC822DEB_STYLE_ARG = 0; my $QUOTED_STYLE_ARG = 0; my $QUIET_ARG = 0; my $PASS_THROUGH_ARG = 0; my $UTF8_ARG = 0; my $MULTIPLE_OUTPUT = 0; my $cache_file; ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "quiet|q" => \$QUIET_ARG, "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility "ba-style|b" => \$BA_STYLE_ARG, "xml-style|x" => \$XML_STYLE_ARG, "keys-style|k" => \$KEYS_STYLE_ARG, "desktop-style|d" => \$DESKTOP_STYLE_ARG, "schemas-style|s" => \$SCHEMAS_STYLE_ARG, "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG, "quoted-style" => \$QUOTED_STYLE_ARG, "pass-through|p" => \$PASS_THROUGH_ARG, "utf8|u" => \$UTF8_ARG, "multiple-output|m" => \$MULTIPLE_OUTPUT, "cache|c=s" => \$cache_file ) or &error; my $PO_DIR; my $FILE; my $OUTFILE; my %po_files_by_lang = (); my %translations = (); my $iconv = $ENV{"ICONV"} || $ENV{"INTLTOOL_ICONV"} || "@INTLTOOL_ICONV@"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); # Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; # XML quoted string contents my $q = "[^\\\"]*"; ## Check for options. if ($VERSION_ARG) { &print_version; } elsif ($HELP_ARG) { &print_help; } elsif ($BA_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &ba_merge_translations; &finalize; } elsif ($XML_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &xml_merge_output; &finalize; } elsif ($KEYS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &keys_merge_translations; &finalize; } elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &desktop_merge_translations; &finalize; } elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &schemas_merge_translations; &finalize; } elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2) { &preparation; &print_message; &rfc822deb_merge_translations; &finalize; } elsif ($QUOTED_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; "ed_merge_translations; &finalize; } else { &print_help; } exit; ## Sub for printing release information sub print_version { print <<_EOF_; ${PROGRAM} (${PACKAGE}) ${VERSION} Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen. Copyright (C) 2000-2003 Free Software Foundation, Inc. Copyright (C) 2000-2001 Eazel, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } ## Sub for printing usage information sub print_help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE Generates an output file that includes some localized attributes from an untranslated source file. Mandatory options: (exactly one must be specified) -b, --ba-style includes translations in the bonobo-activation style -d, --desktop-style includes translations in the desktop style -k, --keys-style includes translations in the keys style -s, --schemas-style includes translations in the schemas style -r, --rfc822deb-style includes translations in the RFC822 style --quoted-style includes translations in the quoted string style -x, --xml-style includes translations in the standard xml style Other options: -u, --utf8 convert all strings to UTF-8 before merging (default for everything except RFC822 style) -p, --pass-through deprecated, does nothing and issues a warning -m, --multiple-output output one localized file per locale, instead of a single file containing all localized elements -c, --cache=FILE specify cache file name (usually \$top_builddir/po/.intltool-merge-cache) -q, --quiet suppress most messages --help display this help and exit --version output version information and exit Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub print_error { print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub print_message { print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG; } sub preparation { $PO_DIR = $ARGV[0]; $FILE = $ARGV[1]; $OUTFILE = $ARGV[2]; &gather_po_files; &get_translation_database; } # General-purpose code for looking up translations in .po files sub po_file2lang { my ($tmp) = @_; $tmp =~ s/^.*\/(.*)\.po$/$1/; return $tmp; } sub gather_po_files { for my $po_file (glob "$PO_DIR/*.po") { $po_files_by_lang{po_file2lang($po_file)} = $po_file; } } sub get_local_charset { my ($encoding) = @_; my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias"; # seek character encoding aliases in charset.alias (glib) if (open CHARSET_ALIAS, $alias_file) { while () { next if /^\#/; return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i) } close CHARSET_ALIAS; } # if not found, return input string return $encoding; } sub get_po_encoding { my ($in_po_file) = @_; my $encoding = ""; open IN_PO_FILE, $in_po_file or die; while () { ## example: "Content-Type: text/plain; charset=ISO-8859-1\n" if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/) { $encoding = $1; last; } } close IN_PO_FILE; if (!$encoding) { print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG; $encoding = "ISO-8859-1"; } system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull"); if ($?) { $encoding = get_local_charset($encoding); } return $encoding } sub utf8_sanity_check { print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG; $UTF8_ARG = 1; } sub get_translation_database { if ($cache_file) { &get_cached_translation_database; } else { &create_translation_database; } } sub get_newest_po_age { my $newest_age; foreach my $file (values %po_files_by_lang) { my $file_age = -M $file; $newest_age = $file_age if !$newest_age || $file_age < $newest_age; } $newest_age = 0 if !$newest_age; return $newest_age; } sub create_cache { print "Generating and caching the translation database\n" unless $QUIET_ARG; &create_translation_database; open CACHE, ">$cache_file" || die; print CACHE join "\x01", %translations; close CACHE; } sub load_cache { print "Found cached translation database\n" unless $QUIET_ARG; my $contents; open CACHE, "<$cache_file" || die; { local $/; $contents = ; } close CACHE; %translations = split "\x01", $contents; } sub get_cached_translation_database { my $cache_file_age = -M $cache_file; if (defined $cache_file_age) { if ($cache_file_age <= &get_newest_po_age) { &load_cache; return; } print "Found too-old cached translation database\n" unless $QUIET_ARG; } &create_cache; } sub create_translation_database { for my $lang (keys %po_files_by_lang) { my $po_file = $po_files_by_lang{$lang}; if ($UTF8_ARG) { my $encoding = get_po_encoding ($po_file); if (lc $encoding eq "utf-8") { open PO_FILE, "<$po_file"; } else { print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;; open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|"; } } else { open PO_FILE, "<$po_file"; } my $nextfuzzy = 0; my $inmsgid = 0; my $inmsgstr = 0; my $msgid = ""; my $msgstr = ""; while () { $nextfuzzy = 1 if /^#, fuzzy/; if (/^msgid "((\\.|[^\\]+)*)"/ ) { $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; $msgid = ""; $msgstr = ""; if ($nextfuzzy) { $inmsgid = 0; } else { $msgid = unescape_po_string($1); $inmsgid = 1; } $inmsgstr = 0; $nextfuzzy = 0; } if (/^msgstr "((\\.|[^\\]+)*)"/) { $msgstr = unescape_po_string($1); $inmsgstr = 1; $inmsgid = 0; } if (/^"((\\.|[^\\]+)*)"/) { $msgid .= unescape_po_string($1) if $inmsgid; $msgstr .= unescape_po_string($1) if $inmsgstr; } } $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; } } sub finalize { } sub unescape_one_sequence { my ($sequence) = @_; return "\\" if $sequence eq "\\\\"; return "\"" if $sequence eq "\\\""; return "\n" if $sequence eq "\\n"; return "\r" if $sequence eq "\\r"; return "\t" if $sequence eq "\\t"; return "\b" if $sequence eq "\\b"; return "\f" if $sequence eq "\\f"; return "\a" if $sequence eq "\\a"; return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7) return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/); return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/); # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489 return $sequence; } sub unescape_po_string { my ($string) = @_; $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg; return $string; } ## NOTE: deal with < - < but not > - > because it seems its ok to have ## > in the entity. For further info please look at #84738. sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; s/</; close INPUT; } open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!"; # Binmode so that selftest works ok if using a native Win32 Perl... binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s) { print OUTPUT $1; my $node = $2 . "\n"; my @strings = (); $_ = $node; while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) { push @strings, entity_decode($3); } print OUTPUT; my %langs; for my $string (@strings) { for my $lang (keys %po_files_by_lang) { $langs{$lang} = 1 if $translations{$lang, $string}; } } for my $lang (sort keys %langs) { $_ = $node; s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s; s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg; print OUTPUT; } } print OUTPUT $source; close OUTPUT; } ## XML (non-bonobo-activation) merge code # Process tag attributes # Only parameter is a HASH containing attributes -> values mapping sub getAttributeString { my $sub = shift; my $do_translate = shift || 0; my $language = shift || ""; my $result = ""; my $translate = shift; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; if ($do_translate && $key =~ /^_/) { $key =~ s|^_||g; if ($language) { # Handle translation my $decode_string = entity_decode($string); my $translation = $translations{$language, $decode_string}; if ($translation) { $translation = entity_encode($translation); $string = $translation; } $$translate = 2; } else { $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate } } $result .= " $key=$quote$string$quote"; } return $result; } # Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; if ($singlelang) { my $oldMO = $MULTIPLE_OUTPUT; $MULTIPLE_OUTPUT = 1; traverse($fh, $type, $rest, $language, $spacepreserve); $MULTIPLE_OUTPUT = $oldMO; } else { traverse($fh, $type, $rest, $language, $spacepreserve); } $index += 2; } } sub isWellFormedXmlFragment { my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $fragment = shift; return 0 if (!$fragment); $fragment = "$fragment"; my $xp = new XML::Parser(Style => 'Tree'); my $tree = 0; eval { $tree = $xp->parse($fragment); }; return $tree; } sub traverse { my $fh = shift; my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if (!$nodename) { if ($content =~ /^[\s]*$/) { $leading_space .= $content; } print $fh $content; } else { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); print $fh "<$nodename", $outattr; if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup || $translate == 2) { my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup}); if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) { $translation = $lookup if (!$translation); print $fh " xml:lang=\"", $language, "\"" if $language; print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; return; # this means there will be no same translation with xml:lang="$language"... # if we want them both, just remove this "return" } else { print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $lookup; } print $fh ""; } } else { print $fh "/>"; } for my $lang (sort keys %po_files_by_lang) { if ($MULTIPLE_OUTPUT && $lang ne "$language") { next; } if ($lang) { # Handle translation # my $translate = 0; my $localattrs = getAttributeString($attrs, 1, $lang, \$translate); my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup}); if ($translate && !$translation) { $translation = $lookup; } if ($translation || $translate) { print $fh "\n"; $leading_space =~ s/.*\n//g; print $fh $leading_space; print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $lang, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; } } } } else { my $count = scalar(@all); if ($count > 0) { print $fh ">"; my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } print $fh ""; } else { print $fh "/>"; } } } } sub intltool_tree_comment { my $expat = shift; my $data = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 1 => $data; } sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } sub readXml { my $filename = shift || return; if(!-f $filename) { die "ERROR Cannot find filename: $filename\n"; } my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); my $tree = $xp->parsefile($filename); # Hello thereHowdydo # would be: # [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{}, # 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub print_header { my $infile = shift; my $fh = shift; my $source; if(!-f $infile) { die "ERROR Cannot find filename: $infile\n"; } print $fh qq{\n}; { local $/; open DOCINPUT, "<${FILE}" or die; $source = ; close DOCINPUT; } if ($source =~ /()/s) { print $fh "$1\n"; } elsif ($source =~ /(]*>)/s) { print $fh "$1\n"; } } sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } sub xml_merge_output { my $source; if ($MULTIPLE_OUTPUT) { for my $lang (sort keys %po_files_by_lang) { if ( ! -d $lang ) { mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; } open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree, $lang); close OUTPUT; print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; } } open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree); close OUTPUT; print "CREATED $OUTFILE\n" unless $QUIET_ARG; } sub keys_merge_translations { open INPUT, "<${FILE}" or die; open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/[$lang]$1=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; } sub desktop_merge_translations { open INPUT, "<${FILE}" or die; open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/${1}[$lang]=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; } sub schemas_merge_translations { my $source; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">$OUTFILE" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; # FIXME: support attribute translations # Empty nodes never need translation, so unmark all of them. # For example, <_foo/> is just replaced by . $source =~ s|<\s*_($w+)\s*/>|<$1/>|g; while ($source =~ s/ (.*?) (\s+)((\s*) (\s*(?:\s*)?(.*?)\s*<\/default>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/short>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/long>)?(\s*) <\/locale>) //sx) { print OUTPUT $1; my $locale_start_spaces = $2 ? $2 : ''; my $default_spaces = $4 ? $4 : ''; my $short_spaces = $7 ? $7 : ''; my $long_spaces = $10 ? $10 : ''; my $locale_end_spaces = $13 ? $13 : ''; my $c_default_block = $3 ? $3 : ''; my $default_string = $6 ? $6 : ''; my $short_string = $9 ? $9 : ''; my $long_string = $12 ? $12 : ''; print OUTPUT "$locale_start_spaces$c_default_block"; $default_string =~ s/\s+/ /g; $default_string = entity_decode($default_string); $short_string =~ s/\s+/ /g; $short_string = entity_decode($short_string); $long_string =~ s/\s+/ /g; $long_string = entity_decode($long_string); for my $lang (sort keys %po_files_by_lang) { my $default_translation = $translations{$lang, $default_string}; my $short_translation = $translations{$lang, $short_string}; my $long_translation = $translations{$lang, $long_string}; next if (!$default_translation && !$short_translation && !$long_translation); print OUTPUT "\n$locale_start_spaces"; print OUTPUT "$default_spaces"; if ($default_translation) { $default_translation = entity_encode($default_translation); print OUTPUT "$default_translation"; } print OUTPUT "$short_spaces"; if ($short_translation) { $short_translation = entity_encode($short_translation); print OUTPUT "$short_translation"; } print OUTPUT "$long_spaces"; if ($long_translation) { $long_translation = entity_encode($long_translation); print OUTPUT "$long_translation"; } print OUTPUT "$locale_end_spaces"; } } print OUTPUT $source; close OUTPUT; } sub rfc822deb_merge_translations { my %encodings = (); for my $lang (keys %po_files_by_lang) { $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang})); } my $source; $Text::Wrap::huge = 'overflow'; $Text::Wrap::break = qr/\n|\s(?=\S)/; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg) { my $sep = $1; my $non_translated_line = $3.$4; my $string = $5; my $underscore = length($2); next if $underscore eq 0 && $non_translated_line =~ /^#/; # Remove [] dummy strings my $stripped = $string; $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2; $stripped =~ s/\[\s[^\[\]]*\]$//; $non_translated_line .= $stripped; print OUTPUT $sep.$non_translated_line; if ($underscore) { my @str_list = rfc822deb_split($underscore, $string); for my $lang (sort keys %po_files_by_lang) { my $is_translated = 1; my $str_translated = ''; my $first = 1; for my $str (@str_list) { my $translation = $translations{$lang, $str}; if (!$translation) { $is_translated = 0; last; } # $translation may also contain [] dummy # strings, mostly to indicate an empty string $translation =~ s/\[\s[^\[\]]*\]$//; if ($first) { if ($underscore eq 2) { $str_translated .= $translation; } else { $str_translated .= Text::Tabs::expand($translation) . "\n"; } } else { if ($underscore eq 2) { $str_translated .= ', ' . $translation; } else { $str_translated .= Text::Tabs::expand( Text::Wrap::wrap(' ', ' ', $translation)) . "\n .\n"; } } $first = 0; # To fix some problems with Text::Wrap::wrap $str_translated =~ s/(\n )+\n/\n .\n/g; } next unless $is_translated; $str_translated =~ s/\n \.\n$//; $str_translated =~ s/\s+$//; $_ = $non_translated_line; s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s; print OUTPUT; } } } print OUTPUT "\n"; close OUTPUT; close INPUT; } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } sub quoted_translation { my ($lang, $string) = @_; $string =~ s/\\\"/\"/g; my $translation = $translations{$lang, $string}; $translation = $string if !$translation; $translation =~ s/\"/\\\"/g; return $translation } sub quoted_merge_translations { if (!$MULTIPLE_OUTPUT) { print "Quoted only supports Multiple Output.\n"; exit(1); } for my $lang (sort keys %po_files_by_lang) { if ( ! -d $lang ) { mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; } open INPUT, "<${FILE}" or die; open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . "ed_translation($lang, $1) . "\""/ge; print OUTPUT; } close OUTPUT; close INPUT; } } amide-1.0.5/README0000644000175000017500000001003011611414052013311 0ustar loeningloening===== AMIDE ===== AMIDE stands for: AMIDE's a Medical Image Data Examiner AMIDE is intended for viewing and analyzing 3D medical imaging data sets. For more information on AMIDE, check out the AMIDE web page at: http://amide.sourceforge.net AMIDE is licensed under the terms of the GNU GPL included in the file COPYING. Requirements ------------ 1) Compiler: I currently use gcc-4.6. The later 3.* series (e.g. 3.3) should work as well, along with version 2.95. Early 3.* Versions of gcc will quite likely generate compilation errors (and make AMIDE unstable) if optimizations are used when compiling. 2) GTK+: The current series of AMIDE requires GTK+-2, at least version 2.16. I'm currently developing on a Fedora Core 15 system, although other distributions of Linux with equivalent library support should work. Scrollkeeper is required for generating the help documentation. If you don't care about that, it's not needed. 3) Additional libraries: libgnomecanvas libxml-2 libgnomeui-2 (not needed on win32) These are various other libraries are needed for installation, most of which you will most likely already have installed if you have GTK+. Optional Packages ----------------- 1) (X)MedCon/libmdc (X)MedCon includes a library (libmdc) which allows AMIDE to import the following formats; Acr/Nema 2.0, Analyze (SPM), Concorde microPET, DICOM 3.0, ECAT/Matrix 6/7, InterFile3.3 and Gif87a/89a. (X)MedCon can be obtained from: http://xmedcon.sourceforge.net 2) DCMTK - DICOM Toolkit DCMTK provides expanded support for DICOM files, allowing the reading in of many clinical format DICOM datasets that (X)MedCon doesn't support. Version 3.6.0 is required. It can be downloaded at: http://dicom.offis.de/dcmtk.php.en 3) z_matrix_70/libecat This library can be used as an alternative for importing ECAT 6/7 files, and is released under a fairly restrictive license. It can be found on the AMIDE sourceforge website, or at it's original site: ftp://dormeur.topo.ucl.ac.be/pub/ecat/z_matrix_70/ecat.tar.gz The source file off of amide.sourceforge.net is preferable, as it includes a Makefile which will make a shared library, and a small patch. Since the license for libecat is non-GPL compatible, you really should only link to it as a shared library. A README file is included with the tarball that explains how to configure/compile the library. RPM packages are also available off the AMIDE web site. 4) volpack/libvolpack Volpack includes a library (libvolpack) which is used for the optional volume rendering component of AMIDE. The original version can be found at: http://graphics.stanford.edu/software/volpack/ The version available on the AMIDE web site is preferable, as it's been updated to compile cleanly under Linux. RPM packages are also available. 5) ffmpeg (libavcodec) [alternatively libfame] Another optional package, the ffmpeg library is used for generating MPEG-1 movies from series of rendered images and for generating fly-through movies. Information, code, and binaries for ffmpeg can be found at; http://ffmpeg.mplayerhq.hu and Linux RPM binaries are available at: http://rpmfusion.org/ If for whatever reasons you do not want to use the ffmpeg package for generating MPEG-1 movies, there is still code in AMIDE for using the libfame package for doing this. Information, code, and binaries for libfame can be found at: http://fame.sourceforge.net and Linux RPM binaries are available at: http://atrpms.net/name/libfame/ Building -------- See the file INSTALL for info on compiling and installing. If you don't feel like reading that, try: ./configure make make install (as root) If you're wondering about configuration options, a lot of information can be obtained by running: ./configure --help Building gtk-doc files ---------------------- The majority of the source code for AMIDE is structured as a library extension of GTK, called AMITK. Documentation for this library can be built using gtk-doc as follows: ./configure --enable-libdcmdata=no --enable-gtk-doc=yes make amide-1.0.5/amide.spec0000664000175000017500000000472712271346264014422 0ustar loeningloeningName: amide Version: 1.0.5 Release: 2%{?dist} Summary: Program for viewing and analyzing medical image data sets License: GPLv2+ Group: Applications/Engineering URL: http://amide.sourceforge.net Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Packager: Andy Loening Requires: xmedcon >= 0.10.0 Requires: gsl Requires: volpack Requires: ffmpeg-libs >= 0.4.9 Requires: dcmtk >= 3.6.0 Requires: gtk2 >= 2.16 Requires: gnome-vfs2 Requires: libgnomecanvas BuildRequires: xmedcon-devel BuildRequires: volpack-devel BuildRequires: libxml2-devel BuildRequires: gnome-doc-utils BuildRequires: libgnomecanvas-devel BuildRequires: ffmpeg-devel >= 0.4.9 BuildRequires: gsl-devel BuildRequires: dcmtk-devel BuildRequires: perl-XML-Parser BuildRequires: glib2-devel BuildRequires: gtk2-devel >= 2.10 BuildRequires: gnome-vfs2-devel %description AMIDE is a tool for viewing and analyzing medical image data sets. It's capabilities include the simultaneous handling of multiple data sets imported from a variety of file formats, image fusion, 3D region of interest drawing and analysis, volume rendering, and rigid body alignments. %prep %setup -q %build %configure \ --enable-libecat=no \ --enable-amide-debug=no \ --disable-scrollkeeper make %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT desktop-file-install --vendor gnome --delete-original \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ --add-category X-Red-Hat-Extra \ $RPM_BUILD_ROOT%{_datadir}/applications/* %clean rm -rf $RPM_BUILD_ROOT %post update-desktop-database %{_datadir}/applications %postun update-desktop-database %{_datadir}/applications %files %defattr(-, root, root) %doc AUTHORS COPYING ChangeLog NEWS README todo %{_bindir}/* %{_datadir}/pixmaps %{_datadir}/gnome %{_datadir}/omf %{_datadir}/applications %{_datadir}/locale %{_mandir}/* %changelog * Fri Feb 24 2011 Andy Loening - cutout gtk-doc building and scrollkeeper * Sun Dec 16 2007 Andy Loening - small tweak for new gnome-doc help files * Tue Nov 05 2002 Andy Loening - get it to work with scrollkeeper * Sun Dec 19 2000 Andy Loening - wrote this fool thing amide-1.0.5/AUTHORS0000644000175000017500000000077211721537032013523 0ustar loeningloeningProgrammers: ----------- Andreas Loening Additions: ---------- Mutual information alignment - Ian Miller Translations: ------------ Spanish Manual Translation: Pablo Sau Interface Translations: Chinese (Simplified) wormwang@holdfastgroup.com Chinese (Traditional) William Chao Misc. Credits: -------------- Pencil icon is taken from the GIMP, and is used under terms of the GPL. amide-1.0.5/Makefile.in0000664000175000017500000006702412271346300014522 0ustar loeningloening# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/amide_config.h.in mkinstalldirs COPYING config.guess \ config.sub depcomp install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-doc-utils.m4 \ $(top_srcdir)/m4/libfame.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = amide_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)amide_config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = pixmaps win32 macosx src doc man po etc help DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMIDE_CHECK_OBSOLETE_CFLAGS = @AMIDE_CHECK_OBSOLETE_CFLAGS@ AMIDE_DEBUG_CFLAGS = @AMIDE_DEBUG_CFLAGS@ AMIDE_GTK_CFLAGS = @AMIDE_GTK_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_CFLAGS = @AMIDE_GTK_EXTRA_GCONF_CFLAGS@ AMIDE_GTK_EXTRA_GCONF_LIBS = @AMIDE_GTK_EXTRA_GCONF_LIBS@ AMIDE_GTK_EXTRA_GVFS_CFLAGS = @AMIDE_GTK_EXTRA_GVFS_CFLAGS@ AMIDE_GTK_EXTRA_GVFS_LIBS = @AMIDE_GTK_EXTRA_GVFS_LIBS@ AMIDE_GTK_LIBS = @AMIDE_GTK_LIBS@ AMIDE_LIBDCMDATA_CFLAGS = @AMIDE_LIBDCMDATA_CFLAGS@ AMIDE_LIBDCMDATA_LIBS = @AMIDE_LIBDCMDATA_LIBS@ AMIDE_LIBECAT_LIBS = @AMIDE_LIBECAT_LIBS@ AMIDE_LIBVOLPACK_LIBS = @AMIDE_LIBVOLPACK_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DB2HTML = @DB2HTML@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --enable-gtk-doc DLLTOOL = @DLLTOOL@ DOC_USER_FORMATS = @DOC_USER_FORMATS@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FFMPEG_CFLAGS = @FFMPEG_CFLAGS@ FFMPEG_LIBS = @FFMPEG_LIBS@ FGREP = @FGREP@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ HELP_DIR = @HELP_DIR@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFAME_CFLAGS = @LIBFAME_CFLAGS@ LIBFAME_CONFIG = @LIBFAME_CONFIG@ LIBFAME_LIBS = @LIBFAME_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMF_DIR = @OMF_DIR@ OPTIMIZATION_CFLAGS = @OPTIMIZATION_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XMEDCON_CFLAGS = @XMEDCON_CFLAGS@ XMEDCON_CONFIG = @XMEDCON_CONFIG@ XMEDCON_LIBS = @XMEDCON_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ intltool__v_merge_options_ = @intltool__v_merge_options_@ intltool__v_merge_options_0 = @intltool__v_merge_options_0@ libdir = @libdir@ libexecdir = @libexecdir@ libgnomecanvas_greater_than_230_CFLAGS = @libgnomecanvas_greater_than_230_CFLAGS@ libgnomecanvas_greater_than_230_LIBS = @libgnomecanvas_greater_than_230_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 @DISABLE_DOC_FALSE@HELPDIR = help @DISABLE_DOC_TRUE@HELPDIR = # note, win32 needs to be before src SUBDIRS = \ pixmaps \ win32 \ macosx \ src \ doc \ man \ po \ etc \ $(HELPDIR) EXTRA_DIST = \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ gnome-doc-utils.make \ m4 CLEANFILES = \ intltool-extract \ intltool-merge \ intltool-update DISTCLEANFILES = *~ all: amide_config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): amide_config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/amide_config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status amide_config.h $(srcdir)/amide_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f amide_config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile amide_config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: amide-1.0.5/config.guess0000755000175000017500000013036112235260752014774 0ustar loeningloening#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: