Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions localizer/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# CMakeList.txt: DCCCcore Refactored Version
cmake_minimum_required(VERSION 3.21)

project(DCCCcore VERSION 4.2.0)
set(DCCCCORE_VERSION_SUFFIX "-alpha")
project(DCCCcore VERSION 4.2.1)
set(DCCCCORE_VERSION_SUFFIX "")
set(DCCCCORE_SOFTWARE_VERSION "${PROJECT_VERSION}${DCCCCORE_VERSION_SUFFIX}")

# Set C++ standard
Expand Down
1 change: 1 addition & 0 deletions localizer/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Perform spatial standardization without metric calculation:
# Iterative rigid registration
./DCCCcore normalize --input pet.nii --output normalized.nii --iterative
./DCCCcore adni-pet-core --input pet.nii --output normalized.nii --iterative
./DCCCcore rigid --input pet.nii --output rigid.nii --iterative
```

#### ADAD Analysis
Expand Down
2 changes: 1 addition & 1 deletion localizer/src/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class AppConan(ConanFile):
name = "DCCCcore"
version = "4.2.0-alpha"
version = "4.2.1"
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain"

Expand Down
2 changes: 1 addition & 1 deletion localizer/src/core/config/Version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#include <string>

const std::string SOFTWARE_VERSION = "4.2.0-alpha";
const std::string SOFTWARE_VERSION = "4.2.1";
6 changes: 6 additions & 0 deletions localizer/src/spatialNormalizations/rigid/RigidCLI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@ class RigidCLI final : public ISpatialNormalizationCLI {

void configureArguments(argparse::ArgumentParser& parser) override {
addBaseArguments(parser);
parser.add_argument("-i", "--iterative")
.help("Use iterative rigid transformation")
.default_value(false)
.implicit_value(true);
}

int execute(const argparse::ArgumentParser& parser, const std::string& fullCommand) override {
NormalizeCommandOptions options;
options.inputPath = parser.get<std::string>("--input");
options.outputPath = parser.get<std::string>("--output");
options.configPath = parser.get<std::string>("--config");
options.useIterativeRigid = parser.get<bool>("--iterative");
options.enableDebugOutput = parser.get<bool>("--debug");

if (!Common::fs::ensureParentDirectory(options.outputPath)) {
Expand All @@ -56,6 +61,7 @@ class RigidCLI final : public ISpatialNormalizationCLI {
request.inputPath = options.inputPath;
request.skip = false;
request.options.rigidOnly = true;
request.options.useIterativeRigid = options.useIterativeRigid;
request.options.enableDebugOutput = options.enableDebugOutput;
request.options.debugOutputBasePath = options.debugOutputBasePath;

Expand Down
18 changes: 18 additions & 0 deletions localizer/src/tests/test_normalize_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,21 @@ def test_iterative_flag(self, run_subprocess, tmp_path, test_files):
)
assert output_path.exists(), "normalize --iterative did not create the expected output file."

def test_rigid_iterative_flag(self, run_subprocess, tmp_path, test_files):
output_path = tmp_path / "rigid_iterative_output.nii"
result = run_subprocess(
[
"rigid",
"--input",
str(test_files["input"]),
"--output",
str(output_path),
"--iterative",
]
)

assert result.returncode == 0, (
"rigid command with --iterative failed.\n"
f"STDOUT:\n{result.stdout}\nSTDERR:\n{result.stderr}"
)
assert output_path.exists(), "rigid --iterative did not create the expected output file."
Loading