getting started with itk
DESCRIPTION
Getting Started with ITK. Luis Ib áñ ez William Schroeder Insight Software Consortium. What is ITK. Image Processing Segmentation Registration No Graphical User Interface (GUI) No Visualization. ITK Sponsors. The National Institute for Dental and Craniofacial Research. The National - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/1.jpg)
Getting Startedwith ITK
Luis IbáñezWilliam SchroederInsight Software Consortium
![Page 2: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/2.jpg)
What is ITK
Image Processing
Segmentation
Registration
No Graphical User Interface (GUI)
No Visualization
![Page 3: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/3.jpg)
ITK Sponsors
The NationalScienceFoundation
The NationalInstitute for Dental and Craniofacial Research
The National Institute of Neurological Disorders and Stroke
![Page 4: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/4.jpg)
ITK Developers
![Page 5: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/5.jpg)
ITK DevelopersGE CRD
Bill LorensenInsightful
Lydia NgU Penn
Dimitris Metaxas
Harvard BWH*Ron Kikinis
U Penn*Jim Gee
Columbia U.*Celina Imielinska
KitwareWill Schroeder
UNC-CHStephen Aylward
U TennesseeRoss Whitaker
U Pittsburgh*George Stetten
U Utah*Ross Whitaker
* indicates a subcontractor.
![Page 6: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/6.jpg)
ITK by the Numbers March 2000
– First code check-in 1000
– # of nightly builds 802
– tests run nightly 21
– # of platforms ( software + hardware ) 700
– # of classes 1600
– # of files with code
![Page 7: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/7.jpg)
ITK by the Numbers 400K
– # of lines of code 100K
– # of lines of test code 35K
– # of lines of examples 150K
– # of lines of Applications 190
– weekly t-cons 50
– unique developers
![Page 8: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/8.jpg)
ITK by the Numbers 750
– # of users subscribed to the mailing-list 500
– # of emails posted monthly to the users-list 565
– # of pages in the Software Guide PDF document 1800
– # of monthly hits to the URL of the Software Guide PDF 1900
– # of monthly hits to the URL of the Tutorial PDF 2400
– # of monthly hits to the source code files (.zip + .tar.gz)
![Page 9: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/9.jpg)
C++ Glue Code
How to Integrate ITKin you application
ITK
ImageProcessing
GUI
{MFC,Qt,wxWinFLTK}
Visualization
{OpenGL, VTK}
![Page 10: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/10.jpg)
What do I need ?
CMake
www.cmake.org
C++ Compiler
gcc 2.95 – 3.3Visual C++ 6.0Visual C++ 7.0Visual C++ 7.1
Intel 7.1Intel 8.0IRIX CC
Borland 5.5Mac - gcc
![Page 11: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/11.jpg)
Step 1. Download ITK
Live on the Edge
CVS
Stability
Release tar files
Insight.tgz CVS anonymous
http://www.itk.org
![Page 12: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/12.jpg)
Copying ITK from the CD
/Source/ InsightToolkit-1.6.0.zip InsightToolkit-1.6.0.tar.gz
![Page 13: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/13.jpg)
Step 2. Download CMake
ITKRequires
2.0.3
http://www.cmake.org
Latest CMake Release
Get the Binaries
InstallBinaries
![Page 14: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/14.jpg)
Installing CMake from the CD
/CMake/ cmake-1.8.3.tar.gz cmake-1.8.3-x86-win.zip cmake-1.8.3-x86-linux.tar.gz CMakeSetup183.exe
![Page 15: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/15.jpg)
Step 3. Configure ITK
Source Tree
ITK
Common
Algorithms
BasicFilter
Numerics
IO
ITKb
Common
Algorithms
BasicFilter
Numerics
IO
Binary Tree
Recommended !
Out Source Build
InSourceBuild
![Page 16: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/16.jpg)
Configuring ITK – MS-Windows
Run CMake
Select the SOURCE directory
Select the BINARY directory
Select your Compiler
![Page 17: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/17.jpg)
Configuring ITK – MS-Windows
![Page 18: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/18.jpg)
Configuring ITK – MS-Windows
Disable BUILD_EXAMPLES
Disable BUILD_SHARED_LIBS
Disable BUILD_TESTING
Click “Configure” to configure
Click “OK” to generate project files
![Page 19: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/19.jpg)
Configuring ITK – Unix Create the BINARY directory (mkdir)
Change directory to the BINARY directory (cd)
Set the environment variables CC and CXX
setenv CC /usr/bin/gcc; setenv CXX /usr/bin/g++ OR
export CC=/usr/bin/gcc; export CXX=/usr/bin/g++
Type ccmake with argument the SOURCE directory
![Page 20: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/20.jpg)
Configuring ITK – Unix
![Page 21: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/21.jpg)
Configuring ITK – Unix Disable BUILD_EXAMPLES
Disable BUILD_SHARED_LIBS
Disable BUILD_TESTING
Type “c” to configure
Type “g” to generate the Makefiles
Type “make” to start building
![Page 22: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/22.jpg)
Building ITK
![Page 23: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/23.jpg)
Building ITK
Open ITK.dsw in the Binary Directory
Select ALL_BUILD project
Build it …It will take about 15 minutes …
![Page 24: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/24.jpg)
Building ITK
![Page 25: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/25.jpg)
Building ITK
Open ITK.sln in the Binary Directory
Select ALL_BUILD project
Build it …It will take about 15 minutes …
![Page 26: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/26.jpg)
Building ITK
Most of ITK classes are C++ Templates
Basic libraries are small
they only contain non-templated classes
Basic libraries are built in about 15 min
![Page 27: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/27.jpg)
Step 5. Verify the Built
Libraries will be found in
ITK_BINARY / bin / { Debug, Release }
![Page 28: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/28.jpg)
Step 5. Verify the Build
ITKCommon
ITKBasicFilters
ITKAlgorithms
ITKNumerics
ITKFEM
The following libraries should be there
ITKIO
ITKStatistics
ITKMetaIO
itkpng
itkzlib
![Page 29: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/29.jpg)
Step 6. Use ITK from anexternal Project
Copy “HelloWorld.cxx”“CMakeLists.txt”
from the Examples/Installation
Directoryinto another
directory
RunCMake
• Select Source Dir• Select Binary Dir
![Page 30: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/30.jpg)
Using ITK – Hello World
![Page 31: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/31.jpg)
Using ITK – Hello World
![Page 32: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/32.jpg)
Step 6. Use ITK from anexternal Project
accept the default in
CMAKE_BACKBARD_COMPATIBILITY
leave empty EXECUTABLE_OUTPUT_PATH
leave empty LIBRARY_OUTPUT_PATH
Set ITK_DIR to the binary directory
where ITK was built
![Page 33: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/33.jpg)
Step 7. Build Sample Project
Open HelloWorld.dsw (or .sln) generated by CMake
Select ALL_BUILD project
Build it …It will take about 3 seconds …
![Page 34: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/34.jpg)
Step 7. Build Sample Project
![Page 35: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/35.jpg)
Step 8. Run the example
Locate the file HelloWorld.exe
Run it…
It should produce the message:
ITK Hello World !
![Page 36: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/36.jpg)
Starting your own project
Create a clean new directory
Write a CMakeLists.txt file
Write a simple .cxx file
Configure with CMake
Build
Run
![Page 37: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/37.jpg)
Step 9. Writing CMakeLists.txtPROJECT( myProject )
FIND_PACKAGE ( ITK )IF ( ITK_FOUND ) INCLUDE( ${ITK_USE_FILE} )ENDIF( ITK_FOUND )
ADD_EXECUTABLE( myProject myProject.cxx )
TARGET_LINK_LIBRARIES ( myProject ITKCommon ITKIO)
![Page 38: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/38.jpg)
Step 10. Writing myProject.cxx#include "itkImage.h"#include "itkImageFileReader.h"#include "itkGradientMagnitudeImageFilter.h"
int main( int argc, char **argv ) { typedef itk::Image<unsigned short,2> ImageType; typedef itk::ImageFileReader<ImageType> ReaderType; typedef itk::GradientMagnitudeImageFilter< ImageType,ImageType> FilterType;
ReaderType::Pointer reader = ReaderType::New(); FilterType::Pointer filter = FilterType::New();
reader->SetFileName( argv[1] ); filter->SetInput( reader->GetOutput() ); filter->Update(); return 0;}
![Page 39: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/39.jpg)
Step 11. Run CMake
![Page 40: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/40.jpg)
Step 12. How to find what you need
http://www.itk.org/ItkSoftwareGuide.pdf
Follow the link Alphabetical List
Follow the link Groups
Post to the insight-users mailing list
http://www.itk.org/Doxygen/html/index.html
![Page 41: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/41.jpg)
![Page 42: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/42.jpg)
![Page 43: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/43.jpg)
![Page 44: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/44.jpg)
The ITK Software Guide is freely available as a PDF document at www.itk.org/ ItkSoftwareGuide.pdf
Its paper version can be ordered from Amazon.com and from Kitware’s e-store.
![Page 45: Getting Started with ITK](https://reader036.vdocument.in/reader036/viewer/2022062411/56816823550346895dddb480/html5/thumbnails/45.jpg)
Enjoy ITK !