Commit b054cfeb authored by jcfr's avatar jcfr
Browse files

COMP: Rename Slicer3_HOME into Slicer_HOME

git-svn-id: http://svn.slicer.org/Slicer4/trunk@15097 3bd1e089-480b-0410-8dfb-8563597acbee
parent 804208c8
......@@ -5,8 +5,8 @@
set CLP "HelloWorld"
set cpath "${CLP}.jar"
if {[info exists ::env(Slicer3_HOME)] == 1} {
set cpath "$::env(Slicer3_HOME)/lib/Slicer3/Plugins/${CLP}.jar"
if {[info exists ::env(Slicer_HOME)] == 1} {
set cpath "$::env(Slicer_HOME)/lib/Slicer3/Plugins/${CLP}.jar"
}
if {[file exists $cpath] == 0} {
# try guessing on a location next to this script
......
......@@ -6,9 +6,9 @@ set CLP "SPECTRE"
# set the path to the MIPAV install directory
# set the full path to the SPECTRE plugins directory
if {[info exists ::env(Slicer3_HOME)] == 1} {
set pathToMipav "$::env(Slicer3_HOME)/../Slicer3/Applications/CLI/Java/SPECTRE/mipav"
set pathToSPECTREPlugins "$::env(Slicer3_HOME)/lib/Slicer3/Plugins/SPECTRE_2010-04-01.jar"
if {[info exists ::env(Slicer_HOME)] == 1} {
set pathToMipav "$::env(Slicer_HOME)/../Slicer3/Applications/CLI/Java/SPECTRE/mipav"
set pathToSPECTREPlugins "$::env(Slicer_HOME)/lib/Slicer3/Plugins/SPECTRE_2010-04-01.jar"
} else {
set pathToMipav "/projects/birn/nicole/Slicer3VTKHead/Slicer3/Applications/CLI/Java/SPECTRE/mipav"
set pathToSPECTREPlugins "/projects/birn/nicole/Slicer3FC10/Slicer3/Applications/CLI/Java/SPECTRE_2010-04-01.jar"
......
......@@ -31,7 +31,7 @@ set(TEST_DATA "${Slicer3_SOURCE_DIR}/Testing/Data/Input")
set(MRML_TEST_DATA "${Slicer3_SOURCE_DIR}/Libs/MRML/Testing/TestData")
set(TEMP "${Slicer3_BINARY_DIR}/Testing/Temporary")
set(MRML_DATA "${Slicer3_HOME}/share/MRML/Testing/TestData")
set(MRML_DATA "${Slicer_HOME}/share/MRML/Testing/TestData")
add_test(N4ITKBiasFieldCorrection ${Slicer3_EXE} --launch N4ITKBiasFieldCorrectionTest
--compare ${BASELINE}/he3corrected.nii.gz ${TEMP}/he3corrected.nii.gz
......
......@@ -3,8 +3,8 @@ set ::thisDebug 0
proc SparseFieldLevelSetContourTest { {modelFile ""} {outputModelFile ""} {baselineModelFile ""}} {
if {$modelFile == ""} {
if {[info exists ::env(Slicer3_HOME)] == 1} {
set sourcePath $::env(Slicer3_HOME)/../Slicer3
if {[info exists ::env(Slicer_HOME)] == 1} {
set sourcePath $::env(Slicer_HOME)/../Slicer3
}
set modelFile "${sourcePath}/Testing/Data/Input/SparseFieldLevelSetContourTest.vtp"
}
......@@ -208,9 +208,9 @@ update
if {$argc == 0} {
# when use source into tkcon
set modelFile $::env(Slicer3_HOME)/../Slicer3/Testing/Data/Input/SparseFieldLevelSetContourTest.vtp
set modelOutputFile $::env(Slicer3_HOME)/Testing/Temporary/SparseFieldLevelSetContourTest.vtp
set baselineModelFile $::env(Slicer3_HOME)/../Slicer3/Testing/Data/Baseline/CLI/SparseFieldLevelSetContourTest.vtp
set modelFile $::env(Slicer_HOME)/../Slicer3/Testing/Data/Input/SparseFieldLevelSetContourTest.vtp
set modelOutputFile $::env(Slicer_HOME)/Testing/Temporary/SparseFieldLevelSetContourTest.vtp
set baselineModelFile $::env(Slicer_HOME)/../Slicer3/Testing/Data/Baseline/CLI/SparseFieldLevelSetContourTest.vtp
# set modelFile /spl/tmp/nicole/cube.vtp
# set modelOutputFile /spl/tmp/nicole/cubeOut.vtp
......
......@@ -41,7 +41,7 @@ set(TEST_DATA "${Slicer3_SOURCE_DIR}/Testing/Data/Input")
set(MRML_TEST_DATA "${Slicer3_SOURCE_DIR}/Libs/MRML/Testing/TestData")
set(TEMP "${Slicer3_BINARY_DIR}/Testing/Temporary")
set(MRML_DATA "${Slicer3_HOME}/share/MRML/Testing/TestData")
set(MRML_DATA "${Slicer_HOME}/share/MRML/Testing/TestData")
# OrientImage tests
add_test(OrientImageTest1 ${Launcher_Command} ${TestLocation}OrientImageTest
......
......@@ -35,11 +35,11 @@ if(BUILD_SHARED_LIBS)
"\"../lib/TclTk/bin\",\"../lib/TclTk/lib/itcl${INCR_TCL_VERSION_DOT}\",\"../lib/TclTk/lib/itk${INCR_TCL_VERSION_DOT}\"")
if(Slicer_BUILD_MODULES)
set(Slicer3_FORWARD_PATH_BUILD
"${Slicer3_FORWARD_PATH_BUILD},\"${Slicer3_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\" CONFIG_DIR_POST")
"${Slicer3_FORWARD_PATH_BUILD},\"${Slicer_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\" CONFIG_DIR_POST")
endif(Slicer_BUILD_MODULES)
if(Slicer_BUILD_CLI)
set(Slicer3_FORWARD_PATH_BUILD
"${Slicer3_FORWARD_PATH_BUILD},\"${Slicer3_HOME}/${Slicer_INSTALL_PLUGINS_BIN_DIR}\" CONFIG_DIR_POST")
"${Slicer3_FORWARD_PATH_BUILD},\"${Slicer_HOME}/${Slicer_INSTALL_PLUGINS_BIN_DIR}\" CONFIG_DIR_POST")
endif(Slicer_BUILD_CLI)
else(WIN32)
set(Slicer3_FORWARD_PATH_BUILD
......@@ -48,11 +48,11 @@ if(BUILD_SHARED_LIBS)
"\"../${Slicer_INSTALL_LIB_DIR}\",\"../lib/vtk-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}\",\"../lib/KWWidgets\",\"../lib/InsightToolkit\",\"../lib/Teem-${Teem_VERSION_MAJOR}.${Teem_VERSION_MINOR}\",\"../lib/TclTk/lib\",\"../lib/TclTk/lib/itcl${INCR_TCL_VERSION_DOT}\",\"../lib/TclTk/lib/itk${INCR_TCL_VERSION_DOT}\",\"../lib/FreeSurfer\",\"../lib/IGT\",\"../lib/ITKCommandIO\",\"../lib/LoadableModule\",\"../lib/MGHImageIO\",\"../lib/MRML\",\"../lib/ModuleDescriptionParser\",\"../lib/MRMLIDImageIO\",\"../lib/Qdec\",\"../lib/RemoteIO\",\"../lib/SlicerIO\",\"../lib/tclap\",\"../lib/vtkITK\",\"../lib/vtkTeem\"")
if(Slicer_BUILD_MODULES)
set(Slicer3_FORWARD_PATH_BUILD
"${Slicer3_FORWARD_PATH_BUILD},\"${Slicer3_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\"")
"${Slicer3_FORWARD_PATH_BUILD},\"${Slicer_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\"")
endif(Slicer_BUILD_MODULES)
if(Slicer_BUILD_CLI)
set(Slicer3_FORWARD_PATH_BUILD
"${Slicer3_FORWARD_PATH_BUILD},\"${Slicer3_HOME}/${Slicer_INSTALL_PLUGINS_BIN_DIR}\"")
"${Slicer3_FORWARD_PATH_BUILD},\"${Slicer_HOME}/${Slicer_INSTALL_PLUGINS_BIN_DIR}\"")
endif(Slicer_BUILD_CLI)
endif(WIN32)
if(Slicer_BUILD_MODULES)
......
......@@ -438,13 +438,13 @@ int Slicer3_main(int& argc, char *argv[])
slicerBinDir = vtksys::SystemTools::CollapseFullPath(slicerBinDir.c_str());
// set the Slicer3_HOME variable if it doesn't already exist from the launcher
// set the Slicer_HOME variable if it doesn't already exist from the launcher
vtksys_stl::string slicerHome;
if ( !vtksys::SystemTools::GetEnv("Slicer3_HOME", slicerHome) )
if ( !vtksys::SystemTools::GetEnv("Slicer_HOME", slicerHome) )
{
slicerHome = slicerBinDir + "/..";
slicerHome = vtksys::SystemTools::CollapseFullPath(slicerHome.c_str());
std::string homeEnv = "Slicer3_HOME=" + slicerHome;
std::string homeEnv = "Slicer_HOME=" + slicerHome;
cout << "Set environment: " << homeEnv.c_str() << endl;
vtkKWApplication::PutEnv(const_cast <char *> (homeEnv.c_str()));
}
......@@ -612,12 +612,12 @@ int Slicer3_main(int& argc, char *argv[])
// TODO: get rid of fixed size buffer
char cmd[2048];
// Make sure Slicer3_HOME is available
// Make sure Slicer_HOME is available
sprintf(cmd, "set ::env(Slicer3_HOME) {%s};", slicerHome.c_str());
sprintf(cmd, "set ::env(Slicer_HOME) {%s};", slicerHome.c_str());
Slicer3_Tcl_Eval(interp, cmd);
sprintf(cmd, "set ::Slicer3_HOME {%s};", slicerHome.c_str());
sprintf(cmd, "set ::Slicer_HOME {%s};", slicerHome.c_str());
Slicer3_Tcl_Eval(interp, cmd);
// Tell KWWidgets to make names like .vtkKWPushButton10 instead of .10
......
......@@ -18,8 +18,8 @@ add_test(Slicer3ScrollTest ${Slicer3_BINARY_DIR}/Slicer3 --test-mode --script ${
# --------------------------------------------------------------------------
# MRML Tests
#
add_test(Slicer3MRMLUndo ${Slicer3_BINARY_DIR}/Slicer3 --test-mode --no-splash -f ${Slicer3_HOME}/share/MRML/Testing/testUndo.tcl)
add_test(Slicer3MRMLVolume ${Slicer3_BINARY_DIR}/Slicer3 --test-mode --no-splash -f ${Slicer3_HOME}/share/MRML/Testing/testVolume.tcl)
add_test(Slicer3MRMLUndo ${Slicer3_BINARY_DIR}/Slicer3 --test-mode --no-splash -f ${Slicer_HOME}/share/MRML/Testing/testUndo.tcl)
add_test(Slicer3MRMLVolume ${Slicer3_BINARY_DIR}/Slicer3 --test-mode --no-splash -f ${Slicer_HOME}/share/MRML/Testing/testVolume.tcl)
# --------------------------------------------------------------------------
......
update
set scenes {volScene.mrml cube.mrml cube.mrml volScene.mrml}
foreach scene $scenes {
$::slicer3::MRMLScene SetURL $::Slicer3_HOME/share/MRML/Testing/$scene
$::slicer3::MRMLScene SetURL $::Slicer_HOME/share/MRML/Testing/$scene
$::slicer3::MRMLScene Connect
update
}
......
......@@ -3,14 +3,14 @@
update
vtkMRMLScene s
s SetURL $::Slicer3_HOME/share/MRML/Testing/vol_and_cube_camera.mrml
s SetURL $::Slicer_HOME/share/MRML/Testing/vol_and_cube_camera.mrml
s Connect
s Delete
update
update
$::slicer3::MRMLScene SetURL $::Slicer3_HOME/share/MRML/Testing/vol_and_cube_camera.mrml
$::slicer3::MRMLScene SetURL $::Slicer_HOME/share/MRML/Testing/vol_and_cube_camera.mrml
$::slicer3::MRMLScene Connect
update
......
......@@ -48,26 +48,26 @@ IF(BUILD_SHARED_LIBS)
IF(Slicer_BUILD_QTLOADABLEMODULES)
SET(SlicerQT_FORWARD_PATH_BUILD
"${SlicerQT_FORWARD_PATH_BUILD}, \\
\"${Slicer3_HOME}/${Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR}\" CONFIG_DIR_POST")
\"${Slicer_HOME}/${Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR}\" CONFIG_DIR_POST")
SET(SlicerQT_FORWARD_PATH_INSTALL
"\"../${Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR}\"")
# Since ModuleLogic are in Slicer_INSTALL_MODULES_BIN_DIR, let's add it
SET(Slicer3_FORWARD_PATH_BUILD
"${Slicer3_FORWARD_PATH_BUILD}, \\
\"${Slicer3_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\" CONFIG_DIR_POST")
\"${Slicer_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\" CONFIG_DIR_POST")
ENDIF(Slicer_BUILD_QTLOADABLEMODULES)
#IF(Slicer_BUILD_MODULES)
# SET(Slicer3_FORWARD_PATH_BUILD
# "${Slicer3_FORWARD_PATH_BUILD},\"${Slicer3_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\" CONFIG_DIR_POST")
# "${Slicer3_FORWARD_PATH_BUILD},\"${Slicer_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\" CONFIG_DIR_POST")
#ENDIF(Slicer_BUILD_MODULES)
IF(Slicer_BUILD_CLI)
SET(SlicerQT_FORWARD_PATH_BUILD
"${SlicerQT_FORWARD_PATH_BUILD}, \\
\"${Slicer3_HOME}/${Slicer_INSTALL_PLUGINS_BIN_DIR}\" CONFIG_DIR_POST")
\"${Slicer_HOME}/${Slicer_INSTALL_PLUGINS_BIN_DIR}\" CONFIG_DIR_POST")
ENDIF(Slicer_BUILD_CLI)
ELSE(WIN32)
......@@ -114,7 +114,7 @@ IF(BUILD_SHARED_LIBS)
IF(Slicer_BUILD_QTLOADABLEMODULES)
SET(SlicerQT_FORWARD_PATH_BUILD
"${SlicerQT_FORWARD_PATH_BUILD}, \\
\"${Slicer3_HOME}/${Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR}\"")
\"${Slicer_HOME}/${Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR}\"")
SET(SlicerQT_FORWARD_PATH_INSTALL
"${SlicerQT_FORWARD_PATH_INSTALL}, \\
\"../${Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR}\"")
......@@ -122,19 +122,19 @@ IF(BUILD_SHARED_LIBS)
# Since ModuleLogic are in Slicer_INSTALL_MODULES_BIN_DIR, let's add it
SET(Slicer3_FORWARD_PATH_BUILD
"${Slicer3_FORWARD_PATH_BUILD}, \\
\"${Slicer3_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\"")
\"${Slicer_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\"")
ENDIF(Slicer_BUILD_QTLOADABLEMODULES)
#IF(Slicer_BUILD_MODULES)
# SET(Slicer3_FORWARD_PATH_BUILD
# "${Slicer3_FORWARD_PATH_BUILD},\"${Slicer3_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\"")
# "${Slicer3_FORWARD_PATH_BUILD},\"${Slicer_HOME}/${Slicer_INSTALL_MODULES_BIN_DIR}\"")
#ENDIF(Slicer_BUILD_MODULES)
IF(Slicer_BUILD_CLI)
SET(SlicerQT_FORWARD_PATH_BUILD
"${SlicerQT_FORWARD_PATH_BUILD}, \\
\"${Slicer3_HOME}/${Slicer_INSTALL_PLUGINS_BIN_DIR}\"")
\"${Slicer_HOME}/${Slicer_INSTALL_PLUGINS_BIN_DIR}\"")
ENDIF(Slicer_BUILD_CLI)
ENDIF(WIN32)
......@@ -498,8 +498,8 @@ INSTALL(TARGETS SlicerQT${SlicerQT_EXE_SUFFIX}
# --------------------------------------------------------------------------
# MRML Tests
#
# add_test(Slicer3MRMLUndo ${Slicer3_BINARY_DIR}/Slicer3 --test-mode --no-splash -f ${Slicer3_HOME}/share/MRML/Testing/testUndo.tcl)
# add_test(Slicer3MRMLVolume ${Slicer3_BINARY_DIR}/Slicer3 --test-mode --no-splash -f ${Slicer3_HOME}/share/MRML/Testing/testVolume.tcl)
# add_test(Slicer3MRMLUndo ${Slicer3_BINARY_DIR}/Slicer3 --test-mode --no-splash -f ${Slicer_HOME}/share/MRML/Testing/testUndo.tcl)
# add_test(Slicer3MRMLVolume ${Slicer3_BINARY_DIR}/Slicer3 --test-mode --no-splash -f ${Slicer_HOME}/share/MRML/Testing/testVolume.tcl)
# --------------------------------------------------------------------------
# Testing
......
......@@ -271,6 +271,6 @@ proc ::ColorTree::vtkColorToHex {color} {
proc cccccc {} {
itcl::delete class ColorTree
source $::env(Slicer3_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl/ColorTree.tcl
source $::env(Slicer_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl/ColorTree.tcl
::ColorTree::ShowDialog
}
......@@ -17,7 +17,7 @@
#
# this should be launched from within slicer as
#
# $::env(TCL_DIR)/bin/wish8.4 $::env(Slicer3_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl/ExternalProgress.tcl
# $::env(TCL_DIR)/bin/wish8.4 $::env(Slicer_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl/ExternalProgress.tcl
#
# - see launch.tcl.in for how platform specific variations map to these environment variables
......@@ -27,8 +27,8 @@ package require Tk
# slicer (build version or install version). Cut and paste commands to test
proc progress_Test {} {
set wish $::env(TCL_DIR)/bin/wish8.4
set script $::env(Slicer3_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl/ExternalProgress.tcl
set script $::env(Slicer3_HOME)/../Slicer3/Base/GUI/Tcl/ExternalProgress.tcl
set script $::env(Slicer_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl/ExternalProgress.tcl
set script $::env(Slicer_HOME)/../Slicer3/Base/GUI/Tcl/ExternalProgress.tcl
set fp [open "| $wish" "w"]
puts $fp "source $script"; flush $fp
for {set prog 0} {$prog < 100} {incr prog 1} {
......
......@@ -471,7 +471,7 @@ itcl::body SWidget::getInAnySliceSWidget { } {
proc sssss {} {
itcl::delete class SWidget
set dir $::env(Slicer3_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl
set dir $::env(Slicer_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl
source $dir/SWidget.tcl
foreach sw [glob $dir/*SWidget.tcl] {
source $sw
......
......@@ -497,7 +497,7 @@ proc SlicePlaneSWidget::Dot { x y } {
proc TestSlicePlaneSWidget {} {
itcl::delete class SlicePlaneSWidget
source $::Slicer3_HOME/lib/Slicer3/SlicerBaseGUI/Tcl/SlicePlaneSWidget.tcl
source $::Slicer_HOME/lib/Slicer3/SlicerBaseGUI/Tcl/SlicePlaneSWidget.tcl
set sliceGUI [lindex [vtkSlicerSliceGUI ListInstances] 0]
SlicePlaneSWidget #auto $sliceGUI
......
proc TestRestoreSceneSnapshotCompareView {} {
# load the scene
$::slicer3::MRMLScene SetURL $::Slicer3_HOME/share/MRML/Testing/restoreSceneSnapshotCompareView.mrml
$::slicer3::MRMLScene SetURL $::Slicer_HOME/share/MRML/Testing/restoreSceneSnapshotCompareView.mrml
$::slicer3::MRMLScene Connect
# restore the snapshot
......
......@@ -37,7 +37,7 @@ $win Create
set sw [vtkKWScriptedWidget New]
$sw SetApplication $app
$sw SetParent $win
$sw SetInitializeCommand { source $::Slicer3_HOME/lib/Slicer3/SlicerBaseGUI/Tcl/ScriptedWidgetExample.tcl; ScriptedWidgetExampleInitialize }
$sw SetInitializeCommand { source $::Slicer_HOME/lib/Slicer3/SlicerBaseGUI/Tcl/ScriptedWidgetExample.tcl; ScriptedWidgetExampleInitialize }
$sw Create
......
......@@ -47,7 +47,7 @@ int vtkSlicerViewerTest( int argc, char *argv[] )
vtkMRMLScene* mrmlScene = vtkMRMLScene::New();
std::string testScene(vtksys::SystemTools::GetEnv("Slicer3_HOME"));
std::string testScene(vtksys::SystemTools::GetEnv("Slicer_HOME"));
testScene += "/share/MRML/Testing/vol_and_cube_camera.mrml";
mrmlScene->SetURL(testScene.c_str());
mrmlScene->Connect();
......
......@@ -4830,7 +4830,7 @@ void vtkSlicerApplicationGUI::SetExternalProgress(char *message, float progress)
// look for mac/linux style or windows style name for wish version 8.4 or 8.5
this->Script("catch {set wish_candidates [list $::env(TCL_DIR)/bin/wish8.4 $::env(TCL_DIR)/bin/wish84.exe $::env(TCL_DIR)/bin/wish8.5 $::env(TCL_DIR)/bin/wish85.exe]}");
this->Script("catch {foreach wc $wish_candidates {if { [file exists $wc] } {set extprog_wish $wc} } }");
this->Script("catch {set extprog_script $::env(Slicer3_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl/ExternalProgress.tcl}");
this->Script("catch {set extprog_script $::env(Slicer_HOME)/lib/Slicer3/SlicerBaseGUI/Tcl/ExternalProgress.tcl}");
this->Script("catch {set extprog_fp [open \"| $extprog_wish\" \"w\"]}");
this->Script("catch {puts $extprog_fp \"source $extprog_script\"; flush $extprog_fp}");
progress_initialized = 1;
......
......@@ -35,7 +35,7 @@ void vtkSlicerModulesWizardDialog::OK()
{
this->Superclass::OK();
this->Script("exec $::env(Slicer3_HOME)/Slicer3 &; $::slicer3::Application SetPromptBeforeExit 0; exit");
this->Script("exec $::env(Slicer_HOME)/Slicer3 &; $::slicer3::Application SetPromptBeforeExit 0; exit");
}
//----------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment