Build and Package CellLocator

This document summarizes how to build and package CellLocator on Windows.

Cell Locator is a custom Slicer application. Reading the 3D Slicer Developer Documentation may help answer additional questions.

The initial source files were created using KitwareMedical/SlicerCustomAppTemplate.


  • Setting up your git account:

    • Create a Github account.

    • Setup your SSH keys following these instructions at the exception of step 2 where you should NOT enter a passphrase.

    • Setup your git username and your git email.

    • If not already done, email Lydia Ng <> to be granted access to the BICCN/cell-locator repository.


  1. Start Git Bash

  2. Checkout the source code into a directory C:\W\ by typing the following commands:

cd /c
mkdir W
cd /c/W
git clone CL

Note: use short source and build directory names to avoid the maximum path length limitation.


Note: The build process will take approximately 3 hours.

Option 1: CMake GUI and Visual Studio (Recommended)

  1. Start CMake GUI, select source directory C:\W\CL and set build directory to C:\W\CLR.

  2. Add an entry Qt5_DIR pointing to C:/Qt/${QT_VERSION}/${COMPILER}/lib/cmake/Qt5.

  3. Generate the project.

  4. Open C:\W\CLR\CellLocator.sln, select Release and build the project.

Option 2: Command Line

  1. Start the Command Line Prompt

  2. Configure and build the project in C:\W\CLR by typing the following commands:

cd C:\W\
mkdir CLR
cd CLR
cmake -G "Visual Studio 16 2019" -A x64 -DQt5_DIR:PATH=`C:/Qt/${QT_VERSION}/${COMPILER}/lib/cmake/Qt5 ..\CL
cmake --build . --config Release


Install NSIS 2

Option 1: CMake and Visual Studio (Recommended)

  1. In the C:\W\CLR\Slicer-build directory, open Slicer.sln and build the PACKAGE target

Option 2: Command Line

  1. Start the Command Line Prompt

  2. Build the PACKAGE target by typing the following commands:

cd C:\W\CLR\Slicer-build
cmake --build . --config Release --target PACKAGE