Skip to content
Open
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 .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:

jobs:
cxx-build-workflow:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.0
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.6

python-build-workflow:
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.4.0
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.4.6
secrets:
pypi_password: ${{ secrets.pypi_password }}
6 changes: 4 additions & 2 deletions .github/workflows/clang-format-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@master
- uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@main
with:
itk-branch: main
5 changes: 4 additions & 1 deletion include/itkContinuousBorderWarpImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ ContinuousBorderWarpImageFilter<TInputImage, TOutputImage, TDisplacementField>::
}

// project point into image region
inputPtr->TransformPhysicalPointToContinuousIndex(point, contIndex);
if (!inputPtr->TransformPhysicalPointToContinuousIndex(point, contIndex))
{
itkExceptionMacro("Physical point " << point << " is outside the image domain");
}

for (unsigned int j = 0; j < ImageDimension; j++)
{
Expand Down
6 changes: 3 additions & 3 deletions include/itkVariationalRegistrationElasticRegularizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ class VariationalRegistrationElasticRegularizer : public VariationalRegistration
typename FFTWProxyType::PlanType m_PlanForward[ImageDimension]; /** FFT forward plan */
typename FFTWProxyType::PlanType m_PlanBackward[ImageDimension]; /** FFT backward plan */
typename FFTWProxyType::ComplexType *
m_ComplexBuffer[ImageDimension]; /** memory space for output of forward and input of backward FFT*/
typename FFTWProxyType::PixelType * m_InputBuffer; /** FFT memory space for input data */
typename FFTWProxyType::PixelType * m_OutputBuffer; /** FFT memory space for output data */
m_ComplexBuffer[ImageDimension]; /** memory space for output of forward and input of backward FFT*/
typename FFTWProxyType::PixelType * m_InputBuffer; /** FFT memory space for input data */
typename FFTWProxyType::PixelType * m_OutputBuffer; /** FFT memory space for output data */

struct ElasticFFTThreadStruct
{
Expand Down
2 changes: 1 addition & 1 deletion include/itkVariationalRegistrationFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define itkVariationalRegistrationFunction_h

#include "itkFiniteDifferenceFunction.h"
//#include "itkWarpImageFilter.h"
// #include "itkWarpImageFilter.h"
#include "itkContinuousBorderWarpImageFilter.h"
#include <mutex>

Expand Down
2 changes: 1 addition & 1 deletion include/itkVariationalRegistrationRegularizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class VariationalRegistrationRegularizer : public InPlaceImageFilter<TDisplaceme

/** Initialize the filter. */
virtual void
Initialize(){};
Initialize() {};

private:
/** A boolean that indicates, if image spacing is considered. */
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ classifiers = [
"Topic :: Scientific/Engineering :: Medical Science Apps.",
"Topic :: Software Development :: Libraries",
]
requires-python = ">=3.8"
requires-python = ">=3.10"
dependencies = [
"itk",
]
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include_directories("${VariationalRegistration_SOURCE_DIR}/include")
include_directories("${VariationalRegistration_SOURCE_DIR}/src")

# Test if ITK is built with FFTW. FFTWD is recommended and required for the
Expand Down
30 changes: 10 additions & 20 deletions src/VariationalRegistrationMain.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,7 @@ main(int argc, char * argv[])
FunctionType::Pointer function;
switch (forceType)
{
case 0:
{
case 0: {
DemonsFunctionType::Pointer demonsFunction = DemonsFunctionType::New();
switch (forceDomain)
{
Expand All @@ -659,8 +658,7 @@ main(int argc, char * argv[])
function = demonsFunction;
}
break;
case 1:
{
case 1: {
SSDFunctionType::Pointer ssdFunction = SSDFunctionType::New();
switch (forceDomain)
{
Expand All @@ -678,8 +676,7 @@ main(int argc, char * argv[])
function = ssdFunction;
}
break;
case 2:
{
case 2: {
NCCFunctionType::Pointer nccFunction = NCCFunctionType::New();
NCCFunctionType::RadiusType r;
for (unsigned int dim = 0; dim < NCCFunctionType::ImageDimension; dim++)
Expand Down Expand Up @@ -722,22 +719,19 @@ main(int argc, char * argv[])
RegularizerType::Pointer regularizer;
switch (regularizerType)
{
case 0:
{
case 0: {
GaussianRegularizerType::Pointer gaussRegularizer = GaussianRegularizerType::New();
gaussRegularizer->SetStandardDeviations(std::sqrt(regulVar));
regularizer = gaussRegularizer;
}
break;
case 1:
{
case 1: {
DiffusionRegularizerType::Pointer diffRegularizer = DiffusionRegularizerType::New();
diffRegularizer->SetAlpha(regulAlpha);
regularizer = diffRegularizer;
}
break;
case 2:
{
case 2: {
#if defined(ITK_USE_FFTWD) || defined(ITK_USE_FFTWF)
ElasticRegularizerType::Pointer elasticRegularizer = ElasticRegularizerType::New();
elasticRegularizer->SetMu(regulMu);
Expand All @@ -748,8 +742,7 @@ main(int argc, char * argv[])
#endif
}
break;
case 3:
{
case 3: {
#if defined(ITK_USE_FFTWD) || defined(ITK_USE_FFTWF)
CurvatureRegularizerType::Pointer curvatureRegularizer = CurvatureRegularizerType::New();
curvatureRegularizer->SetAlpha(regulAlpha);
Expand All @@ -775,20 +768,17 @@ main(int argc, char * argv[])
RegistrationFilterType::Pointer regFilter;
switch (searchSpace)
{
case 0:
{
case 0: {
regFilter = RegistrationFilterType::New();
break;
}
case 1:
{
case 1: {
DiffeomorphicRegistrationFilterType::Pointer diffeoRegFilter = DiffeomorphicRegistrationFilterType::New();
diffeoRegFilter->SetNumberOfExponentiatorIterations(numberOfExponentiatorIterations);
regFilter = diffeoRegFilter;
break;
}
case 2:
{
case 2: {
SymmetricDiffeomorphicRegistrationFilterType::Pointer symmDiffeoRegFilter =
SymmetricDiffeomorphicRegistrationFilterType::New();
symmDiffeoRegFilter->SetNumberOfExponentiatorIterations(numberOfExponentiatorIterations);
Expand Down
2 changes: 1 addition & 1 deletion src/itkVariationalRegistrationIncludeRequiredIOFactories.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "itkNrrdImageIOFactory.h"
#include "itkGiplImageIOFactory.h"
#include "itkNiftiImageIOFactory.h"
//#include "itkTestDriverInclude.h"
// #include "itkTestDriverInclude.h"
#include "itkObjectFactoryBase.h"

void
Expand Down
4 changes: 3 additions & 1 deletion src/win32_compatibility/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ char * optarg; /* argument associated with option */
* getopt --
* Parse argc/argv argument vector.
*/
int getopt(nargc, nargv, ostr) int nargc;
int
getopt(nargc, nargv, ostr)
int nargc;
char * const * nargv;
const char * ostr;
{
Expand Down
Loading