ITK Architecture Kitware Inc..

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.
Getting Started with ITK + VTK
ITK Registration Methods
ITK-Overview Insight Software Consortium. What is ITK Image Processing Segmentation Registration No Graphical User Interface (GUI) No Visualization.
NA-MIC National Alliance for Medical Image Computing ITK Workshop October 5-8, 2005 Writing a New ITK Filter.
National Alliance for Medical Image Computing Slicer3 plugins: Going Further Common architecture for interactive and batch processing.
National Alliance for Medical Image Computing Slicer3 plugins Common architecture for interactive and batch processing.
Factorial Preparatory Exercise #include using namespace std; double fact(double); int fact(int); int main(void) { const int n=20; ofstream my_file("results.txt");
GPU Acceleration in ITK v4
Methods in Image Analysis 2004, Damion Shelton 1 ITK Lecture 4 Images in ITK Methods in Image Analysis CMU Robotics Institute U. Pitt Bioengineering.
Images in ITK JG, DS, HJ. Data storage in ITK 2 ITK separates storage of data from the actions you can perform on data The DataObject class is the base.
This work by John Galeotti and Damion Shelton, © , was made possible in part by NIH NLM contract# HHSN P, and is licensed under a Creative.
1 ITK Lecture 7 - Writing Filters, Part 1 Methods in Image Analysis CMU Robotics Institute U. Pitt Bioengineering 2630 Spring Term, 2006 Methods.
Methods in Image Analysis 2004, Damion Shelton 1 ITK Lecture 6 - The Pipeline Methods in Image Analysis CMU Robotics Institute U. Pitt Bioengineering.
National Alliance for Medical Image Computing ITK The Image Segmentation and Registration Toolkit Julien Jomier Kitware Inc.
NA-MIC National Alliance for Medical Image Computing Slicer and ITK generic image reader module Alex Yarmarkovich.
NA-MIC National Alliance for Medical Image Computing 3D Slicer Interactive Modules Steve Pieper, PhD.
CSci 6971: Image Registration Lecture 6: Getting Started with ITK January 30, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart,
Rossella Lau Lecture 1, DCO10105, Semester B, DCO10105 Object-Oriented Programming and Design  Lecture 1: Introduction What this course is about:
CSci 6971: Image Registration Lecture 8: Image Resampling February 3, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI Dr.
CSci 6971: Image Registration Lecture 10: Registration Components February 13, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart,
1 ITK Lecture 4 Images in ITK Methods in Image Analysis CMU Robotics Institute U. Pitt Bioengineering 2630 Spring Term, 2006 Methods in Image Analysis.
1 ITK Lecture 2 A brief C++ review Methods in Image Analysis CMU Robotics Institute U. Pitt Bioengineering 2630 Spring Term, 2006 Methods in Image.
NA-MIC National Alliance for Medical Image Computing IGT Software Design and Process Bill Lorensen GE Research.
Getting Started with ITK in Python Language
GPU Acceleration in ITK v4
Dr. Engr. Sami ur Rahman Assistant Professor Department of Computer Science University of Malakand Medical Imaging ITK.
Image Registration Lecture 7: Getting Started with ITK March 15, 2005 Prof. Charlene Tsai.
University of Calgary – CPSC 441. C PROGRAM  Collection of functions  One function “main()” is called by the operating system as the starting function.
NA-MIC National Alliance for Medical Image Computing Slicer3 and the NA-MIC kit Sonia Pujol, Ph.D. Instructor of Radiology Surgical Planning.
ITK Input/Output Kitware Inc.. Overview IO Factory Mechanism Image File IO Transform File IO SpatialObject File IO Logger.
Rossella Lau Lecture 1, DCO10105, Semester B, DCO10105 Object-Oriented Programming and Design  Lecture 1: Introduction What this course is about:
Programming into Slicer3. Sonia Pujol, Ph.D., Harvard Medical School -1- National Alliance for Medical Image Computing Programming into Slicer3 Sonia Pujol,
C++ History C++ was designed at AT&T Bell Labs by Bjarne Stroustrup in the early 80's Based on the ‘C’ programming language C++ language standardised in.
ITK Introduction and Overview Spring Topics  What Is ITK History Features  Software Engineering Methodology.
NA-MIC National Alliance for Medical Image Computing Slicer and ITK Raul San Jose.
Slicer3 for developers – S.Pujol -1- National Alliance for Medical Image Computing Slicer3 Course for developers Sonia Pujol, Ph.D. Surgical Planning Laboratory.
SimITK/SimVTK: Model Driven Engineering for Medical Imaging 1.
1 ITK Lecture 6 - The Pipeline Methods in Image Analysis CMU Robotics Institute U. Pitt Bioengineering 2630 Spring Term, 2006 Methods in Image Analysis.
A Quick Look at C for C++ Programmers Noah Mendelsohn Tufts University Web: COMP.
ITK Basic Filters Kitware Inc.. ITK Basic Filters Pixel-wise Arithmetic, Casting, Thresholding Mathematical morphology Noise reduction Gaussian, Anisotropic.
Bill Hoffman, Jesus Caban, Brad Lowkamp, Dan Muller, Fabrice de Chaumont, Julien Michel, Harvey Cline, Gabe Hart, Ghassam Hamarech, John Galeotti, Raghu.
Read a DICOM File typedef unsigned charInputPixelType; const unsigned intInputDimension = 2; typedef itk::Image InputImageType; typedef itk::ImageFileReader.
Lecture 7.  There are 2 types of libraries used by standard C++ The C standard library (math.h) and C++ The C++ standard template library  Allows us.
Fall 2015CISC/CMPE320 - Prof. McLeod1 CISC/CMPE320 Assignment 4 is due Nov. 20 (this Friday). Today: –Templates. –STL –Smart Pointers.
ITK Statistical Classification Kitware Inc.. Statistical Classification Multiple Components Images K-Means Markov Random Fields.
National Alliance for Medical Image Computing Slicer3 Plugins Common architecture for interactive and batch processing.
NA-MIC National Alliance for Medical Image Computing Three ways to use the NA-MIC kit Sonia Pujol, Ph.D. Instructor of Radiology Surgical.
Insight Toolkit Introduction Luis Ibáñez William Schroeder Insight Software Consortium.
ITKv4 Image Interpretation Layer. ITK - IO ImageIOBase VectorImage NumberOfComponents IOComponentType IOPixelType ConvertPixelBuffer Nested Switchs Based.
ITK Video ITK Extensions for Video Processing
C++ Lesson 1.
C ++ MULTIPLE CHOICE QUESTION
Data types Data types Basic types
ITK Segmentation Methods
Slicer and ITK generic image reader module
Steve Pieper, PhD Raul San Jose, PhD Alex Yarmarkovich, PhD
C++, OBJECT ORIENTED PROGRAMMING
C++ History C++ was designed at AT&T Bell Labs by Bjarne Stroustrup in the early 80's Based on the ‘C’ programming language C++ language standardised in.
Templates in C++.
null, true, and false are also reserved.
Frameworks And Patterns
ITK-Overview Insight Software Consortium.
Lecture 16 Images in ITK Methods in Medical Image Analysis - Spring (CMU ECE) : (CMU BME) : BioE 2630 (Pitt) Dr. John Galeotti Based.
Parasol Lab, Texas A&M University
ITK Workshop Software Design October 5-8, 2005.
SPL – PS1 Introduction to C++.
Presentation transcript:

