Convert3D ITK-based Image Manipulation Tool
pyushkevich / c3d Goto Github PK
View Code? Open in Web Editor NEWConvert3D tool
License: GNU General Public License v3.0
Convert3D tool
License: GNU General Public License v3.0
Convert3D ITK-based Image Manipulation Tool
I'd like to use the -pad-to feature, but it's missing from the versions available on sourceforge (1.0.0 and 1.1.0); do I have to build from source to use this feature? Thanks.
Currently the arguments to SetGlobalDefaultCoordinateTolerance and SetGlobalDefaultDirectionTolerance inside ConvertImageND.cxx is hardcoded to 1.0e-4, added in a38b52b
itk::ImageToImageFilterCommon::SetGlobalDefaultCoordinateTolerance(1.0e-4); itk::ImageToImageFilterCommon::SetGlobalDefaultDirectionTolerance(1.0e-4);
It would be great if this could also be set from the command line when needed.
I have the skills to help add this in a PR, but need some guide lines of how best to do this.
% c3d -help rms
-rms : Voxelwise vector norm
Syntax: `-rms`
Computes RMS (root mean square) of all images on the stack. The command takes the square of each image on the stack, adds all the squared images and takes the square root of the result. This is very useful for statistical operations. Images must have the same size.
c3d img1.img img2.img img3.img img4.img -rms -o rms.img
The equivalent of this command is
c3d img1.img img2.img img3.img img4.img -foreach -dup -times -endfor \
-accum -add -endaccum -sqrt -o rms.img
In the code, it appears that -rms
sets an option for an anti-aliasing filter. It doesn't actually compute the RMS.
Hi, I was trying resampling options, it seems that c3d -resample-iso always raises the following exception:
Unknown command -resample-iso
Unknown exception caught by convert3d
When processing command: -resample-iso
Just wanted to report that
Bests
One of the size vector processing method, ReadRealVector, raising errors incorrectly for 4d size-vector, which causes some c4d command not working.
example: c4d -verbose img4d.nii.gz -resample-mm 2x2x2x2mm -o out.nii.gz
Trying to compile on Fedora 31, I get
... $ make Scanning dependencies of target markdown_to_hex [ 1%] Building C object CMakeFiles/markdown_to_hex.dir/utilities/hexdump.c.o [ 2%] Linking C executable markdown_to_hex [ 2%] Built target markdown_to_hex Scanning dependencies of target markdown_docs [ 3%] Generating markdown_docs.h [ 3%] Built target markdown_docs Scanning dependencies of target cnd_driver [ 4%] Building CXX object CMakeFiles/cnd_driver.dir/ConvertImageND.cxx.o In file included from /usr/include/InsightToolkit/itkNumericTraits.h:51, from /usr/include/InsightToolkit/itkConceptChecking.h:32, from /usr/include/InsightToolkit/itkAtomicIntDetail.h:39, from /usr/include/InsightToolkit/itkAtomicInt.h:38, from /usr/include/InsightToolkit/itkTimeStamp.h:33, from /usr/include/InsightToolkit/itkLightObject.h:23, from /usr/include/InsightToolkit/itkObject.h:31, from /usr/include/InsightToolkit/itkRegion.h:31, from /usr/include/InsightToolkit/itkImageRegion.h:31, from /usr/include/InsightToolkit/itkImage.h:21, from /home/user/Downloads/gggg/c3d-git/itkextras/itkOrientedRASImage.h:4, from /home/user/Downloads/gggg/c3d-git/ConvertImageND.h:29, from /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:26: /usr/include/vxl/vcl/vcl_limits.h:11:5: warning: #warning "This header will be removed in future versions of VXL. Use equivalent C++11 header instead. see: vxl/scripts/UseStandardHeaders.py" [-Wcpp] 11 | # warning "This header will be removed in future versions of VXL. Use equivalent C++11 header instead. see: vxl/scripts/UseStandardHeaders.py" | ^~~~~~~ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx: In member function ‘int ImageConverter::ProcessCommand(int, char**)’: /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:464:14: error: ‘vcl_acos’ was not declared in this scope 464 | adapter(&vcl_acos); | ^~~~~~~~ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:517:14: error: ‘vcl_asin’ was not declared in this scope 517 | adapter(&vcl_asin); | ^~~~~~~~ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:564:14: error: ‘vcl_ceil’ was not declared in this scope 564 | adapter(&vcl_ceil); | ^~~~~~~~ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:653:14: error: ‘vcl_cos’ was not declared in this scope 653 | adapter(&vcl_cos); | ^~~~~~~ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:744:14: error: ‘vcl_exp’ was not declared in this scope; did you mean ‘ldexp’? 744 | adapter(&vcl_exp); | ^~~~~~~ | ldexp /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:800:14: error: ‘vcl_floor’ was not declared in this scope 800 | adapter(&vcl_floor); | ^~~~~~~~~ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:1029:14: error: ‘vcl_log’ was not declared in this scope 1029 | adapter(&vcl_log); | ^~~~~~~ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:1036:14: error: ‘vcl_log10’ was not declared in this scope 1036 | adapter(&vcl_log10); | ^~~~~~~~~ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:1313:11: error: ‘vcl_exp’ was not declared in this scope; did you mean ‘ldexp’? 1313 | exp1(&vcl_exp); | ^~~~~~~ | ldexp /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:1836:14: error: ‘vcl_sin’ was not declared in this scope 1836 | adapter(&vcl_sin); | ^~~~~~~ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:1920:14: error: ‘vcl_sqrt’ was not declared in this scope 1920 | adapter(&vcl_sqrt); | ^~~~~~~~ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 2]’: /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:3094:16: required from here /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:2469:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_math_h_’? 2469 | if (!vnl_math_isnan(*q)) | ~~~~~~~~~~~~~~^~~~ | vnl_math_h_ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 3]’: /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:3095:16: required from here /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:2469:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_math_h_’? 2469 | if (!vnl_math_isnan(*q)) | ~~~~~~~~~~~~~~^~~~ | vnl_math_h_ /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 4]’: /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:3096:16: required from here /home/user/Downloads/gggg/c3d-git/ConvertImageND.cxx:2469:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_math_h_’? 2469 | if (!vnl_math_isnan(*q)) | ~~~~~~~~~~~~~~^~~~ | vnl_math_h_ make[2]: *** [CMakeFiles/cnd_driver.dir/build.make:63: CMakeFiles/cnd_driver.dir/ConvertImageND.cxx.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:329: CMakeFiles/cnd_driver.dir/all] Error 2
I'm trying to fix wraparound artifacts with -wrap, but the wrapped slices appear to be offset along the A-P axis.
Here's an example:
c3d blockWrapRPI.nii.gz -wrap 42x0x0 -o blockFixedRPI.nii.gz
blockWrapRPI.nii.gz
blockFixedRPI.nii.gz
This is on a Mac with c3d compiled from (e007137).
I am trying to build C3D on Ubuntu 20.04 and I am using latest ITK version for it. But once I configure the build and try to make -j5
I get following error:
stefan@stefan-VirtualBox:~/c3d_test/c3d/build$ export CMAKE_PREFIX_PATH=$HOME/c3d_test/itk-c3d-install/usr/local
stefan@stefan-VirtualBox:~/c3d_test/c3d/build$ cmake ..
-- CPACK_SYSTEM_NAME Linux-x86_64
-- CPACK_PACKAGE_FILE_NAME c3d-1.1.0-Linux-x86_64
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stefan/c3d_test/c3d/build
stefan@stefan-VirtualBox:~/c3d_test/c3d/build$ make -j5
Scanning dependencies of target ITKVoxBoIO
Scanning dependencies of target markdown_to_hex
Scanning dependencies of target cnd_maxflow
Scanning dependencies of target cnd_adapters
Scanning dependencies of target ITKPovRayIO
[ 1%] Building C object CMakeFiles/markdown_to_hex.dir/utilities/hexdump.c.o
[ 2%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/GCoptimization.cpp.o
[ 3%] Building CXX object itkextras/VoxBoIO/CMakeFiles/ITKVoxBoIO.dir/itkVoxBoCUBImageIO.cxx.o
[ 3%] Building CXX object itkextras/PovRayIO/CMakeFiles/ITKPovRayIO.dir/itkPovRayDF3ImageIO.cxx.o
[ 4%] Linking C executable markdown_to_hex
[ 4%] Built target markdown_to_hex
Scanning dependencies of target cnd_api
[ 5%] Building CXX object CMakeFiles/cnd_api.dir/api/ConvertAPI.cxx.o
[ 6%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/LinkedBlockList.cpp.o
[ 6%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/graph.cpp.o
[ 7%] Building CXX object CMakeFiles/cnd_maxflow.dir/external/GCv2p3/maxflow.cpp.o
[ 8%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/AddImages.cxx.o
[ 9%] Linking CXX static library libcnd_maxflow.a
[ 9%] Built target cnd_maxflow
[ 10%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/AlignByLandmarks.cxx.o
[ 11%] Building CXX object itkextras/PovRayIO/CMakeFiles/ITKPovRayIO.dir/itkPovRayDF3ImageIOFactory.cxx.o
[ 11%] Linking CXX static library libcnd_api.a
[ 11%] Built target cnd_api
Scanning dependencies of target markdown_docs
[ 12%] Generating markdown_docs.h
[ 13%] Building CXX object itkextras/VoxBoIO/CMakeFiles/ITKVoxBoIO.dir/itkVoxBoCUBImageIOFactory.cxx.o
[ 13%] Built target markdown_docs
[ 13%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/AntiAliasImage.cxx.o
[ 14%] Linking CXX static library libITKPovRayIO.a
[ 14%] Built target ITKPovRayIO
Scanning dependencies of target cnd_driver
[ 15%] Building CXX object CMakeFiles/cnd_driver.dir/ConvertImageND.cxx.o
[ 16%] Linking CXX static library libITKVoxBoIO.a
[ 16%] Built target ITKVoxBoIO
[ 17%] Building CXX object CMakeFiles/cnd_driver.dir/utilities/doc/Documentation.cxx.o
[ 18%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/ApplyMetric.cxx.o
[ 19%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/BinaryHoleFill.cxx.o
/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In member function ‘int ImageConverter<TPixel, VDim>::ProcessCommand(int, char**)’:
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:463:14: error: ‘vcl_acos’ was not declared in this scope
463 | adapter(&vcl_acos);
| ^~~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:516:14: error: ‘vcl_asin’ was not declared in this scope
516 | adapter(&vcl_asin);
| ^~~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:645:14: error: ‘vcl_cos’ was not declared in this scope
645 | adapter(&vcl_cos);
| ^~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:736:14: error: ‘vcl_exp’ was not declared in this scope; did you mean ‘ldexp’?
736 | adapter(&vcl_exp);
| ^~~~~~~
| ldexp
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1005:14: error: ‘vcl_log’ was not declared in this scope
1005 | adapter(&vcl_log);
| ^~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1012:14: error: ‘vcl_log10’ was not declared in this scope
1012 | adapter(&vcl_log10);
| ^~~~~~~~~
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In member function ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*)’:
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:33: error: there are no arguments to ‘vcl_sqrt’ that depend on a template parameter, so a declaration of ‘vcl_sqrt’ must be available [-fpermissive]
446 | const double denom = -1.0 * vcl_sqrt(sff * smm );
| ^~~~~~~~
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:33: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1257:11: error: ‘vcl_exp’ was not declared in this scope; did you mean ‘ldexp’?
1257 | exp1(&vcl_exp);
| ^~~~~~~
| ldexp
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1753:14: error: ‘vcl_sin’ was not declared in this scope
1753 | adapter(&vcl_sin);
| ^~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:1837:14: error: ‘vcl_sqrt’ was not declared in this scope
1837 | adapter(&vcl_sqrt);
| ^~~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In member function ‘int ImageConverter<TPixel, VDim>::ProcessCommandLine(int, char**)’:
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2143:8: error: ‘itk::MultiThreader’ has not been declared
2143 | itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1);
| ^~~~~~~~~~~~~
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In instantiation of ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*) [with TPixel = double; unsigned int VDim = 2; ApplyMetric<TPixel, VDim>::ImagePointer = itk::SmartPointer<itk::OrientedRASImage<double, 2> >; ApplyMetric<TPixel, VDim>::TransformPointer = itk::SmartPointer<itk::AffineTransform<double, 2> >]’:
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:468:16: required from here
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:41: error: ‘vcl_sqrt’ was not declared in this scope
446 | const double denom = -1.0 * vcl_sqrt(sff * smm );
| ~~~~~~~~^~~~~~~~~~~~
/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter<TPixel, VDim>::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 2]’:
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2959:16: required from here
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2386:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_math_h_’?
2386 | if (!vnl_math_isnan(*q))
| ~~~~~~~~~~~~~~^~~~
| vnl_math_h_
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In instantiation of ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*) [with TPixel = double; unsigned int VDim = 3; ApplyMetric<TPixel, VDim>::ImagePointer = itk::SmartPointer<itk::OrientedRASImage<double, 3> >; ApplyMetric<TPixel, VDim>::TransformPointer = itk::SmartPointer<itk::AffineTransform<double, 3> >]’:
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:469:16: required from here
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:41: error: ‘vcl_sqrt’ was not declared in this scope
/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter<TPixel, VDim>::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 3]’:
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2960:16: required from here
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2386:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_math_h_’?
2386 | if (!vnl_math_isnan(*q))
| ~~~~~~~~~~~~~~^~~~
| vnl_math_h_
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx: In instantiation of ‘double ApplyMetric<TPixel, VDim>::GetValueInternalSymmetric(ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::ImagePointer, ApplyMetric<TPixel, VDim>::TransformPointer, ApplyMetric<TPixel, VDim>::TransformPointer, const char*) [with TPixel = double; unsigned int VDim = 4; ApplyMetric<TPixel, VDim>::ImagePointer = itk::SmartPointer<itk::OrientedRASImage<double, 4> >; ApplyMetric<TPixel, VDim>::TransformPointer = itk::SmartPointer<itk::AffineTransform<double, 4> >]’:
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:470:16: required from here
/home/stefan/c3d_test/c3d/adapters/ApplyMetric.cxx:446:41: error: ‘vcl_sqrt’ was not declared in this scope
/home/stefan/c3d_test/c3d/ConvertImageND.cxx: In instantiation of ‘TPixel ImageConverter<TPixel, VDim>::ReadIntensityValue(const char*) [with TPixel = double; unsigned int VDim = 4]’:
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2961:16: required from here
/home/stefan/c3d_test/c3d/ConvertImageND.cxx:2386:28: error: ‘vnl_math_isnan’ was not declared in this scope; did you mean ‘vnl_math_h_’?
2386 | if (!vnl_math_isnan(*q))
| ~~~~~~~~~~~~~~^~~~
| vnl_math_h_
make[2]: *** [CMakeFiles/cnd_driver.dir/build.make:63: CMakeFiles/cnd_driver.dir/ConvertImageND.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:482: CMakeFiles/cnd_driver.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 20%] Building CXX object CMakeFiles/cnd_adapters.dir/adapters/BiasFieldCorrectionN4.cxx.o
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In member function ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()()’:
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:7: error: there are no arguments to ‘vcl_ceil’ that depend on a template parameter, so a declaration of ‘vcl_ceil’ must be available [-fpermissive]
71 | vcl_ceil( domain / splineDistance ) );
| ^~~~~~~~
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:7: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In instantiation of ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()() [with TPixel = double; unsigned int VDim = 2]’:
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:225:16: required from here
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:15: error: ‘vcl_ceil’ was not declared in this scope
71 | vcl_ceil( domain / splineDistance ) );
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In instantiation of ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()() [with TPixel = double; unsigned int VDim = 3]’:
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:226:16: required from here
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:15: error: ‘vcl_ceil’ was not declared in this scope
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx: In instantiation of ‘void BiasFieldCorrectionN4<TPixel, VDim>::operator()() [with TPixel = double; unsigned int VDim = 4]’:
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:227:16: required from here
/home/stefan/c3d_test/c3d/adapters/BiasFieldCorrectionN4.cxx:71:15: error: ‘vcl_ceil’ was not declared in this scope
make[2]: *** [CMakeFiles/cnd_adapters.dir/build.make:102: CMakeFiles/cnd_adapters.dir/adapters/ApplyMetric.cxx.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/cnd_adapters.dir/build.make:128: CMakeFiles/cnd_adapters.dir/adapters/BiasFieldCorrectionN4.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:787: CMakeFiles/cnd_adapters.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
Is this caused due to using wrong compiler or ITK version, or perhaps something else?
c3d -help origin
-origin : Set image origin
Syntax: `-origin vector `
Set the origin of the image. The origin is the world coordinate (in NIfTI coordinate space) of the center of the voxel (0,0,0) in the image. The origin should be specified in millimeters.
c3d input.img -origin 100x100x100mm -o output.img
But the code calls SetOrigin
https://github.com/pyushkevich/c3d/blob/master/ConvertImageND.cxx#L1515-L1521
which is not overridden in itkOrientedRASImage.h .
The coordinate of voxel 0,0,0 should be the value of the qoffset field in the NIFTI header. But if I do
% c3d tpl-MNI152NLin2009cAsym_res-01_T1w.nii.gz -info-full | grep qoffset
qoffset_x = -96
qoffset_y = -132
qoffset_z = -78
% c3d tpl-MNI152NLin2009cAsym_res-01_T1w.nii.gz -origin -96x-132x-78mm -o origin_changed.nii.gz
the origin is changed
% c3d tpl-MNI152NLin2009cAsym_res-01_T1w.nii.gz -origin -96x-132x-78mm -info-full | grep qoffset
qoffset_x = 96
qoffset_y = 132
qoffset_z = -78
Convert3D used to build on conda-forge
but no longer does. I was trying to provide packages for the new osx-arm64
architecture (for the new Mac M-series), which requires a refresh of the feedstock. The old toolchain is no longer available.
conda-forge
periodically updates their toolchain used for building packages, and a recent update broke the current build of Convert3D for version 1.3.0. Version 1.4.0 fails to build as well.
The logs from the Azure CI are available by following the GitHub workflow links down each PR discussion thread.
In ConvertImageND.cxx, the computation of sz is wrong due to a misplaced parenthesis.
It changes the dimension by one in case of small spacing.
The change is small:
sz[i] = static_cast<size_t>((0.5 + sz[i] * m_ImageStack.back()->GetSpacing()[i]) / vox[i]);
should be
sz[i] = static_cast<size_t>((0.5 + sz[i] * m_ImageStack.back()->GetSpacing()[i] / vox[i]));
I can create a PR if needed
c3d from the itk5 branch failed to build
Here is the biuld log: Biuld.log
Here is cmake cache.CMakeCache.txt
I am compiling on Ubuntu 20.04. I am using ITK 5.2.1. If you have any other questions please.
The help dialog lists the translation flag as -trans but this is not recognised by the program, whereas -tran is
ITK-snap v3.8.0
What's the statuts of (and work remaining for) porting Convert3D to ITK version 5?
I can see some initial work on the itk5
branch and a pending PR #8.
I'd be happy to help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.