Getting Started with ITK + VTK

Slides:



Advertisements
Similar presentations
Doxygen. Links
Advertisements

NA-MIC National Alliance for Medical Image Computing ITK Workshop October 5-8, 2005 Software Design.
ITK Architecture Kitware Inc.. ITK Basics C++ Generic Programming Data Pipeline Multi-threading Streaming Exceptions Events / Observers Tcl, Python and.
ITK-Overview Insight Software Consortium. What is ITK Image Processing Segmentation Registration No Graphical User Interface (GUI) No Visualization.
First Steps with Qt Julien Finet Kitware Inc. Jan. 05 th 2010.
Slicer3 for developers – Sonia Pujol, Ph.D. -1- National Alliance for Medical Image Computing Programming into Slicer3 Sonia Pujol, Ph.D. Surgical Planning.
National Alliance for Medical Image Computing Slicer3 plugins: Going Further Common architecture for interactive and batch processing.
Programming into Slicer3. Sonia Pujol, Ph.D., Harvard Medical School National Alliance for Medical Image Computing ©2010,ARR
CPSC 441 TUTORIAL – JANUARY 16, 2012 TA: MARYAM ELAHI INTRODUCTION TO C.
National Alliance for Medical Image Computing Slicer3 plugins Common architecture for interactive and batch processing.
National Alliance for Medical Image Computing Testing with CTest and CDash Julien Jomier Kitware Inc.
Yingcai Xiao Chapter 4 The Visualization Pipeline.
Lecture 3 Getting Started with ITK!. Goals for this lecture Learn how to use Cmake Build ITK Example programs that use ITK.
National Alliance for Medical Image Computing ITK The Image Segmentation and Registration Toolkit Julien Jomier Kitware Inc.
Introduction to OpenCV Dr. Chung-Hao Chen Haole Guo Sep 2011.
Slide 1 Visualization of scientific data under Linux - Techniques and data wrangling Mike Walterman, Manager of Graphics Programming, Scientific Computing.
C Pre-Course Workshop Terence Lee QT406 -> PQ607
CSci 6971: Image Registration Lecture 6: Getting Started with ITK January 30, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart,
National Alliance for Medical Image Computing User Desktop Slicer 3.0 Architecure AlgorithmsITKVTK Slicer Modules VTK Apps Using ITK.
Introduction to ITK Casey Goodlett (with help from others as listed in references)
©2005 GE Fanuc Automation, Inc. All Rights Reserved PACSystems Training Programmer’s Toolkit.
Julie McEnery1 Installing the ScienceTools The release manager automatically compiles each release of the Science Tools, it creates a set of wrapper scripts.
NA-MIC National Alliance for Medical Image Computing Slicer Custom Modules Steve Pieper, PhD.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Software Process, CMake, Dashboards, CPack Bill Hoffman Kitware, Inc.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
NA-MIC National Alliance for Medical Image Computing IGT Software Design and Process Bill Lorensen GE Research.
OPENCV TUTORIAL OpenCV Windows 7 Microsoft Visual C++ Express 2010.
Getting Started with ITK in Python Language
NA-MIC National Alliance for Medical Image Computing NAMIC-Kit Update Will Schroeder Jim Miller Bill Lorensen.
Image Registration Lecture 7: Getting Started with ITK March 15, 2005 Prof. Charlene Tsai.
Unit tests, Integration tests Physics tests Andrea Dotti, Gunter Folger, Pere Mato CERN – PH/SFT Geant4 workshop 2012.
VTK: The Visualization Toolkit Part I: Overview and object models March 28, 2001.
CSnake C++ build automation based on CMake and Python Maarten Nieber, 2009.
NA-MIC National Alliance for Medical Image Computing Slicer3 and the NA-MIC kit Sonia Pujol, Ph.D. Instructor of Radiology Surgical Planning.
Makefiles CISC/QCSE 810. BeamApp and Tests in C++ 5 source code files After any modification, changed source needs to be recompiled all object files need.
How to Install ITK ? (Insight Segmentation and Registration Toolkit) Prepared by: Hussain Rahman MS (CS) 1 st semester Supervised.
Geant4 Installation Supported platforms:  Scientific Linux with gcc 4.1.2/4.6  Mac Os X 10.7 and 10.8 with gcc 4.21  Windows7 with Visual Studio.
ITK Input/Output Kitware Inc.. Overview IO Factory Mechanism Image File IO Transform File IO SpatialObject File IO Logger.
Programming into Slicer3. Sonia Pujol, Ph.D., Harvard Medical School -1- National Alliance for Medical Image Computing Programming into Slicer3 Sonia Pujol,
System Calls: A Kernel Project Hunter Bell CS Fall
FLUKA GUI Status FLUKA Meeting CERN, 10/7/2006.
NA-MIC National Alliance for Medical Image Computing Slicer Building and Deployment Steve Pieper, PhD.
SimITK and SimVTK: ITK and VTK in Simulink DG Gobbi, P Mousavi, KM Li, J Xiang, A Campigotto, A LaPointe, G Fichtinger, P Abolmaesumi Medical Image Analysis.
William Schroeder, Ph.D. §, Andy Cedilnik §, Sebastien Barré, Ph.D. §, William Lorensen ‡, James Miller, Ph.D. ‡, Daniel Blezek, Ph.D. ‡ § Kitware Inc.,
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Software Process Stephen R. Aylward Kitware, Inc.
1 Chapter 12 GUI C/C++ Language Programming Wanxiang Che.
VTK: The Visualization Toolkit Qaiser Chaudry Georgia Institute of Technology June 28, 2006.
© All rights reserved. U.S International Tech Support
Slicer3 for developers – S.Pujol -1- National Alliance for Medical Image Computing Slicer3 Course for developers Sonia Pujol, Ph.D. Surgical Planning Laboratory.
Foto MD view. share. experience COMP Software Engineering Lab. Tuesday, March FotoMD Project Presentation Samuel Brice. Zach Mullen. Meg.
Data Display Debugger (DDD)
Dissecting the Windows CE Build Process James Y. Wilson Principal Engineer, Windows Embedded MVP CalAmp, Inc. James Y. Wilson Principal Engineer, Windows.
introduction to omegalib and omicron Alessandro Febretti Electronic Visualization Lab – University of Illinois at Chicago.
SimITK/SimVTK: Model Driven Engineering for Medical Imaging 1.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course explains how to use section setting and memory.
ITK Basic Filters Kitware Inc.. ITK Basic Filters Pixel-wise Arithmetic, Casting, Thresholding Mathematical morphology Noise reduction Gaussian, Anisotropic.
Read a DICOM File typedef unsigned charInputPixelType; const unsigned intInputDimension = 2; typedef itk::Image InputImageType; typedef itk::ImageFileReader.
ITK Statistical Classification Kitware Inc.. Statistical Classification Multiple Components Images K-Means Markov Random Fields.
NA-MIC National Alliance for Medical Image Computing Three ways to use the NA-MIC kit Sonia Pujol, Ph.D. Instructor of Radiology Surgical.
 CSC 215 : Procedural Programming with C C Compilers.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