ITK Architecture Kitware Inc.

ITK Basics C++ Generic Programming Data Pipeline Multi-threading Streaming Exceptions Events / Observers Tcl, Python and Java wrapping

Generic Programming Example: STL Standard Template Library Abstraction of Types and Behaviors std::vector< T > std::vector< int > std::vector< double > std::vector< char * > std::vector< Point > std::vector< Image >

itk::Image< PixelType , Dimension > itk::Image< char , 2 > itk::Image< char , 3 > itk::Image< char , 4 > itk::Image< float , 2 > itk::Image< RGB , 3 > itk::Image< unsigned short , 2 > itk::Image< itk::Vector<float,2> , 2 >

Avoid naming collisions namespaces Avoid naming collisions itk:: itk::Statistics:: itk::fem:: itk::fem::itpack itk::bio

Your favorite keyword typedef typedef itk::Image< char , 2 > ImageType typedef itk::ImageFilter< ImageType , ImageType > FilterType otherwise... itk::ImageFilter< Image< char , 2 > , Image< char , 2 > > FilterType

Smart Pointers Self - Delete Smart Pointer Object Smart Pointer counter=3 counter=0 counter=2 counter=1 Self - Delete

SmartPointers typedef itk::Image< char , 2 > ImageType typedef itk::ImageFilter< ImageType , ImageType > FilterType FilterType::Pointer filter = FilterType::New(); ImageType::Pointer image = filter->GetOutput(); Pointer notation filter->Update(); NO NEED FOR filter->Delete();

