[med-svn] [mialmpick] 01/04: Imported Upstream version 0.2.10
Gert Wollny
gert-guest at alioth.debian.org
Mon Oct 21 10:36:45 UTC 2013
This is an automated email from the git hooks/post-receive script.
gert-guest pushed a commit to branch master
in repository mialmpick.
commit 469dbdd32566ebc36e1db9e105455c05fcae7459
Author: Gert Wollny <gw.fossdev at gmail.com>
Date: Fri Oct 18 13:03:13 2013 +0200
Imported Upstream version 0.2.10
---
ChangeLog | 8 ++++++++
config.guess | 26 ++++++++++++-------------
config.sub | 52 +++++++++++++++++++++++++------------------------
configure | 40 ++++++++++++++++++-------------------
configure.ac | 4 ++--
mia-lmpick.desktop.in | 2 +-
po/de.gmo | Bin 4374 -> 4374 bytes
po/de.po | 2 +-
po/mialmpick.pot | 4 ++--
src/glview.c | 49 ++++++++++++++++++++--------------------------
src/glvolume.c | 21 ++++++++++----------
src/load_vista.c | 9 +++++++++
src/main.c | 5 ++++-
13 files changed, 117 insertions(+), 105 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0f2a773..c00c131 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-10-02 Gert Wollny <gw.fossdev at gmail.com>
+
+ * Version bump to 0.2.10
+ * Replace deprecated glib calls, Closes #1
+ * Add keywords to desktop file, Closes #2
+ * Load and apply the voxel scale values, Closes #3
+
+
2013-05-16 Gert Wollny <gw.fossdev at gmail.com>
* Version bump to 0.2.9
diff --git a/config.guess b/config.guess
index e435ace..8905e54 100755
--- a/config.guess
+++ b/config.guess
@@ -2,13 +2,13 @@
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# 2011, 2012, 2013 Free Software Foundation, Inc.
-timestamp='2012-09-25'
+timestamp='2012-12-30'
# 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 2 of the License, or
+# 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
@@ -22,19 +22,17 @@ timestamp='2012-09-25'
# 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 Per Bothner. Please send patches (context
-# diff format) to <config-patches at gnu.org> and include a ChangeLog
-# entry.
+# 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").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# 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 at gnu.org.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -55,8 +53,8 @@ GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+2012, 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."
diff --git a/config.sub b/config.sub
index 14e1805..de08881 100755
--- a/config.sub
+++ b/config.sub
@@ -2,23 +2,19 @@
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# 2011, 2012, 2013 Free Software Foundation, Inc.
-timestamp='2012-10-10'
+timestamp='2013-01-11'
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# 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 2 of the License, or
+# 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.
+# 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 <http://www.gnu.org/licenses/>.
@@ -26,11 +22,12 @@ timestamp='2012-10-10'
# 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.
+# 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 to <config-patches at gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -74,8 +71,8 @@ version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+2012, 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."
@@ -259,8 +256,10 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | be32 | be64 \
+ | arc \
+ | 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 | dvp \
@@ -291,6 +290,7 @@ case $basic_machine in
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
@@ -408,6 +408,7 @@ case $basic_machine in
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
@@ -1042,7 +1043,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -1369,7 +1374,7 @@ case $os in
-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* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1515,9 +1520,6 @@ case $os in
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
diff --git a/configure b/configure
index ce2fcda..d8abf59 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for mialmpick 0.2.9.
+# Generated by GNU Autoconf 2.69 for mialmpick 0.2.10.
#
# Report bugs to <gw.fossdev at gmail.com>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='mialmpick'
PACKAGE_TARNAME='mialmpick'
-PACKAGE_VERSION='0.2.9'
-PACKAGE_STRING='mialmpick 0.2.9'
+PACKAGE_VERSION='0.2.10'
+PACKAGE_STRING='mialmpick 0.2.10'
PACKAGE_BUGREPORT='gw.fossdev at gmail.com'
PACKAGE_URL=''
@@ -1316,7 +1316,7 @@ 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 mialmpick 0.2.9 to adapt to many kinds of systems.
+\`configure' configures mialmpick 0.2.10 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1386,7 +1386,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mialmpick 0.2.9:";;
+ short | recursive ) echo "Configuration of mialmpick 0.2.10:";;
esac
cat <<\_ACEOF
@@ -1497,7 +1497,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-mialmpick configure 0.2.9
+mialmpick configure 0.2.10
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1799,7 +1799,7 @@ 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 mialmpick $as_me 0.2.9, which was
+It was created by mialmpick $as_me 0.2.10, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2624,7 +2624,7 @@ fi
# Define the identity of the package.
PACKAGE='mialmpick'
- VERSION='0.2.9'
+ VERSION='0.2.10'
cat >>confdefs.h <<_ACEOF
@@ -5622,7 +5622,7 @@ fi
#AM_PROG_LIBTOOL
-MIALMPICK_VERSION=0.2.9
+MIALMPICK_VERSION=0.2.10
@@ -5778,12 +5778,12 @@ if test -n "$GNOME_CFLAGS"; then
pkg_cv_GNOME_CFLAGS="$GNOME_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 mialm >= 1.0.7 libvistaio >= 1.2.14\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 mialm >= 1.0.7 libvistaio >= 1.2.14") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 >= 2.32.0 mialm >= 1.0.7 libvistaio >= 1.2.14\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 >= 2.32.0 mialm >= 1.0.7 libvistaio >= 1.2.14") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GNOME_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 mialm >= 1.0.7 libvistaio >= 1.2.14" 2>/dev/null`
+ pkg_cv_GNOME_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 >= 2.32.0 mialm >= 1.0.7 libvistaio >= 1.2.14" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -5795,12 +5795,12 @@ if test -n "$GNOME_LIBS"; then
pkg_cv_GNOME_LIBS="$GNOME_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 mialm >= 1.0.7 libvistaio >= 1.2.14\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 mialm >= 1.0.7 libvistaio >= 1.2.14") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 >= 2.32.0 mialm >= 1.0.7 libvistaio >= 1.2.14\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 >= 2.32.0 mialm >= 1.0.7 libvistaio >= 1.2.14") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GNOME_LIBS=`$PKG_CONFIG --libs "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 mialm >= 1.0.7 libvistaio >= 1.2.14" 2>/dev/null`
+ pkg_cv_GNOME_LIBS=`$PKG_CONFIG --libs "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 >= 2.32.0 mialm >= 1.0.7 libvistaio >= 1.2.14" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -5821,14 +5821,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- GNOME_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 mialm >= 1.0.7 libvistaio >= 1.2.14" 2>&1`
+ GNOME_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 >= 2.32.0 mialm >= 1.0.7 libvistaio >= 1.2.14" 2>&1`
else
- GNOME_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 mialm >= 1.0.7 libvistaio >= 1.2.14" 2>&1`
+ GNOME_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 >= 2.32.0 mialm >= 1.0.7 libvistaio >= 1.2.14" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GNOME_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 mialm >= 1.0.7 libvistaio >= 1.2.14) were not met:
+ as_fn_error $? "Package requirements (libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 >= 2.32.0 mialm >= 1.0.7 libvistaio >= 1.2.14) were not met:
$GNOME_PKG_ERRORS
@@ -8626,7 +8626,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by mialmpick $as_me 0.2.9, which was
+This file was extended by mialmpick $as_me 0.2.10, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8692,7 +8692,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-mialmpick config.status 0.2.9
+mialmpick config.status 0.2.10
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index d2deb30..9c372c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ dnl
m4_define([mialmpick_major_version], [0])
m4_define([mialmpick_minor_version], [2])
-m4_define([mialmpick_micro_version], [9])
+m4_define([mialmpick_micro_version], [10])
m4_define([mialmpick_version],
[mialmpick_major_version.mialmpick_minor_version.mialmpick_micro_version])
@@ -44,7 +44,7 @@ AC_SUBST(MIALMPICK_VERSION)
AM_MAINTAINER_MODE
-PKG_CHECK_MODULES(GNOME, libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 mialm >= 1.0.7 libvistaio >= 1.2.14)
+PKG_CHECK_MODULES(GNOME, libgnomeui-2.0 gtkglext-1.0 libpng gtk+-2.0 libglade-2.0 gthread-2.0 >= 2.32.0 mialm >= 1.0.7 libvistaio >= 1.2.14)
AC_SUBST(GNOME_LIBS)
AC_SUBST(GNOME_LIBS)
AC_SUBST(GNOME_CFLAGS)
diff --git a/mia-lmpick.desktop.in b/mia-lmpick.desktop.in
index c15e4c9..c792928 100644
--- a/mia-lmpick.desktop.in
+++ b/mia-lmpick.desktop.in
@@ -6,4 +6,4 @@ Exec=mia-lmpick
Icon=@PACKAGE_PIXMAPS_DIR@/
Terminal=false
Type=Application
-Keywords=visualization volume landmarks
+Keywords=medical;images;visualization
\ No newline at end of file
diff --git a/po/de.gmo b/po/de.gmo
index deb59b1..9234d47 100644
Binary files a/po/de.gmo and b/po/de.gmo differ
diff --git a/po/de.po b/po/de.po
index 2ce7acd..96fb320 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: gw.fossdev at gmail.com\n"
-"POT-Creation-Date: 2013-05-16 12:57+0200\n"
+"POT-Creation-Date: 2013-10-17 18:48+0200\n"
"PO-Revision-Date: 2004-02-04 18:24+0100\n"
"Last-Translator: Gert Wollny <wollny at cbs.mpg.de>\n"
"Language-Team: German <de at li.org>\n"
diff --git a/po/mialmpick.pot b/po/mialmpick.pot
index b68b341..0e78453 100644
--- a/po/mialmpick.pot
+++ b/po/mialmpick.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: mialmpick 0.2.9\n"
+"Project-Id-Version: mialmpick 0.2.10\n"
"Report-Msgid-Bugs-To: gw.fossdev at gmail.com\n"
-"POT-Creation-Date: 2013-05-16 12:57+0200\n"
+"POT-Creation-Date: 2013-10-17 18:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
diff --git a/src/glview.c b/src/glview.c
index a9456b3..cbdb79c 100644
--- a/src/glview.c
+++ b/src/glview.c
@@ -60,8 +60,8 @@ enum _Commands { es_init,
};
typedef struct {
- GMutex *mutex;
- GCond *cond;
+ GMutex mutex;
+ GCond cond;
gboolean free;
} AccessStruc;
@@ -100,7 +100,7 @@ struct _MiauiGLView {
MiaQuaternion *rot_helper;
gboolean zoomin_enabled;
gboolean abort_rendering;
- GMutex *abort_rendering_mutex;
+ GMutex abort_rendering_mutex;
/* Landmark picking */
GtkWidget *landmark_menu;
@@ -421,30 +421,30 @@ __send (MiauiGLView * self, Commands command, gpointer data)
static void
__access_free (AccessStruc * ac)
{
- g_mutex_lock (ac->mutex);
+ g_mutex_lock (&ac->mutex);
ac->free = TRUE;
- g_cond_signal (ac->cond);
+ g_cond_signal (&ac->cond);
g_debug("thread %p: free lock %p", g_thread_self(), ac);
- g_mutex_unlock (ac->mutex);
+ g_mutex_unlock (&ac->mutex);
}
static void
__access_unfree (AccessStruc * ac)
{
- g_mutex_lock (ac->mutex);
+ g_mutex_lock (&ac->mutex);
g_debug("thread %p: unfree lock %p", g_thread_self(), ac);
ac->free = FALSE;
- g_mutex_unlock (ac->mutex);
+ g_mutex_unlock (&ac->mutex);
}
static void
__access_waitfree (AccessStruc * ac)
{
- g_mutex_lock (ac->mutex);
+ g_mutex_lock (&ac->mutex);
g_debug("thread %p: wait for %p", g_thread_self(), ac);
while (ac->free == FALSE)
- g_cond_wait (ac->cond, ac->mutex);
- g_mutex_unlock (ac->mutex);
+ g_cond_wait (&ac->cond, &ac->mutex);
+ g_mutex_unlock (&ac->mutex);
}
static void
@@ -462,9 +462,9 @@ __send_wait (MiauiGLView * self, AccessStruc * ac,
static void
__abort_rendering(MiauiGLView * self)
{
- g_mutex_lock(self->abort_rendering_mutex);
+ g_mutex_lock(&self->abort_rendering_mutex);
self->abort_rendering = TRUE;
- g_mutex_unlock(self->abort_rendering_mutex);
+ g_mutex_unlock(&self->abort_rendering_mutex);
}
gboolean
@@ -473,10 +473,10 @@ miaui_glview_check_abort_rendering(MiauiGLView *self)
gboolean retval;
if (!self->use_low)
return FALSE;
- g_mutex_lock(self->abort_rendering_mutex);
+ g_mutex_lock(&self->abort_rendering_mutex);
retval = self->abort_rendering;
self->abort_rendering = FALSE;
- g_mutex_unlock(self->abort_rendering_mutex);
+ g_mutex_unlock(&self->abort_rendering_mutex);
return retval;
}
@@ -805,12 +805,12 @@ __miaui_glview_instance_init (GTypeInstance * instance, gpointer UNUSED(g_class)
self->signal_queue = g_async_queue_new ();
g_async_queue_ref (self->signal_queue);
- self->view_access.mutex = g_mutex_new ();
- self->view_access.cond = g_cond_new ();
+ g_mutex_init(&self->view_access.mutex);
+ g_cond_init(&self->view_access.cond);
self->view_access.free = TRUE;
- self->data_access.mutex = g_mutex_new ();
- self->data_access.cond = g_cond_new ();
+ g_mutex_init(&self->data_access.mutex);
+ g_cond_init(&self->data_access.cond);
self->data_access.free = TRUE;
self->rotation_center = mia_vector3d_new(1,1,1);
@@ -819,8 +819,7 @@ __miaui_glview_instance_init (GTypeInstance * instance, gpointer UNUSED(g_class)
/* create the GL thread, this also sets the GL capability */
self->gl_thread =
- g_thread_create ((GThreadFunc) __glview_job, self,
- TRUE, NULL);
+ g_thread_new ("renderthread", (GThreadFunc) __glview_job, self);
/* wait for the worker thread to be created */
__access_waitfree(&self->view_access);
@@ -882,7 +881,7 @@ __miaui_glview_instance_init (GTypeInstance * instance, gpointer UNUSED(g_class)
self->l_mouse_dragging = FALSE;
self->abort_rendering = FALSE;
- self->abort_rendering_mutex = g_mutex_new();
+ g_mutex_init(&self->abort_rendering_mutex);
self->use_low = TRUE;
@@ -962,14 +961,8 @@ __miaui_glview_finalize (GObject * obj)
{
MiauiGLViewClass *klass;
GObjectClass *parent_class;
- MiauiGLView *self = (MiauiGLView *) obj;
/* add your destruction code here */
- g_mutex_free (self->view_access.mutex);
- g_cond_free (self->view_access.cond);
-
- g_mutex_free (self->data_access.mutex);
- g_cond_free (self->data_access.cond);
/* chain up to the parent class */
klass = MIAUI_GLVIEW_CLASS (g_type_class_peek (MIAUI_TYPE_GLVIEW));
diff --git a/src/glvolume.c b/src/glvolume.c
index ef36566..745eb6f 100644
--- a/src/glvolume.c
+++ b/src/glvolume.c
@@ -62,7 +62,7 @@ struct _MiaGLVolume {
gfloat sx, sy, sz;
gfloat *pixels;
- GMutex *pixel_mutex;
+ GMutex pixel_mutex;
};
static GObject *__mia_glvolume_constructor (GType type,
@@ -160,10 +160,10 @@ MiaVector3d *mia_glvolume_set_volume(MiaGLVolume *self, MiaImage3d *image)
/*pending = mia_image3d_crop_pow2(image, max_texture_size);*/
/* reuse possibly allocated image */
- g_mutex_lock(self->pixel_mutex);
+ g_mutex_lock(&self->pixel_mutex);
pixels = self->pixels;
self->pixels = NULL;
- g_mutex_unlock(self->pixel_mutex);
+ g_mutex_unlock(&self->pixel_mutex);
if (!pixels)
@@ -215,9 +215,9 @@ MiaVector3d *mia_glvolume_set_volume(MiaGLVolume *self, MiaImage3d *image)
g_object_unref(pending);
/* Data copied, make it available */
- g_mutex_lock(self->pixel_mutex);
+ g_mutex_lock(&self->pixel_mutex);
self->pixels = pixels;
- g_mutex_unlock(self->pixel_mutex);
+ g_mutex_unlock(&self->pixel_mutex);
g_message("Center @ %f %f %f", self->sx, self->sy, self->sz);
return mia_vector3d_new(self->sx, self->sy, self->sz);
@@ -290,7 +290,7 @@ __mia_glvolume_instance_init (GTypeInstance * instance, gpointer UNUSED(g_class)
MiaGLVolume *self = (MiaGLVolume *) instance;
self->dispose_has_run = FALSE;
self->pixels = NULL;
- self->pixel_mutex = g_mutex_new();
+ g_mutex_init(&self->pixel_mutex);
drawable->is_transparent = FALSE;
}
@@ -354,7 +354,6 @@ __mia_glvolume_finalize (GObject * obj)
/* add your destruction code here */
if (self->pixels)
g_free(self->pixels);
- g_mutex_free(self->pixel_mutex);
/* chain up to the parent class */
@@ -454,7 +453,7 @@ __gl_attach (MiaGLDrawable * obj)
return;
}
- g_mutex_lock(self->pixel_mutex);
+ g_mutex_lock(&self->pixel_mutex);
if (self->pixels)
__mia_glvolume_set_volume(self);
@@ -519,7 +518,7 @@ __gl_attach (MiaGLDrawable * obj)
g_warning ("get 'alpha_discard': error %s", gluErrorString (error));
- g_mutex_unlock(self->pixel_mutex);
+ g_mutex_unlock(&self->pixel_mutex);
obj->is_attached = TRUE;
obj->is_visible = TRUE;
@@ -768,10 +767,10 @@ __initialize(MiaGLDrawable *obj)
MiaGLVolume *self = MIA_GLVOLUME (obj);
if (!obj->is_attached)
return;
- g_mutex_lock(self->pixel_mutex);
+ g_mutex_lock(&self->pixel_mutex);
if (self->pixels)
__mia_glvolume_set_volume(self);
- g_mutex_unlock(self->pixel_mutex);
+ g_mutex_unlock(&self->pixel_mutex);
}
diff --git a/src/load_vista.c b/src/load_vista.c
index cab2ff2..67a28d2 100644
--- a/src/load_vista.c
+++ b/src/load_vista.c
@@ -59,8 +59,10 @@ static VistaIOImage get_first_image(const char *file_name)
MiaImage3d *load_vista_image(const char *filename)
{
+ VistaIOStringConst voxel_size = NULL;
VistaIOImage img = NULL;
MiaImage3d *result = NULL;
+ float sx,sy,sz;
img = get_first_image(filename);
if (!img)
@@ -78,6 +80,13 @@ MiaImage3d *load_vista_image(const char *filename)
default:
g_warning("Input type not supported");
}
+
+ VistaIOGetAttr( VistaIOImageAttrList(img), "voxel", NULL, VistaIOStringRepn, &voxel_size);
+ if (sscanf(voxel_size, "%f %f %f", &sx, &sy, &sz) == 3) {
+ mia_image3d_set_scales(result, sx, sy, sz);
+ }
+
+
VistaIODestroyImage(img);
return result;
}
diff --git a/src/main.c b/src/main.c
index 69f0907..7f144ba 100644
--- a/src/main.c
+++ b/src/main.c
@@ -76,9 +76,12 @@ int main (int argc, char *argv[])
{ NULL, 0, 0, NULL, 0, 0, 0 }
};
-/* XInitThreads(); */
+#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 36
g_type_init();
+#endif
+/*
g_thread_init(NULL);
+*/
XInitThreads();
gdk_threads_init();
--
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/mialmpick.git
More information about the debian-med-commit
mailing list