Lecture 19 ITK’s Path Framework

Slides:



Advertisements
Similar presentations
Multi-chart Geometry Images Pedro Sander Harvard Harvard Hugues Hoppe Microsoft Research Hugues Hoppe Microsoft Research Steven Gortler Harvard Harvard.
Advertisements

電腦視覺 Computer and Robot Vision I
Text Scaffolds for Effective Surface Labeling Gregory Cipriano and Michael Gleicher.
Usage of Sobolev metric to detect an object’s boundaries Supervisor: Arie Nahkmani Students: Yoav Ben-Raphael Itzik Ben-Basat.
WFM 6202: Remote Sensing and GIS in Water Management © Dr. Akm Saiful IslamDr. Akm Saiful Islam WFM 6202: Remote Sensing and GIS in Water Management Akm.
MATHIEU GAUTHIER PIERRE POULIN LIGUM, DEPT. I.R.O. UNIVERSITÉ DE MONTRÉAL GRAPHICS INTERFACE 2009 Preserving Sharp Edges in Geometry Images.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 8: Intro to 3D objects, meshes Ravi Ramamoorthi
Interactive Animation of Structured Deformable Objects Mathieu Desbrun Peter Schroder Alan Barr.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 4: 3D Objects and Meshes Ravi Ramamoorthi
Spatial Information Systems (SIS) COMP Raster-based structures (2) Data conversion.
Comp 775: Deformable models: snakes and active contours Marc Niethammer, Stephen Pizer Department of Computer Science University of North Carolina, Chapel.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Implementation I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Introduction to Longitudinal Phase Space Tomography Duncan Scott.
CSE554Binary PicturesSlide 1 CSE 554 Lecture 1: Binary Pictures Fall 2013.
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
Navigating and Browsing 3D Models in 3DLIB Hesham Anan, Kurt Maly, Mohammad Zubair Computer Science Dept. Old Dominion University, Norfolk, VA, (anan,
A Navigation Mesh for Dynamic Environments Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts CASA 2012.
06 - Boundary Models Overview Edge Tracking Active Contours Conclusion.
6. Simple Features Specification Background information UML overview Simple features geometry.
Surface Modeling Visualization using BrainVISA Bill Rogers UTHSCSA – Research Imaging Center.
2D/3D Shape Manipulation, 3D Printing Shape Representations Slides from Olga Sorkine February 20, 2013 CS 6501.
Intelligent Vision Systems ENT 496 Object Shape Identification and Representation Hema C.R. Lecture 7.
The content of these slides by John Galeotti, © Carnegie Mellon University (CMU), was made possible in part by NIH NLM contract# HHSN P,
1 ITK Lecture 8 - Neighborhoods Methods in Image Analysis CMU Robotics Institute U. Pitt Bioengineering 2630 Spring Term, 2006 Methods in Image.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Methods in Image Analysis 2004, Damion Shelton 1 ITK Lecture 9 - Toolbox Part I Methods in Image Analysis CMU Robotics Institute U. Pitt Bioengineering.
1 ITK Lecture 9 - Toolbox Part I Methods in Image Analysis CMU Robotics Institute U. Pitt Bioengineering 2630 Spring Term, 2006 Methods in Image.
Intro. to Advanced Lighting, Basic Ray Tracing Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, April.
Overview of Propagating Interfaces Donald Tanguay October 30, 2002.
A survey of different shape analysis techniques 1 A Survey of Different Shape Analysis Techniques -- Huang Nan.
Geometric Modeling using Polygonal Meshes Lecture 3: Discrete Differential Geometry and its Application to Mesh Processing Office: South B-C Global.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Computer Graphics Rendering 2D Geometry CO2409 Computer Graphics Week 2.
11/6/ :55 Graphics II Introduction to Parametric Curves and Surfaces Session 2.
1Computer Graphics Implementation 1 Lecture 15 John Shearer Culture Lab – space 2
1 ITK Lecture 5 Intro to Iterators Methods in Image Analysis CMU Robotics Institute U. Pitt Bioengineering 2630 Spring Term, 2006 Methods in Image.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities May 2, 2005 Prof. Charlene Tsai.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
3D Object Representations 2009, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
Lecture 9 From Vertices to Fragments. Objectives Introduce basic implementation strategies Clipping Rasterization hidden-surface removal.
Simplified Representation of Vector Fields
3.1 Clustering Finding a good clustering of the points is a fundamental issue in computing a representative simplicial complex. Mapper does not place any.
CSE 554 Lecture 1: Binary Pictures
Transformations contd.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Computer Graphics Shading in OpenGL
3D Object Representations
Lecture 13 Shape ch. 9, sec. 1-8, of Machine Vision by Wesley E
Mean Shift Segmentation
Slope and Curvature Density Functions
Implementation I Ed Angel
Lecture 12 Level Sets & Parametric Transforms sec & ch
Objective of This Course
Final Project Details Note: To print these slides in grayscale (e.g., on a laser printer), first change the Theme Background to “Style 1” (i.e., dark.
Lecture 5 Image Characterization ch. 4 of Machine Vision by Wesley E
CS Digital Image Processing Lecture 5
Lecture 15 Active Shape Models
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
Filtering Images Work in the spatial domain
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
Lecture 3 Math & Probability Background ch
Implementation I Ed Angel Professor Emeritus of Computer Science
(CMU ECE) : (CMU BME) : BioE 2630 (Pitt)
Lecture 14 Shape ch. 9, sec. 1-8, of Machine Vision by Wesley E
Lecture 3 Math & Probability Background ch
(CMU ECE) : (CMU BME) : BioE 2630 (Pitt)
Error Correction Coding
Presentation transcript:

Lecture 19 ITK’s Path Framework Note: To print these slides in grayscale (e.g., on a laser printer), first change the Theme Background to “Style 1” (i.e., dark text on white background), and then tell PowerPoint’s print dialog that the “Output” is “Grayscale.” Everything should be clearly legible then. This is how I also generate the .pdf handouts.

Preface This is based on the slides I presented at MICCAI 05’s ITK workshop. They discuss the motivation and usage for the unified path framework I added to ITK. You can see the related Insight Journal article at http://hdl.handle.net/1926/40 (Note: It used to be one of the top-rated journal articles until I.J. was redone, and all the old reviews were scrapped.)

Introduction The need for paths in ITK Basic concepts and path types Implementation details Example usage

The Need for Paths in ITK A path is a curve that maps a scalar value to a point in n-dimensional space

The Need for Paths in ITK Paths are useful for: Segmentation algorithms Active contours, snakes, LiveWire Ridge tracking Path planning User interaction Implementation of the above in ITK can be simplified by having a common, existing path framework. Implementation of the above USING PATHS in ITK

The Need for Paths in ITK Unfortunately, the ITK pipeline was originally designed to operate on image and mesh data types Neither images nor meshes are well suited for path representation

Basic Concepts and Path Types Two common types of paths: Chain codes are a type of discrete curve Parametric curves are continuous Other types of paths are also possible

Chain Codes Represent a path as as sequence of offsets between adjoining voxels Provide efficient incremental access and comparatively poor random index access If you are iterating along the voxels traced by a path …to the traced voxel indices

2D Chain Code Example: Freeman Code 7 2 1 3 8 6 4 5 7 2 1 3 8 6 4 5 = “18765432”

Parametric Curves 1 P Represent a path as an algebraically defined curve parameterized over a scalar input Provide efficient random access and comparatively poor incremental index access Difficult to know how much to increment the parameterized input to reach the next voxel

Implementation Details Necessary Functionality Path class hierarchy Path iterators Path filter hierarchy 1, 2, 3 that I added to ITK

Necessary Functionality Efficiency Handle open, closed, & self-crossing paths Iterate along a path through an image Examine image data in an arbitrarily defined neighborhood surrounding any given point along a path

Necessary Functionality Create and modify arbitrary chain codes Smooth paths in continuous index space Find exact normals to smooth paths Distort paths by orthogonal offsets at regular spacing Support user interaction

OrthogonallyCorrected Path Class Hierarchy DataObject FunctionBase<TInput,TOutput> (API) Path<TInput,TOutput,VDimension> Path<int,Offset <VDimension>,VDimension> Path<double,ContinuousIndex <VDimension>,VDimension> ParametricPath<VDimension> ChainCodePath<VDimension> FunctionBase & DataObject … ParametricPaths -> EASY TO EXTEND OrthogonallyCorrected2DParametricPath (in a few slides) FourierSeriesPath <VDimension> OrthogonallyCorrected 2DParametricPath ChainCodePath2D PolyLineParametricPath<VDimension> Key Instantiatable Class Abstract Base Class

PolyLineParametricPath Represents a path as a series of vertices connected by line segments Provides a simple means of creating a path that can then be converted to other path types

FourierSeriesPath Represents a closed path by its Fourier coefficients in each dimension Has continuous well-defined derivatives with respect to its input At all points along the curve, the normal direction is well-defined and easy to compute. t y(t) x(t)

Orthogonally Corrected Path

Path Iterators Iterators traverse paths through images Allows const paths Necessary for path inputs in pipeline Implemented a universal path iterator PathConstIterator <TImage,TPath> PathIterator <Timage,Tpath>

Path Iterators: Implementation Iterators traverse paths through images Paths do not store a current position; iterators do Allows const paths with many concurrent positions The path iterator is able to traverse any type of path Path iterators are supported by the Path:: IncrementInput(InputType & Input) function All paths must know how much to increment a given path input to advance the path output to the next neighboring voxel along the path For efficiency, IncrementInput() returns the offset resulting from its modification of Input The iterator asks its path how much to increment the iterator’s current path input to reach the next neighboring voxel

Current Base Class API Path<TInput,TOutput,VDimension> virtual InputType StartOfInput() const virtual InputType EndOfInput() const virtual OutputType Evaluate(InputType) const =0 virtual IndexType EvaluateToIndex(InputType) const =0 virtual OffsetType IncrementInput(InputType) const =0 PathConstIterator<TImage,TPath> GoToBegin() bool IsAtEnd() operator++() IndexType GetIndex() PathInputType GetPathPosition()

Subclass API Extensions ChainCodePath<VDimension> SetStart(IndexType) IndexType GetStart() const unsigned NumberOfSteps() const InsertStep(InputType position, OffsetType step) ChangeStep(InputType position, OffsetType step) Clear() ParametricPath<VDimension> VectorType EvaluateDerivative(InputType) const FourierSeriesPath<VDimension> AddHarmonic(VectorType CosCoef, VectorType SinCoef)

ExtractOrthogonalSwath Path Filter Hierarchy ProcessObject PathSource<TOutputPath> ImageSource<TOutputImage> PathToImageFilter <TInputPath,TOutputImage> PathToPathFilter <TInputPath,TOutputPath> ImageToImageFilter <TInputImage,TOutputImage> PathToChain CodePathFilter <TInputPath, TOutputChainCodePath> ChainCodeToFourier SeriesPathFilter <TInputChainCodePath, TOutputFourierSeriesPath> Main difficulty: PathSource & PathToPathFilter Also necessary: PathAndImageToPathFilter & ImageAndPathToImageFilter Rasterize Paths Convert Paths (next slide) Extract…Swath… (later slide) PathAndImageToPathFilter <TInputPath,TInputImage, TOutputPath> ImageAndPathToImageFilter <TInputImage,TInputPath, TOutputImage> OrthogonalSwath2DPathFilter <TFourierSeriesPath,TSwathMeritImage> ExtractOrthogonalSwath 2DImageFilter<Timage>

Conversion Filters Path PathToChain CodePathFilter ChainCode ChainCode AllowDiagonalSteps(bool=true) PathToChain CodePathFilter ChainCode ChainCode ChainCodeToFourier SeriesPathFilter SetNumHarmonics(int=8) FourierSeriesPath

Philosophical Comparison with Spatial Objects Spatial Objects represent geometric shapes (and therefore their associated boundaries) A Spatial Object’s interior is well defined Paths represent sequences of connected indices A path may not be closed (no interior defined) A closed path’s interior is difficult to compute

Empirical Comparison with Spatial Objects Spatial Objects are well suited to rendering, analysis, and data interchange Paths are well suited to computation, optimization, and iterator direction control ITK could be extended to enable simple conversion by: Making a Spatial Object that uses one or more paths as an internal representation Making a Path that uses one or more intersecting spatial objects as an internal representation

Example Usage Implementation of a published 2D active contour algorithm Finds optimal orthogonal offsets at evenly spaced points along an initial path Requires that neighboring offsets differ in value by at most one Added to ITK, including demonstration test code Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx

OrthogonalSwath2DPathFilter PolyLineParametricPath (closed) Image PathToChainCodePathFilter ChainCodeToFourierSeriesPathFilter OrthogonalCorrected2DParametricPath OrthogonalSwath2DPathFilter ExtractOrthogonalSwath2DImageFilter DerivativeImageFilter (vertical)

Conclusion Added user-extensible path support to ITK Data type hierarchy Iterators Filter hierarchy Example implementation in test code New core data types can be added to ITK!