Const Correctness Knowing constancy is Insight. Not knowing constancy leads to disaster. Tao Te Ching, XVI. Lao Tsu

Const Smart Pointers typedef itk::Image< char , 2 > ImageType typedef itk::ImageFilter< ImageType , ImageType > FilterType FilterType::Pointer filter = FilterType::New(); ImageType::ConstPointer image = filter->GetOutput(); Can only invoke “const” methods image->GetSpacing (); Compiler error for “non-const” methods image->SetSpacing ( spacing );

Creating an Image typedef itk::Image< char , 3 > ImageType ImageType::Pointer image = ImageType::New(); ImageType::SizeType size; size[ 0 ] = 512; // x direction size[ 1 ] = 512; // y direction size[ 2 ] = 50; // z direction ImageType::IndexType start; start[ 0 ] = 0; // x direction start[ 1 ] = 0; // y direction start[ 2 ] = 0; // z direction

Creating an Image ImageType::RegionType region; region.SetSize( size ); region.SetIndex( start ); image->SetRegions( region ); image->Allocate(); image->FillBuffer( 0 ); ImageType::SpacingType spacing; spacing[ 0 ] = 0.83; // x direction spacing[ 1 ] = 0.83; // y direction spacing[ 2 ] = 2.15; // z direction image->SetSpacing( spacing );

Exercise 3

Processing Large Images Streaming Processing Large Images Input Image Output Image Filter

Image Regions LargestPossibleRegion BufferedRegion RequestedRegion

Data Pipeline Image Filter Filter Image Filter Image

Simple Image IO Image File ImageFileReader Image Filter Image File ImageFileWriter Image

Simple Image IO Image File ImageFileReader Image PNGImageIO GIPLImageIO CustomImageIO MetaImageIO VTKImageIO AnalyzeImageIO DICOMImageIO Loadable Factories

Simple Image IO #include “itkImage.h” #include “itkImageFileReader.h” #include “itkImageFileWriter.h” typedef itk::Image< char , 2 > ImageType; typedef itk::ImageFileReader< ImageType > ReaderType; typedef itk::ImageFileWriter< ImageType > WriterType; ReaderType::Pointer reader = ReaderType::New(); WriterType::Pointer writer = WriterType::New(); reader->SetFileName( “inputImage.dcm” ); // DICOM writer->SetFileName( “outputImage.hdr” ); // Analyze writer->SetInput( reader->GetOutput() ); writer->Update();

Exceptions Error Management Application Layer ITK Layer

Exceptions try { filter->Update(); } catch( itk::ExceptionObject & exp ) std::cerr << exp << std::endl;

Exercise 4 Image File ImageFileReader Filter Image File ImageFileWriter Caster

Events and Observers Itk::Command itk::Command Itk::Object Event

Events and Observers Common Events AnyEvent() StartEvent() EndEvent() ProgressEvent() IterationEvent()

Events and Observers Itk::Command Itk::Object Itk::ProcessObject MyCommand Itk::Object Itk::ProcessObject Itk::FilterXY AddObserver( ) Execute() AnyEvent MyEvent

Events and Observers AddObserver( ) Itk::Command Itk::Object Itk::SimpleMemberCommand Itk::Object Itk::ProcessObject Itk::FilterXY AddObserver( ) MyClass MethodX() AnyEvent MyEvent

Exercise 5 Image File ImageFileReader Filter ImageFileWriter ProgressEvent() StartEvent() EndEvent() ImageFileWriter CommandObserver Image File Execute()

GUI Communication GUI Layer ITK Layer Widget FilterX Callback Command Observer ITK Layer

Enjoy ITK !