SlideShare a Scribd company logo
1 of 29
ITK Architecture Kitware Inc.
ITK Basics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
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 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  >
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 Object counter=0 counter=1 counter=2 counter=3 Self - Delete  Smart Pointer Smart Pointer Smart Pointer
SmartPointers typedef  itk ::Image<  char  ,  2  >  ImageType typedef  itk ::ImageFilter<  ImageType  ,  ImageType  >  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<  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
Streaming Output Image Filter Processing Large Images Input Image
Image Regions LargestPossibleRegion BufferedRegion RequestedRegion
Data Pipeline Image Filter Image Filter Image Image Image Filter
Simple Image IO Image File ImageFileReader Image Filter Image Image File ImageFileWriter
Simple Image IO Loadable Factories CustomImageIO Image File ImageFileReader Image PNGImageIO VTKImageIO DICOMImageIO GIPLImageIO MetaImageIO AnalyzeImageIO
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 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 itk::Command itk::Command itk::Command Event Event Event Event Event
Events and Observers Common Events AnyEvent() StartEvent() EndEvent() ProgressEvent() IterationEvent()
Events and Observers Execute() Itk::Object Itk::ProcessObject Itk::FilterXY Itk::Command MyCommand AddObserver( ) AnyEvent MyEvent
Events and Observers Itk::Object Itk::ProcessObject Itk::FilterXY Itk::Command Itk::SimpleMemberCommand AddObserver( ) MyClass MethodX() AnyEvent MyEvent
Exercise 5 Execute() ProgressEvent() StartEvent() EndEvent() Image File ImageFileReader Filter ImageFileWriter Image File CommandObserver
GUI Communication ITK Layer GUI Layer Widget FilterX Callback Command FilterX Widget Observer
Enjoy ITK  !

More Related Content

What's hot

13 advanced-swing
13 advanced-swing13 advanced-swing
13 advanced-swing
Nataraj Dg
 

What's hot (19)

Intake 38 data access 5
Intake 38 data access 5Intake 38 data access 5
Intake 38 data access 5
 
C# Generics
C# GenericsC# Generics
C# Generics
 
OpenSL ES 1.1 Reference Card
OpenSL ES 1.1 Reference CardOpenSL ES 1.1 Reference Card
OpenSL ES 1.1 Reference Card
 
Java Day-4
Java Day-4Java Day-4
Java Day-4
 
Generics in .NET, C++ and Java
Generics in .NET, C++ and JavaGenerics in .NET, C++ and Java
Generics in .NET, C++ and Java
 
Java Day-5
Java Day-5Java Day-5
Java Day-5
 
Java Day-6
Java Day-6Java Day-6
Java Day-6
 
Chapter 2 - Getting Started with Java
Chapter 2 - Getting Started with JavaChapter 2 - Getting Started with Java
Chapter 2 - Getting Started with Java
 
Intake 38 5
Intake 38 5Intake 38 5
Intake 38 5
 
E2D3 ver. 0.2 API Instruction
E2D3 ver. 0.2 API InstructionE2D3 ver. 0.2 API Instruction
E2D3 ver. 0.2 API Instruction
 
C++ Memory Management
C++ Memory ManagementC++ Memory Management
C++ Memory Management
 
Java generics
Java genericsJava generics
Java generics
 
Java Generics for Dummies
Java Generics for DummiesJava Generics for Dummies
Java Generics for Dummies
 
Use your type system; write less code - Samir Talwar
Use your type system; write less code - Samir TalwarUse your type system; write less code - Samir Talwar
Use your type system; write less code - Samir Talwar
 
Use your type system; write less code
Use your type system; write less codeUse your type system; write less code
Use your type system; write less code
 
Java generics final
Java generics finalJava generics final
Java generics final
 
Java Generics
Java GenericsJava Generics
Java Generics
 
Intake 38 data access 3
Intake 38 data access 3Intake 38 data access 3
Intake 38 data access 3
 
13 advanced-swing
13 advanced-swing13 advanced-swing
13 advanced-swing
 

Viewers also liked

Unit 2 itk gopal
Unit 2 itk gopalUnit 2 itk gopal
Unit 2 itk gopal
GOPAL gkvk
 
indeginous traditional knowledge for tackling climate change
indeginous traditional knowledge for tackling climate changeindeginous traditional knowledge for tackling climate change
indeginous traditional knowledge for tackling climate change
Jagriti Rohit
 
Traditional knowledge changing scenario in india
Traditional knowledge changing scenario in indiaTraditional knowledge changing scenario in india
Traditional knowledge changing scenario in india
Manjappa Ganiger
 
Science, indigenous knowledge & innovation challenges
Science, indigenous knowledge & innovation   challengesScience, indigenous knowledge & innovation   challenges
Science, indigenous knowledge & innovation challenges
CTA
 
