Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
b870bc9
refactor: dependency injection
tctco Nov 29, 2025
bd95968
refactor: reorganive commonRefactor namespace
tctco Nov 30, 2025
fd19f62
refactor: reorganive commonRefactor namespace
tctco Nov 30, 2025
1c1cec5
refactor: merge src/refactor/ to src/
tctco Nov 30, 2025
53ac611
refactor: abstract config loading to core
tctco Dec 1, 2025
7d562b7
refactor: upgrade to V4.0, rename core exe to DCCCcore
tctco Dec 1, 2025
e7c58d0
refactor: extract some common functions
tctco Dec 1, 2025
7d65151
refactor: add batch for SUVr
tctco Dec 1, 2025
164ebf8
doc: update DI docs
tctco Dec 1, 2025
445e358
new ROI and Ref
tctco Dec 12, 2025
ec22ca8
added amyloid iq AV45 K/NS templates
tctco Jan 16, 2026
addd5f3
added abeta load implementation
tctco Jan 20, 2026
325ede7
chores: add todo on test_abetaload_cli.py
tctco Jan 28, 2026
a9610b0
refactor: modularize metrics and add abetaindex
tctco Apr 14, 2026
4891528
dev: push to github
tctco Apr 14, 2026
6270d38
build: apply master hwloc conan fix
tctco Apr 14, 2026
b113e12
Add detailed CenTauRz region reporting
tctco Apr 17, 2026
dcbf331
Ignore Codex workspace files
tctco Apr 17, 2026
4b641d8
fix adni batch processing and bump version to 4.1.1-alpha
tctco Apr 18, 2026
4245a31
fix unicode Windows paths and bump version to 4.1.2-alpha
tctco Apr 19, 2026
9af61ec
test(ui): add command-builder unit tests for metric calculator
tctco May 20, 2026
f2aec81
Fix ONNX path conversion build on non-Windows
tctco May 20, 2026
8dc51cf
Merge pull request #26 from tctco/codex/fix-compilation-errors-on-mac…
tctco May 20, 2026
23e5200
Merge pull request #25 from tctco/codex/fix-bug-in-centaur-calculation
tctco May 20, 2026
755991f
Add rigid-only spatial normalization subcommand
tctco May 20, 2026
9990e60
Merge pull request #27 from tctco/codex/add-rigid-subcommand-to-adjus…
tctco May 20, 2026
29520f6
Add Docker core build environment
tctco May 25, 2026
2976ba6
Merge pull request #28 from tctco/codex/docker-core-build-env
tctco May 25, 2026
f222d0a
Update rigid registration model
tctco May 25, 2026
3ce2a13
Bump version to 4.2.0-alpha
tctco May 25, 2026
9761a07
Enable iterative rigid alignment
tctco May 25, 2026
eb48ff3
Merge pull request #29 from tctco/codex/rigid-iterative-4.2.1
tctco May 26, 2026
d56a1d8
Bump version to 4.2.1-alpha
tctco May 26, 2026
b85907b
Limit CI triggers and PR matrix
tctco May 26, 2026
da221d1
Add legacy glibc Linux build path
tctco Jun 10, 2026
aafeaab
Isolate legacy Linux Conan cache
tctco Jun 11, 2026
53461b3
Force legacy Boost b2 source build
tctco Jun 11, 2026
26a6d40
Install Perl IPC module in legacy image
tctco Jun 11, 2026
ba91c8b
Use perl-core in legacy image
tctco Jun 12, 2026
c8489cb
Build legacy autotools from source
tctco Jun 12, 2026
1b9095b
Merge pull request #30 from tctco/codex/add-support-for-glibc-2.34-in…
tctco Jun 12, 2026
cb0feea
Update README with new paper publications
tctco Jun 12, 2026
94ff6e6
Add BIDS batch support for v4.2.2 alpha
tctco Jun 12, 2026
719eeeb
Optimize rigid iterative processing
tctco Jun 17, 2026
be37642
Decouple rigid and VoxelMorph normalizers
tctco Jun 17, 2026
c95ff84
Merge pull request #31 from tctco/codex/rigid-iterative-performance
tctco Jun 17, 2026
ca5dd70
Merge branch 'dev' into master (resolve conflicts)
tctco Jun 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.git
.cache
.mypy_cache
__pycache__
build
localizer/src/build
localizer/src/install
localizer/cpp
.VSCodeCounter
.vscode
*archive*
127 changes: 99 additions & 28 deletions .github/workflows/cross-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ on:
push:
tags:
- 'v*'
branches:
- master
- main
paths-ignore:
- '**/*.md'
pull_request:
workflow_dispatch:

