SimpleITK is an image analysis toolkit with a large number of components supporting general filtering operations, image segmentation and registration

Overview

SimpleITK

CircleCI ReadTheDocs AzurePipelines
release CircleCI ReadTheDoc Build Status
master CircleCI ReadTheDoc Build Status

SimpleITK is an image analysis toolkit with a large number of components supporting general filtering operations, image segmentation and registration. It is built on top of the Insight Segmentation and Registration Toolkit ITK with the intent of providing a simplified interface to ITK. SimpleITK itself is written in C++ but is available for a large number of programming languages. Currently these include:

Wrapping of the C++ code is accomplished through SWIG, in principle, any language wrapped by SWIG should be applicable to SimpleITK.

Unlike ITK's support of n-dimensional spatio-temporal images, SimpleITK supports 2D, 3D and 4D images. The dimensionality refers to spatio-temporal dimensions, the voxels can be n-dimensional vectors.

SimpleITK is licensed under the Apache License.

Acknowledgments

SimpleITK development has been supported by:

  • The Intramural Research Program of the National Institutes of Health, National Institute of Allergy and Infectious Diseases.

  • The US National Library of Medicine under the American Recovery and Reinvestment Act (ARRA) and under the Intramural Research Program of the U.S. National Institutes of Health.

  • The Insight Software Consortium and the ITK user and developer communities.

License and Copyright

The SimpleITK project is part of the Insight Software Consortium(ISC) a non-profit educational consortium dedicated to promoting and maintaining open-source, freely available software for bio-medical image analysis. The copyright is held by NumFOCUS. The SimpleITK software is distributed under the Apache License 2.0.

How to Cite

If you found SimpleITK useful in your research, support our efforts by citing the relevant publication(s):

R. Beare, B. C. Lowekamp, Z. Yaniv, "Image Segmentation, Registration and Characterization in R with SimpleITK", J Stat Softw, 86(8), https://doi.org/10.18637/jss.v086.i08, 2018.

Z. Yaniv, B. C. Lowekamp, H. J. Johnson, R. Beare, "SimpleITK Image-Analysis Notebooks: a Collaborative Environment for Education and Reproducible Research", J Digit Imaging., 31(3): 290-303, https://doi.org/10.1007/s10278-017-0037-8, 2018.

B. C. Lowekamp, D. T. Chen, L. Ibáñez, D. Blezek, "The Design of SimpleITK", Front. Neuroinform., 7:45. https://doi.org/10.3389/fninf.2013.00045, 2013.

Documentation

With massive libraries like SimpleITK, good documentation is a must. The documentation for SimpleITK is split up into multiple levels:

  1. API Documentation - This contains class and function documentation. The descriptions for functions and classes are primarily borrowed from the original ITK C++ classes.
  2. SimpleITK Documentation - This site contains high-level guides (fundamental SimpleITK concepts, common conventions, etc.), details with respect to the toolkit's binary distributions, instructions for building the toolkit, as well as SimpleITK examples in all supported programming languages. [This site replaced the SimpleITK Wiki which is mostly of interest for historical reasons.]
  3. Juypyter Notebook Repository - This repository contains a collection of Jupyter Notebooks illustrating the use of SimpleITK for educational and research activities. The notebooks demonstrate the use of SimpleITK for interactive image analysis using the Python and R programming languages. Recommended reading, if you are starting with SimpleITK.

Support

SimpleITK provides access to most of the ITK components, but not all. If you are looking for something specific and can't find it, open an issue on GitHub or ask for support on the forum.

Report an Issue

Help us improve SimpleITK by reporting issues you encounter. When you report an error, you allow us to address your specific problem, but more importantly you are helping all of the SimpleITK community.

Thank you for helping making SimpleITK better!

All issues are reported and managed on the project's GitHub issue tracker. When reporting an issue, please provide as much information as possible to enable us to reproduce the problem.

The following information will allow us to address your issue in a timely manner:

  1. Error message (copy & pasted) and focused description of the problem.
  2. Operating system, and version (e.g. OSX 10.11.6).
  3. Programming language, and version (e.g. Python 2.7.14, R 3.2.3).
  4. Version of SimpleITK (e.g. 1.1.0), just invoke the SimpleITK Version() function.
  5. How did you install SimpleITK, binary distribution (e.g. conda install -c simpleitk simpleitk), or built it from source (e.g. devtools::install_github("SimpleITK/SimpleITKRInstaller")).
  6. A minimal working example which causes the error.
  7. If your code requires input, possibly point to a minimal sized input image.