Traditional knowledge collection, preservation, protection and access
Traditional knowledge   collection, preservation, protection and accessTraditional knowledge   collection, preservation, protection and access
Traditional knowledge collection, preservation, protection and access
Libsoul Technologies Pvt. Ltd.
 
Local Indigenous Knowledge Systems and Practices – Implications for Flood Ris...
Local Indigenous Knowledge Systems and Practices – Implications for Flood Ris...Local Indigenous Knowledge Systems and Practices – Implications for Flood Ris...
Local Indigenous Knowledge Systems and Practices – Implications for Flood Ris...
Lelihle Simelane
 

Viewers also liked (20)

Local solutions to address global challenges facing farmers and indigenous pe...
Local solutions to address global challenges facing farmers and indigenous pe...Local solutions to address global challenges facing farmers and indigenous pe...
Local solutions to address global challenges facing farmers and indigenous pe...
 
Facilitating access and use of biodiversity data to underpin sustainable deve...
Facilitating access and use of biodiversity data to underpin sustainable deve...Facilitating access and use of biodiversity data to underpin sustainable deve...
Facilitating access and use of biodiversity data to underpin sustainable deve...
 
FAO and Indigenous Peoples
FAO and Indigenous PeoplesFAO and Indigenous Peoples
FAO and Indigenous Peoples
 
Indigenous and traditional knowledge for adaptation: Addressing gender and o...
 Indigenous and traditional knowledge for adaptation: Addressing gender and o... Indigenous and traditional knowledge for adaptation: Addressing gender and o...
Indigenous and traditional knowledge for adaptation: Addressing gender and o...
 
Different directions: the farming dichotomy in Laos
Different directions: the farming dichotomy in LaosDifferent directions: the farming dichotomy in Laos
Different directions: the farming dichotomy in Laos
 
Vuwani science centre presentation - Dr Seleti
Vuwani science centre presentation - Dr SeletiVuwani science centre presentation - Dr Seleti
Vuwani science centre presentation - Dr Seleti
 
Unit 2 itk gopal
Unit 2 itk gopalUnit 2 itk gopal
Unit 2 itk gopal
 
ITK Tutorial Presentation Slides-947
ITK Tutorial Presentation Slides-947ITK Tutorial Presentation Slides-947
ITK Tutorial Presentation Slides-947
 
indeginous traditional knowledge for tackling climate change
indeginous traditional knowledge for tackling climate changeindeginous traditional knowledge for tackling climate change
indeginous traditional knowledge for tackling climate change
 
AKM PPT C6 IK&SK
AKM PPT C6 IK&SKAKM PPT C6 IK&SK
AKM PPT C6 IK&SK
 
Traditional knowledge changing scenario in india
Traditional knowledge changing scenario in indiaTraditional knowledge changing scenario in india
Traditional knowledge changing scenario in india
 
Documentation, validation and contemporary relevance of itk
Documentation, validation and contemporary relevance of itkDocumentation, validation and contemporary relevance of itk
Documentation, validation and contemporary relevance of itk
 
Raymond E Zvavanyange_African Traditional Leadership Conference, November 14-...
Raymond E Zvavanyange_African Traditional Leadership Conference, November 14-...Raymond E Zvavanyange_African Traditional Leadership Conference, November 14-...
Raymond E Zvavanyange_African Traditional Leadership Conference, November 14-...
 
Top countries to study english
Top countries to study englishTop countries to study english
Top countries to study english
 
Science, indigenous knowledge & innovation challenges
Science, indigenous knowledge & innovation   challengesScience, indigenous knowledge & innovation   challenges
Science, indigenous knowledge & innovation challenges
 
The management of indigenous knowledge with other knowledge systems for agric...
The management of indigenous knowledge with other knowledge systems for agric...The management of indigenous knowledge with other knowledge systems for agric...
The management of indigenous knowledge with other knowledge systems for agric...
 
Traditional knowledge in the philippines
Traditional knowledge in the philippinesTraditional knowledge in the philippines
Traditional knowledge in the philippines
 
Traditional knowledge collection, preservation, protection and access
Traditional knowledge   collection, preservation, protection and accessTraditional knowledge   collection, preservation, protection and access
Traditional knowledge collection, preservation, protection and access
 
Local Indigenous Knowledge Systems and Practices – Implications for Flood Ris...
Local Indigenous Knowledge Systems and Practices – Implications for Flood Ris...Local Indigenous Knowledge Systems and Practices – Implications for Flood Ris...
Local Indigenous Knowledge Systems and Practices – Implications for Flood Ris...
 
Perspectives on The Role and Use of Indigenous Knowledge in Rural And Agricul...
Perspectives on The Role and Use of Indigenous Knowledge in Rural And Agricul...Perspectives on The Role and Use of Indigenous Knowledge in Rural And Agricul...
Perspectives on The Role and Use of Indigenous Knowledge in Rural And Agricul...
 

Similar to ITK Tutorial Presentation Slides-945

Data Structure & Algorithm - Self Referential
Data Structure & Algorithm - Self ReferentialData Structure & Algorithm - Self Referential
Data Structure & Algorithm - Self Referential
babuk110
 

Similar to ITK Tutorial Presentation Slides-945 (20)

Significant Characteristics In Planets Manfred Thaller
Significant Characteristics In Planets Manfred ThallerSignificant Characteristics In Planets Manfred Thaller
Significant Characteristics In Planets Manfred Thaller
 
jQuery for Sharepoint Dev
jQuery for Sharepoint DevjQuery for Sharepoint Dev
jQuery for Sharepoint Dev
 
COSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer ToolsCOSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer Tools
 
Image recognition applications and dataset preparation - DevFest Baghdad 2018
Image recognition applications and dataset preparation - DevFest Baghdad 2018Image recognition applications and dataset preparation - DevFest Baghdad 2018
Image recognition applications and dataset preparation - DevFest Baghdad 2018
 
Bsides
BsidesBsides
Bsides
 
C++lecture9
C++lecture9C++lecture9
C++lecture9
 
426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools
 
Creating Maps With Style
Creating Maps With StyleCreating Maps With Style
Creating Maps With Style
 
Data Structure & Algorithm - Self Referential
Data Structure & Algorithm - Self ReferentialData Structure & Algorithm - Self Referential
Data Structure & Algorithm - Self Referential
 
Xml encryption
Xml encryptionXml encryption
Xml encryption
 
Rendering The Fat
Rendering The FatRendering The Fat
Rendering The Fat
 
C#, What Is Next?
C#, What Is Next?C#, What Is Next?
C#, What Is Next?
 
Can We Trust the Libraries We Use?
Can We Trust the Libraries We Use?Can We Trust the Libraries We Use?
Can We Trust the Libraries We Use?
 
MySQL under the siege
MySQL under the siegeMySQL under the siege
MySQL under the siege
 
Ajax ons2
Ajax ons2Ajax ons2
Ajax ons2
 
IRJET - Automatic Licence Plate Detection and Recognition
IRJET -  	  Automatic Licence Plate Detection and RecognitionIRJET -  	  Automatic Licence Plate Detection and Recognition
IRJET - Automatic Licence Plate Detection and Recognition
 
structure1.pdf
structure1.pdfstructure1.pdf
structure1.pdf
 
Getting started cpp full
Getting started cpp   fullGetting started cpp   full
Getting started cpp full
 
Intro to RX
Intro to RXIntro to RX
Intro to RX
 
Pictagger
PictaggerPictagger
Pictagger
 

More from Kitware Kitware

More from Kitware Kitware (20)

Radial Thickness Calculation and Visualization for Volumetric Layers-8397
Radial Thickness Calculation and Visualization for Volumetric Layers-8397Radial Thickness Calculation and Visualization for Volumetric Layers-8397
Radial Thickness Calculation and Visualization for Volumetric Layers-8397
 
A Framework for Comparison and Evaluation of Nonlinear Intra-Subject Image Re...
A Framework for Comparison and Evaluation of Nonlinear Intra-Subject Image Re...A Framework for Comparison and Evaluation of Nonlinear Intra-Subject Image Re...
A Framework for Comparison and Evaluation of Nonlinear Intra-Subject Image Re...
 
Registration-3771
Registration-3771Registration-3771
Registration-3771
 
Automatic Brain Segmentation-3770
Automatic Brain Segmentation-3770Automatic Brain Segmentation-3770
Automatic Brain Segmentation-3770
 
Nrrd to Dicom Conversion-3769
Nrrd to Dicom Conversion-3769Nrrd to Dicom Conversion-3769
Nrrd to Dicom Conversion-3769
 
Data Saving-3767
Data Saving-3767Data Saving-3767
Data Saving-3767
 
FreeSurfer Reader-3766
FreeSurfer Reader-3766FreeSurfer Reader-3766
FreeSurfer Reader-3766
 
Functional Magnetic Resonance Imaging Analysis-3765
Functional Magnetic Resonance Imaging Analysis-3765Functional Magnetic Resonance Imaging Analysis-3765
Functional Magnetic Resonance Imaging Analysis-3765
 
Diffusion Tensor Imaging Analysis-3749
Diffusion Tensor Imaging Analysis-3749Diffusion Tensor Imaging Analysis-3749
Diffusion Tensor Imaging Analysis-3749
 
