ITK Architecture Kitware Inc.. ITK Basics C++ Generic Programming Data Pipeline Multi-threading Streaming Exceptions Events / Observers Tcl, Python and.

Slides:



Advertisements
Similar presentations
Support for Time in ITK Patrick Reynolds Patrick Cheng John Galeotti Arnaud Gelas.
Advertisements

Doxygen. Links
NA-MIC National Alliance for Medical Image Computing ITK Workshop October 5-8, 2005 Software Design.
Getting Started with ITK + VTK
ITK Segmentation Methods
ITK Registration Methods
ITK-Overview Insight Software Consortium. What is ITK Image Processing Segmentation Registration No Graphical User Interface (GUI) No Visualization.
SWIG Many languages Large user base Highly customizable.
NA-MIC National Alliance for Medical Image Computing ITK Workshop October 5-8, 2005 Writing a New ITK Filter.
ITK Deformable Registration
National Alliance for Medical Image Computing Slicer3 plugins: Going Further Common architecture for interactive and batch processing.
C++ Language Fundamentals. 2 Contents 1. Introduction to C++ 2. Basic syntax rules 3. Declaring and using variables.
Brown Bag #2 Advanced C++. Topics  Templates  Standard Template Library (STL)  Pointers and Smart Pointers  Exceptions  Lambda Expressions  Tips.
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");
Vectors, lists and queues
GPU Acceleration in ITK v4
CSE 332: C++ memory management idioms C++ Memory Management Idioms Idioms are reusable design techniques in a language –We’ll look at 4 important ones.
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 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.
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 Core 1b – Engineering Computational Platform Jim Miller GE Research.
Getting Started with ITK in Python Language
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.
Chapter 13. Binary Files In binary files we do not need to format data File streams include two member functions specifically designed to input and output.
NA-MIC National Alliance for Medical Image Computing Slicer3 and the NA-MIC kit Sonia Pujol, Ph.D. Instructor of Radiology Surgical Planning.
By – Tanvir Alam.  This tutorial offers several things.  You’ll see some neat features of the language.  You’ll learn the right things to google. 
CSE 332: C++ memory management idioms C++ Memory Management Idioms Idioms are reusable design techniques in a language –We’ll look at 4 important ones.
CSE 332: C++ Type Programming: Associated Types, Typedefs and Traits A General Look at Type Programming in C++ Associated types (the idea) –Let you associate.
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:
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.
C++ Coding and Compiling. Why QT/C++ Over Java?  Java is easier than C++  Java has built in GUIs  Java is multi-platform  C/C++ is more used in industry.
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.
OOP using C Abstract data types How to accomplish the task??? Requirements Details Input, output, process Specify each task in terms of input.
Digging into the GAT API Comparing C, C++ and Python API‘s Hartmut Kaiser
CS-1030 Dr. Mark L. Hornick 1 Basic C++ State the difference between a function/class declaration and a function/class definition. Explain the purpose.
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.
1 ITK Lecture 5 Intro to Iterators Methods in Image Analysis CMU Robotics Institute U. Pitt Bioengineering 2630 Spring Term, 2006 Methods in Image.
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.
Insight Toolkit Introduction Luis Ibáñez William Schroeder Insight Software Consortium.
ITK Video ITK Extensions for Video Processing
Eugene Hsu.
ITK Segmentation Methods
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.
JAVA IO.
Frameworks And Patterns
Brought to you by C++ Tutorial Brought to you by
ITK-Overview Insight Software Consortium.
ITK Architecture Kitware Inc..
Lecture 16 Images in ITK Methods in Medical Image Analysis - Spring (CMU ECE) : (CMU BME) : BioE 2630 (Pitt) Dr. John Galeotti Based.
ITK Workshop Software Design October 5-8, 2005.
Today’s Objectives 28-Jun-2006 Announcements
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

itk::Image itk::Image, 2 >

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

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

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

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

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

Const Smart Pointers typedef itk::Image ImageType typedef itk::ImageFilter 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 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

Output Image Streaming Filter Processing Large Images Input Image

Image Regions LargestPossibleRegion BufferedRegion RequestedRegion

Data Pipeline Image Filter Image Filter Image Filter

Simple Image IO Image File ImageFileReader Image Filter Image File ImageFileWriter

CustomImageIO Simple Image IO Image File ImageFileReader Image PNGImageIO VTKImageIODICOMImageIOGIPLImageIO MetaImageIOAnalyzeImageIO Loadable Factories

Simple Image IO #include itkImage.h #include itkImageFileReader.h #include itkImageFileWriter.h typedef itk::Image ImageType; typedef itk::ImageFileReader ReaderType; typedef itk::ImageFileWriter 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 ITK Layer Application Layer

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

Exercise 4 Image File ImageFileWriter Caster Image File ImageFileReader Filter

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

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

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

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

Exercise 5 Image File ImageFileReaderFilterImageFileWriter Image File CommandObserver Execute() ProgressEvent() StartEvent() EndEvent()

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

Enjoy ITK !