⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 itkwish

📁 InsightToolkit-1.4.0(有大量的优化算法程序)
💻
字号:
#!/bin/sh
#-----------------------------------------------------------------------------
# Program:   Insight Segmentation & Registration Toolkit
# Module:    $RCSfile: itkwish,v $
# Language:  C++
# Date:      $Date: 2003/09/10 14:30:12 $
# Version:   $Revision: 1.2 $
#
# Copyright (c) Insight Software Consortium. All rights reserved.
# See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
#
# Portions of this code are covered under the VTK copyright.
# See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
#
#    This software is distributed WITHOUT ANY WARRANTY; without even 
#    the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
#    PURPOSE.  See the above copyright notices for more information.
#-----------------------------------------------------------------------------

#
# This is a shell script driving the ITK Tcl wrapper executable.  It
# sets up the environment and then executes the real executable.
# Alternatively, if the first command line argument is "--run", the rest
# of the command line will be invoked as a command in the proper
# environment.
#
# The real executable is located relative to this script in
#   ../lib/InsightToolkit
#

ITKWISH_Usage()
{
  echo "Insight Segmentation & Registration Toolkit (http://www.itk.org)"
  echo "This is the Tcl wrapper executable driver."
  echo ""
  echo "Usage:"
  echo "  itkwish           = Run itkwish interactively as a Tcl interpreter."
  echo "  itkwish foo.tcl   = Run \"foo.tcl\" in the ITK Tcl interpreter."
  echo "  itkwish --run ... = Run command \"...\" in the itkwish environment."
  echo ""
  echo "Example commands:"
  echo "  \"itkwish\""
  echo "    Provides a tcl prompt "%" from which ITK scripts can be written"
  echo "    interactively."
  echo ""
  echo "  \"itkwish myITKScript.tcl\""
  echo "    Runs the myITKScript.tcl script in the ITK Tcl interpreter.."
  echo ""
  echo "  \"itkwish --run wish\""
  echo "    Runs wish in an environment in which the ITK packages can be"
  echo "    loaded with \"package require InsightToolkit\"."
}

ITKWISH_SELFDIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd`

if [ -d "${ITKWISH_SELFDIR}/../lib/InsightToolkit" ]; then : ; else
  ITKWISH_Usage
  echo ""
  echo "Error:"
  echo "  This script is meant to be used from an itk installation directory."
  echo "  It will not run from the itk source tree."
  exit 1
fi

ITKWISH_LIBDIR=`cd "${ITKWISH_SELFDIR}/../lib/InsightToolkit"; pwd`

# Setup environment.
case "`uname`" in
Darwin)
  if [ -z "$DYLD_LIBRARY_PATH" ]; then
    export DYLD_LIBRARY_PATH="$ITKWISH_LIBDIR"
  else
    export DYLD_LIBRARY_PATH="$ITKWISH_LIBDIR:$DYLD_LIBRARY_PATH"
  fi
  ;;
*)
  if [ -z "$LD_LIBRARY_PATH" ]; then
    export LD_LIBRARY_PATH="$ITKWISH_LIBDIR"
  else
    export LD_LIBRARY_PATH="$ITKWISH_LIBDIR:$LD_LIBRARY_PATH"
  fi
esac

if [ -z "$TCLLIBPATH" ]; then
  export TCLLIBPATH="\"$ITKWISH_LIBDIR\""
else
  export TCLLIBPATH="\"$ITKWISH_LIBDIR\" $TCLLIBPATH"
fi

if [ "$1" = "--help" ]; then
  # Display usage.
  ITKWISH_Usage
  exit
elif [ "$1" = "--run" ]; then
  # Skip the "--run" argument.
  shift
  # Run exact command line given after "--run" in this environment.
  exec "$@"
else
  # Run real itkwish executable in this environment.
  exec "${ITKWISH_LIBDIR}/itkwish" "$@"
fi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -