https://public.kitware.com/Wiki/api.php?action=feedcontributions&user=Glehmann&feedformat=atomKitwarePublic - User contributions [en]2024-03-29T13:25:09ZUser contributionsMediaWiki 1.38.6https://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/LabelMapOverlayImageFilter&diff=41425ITK/Examples/ImageProcessing/LabelMapOverlayImageFilter2011-07-06T12:39:43Z<p>Glehmann: </p>
<hr />
<div>==LabelMapOverlayImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkBinaryImageToLabelMapFilter.h"<br />
#include "itkImage.h"<br />
#include "itkImageFileWriter.h"<br />
#include "itkImageRegionIterator.h"<br />
#include "itkLabelMapToLabelImageFilter.h"<br />
#include "itkLabelMapOverlayImageFilter.h"<br />
#include "itkRGBPixel.h"<br />
<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
void CreateImage(ImageType::Pointer image);<br />
<br />
int main(int, char *[])<br />
{<br />
ImageType::Pointer image = ImageType::New();<br />
CreateImage(image);<br />
<br />
typedef itk::BinaryImageToLabelMapFilter<ImageType> BinaryImageToLabelMapFilterType;<br />
BinaryImageToLabelMapFilterType::Pointer binaryImageToLabelMapFilter = BinaryImageToLabelMapFilterType::New();<br />
binaryImageToLabelMapFilter->SetInput(image);<br />
binaryImageToLabelMapFilter->Update();<br />
<br />
typedef itk::RGBPixel<unsigned char> RGBPixelType;<br />
typedef itk::Image<RGBPixelType> RGBImageType;<br />
<br />
typedef itk::LabelMapOverlayImageFilter<BinaryImageToLabelMapFilterType::OutputImageType, ImageType, RGBImageType><br />
LabelMapOverlayImageFilterType;<br />
LabelMapOverlayImageFilterType::Pointer labelMapOverlayImageFilter = LabelMapOverlayImageFilterType::New();<br />
labelMapOverlayImageFilter->SetInput(binaryImageToLabelMapFilter->GetOutput());<br />
labelMapOverlayImageFilter->SetFeatureImage(image);<br />
labelMapOverlayImageFilter->SetOpacity(.5);<br />
labelMapOverlayImageFilter->Update();<br />
<br />
typedef itk::ImageFileWriter< RGBImageType > WriterType;<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetFileName("output.png");<br />
writer->SetInput(labelMapOverlayImageFilter->GetOutput());<br />
writer->Update();<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ImageType::Pointer image)<br />
{<br />
// Create a black image with a white square<br />
ImageType::IndexType start;<br />
start.Fill(0);<br />
<br />
ImageType::SizeType size;<br />
size.Fill(100);<br />
<br />
ImageType::RegionType region;<br />
region.SetSize(size);<br />
region.SetIndex(start);<br />
image->SetRegions(region);<br />
image->Allocate();<br />
image->FillBuffer(0);<br />
<br />
itk::ImageRegionIterator<ImageType> imageIterator(image,image->GetLargestPossibleRegion());<br />
<br />
// Make two squares<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
if((imageIterator.GetIndex()[0] > 5 && imageIterator.GetIndex()[0] < 20) &&<br />
(imageIterator.GetIndex()[1] > 5 && imageIterator.GetIndex()[1] < 20) )<br />
{<br />
imageIterator.Set(255);<br />
}<br />
<br />
if((imageIterator.GetIndex()[0] > 50 && imageIterator.GetIndex()[0] < 70) &&<br />
(imageIterator.GetIndex()[1] > 50 && imageIterator.GetIndex()[1] < 70) )<br />
{<br />
imageIterator.Set(255);<br />
}<br />
++imageIterator;<br />
}<br />
<br />
typedef itk::ImageFileWriter< ImageType > WriterType;<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetFileName("image.png");<br />
writer->SetInput(image);<br />
writer->Update();<br />
}<br />
</source><br />
<br />
{{ITKCMakeLists|LabelMapOverlayImageFilter}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/BuildProcess&diff=40295ITK/Release 4/Wrapping/BuildProcess2011-06-01T10:30:04Z<p>Glehmann: /* Template instantiation */</p>
<hr />
<div>Wrapping build is done in several steps.<br />
<br />
=Configuration=<br />
<br />
The configuration is done with with the tool used to build ITK: CMake. All the files cited in this section are located in the '''ITK/Wrapping/WrapITK directory'''.<br />
<br />
During this step, the template instantiations are generated with a several CMake macros. For each macro call of the template instantiation process, some callback macros specific of each language generator are called to generate the files and the commands needed to build the wrappers.<br />
The template instantiation and the code generation are completely separated.<br />
<br />
==Template instantiation==<br />
<br />
Everything is done in the `Libraries` directory. The instantiations are separated in two levels:<br />
<br />
* the libraries, which are grouping several modules. Generally, one binary for a target language contains all the instantiations from one library;<br />
* the modules, inside those libraries. Each module groups several template instantiations. The swig interface generator generates one '.i' file per module.<br />
<br />
Even if it is usually a good idea to follow this structure, the generators are not forced to respect this structure. They are free to generate what they wan how they want.<br />
<br />
Several macros are available to simplify the template instantiations. They are defined in '''TypedefMacros.cmake'''.<br />
<br />
===WRAP_LIBRARIES and END_WRAP_LIBRARIES===<br />
<br />
'''WRAP_LIBRARIES''' is called before generating any library. The generator should use the call back on this macro if they need to perform some initialization step. '''END_WRAP_LIBRARIES''' is called after the last instantiation in the last library is done. The generators should use the callback on this macro to create some extra step — for example to build the tests.<br />
<br />
===WRAP_LIBRARY and END_WRAP_LIBRARY===<br />
Formely BEGIN_WRAPPER_LIBRARY and WRAPPER_LIBRARY_CREATE_LIBRARY.<br />
===INCLUDE_LIBRARY===<br />
===AUTO_INCLUDE_MODULES===<br />
Formely WRAPPER_LIBRARY_CREATE_WRAP_FILES.<br />
===INCLUDE_MODULE===<br />
Formely INCLUDE_WRAP_CMAKE.<br />
===WRAP_MODULE and END_WRAP_MODULE===<br />
===WRAP_CLASS and END_WRAP_CLASS===<br />
<br />
Special case: WRAP_NAMED_CLASS<br />
<br />
===WRAP_NON_TEMPLATE_CLASS===<br />
<br />
Special case: WRAP_NAMED_NON_TEMPLATE_CLASS<br />
<br />
===WRAP_INCLUDE===<br />
===ADD_SIMPLE_TYPEDEF===<br />
===ADD_ONE_TYPEDEF===<br />
===WRAP_TEMPLATE===<br />
===WRAP_IMAGE_FILTER===<br />
<br />
Several deprecated specializations are available:<br />
<br />
* WRAP_IMAGE_FILTER_ALL_TYPES<br />
* WRAP_IMAGE_FILTER_SCALAR<br />
* WRAP_IMAGE_FILTER_VECTOR<br />
* WRAP_IMAGE_FILTER_USIGN_INT<br />
* WRAP_IMAGE_FILTER_SIGN_INT<br />
* WRAP_IMAGE_FILTER_INT<br />
* WRAP_IMAGE_FILTER_REAL<br />
* WRAP_IMAGE_FILTER_RGB<br />
* WRAP_IMAGE_FILTER_RGBA<br />
* WRAP_IMAGE_FILTER_VECTOR_REAL<br />
* WRAP_IMAGE_FILTER_COV_VECTOR_REAL<br />
* WRAP_IMAGE_FILTER_COMPLEX_REAL<br />
<br />
===WRAP_IMAGE_FILTER_COMBINATIONS===<br />
===FILTER_DIMS===<br />
<br />
==Code generation==<br />
<br />
Everything is done in the 'Languages' directory.<br />
<br />
== Installation ==<br />
<br />
The following major macros control the installation of files with WrapITK. A certain usage of these macros in the Wrapping/WrapITK/CMakeLists.txt and the CMakeLists.txt for each language allow the generated files (& modules) to be installed in the proper directory(ies).<br />
* CMAKE_INSTALL_PREFIX<br />
**This macro specifies the root ITK installation directory and by default points to /usr/local/.<br />
* WRAP_ITK_INSTALL_PREFIX<br />
** This macro specifies a subpath where where most of WrapITK files will be installed. <br />
** It is set in the file Wrapping/WrapITK/CMakeLists.txt to one of lib/cmake/ITK-4.0/WrapITK(default) or lib/InsightToolkit/WrapITK/. <br />
** This macro in part (along with the WRAP_ITK_INSTALL macro) controls the installation of WrapITK configuration and generated files.<br />
===WRAP_ITK_INSTALL===<br />
** This macro is set in Wrapping/WrapITK/ConfigureWrapping.cmake and in adjunct to WRAP_ITK_INSTALL_PREFIX controls the installation of wrapped files (mostly the generated files)<br />
** This macro will be commonly encountered in the CMakeLists.txt for each language in lines like these: WRAP_ITK_INSTALL("/Configuration/Typedefs/python" "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${group_name}_ext.i") <br />
===WRAP_ITK_BINDINGS_INSTALL===<br />
** This new macro is introduced to take care of installation of the generated files specifically<br />
** With the introduction of this macro, the earlier WRAP_ITK_INSTALL macro will now be installing all the WrapITK configuration files in the directory pointed to by ${CMAKE_INSTALL_PREFIX} and ${WRAP_ITK_INSTALL_PREFIX}, Whereas the new macro will put all the generated proxies(python) and modules(java,python) in the directory ${CMAKE_INSTALL_PREFIX}/lib/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}<br />
<br />
<br />
=Build=<br />
<br />
==Generation XML descriptions of instantiations==<br />
<br />
==Generation of XML documentation==<br />
<br />
==Generation of swig interfaces==<br />
<br />
==Generation of Language specific C++ code==<br />
<br />
==Compilation of C++ code==<br />
<br />
==Linking of libraries==<br />
<br />
==Compilation of tests==<br />
<br />
=Installation=<br />
<br />
WrapITK installation is composed of installing the following set(s) of files: <br />
# cmake files - distributed over various subdirectories of WrapITK<br />
# python proxies (.py) files which reside in WrapITK/lib<br />
# python modules (.so) which reside in WrapITK/lib<br />
# Java modules which reside in WrapITK/lib<br />
# Typedefs (.i, .mdx, .includes) files which reside in WrapITK/Configuration/Typedefs<br />
# Manually written python files which reside in WrapITK/Python<br />
# Language specific (.i, .in) files in WrapITK/Configuration/Languages.<br />
<br />
To summarize, WRAP_ITK_BINDINGS_INSTALL macro takes care of installation of 2,3, 4 and 6. Whereas the WRAP_ITK_INSTALL macro takes care of 1, 5 and 7.<br />
<br />
<br />
=External Project=<br />
<br />
With WrapITK, an external project is a way to extend the wrapping with custom classes outside ITK. The exact same macros are reused, but a single library is generally produced. External projects can be built using ITK from its build tree or from its installed tree.<br />
<br />
==Example==<br />
<br />
Here is an example to wrap a new dummy class. All the files are in the same directory.<br />
<br />
CMakeLists.txt:<br />
<br />
project(dummy)<br />
<br />
cmake_minimum_required(VERSION 2.8)<br />
<br />
find_package(ITK REQUIRED)<br />
find_package(WrapITK REQUIRED)<br />
<br />
WRAP_LIBRARY("${PROJECT_NAME}")<br />
set(WRAPPER_LIBRARY_DEPENDS Base)<br />
AUTO_INCLUDE_MODULES()<br />
END_WRAP_LIBRARY()<br />
<br />
itkDummy.wrap:<br />
<br />
WRAP_CLASS(itk::Dummy POINTER)<br />
foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_COLOR} ${WRAP_ITK_COMPLEX_REAL})<br />
WRAP_TEMPLATE("${ITKM_${t}}" "${ITKT_${t}}")<br />
endforeach(t)<br />
END_WRAP_CLASS()<br />
<br />
itkDummy.h:<br />
<br />
#ifndef __itkDummy_h<br />
#define __itkDummy_h<br />
<br />
#include "itkProcessObject.h"<br />
#include "itkImage.h"<br />
<br />
namespace itk<br />
{<br />
/** \class Dummy<br />
* \brief a dummy class to return a dummy value<br />
*/<br />
template< class TValue ><br />
class ITK_EXPORT Dummy: public Object<br />
{<br />
public:<br />
/** Standard class typedefs. */<br />
typedef Dummy Self;<br />
typedef Object Superclass;<br />
typedef SmartPointer< Self > Pointer;<br />
typedef SmartPointer< const Self > ConstPointer;<br />
<br />
/** Method for creation through the object factory. */<br />
itkNewMacro(Self);<br />
<br />
/** Run-time type information (and related methods). */<br />
itkTypeMacro(Dummy, Object);<br />
<br />
TValue GetValue() const<br />
{<br />
return NumericTraits<TValue>::OneValue();<br />
}<br />
protected:<br />
Dummy() {};<br />
virtual ~Dummy() {};<br />
<br />
private:<br />
Dummy(const Self &); //purposely not implemented<br />
void operator=(const Self &); //purposely not implemented<br />
};<br />
} // end namespace itk<br />
<br />
#endif<br />
<br />
Then, after building and installing the external project, you can run that code in a python interpreter:<br />
<br />
>>> import itk<br />
<br />
>>> df = itk.Dummy.F.New()<br />
<br />
>>> df.GetValue()<br />
1.0<br />
<br />
>>> drgb = itk.Dummy.RGBUC.New()<br />
<br />
>>> drgb.GetValue()<br />
itkRGBPixel(1 1 1)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/BuildProcess&diff=40294ITK/Release 4/Wrapping/BuildProcess2011-06-01T10:27:48Z<p>Glehmann: /* Template instantiation */</p>
<hr />
<div>Wrapping build is done in several steps.<br />
<br />
=Configuration=<br />
<br />
The configuration is done with with the tool used to build ITK: CMake. All the files cited in this section are located in the '''ITK/Wrapping/WrapITK directory'''.<br />
<br />
During this step, the template instantiations are generated with a several CMake macros. For each macro call of the template instantiation process, some callback macros specific of each language generator are called to generate the files and the commands needed to build the wrappers.<br />
The template instantiation and the code generation are completely separated.<br />
<br />
==Template instantiation==<br />
<br />
Everything is done in the `Libraries` directory. The instantiations are separated in two levels:<br />
<br />
* the libraries, which are grouping several modules. Generally, one binary for a target language contains all the instantiations from one library;<br />
* the modules, inside those libraries. Each module groups several template instantiations. The swig interface generator generates one '.i' file per module.<br />
<br />
Even if it is usually a good idea to follow this structure, the generators are not forced to respect this structure. They are free to generate what they wan how they want.<br />
<br />
Several macros are available to simplify the template instantiations. They are defined in '''TypedefMacros.cmake'''.<br />
<br />
===WRAP_LIBRARIES and END_WRAP_LIBRARIES===<br />
<br />
'''WRAP_LIBRARIES''' is called before generating any library. The generator should use the call back on this macro if they need to perform some initialization step. '''END_WRAP_LIBRARIES''' is called after the last instantiation in the last library is done. The generators should use the callback on this macro to create some extra step — for example to build the tests.<br />
<br />
===WRAP_LIBRARY and END_WRAP_LIBRARY===<br />
Formely BEGIN_WRAPPER_LIBRARY and WRAPPER_LIBRARY_CREATE_LIBRARY.<br />
===INCLUDE_LIBRARY===<br />
===AUTO_INCLUDE_MODULES===<br />
Formely WRAPPER_LIBRARY_CREATE_WRAP_FILES.<br />
===INCLUDE_MODULE===<br />
Formely INCLUDE_WRAP_CMAKE.<br />
===WRAP_MODULE and END_WRAP_MODULE===<br />
===WRAP_CLASS===<br />
===WRAP_NAMED_CLASS===<br />
===WRAP_NON_TEMPLATE_CLASS===<br />
===WRAP_NAMED_NON_TEMPLATE_CLASS===<br />
===WRAP_INCLUDE===<br />
===END_WRAP_CLASS===<br />
===ADD_SIMPLE_TYPEDEF===<br />
===ADD_ONE_TYPEDEF===<br />
===WRAP_TEMPLATE===<br />
===WRAP_IMAGE_FILTER===<br />
<br />
Several deprecated specializations are available:<br />
<br />
* WRAP_IMAGE_FILTER_ALL_TYPES<br />
* WRAP_IMAGE_FILTER_SCALAR<br />
* WRAP_IMAGE_FILTER_VECTOR<br />
* WRAP_IMAGE_FILTER_USIGN_INT<br />
* WRAP_IMAGE_FILTER_SIGN_INT<br />
* WRAP_IMAGE_FILTER_INT<br />
* WRAP_IMAGE_FILTER_REAL<br />
* WRAP_IMAGE_FILTER_RGB<br />
* WRAP_IMAGE_FILTER_RGBA<br />
* WRAP_IMAGE_FILTER_VECTOR_REAL<br />
* WRAP_IMAGE_FILTER_COV_VECTOR_REAL<br />
* WRAP_IMAGE_FILTER_COMPLEX_REAL<br />
<br />
===WRAP_IMAGE_FILTER_COMBINATIONS===<br />
===FILTER_DIMS===<br />
<br />
==Code generation==<br />
<br />
Everything is done in the 'Languages' directory.<br />
<br />
== Installation ==<br />
<br />
The following major macros control the installation of files with WrapITK. A certain usage of these macros in the Wrapping/WrapITK/CMakeLists.txt and the CMakeLists.txt for each language allow the generated files (& modules) to be installed in the proper directory(ies).<br />
* CMAKE_INSTALL_PREFIX<br />
**This macro specifies the root ITK installation directory and by default points to /usr/local/.<br />
* WRAP_ITK_INSTALL_PREFIX<br />
** This macro specifies a subpath where where most of WrapITK files will be installed. <br />
** It is set in the file Wrapping/WrapITK/CMakeLists.txt to one of lib/cmake/ITK-4.0/WrapITK(default) or lib/InsightToolkit/WrapITK/. <br />
** This macro in part (along with the WRAP_ITK_INSTALL macro) controls the installation of WrapITK configuration and generated files.<br />
===WRAP_ITK_INSTALL===<br />
** This macro is set in Wrapping/WrapITK/ConfigureWrapping.cmake and in adjunct to WRAP_ITK_INSTALL_PREFIX controls the installation of wrapped files (mostly the generated files)<br />
** This macro will be commonly encountered in the CMakeLists.txt for each language in lines like these: WRAP_ITK_INSTALL("/Configuration/Typedefs/python" "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${group_name}_ext.i") <br />
===WRAP_ITK_BINDINGS_INSTALL===<br />
** This new macro is introduced to take care of installation of the generated files specifically<br />
** With the introduction of this macro, the earlier WRAP_ITK_INSTALL macro will now be installing all the WrapITK configuration files in the directory pointed to by ${CMAKE_INSTALL_PREFIX} and ${WRAP_ITK_INSTALL_PREFIX}, Whereas the new macro will put all the generated proxies(python) and modules(java,python) in the directory ${CMAKE_INSTALL_PREFIX}/lib/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}<br />
<br />
<br />
=Build=<br />
<br />
==Generation XML descriptions of instantiations==<br />
<br />
==Generation of XML documentation==<br />
<br />
==Generation of swig interfaces==<br />
<br />
==Generation of Language specific C++ code==<br />
<br />
==Compilation of C++ code==<br />
<br />
==Linking of libraries==<br />
<br />
==Compilation of tests==<br />
<br />
=Installation=<br />
<br />
WrapITK installation is composed of installing the following set(s) of files: <br />
# cmake files - distributed over various subdirectories of WrapITK<br />
# python proxies (.py) files which reside in WrapITK/lib<br />
# python modules (.so) which reside in WrapITK/lib<br />
# Java modules which reside in WrapITK/lib<br />
# Typedefs (.i, .mdx, .includes) files which reside in WrapITK/Configuration/Typedefs<br />
# Manually written python files which reside in WrapITK/Python<br />
# Language specific (.i, .in) files in WrapITK/Configuration/Languages.<br />
<br />
To summarize, WRAP_ITK_BINDINGS_INSTALL macro takes care of installation of 2,3, 4 and 6. Whereas the WRAP_ITK_INSTALL macro takes care of 1, 5 and 7.<br />
<br />
<br />
=External Project=<br />
<br />
With WrapITK, an external project is a way to extend the wrapping with custom classes outside ITK. The exact same macros are reused, but a single library is generally produced. External projects can be built using ITK from its build tree or from its installed tree.<br />
<br />
==Example==<br />
<br />
Here is an example to wrap a new dummy class. All the files are in the same directory.<br />
<br />
CMakeLists.txt:<br />
<br />
project(dummy)<br />
<br />
cmake_minimum_required(VERSION 2.8)<br />
<br />
find_package(ITK REQUIRED)<br />
find_package(WrapITK REQUIRED)<br />
<br />
WRAP_LIBRARY("${PROJECT_NAME}")<br />
set(WRAPPER_LIBRARY_DEPENDS Base)<br />
AUTO_INCLUDE_MODULES()<br />
END_WRAP_LIBRARY()<br />
<br />
itkDummy.wrap:<br />
<br />
WRAP_CLASS(itk::Dummy POINTER)<br />
foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_COLOR} ${WRAP_ITK_COMPLEX_REAL})<br />
WRAP_TEMPLATE("${ITKM_${t}}" "${ITKT_${t}}")<br />
endforeach(t)<br />
END_WRAP_CLASS()<br />
<br />
itkDummy.h:<br />
<br />
#ifndef __itkDummy_h<br />
#define __itkDummy_h<br />
<br />
#include "itkProcessObject.h"<br />
#include "itkImage.h"<br />
<br />
namespace itk<br />
{<br />
/** \class Dummy<br />
* \brief a dummy class to return a dummy value<br />
*/<br />
template< class TValue ><br />
class ITK_EXPORT Dummy: public Object<br />
{<br />
public:<br />
/** Standard class typedefs. */<br />
typedef Dummy Self;<br />
typedef Object Superclass;<br />
typedef SmartPointer< Self > Pointer;<br />
typedef SmartPointer< const Self > ConstPointer;<br />
<br />
/** Method for creation through the object factory. */<br />
itkNewMacro(Self);<br />
<br />
/** Run-time type information (and related methods). */<br />
itkTypeMacro(Dummy, Object);<br />
<br />
TValue GetValue() const<br />
{<br />
return NumericTraits<TValue>::OneValue();<br />
}<br />
protected:<br />
Dummy() {};<br />
virtual ~Dummy() {};<br />
<br />
private:<br />
Dummy(const Self &); //purposely not implemented<br />
void operator=(const Self &); //purposely not implemented<br />
};<br />
} // end namespace itk<br />
<br />
#endif<br />
<br />
Then, after building and installing the external project, you can run that code in a python interpreter:<br />
<br />
>>> import itk<br />
<br />
>>> df = itk.Dummy.F.New()<br />
<br />
>>> df.GetValue()<br />
1.0<br />
<br />
>>> drgb = itk.Dummy.RGBUC.New()<br />
<br />
>>> drgb.GetValue()<br />
itkRGBPixel(1 1 1)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/BuildProcess&diff=40293ITK/Release 4/Wrapping/BuildProcess2011-06-01T10:23:43Z<p>Glehmann: </p>
<hr />
<div>Wrapping build is done in several steps.<br />
<br />
=Configuration=<br />
<br />
The configuration is done with with the tool used to build ITK: CMake. All the files cited in this section are located in the '''ITK/Wrapping/WrapITK directory'''.<br />
<br />
During this step, the template instantiations are generated with a several CMake macros. For each macro call of the template instantiation process, some callback macros specific of each language generator are called to generate the files and the commands needed to build the wrappers.<br />
The template instantiation and the code generation are completely separated.<br />
<br />
==Template instantiation==<br />
<br />
Everything is done in the `Libraries` directory. The instantiations are separated in two levels:<br />
<br />
* the libraries, which are grouping several modules. Generally, one binary for a target language contains all the instantiations from one library;<br />
* the modules, inside those libraries. Each module groups several template instantiations. The swig interface generator generates one '.i' file per module.<br />
<br />
Even if it is usually a good idea to follow this structure, the generators are not forced to respect this structure. They are free to generate what they wan how they want.<br />
<br />
Several macros are available to simplify the template instantiations. They are defined in '''TypedefMacros.cmake'''.<br />
<br />
===WRAP_LIBRARIES and END_WRAP_LIBRARIES===<br />
<br />
'''WRAP_LIBRARIES''' is called before generating any library. The generator should use the call back on this macro if they need to perform some initialization step. '''END_WRAP_LIBRARIES''' is called after the last instantiation in the last library is done. The generators should use the callback on this macro to create some extra step — for example to build the tests.<br />
<br />
===WRAP_LIBRARY and END_WRAP_LIBRARY===<br />
Formely BEGIN_WRAPPER_LIBRARY and WRAPPER_LIBRARY_CREATE_LIBRARY.<br />
===INCLUDE_LIBRARY===<br />
===AUTO_INCLUDE_MODULES===<br />
Formely WRAPPER_LIBRARY_CREATE_WRAP_FILES.<br />
===INCLUDE_MODULE===<br />
Formely INCLUDE_WRAP_CMAKE.<br />
===WRAP_MODULE and END_WRAP_MODULE===<br />
===WRAP_CLASS===<br />
===WRAP_NAMED_CLASS===<br />
===WRAP_NON_TEMPLATE_CLASS===<br />
===WRAP_NAMED_NON_TEMPLATE_CLASS===<br />
===WRAP_INCLUDE===<br />
===END_WRAP_CLASS===<br />
===ADD_SIMPLE_TYPEDEF===<br />
===ADD_ONE_TYPEDEF===<br />
===WRAP_TEMPLATE===<br />
===WRAP_IMAGE_FILTER===<br />
<br />
Several deprecated specializations are available:<br />
<br />
* WRAP_IMAGE_FILTER_ALL_TYPES<br />
* WRAP_IMAGE_FILTER_SCALAR<br />
* WRAP_IMAGE_FILTER_VECTOR<br />
* WRAP_IMAGE_FILTER_USIGN_INT<br />
* WRAP_IMAGE_FILTER_SIGN_INT<br />
* WRAP_IMAGE_FILTER_INT<br />
* WRAP_IMAGE_FILTER_REAL<br />
* WRAP_IMAGE_FILTER_RGB<br />
* WRAP_IMAGE_FILTER_RGBA<br />
* WRAP_IMAGE_FILTER_VECTOR_REAL<br />
* WRAP_IMAGE_FILTER_COV_VECTOR_REAL<br />
* WRAP_IMAGE_FILTER_COMPLEX_REAL<br />
<br />
<br />
===WRAP_IMAGE_FILTER_COMBINATIONS===<br />
===WRAP_IMAGE_FILTER_TYPES===<br />
===FILTER_DIMS===<br />
<br />
==Code generation==<br />
<br />
Everything is done in the 'Languages' directory.<br />
<br />
== Installation ==<br />
<br />
The following major macros control the installation of files with WrapITK. A certain usage of these macros in the Wrapping/WrapITK/CMakeLists.txt and the CMakeLists.txt for each language allow the generated files (& modules) to be installed in the proper directory(ies).<br />
* CMAKE_INSTALL_PREFIX<br />
**This macro specifies the root ITK installation directory and by default points to /usr/local/.<br />
* WRAP_ITK_INSTALL_PREFIX<br />
** This macro specifies a subpath where where most of WrapITK files will be installed. <br />
** It is set in the file Wrapping/WrapITK/CMakeLists.txt to one of lib/cmake/ITK-4.0/WrapITK(default) or lib/InsightToolkit/WrapITK/. <br />
** This macro in part (along with the WRAP_ITK_INSTALL macro) controls the installation of WrapITK configuration and generated files.<br />
===WRAP_ITK_INSTALL===<br />
** This macro is set in Wrapping/WrapITK/ConfigureWrapping.cmake and in adjunct to WRAP_ITK_INSTALL_PREFIX controls the installation of wrapped files (mostly the generated files)<br />
** This macro will be commonly encountered in the CMakeLists.txt for each language in lines like these: WRAP_ITK_INSTALL("/Configuration/Typedefs/python" "${WRAPPER_MASTER_INDEX_OUTPUT_DIR}/python/${group_name}_ext.i") <br />
===WRAP_ITK_BINDINGS_INSTALL===<br />
** This new macro is introduced to take care of installation of the generated files specifically<br />
** With the introduction of this macro, the earlier WRAP_ITK_INSTALL macro will now be installing all the WrapITK configuration files in the directory pointed to by ${CMAKE_INSTALL_PREFIX} and ${WRAP_ITK_INSTALL_PREFIX}, Whereas the new macro will put all the generated proxies(python) and modules(java,python) in the directory ${CMAKE_INSTALL_PREFIX}/lib/ITK-${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}<br />
<br />
<br />
=Build=<br />
<br />
==Generation XML descriptions of instantiations==<br />
<br />
==Generation of XML documentation==<br />
<br />
==Generation of swig interfaces==<br />
<br />
==Generation of Language specific C++ code==<br />
<br />
==Compilation of C++ code==<br />
<br />
==Linking of libraries==<br />
<br />
==Compilation of tests==<br />
<br />
=Installation=<br />
<br />
WrapITK installation is composed of installing the following set(s) of files: <br />
# cmake files - distributed over various subdirectories of WrapITK<br />
# python proxies (.py) files which reside in WrapITK/lib<br />
# python modules (.so) which reside in WrapITK/lib<br />
# Java modules which reside in WrapITK/lib<br />
# Typedefs (.i, .mdx, .includes) files which reside in WrapITK/Configuration/Typedefs<br />
# Manually written python files which reside in WrapITK/Python<br />
# Language specific (.i, .in) files in WrapITK/Configuration/Languages.<br />
<br />
To summarize, WRAP_ITK_BINDINGS_INSTALL macro takes care of installation of 2,3, 4 and 6. Whereas the WRAP_ITK_INSTALL macro takes care of 1, 5 and 7.<br />
<br />
<br />
=External Project=<br />
<br />
With WrapITK, an external project is a way to extend the wrapping with custom classes outside ITK. The exact same macros are reused, but a single library is generally produced. External projects can be built using ITK from its build tree or from its installed tree.<br />
<br />
==Example==<br />
<br />
Here is an example to wrap a new dummy class. All the files are in the same directory.<br />
<br />
CMakeLists.txt:<br />
<br />
project(dummy)<br />
<br />
cmake_minimum_required(VERSION 2.8)<br />
<br />
find_package(ITK REQUIRED)<br />
find_package(WrapITK REQUIRED)<br />
<br />
WRAP_LIBRARY("${PROJECT_NAME}")<br />
set(WRAPPER_LIBRARY_DEPENDS Base)<br />
AUTO_INCLUDE_MODULES()<br />
END_WRAP_LIBRARY()<br />
<br />
itkDummy.wrap:<br />
<br />
WRAP_CLASS(itk::Dummy POINTER)<br />
foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_COLOR} ${WRAP_ITK_COMPLEX_REAL})<br />
WRAP_TEMPLATE("${ITKM_${t}}" "${ITKT_${t}}")<br />
endforeach(t)<br />
END_WRAP_CLASS()<br />
<br />
itkDummy.h:<br />
<br />
#ifndef __itkDummy_h<br />
#define __itkDummy_h<br />
<br />
#include "itkProcessObject.h"<br />
#include "itkImage.h"<br />
<br />
namespace itk<br />
{<br />
/** \class Dummy<br />
* \brief a dummy class to return a dummy value<br />
*/<br />
template< class TValue ><br />
class ITK_EXPORT Dummy: public Object<br />
{<br />
public:<br />
/** Standard class typedefs. */<br />
typedef Dummy Self;<br />
typedef Object Superclass;<br />
typedef SmartPointer< Self > Pointer;<br />
typedef SmartPointer< const Self > ConstPointer;<br />
<br />
/** Method for creation through the object factory. */<br />
itkNewMacro(Self);<br />
<br />
/** Run-time type information (and related methods). */<br />
itkTypeMacro(Dummy, Object);<br />
<br />
TValue GetValue() const<br />
{<br />
return NumericTraits<TValue>::OneValue();<br />
}<br />
protected:<br />
Dummy() {};<br />
virtual ~Dummy() {};<br />
<br />
private:<br />
Dummy(const Self &); //purposely not implemented<br />
void operator=(const Self &); //purposely not implemented<br />
};<br />
} // end namespace itk<br />
<br />
#endif<br />
<br />
Then, after building and installing the external project, you can run that code in a python interpreter:<br />
<br />
>>> import itk<br />
<br />
>>> df = itk.Dummy.F.New()<br />
<br />
>>> df.GetValue()<br />
1.0<br />
<br />
>>> drgb = itk.Dummy.RGBUC.New()<br />
<br />
>>> drgb.GetValue()<br />
itkRGBPixel(1 1 1)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/BuildProcess&diff=40274ITK/Release 4/Wrapping/BuildProcess2011-05-31T19:56:54Z<p>Glehmann: /* Example */</p>
<hr />
<div>Wrapping build is done in several steps.<br />
<br />
=Configuration=<br />
<br />
The configuration is done with with the tool used to build ITK: CMake. All the files cited in this section are located in the '''ITK/Wrapping/WrapITK directory'''.<br />
<br />
During this step, the template instantiations are generated with a several CMake macros. For each macro call of the template instantiation process, some callback macros specific of each language generator are called to generate the files and the commands needed to build the wrappers.<br />
The template instantiation and the code generation are completely separated.<br />
<br />
==Template instantiation==<br />
<br />
Everything is done in the `Libraries` directory. The instantiations are separated in two levels:<br />
<br />
* the libraries, which are grouping several modules. Generally, one binary for a target language contains all the instantiations from one library;<br />
* the modules, inside those libraries. Each module groups several template instantiations. The swig interface generator generates one '.i' file per module.<br />
<br />
Even if it is usually a good idea to follow this structure, the generators are not forced to respect this structure. They are free to generate what they wan how they want.<br />
<br />
Several macros are available to simplify the template instantiations.<br />
<br />
==Macros==<br />
<br />
The macros are defined in '''TypedefMacros.cmake'''.<br />
<br />
===WRAP_LIBRARIES and END_WRAP_LIBRARIES===<br />
<br />
'''WRAP_LIBRARIES''' is called before generating any library. The generator should use the call back on this macro if they need to perform some initialization step. '''END_WRAP_LIBRARIES''' is called after the last instantiation in the last library is done. The generators should use the callback on this macro to create some extra step — for example to build the tests.<br />
<br />
===WRAP_LIBRARY and END_WRAP_LIBRARY===<br />
Formely BEGIN_WRAPPER_LIBRARY and WRAPPER_LIBRARY_CREATE_LIBRARY.<br />
===INCLUDE_LIBRARY===<br />
===AUTO_INCLUDE_MODULES===<br />
Formely WRAPPER_LIBRARY_CREATE_WRAP_FILES.<br />
===INCLUDE_MODULE===<br />
Formely INCLUDE_WRAP_CMAKE.<br />
===WRAP_MODULE and END_WRAP_MODULE===<br />
===WRAP_CLASS===<br />
===WRAP_NAMED_CLASS===<br />
===WRAP_NON_TEMPLATE_CLASS===<br />
===WRAP_NAMED_NON_TEMPLATE_CLASS===<br />
===WRAP_INCLUDE===<br />
===END_WRAP_CLASS===<br />
===ADD_SIMPLE_TYPEDEF===<br />
===ADD_ONE_TYPEDEF===<br />
===WRAP_TEMPLATE===<br />
===WRAP_IMAGE_FILTER_ALL_TYPES===<br />
===WRAP_IMAGE_FILTER_SCALAR===<br />
===WRAP_IMAGE_FILTER_VECTOR===<br />
===WRAP_IMAGE_FILTER_USIGN_INT===<br />
===WRAP_IMAGE_FILTER_SIGN_INT===<br />
===WRAP_IMAGE_FILTER_INT===<br />
===WRAP_IMAGE_FILTER_REAL===<br />
===WRAP_IMAGE_FILTER_RGB===<br />
===WRAP_IMAGE_FILTER_RGBA===<br />
===WRAP_IMAGE_FILTER_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COV_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COMPLEX_REAL===<br />
===WRAP_IMAGE_FILTER===<br />
===WRAP_IMAGE_FILTER_COMBINATIONS===<br />
===WRAP_IMAGE_FILTER_TYPES===<br />
===FILTER_DIMS===<br />
<br />
==Code generator==<br />
<br />
Everything is done in the 'Languages' directory.<br />
<br />
==Code generation==<br />
<br />
=Build=<br />
<br />
==Generation XML descriptions of instantiations==<br />
<br />
==Generation of XML documentation==<br />
<br />
==Generation of swig interfaces==<br />
<br />
==Generation of Language specific C++ code==<br />
<br />
==Compilation of C++ code==<br />
<br />
==Linking of libraries==<br />
<br />
==Compilation of tests==<br />
<br />
<br />
=External Project=<br />
<br />
With WrapITK, an external project is a way to extend the wrapping with custom classes outside ITK. The exact same macros are reused, but a single library is generally produced. External projects can be built using ITK from its build tree or from its installed tree.<br />
<br />
==Example==<br />
<br />
Here is an example to wrap a new dummy class. All the files are in the same directory.<br />
<br />
CMakeLists.txt:<br />
<br />
project(dummy)<br />
<br />
cmake_minimum_required(VERSION 2.8)<br />
<br />
find_package(ITK REQUIRED)<br />
find_package(WrapITK REQUIRED)<br />
<br />
WRAP_LIBRARY("${PROJECT_NAME}")<br />
set(WRAPPER_LIBRARY_DEPENDS Base)<br />
AUTO_INCLUDE_MODULES()<br />
END_WRAP_LIBRARY()<br />
<br />
itkDummy.wrap:<br />
<br />
WRAP_CLASS(itk::Dummy POINTER)<br />
foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_COLOR} ${WRAP_ITK_COMPLEX_REAL})<br />
WRAP_TEMPLATE("${ITKM_${t}}" "${ITKT_${t}}")<br />
endforeach(t)<br />
END_WRAP_CLASS()<br />
<br />
itkDummy.h:<br />
<br />
#ifndef __itkDummy_h<br />
#define __itkDummy_h<br />
<br />
#include "itkProcessObject.h"<br />
#include "itkImage.h"<br />
<br />
namespace itk<br />
{<br />
/** \class Dummy<br />
* \brief a dummy class to return a dummy value<br />
*/<br />
template< class TValue ><br />
class ITK_EXPORT Dummy: public Object<br />
{<br />
public:<br />
/** Standard class typedefs. */<br />
typedef Dummy Self;<br />
typedef Object Superclass;<br />
typedef SmartPointer< Self > Pointer;<br />
typedef SmartPointer< const Self > ConstPointer;<br />
<br />
/** Method for creation through the object factory. */<br />
itkNewMacro(Self);<br />
<br />
/** Run-time type information (and related methods). */<br />
itkTypeMacro(Dummy, Object);<br />
<br />
TValue GetValue() const<br />
{<br />
return NumericTraits<TValue>::OneValue();<br />
}<br />
protected:<br />
Dummy() {};<br />
virtual ~Dummy() {};<br />
<br />
private:<br />
Dummy(const Self &); //purposely not implemented<br />
void operator=(const Self &); //purposely not implemented<br />
};<br />
} // end namespace itk<br />
<br />
#endif<br />
<br />
Then, after building and installing the external project, you can run that code in a python interpreter:<br />
<br />
>>> import itk<br />
<br />
>>> df = itk.Dummy.F.New()<br />
<br />
>>> df.GetValue()<br />
1.0<br />
<br />
>>> drgb = itk.Dummy.RGBUC.New()<br />
<br />
>>> drgb.GetValue()<br />
itkRGBPixel(1 1 1)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/BuildProcess&diff=40273ITK/Release 4/Wrapping/BuildProcess2011-05-31T19:54:55Z<p>Glehmann: </p>
<hr />
<div>Wrapping build is done in several steps.<br />
<br />
=Configuration=<br />
<br />
The configuration is done with with the tool used to build ITK: CMake. All the files cited in this section are located in the '''ITK/Wrapping/WrapITK directory'''.<br />
<br />
During this step, the template instantiations are generated with a several CMake macros. For each macro call of the template instantiation process, some callback macros specific of each language generator are called to generate the files and the commands needed to build the wrappers.<br />
The template instantiation and the code generation are completely separated.<br />
<br />
==Template instantiation==<br />
<br />
Everything is done in the `Libraries` directory. The instantiations are separated in two levels:<br />
<br />
* the libraries, which are grouping several modules. Generally, one binary for a target language contains all the instantiations from one library;<br />
* the modules, inside those libraries. Each module groups several template instantiations. The swig interface generator generates one '.i' file per module.<br />
<br />
Even if it is usually a good idea to follow this structure, the generators are not forced to respect this structure. They are free to generate what they wan how they want.<br />
<br />
Several macros are available to simplify the template instantiations.<br />
<br />
==Macros==<br />
<br />
The macros are defined in '''TypedefMacros.cmake'''.<br />
<br />
===WRAP_LIBRARIES and END_WRAP_LIBRARIES===<br />
<br />
'''WRAP_LIBRARIES''' is called before generating any library. The generator should use the call back on this macro if they need to perform some initialization step. '''END_WRAP_LIBRARIES''' is called after the last instantiation in the last library is done. The generators should use the callback on this macro to create some extra step — for example to build the tests.<br />
<br />
===WRAP_LIBRARY and END_WRAP_LIBRARY===<br />
Formely BEGIN_WRAPPER_LIBRARY and WRAPPER_LIBRARY_CREATE_LIBRARY.<br />
===INCLUDE_LIBRARY===<br />
===AUTO_INCLUDE_MODULES===<br />
Formely WRAPPER_LIBRARY_CREATE_WRAP_FILES.<br />
===INCLUDE_MODULE===<br />
Formely INCLUDE_WRAP_CMAKE.<br />
===WRAP_MODULE and END_WRAP_MODULE===<br />
===WRAP_CLASS===<br />
===WRAP_NAMED_CLASS===<br />
===WRAP_NON_TEMPLATE_CLASS===<br />
===WRAP_NAMED_NON_TEMPLATE_CLASS===<br />
===WRAP_INCLUDE===<br />
===END_WRAP_CLASS===<br />
===ADD_SIMPLE_TYPEDEF===<br />
===ADD_ONE_TYPEDEF===<br />
===WRAP_TEMPLATE===<br />
===WRAP_IMAGE_FILTER_ALL_TYPES===<br />
===WRAP_IMAGE_FILTER_SCALAR===<br />
===WRAP_IMAGE_FILTER_VECTOR===<br />
===WRAP_IMAGE_FILTER_USIGN_INT===<br />
===WRAP_IMAGE_FILTER_SIGN_INT===<br />
===WRAP_IMAGE_FILTER_INT===<br />
===WRAP_IMAGE_FILTER_REAL===<br />
===WRAP_IMAGE_FILTER_RGB===<br />
===WRAP_IMAGE_FILTER_RGBA===<br />
===WRAP_IMAGE_FILTER_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COV_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COMPLEX_REAL===<br />
===WRAP_IMAGE_FILTER===<br />
===WRAP_IMAGE_FILTER_COMBINATIONS===<br />
===WRAP_IMAGE_FILTER_TYPES===<br />
===FILTER_DIMS===<br />
<br />
==Code generator==<br />
<br />
Everything is done in the 'Languages' directory.<br />
<br />
==Code generation==<br />
<br />
=Build=<br />
<br />
==Generation XML descriptions of instantiations==<br />
<br />
==Generation of XML documentation==<br />
<br />
==Generation of swig interfaces==<br />
<br />
==Generation of Language specific C++ code==<br />
<br />
==Compilation of C++ code==<br />
<br />
==Linking of libraries==<br />
<br />
==Compilation of tests==<br />
<br />
<br />
=External Project=<br />
<br />
With WrapITK, an external project is a way to extend the wrapping with custom classes outside ITK. The exact same macros are reused, but a single library is generally produced. External projects can be built using ITK from its build tree or from its installed tree.<br />
<br />
==Example==<br />
<br />
Here is an example to wrap a new dummy class.<br />
<br />
CMakeLists.txt:<br />
<br />
project(dummy)<br />
<br />
cmake_minimum_required(VERSION 2.8)<br />
<br />
find_package(ITK REQUIRED)<br />
find_package(WrapITK REQUIRED)<br />
<br />
WRAP_LIBRARY("${PROJECT_NAME}")<br />
set(WRAPPER_LIBRARY_DEPENDS Base)<br />
AUTO_INCLUDE_MODULES()<br />
END_WRAP_LIBRARY()<br />
<br />
itkDummy.h:<br />
<br />
#ifndef __itkDummy_h<br />
#define __itkDummy_h<br />
<br />
#include "itkProcessObject.h"<br />
#include "itkImage.h"<br />
<br />
namespace itk<br />
{<br />
/** \class Dummy<br />
* \brief a dummy class to return a dummy value<br />
*/<br />
template< class TValue ><br />
class ITK_EXPORT Dummy: public Object<br />
{<br />
public:<br />
/** Standard class typedefs. */<br />
typedef Dummy Self;<br />
typedef Object Superclass;<br />
typedef SmartPointer< Self > Pointer;<br />
typedef SmartPointer< const Self > ConstPointer;<br />
<br />
/** Method for creation through the object factory. */<br />
itkNewMacro(Self);<br />
<br />
/** Run-time type information (and related methods). */<br />
itkTypeMacro(Dummy, Object);<br />
<br />
TValue GetValue() const<br />
{<br />
return NumericTraits<TValue>::OneValue();<br />
}<br />
protected:<br />
Dummy() {};<br />
virtual ~Dummy() {};<br />
<br />
private:<br />
Dummy(const Self &); //purposely not implemented<br />
void operator=(const Self &); //purposely not implemented<br />
};<br />
} // end namespace itk<br />
<br />
#endif<br />
<br />
itkDummy.wrap:<br />
<br />
WRAP_CLASS(itk::Dummy POINTER)<br />
foreach(t ${WRAP_ITK_SCALAR} ${WRAP_ITK_COLOR} ${WRAP_ITK_COMPLEX_REAL})<br />
WRAP_TEMPLATE("${ITKM_${t}}" "${ITKT_${t}}")<br />
endforeach(t)<br />
END_WRAP_CLASS()<br />
<br />
Then, after building and installing the external project, you can run that code in a python interpreter:<br />
<br />
>>> import itk<br />
<br />
>>> df = itk.Dummy.F.New()<br />
<br />
>>> df.GetValue()<br />
1.0<br />
<br />
>>> drgb = itk.Dummy.RGBUC.New()<br />
<br />
>>> drgb.GetValue()<br />
itkRGBPixel(1 1 1)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/SpectralAnalysis/CrossCorrelationInFourierDomain&diff=40052ITK/Examples/SpectralAnalysis/CrossCorrelationInFourierDomain2011-05-20T12:34:48Z<p>Glehmann: </p>
<hr />
<div>==CrossCorrelationInFourierDomain.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkImageFileReader.h"<br />
#include "itkImageFileWriter.h"<br />
<br />
#include "itkVnlFFTRealToComplexConjugateImageFilter.h"<br />
#include "itkVnlFFTComplexConjugateToRealImageFilter.h"<br />
#include "itkComplexToRealImageFilter.h"<br />
#include "itkComplexToImaginaryImageFilter.h"<br />
#include "itkComposeImageFilter.h"<br />
#include "itkMultiplyImageFilter.h"<br />
#include "itkRescaleIntensityImageFilter.h"<br />
#include "itkFFTShiftImageFilter.h"<br />
#include "itkMinimumMaximumImageCalculator.h"<br />
<br />
#if ITK_VERSION_MAJOR < 4<br />
#include "itkMultiplyByConstantImageFilter.h"<br />
#endif<br />
<br />
int main(int argc, char*argv[])<br />
{<br />
const unsigned int Dimension = 2;<br />
typedef float PixelType;<br />
typedef itk::Image< PixelType, Dimension > FloatImageType;<br />
typedef itk::Image< unsigned char, Dimension > UnsignedCharImageType;<br />
<br />
if( argc < 3 )<br />
{<br />
std::cerr << "Missing Parameters " << std::endl;<br />
std::cerr << "Usage: " << argv[0];<br />
std::cerr << " FixedImage MovingImage"<< std::endl;;<br />
return EXIT_FAILURE;<br />
}<br />
std::string fixedImageFilename = argv[1];<br />
std::string movingImageFilename = argv[2];<br />
<br />
// Read the input images<br />
typedef itk::ImageFileReader< FloatImageType > ImageReaderType;<br />
ImageReaderType::Pointer fixedImageReader = ImageReaderType::New();<br />
fixedImageReader->SetFileName( fixedImageFilename );<br />
fixedImageReader->Update();<br />
<br />
ImageReaderType::Pointer movingImageReader = ImageReaderType::New();<br />
movingImageReader->SetFileName( movingImageFilename );<br />
movingImageReader->Update();<br />
<br />
// Shift the input images<br />
typedef itk::FFTShiftImageFilter< FloatImageType, FloatImageType > FFTShiftFilterType;<br />
FFTShiftFilterType::Pointer fixedFFTShiftFilter = FFTShiftFilterType::New();<br />
fixedFFTShiftFilter->SetInput(fixedImageReader->GetOutput());<br />
fixedFFTShiftFilter->Update();<br />
<br />
FFTShiftFilterType::Pointer movingFFTShiftFilter = FFTShiftFilterType::New();<br />
movingFFTShiftFilter->SetInput(movingImageReader->GetOutput());<br />
movingFFTShiftFilter->Update();<br />
<br />
// Compute the FFT of the input<br />
typedef itk::VnlFFTRealToComplexConjugateImageFilter< FloatImageType > FFTFilterType;<br />
FFTFilterType::Pointer fixedFFTFilter = FFTFilterType::New();<br />
fixedFFTFilter->SetInput( fixedFFTShiftFilter->GetOutput() );<br />
fixedFFTFilter->Update();<br />
<br />
FFTFilterType::Pointer movingFFTFilter = FFTFilterType::New();<br />
movingFFTFilter->SetInput( movingFFTShiftFilter->GetOutput() );<br />
<br />
typedef FFTFilterType::OutputImageType SpectralImageType;<br />
<br />
// Take the conjugate of the fftFilterMoving<br />
// Extract the real part<br />
typedef itk::ComplexToRealImageFilter<SpectralImageType, FloatImageType> RealFilterType;<br />
RealFilterType::Pointer realFilter = RealFilterType::New();<br />
realFilter->SetInput(movingFFTFilter->GetOutput());<br />
<br />
// Extract the imaginary part<br />
typedef itk::ComplexToImaginaryImageFilter<SpectralImageType, FloatImageType> ImaginaryFilterType;<br />
ImaginaryFilterType::Pointer imaginaryFilter = ImaginaryFilterType::New();<br />
imaginaryFilter->SetInput(movingFFTFilter->GetOutput());<br />
<br />
// Flip the sign of the imaginary and combine with the real part again<br />
#if ITK_VERSION_MAJOR < 4<br />
typedef itk::MultiplyByConstantImageFilter<FloatImageType,PixelType,FloatImageType> MultiplyConstantFilterType;<br />
#else<br />
typedef itk::MultiplyImageFilter<FloatImageType,FloatImageType,FloatImageType> MultiplyConstantFilterType;<br />
#endif<br />
<br />
MultiplyConstantFilterType::Pointer flipSignFilter = MultiplyConstantFilterType::New();<br />
#if ITK_VERSION_MAJOR < 4<br />
flipSignFilter->SetConstant(-1);<br />
#else<br />
flipSignFilter->SetConstant2(-1);<br />
#endif<br />
flipSignFilter->SetInput(imaginaryFilter->GetOutput());<br />
typedef itk::ComposeImageFilter<FloatImageType, SpectralImageType> RealImageToComplexFilterType;<br />
RealImageToComplexFilterType::Pointer conjugateFilter = RealImageToComplexFilterType::New();<br />
conjugateFilter->SetInput1(realFilter->GetOutput());<br />
conjugateFilter->SetInput2(flipSignFilter->GetOutput());<br />
<br />
// The conjugate product of the spectrum<br />
typedef itk::MultiplyImageFilter< SpectralImageType,<br />
SpectralImageType,<br />
SpectralImageType > MultiplyFilterType;<br />
MultiplyFilterType::Pointer multiplyFilter = MultiplyFilterType::New();<br />
multiplyFilter->SetInput1( fixedFFTFilter->GetOutput() );<br />
multiplyFilter->SetInput2( conjugateFilter->GetOutput() );<br />
<br />
// IFFT<br />
typedef itk::VnlFFTComplexConjugateToRealImageFilter< SpectralImageType > IFFTFilterType;<br />
IFFTFilterType::Pointer fftInverseFilter = IFFTFilterType::New();<br />
fftInverseFilter->SetInput( multiplyFilter->GetOutput() );<br />
<br />
// Write the spectrum<br />
typedef itk::RescaleIntensityImageFilter< FloatImageType, UnsignedCharImageType > RescaleFilterType;<br />
RescaleFilterType::Pointer rescaler = RescaleFilterType::New();<br />
rescaler->SetInput( fftInverseFilter->GetOutput() );<br />
rescaler->SetOutputMinimum(0);<br />
rescaler->SetOutputMaximum(255);<br />
rescaler->Update();<br />
<br />
typedef itk::ImageFileWriter< UnsignedCharImageType > WriterType;<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetFileName( "CrossCorr.png" );<br />
writer->SetInput( rescaler->GetOutput() );<br />
writer->Update();<br />
<br />
typedef itk::MinimumMaximumImageCalculator <UnsignedCharImageType><br />
ImageCalculatorFilterType;<br />
<br />
ImageCalculatorFilterType::Pointer imageCalculatorFilter<br />
= ImageCalculatorFilterType::New ();<br />
imageCalculatorFilter->SetImage(rescaler->GetOutput());<br />
imageCalculatorFilter->Compute();<br />
<br />
UnsignedCharImageType::IndexType maximumLocation = imageCalculatorFilter->GetIndexOfMaximum();<br />
std::cout << maximumLocation << std::endl; // should be (17,15)<br />
<br />
/*<br />
if ypeak < size(I,1)/2 ypeak = -(ypeak-1);<br />
else ypeak = size(I,1) - (ypeak-1);<br />
end<br />
if xpeak < size(I,2)/2 xpeak = -(xpeak-1);<br />
else xpeak = size(I,2) - (xpeak-1);<br />
end<br />
*/<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
</source><br />
<br />
{{ITKCMakeLists|CrossCorrelationInFourierDomain}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/SpectralAnalysis/RealAndImaginaryToComplexImageFilter&diff=40005ITK/Examples/SpectralAnalysis/RealAndImaginaryToComplexImageFilter2011-05-19T14:38:26Z<p>Glehmann: /* RealAndImaginaryToComplexImageFilter.cxx */</p>
<hr />
<div>==RealAndImaginaryToComplexImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkComposeImageFilter.h"<br />
<br />
#include <complex><br />
<br />
int main( int argc, char *argv[] )<br />
{<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
typedef itk::Image<std::complex<float>, 2> ComplexImageType;<br />
<br />
ImageType::Pointer realImage = ImageType::New();<br />
ImageType::Pointer imaginaryImage = ImageType::New();<br />
<br />
typedef itk::ComposeImageFilter<ImageType,ComplexImageType> RealAndImaginaryToComplexImageFilterType;<br />
RealAndImaginaryToComplexImageFilterType::Pointer realAndImaginaryToComplexImageFilter = RealAndImaginaryToComplexImageFilterType::New();<br />
realAndImaginaryToComplexImageFilter->SetInput1(realImage);<br />
realAndImaginaryToComplexImageFilter->SetInput2(imaginaryImage);<br />
realAndImaginaryToComplexImageFilter->Update();<br />
<br />
ComplexImageType* output = realAndImaginaryToComplexImageFilter->GetOutput();<br />
output->Print(std::cout);<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
</source><br />
{{ITKCMakeLists|realAndImaginaryImageFilter}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples&diff=40004ITK/Examples2011-05-19T14:37:34Z<p>Glehmann: /* Spectral Analysis */</p>
<hr />
<div>These are fully independent, compilable examples. There is significant overlap in the examples, but they are each intended to illustrate a different concept and be fully stand alone compilable.<br />
Please add examples in your areas of expertise!<br />
You can checkout the entire set of examples from this repository: <br />
http://gitorious.org/itkwikiexamples/itkwikiexamples<br />
<pre>git clone git://gitorious.org/itkwikiexamples/itkwikiexamples.git ITKWikiExamples</pre><br />
<br />
==About the Examples==<br />
* [http://www.itk.org/Wiki/images/e/e6/ITK_Examples_Iowa_Meeting_2010_11-8-2010.odp Official announcement]<br />
===ItkVtkGlue===<br />
ITK and VTK are very separate toolkits - ITK for image processing and VTK for data visualization. It is often convenient to use the two together - namely, to display an ITK image on the screen. The ItkVtkGlue kit serves exactly this purpose. Also provided inside ItkVtkGlue is a QuickView class to allow a 2 line display of an ITK image.<br />
<br />
If you download the entire ITK Wiki Examples Collection, the ItkVtkGlue directory will be included and configured. If you wish to just build a few examples, then you will need to [http://gitorious.org/itkwikiexamples/itkwikiexamples/blobs/raw/master/ItkVtkGlue.tar.gz download ItkVtkGlue] and build it.<br />
<br />
===[[ITK/Examples/Instructions/ForUsers|Information for Wiki Examples Users]]===<br />
If you just want to use the Wiki Examples, [[ITK/Examples/Instructions/ForUsers|go here]]. You will learn how to search for examples, build a few examples and build all of the examples.<br />
<br />
===[[ITK/Examples/Instructions/ForDevelopers|Information for Wiki Examples Developers]]===<br />
If you want to contribute examples [[ITK/Examples/Instructions/ForDevelopers|go here]]. You will learn how to add a new example and the guidelines for writing an example.<br />
<br />
===[[ITK/Examples/Instructions/ForAdministrators|Information for Wiki Examples Administrators]]===<br />
If you are a Wiki Example Administrator or want to learn more about the process [[ITK/Examples/Instructions/ForAdministrators|go here]]. You will learn how the Wiki Examples repository is organized, how the repository is synced to the wiki and how to add new topics, tests and regression baselines.<br />
<br />
==Simple Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SimpleOperations/WidthHeight | Get the width and height of an image ]] || || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/VariableLengthVector | Variable length vector ]] || {{ITKDoxygenURL|VariableLengthVector}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TranslationTransform | Translate an image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|ResampleImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/NumericTraits | Get some basic information about a type]] || {{ITKDoxygenURL|NumericTraits}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/ScalarToRGBColormapImageFilter | Apply a color map to an image]] || {{ITKDoxygenURL|ScalarToRGBColormapImageFilter}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TryCatch | Catch an ITK exception]] || || Try/Catch blocks<br />
|-<br />
| [[ITK/Examples/SimpleOperations/BresenhamLine | Get the points on a Bresenham line between two points]] || {{ITKDoxygenURL|BresenhamLine}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/Offset | Add an offset to a pixel index]] || {{ITKDoxygenURL|Offset}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenPoints | Distance between two points]] || {{ITKDoxygenURL|Point}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenIndices | Distance between two indices]] || {{ITKDoxygenURL|Point}}, {{ITKDoxygenURL|Index}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/CreateVector | Create a vector]] || {{ITKDoxygenURL|Vector}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/GetNameOfClass | Get the name/type/class of an object ]] || || GetNameOfClass()<br />
|-<br />
| [[ITK/Examples/Images/Index | An object which holds the index of a pixel ]] || {{ITKDoxygenURL|Index}} || <br />
|-<br />
| [[ITK/Examples/Images/Size | An object which holds the size of an image ]] || {{ITKDoxygenURL|Size}} || <br />
|-<br />
| [[ITK/Examples/Images/ImageRegion | An object which holds the index (start) and size of a region of an image ]] || {{ITKDoxygenURL|ImageRegion}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/Transparency | Make part of an image transparent]] || {{ITKDoxygenURL|RGBAPixel}} || Transparency, RGBA, alpha<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionIntersection | Determine if one region is fully inside another region]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection, IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/PixelInsideRegion | Determine if a pixel is inside of a region]] || {{ITKDoxygenURL|ImageRegion}} || IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionOverlap | Determine the overlap of two regions]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection<br />
|-<br />
| [[ITK/Examples/SimpleOperations/ImageDuplicator | Duplicate an image]] || {{ITKDoxygenURL|ImageDuplicator}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/RandomImageSource | Produce an image of noise]] || {{ITKDoxygenURL|RandomImageSource}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/SetPixels | Set specified pixels to specified values]] || {{ITKDoxygenURL|Image}} ||<br />
|}<br />
<br />
==Mathematical Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Math/CovariantVector | Create a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || This is the object which should be used to represent a mathematical vector.<br />
|-<br />
| [[ITK/Examples/Math/CovariantVectorNorm | Compute the norm of a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || In-place and non-inplace norms.<br />
|-<br />
| [[ITK/Examples/Math/Matrix | Matrix ]] || {{ITKDoxygenURL|Matrix}} || <br />
|-<br />
| [[ITK/Examples/Math/Pi | Mathematical constant pi = 3.14 ]] || {{ITKDoxygenURL|Math}} || <br />
|-<br />
| [[ITK/Examples/Math/DotProduct | Dot product (inner product) of two vectors ]] || {{ITKDoxygenURL|Vector}} || <br />
|}<br />
<br />
==Image Functions==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Functions/GuassianBlurImageFunction | GuassianBlurImageFunction ]] || {{ITKDoxygenURL|GuassianBlurImageFunction}} || <br />
|}<br />
<br />
==Point Set==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/PointSet/CreatePointSet | Create a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/ReadPointSet | Read a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/WritePointSet | Write a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/BoundingBox | Get the bounding box of a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|}<br />
<br />
==Input/Output (IO)==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/IO/ReadVectorImage| Read an image file with an unknown number of components]] || {{ITKDoxygenURL|ImageFileReader}},{{ITKDoxygenURL|VectorImage}} || <br />
|-<br />
| [[ITK/Examples/IO/ImportImageFilter| Convert a C-style array to an itkImage]] || {{ITKDoxygenURL|ImportImageFilter}} || <br />
|-<br />
| [[ITK/Examples/IO/ReadUnknownImageType | Read an image file without knowing its type before hand]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileWriter | Write an image]] || {{ITKDoxygenURL|ImageFileWriter}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileReader | Read an image]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/TIFFImageIO | Write a TIFF image]] || {{ITKDoxygenURL|TIFFImageIO}} || This is a general demonstration of how to use a specific writer rather than relying on the ImageFileWriter to choose for you.<br />
|-<br />
| [[ITK/Examples/IO/ImageToVTKImageFilter | Display an ITK image]] || {{ITKDoxygenURL|ImageToVTKImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/IO/TransformFileWriter | Write a transform to a file]] || {{ITKDoxygenURL|TransformFileWriter}} ||<br />
|-<br />
| [[ITK/Examples/IO/TransformFileReader | Read a transform from a file]] || {{ITKDoxygenURL|TransformFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/VolumeFromSlices | Create a 3D volume from a series of 2D images]] || {{ITKDoxygenURL|ImageSeriesReader}} || Uses NumericSeriesFileNames to generate a list of file names<br />
|}<br />
<br />
==DICOM==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/DICOM/ResampleDICOM | Resample a DICOM series]] || {{ITKDoxygenURL|GDCMImageIO}} || Resample a DICOM series with user-specified spacing.<br />
|}<br />
<br />
==Image Processing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddConstantToImageFilter| Add a constant to every pixel in an image]] || {{ITKDoxygenURL|AddImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SubtractConstantFromImageFilter| Subtract a constant from every pixel in an image]] || {{ITKDoxygenURL|SubtractImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SquareImageFilter| Square every pixel in an image]] || {{ITKDoxygenURL|SquareImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Upsampling| Upsampling an image]] || {{ITKDoxygenURL|BSplineInterpolateImageFunction}} {{ITKDoxygenURL|ResampleImageFilter}} || Interpolate missing pixels in order to upsample an image. Note this only works on scalar images.<br />
|-<br />
| [[ITK/Examples/Images/FlipImageFilter | Flip an image over specified axes]] || {{ITKDoxygenURL|FlipImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/VectorRescaleIntensityImageFilter | Apply a transformation to the magnitude of vector valued image pixels]] || {{ITKDoxygenURL|VectorRescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Images/NeighborhoodOperatorImageFilter | Apply a kernel to every pixel in an image]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LaplacianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianImageFilter}} || Input image type must be double or float<br />
|-<br />
| [[ITK/Examples/Images/ConstantPadImageFilter | Pad an image with a constant value]] || {{ITKDoxygenURL|ConstantPadImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/IntensityWindowingImageFilter| IntensityWindowingImageFilter]] || {{ITKDoxygenURL|IntensityWindowingImageFilter}} || Apply a linear intensity transform from a specified input range to a specified output range.<br />
|-<br />
| [[ITK/Examples/Images/ShrinkImageFilter | Shrink an image]] || {{ITKDoxygenURL|ShrinkImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/NormalizedCorrelationImageFilter | Normalized correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyByConstantImageFilter | Multiply every pixel in an image by a constant]] || {{ITKDoxygenURL|MultiplyImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SquaredDifferenceImageFilter | Compute the squared difference of corresponding pixels in two images]] || {{ITKDoxygenURL|SquaredDifferenceImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddPixelAccessor | Add a constant to every pixel without duplicating the image in memory (an accessor)]] || {{ITKDoxygenURL|AddPixelAccessor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionalMaximaImageFilter | RegionalMaximaImageFilter]] || {{ITKDoxygenURL|RegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/ValuedRegionalMaximaImageFilter | ValuedRegionalMaximaImageFilter]] || {{ITKDoxygenURL|ValuedRegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaximumImageFilter | Pixel wise compare two input images and set the output pixel to their max]] || {{ITKDoxygenURL|MaximumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumImageFilter | Pixel wise compare two input images and set the output pixel to their min]] || {{ITKDoxygenURL|MinimumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AndImageFilter | Binary AND two images]] || {{ITKDoxygenURL|AndImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/OrImageFilter | Binary OR two images]] || {{ITKDoxygenURL|OrImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/XorImageFilter | Binary XOR (exclusive OR) two images]] || {{ITKDoxygenURL|XorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryNotImageFilter | Invert an image using the Binary Not operation]] || {{ITKDoxygenURL|BinaryNotImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Compose3DCovariantVectorImageFilter | Compose a vector image (with 3 components) from three scalar images]] || {{ITKDoxygenURL|ComposeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/NthElementImageAdaptor | Extract a component of an itkImage with pixels with multiple components]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || Use built in functionality to extract a component of an itkImage with CovariantVector components. Note this does not work for itkVectorImages - see VectorIndexSelectionCastImageFilter instead.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ImageAdaptorExtractVectorComponent | Present an image by first performing an operation]] || {{ITKDoxygenURL|ImageAdaptor}} || A demonstration of how to present an image pixel as a function of the pixel. In this example the functionality of NthElementImageAdaptor is demonstrated.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ProcessingNthImageElement | Process the nth component/element of a vector image]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter | Label binary regions in an image and get their properties]] || {{ITKDoxygenURL|BinaryImageToShapeLabelMapFilter}} || Region bounding box, etc.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConvolutionImageFilter | Convolve an image with a kernel]] || {{ITKDoxygenURL|ConvolutionImageFilter}} || Convolution.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RelabelComponentImageFilter | Assign contiguous labels to connected regions of an image]] || {{ITKDoxygenURL|RelabelComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CropImageFilter | Crop an image]] || {{ITKDoxygenURL|CropImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AbsImageFilter | Compute the absolute value of an image]] || {{ITKDoxygenURL|AbsImageFilter}} || magnitude<br />
|-<br />
| [[ITK/Examples/ImageProcessing/InvertIntensityImageFilter | Invert an image]] || {{ITKDoxygenURL|InvertIntensityImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaskImageFilter | Apply a mask to an image]] || {{ITKDoxygenURL|MaskImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SigmoidImageFilter | Pass image pixels through a sigmoid function]] || {{ITKDoxygenURL|SigmoidImageFilter}} || The qualitative description of how Alpha and Beta affect the function from the ITK Software Guide and the associated images would be nice to add to the doxygen.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|ThresholdImageFilter}} || The result is the original image but with the values below (or above) the threshold "clamped" to an output value.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|BinaryThresholdImageFilter}} || The result is a binary image (inside the threshold region or outside the threshold region).<br />
|-<br />
| [[ITK/Examples/ImageProcessing/UnaryFunctorImageFilter | Apply a custom operation to each pixel in an image]] || {{ITKDoxygenURL|UnaryFunctorImageFilter}} || Perform a custom operation on every pixel in an image. This example rotates the vector-valued pixels by 90 degrees.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryFunctorImageFilter | Apply a predefined operation to corresponding pixels in two images]] || {{ITKDoxygenURL|BinaryFunctorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryFunctorImageFilterCustom | Apply a custom operation to corresponding pixels in two images]] || {{ITKDoxygenURL|BinaryFunctorImageFilter}} || This example computes the squared difference between corresponding pixels.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumMaximumImageCalculator | Find the minimum and maximum value (and the position of the value) in an image]] || {{ITKDoxygenURL|MinimumMaximumImageCalculator}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddImageFilter | Add two images together]] || {{ITKDoxygenURL|AddImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/SubtractImageFilter | Subtract two images]] || {{ITKDoxygenURL|SubtractImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PasteImageFilter | Paste a part of one image into another image]] || {{ITKDoxygenURL|PasteImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume | Stack multiple 2D images into a 3D image]] || {{ITKDoxygenURL|TileImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/TileImageFilter_SideBySide | Tile multiple images side by side]] || {{ITKDoxygenURL|TileImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyImageFilter | Multiply two images together]] || {{ITKDoxygenURL|MultiplyImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionOfInterestImageFilter | Extract a portion of an image (region of interest)]] || {{ITKDoxygenURL|RegionOfInterestImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RescaleIntensityImageFilter | Rescale the intensity values of an image to a specified range]] || {{ITKDoxygenURL|RescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConnectedComponentImageFilter | Label connected components in a binary image]] || {{ITKDoxygenURL|ConnectedComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/NormalizeImageFilter | Normalize an image]] || {{ITKDoxygenURL|NormalizeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CastImageFilter | Cast an image from one type to another]] || {{ITKDoxygenURL|CastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PermuteAxesImageFilter | Switch the axes of an image]] || {{ITKDoxygenURL|PermuteAxesImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LinearInterpolateImageFunction | Linearly interpolate a position in an image]] || {{ITKDoxygenURL|LinearInterpolateImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/HammingWindowFunction | HammingWindowFunction]] || {{ITKDoxygenURL|HammingWindowFunction}} ||<br />
|}<br />
<br />
==Vector Images==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImage | Create a vector image]] || {{ITKDoxygenURL|VectorImage}} || An image with an ND vector at each pixel<br />
|-<br />
| [[ITK/Examples/VectorImages/ImageToVectorImageFilter | Create a vector image from a collection of scalar images]] || {{ITKDoxygenURL|ComposeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImageToImageAdaptor | View a component of a vector image as if it were a scalar image]] || {{ITKDoxygenURL|VectorImageToImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorIndexSelectionCastImageFilter | Extract a component of an itkVectorImage]] || {{ITKDoxygenURL|VectorIndexSelectionCastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorResampleImageFilter | Translate a vector image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|VectorResampleImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/JoinImageFilter | Join images, stacking their components]] || {{ITKDoxygenURL|JoinImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/NeighborhoodIterator | NeighborhoodIterator on a VectorImage]] || {{ITKDoxygenURL|VectorImage}} {{ITKDoxygenURL|NeighborhoodIterator}}||<br />
|}<br />
<br />
==Iterating Over (Traversing) An Image==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator_Manual | Iterate over a region of an image with a shaped neighborhood]] || Create the shape manually {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator | Iterate over a region of an image with a shaped neighborhood]] || Create the shape from a StructuringElement {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionExclusionConstIteratorWithIndex | Iterator over an image skipping a specified region]] || {{ITKDoxygenURL|ImageRegionExclusionConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomConstIteratorWithIndex | Randomly select pixels from a region of an image]] || {{ITKDoxygenURL|ImageRandomConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomNonRepeatingConstIteratorWithIndex | Randomly select pixels from a region of an image without replacement]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/LineIterator | Iterate over a line through an image]] || {{ITKDoxygenURL|LineIterator}} || Walks a Bresenham line through an image (with write access)<br />
|-<br />
| [[ITK/Examples/Iterators/LineConstIterator | Iterate over a line through an image without write access]] || {{ITKDoxygenURL|LineConstIterator}} || Walks a Bresenham line through an image (without write access)<br />
|-<br />
| [[ITK/Examples/Iterators/ImageBoundaryFacesCalculator | Iterate over the central region (non-boundary) separately from the face-regions (boundary)]] || {{ITKDoxygenURL|ImageBoundaryFacesCalculator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/NeighborhoodIterator | Iterate over a region of an image with a neighborhood (with write access)]] || {{ITKDoxygenURL|NeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstNeighborhoodIterator | Iterate over a region of an image with a neighborhood (without write access)]] || {{ITKDoxygenURL|ConstNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIterator | Iterate over a region of an image (with write access)]] || {{ITKDoxygenURL|ImageRegionIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIterator | Iterate over a region of an image (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstantBoundaryCondition | Make out of bounds pixels return a constant value]] || {{ITKDoxygenURL|ConstantBoundaryCondition}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (with write access)]] || {{ITKDoxygenURL|ImageRegionIteratorWithIndex}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIteratorWithIndex}} ||<br />
|}<br />
<br />
==Kernels==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Operators/GaussianOperator | Create a Gaussian kernel]] || {{ITKDoxygenURL|GaussianOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/GaussianDerivativeOperator | Create a Gaussian derivative kernel]] || {{ITKDoxygenURL|GaussianDerivativeOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/LaplacianOperator | Create a Laplacian kernel]] || {{ITKDoxygenURL|LaplacianOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/DerivativeOperator | Create a derivative kernel]] || {{ITKDoxygenURL|DerivativeOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/SobelOperator | Create the Sobel kernel]] || {{ITKDoxygenURL|SobelOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/ForwardDifferenceOperator | Create a forward difference kernel]] || {{ITKDoxygenURL|ForwardDifferenceOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/BackwardDifferenceOperator | Create a backward difference kernel]] || {{ITKDoxygenURL|BackwardDifferenceOperator}} || <br />
<br />
|}<br />
<br />
==Image Edges, Gradients, and Derivatives==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/DerivativeImageFilter | Compute the derivative of an image in a particular direction]] || {{ITKDoxygenURL|DerivativeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientRecursiveGaussianImageFilter| Compute the gradient of an image by convolution with the first derivative of a Gaussian]] || {{ITKDoxygenURL|GradientRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeRecursiveGaussianImageFilter | Find the gradient magnitude of the image first smoothed with a Gaussian kernel]] || {{ITKDoxygenURL|GradientMagnitudeRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/RecursiveGaussianImageFilter | Find higher derivatives of an image]] || {{ITKDoxygenURL|RecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryContourImageFilter | Extract the boundaries of connected regions in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} || Blob boundary, border<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryBoundaries | Extract the inner and outer boundaries of blobs in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeImageFilter | Compute the gradient magnitude image]] || {{ITKDoxygenURL|GradientMagnitudeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/LaplacianRecursiveGaussianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianRecursiveGaussianImageFilter}} ||<br />
|}<br />
<br />
==Smoothing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Smoothing/AntiAliasBinaryImageFilter | Anti alias a binary image]] || {{ITKDoxygenURL|AntiAliasBinaryImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/MeanImageFilter | Mean filter an image]] || {{ITKDoxygenURL|MeanImageFilter}} || Replace each pixel by the mean of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/MedianImageFilter | Median filter an image]] || {{ITKDoxygenURL|MedianImageFilter}} || Replace each pixel by the median of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/DiscreteGaussianImageFilter | Smooth an image with a discrete Gaussian filter]] || {{ITKDoxygenURL|DiscreteGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BinomialBlurImageFilter | Blur an image]] || {{ITKDoxygenURL|BinomialBlurImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BilateralImageFilter | Bilateral filter an image]] || {{ITKDoxygenURL|BilateralImageFilter}} || Edge preserving smoothing.<br />
|-<br />
| [[ITK/Examples/Smoothing/CurvatureFlowImageFilter | Smooth an image using curvature flow]] || {{ITKDoxygenURL|CurvatureFlowImageFilterType}} ||<br />
|-<br />
| [[ITK/Examples/Smoothing/SmoothingRecursiveGaussianImageFilter | Gaussian smoothing that works with image adaptors]] || {{ITKDoxygenURL|SmoothingRecursiveGaussianImageFilter}} || <br />
|}<br />
<br />
==Morphology==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Morphology/BinaryErodeImageFilter | Erode a binary image]] || {{ITKDoxygenURL|BinaryErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryDilateImageFilter | Dilate a binary image]] || {{ITKDoxygenURL|BinaryDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleDilateImageFilter | Dilate a grayscale image]] || {{ITKDoxygenURL|GrayscaleDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleErodeImageFilter | Erode a grayscale image]] || {{ITKDoxygenURL|GrayscaleErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/FlatStructuringElement | Erode a binary image using a flat (box) structuring element]] || {{ITKDoxygenURL|FlatStructuringElement}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryBallStructuringElement | An elliptical structuring element]] || {{ITKDoxygenURL|BinaryBallStructuringElement}} || <br />
|}<br />
<br />
==Curves==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Curves/ContourMeanDistanceImageFilter | Compute the mean distance between all points of two curves]] || {{ITKDoxygenURL|ContourMeanDistanceImageFilter}} || <br />
|}<br />
<br />
==Spectral Analysis==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter | Compute the FFT of an image]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/CrossCorrelationInFourierDomain | Compute the cross-correlation of two images in the Fourier domain]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}}{{ITKDoxygenURL|VnlFFTComplexConjugateToRealImageFilter}} || || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/RealAndImaginaryToComplexImageFilter | Convert a real image and an imaginary image to a complex image]] || {{ITKDoxygenURL|ComposeImageFilter}} || <br />
|}<br />
<br />
==Utilities==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Utilities/CreateAnother | Copy a filter]] || {{ITKDoxygenURL|Object}} || Copy/duplicate a filter<br />
|-<br />
| [[ITK/Examples/Utilities/AzimuthElevationToCartesianTransform | Cartesian to AzimuthElevation and vice-versa]] || {{ITKDoxygenURL|AzimuthElevationToCartesianTransform}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/FixedArray | C-style array]] || {{ITKDoxygenURL|FixedArray}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/DeepCopy | Deep copy an image]] || || <br />
|-<br />
| [[ITK/Examples/Utilities/RandomPermutation | Permute a sequence of indices]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Utilities/MersenneTwisterRandomVariateGenerator | Random number generator]] || {{ITKDoxygenURL|MersenneTwisterRandomVariateGenerator}} || <br />
|-<br />
| [[ITK/Examples/Utilities/JetColormapFunctor | Map scalars into a jet colormap]] || {{ITKDoxygenURL|JetColormapFunctor}} || <br />
|-<br />
| [[ITK/Examples/Utilities/SimpleFilterWatcher | Monitor a filter]] || {{ITKDoxygenURL|SimpleFilterWatcher}} || See debug style information.<br />
|-<br />
| [[ITK/Examples/Utilities/TimeProbe | Time probe]] || {{ITKDoxygenURL|TimeProbe}} || Compute the time between points in code.<br />
|-<br />
| [[ITK/Examples/Utilities/ObserveEvent | Observe an event]] || {{ITKDoxygenURL|Command}} || <br />
|-<br />
| [[ITK/Examples/Utilities/VectorContainer | Vector container]] || {{ITKDoxygenURL|VectorContainer}} || <br />
|-<br />
| [[ITK/Examples/Utilities/BoundingBox | Bounding box]] || {{ITKDoxygenURL|BoundingBox}} || <br />
|}<br />
<br />
==Statistics==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Statistics/GaussianDistribution | Create a Gaussian distribution]] || {{ITKDoxygenURL|GaussianDistribution}} || <br />
|-<br />
| [[ITK/Examples/Statistics/SampleToHistogramFilter | Create a histogram from a list of sample measurements]] || {{ITKDoxygenURL|SampleToHistogramFilter}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ListSample | Create a list of sample measurements]] || {{ITKDoxygenURL|ListSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ImageToListSampleAdaptor | Create a list of samples from an image without duplicating the data]] || {{ITKDoxygenURL|ImageToListSampleAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Statistics/MembershipSample | Create a list of samples with associated class IDs]] || {{ITKDoxygenURL|MembershipSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ExpectationMaximizationMixtureModelEstimator_2D | 2D Gaussian Mixture Model Expectation Maximization]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || EM<br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_1D | 1D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_3D | 3D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ScalarImageKmeansImageFilter | Cluster the pixels in a greyscale image]] || {{ITKDoxygenURL|ScalarImageKmeansImageFilter}} || <br />
<br />
|}<br />
<br />
==Spatial Objects==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpatialObjects/SpatialObjectToImageFilter | Convert a spatial object to an image ]] || {{ITKDoxygenURL|SpatialObjectToImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/EllipseSpatialObject | Ellipse ]] || {{ITKDoxygenURL|EllipseSpatialObject}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/LineSpatialObject| Line spatial object]] || {{ITKDoxygenURL|LineSpatialObject}}, {{ITKDoxygenURL|LineSpatialObjectPoint}} || Specify a piecewise-linear object by specifying points along the line.<br />
|-<br />
| [[ITK/Examples/SpatialObjects/PlaneSpatialObject| Plane spatial object]] || {{ITKDoxygenURL|PlaneSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/SpatialObjects/BlobSpatialObject | Blob ]] || {{ITKDoxygenURL|BlobSpatialObject}} ||<br />
|}<br />
<br />
==Inspection==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Inspection/CheckerBoardImageFilter | Combine two images by alternating blocks of a checkerboard pattern]] || {{ITKDoxygenURL|CheckerBoardImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Inspection/PixelInspection | Printing a pixel value to the console]] || [http://www.itk.org/Doxygen/html/classitk_1_1Image.html#ad424c945604f339130b4ffe81b99738eGetPixel GetPixel] ||<br />
|}<br />
<br />
==Image Registration==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethod | A basic global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|TranslationTransform}} || Translation only transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodAffine | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|AffineTransform}} || Full affine transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodBSpline | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|BSplineDeformableTransform}} || BSpline transform.<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformation | Mutual Information ]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|TranslationTransform}} || Global registration by maximizing the mutual information and using a translation only transform<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformationAffine | Mutual Information Affine]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|AffineTransform}} || Global registration by maximizing the mutual information and using an affine transform<br />
|}<br />
<br />
==Image Segmentation==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Segmentation/MeanShiftClustering | Mean shift clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/kMeansClustering | KMeans Clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/MultiphaseChanAndVeseSparseFieldLevelSetSegmentation | Multiphase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseSparseFieldLevelSetSegmentation | Single-phase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseDenseFieldLevelSetSegmentation | Single-phase Chan And Vese Dense Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseDenseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|}<br />
<br />
==Meshes==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Meshes/Decimation | Decimation]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/AddPointsAndEdges | Add points and edges]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/QuadEdgeMeshNormalFilter | Compute normals of a mesh]] || {{ITKDoxygenURL|QuadEdgeMeshNormalFilter}} ||<br />
|-<br />
| [[ITK/Examples/Meshes/QuadEdgeMeshParameterizationFilter | Planar parameterization of a mesh]] || {{ITKDoxygenURL|ParameterizationQuadEdgeMeshFilter}} || Compute linear parameterization of a mesh homeomorphic to a disk on the plane<br />
|}<br />
<br />
==Wish List==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/GaussianMixtureModelComponent | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|GaussianMixtureModelComponent}} ||<br />
|-<br />
| [[ITK/Examples/WishList/LevenbergMarquart| LevenbergMarquart]] || || <br />
|-<br />
| [[ITK/Examples/WishList/IterativeClosestPoints| IterativeClosestPoints]] || || <br />
|-<br />
| [[ITK/Examples/WishList/MedianImageFunction| MedianImageFunction]] || {{ITKDoxygenURL|MedianImageFunction}} || <br />
|-<br />
| [[ITK/Examples/WishList/Operators/AllOperators| Demonstrate all operators]] || {{ITKDoxygenURL|NeighborhoodOperator}} || <br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ColorNormalizedCorrelation| Color Normalized Correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} || <br />
|-<br />
| [[ITK/Examples/WishList/SpatialObjects/ContourSpatialObject| ContourSpatialObject]] || {{ITKDoxygenURL|ContourSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/Broken/SimpleOperations/MetaDataDictionary| Store non-pixel associated data in an image]] || {{ITKDoxygenURL|MetaDataDictionary}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/LevelSets| Level Sets]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation//RegionGrowing| Region Growing]] || || <br />
|-<br />
| [[ITK/Examples/Meshes/Subdivision| Mesh subdivision]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation/OtsuThresholdImageFilter| Separate foreground and background using Otsu's method]] || {{ITKDoxygenURL|OtsuThresholdImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/SimpleContourExtractorImageFilter| Extract contours]] || {{ITKDoxygenURL|SimpleContourExtractorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/RGBToVectorImageAdaptor| Present an image of RGBPixel pixels as an image of vectors]] || {{ITKDoxygenURL|RGBToVectorImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DCirclesImageFilter| HoughTransform2DCirclesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DCirclesImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DLinesImageFilter| HoughTransform2DLinesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DLinesImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Matlab/MatlabToITK| Write data from Matlab in a format readable by ITK]] || || <br />
|-<br />
| [[ITK/Examples/Matlab/ITKToMatlab| Write data from ITK in a format readable by Matlab]] || || <br />
|}<br />
<br />
==Included in the ITK Repository==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Included/Registration| Image registration]] || || <br />
|}<br />
<br />
==Matlab==<br />
{{ITKExamplesTable}}<br />
<br />
|}<br />
<br />
==Developer Examples==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Developer/Exceptions | Throw an exception]] || || <br />
|-<br />
| [[ITK/Examples/Developer/ImageSource | Produce an image programmatically.]] || {{ITKDoxygenURL|ImageSource}} || Nothing in, image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilter | Filter an image]] || {{ITKDoxygenURL|ImageToImageFilter}} || Image in, same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputs | Write a filter with multiple inputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (same type), same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputsDifferentType | Write a filter with multiple inputs of different types.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (different type), image (same type as first input) out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleOutputs | Write a filter with multiple outputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Images in, two images out (same type as first input).<br />
|-<br />
| [[ITK/Examples/Developer/SetGetMacro | Get or set a member variable of an ITK class.]] || || SetMacro, GetMacro<br />
|-<br />
| [[ITK/Examples/Developer/OutputMacros | Output an error, a warning, or debug information.]] || || DebugMacro, ErrorMacro, WarningMacro<br />
|}<br />
<br />
==Problems==<br />
===Small Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/WishList/EdgesAndGradients/SobelEdgeDetectionImageFilter | SobelEdgeDetectionImageFilter]] || {{ITKDoxygenURL|SobelEdgeDetectionImageFilter}} || NeighborIterator error?<br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ScaleTransform | Scale an image]] || {{ITKDoxygenURL|ScaleTransform}} || No matching function call to SetTransform.<br />
|-<br />
| [[ITK/Examples/WishList/Iterators/FloodFillIterator | Traverse a region using a flood fill iterator]] || {{ITKDoxygenURL|FloodFilledSpatialFunctionConditionalIterator}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/ImageProcessing/GradientOfVectorImage | Compute the gradient of a vector image]] || {{ITKDoxygenURL|GradientImageFilter}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_Image | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_1D | Compute distributions of samples using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || Someone please confirm that this outputs the mean and the variance (i.e. I used a standard deviation of 30 to create the samples and the second estimated parameter is near 1000 (~30^2) . Is this correct?)<br />
|-<br />
| [[ITK/Examples/Broken/EdgesAndGradients/CannyEdgeDetectionImageFilter | Find edges in an image]] || {{ITKDoxygenURL|CannyEdgeDetectionImageFilter}} || How to set a reasonable Threshold for the output edges?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ImageToHistogramFilter | Compute the histogram of an image]] || {{ITKDoxygenURL|Statistics_1_1ImageToHistogramFilter}} || The last entry of the red histogram should contain several values, but it is 0?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/KmeansModelEstimator | Classifying pixels using KMeans]] || {{ITKDoxygenURL|KmeansModelEstimator}} || How to apply the labels of the filter to the input image?<br />
|-<br />
| [[ITK/Examples/Broken/Images/RegionGrowImageFilter | Basic region growing]] || {{ITKDoxygenURL|RegionGrowImageFilter}} || Just getting started with demo...<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConnectedThresholdImageFilter | Find connected components in an image]] || {{ITKDoxygenURL|ConnectedThresholdImageFilter}} || Just need to finish it.<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConvertPixelBuffer | Convert an image from one type to another]] || {{ITKDoxygenURL|ConvertPixelBuffer}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/NeighborhoodOperatorImageFunction | Apply a function to every pixel with access to its neighborhood]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/InPlace | In-place filtering of an image]] || {{ITKDoxygenURL|InPlaceImageFilter}} || This only works for filters which derive from itkInPlaceImageFilter<br />
|-<br />
| [[ITK/Examples/Broken/Images/MirrorPadImageFilter | Pad an image]] || {{ITKDoxygenURL|MirrorPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/WrapPadImageFilter | Pad an image by wrapping]] || {{ITKDoxygenURL|WrapPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/VTKImageToImageFilter | Convert a VTK image to an ITK image]] || {{ITKDoxygenURL|VTKImageToImageFilter}} || Seems to expect an input image with only 1 component? (i.e. greyscale)<br />
<br />
|}<br />
<br />
===Big Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Broken/Images/MeanSquaresImageToImageMetric | Find the best position of the moving image in the fixed image.]] || {{ITKDoxygenURL|MeanSquaresImageToImageMetric}} || Output (0,0) is incorrect.<br />
|-<br />
| [[ITK/Examples/Broken/Images/GradientImageFilter | Compute and display the gradient of an image]] || {{ITKDoxygenURL|GradientImageFilter}} || Blank output.<br />
|}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/VectorImages/ImageToVectorImageFilter&diff=40003ITK/Examples/VectorImages/ImageToVectorImageFilter2011-05-19T14:36:39Z<p>Glehmann: /* ImageToVectorImageFilter.cxx */</p>
<hr />
<div>This example demonstrates how to compose a vector image from a collection of scalar images.<br />
<br />
==ImageToVectorImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkComposeImageFilter.h"<br />
#include "itkVectorImage.h"<br />
<br />
typedef itk::VectorImage<unsigned char, 2> VectorImageType;<br />
typedef itk::Image<unsigned char, 2> ScalarImageType;<br />
<br />
void CreateImage(ScalarImageType::Pointer image);<br />
<br />
int main(int argc, char *argv[])<br />
{<br />
ScalarImageType::Pointer image0 = ScalarImageType::New();<br />
CreateImage(image0);<br />
<br />
ScalarImageType::Pointer image1 = ScalarImageType::New();<br />
CreateImage(image1);<br />
<br />
ScalarImageType::Pointer image2 = ScalarImageType::New();<br />
CreateImage(image2);<br />
<br />
typedef itk::ComposeImageFilter<ScalarImageType> ImageToVectorImageFilterType;<br />
ImageToVectorImageFilterType::Pointer imageToVectorImageFilter = ImageToVectorImageFilterType::New();<br />
imageToVectorImageFilter->SetNthInput(0, image0);<br />
imageToVectorImageFilter->SetNthInput(1, image1);<br />
imageToVectorImageFilter->SetNthInput(2, image2);<br />
imageToVectorImageFilter->Update();<br />
<br />
VectorImageType::Pointer vectorImage = imageToVectorImageFilter->GetOutput();<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ScalarImageType::Pointer image)<br />
{<br />
ScalarImageType::IndexType start;<br />
start.Fill(0);<br />
<br />
ScalarImageType::SizeType size;<br />
size.Fill(100);<br />
<br />
ScalarImageType::RegionType region(start,size); <br />
<br />
image->SetRegions(region);<br />
image->Allocate();<br />
image->FillBuffer(0);<br />
<br />
}<br />
</source><br />
<br />
{{ITKCMakeLists|ImageToVectorImageFilter}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples&diff=40002ITK/Examples2011-05-19T14:35:52Z<p>Glehmann: /* Vector Images */</p>
<hr />
<div>These are fully independent, compilable examples. There is significant overlap in the examples, but they are each intended to illustrate a different concept and be fully stand alone compilable.<br />
Please add examples in your areas of expertise!<br />
You can checkout the entire set of examples from this repository: <br />
http://gitorious.org/itkwikiexamples/itkwikiexamples<br />
<pre>git clone git://gitorious.org/itkwikiexamples/itkwikiexamples.git ITKWikiExamples</pre><br />
<br />
==About the Examples==<br />
* [http://www.itk.org/Wiki/images/e/e6/ITK_Examples_Iowa_Meeting_2010_11-8-2010.odp Official announcement]<br />
===ItkVtkGlue===<br />
ITK and VTK are very separate toolkits - ITK for image processing and VTK for data visualization. It is often convenient to use the two together - namely, to display an ITK image on the screen. The ItkVtkGlue kit serves exactly this purpose. Also provided inside ItkVtkGlue is a QuickView class to allow a 2 line display of an ITK image.<br />
<br />
If you download the entire ITK Wiki Examples Collection, the ItkVtkGlue directory will be included and configured. If you wish to just build a few examples, then you will need to [http://gitorious.org/itkwikiexamples/itkwikiexamples/blobs/raw/master/ItkVtkGlue.tar.gz download ItkVtkGlue] and build it.<br />
<br />
===[[ITK/Examples/Instructions/ForUsers|Information for Wiki Examples Users]]===<br />
If you just want to use the Wiki Examples, [[ITK/Examples/Instructions/ForUsers|go here]]. You will learn how to search for examples, build a few examples and build all of the examples.<br />
<br />
===[[ITK/Examples/Instructions/ForDevelopers|Information for Wiki Examples Developers]]===<br />
If you want to contribute examples [[ITK/Examples/Instructions/ForDevelopers|go here]]. You will learn how to add a new example and the guidelines for writing an example.<br />
<br />
===[[ITK/Examples/Instructions/ForAdministrators|Information for Wiki Examples Administrators]]===<br />
If you are a Wiki Example Administrator or want to learn more about the process [[ITK/Examples/Instructions/ForAdministrators|go here]]. You will learn how the Wiki Examples repository is organized, how the repository is synced to the wiki and how to add new topics, tests and regression baselines.<br />
<br />
==Simple Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SimpleOperations/WidthHeight | Get the width and height of an image ]] || || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/VariableLengthVector | Variable length vector ]] || {{ITKDoxygenURL|VariableLengthVector}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TranslationTransform | Translate an image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|ResampleImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/NumericTraits | Get some basic information about a type]] || {{ITKDoxygenURL|NumericTraits}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/ScalarToRGBColormapImageFilter | Apply a color map to an image]] || {{ITKDoxygenURL|ScalarToRGBColormapImageFilter}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TryCatch | Catch an ITK exception]] || || Try/Catch blocks<br />
|-<br />
| [[ITK/Examples/SimpleOperations/BresenhamLine | Get the points on a Bresenham line between two points]] || {{ITKDoxygenURL|BresenhamLine}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/Offset | Add an offset to a pixel index]] || {{ITKDoxygenURL|Offset}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenPoints | Distance between two points]] || {{ITKDoxygenURL|Point}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenIndices | Distance between two indices]] || {{ITKDoxygenURL|Point}}, {{ITKDoxygenURL|Index}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/CreateVector | Create a vector]] || {{ITKDoxygenURL|Vector}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/GetNameOfClass | Get the name/type/class of an object ]] || || GetNameOfClass()<br />
|-<br />
| [[ITK/Examples/Images/Index | An object which holds the index of a pixel ]] || {{ITKDoxygenURL|Index}} || <br />
|-<br />
| [[ITK/Examples/Images/Size | An object which holds the size of an image ]] || {{ITKDoxygenURL|Size}} || <br />
|-<br />
| [[ITK/Examples/Images/ImageRegion | An object which holds the index (start) and size of a region of an image ]] || {{ITKDoxygenURL|ImageRegion}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/Transparency | Make part of an image transparent]] || {{ITKDoxygenURL|RGBAPixel}} || Transparency, RGBA, alpha<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionIntersection | Determine if one region is fully inside another region]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection, IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/PixelInsideRegion | Determine if a pixel is inside of a region]] || {{ITKDoxygenURL|ImageRegion}} || IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionOverlap | Determine the overlap of two regions]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection<br />
|-<br />
| [[ITK/Examples/SimpleOperations/ImageDuplicator | Duplicate an image]] || {{ITKDoxygenURL|ImageDuplicator}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/RandomImageSource | Produce an image of noise]] || {{ITKDoxygenURL|RandomImageSource}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/SetPixels | Set specified pixels to specified values]] || {{ITKDoxygenURL|Image}} ||<br />
|}<br />
<br />
==Mathematical Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Math/CovariantVector | Create a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || This is the object which should be used to represent a mathematical vector.<br />
|-<br />
| [[ITK/Examples/Math/CovariantVectorNorm | Compute the norm of a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || In-place and non-inplace norms.<br />
|-<br />
| [[ITK/Examples/Math/Matrix | Matrix ]] || {{ITKDoxygenURL|Matrix}} || <br />
|-<br />
| [[ITK/Examples/Math/Pi | Mathematical constant pi = 3.14 ]] || {{ITKDoxygenURL|Math}} || <br />
|-<br />
| [[ITK/Examples/Math/DotProduct | Dot product (inner product) of two vectors ]] || {{ITKDoxygenURL|Vector}} || <br />
|}<br />
<br />
==Image Functions==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Functions/GuassianBlurImageFunction | GuassianBlurImageFunction ]] || {{ITKDoxygenURL|GuassianBlurImageFunction}} || <br />
|}<br />
<br />
==Point Set==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/PointSet/CreatePointSet | Create a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/ReadPointSet | Read a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/WritePointSet | Write a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/BoundingBox | Get the bounding box of a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|}<br />
<br />
==Input/Output (IO)==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/IO/ReadVectorImage| Read an image file with an unknown number of components]] || {{ITKDoxygenURL|ImageFileReader}},{{ITKDoxygenURL|VectorImage}} || <br />
|-<br />
| [[ITK/Examples/IO/ImportImageFilter| Convert a C-style array to an itkImage]] || {{ITKDoxygenURL|ImportImageFilter}} || <br />
|-<br />
| [[ITK/Examples/IO/ReadUnknownImageType | Read an image file without knowing its type before hand]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileWriter | Write an image]] || {{ITKDoxygenURL|ImageFileWriter}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileReader | Read an image]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/TIFFImageIO | Write a TIFF image]] || {{ITKDoxygenURL|TIFFImageIO}} || This is a general demonstration of how to use a specific writer rather than relying on the ImageFileWriter to choose for you.<br />
|-<br />
| [[ITK/Examples/IO/ImageToVTKImageFilter | Display an ITK image]] || {{ITKDoxygenURL|ImageToVTKImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/IO/TransformFileWriter | Write a transform to a file]] || {{ITKDoxygenURL|TransformFileWriter}} ||<br />
|-<br />
| [[ITK/Examples/IO/TransformFileReader | Read a transform from a file]] || {{ITKDoxygenURL|TransformFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/VolumeFromSlices | Create a 3D volume from a series of 2D images]] || {{ITKDoxygenURL|ImageSeriesReader}} || Uses NumericSeriesFileNames to generate a list of file names<br />
|}<br />
<br />
==DICOM==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/DICOM/ResampleDICOM | Resample a DICOM series]] || {{ITKDoxygenURL|GDCMImageIO}} || Resample a DICOM series with user-specified spacing.<br />
|}<br />
<br />
==Image Processing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddConstantToImageFilter| Add a constant to every pixel in an image]] || {{ITKDoxygenURL|AddImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SubtractConstantFromImageFilter| Subtract a constant from every pixel in an image]] || {{ITKDoxygenURL|SubtractImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SquareImageFilter| Square every pixel in an image]] || {{ITKDoxygenURL|SquareImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Upsampling| Upsampling an image]] || {{ITKDoxygenURL|BSplineInterpolateImageFunction}} {{ITKDoxygenURL|ResampleImageFilter}} || Interpolate missing pixels in order to upsample an image. Note this only works on scalar images.<br />
|-<br />
| [[ITK/Examples/Images/FlipImageFilter | Flip an image over specified axes]] || {{ITKDoxygenURL|FlipImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/VectorRescaleIntensityImageFilter | Apply a transformation to the magnitude of vector valued image pixels]] || {{ITKDoxygenURL|VectorRescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Images/NeighborhoodOperatorImageFilter | Apply a kernel to every pixel in an image]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LaplacianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianImageFilter}} || Input image type must be double or float<br />
|-<br />
| [[ITK/Examples/Images/ConstantPadImageFilter | Pad an image with a constant value]] || {{ITKDoxygenURL|ConstantPadImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/IntensityWindowingImageFilter| IntensityWindowingImageFilter]] || {{ITKDoxygenURL|IntensityWindowingImageFilter}} || Apply a linear intensity transform from a specified input range to a specified output range.<br />
|-<br />
| [[ITK/Examples/Images/ShrinkImageFilter | Shrink an image]] || {{ITKDoxygenURL|ShrinkImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/NormalizedCorrelationImageFilter | Normalized correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyByConstantImageFilter | Multiply every pixel in an image by a constant]] || {{ITKDoxygenURL|MultiplyImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SquaredDifferenceImageFilter | Compute the squared difference of corresponding pixels in two images]] || {{ITKDoxygenURL|SquaredDifferenceImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddPixelAccessor | Add a constant to every pixel without duplicating the image in memory (an accessor)]] || {{ITKDoxygenURL|AddPixelAccessor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionalMaximaImageFilter | RegionalMaximaImageFilter]] || {{ITKDoxygenURL|RegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/ValuedRegionalMaximaImageFilter | ValuedRegionalMaximaImageFilter]] || {{ITKDoxygenURL|ValuedRegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaximumImageFilter | Pixel wise compare two input images and set the output pixel to their max]] || {{ITKDoxygenURL|MaximumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumImageFilter | Pixel wise compare two input images and set the output pixel to their min]] || {{ITKDoxygenURL|MinimumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AndImageFilter | Binary AND two images]] || {{ITKDoxygenURL|AndImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/OrImageFilter | Binary OR two images]] || {{ITKDoxygenURL|OrImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/XorImageFilter | Binary XOR (exclusive OR) two images]] || {{ITKDoxygenURL|XorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryNotImageFilter | Invert an image using the Binary Not operation]] || {{ITKDoxygenURL|BinaryNotImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Compose3DCovariantVectorImageFilter | Compose a vector image (with 3 components) from three scalar images]] || {{ITKDoxygenURL|ComposeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/NthElementImageAdaptor | Extract a component of an itkImage with pixels with multiple components]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || Use built in functionality to extract a component of an itkImage with CovariantVector components. Note this does not work for itkVectorImages - see VectorIndexSelectionCastImageFilter instead.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ImageAdaptorExtractVectorComponent | Present an image by first performing an operation]] || {{ITKDoxygenURL|ImageAdaptor}} || A demonstration of how to present an image pixel as a function of the pixel. In this example the functionality of NthElementImageAdaptor is demonstrated.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ProcessingNthImageElement | Process the nth component/element of a vector image]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter | Label binary regions in an image and get their properties]] || {{ITKDoxygenURL|BinaryImageToShapeLabelMapFilter}} || Region bounding box, etc.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConvolutionImageFilter | Convolve an image with a kernel]] || {{ITKDoxygenURL|ConvolutionImageFilter}} || Convolution.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RelabelComponentImageFilter | Assign contiguous labels to connected regions of an image]] || {{ITKDoxygenURL|RelabelComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CropImageFilter | Crop an image]] || {{ITKDoxygenURL|CropImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AbsImageFilter | Compute the absolute value of an image]] || {{ITKDoxygenURL|AbsImageFilter}} || magnitude<br />
|-<br />
| [[ITK/Examples/ImageProcessing/InvertIntensityImageFilter | Invert an image]] || {{ITKDoxygenURL|InvertIntensityImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaskImageFilter | Apply a mask to an image]] || {{ITKDoxygenURL|MaskImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SigmoidImageFilter | Pass image pixels through a sigmoid function]] || {{ITKDoxygenURL|SigmoidImageFilter}} || The qualitative description of how Alpha and Beta affect the function from the ITK Software Guide and the associated images would be nice to add to the doxygen.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|ThresholdImageFilter}} || The result is the original image but with the values below (or above) the threshold "clamped" to an output value.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|BinaryThresholdImageFilter}} || The result is a binary image (inside the threshold region or outside the threshold region).<br />
|-<br />
| [[ITK/Examples/ImageProcessing/UnaryFunctorImageFilter | Apply a custom operation to each pixel in an image]] || {{ITKDoxygenURL|UnaryFunctorImageFilter}} || Perform a custom operation on every pixel in an image. This example rotates the vector-valued pixels by 90 degrees.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryFunctorImageFilter | Apply a predefined operation to corresponding pixels in two images]] || {{ITKDoxygenURL|BinaryFunctorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryFunctorImageFilterCustom | Apply a custom operation to corresponding pixels in two images]] || {{ITKDoxygenURL|BinaryFunctorImageFilter}} || This example computes the squared difference between corresponding pixels.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumMaximumImageCalculator | Find the minimum and maximum value (and the position of the value) in an image]] || {{ITKDoxygenURL|MinimumMaximumImageCalculator}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddImageFilter | Add two images together]] || {{ITKDoxygenURL|AddImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/SubtractImageFilter | Subtract two images]] || {{ITKDoxygenURL|SubtractImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PasteImageFilter | Paste a part of one image into another image]] || {{ITKDoxygenURL|PasteImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume | Stack multiple 2D images into a 3D image]] || {{ITKDoxygenURL|TileImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/TileImageFilter_SideBySide | Tile multiple images side by side]] || {{ITKDoxygenURL|TileImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyImageFilter | Multiply two images together]] || {{ITKDoxygenURL|MultiplyImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionOfInterestImageFilter | Extract a portion of an image (region of interest)]] || {{ITKDoxygenURL|RegionOfInterestImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RescaleIntensityImageFilter | Rescale the intensity values of an image to a specified range]] || {{ITKDoxygenURL|RescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConnectedComponentImageFilter | Label connected components in a binary image]] || {{ITKDoxygenURL|ConnectedComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/NormalizeImageFilter | Normalize an image]] || {{ITKDoxygenURL|NormalizeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CastImageFilter | Cast an image from one type to another]] || {{ITKDoxygenURL|CastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PermuteAxesImageFilter | Switch the axes of an image]] || {{ITKDoxygenURL|PermuteAxesImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LinearInterpolateImageFunction | Linearly interpolate a position in an image]] || {{ITKDoxygenURL|LinearInterpolateImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/HammingWindowFunction | HammingWindowFunction]] || {{ITKDoxygenURL|HammingWindowFunction}} ||<br />
|}<br />
<br />
==Vector Images==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImage | Create a vector image]] || {{ITKDoxygenURL|VectorImage}} || An image with an ND vector at each pixel<br />
|-<br />
| [[ITK/Examples/VectorImages/ImageToVectorImageFilter | Create a vector image from a collection of scalar images]] || {{ITKDoxygenURL|ComposeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImageToImageAdaptor | View a component of a vector image as if it were a scalar image]] || {{ITKDoxygenURL|VectorImageToImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorIndexSelectionCastImageFilter | Extract a component of an itkVectorImage]] || {{ITKDoxygenURL|VectorIndexSelectionCastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorResampleImageFilter | Translate a vector image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|VectorResampleImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/JoinImageFilter | Join images, stacking their components]] || {{ITKDoxygenURL|JoinImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/NeighborhoodIterator | NeighborhoodIterator on a VectorImage]] || {{ITKDoxygenURL|VectorImage}} {{ITKDoxygenURL|NeighborhoodIterator}}||<br />
|}<br />
<br />
==Iterating Over (Traversing) An Image==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator_Manual | Iterate over a region of an image with a shaped neighborhood]] || Create the shape manually {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator | Iterate over a region of an image with a shaped neighborhood]] || Create the shape from a StructuringElement {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionExclusionConstIteratorWithIndex | Iterator over an image skipping a specified region]] || {{ITKDoxygenURL|ImageRegionExclusionConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomConstIteratorWithIndex | Randomly select pixels from a region of an image]] || {{ITKDoxygenURL|ImageRandomConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomNonRepeatingConstIteratorWithIndex | Randomly select pixels from a region of an image without replacement]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/LineIterator | Iterate over a line through an image]] || {{ITKDoxygenURL|LineIterator}} || Walks a Bresenham line through an image (with write access)<br />
|-<br />
| [[ITK/Examples/Iterators/LineConstIterator | Iterate over a line through an image without write access]] || {{ITKDoxygenURL|LineConstIterator}} || Walks a Bresenham line through an image (without write access)<br />
|-<br />
| [[ITK/Examples/Iterators/ImageBoundaryFacesCalculator | Iterate over the central region (non-boundary) separately from the face-regions (boundary)]] || {{ITKDoxygenURL|ImageBoundaryFacesCalculator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/NeighborhoodIterator | Iterate over a region of an image with a neighborhood (with write access)]] || {{ITKDoxygenURL|NeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstNeighborhoodIterator | Iterate over a region of an image with a neighborhood (without write access)]] || {{ITKDoxygenURL|ConstNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIterator | Iterate over a region of an image (with write access)]] || {{ITKDoxygenURL|ImageRegionIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIterator | Iterate over a region of an image (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstantBoundaryCondition | Make out of bounds pixels return a constant value]] || {{ITKDoxygenURL|ConstantBoundaryCondition}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (with write access)]] || {{ITKDoxygenURL|ImageRegionIteratorWithIndex}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIteratorWithIndex}} ||<br />
|}<br />
<br />
==Kernels==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Operators/GaussianOperator | Create a Gaussian kernel]] || {{ITKDoxygenURL|GaussianOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/GaussianDerivativeOperator | Create a Gaussian derivative kernel]] || {{ITKDoxygenURL|GaussianDerivativeOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/LaplacianOperator | Create a Laplacian kernel]] || {{ITKDoxygenURL|LaplacianOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/DerivativeOperator | Create a derivative kernel]] || {{ITKDoxygenURL|DerivativeOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/SobelOperator | Create the Sobel kernel]] || {{ITKDoxygenURL|SobelOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/ForwardDifferenceOperator | Create a forward difference kernel]] || {{ITKDoxygenURL|ForwardDifferenceOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/BackwardDifferenceOperator | Create a backward difference kernel]] || {{ITKDoxygenURL|BackwardDifferenceOperator}} || <br />
<br />
|}<br />
<br />
==Image Edges, Gradients, and Derivatives==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/DerivativeImageFilter | Compute the derivative of an image in a particular direction]] || {{ITKDoxygenURL|DerivativeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientRecursiveGaussianImageFilter| Compute the gradient of an image by convolution with the first derivative of a Gaussian]] || {{ITKDoxygenURL|GradientRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeRecursiveGaussianImageFilter | Find the gradient magnitude of the image first smoothed with a Gaussian kernel]] || {{ITKDoxygenURL|GradientMagnitudeRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/RecursiveGaussianImageFilter | Find higher derivatives of an image]] || {{ITKDoxygenURL|RecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryContourImageFilter | Extract the boundaries of connected regions in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} || Blob boundary, border<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryBoundaries | Extract the inner and outer boundaries of blobs in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeImageFilter | Compute the gradient magnitude image]] || {{ITKDoxygenURL|GradientMagnitudeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/LaplacianRecursiveGaussianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianRecursiveGaussianImageFilter}} ||<br />
|}<br />
<br />
==Smoothing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Smoothing/AntiAliasBinaryImageFilter | Anti alias a binary image]] || {{ITKDoxygenURL|AntiAliasBinaryImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/MeanImageFilter | Mean filter an image]] || {{ITKDoxygenURL|MeanImageFilter}} || Replace each pixel by the mean of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/MedianImageFilter | Median filter an image]] || {{ITKDoxygenURL|MedianImageFilter}} || Replace each pixel by the median of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/DiscreteGaussianImageFilter | Smooth an image with a discrete Gaussian filter]] || {{ITKDoxygenURL|DiscreteGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BinomialBlurImageFilter | Blur an image]] || {{ITKDoxygenURL|BinomialBlurImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BilateralImageFilter | Bilateral filter an image]] || {{ITKDoxygenURL|BilateralImageFilter}} || Edge preserving smoothing.<br />
|-<br />
| [[ITK/Examples/Smoothing/CurvatureFlowImageFilter | Smooth an image using curvature flow]] || {{ITKDoxygenURL|CurvatureFlowImageFilterType}} ||<br />
|-<br />
| [[ITK/Examples/Smoothing/SmoothingRecursiveGaussianImageFilter | Gaussian smoothing that works with image adaptors]] || {{ITKDoxygenURL|SmoothingRecursiveGaussianImageFilter}} || <br />
|}<br />
<br />
==Morphology==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Morphology/BinaryErodeImageFilter | Erode a binary image]] || {{ITKDoxygenURL|BinaryErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryDilateImageFilter | Dilate a binary image]] || {{ITKDoxygenURL|BinaryDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleDilateImageFilter | Dilate a grayscale image]] || {{ITKDoxygenURL|GrayscaleDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleErodeImageFilter | Erode a grayscale image]] || {{ITKDoxygenURL|GrayscaleErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/FlatStructuringElement | Erode a binary image using a flat (box) structuring element]] || {{ITKDoxygenURL|FlatStructuringElement}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryBallStructuringElement | An elliptical structuring element]] || {{ITKDoxygenURL|BinaryBallStructuringElement}} || <br />
|}<br />
<br />
==Curves==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Curves/ContourMeanDistanceImageFilter | Compute the mean distance between all points of two curves]] || {{ITKDoxygenURL|ContourMeanDistanceImageFilter}} || <br />
|}<br />
<br />
==Spectral Analysis==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter | Compute the FFT of an image]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/CrossCorrelationInFourierDomain | Compute the cross-correlation of two images in the Fourier domain]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}}{{ITKDoxygenURL|VnlFFTComplexConjugateToRealImageFilter}} || || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/RealAndImaginaryToComplexImageFilter | Convert a real image and an imaginary image to a complex image]] || {{ITKDoxygenURL|RealAndImaginaryToComplexImageFilter}} || <br />
|}<br />
<br />
==Utilities==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Utilities/CreateAnother | Copy a filter]] || {{ITKDoxygenURL|Object}} || Copy/duplicate a filter<br />
|-<br />
| [[ITK/Examples/Utilities/AzimuthElevationToCartesianTransform | Cartesian to AzimuthElevation and vice-versa]] || {{ITKDoxygenURL|AzimuthElevationToCartesianTransform}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/FixedArray | C-style array]] || {{ITKDoxygenURL|FixedArray}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/DeepCopy | Deep copy an image]] || || <br />
|-<br />
| [[ITK/Examples/Utilities/RandomPermutation | Permute a sequence of indices]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Utilities/MersenneTwisterRandomVariateGenerator | Random number generator]] || {{ITKDoxygenURL|MersenneTwisterRandomVariateGenerator}} || <br />
|-<br />
| [[ITK/Examples/Utilities/JetColormapFunctor | Map scalars into a jet colormap]] || {{ITKDoxygenURL|JetColormapFunctor}} || <br />
|-<br />
| [[ITK/Examples/Utilities/SimpleFilterWatcher | Monitor a filter]] || {{ITKDoxygenURL|SimpleFilterWatcher}} || See debug style information.<br />
|-<br />
| [[ITK/Examples/Utilities/TimeProbe | Time probe]] || {{ITKDoxygenURL|TimeProbe}} || Compute the time between points in code.<br />
|-<br />
| [[ITK/Examples/Utilities/ObserveEvent | Observe an event]] || {{ITKDoxygenURL|Command}} || <br />
|-<br />
| [[ITK/Examples/Utilities/VectorContainer | Vector container]] || {{ITKDoxygenURL|VectorContainer}} || <br />
|-<br />
| [[ITK/Examples/Utilities/BoundingBox | Bounding box]] || {{ITKDoxygenURL|BoundingBox}} || <br />
|}<br />
<br />
==Statistics==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Statistics/GaussianDistribution | Create a Gaussian distribution]] || {{ITKDoxygenURL|GaussianDistribution}} || <br />
|-<br />
| [[ITK/Examples/Statistics/SampleToHistogramFilter | Create a histogram from a list of sample measurements]] || {{ITKDoxygenURL|SampleToHistogramFilter}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ListSample | Create a list of sample measurements]] || {{ITKDoxygenURL|ListSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ImageToListSampleAdaptor | Create a list of samples from an image without duplicating the data]] || {{ITKDoxygenURL|ImageToListSampleAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Statistics/MembershipSample | Create a list of samples with associated class IDs]] || {{ITKDoxygenURL|MembershipSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ExpectationMaximizationMixtureModelEstimator_2D | 2D Gaussian Mixture Model Expectation Maximization]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || EM<br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_1D | 1D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_3D | 3D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ScalarImageKmeansImageFilter | Cluster the pixels in a greyscale image]] || {{ITKDoxygenURL|ScalarImageKmeansImageFilter}} || <br />
<br />
|}<br />
<br />
==Spatial Objects==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpatialObjects/SpatialObjectToImageFilter | Convert a spatial object to an image ]] || {{ITKDoxygenURL|SpatialObjectToImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/EllipseSpatialObject | Ellipse ]] || {{ITKDoxygenURL|EllipseSpatialObject}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/LineSpatialObject| Line spatial object]] || {{ITKDoxygenURL|LineSpatialObject}}, {{ITKDoxygenURL|LineSpatialObjectPoint}} || Specify a piecewise-linear object by specifying points along the line.<br />
|-<br />
| [[ITK/Examples/SpatialObjects/PlaneSpatialObject| Plane spatial object]] || {{ITKDoxygenURL|PlaneSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/SpatialObjects/BlobSpatialObject | Blob ]] || {{ITKDoxygenURL|BlobSpatialObject}} ||<br />
|}<br />
<br />
==Inspection==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Inspection/CheckerBoardImageFilter | Combine two images by alternating blocks of a checkerboard pattern]] || {{ITKDoxygenURL|CheckerBoardImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Inspection/PixelInspection | Printing a pixel value to the console]] || [http://www.itk.org/Doxygen/html/classitk_1_1Image.html#ad424c945604f339130b4ffe81b99738eGetPixel GetPixel] ||<br />
|}<br />
<br />
==Image Registration==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethod | A basic global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|TranslationTransform}} || Translation only transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodAffine | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|AffineTransform}} || Full affine transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodBSpline | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|BSplineDeformableTransform}} || BSpline transform.<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformation | Mutual Information ]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|TranslationTransform}} || Global registration by maximizing the mutual information and using a translation only transform<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformationAffine | Mutual Information Affine]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|AffineTransform}} || Global registration by maximizing the mutual information and using an affine transform<br />
|}<br />
<br />
==Image Segmentation==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Segmentation/MeanShiftClustering | Mean shift clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/kMeansClustering | KMeans Clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/MultiphaseChanAndVeseSparseFieldLevelSetSegmentation | Multiphase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseSparseFieldLevelSetSegmentation | Single-phase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseDenseFieldLevelSetSegmentation | Single-phase Chan And Vese Dense Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseDenseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|}<br />
<br />
==Meshes==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Meshes/Decimation | Decimation]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/AddPointsAndEdges | Add points and edges]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/QuadEdgeMeshNormalFilter | Compute normals of a mesh]] || {{ITKDoxygenURL|QuadEdgeMeshNormalFilter}} ||<br />
|-<br />
| [[ITK/Examples/Meshes/QuadEdgeMeshParameterizationFilter | Planar parameterization of a mesh]] || {{ITKDoxygenURL|ParameterizationQuadEdgeMeshFilter}} || Compute linear parameterization of a mesh homeomorphic to a disk on the plane<br />
|}<br />
<br />
==Wish List==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/GaussianMixtureModelComponent | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|GaussianMixtureModelComponent}} ||<br />
|-<br />
| [[ITK/Examples/WishList/LevenbergMarquart| LevenbergMarquart]] || || <br />
|-<br />
| [[ITK/Examples/WishList/IterativeClosestPoints| IterativeClosestPoints]] || || <br />
|-<br />
| [[ITK/Examples/WishList/MedianImageFunction| MedianImageFunction]] || {{ITKDoxygenURL|MedianImageFunction}} || <br />
|-<br />
| [[ITK/Examples/WishList/Operators/AllOperators| Demonstrate all operators]] || {{ITKDoxygenURL|NeighborhoodOperator}} || <br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ColorNormalizedCorrelation| Color Normalized Correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} || <br />
|-<br />
| [[ITK/Examples/WishList/SpatialObjects/ContourSpatialObject| ContourSpatialObject]] || {{ITKDoxygenURL|ContourSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/Broken/SimpleOperations/MetaDataDictionary| Store non-pixel associated data in an image]] || {{ITKDoxygenURL|MetaDataDictionary}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/LevelSets| Level Sets]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation//RegionGrowing| Region Growing]] || || <br />
|-<br />
| [[ITK/Examples/Meshes/Subdivision| Mesh subdivision]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation/OtsuThresholdImageFilter| Separate foreground and background using Otsu's method]] || {{ITKDoxygenURL|OtsuThresholdImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/SimpleContourExtractorImageFilter| Extract contours]] || {{ITKDoxygenURL|SimpleContourExtractorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/RGBToVectorImageAdaptor| Present an image of RGBPixel pixels as an image of vectors]] || {{ITKDoxygenURL|RGBToVectorImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DCirclesImageFilter| HoughTransform2DCirclesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DCirclesImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DLinesImageFilter| HoughTransform2DLinesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DLinesImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Matlab/MatlabToITK| Write data from Matlab in a format readable by ITK]] || || <br />
|-<br />
| [[ITK/Examples/Matlab/ITKToMatlab| Write data from ITK in a format readable by Matlab]] || || <br />
|}<br />
<br />
==Included in the ITK Repository==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Included/Registration| Image registration]] || || <br />
|}<br />
<br />
==Matlab==<br />
{{ITKExamplesTable}}<br />
<br />
|}<br />
<br />
==Developer Examples==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Developer/Exceptions | Throw an exception]] || || <br />
|-<br />
| [[ITK/Examples/Developer/ImageSource | Produce an image programmatically.]] || {{ITKDoxygenURL|ImageSource}} || Nothing in, image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilter | Filter an image]] || {{ITKDoxygenURL|ImageToImageFilter}} || Image in, same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputs | Write a filter with multiple inputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (same type), same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputsDifferentType | Write a filter with multiple inputs of different types.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (different type), image (same type as first input) out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleOutputs | Write a filter with multiple outputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Images in, two images out (same type as first input).<br />
|-<br />
| [[ITK/Examples/Developer/SetGetMacro | Get or set a member variable of an ITK class.]] || || SetMacro, GetMacro<br />
|-<br />
| [[ITK/Examples/Developer/OutputMacros | Output an error, a warning, or debug information.]] || || DebugMacro, ErrorMacro, WarningMacro<br />
|}<br />
<br />
==Problems==<br />
===Small Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/WishList/EdgesAndGradients/SobelEdgeDetectionImageFilter | SobelEdgeDetectionImageFilter]] || {{ITKDoxygenURL|SobelEdgeDetectionImageFilter}} || NeighborIterator error?<br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ScaleTransform | Scale an image]] || {{ITKDoxygenURL|ScaleTransform}} || No matching function call to SetTransform.<br />
|-<br />
| [[ITK/Examples/WishList/Iterators/FloodFillIterator | Traverse a region using a flood fill iterator]] || {{ITKDoxygenURL|FloodFilledSpatialFunctionConditionalIterator}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/ImageProcessing/GradientOfVectorImage | Compute the gradient of a vector image]] || {{ITKDoxygenURL|GradientImageFilter}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_Image | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_1D | Compute distributions of samples using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || Someone please confirm that this outputs the mean and the variance (i.e. I used a standard deviation of 30 to create the samples and the second estimated parameter is near 1000 (~30^2) . Is this correct?)<br />
|-<br />
| [[ITK/Examples/Broken/EdgesAndGradients/CannyEdgeDetectionImageFilter | Find edges in an image]] || {{ITKDoxygenURL|CannyEdgeDetectionImageFilter}} || How to set a reasonable Threshold for the output edges?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ImageToHistogramFilter | Compute the histogram of an image]] || {{ITKDoxygenURL|Statistics_1_1ImageToHistogramFilter}} || The last entry of the red histogram should contain several values, but it is 0?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/KmeansModelEstimator | Classifying pixels using KMeans]] || {{ITKDoxygenURL|KmeansModelEstimator}} || How to apply the labels of the filter to the input image?<br />
|-<br />
| [[ITK/Examples/Broken/Images/RegionGrowImageFilter | Basic region growing]] || {{ITKDoxygenURL|RegionGrowImageFilter}} || Just getting started with demo...<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConnectedThresholdImageFilter | Find connected components in an image]] || {{ITKDoxygenURL|ConnectedThresholdImageFilter}} || Just need to finish it.<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConvertPixelBuffer | Convert an image from one type to another]] || {{ITKDoxygenURL|ConvertPixelBuffer}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/NeighborhoodOperatorImageFunction | Apply a function to every pixel with access to its neighborhood]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/InPlace | In-place filtering of an image]] || {{ITKDoxygenURL|InPlaceImageFilter}} || This only works for filters which derive from itkInPlaceImageFilter<br />
|-<br />
| [[ITK/Examples/Broken/Images/MirrorPadImageFilter | Pad an image]] || {{ITKDoxygenURL|MirrorPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/WrapPadImageFilter | Pad an image by wrapping]] || {{ITKDoxygenURL|WrapPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/VTKImageToImageFilter | Convert a VTK image to an ITK image]] || {{ITKDoxygenURL|VTKImageToImageFilter}} || Seems to expect an input image with only 1 component? (i.e. greyscale)<br />
<br />
|}<br />
<br />
===Big Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Broken/Images/MeanSquaresImageToImageMetric | Find the best position of the moving image in the fixed image.]] || {{ITKDoxygenURL|MeanSquaresImageToImageMetric}} || Output (0,0) is incorrect.<br />
|-<br />
| [[ITK/Examples/Broken/Images/GradientImageFilter | Compute and display the gradient of an image]] || {{ITKDoxygenURL|GradientImageFilter}} || Blank output.<br />
|}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/Compose3DCovariantVectorImageFilter&diff=40001ITK/Examples/ImageProcessing/Compose3DCovariantVectorImageFilter2011-05-19T14:34:28Z<p>Glehmann: /* Compose3DCovariantVectorImageFilter.cxx */</p>
<hr />
<div>==Compose3DCovariantVectorImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImageAdaptor.h"<br />
#include "itkImageRegionIterator.h"<br />
#include "itkComposeImageFilter.h"<br />
<br />
typedef itk::Image<itk::CovariantVector< float, 3>, 2> VectorImageType;<br />
typedef itk::Image<float, 2> ScalarImageType;<br />
<br />
static void CreateImage(ScalarImageType::Pointer image);<br />
<br />
int main(int, char *[])<br />
{<br />
ScalarImageType::Pointer image = ScalarImageType::New();<br />
CreateImage(image);<br />
<br />
typedef itk::ComposeImageFilter<ScalarImageType,<br />
VectorImageType> ComposeCovariantVectorImageFilterType;<br />
<br />
ComposeCovariantVectorImageFilterType::Pointer composeFilter = ComposeCovariantVectorImageFilterType::New();<br />
<br />
composeFilter->SetInput1(image);<br />
composeFilter->SetInput2(image);<br />
composeFilter->SetInput3(image);<br />
composeFilter->Update();<br />
<br />
itk::Index<2> index;<br />
index.Fill(0);<br />
<br />
std::cout << image->GetPixel(index) << std::endl;<br />
<br />
std::cout << composeFilter->GetOutput()->GetPixel(index) << std::endl;<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ScalarImageType::Pointer image)<br />
{<br />
ScalarImageType::IndexType start;<br />
start.Fill(0);<br />
<br />
ScalarImageType::SizeType size;<br />
size.Fill(2);<br />
<br />
ScalarImageType::RegionType region;<br />
region.SetSize(size);<br />
region.SetIndex(start);<br />
<br />
image->SetRegions(region);<br />
image->Allocate();<br />
<br />
itk::ImageRegionIterator<ScalarImageType> imageIterator(image,image->GetLargestPossibleRegion());<br />
<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
imageIterator.Set(1.2);<br />
<br />
++imageIterator;<br />
}<br />
}<br />
</source><br />
{{ITKCMakeLists|Compose3DCovariantVectorImageFilter}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples&diff=40000ITK/Examples2011-05-19T14:33:23Z<p>Glehmann: /* Image Processing */</p>
<hr />
<div>These are fully independent, compilable examples. There is significant overlap in the examples, but they are each intended to illustrate a different concept and be fully stand alone compilable.<br />
Please add examples in your areas of expertise!<br />
You can checkout the entire set of examples from this repository: <br />
http://gitorious.org/itkwikiexamples/itkwikiexamples<br />
<pre>git clone git://gitorious.org/itkwikiexamples/itkwikiexamples.git ITKWikiExamples</pre><br />
<br />
==About the Examples==<br />
* [http://www.itk.org/Wiki/images/e/e6/ITK_Examples_Iowa_Meeting_2010_11-8-2010.odp Official announcement]<br />
===ItkVtkGlue===<br />
ITK and VTK are very separate toolkits - ITK for image processing and VTK for data visualization. It is often convenient to use the two together - namely, to display an ITK image on the screen. The ItkVtkGlue kit serves exactly this purpose. Also provided inside ItkVtkGlue is a QuickView class to allow a 2 line display of an ITK image.<br />
<br />
If you download the entire ITK Wiki Examples Collection, the ItkVtkGlue directory will be included and configured. If you wish to just build a few examples, then you will need to [http://gitorious.org/itkwikiexamples/itkwikiexamples/blobs/raw/master/ItkVtkGlue.tar.gz download ItkVtkGlue] and build it.<br />
<br />
===[[ITK/Examples/Instructions/ForUsers|Information for Wiki Examples Users]]===<br />
If you just want to use the Wiki Examples, [[ITK/Examples/Instructions/ForUsers|go here]]. You will learn how to search for examples, build a few examples and build all of the examples.<br />
<br />
===[[ITK/Examples/Instructions/ForDevelopers|Information for Wiki Examples Developers]]===<br />
If you want to contribute examples [[ITK/Examples/Instructions/ForDevelopers|go here]]. You will learn how to add a new example and the guidelines for writing an example.<br />
<br />
===[[ITK/Examples/Instructions/ForAdministrators|Information for Wiki Examples Administrators]]===<br />
If you are a Wiki Example Administrator or want to learn more about the process [[ITK/Examples/Instructions/ForAdministrators|go here]]. You will learn how the Wiki Examples repository is organized, how the repository is synced to the wiki and how to add new topics, tests and regression baselines.<br />
<br />
==Simple Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SimpleOperations/WidthHeight | Get the width and height of an image ]] || || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/VariableLengthVector | Variable length vector ]] || {{ITKDoxygenURL|VariableLengthVector}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TranslationTransform | Translate an image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|ResampleImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/NumericTraits | Get some basic information about a type]] || {{ITKDoxygenURL|NumericTraits}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/ScalarToRGBColormapImageFilter | Apply a color map to an image]] || {{ITKDoxygenURL|ScalarToRGBColormapImageFilter}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TryCatch | Catch an ITK exception]] || || Try/Catch blocks<br />
|-<br />
| [[ITK/Examples/SimpleOperations/BresenhamLine | Get the points on a Bresenham line between two points]] || {{ITKDoxygenURL|BresenhamLine}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/Offset | Add an offset to a pixel index]] || {{ITKDoxygenURL|Offset}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenPoints | Distance between two points]] || {{ITKDoxygenURL|Point}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenIndices | Distance between two indices]] || {{ITKDoxygenURL|Point}}, {{ITKDoxygenURL|Index}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/CreateVector | Create a vector]] || {{ITKDoxygenURL|Vector}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/GetNameOfClass | Get the name/type/class of an object ]] || || GetNameOfClass()<br />
|-<br />
| [[ITK/Examples/Images/Index | An object which holds the index of a pixel ]] || {{ITKDoxygenURL|Index}} || <br />
|-<br />
| [[ITK/Examples/Images/Size | An object which holds the size of an image ]] || {{ITKDoxygenURL|Size}} || <br />
|-<br />
| [[ITK/Examples/Images/ImageRegion | An object which holds the index (start) and size of a region of an image ]] || {{ITKDoxygenURL|ImageRegion}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/Transparency | Make part of an image transparent]] || {{ITKDoxygenURL|RGBAPixel}} || Transparency, RGBA, alpha<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionIntersection | Determine if one region is fully inside another region]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection, IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/PixelInsideRegion | Determine if a pixel is inside of a region]] || {{ITKDoxygenURL|ImageRegion}} || IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionOverlap | Determine the overlap of two regions]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection<br />
|-<br />
| [[ITK/Examples/SimpleOperations/ImageDuplicator | Duplicate an image]] || {{ITKDoxygenURL|ImageDuplicator}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/RandomImageSource | Produce an image of noise]] || {{ITKDoxygenURL|RandomImageSource}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/SetPixels | Set specified pixels to specified values]] || {{ITKDoxygenURL|Image}} ||<br />
|}<br />
<br />
==Mathematical Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Math/CovariantVector | Create a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || This is the object which should be used to represent a mathematical vector.<br />
|-<br />
| [[ITK/Examples/Math/CovariantVectorNorm | Compute the norm of a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || In-place and non-inplace norms.<br />
|-<br />
| [[ITK/Examples/Math/Matrix | Matrix ]] || {{ITKDoxygenURL|Matrix}} || <br />
|-<br />
| [[ITK/Examples/Math/Pi | Mathematical constant pi = 3.14 ]] || {{ITKDoxygenURL|Math}} || <br />
|-<br />
| [[ITK/Examples/Math/DotProduct | Dot product (inner product) of two vectors ]] || {{ITKDoxygenURL|Vector}} || <br />
|}<br />
<br />
==Image Functions==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Functions/GuassianBlurImageFunction | GuassianBlurImageFunction ]] || {{ITKDoxygenURL|GuassianBlurImageFunction}} || <br />
|}<br />
<br />
==Point Set==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/PointSet/CreatePointSet | Create a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/ReadPointSet | Read a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/WritePointSet | Write a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/BoundingBox | Get the bounding box of a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|}<br />
<br />
==Input/Output (IO)==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/IO/ReadVectorImage| Read an image file with an unknown number of components]] || {{ITKDoxygenURL|ImageFileReader}},{{ITKDoxygenURL|VectorImage}} || <br />
|-<br />
| [[ITK/Examples/IO/ImportImageFilter| Convert a C-style array to an itkImage]] || {{ITKDoxygenURL|ImportImageFilter}} || <br />
|-<br />
| [[ITK/Examples/IO/ReadUnknownImageType | Read an image file without knowing its type before hand]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileWriter | Write an image]] || {{ITKDoxygenURL|ImageFileWriter}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileReader | Read an image]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/TIFFImageIO | Write a TIFF image]] || {{ITKDoxygenURL|TIFFImageIO}} || This is a general demonstration of how to use a specific writer rather than relying on the ImageFileWriter to choose for you.<br />
|-<br />
| [[ITK/Examples/IO/ImageToVTKImageFilter | Display an ITK image]] || {{ITKDoxygenURL|ImageToVTKImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/IO/TransformFileWriter | Write a transform to a file]] || {{ITKDoxygenURL|TransformFileWriter}} ||<br />
|-<br />
| [[ITK/Examples/IO/TransformFileReader | Read a transform from a file]] || {{ITKDoxygenURL|TransformFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/VolumeFromSlices | Create a 3D volume from a series of 2D images]] || {{ITKDoxygenURL|ImageSeriesReader}} || Uses NumericSeriesFileNames to generate a list of file names<br />
|}<br />
<br />
==DICOM==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/DICOM/ResampleDICOM | Resample a DICOM series]] || {{ITKDoxygenURL|GDCMImageIO}} || Resample a DICOM series with user-specified spacing.<br />
|}<br />
<br />
==Image Processing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddConstantToImageFilter| Add a constant to every pixel in an image]] || {{ITKDoxygenURL|AddImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SubtractConstantFromImageFilter| Subtract a constant from every pixel in an image]] || {{ITKDoxygenURL|SubtractImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SquareImageFilter| Square every pixel in an image]] || {{ITKDoxygenURL|SquareImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Upsampling| Upsampling an image]] || {{ITKDoxygenURL|BSplineInterpolateImageFunction}} {{ITKDoxygenURL|ResampleImageFilter}} || Interpolate missing pixels in order to upsample an image. Note this only works on scalar images.<br />
|-<br />
| [[ITK/Examples/Images/FlipImageFilter | Flip an image over specified axes]] || {{ITKDoxygenURL|FlipImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/VectorRescaleIntensityImageFilter | Apply a transformation to the magnitude of vector valued image pixels]] || {{ITKDoxygenURL|VectorRescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Images/NeighborhoodOperatorImageFilter | Apply a kernel to every pixel in an image]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LaplacianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianImageFilter}} || Input image type must be double or float<br />
|-<br />
| [[ITK/Examples/Images/ConstantPadImageFilter | Pad an image with a constant value]] || {{ITKDoxygenURL|ConstantPadImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/IntensityWindowingImageFilter| IntensityWindowingImageFilter]] || {{ITKDoxygenURL|IntensityWindowingImageFilter}} || Apply a linear intensity transform from a specified input range to a specified output range.<br />
|-<br />
| [[ITK/Examples/Images/ShrinkImageFilter | Shrink an image]] || {{ITKDoxygenURL|ShrinkImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/NormalizedCorrelationImageFilter | Normalized correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyByConstantImageFilter | Multiply every pixel in an image by a constant]] || {{ITKDoxygenURL|MultiplyImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SquaredDifferenceImageFilter | Compute the squared difference of corresponding pixels in two images]] || {{ITKDoxygenURL|SquaredDifferenceImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddPixelAccessor | Add a constant to every pixel without duplicating the image in memory (an accessor)]] || {{ITKDoxygenURL|AddPixelAccessor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionalMaximaImageFilter | RegionalMaximaImageFilter]] || {{ITKDoxygenURL|RegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/ValuedRegionalMaximaImageFilter | ValuedRegionalMaximaImageFilter]] || {{ITKDoxygenURL|ValuedRegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaximumImageFilter | Pixel wise compare two input images and set the output pixel to their max]] || {{ITKDoxygenURL|MaximumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumImageFilter | Pixel wise compare two input images and set the output pixel to their min]] || {{ITKDoxygenURL|MinimumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AndImageFilter | Binary AND two images]] || {{ITKDoxygenURL|AndImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/OrImageFilter | Binary OR two images]] || {{ITKDoxygenURL|OrImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/XorImageFilter | Binary XOR (exclusive OR) two images]] || {{ITKDoxygenURL|XorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryNotImageFilter | Invert an image using the Binary Not operation]] || {{ITKDoxygenURL|BinaryNotImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Compose3DCovariantVectorImageFilter | Compose a vector image (with 3 components) from three scalar images]] || {{ITKDoxygenURL|ComposeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/NthElementImageAdaptor | Extract a component of an itkImage with pixels with multiple components]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || Use built in functionality to extract a component of an itkImage with CovariantVector components. Note this does not work for itkVectorImages - see VectorIndexSelectionCastImageFilter instead.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ImageAdaptorExtractVectorComponent | Present an image by first performing an operation]] || {{ITKDoxygenURL|ImageAdaptor}} || A demonstration of how to present an image pixel as a function of the pixel. In this example the functionality of NthElementImageAdaptor is demonstrated.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ProcessingNthImageElement | Process the nth component/element of a vector image]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter | Label binary regions in an image and get their properties]] || {{ITKDoxygenURL|BinaryImageToShapeLabelMapFilter}} || Region bounding box, etc.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConvolutionImageFilter | Convolve an image with a kernel]] || {{ITKDoxygenURL|ConvolutionImageFilter}} || Convolution.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RelabelComponentImageFilter | Assign contiguous labels to connected regions of an image]] || {{ITKDoxygenURL|RelabelComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CropImageFilter | Crop an image]] || {{ITKDoxygenURL|CropImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AbsImageFilter | Compute the absolute value of an image]] || {{ITKDoxygenURL|AbsImageFilter}} || magnitude<br />
|-<br />
| [[ITK/Examples/ImageProcessing/InvertIntensityImageFilter | Invert an image]] || {{ITKDoxygenURL|InvertIntensityImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaskImageFilter | Apply a mask to an image]] || {{ITKDoxygenURL|MaskImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SigmoidImageFilter | Pass image pixels through a sigmoid function]] || {{ITKDoxygenURL|SigmoidImageFilter}} || The qualitative description of how Alpha and Beta affect the function from the ITK Software Guide and the associated images would be nice to add to the doxygen.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|ThresholdImageFilter}} || The result is the original image but with the values below (or above) the threshold "clamped" to an output value.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|BinaryThresholdImageFilter}} || The result is a binary image (inside the threshold region or outside the threshold region).<br />
|-<br />
| [[ITK/Examples/ImageProcessing/UnaryFunctorImageFilter | Apply a custom operation to each pixel in an image]] || {{ITKDoxygenURL|UnaryFunctorImageFilter}} || Perform a custom operation on every pixel in an image. This example rotates the vector-valued pixels by 90 degrees.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryFunctorImageFilter | Apply a predefined operation to corresponding pixels in two images]] || {{ITKDoxygenURL|BinaryFunctorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryFunctorImageFilterCustom | Apply a custom operation to corresponding pixels in two images]] || {{ITKDoxygenURL|BinaryFunctorImageFilter}} || This example computes the squared difference between corresponding pixels.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumMaximumImageCalculator | Find the minimum and maximum value (and the position of the value) in an image]] || {{ITKDoxygenURL|MinimumMaximumImageCalculator}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddImageFilter | Add two images together]] || {{ITKDoxygenURL|AddImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/SubtractImageFilter | Subtract two images]] || {{ITKDoxygenURL|SubtractImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PasteImageFilter | Paste a part of one image into another image]] || {{ITKDoxygenURL|PasteImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume | Stack multiple 2D images into a 3D image]] || {{ITKDoxygenURL|TileImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/TileImageFilter_SideBySide | Tile multiple images side by side]] || {{ITKDoxygenURL|TileImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyImageFilter | Multiply two images together]] || {{ITKDoxygenURL|MultiplyImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionOfInterestImageFilter | Extract a portion of an image (region of interest)]] || {{ITKDoxygenURL|RegionOfInterestImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RescaleIntensityImageFilter | Rescale the intensity values of an image to a specified range]] || {{ITKDoxygenURL|RescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConnectedComponentImageFilter | Label connected components in a binary image]] || {{ITKDoxygenURL|ConnectedComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/NormalizeImageFilter | Normalize an image]] || {{ITKDoxygenURL|NormalizeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CastImageFilter | Cast an image from one type to another]] || {{ITKDoxygenURL|CastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PermuteAxesImageFilter | Switch the axes of an image]] || {{ITKDoxygenURL|PermuteAxesImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LinearInterpolateImageFunction | Linearly interpolate a position in an image]] || {{ITKDoxygenURL|LinearInterpolateImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/HammingWindowFunction | HammingWindowFunction]] || {{ITKDoxygenURL|HammingWindowFunction}} ||<br />
|}<br />
<br />
==Vector Images==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImage | Create a vector image]] || {{ITKDoxygenURL|VectorImage}} || An image with an ND vector at each pixel<br />
|-<br />
| [[ITK/Examples/VectorImages/ImageToVectorImageFilter | Create a vector image from a collection of scalar images]] || {{ITKDoxygenURL|ImageToVectorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImageToImageAdaptor | View a component of a vector image as if it were a scalar image]] || {{ITKDoxygenURL|VectorImageToImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorIndexSelectionCastImageFilter | Extract a component of an itkVectorImage]] || {{ITKDoxygenURL|VectorIndexSelectionCastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorResampleImageFilter | Translate a vector image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|VectorResampleImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/JoinImageFilter | Join images, stacking their components]] || {{ITKDoxygenURL|JoinImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/NeighborhoodIterator | NeighborhoodIterator on a VectorImage]] || {{ITKDoxygenURL|VectorImage}} {{ITKDoxygenURL|NeighborhoodIterator}}||<br />
|}<br />
<br />
==Iterating Over (Traversing) An Image==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator_Manual | Iterate over a region of an image with a shaped neighborhood]] || Create the shape manually {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator | Iterate over a region of an image with a shaped neighborhood]] || Create the shape from a StructuringElement {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionExclusionConstIteratorWithIndex | Iterator over an image skipping a specified region]] || {{ITKDoxygenURL|ImageRegionExclusionConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomConstIteratorWithIndex | Randomly select pixels from a region of an image]] || {{ITKDoxygenURL|ImageRandomConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomNonRepeatingConstIteratorWithIndex | Randomly select pixels from a region of an image without replacement]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/LineIterator | Iterate over a line through an image]] || {{ITKDoxygenURL|LineIterator}} || Walks a Bresenham line through an image (with write access)<br />
|-<br />
| [[ITK/Examples/Iterators/LineConstIterator | Iterate over a line through an image without write access]] || {{ITKDoxygenURL|LineConstIterator}} || Walks a Bresenham line through an image (without write access)<br />
|-<br />
| [[ITK/Examples/Iterators/ImageBoundaryFacesCalculator | Iterate over the central region (non-boundary) separately from the face-regions (boundary)]] || {{ITKDoxygenURL|ImageBoundaryFacesCalculator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/NeighborhoodIterator | Iterate over a region of an image with a neighborhood (with write access)]] || {{ITKDoxygenURL|NeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstNeighborhoodIterator | Iterate over a region of an image with a neighborhood (without write access)]] || {{ITKDoxygenURL|ConstNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIterator | Iterate over a region of an image (with write access)]] || {{ITKDoxygenURL|ImageRegionIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIterator | Iterate over a region of an image (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstantBoundaryCondition | Make out of bounds pixels return a constant value]] || {{ITKDoxygenURL|ConstantBoundaryCondition}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (with write access)]] || {{ITKDoxygenURL|ImageRegionIteratorWithIndex}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIteratorWithIndex}} ||<br />
|}<br />
<br />
==Kernels==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Operators/GaussianOperator | Create a Gaussian kernel]] || {{ITKDoxygenURL|GaussianOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/GaussianDerivativeOperator | Create a Gaussian derivative kernel]] || {{ITKDoxygenURL|GaussianDerivativeOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/LaplacianOperator | Create a Laplacian kernel]] || {{ITKDoxygenURL|LaplacianOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/DerivativeOperator | Create a derivative kernel]] || {{ITKDoxygenURL|DerivativeOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/SobelOperator | Create the Sobel kernel]] || {{ITKDoxygenURL|SobelOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/ForwardDifferenceOperator | Create a forward difference kernel]] || {{ITKDoxygenURL|ForwardDifferenceOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/BackwardDifferenceOperator | Create a backward difference kernel]] || {{ITKDoxygenURL|BackwardDifferenceOperator}} || <br />
<br />
|}<br />
<br />
==Image Edges, Gradients, and Derivatives==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/DerivativeImageFilter | Compute the derivative of an image in a particular direction]] || {{ITKDoxygenURL|DerivativeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientRecursiveGaussianImageFilter| Compute the gradient of an image by convolution with the first derivative of a Gaussian]] || {{ITKDoxygenURL|GradientRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeRecursiveGaussianImageFilter | Find the gradient magnitude of the image first smoothed with a Gaussian kernel]] || {{ITKDoxygenURL|GradientMagnitudeRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/RecursiveGaussianImageFilter | Find higher derivatives of an image]] || {{ITKDoxygenURL|RecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryContourImageFilter | Extract the boundaries of connected regions in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} || Blob boundary, border<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryBoundaries | Extract the inner and outer boundaries of blobs in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeImageFilter | Compute the gradient magnitude image]] || {{ITKDoxygenURL|GradientMagnitudeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/LaplacianRecursiveGaussianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianRecursiveGaussianImageFilter}} ||<br />
|}<br />
<br />
==Smoothing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Smoothing/AntiAliasBinaryImageFilter | Anti alias a binary image]] || {{ITKDoxygenURL|AntiAliasBinaryImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/MeanImageFilter | Mean filter an image]] || {{ITKDoxygenURL|MeanImageFilter}} || Replace each pixel by the mean of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/MedianImageFilter | Median filter an image]] || {{ITKDoxygenURL|MedianImageFilter}} || Replace each pixel by the median of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/DiscreteGaussianImageFilter | Smooth an image with a discrete Gaussian filter]] || {{ITKDoxygenURL|DiscreteGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BinomialBlurImageFilter | Blur an image]] || {{ITKDoxygenURL|BinomialBlurImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BilateralImageFilter | Bilateral filter an image]] || {{ITKDoxygenURL|BilateralImageFilter}} || Edge preserving smoothing.<br />
|-<br />
| [[ITK/Examples/Smoothing/CurvatureFlowImageFilter | Smooth an image using curvature flow]] || {{ITKDoxygenURL|CurvatureFlowImageFilterType}} ||<br />
|-<br />
| [[ITK/Examples/Smoothing/SmoothingRecursiveGaussianImageFilter | Gaussian smoothing that works with image adaptors]] || {{ITKDoxygenURL|SmoothingRecursiveGaussianImageFilter}} || <br />
|}<br />
<br />
==Morphology==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Morphology/BinaryErodeImageFilter | Erode a binary image]] || {{ITKDoxygenURL|BinaryErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryDilateImageFilter | Dilate a binary image]] || {{ITKDoxygenURL|BinaryDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleDilateImageFilter | Dilate a grayscale image]] || {{ITKDoxygenURL|GrayscaleDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleErodeImageFilter | Erode a grayscale image]] || {{ITKDoxygenURL|GrayscaleErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/FlatStructuringElement | Erode a binary image using a flat (box) structuring element]] || {{ITKDoxygenURL|FlatStructuringElement}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryBallStructuringElement | An elliptical structuring element]] || {{ITKDoxygenURL|BinaryBallStructuringElement}} || <br />
|}<br />
<br />
==Curves==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Curves/ContourMeanDistanceImageFilter | Compute the mean distance between all points of two curves]] || {{ITKDoxygenURL|ContourMeanDistanceImageFilter}} || <br />
|}<br />
<br />
==Spectral Analysis==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter | Compute the FFT of an image]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/CrossCorrelationInFourierDomain | Compute the cross-correlation of two images in the Fourier domain]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}}{{ITKDoxygenURL|VnlFFTComplexConjugateToRealImageFilter}} || || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/RealAndImaginaryToComplexImageFilter | Convert a real image and an imaginary image to a complex image]] || {{ITKDoxygenURL|RealAndImaginaryToComplexImageFilter}} || <br />
|}<br />
<br />
==Utilities==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Utilities/CreateAnother | Copy a filter]] || {{ITKDoxygenURL|Object}} || Copy/duplicate a filter<br />
|-<br />
| [[ITK/Examples/Utilities/AzimuthElevationToCartesianTransform | Cartesian to AzimuthElevation and vice-versa]] || {{ITKDoxygenURL|AzimuthElevationToCartesianTransform}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/FixedArray | C-style array]] || {{ITKDoxygenURL|FixedArray}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/DeepCopy | Deep copy an image]] || || <br />
|-<br />
| [[ITK/Examples/Utilities/RandomPermutation | Permute a sequence of indices]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Utilities/MersenneTwisterRandomVariateGenerator | Random number generator]] || {{ITKDoxygenURL|MersenneTwisterRandomVariateGenerator}} || <br />
|-<br />
| [[ITK/Examples/Utilities/JetColormapFunctor | Map scalars into a jet colormap]] || {{ITKDoxygenURL|JetColormapFunctor}} || <br />
|-<br />
| [[ITK/Examples/Utilities/SimpleFilterWatcher | Monitor a filter]] || {{ITKDoxygenURL|SimpleFilterWatcher}} || See debug style information.<br />
|-<br />
| [[ITK/Examples/Utilities/TimeProbe | Time probe]] || {{ITKDoxygenURL|TimeProbe}} || Compute the time between points in code.<br />
|-<br />
| [[ITK/Examples/Utilities/ObserveEvent | Observe an event]] || {{ITKDoxygenURL|Command}} || <br />
|-<br />
| [[ITK/Examples/Utilities/VectorContainer | Vector container]] || {{ITKDoxygenURL|VectorContainer}} || <br />
|-<br />
| [[ITK/Examples/Utilities/BoundingBox | Bounding box]] || {{ITKDoxygenURL|BoundingBox}} || <br />
|}<br />
<br />
==Statistics==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Statistics/GaussianDistribution | Create a Gaussian distribution]] || {{ITKDoxygenURL|GaussianDistribution}} || <br />
|-<br />
| [[ITK/Examples/Statistics/SampleToHistogramFilter | Create a histogram from a list of sample measurements]] || {{ITKDoxygenURL|SampleToHistogramFilter}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ListSample | Create a list of sample measurements]] || {{ITKDoxygenURL|ListSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ImageToListSampleAdaptor | Create a list of samples from an image without duplicating the data]] || {{ITKDoxygenURL|ImageToListSampleAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Statistics/MembershipSample | Create a list of samples with associated class IDs]] || {{ITKDoxygenURL|MembershipSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ExpectationMaximizationMixtureModelEstimator_2D | 2D Gaussian Mixture Model Expectation Maximization]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || EM<br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_1D | 1D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_3D | 3D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ScalarImageKmeansImageFilter | Cluster the pixels in a greyscale image]] || {{ITKDoxygenURL|ScalarImageKmeansImageFilter}} || <br />
<br />
|}<br />
<br />
==Spatial Objects==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpatialObjects/SpatialObjectToImageFilter | Convert a spatial object to an image ]] || {{ITKDoxygenURL|SpatialObjectToImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/EllipseSpatialObject | Ellipse ]] || {{ITKDoxygenURL|EllipseSpatialObject}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/LineSpatialObject| Line spatial object]] || {{ITKDoxygenURL|LineSpatialObject}}, {{ITKDoxygenURL|LineSpatialObjectPoint}} || Specify a piecewise-linear object by specifying points along the line.<br />
|-<br />
| [[ITK/Examples/SpatialObjects/PlaneSpatialObject| Plane spatial object]] || {{ITKDoxygenURL|PlaneSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/SpatialObjects/BlobSpatialObject | Blob ]] || {{ITKDoxygenURL|BlobSpatialObject}} ||<br />
|}<br />
<br />
==Inspection==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Inspection/CheckerBoardImageFilter | Combine two images by alternating blocks of a checkerboard pattern]] || {{ITKDoxygenURL|CheckerBoardImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Inspection/PixelInspection | Printing a pixel value to the console]] || [http://www.itk.org/Doxygen/html/classitk_1_1Image.html#ad424c945604f339130b4ffe81b99738eGetPixel GetPixel] ||<br />
|}<br />
<br />
==Image Registration==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethod | A basic global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|TranslationTransform}} || Translation only transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodAffine | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|AffineTransform}} || Full affine transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodBSpline | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|BSplineDeformableTransform}} || BSpline transform.<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformation | Mutual Information ]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|TranslationTransform}} || Global registration by maximizing the mutual information and using a translation only transform<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformationAffine | Mutual Information Affine]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|AffineTransform}} || Global registration by maximizing the mutual information and using an affine transform<br />
|}<br />
<br />
==Image Segmentation==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Segmentation/MeanShiftClustering | Mean shift clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/kMeansClustering | KMeans Clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/MultiphaseChanAndVeseSparseFieldLevelSetSegmentation | Multiphase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseSparseFieldLevelSetSegmentation | Single-phase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseDenseFieldLevelSetSegmentation | Single-phase Chan And Vese Dense Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseDenseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|}<br />
<br />
==Meshes==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Meshes/Decimation | Decimation]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/AddPointsAndEdges | Add points and edges]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/QuadEdgeMeshNormalFilter | Compute normals of a mesh]] || {{ITKDoxygenURL|QuadEdgeMeshNormalFilter}} ||<br />
|-<br />
| [[ITK/Examples/Meshes/QuadEdgeMeshParameterizationFilter | Planar parameterization of a mesh]] || {{ITKDoxygenURL|ParameterizationQuadEdgeMeshFilter}} || Compute linear parameterization of a mesh homeomorphic to a disk on the plane<br />
|}<br />
<br />
==Wish List==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/GaussianMixtureModelComponent | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|GaussianMixtureModelComponent}} ||<br />
|-<br />
| [[ITK/Examples/WishList/LevenbergMarquart| LevenbergMarquart]] || || <br />
|-<br />
| [[ITK/Examples/WishList/IterativeClosestPoints| IterativeClosestPoints]] || || <br />
|-<br />
| [[ITK/Examples/WishList/MedianImageFunction| MedianImageFunction]] || {{ITKDoxygenURL|MedianImageFunction}} || <br />
|-<br />
| [[ITK/Examples/WishList/Operators/AllOperators| Demonstrate all operators]] || {{ITKDoxygenURL|NeighborhoodOperator}} || <br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ColorNormalizedCorrelation| Color Normalized Correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} || <br />
|-<br />
| [[ITK/Examples/WishList/SpatialObjects/ContourSpatialObject| ContourSpatialObject]] || {{ITKDoxygenURL|ContourSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/Broken/SimpleOperations/MetaDataDictionary| Store non-pixel associated data in an image]] || {{ITKDoxygenURL|MetaDataDictionary}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/LevelSets| Level Sets]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation//RegionGrowing| Region Growing]] || || <br />
|-<br />
| [[ITK/Examples/Meshes/Subdivision| Mesh subdivision]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation/OtsuThresholdImageFilter| Separate foreground and background using Otsu's method]] || {{ITKDoxygenURL|OtsuThresholdImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/SimpleContourExtractorImageFilter| Extract contours]] || {{ITKDoxygenURL|SimpleContourExtractorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/RGBToVectorImageAdaptor| Present an image of RGBPixel pixels as an image of vectors]] || {{ITKDoxygenURL|RGBToVectorImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DCirclesImageFilter| HoughTransform2DCirclesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DCirclesImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DLinesImageFilter| HoughTransform2DLinesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DLinesImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Matlab/MatlabToITK| Write data from Matlab in a format readable by ITK]] || || <br />
|-<br />
| [[ITK/Examples/Matlab/ITKToMatlab| Write data from ITK in a format readable by Matlab]] || || <br />
|}<br />
<br />
==Included in the ITK Repository==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Included/Registration| Image registration]] || || <br />
|}<br />
<br />
==Matlab==<br />
{{ITKExamplesTable}}<br />
<br />
|}<br />
<br />
==Developer Examples==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Developer/Exceptions | Throw an exception]] || || <br />
|-<br />
| [[ITK/Examples/Developer/ImageSource | Produce an image programmatically.]] || {{ITKDoxygenURL|ImageSource}} || Nothing in, image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilter | Filter an image]] || {{ITKDoxygenURL|ImageToImageFilter}} || Image in, same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputs | Write a filter with multiple inputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (same type), same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputsDifferentType | Write a filter with multiple inputs of different types.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (different type), image (same type as first input) out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleOutputs | Write a filter with multiple outputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Images in, two images out (same type as first input).<br />
|-<br />
| [[ITK/Examples/Developer/SetGetMacro | Get or set a member variable of an ITK class.]] || || SetMacro, GetMacro<br />
|-<br />
| [[ITK/Examples/Developer/OutputMacros | Output an error, a warning, or debug information.]] || || DebugMacro, ErrorMacro, WarningMacro<br />
|}<br />
<br />
==Problems==<br />
===Small Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/WishList/EdgesAndGradients/SobelEdgeDetectionImageFilter | SobelEdgeDetectionImageFilter]] || {{ITKDoxygenURL|SobelEdgeDetectionImageFilter}} || NeighborIterator error?<br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ScaleTransform | Scale an image]] || {{ITKDoxygenURL|ScaleTransform}} || No matching function call to SetTransform.<br />
|-<br />
| [[ITK/Examples/WishList/Iterators/FloodFillIterator | Traverse a region using a flood fill iterator]] || {{ITKDoxygenURL|FloodFilledSpatialFunctionConditionalIterator}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/ImageProcessing/GradientOfVectorImage | Compute the gradient of a vector image]] || {{ITKDoxygenURL|GradientImageFilter}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_Image | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_1D | Compute distributions of samples using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || Someone please confirm that this outputs the mean and the variance (i.e. I used a standard deviation of 30 to create the samples and the second estimated parameter is near 1000 (~30^2) . Is this correct?)<br />
|-<br />
| [[ITK/Examples/Broken/EdgesAndGradients/CannyEdgeDetectionImageFilter | Find edges in an image]] || {{ITKDoxygenURL|CannyEdgeDetectionImageFilter}} || How to set a reasonable Threshold for the output edges?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ImageToHistogramFilter | Compute the histogram of an image]] || {{ITKDoxygenURL|Statistics_1_1ImageToHistogramFilter}} || The last entry of the red histogram should contain several values, but it is 0?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/KmeansModelEstimator | Classifying pixels using KMeans]] || {{ITKDoxygenURL|KmeansModelEstimator}} || How to apply the labels of the filter to the input image?<br />
|-<br />
| [[ITK/Examples/Broken/Images/RegionGrowImageFilter | Basic region growing]] || {{ITKDoxygenURL|RegionGrowImageFilter}} || Just getting started with demo...<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConnectedThresholdImageFilter | Find connected components in an image]] || {{ITKDoxygenURL|ConnectedThresholdImageFilter}} || Just need to finish it.<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConvertPixelBuffer | Convert an image from one type to another]] || {{ITKDoxygenURL|ConvertPixelBuffer}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/NeighborhoodOperatorImageFunction | Apply a function to every pixel with access to its neighborhood]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/InPlace | In-place filtering of an image]] || {{ITKDoxygenURL|InPlaceImageFilter}} || This only works for filters which derive from itkInPlaceImageFilter<br />
|-<br />
| [[ITK/Examples/Broken/Images/MirrorPadImageFilter | Pad an image]] || {{ITKDoxygenURL|MirrorPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/WrapPadImageFilter | Pad an image by wrapping]] || {{ITKDoxygenURL|WrapPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/VTKImageToImageFilter | Convert a VTK image to an ITK image]] || {{ITKDoxygenURL|VTKImageToImageFilter}} || Seems to expect an input image with only 1 component? (i.e. greyscale)<br />
<br />
|}<br />
<br />
===Big Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Broken/Images/MeanSquaresImageToImageMetric | Find the best position of the moving image in the fixed image.]] || {{ITKDoxygenURL|MeanSquaresImageToImageMetric}} || Output (0,0) is incorrect.<br />
|-<br />
| [[ITK/Examples/Broken/Images/GradientImageFilter | Compute and display the gradient of an image]] || {{ITKDoxygenURL|GradientImageFilter}} || Blank output.<br />
|}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples&diff=39942ITK/Examples2011-05-17T11:40:23Z<p>Glehmann: /* Image Processing */</p>
<hr />
<div>These are fully independent, compilable examples. There is significant overlap in the examples, but they are each intended to illustrate a different concept and be fully stand alone compilable.<br />
Please add examples in your areas of expertise!<br />
You can checkout the entire set of examples from this repository: <br />
http://gitorious.org/itkwikiexamples/itkwikiexamples<br />
<pre>git clone git://gitorious.org/itkwikiexamples/itkwikiexamples.git ITKWikiExamples</pre><br />
<br />
==About the Examples==<br />
* [http://www.itk.org/Wiki/images/e/e6/ITK_Examples_Iowa_Meeting_2010_11-8-2010.odp Official announcement]<br />
===ItkVtkGlue===<br />
ITK and VTK are very separate toolkits - ITK for image processing and VTK for data visualization. It is often convenient to use the two together - namely, to display an ITK image on the screen. The ItkVtkGlue kit serves exactly this purpose. Also provided inside ItkVtkGlue is a QuickView class to allow a 2 line display of an ITK image.<br />
<br />
If you download the entire ITK Wiki Examples Collection, the ItkVtkGlue directory will be included and configured. If you wish to just build a few examples, then you will need to [http://gitorious.org/itkwikiexamples/itkwikiexamples/blobs/raw/master/ItkVtkGlue.tar.gz download ItkVtkGlue] and build it.<br />
<br />
===[[ITK/Examples/Instructions/ForUsers|Information for Wiki Examples Users]]===<br />
If you just want to use the Wiki Examples, [[ITK/Examples/Instructions/ForUsers|go here]]. You will learn how to search for examples, build a few examples and build all of the examples.<br />
<br />
===[[ITK/Examples/Instructions/ForDevelopers|Information for Wiki Examples Developers]]===<br />
If you want to contribute examples [[ITK/Examples/Instructions/ForDevelopers|go here]]. You will learn how to add a new example and the guidelines for writing an example.<br />
<br />
===[[ITK/Examples/Instructions/ForAdministrators|Information for Wiki Examples Administrators]]===<br />
If you are a Wiki Example Administrator or want to learn more about the process [[ITK/Examples/Instructions/ForAdministrators|go here]]. You will learn how the Wiki Examples repository is organized, how the repository is synced to the wiki and how to add new topics, tests and regression baselines.<br />
<br />
==Simple Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SimpleOperations/WidthHeight | Get the width and height of an image ]] || || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/VariableLengthVector | Variable length vector ]] || {{ITKDoxygenURL|VariableLengthVector}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TranslationTransform | Translate an image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|ResampleImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/NumericTraits | Get some basic information about a type]] || {{ITKDoxygenURL|NumericTraits}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/ScalarToRGBColormapImageFilter | Apply a color map to an image]] || {{ITKDoxygenURL|ScalarToRGBColormapImageFilter}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TryCatch | Catch an ITK exception]] || || Try/Catch blocks<br />
|-<br />
| [[ITK/Examples/SimpleOperations/BresenhamLine | Get the points on a Bresenham line between two points]] || {{ITKDoxygenURL|BresenhamLine}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/Offset | Add an offset to a pixel index]] || {{ITKDoxygenURL|Offset}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenPoints | Distance between two points]] || {{ITKDoxygenURL|Point}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenIndices | Distance between two indices]] || {{ITKDoxygenURL|Point}}, {{ITKDoxygenURL|Index}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/CreateVector | Create a vector]] || {{ITKDoxygenURL|Vector}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/GetNameOfClass | Get the name/type/class of an object ]] || || GetNameOfClass()<br />
|-<br />
| [[ITK/Examples/Images/Index | An object which holds the index of a pixel ]] || {{ITKDoxygenURL|Index}} || <br />
|-<br />
| [[ITK/Examples/Images/Size | An object which holds the size of an image ]] || {{ITKDoxygenURL|Size}} || <br />
|-<br />
| [[ITK/Examples/Images/ImageRegion | An object which holds the index (start) and size of a region of an image ]] || {{ITKDoxygenURL|ImageRegion}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/Transparency | Make part of an image transparent]] || {{ITKDoxygenURL|RGBAPixel}} || Transparency, RGBA, alpha<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionIntersection | Determine if one region is fully inside another region]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection, IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/PixelInsideRegion | Determine if a pixel is inside of a region]] || {{ITKDoxygenURL|ImageRegion}} || IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionOverlap | Determine the overlap of two regions]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection<br />
|-<br />
| [[ITK/Examples/SimpleOperations/ImageDuplicator | Duplicate an image]] || {{ITKDoxygenURL|ImageDuplicator}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/RandomImageSource | Produce an image of noise]] || {{ITKDoxygenURL|RandomImageSource}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/SetPixels | Set specified pixels to specified values]] || {{ITKDoxygenURL|Image}} ||<br />
|}<br />
<br />
==Mathematical Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Math/CovariantVector | Create a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || This is the object which should be used to represent a mathematical vector.<br />
|-<br />
| [[ITK/Examples/Math/CovariantVectorNorm | Compute the norm of a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || In-place and non-inplace norms.<br />
|-<br />
| [[ITK/Examples/Math/Matrix | Matrix ]] || {{ITKDoxygenURL|Matrix}} || <br />
|-<br />
| [[ITK/Examples/Math/Pi | Mathematical constant pi = 3.14 ]] || {{ITKDoxygenURL|Math}} || <br />
|-<br />
| [[ITK/Examples/Math/DotProduct | Dot product (inner product) of two vectors ]] || {{ITKDoxygenURL|Vector}} || <br />
|}<br />
<br />
==Image Functions==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Functions/GuassianBlurImageFunction | GuassianBlurImageFunction ]] || {{ITKDoxygenURL|GuassianBlurImageFunction}} || <br />
|}<br />
<br />
==Point Set==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/PointSet/CreatePointSet | Create a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/ReadPointSet | Read a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/WritePointSet | Write a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/BoundingBox | Get the bounding box of a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|}<br />
<br />
==Input/Output (IO)==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/IO/ReadVectorImage| Read an image file with an unknown number of components]] || {{ITKDoxygenURL|ImageFileReader}},{{ITKDoxygenURL|VectorImage}} || <br />
|-<br />
| [[ITK/Examples/IO/ImportImageFilter| Convert a C-style array to an itkImage]] || {{ITKDoxygenURL|ImportImageFilter}} || <br />
|-<br />
| [[ITK/Examples/IO/ReadUnknownImageType | Read an image file without knowing its type before hand]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileWriter | Write an image]] || {{ITKDoxygenURL|ImageFileWriter}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileReader | Read an image]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/TIFFImageIO | Write a TIFF image]] || {{ITKDoxygenURL|TIFFImageIO}} || This is a general demonstration of how to use a specific writer rather than relying on the ImageFileWriter to choose for you.<br />
|-<br />
| [[ITK/Examples/IO/ImageToVTKImageFilter | Display an ITK image]] || {{ITKDoxygenURL|ImageToVTKImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/IO/TransformFileWriter | Write a transform to a file]] || {{ITKDoxygenURL|TransformFileWriter}} ||<br />
|-<br />
| [[ITK/Examples/IO/TransformFileReader | Read a transform from a file]] || {{ITKDoxygenURL|TransformFileReader}} ||<br />
|}<br />
<br />
==DICOM==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/DICOM/ResampleDICOM | Resample a DICOM series]] || {{ITKDoxygenURL|GDCMImageIO}} || Resample a DICOM series with user-specified spacing.<br />
|}<br />
<br />
==Image Processing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddConstantToImageFilter| Add a constant to every pixel in an image]] || {{ITKDoxygenURL|AddImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SubtractConstantFromImageFilter| Subtract a constant from every pixel in an image]] || {{ITKDoxygenURL|SubtractImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SquareImageFilter| Square every pixel in an image]] || {{ITKDoxygenURL|SquareImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Upsampling| Upsampling an image]] || {{ITKDoxygenURL|BSplineInterpolateImageFunction}} {{ITKDoxygenURL|ResampleImageFilter}} || Interpolate missing pixels in order to upsample an image. Note this only works on scalar images.<br />
|-<br />
| [[ITK/Examples/Images/FlipImageFilter | Flip an image over specified axes]] || {{ITKDoxygenURL|FlipImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/VectorRescaleIntensityImageFilter | Apply a transformation to the magnitude of vector valued image pixels]] || {{ITKDoxygenURL|VectorRescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Images/NeighborhoodOperatorImageFilter | Apply a kernel to every pixel in an image]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LaplacianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianImageFilter}} || Input image type must be double or float<br />
|-<br />
| [[ITK/Examples/Images/ConstantPadImageFilter | Pad an image with a constant value]] || {{ITKDoxygenURL|ConstantPadImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/IntensityWindowingImageFilter| IntensityWindowingImageFilter]] || {{ITKDoxygenURL|IntensityWindowingImageFilter}} || Apply a linear intensity transform from a specified input range to a specified output range.<br />
|-<br />
| [[ITK/Examples/Images/ShrinkImageFilter | Shrink an image]] || {{ITKDoxygenURL|ShrinkImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/NormalizedCorrelationImageFilter | Normalized correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyByConstantImageFilter | Multiply every pixel in an image by a constant]] || {{ITKDoxygenURL|MultiplyImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SquaredDifferenceImageFilter | Compute the squared difference of corresponding pixels in two images]] || {{ITKDoxygenURL|SquaredDifferenceImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddPixelAccessor | Add a constant to every pixel without duplicating the image in memory (an accessor)]] || {{ITKDoxygenURL|AddPixelAccessor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionalMaximaImageFilter | RegionalMaximaImageFilter]] || {{ITKDoxygenURL|RegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/ValuedRegionalMaximaImageFilter | ValuedRegionalMaximaImageFilter]] || {{ITKDoxygenURL|ValuedRegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaximumImageFilter | Pixel wise compare two input images and set the output pixel to their max]] || {{ITKDoxygenURL|MaximumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumImageFilter | Pixel wise compare two input images and set the output pixel to their min]] || {{ITKDoxygenURL|MinimumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AndImageFilter | Binary AND two images]] || {{ITKDoxygenURL|AndImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/OrImageFilter | Binary OR two images]] || {{ITKDoxygenURL|OrImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/XorImageFilter | Binary XOR (exclusive OR) two images]] || {{ITKDoxygenURL|XorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryNotImageFilter | Invert an image using the Binary Not operation]] || {{ITKDoxygenURL|BinaryNotImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Compose3DCovariantVectorImageFilter | Compose a vector image (with 3 components) from three scalar images]] || {{ITKDoxygenURL|Compose3DCovariantVectorImageFilter}} || Create an RGB image from scalar images. Combine individual channels into a color image.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/NthElementImageAdaptor | Extract a component of an itkImage with pixels with multiple components]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || Use built in functionality to extract a component of an itkImage with CovariantVector components. Note this does not work for itkVectorImages - see VectorIndexSelectionCastImageFilter instead.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ImageAdaptorExtractVectorComponent | Present an image by first performing an operation]] || {{ITKDoxygenURL|ImageAdaptor}} || A demonstration of how to present an image pixel as a function of the pixel. In this example the functionality of NthElementImageAdaptor is demonstrated.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ProcessingNthImageElement | Process the nth component/element of a vector image]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter | Label binary regions in an image and get their properties]] || {{ITKDoxygenURL|BinaryImageToShapeLabelMapFilter}} || Region bounding box, etc.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConvolutionImageFilter | Convolve an image with a kernel]] || {{ITKDoxygenURL|ConvolutionImageFilter}} || Convolution.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RelabelComponentImageFilter | Assign contiguous labels to connected regions of an image]] || {{ITKDoxygenURL|RelabelComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CropImageFilter | Crop an image]] || {{ITKDoxygenURL|CropImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AbsImageFilter | Compute the absolute value of an image]] || {{ITKDoxygenURL|AbsImageFilter}} || magnitude<br />
|-<br />
| [[ITK/Examples/ImageProcessing/InvertIntensityImageFilter | Invert an image]] || {{ITKDoxygenURL|InvertIntensityImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaskImageFilter | Apply a mask to an image]] || {{ITKDoxygenURL|MaskImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SigmoidImageFilter | Pass image pixels through a sigmoid function]] || {{ITKDoxygenURL|SigmoidImageFilter}} || The qualitative description of how Alpha and Beta affect the function from the ITK Software Guide and the associated images would be nice to add to the doxygen.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|ThresholdImageFilter}} || The result is the original image but with the values below (or above) the threshold "clamped" to an output value.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|BinaryThresholdImageFilter}} || The result is a binary image (inside the threshold region or outside the threshold region).<br />
|-<br />
| [[ITK/Examples/ImageProcessing/UnaryFunctorImageFilter | Apply a custom operation to each pixel in an image]] || {{ITKDoxygenURL|UnaryFunctorImageFilter}} || Perform a custom operation on every pixel in an image. This example rotates the vector-valued pixels by 90 degrees.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryFunctorImageFilter | Apply a predefined operation to corresponding pixels in two images]] || {{ITKDoxygenURL|BinaryFunctorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryFunctorImageFilterCustom | Apply a custom operation to corresponding pixels in two images]] || {{ITKDoxygenURL|BinaryFunctorImageFilter}} || This example computes the squared difference between corresponding pixels.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumMaximumImageCalculator | Find the minimum and maximum value (and the position of the value) in an image]] || {{ITKDoxygenURL|MinimumMaximumImageCalculator}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddImageFilter | Add two images together]] || {{ITKDoxygenURL|AddImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/SubtractImageFilter | Subtract two images]] || {{ITKDoxygenURL|SubtractImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PasteImageFilter | Paste a part of one image into another image]] || {{ITKDoxygenURL|PasteImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume | Stack multiple 2D images into a 3D image]] || {{ITKDoxygenURL|TileImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/TileImageFilter_SideBySide | Tile multiple images side by side]] || {{ITKDoxygenURL|TileImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyImageFilter | Multiply two images together]] || {{ITKDoxygenURL|MultiplyImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionOfInterestImageFilter | Extract a portion of an image (region of interest)]] || {{ITKDoxygenURL|RegionOfInterestImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RescaleIntensityImageFilter | Rescale the intensity values of an image to a specified range]] || {{ITKDoxygenURL|RescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConnectedComponentImageFilter | Label connected components in a binary image]] || {{ITKDoxygenURL|ConnectedComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/NormalizeImageFilter | Normalize an image]] || {{ITKDoxygenURL|NormalizeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CastImageFilter | Cast an image from one type to another]] || {{ITKDoxygenURL|CastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PermuteAxesImageFilter | Switch the axes of an image]] || {{ITKDoxygenURL|PermuteAxesImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LinearInterpolateImageFunction | Linearly interpolate a position in an image]] || {{ITKDoxygenURL|LinearInterpolateImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/HammingWindowFunction | HammingWindowFunction]] || {{ITKDoxygenURL|HammingWindowFunction}} ||<br />
|}<br />
<br />
==Vector Images==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImage | Create a vector image]] || {{ITKDoxygenURL|VectorImage}} || An image with an ND vector at each pixel<br />
|-<br />
| [[ITK/Examples/VectorImages/ImageToVectorImageFilter | Create a vector image from a collection of scalar images]] || {{ITKDoxygenURL|ImageToVectorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImageToImageAdaptor | View a component of a vector image as if it were a scalar image]] || {{ITKDoxygenURL|VectorImageToImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorIndexSelectionCastImageFilter | Extract a component of an itkVectorImage]] || {{ITKDoxygenURL|VectorIndexSelectionCastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorResampleImageFilter | Translate a vector image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|VectorResampleImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/JoinImageFilter | Join images, stacking their components]] || {{ITKDoxygenURL|JoinImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/NeighborhoodIterator | NeighborhoodIterator on a VectorImage]] || {{ITKDoxygenURL|VectorImage}} {{ITKDoxygenURL|NeighborhoodIterator}}||<br />
|}<br />
<br />
==Iterating Over (Traversing) An Image==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator_Manual | Iterate over a region of an image with a shaped neighborhood]] || Create the shape manually {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator | Iterate over a region of an image with a shaped neighborhood]] || Create the shape from a StructuringElement {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionExclusionConstIteratorWithIndex | Iterator over an image skipping a specified region]] || {{ITKDoxygenURL|ImageRegionExclusionConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomConstIteratorWithIndex | Randomly select pixels from a region of an image]] || {{ITKDoxygenURL|ImageRandomConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomNonRepeatingConstIteratorWithIndex | Randomly select pixels from a region of an image without replacement]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/LineIterator | Iterate over a line through an image]] || {{ITKDoxygenURL|LineIterator}} || Walks a Bresenham line through an image (with write access)<br />
|-<br />
| [[ITK/Examples/Iterators/LineConstIterator | Iterate over a line through an image without write access]] || {{ITKDoxygenURL|LineConstIterator}} || Walks a Bresenham line through an image (without write access)<br />
|-<br />
| [[ITK/Examples/Iterators/ImageBoundaryFacesCalculator | Iterate over the central region (non-boundary) separately from the face-regions (boundary)]] || {{ITKDoxygenURL|ImageBoundaryFacesCalculator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/NeighborhoodIterator | Iterate over a region of an image with a neighborhood (with write access)]] || {{ITKDoxygenURL|NeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstNeighborhoodIterator | Iterate over a region of an image with a neighborhood (without write access)]] || {{ITKDoxygenURL|ConstNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIterator | Iterate over a region of an image (with write access)]] || {{ITKDoxygenURL|ImageRegionIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIterator | Iterate over a region of an image (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstantBoundaryCondition | Make out of bounds pixels return a constant value]] || {{ITKDoxygenURL|ConstantBoundaryCondition}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (with write access)]] || {{ITKDoxygenURL|ImageRegionIteratorWithIndex}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIteratorWithIndex}} ||<br />
|}<br />
<br />
==Kernels==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Operators/GaussianOperator | Create a Gaussian kernel]] || {{ITKDoxygenURL|GaussianOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/GaussianDerivativeOperator | Create a Gaussian derivative kernel]] || {{ITKDoxygenURL|GaussianDerivativeOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/LaplacianOperator | Create a Laplacian kernel]] || {{ITKDoxygenURL|LaplacianOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/DerivativeOperator | Create a derivative kernel]] || {{ITKDoxygenURL|DerivativeOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/SobelOperator | Create the Sobel kernel]] || {{ITKDoxygenURL|SobelOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/ForwardDifferenceOperator | Create a forward difference kernel]] || {{ITKDoxygenURL|ForwardDifferenceOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/BackwardDifferenceOperator | Create a backward difference kernel]] || {{ITKDoxygenURL|BackwardDifferenceOperator}} || <br />
<br />
|}<br />
<br />
==Image Edges, Gradients, and Derivatives==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/DerivativeImageFilter | Compute the derivative of an image in a particular direction]] || {{ITKDoxygenURL|DerivativeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientRecursiveGaussianImageFilter| Compute the gradient of an image by convolution with the first derivative of a Gaussian]] || {{ITKDoxygenURL|GradientRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeRecursiveGaussianImageFilter | Find the gradient magnitude of the image first smoothed with a Gaussian kernel]] || {{ITKDoxygenURL|GradientMagnitudeRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/RecursiveGaussianImageFilter | Find higher derivatives of an image]] || {{ITKDoxygenURL|RecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryContourImageFilter | Extract the boundaries of connected regions in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} || Blob boundary, border<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryBoundaries | Extract the inner and outer boundaries of blobs in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeImageFilter | Compute the gradient magnitude image]] || {{ITKDoxygenURL|GradientMagnitudeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/LaplacianRecursiveGaussianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianRecursiveGaussianImageFilter}} ||<br />
|}<br />
<br />
==Smoothing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Smoothing/AntiAliasBinaryImageFilter | Anti alias a binary image]] || {{ITKDoxygenURL|AntiAliasBinaryImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/MeanImageFilter | Mean filter an image]] || {{ITKDoxygenURL|MeanImageFilter}} || Replace each pixel by the mean of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/MedianImageFilter | Median filter an image]] || {{ITKDoxygenURL|MedianImageFilter}} || Replace each pixel by the median of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/DiscreteGaussianImageFilter | Smooth an image with a discrete Gaussian filter]] || {{ITKDoxygenURL|DiscreteGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BinomialBlurImageFilter | Blur an image]] || {{ITKDoxygenURL|BinomialBlurImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BilateralImageFilter | Bilateral filter an image]] || {{ITKDoxygenURL|BilateralImageFilter}} || Edge preserving smoothing.<br />
|-<br />
| [[ITK/Examples/Smoothing/CurvatureFlowImageFilter | Smooth an image using curvature flow]] || {{ITKDoxygenURL|CurvatureFlowImageFilterType}} ||<br />
|-<br />
| [[ITK/Examples/Smoothing/SmoothingRecursiveGaussianImageFilter | Gaussian smoothing that works with image adaptors]] || {{ITKDoxygenURL|SmoothingRecursiveGaussianImageFilter}} || <br />
|}<br />
<br />
==Morphology==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Morphology/BinaryErodeImageFilter | Erode a binary image]] || {{ITKDoxygenURL|BinaryErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryDilateImageFilter | Dilate a binary image]] || {{ITKDoxygenURL|BinaryDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleDilateImageFilter | Dilate a grayscale image]] || {{ITKDoxygenURL|GrayscaleDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleErodeImageFilter | Erode a grayscale image]] || {{ITKDoxygenURL|GrayscaleErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/FlatStructuringElement | Erode a binary image using a flat (box) structuring element]] || {{ITKDoxygenURL|FlatStructuringElement}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryBallStructuringElement | An elliptical structuring element]] || {{ITKDoxygenURL|BinaryBallStructuringElement}} || <br />
|}<br />
<br />
==Curves==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Curves/ContourMeanDistanceImageFilter | Compute the mean distance between all points of two curves]] || {{ITKDoxygenURL|ContourMeanDistanceImageFilter}} || <br />
|}<br />
<br />
==Spectral Analysis==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter | Compute the FFT of an image]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/CrossCorrelationInFourierDomain | Compute the cross-correlation of two images in the Fourier domain]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}}{{ITKDoxygenURL|VnlFFTComplexConjugateToRealImageFilter}} || || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/RealAndImaginaryToComplexImageFilter | Convert a real image and an imaginary image to a complex image]] || {{ITKDoxygenURL|RealAndImaginaryToComplexImageFilter}} || <br />
|}<br />
<br />
==Utilities==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Utilities/CreateAnother | Copy a filter]] || {{ITKDoxygenURL|Object}} || Copy/duplicate a filter<br />
|-<br />
| [[ITK/Examples/Utilities/AzimuthElevationToCartesianTransform | Cartesian to AzimuthElevation and vice-versa]] || {{ITKDoxygenURL|AzimuthElevationToCartesianTransform}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/FixedArray | C-style array]] || {{ITKDoxygenURL|FixedArray}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/DeepCopy | Deep copy an image]] || || <br />
|-<br />
| [[ITK/Examples/Utilities/RandomPermutation | Permute a sequence of indices]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Utilities/MersenneTwisterRandomVariateGenerator | Random number generator]] || {{ITKDoxygenURL|MersenneTwisterRandomVariateGenerator}} || <br />
|-<br />
| [[ITK/Examples/Utilities/JetColormapFunctor | Map scalars into a jet colormap]] || {{ITKDoxygenURL|JetColormapFunctor}} || <br />
|-<br />
| [[ITK/Examples/Utilities/SimpleFilterWatcher | Monitor a filter]] || {{ITKDoxygenURL|SimpleFilterWatcher}} || See debug style information.<br />
|-<br />
| [[ITK/Examples/Utilities/TimeProbe | Time probe]] || {{ITKDoxygenURL|TimeProbe}} || Compute the time between points in code.<br />
|-<br />
| [[ITK/Examples/Utilities/ObserveEvent | Observe an event]] || {{ITKDoxygenURL|Command}} || <br />
|-<br />
| [[ITK/Examples/Utilities/VectorContainer | Vector container]] || {{ITKDoxygenURL|VectorContainer}} || <br />
|-<br />
| [[ITK/Examples/Utilities/BoundingBox | Bounding box]] || {{ITKDoxygenURL|BoundingBox}} || <br />
|}<br />
<br />
==Statistics==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Statistics/GaussianDistribution | Create a Gaussian distribution]] || {{ITKDoxygenURL|GaussianDistribution}} || <br />
|-<br />
| [[ITK/Examples/Statistics/SampleToHistogramFilter | Create a histogram from a list of sample measurements]] || {{ITKDoxygenURL|SampleToHistogramFilter}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ListSample | Create a list of sample measurements]] || {{ITKDoxygenURL|ListSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ImageToListSampleAdaptor | Create a list of samples from an image without duplicating the data]] || {{ITKDoxygenURL|ImageToListSampleAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Statistics/MembershipSample | Create a list of samples with associated class IDs]] || {{ITKDoxygenURL|MembershipSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ExpectationMaximizationMixtureModelEstimator_2D | 2D Gaussian Mixture Model Expectation Maximization]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || EM<br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_1D | 1D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_3D | 3D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ScalarImageKmeansImageFilter | Cluster the pixels in a greyscale image]] || {{ITKDoxygenURL|ScalarImageKmeansImageFilter}} || <br />
<br />
|}<br />
<br />
==Spatial Objects==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpatialObjects/SpatialObjectToImageFilter | Convert a spatial object to an image ]] || {{ITKDoxygenURL|SpatialObjectToImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/EllipseSpatialObject | Ellipse ]] || {{ITKDoxygenURL|EllipseSpatialObject}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/LineSpatialObject| Line spatial object]] || {{ITKDoxygenURL|LineSpatialObject}}, {{ITKDoxygenURL|LineSpatialObjectPoint}} || Specify a piecewise-linear object by specifying points along the line.<br />
|-<br />
| [[ITK/Examples/SpatialObjects/PlaneSpatialObject| Plane spatial object]] || {{ITKDoxygenURL|PlaneSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/SpatialObjects/BlobSpatialObject | Blob ]] || {{ITKDoxygenURL|BlobSpatialObject}} ||<br />
|}<br />
<br />
==Inspection==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Inspection/CheckerBoardImageFilter | Combine two images by alternating blocks of a checkerboard pattern]] || {{ITKDoxygenURL|CheckerBoardImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Inspection/PixelInspection | Printing a pixel value to the console]] || [http://www.itk.org/Doxygen/html/classitk_1_1Image.html#ad424c945604f339130b4ffe81b99738eGetPixel GetPixel] ||<br />
|}<br />
<br />
==Image Registration==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethod | A basic global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|TranslationTransform}} || Translation only transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodAffine | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|AffineTransform}} || Full affine transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodBSpline | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|BSplineDeformableTransform}} || BSpline transform.<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformation | Mutual Information ]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|TranslationTransform}} || Global registration by maximizing the mutual information and using a translation only transform<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformationAffine | Mutual Information Affine]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|AffineTransform}} || Global registration by maximizing the mutual information and using an affine transform<br />
|}<br />
<br />
==Image Segmentation==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Segmentation/MeanShiftClustering | Mean shift clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/kMeansClustering | KMeans Clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/MultiphaseChanAndVeseSparseFieldLevelSetSegmentation | Multiphase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseSparseFieldLevelSetSegmentation | Single-phase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseDenseFieldLevelSetSegmentation | Single-phase Chan And Vese Dense Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseDenseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|}<br />
<br />
==Meshes==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Meshes/Decimation | Decimation]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/AddPointsAndEdges | Add points and edges]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/QuadEdgeMeshNormalFilter | Compute normals of a mesh]] || {{ITKDoxygenURL|QuadEdgeMeshNormalFilter}} ||<br />
|-<br />
| [[ITK/Examples/Meshes/QuadEdgeMeshParameterizationFilter | Planar parameterization of a mesh]] || {{ITKDoxygenURL|ParameterizationQuadEdgeMeshFilter}} || Compute linear parameterization of a mesh homeomorphic to a disk on the plane<br />
|}<br />
<br />
==Wish List==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/GaussianMixtureModelComponent | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|GaussianMixtureModelComponent}} ||<br />
|-<br />
| [[ITK/Examples/WishList/LevenbergMarquart| LevenbergMarquart]] || || <br />
|-<br />
| [[ITK/Examples/WishList/IterativeClosestPoints| IterativeClosestPoints]] || || <br />
|-<br />
| [[ITK/Examples/WishList/MedianImageFunction| MedianImageFunction]] || {{ITKDoxygenURL|MedianImageFunction}} || <br />
|-<br />
| [[ITK/Examples/WishList/Operators/AllOperators| Demonstrate all operators]] || {{ITKDoxygenURL|NeighborhoodOperator}} || <br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ColorNormalizedCorrelation| Color Normalized Correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} || <br />
|-<br />
| [[ITK/Examples/WishList/SpatialObjects/ContourSpatialObject| ContourSpatialObject]] || {{ITKDoxygenURL|ContourSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/Broken/SimpleOperations/MetaDataDictionary| Store non-pixel associated data in an image]] || {{ITKDoxygenURL|MetaDataDictionary}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/LevelSets| Level Sets]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation//RegionGrowing| Region Growing]] || || <br />
|-<br />
| [[ITK/Examples/Meshes/Subdivision| Mesh subdivision]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation/OtsuThresholdImageFilter| Separate foreground and background using Otsu's method]] || {{ITKDoxygenURL|OtsuThresholdImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/SimpleContourExtractorImageFilter| Extract contours]] || {{ITKDoxygenURL|SimpleContourExtractorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/RGBToVectorImageAdaptor| Present an image of RGBPixel pixels as an image of vectors]] || {{ITKDoxygenURL|RGBToVectorImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DCirclesImageFilter| HoughTransform2DCirclesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DCirclesImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DLinesImageFilter| HoughTransform2DLinesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DLinesImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Matlab/MatlabToITK| Write data from Matlab in a format readable by ITK]] || || <br />
|-<br />
| [[ITK/Examples/Matlab/ITKToMatlab| Write data from ITK in a format readable by Matlab]] || || <br />
|}<br />
<br />
==Included in the ITK Repository==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Included/Registration| Image registration]] || || <br />
|}<br />
<br />
==Matlab==<br />
{{ITKExamplesTable}}<br />
<br />
|}<br />
<br />
==Developer Examples==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Developer/Exceptions | Throw an exception]] || || <br />
|-<br />
| [[ITK/Examples/Developer/ImageSource | Produce an image programmatically.]] || {{ITKDoxygenURL|ImageSource}} || Nothing in, image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilter | Filter an image]] || {{ITKDoxygenURL|ImageToImageFilter}} || Image in, same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputs | Write a filter with multiple inputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (same type), same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputsDifferentType | Write a filter with multiple inputs of different types.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (different type), image (same type as first input) out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleOutputs | Write a filter with multiple outputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Images in, two images out (same type as first input).<br />
|-<br />
| [[ITK/Examples/Developer/SetGetMacro | Get or set a member variable of an ITK class.]] || || SetMacro, GetMacro<br />
|-<br />
| [[ITK/Examples/Developer/OutputMacros | Output an error, a warning, or debug information.]] || || DebugMacro, ErrorMacro, WarningMacro<br />
|}<br />
<br />
==Problems==<br />
===Small Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/WishList/EdgesAndGradients/SobelEdgeDetectionImageFilter | SobelEdgeDetectionImageFilter]] || {{ITKDoxygenURL|SobelEdgeDetectionImageFilter}} || NeighborIterator error?<br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ScaleTransform | Scale an image]] || {{ITKDoxygenURL|ScaleTransform}} || No matching function call to SetTransform.<br />
|-<br />
| [[ITK/Examples/WishList/Iterators/FloodFillIterator | Traverse a region using a flood fill iterator]] || {{ITKDoxygenURL|FloodFilledSpatialFunctionConditionalIterator}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/ImageProcessing/GradientOfVectorImage | Compute the gradient of a vector image]] || {{ITKDoxygenURL|GradientImageFilter}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_Image | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_1D | Compute distributions of samples using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || Someone please confirm that this outputs the mean and the variance (i.e. I used a standard deviation of 30 to create the samples and the second estimated parameter is near 1000 (~30^2) . Is this correct?)<br />
|-<br />
| [[ITK/Examples/Broken/EdgesAndGradients/CannyEdgeDetectionImageFilter | Find edges in an image]] || {{ITKDoxygenURL|CannyEdgeDetectionImageFilter}} || How to set a reasonable Threshold for the output edges?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ImageToHistogramFilter | Compute the histogram of an image]] || {{ITKDoxygenURL|Statistics_1_1ImageToHistogramFilter}} || The last entry of the red histogram should contain several values, but it is 0?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/KmeansModelEstimator | Classifying pixels using KMeans]] || {{ITKDoxygenURL|KmeansModelEstimator}} || How to apply the labels of the filter to the input image?<br />
|-<br />
| [[ITK/Examples/Broken/Images/RegionGrowImageFilter | Basic region growing]] || {{ITKDoxygenURL|RegionGrowImageFilter}} || Just getting started with demo...<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConnectedThresholdImageFilter | Find connected components in an image]] || {{ITKDoxygenURL|ConnectedThresholdImageFilter}} || Just need to finish it.<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConvertPixelBuffer | Convert an image from one type to another]] || {{ITKDoxygenURL|ConvertPixelBuffer}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/NeighborhoodOperatorImageFunction | Apply a function to every pixel with access to its neighborhood]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/InPlace | In-place filtering of an image]] || {{ITKDoxygenURL|InPlaceImageFilter}} || This only works for filters which derive from itkInPlaceImageFilter<br />
|-<br />
| [[ITK/Examples/Broken/Images/MirrorPadImageFilter | Pad an image]] || {{ITKDoxygenURL|MirrorPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/WrapPadImageFilter | Pad an image by wrapping]] || {{ITKDoxygenURL|WrapPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/VTKImageToImageFilter | Convert a VTK image to an ITK image]] || {{ITKDoxygenURL|VTKImageToImageFilter}} || Seems to expect an input image with only 1 component? (i.e. greyscale)<br />
<br />
|}<br />
<br />
===Big Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Broken/Images/MeanSquaresImageToImageMetric | Find the best position of the moving image in the fixed image.]] || {{ITKDoxygenURL|MeanSquaresImageToImageMetric}} || Output (0,0) is incorrect.<br />
|-<br />
| [[ITK/Examples/Broken/Images/GradientImageFilter | Compute and display the gradient of an image]] || {{ITKDoxygenURL|GradientImageFilter}} || Blank output.<br />
|}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/SubtractImageFilter_Constant&diff=39941ITK/Examples/ImageProcessing/SubtractImageFilter Constant2011-05-17T11:29:34Z<p>Glehmann: /* SubtractConstantFromImageFilter.cxx */</p>
<hr />
<div>==SubtractConstantFromImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkSubtractImageFilter.h"<br />
#include "itkImageFileWriter.h"<br />
<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
static void CreateImage(ImageType::Pointer image);<br />
<br />
int main(int, char *[])<br />
{<br />
ImageType::Pointer image = ImageType::New();<br />
CreateImage(image);<br />
<br />
typedef itk::SubtractImageFilter <ImageType, ImageType, ImageType> SubtractImageFilterType;<br />
SubtractImageFilterType::Pointer subtractConstantFromImageFilter = SubtractImageFilterType::New();<br />
subtractConstantFromImageFilter->SetInput(image);<br />
subtractConstantFromImageFilter->SetConstant2(2);<br />
subtractConstantFromImageFilter->Update();<br />
<br />
typedef itk::ImageFileWriter< ImageType > WriterType;<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetFileName("output.png");<br />
writer->SetInput(subtractConstantFromImageFilter->GetOutput());<br />
writer->Update();<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ImageType::Pointer image)<br />
{<br />
ImageType::IndexType start;<br />
start.Fill(0);<br />
<br />
ImageType::SizeType size;<br />
size.Fill(100);<br />
<br />
ImageType::RegionType region;<br />
region.SetSize(size);<br />
region.SetIndex(start);<br />
<br />
image->SetRegions(region);<br />
image->Allocate();<br />
<br />
itk::ImageRegionIterator<ImageType> imageIterator(image,region);<br />
<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
if(imageIterator.GetIndex()[0] < 70)<br />
{<br />
imageIterator.Set(255);<br />
}<br />
else<br />
{<br />
imageIterator.Set(0);<br />
}<br />
<br />
++imageIterator;<br />
}<br />
<br />
}<br />
<br />
</source><br />
<br />
{{ITKCMakeLists|SubtractImageFilter|}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/MultiplyByConstantImageFilter&diff=39940ITK/Examples/ImageProcessing/MultiplyByConstantImageFilter2011-05-17T11:29:17Z<p>Glehmann: /* MultiplyByConstantImageFilter.cxx */</p>
<hr />
<div>==MultiplyByConstantImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkMultiplyImageFilter.h"<br />
#include "itkImageRegionConstIterator.h"<br />
<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
<br />
void OutputImage(ImageType::Pointer image);<br />
<br />
int main( int argc, char *argv[])<br />
{<br />
<br />
ImageType::Pointer image = ImageType::New();<br />
<br />
itk::Index<2> start;<br />
start.Fill(0);<br />
<br />
itk::Size<2> size;<br />
size.Fill(3);<br />
<br />
itk::ImageRegion<2> region(start, size);<br />
<br />
image->SetRegions(region);<br />
image->Allocate();<br />
image->FillBuffer(2);<br />
<br />
OutputImage(image);<br />
<br />
typedef itk::MultiplyImageFilter<ImageType, ImageType, ImageType> MultiplyByConstantImageFilterType;<br />
MultiplyByConstantImageFilterType::Pointer multiplyByConstantImageFilter = MultiplyByConstantImageFilterType::New();<br />
multiplyByConstantImageFilter->SetInput(image);<br />
multiplyByConstantImageFilter->SetConstant(3);<br />
multiplyByConstantImageFilter->Update();<br />
<br />
OutputImage(multiplyByConstantImageFilter->GetOutput());<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void OutputImage(ImageType::Pointer image)<br />
{<br />
itk::ImageRegionConstIterator<ImageType> imageIterator(image,image->GetLargestPossibleRegion());<br />
<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
// Get the value of the current pixel<br />
unsigned char val = imageIterator.Get();<br />
std::cout << (int)val << std::endl;<br />
<br />
++imageIterator;<br />
}<br />
<br />
}<br />
</source><br />
<br />
{{ITKCMakeLists|MultiplyByConstantImageFilter|vtkHybrid}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/MultiplyByConstantImageFilter&diff=39939ITK/Examples/ImageProcessing/MultiplyByConstantImageFilter2011-05-17T11:28:45Z<p>Glehmann: /* MultiplyByConstantImageFilter.cxx */</p>
<hr />
<div>==MultiplyByConstantImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkMultiplyImageFilter.h"<br />
#include "itkImageRegionConstIterator.h"<br />
<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
<br />
void OutputImage(ImageType::Pointer image);<br />
<br />
int main( int argc, char *argv[])<br />
{<br />
<br />
ImageType::Pointer image = ImageType::New();<br />
<br />
itk::Index<2> start;<br />
start.Fill(0);<br />
<br />
itk::Size<2> size;<br />
size.Fill(3);<br />
<br />
itk::ImageRegion<2> region(start, size);<br />
<br />
image->SetRegions(region);<br />
image->Allocate();<br />
image->FillBuffer(2);<br />
<br />
OutputImage(image);<br />
<br />
typedef itk::MultiplyImageFilter<ImageType, unsigned char, ImageType> MultiplyByConstantImageFilterType;<br />
MultiplyByConstantImageFilterType::Pointer multiplyByConstantImageFilter = MultiplyByConstantImageFilterType::New();<br />
multiplyByConstantImageFilter->SetInput(image);<br />
multiplyByConstantImageFilter->SetConstant(3);<br />
multiplyByConstantImageFilter->Update();<br />
<br />
OutputImage(multiplyByConstantImageFilter->GetOutput());<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void OutputImage(ImageType::Pointer image)<br />
{<br />
itk::ImageRegionConstIterator<ImageType> imageIterator(image,image->GetLargestPossibleRegion());<br />
<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
// Get the value of the current pixel<br />
unsigned char val = imageIterator.Get();<br />
std::cout << (int)val << std::endl;<br />
<br />
++imageIterator;<br />
}<br />
<br />
}<br />
</source><br />
<br />
{{ITKCMakeLists|MultiplyByConstantImageFilter|vtkHybrid}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/SubtractImageFilter_Constant&diff=39938ITK/Examples/ImageProcessing/SubtractImageFilter Constant2011-05-17T11:28:22Z<p>Glehmann: /* SubtractImageFilter.cxx */</p>
<hr />
<div>==SubtractConstantFromImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkSubtractImageFilter.h"<br />
#include "itkImageFileWriter.h"<br />
<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
static void CreateImage(ImageType::Pointer image);<br />
<br />
int main(int, char *[])<br />
{<br />
ImageType::Pointer image = ImageType::New();<br />
CreateImage(image);<br />
<br />
typedef itk::SubtractImageFilter <ImageType, unsigned char, ImageType> SubtractImageFilterType;<br />
SubtractImageFilterType::Pointer subtractConstantFromImageFilter = SubtractImageFilterType::New();<br />
subtractConstantFromImageFilter->SetInput(image);<br />
subtractConstantFromImageFilter->SetConstant2(2);<br />
subtractConstantFromImageFilter->Update();<br />
<br />
typedef itk::ImageFileWriter< ImageType > WriterType;<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetFileName("output.png");<br />
writer->SetInput(subtractConstantFromImageFilter->GetOutput());<br />
writer->Update();<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ImageType::Pointer image)<br />
{<br />
ImageType::IndexType start;<br />
start.Fill(0);<br />
<br />
ImageType::SizeType size;<br />
size.Fill(100);<br />
<br />
ImageType::RegionType region;<br />
region.SetSize(size);<br />
region.SetIndex(start);<br />
<br />
image->SetRegions(region);<br />
image->Allocate();<br />
<br />
itk::ImageRegionIterator<ImageType> imageIterator(image,region);<br />
<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
if(imageIterator.GetIndex()[0] < 70)<br />
{<br />
imageIterator.Set(255);<br />
}<br />
else<br />
{<br />
imageIterator.Set(0);<br />
}<br />
<br />
++imageIterator;<br />
}<br />
<br />
}<br />
<br />
</source><br />
<br />
{{ITKCMakeLists|SubtractImageFilter|}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/AddConstantToImageFilter&diff=39937ITK/Examples/ImageProcessing/AddConstantToImageFilter2011-05-17T11:28:06Z<p>Glehmann: /* AddImageFilter.cxx */</p>
<hr />
<div>==AddConstantToImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkAddImageFilter.h"<br />
#include "itkImageFileWriter.h"<br />
<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
static void CreateImage(ImageType::Pointer image);<br />
<br />
int main(int, char *[])<br />
{<br />
ImageType::Pointer image = ImageType::New();<br />
CreateImage(image);<br />
<br />
typedef itk::AddImageFilter <ImageType, ImageType, ImageType> AddImageFilterType;<br />
AddImageFilterType::Pointer addImageFilter = AddImageFilterType::New();<br />
addImageFilter->SetInput(image);<br />
addImageFilter->SetConstant2(2);<br />
addImageFilter->Update();<br />
<br />
typedef itk::ImageFileWriter< ImageType > WriterType;<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetFileName("output.png");<br />
writer->SetInput(addImageFilter->GetOutput());<br />
writer->Update();<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ImageType::Pointer image)<br />
{<br />
ImageType::IndexType start;<br />
start.Fill(0);<br />
<br />
ImageType::SizeType size;<br />
size.Fill(100);<br />
<br />
ImageType::RegionType region;<br />
region.SetSize(size);<br />
region.SetIndex(start);<br />
<br />
image->SetRegions(region);<br />
image->Allocate();<br />
<br />
itk::ImageRegionIterator<ImageType> imageIterator(image,region);<br />
<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
if(imageIterator.GetIndex()[0] < 70)<br />
{<br />
imageIterator.Set(255);<br />
}<br />
else<br />
{<br />
imageIterator.Set(0);<br />
}<br />
<br />
++imageIterator;<br />
}<br />
<br />
}<br />
<br />
</source><br />
<br />
{{ITKCMakeLists|AddImageFilter|}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/SubtractImageFilter_Constant&diff=39936ITK/Examples/ImageProcessing/SubtractImageFilter Constant2011-05-17T11:27:24Z<p>Glehmann: /* SubtractConstantFromImageFilter.cxx */</p>
<hr />
<div>==SubtractImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkSubtractImageFilter.h"<br />
#include "itkImageFileWriter.h"<br />
<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
static void CreateImage(ImageType::Pointer image);<br />
<br />
int main(int, char *[])<br />
{<br />
ImageType::Pointer image = ImageType::New();<br />
CreateImage(image);<br />
<br />
typedef itk::SubtractImageFilter <ImageType, unsigned char, ImageType> SubtractImageFilterType;<br />
SubtractImageFilterType::Pointer subtractConstantFromImageFilter = SubtractImageFilterType::New();<br />
subtractConstantFromImageFilter->SetInput(image);<br />
subtractConstantFromImageFilter->SetConstant2(2);<br />
subtractConstantFromImageFilter->Update();<br />
<br />
typedef itk::ImageFileWriter< ImageType > WriterType;<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetFileName("output.png");<br />
writer->SetInput(subtractConstantFromImageFilter->GetOutput());<br />
writer->Update();<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ImageType::Pointer image)<br />
{<br />
ImageType::IndexType start;<br />
start.Fill(0);<br />
<br />
ImageType::SizeType size;<br />
size.Fill(100);<br />
<br />
ImageType::RegionType region;<br />
region.SetSize(size);<br />
region.SetIndex(start);<br />
<br />
image->SetRegions(region);<br />
image->Allocate();<br />
<br />
itk::ImageRegionIterator<ImageType> imageIterator(image,region);<br />
<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
if(imageIterator.GetIndex()[0] < 70)<br />
{<br />
imageIterator.Set(255);<br />
}<br />
else<br />
{<br />
imageIterator.Set(0);<br />
}<br />
<br />
++imageIterator;<br />
}<br />
<br />
}<br />
<br />
</source><br />
<br />
{{ITKCMakeLists|SubtractImageFilter|}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/AddConstantToImageFilter&diff=39935ITK/Examples/ImageProcessing/AddConstantToImageFilter2011-05-17T11:26:55Z<p>Glehmann: /* AddImageFilter.cxx */</p>
<hr />
<div>==AddImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkAddImageFilter.h"<br />
#include "itkImageFileWriter.h"<br />
<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
static void CreateImage(ImageType::Pointer image);<br />
<br />
int main(int, char *[])<br />
{<br />
ImageType::Pointer image = ImageType::New();<br />
CreateImage(image);<br />
<br />
typedef itk::AddImageFilter <ImageType, ImageType, ImageType> AddImageFilterType;<br />
AddImageFilterType::Pointer addImageFilter = AddImageFilterType::New();<br />
addImageFilter->SetInput(image);<br />
addImageFilter->SetConstant2(2);<br />
addImageFilter->Update();<br />
<br />
typedef itk::ImageFileWriter< ImageType > WriterType;<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetFileName("output.png");<br />
writer->SetInput(addImageFilter->GetOutput());<br />
writer->Update();<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ImageType::Pointer image)<br />
{<br />
ImageType::IndexType start;<br />
start.Fill(0);<br />
<br />
ImageType::SizeType size;<br />
size.Fill(100);<br />
<br />
ImageType::RegionType region;<br />
region.SetSize(size);<br />
region.SetIndex(start);<br />
<br />
image->SetRegions(region);<br />
image->Allocate();<br />
<br />
itk::ImageRegionIterator<ImageType> imageIterator(image,region);<br />
<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
if(imageIterator.GetIndex()[0] < 70)<br />
{<br />
imageIterator.Set(255);<br />
}<br />
else<br />
{<br />
imageIterator.Set(0);<br />
}<br />
<br />
++imageIterator;<br />
}<br />
<br />
}<br />
<br />
</source><br />
<br />
{{ITKCMakeLists|AddImageFilter|}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/AddConstantToImageFilter&diff=39934ITK/Examples/ImageProcessing/AddConstantToImageFilter2011-05-17T11:24:20Z<p>Glehmann: /* AddConstantToImageFilter.cxx */</p>
<hr />
<div>==AddImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkAddImageFilter.h"<br />
#include "itkImageFileWriter.h"<br />
<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
static void CreateImage(ImageType::Pointer image);<br />
<br />
int main(int, char *[])<br />
{<br />
ImageType::Pointer image = ImageType::New();<br />
CreateImage(image);<br />
<br />
typedef itk::AddImageFilter <ImageType, ImageType, ImageType> AddImageFilterType;<br />
AddImageFilterType::Pointer AddImageFilter = AddImageFilterType::New();<br />
AddImageFilter->SetInput(image);<br />
AddImageFilter->SetConstant2(2);<br />
AddImageFilter->Update();<br />
<br />
typedef itk::ImageFileWriter< ImageType > WriterType;<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetFileName("output.png");<br />
writer->SetInput(AddImageFilter->GetOutput());<br />
writer->Update();<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ImageType::Pointer image)<br />
{<br />
ImageType::IndexType start;<br />
start.Fill(0);<br />
<br />
ImageType::SizeType size;<br />
size.Fill(100);<br />
<br />
ImageType::RegionType region;<br />
region.SetSize(size);<br />
region.SetIndex(start);<br />
<br />
image->SetRegions(region);<br />
image->Allocate();<br />
<br />
itk::ImageRegionIterator<ImageType> imageIterator(image,region);<br />
<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
if(imageIterator.GetIndex()[0] < 70)<br />
{<br />
imageIterator.Set(255);<br />
}<br />
else<br />
{<br />
imageIterator.Set(0);<br />
}<br />
<br />
++imageIterator;<br />
}<br />
<br />
}<br />
<br />
</source><br />
<br />
{{ITKCMakeLists|AddImageFilter|}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples&diff=39933ITK/Examples2011-05-17T11:20:49Z<p>Glehmann: /* Image Processing */</p>
<hr />
<div>These are fully independent, compilable examples. There is significant overlap in the examples, but they are each intended to illustrate a different concept and be fully stand alone compilable.<br />
Please add examples in your areas of expertise!<br />
You can checkout the entire set of examples from this repository: <br />
http://gitorious.org/itkwikiexamples/itkwikiexamples<br />
<pre>git clone git://gitorious.org/itkwikiexamples/itkwikiexamples.git ITKWikiExamples</pre><br />
<br />
==About the Examples==<br />
* [http://www.itk.org/Wiki/images/e/e6/ITK_Examples_Iowa_Meeting_2010_11-8-2010.odp Official announcement]<br />
===ItkVtkGlue===<br />
ITK and VTK are very separate toolkits - ITK for image processing and VTK for data visualization. It is often convenient to use the two together - namely, to display an ITK image on the screen. The ItkVtkGlue kit serves exactly this purpose. Also provided inside ItkVtkGlue is a QuickView class to allow a 2 line display of an ITK image.<br />
<br />
If you download the entire ITK Wiki Examples Collection, the ItkVtkGlue directory will be included and configured. If you wish to just build a few examples, then you will need to [http://gitorious.org/itkwikiexamples/itkwikiexamples/blobs/raw/master/ItkVtkGlue.tar.gz download ItkVtkGlue] and build it.<br />
<br />
===[[ITK/Examples/Instructions/ForUsers|Information for Wiki Examples Users]]===<br />
If you just want to use the Wiki Examples, [[ITK/Examples/Instructions/ForUsers|go here]]. You will learn how to search for examples, build a few examples and build all of the examples.<br />
<br />
===[[ITK/Examples/Instructions/ForDevelopers|Information for Wiki Examples Developers]]===<br />
If you want to contribute examples [[ITK/Examples/Instructions/ForDevelopers|go here]]. You will learn how to add a new example and the guidelines for writing an example.<br />
<br />
===[[ITK/Examples/Instructions/ForAdministrators|Information for Wiki Examples Administrators]]===<br />
If you are a Wiki Example Administrator or want to learn more about the process [[ITK/Examples/Instructions/ForAdministrators|go here]]. You will learn how the Wiki Examples repository is organized, how the repository is synced to the wiki and how to add new topics, tests and regression baselines.<br />
<br />
==Simple Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SimpleOperations/WidthHeight | Get the width and height of an image ]] || || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/VariableLengthVector | Variable length vector ]] || {{ITKDoxygenURL|VariableLengthVector}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TranslationTransform | Translate an image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|ResampleImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/NumericTraits | Get some basic information about a type]] || {{ITKDoxygenURL|NumericTraits}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/ScalarToRGBColormapImageFilter | Apply a color map to an image]] || {{ITKDoxygenURL|ScalarToRGBColormapImageFilter}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TryCatch | Catch an ITK exception]] || || Try/Catch blocks<br />
|-<br />
| [[ITK/Examples/SimpleOperations/BresenhamLine | Get the points on a Bresenham line between two points]] || {{ITKDoxygenURL|BresenhamLine}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/Offset | Add an offset to a pixel index]] || {{ITKDoxygenURL|Offset}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenPoints | Distance between two points]] || {{ITKDoxygenURL|Point}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenIndices | Distance between two indices]] || {{ITKDoxygenURL|Point}}, {{ITKDoxygenURL|Index}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/CreateVector | Create a vector]] || {{ITKDoxygenURL|Vector}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/GetNameOfClass | Get the name/type/class of an object ]] || || GetNameOfClass()<br />
|-<br />
| [[ITK/Examples/Images/Index | An object which holds the index of a pixel ]] || {{ITKDoxygenURL|Index}} || <br />
|-<br />
| [[ITK/Examples/Images/Size | An object which holds the size of an image ]] || {{ITKDoxygenURL|Size}} || <br />
|-<br />
| [[ITK/Examples/Images/ImageRegion | An object which holds the index (start) and size of a region of an image ]] || {{ITKDoxygenURL|ImageRegion}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/Transparency | Make part of an image transparent]] || {{ITKDoxygenURL|RGBAPixel}} || Transparency, RGBA, alpha<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionIntersection | Determine if one region is fully inside another region]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection, IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/PixelInsideRegion | Determine if a pixel is inside of a region]] || {{ITKDoxygenURL|ImageRegion}} || IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionOverlap | Determine the overlap of two regions]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection<br />
|-<br />
| [[ITK/Examples/SimpleOperations/ImageDuplicator | Duplicate an image]] || {{ITKDoxygenURL|ImageDuplicator}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/RandomImageSource | Produce an image of noise]] || {{ITKDoxygenURL|RandomImageSource}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/SetPixels | Set specified pixels to specified values]] || {{ITKDoxygenURL|Image}} ||<br />
|}<br />
<br />
==Mathematical Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Math/CovariantVector | Create a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || This is the object which should be used to represent a mathematical vector.<br />
|-<br />
| [[ITK/Examples/Math/CovariantVectorNorm | Compute the norm of a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || In-place and non-inplace norms.<br />
|-<br />
| [[ITK/Examples/Math/Matrix | Matrix ]] || {{ITKDoxygenURL|Matrix}} || <br />
|-<br />
| [[ITK/Examples/Math/Pi | Mathematical constant pi = 3.14 ]] || {{ITKDoxygenURL|Math}} || <br />
|-<br />
| [[ITK/Examples/Math/DotProduct | Dot product (inner product) of two vectors ]] || {{ITKDoxygenURL|Vector}} || <br />
|}<br />
<br />
==Image Functions==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Functions/GuassianBlurImageFunction | GuassianBlurImageFunction ]] || {{ITKDoxygenURL|GuassianBlurImageFunction}} || <br />
|}<br />
<br />
==Point Set==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/PointSet/CreatePointSet | Create a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/ReadPointSet | Read a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/WritePointSet | Write a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/BoundingBox | Get the bounding box of a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|}<br />
<br />
==Input/Output (IO)==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/IO/ReadVectorImage| Read an image file with an unknown number of components]] || {{ITKDoxygenURL|ImageFileReader}},{{ITKDoxygenURL|VectorImage}} || <br />
|-<br />
| [[ITK/Examples/IO/ImportImageFilter| Convert a C-style array to an itkImage]] || {{ITKDoxygenURL|ImportImageFilter}} || <br />
|-<br />
| [[ITK/Examples/IO/ReadUnknownImageType | Read an image file without knowing its type before hand]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileWriter | Write an image]] || {{ITKDoxygenURL|ImageFileWriter}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileReader | Read an image]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/TIFFImageIO | Write a TIFF image]] || {{ITKDoxygenURL|TIFFImageIO}} || This is a general demonstration of how to use a specific writer rather than relying on the ImageFileWriter to choose for you.<br />
|-<br />
| [[ITK/Examples/IO/ImageToVTKImageFilter | Display an ITK image]] || {{ITKDoxygenURL|ImageToVTKImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/IO/TransformFileWriter | Write a transform to a file]] || {{ITKDoxygenURL|TransformFileWriter}} ||<br />
|-<br />
| [[ITK/Examples/IO/TransformFileReader | Read a transform from a file]] || {{ITKDoxygenURL|TransformFileReader}} ||<br />
|}<br />
<br />
==DICOM==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/DICOM/ResampleDICOM | Resample a DICOM series]] || {{ITKDoxygenURL|GDCMImageIO}} || Resample a DICOM series with user-specified spacing.<br />
|}<br />
<br />
==Image Processing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddConstantToImageFilter| Add a constant to every pixel in an image]] || {{ITKDoxygenURL|AddImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SubtractConstantFromImageFilter| Subtract a constant from every pixel in an image]] || {{ITKDoxygenURL|SubtractImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SquareImageFilter| Square every pixel in an image]] || {{ITKDoxygenURL|SquareImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Upsampling| Upsampling an image]] || {{ITKDoxygenURL|BSplineInterpolateImageFunction}} {{ITKDoxygenURL|ResampleImageFilter}} || Interpolate missing pixels in order to upsample an image. Note this only works on scalar images.<br />
|-<br />
| [[ITK/Examples/Images/FlipImageFilter | Flip an image over specified axes]] || {{ITKDoxygenURL|FlipImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/VectorRescaleIntensityImageFilter | Apply a transformation to the magnitude of vector valued image pixels]] || {{ITKDoxygenURL|VectorRescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Images/NeighborhoodOperatorImageFilter | Apply a kernel to every pixel in an image]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LaplacianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianImageFilter}} || Input image type must be double or float<br />
|-<br />
| [[ITK/Examples/Images/ConstantPadImageFilter | Pad an image with a constant value]] || {{ITKDoxygenURL|ConstantPadImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/IntensityWindowingImageFilter| IntensityWindowingImageFilter]] || {{ITKDoxygenURL|IntensityWindowingImageFilter}} || Apply a linear intensity transform from a specified input range to a specified output range.<br />
|-<br />
| [[ITK/Examples/Images/ShrinkImageFilter | Shrink an image]] || {{ITKDoxygenURL|ShrinkImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/NormalizedCorrelationImageFilter | Normalized correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyByConstantImageFilter | Multiply every pixel in an image by a constant]] || {{ITKDoxygenURL|MultiplyImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SquaredDifferenceImageFilter | Compute the squared difference of corresponding pixels in two images]] || {{ITKDoxygenURL|SquaredDifferenceImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddPixelAccessor | Add a constant to every pixel without duplicating the image in memory (an accessor)]] || {{ITKDoxygenURL|AddPixelAccessor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionalMaximaImageFilter | RegionalMaximaImageFilter]] || {{ITKDoxygenURL|RegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/ValuedRegionalMaximaImageFilter | ValuedRegionalMaximaImageFilter]] || {{ITKDoxygenURL|ValuedRegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaximumImageFilter | Pixel wise compare two input images and set the output pixel to their max]] || {{ITKDoxygenURL|MaximumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumImageFilter | Pixel wise compare two input images and set the output pixel to their min]] || {{ITKDoxygenURL|MinimumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AndImageFilter | Binary AND two images]] || {{ITKDoxygenURL|AndImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/OrImageFilter | Binary OR two images]] || {{ITKDoxygenURL|OrImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/XorImageFilter | Binary XOR (exclusive OR) two images]] || {{ITKDoxygenURL|XorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryNotImageFilter | Invert an image using the Binary Not operation]] || {{ITKDoxygenURL|BinaryNotImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Compose3DCovariantVectorImageFilter | Compose a vector image (with 3 components) from three scalar images]] || {{ITKDoxygenURL|Compose3DCovariantVectorImageFilter}} || Create an RGB image from scalar images. Combine individual channels into a color image.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/NthElementImageAdaptor | Extract a component of an itkImage with pixels with multiple components]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || Use built in functionality to extract a component of an itkImage with CovariantVector components. Note this does not work for itkVectorImages - see VectorIndexSelectionCastImageFilter instead.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ImageAdaptorExtractVectorComponent | Present an image by first performing an operation]] || {{ITKDoxygenURL|ImageAdaptor}} || A demonstration of how to present an image pixel as a function of the pixel. In this example the functionality of NthElementImageAdaptor is demonstrated.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ProcessingNthImageElement | Process the nth component/element of a vector image]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter | Label binary regions in an image and get their properties]] || {{ITKDoxygenURL|BinaryImageToShapeLabelMapFilter}} || Region bounding box, etc.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConvolutionImageFilter | Convolve an image with a kernel]] || {{ITKDoxygenURL|ConvolutionImageFilter}} || Convolution.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RelabelComponentImageFilter | Assign contiguous labels to connected regions of an image]] || {{ITKDoxygenURL|RelabelComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CropImageFilter | Crop an image]] || {{ITKDoxygenURL|CropImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AbsImageFilter | Compute the absolute value of an image]] || {{ITKDoxygenURL|AbsImageFilter}} || magnitude<br />
|-<br />
| [[ITK/Examples/ImageProcessing/InvertIntensityImageFilter | Invert an image]] || {{ITKDoxygenURL|InvertIntensityImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaskImageFilter | Apply a mask to an image]] || {{ITKDoxygenURL|MaskImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SigmoidImageFilter | Pass image pixels through a sigmoid function]] || {{ITKDoxygenURL|SigmoidImageFilter}} || The qualitative description of how Alpha and Beta affect the function from the ITK Software Guide and the associated images would be nice to add to the doxygen.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|ThresholdImageFilter}} || The result is the original image but with the values below (or above) the threshold "clamped" to an output value.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|BinaryThresholdImageFilter}} || The result is a binary image (inside the threshold region or outside the threshold region).<br />
|-<br />
| [[ITK/Examples/ImageProcessing/UnaryFunctorImageFilter | Apply a custom operation to each pixel in an image]] || {{ITKDoxygenURL|UnaryFunctorImageFilter}} || Perform a custom operation on every pixel in an image. This example rotates the vector-valued pixels by 90 degrees.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryFunctorImageFilter | Apply a predefined operation to corresponding pixels in two images]] || {{ITKDoxygenURL|BinaryFunctorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryFunctorImageFilter | Apply a custom operation to corresponding pixels in two images]] || {{ITKDoxygenURL|BinaryFunctorImageFilter}} || This example computes the squared difference between corresponding pixels.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumMaximumImageCalculator | Find the minimum and maximum value (and the position of the value) in an image]] || {{ITKDoxygenURL|MinimumMaximumImageCalculator}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddImageFilter | Add two images together]] || {{ITKDoxygenURL|AddImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/SubtractImageFilter | Subtract two images]] || {{ITKDoxygenURL|SubtractImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PasteImageFilter | Paste a part of one image into another image]] || {{ITKDoxygenURL|PasteImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume | Stack multiple 2D images into a 3D image]] || {{ITKDoxygenURL|TileImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/TileImageFilter_SideBySide | Tile multiple images side by side]] || {{ITKDoxygenURL|TileImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyImageFilter | Multiply two images together]] || {{ITKDoxygenURL|MultiplyImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionOfInterestImageFilter | Extract a portion of an image (region of interest)]] || {{ITKDoxygenURL|RegionOfInterestImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RescaleIntensityImageFilter | Rescale the intensity values of an image to a specified range]] || {{ITKDoxygenURL|RescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConnectedComponentImageFilter | Label connected components in a binary image]] || {{ITKDoxygenURL|ConnectedComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/NormalizeImageFilter | Normalize an image]] || {{ITKDoxygenURL|NormalizeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CastImageFilter | Cast an image from one type to another]] || {{ITKDoxygenURL|CastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PermuteAxesImageFilter | Switch the axes of an image]] || {{ITKDoxygenURL|PermuteAxesImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LinearInterpolateImageFunction | Linearly interpolate a position in an image]] || {{ITKDoxygenURL|LinearInterpolateImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/HammingWindowFunction | HammingWindowFunction]] || {{ITKDoxygenURL|HammingWindowFunction}} ||<br />
|}<br />
<br />
==Vector Images==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImage | Create a vector image]] || {{ITKDoxygenURL|VectorImage}} || An image with an ND vector at each pixel<br />
|-<br />
| [[ITK/Examples/VectorImages/ImageToVectorImageFilter | Create a vector image from a collection of scalar images]] || {{ITKDoxygenURL|ImageToVectorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImageToImageAdaptor | View a component of a vector image as if it were a scalar image]] || {{ITKDoxygenURL|VectorImageToImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorIndexSelectionCastImageFilter | Extract a component of an itkVectorImage]] || {{ITKDoxygenURL|VectorIndexSelectionCastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorResampleImageFilter | Translate a vector image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|VectorResampleImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/JoinImageFilter | Join images, stacking their components]] || {{ITKDoxygenURL|JoinImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/NeighborhoodIterator | NeighborhoodIterator on a VectorImage]] || {{ITKDoxygenURL|VectorImage}} {{ITKDoxygenURL|NeighborhoodIterator}}||<br />
|}<br />
<br />
==Iterating Over (Traversing) An Image==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator_Manual | Iterate over a region of an image with a shaped neighborhood]] || Create the shape manually {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator | Iterate over a region of an image with a shaped neighborhood]] || Create the shape from a StructuringElement {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionExclusionConstIteratorWithIndex | Iterator over an image skipping a specified region]] || {{ITKDoxygenURL|ImageRegionExclusionConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomConstIteratorWithIndex | Randomly select pixels from a region of an image]] || {{ITKDoxygenURL|ImageRandomConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomNonRepeatingConstIteratorWithIndex | Randomly select pixels from a region of an image without replacement]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/LineIterator | Iterate over a line through an image]] || {{ITKDoxygenURL|LineIterator}} || Walks a Bresenham line through an image (with write access)<br />
|-<br />
| [[ITK/Examples/Iterators/LineConstIterator | Iterate over a line through an image without write access]] || {{ITKDoxygenURL|LineConstIterator}} || Walks a Bresenham line through an image (without write access)<br />
|-<br />
| [[ITK/Examples/Iterators/ImageBoundaryFacesCalculator | Iterate over the central region (non-boundary) separately from the face-regions (boundary)]] || {{ITKDoxygenURL|ImageBoundaryFacesCalculator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/NeighborhoodIterator | Iterate over a region of an image with a neighborhood (with write access)]] || {{ITKDoxygenURL|NeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstNeighborhoodIterator | Iterate over a region of an image with a neighborhood (without write access)]] || {{ITKDoxygenURL|ConstNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIterator | Iterate over a region of an image (with write access)]] || {{ITKDoxygenURL|ImageRegionIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIterator | Iterate over a region of an image (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstantBoundaryCondition | Make out of bounds pixels return a constant value]] || {{ITKDoxygenURL|ConstantBoundaryCondition}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (with write access)]] || {{ITKDoxygenURL|ImageRegionIteratorWithIndex}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIteratorWithIndex}} ||<br />
|}<br />
<br />
==Kernels==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Operators/GaussianOperator | Create a Gaussian kernel]] || {{ITKDoxygenURL|GaussianOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/GaussianDerivativeOperator | Create a Gaussian derivative kernel]] || {{ITKDoxygenURL|GaussianDerivativeOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/LaplacianOperator | Create a Laplacian kernel]] || {{ITKDoxygenURL|LaplacianOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/DerivativeOperator | Create a derivative kernel]] || {{ITKDoxygenURL|DerivativeOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/SobelOperator | Create the Sobel kernel]] || {{ITKDoxygenURL|SobelOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/ForwardDifferenceOperator | Create a forward difference kernel]] || {{ITKDoxygenURL|ForwardDifferenceOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/BackwardDifferenceOperator | Create a backward difference kernel]] || {{ITKDoxygenURL|BackwardDifferenceOperator}} || <br />
<br />
|}<br />
<br />
==Image Edges, Gradients, and Derivatives==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/DerivativeImageFilter | Compute the derivative of an image in a particular direction]] || {{ITKDoxygenURL|DerivativeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientRecursiveGaussianImageFilter| Compute the gradient of an image by convolution with the first derivative of a Gaussian]] || {{ITKDoxygenURL|GradientRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeRecursiveGaussianImageFilter | Find the gradient magnitude of the image first smoothed with a Gaussian kernel]] || {{ITKDoxygenURL|GradientMagnitudeRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/RecursiveGaussianImageFilter | Find higher derivatives of an image]] || {{ITKDoxygenURL|RecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryContourImageFilter | Extract the boundaries of connected regions in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} || Blob boundary, border<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryBoundaries | Extract the inner and outer boundaries of blobs in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeImageFilter | Compute the gradient magnitude image]] || {{ITKDoxygenURL|GradientMagnitudeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/LaplacianRecursiveGaussianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianRecursiveGaussianImageFilter}} ||<br />
|}<br />
<br />
==Smoothing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Smoothing/AntiAliasBinaryImageFilter | Anti alias a binary image]] || {{ITKDoxygenURL|AntiAliasBinaryImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/MeanImageFilter | Mean filter an image]] || {{ITKDoxygenURL|MeanImageFilter}} || Replace each pixel by the mean of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/MedianImageFilter | Median filter an image]] || {{ITKDoxygenURL|MedianImageFilter}} || Replace each pixel by the median of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/DiscreteGaussianImageFilter | Smooth an image with a discrete Gaussian filter]] || {{ITKDoxygenURL|DiscreteGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BinomialBlurImageFilter | Blur an image]] || {{ITKDoxygenURL|BinomialBlurImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BilateralImageFilter | Bilateral filter an image]] || {{ITKDoxygenURL|BilateralImageFilter}} || Edge preserving smoothing.<br />
|-<br />
| [[ITK/Examples/Smoothing/CurvatureFlowImageFilter | Smooth an image using curvature flow]] || {{ITKDoxygenURL|CurvatureFlowImageFilterType}} ||<br />
|-<br />
| [[ITK/Examples/Smoothing/SmoothingRecursiveGaussianImageFilter | Gaussian smoothing that works with image adaptors]] || {{ITKDoxygenURL|SmoothingRecursiveGaussianImageFilter}} || <br />
|}<br />
<br />
==Morphology==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Morphology/BinaryErodeImageFilter | Erode a binary image]] || {{ITKDoxygenURL|BinaryErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryDilateImageFilter | Dilate a binary image]] || {{ITKDoxygenURL|BinaryDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleDilateImageFilter | Dilate a grayscale image]] || {{ITKDoxygenURL|GrayscaleDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleErodeImageFilter | Erode a grayscale image]] || {{ITKDoxygenURL|GrayscaleErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/FlatStructuringElement | Erode a binary image using a flat (box) structuring element]] || {{ITKDoxygenURL|FlatStructuringElement}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryBallStructuringElement | An elliptical structuring element]] || {{ITKDoxygenURL|BinaryBallStructuringElement}} || <br />
|}<br />
<br />
==Curves==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Curves/ContourMeanDistanceImageFilter | Compute the mean distance between all points of two curves]] || {{ITKDoxygenURL|ContourMeanDistanceImageFilter}} || <br />
|}<br />
<br />
==Spectral Analysis==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter | Compute the FFT of an image]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/CrossCorrelationInFourierDomain | Compute the cross-correlation of two images in the Fourier domain]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}}{{ITKDoxygenURL|VnlFFTComplexConjugateToRealImageFilter}} || || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/RealAndImaginaryToComplexImageFilter | Convert a real image and an imaginary image to a complex image]] || {{ITKDoxygenURL|RealAndImaginaryToComplexImageFilter}} || <br />
|}<br />
<br />
==Utilities==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Utilities/CreateAnother | Copy a filter]] || {{ITKDoxygenURL|Object}} || Copy/duplicate a filter<br />
|-<br />
| [[ITK/Examples/Utilities/AzimuthElevationToCartesianTransform | Cartesian to AzimuthElevation and vice-versa]] || {{ITKDoxygenURL|AzimuthElevationToCartesianTransform}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/FixedArray | C-style array]] || {{ITKDoxygenURL|FixedArray}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/DeepCopy | Deep copy an image]] || || <br />
|-<br />
| [[ITK/Examples/Utilities/RandomPermutation | Permute a sequence of indices]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Utilities/MersenneTwisterRandomVariateGenerator | Random number generator]] || {{ITKDoxygenURL|MersenneTwisterRandomVariateGenerator}} || <br />
|-<br />
| [[ITK/Examples/Utilities/JetColormapFunctor | Map scalars into a jet colormap]] || {{ITKDoxygenURL|JetColormapFunctor}} || <br />
|-<br />
| [[ITK/Examples/Utilities/SimpleFilterWatcher | Monitor a filter]] || {{ITKDoxygenURL|SimpleFilterWatcher}} || See debug style information.<br />
|-<br />
| [[ITK/Examples/Utilities/TimeProbe | Time probe]] || {{ITKDoxygenURL|TimeProbe}} || Compute the time between points in code.<br />
|-<br />
| [[ITK/Examples/Utilities/ObserveEvent | Observe an event]] || {{ITKDoxygenURL|Command}} || <br />
|-<br />
| [[ITK/Examples/Utilities/VectorContainer | Vector container]] || {{ITKDoxygenURL|VectorContainer}} || <br />
|-<br />
| [[ITK/Examples/Utilities/BoundingBox | Bounding box]] || {{ITKDoxygenURL|BoundingBox}} || <br />
|}<br />
<br />
==Statistics==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Statistics/GaussianDistribution | Create a Gaussian distribution]] || {{ITKDoxygenURL|GaussianDistribution}} || <br />
|-<br />
| [[ITK/Examples/Statistics/SampleToHistogramFilter | Create a histogram from a list of sample measurements]] || {{ITKDoxygenURL|SampleToHistogramFilter}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ListSample | Create a list of sample measurements]] || {{ITKDoxygenURL|ListSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ImageToListSampleAdaptor | Create a list of samples from an image without duplicating the data]] || {{ITKDoxygenURL|ImageToListSampleAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Statistics/MembershipSample | Create a list of samples with associated class IDs]] || {{ITKDoxygenURL|MembershipSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ExpectationMaximizationMixtureModelEstimator_2D | 2D Gaussian Mixture Model Expectation Maximization]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || EM<br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_1D | 1D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_3D | 3D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ScalarImageKmeansImageFilter | Cluster the pixels in a greyscale image]] || {{ITKDoxygenURL|ScalarImageKmeansImageFilter}} || <br />
<br />
|}<br />
<br />
==Spatial Objects==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpatialObjects/SpatialObjectToImageFilter | Convert a spatial object to an image ]] || {{ITKDoxygenURL|SpatialObjectToImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/EllipseSpatialObject | Ellipse ]] || {{ITKDoxygenURL|EllipseSpatialObject}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/LineSpatialObject| Line spatial object]] || {{ITKDoxygenURL|LineSpatialObject}}, {{ITKDoxygenURL|LineSpatialObjectPoint}} || Specify a piecewise-linear object by specifying points along the line.<br />
|-<br />
| [[ITK/Examples/SpatialObjects/PlaneSpatialObject| Plane spatial object]] || {{ITKDoxygenURL|PlaneSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/SpatialObjects/BlobSpatialObject | Blob ]] || {{ITKDoxygenURL|BlobSpatialObject}} ||<br />
|}<br />
<br />
==Inspection==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Inspection/CheckerBoardImageFilter | Combine two images by alternating blocks of a checkerboard pattern]] || {{ITKDoxygenURL|CheckerBoardImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Inspection/PixelInspection | Printing a pixel value to the console]] || [http://www.itk.org/Doxygen/html/classitk_1_1Image.html#ad424c945604f339130b4ffe81b99738eGetPixel GetPixel] ||<br />
|}<br />
<br />
==Image Registration==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethod | A basic global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|TranslationTransform}} || Translation only transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodAffine | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|AffineTransform}} || Full affine transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodBSpline | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|BSplineDeformableTransform}} || BSpline transform.<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformation | Mutual Information ]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|TranslationTransform}} || Global registration by maximizing the mutual information and using a translation only transform<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformationAffine | Mutual Information Affine]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|AffineTransform}} || Global registration by maximizing the mutual information and using an affine transform<br />
|}<br />
<br />
==Image Segmentation==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Segmentation/MeanShiftClustering | Mean shift clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/kMeansClustering | KMeans Clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/MultiphaseChanAndVeseSparseFieldLevelSetSegmentation | Multiphase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseSparseFieldLevelSetSegmentation | Single-phase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseDenseFieldLevelSetSegmentation | Single-phase Chan And Vese Dense Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseDenseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|}<br />
<br />
==Meshes==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Meshes/Decimation | Decimation]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/AddPointsAndEdges | Add points and edges]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/QuadEdgeMeshNormalFilter | Compute normals of a mesh]] || {{ITKDoxygenURL|QuadEdgeMeshNormalFilter}} ||<br />
|-<br />
| [[ITK/Examples/Meshes/QuadEdgeMeshParameterizationFilter | Planar parameterization of a mesh]] || {{ITKDoxygenURL|ParameterizationQuadEdgeMeshFilter}} || Compute linear parameterization of a mesh homeomorphic to a disk on the plane<br />
|}<br />
<br />
==Wish List==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/GaussianMixtureModelComponent | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|GaussianMixtureModelComponent}} ||<br />
|-<br />
| [[ITK/Examples/WishList/LevenbergMarquart| LevenbergMarquart]] || || <br />
|-<br />
| [[ITK/Examples/WishList/IterativeClosestPoints| IterativeClosestPoints]] || || <br />
|-<br />
| [[ITK/Examples/WishList/MedianImageFunction| MedianImageFunction]] || {{ITKDoxygenURL|MedianImageFunction}} || <br />
|-<br />
| [[ITK/Examples/WishList/Operators/AllOperators| Demonstrate all operators]] || {{ITKDoxygenURL|NeighborhoodOperator}} || <br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ColorNormalizedCorrelation| Color Normalized Correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} || <br />
|-<br />
| [[ITK/Examples/WishList/SpatialObjects/ContourSpatialObject| ContourSpatialObject]] || {{ITKDoxygenURL|ContourSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/Broken/SimpleOperations/MetaDataDictionary| Store non-pixel associated data in an image]] || {{ITKDoxygenURL|MetaDataDictionary}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/LevelSets| Level Sets]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation//RegionGrowing| Region Growing]] || || <br />
|-<br />
| [[ITK/Examples/Meshes/Subdivision| Mesh subdivision]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation/OtsuThresholdImageFilter| Separate foreground and background using Otsu's method]] || {{ITKDoxygenURL|OtsuThresholdImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/SimpleContourExtractorImageFilter| Extract contours]] || {{ITKDoxygenURL|SimpleContourExtractorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/RGBToVectorImageAdaptor| Present an image of RGBPixel pixels as an image of vectors]] || {{ITKDoxygenURL|RGBToVectorImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DCirclesImageFilter| HoughTransform2DCirclesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DCirclesImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DLinesImageFilter| HoughTransform2DLinesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DLinesImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Matlab/MatlabToITK| Write data from Matlab in a format readable by ITK]] || || <br />
|-<br />
| [[ITK/Examples/Matlab/ITKToMatlab| Write data from ITK in a format readable by Matlab]] || || <br />
|}<br />
<br />
==Included in the ITK Repository==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Included/Registration| Image registration]] || || <br />
|}<br />
<br />
==Matlab==<br />
{{ITKExamplesTable}}<br />
<br />
|}<br />
<br />
==Developer Examples==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Developer/Exceptions | Throw an exception]] || || <br />
|-<br />
| [[ITK/Examples/Developer/ImageSource | Produce an image programmatically.]] || {{ITKDoxygenURL|ImageSource}} || Nothing in, image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilter | Filter an image]] || {{ITKDoxygenURL|ImageToImageFilter}} || Image in, same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputs | Write a filter with multiple inputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (same type), same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputsDifferentType | Write a filter with multiple inputs of different types.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (different type), image (same type as first input) out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleOutputs | Write a filter with multiple outputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Images in, two images out (same type as first input).<br />
|-<br />
| [[ITK/Examples/Developer/SetGetMacro | Get or set a member variable of an ITK class.]] || || SetMacro, GetMacro<br />
|-<br />
| [[ITK/Examples/Developer/OutputMacros | Output an error, a warning, or debug information.]] || || DebugMacro, ErrorMacro, WarningMacro<br />
|}<br />
<br />
==Problems==<br />
===Small Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/WishList/EdgesAndGradients/SobelEdgeDetectionImageFilter | SobelEdgeDetectionImageFilter]] || {{ITKDoxygenURL|SobelEdgeDetectionImageFilter}} || NeighborIterator error?<br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ScaleTransform | Scale an image]] || {{ITKDoxygenURL|ScaleTransform}} || No matching function call to SetTransform.<br />
|-<br />
| [[ITK/Examples/WishList/Iterators/FloodFillIterator | Traverse a region using a flood fill iterator]] || {{ITKDoxygenURL|FloodFilledSpatialFunctionConditionalIterator}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/ImageProcessing/GradientOfVectorImage | Compute the gradient of a vector image]] || {{ITKDoxygenURL|GradientImageFilter}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_Image | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_1D | Compute distributions of samples using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || Someone please confirm that this outputs the mean and the variance (i.e. I used a standard deviation of 30 to create the samples and the second estimated parameter is near 1000 (~30^2) . Is this correct?)<br />
|-<br />
| [[ITK/Examples/Broken/EdgesAndGradients/CannyEdgeDetectionImageFilter | Find edges in an image]] || {{ITKDoxygenURL|CannyEdgeDetectionImageFilter}} || How to set a reasonable Threshold for the output edges?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ImageToHistogramFilter | Compute the histogram of an image]] || {{ITKDoxygenURL|Statistics_1_1ImageToHistogramFilter}} || The last entry of the red histogram should contain several values, but it is 0?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/KmeansModelEstimator | Classifying pixels using KMeans]] || {{ITKDoxygenURL|KmeansModelEstimator}} || How to apply the labels of the filter to the input image?<br />
|-<br />
| [[ITK/Examples/Broken/Images/RegionGrowImageFilter | Basic region growing]] || {{ITKDoxygenURL|RegionGrowImageFilter}} || Just getting started with demo...<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConnectedThresholdImageFilter | Find connected components in an image]] || {{ITKDoxygenURL|ConnectedThresholdImageFilter}} || Just need to finish it.<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConvertPixelBuffer | Convert an image from one type to another]] || {{ITKDoxygenURL|ConvertPixelBuffer}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/NeighborhoodOperatorImageFunction | Apply a function to every pixel with access to its neighborhood]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/InPlace | In-place filtering of an image]] || {{ITKDoxygenURL|InPlaceImageFilter}} || This only works for filters which derive from itkInPlaceImageFilter<br />
|-<br />
| [[ITK/Examples/Broken/Images/MirrorPadImageFilter | Pad an image]] || {{ITKDoxygenURL|MirrorPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/WrapPadImageFilter | Pad an image by wrapping]] || {{ITKDoxygenURL|WrapPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/VTKImageToImageFilter | Convert a VTK image to an ITK image]] || {{ITKDoxygenURL|VTKImageToImageFilter}} || Seems to expect an input image with only 1 component? (i.e. greyscale)<br />
<br />
|}<br />
<br />
===Big Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Broken/Images/MeanSquaresImageToImageMetric | Find the best position of the moving image in the fixed image.]] || {{ITKDoxygenURL|MeanSquaresImageToImageMetric}} || Output (0,0) is incorrect.<br />
|-<br />
| [[ITK/Examples/Broken/Images/GradientImageFilter | Compute and display the gradient of an image]] || {{ITKDoxygenURL|GradientImageFilter}} || Blank output.<br />
|}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/Tasks&diff=39605ITK/Release 4/Wrapping/Tasks2011-05-09T10:11:28Z<p>Glehmann: </p>
<hr />
<div>= Current Tasks =<br />
<br />
==TO UPDATE: Build WrapITK with ccache==<br />
* measure the build speedup<br />
* write documentation on the wiki<br />
<br />
==TO UPDATE: Build WrapITK with WRAP_ITK_EXPLICIT ==<br />
* compare the build time and the bin directory size<br />
* Write the result on a wiki page.<br />
<br />
==move the customization code in python's main CMakeLists.txt to swig macros in pyBase.i==<br />
<br />
==set up the 64 bit build on CoSMoTest-Win7 with MSVC 10==<br />
<br />
==reply to all related to wrapping on the mailing lists==<br />
<br />
==test gerrit changes related to wrapping==<br />
<br />
==MetadataDictionary access from target languages==<br />
<br />
* modify itkMetaDataDictionary.h to add those methods:<br />
+ MetaDataObjectBase::Pointer & Get(const std::string &) const;<br />
+ void Set(const std::string &, MetaDataObjectBase * );<br />
+ std::vector< std::string > Keys() const;<br />
<br />
* add a specific language customization for python, to make the metadata accessible in a more usual way.<br />
+ a __setitem__() method to add/modify a metadata in the dictionary<br />
+ a __len__() method to return the number of metadata in the dictionary<br />
+ a __getitem__() method - this one should take care to down cast the object to its real type<br />
+ a __str__() method to print the content of the dictionary<br />
+ a __iter__() method to return every elements in the dictionary one by one<br />
<br />
==Tcl SmartPointers==<br />
look at how SmartPointers are replaced by swig proxy objects in python and java and explore the possibility to do the same in Tcl to decrease the build time of WrapITK.<br />
<br />
==Install the files in the right place==<br />
<br />
They are currenly in /usr/local/lib/cmake/ITK-4.0/WrapITK -- that's not good<br />
<br />
=Pending Tasks =<br />
<br />
* [GL-01] - [100%] - migrating to WrapITK 0.3 <br />
<br />
Depends on GL-01<br />
* [GL-02] - [--%] - Add support for C#,<br />
* [GL-03] - [--%] - Port the SWIG interface gen. to C++,<br />
* [GL-04] - [--%] - Add support for Python 3,<br />
* [GL-06] - [--%] - Default wrapped types [...],<br />
* [GL-08] - [33%] - Wrapping coverage,<br />
<br />
depends on other groups<br />
* [GL-05] - [--%] - Redefine the WrapITK libraries, (follow modular, no need monolithic anymore)<br />
* [GL-07] – [--%] - Extend support to more types,<br />
<br />
depends on GL-02 and GL-04<br />
* [GL-09] - [--%] - Binary distribution,<br />
* [GL-10] – [--%] - language specific array conversion, (NOTE: simple itk did it for C# and java, we have it in python)<br />
* [GL-12] - [--%] - Automatic Inline documentation,<br />
* [GL-13] - [--%] - Target language inheritance,<br />
* [GL-14] - [--%] - Automatic type selection in Python,<br />
<br />
depends on GDCM<br />
* [GL-11] - [--%] - GDCM wrapping compatibility,<br />
* [GL-MM] - [--%] - ITK-GDCM Wrapping,<br />
<br />
last items<br />
* [GL-17] – [--%] - Documentation (user guide)<br />
* [GL-18] – [--%] - Documentation (dev. Guide)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39373ITK/HDF52011-04-27T08:29:25Z<p>Glehmann: </p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Typing===<br />
<br />
With HDF5, everything is either a group or a dataset.<br />
<br />
The actual ITK type must be stored as a string attribute called "Type" and must correspond to the RTTI typeinfo.<br />
<br />
==Managing versions==<br />
<br />
Each object must store its version in an attribute called "Version". The version is a string corresponding to the ITK version.<br />
<br />
===Atomic objects===<br />
<br />
Atomic objects or unbreakable basic types. They are (generally?) stored as datasets in the HDF5 files.<br />
<br />
====Index====<br />
This is stored as a 1D dataset of Dimension elements.<br />
<br />
====Size====<br />
This is stored as a 1D dataset of Dimension elements.<br />
<br />
====Point====<br />
This is stored as a 1D dataset of Dimension elements.<br />
<br />
====Matrix====<br />
This is stored as a 2D dataset of Dimension elements.<br />
<br />
====Vector====<br />
This is stored as a 1D dataset of Dimension elements.<br />
<br />
<br />
===Composite objects===<br />
<br />
Composite objects are store as groups in the HDF5 file and are made of one or more atomic or composite objects. Each object is named in the same way it is named in the ITK classes, without the leading "m_".<br />
<br />
====ImageRegion====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageRegion}}.<br />
<br />
{| border="1"<br />
! Member !! Type<br />
|-<br />
| Index || [[#Index | Index]]<br />
|-<br />
| Size || [[#Size | Size]]<br />
|}<br />
<br />
The dimension of the Size and the Index must match.<br />
<br />
====Histogram====<br />
<br />
TODO<br />
<br />
====ImageBase====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageBase}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Region || [[#ImageRegion | ImageRegion]] || This is the largest possible region shortened, because the different regions in itk::Image doesn't really make sense in a file storage.<br />
|-<br />
| Spacing || [[#Vector | Vector]] ||<br />
|-<br />
| Origin || [[#Point | Point]] ||<br />
|-<br />
| Direction || [[#Matrix | Matrix]] ||<br />
|}<br />
<br />
====Image====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|Image}}.<br />
Image inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Pixels || TODO || which type should be used? a dataset directly? an atomic type?<br />
|}<br />
<br />
This is not a strict requirement, but images should be saved in chunks to allow them to be efficiently streamed (both read and write) and compressed.<br />
The chunk size should be one on all the dimensions but x and y.<br />
<br />
====LabelObjectLine====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObjectLine}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Index || [[#Index | Index]] || <br />
|-<br />
| Length || unsigned integer || how do we describe this type?<br />
|}<br />
<br />
====LabelObject====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObject}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Label || integer || how do we describe this type?<br />
|-<br />
| Lines || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
====LabelMap====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelMap}}.<br />
LabelMap inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| LabelObjects || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
==Base path==<br />
<br />
By default, the object of interest is stored in '''/ITK''', so it can be either a atomic (HDF5 dataset) or composite object (HDF5 group). Of course it is possible to access the objects by using another or a longer path. Some classes in ITK may not provide a way to change the path of the object of interest (for example HDF5ImageIO).</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=Talk:ITK/HDF5&diff=39372Talk:ITK/HDF52011-04-27T08:04:09Z<p>Glehmann: Created page with "===Typing=== With HDF5, everything is either a group or a dataset. ITK must be able to save many different types -- how do we store the actual ITK type in the HDF5? [[User;ke..."</p>
<hr />
<div>===Typing===<br />
<br />
With HDF5, everything is either a group or a dataset.<br />
<br />
ITK must be able to save many different types -- how do we store the actual ITK type in the HDF5? <br />
<br />
[[User;kentwilliams|kent williams]] This is handled in TransformIO by actually saving the ITK type name in the HDF file. This parallels the other Transform readers. There's a lookup mechanism in the itkTransformIOFactory to handle instantiation by class name.<br />
<br />
(Attributes may be an option for that.)<br />
<br />
[[User;kentwilliams|kent williams]]That is true, but once I figured out DataSets, that became my hammer for every nail. There may be some efficiency issues with using datasets when Attributes would do, but in the case of ITK, it shouldn't be an issue<br />
<br />
How do we store the template parameters -- do we even need to store them? [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
<br />
[[User;kentwilliams|kent williams]] in general, no. We can recover the native scalar type of datasets, and for most things, that's enough to decide what ITK object to instantiate, based on context. Where that isn't the case, we could store attributes to disambiguate what class of object should be created.<br />
<br />
===Composite objects===<br />
<br />
Composite objects are store as groups in the HDF5 file and are made of one or more atomic or composite objects. Each object is named in the same way it is named in the ITK classes, without the leading "m_".<br />
<br />
[[User;kentwilliams|Kent Williams]] Actually, there is a compound object, which is good in limited cases for fixed-size structs of POD, especially if there are many of them, i.e. an array of fixed sized structs;<br />
<br />
====Version====<br />
<br />
We may need something simpler to store the version as an attribute. [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
[[User;kentwilliams|Kent Williams]] I store it in the Image file as a string; at this point it isn't being checked. The rationale is that the version could be checked and that could influence how the data is read out of the file.<br />
<br />
The way HDF5 files are organized and accessed, simply augmenting a file with new data is backwards compatible -- there will just be some groups/datasets/attributes whose paths are unknown to the old reader.<br />
<br />
====ImageRegion====<br />
<br />
TODO: where do we store the Dimension of the ImageRegion?<br />
<br />
[[User;kentwilliams|Kent Williams]]Right now, in the WIP image file reader deduces the dimension from the size of the Direction Cosines matrix. It could be stored explicitly and accessed first if need be.<br />
<br />
TODO: Is it good enough to assume that it can be deduced from the dimension of the Index and of the Size?<br />
<br />
[[User;kentwilliams|Kent Williams]] If we write the reader and writer, we can depend on the preconditions we impose. In this specific case, yes, the size of the Index & Spacing are equally valid markers of the Dimension of the object being read in.<br />
<br />
TODO: What to do when the Index and the Size dimensions mismatch?<br />
[User;kentwilliams|Kent Williams]] Fail early and fail loud!<br />
<br />
<br />
====Image====<br />
<br />
This is not a strict requirement, but images should be saved in chunks to allow them to be efficiently streamed (both read and write) and compressed.<br />
[User;kentwilliams|Kent Williams]]I haven't messed with it yet, but if a file is stored with its voxel data as one contiguous array, you can still read subregions. Writing in chunks, I'm not sure about.<br />
<br />
I think the chunk size should be one on all the dimensions but x and y. Which chunk size to choose on x and y is tricky, and may depend on the use case -- should we choose a size?<br />
<br />
==Managing versions==<br />
<br />
How to do that? The version should be stored somewhere for sure - should it be:<br />
* at the base of the file? in an /ITKVersion group for example?<br />
* in each object, as an attribute? This would allow to easily copy an object from one file to another. I think I like much this method [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples&diff=39366ITK/Examples2011-04-26T18:35:27Z<p>Glehmann: /* Image Segmentation */</p>
<hr />
<div>These are fully independent, compilable examples. There is significant overlap in the examples, but they are each intended to illustrate a different concept and be fully stand alone compilable.<br />
Please add examples in your areas of expertise!<br />
You can checkout the entire set of examples from this repository: <br />
http://gitorious.org/itkwikiexamples/itkwikiexamples<br />
<pre>git clone git://gitorious.org/itkwikiexamples/itkwikiexamples.git ITKWikiExamples</pre><br />
<br />
==About the Examples==<br />
* [http://www.itk.org/Wiki/images/e/e6/ITK_Examples_Iowa_Meeting_2010_11-8-2010.odp Official announcement]<br />
===ItkVtkGlue===<br />
ITK and VTK are very separate toolkits - ITK for image processing and VTK for data visualization. It is often convenient to use the two together - namely, to display an ITK image on the screen. The ItkVtkGlue kit serves exactly this purpose. Also provided inside ItkVtkGlue is a QuickView class to allow a 2 line display of an ITK image.<br />
<br />
If you download the entire ITK Wiki Examples Collection, the ItkVtkGlue directory will be included and configured. If you wish to just build a few examples, then you will need to [http://gitorious.org/itkwikiexamples/itkwikiexamples/blobs/raw/master/ItkVtkGlue.tar.gz download ItkVtkGlue] and build it.<br />
<br />
===[[ITK/Examples/Instructions/ForUsers|Information for Wiki Examples Users]]===<br />
If you just want to use the Wiki Examples, [[ITK/Examples/Instructions/ForUsers|go here]]. You will learn how to search for examples, build a few examples and build all of the examples.<br />
<br />
===[[ITK/Examples/Instructions/ForDevelopers|Information for Wiki Examples Developers]]===<br />
If you want to contribute examples [[ITK/Examples/Instructions/ForDevelopers|go here]]. You will learn how to add a new example and the guidelines for writing an example.<br />
<br />
===[[ITK/Examples/Instructions/ForAdministrators|Information for Wiki Examples Administrators]]===<br />
If you are a Wiki Example Administrator or want to learn more about the process [[ITK/Examples/Instructions/ForAdministrators|go here]]. You will learn how the Wiki Examples repository is organized, how the repository is synced to the wiki and how to add new topics, tests and regression baselines.<br />
<br />
==Simple Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SimpleOperations/WidthHeight | Get the width and height of an image ]] || || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/VariableLengthVector | Variable length vector ]] || {{ITKDoxygenURL|VariableLengthVector}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TranslationTransform | Translate an image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|ResampleImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/NumericTraits | Get some basic information about a type]] || {{ITKDoxygenURL|NumericTraits}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/ScalarToRGBColormapImageFilter | Apply a color map to an image]] || {{ITKDoxygenURL|ScalarToRGBColormapImageFilter}}|| <br />
|-<br />
| [[ITK/Examples/SimpleOperations/TryCatch | Catch an ITK exception]] || || Try/Catch blocks<br />
|-<br />
| [[ITK/Examples/SimpleOperations/BresenhamLine | Get the points on a Bresenham line between two points]] || {{ITKDoxygenURL|BresenhamLine}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/Offset | Add an offset to a pixel index]] || {{ITKDoxygenURL|Offset}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenPoints | Distance between two points]] || {{ITKDoxygenURL|Point}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/DistanceBetweenIndices | Distance between two indices]] || {{ITKDoxygenURL|Point}}, {{ITKDoxygenURL|Index}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/CreateVector | Create a vector]] || {{ITKDoxygenURL|Vector}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/GetNameOfClass | Get the name/type/class of an object ]] || || GetNameOfClass()<br />
|-<br />
| [[ITK/Examples/Images/Index | An object which holds the index of a pixel ]] || {{ITKDoxygenURL|Index}} || <br />
|-<br />
| [[ITK/Examples/Images/Size | An object which holds the size of an image ]] || {{ITKDoxygenURL|Size}} || <br />
|-<br />
| [[ITK/Examples/Images/ImageRegion | An object which holds the index (start) and size of a region of an image ]] || {{ITKDoxygenURL|ImageRegion}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/Transparency | Make part of an image transparent]] || {{ITKDoxygenURL|RGBAPixel}} || Transparency, RGBA, alpha<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionIntersection | Determine if one region is fully inside another region]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection, IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/PixelInsideRegion | Determine if a pixel is inside of a region]] || {{ITKDoxygenURL|ImageRegion}} || IsInside()<br />
|-<br />
| [[ITK/Examples/SimpleOperations/RegionOverlap | Determine the overlap of two regions]] || {{ITKDoxygenURL|ImageRegion}} || Region intersection<br />
|-<br />
| [[ITK/Examples/SimpleOperations/ImageDuplicator | Duplicate an image]] || {{ITKDoxygenURL|ImageDuplicator}} || <br />
|-<br />
| [[ITK/Examples/SimpleOperations/RandomImageSource | Produce an image of noise]] || {{ITKDoxygenURL|RandomImageSource}} ||<br />
|-<br />
| [[ITK/Examples/SimpleOperations/SetPixels | Set specified pixels to specified values]] || {{ITKDoxygenURL|Image}} ||<br />
|}<br />
<br />
==Mathematical Operations==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Math/CovariantVector | Create a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || This is the object which should be used to represent a mathematical vector.<br />
|-<br />
| [[ITK/Examples/Math/CovariantVectorNorm | Compute the norm of a covariant vector]] || {{ITKDoxygenURL|CovariantVector}} || In-place and non-inplace norms.<br />
|-<br />
| [[ITK/Examples/Math/Matrix | Matrix ]] || {{ITKDoxygenURL|Matrix}} || <br />
|-<br />
| [[ITK/Examples/Math/Pi | Mathematical constant pi = 3.14 ]] || {{ITKDoxygenURL|Math}} || <br />
|}<br />
<br />
==Image Functions==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Functions/GuassianBlurImageFunction | GuassianBlurImageFunction ]] || {{ITKDoxygenURL|GuassianBlurImageFunction }} || <br />
|}<br />
<br />
==Point Set==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/PointSet/CreatePointSet | Create a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/ReadPointSet | Read a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/WritePointSet | Write a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|-<br />
| [[ITK/Examples/PointSet/BoundingBox | Get the bounding box of a PointSet ]] || {{ITKDoxygenURL|PointSet}} || <br />
|}<br />
<br />
==Input/Output (IO)==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/IO/ReadVectorImage| Read an image file with an unknown number of components]] || {{ITKDoxygenURL|ImageFileReader}},{{ITKDoxygenURL|VectorImage}} || <br />
|-<br />
| [[ITK/Examples/IO/ImportImageFilter| Convert a C-style array to an itkImage]] || {{ITKDoxygenURL|ImportImageFilter}} || <br />
|-<br />
| [[ITK/Examples/IO/ReadUnknownImageType | Read an image file without knowing its type before hand]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileWriter | Write an image]] || {{ITKDoxygenURL|ImageFileWriter}} ||<br />
|-<br />
| [[ITK/Examples/IO/ImageFileReader | Read an image]] || {{ITKDoxygenURL|ImageFileReader}} ||<br />
|-<br />
| [[ITK/Examples/IO/TIFFImageIO | Write a TIFF image]] || {{ITKDoxygenURL|TIFFImageIO}} || This is a general demonstration of how to use a specific writer rather than relying on the ImageFileWriter to choose for you.<br />
|-<br />
| [[ITK/Examples/IO/ImageToVTKImageFilter | Display an ITK image]] || {{ITKDoxygenURL|ImageToVTKImageFilter}} ||<br />
|}<br />
<br />
==DICOM==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/DICOM/ResampleDICOM | Resample a DICOM series]] || {{ITKDoxygenURL|GDCMImageIO}} || Resample a DICOM series with user-specified spacing.<br />
|}<br />
<br />
==Image Processing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddConstantToImageFilter| Add a constant to every pixel in an image]] || {{ITKDoxygenURL|AddConstantToImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Upsampling| Upsampling an image]] || {{ITKDoxygenURL|BSplineInterpolateImageFunction}} {{ITKDoxygenURL|ResampleImageFilter}} || Interpolate missing pixels in order to upsample an image. Note this only works on scalar images.<br />
|-<br />
| [[ITK/Examples/Images/FlipImageFilter | Flip an image over specified axes]] || {{ITKDoxygenURL|FlipImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/VectorRescaleIntensityImageFilter | Apply a transformation to the magnitude of vector valued image pixels]] || {{ITKDoxygenURL|VectorRescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Images/NeighborhoodOperatorImageFilter | Apply a kernel to every pixel in an image]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LaplacianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianImageFilter}} || Input image type must be double or float<br />
|-<br />
| [[ITK/Examples/Images/ConstantPadImageFilter | Pad an image with a constant value]] || {{ITKDoxygenURL|ConstantPadImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/IntensityWindowingImageFilter| IntensityWindowingImageFilter]] || {{ITKDoxygenURL|IntensityWindowingImageFilter}} || Apply a linear intensity transform from a specified input range to a specified output range.<br />
|-<br />
| [[ITK/Examples/Images/ShrinkImageFilter | Shrink an image]] || {{ITKDoxygenURL|ShrinkImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Images/NormalizedCorrelationImageFilter | Normalized correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyByConstantImageFilter | Multiply every pixel in an image by a constant]] || {{ITKDoxygenURL|MultiplyByConstantImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SquaredDifferenceImageFilter | Compute the squared difference of corresponding pixels in two images]] || {{ITKDoxygenURL|SquaredDifferenceImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddPixelAccessor | Add a constant to every pixel without duplicating the image in memory (an accessor)]] || {{ITKDoxygenURL|AddPixelAccessor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionalMaximaImageFilter | RegionalMaximaImageFilter]] || {{ITKDoxygenURL|RegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/ValuedRegionalMaximaImageFilter | ValuedRegionalMaximaImageFilter]] || {{ITKDoxygenURL|ValuedRegionalMaximaImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaximumImageFilter | Pixel wise compare two input images and set the output pixel to their max]] || {{ITKDoxygenURL|MaximumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumImageFilter | Pixel wise compare two input images and set the output pixel to their min]] || {{ITKDoxygenURL|MinimumImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AndImageFilter | Binary AND two images]] || {{ITKDoxygenURL|AndImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/OrImageFilter | Binary OR two images]] || {{ITKDoxygenURL|OrImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/XorImageFilter | Binary XOR (exclusive OR) two images]] || {{ITKDoxygenURL|XorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryNotImageFilter | Invert an image using the Binary Not operation]] || {{ITKDoxygenURL|BinaryNotImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/Compose3DCovariantVectorImageFilter | Compose a vector image (with 3 components) from three scalar images]] || {{ITKDoxygenURL|Compose3DCovariantVectorImageFilter}} || Create an RGB image from scalar images. Combine individual channels into a color image.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/NthElementImageAdaptor | Extract a component of a vector image]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || Use built in functionality to extract a component of a vector image.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ImageAdaptorExtractVectorComponent | Present an image by first performing an operation]] || {{ITKDoxygenURL|ImageAdaptor}} || A demonstration of how to present an image pixel as a function of the pixel. In this example the functionality of NthElementImageAdaptor is demonstrated.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ProcessingNthImageElement | Process the nth component/element of a vector image]] || {{ITKDoxygenURL|NthElementImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter | Label binary regions in an image and get their properties]] || {{ITKDoxygenURL|BinaryImageToShapeLabelMapFilter}} || Region bounding box, etc.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConvolutionImageFilter | Convolve an image with a kernel]] || {{ITKDoxygenURL|ConvolutionImageFilter}} || Convolution.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RelabelComponentImageFilter | Assign contiguous labels to connected regions of an image]] || {{ITKDoxygenURL|RelabelComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CropImageFilter | Crop an image]] || {{ITKDoxygenURL|CropImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/AbsImageFilter | Compute the absolute value of an image]] || {{ITKDoxygenURL|AbsImageFilter}} || magnitude<br />
|-<br />
| [[ITK/Examples/ImageProcessing/InvertIntensityImageFilter | Invert an image]] || {{ITKDoxygenURL|InvertIntensityImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/MaskImageFilter | Apply a mask to an image]] || {{ITKDoxygenURL|MaskImageFilter}} || <br />
|-<br />
| [[ITK/Examples/ImageProcessing/SigmoidImageFilter | Pass image pixels through a sigmoid function]] || {{ITKDoxygenURL|SigmoidImageFilter}} || The qualitative description of how Alpha and Beta affect the function from the ITK Software Guide and the associated images would be nice to add to the doxygen.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|ThresholdImageFilter}} || The result is the original image but with the values below (or above) the threshold "clamped" to an output value.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryThresholdImageFilter | Threshold an image]] || {{ITKDoxygenURL|BinaryThresholdImageFilter}} || The result is a binary image (inside the threshold region or outside the threshold region).<br />
|-<br />
| [[ITK/Examples/ImageProcessing/UnaryFunctorImageFilter | Apply a custom operation to each pixel in an image]] || {{ITKDoxygenURL|UnaryFunctorImageFilter}} || Perform a custom operation on every pixel in an image. This example rotates the vector-valued pixels by 90 degrees.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/BinaryFunctorImageFilter | Apply a custom operation to corresponding pixels in two images]] || {{ITKDoxygenURL|BinaryFunctorImageFilter}} || This example computes the squared difference between corresponding pixels.<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MinimumMaximumImageCalculator | Find the minimum and maximum value (and the position of the value) in an image]] || {{ITKDoxygenURL|MinimumMaximumImageCalculator}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/AddImageFilter | Add two images together]] || {{ITKDoxygenURL|AddImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/SubtractImageFilter | Subtract two images]] || {{ITKDoxygenURL|SubtractImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PasteImageFilter | Paste a part of one image into another image]] || {{ITKDoxygenURL|PasteImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/TileImageFilter | Tile multiple images into another image]] || {{ITKDoxygenURL|TileImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/MultiplyImageFilter | Multiply two images together]] || {{ITKDoxygenURL|MultiplyImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RegionOfInterestImageFilter | Extract a portion of an image (region of interest)]] || {{ITKDoxygenURL|RegionOfInterestImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/RescaleIntensityImageFilter | Rescale the intensity values of an image to a specified range]] || {{ITKDoxygenURL|RescaleIntensityImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/ConnectedComponentImageFilter | Label connected components in a binary image]] || {{ITKDoxygenURL|ConnectedComponentImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/NormalizeImageFilter | Normalize an image]] || {{ITKDoxygenURL|NormalizeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/CastImageFilter | Cast an image from one type to another]] || {{ITKDoxygenURL|CastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/PermuteAxesImageFilter | Switch the axes of an image]] || {{ITKDoxygenURL|PermuteAxesImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/LinearInterpolateImageFunction | Linearly interpolate a position in an image]] || {{ITKDoxygenURL|LinearInterpolateImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/ImageProcessing/HammingWindowFunction | HammingWindowFunction]] || {{ITKDoxygenURL|HammingWindowFunction}} ||<br />
|}<br />
<br />
==Vector Images==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImage | Create a vector image]] || {{ITKDoxygenURL|VectorImage}} || An image with an ND vector at each pixel<br />
|-<br />
| [[ITK/Examples/VectorImages/ImageToVectorImageFilter | Create a vector image from a collection of scalar images]] || {{ITKDoxygenURL|ImageToVectorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorImageToImageAdaptor | View a component of a vector image as if it were a scalar image]] || {{ITKDoxygenURL|VectorImageToImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/VectorImages/VectorIndexSelectionCastImageFilter | Extract a component of an itkVectorImage]] || {{ITKDoxygenURL|VectorIndexSelectionCastImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/VectorResampleImageFilter | Translate a vector image]] || {{ITKDoxygenURL|TranslationTransform}}, {{ITKDoxygenURL|VectorResampleImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/JoinImageFilter | Join images, stacking their components]] || {{ITKDoxygenURL|JoinImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/VectorImages/NeighborhoodIterator | NeighborhoodIterator on a VectorImage]] || {{ITKDoxygenURL|VectorImage}} {{ITKDoxygenURL|NeighborhoodIterator}}||<br />
|}<br />
<br />
==Iterating Over (Traversing) An Image==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator_Manual | Iterate over a region of an image with a shaped neighborhood]] || Create the shape manually {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ShapedNeighborhoodIterator | Iterate over a region of an image with a shaped neighborhood]] || Create the shape from a StructuringElement {{ITKDoxygenURL|ShapedNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionExclusionConstIteratorWithIndex | Iterator over an image skipping a specified region]] || {{ITKDoxygenURL|ImageRegionExclusionConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomConstIteratorWithIndex | Randomly select pixels from a region of an image]] || {{ITKDoxygenURL|ImageRandomConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/ImageRandomNonRepeatingConstIteratorWithIndex | Randomly select pixels from a region of an image without replacement]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Iterators/LineIterator | Iterate over a line through an image]] || {{ITKDoxygenURL|LineIterator}} || Walks a Bresenham line through an image (with write access)<br />
|-<br />
| [[ITK/Examples/Iterators/LineConstIterator | Iterate over a line through an image without write access]] || {{ITKDoxygenURL|LineConstIterator}} || Walks a Bresenham line through an image (without write access)<br />
|-<br />
| [[ITK/Examples/Iterators/ImageBoundaryFacesCalculator | Iterate over the central region (non-boundary) separately from the face-regions (boundary)]] || {{ITKDoxygenURL|ImageBoundaryFacesCalculator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/NeighborhoodIterator | Iterate over a region of an image with a neighborhood (with write access)]] || {{ITKDoxygenURL|NeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstNeighborhoodIterator | Iterate over a region of an image with a neighborhood (without write access)]] || {{ITKDoxygenURL|ConstNeighborhoodIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIterator | Iterate over a region of an image (with write access)]] || {{ITKDoxygenURL|ImageRegionIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIterator | Iterate over a region of an image (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIterator}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ConstantBoundaryCondition | Make out of bounds pixels return a constant value]] || {{ITKDoxygenURL|ConstantBoundaryCondition}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (with write access)]] || {{ITKDoxygenURL|ImageRegionIteratorWithIndex}} ||<br />
|-<br />
| [[ITK/Examples/Iterators/ImageRegionConstIteratorWithIndex | Iterate over a region of an image with efficient access to the current index (without write access)]] || {{ITKDoxygenURL|ImageRegionConstIteratorWithIndex}} ||<br />
|}<br />
<br />
==Kernels==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Operators/GaussianOperator | Create a Gaussian kernel]] || {{ITKDoxygenURL|GaussianOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/GaussianDerivativeOperator | Create a Gaussian derivative kernel]] || {{ITKDoxygenURL|GaussianDerivativeOperator}} ||<br />
|-<br />
| [[ITK/Examples/Operators/LaplacianOperator | Create a Laplacian kernel]] || {{ITKDoxygenURL|LaplacianOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/DerivativeOperator | Create a derivative kernel]] || {{ITKDoxygenURL|DerivativeOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/SobelOperator | Create the Sobel kernel]] || {{ITKDoxygenURL|SobelOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/ForwardDifferenceOperator | Create a forward difference kernel]] || {{ITKDoxygenURL|ForwardDifferenceOperator}} || <br />
|-<br />
| [[ITK/Examples/Operators/BackwardDifferenceOperator | Create a backward difference kernel]] || {{ITKDoxygenURL|BackwardDifferenceOperator}} || <br />
<br />
|}<br />
<br />
==Image Edges, Gradients, and Derivatives==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/DerivativeImageFilter | Compute the derivative of an image in a particular direction]] || {{ITKDoxygenURL|DerivativeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientRecursiveGaussianImageFilter| Compute the gradient of an image by convolution with the first derivative of a Gaussian]] || {{ITKDoxygenURL|GradientRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeRecursiveGaussianImageFilter | Find the gradient magnitude of the image first smoothed with a Gaussian kernel]] || {{ITKDoxygenURL|GradientMagnitudeRecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/RecursiveGaussianImageFilter | Find higher derivatives of an image]] || {{ITKDoxygenURL|RecursiveGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryContourImageFilter | Extract the boundaries of connected regions in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} || Blob boundary, border<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/BinaryBoundaries | Extract the inner and outer boundaries of blobs in a binary image]] || {{ITKDoxygenURL|BinaryContourImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/GradientMagnitudeImageFilter | Compute the gradient magnitude image]] || {{ITKDoxygenURL|GradientMagnitudeImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/EdgesAndGradients/LaplacianRecursiveGaussianImageFilter | Compute the Laplacian of an image]] || {{ITKDoxygenURL|LaplacianRecursiveGaussianImageFilter}} ||<br />
|}<br />
<br />
==Smoothing==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Smoothing/AntiAliasBinaryImageFilter | Anti alias a binary image]] || {{ITKDoxygenURL|AntiAliasBinaryImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/MeanImageFilter | Mean filter an image]] || {{ITKDoxygenURL|MeanImageFilter}} || Replace each pixel by the mean of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/MedianImageFilter | Median filter an image]] || {{ITKDoxygenURL|MedianImageFilter}} || Replace each pixel by the median of its neighborhood<br />
|-<br />
| [[ITK/Examples/Smoothing/DiscreteGaussianImageFilter | Smooth an image with a discrete Gaussian filter]] || {{ITKDoxygenURL|DiscreteGaussianImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BinomialBlurImageFilter | Blur an image]] || {{ITKDoxygenURL|BinomialBlurImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Smoothing/BilateralImageFilter | Bilateral filter an image]] || {{ITKDoxygenURL|BilateralImageFilter}} || Edge preserving smoothing.<br />
|-<br />
| [[ITK/Examples/Smoothing/CurvatureFlowImageFilter | Smooth an image using curvature flow]] || {{ITKDoxygenURL|CurvatureFlowImageFilterType}} ||<br />
|-<br />
| [[ITK/Examples/Smoothing/SmoothingRecursiveGaussianImageFilter | Gaussian smoothing that works with image adaptors]] || {{ITKDoxygenURL|SmoothingRecursiveGaussianImageFilter}} || <br />
|}<br />
<br />
==Morphology==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Morphology/BinaryErodeImageFilter | Erode a binary image]] || {{ITKDoxygenURL|BinaryErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryDilateImageFilter | Dilate a binary image]] || {{ITKDoxygenURL|BinaryDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleDilateImageFilter | Dilate a grayscale image]] || {{ITKDoxygenURL|GrayscaleDilateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/GrayscaleErodeImageFilter | Erode a grayscale image]] || {{ITKDoxygenURL|GrayscaleErodeImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Morphology/FlatStructuringElement | Erode a binary image using a flat (box) structuring element]] || {{ITKDoxygenURL|FlatStructuringElement}} || <br />
|-<br />
| [[ITK/Examples/Morphology/BinaryBallStructuringElement | An elliptical structuring element]] || {{ITKDoxygenURL|BinaryBallStructuringElement}} || <br />
|}<br />
<br />
==Curves==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Curves/ContourMeanDistanceImageFilter | Compute the mean distance between all points of two curves]] || {{ITKDoxygenURL|ContourMeanDistanceImageFilter}} || <br />
|}<br />
<br />
==Spectral Analysis==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter | Compute the FFT of an image]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}} || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/CrossCorrelationInFourierDomain | Compute the cross-correlation of two images in the Fourier domain]] || {{ITKDoxygenURL|VnlFFTRealToComplexConjugateImageFilter}}{{ITKDoxygenURL|VnlFFTComplexConjugateToRealImageFilter}} || || <br />
|-<br />
| [[ITK/Examples/SpectralAnalysis/RealAndImaginaryToComplexImageFilter | Convert a real image and an imaginary image to a complex image]] || {{ITKDoxygenURL|RealAndImaginaryToComplexImageFilter}} || <br />
|}<br />
<br />
==Utilities==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Utilities/AzimuthElevationToCartesianTransform | Cartesian to AzimuthElevation and vice-versa]] || {{ITKDoxygenURL|AzimuthElevationToCartesianTransform}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/FixedArray | C-style array]] || {{ITKDoxygenURL|FixedArray}} ||<br />
|-<br />
| [[ITK/Examples/Utilities/DeepCopy | Deep copy an image]] || || <br />
|-<br />
| [[ITK/Examples/Utilities/RandomPermutation | Permute a sequence of indices]] || {{ITKDoxygenURL|ImageRandomNonRepeatingConstIteratorWithIndex}} || <br />
|-<br />
| [[ITK/Examples/Utilities/MersenneTwisterRandomVariateGenerator | Random number generator]] || {{ITKDoxygenURL|MersenneTwisterRandomVariateGenerator}} || <br />
|-<br />
| [[ITK/Examples/Utilities/JetColormapFunctor | Map scalars into a jet colormap]] || {{ITKDoxygenURL|JetColormapFunctor}} || <br />
|-<br />
| [[ITK/Examples/Utilities/SimpleFilterWatcher | Monitor a filter]] || {{ITKDoxygenURL|SimpleFilterWatcher}} || See debug style information.<br />
|-<br />
| [[ITK/Examples/Utilities/TimeProbe | Time probe]] || {{ITKDoxygenURL|TimeProbe}} || Compute the time between points in code.<br />
|-<br />
| [[ITK/Examples/Utilities/ObserveEvent | Observe an event]] || {{ITKDoxygenURL|Command}} || <br />
|-<br />
| [[ITK/Examples/Utilities/VectorContainer | Vector container]] || {{ITKDoxygenURL|VectorContainer}} || <br />
|-<br />
| [[ITK/Examples/Utilities/BoundingBox | Bounding box]] || {{ITKDoxygenURL|BoundingBox}} || <br />
|}<br />
<br />
==Statistics==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Statistics/GaussianDistribution | Create a Gaussian distribution]] || {{ITKDoxygenURL|GaussianDistribution}} || <br />
|-<br />
| [[ITK/Examples/Statistics/SampleToHistogramFilter | Create a histogram from a list of sample measurements]] || {{ITKDoxygenURL|SampleToHistogramFilter}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ListSample | Create a list of sample measurements]] || {{ITKDoxygenURL|ListSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ImageToListSampleAdaptor | Create a list of samples from an image without duplicating the data]] || {{ITKDoxygenURL|ImageToListSampleAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Statistics/MembershipSample | Create a list of samples with associated class IDs]] || {{ITKDoxygenURL|MembershipSample}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ExpectationMaximizationMixtureModelEstimator_2D | 2D Gaussian Mixture Model Expectation Maximization]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || EM<br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_1D | 1D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/KdTreeBasedKMeansClustering_3D | 3D KMeans Clustering]] || {{ITKDoxygenURL|KdTreeBasedKMeansClustering}} || <br />
|-<br />
| [[ITK/Examples/Statistics/ScalarImageKmeansImageFilter | Cluster the pixels in a greyscale image]] || {{ITKDoxygenURL|ScalarImageKmeansImageFilter}} || <br />
<br />
|}<br />
<br />
==Spatial Objects==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/SpatialObjects/SpatialObjectToImageFilter | Convert a spatial object to an image ]] || {{ITKDoxygenURL|SpatialObjectToImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/EllipseSpatialObject | Ellipse ]] || {{ITKDoxygenURL|EllipseSpatialObject}} ||<br />
|-<br />
| [[ITK/Examples/SpatialObjects/LineSpatialObject| Line spatial object]] || {{ITKDoxygenURL|LineSpatialObject}}, {{ITKDoxygenURL|LineSpatialObjectPoint}} || Specify a piecewise-linear object by specifying points along the line.<br />
|-<br />
| [[ITK/Examples/SpatialObjects/PlaneSpatialObject| Plane spatial object]] || {{ITKDoxygenURL|PlaneSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/SpatialObjects/BlobSpatialObject | Blob ]] || {{ITKDoxygenURL|BlobSpatialObject}} ||<br />
|}<br />
<br />
==Inspection==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Inspection/CheckerBoardImageFilter | Combine two images by alternating blocks of a checkerboard pattern]] || {{ITKDoxygenURL|CheckerBoardImageFilter}} ||<br />
|-<br />
| [[ITK/Examples/Inspection/PixelInspection | Printing a pixel value to the console]] || [http://www.itk.org/Doxygen/html/classitk_1_1Image.html#ad424c945604f339130b4ffe81b99738eGetPixel GetPixel] ||<br />
|}<br />
<br />
==Image Registration==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethod | A basic global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|TranslationTransform}} || Translation only transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodAffine | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|AffineTransform}} || Full affine transform.<br />
|-<br />
| [[ITK/Examples/Registration/ImageRegistrationMethodBSpline | A global registration of two images ]] || {{ITKDoxygenURL|ImageRegistrationMethod}}, {{ITKDoxygenURL|BSplineDeformableTransform}} || BSpline transform.<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformation | Mutual Information ]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|TranslationTransform}} || Global registration by maximizing the mutual information and using a translation only transform<br />
|-<br />
| [[ITK/Examples/Registration/MutualInformationAffine | Mutual Information Affine]] || {{ITKDoxygenURL|MutualInformationImageToImageMetric}}, {{ITKDoxygenURL|AffineTransform}} || Global registration by maximizing the mutual information and using an affine transform<br />
|}<br />
<br />
==Image Segmentation==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Segmentation/MeanShiftClustering | Mean shift clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/kMeansClustering | KMeans Clustering]] || ||<br />
|-<br />
| [[ITK/Examples/Segmentation/MultiphaseChanAndVeseSparseFieldLevelSetSegmentation | Multiphase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseSparseFieldLevelSetSegmentation | Single-phase Chan And Vese Sparse Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseSparseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|-<br />
| [[ITK/Examples/Segmentation/SinglephaseChanAndVeseDenseFieldLevelSetSegmentation | Single-phase Chan And Vese Dense Field Level Set Segmentation]] || {{ITKDoxygenURL|ScalarChanAndVeseDenseLevelSetImageFilter}}, {{ITKDoxygenURL|ScalarChanAndVeseLevelSetFunction}} ||<br />
|}<br />
<br />
==Meshes==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Meshes/Decimation | Decimation]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/AddPointsAndEdges | Add points and edges]] || ||<br />
|-<br />
| [[ITK/Examples/Meshes/QuadEdgeMeshNormalFilter | Compute normals of a mesh]] || {{ITKDoxygenURL|QuadEdgeMeshNormalFilter}} ||<br />
|}<br />
<br />
==Wish List==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/WishList/LevenbergMarquart| LevenbergMarquart]] || || <br />
|-<br />
| [[ITK/Examples/WishList/IterativeClosestPoints| IterativeClosestPoints]] || || <br />
|-<br />
| [[ITK/Examples/WishList/MedianImageFunction| MedianImageFunction]] || {{ITKDoxygenURL|MedianImageFunction}} || <br />
|-<br />
| [[ITK/Examples/WishList/Operators/AllOperators| Demonstrate all operators]] || {{ITKDoxygenURL|NeighborhoodOperator}} || <br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ColorNormalizedCorrelation| Color Normalized Correlation]] || {{ITKDoxygenURL|NormalizedCorrelationImageFilter}} || <br />
|-<br />
| [[ITK/Examples/WishList/SpatialObjects/ContourSpatialObject| ContourSpatialObject]] || {{ITKDoxygenURL|ContourSpatialObject}} || <br />
|-<br />
| [[ITK/Examples/Broken/SimpleOperations/MetaDataDictionary| Store non-pixel associated data in an image]] || {{ITKDoxygenURL|MetaDataDictionary}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/LevelSets| Level Sets]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation//RegionGrowing| Region Growing]] || || <br />
|-<br />
| [[ITK/Examples/Meshes/Subdivision| Mesh subdivision]] || || <br />
|-<br />
| [[ITK/Examples/Segmentation/OtsuThresholdImageFilter| Separate foreground and background using Otsu's method]] || {{ITKDoxygenURL|OtsuThresholdImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Segmentation/SimpleContourExtractorImageFilter| Extract contours]] || {{ITKDoxygenURL|SimpleContourExtractorImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/RGBToVectorImageAdaptor| Present an image of RGBPixel pixels as an image of vectors]] || {{ITKDoxygenURL|RGBToVectorImageAdaptor}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DCirclesImageFilter| HoughTransform2DCirclesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DCirclesImageFilter}} || <br />
|-<br />
| [[ITK/Examples/Conversions/HoughTransform2DLinesImageFilter| HoughTransform2DLinesImageFilter]] || {{ITKDoxygenURL|HoughTransform2DLinesImageFilter}} || <br />
|}<br />
<br />
==Included in the ITK Repository==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Included/Registration| Image registration]] || || <br />
|}<br />
<br />
==Matlab==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Matlab/MatlabToITK| Write data from Matlab in a format readable by ITK]] || || <br />
|-<br />
| [[ITK/Examples/Matlab/ITKToMatlab| Write data from ITK in a format readable by Matlab]] || || <br />
|}<br />
<br />
==Developer Examples==<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Developer/ImageSource | Produce an image programmatically.]] || {{ITKDoxygenURL|ImageSource}} || Nothing in, image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilter | Filter an image]] || {{ITKDoxygenURL|ImageToImageFilter}} || Image in, same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputs | Write a filter with multiple inputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (same type), same type of image out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleInputsDifferentType | Write a filter with multiple inputs of different types.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Two images in (different type), image (same type as first input) out.<br />
|-<br />
| [[ITK/Examples/Developer/ImageFilterMultipleOutputs | Write a filter with multiple outputs of the same type.]] || {{ITKDoxygenURL|ImageToImageFilter}} || Images in, two images out (same type as first input).<br />
|}<br />
<br />
==Problems==<br />
===Small Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/WishList/EdgesAndGradients/SobelEdgeDetectionImageFilter | SobelEdgeDetectionImageFilter]] || {{ITKDoxygenURL|SobelEdgeDetectionImageFilter}} || NeighborIterator error?<br />
|-<br />
| [[ITK/Examples/WishList/ImageProcessing/ScaleTransform | Scale an image]] || {{ITKDoxygenURL|ScaleTransform}} || No matching function call to SetTransform.<br />
|-<br />
| [[ITK/Examples/WishList/Iterators/FloodFillIterator | Traverse a region using a flood fill iterator]] || {{ITKDoxygenURL|FloodFilledSpatialFunctionConditionalIterator}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/ImageProcessing/GradientOfVectorImage | Compute the gradient of a vector image]] || {{ITKDoxygenURL|GradientImageFilter}} || How to do this?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/GaussianMixtureModelComponent | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|GaussianMixtureModelComponent}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_Image | Compute distributions of image pixels using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ExpectationMaximizationMixtureModelEstimator_1D | Compute distributions of samples using GMM EM]] || {{ITKDoxygenURL|ExpectationMaximizationMixtureModelEstimator}} || Someone please confirm that this outputs the mean and the variance (i.e. I used a standard deviation of 30 to create the samples and the second estimated parameter is near 1000 (~30^2) . Is this correct?)<br />
|-<br />
| [[ITK/Examples/Broken/EdgesAndGradients/CannyEdgeDetectionImageFilter | Find edges in an image]] || {{ITKDoxygenURL|CannyEdgeDetectionImageFilter}} || How to set a reasonable Threshold for the output edges?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/ImageToHistogramFilter | Compute the histogram of an image]] || {{ITKDoxygenURL|Statistics_1_1ImageToHistogramFilter}} || The last entry of the red histogram should contain several values, but it is 0?<br />
|-<br />
| [[ITK/Examples/Broken/Statistics/KmeansModelEstimator | Classifying pixels using KMeans]] || {{ITKDoxygenURL|KmeansModelEstimator}} || How to apply the labels of the filter to the input image?<br />
|-<br />
| [[ITK/Examples/Broken/Images/RegionGrowImageFilter | Basic region growing]] || {{ITKDoxygenURL|RegionGrowImageFilter}} || Just getting started with demo...<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConnectedThresholdImageFilter | Find connected components in an image]] || {{ITKDoxygenURL|ConnectedThresholdImageFilter}} || Just need to finish it.<br />
|-<br />
| [[ITK/Examples/Broken/Images/ConvertPixelBuffer | Convert an image from one type to another]] || {{ITKDoxygenURL|ConvertPixelBuffer}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/NeighborhoodOperatorImageFunction | Apply a function to every pixel with access to its neighborhood]] || {{ITKDoxygenURL|NeighborhoodOperatorImageFunction}} ||<br />
|-<br />
| [[ITK/Examples/Broken/Images/InPlace | In-place filtering of an image]] || {{ITKDoxygenURL|InPlaceImageFilter}} || This only works for filters which derive from itkInPlaceImageFilter<br />
|-<br />
| [[ITK/Examples/Broken/Images/MirrorPadImageFilter | Pad an image]] || {{ITKDoxygenURL|MirrorPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/WrapPadImageFilter | Pad an image by wrapping]] || {{ITKDoxygenURL|WrapPadImageFilter}} || Not sure how to specify the final output size/extent. The documentation should be improved.<br />
|-<br />
| [[ITK/Examples/Broken/Images/VTKImageToImageFilter | Convert a VTK image to an ITK image]] || {{ITKDoxygenURL|VTKImageToImageFilter}} || Seems to expect an input image with only 1 component? (i.e. greyscale)<br />
<br />
|}<br />
<br />
===Big Problems===<br />
{{ITKExamplesTable}}<br />
|-<br />
| [[ITK/Examples/Broken/Images/MeanSquaresImageToImageMetric | Find the best position of the moving image in the fixed image.]] || {{ITKDoxygenURL|MeanSquaresImageToImageMetric}} || Output (0,0) is incorrect.<br />
|-<br />
| [[ITK/Examples/Broken/Images/GradientImageFilter | Compute and display the gradient of an image]] || {{ITKDoxygenURL|GradientImageFilter}} || Blank output.<br />
|}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/Tasks&diff=39259ITK/Release 4/Wrapping/Tasks2011-04-22T12:57:24Z<p>Glehmann: Created page with " ==Ashish== ===Build WrapITK=== * on the workstation * on the mac mini * write documentation on the wiki ===Build WrapITK with ccache=== * measure the build speedup * write docum..."</p>
<hr />
<div><br />
==Ashish==<br />
===Build WrapITK===<br />
* on the workstation<br />
* on the mac mini<br />
* write documentation on the wiki<br />
===Build WrapITK with ccache===<br />
* measure the build speedup<br />
* write documentation on the wiki<br />
===move the customization code in python's main CMakeLists.txt to swig macros in pyBase.i===<br />
===set up the 64 bit build on CoSMoTest-Win7 with MSVC 10===<br />
===build WrapITK with WRAP_ITK_EXPLICIT ON and OFF===<br />
* compare the build time and the bin directory size<br />
* Write the result on a wiki page.<br />
===reply to all related to wrapping on the mailing lists===<br />
===test gerrit changes related to wrapping===<br />
===MetadataDictionary access from target languages===<br />
* modify itkMetaDataDictionary.h to add those methods:<br />
+ MetaDataObjectBase::Pointer & Get(const std::string &) const;<br />
+ void Set(const std::string &, MetaDataObjectBase * );<br />
+ std::vector< std::string > Keys() const;<br />
* add a specific language customization for python, to make the metadata accessible in a more usual way.<br />
+ a __setitem__() method to add/modify a metadata in the dictionary<br />
+ a __len__() method to return the number of metadata in the dictionary<br />
+ a __getitem__() method - this one should take care to down cast the object to its real type<br />
+ a __str__() method to print the content of the dictionary<br />
+ a __iter__() method to return every elements in the dictionary one by one<br />
===Tcl SmartPointers===<br />
If you have some time, look at how SmartPointers are replaced by swig proxy objects in python and java and explore the possibility to do the same in Tcl to decrease the build time of WrapITK.<br />
===build a simple program to read an image and write it on disk with 16bit pixel type===<br />
* in c++<br />
* in python<br />
* in java<br />
* write documentation on the wiki</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39120ITK/HDF52011-04-18T20:21:27Z<p>Glehmann: /* LabelObjectLine */</p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Typing===<br />
<br />
With HDF5, everything is either a group or a dataset.<br />
<br />
ITK must be able to save many different types -- how do we store the actual ITK type in the HDF5? Attributes may be an option for that.<br />
How do we store the template parameters -- do we even need to store them? [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
<br />
===Atomic objects===<br />
<br />
Atomic objects or unbreakable basic types. They are (generally?) stored as datasets in the HDF5 files.<br />
<br />
====Index====<br />
====Size====<br />
====Point====<br />
====Matrix====<br />
====Vector====<br />
<br />
===Composite objects===<br />
<br />
Composite objects are store as groups in the HDF5 file and are made of one or more atomic or composite objects. Each object is named in the same way it is named in the ITK classes, without the leading "m_".<br />
<br />
====Version====<br />
<br />
We may need something simpler to store the version as an attribute. [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
<br />
====ImageRegion====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageRegion}}.<br />
<br />
{| border="1"<br />
! Member !! Type<br />
|-<br />
| Index || [[#Index | Index]]<br />
|-<br />
| Size || [[#Size | Size]]<br />
|}<br />
<br />
TODO: where do we store the Dimension of the ImageRegion?<br />
<br />
TODO: Is it good enough to assume that it can be deduced from the dimension of the Index and of the Size?<br />
<br />
TODO: What to do when the Index and the Size dimensions mismatch?<br />
<br />
====Histogram====<br />
<br />
TODO<br />
<br />
====ImageBase====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageBase}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Region || [[#ImageRegion | ImageRegion]] || This is the largest possible region shortened, because the different regions in itk::Image doesn't really make sense in a file storage.<br />
|-<br />
| Spacing || [[#Vector | Vector]] ||<br />
|-<br />
| Origin || [[#Point | Point]] ||<br />
|-<br />
| Direction || [[#Matrix | Matrix]] ||<br />
|}<br />
<br />
====Image====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|Image}}.<br />
Image inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Pixels || TODO || which type should be used? a dataset directly? an atomic type?<br />
|}<br />
<br />
This is not a strict requirement, but images should be saved in chunks to allow them to be efficiently streamed (both read and write) and compressed.<br />
<br />
I think the chunk size should be one on all the dimensions but x and y. Wich chunk size to choose on x and y is tricky, and may depend on the use case -- should we choose a size?<br />
<br />
====LabelObjectLine====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObjectLine}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Index || [[#Index | Index]] || <br />
|-<br />
| Length || unsigned integer || how do we describe this type?<br />
|}<br />
<br />
====LabelObject====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObject}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Label || integer || how do we describe this type?<br />
|-<br />
| Lines || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
====LabelMap====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelMap}}.<br />
LabelMap inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| LabelObjects || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
==Base path==<br />
<br />
By default, the object of interest is stored in '''/ITK''', so it can be either a atomic (HDF5 dataset) or composite object (HDF5 group). Of course it is possible to access the objects by using another or a longer path. Some classes in ITK may not provide a way to change the path of the object of interest (for example HDF5ImageIO).<br />
<br />
==Managing versions==<br />
<br />
How to do that? The version should be stored somewhere for sure - should it be:<br />
* at the base of the file? in an /ITKVersion group for example?<br />
* in each object, as an attribute? This would allow to easily copy an object from one file to another. I think I like much this method [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39116ITK/HDF52011-04-18T20:16:23Z<p>Glehmann: /* Composite objects */</p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Typing===<br />
<br />
With HDF5, everything is either a group or a dataset.<br />
<br />
ITK must be able to save many different types -- how do we store the actual ITK type in the HDF5? Attributes may be an option for that.<br />
How do we store the template parameters -- do we even need to store them? [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
<br />
===Atomic objects===<br />
<br />
Atomic objects or unbreakable basic types. They are (generally?) stored as datasets in the HDF5 files.<br />
<br />
====Index====<br />
====Size====<br />
====Point====<br />
====Matrix====<br />
====Vector====<br />
<br />
===Composite objects===<br />
<br />
Composite objects are store as groups in the HDF5 file and are made of one or more atomic or composite objects. Each object is named in the same way it is named in the ITK classes, without the leading "m_".<br />
<br />
====Version====<br />
<br />
We may need something simpler to store the version as an attribute. [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
<br />
====ImageRegion====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageRegion}}.<br />
<br />
{| border="1"<br />
! Member !! Type<br />
|-<br />
| Index || [[#Index | Index]]<br />
|-<br />
| Size || [[#Size | Size]]<br />
|}<br />
<br />
TODO: where do we store the Dimension of the ImageRegion?<br />
<br />
TODO: Is it good enough to assume that it can be deduced from the dimension of the Index and of the Size?<br />
<br />
TODO: What to do when the Index and the Size dimensions mismatch?<br />
<br />
====Histogram====<br />
<br />
TODO<br />
<br />
====ImageBase====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageBase}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Region || [[#ImageRegion | ImageRegion]] || This is the largest possible region shortened, because the different regions in itk::Image doesn't really make sense in a file storage.<br />
|-<br />
| Spacing || [[#Vector | Vector]] ||<br />
|-<br />
| Origin || [[#Point | Point]] ||<br />
|-<br />
| Direction || [[#Matrix | Matrix]] ||<br />
|}<br />
<br />
====Image====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|Image}}.<br />
Image inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Pixels || TODO || which type should be used? a dataset directly? an atomic type?<br />
|}<br />
<br />
This is not a strict requirement, but images should be saved in chunks to allow them to be efficiently streamed (both read and write) and compressed.<br />
<br />
I think the chunk size should be one on all the dimensions but x and y. Wich chunk size to choose on x and y is tricky, and may depend on the use case -- should we choose a size?<br />
<br />
====LabelObjectLine====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObjectLine}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Index || [[#Index | Index]] || <br />
|-<br />
| Lenght || unsigned integer || how do we describe this type?<br />
|}<br />
<br />
====LabelObject====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObject}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Label || integer || how do we describe this type?<br />
|-<br />
| Lines || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
====LabelMap====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelMap}}.<br />
LabelMap inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| LabelObjects || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
==Base path==<br />
<br />
By default, the object of interest is stored in '''/ITK''', so it can be either a atomic (HDF5 dataset) or composite object (HDF5 group). Of course it is possible to access the objects by using another or a longer path. Some classes in ITK may not provide a way to change the path of the object of interest (for example HDF5ImageIO).<br />
<br />
==Managing versions==<br />
<br />
How to do that? The version should be stored somewhere for sure - should it be:<br />
* at the base of the file? in an /ITKVersion group for example?<br />
* in each object, as an attribute? This would allow to easily copy an object from one file to another. I think I like much this method [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39115ITK/HDF52011-04-18T20:14:34Z<p>Glehmann: /* Base path */</p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Typing===<br />
<br />
With HDF5, everything is either a group or a dataset.<br />
<br />
ITK must be able to save many different types -- how do we store the actual ITK type in the HDF5? Attributes may be an option for that.<br />
How do we store the template parameters -- do we even need to store them? [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
<br />
===Atomic objects===<br />
<br />
Atomic objects or unbreakable basic types. They are (generally?) stored as datasets in the HDF5 files.<br />
<br />
====Index====<br />
====Size====<br />
====Point====<br />
====Matrix====<br />
====Vector====<br />
<br />
===Composite objects===<br />
<br />
Composite objects are made of one or more atomic or composite objects. Each object is named in the same way it is named in the ITK classes, without the leading "m_".<br />
They are (generally?) stored as groups in the HDF5 files.<br />
<br />
====Version====<br />
<br />
We may need something simpler to store the version as an attribute. [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
<br />
====ImageRegion====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageRegion}}.<br />
<br />
{| border="1"<br />
! Member !! Type<br />
|-<br />
| Index || [[#Index | Index]]<br />
|-<br />
| Size || [[#Size | Size]]<br />
|}<br />
<br />
TODO: where do we store the Dimension of the ImageRegion?<br />
<br />
TODO: Is it good enough to assume that it can be deduced from the dimension of the Index and of the Size?<br />
<br />
TODO: What to do when the Index and the Size dimensions mismatch?<br />
<br />
====Histogram====<br />
<br />
TODO<br />
<br />
====ImageBase====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageBase}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Region || [[#ImageRegion | ImageRegion]] || This is the largest possible region shortened, because the different regions in itk::Image doesn't really make sense in a file storage.<br />
|-<br />
| Spacing || [[#Vector | Vector]] ||<br />
|-<br />
| Origin || [[#Point | Point]] ||<br />
|-<br />
| Direction || [[#Matrix | Matrix]] ||<br />
|}<br />
<br />
====Image====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|Image}}.<br />
Image inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Pixels || TODO || which type should be used? a dataset directly? an atomic type?<br />
|}<br />
<br />
This is not a strict requirement, but images should be saved in chunks to allow them to be efficiently streamed (both read and write) and compressed.<br />
<br />
I think the chunk size should be one on all the dimensions but x and y. Wich chunk size to choose on x and y is tricky, and may depend on the use case -- should we choose a size?<br />
<br />
====LabelObjectLine====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObjectLine}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Index || [[#Index | Index]] || <br />
|-<br />
| Lenght || unsigned integer || how do we describe this type?<br />
|}<br />
<br />
====LabelObject====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObject}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Label || integer || how do we describe this type?<br />
|-<br />
| Lines || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
====LabelMap====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelMap}}.<br />
LabelMap inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| LabelObjects || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
==Base path==<br />
<br />
By default, the object of interest is stored in '''/ITK''', so it can be either a atomic (HDF5 dataset) or composite object (HDF5 group). Of course it is possible to access the objects by using another or a longer path. Some classes in ITK may not provide a way to change the path of the object of interest (for example HDF5ImageIO).<br />
<br />
==Managing versions==<br />
<br />
How to do that? The version should be stored somewhere for sure - should it be:<br />
* at the base of the file? in an /ITKVersion group for example?<br />
* in each object, as an attribute? This would allow to easily copy an object from one file to another. I think I like much this method [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39111ITK/HDF52011-04-18T20:12:14Z<p>Glehmann: /* Image */</p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Typing===<br />
<br />
With HDF5, everything is either a group or a dataset.<br />
<br />
ITK must be able to save many different types -- how do we store the actual ITK type in the HDF5? Attributes may be an option for that.<br />
How do we store the template parameters -- do we even need to store them? [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
<br />
===Atomic objects===<br />
<br />
Atomic objects or unbreakable basic types. They are (generally?) stored as datasets in the HDF5 files.<br />
<br />
====Index====<br />
====Size====<br />
====Point====<br />
====Matrix====<br />
====Vector====<br />
<br />
===Composite objects===<br />
<br />
Composite objects are made of one or more atomic or composite objects. Each object is named in the same way it is named in the ITK classes, without the leading "m_".<br />
They are (generally?) stored as groups in the HDF5 files.<br />
<br />
====Version====<br />
<br />
We may need something simpler to store the version as an attribute. [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
<br />
====ImageRegion====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageRegion}}.<br />
<br />
{| border="1"<br />
! Member !! Type<br />
|-<br />
| Index || [[#Index | Index]]<br />
|-<br />
| Size || [[#Size | Size]]<br />
|}<br />
<br />
TODO: where do we store the Dimension of the ImageRegion?<br />
<br />
TODO: Is it good enough to assume that it can be deduced from the dimension of the Index and of the Size?<br />
<br />
TODO: What to do when the Index and the Size dimensions mismatch?<br />
<br />
====Histogram====<br />
<br />
TODO<br />
<br />
====ImageBase====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageBase}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Region || [[#ImageRegion | ImageRegion]] || This is the largest possible region shortened, because the different regions in itk::Image doesn't really make sense in a file storage.<br />
|-<br />
| Spacing || [[#Vector | Vector]] ||<br />
|-<br />
| Origin || [[#Point | Point]] ||<br />
|-<br />
| Direction || [[#Matrix | Matrix]] ||<br />
|}<br />
<br />
====Image====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|Image}}.<br />
Image inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Pixels || TODO || which type should be used? a dataset directly? an atomic type?<br />
|}<br />
<br />
This is not a strict requirement, but images should be saved in chunks to allow them to be efficiently streamed (both read and write) and compressed.<br />
<br />
I think the chunk size should be one on all the dimensions but x and y. Wich chunk size to choose on x and y is tricky, and may depend on the use case -- should we choose a size?<br />
<br />
====LabelObjectLine====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObjectLine}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Index || [[#Index | Index]] || <br />
|-<br />
| Lenght || unsigned integer || how do we describe this type?<br />
|}<br />
<br />
====LabelObject====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObject}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Label || integer || how do we describe this type?<br />
|-<br />
| Lines || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
====LabelMap====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelMap}}.<br />
LabelMap inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| LabelObjects || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
==Base path==<br />
<br />
By default, the object of interest is stored in '''/ITK''', so it can be either a atomic (HDF5 dataset) or composite object (HDF5 group). Of course it is possible to access the objects by using another or a longer path.<br />
<br />
==Managing versions==<br />
<br />
How to do that? The version should be stored somewhere for sure - should it be:<br />
* at the base of the file? in an /ITKVersion group for example?<br />
* in each object, as an attribute? This would allow to easily copy an object from one file to another. I think I like much this method [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39106ITK/HDF52011-04-18T20:06:26Z<p>Glehmann: /* Protocol */</p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Typing===<br />
<br />
With HDF5, everything is either a group or a dataset.<br />
<br />
ITK must be able to save many different types -- how do we store the actual ITK type in the HDF5? Attributes may be an option for that.<br />
How do we store the template parameters -- do we even need to store them? [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
<br />
===Atomic objects===<br />
<br />
Atomic objects or unbreakable basic types. They are (generally?) stored as datasets in the HDF5 files.<br />
<br />
====Index====<br />
====Size====<br />
====Point====<br />
====Matrix====<br />
====Vector====<br />
<br />
===Composite objects===<br />
<br />
Composite objects are made of one or more atomic or composite objects. Each object is named in the same way it is named in the ITK classes, without the leading "m_".<br />
They are (generally?) stored as groups in the HDF5 files.<br />
<br />
====Version====<br />
<br />
We may need something simpler to store the version as an attribute. [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)<br />
<br />
====ImageRegion====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageRegion}}.<br />
<br />
{| border="1"<br />
! Member !! Type<br />
|-<br />
| Index || [[#Index | Index]]<br />
|-<br />
| Size || [[#Size | Size]]<br />
|}<br />
<br />
TODO: where do we store the Dimension of the ImageRegion?<br />
<br />
TODO: Is it good enough to assume that it can be deduced from the dimension of the Index and of the Size?<br />
<br />
TODO: What to do when the Index and the Size dimensions mismatch?<br />
<br />
====Histogram====<br />
<br />
TODO<br />
<br />
====ImageBase====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageBase}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Region || [[#ImageRegion | ImageRegion]] || This is the largest possible region shortened, because the different regions in itk::Image doesn't really make sense in a file storage.<br />
|-<br />
| Spacing || [[#Vector | Vector]] ||<br />
|-<br />
| Origin || [[#Point | Point]] ||<br />
|-<br />
| Direction || [[#Matrix | Matrix]] ||<br />
|}<br />
<br />
====Image====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|Image}}.<br />
Image inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Pixels || TODO || which type should be used? a dataset directly? an atomic type?<br />
|}<br />
<br />
====LabelObjectLine====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObjectLine}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Index || [[#Index | Index]] || <br />
|-<br />
| Lenght || unsigned integer || how do we describe this type?<br />
|}<br />
<br />
====LabelObject====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObject}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Label || integer || how do we describe this type?<br />
|-<br />
| Lines || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
====LabelMap====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelMap}}.<br />
LabelMap inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| LabelObjects || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
==Base path==<br />
<br />
By default, the object of interest is stored in '''/ITK''', so it can be either a atomic (HDF5 dataset) or composite object (HDF5 group). Of course it is possible to access the objects by using another or a longer path.<br />
<br />
==Managing versions==<br />
<br />
How to do that? The version should be stored somewhere for sure - should it be:<br />
* at the base of the file? in an /ITKVersion group for example?<br />
* in each object, as an attribute? This would allow to easily copy an object from one file to another. I think I like much this method [[User:Glehmann|Glehmann]] 16:06, 18 April 2011 (EDT)</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39103ITK/HDF52011-04-18T19:48:51Z<p>Glehmann: /* Composite objects */</p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Atomic objects===<br />
<br />
Atomic objects or unbreakable basic types. They are (generally?) stored as datasets in the HDF5 files.<br />
<br />
====Index====<br />
====Size====<br />
====Point====<br />
====Matrix====<br />
====Vector====<br />
<br />
===Composite objects===<br />
<br />
Composite objects are made of one or more atomic or composite objects. Each object is named in the same way it is named in the ITK classes, without the leading "m_".<br />
They are (generally?) stored as groups in the HDF5 files.<br />
<br />
====Version====<br />
====ImageRegion====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageRegion}}.<br />
<br />
{| border="1"<br />
! Member !! Type<br />
|-<br />
| Index || [[#Index | Index]]<br />
|-<br />
| Size || [[#Size | Size]]<br />
|}<br />
<br />
TODO: where do we store the Dimension of the ImageRegion?<br />
<br />
TODO: Is it good enough to assume that it can be deduced from the dimension of the Index and of the Size?<br />
<br />
TODO: What to do when the Index and the Size dimensions mismatch?<br />
<br />
====Histogram====<br />
====ImageBase====<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Region || [[#ImageRegion | ImageRegion]] || This is the largest possible region shortened, because the different regions in itk::Image doesn't really make sense in a file storage.<br />
|-<br />
| Spacing || [[#Vector | Vector]] ||<br />
|-<br />
| Origin || [[#Point | Point]] ||<br />
|-<br />
| Direction || [[#Matrix | Matrix]] ||<br />
|}<br />
<br />
====Image====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|Image}}.<br />
Image inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Pixels || TODO || which type should be used? a dataset directly? an atomic type?<br />
|}<br />
<br />
====LabelObjectLine====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObjectLine}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Index || [[#Index | Index]] || <br />
|-<br />
| Lenght || unsigned integer || how do we describe this type?<br />
|}<br />
<br />
====LabelObject====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelObject}}.<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Label || integer || how do we describe this type?<br />
|-<br />
| Lines || TODO || which type should be used? a group directly? an composite type?<br />
|}<br />
<br />
====LabelMap====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|LabelMap}}.<br />
LabelMap inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| LabelObjects || TODO || which type should be used? a group directly? an composite type?<br />
|}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39102ITK/HDF52011-04-18T19:40:40Z<p>Glehmann: /* ImageBase */</p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Atomic objects===<br />
<br />
Atomic objects or unbreakable basic types. They are (generally?) stored as datasets in the HDF5 files.<br />
<br />
====Index====<br />
====Size====<br />
====Point====<br />
====Matrix====<br />
====Vector====<br />
<br />
===Composite objects===<br />
<br />
Composite objects are made of one or more atomic or composite objects. Each object is named in the same way it is named in the ITK classes, without the leading "m_".<br />
They are (generally?) stored as groups in the HDF5 files.<br />
<br />
====Version====<br />
====ImageRegion====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageRegion}}.<br />
<br />
{| border="1"<br />
! Member !! Type<br />
|-<br />
| Index || [[#Index | Index]]<br />
|-<br />
| Size || [[#Size | Size]]<br />
|}<br />
<br />
TODO: where do we store the Dimension of the ImageRegion?<br />
<br />
TODO: Is it good enough to assume that it can be deduced from the dimension of the Index and of the Size?<br />
<br />
TODO: What to do when the Index and the Size dimensions mismatch?<br />
<br />
====Histogram====<br />
====ImageBase====<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Region || [[#ImageRegion | ImageRegion]] || This is the largest possible region shortened, because the different regions in itk::Image doesn't really make sense in a file storage.<br />
|-<br />
| Spacing || [[#Vector | Vector]] ||<br />
|-<br />
| Origin || [[#Point | Point]] ||<br />
|-<br />
| Direction || [[#Matrix | Matrix]] ||<br />
|}<br />
<br />
====Image====<br />
<br />
Image provides inherits the members of [[#ImageBase | ImageBase]] and adds its own members.<br />
<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Pixels || TODO || which type should be used? a dataset directly? an atomic type?<br />
|}<br />
<br />
====LabelObject====<br />
====LabelMap====</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39101ITK/HDF52011-04-18T19:36:44Z<p>Glehmann: /* Composite objects */</p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Atomic objects===<br />
<br />
Atomic objects or unbreakable basic types. They are (generally?) stored as datasets in the HDF5 files.<br />
<br />
====Index====<br />
====Size====<br />
====Point====<br />
====Matrix====<br />
====Vector====<br />
<br />
===Composite objects===<br />
<br />
Composite objects are made of one or more atomic or composite objects. Each object is named in the same way it is named in the ITK classes, without the leading "m_".<br />
They are (generally?) stored as groups in the HDF5 files.<br />
<br />
====Version====<br />
====ImageRegion====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageRegion}}.<br />
<br />
{| border="1"<br />
! Member !! Type<br />
|-<br />
| Index || [[#Index | Index]]<br />
|-<br />
| Size || [[#Size | Size]]<br />
|}<br />
<br />
TODO: where do we store the Dimension of the ImageRegion?<br />
<br />
TODO: Is it good enough to assume that it can be deduced from the dimension of the Index and of the Size?<br />
<br />
TODO: What to do when the Index and the Size dimensions mismatch?<br />
<br />
====Histogram====<br />
====ImageBase====<br />
<br />
<br />
{| border="1"<br />
! Member !! Type !! Comment<br />
|-<br />
| Region || [[#ImageRegion | ImageRegion]] || This is the largest possible region shortened, because the different regions in itk::Image doesn't really make sense in a file storage.<br />
|-<br />
| Spacing || [[#Vector | Vector]] ||<br />
|-<br />
| Origin || [[#Point | Point]] ||<br />
|-<br />
| Direction || [[#Matrix | Matrix]] ||<br />
|}<br />
<br />
====LabelObject====<br />
====LabelMap====</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39100ITK/HDF52011-04-18T19:24:25Z<p>Glehmann: /* Protocol */</p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Atomic objects===<br />
<br />
Atomic objects or unbreakable basic types. They are (generally?) stored as datasets in the HDF5 files.<br />
<br />
====Index====<br />
====Size====<br />
====Point====<br />
====Matrix====<br />
====Vector====<br />
<br />
===Composite objects===<br />
<br />
Composite objects are made of one or more atomic or composite objects. Each object is named in the same way it is named in the ITK classes, without the leading "m_".<br />
They are (generally?) stored as groups in the HDF5 files.<br />
<br />
====Version====<br />
====ImageRegion====<br />
<br />
This is the storage of the class {{ITKDoxygenURL|ImageRegion}}.<br />
<br />
{| border="1"<br />
! Member !! Type<br />
|-<br />
| Index || [[#Index | Index]]<br />
|-<br />
| Size || [[#Size | Size]]<br />
|}<br />
<br />
TODO: where do we store the Dimension of the ImageRegion?<br />
<br />
TODO: Is it good enough to assume that it can be deduced from the dimension of the Index and of the Size?<br />
<br />
TODO: What to do when the Index and the Size dimensions mismatch?<br />
<br />
====Histogram====<br />
====Image====<br />
====LabelObject====<br />
====LabelMap====</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39099ITK/HDF52011-04-18T19:06:47Z<p>Glehmann: /* Compound objects */</p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Atomic objects===<br />
<br />
====Index====<br />
====Size====<br />
====Point====<br />
====Matrix====<br />
====Vector====<br />
<br />
===Compound objects===<br />
<br />
====Version===<br />
====ImageRegion====<br />
====Histogram====<br />
====Image====<br />
====LabelObject====<br />
====LabelMap====</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/HDF5&diff=39098ITK/HDF52011-04-18T19:03:35Z<p>Glehmann: Created page with "==HDF5 file format and library== HDF5 is both a file format and a library dedicated to reading and writing files in that format. According to Wikipedia, "HDF5 include only two m..."</p>
<hr />
<div>==HDF5 file format and library==<br />
HDF5 is both a file format and a library dedicated to reading and writing files in that format.<br />
<br />
According to Wikipedia, "HDF5 include only two major types of object:<br />
* Datasets, which are multidimensional arrays of a homogenous type<br />
* Groups, which are container structures which can hold datasets and other groups<br />
This results in a truly hierarchical, filesystem-like data format. In fact, resources in an HDF5 file are even accessed using the POSIX-like syntax /path/to/resource. Metadata is stored in the form of user-defined, named attributes attached to groups and datasets. More complex storage APIs representing images and tables can then be built up using datasets, groups and attributes.<br />
In addition to these advances in the file format, HDF5 includes an improved type system, and dataspace objects which represent selections over dataset regions. The API is also object-oriented with respect to datasets, groups, attributes, types, dataspaces and property lists.<br />
Because it uses B-trees to index table objects, HDF5 works well for Time series data such as stock price series, network monitoring data, and 3D meteorological data. The bulk of the data goes into straightforward arrays (the table objects) that can be accessed much more quickly than the rows of a SQL database, but B-Tree access is available for non-array data. The HDF5 data storage mechanism can be simpler and faster than an SQL Star schema."<br />
<br />
It is available in BSD-like license.<br />
<br />
==Use cases==<br />
<br />
===ImageIO===<br />
<br />
(From[[Proposals:HDF5_ImageIO]])<br />
* Chunking (streaming)<br />
* Multi-Resolution<br />
* Multi-Channel images<br />
* Large datasets ( Size > 4Gb )<br />
* Single experiment images of size 1024 x 1024 x 75 (XYZ), 2 channels, 1000 time-points<br />
* 8bit and 16bit<br />
* Images stored as 2D PNGs with filenames giving location<br />
* Need to support optimized reading (image streaming) of a sub-volume<br />
* Eg: Box filtering using a kernel of size 5x5x1x1x3<br />
* Cyclic buffer optimization in the ITK reader that keeps overlapping data and only reads new data<br />
* Multi-resolution images for heirarchical registration of multiple experimental sets<br />
* Compression is not as important in the short term but will be needed in the long term<br />
<br />
===TransformIO===<br />
<br />
==Protocol==<br />
<br />
===Atomic objects===<br />
<br />
====Index====<br />
====Size====<br />
====Point====<br />
====Matrix====<br />
====Vector====<br />
<br />
===Compound objects===<br />
<br />
====ImageRegion====<br />
====Histogram====<br />
====Image====<br />
====LabelObject====<br />
====LabelMap====</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/SpectralAnalysis/CrossCorrelationInFourierDomain&diff=39052ITK/Examples/SpectralAnalysis/CrossCorrelationInFourierDomain2011-04-16T14:36:58Z<p>Glehmann: /* CrossCorrelationInFourierDomain.cxx */</p>
<hr />
<div>==CrossCorrelationInFourierDomain.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkImageFileReader.h"<br />
#include "itkImageFileWriter.h"<br />
<br />
#include "itkVnlFFTRealToComplexConjugateImageFilter.h"<br />
#include "itkVnlFFTComplexConjugateToRealImageFilter.h"<br />
#include "itkComplexToRealImageFilter.h"<br />
#include "itkComplexToImaginaryImageFilter.h"<br />
#include "itkRealAndImaginaryToComplexImageFilter.h"<br />
#include "itkMultiplyByConstantImageFilter.h"<br />
#include "itkMultiplyImageFilter.h"<br />
#include "itkRescaleIntensityImageFilter.h"<br />
#include "itkFFTShiftImageFilter.h"<br />
#include "itkMinimumMaximumImageCalculator.h"<br />
<br />
int main(int argc, char*argv[])<br />
{<br />
const unsigned int Dimension = 2;<br />
typedef float PixelType;<br />
typedef itk::Image< PixelType, Dimension > FloatImageType;<br />
typedef itk::Image< unsigned char, Dimension > UnsignedCharImageType;<br />
<br />
if( argc < 3 )<br />
{<br />
std::cerr << "Missing Parameters " << std::endl;<br />
std::cerr << "Usage: " << argv[0];<br />
std::cerr << " FixedImage MovingImage"<< std::endl;;<br />
return EXIT_FAILURE;<br />
}<br />
std::string fixedImageFilename = argv[1];<br />
std::string movingImageFilename = argv[2];<br />
<br />
// Read the input images<br />
typedef itk::ImageFileReader< FloatImageType > ImageReaderType;<br />
ImageReaderType::Pointer fixedImageReader = ImageReaderType::New();<br />
fixedImageReader->SetFileName( fixedImageFilename );<br />
fixedImageReader->Update();<br />
<br />
ImageReaderType::Pointer movingImageReader = ImageReaderType::New();<br />
movingImageReader->SetFileName( movingImageFilename );<br />
movingImageReader->Update();<br />
<br />
// Shift the input images<br />
typedef itk::FFTShiftImageFilter< FloatImageType, FloatImageType > FFTShiftFilterType;<br />
FFTShiftFilterType::Pointer fixedFFTShiftFilter = FFTShiftFilterType::New();<br />
fixedFFTShiftFilter->SetInput(fixedImageReader->GetOutput());<br />
fixedFFTShiftFilter->Update();<br />
<br />
FFTShiftFilterType::Pointer movingFFTShiftFilter = FFTShiftFilterType::New();<br />
movingFFTShiftFilter->SetInput(movingImageReader->GetOutput());<br />
movingFFTShiftFilter->Update();<br />
<br />
// Compute the FFT of the input<br />
typedef itk::VnlFFTRealToComplexConjugateImageFilter< FloatImageType > FFTFilterType;<br />
FFTFilterType::Pointer fixedFFTFilter = FFTFilterType::New();<br />
fixedFFTFilter->SetInput( fixedFFTShiftFilter->GetOutput() );<br />
fixedFFTFilter->Update();<br />
<br />
FFTFilterType::Pointer movingFFTFilter = FFTFilterType::New();<br />
movingFFTFilter->SetInput( movingFFTShiftFilter->GetOutput() );<br />
<br />
typedef FFTFilterType::OutputImageType SpectralImageType;<br />
<br />
// Take the conjugate of the fftFilterMoving<br />
// Extract the real part<br />
typedef itk::ComplexToRealImageFilter<SpectralImageType, FloatImageType> RealFilterType;<br />
RealFilterType::Pointer realFilter = RealFilterType::New();<br />
realFilter->SetInput(movingFFTFilter->GetOutput());<br />
<br />
// Extract the imaginary part<br />
typedef itk::ComplexToImaginaryImageFilter<SpectralImageType, FloatImageType> ImaginaryFilterType;<br />
ImaginaryFilterType::Pointer imaginaryFilter = ImaginaryFilterType::New();<br />
imaginaryFilter->SetInput(movingFFTFilter->GetOutput());<br />
<br />
// Flip the sign of the imaginary and combine with the real part again<br />
typedef itk::MultiplyByConstantImageFilter<FloatImageType,PixelType,FloatImageType> MultiplyConstantFilterType;<br />
MultiplyConstantFilterType::Pointer flipSignFilter = MultiplyConstantFilterType::New();<br />
flipSignFilter->SetConstant(-1);<br />
flipSignFilter->SetInput(imaginaryFilter->GetOutput());<br />
typedef itk::RealAndImaginaryToComplexImageFilter<PixelType,PixelType,PixelType,2> RealImagToComplexFilterType;<br />
RealImagToComplexFilterType::Pointer conjugateFilter = RealImagToComplexFilterType::New();<br />
conjugateFilter->SetInput1(realFilter->GetOutput());<br />
conjugateFilter->SetInput2(flipSignFilter->GetOutput());<br />
<br />
// The conjugate product of the spectrum<br />
typedef itk::MultiplyImageFilter< SpectralImageType,<br />
SpectralImageType,<br />
SpectralImageType > MultiplyFilterType;<br />
MultiplyFilterType::Pointer multiplyFilter = MultiplyFilterType::New();<br />
multiplyFilter->SetInput1( fixedFFTFilter->GetOutput() );<br />
multiplyFilter->SetInput2( conjugateFilter->GetOutput() );<br />
<br />
// IFFT<br />
typedef itk::VnlFFTComplexConjugateToRealImageFilter< SpectralImageType > IFFTFilterType;<br />
IFFTFilterType::Pointer fftInverseFilter = IFFTFilterType::New();<br />
fftInverseFilter->SetInput( multiplyFilter->GetOutput() );<br />
<br />
// Write the spectrum<br />
typedef itk::RescaleIntensityImageFilter< FloatImageType, UnsignedCharImageType > RescaleFilterType;<br />
RescaleFilterType::Pointer rescaler = RescaleFilterType::New();<br />
rescaler->SetInput( fftInverseFilter->GetOutput() );<br />
rescaler->SetOutputMinimum(0);<br />
rescaler->SetOutputMaximum(255);<br />
rescaler->Update();<br />
<br />
typedef itk::ImageFileWriter< UnsignedCharImageType > WriterType;<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetFileName( "CrossCorr.png" );<br />
writer->SetInput( rescaler->GetOutput() );<br />
writer->Update();<br />
<br />
typedef itk::MinimumMaximumImageCalculator <UnsignedCharImageType><br />
ImageCalculatorFilterType;<br />
<br />
ImageCalculatorFilterType::Pointer imageCalculatorFilter<br />
= ImageCalculatorFilterType::New ();<br />
imageCalculatorFilter->SetImage(rescaler->GetOutput());<br />
imageCalculatorFilter->Compute();<br />
<br />
UnsignedCharImageType::IndexType maximumLocation = imageCalculatorFilter->GetIndexOfMaximum();<br />
std::cout << maximumLocation << std::endl; // should be (17,15)<br />
<br />
/*<br />
if ypeak < size(I,1)/2 ypeak = -(ypeak-1);<br />
else ypeak = size(I,1) - (ypeak-1);<br />
end<br />
if xpeak < size(I,2)/2 xpeak = -(xpeak-1);<br />
else xpeak = size(I,2) - (xpeak-1);<br />
end<br />
*/<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
</source><br />
<br />
{{ITKCMakeLists|CrossCorrelationInFourierDomain}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter&diff=39051ITK/Examples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter2011-04-16T14:35:00Z<p>Glehmann: /* VnlFFTRealToComplexConjugateImageFilter.cxx */</p>
<hr />
<div><div class="floatcenter">[[File:ITK_Examples_Baseline_SpectralAnalysis_TestVnlFFTRealToComplexConjugateImageFilter.png]]</div><br />
==VnlFFTRealToComplexConjugateImageFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkVnlFFTRealToComplexConjugateImageFilter.h"<br />
#include "itkComplexToRealImageFilter.h"<br />
#include "itkComplexToImaginaryImageFilter.h"<br />
#include "itkComplexToModulusImageFilter.h"<br />
#include "itkImageFileReader.h"<br />
#include "itkCastImageFilter.h"<br />
#include "itkPasteImageFilter.h"<br />
<br />
#include <itksys/SystemTools.hxx><br />
#include "vnl/vnl_sample.h"<br />
#include <math.h><br />
<br />
#include <itkImageToVTKImageFilter.h><br />
<br />
#include "QuickView.h"<br />
<br />
int main(int argc, char*argv[])<br />
{<br />
// Verify input<br />
if(argc < 2)<br />
{<br />
std::cerr << "Required: filename" << std::endl;<br />
return EXIT_FAILURE;<br />
}<br />
<br />
// Define some types<br />
typedef itk::Image<float, 2> FloatImageType;<br />
<br />
// Read the image<br />
typedef itk::ImageFileReader<FloatImageType> ReaderType;<br />
ReaderType::Pointer reader = ReaderType::New();<br />
reader->SetFileName(argv[1]);<br />
reader->Update();<br />
<br />
// Compute the smallest power of two that is bigger than the image<br />
unsigned int powerOfTwo = 0;<br />
for(unsigned int i = 0; i < 20; i++)<br />
{<br />
if(pow(2, i) >= reader->GetOutput()->GetLargestPossibleRegion().GetSize()[0] &&<br />
pow(2, i) >= reader->GetOutput()->GetLargestPossibleRegion().GetSize()[1])<br />
{<br />
powerOfTwo = i;<br />
break;<br />
}<br />
}<br />
<br />
// Create an image bigger than the input image and that has<br />
// dimensions which are powers of two<br />
itk::Index<2> start;<br />
start.Fill(0);<br />
<br />
itk::Size<2> size;<br />
size.Fill(pow(2,powerOfTwo));<br />
<br />
itk::ImageRegion<2> region(start, size);<br />
<br />
FloatImageType::Pointer image = FloatImageType::New();<br />
image->SetRegions(region);<br />
image->Allocate();<br />
image->FillBuffer(0);<br />
<br />
// The image dimensions must be powers of two<br />
typedef itk::PasteImageFilter <FloatImageType, FloatImageType ><br />
PasteImageFilterType;<br />
itk::Index<2> destinationIndex;<br />
destinationIndex.Fill(0);<br />
<br />
PasteImageFilterType::Pointer pasteFilter<br />
= PasteImageFilterType::New ();<br />
pasteFilter->SetSourceImage(reader->GetOutput());<br />
pasteFilter->SetDestinationImage(image);<br />
pasteFilter->SetSourceRegion(reader->GetOutput()->GetLargestPossibleRegion());<br />
pasteFilter->SetDestinationIndex(destinationIndex);<br />
pasteFilter->Update();<br />
<br />
image->Graft(pasteFilter->GetOutput());<br />
<br />
// Compute the FFT<br />
typedef itk::VnlFFTRealToComplexConjugateImageFilter<FloatImageType> FFTType;<br />
FFTType::Pointer fftFilter = FFTType::New();<br />
fftFilter->SetInput(image);<br />
<br />
// Extract the real part<br />
typedef itk::ComplexToRealImageFilter<FFTType::OutputImageType, FloatImageType> RealFilterType;<br />
RealFilterType::Pointer realFilter = RealFilterType::New();<br />
realFilter->SetInput(fftFilter->GetOutput());<br />
<br />
// Extract the complex part<br />
typedef itk::ComplexToImaginaryImageFilter<FFTType::OutputImageType, FloatImageType> ImaginaryFilterType;<br />
ImaginaryFilterType::Pointer imaginaryFilter = ImaginaryFilterType::New();<br />
imaginaryFilter->SetInput(fftFilter->GetOutput());<br />
<br />
// Compute the magnitude<br />
typedef itk::ComplexToModulusImageFilter<FFTType::OutputImageType, FloatImageType> ModulusFilterType;<br />
ModulusFilterType::Pointer modulusFilter = ModulusFilterType::New();<br />
modulusFilter->SetInput(fftFilter->GetOutput());<br />
<br />
QuickView viewer;<br />
viewer.AddImage(image.GetPointer(), true,<br />
itksys::SystemTools::GetFilenameName(argv[1]));<br />
viewer.AddImage(realFilter->GetOutput(), true,<br />
"Real");<br />
viewer.AddImage(imaginaryFilter->GetOutput(), true,<br />
"Imaginary");<br />
viewer.AddImage(modulusFilter->GetOutput(), true,<br />
"Magnitude");<br />
viewer.Visualize();<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
</source><br />
<br />
{{ITKVTKCMakeLists|VnlFFTRealToComplexConjugateImageFilter|}}</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Tcons/Agendas/2011_04_15&diff=39020ITK/Tcons/Agendas/2011 04 152011-04-15T07:39:44Z<p>Glehmann: /* Database Interface */</p>
<hr />
<div>= How to Join the Tcon =<br />
<br />
== Number to Call ==<br />
<br />
'''Please be patient, due to some unforeseen circumstances, the call may not start on time...'''<br />
<br />
* 1-800-728-9607 (in the US) or<br />
* +1 9139049873 (international)<br />
* access code 6815251<br />
<br />
== Webex ==<br />
<br />
* Meeting link<br />
* https://emeetings.webex.com/emeetings/j.php?ED=138191182&UID=482060457&PW=NNzJiNDk1ZGU3<br />
<br />
= Project Management =<br />
<br />
== June Meeting in Chapel Hill ==<br />
<br />
* [[Summer_ITKv4_2011_Meeting]] <br />
* Will take place on June 28-29<br />
* Chapel Hill, North Carolina.<br />
* Bar-B-Q dinner<br />
<br />
= Technical Topics =<br />
<br />
== ITK Modularization Residuals ==<br />
<br />
* Check the TODO list file<br />
<br />
*** Enabling Examples (DONE)<br />
*** Doxygen documentation (DONE)<br />
*** KWStyle configuration (DONE)<br />
** http://kwsource.kitwarein.com/itk/itk/blobs/master/TODO-Modularization.txt<br />
*** Installation ?<br />
*** [[ITK_Release_4/Modularization|Wiki Documentation]]<br />
<br />
* [[ITK_Release_4/Modularization/Use Cases|Use Cases]]<br />
<br />
== Dashboard ==<br />
<br />
=== Monolithic Dashboard ===<br />
<br />
* Dashboard Status - [http://www.cdash.org/CDash/index.php?project=Insight Today's Dashboard]<br />
<br />
=== Modular Dashboard ===<br />
<br />
* http://www.cdash.org/CDash/index.php?project=ITKModular<br />
<br />
=== OPENJPEG Dashboard ===<br />
<br />
* http://my.cdash.org/index.php?project=OPENJPEG<br />
<br />
<br />
== Valgrind Errors ==<br />
<br />
* Related to the new itkTestDriver<br />
<br />
== ImageRegionDuplicator ==<br />
<br />
* The goal is to accelerate image region to region coping where possible<br />
* memcpy vs std:copy<br />
* http://review.source.kitware.com/#change,1277<br />
<br />
<br />
==Schedule==<br />
<br />
=== ITKv4 A06 ===<br />
<br />
* [[ITK_Release_4/Modularization/Transition Plan|Transition Plan]]<br />
** Tag done<br />
<br />
=== ITKv4 A07 ===<br />
<br />
* Let's tag now<br />
* The changes after modularization are enormous and we don't have a tag that marks the repository past the events<br />
* Many other changes are getting into the repository, and the diff between A07 and A06 is not longer: just modularization.<br />
<br />
== Image Interpretation Layer ==<br />
<br />
* [[Media:ITK-ImageInterpretationLayer.odp|ODP]]<br />
* [[Media:ITK-ImageInterpretationLayer.pdf|PDF]]<br />
<br />
=== Database Interface ===<br />
<br />
* https://github.com/luisibanez/LargeImageDatabaseITKIO<br />
* Can this be combined with DICOM ?<br />
* How about Video ?<br />
* Can it be useful with HDF5 IO too? http://review.source.kitware.com/#change,1401<br />
<br />
== Gerrit Reviews ==<br />
<br />
* http://review.source.kitware.com/#q,status:open,n,z<br />
<br />
== Orfeo Toolbox Integration ==<br />
<br />
* Had tcon with the OTB team<br />
* Discussed registration of ImageIO factories in OTB<br />
* Reviewed the patch for supporting images of std::complex<br />
* Need to schedule call with Microscopy, Video and Remote Sensing groups to design a common "image interpretation layer"<br />
<br />
== SimpleITK ==<br />
<br />
* Doxygen: http://erie.nlm.nih.gov/~blowek1/SimpleITK/index.html<br />
* Github: https://github.com/SimpleITK/SimpleITK<br />
* sitk::Image now using Copy on Write<br />
** Filter pass and return Image's as non-pointer Images<br />
* Succeeded to connect SimpleITK image buffers to Java arrays.<br />
* Started to create SimpleITK plugins for ICY<br />
** http://www.bioimageanalysis.org/icy/<br />
<br />
== ITK FEM ==<br />
[[ITK FEM Modifications]]<br />
<br />
== Doxygen ==<br />
<br />
* what about enabling the "edit comments" to submit patches to gerrit? [http://www.itk.org/Doxygen/html/classitk_1_1RecursiveGaussianImageFilter.html see documented class]<br />
<br />
* scripts<br />
** scripts to add the module for each class in the doxygen documentation?<br />
** scripts to add (automatically) links to wiki example in the doxygen documentation?<br />
** scripts to add examples/tests to doxygen documentation (for each class, whenever it is relevant)?</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/BuildProcess&diff=38987ITK/Release 4/Wrapping/BuildProcess2011-04-12T20:12:44Z<p>Glehmann: /* Configuration */</p>
<hr />
<div>Wrapping build is done in several steps.<br />
<br />
=Configuration=<br />
<br />
The configuration is done with with the tool used to build ITK: CMake. All the files cited in this section are located in the '''ITK/Wrapping/WrapITK directory'''.<br />
<br />
During this step, the template instantiations are generated with a several CMake macros. For each macro call of the template instantiation process, some callback macros specific of each language generator are called to generate the files and the commands needed to build the wrappers.<br />
The template instantiation and the code generation are completely separated.<br />
<br />
==Template instantiation==<br />
<br />
Everything is done in the `Libraries` directory. The instantiations are separated in two levels:<br />
<br />
* the libraries, which are grouping several modules. Generally, one binary for a target language contains all the instantiations from one library;<br />
* the modules, inside those libraries. Each module groups several template instantiations. The swig interface generator generates one '.i' file per module.<br />
<br />
Even if it is usually a good idea to follow this structure, the generators are not forced to respect this structure. They are free to generate what they wan how they want.<br />
<br />
Several macros are available to simplify the template instantiations.<br />
<br />
==Macros==<br />
<br />
The macros are defined in '''TypedefMacros.cmake'''.<br />
<br />
===WRAP_LIBRARIES and END_WRAP_LIBRARIES===<br />
<br />
'''WRAP_LIBRARIES''' is called before generating any library. The generator should use the call back on this macro if they need to perform some initialization step. '''END_WRAP_LIBRARIES''' is called after the last instantiation in the last library is done. The generators should use the callback on this macro to create some extra step — for example to build the tests.<br />
<br />
===WRAP_LIBRARY and END_WRAP_LIBRARY===<br />
Formely BEGIN_WRAPPER_LIBRARY and WRAPPER_LIBRARY_CREATE_LIBRARY.<br />
===INCLUDE_LIBRARY===<br />
===AUTO_INCLUDE_MODULES===<br />
Formely WRAPPER_LIBRARY_CREATE_WRAP_FILES.<br />
===INCLUDE_MODULE===<br />
Formely INCLUDE_WRAP_CMAKE.<br />
===WRAP_MODULE and END_WRAP_MODULE===<br />
===WRAP_CLASS===<br />
===WRAP_NAMED_CLASS===<br />
===WRAP_NON_TEMPLATE_CLASS===<br />
===WRAP_NAMED_NON_TEMPLATE_CLASS===<br />
===WRAP_INCLUDE===<br />
===END_WRAP_CLASS===<br />
===ADD_SIMPLE_TYPEDEF===<br />
===ADD_ONE_TYPEDEF===<br />
===WRAP_TEMPLATE===<br />
===WRAP_IMAGE_FILTER_ALL_TYPES===<br />
===WRAP_IMAGE_FILTER_SCALAR===<br />
===WRAP_IMAGE_FILTER_VECTOR===<br />
===WRAP_IMAGE_FILTER_USIGN_INT===<br />
===WRAP_IMAGE_FILTER_SIGN_INT===<br />
===WRAP_IMAGE_FILTER_INT===<br />
===WRAP_IMAGE_FILTER_REAL===<br />
===WRAP_IMAGE_FILTER_RGB===<br />
===WRAP_IMAGE_FILTER_RGBA===<br />
===WRAP_IMAGE_FILTER_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COV_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COMPLEX_REAL===<br />
===WRAP_IMAGE_FILTER===<br />
===WRAP_IMAGE_FILTER_COMBINATIONS===<br />
===WRAP_IMAGE_FILTER_TYPES===<br />
===FILTER_DIMS===<br />
<br />
==Code generator==<br />
<br />
Everything is done in the 'Languages' directory.<br />
<br />
==Code generation==<br />
<br />
=Build=<br />
<br />
==Generation XML descriptions of instantiations==<br />
<br />
==Generation of XML documentation==<br />
<br />
==Generation of swig interfaces==<br />
<br />
==Generation of Language specific C++ code==<br />
<br />
==Compilation of C++ code==<br />
<br />
==Linking of libraries==<br />
<br />
==Compilation of tests==</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/BuildProcess&diff=38986ITK/Release 4/Wrapping/BuildProcess2011-04-12T20:03:41Z<p>Glehmann: /* Macros */</p>
<hr />
<div>Wrapping build is done in several steps.<br />
<br />
=Configuration=<br />
<br />
This is done with CMake. During this step, the template instantiations are generated by parsing the files in Wrapping/WrapITK/Libraries. For each macro call of the template instantiation process, some callback macros specific of each language generator are called to generate the files and the commands needed to build the wrappers.<br />
<br />
==Template instantiation==<br />
<br />
Everything is done in the `Libraries` directory. The instantiations are separated in two levels:<br />
<br />
* the libraries, which are grouping several modules. Generally, one binary for a target language contains all the instantiations from one library;<br />
* the modules, inside those libraries. Each module groups several template instantiations. The swig interface generator generates one '.i' file per module.<br />
<br />
Several macros are available to simplify the template instantiations.<br />
<br />
==Macros==<br />
<br />
The macros are defined in '''TypedefMacros.cmake'''.<br />
<br />
===WRAP_LIBRARIES and END_WRAP_LIBRARIES===<br />
===WRAP_LIBRARY and END_WRAP_LIBRARY===<br />
Formely BEGIN_WRAPPER_LIBRARY and WRAPPER_LIBRARY_CREATE_LIBRARY.<br />
===INCLUDE_LIBRARY===<br />
===AUTO_INCLUDE_MODULES===<br />
Formely WRAPPER_LIBRARY_CREATE_WRAP_FILES.<br />
===INCLUDE_MODULE===<br />
Formely INCLUDE_WRAP_CMAKE.<br />
===WRAP_MODULE and END_WRAP_MODULE===<br />
===WRAP_CLASS===<br />
===WRAP_NAMED_CLASS===<br />
===WRAP_NON_TEMPLATE_CLASS===<br />
===WRAP_NAMED_NON_TEMPLATE_CLASS===<br />
===WRAP_INCLUDE===<br />
===END_WRAP_CLASS===<br />
===ADD_SIMPLE_TYPEDEF===<br />
===ADD_ONE_TYPEDEF===<br />
===WRAP_TEMPLATE===<br />
===WRAP_IMAGE_FILTER_ALL_TYPES===<br />
===WRAP_IMAGE_FILTER_SCALAR===<br />
===WRAP_IMAGE_FILTER_VECTOR===<br />
===WRAP_IMAGE_FILTER_USIGN_INT===<br />
===WRAP_IMAGE_FILTER_SIGN_INT===<br />
===WRAP_IMAGE_FILTER_INT===<br />
===WRAP_IMAGE_FILTER_REAL===<br />
===WRAP_IMAGE_FILTER_RGB===<br />
===WRAP_IMAGE_FILTER_RGBA===<br />
===WRAP_IMAGE_FILTER_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COV_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COMPLEX_REAL===<br />
===WRAP_IMAGE_FILTER===<br />
===WRAP_IMAGE_FILTER_COMBINATIONS===<br />
===WRAP_IMAGE_FILTER_TYPES===<br />
===FILTER_DIMS===<br />
<br />
==Code generator==<br />
<br />
Everything is done in the 'Languages' directory.<br />
<br />
==Code generation==<br />
<br />
=Build=<br />
<br />
==Generation XML descriptions of instantiations==<br />
<br />
==Generation of XML documentation==<br />
<br />
==Generation of swig interfaces==<br />
<br />
==Generation of Language specific C++ code==<br />
<br />
==Compilation of C++ code==<br />
<br />
==Linking of libraries==<br />
<br />
==Compilation of tests==</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/BuildProcess&diff=38985ITK/Release 4/Wrapping/BuildProcess2011-04-12T20:00:40Z<p>Glehmann: /* Template instantiation */</p>
<hr />
<div>Wrapping build is done in several steps.<br />
<br />
=Configuration=<br />
<br />
This is done with CMake. During this step, the template instantiations are generated by parsing the files in Wrapping/WrapITK/Libraries. For each macro call of the template instantiation process, some callback macros specific of each language generator are called to generate the files and the commands needed to build the wrappers.<br />
<br />
==Template instantiation==<br />
<br />
Everything is done in the `Libraries` directory. The instantiations are separated in two levels:<br />
<br />
* the libraries, which are grouping several modules. Generally, one binary for a target language contains all the instantiations from one library;<br />
* the modules, inside those libraries. Each module groups several template instantiations. The swig interface generator generates one '.i' file per module.<br />
<br />
Several macros are available to simplify the template instantiations.<br />
<br />
==Macros==<br />
<br />
The macros are defined in 'TypedefMacros.cmake'.<br />
<br />
===WRAP_LIBRARIES and END_WRAP_LIBRARIES===<br />
===WRAP_LIBRARY and END_WRAP_LIBRARY===<br />
Formely BEGIN_WRAPPER_LIBRARY and WRAPPER_LIBRARY_CREATE_LIBRARY.<br />
===INCLUDE_LIBRARY===<br />
===AUTO_INCLUDE_MODULES===<br />
Formely WRAPPER_LIBRARY_CREATE_WRAP_FILES.<br />
===INCLUDE_MODULE===<br />
Formely INCLUDE_WRAP_CMAKE.<br />
===WRAP_MODULE and END_WRAP_MODULE===<br />
===WRAP_CLASS===<br />
===WRAP_NAMED_CLASS===<br />
===WRAP_NON_TEMPLATE_CLASS===<br />
===WRAP_NAMED_NON_TEMPLATE_CLASS===<br />
===WRAP_INCLUDE===<br />
===END_WRAP_CLASS===<br />
===ADD_SIMPLE_TYPEDEF===<br />
===ADD_ONE_TYPEDEF===<br />
===WRAP_TEMPLATE===<br />
===WRAP_IMAGE_FILTER_ALL_TYPES===<br />
===WRAP_IMAGE_FILTER_SCALAR===<br />
===WRAP_IMAGE_FILTER_VECTOR===<br />
===WRAP_IMAGE_FILTER_USIGN_INT===<br />
===WRAP_IMAGE_FILTER_SIGN_INT===<br />
===WRAP_IMAGE_FILTER_INT===<br />
===WRAP_IMAGE_FILTER_REAL===<br />
===WRAP_IMAGE_FILTER_RGB===<br />
===WRAP_IMAGE_FILTER_RGBA===<br />
===WRAP_IMAGE_FILTER_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COV_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COMPLEX_REAL===<br />
===WRAP_IMAGE_FILTER===<br />
===WRAP_IMAGE_FILTER_COMBINATIONS===<br />
===WRAP_IMAGE_FILTER_TYPES===<br />
===FILTER_DIMS===<br />
<br />
==Code generator==<br />
<br />
Everything is done in the 'Languages' directory.<br />
<br />
==Code generation==<br />
<br />
=Build=<br />
<br />
==Generation XML descriptions of instantiations==<br />
<br />
==Generation of XML documentation==<br />
<br />
==Generation of swig interfaces==<br />
<br />
==Generation of Language specific C++ code==<br />
<br />
==Compilation of C++ code==<br />
<br />
==Linking of libraries==<br />
<br />
==Compilation of tests==</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/BuildProcess&diff=38984ITK/Release 4/Wrapping/BuildProcess2011-04-12T19:52:36Z<p>Glehmann: /* Macros */</p>
<hr />
<div>Wrapping build is done in several steps.<br />
<br />
=Configuration=<br />
<br />
This is done with CMake. During this step, the template instantiations are generated by parsing the files in Wrapping/WrapITK/Libraries. For each macro call of the template instantiation process, some callback macros specific of each language generator are called to generate the files and the commands needed to build the wrappers.<br />
<br />
==Template instantiation==<br />
<br />
Everything is done in the 'Libraries' directory. The instantiations are separated in two levels:<br />
<br />
* the libraries, which are grouping several modules. Generally, one binary for a target language contains all the instantiations from one library;<br />
* the modules, inside those libraries. Each module groups several template instantiations. The swig interface generator generates one '.i' file per module.<br />
<br />
Several macros are available to simplify the template instantiations.<br />
<br />
==Macros==<br />
<br />
The macros are defined in 'TypedefMacros.cmake'.<br />
<br />
===WRAP_LIBRARIES and END_WRAP_LIBRARIES===<br />
===WRAP_LIBRARY and END_WRAP_LIBRARY===<br />
Formely BEGIN_WRAPPER_LIBRARY and WRAPPER_LIBRARY_CREATE_LIBRARY.<br />
===INCLUDE_LIBRARY===<br />
===AUTO_INCLUDE_MODULES===<br />
Formely WRAPPER_LIBRARY_CREATE_WRAP_FILES.<br />
===INCLUDE_MODULE===<br />
Formely INCLUDE_WRAP_CMAKE.<br />
===WRAP_MODULE and END_WRAP_MODULE===<br />
===WRAP_CLASS===<br />
===WRAP_NAMED_CLASS===<br />
===WRAP_NON_TEMPLATE_CLASS===<br />
===WRAP_NAMED_NON_TEMPLATE_CLASS===<br />
===WRAP_INCLUDE===<br />
===END_WRAP_CLASS===<br />
===ADD_SIMPLE_TYPEDEF===<br />
===ADD_ONE_TYPEDEF===<br />
===WRAP_TEMPLATE===<br />
===WRAP_IMAGE_FILTER_ALL_TYPES===<br />
===WRAP_IMAGE_FILTER_SCALAR===<br />
===WRAP_IMAGE_FILTER_VECTOR===<br />
===WRAP_IMAGE_FILTER_USIGN_INT===<br />
===WRAP_IMAGE_FILTER_SIGN_INT===<br />
===WRAP_IMAGE_FILTER_INT===<br />
===WRAP_IMAGE_FILTER_REAL===<br />
===WRAP_IMAGE_FILTER_RGB===<br />
===WRAP_IMAGE_FILTER_RGBA===<br />
===WRAP_IMAGE_FILTER_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COV_VECTOR_REAL===<br />
===WRAP_IMAGE_FILTER_COMPLEX_REAL===<br />
===WRAP_IMAGE_FILTER===<br />
===WRAP_IMAGE_FILTER_COMBINATIONS===<br />
===WRAP_IMAGE_FILTER_TYPES===<br />
===FILTER_DIMS===<br />
<br />
==Code generator==<br />
<br />
Everything is done in the 'Languages' directory.<br />
<br />
==Code generation==<br />
<br />
=Build=<br />
<br />
==Generation XML descriptions of instantiations==<br />
<br />
==Generation of XML documentation==<br />
<br />
==Generation of swig interfaces==<br />
<br />
==Generation of Language specific C++ code==<br />
<br />
==Compilation of C++ code==<br />
<br />
==Linking of libraries==<br />
<br />
==Compilation of tests==</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Release_4/Wrapping/BuildProcess&diff=38983ITK/Release 4/Wrapping/BuildProcess2011-04-12T19:44:16Z<p>Glehmann: Created page with "Wrapping build is done in several steps. =Configuration= This is done with CMake. During this step, the template instantiations are generated by parsing the files in Wrapping/W..."</p>
<hr />
<div>Wrapping build is done in several steps.<br />
<br />
=Configuration=<br />
<br />
This is done with CMake. During this step, the template instantiations are generated by parsing the files in Wrapping/WrapITK/Libraries. For each macro call of the template instantiation process, some callback macros specific of each language generator are called to generate the files and the commands needed to build the wrappers.<br />
<br />
==Template instantiation==<br />
<br />
Everything is done in the 'Libraries' directory. The instantiations are separated in two levels:<br />
<br />
* the libraries, which are grouping several modules. Generally, one binary for a target language contains all the instantiations from one library;<br />
* the modules, inside those libraries. Each module groups several template instantiations. The swig interface generator generates one '.i' file per module.<br />
<br />
Several macros are available to simplify the template instantiations.<br />
<br />
==Macros==<br />
<br />
==Code generator==<br />
<br />
Everything is done in the 'Languages' directory.<br />
<br />
==Code generation==<br />
<br />
=Build=<br />
<br />
==Generation XML descriptions of instantiations==<br />
<br />
==Generation of XML documentation==<br />
<br />
==Generation of swig interfaces==<br />
<br />
==Generation of Language specific C++ code==<br />
<br />
==Compilation of C++ code==<br />
<br />
==Linking of libraries==<br />
<br />
==Compilation of tests==</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Tcons/Minutes/2011_03_04&diff=38226ITK/Tcons/Minutes/2011 03 042011-03-04T19:35:00Z<p>Glehmann: </p>
<hr />
<div>= Attendees =<br />
<br />
* Jim Miller<br />
* Sean Megason<br />
* Bradley Lowekamp<br />
* Dan Blezek<br />
* Gaetan Lehmann<br />
* Hans Johnson<br />
* Asish <br />
* Xiaoxiao Liu<br />
* Luis Ibanez<br />
* Ashish Sharma<br />
<br />
= Project Topics =<br />
<br />
<br />
= Technical Topics =<br />
<br />
* Modularization Status<br />
* MICCAI Tutorials<br />
* SimpleITK Status<br />
** LabelMaps<br />
** ImageRegistration<br />
* Registration Refactoring<br />
** Composite Transform<br />
** Deformation Field Transform<br />
** Transform IO<br />
*** Binary encoding<br />
*** Matlab legacy encoding (binary)<br />
* LabelMaps<br />
** How to manage IO<br />
<br />
== Notes ==<br />
<br />
NAMIC/Slicer3/Libs/vtkITK/<br />
itkEncodedTransformFileReader.cxx<br />
itkEncodedTransformFileReader.h<br />
itkEncodedTransformFileWriter.cxx<br />
itkEncodedTransformFileWriter.h<br />
<br />
<br />
Documentation of Matlab file format<br />
<br />
* http://maxwell.me.gu.edu.au/spl/matlab-page/matfile_format.pdf<br />
<br />
= Action Items =</div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter&diff=35151ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter2010-12-04T14:17:32Z<p>Glehmann: /* BinaryImageToShapeLabelMapFilter.cxx */</p>
<hr />
<div>==BinaryImageToShapeLabelMapFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkImageFileWriter.h"<br />
#include "itkImageRegionIterator.h"<br />
#include "itkBinaryImageToShapeLabelMapFilter.h"<br />
<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
void CreateImage(ImageType::Pointer image);<br />
<br />
int main(int, char *[])<br />
{<br />
ImageType::Pointer image = ImageType::New();<br />
CreateImage(image);<br />
<br />
typedef itk::BinaryImageToShapeLabelMapFilter<ImageType> LabelMapFilterType;<br />
LabelMapFilterType::Pointer labelMapFilter = LabelMapFilterType::New();<br />
labelMapFilter->SetInput(image);<br />
labelMapFilter->Update();<br />
LabelMapFilterType::OutputImageType * labelMap = labelMapFilter->GetOutput();<br />
<br />
std::cout << "There are " << labelMap->GetNumberOfLabelObjects() << " objects." << std::endl;<br />
for(unsigned int i = 0; i < labelMap->GetNumberOfLabelObjects(); i++)<br />
{<br />
std::cout << "Object " << i << " has bounding box " << labelMap->GetNthLabelObject(i)->GetBoundingBox() << std::endl;<br />
}<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ImageType::Pointer image)<br />
{<br />
ImageType::IndexType start;<br />
start.Fill(0);<br />
<br />
ImageType::SizeType size;<br />
size.Fill(20);<br />
<br />
ImageType::RegionType region;<br />
region.SetSize(size);<br />
region.SetIndex(start);<br />
image->SetRegions(region);<br />
image->Allocate();<br />
<br />
itk::ImageRegionIterator<ImageType> imageIterator(image,image->GetLargestPossibleRegion());<br />
<br />
// Make a square<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
if((imageIterator.GetIndex()[0] > 5 && imageIterator.GetIndex()[0] < 10) &&<br />
(imageIterator.GetIndex()[1] > 5 && imageIterator.GetIndex()[1] < 10) )<br />
{<br />
imageIterator.Set(255);<br />
}<br />
else<br />
{<br />
imageIterator.Set(0);<br />
}<br />
<br />
++imageIterator;<br />
}<br />
<br />
}<br />
</source><br />
<br />
==CMakeLists.txt==<br />
<source lang="cmake"><br />
cmake_minimum_required(VERSION 2.6) <br />
<br />
PROJECT(BinaryImageToShapeLabelMapFilter) <br />
<br />
FIND_PACKAGE(ITK REQUIRED) <br />
INCLUDE(${ITK_USE_FILE}) <br />
<br />
ADD_EXECUTABLE(BinaryImageToShapeLabelMapFilter BinaryImageToShapeLabelMapFilter.cxx) <br />
TARGET_LINK_LIBRARIES(BinaryImageToShapeLabelMapFilter ITKIO ITKBasicFilters ITKCommon ITKReview ) <br />
</source></div>Glehmannhttps://public.kitware.com/Wiki/index.php?title=ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter&diff=35150ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter2010-12-04T14:16:42Z<p>Glehmann: /* CMakeLists.txt */</p>
<hr />
<div>==BinaryImageToShapeLabelMapFilter.cxx==<br />
<source lang="cpp"><br />
#include "itkImage.h"<br />
#include "itkImageFileWriter.h"<br />
#include "itkImageRegionIterator.h"<br />
#include "itkBinaryImageToShapeLabelMapFilter.h"<br />
<br />
typedef itk::Image<unsigned char, 2> ImageType;<br />
void CreateImage(ImageType::Pointer image);<br />
<br />
int main(int, char *[])<br />
{<br />
ImageType::Pointer image = ImageType::New();<br />
CreateImage(image);<br />
<br />
typedef itk::BinaryImageToShapeLabelMapFilter<ImageType, ImageType> LabelMapFilterType;<br />
LabelMapFilterType::Pointer labelMapFilter = LabelMapFilterType::New();<br />
labelMapFilter->SetInput(image);<br />
labelMapFilter->Update();<br />
<br />
std::cout << "There are " << labelMapFilter->GetNumberOfLabelObjects() << " objects." << std::endl;<br />
for(unsigned int i = 0; i < labelMapFilter->GetNumberOfLabelObjects(); i++)<br />
{<br />
std::cout << "Object " << i << " has bounding box " << labelMapFilter->GetOutput(i)->GetBoundingBox() << std::endl;<br />
}<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
void CreateImage(ImageType::Pointer image)<br />
{<br />
ImageType::IndexType start;<br />
start.Fill(0);<br />
<br />
ImageType::SizeType size;<br />
size.Fill(20);<br />
<br />
ImageType::RegionType region;<br />
region.SetSize(size);<br />
region.SetIndex(start);<br />
image->SetRegions(region);<br />
image->Allocate();<br />
<br />
itk::ImageRegionIterator<ImageType> imageIterator(image,image->GetLargestPossibleRegion());<br />
<br />
// Make a square<br />
while(!imageIterator.IsAtEnd())<br />
{<br />
if((imageIterator.GetIndex()[0] > 5 && imageIterator.GetIndex()[0] < 10) &&<br />
(imageIterator.GetIndex()[1] > 5 && imageIterator.GetIndex()[1] < 10) )<br />
{<br />
imageIterator.Set(255);<br />
}<br />
else<br />
{<br />
imageIterator.Set(0);<br />
}<br />
<br />
++imageIterator;<br />
}<br />
<br />
}<br />
</source><br />
<br />
==CMakeLists.txt==<br />
<source lang="cmake"><br />
cmake_minimum_required(VERSION 2.6) <br />
<br />
PROJECT(BinaryImageToShapeLabelMapFilter) <br />
<br />
FIND_PACKAGE(ITK REQUIRED) <br />
INCLUDE(${ITK_USE_FILE}) <br />
<br />
ADD_EXECUTABLE(BinaryImageToShapeLabelMapFilter BinaryImageToShapeLabelMapFilter.cxx) <br />
TARGET_LINK_LIBRARIES(BinaryImageToShapeLabelMapFilter ITKIO ITKBasicFilters ITKCommon ITKReview ) <br />
</source></div>Glehmann