Expand All @@ -22,14 +17,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-14]
os: ${{ fromJSON(startsWith(github.ref, 'refs/tags/') && '["ubuntu-latest","windows-latest","macos-latest","macos-14"]' || '["ubuntu-latest","windows-latest"]') }}

steps:
- name: Checkout (with Git LFS)
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
lfs: ${{ startsWith(github.ref, 'refs/tags/') }}

- name: Setup Python
uses: actions/setup-python@v5
Expand All @@ -41,14 +36,27 @@ jobs:
python -m pip install --upgrade pip
pip install conan

- name: Cache Conan packages
- name: Cache Conan packages (Windows/macOS)
if: runner.os != 'Linux'
uses: actions/cache@v4
with:
path: ~/.conan2
key: ${{ runner.os }}-conan-${{ hashFiles('localizer/src/conanfile.py') }}
restore-keys: |
${{ runner.os }}-conan-

# Keep the legacy cache separate from the normal Linux cache: Conan may cache
# build tools such as Boost's b2, and tools built on ubuntu-latest can require
# newer glibc symbols than the manylinux2014/CentOS 7 container provides.
- name: Cache legacy Linux Conan packages
if: runner.os == 'Linux'
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/dccc-conan2-legacy
key: ${{ runner.os }}-legacy-glibc217-conan-${{ hashFiles('localizer/src/conanfile.py', 'docker/Dockerfile.core.legacy', 'scripts/docker-build-core.sh', '.github/workflows/cross-compile.yml') }}
restore-keys: |
${{ runner.os }}-legacy-glibc217-conan-

- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@v4

Expand All @@ -60,8 +68,8 @@ jobs:
echo "CC=gcc-12" >> $GITHUB_ENV
echo "CXX=g++-12" >> $GITHUB_ENV

- name: Conan profile detect (Linux/macOS)
if: runner.os != 'Windows'
- name: Conan profile detect (macOS)
if: runner.os == 'macOS'
working-directory: localizer/src
shell: bash
run: |
Expand All @@ -74,8 +82,8 @@ jobs:
run: |
conan profile detect --force

- name: Conan install (Linux/macOS)
if: runner.os != 'Windows'
- name: Conan install (macOS)
if: runner.os == 'macOS'
working-directory: localizer/src
shell: bash
run: |
Expand All @@ -86,8 +94,8 @@ jobs:
-o onetbb/*:tbbmalloc=False \
-o onetbb/*:tbbproxy=False

- name: Configure with CMake (Linux/macOS)
if: runner.os != 'Windows'
- name: Configure with CMake (macOS)
if: runner.os == 'macOS'
working-directory: localizer/src
shell: bash
run: |
Expand All @@ -98,20 +106,72 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="./install"

- name: Build with CMake (Linux/macOS)
if: runner.os != 'Windows'
- name: Build with CMake (macOS)
if: runner.os == 'macOS'
working-directory: localizer/src
shell: bash
run: cmake --build build --config Release

- name: Install with CMake (Linux/macOS)
if: runner.os != 'Windows'
- name: Install with CMake (macOS)
if: runner.os == 'macOS'
working-directory: localizer/src
shell: bash
run: cmake --install build --config Release

- name: Build legacy Linux Docker image
if: runner.os == 'Linux'
shell: bash
run: |
docker build \
--build-arg USER_UID="$(id -u)" \
--build-arg USER_GID="$(id -g)" \
-f docker/Dockerfile.core.legacy \
-t dccc-core-dev:legacy-glibc217 .

- name: Build and install with legacy Linux container
if: runner.os == 'Linux'
shell: bash
run: |
legacy_conan_home="$RUNNER_TEMP/dccc-conan2-legacy"
mkdir -p "$legacy_conan_home"
docker run --rm \
-v "$GITHUB_WORKSPACE:/workspace" \
-v "$legacy_conan_home:/home/dev/.conan2" \
-e CONAN_CPPSTD=gnu17 \
-e CONAN_BUILD_ARGS='--build=missing --build=b2/* --build=m4/* --build=autoconf/* --build=automake/* --build=libtool/* --build=pkgconf/*' \
-e BUILD_TYPE=Release \
-e INSTALL_PREFIX=./install \
dccc-core-dev:legacy-glibc217 \
/workspace/scripts/docker-build-core.sh

- name: Verify Linux glibc compatibility floor
if: runner.os == 'Linux'
working-directory: localizer/src
shell: bash
run: |
set -euo pipefail
mapfile -t elf_files < <(find install/bin -maxdepth 1 -type f -exec sh -c 'file "$1" | grep -q ELF' sh {} \; -print)
max_glibc=$(objdump -T "${elf_files[@]}" \
| sed -n 's/.*(GLIBC_\([0-9][0-9.]*\)).*/\1/p' \
| sort -V \
| tail -n 1)
echo "Maximum referenced GLIBC version: ${max_glibc:-none}"
if [[ -n "${max_glibc}" ]] && [[ "$(printf '%s\n%s\n' "2.17" "${max_glibc}" | sort -V | tail -n 1)" != "2.17" ]]; then
echo "Linux package references GLIBC_${max_glibc}; expected no symbols newer than GLIBC_2.17." >&2
exit 1
fi