Comments
  • Debian packaging

    Debian packaging

    I checked out the latest stable release (0.10.0) and attempted a build on Debian Stretch, which eventually failed. The relevant parts of the build log are pasted below. Same problem happens with the current tip of master.

    cmake .. -DBUILD_SHARED_LIBS=ON -DWRAP_PYTHON=OFF -DBUILD_TESTING=OFF
    -- The C compiler identification is GNU 6.2.1
    -- The CXX compiler identification is GNU 6.2.1
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Building SimpleITK version "0.10.0-g5c8b3"
    -- Performing Test CXX_HAS_stdcxx11
    -- Performing Test CXX_HAS_stdcxx11 - Success
    -- Checking if c++11 is required...
    -- Checking if c++11 is required... NO
    -- Performing Test CXX_HAS-Wall
    -- Performing Test CXX_HAS-Wall - Success
    -- Performing Test CXX_HAS-Wno-long-double
    -- Performing Test CXX_HAS-Wno-long-double - Failed
    -- Performing Test CXX_HAS-Wno-long-long
    -- Performing Test CXX_HAS-Wno-long-long - Success
    -- Performing Test CXX_HAS-Wno-unused-local-typedefs
    -- Performing Test CXX_HAS-Wno-unused-local-typedefs - Success
    -- Performing Test CXX_HAS-Wno-strict-overflow
    -- Performing Test CXX_HAS-Wno-strict-overflow - Success
    -- Performing Test CXX_HAS-Wextra
    -- Performing Test CXX_HAS-Wextra - Success
    -- Performing Test CXX_HAS-Wformat_2
    -- Performing Test CXX_HAS-Wformat_2 - Success
    -- Performing Test CXX_HAS-Wno-format-nonliteral
    -- Performing Test CXX_HAS-Wno-format-nonliteral - Success
    -- Performing Test CXX_HAS-Wunused
    -- Performing Test CXX_HAS-Wunused - Success
    -- Performing Test CXX_HAS-Wpointer-arith
    -- Performing Test CXX_HAS-Wpointer-arith - Success
    -- Performing Test CXX_HAS-Winvalid-pch
    -- Performing Test CXX_HAS-Winvalid-pch - Success
    -- Performing Test CXX_HAS-Wcast-align
    -- Performing Test CXX_HAS-Wcast-align - Success
    -- Performing Test CXX_HAS-Wdisabled-optimization
    -- Performing Test CXX_HAS-Wdisabled-optimization - Success
    -- Performing Test CXX_HAS-Woverloaded-virtual
    -- Performing Test CXX_HAS-Woverloaded-virtual - Success
    -- Performing Test CXX_HAS-Wshadow
    -- Performing Test CXX_HAS-Wshadow - Success
    -- Performing Test CXX_HAS-Wwrite-strings
    -- Performing Test CXX_HAS-Wwrite-strings - Success
    -- Performing Test CXX_HAS-Wstrict-null-sentinel
    -- Performing Test CXX_HAS-Wstrict-null-sentinel - Success
    -- Performing Test CXX_HAS-Wno-invalid-offsetof
    -- Performing Test CXX_HAS-Wno-invalid-offsetof - Success
    -- The imported target "vtkgdcm" references the file
       "/usr/lib/x86_64-linux-gnu/libvtkgdcm.so.2.6.6"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "vtkgdcmsharpglue" references the file
       "/usr/lib/x86_64-linux-gnu/libvtkgdcmsharpglue.so"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "vtkgdcmJava" references the file
       "/usr/lib/x86_64-linux-gnu/jni/libvtkgdcmJava.so"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "vtkgdcmPython" references the file
       "/usr/lib/python/dist-packages/libvtkgdcmPython.so"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "vtkgdcmPythonD" references the file
       "/usr/lib/x86_64-linux-gnu/libvtkgdcmPythonD.so.2.6.6"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmdump" references the file
       "/usr/bin/gdcmdump"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmdiff" references the file
       "/usr/bin/gdcmdiff"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmraw" references the file
       "/usr/bin/gdcmraw"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmscanner" references the file
       "/usr/bin/gdcmscanner"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmanon" references the file
       "/usr/bin/gdcmanon"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmgendir" references the file
       "/usr/bin/gdcmgendir"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmimg" references the file
       "/usr/bin/gdcmimg"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmconv" references the file
       "/usr/bin/gdcmconv"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmtar" references the file
       "/usr/bin/gdcmtar"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcminfo" references the file
       "/usr/bin/gdcminfo"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmscu" references the file
       "/usr/bin/gdcmscu"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmxml" references the file
       "/usr/bin/gdcmxml"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmpap3" references the file
       "/usr/bin/gdcmpap3"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- The imported target "gdcmpdf" references the file
       "/usr/bin/gdcmpdf"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib/x86_64-linux-gnu/gdcm-2.6/GDCMTargets.cmake"
    but not all the files it references.
    
    -- Performing Test SITK_HAS_CXX11_STATIC_ASSERT
    -- Performing Test SITK_HAS_CXX11_STATIC_ASSERT - Success
    -- Performing Test SITK_HAS_CXX11_FUNCTIONAL
    -- Performing Test SITK_HAS_CXX11_FUNCTIONAL - Success
    -- Performing Test SITK_HAS_CXX11_TYPE_TRAITS
    -- Performing Test SITK_HAS_CXX11_TYPE_TRAITS - Success
    -- Performing Test SITK_HAS_CXX11_UNORDERED_MAP
    -- Performing Test SITK_HAS_CXX11_UNORDERED_MAP - Success
    -- Performing Test SITK_HAS_CXX11_NULLPTR
    -- Performing Test SITK_HAS_CXX11_NULLPTR - Success
    -- Performing Test SITK_HAS_CXX11_UNIQUE_PTR
    -- Performing Test SITK_HAS_CXX11_UNIQUE_PTR - Success
    -- Performing Test SITK_HAS_CXX11_ALIAS_TEMPLATE
    -- Performing Test SITK_HAS_CXX11_ALIAS_TEMPLATE - Success
    -- Performing Test SITK_HAS_TR1_SUB_INCLUDE
    -- Performing Test SITK_HAS_TR1_SUB_INCLUDE - Success
    -- Performing Test SITK_HAS_TR1_FUNCTIONAL
    -- Performing Test SITK_HAS_TR1_FUNCTIONAL - Success
    -- Performing Test SITK_HAS_TR1_TYPE_TRAITS
    -- Performing Test SITK_HAS_TR1_TYPE_TRAITS - Success
    -- Performing Test SITK_HAS_TR1_UNORDERED_MAP
    -- Performing Test SITK_HAS_TR1_UNORDERED_MAP - Success
    -- Looking for C++ include stdint.h
    -- Looking for C++ include stdint.h - found
    doc_path: /usr/share/doc/ITK-4.10
    CMake Warning at CMakeLists.txt:305 (message):
      Unable to file ITK's NOTICE File!
    
       This file will not be included in SimpleITK packaging!
    
    
    -- Performing Test SITK_UNDEFINED_SYMBOLS_ALLOWED - Success
    -- Found Tclsh: /usr/bin/tclsh (found version "8.6") 
    -- Found Lua: /usr/bin/lua  
    -- Processing json files...
    -- Processing json files...done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /tmp/SimpleITK/build
    
    make
    
    [ 78%] Building CXX object Code/BasicFilters/src/CMakeFiles/SimpleITKBasicFilters6.dir/sitkHistogramMatchingImageFilter.cxx.o
    In file included from /usr/include/ITK-4.10/itkHistogramMatchingImageFilter.h:22:0,
                     from /tmp/SimpleITK/build/Code/BasicFilters/src/sitkHistogramMatchingImageFilter.cxx:34:
    /usr/include/ITK-4.10/itkHistogram.h: In instantiation of ‘class itk::Statistics::Histogram<long int, itk::Statistics::DenseFrequencyContainer2>’:
    /usr/include/ITK-4.10/itkHistogramMatchingImageFilter.h:106:58:   required from ‘class itk::HistogramMatchingImageFilter<itk::Image<long int, 3u>, itk::Image<long int, 3u>, long int>’
    /tmp/SimpleITK/build/Code/BasicFilters/src/sitkHistogramMatchingImageFilter.cxx:151:32:   required from ‘itk::simple::Image itk::simple::HistogramMatchingImageFilter::ExecuteInternal(const itk::simple::Image&, const itk::simple::Image&) [with TImageType = itk::Image<long int, 3u>]’
    /tmp/SimpleITK/Code/Common/include/sitkDetail.h:39:36:   required from ‘TMemberFunctionPointer itk::simple::detail::MemberFunctionAddressor<TMemberFunctionPointer>::operator()() const [with TImageType = itk::Image<long int, 3u>; TMemberFunctionPointer = itk::simple::Image (itk::simple::HistogramMatchingImageFilter::*)(const itk::simple::Image&, const itk::simple::Image&)]’
    /tmp/SimpleITK/Code/Common/include/sitkMemberFunctionFactory.hxx:59:7:   required from ‘typename itk::simple::EnableIf<itk::simple::IsInstantiated<TPixelIDType, VImageDimension>::Value>::Type itk::simple::detail::MemberFunctionInstantiater<TMemberFunctionFactory, VImageDimension, TAddressor>::operator()(TPixelIDType*) const [with TPixelIDType = itk::simple::BasicPixelID<long int>; TMemberFunctionFactory = itk::simple::detail::MemberFunctionFactory<itk::simple::Image (itk::simple::HistogramMatchingImageFilter::*)(const itk::simple::Image&, const itk::simple::Image&)>; unsigned int VImageDimension = 3u; TAddressor = itk::simple::detail::MemberFunctionAddressor<itk::simple::Image (itk::simple::HistogramMatchingImageFilter::*)(const itk::simple::Image&, const itk::simple::Image&)>; typename itk::simple::EnableIf<itk::simple::IsInstantiated<TPixelIDType, VImageDimension>::Value>::Type = void]’
    /tmp/SimpleITK/Code/Common/include/Ancillary/TypeList.h:337:5:   recursively required from ‘void typelist::Visit<TTypeList>::operator()(const Predicate&) [with Predicate = itk::simple::detail::MemberFunctionInstantiater<itk::simple::detail::MemberFunctionFactory<itk::simple::Image (itk::simple::HistogramMatchingImageFilter::*)(const itk::simple::Image&, const itk::simple::Image&)>, 3u, itk::simple::detail::MemberFunctionAddressor<itk::simple::Image (itk::simple::HistogramMatchingImageFilter::*)(const itk::simple::Image&, const itk::simple::Image&)> >; TTypeList = typelist::TypeList<itk::simple::BasicPixelID<unsigned char>, typelist::TypeList<itk::simple::BasicPixelID<short int>, typelist::TypeList<itk::simple::BasicPixelID<short unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<int>, typelist::TypeList<itk::simple::BasicPixelID<unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<long int>, typelist::TypeList<itk::simple::BasicPixelID<long unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<float>, typelist::TypeList<itk::simple::BasicPixelID<double>, typelist::NullType> > > > > > > > >]’
    /tmp/SimpleITK/Code/Common/include/Ancillary/TypeList.h:337:5:   required from ‘void typelist::Visit<TTypeList>::operator()(const Predicate&) [with Predicate = itk::simple::detail::MemberFunctionInstantiater<itk::simple::detail::MemberFunctionFactory<itk::simple::Image (itk::simple::HistogramMatchingImageFilter::*)(const itk::simple::Image&, const itk::simple::Image&)>, 3u, itk::simple::detail::MemberFunctionAddressor<itk::simple::Image (itk::simple::HistogramMatchingImageFilter::*)(const itk::simple::Image&, const itk::simple::Image&)> >; TTypeList = typelist::TypeList<itk::simple::BasicPixelID<signed char>, typelist::TypeList<itk::simple::BasicPixelID<unsigned char>, typelist::TypeList<itk::simple::BasicPixelID<short int>, typelist::TypeList<itk::simple::BasicPixelID<short unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<int>, typelist::TypeList<itk::simple::BasicPixelID<unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<long int>, typelist::TypeList<itk::simple::BasicPixelID<long unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<float>, typelist::TypeList<itk::simple::BasicPixelID<double>, typelist::NullType> > > > > > > > > >]’
    /tmp/SimpleITK/Code/Common/include/sitkMemberFunctionFactory.hxx:127:16:   required from ‘void itk::simple::detail::MemberFunctionFactory<TMemberFunctionPointer>::RegisterMemberFunctions() [with TPixelIDTypeList = typelist::TypeList<itk::simple::BasicPixelID<signed char>, typelist::TypeList<itk::simple::BasicPixelID<unsigned char>, typelist::TypeList<itk::simple::BasicPixelID<short int>, typelist::TypeList<itk::simple::BasicPixelID<short unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<int>, typelist::TypeList<itk::simple::BasicPixelID<unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<long int>, typelist::TypeList<itk::simple::BasicPixelID<long unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<float>, typelist::TypeList<itk::simple::BasicPixelID<double>, typelist::NullType> > > > > > > > > >; unsigned int VImageDimension = 3u; TAddressor = itk::simple::detail::MemberFunctionAddressor<itk::simple::Image (itk::simple::HistogramMatchingImageFilter::*)(const itk::simple::Image&, const itk::simple::Image&)>; TMemberFunctionPointer = itk::simple::Image (itk::simple::HistogramMatchingImageFilter::*)(const itk::simple::Image&, const itk::simple::Image&)]’
    /tmp/SimpleITK/Code/Common/include/sitkMemberFunctionFactory.h:123:5:   required from ‘void itk::simple::detail::MemberFunctionFactory<TMemberFunctionPointer>::RegisterMemberFunctions() [with TPixelIDTypeList = typelist::TypeList<itk::simple::BasicPixelID<signed char>, typelist::TypeList<itk::simple::BasicPixelID<unsigned char>, typelist::TypeList<itk::simple::BasicPixelID<short int>, typelist::TypeList<itk::simple::BasicPixelID<short unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<int>, typelist::TypeList<itk::simple::BasicPixelID<unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<long int>, typelist::TypeList<itk::simple::BasicPixelID<long unsigned int>, typelist::TypeList<itk::simple::BasicPixelID<float>, typelist::TypeList<itk::simple::BasicPixelID<double>, typelist::NullType> > > > > > > > > >; unsigned int VImageDimension = 3u; TMemberFunctionPointer = itk::simple::Image (itk::simple::HistogramMatchingImageFilter::*)(const itk::simple::Image&, const itk::simple::Image&)]’
    /tmp/SimpleITK/build/Code/BasicFilters/src/sitkHistogramMatchingImageFilter.cxx:55:73:   required from here
    /usr/include/ITK-4.10/itkHistogram.h:285:8: error: ‘bool itk::Statistics::Histogram<TMeasurement, TFrequencyContainer>::IncreaseFrequency(const MeasurementVectorType&, itk::Statistics::Histogram<TMeasurement, TFrequencyContainer>::AbsoluteFrequencyType) [with TMeasurement = long int; TFrequencyContainer = itk::Statistics::DenseFrequencyContainer2; itk::Statistics::Histogram<TMeasurement, TFrequencyContainer>::MeasurementVectorType = itk::Array<long int>; itk::Statistics::Histogram<TMeasurement, TFrequencyContainer>::AbsoluteFrequencyType = long unsigned int]’ cannot be overloaded
       bool IncreaseFrequency(
            ^~~~~~~~~~~~~~~~~
    /usr/include/ITK-4.10/itkHistogram.h:279:8: error: with ‘bool itk::Statistics::Histogram<TMeasurement, TFrequencyContainer>::IncreaseFrequency(const IndexType&, itk::Statistics::Histogram<TMeasurement, TFrequencyContainer>::AbsoluteFrequencyType) [with TMeasurement = long int; TFrequencyContainer = itk::Statistics::DenseFrequencyContainer2; itk::Statistics::Histogram<TMeasurement, TFrequencyContainer>::IndexType = itk::Array<long int>; itk::Statistics::Histogram<TMeasurement, TFrequencyContainer>::AbsoluteFrequencyType = long unsigned int]’
       bool IncreaseFrequency(const IndexType & index,
            ^~~~~~~~~~~~~~~~~
    Code/BasicFilters/src/CMakeFiles/SimpleITKBasicFilters6.dir/build.make:542: recipe for target 'Code/BasicFilters/src/CMakeFiles/SimpleITKBasicFilters6.dir/sitkHistogramMatchingImageFilter.cxx.o' failed
    make[2]: *** [Code/BasicFilters/src/CMakeFiles/SimpleITKBasicFilters6.dir/sitkHistogramMatchingImageFilter.cxx.o] Error 1
    CMakeFiles/Makefile2:619: recipe for target 'Code/BasicFilters/src/CMakeFiles/SimpleITKBasicFilters6.dir/all' failed
    make[1]: *** [Code/BasicFilters/src/CMakeFiles/SimpleITKBasicFilters6.dir/all] Error 2
    Makefile:149: recipe for target 'all' failed
    make: *** [all] Error 2
    
    opened by ghisvail 111
  • ENH: Support adding Elastix component by CMake SimpleITK_USE_ELASTIX=ON

    ENH: Support adding Elastix component by CMake SimpleITK_USE_ELASTIX=ON

    Originally copied files from https://github.com/SuperElastix/SimpleElastix by Kasper Marstal (@kaspermarstal). Specifically, files at Code/ElastixTransformixWrappers are copied from https://github.com/SuperElastix/SimpleElastix/tree/a7cf5bdde891cb61e79848ad1dbe181c48778317/Code/Elastix

    Added to GitHub Actions and Azure Pipelines.

    opened by N-Dekker 42
  • ResampleImageFilter hangs in SimpleITK 2 and multiprocessing within PyTorch

    ResampleImageFilter hangs in SimpleITK 2 and multiprocessing within PyTorch

    If sitk.ResampleImageFilter is executed using PyTorch multiprocessing capabilities, the program hangs. This doesn't happen with SimpleITK 1.

    I have created a minimal working example, runnable online on Google Colab, here: https://gist.github.com/fepegar/77a81c967c92a7c7f0a150cf0152940f

    If you run the notebook as it is, it should hang in the last cell. If you add !pip install "SimpleITK<2" at the beginning of the notebook and run it, it should work.

    Please let me know if you need any further information.

    Bug Report 
    opened by fepegar 39
  • N4biasFieldCorrection: Inputs do not occupy the same physical space!

    N4biasFieldCorrection: Inputs do not occupy the same physical space!

    when i use the N4 Correction filter,the error will occur with some image in windows(in linux never show). Before I call the function, I print the origin、spacing of the mask and image,they are totally the same.

    Even i do not write the mask image : output = corrector.Execute(input) some image will also return the error. RuntimeError: Exception thrown in SimpleITK N4BiasFieldCorrectionImageFilter_Execute: c:\d\vs14-win64-pkg\simpleitk-build\itk-prefix\include\itk-4.13\itkImageToImageFilter.hxx:241: itk::ERROR: SubtractImageFilter(00000246299BDE10): Inputs do not occupy the same physical space! InputImage Origin: [-9.0000000e+01, 1.2600000e+02, -7.2000000e+01], InputImage_1 Origin: [-2.2625000e+01, 2.7125000e+01, -2.2625000e+01] Tolerance: 1.0000000e-06 InputImage Spacing: [1.0000000e+00, 1.0000000e+00, 1.0000000e+00], InputImage_1 Spacing: [2.2625000e+01, 2.7125000e+01, 2.2625000e+01] Tolerance: 1.0000000e-06

    I use the filter in a loop,when I reduce the MaximumNumberOfIterations ,the error shows will delay(before reduce it occur in the second image, after it occur in the fourth image ) . I think maybe it is a memory access error in windows , my version is 1.2 , my visual studio is visual studio 2015

    Confirmed Bug 
    opened by gourdchen 37
  • Cran preparations main

    Cran preparations main

    Some changes resulting from my efforts to make the package pass the tests.

    Vignette had some old indexing examples that are no longer legal.

    A bug fix at about R 3.2 has changed how the "methods" package should be imported

    I need to do more about explicitly exporting stuff from the package, as there is a lot that is used internally. Some of the issues may be dealt with by the optional namespace file swig can create, but it is somewhat broken and will require post processing.

    opened by richardbeare 32
  • Discussion about documentation

    Discussion about documentation

    Hi, Can you please give some instructions to build doxygen documentation of the project? I tried passing -DBUILD_DOXYGEN:BOOL=ON to cmake superbuild but it doesn't seem to work:

    -- Configuring done   
    -- Generating done      
    CMake Warning:     
    CMake Warning:  
      Manually-specified variables were not used by the project:    
                                       
        BUILD_DOXYGEN                          
                                                                   
    -- Build files have been written to: /home/users/sasank/simpleitk_lua/bb/build
    

    I am thinking of using doxygen xml to create sphinx documentation using breathe.

    Thanks in Advance, Sasank.

    PS: It'll be great if you can also upload xml output of doxygen.

    opened by chsasank 27
  • Python bindings documentation

    Python bindings documentation

    I was only able to find PDF version here: https://readthedocs.org/projects/simpleitk/downloads/pdf/master/

    This is... less than ideal. It prevents me from being able to refer to your classes from documentation in my project. Also, PDF is just an all-around awful format for documentation in terms of searching, indexing etc.

    Is there any reason you aren't publishing HTML documentation?

    Question 
    opened by wvxvw 23
  • Python wrapper does not load in UBuntu-Mate for Raspberry Pi3

    Python wrapper does not load in UBuntu-Mate for Raspberry Pi3

    I am building SITK on a Raspberry Pi3 with UBuntu-Mat 16.04. I am using clang3.8 as the compiler. The library only builds under the following conditions: a.) Shared module library is enabled If I disable this, then when I build the Python wrapper it gives me a linker error. So, I presume there is some linker error here.

    When I build it with shared library mode enabled, the build and installation happens successflly. When I try to load the module in Python 3.5 (default version in UBuntu Mate), I get the following error:

    Type "help", "copyright", "credits" or "license" for more information.

    import SimpleITK Traceback (most recent call last): File "", line 1, in File "/home/Downloads/bin/SimpleITK/lib/SimpleITK.py", line 28, in _SimpleITK = swig_import_helper() File "/home/naths/Downloads/bin/SimpleITK/lib/SimpleITK.py", line 24, in swig_import_helper _mod = imp.load_module('_SimpleITK', fp, pathname, description) File "/usr/lib/python3.5/imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic return _load(spec) ImportError: libSimpleITKBasicFilters13-0.10.so.1: cannot open shared object file: No such file or directory

    What could I be doing wrong here?

    opened by skn123 23
  • Error with Superbuild

    Error with Superbuild

    Hi. I just wanted to test last simpleITK, because the new release is coming soon. Had no time to look into this earlier, so sorry if I am a little bit late.

    When building master with homebrew, I get the following error

    -- Configuring done CMake Error in Code/Explicit/src/CMakeLists.txt: Target "SimpleITKExplicit" INTERFACE_INCLUDE_DIRECTORIES property contains path: "/tmp/simpleitk-20170405-63774-kll36r/sitk-build/ITK-prefix/include/ITK-4.11" which is prefixed in the source directory. -- Generating done

    This seems to be OK outside of homebrew. Maybe the error will give a hint of the problem.

    Confirmed Bug Won't Fix 
    opened by iMichka 21
  • Fix configuration error when Python wrapping is enabled

    Fix configuration error when Python wrapping is enabled

    3D Slicer often failed to build due to SimpleITK configuration error (mostly on Windows, when building in debug mode, see https://github.com/Slicer/Slicer/issues/5498) with this or similar messages:

      Performing configure step for 'SimpleITK'
      loading initial cache file C:/D/S4D/SimpleITK-prefix/tmp/SimpleITK-cache-Debug.cmake
      -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
      CMake Error at C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
        Could NOT find Python3 (missing: Python3_EXECUTABLE Python3_LIBRARIES
        Python3_INCLUDE_DIRS Interpreter Development.Module) (Required is at least
        version "3.6")
      Call Stack (most recent call first):
        C:/Program Files/CMake/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
        C:/Program Files/CMake/share/cmake-3.21/Modules/FindPython/Support.cmake:3166 (find_package_handle_standard_args)
        C:/Program Files/CMake/share/cmake-3.21/Modules/FindPython3.cmake:485 (include)
        C:/D/S4D/VTK-build/lib/cmake/vtk-9.0/VTK-vtk-module-find-packages.cmake:303 (find_package)
        C:/D/S4D/VTK-build/lib/cmake/vtk-9.0/vtk-config.cmake:144 (include)
        C:/D/S4D/VTK-build/vtk-config.cmake:1 (include)
        C:/D/S4D/ITK-build/lib/cmake/ITK-5.2/Modules/ITKVtkGlue.cmake:30 (find_package)
        C:/D/S4D/ITK/CMake/ITKModuleAPI.cmake:76 (include)
        C:/D/S4D/ITK/CMake/ITKModuleAPI.cmake:31 (itk_module_load)
        C:/D/S4D/ITK/CMake/ITKModuleAPI.cmake:129 (_itk_module_config_recurse)
        C:/D/S4D/ITK-build/ITKConfig.cmake:80 (itk_module_config)
        SuperBuild.cmake:368 (find_package)
        CMakeLists.txt:39 (include)
      -- Configuring incomplete, errors occurred!
    
    

    The problem is that Slicer builds its Python interpreter that FindPython3.cmake cannot find, because it is not installed in a standard locations, because it does not get the Python3_EXECUTABLE hint. Slicer's build system sets Python3_EXECUTABLE in the top-level SimpleITK project, but the variable is not passed on to the internal SimpleITK-build project.

    The problem is fixed by passing on Python3_EXECUTABLE to the internal SimpleITK-build project (similarly to how SWIG_EXECUTABLE is passed).

    opened by lassoan 20
  • Support for Apple Silicon arm64 architecture in pip wheels

    Support for Apple Silicon arm64 architecture in pip wheels

    I was able to successfully compile SimpleITK from source on a new Apple Silicon M1 CPU, including Python wrapping. However, installing from pypi using pip fails.

    Steps to reproduce:

    • Apple MacBook Air 2020 with M1 CPU
    • macOS 11.2.3
    • Miniforge3-MacOSX-arm64
    conda create --name sitk python=3.8
    conda activate sitk
    conda install scikit-build
    CC=clang CXX=clang++ pip install simpleitk
    

    It fails with the following error:

    Undefined symbols for architecture arm64:
          "_png_init_filter_functions_neon", referenced from:
              _itk_png_read_filter_row in libitkpng-4.13.a(pngrutil.c.o)
        ld: symbol(s) not found for architecture arm64
        clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    Full output attached:
    sitk_pip_apple_silicon.log.zip

    opened by mlaves 20
  • Tests fail to run: Target

    Tests fail to run: Target "SimpleITKUnitTestBase" links to: GTest::GTest but the target was not found.

    
    CMake Error at Testing/Unit/TestBase/CMakeLists.txt:9 (target_link_libraries):
      Target "SimpleITKUnitTestBase" links to:
    
        GTest::GTest
    
      but the target was not found.  Possible reasons include:
    
        * There is a typo in the target name.
        * A find_package call is missing for an IMPORTED target.
        * An ALIAS target is missing.
    
    
    
    CMake Error at Testing/Unit/TestBase/CMakeLists.txt:29 (target_link_libraries):
      Target "sitkCompareDriver" links to:
    
        GTest::GTest
    
      but the target was not found.  Possible reasons include:
    
        * There is a typo in the target name.
        * A find_package call is missing for an IMPORTED target.
        * An ALIAS target is missing.
    

    The project was first built with -DBUILD_TESTING=OFF, then reconfigured with -DBUILD_TESTING=ON.

    simpleitk-2.2.1 googletest-1.12.1 clang-14 FreeBSD 13.1

    opened by yurivict 0
  • The test

    The test "Python.Test.ArrayView" is failing in CI.

    The test failure is producing the following output:

    1040: FAIL: test_arrayview_writable (__main__.TestNumpySimpleITKMemoryviewInterface.test_arrayview_writable)
    1040: Test correct behavior of writablity to the returned array view.
    1040: ----------------------------------------------------------------------
    1040: Traceback (most recent call last):
    1040:   File "/Users/blowekamp/src/SimpleITK/Testing/Unit/Python/sitkGetArrayViewFromImageTest.py", line 132, in test_arrayview_writable
    1040:     with self.assertRaises(ValueError):
    1040: AssertionError: ValueError not raised
    1040: 
    1040: ----------------------------------------------------------------------
    1040: Ran 5 tests in 0.072s
    

    It appears a.fill(0) is being executed on the read-only array view of the SimpleITK buffer.

    opened by blowekamp 2
  • Include the DicomImagePrintTags.py output in Sphinx docs

    Include the DicomImagePrintTags.py output in Sphinx docs

    Added sphinx_exec_code directive and used it to run the Python example as a subprocess in the rst file using the Image0075.dcm as input.

    Fixes issue #1798.

    opened by mbopfNIH 5
  • How may I select the chest CT series from multiple series

    How may I select the chest CT series from multiple series

    Suppose I have one directory (folder) for each patient, and each patient many have several series; for example, one patient have chest CT, head CT; while the other one has the abdominal CT and Chest CT. I have thousands of such patient. Is there any efficient method to read all chest CT for all patients?

    I found some common features of chest CT, it usually have the largest length and the size of each slice is usually below 800; so I write the following code to extract Chest CT:

    dtfile=NULL
    for (case_id in sampleNames) {
      data_directory = paste(
        "/Users/zhangzhongheng/Documents/2022/ARDS_CT_radiomics/ARDS影像",case_id,sep = "/")
      series_IDs = SimpleITK::ImageSeriesReader_GetGDCMSeriesIDs(data_directory) 
      series_file_names = NULL
      for (Series in series_IDs) {
        SeriesSel = Series
        series_file_names1 =
          ImageSeriesReader_GetGDCMSeriesFileNames(data_directory,Series)
        if(length(series_file_names1) > length(series_file_names) &
           length(series_file_names1) <= 160 &
           median(file.size(series_file_names1)/1024)<800){
        SeriesSel = Series
        series_file_names = series_file_names1
        }
        cat(".")
      }
      dtfile1 = NULL
    for (filename in series_file_names) {
      dtfile2 = data.frame("CaseID"=case_id,
                           "SerisID" = SeriesSel,
                           "fileName" = filename, 
                           "Size" = file.size(filename))
      dtfile1 = rbind(dtfile1,dtfile2)
      }
      dtfile1 <- dtfile1 %>% 
        dplyr::mutate(Size=round(Size/10240)) %>% 
        filter(abs(Size - median(Size))<2)
      dtfile <- rbind(dtfile,dtfile1)
      cat("#")
    }
    

    However, that does not work well for all patient, for some patient the abdominal series have greater number of slices than chest CT. So I would like to seek help here to see anyone may encounter similar issue.

    Question 
    opened by zh-zhang1984 5
  • FastMarchingUpwindGradient (Python) is broken as of 2.2

    FastMarchingUpwindGradient (Python) is broken as of 2.2

    Test script to run after installing SimpleITK 2.2.0 or 2.2.1:

    import SimpleITK as sitk
    
    sitkImg = sitk.GridSource()
    trialPoints = [(0, 0, 0)]
    targetPoints = [(2, 0, 10)]
    gradientImg = sitk.FastMarchingUpwindGradient(sitkImg, trialPoints, 1, targetPoints)
    print("successfully obtained gradient image")
    

    Resulting output:

    Traceback (most recent call last): File "/home/agilman/test/simpleitk/./sitk_test.py", line 8, in <module> gradientImg = sitk.FastMarchingUpwindGradient(sitkImg, trialPoints, 1, targetPoints) File "/home/agilman/test/simpleitk/venv/lib/python3.9/site-packages/SimpleITK/SimpleITK.py", line 26008, in FastMarchingUpwindGradient return _SimpleITK.FastMarchingUpwindGradient(*args, **kwargs) RuntimeError: Exception thrown in SimpleITK FastMarchingUpwindGradient: /tmp/SimpleITK-build/ITK-prefix/include/ITK-5.3/itkFastMarchingUpwindGradientImageFilter.h:267: ITK ERROR: FastMarchingUpwindGradientImageFilter(0x5633f9ea66f0): No target point set. Cannot set the target reached mode.

    With SimpleITK 2.1.1.2, the success message is printed.

    Bug Report Confirmed Bug 
    opened by alex-gilman 2
Releases(latest)
A simple image-level annotation tool supporting multi-channel images for napari.

napari-labelimg4classification A simple image-level annotation tool supporting multi-channel images for napari. This napari plugin was generated with

null 4 May 16, 2022
Simple mathematical operations on image, point and surface layers.

napari-math This package provides a GUI interfrace for simple mathematical operations on image, point and surface layers. addition subtraction multipl

Zach Marin 2 Jan 18, 2022
Easily turn large sets of image urls to an image dataset. Can download, resize and package 100M urls in 20h on one machine.

img2dataset Easily turn large sets of image urls to an image dataset. Can download, resize and package 100M urls in 20h on one machine. Also supports

Romain Beaumont 1.4k Jan 1, 2023
Tool that takes your photo and generates a pixelated color by number photo.

Color by number Tool that takes your photo and generates a pixelated color by number photo. Requirements You need to have python installed on your com

null 1 Dec 18, 2021
A Robust Avatar Generator with a huge number of templates

CoolAvatars Welcome to this repository of CoolAvatars. Using this project, you can generate cool avatars not only from the samples present in my image

RAVI PRAKASH 5 Oct 12, 2021
CropImage is a simple toolkit for image cropping, detecting and cropping main body from pictures.

CropImage is a simple toolkit for image cropping, detecting and cropping main body from pictures. Support face and saliency detection.

Haofan Wang 15 Dec 22, 2022
Django helper application to easily and non-destructively crop arbitrarily large images in admin and frontend.

django-image-cropping django-image-cropping is an app for cropping uploaded images via Django's admin backend using Jcrop. Screenshot: django-image-cr

Jonas und der Wolf GmbH 546 Jan 3, 2023
Nanosensor Image Processor (NanoImgPro), a python-based image analysis tool for dopamine nanosensors

NanoImgPro Nanosensor Image Processor (NanoImgPro), a python-based image analysis tool for dopamine nanosensors NanoImgPro.py contains the main class

null 1 Mar 2, 2022
A large-scale dataset of both raw MRI measurements and clinical MRI images

fastMRI is a collaborative research project from Facebook AI Research (FAIR) and NYU Langone Health to investigate the use of AI to make MRI scans faster. NYU Langone Health has released fully anonymized knee and brain MRI datasets that can be downloaded from the fastMRI dataset page. Publications associated with the fastMRI project can be found at the end of this README.

Facebook Research 907 Jan 4, 2023
A utility for quickly cropping large collections of images.

Crop Tool A utility for quickly cropping large collections of images. Inspired by Derrick Schultz's dataset-tools. Setup It's suggested that you use A

dusk (they/them) 6 Nov 14, 2021
Goddard Image Analysis and Navigation Tool

Copyright 2021 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. No copyright is clai

NASA 12 Dec 23, 2022
impy is an all-in-one image analysis library, equipped with parallel processing, GPU support, GUI based tools and so on.

impy is All You Need in Image Analysis impy is an all-in-one image analysis library, equipped with parallel processing, GPU support, GUI based tools a

null 24 Dec 20, 2022
Open source software for image correlation, distance and analysis

Douglas-Quaid Project Open source software for image correlation, distance and analysis. Strongly related to : Carl-Hauser Problem statement (@CIRCL)

Dominik Dancs 2 May 1, 2022
vsketch is a Python generative art toolkit for plotters

Generative plotter art environment for Python

Antoine Beyeler 380 Dec 29, 2022
Multiparametric Image Analysis

Documentation The documentation is available on populse_mia's website here Installation From PyPI, for users By cloning the package, for developers Fr

Populse 9 Dec 14, 2022
Python-based tools for document analysis and OCR

ocropy OCRopus is a collection of document analysis programs, not a turn-key OCR system. In order to apply it to your documents, you may need to do so

OCRopus 3.2k Jan 4, 2023
QSIprep: Preprocessing and analysis of q-space images

QSIprep: Preprocessing and analysis of q-space images Full documentation at https://qsiprep.readthedocs.io About qsiprep configures pipelines for proc

 Lifespan Informatics and Neuroimaging Center 88 Dec 15, 2022
kikuchipy is an open-source Python library for processing and analysis of electron backscatter diffraction (EBSD) patterns

kikuchipy is an open-source Python library for processing and analysis of electron backscatter diffraction (EBSD) patterns. The library builds on the

pyxem 53 Dec 29, 2022
Seaborn-image is a Python image visualization library based on matplotlib and provides a high-level API to draw attractive and informative images quickly and effectively.

seaborn-image: image data visualization Description Seaborn-image is a Python image visualization library based on matplotlib and provides a high-leve

null 48 Jan 5, 2023