VtkMy development
vtkMy Installation
Apple
1. Install the code:
grab a copy from sodor/bonelab/software directory: vtkMy-osx.tar.bz2 create an /opt directory (if not already existing): $ sudo mkdir /opt copy vtkMy-osx.tar.bz to /opt $ sudo cp vtkMy-osx.tar.bz /opt unpack vtkMy $ sudo bunzip2 vtkMy-osx.tar.bz2 $ sudo tar -xvf vtkMy-osx.tar
2. Edit your default paths in .bash_profile
add the following lines to your .bash_profile file
# vtkMy if [ ! `echo $PATH | grep /opt/vtkMy-osx/bin` ] ; then export PATH="/opt/vtkMy-osx/bin:$PATH" fi if [ ! `echo $DYLD_LIBRARY_PATH | grep /opt/vtkMy-osx/lib` ] ; then export DYLD_LIBRARY_PATH="/opt/vtkMy-osx/lib:$DYLD_LIBRARY_PATH" fi
3. Restart your terminal session, or type:
$ source ~/.bash_profile
Compiling vtkMy
NOTE: The following directions are outdated and need to be updated.
Required Software
To build vtkMY, you will require SVN, CVS, Qt, ITK and VTK. Refer to the instructions for relevant platform:
Building On Windows
- Download vtkMy source using WinCVS (see SmartCVS below as option to WinCVS)
- a. Verify home directory as set up in Step 5.a.i.
- b. Open menu Remote-> Checkout Module
- Enter the following settings:
- Module name and path on server: vtkMy
- Local folder to checkout to: C:\pack\
- Check box: CVSROOT
- CVSROOT: :ssh:username@m177.enme.ucalgary.ca:/localhost/cvsroot
- Click Ok
- You will be prompted for your password to access the machine
- Wait for checkout to complete
- Build vtkMy using Cmake
- a. Open Cmake
- b. Choose C:\pack\vtkMy\src as source code
- c. Make C:\pack\vtkMy\bin binary code location
- d. Click ‘Configure’ and choose desired compiler
- e. Click the ‘Show Advanced Values’ check box and verify the following settings, all others can be left as defaults:
- BUILD_APPLICATIONS: ON
- BUILD_SHARED_LIBS: ON
- BUILD_TEST_PROJECTS: ON
- BUILD_MIXED_PROJECTS: ON
- BUILD_BACKWARDS_COMPATIBILITY: 2.4
- CMAKE_INSTALL_PREFIX: C:/Program Files/VTKMY
- USE_ITK: ON
- USE_QT: ON
- USE_FLTK: OFF
- f. Click ‘Configure’, all red values should turn grey
- g. May have to click configure again if any red values are still present
- h. Click ‘Ok’, wait as Cmake will close automatically
- Add the following environment variables:
- Open the Control Panel
- Double click and open 'System'
- Go to the 'Advanced tab' and click on the 'Environment Variables' button
- In the System Variable Section click on the 'Path' variable and click 'edit'
- Add the following values separated by semi-colons
- C:\pack\vtkMy\bin\Debug
- C:\pack\vtkMy\bin\Utilities\tetrapack\Debug
- C:\pack\vtkMy\bin\Utilities\aimpack64\Debug
- C:\pack\vtkMy\bin\Unsorted\Debug
- Build vtkMy using Visual Studio (or desired program)
- Open C:\pack\vtkMy\bin\vtkmy.sln (.dsw)
- Click ‘Build’
Add a project to vtkMy
- Add a new project directory in the vtkMy/src/Applications directory.
- Update the CMakeLists.txt file in /src/Applications to include the new directory in the SUBDIRS() list.
- Copy the CMakeLists.txt and source code files from an existing project such as AppMohr and put them into the new directory. These files can be edited for your new project.
- Edit the copied CMakeList.txt file and the change the name of the .cxx to the name of the new project.
- Run CMake, taking the source code from vtkMy/src and building the binaries in vtkMy/bin.
- Open the Visual C++ workspace and edit the source code (since at the moment it will be a duplicate of whatever project you copied in step 3).
- Compile your new code. Usually, all the development should be done in the “Debug�? mode (rather than “Release�?, etc.).
- If, to run your application, you need to include command line arguments, go to the menu item [Project][Settings], and on the ‘debug’ tab set the Program Arguments as shown.