- name: Run PR smoke tests on installed binary (Linux)
if: github.event_name == 'pull_request' && runner.os == 'Linux'
working-directory: localizer/src/tests
shell: bash
run: |
set -e
python -m pip install pytest pandas
python -m pytest -v test_ui_metric_command_builder.py test_quick_cli.py -k "help or version_information or no_subcommand"

- name: Run pytest on installed binary (Linux/macOS)
if: runner.os != 'Windows'
if: startsWith(github.ref, 'refs/tags/') && runner.os != 'Windows'
working-directory: localizer/src/tests
shell: bash
run: |
Expand Down Expand Up @@ -171,16 +231,24 @@ jobs:
shell: pwsh
run: cmake --install build --config Release

- name: Run PR smoke tests on installed binary (Windows)
if: github.event_name == 'pull_request' && runner.os == 'Windows'
working-directory: localizer/src/tests
shell: pwsh
run: |
python -m pip install pytest pandas
python -m pytest -v test_ui_metric_command_builder.py test_quick_cli.py -k "help or version_information or no_subcommand"

- name: Run pytest on installed binary (Windows)
if: runner.os == 'Windows'
if: startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows'
working-directory: localizer/src/tests
shell: pwsh
run: |
python -m pip install pytest pandas
python -m pytest -v

- name: Copy install/bin into localizer/cpp (Linux/macOS)
if: runner.os != 'Windows'
if: startsWith(github.ref, 'refs/tags/') && runner.os != 'Windows'
shell: bash
working-directory: localizer/src
run: |
Expand All @@ -189,14 +257,15 @@ jobs:
cp -a install/bin/. "$GITHUB_WORKSPACE/localizer/cpp/"