CLHEP Infrastructure Improvements CHEP 2004 Lynn Garren, FNAL and Andreas Pfeiffer, CERN.
July FLTK The Fast Light Toolkit • A C++ graphical user interface toolkit • Can be used under X, Windows, MacOS • Supports OpenGL • Provides: – Interactive.
Insight Toolkit Introduction Luis Ibáñez William Schroeder Insight Software Consortium.
Releases and developments
ITK-Overview Insight Software Consortium.
ITK Architecture Kitware Inc..
ITK Workshop Software Design October 5-8, 2005.
Makefile Assignment Create a file called f1.cpp. It should contain the following function: int squareIt ( int x ) { //insert code to calc and return the.
Presentation transcript:

Getting Started with ITK + VTK Kitware Inc.

What is ITK Image Processing Segmentation Registration No Graphical User Interface (GUI) No Visualization

How to Integrate ITK in you application C++ Glue Code ITK Image Processing GUI {MFC,Qt, wxWin FLTK} Visualization {OpenGL, VTK}

Step 1. Download VTK Live on the Stability Edge Release tar CVS files CVS anonymous Tarball http://www.vtk.org

Step 2. Configuring VTK Binary Tree Source Tree VTKb VTK Out Source Build VTKb Common Filtering Graphics Hybrid IO Binary Tree Source Tree VTK Common Filtering Graphics Hybrid IO Recommended ! In Source Build

Step 2. Configuring VTK Run CMake Select the SOURCE directory Select the BINARY directory Select your Compiler (same used for ITK)

Step 2. Configuring VTK

Step 2. Configuring VTK Advanced variables

Step 2. Configuring VTK Disable BUILD_EXAMPLES Disable BUILD_SHARED Disable BUILD_TESTING Enable VTK_USE_ANSI_STDLIB Enable VTK_USE_HYBRID Enable VTK_USE_RENDERING Enable VTK_USE_PATENTED

Step 2. Configuring VTK leave unchanged CMAKE_CXX_FLAGS leave unchanged DART_ROOT leave unchanged VTK_DATA_ROOT leave unchanged CMAKE_BACKWARD_COMPATIBILITY

Step 3. Build VTK Open VTK.dsw in the Binary Directory Select ALL_BUILD project Build it …It will take about 90 minutes …

VTK_BINARY / bin / { Debug, Release } Step 4. Verify the Built Libraries and test Executables will be found in VTK_BINARY / bin / { Debug, Release }

The following libraries should be there Step 4. Verify the Built The following libraries should be there vtkCommon vtkFiltering vtkImaging vtkGraphics vtkHybrid vtkParallel vtkPatented vtkexpat vtkfreetype vtkftgl vtkjpeg vtkpng vtktiff vtkzlib

Starting your own project with ITK + VTK Create a clean new directory Write a CmakeLists.txt file Write a simple .cxx file Configure with CMake Build Run

Step 5. Writing CMakeLists.txt PROJECT( myProject ) FIND_PACKAGE ( ITK ) IF ( ITK_FOUND ) INCLUDE( ${USE_ITK_FILE} ) ENDIF( ITK_FOUND ) FIND_PACKAGE ( VTK ) IF ( VTK_FOUND ) INCLUDE( ${USE_VTK_FILE} ) ENDIF( VTK_FOUND ) (continue...)

Step 5. Writing CMakeLists.txt (continue...) INCLUDE_DIRECTORIES( ${myProject_SOURCE_DIR} ) ADD_EXECUTABLE( myProject myProject.cxx ) TARGET_LINK_LIBRARIES ( myProject ITKBasicFilters ITKCommon ITKIO vtkRendering vtkGraphics vtkHybrid vtkImaging vtkIO vtkFiltering vtkCommon )

Step 6. Writing myProject.cxx ITK VTK ITK Reader ITK to VTK ImageFilter VTK ImageViewer VTK Render Window Interactor

Step 6. Writing myProject.cxx #include "itkImage.h" #include "itkImageFileReader.h" #include "itkImageToVTKImageFilter.h" #include "vtkImageViewer.h" #include "vtkRenderWindowInteractor.h" int main( int argc, char **argv ) { typedef itk::Image< unsigned short, 2 > ImageType; typedef itk::ImageFileReader<ImageType> ReaderType; typedef itk::ImageToVTKImageFilter< ImageType> FilterType; ReaderType::Pointer reader = ReaderType::New(); FilterType::Pointer connector = FilterType::New();

Step 6. Writing myProject.cxx reader->SetFileName( argv[1] ); connector->SetInput( reader->GetOutput() ); vtkImageViewer * viewer = vtkImageViewer::New(); vtkRenderWindowInteractor * renderWindowInteractor = vtkRenderWindowInteractor::New(); viewer->SetupInteractor( renderWindowInteractor ); viewer->SetInput( connector->GetOutput() ); viewer->Render(); viewer->SetColorWindow( 255 ); viewer->SetColorLevel( 128 ); renderWindowInteractor->Start(); return 0; }

