https://public.kitware.com/Wiki/api.php?action=feedcontributions&user=IMichka&feedformat=atomKitwarePublic - User contributions [en]2024-03-28T21:27:13ZUser contributionsMediaWiki 1.38.6https://public.kitware.com/Wiki/index.php?title=ITK_Release_5/Wish_List&diff=60929ITK Release 5/Wish List2016-10-10T21:38:37Z<p>IMichka: </p>
<hr />
<div>The wish list is provided by members of the ITK development community.<br />
These requests will not necessarily be included in ITKv5.<br />
<br />
== Outstanding wishes ==<br />
A detailed wish list was put together by the community when preparing for ITK v4. Many of the wishes expressed there could not be fulfilled at the time but are still valid:<br />
* https://itk.org/Wiki/ITK_Release_4/Wish_List<br />
<br />
== Image IO ==<br />
* Replacing current integer pixel IO types defined in itk::ImageIOBase by fixed width integer types<br />
** unsigned short -> uint16_t<br />
** short -> int16_t<br />
** unsigned int -> uint32_t<br />
** int -> int32_t<br />
** unsigned long -> uint64_t<br />
** long -> int64_t<br />
** Portability issue of "char", "signed char" and "unsigned char" need to be discussed and addressed before using uint8_t and int8_t<br />
*** ''char'' and ''unsigned char'' would keep being defined as ''char'' and ''unsigned char'' as these types is wildly use image formats.<br />
* Currently, the size of each type may vary from one platform to another.<br />
* This is especially true for 'long' that is 32 bits on Windows/Visual Studio C++ 2013 (64 bits) but 64 bits on 64 bits Unix systems. <br />
* Files saved on one platform should be read the same on a different platform.<br />
* This would avoid having to compare `sizeof(mytype)` to know what type to use on a specific platform.<br />
* This issue was raised in [http://review.source.kitware.com/#/c/21513/ this patch suggestion]<br />
<br />
== C++11 throughout ==<br />
As ITK uses templates heavily, it would greatly benefit from usage of few C++11 goodies, especially '''auto''' and '''decltype'''.<br />
<br />
To take a step further, requiring the latest c++ standard (C++14? C++17?) available when starting a v5 endeavour could also be discussed.<br />
<br />
Note: Some c++ >= 11 features may not be supported by CastXML (and by pygccxml): https://github.com/CastXML/CastXML/issues/72<br />
Before implementing fancy stuff it should be double-checked if it does not break the Wrappings.<br />
<br />
== VNL->Eigen ==<br />
Replace VNL by [http://eigen.tuxfamily.org/ Eigen], which is much more modern.<br />
<br />
== Wrapping ==<br />
* Take into account default template arguments in Python wrappings. See http://review.source.kitware.com/#/c/21606/ for discussion.</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK_Release_5/Wish_List&diff=60854ITK Release 5/Wish List2016-09-13T15:27:52Z<p>IMichka: Add a note about CastXML and c++11</p>
<hr />
<div>The wish list is provided by members of the ITK development community.<br />
These requests will not necessarily be included in ITKv5.<br />
<br />
== Outstanding wishes ==<br />
A detailed wish list was put together by the community when preparing for ITK v4. Many of the wishes expressed there could not be fulfilled at the time but are still valid:<br />
* https://itk.org/Wiki/ITK_Release_4/Wish_List<br />
<br />
== Image IO ==<br />
* Replacing current integer pixel IO types defined in itk::ImageIOBase by fixed width integer types<br />
** unsigned short -> uint16_t<br />
** short -> int16_t<br />
** unsigned int -> uint32_t<br />
** int -> int32_t<br />
** unsigned long -> uint64_t<br />
** long -> int64_t<br />
** ''char'' and ''unsigned char'' would keep being defined as ''char'' and ''unsigned char'' as these types is wildly use image formats.<br />
* Currently, the size of each type may vary from one platform to another.<br />
* This is especially true for 'long' that is 32 bits on Windows/Visual Studio C++ 2013 (64 bits) but 64 bits on 64 bits Unix systems. <br />
* Files saved on one platform should be read the same on a different platform.<br />
* This would avoid having to compare `sizeof(mytype)` to know what type to use on a specific platform.<br />
* This issue was raised in [http://review.source.kitware.com/#/c/21513/ this patch suggestion]<br />
<br />
== C++11 throughout ==<br />
As ITK uses templates heavily, it would greatly benefit from usage of few C++11 goodies, especially '''auto''' and '''decltype'''.<br />
<br />
To take a step further, requiring the latest c++ standard (C++14? C++17?) available when starting a v5 endeavour could also be discussed.<br />
<br />
Note: Some c++ >= 11 features may not be supported by CastXML (and by pygccxml): https://github.com/CastXML/CastXML/issues/72<br />
Before implementing fancy stuff it should be double-checked if it does not break the Wrappings.<br />
<br />
== VNL->Eigen ==<br />
Replace VNL by [http://eigen.tuxfamily.org/ Eigen], which is much more modern.</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/WrapITKInstallLinux&diff=56933ITK/WrapITKInstallLinux2014-10-16T10:07:19Z<p>IMichka: </p>
<hr />
<div>= Installation Linux =<br />
<br />
This section describes how to install ITK with python wrappings on Fedora 19 or 20, or Ubuntu 14.<br />
This can of course be extended to other Linuxes.<br />
<br />
== Step 1: Dependencies ==<br />
<br />
Fedora 20 has very few packages installed y default, so you may have to install them manually.<br />
<br />
'''On Fedora 20:'''<br />
* yum install gcc<br />
* yum install python-devel<br />
* yum install vxl<br />
<br />
Python will need to be installed along with the Python development headers (Python.h), which is not the case on most platforms:<br />
* Install the '''python-devel''' package.<br />
<br />
== Step 2: Setup the build ==<br />
<br />
Clone the git repository in /home/yourname/ITK:<br />
* cd<br />
* git clone git://itk.org/ITK.git<br />
* git checkout tags/v4.5.2 # Optional, if you want to use a stable version<br />
<br />
Create a build directory, it is recommended to build outside of the source directory:<br />
* mkdir build<br />
* cd build<br />
<br />
Use cmake to configure your build<br />
* ccmake ../ITK -DITK_WRAP_PYTHON=ON<br />
<br />
Set different variables, you may have to configure [C] the build 2 or 3 times.<br />
Use the advanced mode [T] to see all the possibilities.<br />
<br />
* ITK_WRAP_PYTHON = ON<br />
* BUILD_SHARED_LIBS = ON<br />
* PYTHON_EXECUTABLE = /usr/bin/python<br />
* USE_SYSTEM_SWIG=OFF # Will use ITK's swig (recommended)<br />
<br />
'''On Fedora 19 or 20:'''<br />
* PYTHON_INCLUDE_DIR = /usr/include/python2.7<br />
* PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib64/python2.7/site-packages<br />
<br />
'''On Ubuntu 14:'''<br />
* PYTHON_INCLUDE_DIR = /usr/include/x86_64-linux-gnu/python2.7<br />
* PYTHON_LIBRARY = /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib/python2.7/dist-packages<br />
<br />
Once configuration is finished, you may now generate the needed files by pressing [g].<br />
<br />
== Step 3: Run the build ==<br />
<br />
* make<br />
<br />
== Step 4: Install ==<br />
<br />
You need to have root access to install ITK (if you left the default installation path):<br />
<br />
'''On Fedora:'''<br />
* su # Type your root password<br />
* make install<br />
<br />
'''On Ubuntu:'''<br />
Here, the super-user account is disabled by default, run the install step like this:<br />
* sudo make install # Type your root password<br />
<br />
ITK will install by default in /usr/local/lib.<br />
Now, you have to tell the system that the files have been installed here.<br />
<br />
* cd /etc/ld.so.conf.d/<br />
* add a file called itk-46.conf, which should contain only one line: /usr/local/lib<br />
* ldconfig # tells the system to read the files in ld.so.conf.d<br />
<br />
== Step 5: Test your installation ==<br />
<br />
* python<br />
* import itk<br />
* itk.Image<br />
<br />
This should run without producing an error.<br />
<br />
{{ITK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/WrapITKInstallLinux&diff=56915ITK/WrapITKInstallLinux2014-10-07T09:35:24Z<p>IMichka: </p>
<hr />
<div>= Installation Linux =<br />
<br />
This section describes how to install ITK with python wrappings on Fedora 19 or 20, or Ubuntu 14.<br />
This can of course be extended to other Linuxes.<br />
<br />
== Step 1: Make sure the python headers are installed ==<br />
<br />
Python will need to be installed along with the Python development headers (Python.h).<br />
<br />
* Install the '''python-devel''' package.<br />
<br />
== Step 2: Setup the build ==<br />
<br />
Clone the git repository in /home/yourname/ITK:<br />
* cd<br />
* git clone git://itk.org/ITK.git<br />
* git checkout tags/v4.5.2 # Optional, if you want to use a stable version<br />
<br />
Create a build directory, it is recommended to build outside of the source directory:<br />
* mkdir build<br />
* cd build<br />
<br />
Use cmake to configure your build<br />
* ccmake ../ITK -DITK_WRAP_PYTHON=ON<br />
<br />
Set different variables, you may have to configure [C] the build 2 or 3 times.<br />
Use the advanced mode [T] to see all the possibilities.<br />
<br />
* ITK_WRAP_PYTHON = ON<br />
* BUILD_SHARED_LIBS = ON<br />
* PYTHON_EXECUTABLE = /usr/bin/python<br />
* USE_SYSTEM_SWIG=OFF # Will use ITK's swig (recommended)<br />
<br />
'''On Fedora 19 or 20:'''<br />
* PYTHON_INCLUDE_DIR = /usr/include/python2.7<br />
* PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib64/python2.7/site-packages<br />
<br />
'''On Ubuntu 14:'''<br />
* PYTHON_INCLUDE_DIR = /usr/include/x86_64-linux-gnu/python2.7<br />
* PYTHON_LIBRARY = /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib/python2.7/dist-packages<br />
<br />
Once configuration is finished, you may now generate the needed files by pressing [g].<br />
<br />
== Step 3: Run the build ==<br />
<br />
* make<br />
<br />
== Step 4: Install ==<br />
<br />
You need to have root access to install ITK (if you left the default installation path):<br />
<br />
'''On Fedora:'''<br />
* su # Type your root password<br />
* make install<br />
<br />
'''On Ubuntu:'''<br />
Here, the super-user account is disabled by default, run the install step like this:<br />
* sudo make install # Type your root password<br />
<br />
ITK will install by default in /usr/local/lib.<br />
Now, you have to tell the system that the files have been installed here.<br />
<br />
* cd /etc/ld.so.conf.d/<br />
* add a file called itk-46.conf, which should contain only one line: /usr/local/lib<br />
* ldconfig # tells the system to read the files in ld.so.conf.d<br />
<br />
== Step 5: Test your installation ==<br />
<br />
* python<br />
* import itk<br />
* itk.Image<br />
<br />
This should run without producing an error.<br />
<br />
{{ITK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/WrapITKInstallLinux&diff=56914ITK/WrapITKInstallLinux2014-10-07T08:33:18Z<p>IMichka: </p>
<hr />
<div>= Installation Linux =<br />
<br />
This section describes how to install ITK with python wrappings on Fedora 19 or 20, or Ubuntu 14.<br />
This can of course be extended to other Linuxes.<br />
<br />
== Step 1: Make sure the python headers are installed ==<br />
<br />
Python will need to be installed along with the Python development headers (Python.h).<br />
<br />
* Install the '''python-devel''' package.<br />
<br />
== Step 2: Setup the build ==<br />
<br />
Clone the git repository in /home/yourname/ITK:<br />
* cd<br />
* git clone git://itk.org/ITK.git<br />
* git checkout tags/v4.5.2 # Optional, if you want to use a stable version<br />
<br />
Create a build directory, it is recommended to build outside of the source directory:<br />
* mkdir build<br />
* cd build<br />
<br />
Use cmake to configure your build<br />
* ccmake ../ITK -DITK_WRAPPING_PYTHON=ON<br />
<br />
Set different variables, you may have to configure [C] the build 2 or 3 times.<br />
Use the advanced mode [T] to see all the possibilities.<br />
<br />
* ITK_WRAP_PYTHON = ON<br />
* BUILD_SHARED_LIBS = ON<br />
* PYTHON_EXECUTABLE = /usr/bin/python<br />
* USE_SYSTEM_SWIG=OFF # Will use ITK's swig (recommended)<br />
<br />
'''On Fedora 19 or 20:'''<br />
* PYTHON_INCLUDE_DIR = /usr/include/python2.7<br />
* PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib64/python2.7/site-packages<br />
<br />
'''On Ubuntu 14:'''<br />
* PYTHON_INCLUDE_DIR = /usr/include/x86_64-linux-gnu/python2.7<br />
* PYTHON_LIBRARY = /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib/python2.7/dist-packages<br />
<br />
Once configuration is finished, you may now generate the needed files by pressing [g].<br />
<br />
== Step 3: Run the build ==<br />
<br />
* make<br />
<br />
== Step 4: Install ==<br />
<br />
You need to have root access to install ITK (if you left the default installation path):<br />
<br />
'''On Fedora:'''<br />
* su # Type your root password<br />
* make install<br />
<br />
'''On Ubuntu:'''<br />
Here, the super-user account is disabled by default, run the install step like this:<br />
* sudo make install # Type your root password<br />
<br />
ITK will install by default in /usr/local/lib.<br />
Now, you have to tell the system that the files have been installed here.<br />
<br />
* cd /etc/ld.so.conf.d/<br />
* add a file called itk-46.conf, which should contain only one line: /usr/local/lib<br />
* ldconfig # tells the system to read the files in ld.so.conf.d<br />
<br />
== Step 5: Test your installation ==<br />
<br />
* python<br />
* import itk<br />
* itk.Image<br />
<br />
This should run without producing an error.<br />
<br />
{{ITK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/WrapITKInstallLinux&diff=56900ITK/WrapITKInstallLinux2014-10-02T22:06:46Z<p>IMichka: </p>
<hr />
<div>= Installation Linux =<br />
<br />
This section describes how to install ITK with python wrappings on Fedora 19 or 20, or Ubuntu 14.<br />
This can of course be extended to other Linuxes.<br />
<br />
== Step 1: Make sure the python headers are installed ==<br />
<br />
Python will need to be installed along with the Python development headers (Python.h).<br />
<br />
* Install the '''python-devel''' package.<br />
<br />
== Step 2: Setup the build ==<br />
<br />
Clone the git repository in /home/yourname/ITK:<br />
* cd<br />
* git clone git://itk.org/ITK.git<br />
* git checkout tags/v4.5.2 # Optional, if you want to use a stable version<br />
<br />
Create a build directory, it is recommended to build outside of the source directory:<br />
* mkdir build<br />
* cd build<br />
<br />
Use cmake to configure your build<br />
* ccmake ../ITK<br />
<br />
Set different variables, you may have to configure [C] the build 2 or 3 times.<br />
Use the advanced mode [T] to see all the possibilities.<br />
<br />
* ITK_WRAP_PYTHON = ON<br />
* BUILD_SHARED_LIBS = ON<br />
* PYTHON_EXECUTABLE = /usr/bin/python<br />
* USE_SYSTEM_SWIG=OFF # Will use ITK's swig (recommended)<br />
<br />
'''On Fedora 19 or 20:'''<br />
* PYTHON_INCLUDE_DIR = /usr/include/python2.7<br />
* PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib64/python2.7/site-packages<br />
<br />
'''On Ubuntu 14:'''<br />
* PYTHON_INCLUDE_DIR = /usr/include/x86_64-linux-gnu/python2.7<br />
* PYTHON_LIBRARY = /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib/python2.7/dist-packages<br />
<br />
Once configuration is finished, you may now generate the needed files by pressing [g].<br />
<br />
== Step 3: Run the build ==<br />
<br />
* make<br />
<br />
== Step 4: Install ==<br />
<br />
You need to have root access to install ITK (if you left the default installation path):<br />
<br />
'''On Fedora:'''<br />
* su # Type your root password<br />
* make install<br />
<br />
'''On Ubuntu:'''<br />
Here, the super-user account is disabled by default, run the install step like this:<br />
* sudo make install # Type your root password<br />
<br />
ITK will install by default in /usr/local/lib.<br />
Now, you have to tell the system that the files have been installed here.<br />
<br />
* cd /etc/ld.so.conf.d/<br />
* add a file called itk-46.conf, which should contain only one line: /usr/local/lib<br />
* ldconfig # tells the system to read the files in ld.so.conf.d<br />
<br />
== Step 5: Test your installation ==<br />
<br />
* python<br />
* import itk<br />
* itk.Image<br />
<br />
This should run without producing an error.<br />
<br />
{{ITK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/WrapITKInstallLinux&diff=56888ITK/WrapITKInstallLinux2014-09-30T13:45:59Z<p>IMichka: Python include dir</p>
<hr />
<div>= Installation Linux =<br />
<br />
This section describes how to install ITK with python wrappings on Fedora 19 or 20, or Ubuntu 14.<br />
This can of course be extended to other Linuxes.<br />
<br />
== Step 1: Make sure the python headers are installed ==<br />
<br />
Python will need to be installed along with the Python development headers (Python.h).<br />
<br />
* Install the '''python-devel''' package.<br />
<br />
== Step 2: Setup the build ==<br />
<br />
Clone the git repository in /home/yourname/ITK:<br />
* cd<br />
* git clone git://itk.org/ITK.git<br />
* git checkout tags/v4.5.2 # Optional, if you want to use a stable version<br />
<br />
Create a build directory, it is recommended to build outside of the source directory:<br />
* mkdir build<br />
* cd build<br />
<br />
Use cmake to configure your build<br />
* ccmake ../ITK<br />
<br />
Set different variables, you may have to configure [C] the build 2 or 3 times.<br />
Use the advanced mode [T] to see all the possibilities.<br />
<br />
* ITK_WRAP_PYTHON = ON<br />
* BUILD_SHARED_LIBS = ON # Is ON by default since ITK 4.6 when you use wrapping<br />
* PYTHON_EXECUTABLE = /usr/bin/python<br />
* USE_SYSTEM_SWIG=OFF # Will use ITK's swig (recommended)<br />
<br />
'''On Fedora 19 or 20:'''<br />
* PYTHON_INCLUDE_DIR = /usr/include/python2.7<br />
* PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib64/python2.7/site-packages<br />
<br />
'''On Ubuntu 14:'''<br />
* PYTHON_INCLUDE_DIR = /usr/include/x86_64-linux-gnu/python2.7<br />
* PYTHON_LIBRARY = /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib/python2.7/dist-packages<br />
<br />
Once configuration is finished, you may now generate the needed files by pressing [g].<br />
<br />
== Step 3: Run the build ==<br />
<br />
* make<br />
<br />
== Step 4: Install ==<br />
<br />
You need to have root access to install ITK (if you left the default installation path):<br />
<br />
'''On Fedora:'''<br />
* su # Type your root password<br />
* make install<br />
<br />
'''On Ubuntu:'''<br />
Here, the super-user account is disabled by default, run the install step like this:<br />
* sudo make install # Type your root password<br />
<br />
ITK will install by default in /usr/local/lib.<br />
Now, you have to tell the system that the files have been installed here.<br />
<br />
* cd /etc/ld.so.conf.d/<br />
* add a file called itk-46.conf, which should contain only one line: /usr/local/lib<br />
* ldconfig # tells the system to read the files in ld.so.conf.d<br />
<br />
== Step 5: Test your installation ==<br />
<br />
* python<br />
* import itk<br />
* itk.Image<br />
<br />
This should run without producing an error.<br />
<br />
{{ITK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/WrapITKInstallLinux&diff=56887ITK/WrapITKInstallLinux2014-09-30T13:45:10Z<p>IMichka: Update for Ubuntu</p>
<hr />
<div>= Installation Linux =<br />
<br />
This section describes how to install ITK with python wrappings on Fedora 19 or 20, or Ubuntu 14.<br />
This can of course be extended to other Linuxes.<br />
<br />
== Step 1: Make sure the python headers are installed ==<br />
<br />
Python will need to be installed along with the Python development headers (Python.h).<br />
<br />
* Install the '''python-devel''' package.<br />
<br />
== Step 2: Setup the build ==<br />
<br />
Clone the git repository in /home/yourname/ITK:<br />
* cd<br />
* git clone git://itk.org/ITK.git<br />
* git checkout tags/v4.5.2 # Optional, if you want to use a stable version<br />
<br />
Create a build directory, it is recommended to build outside of the source directory:<br />
* mkdir build<br />
* cd build<br />
<br />
Use cmake to configure your build<br />
* ccmake ../ITK<br />
<br />
Set different variables, you may have to configure [C] the build 2 or 3 times.<br />
Use the advanced mode [T] to see all the possibilities.<br />
<br />
* ITK_WRAP_PYTHON = ON<br />
* BUILD_SHARED_LIBS = ON # Is ON by default since ITK 4.6 when you use wrapping<br />
* PYTHON_EXECUTABLE = /usr/bin/python<br />
* PYTHON_INCLUDE_DIR = /usr/include/python2.7<br />
* USE_SYSTEM_SWIG=OFF # Will use ITK's swig (recommended)<br />
<br />
'''On Fedora 19 or 20:'''<br />
* PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib64/python2.7/site-packages<br />
<br />
'''On Ubuntu 14:'''<br />
* PYTHON_INCLUDE_DIR:PATH=/usr/include/x86_64-linux-gnu/python2.7<br />
* PYTHON_LIBRARY = /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib/python2.7/dist-packages<br />
<br />
Once configuration is finished, you may now generate the needed files by pressing [g].<br />
<br />
== Step 3: Run the build ==<br />
<br />
* make<br />
<br />
== Step 4: Install ==<br />
<br />
You need to have root access to install ITK (if you left the default installation path):<br />
<br />
'''On Fedora:'''<br />
* su # Type your root password<br />
* make install<br />
<br />
'''On Ubuntu:'''<br />
Here, the super-user account is disabled by default, run the install step like this:<br />
* sudo make install # Type your root password<br />
<br />
ITK will install by default in /usr/local/lib.<br />
Now, you have to tell the system that the files have been installed here.<br />
<br />
* cd /etc/ld.so.conf.d/<br />
* add a file called itk-46.conf, which should contain only one line: /usr/local/lib<br />
* ldconfig # tells the system to read the files in ld.so.conf.d<br />
<br />
== Step 5: Test your installation ==<br />
<br />
* python<br />
* import itk<br />
* itk.Image<br />
<br />
This should run without producing an error.<br />
<br />
{{ITK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/WrapITKInstallFedora&diff=56886ITK/WrapITKInstallFedora2014-09-30T13:36:49Z<p>IMichka: Link to new page</p>
<hr />
<div>= Installation on Fedora =<br />
<br />
Please see the [[ITK/WrapITKInstallLinux|How to install on Linux]] page.<br />
<br />
{{ITK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/WrapITKInstallLinux&diff=56885ITK/WrapITKInstallLinux2014-09-30T13:34:00Z<p>IMichka: Copy of install on Fedora page</p>
<hr />
<div>= Installation on Fedora 19 or 20 =<br />
<br />
This section describes how to install ITK with python wrappings on Fedora 19 or 20.<br />
This can of course be extended to other Linuxes.<br />
<br />
== Step 1: Make sure the python headers are installed ==<br />
<br />
Python will need to be installed along with the Python development headers (Python.h).<br />
<br />
* Install the '''python-devel''' package.<br />
<br />
== Step 2: Setup the build ==<br />
<br />
Clone the git repository in /home/yourname/ITK:<br />
* cd<br />
* git clone git://itk.org/ITK.git<br />
* git checkout tags/v4.5.2 # Optional, if you want to use a stable version<br />
<br />
Create a build directory, it is recommended to build outside of the source directory:<br />
* mkdir build<br />
* cd build<br />
<br />
Use cmake to configure your build<br />
* ccmake ../ITK<br />
<br />
Set different variables, you may have to configure [C] the build 2 or 3 times.<br />
Use the advanced mode [T] to see all the possibilities.<br />
* ITK_WRAP_PYTHON = ON<br />
* BUILD_SHARED_LIBS = ON # Is ON by default since ITK 4.6 when you use wrapping<br />
* PYTHON_EXECUTABLE = /usr/bin/python<br />
* PYTHON_INCLUDE_DIR = /usr/include/python2.7<br />
* PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib64/python2.7/site-packages<br />
<br />
Once configuration is finished, you may now generate the needed files by pressing [g].<br />
<br />
== Step 3: Run the build ==<br />
<br />
* make<br />
<br />
== Step 4: Install ==<br />
<br />
You need to have root access to install ITK (if you left the default installation path):<br />
* su # Type your root password<br />
* make install<br />
<br />
ITK will install by default in /usr/local/lib.<br />
Now, you have to tell the system that the files have been installed here.<br />
<br />
* cd /etc/ld.so.conf.d/<br />
* add a file called itk-46.conf, which should contain only one line: /usr/local/lib<br />
* ldconfig # tells the system to read the files in ld.so.conf.d<br />
<br />
== Step 5: Test your installation ==<br />
<br />
* python<br />
* import itk<br />
* itk.Image<br />
<br />
This should run without producing an error.<br />
<br />
{{ITK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/Wrapping&diff=56884ITK/Wrapping2014-09-30T13:33:40Z<p>IMichka: </p>
<hr />
<div>= ITK Wrapping =<br />
<br />
== Supported configurations ==<br />
<br />
* Python 2.6 and 2.7<br />
<br />
* Linux with GCC compiler (Currently tested with Fedora 19)<br />
* Windows (Currently tested with VS9)<br />
* OS X (currently broken, you may find binaries and instructions [https://github.com/iMichka/homebrew-MacVTKITKPythonBottles here])<br />
<br />
Users are encouraged to report their success and failures on other platforms.<br />
<br />
* [[ITK/Python_Wrapping|Python]]<br />
* [[ITK/WrapITKInstallLinux|How to install on Linux]]<br />
<br />
== Work in progress ==<br />
<br />
* Support for Python 3 is being added (probably in ITK 4.7)<br />
* Fix for wrapping on OS X, gccxml does not work with Clang.<br />
<br />
== Old pages ==<br />
<br />
These pages are old wiki pages containing some information about ITK wrapping.<br />
They need to be cleaned up, most of the things in them are no more up to date.<br />
<br />
* [[ITK/WrapITK Status|Wrapping status]]<br />
* [[ITK/Java_Wrapping|Java]]<br />
* [[ITK/Release_4/Wrapping]]<br />
* [[Proposals:Refactoring_Wrapping]]</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/Wrapping&diff=56441ITK/Wrapping2014-06-10T13:35:53Z<p>IMichka: </p>
<hr />
<div>= ITK Wrapping =<br />
<br />
== Supported configurations ==<br />
<br />
* Python 2.6 and 2.7<br />
<br />
* Linux with GCC compiler (Currently tested with Fedora 19)<br />
* Windows (Currently tested with VS9)<br />
* OS X (currently broken, you may find binaries and instructions [https://github.com/iMichka/homebrew-MacVTKITKPythonBottles here])<br />
<br />
Users are encouraged to report their success and failures on other platforms.<br />
<br />
* [[ITK/Python_Wrapping|Python]]<br />
* [[ITK/WrapITKInstallFedora|How to install on Fedora 19/20]]<br />
<br />
== Work in progress ==<br />
<br />
* Support for Python 3 is being added (probably in ITK 4.7)<br />
* Fix for wrapping on OS X, gccxml does not work with Clang.<br />
<br />
== Old pages ==<br />
<br />
These pages are old wiki pages containing some information about ITK wrapping.<br />
They need to be cleaned up, most of the things in them are no more up to date.<br />
<br />
* [[ITK/WrapITK Status|Wrapping status]]<br />
* [[ITK/Java_Wrapping|Java]]<br />
* [[ITK/Release_4/Wrapping]]<br />
* [[Proposals:Refactoring_Wrapping]]</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/WrapITKInstallFedora&diff=56404ITK/WrapITKInstallFedora2014-06-09T07:31:48Z<p>IMichka: Add installation procedure</p>
<hr />
<div>= Installation on Fedora 19 or 20 =<br />
<br />
This section describes how to install ITK with python wrappings on Fedora 19 or 20.<br />
This can of course be extended to other Linuxes.<br />
<br />
== Step 1: Make sure the python headers are installed ==<br />
<br />
Python will need to be installed along with the Python development headers (Python.h).<br />
<br />
* Install the '''python-devel''' package.<br />
<br />
== Step 2: Setup the build ==<br />
<br />
Clone the git repository in /home/yourname/ITK:<br />
* cd<br />
* git clone git://itk.org/ITK.git<br />
* git checkout tags/v4.5.2 # Optional, if you want to use a stable version<br />
<br />
Create a build directory, it is recommended to build outside of the source directory:<br />
* mkdir build<br />
* cd build<br />
<br />
Use cmake to configure your build<br />
* ccmake ../ITK<br />
<br />
Set different variables, you may have to configure [C] the build 2 or 3 times.<br />
Use the advanced mode [T] to see all the possibilities.<br />
* ITK_WRAP_PYTHON = ON<br />
* BUILD_SHARED_LIBS = ON # Is ON by default since ITK 4.6 when you use wrapping<br />
* PYTHON_EXECUTABLE = /usr/bin/python<br />
* PYTHON_INCLUDE_DIR = /usr/include/python2.7<br />
* PYTHON_LIBRARY = /usr/lib64/libpython2.7.so.1.0<br />
* PY_SITE_PACKAGES_PATH = /usr/lib64/python2.7/site-packages<br />
<br />
Once configuration is finished, you may now generate the needed files by pressing [g].<br />
<br />
== Step 3: Run the build ==<br />
<br />
* make<br />
<br />
== Step 4: Install ==<br />
<br />
You need to have root access to install ITK (if you left the default installation path):<br />
* su # Type your root password<br />
* make install<br />
<br />
ITK will install by default in /usr/local/lib.<br />
Now, you have to tell the system that the files have been installed here.<br />
<br />
* cd /etc/ld.so.conf.d/<br />
* add a file called itk-46.conf, which should contain only one line: /usr/local/lib<br />
* ldconfig # tells the system to read the files in ld.so.conf.d<br />
<br />
== Step 5: Test your installation ==<br />
<br />
* python<br />
* import itk<br />
* itk.Image<br />
<br />
This should run without producing an error.<br />
<br />
{{ITK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/Wrapping&diff=56403ITK/Wrapping2014-06-09T07:13:29Z<p>IMichka: </p>
<hr />
<div>== ITK Wrapping ==<br />
<br />
Currently, only Python 2.6 and 2.7 is supported.<br />
<br />
* [[ITK/Python_Wrapping|Python]]<br />
* [[ITK/WrapITKInstallFedora|How to install on Fedora 19/20]]<br />
<br />
== Work in progress ==<br />
<br />
Support for Python 3 is being added<br />
<br />
== Old pages ==<br />
<br />
These pages are old wiki pages containing some information about ITK wrapping.<br />
They need to be cleaned up, most of the things in them are no more up to date.<br />
<br />
* [[ITK/WrapITK Status|Wrapping status]]<br />
* [[ITK/Java_Wrapping|Java]]<br />
* [[ITK/Release_4/Wrapping]]<br />
* [[Proposals:Refactoring_Wrapping]]</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/FAQ&diff=56402ITK/FAQ2014-06-09T07:02:16Z<p>IMichka: </p>
<hr />
<div>== General information and availability ==<br />
<br />
=== Do I need VTK to build ITK ? ===<br />
With the default configuration, ITK does not require VTK. However, some optional modules (ITKVTKGlue) do require VTK.<br />
<br />
ITK does not provide any visualization functionalities. Applications requiring visualization should implement those functionalities from internal code or libraries like OpenGL, GLUT or VTK.<br />
<br />
=== What 3D file formats can ITK import and export? ===<br />
<br />
The following table identifies the file formats that ITK can read/write via a factory mechanism based on the file extension (itk::ImageIOFactory). Some proprietary files format are only imported. More information on [[ITK File Formats]] is available, including data types supported.<br />
<br />
A very nice tool for viewing all of these images is ImageViewer which can be found in the ITKApps repository.<br />
<br />
{| border="1" cellpadding="2" cellspacing="0"<br />
|- bgcolor="#abcdef"<br />
! File Format<br />
! Read/Write<br />
! Import<br />
|-<br />
| Analyze 7.5 || AnalyzeImageIO ||<br />
|-<br />
| BMP &dagger; || BMPImageIO ||<br />
|-<br />
| DICOM || GDCMImageIO || Using DicomImageIO is backward compatible, but user should prefer GDCMImageIO<br />
|-<br />
| GE 4x || || GE4ImageIO<br />
|-<br />
| GE 5x || || GE5ImageIO<br />
|-<br />
| GE Advantage Windows || || GEAdwImageIO<br />
|-<br />
| Gipl (.gipl) || GiplImageIO ||<br />
|-<br />
| IPLCommon || || IPLCommonImageIO<br />
|-<br />
| JPEG &dagger; || JPEGImageIO ||<br />
|-<br />
| MetaImage (.mha/.mhd) || MetaImageIO ||<br />
|-<br />
| PNG &dagger; || PNGImageIO ||<br />
|-<br />
| Raw &Dagger; || RawImageIO ||<br />
|-<br />
| Siemens Vision || || SiemensVisionImageIO<br />
|-<br />
| Stimulate (spr/sdt) || StimulateImageIO ||<br />
|-<br />
| TIFF || TIFFImageIO ||<br />
|-<br />
| VTK Structured Points || VTKImageIO ||<br />
|}<br />
<br />
&dagger; BMP, PNG and JPEG are not very good formats for 3D medical images. They only support 2D images and a limited set of pixel types such as unsigned char, and unsigned short. The great advantage of BMP, PNG and JPEG is that you can view them with almost any image viewer. It is possible to read/write 3D datasets as collections of 2D slices each one in an independent BMP, PNG or JPEG file by using the ImageSerierReader and ImageSeriesWriter.<br />
<br />
&Dagger; It is higly recommended not using this format. RAW is not a format, it is insufficient, inconsistent and simply dangerous. A RAW file without a header is useless, and once you add a header, it is not RAW anymore.<br />
<br />
=== What if my file format is not supported by ITK? ===<br />
If ITK doesn't have a specific file format reader at this point, you may try converting this specific file format image to a format like PNG, for which ITK has readers.<br />
<br />
A good set of tools for performing such conversions is available in ImageMagick. It can be downloaded it for free from: http://www.imagemagick.org/<br />
<br />
You can also take advantage of the VTK readers/importers. All you need is then use the VTKImageToImage adaptor in order to convert the vtkImageData into an itk::Image.<br />
<br />
Supported VTK file formats can be found here: [[VTK_FAQ#What_image_file_formats_can_VTK_read_and_write.3F|What image file formats can VTK read and write?]] and [[VTK_FAQ#What_3D_file_formats_can_VTK_import_and_export.3F|What 3D file formats can VTK import and export]]<br />
<br />
=== How do I read a volume from a DICOM series? ===<br />
The following are alternative options for reading DICOM series. The first one in the list is the recommended option. The others are provided in case of desperation.<br />
<br />
# Use the itk::ImageSeriesReader<> in combination with the DicomSeriesFileNames<>. For a full example on how to do this, please look at the source code under Insight/Code/Examples/IO/DicomSeriesReadImageWrite.cxx.<br />
# Write a MetaImageHeader<br>This is a small text file holding information about the image: spacing, dimensions, pixelt type... This header can hold the list of dicom files you want to read. The only restriction is that the files must be uncompressed.<br>The easy way to create a MetaImage header is to use the application: MetaImageImporter that is available in: InsightApplications/MetaImageImporter. you can also take an existing metaimage reader and modify it in order to fit your needs. Please find attached one file that you can edit it with your favorite text editor.<br />
# Use MRIConvert<br>Jolinda Smith from the Lewis Center for Neuroimaging at the University of Oregon has developed a nice application that allows you to load DICOM series and export them in MetaImage and Analyze format (among others).<br>She graciously has made this application publicly available at: http://lcni.uoregon.edu/~jolinda/MRIConvert There is a fresh version updated in april 14th.<br />
# Jeff Brubaker and Stephen R. Aylward, at the UNC<br>CADDLab developed a DICOM query/move application called "MIND" (whit the motto: "MIND is not DICOM"). This application loads DICOM files over the network and export them in MetaImage format. This application is open source and it is available at: http://www.jeffro.net/mind/ and http://caddlab.rad.unc.edu/software/MIND/<br />
<br />
=== How do I write a volume as DICOM series? ===<br />
Use ITK in combination with gdcm <br />
<br />
http://gdcm.sourceforge.net/<br />
<br />
GDCM is an open source package developed by the Creatis team at INSA-Lyon. It is distributed under a license similar to ITK.<br />
<br />
http://gdcm.sourceforge.net/Copyright.html<br />
<br />
GCDM uses CMake in order to configure its build process, so you will find a familiar setup. Once you download, configure and buid GDCM, you can reconfigure ITK by running CMake in your ITK build, going into the Advanced options and enabling USE_GDCM. <br />
<br />
For a code example on how to use GDCM for reading and writing DICOM series, please refer to the source code in<br />
<br />
Insight/Examples/IO/DicomSeriesReadImageWrite2.cxx<br />
<br />
You can always use the latest and greatest of GDCM, simply use an installed version of GDCM and link ITK to it using ITK_USE_SYSTEM_GDCM<br />
<br />
=== Which interpreted languages are supported by ITK? ===<br />
Currently ITK supports the following language bindings:<br />
<br />
* Python <br />
* Java<br />
<br />
=== How do I cite the use of ITK in a publication? ===<br />
The Insight software may be cited by referencing the paper, the books, and/or the web site.<br />
<br />
A) '''The paper'''<br />
<br />
T.S. Yoo, M. J. Ackerman, W. E. Lorensen, W. Schroeder, V. Chalana, S. Aylward, D. Metaxas, R. Whitaker. Engineering and Algorithm Design for an Image Processing API: A Technical Report on ITK - The Insight Toolkit. In Proc. of Medicine Meets Virtual Reality, J. Westwood, ed., IOS Press Amsterdam pp 586-592 (2002).<br />
<br />
B) '''The books'''<br />
<br />
"Insight into Images"<br />
edited by Terry Yoo<br />
published by A.K. Peters 2004<br />
ISBN: 1-56881-217-5<br />
<br />
"The ITK Software Guide"<br />
Second Edition<br />
Ibanez, Schroeder, Ng, Cates.<br />
published by Kitware Inc.<br />
2005<br />
ISBN: 1-930934-15-7<br />
<br />
"The ITK Software Guide"<br />
First Edition<br />
Ibanez, Schroeder, Ng, Cates.<br />
published by Kitware Inc.<br />
2003<br />
ISBN: 1-930934-10-6<br />
<br />
"Mastering CMake,<br />
A Cross-Platform Build System"<br />
K. Martin and B. Hoffman<br />
published by Kitware Inc.<br />
ISBN: 1-930934-09-2<br />
<br />
'''BibTtex citations'''<br />
<br />
@Manual{ITKSoftwareGuide,<br />
Title = {The {ITK} {S}oftware {G}uide},<br />
Author = {Ibanez, L. and Schroeder, W. and Ng, L. and Cates, J.},<br />
Organization = "Kitware, Inc.",<br />
Edition = {First},<br />
year = {2003},<br />
note = {ISBN 1-930934-10-6},<br />
url = \href{[http://www.itk.org/ItkSoftwareGuide.pdf http://www.itk.org/ItkSoftwareGuide.pdf]}{<nowiki>http://www.itk.org/ItkSoftwareGuide.pdf</nowiki>},<br />
}<br />
<br />
@Manual{ITKSoftwareGuideSecondEdition,<br />
Title = {The {ITK} {S}oftware {G}uide},<br />
Author = {Ibanez, L. and Schroeder, W. and Ng, L. and Cates, J.},<br />
Organization = "Kitware, Inc.",<br />
Edition = {Second},<br />
year = {2005},<br />
note = {ISBN 1-930934-15-7},<br />
url = \href{[http://www.itk.org/ItkSoftwareGuide.pdf http://www.itk.org/ItkSoftwareGuide.pdf]}{<nowiki>http://www.itk.org/ItkSoftwareGuide.pdf</nowiki>},<br />
}<br />
<br />
@Manual{ITKSoftwareGuideThirdEdition,<br />
Title = {The {ITK} {S}oftware {G}uide},<br />
Author = {Johnson, Hans J. and McCormick, M. and Ib\'{a}{\~n}ez, L. and The Insight Software Consortium},<br />
Organization = "Kitware, Inc.",<br />
Edition = {Third},<br />
year = {2013},<br />
note = {\textit{''In press''}},<br />
url = \href{[http://www.itk.org/ItkSoftwareGuide.pdf http://www.itk.org/ItkSoftwareGuide.pdf]}{<nowiki>http://www.itk.org/ItkSoftwareGuide.pdf</nowiki>},<br />
}<br />
<br />
C) '''The Web sites'''<br />
<br />
"The Insight Segmentation and Registration Toolkit"<br />
www.itk.org<br />
<br />
"CMake: Cross Platform Make"<br />
www.cmake.org<br />
<br />
If you want to include ITK in an acknowledgment section, a phrase similar to the following may be used:<br />
<br />
"This work benefited from the use of the Insight Segmentation<br />
and Registration Toolkit (ITK), an open source software<br />
developed as an initiative of the U.S. National Library<br />
of Medicine and available at www.itk.org."<br />
<br />
and<br />
<br />
"The multi-platform configuration tool CMake was used for<br />
configuring ITK and facilitating its use from our project.<br />
CMake was partially funded by the U.S. National Library of<br />
Medicine as part of the Insight Toolkit project. CMake is an <br />
open source system and it is freely available at www.cmake.org."<br />
<br />
=== Is ITK FDA-Approved? ===<br />
<br />
Given the fact that ITK is a software toolkit, it cannot be the<br />
subject of FDA approval as a medical device. We have discussed<br />
this topic in several occasions and received advice from FDA<br />
representatives, that can be summarized as follow:<br />
<br />
<br />
ITK is to be considered as an off-the-shelf (OTS) product that<br />
is used for supporting a higher level medical application/product.<br />
The developer of such application/product will be responsible for<br />
performing the validation processes described in FDA published<br />
guidelines for the development of software-related medical devices.<br />
<br />
For mode details see the page [[FDA Guidelines for Software Developement]]<br />
<br />
== Language bindings ==<br />
=== What does "Error opening hint file NOTFOUND" mean? ===<br />
When you enable "USE_VTK" in the CMake configuration of ITK, and VTK was built with wrapping, CMake looks for a "hints" file.<br />
<br />
The "hints" file is on the VTK source tree under: VTK/Wrapping/hints<br />
<br />
Please switch CMake to "advanced", look for the VTK_WRAP_HINTS variable and set it to the full path to the "hints" file including the "hints" filename itself.<br />
<br />
here is how it looks in the CMakeCache.txt of a typical ITK installation:<br />
<br />
//Where can the hints file be found<br />
VTK_WRAP_HINTS:FILEPATH=/home/johndoe/src/VTK/Wrapping/hints<br />
<br />
=== How do I use ITK with WrapITK? ===<br />
<br />
WrapITK allows you to use ITK from other languages.<br />
(Python, Java, Ruby, ...)<br />
<br />
* [[ITK/Wrapping | See the page about ITK wrappings]]<br />
<br />
=== How do I use ITK from C# .NET? ===<br />
<br />
There are currently three options:<br />
# Use [http://code.google.com/p/manageditk ManagedITK]<br />
#* '''NOTE: This option is not recommended as the project is no longer supported'''<br />
# Use the [http://www.simpleitk.org/ SimpleITK] [http://sourceforge.net/projects/simpleitk/files/SimpleITK C# language bindings]<br />
#* SimpleITK is great, but it does not support all filters (e.g. no support for registration in version 0.5.1)<br />
#* A list of available filters can be found [http://www.itk.org/SimpleITKDoxygen/html/Filter_Coverage.html here] (valid Sept 2012)<br />
# Manually wrap the desired functionality<br />
#* This option requires the most work, but is the most flexible, allowing you to use any ITK functionality you desire<br />
#* An example can be found [[ITK/Using ITK from .NET|here]]<br />
<br />
NOTE: WrapITK does not currently support C# language bindings, but could be made to do so.<br />
<br />
== Using the Insight Toolkit ==<br />
<br />
=== How do I combine ITK and VTK in my application? ===<br />
<br />
A full tutorial on how to combine ITK and VTK is available at<br />
<br />
"Getting Started with ITK and VTK"<br />
http://www.itk.org/CourseWare/Training/GettingStarted-II.pdf<br />
<br />
You will need the auxiliary classes available at<br />
<br />
ITKApps<br />
<br />
For example, for converting ITK images into VTK images and back, you will find useful the files from the ITKVTKGlue module:<br />
<br />
itkImageToVTKImageFilter.h<br />
itkImageToVTKImageFilter.hxx<br />
itkVTKImageToImageFilter.h<br />
itkVTKImageToImageFilter.hxx<br />
<br />
=== How do I configure Emacs for ITK coding style? ===<br />
You can add the following codes into your .emacs file<br />
<br />
;;;;;;;;;;;;;;<br />
(c-add-style "itk"<br />
'("stroustrup" <br />
(c-basic-offset . 2)<br />
(c-offsets-alist<br />
(c . c-lineup-dont-change)<br />
(innamespace . 0)<br />
(inline-open . 0) <br />
(substatement-open . +)<br />
(statement-block-intro . 0) ) ) )<br />
(add-hook 'c++-mode-hook (function (lambda ()<br />
(c-set-style "itk")(turn-on-auto-fill))))<br />
(add-to-list 'auto-mode-alist '("\\.txx\\'" . c++-mode)) (add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))<br />
;;;;;;;;;;;<br />
<br />
=== How do I configure VIM for ITK coding style? ===<br />
<br />
set tabstop=2 " Tabs are two characters<br />
set shiftwidth=2 " Indents are two charactes too<br />
set expandtab " Do not use tabs<br />
set matchpairs+=<:> " To mach arguments of templates<br />
set cinoptions={1s,:0,l1,g0,c0,(0,(s,m1 " ITK/VTK style indenting<br />
<br />
You can also use CMake indentation and syntax file which are available on www.vim.org.<br />
<br />
This was contributed by Andy Cedilnik @kitware.com<br />
<br />
If you'd like to enable c++ style syntax highlight for *.txx files, put the following lines in your .vimrc file:<br />
syntax on<br />
au BufNewFile,BufRead *.txx set filetype=cpp<br />
<br />
== Platform-specific questions ==<br />
=== How do I avoid multiple prompts to reload all projects in Microsoft Visual Studio? ===<br />
When the CMake source changes, you may see multiple prompts to reload many projects.<br />
<br />
DO NOT USE "Rebuild All" or "Batch Build". Use the following recommended procedure.<br />
<br />
There is an ALL_BUILD target available in the MSVC++ workspace. The best way to build ITK is to set ALL_BUILD as the active project, then select the active configuration you want (DEBUG, etc).<br />
<br />
This can also be done from the command line like this: msdev ITK.dsw /MAKE "ALL_BUILD - Debug" /REBUILD<br />
<br />
== Contribute ==<br />
=== How do I make code contributions to ITK? ===<br />
Please see this page: [[ITKContribute]].<br />
<br />
== Testing ==<br />
=== Is ITK tested? ===<br />
Please see this page: [[ITK/Testing]]<br />
<br />
== Working with Image Data ==<br />
<br />
===How do I iterate through all the pixels in an image?===<br />
<br />
Please see this example: http://www.itk.org/Wiki/ITK/Examples/Iterators/ImageRegionIterator of itkImageRegionIterator.<br />
<br />
===What are Hounsfield Units?===<br />
<br />
Hounsfield units were defined by Sir Godfrey N. Hounsfield, on of the pioneers of Computer Tomography for clinical applications.<br />
<br />
The units represent the linear attenuation of X-Rays for a particular material. <br />
<br />
The units scale is defined in such a way that level for Water is 0 and the level for Air is -1000. <br />
<br />
The attenuation of any other material is mapped linearly into this range.<br />
<br />
A table of Hounsfield units for common human tissues is avalable in the following link [[ITK Hounsfield Units]]<br />
<br />
===What are MRI T1 / T2 Units?===<br />
<br />
MRI images measure two types of relaxation times. <br />
<br />
The units are millisecons and the two relaxation concepts relate to how long it takes for the molecules in the tissue to realign themselves with a magentic field after being perturbed.<br />
<br />
Details on the MRI units are available in the Wikipedia:<br />
<br />
[http://en.wikipedia.org/wiki/Relaxation_%28NMR%29 Relaxation (NMR)]<br />
<br />
=== DICOM: Bits Allocated, Bits Stored and High Bit ===<br />
<br />
A question that is often asked on insight-users is :<br />
I am trying to read/write a DICOM image, but some of the DICOM fields have changed after I write it back on disk.<br />
<br />
Here is what you have on disk:<br />
<pre><br />
Bits Allocated = 16<br />
Bits Stored = 12<br />
High Bit = 11<br />
<br />
|<------------------ pixel ----------------->|<br />
______________ ______________ ______________ ______________<br />
|XXXXXXXXXXXXXX| | | |<br />
|______________|______________|______________|______________|<br />
15 12 11 8 7 4 3 0<br />
</pre><br />
<br />
Here is what you generally get after writing by GDCM:<br />
<pre><br />
Bits Allocated = 16<br />
Bits Stored = 16<br />
High Bit = 15<br />
<br />
|<------------------------- pixel ------------------------>|<br />
______________ ______________ ______________ ______________<br />
| | | | |<br />
|______________|______________|______________|______________|<br />
15 12 11 8 7 4 3 0<br />
</pre><br />
<br />
Since DICOM V3, you '''cannot''' store any overlay in the unused bits of the Pixel Data (0x7fe0,0x0010), thus it imply that the unused bits are '''zeros'''.<br />
In ITK, there is no such thing as 12bits Pixel Type, thus when instanciating your reader you declare a 16bits Pixel Type. This buffer is then passed back to GDCM which sees an array of 16bits values and then simply used the simpliest way to store this buffer back on disk: Bits Stored = 16 and High Bit = 15.<br />
In case you have not made any change to your pixel buffer, implicitely the first 4 bits will be zero again. The only difference being that they are not as clearly declared as 12bits.<br />
<br />
=== I'm working with DICOM images, where can I find more information? ===<br />
[[ITK/DICOM]]<br />
<br />
== Data Display ==<br />
<br />
===What imaging software is available for displaying medical image files?===<br />
<br />
Please see the [[ITK/Third_Party_Applications | third party applications]] page for visualization applications that used ITK to perform Image reading/writing.<br />
<br />
===When I view the output of my program, all I see is a black image. What went wrong?===<br />
<br />
ITK is capable of reading and writing data in a variety of formats and bit depths. However many 'consumer' image programs only work with 8-bit data, so when you try to display a 16-bit data file the image will appear black. The solution is to use an image display program that correctly handles these types of files. A small selection is listed above.<br />
<br />
[http://www.imagemagick.org/ ImageMagick] is a particularly useful set of tools for image display, manipulation and conversion.<br />
<br />
The `ImageViewer` program, part of InsightApplications, is capable of correctly loading and displaying all file types supported by ITK (including anisotropic images).<br />
<br />
(Gavin Baker, 24-Jun-2004)<br />
<br />
== Registration ==<br />
<br />
===Can ITK be used for multi-modal registration? For example, CT-MRI, or MRI-fMRI?===<br />
<br />
ITK provides several method for performing Multi-Modality registration. These methods are described in detail in the SoftwareGuide Chapter 8, pdf-page 241 to 340. In particular you will find interesting Section 8.4 in pdf-page 255 where the Mutual Information metrics are described.<br />
<br />
Examples on multimodality registration are available in `Insight/Examples/Registration`. A demo application using Mutual Information is available under `InsightApplications/LandmarkInitializedMutualInformationRegistration`.<br />
<br />
It is strongly recommended that you read the chapter on image resampling (Section 6.9.4 of the pdf) before you get involved with image registration methods. That will save you a lot of misunderstandings that are common in new users.<br />
<br />
You will also find useful the tutorial sessions, in particular [http://www.itk.org/CourseWare/Training/RegistrationMethodsOverview.pdf the overview].<br />
<br />
(Luis Ibanez, 7-June-2004)<br />
<br />
== Common Problems ==<br />
<br />
<!--This fragment identifier is referenced from exception messages in the ITK Reader and Writer--><br />
<div id="NoFactoryException"></div><br />
<br />
=== Why can't I read any image files? or Why am I getting the exception message: "There are no registered IO factories."? ===<br />
<br />
When trying to read or write a file using the ImageFileReader or the ImageFileWriter I got an exception with the following message:<br />
<br />
itk::ImageFileReaderException (00F7F494)<br />
Location: "Unknown"<br />
File: C:\ITK\InsightToolkit-1.6.0\Code\IO\itkImageFileReader.hxx<br />
Line: 101<br />
Description: Could not create IO object for file c:\t1.mnc<br />
<br />
This exception is thrown when ITK does not recognize the fileformat that you are trying to read or write. When reading, ITK recognize file formats by asking a set of internal readers to attempt to read your file. If none of the registered readers accept your file, then the exception above is thrown. When writing, ITK uses the extension of the filename in order to chose the fileformat to be used. Make sure that you use one of the filename extensions recognized by ITK, and that the ImageIO class for that format has been registered.<br />
<br />
Enable all the IO modules that you wish to support in your ITK CMake configuration.<br />
<br />
To register the IO factory:<br />
<br />
* If you are using CMake: call ''include( ${ITK_USE_FILE} )'' before ''add_executable'' or ''add_library''.<br />
<br />
* If you are not using CMake: the factories should be registered with ''itk::XXXImageIOFactory::RegisterOneFactory()'' where ''XXX'' is the format.<br />
<br />
{{ITK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/Wrapping&diff=56401ITK/Wrapping2014-06-09T06:57:35Z<p>IMichka: Initial page setup</p>
<hr />
<div>* [[ITK/Java_Wrapping|Java]]<br />
* [[ITK/Python_Wrapping|Python]]<br />
* [[ITK/WrapITK Status|Wrapping status]]</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/FAQ&diff=56400ITK/FAQ2014-06-09T06:57:10Z<p>IMichka: Create new WrapiITK page</p>
<hr />
<div>== General information and availability ==<br />
<br />
=== Do I need VTK to build ITK ? ===<br />
With the default configuration, ITK does not require VTK. However, some optional modules (ITKVTKGlue) do require VTK.<br />
<br />
ITK does not provide any visualization functionalities. Applications requiring visualization should implement those functionalities from internal code or libraries like OpenGL, GLUT or VTK.<br />
<br />
=== What 3D file formats can ITK import and export? ===<br />
<br />
The following table identifies the file formats that ITK can read/write via a factory mechanism based on the file extension (itk::ImageIOFactory). Some proprietary files format are only imported. More information on [[ITK File Formats]] is available, including data types supported.<br />
<br />
A very nice tool for viewing all of these images is ImageViewer which can be found in the ITKApps repository.<br />
<br />
{| border="1" cellpadding="2" cellspacing="0"<br />
|- bgcolor="#abcdef"<br />
! File Format<br />
! Read/Write<br />
! Import<br />
|-<br />
| Analyze 7.5 || AnalyzeImageIO ||<br />
|-<br />
| BMP &dagger; || BMPImageIO ||<br />
|-<br />
| DICOM || GDCMImageIO || Using DicomImageIO is backward compatible, but user should prefer GDCMImageIO<br />
|-<br />
| GE 4x || || GE4ImageIO<br />
|-<br />
| GE 5x || || GE5ImageIO<br />
|-<br />
| GE Advantage Windows || || GEAdwImageIO<br />
|-<br />
| Gipl (.gipl) || GiplImageIO ||<br />
|-<br />
| IPLCommon || || IPLCommonImageIO<br />
|-<br />
| JPEG &dagger; || JPEGImageIO ||<br />
|-<br />
| MetaImage (.mha/.mhd) || MetaImageIO ||<br />
|-<br />
| PNG &dagger; || PNGImageIO ||<br />
|-<br />
| Raw &Dagger; || RawImageIO ||<br />
|-<br />
| Siemens Vision || || SiemensVisionImageIO<br />
|-<br />
| Stimulate (spr/sdt) || StimulateImageIO ||<br />
|-<br />
| TIFF || TIFFImageIO ||<br />
|-<br />
| VTK Structured Points || VTKImageIO ||<br />
|}<br />
<br />
&dagger; BMP, PNG and JPEG are not very good formats for 3D medical images. They only support 2D images and a limited set of pixel types such as unsigned char, and unsigned short. The great advantage of BMP, PNG and JPEG is that you can view them with almost any image viewer. It is possible to read/write 3D datasets as collections of 2D slices each one in an independent BMP, PNG or JPEG file by using the ImageSerierReader and ImageSeriesWriter.<br />
<br />
&Dagger; It is higly recommended not using this format. RAW is not a format, it is insufficient, inconsistent and simply dangerous. A RAW file without a header is useless, and once you add a header, it is not RAW anymore.<br />
<br />
=== What if my file format is not supported by ITK? ===<br />
If ITK doesn't have a specific file format reader at this point, you may try converting this specific file format image to a format like PNG, for which ITK has readers.<br />
<br />
A good set of tools for performing such conversions is available in ImageMagick. It can be downloaded it for free from: http://www.imagemagick.org/<br />
<br />
You can also take advantage of the VTK readers/importers. All you need is then use the VTKImageToImage adaptor in order to convert the vtkImageData into an itk::Image.<br />
<br />
Supported VTK file formats can be found here: [[VTK_FAQ#What_image_file_formats_can_VTK_read_and_write.3F|What image file formats can VTK read and write?]] and [[VTK_FAQ#What_3D_file_formats_can_VTK_import_and_export.3F|What 3D file formats can VTK import and export]]<br />
<br />
=== How do I read a volume from a DICOM series? ===<br />
The following are alternative options for reading DICOM series. The first one in the list is the recommended option. The others are provided in case of desperation.<br />
<br />
# Use the itk::ImageSeriesReader<> in combination with the DicomSeriesFileNames<>. For a full example on how to do this, please look at the source code under Insight/Code/Examples/IO/DicomSeriesReadImageWrite.cxx.<br />
# Write a MetaImageHeader<br>This is a small text file holding information about the image: spacing, dimensions, pixelt type... This header can hold the list of dicom files you want to read. The only restriction is that the files must be uncompressed.<br>The easy way to create a MetaImage header is to use the application: MetaImageImporter that is available in: InsightApplications/MetaImageImporter. you can also take an existing metaimage reader and modify it in order to fit your needs. Please find attached one file that you can edit it with your favorite text editor.<br />
# Use MRIConvert<br>Jolinda Smith from the Lewis Center for Neuroimaging at the University of Oregon has developed a nice application that allows you to load DICOM series and export them in MetaImage and Analyze format (among others).<br>She graciously has made this application publicly available at: http://lcni.uoregon.edu/~jolinda/MRIConvert There is a fresh version updated in april 14th.<br />
# Jeff Brubaker and Stephen R. Aylward, at the UNC<br>CADDLab developed a DICOM query/move application called "MIND" (whit the motto: "MIND is not DICOM"). This application loads DICOM files over the network and export them in MetaImage format. This application is open source and it is available at: http://www.jeffro.net/mind/ and http://caddlab.rad.unc.edu/software/MIND/<br />
<br />
=== How do I write a volume as DICOM series? ===<br />
Use ITK in combination with gdcm <br />
<br />
http://gdcm.sourceforge.net/<br />
<br />
GDCM is an open source package developed by the Creatis team at INSA-Lyon. It is distributed under a license similar to ITK.<br />
<br />
http://gdcm.sourceforge.net/Copyright.html<br />
<br />
GCDM uses CMake in order to configure its build process, so you will find a familiar setup. Once you download, configure and buid GDCM, you can reconfigure ITK by running CMake in your ITK build, going into the Advanced options and enabling USE_GDCM. <br />
<br />
For a code example on how to use GDCM for reading and writing DICOM series, please refer to the source code in<br />
<br />
Insight/Examples/IO/DicomSeriesReadImageWrite2.cxx<br />
<br />
You can always use the latest and greatest of GDCM, simply use an installed version of GDCM and link ITK to it using ITK_USE_SYSTEM_GDCM<br />
<br />
=== Which interpreted languages are supported by ITK? ===<br />
Currently ITK supports the following language bindings:<br />
<br />
* Python <br />
* Java<br />
<br />
=== How do I cite the use of ITK in a publication? ===<br />
The Insight software may be cited by referencing the paper, the books, and/or the web site.<br />
<br />
A) '''The paper'''<br />
<br />
T.S. Yoo, M. J. Ackerman, W. E. Lorensen, W. Schroeder, V. Chalana, S. Aylward, D. Metaxas, R. Whitaker. Engineering and Algorithm Design for an Image Processing API: A Technical Report on ITK - The Insight Toolkit. In Proc. of Medicine Meets Virtual Reality, J. Westwood, ed., IOS Press Amsterdam pp 586-592 (2002).<br />
<br />
B) '''The books'''<br />
<br />
"Insight into Images"<br />
edited by Terry Yoo<br />
published by A.K. Peters 2004<br />
ISBN: 1-56881-217-5<br />
<br />
"The ITK Software Guide"<br />
Second Edition<br />
Ibanez, Schroeder, Ng, Cates.<br />
published by Kitware Inc.<br />
2005<br />
ISBN: 1-930934-15-7<br />
<br />
"The ITK Software Guide"<br />
First Edition<br />
Ibanez, Schroeder, Ng, Cates.<br />
published by Kitware Inc.<br />
2003<br />
ISBN: 1-930934-10-6<br />
<br />
"Mastering CMake,<br />
A Cross-Platform Build System"<br />
K. Martin and B. Hoffman<br />
published by Kitware Inc.<br />
ISBN: 1-930934-09-2<br />
<br />
'''BibTtex citations'''<br />
<br />
@Manual{ITKSoftwareGuide,<br />
Title = {The {ITK} {S}oftware {G}uide},<br />
Author = {Ibanez, L. and Schroeder, W. and Ng, L. and Cates, J.},<br />
Organization = "Kitware, Inc.",<br />
Edition = {First},<br />
year = {2003},<br />
note = {ISBN 1-930934-10-6},<br />
url = \href{[http://www.itk.org/ItkSoftwareGuide.pdf http://www.itk.org/ItkSoftwareGuide.pdf]}{<nowiki>http://www.itk.org/ItkSoftwareGuide.pdf</nowiki>},<br />
}<br />
<br />
@Manual{ITKSoftwareGuideSecondEdition,<br />
Title = {The {ITK} {S}oftware {G}uide},<br />
Author = {Ibanez, L. and Schroeder, W. and Ng, L. and Cates, J.},<br />
Organization = "Kitware, Inc.",<br />
Edition = {Second},<br />
year = {2005},<br />
note = {ISBN 1-930934-15-7},<br />
url = \href{[http://www.itk.org/ItkSoftwareGuide.pdf http://www.itk.org/ItkSoftwareGuide.pdf]}{<nowiki>http://www.itk.org/ItkSoftwareGuide.pdf</nowiki>},<br />
}<br />
<br />
@Manual{ITKSoftwareGuideThirdEdition,<br />
Title = {The {ITK} {S}oftware {G}uide},<br />
Author = {Johnson, Hans J. and McCormick, M. and Ib\'{a}{\~n}ez, L. and The Insight Software Consortium},<br />
Organization = "Kitware, Inc.",<br />
Edition = {Third},<br />
year = {2013},<br />
note = {\textit{''In press''}},<br />
url = \href{[http://www.itk.org/ItkSoftwareGuide.pdf http://www.itk.org/ItkSoftwareGuide.pdf]}{<nowiki>http://www.itk.org/ItkSoftwareGuide.pdf</nowiki>},<br />
}<br />
<br />
C) '''The Web sites'''<br />
<br />
"The Insight Segmentation and Registration Toolkit"<br />
www.itk.org<br />
<br />
"CMake: Cross Platform Make"<br />
www.cmake.org<br />
<br />
If you want to include ITK in an acknowledgment section, a phrase similar to the following may be used:<br />
<br />
"This work benefited from the use of the Insight Segmentation<br />
and Registration Toolkit (ITK), an open source software<br />
developed as an initiative of the U.S. National Library<br />
of Medicine and available at www.itk.org."<br />
<br />
and<br />
<br />
"The multi-platform configuration tool CMake was used for<br />
configuring ITK and facilitating its use from our project.<br />
CMake was partially funded by the U.S. National Library of<br />
Medicine as part of the Insight Toolkit project. CMake is an <br />
open source system and it is freely available at www.cmake.org."<br />
<br />
=== Is ITK FDA-Approved? ===<br />
<br />
Given the fact that ITK is a software toolkit, it cannot be the<br />
subject of FDA approval as a medical device. We have discussed<br />
this topic in several occasions and received advice from FDA<br />
representatives, that can be summarized as follow:<br />
<br />
<br />
ITK is to be considered as an off-the-shelf (OTS) product that<br />
is used for supporting a higher level medical application/product.<br />
The developer of such application/product will be responsible for<br />
performing the validation processes described in FDA published<br />
guidelines for the development of software-related medical devices.<br />
<br />
For mode details see the page [[FDA Guidelines for Software Developement]]<br />
<br />
== Language bindings ==<br />
=== What does "Error opening hint file NOTFOUND" mean? ===<br />
When you enable "USE_VTK" in the CMake configuration of ITK, and VTK was built with wrapping, CMake looks for a "hints" file.<br />
<br />
The "hints" file is on the VTK source tree under: VTK/Wrapping/hints<br />
<br />
Please switch CMake to "advanced", look for the VTK_WRAP_HINTS variable and set it to the full path to the "hints" file including the "hints" filename itself.<br />
<br />
here is how it looks in the CMakeCache.txt of a typical ITK installation:<br />
<br />
//Where can the hints file be found<br />
VTK_WRAP_HINTS:FILEPATH=/home/johndoe/src/VTK/Wrapping/hints<br />
<br />
=== How do I use ITK with WrapITK? ===<br />
<br />
[[ITK/Wrapping | See the page about ITK wrappings]]<br />
<br />
=== How do I use ITK from C# .NET? ===<br />
<br />
There are currently three options:<br />
# Use [http://code.google.com/p/manageditk ManagedITK]<br />
#* '''NOTE: This option is not recommended as the project is no longer supported'''<br />
# Use the [http://www.simpleitk.org/ SimpleITK] [http://sourceforge.net/projects/simpleitk/files/SimpleITK C# language bindings]<br />
#* SimpleITK is great, but it does not support all filters (e.g. no support for registration in version 0.5.1)<br />
#* A list of available filters can be found [http://www.itk.org/SimpleITKDoxygen/html/Filter_Coverage.html here] (valid Sept 2012)<br />
# Manually wrap the desired functionality<br />
#* This option requires the most work, but is the most flexible, allowing you to use any ITK functionality you desire<br />
#* An example can be found [[ITK/Using ITK from .NET|here]]<br />
<br />
NOTE: WrapITK does not currently support C# language bindings, but could be made to do so.<br />
<br />
== Using the Insight Toolkit ==<br />
<br />
=== How do I combine ITK and VTK in my application? ===<br />
<br />
A full tutorial on how to combine ITK and VTK is available at<br />
<br />
"Getting Started with ITK and VTK"<br />
http://www.itk.org/CourseWare/Training/GettingStarted-II.pdf<br />
<br />
You will need the auxiliary classes available at<br />
<br />
ITKApps<br />
<br />
For example, for converting ITK images into VTK images and back, you will find useful the files from the ITKVTKGlue module:<br />
<br />
itkImageToVTKImageFilter.h<br />
itkImageToVTKImageFilter.hxx<br />
itkVTKImageToImageFilter.h<br />
itkVTKImageToImageFilter.hxx<br />
<br />
=== How do I configure Emacs for ITK coding style? ===<br />
You can add the following codes into your .emacs file<br />
<br />
;;;;;;;;;;;;;;<br />
(c-add-style "itk"<br />
'("stroustrup" <br />
(c-basic-offset . 2)<br />
(c-offsets-alist<br />
(c . c-lineup-dont-change)<br />
(innamespace . 0)<br />
(inline-open . 0) <br />
(substatement-open . +)<br />
(statement-block-intro . 0) ) ) )<br />
(add-hook 'c++-mode-hook (function (lambda ()<br />
(c-set-style "itk")(turn-on-auto-fill))))<br />
(add-to-list 'auto-mode-alist '("\\.txx\\'" . c++-mode)) (add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))<br />
;;;;;;;;;;;<br />
<br />
=== How do I configure VIM for ITK coding style? ===<br />
<br />
set tabstop=2 " Tabs are two characters<br />
set shiftwidth=2 " Indents are two charactes too<br />
set expandtab " Do not use tabs<br />
set matchpairs+=<:> " To mach arguments of templates<br />
set cinoptions={1s,:0,l1,g0,c0,(0,(s,m1 " ITK/VTK style indenting<br />
<br />
You can also use CMake indentation and syntax file which are available on www.vim.org.<br />
<br />
This was contributed by Andy Cedilnik @kitware.com<br />
<br />
If you'd like to enable c++ style syntax highlight for *.txx files, put the following lines in your .vimrc file:<br />
syntax on<br />
au BufNewFile,BufRead *.txx set filetype=cpp<br />
<br />
== Platform-specific questions ==<br />
=== How do I avoid multiple prompts to reload all projects in Microsoft Visual Studio? ===<br />
When the CMake source changes, you may see multiple prompts to reload many projects.<br />
<br />
DO NOT USE "Rebuild All" or "Batch Build". Use the following recommended procedure.<br />
<br />
There is an ALL_BUILD target available in the MSVC++ workspace. The best way to build ITK is to set ALL_BUILD as the active project, then select the active configuration you want (DEBUG, etc).<br />
<br />
This can also be done from the command line like this: msdev ITK.dsw /MAKE "ALL_BUILD - Debug" /REBUILD<br />
<br />
== Contribute ==<br />
=== How do I make code contributions to ITK? ===<br />
Please see this page: [[ITKContribute]].<br />
<br />
== Testing ==<br />
=== Is ITK tested? ===<br />
Please see this page: [[ITK/Testing]]<br />
<br />
== Working with Image Data ==<br />
<br />
===How do I iterate through all the pixels in an image?===<br />
<br />
Please see this example: http://www.itk.org/Wiki/ITK/Examples/Iterators/ImageRegionIterator of itkImageRegionIterator.<br />
<br />
===What are Hounsfield Units?===<br />
<br />
Hounsfield units were defined by Sir Godfrey N. Hounsfield, on of the pioneers of Computer Tomography for clinical applications.<br />
<br />
The units represent the linear attenuation of X-Rays for a particular material. <br />
<br />
The units scale is defined in such a way that level for Water is 0 and the level for Air is -1000. <br />
<br />
The attenuation of any other material is mapped linearly into this range.<br />
<br />
A table of Hounsfield units for common human tissues is avalable in the following link [[ITK Hounsfield Units]]<br />
<br />
===What are MRI T1 / T2 Units?===<br />
<br />
MRI images measure two types of relaxation times. <br />
<br />
The units are millisecons and the two relaxation concepts relate to how long it takes for the molecules in the tissue to realign themselves with a magentic field after being perturbed.<br />
<br />
Details on the MRI units are available in the Wikipedia:<br />
<br />
[http://en.wikipedia.org/wiki/Relaxation_%28NMR%29 Relaxation (NMR)]<br />
<br />
=== DICOM: Bits Allocated, Bits Stored and High Bit ===<br />
<br />
A question that is often asked on insight-users is :<br />
I am trying to read/write a DICOM image, but some of the DICOM fields have changed after I write it back on disk.<br />
<br />
Here is what you have on disk:<br />
<pre><br />
Bits Allocated = 16<br />
Bits Stored = 12<br />
High Bit = 11<br />
<br />
|<------------------ pixel ----------------->|<br />
______________ ______________ ______________ ______________<br />
|XXXXXXXXXXXXXX| | | |<br />
|______________|______________|______________|______________|<br />
15 12 11 8 7 4 3 0<br />
</pre><br />
<br />
Here is what you generally get after writing by GDCM:<br />
<pre><br />
Bits Allocated = 16<br />
Bits Stored = 16<br />
High Bit = 15<br />
<br />
|<------------------------- pixel ------------------------>|<br />
______________ ______________ ______________ ______________<br />
| | | | |<br />
|______________|______________|______________|______________|<br />
15 12 11 8 7 4 3 0<br />
</pre><br />
<br />
Since DICOM V3, you '''cannot''' store any overlay in the unused bits of the Pixel Data (0x7fe0,0x0010), thus it imply that the unused bits are '''zeros'''.<br />
In ITK, there is no such thing as 12bits Pixel Type, thus when instanciating your reader you declare a 16bits Pixel Type. This buffer is then passed back to GDCM which sees an array of 16bits values and then simply used the simpliest way to store this buffer back on disk: Bits Stored = 16 and High Bit = 15.<br />
In case you have not made any change to your pixel buffer, implicitely the first 4 bits will be zero again. The only difference being that they are not as clearly declared as 12bits.<br />
<br />
=== I'm working with DICOM images, where can I find more information? ===<br />
[[ITK/DICOM]]<br />
<br />
== Data Display ==<br />
<br />
===What imaging software is available for displaying medical image files?===<br />
<br />
Please see the [[ITK/Third_Party_Applications | third party applications]] page for visualization applications that used ITK to perform Image reading/writing.<br />
<br />
===When I view the output of my program, all I see is a black image. What went wrong?===<br />
<br />
ITK is capable of reading and writing data in a variety of formats and bit depths. However many 'consumer' image programs only work with 8-bit data, so when you try to display a 16-bit data file the image will appear black. The solution is to use an image display program that correctly handles these types of files. A small selection is listed above.<br />
<br />
[http://www.imagemagick.org/ ImageMagick] is a particularly useful set of tools for image display, manipulation and conversion.<br />
<br />
The `ImageViewer` program, part of InsightApplications, is capable of correctly loading and displaying all file types supported by ITK (including anisotropic images).<br />
<br />
(Gavin Baker, 24-Jun-2004)<br />
<br />
== Registration ==<br />
<br />
===Can ITK be used for multi-modal registration? For example, CT-MRI, or MRI-fMRI?===<br />
<br />
ITK provides several method for performing Multi-Modality registration. These methods are described in detail in the SoftwareGuide Chapter 8, pdf-page 241 to 340. In particular you will find interesting Section 8.4 in pdf-page 255 where the Mutual Information metrics are described.<br />
<br />
Examples on multimodality registration are available in `Insight/Examples/Registration`. A demo application using Mutual Information is available under `InsightApplications/LandmarkInitializedMutualInformationRegistration`.<br />
<br />
It is strongly recommended that you read the chapter on image resampling (Section 6.9.4 of the pdf) before you get involved with image registration methods. That will save you a lot of misunderstandings that are common in new users.<br />
<br />
You will also find useful the tutorial sessions, in particular [http://www.itk.org/CourseWare/Training/RegistrationMethodsOverview.pdf the overview].<br />
<br />
(Luis Ibanez, 7-June-2004)<br />
<br />
== Common Problems ==<br />
<br />
<!--This fragment identifier is referenced from exception messages in the ITK Reader and Writer--><br />
<div id="NoFactoryException"></div><br />
<br />
=== Why can't I read any image files? or Why am I getting the exception message: "There are no registered IO factories."? ===<br />
<br />
When trying to read or write a file using the ImageFileReader or the ImageFileWriter I got an exception with the following message:<br />
<br />
itk::ImageFileReaderException (00F7F494)<br />
Location: "Unknown"<br />
File: C:\ITK\InsightToolkit-1.6.0\Code\IO\itkImageFileReader.hxx<br />
Line: 101<br />
Description: Could not create IO object for file c:\t1.mnc<br />
<br />
This exception is thrown when ITK does not recognize the fileformat that you are trying to read or write. When reading, ITK recognize file formats by asking a set of internal readers to attempt to read your file. If none of the registered readers accept your file, then the exception above is thrown. When writing, ITK uses the extension of the filename in order to chose the fileformat to be used. Make sure that you use one of the filename extensions recognized by ITK, and that the ImageIO class for that format has been registered.<br />
<br />
Enable all the IO modules that you wish to support in your ITK CMake configuration.<br />
<br />
To register the IO factory:<br />
<br />
* If you are using CMake: call ''include( ${ITK_USE_FILE} )'' before ''add_executable'' or ''add_library''.<br />
<br />
* If you are not using CMake: the factories should be registered with ''itk::XXXImageIOFactory::RegisterOneFactory()'' where ''XXX'' is the format.<br />
<br />
{{ITK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_DataManipulation_LineOnMesh2.png&diff=56079File:VTK Examples Python DataManipulation LineOnMesh2.png2014-04-22T09:23:54Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_DataManipulation_LineOnMesh1.png&diff=56078File:VTK Examples Python DataManipulation LineOnMesh1.png2014-04-22T09:23:17Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=VTK&diff=55953VTK2014-03-24T21:31:50Z<p>IMichka: Added entry for Qt5 support for VTK 6.1</p>
<hr />
<div><center>http://public.kitware.com/images/logos/vtk-logo2.jpg</center><br />
<br /><br />
The Visualization ToolKit (VTK) is an open source, freely available software system for 3D computer graphics, image processing, and visualization used by thousands of researchers and developers around the world. VTK consists of a C++ class library, and several interpreted interface layers including Python, Tcl/Tk and Java. Professional support and products for VTK are provided by Kitware, Inc. ([http://www.kitware.com www.kitware.com]) VTK supports a wide variety of visualization algorithms including scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques such as implicit modelling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay triangulation. In addition, dozens of imaging algorithms have been directly integrated to allow the user to mix 2D imaging / 3D graphics algorithms and data.<br />
<br />
<br />
== Learning VTK ==<br />
If you want to learn how to use or develop VTK, please see [[VTK/Learning_VTK | Learning VTK]]<br />
<br />
== Building VTK ==<br />
* Where can I [http://vtk.org/get-software.php download VTK]?<br />
<br />
* Where can I download a tarball of the [http://vtk.org/files/nightly/vtkNightlyDocHtml.tar.gz nightly HTML documentation]?<br />
<br />
* How do I build the [[VTK/BuildingDoxygen|Doxygen documentation]]?<br />
<br />
* [[VTK/Git|Using Git for VTK development]]<br />
<br />
* [[VTK/GitMSBuild|Using Git and MSBuild to build VTK]]<br />
<br />
* [[VTK/PythonDevelopment|Setting up a Python Development Environment using Eclipse/Pydev]]<br />
<br />
* [[VTK/Build parameters | Build parameters]]<br />
<br />
* [[Making Development Environment without compiling source distribution]]<br />
<br />
* [[VTK/Building/VisualStudio | Building VTK with Visual Studio]]<br />
<br />
== Extending VTK ==<br />
<br />
* Where can I get [[VTK Datasets]]?<br />
<br />
* [[VTK Classes|User-Contributed Classes]]<br />
<br />
* [[VTK Coding Standards]] <br />
<br />
* [[VTK/Commit_Guidelines|VTK Commit Guidelines]]<br />
<br />
* [[VTK/Git/Develop|Contribute to VTK / Patch Procedure]]<br />
<br />
* [[VTK Scripts|Extending VTK with Scripts]]<br />
<br />
== Projects/ Tools that use VTK == <br />
<br />
* [[VTK Tools|VTK-Based Tools and Applications]]<br />
<br />
* What are some [[VTK Projects|projects using VTK]]?<br />
<br />
== Troubleshooting ==<br />
* [[VTK FAQ|Frequently asked questions (FAQ)]]<br />
<br />
== Miscellaneous ==<br />
* [[VTK Related Job Opportunities|VTK Related Job Opportunities]]<br />
<br />
* [[VTK/Third Party Library Patrol | VTK 3rd Party Library Patrol]]<br />
<br />
* [[VTK/Meeting Minutes | Meeting Minutes]]<br />
<br />
* [[VTK/License | VTK License]]<br />
* [[VTK/ThirdPartyLicenses | VTK Third-Party Licenses]]<br />
<br />
== Summary of Changes ==<br />
<br />
==== VTK 6.2 (git master) ====<br />
<br />
* Under Cocoa, removed "-fobjc-gc" as a default compiler flag. VTK still supports Cocoa garbage collection, but you must specify it yourself now.<br />
<br />
==== VTK 6.1 ====<br />
<br />
* Move to use CMake's external data support over VTKData<br />
* [[VTK/OpenGL_Errors | OpenGL error detection and reporting macros and error cleanup ]]<br />
* [[VTK/OpenGL_Driver_Information | API for dealing with OpenGL driver bugs ]]<br />
* [[VTK/OSMesa_Support | Enable rendering with OSMesa where possible ]]<br />
* [[ParaView/Line_Integral_Convolution | Surface LIC parallelization and features for interactive tuning ]]<br />
* [[VTK/VTK_SMP | SMP framework introduced to make shared memory parallel development]]<br />
* Fixed compiler/linker errors when building against OS X 10.9 SDK. Fixed other errors building against llvm's [http://libcxx.llvm.org libc++].<br />
* Support for unicode text when a suitable font file is used in vtkTextProperty.<br />
* [[VTK/Wrapping C++11 Code | Wrapper support for header files with C++11 syntax]].<br />
* [[VTK/Better_Java_Support | Better Java support and install rules]]<br />
* Depth peeling support for ATI devices<br />
* Ctests generate a stacktrace on POSIX systems in response to catastrophic failure such as abort or segfault.<br />
* Qt5 support<br />
* [[VTK/API_Changes_6_0_0_to_6_1_0 | API Diff Report]]<br />
<br />
==== VTK 6.0 ====<br />
<br />
* [[VTK/VTK_6_Migration_Guide | VTK 6 API Migration Guide]]<br />
* [[VTK/Build_System_Migration | VTK 6 (build system) Migration Guide]]<br />
* [[VTK/Module_Development | VTK 6 Module Development]]<br />
* [[VTK/Remove_VTK_4_Compatibility | Remove VTK 4 compatibility layer from pipeline]]<br />
* [[VTK/Modularization_Proposal | Modularization]]<br />
* [[VTK/Remove_vtkTemporalDataSet | Temporal support changes]]<br />
* [[VTK/Composite_data_changes | Composite data structure changes ]]<br />
* [[VTK/API_Changes_5_10_1_to_6_0_0 | API Diff Report]]<br />
<br />
==== VTK 5.10 ====<br />
<br />
* [[VTK/improved unicode support | Change unicode readers/writers to register as codecs (finished Oct 29 2010)]]<br />
* [[VTK/Image Rendering Classes | New image rendering classes (start Dec 15 2010, finish Mar 15 2011)]]<br />
* [[VTK/Image Interpolators | Image interpolators (start Jun 20 2011, finish Aug 31 2011)]]<br />
* [[VTK/GSoC | Projects from Google Summer of Code 2011]]<br />
* [[VTK/Release5100 New Classes | List of new classes in 5.10]]<br />
* [[VTK/API_Changes_5_8_0_to_6_1_0 | API Diff Report]]<br />
<br />
==== VTK 5.8 ====<br />
<br />
* [[VTK/Polyhedron_Support | Polyhedron cells and MVC Interpolation]]<br />
* [http://visimp.cs.unc.edu/2010/10/26/reeb-graphs/ Reeb Graphs]<br />
* [[VTK/Closed Surface Clipping | Clipping of closed surfaces (start Mar 26, 2010, finish Apr 22, 2010)]]<br />
* [[VTK/Wrapper Update 2010 | New wrappers (start Apr 28, 2010)]]<br />
* [[VTK/Image Stencil Improvements | Improved image stencil support (start Nov 3, 2010)]]<br />
* [[VTK/MNI File Formats | MNI file formats]]<br />
* [[VTK/Release580 New Classes | List of New Classes]]<br />
<br />
==== VTK 5.6 ====<br />
<br />
* [[VTK/MultiPass_Rendering | VTK Multi-Pass Rendering]]<br />
* [[VTK/Multicore and Streaming | Multicore and Streaming]]<br />
* [[VTK/statistics | Statistics]]<br />
* [[VTK/Array Refactoring | Array Refactoring]]<br />
* [[VTK/3DConnexion Devices Support | 3DConnexion Devices Support]]<br />
* [[VTK/Charts | New Charts API]]<br />
* [[VTK/New CellPicker | New Cell Picker and Volume Picking (start Nov 2010, finish Feb 2010)]]<br />
<br />
==== VTK 5.4 ====<br />
<br />
* [[VTK 5.4 Release Planning]]<br />
* [[VTK/Cray XT3 Compilation| Cray XT3 Compilation]]<br />
* [[VTK/Geovis vision toolkit | Geospatial and vision visualization support ]]<br />
<br />
==== VTK 5.2 ====<br />
<br />
* [[VTK/Java Wrapping | VTK Java Wrapping]]<br />
* [[VTK/Composite Data Redesign | Composite Data Redesign]]<br />
* [[VTK Shaders | VTK Shaders]]<br />
* [[VTKShaders | Shaders in VTK]]<br />
* [[VTK/VTKMatlab | VTK with Matlab]]<br />
* [[VTK/Time_Support | VTK Time support]]<br />
* [[VTK/Graph Layout | VTK Graph Layout]]<br />
* [[VTK/Depth_Peeling | VTK Depth Peeling]]<br />
* [[VTK/Using_JRuby | Using VTK with JRuby]]<br />
* [[VTK/Painters | Painters]]<br />
<br />
==== VTK 5.0 ====<br />
<br />
* [[VTK/Tutorials/New_Pipeline | New Pipeline]]<br />
* [[VTKWidgets | VTK Widget Redesign]]<br />
<br />
== News ==<br />
<br />
=== Development Process ===<br />
The VTK Community is [[VTK/Managing_the_Development_Process | upgrading its development process]]. The current process using Git can be found at the [[VTK/Git|VTK Git page]]. We are doing this in response to the continuing and rapid growth of the toolkit. A VTK Architecture Review Board [[VTK/Architecture_Review_Board |VTK ARB]] is being put in place to provide strategic guidance to the community, and individuals are being identified as leaders in various VTK subsystems.<br />
<br />
Have a question or topic for the ARB to discuss about the future of VTK? First, please bring the topic to the [http://public.kitware.com/mailman/listinfo/vtk-developers VTK developers mailing list]. If the issue is not resolved there or needs further planning or direction, you may [[VTK/ARB/Meetings#Potential Topics|enter a suggested topic for discussion]].<br />
<br />
* [[Proposed Changes to VTK | Proposed Changes to VTK]]<br />
<br />
===[[VTK/NextGen|VTK NextGen]]=== <br />
We have started collecting works in progress as well as future ideas at [[VTK/NextGen|NextGen]]. Please add anything you are working on, would like to collaborate on, or would like to see in the future of VTK!<br />
<br />
== Wrapping ==<br />
<br />
* [[VTK/Wrappers | Wrapping Tools]]<br />
<br />
* [[VTK/Java Wrapping|Java]]<br />
** [[VTK/Java Code Samples|Java code samples]]<br />
* [[VTK/Python Wrapping FAQ|Python]]<br />
** [[VTK/Python Wrapper Enhancement|Python wrapper enhancements]]<br />
* [[VTK/CSharp/ActiViz.NET|CSharp/ActiViz.NET]]<br />
** [[VTK/Examples/CSharp|CSharp/ActiViz.NET code samples]]<br />
* [[VTK/CSharp/ComingSoon|CSharp/ComingSoon]]<br />
<br />
== Developers Corner ==<br />
[[VTK/Git|Development process with Git]]<br />
<br />
[[VTK/Developers Corner|Developers Corner]]<br />
<br />
<!-- <br />
== External Links ==<br />
dead link *[http://zorayasantos.tripod.com/vtk_csharp_examples VTK examples in C#] (Visual Studio 5.0 and .NET 2.0)<br />
--><br />
{{VTK/Template/Footer}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/Git/Develop&diff=55092ITK/Git/Develop2014-01-24T10:13:38Z<p>IMichka: Added prefixes for the commit messages. I found no trace of it in the documentation, only in the git hook.</p>
<hr />
<div>__NOTOC__<br />
<br />
This page documents how to develop ITK through [http://git-scm.com Git].<br />
See our [[ITK/Git|table of contents]] for more information.<br />
<br />
<i><br />
Git is an extremely powerful version control tool that supports many different "workflows" for indivudal development and collaboration.<br />
Here we document procedures used by the ITK development community.<br />
In the interest of simplicity and brevity we do '''not''' provide an explanation of why we use this approach.<br />
Furthermore, this is '''not''' a Git tutorial.<br />
Please see our [[Git/Resources|Git resource links]] for third-party documentation, such as the [http://git-scm.com/book/ ProGit Book].<br />
</i><br />
<br />
==Setup==<br />
<br />
Before you begin, perform initial setup:<br />
<br />
{| style="width: 100%" cellspacing="0" cellpadding="0"<br />
|-<br />
|width=60%|<br />
1.<br />
Register [[ITK/Git/Account#Gerrit|Gerrit access]] and possibly [[ITK/Git/Account#Git|Git push access]].<br />
|-<br />
|<br />
2.<br />
Optionally download our [[Media:GitITKCheatSheet.pdf|one page PDF desk reference]].<br />
|-<br />
|<br />
3.<br />
Follow the [[ITK/Git/Download#Clone|download instructions]] to create a local ITK clone:<br />
|-<br />
|<br />
:<code>$ git clone git://itk.org/ITK.git</code><br />
|align="center"|<br />
[[Git/Trouble#Firewall_Blocks_Port_9418|Connection refused]]?<br />
|-<br />
|<br />
4.<br />
Run the developer setup script to prepare your ITK work tree and create Git command aliases used below:<br />
|-<br />
|<br />
:<code>$ ./Utilities/SetupForDevelopment.sh</code><br />
|align="center"|<br />
[http://itk.org/gitweb?p=ITK.git;a=blob;f=Utilities/SetupForDevelopment.sh;hb=HEAD <code>SetupForDevelopment.sh</code>]<br />
<br/><br />
[http://git-scm.com/book/en/Getting-Started-First-Time-Git-Setup Pro Git: Setup]<br />
|}<br />
<br />
==Workflow==<br />
<br />
ITK development uses a [[Git/Workflow/Topic|branchy workflow]] based on topic branches.<br />
Our collaboration workflow consists of three main steps:<br />
<br />
{| style="width: 100%" cellspacing="0" cellpadding="0"<br />
|-<br />
|width=60%|<br />
1.<br />
Local Development<br />
|-<br />
|<br />
:* [[#Update|Update]]<br />
|-<br />
|<br />
:* [[#Create_a_Topic|Create a Topic]]<br />
|-<br />
|<br />
2.<br />
Code Review<br />
|-<br />
|<br />
:* [[#Share_a_Topic|Share a Topic]] (requires [[ITK/Git/Account#Gerrit|Gerrit access]])<br />
|align="center"|<br />
[http://code.google.com/p/gerrit/ Gerrit Code Review]<br />
|-<br />
|<br />
:* [[#Revise_a_Topic|Revise a Topic]]<br />
|-<br />
|<br />
3.<br />
Integrate Changes<br />
|-<br />
|<br />
:* [[#Merge_a_Topic|Merge a Topic]] (requires [[ITK/Git/Account#Git|Git push access]])<br />
|-<br />
|<br />
:* [[#Delete_a_Topic|Delete a Topic]]<br />
|}<br />
<br />
==Update==<br />
<br />
{| style="width: 100%"<br />
|-<br />
|width=60%|<br />
Update your local '''master''' branch:<br />
|-<br />
|<br />
:<code>$ git checkout master</code><br />
:<code>$ git pullall</code><br />
|align="center"|<br />
[http://schacon.github.com/git/git-checkout.html <code>git help checkout</code>]<br />
<br/><br />
[http://itk.org/gitweb?p=ITK.git;a=blob;f=Utilities/DevelopmentSetupScripts/SetupGitAliases.sh;hb=HEAD <code>alias.pullall</code>]<br />
<br/><br />
([http://schacon.github.com/git/git-pull.html <code>pull</code>] and<br />
[http://schacon.github.com/git/git-submodule.html <code>submodule</code>] <code>update</code>)<br />
|}<br />
<br />
==Create a Topic==<br />
<br />
All new work must be committed on topic branches.<br />
Name topics like you might name functions: concise but precise.<br />
A reader should have a general idea of the feature or fix to be developed given just the branch name.<br />
<br />
{| style="width: 100%"<br />
|-<br />
|width=60%|<br />
To start a new topic branch:<br />
|-<br />
|<br />
:<code>$ git fetch origin</code><br />
:{|<br />
|-<br />
|<br />
For new development, start the topic from <code>origin/master</code>:<br />
:<code>$ git checkout -b ''my-topic'' origin/master</code><br />
|-<br />
|<br />
For release branch fixes, start the topic from <code>origin/release</code>, and by convention use a topic name starting in "<code>release-</code>":<br />
:<code>$ git checkout -b ''my-topic'' origin/release</code><br />
|}<br />
|align="center"|<br />
[http://schacon.github.com/git/git-fetch.html <code>git help fetch</code>]<br />
<br/><br />
[http://schacon.github.com/git/git-checkout.html <code>git help checkout</code>]<br />
<br/><br />
[http://schacon.github.com/git/git-submodule.html <code>git help submodule</code>]<br />
<br/><br />
[http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging Pro Git: Basic Branching]<br />
|-<br />
|<br />
Edit files and create commits (repeat as needed). Add a prefix to your commit message (see below).<br />
|-<br />
|<br />
:<code>$ edit ''file1'' ''file2'' ''file3''</code><br />
:''(To add data follow [[ITK/Git/Develop/Data#Add_Data|these instructions]].)''<br />
:<code>$ git add ''file1'' ''file2'' ''file3''</code><br />
:<code>$ git commit</code><br />
|align="center"|<br />
[http://schacon.github.com/git/git-add.html <code>git help add</code>]<br />
<br/><br />
[http://schacon.github.com/git/git-commit.html <code>git help commit</code>]<br />
<br/><br />
[http://git-scm.com/book/en/Git-Basics-Recording-Changes-to-the-Repository Pro Git: Recording Changes]<br />
|-<br />
|<br />
''(If your change modifies the "<code>Modules/ThirdParty/KWSys/src/KWSys</code>" directory please contribute directly to [[KWSys/Git|KWSys]] instead.)''<br />
|-<br />
|<br />
Standard prefixes for ITK commit messages :<br />
* BUG: Fix for runtime crash or incorrect result<br />
* COMP: Compiler error or warning fix<br />
* DOC: Documentation change<br />
* ENH: New functionality<br />
* PERF: Performance improvement<br />
* STYLE: No logic impact (indentation, comments)<br />
* WIP: Work In Progress not ready for merge<br />
|<br />
|}<br />
<br />
==Share a Topic==<br />
<br />
When a topic is ready for review and possible inclusion, share it by pushing to Gerrit.<br />
Be sure you have registered for [[ITK/Git/Account#Gerrit|Gerrit access]].<br />
<br />
{| style="width: 100%"<br />
|-<br />
|width=60%|<br />
Checkout the topic if it is not your current branch:<br />
|-<br />
|<br />
:<code>$ git checkout ''my-topic''</code><br />
|align="center"|<br />
[http://schacon.github.com/git/git-checkout.html <code>git help checkout</code>]<br />
|-<br />
|<br />
Check what commits will be pushed to Gerrit for review:<br />
|-<br />
|<br />
:<code>$ git prepush</code><br />
|align="center"|<br />
[http://itk.org/gitweb?p=ITK.git;a=blob;f=Utilities/DevelopmentSetupScripts/SetupGitAliases.sh;hb=HEAD <code>alias.prepush</code>]<br />
<br/><br />
([http://schacon.github.com/git/git-log.html <code>log</code>] <code>origin/master..</code>)<br />
|-<br />
|<br />
Push commits in your topic branch for review by the community:<br />
|-<br />
|<br />
:<code>$ git gerrit-push</code><br />
:''(If the topic adds data see [[ITK/Git/Develop/Data#Push|this note]].)''<br />
or if you started the topic from the release branch:<br />
:<code>$ git push gerrit HEAD:refs/for/release/''my-topic'' </code> <br />
|align="center"|<br />
[[ITK/Git/Account#Firewall_blocks_SSH_traffic|Connection refused]]?<br />
<br/><br />
[http://itk.org/gitweb?p=ITK.git;a=blob;f=Utilities/DevelopmentSetupScripts/SetupGitAliases.sh;hb=HEAD <code>alias.gerrit-push</code>]<br />
<br/><br />
([http://itk.org/gitweb?p=ITK.git;a=blob;f=Utilities/Git/git-gerrit-push;hb=HEAD <code>Utilities/Git/git-gerrit-push</code>])<br />
|}<br />
Find your change in the [http://review.source.kitware.com/p/ITK ITK Gerrit] instance and add [[ITK/Gerrit/Reviewers|reviewers]].<br />
<br />
==Revise a Topic==<br />
<br />
If a topic is approved during Gerrit review, skip to the [[#Merge_a_Topic|next step]].<br />
Otherwise, revise the topic and push it back to Gerrit for another review.<br />
<br />
{| style="width: 100%"<br />
|-<br />
|width=60%|<br />
Checkout the topic if it is not your current branch:<br />
|-<br />
|<br />
:<code>$ git checkout ''my-topic''</code><br />
|align="center"|<br />
[http://schacon.github.com/git/git-checkout.html <code>git help checkout</code>]<br />
|-<br />
|<br />
To revise the most recent commit on the topic edit files and add changes normally and then amend the commit:<br />
|-<br />
|<br />
:<code>$ git commit --amend</code><br />
|align="center"|<br />
[http://schacon.github.com/git/git-commit.html <code>git help commit</code>]<br />
<br/><br />
[http://git-scm.com/book/en/Git-Tools-Rewriting-History#Changing-the-Last-Commit Pro Git: Changing the Last Commit]<br />
|-<br />
|<br />
To revise commits further back on the topic, say the <code>3</code>rd commit back:<br />
|-<br />
|<br />
:<code>$ git rebase -i HEAD~3</code><br />
''(Substitute the correct number of commits back, as low as ''<code>1</code>''.)''<br />
<br />
Follow Git's interactive instructions.<br />
Preserve the <code>Change-Id:</code> line at the bottom of each commit message.<br />
|align="center"|<br />
[http://schacon.github.com/git/git-rebase.html <code>git help rebase</code>]<br />
<br/><br />
[http://git-scm.com/book/en/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages Pro Git: Changing Multiple Commits]<br />
<br/><br />
[http://git-scm.com/book/en/Git-Branching-Rebasing Pro Git: Rebasing]<br />
|-<br />
|<br />
Return to the [[#Share_a_Topic|previous step]] to share the revised topic.<br />
|}<br />
<br />
==Merge a Topic==<br />
'''Only authorized developers with [[ITK/Git/Account#Git|Git push access]] to <code>itk.org</code> may perform this step.'''<br />
<br />
After a feature topic has been reviewed and approved in Gerrit, merge it into the upstream repository.<br />
{| style="width: 100%"<br />
|-<br />
|width=60%|<br />
Checkout the topic if it is not your current branch:<br />
|-<br />
|<br />
:<code>$ git checkout ''my-topic''</code><br />
|align="center"|<br />
[http://schacon.github.com/git/git-checkout.html <code>git help checkout</code>]<br />
|-<br />
|<br />
Merge the topic, which is originally forked off the master branch, to master branch:<br />
|-<br />
|<br />
:<code>$ git gerrit-merge</code><br />
<br />
:''(If the merge conflicts follow the printed instructions to resolve them.)''<br />
|align="center"|<br />
[http://itk.org/gitweb?p=ITK.git;a=blob;f=Utilities/DevelopmentSetupScripts/SetupGitAliases.sh;hb=HEAD <code>alias.gerrit-merge</code>]<br />
<br/><br />
([http://schacon.github.com/git/git-push.html <code>push</code>] to [[Git/Workflow/Stage|topic stage]] and<br />
<br/><br />
<code>stage ITK merge ''my-topic''</code>)<br />
<br/><br />
[[Git/Workflow/Topic/Conflicts#Branch-to-Topic|Branch-to-Topic Conflict Resolution]]<br />
|}<br />
<br />
For bug fixes that are ready to be included in the next patch release, please email the release manager,<br />
[[User:Matt.mccormick| Matt McCormick]], for assistance.<br />
<br />
Here are the recommended steps to merge a topic to both release and master branches, assuming the topic<br />
branch is forked off the release branch:<br />
:<code>$ git checkout release</code><br />
:<code>$ git merge --no-ff ''my-topic''</code><br />
:<code>$ git push origin release</code><br />
and do:<br />
:<code>$ git checkout master</code><br />
:<code>$ git merge --no-ff release</code><br />
:<code>$ git push origin master</code><br />
to merge the release branch back to master.<br />
<br />
==Delete a Topic==<br />
<br />
After a topic has been merged upstream, delete your local branch for the topic.<br />
<br />
{| style="width: 100%"<br />
|-<br />
|width=60%|<br />
Checkout and update the '''master''' branch:<br />
|-<br />
|<br />
:<code>$ git checkout master</code><br />
:<code>$ git pullall</code><br />
|align="center"|<br />
[http://schacon.github.com/git/git-checkout.html <code>git help checkout</code>]<br />
<br/><br />
[http://itk.org/gitweb?p=ITK.git;a=blob;f=Utilities/DevelopmentSetupScripts/SetupGitAliases.sh;hb=HEAD <code>alias.pullall</code>]<br />
<br/><br />
([http://schacon.github.com/git/git-pull.html <code>pull</code>] and<br />
[http://schacon.github.com/git/git-submodule.html <code>submodule</code>] <code>update</code>)<br />
|-<br />
|<br />
Delete the local topic branch:<br />
|-<br />
|<br />
:<code>$ git branch -d ''my-topic''</code><br />
|align="center"|<br />
[http://schacon.github.com/git/git-branch.html <code>git help branch</code>]<br />
|-<br />
|<br />
The <code>branch -d</code> command works only when the topic branch has been correctly merged.<br />
Use <code>-D</code> instead of <code>-d</code> to force the deletion of an unmerged topic branch<br />
(warning - you could lose commits).<br />
|}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_PolyData_SubdivisionFilters.png&diff=55076File:VTK Examples Python PolyData SubdivisionFilters.png2014-01-17T14:26:53Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume&diff=54533ITK/Examples/ImageProcessing/TileImageFilter CreateVolume2013-11-18T18:01:02Z<p>IMichka: Changed layout to 1,1,0 to make the stack. 2,2,0 resulted in a side by side configuration which is already described in the other example</p>
<hr />
<div>This example reads in a series of 2D images and stacks them to create a 3D image.<br />
A layout of 1,1,0 is used to achieve this.<br />
<br />
==TileImageFilter_CreateVolume.cxx==<br />
<source lang="cpp"><br />
#include "itkTileImageFilter.h"<br />
#include "itkImageFileReader.h"<br />
#include "itkImageFileWriter.h"<br />
#include "itkImage.h"<br />
<br />
int main(int argc, char *argv[] )<br />
{<br />
<br />
typedef unsigned char PixelType;<br />
const unsigned int InputImageDimension = 2;<br />
const unsigned int OutputImageDimension = 3;<br />
<br />
typedef itk::Image< PixelType, InputImageDimension > InputImageType;<br />
typedef itk::Image< PixelType, OutputImageDimension > OutputImageType;<br />
<br />
typedef itk::ImageFileReader< InputImageType > ImageReaderType;<br />
<br />
typedef itk::TileImageFilter< InputImageType, OutputImageType > TilerType;<br />
<br />
typedef itk::ImageFileWriter< OutputImageType > WriterType;<br />
<br />
if (argc < 4)<br />
{<br />
std::cerr << "Usage: " << std::endl;<br />
std::cerr << argv[0] << "input1 input2 ... inputn output" << std::endl;<br />
return EXIT_FAILURE;<br />
}<br />
<br />
TilerType::Pointer tiler = TilerType::New();<br />
<br />
itk::FixedArray< unsigned int, OutputImageDimension > layout;<br />
<br />
layout[0] = 1;<br />
layout[1] = 1;<br />
layout[2] = 0;<br />
<br />
tiler->SetLayout( layout );<br />
<br />
unsigned int inputImageNumber = 0;<br />
<br />
ImageReaderType::Pointer reader = ImageReaderType::New();<br />
<br />
InputImageType::Pointer inputImageTile;<br />
<br />
for (int i = 1; i < argc - 1; i++)<br />
{<br />
reader->SetFileName( argv[i] );<br />
reader->UpdateLargestPossibleRegion();<br />
inputImageTile = reader->GetOutput();<br />
inputImageTile->DisconnectPipeline();<br />
tiler->SetInput( inputImageNumber++, inputImageTile );<br />
}<br />
<br />
PixelType filler = 128;<br />
<br />
tiler->SetDefaultPixelValue( filler );<br />
<br />
tiler->Update();<br />
<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetInput( tiler->GetOutput() );<br />
writer->SetFileName( argv[argc-1] );<br />
<br />
try<br />
{<br />
writer->Update();<br />
}<br />
catch( itk::ExceptionObject & excp )<br />
{<br />
std::cerr << excp << std::endl;<br />
return EXIT_FAILURE;<br />
}<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
</source><br />
<br />
{{ITKCMakeLists|{{SUBPAGENAME}}}}</div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Visualization_ProgGlyph.png&diff=54439File:VTK Examples Python Visualization ProgGlyph.png2013-11-07T13:07:53Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Visualization_SphereTexture.png&diff=54412File:VTK Examples Python Visualization SphereTexture.png2013-11-02T09:42:01Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Graphs_VisualizeGraph.png&diff=54392File:VTK Examples Python Graphs VisualizeGraph.png2013-10-31T07:34:40Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Graphs_EdgeWeights.png&diff=54390File:VTK Examples Python Graphs EdgeWeights.png2013-10-31T07:31:54Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Graphs_SelectedVerticesAndEdges.png&diff=54388File:VTK Examples Python Graphs SelectedVerticesAndEdges.png2013-10-31T07:29:02Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Infovis_SelectedGraphIDs.png&diff=54380File:VTK Examples Python Infovis SelectedGraphIDs.png2013-10-30T18:22:00Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Plotting_ScatterPlot.png&diff=54368File:VTK Examples Python Plotting ScatterPlot.png2013-10-29T18:22:02Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Geovis_GeoAssignCoordinates.png&diff=54361File:VTK Examples Python Geovis GeoAssignCoordinates.png2013-10-29T08:07:48Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Widgets_BalloonWidget-2.png&diff=54343File:VTK Examples Python Widgets BalloonWidget-2.png2013-10-28T12:58:19Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Widgets_BalloonWidget-1.png&diff=54342File:VTK Examples Python Widgets BalloonWidget-1.png2013-10-28T12:57:49Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Widgets_OrientationMarkerWidget.png&diff=54339File:VTK Examples Python Widgets OrientationMarkerWidget.png2013-10-28T12:47:30Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Widgets_CompassWidget.png&diff=54314File:VTK Examples Python Widgets CompassWidget.png2013-10-28T07:36:24Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Widgets_ContourWidget.png&diff=54311File:VTK Examples Python Widgets ContourWidget.png2013-10-27T22:58:41Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Widgets_TextWidget.png&diff=54309File:VTK Examples Python Widgets TextWidget.png2013-10-27T22:52:44Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Widgets_ScalarBarWidget.png&diff=54307File:VTK Examples Python Widgets ScalarBarWidget.png2013-10-27T22:48:24Z<p>IMichka: </p>
<hr />
<div></div>IMichkahttps://public.kitware.com/Wiki/index.php?title=File:VTK_Examples_Python_Filtering_Delaunay2D.png&diff=54304File:VTK Examples Python Filtering Delaunay2D.png2013-10-26T08:47:25Z<p>IMichka: </p>
<hr />
<div></div>IMichka