- name: Copy install/bin into localizer/cpp (Windows)
if: runner.os == 'Windows'
if: startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows'
shell: pwsh
working-directory: localizer/src
run: |
New-Item -ItemType Directory -Force -Path "$env:GITHUB_WORKSPACE/localizer/cpp" | Out-Null
Copy-Item -Path install/bin/* -Destination "$env:GITHUB_WORKSPACE/localizer/cpp/" -Recurse -Force

- name: Determine package metadata
if: startsWith(github.ref, 'refs/tags/')
id: package-metadata
shell: bash
env:
Expand Down Expand Up @@ -244,7 +313,7 @@ jobs:
echo "platform=${platform}" >> "$GITHUB_OUTPUT"

- name: Assemble standalone core package (Linux/macOS)
if: runner.os != 'Windows'
if: startsWith(github.ref, 'refs/tags/') && runner.os != 'Windows'
shell: bash
working-directory: localizer/src
run: |
Expand All @@ -257,7 +326,7 @@ jobs:
cp "$GITHUB_WORKSPACE/LICENSE.md" "$package_dir/LICENSE.md"

- name: Assemble standalone core package (Windows)
if: runner.os == 'Windows'
if: startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows'
shell: pwsh
working-directory: localizer/src
run: |
Expand All @@ -273,21 +342,23 @@ jobs:
Copy-Item -Path (Join-Path $env:GITHUB_WORKSPACE 'LICENSE.md') -Destination (Join-Path $packageDir 'LICENSE.md') -Force

- name: Create distributable zip (standalone core)
if: startsWith(github.ref, 'refs/tags/')
uses: thedoctor0/zip-release@0.7.6
with:
type: 'zip'
filename: DCCCcore-${{ env.PACKAGE_VERSION }}-${{ env.PACKAGE_PLATFORM }}.zip
path: DCCCcore-${{ env.PACKAGE_VERSION }}-${{ env.PACKAGE_PLATFORM }}

- name: Upload standalone core artifact
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: DCCCcore-${{ env.PACKAGE_VERSION }}-${{ env.PACKAGE_PLATFORM }}
path: DCCCcore-${{ env.PACKAGE_VERSION }}-${{ env.PACKAGE_PLATFORM }}.zip
if-no-files-found: error

- name: Clean packaging workspace (Linux/macOS)
if: runner.os != 'Windows'
if: startsWith(github.ref, 'refs/tags/') && runner.os != 'Windows'
shell: bash
run: |
set -euo pipefail
Expand All @@ -304,7 +375,7 @@ jobs:
rm -f .gitmodules

- name: Clean packaging workspace (Windows)
if: runner.os == 'Windows'
if: startsWith(github.ref, 'refs/tags/') && runner.os == 'Windows'
shell: pwsh
run: |
$pathsToRemove = @(
Expand All @@ -330,13 +401,15 @@ jobs:
}

- name: Create distributable zip (entire project)
if: startsWith(github.ref, 'refs/tags/')
uses: thedoctor0/zip-release@0.7.6
with:
type: 'zip'
filename: DCCCSlicer-${{ env.PACKAGE_VERSION }}-${{ env.PACKAGE_PLATFORM }}.zip
path: .

- name: Upload artifact
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: DCCCSlicer-${{ env.PACKAGE_VERSION }}-${{ env.PACKAGE_PLATFORM }}
Expand Down Expand Up @@ -365,5 +438,3 @@ jobs:
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ localizer/Normalized*.nii
localizer/tmp.nii
localizer/ref.nii
localizer/roi.nii
localizer/templates/fetch_template.ipynb
tracked_files.txt
*archive*

Expand All @@ -29,4 +30,7 @@ localizer/cpp
.cache/

# code for generating seg.nrrd atlases
localizer/templates/*.ipynb
localizer/templates/*.ipynb

# codex
.codex
13 changes: 13 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
每次递增版本号时,更新以下文件(写路径全名,避免改错同名文件):
- `localizer/src/CMakeLists.txt`
- `project(DCCCcore VERSION X.Y.Z)` 只写纯数字版本。
- 如果是预发布版本,再同步更新 `DCCCCORE_VERSION_SUFFIX`(例如 `-alpha`)。
- `localizer/src/conanfile.py`
- `version = "X.Y.Z"` 或 `version = "X.Y.Z-alpha"`,需要与对外发布版本保持一致。
- `localizer/src/core/config/Version.h`
- 当前仓库会提交这个生成后的头文件,里面的 `SOFTWARE_VERSION` 也要同步更新,避免 `--version` 或批处理日志显示旧版本。

补充说明:
- `localizer/src/core/config/Version.h.in` 是模板文件,日常递增版本号时不需要手改具体版本号;它会从 `localizer/src/CMakeLists.txt` 里的完整软件版本变量生成。
- 仓库根目录的 `CMakeLists.txt` 当前没有单独的项目版本号,不属于版本递增时必须同步的文件。
- 发布时还要注意 Git tag。`.github/workflows/cross-compile.yml` 会优先用 tag 名 `vX.Y.Z` 生成发布包版本;如果源码版本已经更新但 tag 没跟上,发布产物版本仍可能不一致。
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ project(DCCCSlicer)

#-----------------------------------------------------------------------------
# Extension meta-information
set(EXTENSION_HOMEPAGE "https://www.slicer.org/wiki/Documentation/Nightly/Extensions/ACPCLocalizer")
set(EXTENSION_HOMEPAGE "https://github.com/tctco/DCCCSlicer")
set(EXTENSION_CATEGORY "Examples")
set(EXTENSION_CONTRIBUTORS "Cheng Tang")
set(EXTENSION_DESCRIPTION "This is an example of a simple extension")
set(EXTENSION_DESCRIPTION "An open-source, super-simple, ultra-fast, fully-automated, fairly-accurate and PET-only solution to conduct spatial normalization and semi-quantification for almost any brain PET modalities.")
set(EXTENSION_ICONURL "https://www.example.com/Slicer/Extensions/ACPCLocalizer.png")
set(EXTENSION_SCREENSHOTURLS "https://www.example.com/Slicer/Extensions/ACPCLocalizer/Screenshots/1.png")
set(EXTENSION_DEPENDS "NA") # Specified as a list or "NA" if no dependencies
Expand Down
Loading
Loading