Exercise 19

ITK Image To VTK Image ITK VTK itk::VTKExport vtkImport vtkImageData

Step 7. Configure with CMake

Step 7. Configure with Cmake Set ITK_DIR to the binary directory where ITK was built Set VTK_DIR to the binary directory where VTK was built

Step 7. Configure with CMake Leave Unchanged EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH CMAKE_BACKWARDS_COMPATIBILITY

Step 8. Build Sample Project Open myProject.dsw generated by CMake Select ALL_BUILD project Build it …It will take about 30 seconds …

Step 9. Run the example Locate the file myProject.exe Run it with a 2D image as argument myProject.exe BrainSlice.png It should display the image in a window

Step 10. Add more ITK ITK Reader ITK VTK ITK CurvatureFlow ImageFilter ITK to VTK ImageFilter VTK ImageViewer VTK Render Window Interactor

Step 10. Add more ITK #include "itkSmoothingRecursiveGaussianImageFilter.h" ... typedef itk::Image< unsigned short , 2 > ImageType; typedef itk::SmoothingRecursiveGaussianImageFilter< ImageType, ImageType > SmoothingFilterType; SmoothingFilterType::Pointer smoother = SmoothingFilterType::New(); smoother->SetInput( reader->GetOutput() ); connector->SetInput( smoother->GetOutput() ); viewer->SetInput( connector->GetOutput() ); smoother->SetSigma( 3.0 ); smoother->SetNormalizeAcrossScale( true );

Step 11. Run with more ITK This code is in Example19 Configure with Cmake Open the project and build it Locate the executable Run it with a 2D image myProjectAnswer.exe BrainSlice.png It should display the smoothed image

Enjoy ITK + VTK !