Manual Segmentation-3747
Manual Segmentation-3747Manual Segmentation-3747
Manual Segmentation-3747
 
Data Loading and Visualization-3735
Data Loading and Visualization-3735Data Loading and Visualization-3735
Data Loading and Visualization-3735
 
Principles and Practices of Scientific Originology-8392
Principles and Practices of Scientific Originology-8392Principles and Practices of Scientific Originology-8392
Principles and Practices of Scientific Originology-8392
 
Principles and Practices of Scientific Originology-8391
Principles and Practices of Scientific Originology-8391Principles and Practices of Scientific Originology-8391
Principles and Practices of Scientific Originology-8391
 
ITK Tutorial Presentation Slides-953
ITK Tutorial Presentation Slides-953ITK Tutorial Presentation Slides-953
ITK Tutorial Presentation Slides-953
 
ITK Tutorial Presentation Slides-952
ITK Tutorial Presentation Slides-952ITK Tutorial Presentation Slides-952
ITK Tutorial Presentation Slides-952
 
ITK Tutorial Presentation Slides-951
ITK Tutorial Presentation Slides-951ITK Tutorial Presentation Slides-951
ITK Tutorial Presentation Slides-951
 
ITK Tutorial Presentation Slides-950
ITK Tutorial Presentation Slides-950ITK Tutorial Presentation Slides-950
ITK Tutorial Presentation Slides-950
 
ITK Tutorial Presentation Slides-949
ITK Tutorial Presentation Slides-949ITK Tutorial Presentation Slides-949
ITK Tutorial Presentation Slides-949
 
ITK Tutorial Presentation Slides-946
ITK Tutorial Presentation Slides-946ITK Tutorial Presentation Slides-946
ITK Tutorial Presentation Slides-946
 
ITK Tutorial Presentation Slides-944
ITK Tutorial Presentation Slides-944ITK Tutorial Presentation Slides-944
ITK Tutorial Presentation Slides-944
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

ITK Tutorial Presentation Slides-945

  • 2.
  • 3. 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 >
  • 4. itk::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 >
  • 5. namespaces Avoid naming collisions itk :: itk ::Statistics:: itk ::fem:: itk ::fem:: itpack itk ::bio
  • 6. 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
  • 7. Smart Pointers Object counter=0 counter=1 counter=2 counter=3 Self - Delete Smart Pointer Smart Pointer Smart Pointer
  • 8. SmartPointers typedef itk ::Image< char , 2 > ImageType typedef itk ::ImageFilter< ImageType , ImageType > FilterType FilterType:: Pointer filter = FilterType:: New() ; ImageType:: Pointer image = filter-> GetOutput() ; NO NEED FOR filter-> Delete() ; Pointer notation filter-> Update() ;
  • 9. Const Correctness Knowing constancy is Insight. Not knowing constancy leads to disaster. Tao Te Ching , XVI. Lao Tsu
  • 10. 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 ) ;
  • 11. 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
  • 12. 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 );
  • 14. Streaming Output Image Filter Processing Large Images Input Image
  • 15. Image Regions LargestPossibleRegion BufferedRegion RequestedRegion
  • 16. Data Pipeline Image Filter Image Filter Image Image Image Filter
  • 17. Simple Image IO Image File ImageFileReader Image Filter Image Image File ImageFileWriter
  • 18. Simple Image IO Loadable Factories CustomImageIO Image File ImageFileReader Image PNGImageIO VTKImageIO DICOMImageIO GIPLImageIO MetaImageIO AnalyzeImageIO
  • 19. 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() ;
  • 20. Exceptions Error Management ITK Layer Application Layer
  • 21. Exceptions try { filter->Update(); } catch( itk:: ExceptionObject & exp ) { std::cerr << exp << std::endl; }
  • 22. Exercise 4 Image File ImageFileWriter Caster Image File ImageFileReader Filter
  • 23. Events and Observers Itk::Object Itk::Command itk::Command itk::Command itk::Command itk::Command Event Event Event Event Event
  • 24. Events and Observers Common Events AnyEvent() StartEvent() EndEvent() ProgressEvent() IterationEvent()
  • 25. Events and Observers Execute() Itk::Object Itk::ProcessObject Itk::FilterXY Itk::Command MyCommand AddObserver( ) AnyEvent MyEvent
  • 26. Events and Observers Itk::Object Itk::ProcessObject Itk::FilterXY Itk::Command Itk::SimpleMemberCommand AddObserver( ) MyClass MethodX() AnyEvent MyEvent
  • 27. Exercise 5 Execute() ProgressEvent() StartEvent() EndEvent() Image File ImageFileReader Filter ImageFileWriter Image File CommandObserver
  • 28. GUI Communication ITK Layer GUI Layer Widget FilterX Callback Command FilterX Widget Observer