700 likes | 1.01k Views
Methods In Medical Image Analysis. Theoretical & practical skills in medical image analysis Imaging modalities Segmentation Registration Visualization Image understanding Established methods and current research. Why Is Medical Image Analysis Special ?.
E N D
Methods In Medical Image Analysis • Theoretical & practical skills in medical image analysis • Imaging modalities • Segmentation • Registration • Visualization • Image understanding • Established methods and current research
Why Is Medical Image Analysis Special? • Because of the patient • Computer Vision: • Good at detecting irregulars, e.g. on the factory floor • But no two patients are alike--everyone is “irregular” • Medicine is war • Radiology is primarily for reconnaissance • Surgeons are the marines • Life/death decisions made on insufficient information • Success measured by patient recovery • You’re not in “theory land” anymore
What Do I Mean by Analysis? • Different from “Image Processing” • Results in identification, measurement, and/or judgment • Produces numbers, words, & actions • Holy Grail: complete image understanding automated within a computer to perform diagnosis & control robotic intervention • State of the art: segmentation & registration
Segmentation • Labeling every voxel • Discrete vs. fuzzy • How good are such labels? • Gray matter (circuits) vs. white matter (cables). • Tremendous oversimplification • Requires a model
Registration • Image to Image • same vs. different imaging modality • same vs. different patient • topological variation • Image to Model • deformable models • Model to Model • matching graphs
Visualization • Visualization used to mean to picture in the mind. • Retina is a 2D device • Analysis needed to visualize surfaces • Doctors prefer slices to renderings • Visualization is required to reach visual cortex • Computers have an advantage over humans in 3D
How Are We Going to Do This? • The Shadow Program • Observe & interact w/ practicing radiologists • Project oriented • C++ & ITK • National Library of Medicine Insight Toolkit • A software library developed by a consortium of institutions including the University of Pittsburgh • Open source • Large online community • www.itk.org
The Practice of AutomatedMedical Image Analysis • A collection of recipes, a box of tools • Equations that function: crafting human thought. • ITK is a library, not a program. • Solutions: • Computer programs (fully- and semi-automated). • Very application-specific, no general solution. • Supervision / apprenticeship of machines
Anatomical Axes • Superior = head • Inferior = feet • Anterior = front • Posterior = back • Proximal = central • Distal = peripheral
Imaging Modalities • Camera • X-Ray • CT • Ultrasound • MRI • …
1896: The X-Ray Wilhelm Röntgen
X-Ray and Fluoroscopic Images • Projection of X-Ray silhouette onto a piece of film or detector array, with intervening fluorescent screen
Computerized Tomography • From a series of projections, a tomographicimage is reconstructed using Filtered Back Projection.
Nuclear Medicine • Previously discussed imaging modalities image anatomy (structure). • Nuclear medicine images physiology (function) • At the cellular (and subcellular) level • Technically a type of molecular imaging • Requires use of radioactive pharmaceuticals
SPECT • Single Photon Emission Computed Tomography • Gamma camera for creating image of radioactive target • Camera is rotated around patient
Positron Emission Tomography • Positron-emitting organic compounds create pairs of high energy photons that are detected synchronously. No collimators, greater sensitivity. Attenuation is not location dependent, so quantification is possible.
Phased Array Ultrasound • Images anatomy • Ultrasound beam formed and steered by controlling the delay between the elements of the transducer array
Other Imaging Modalities • MRI & fMRI • OCT (“optical ultrasound”) • Pathology (in addition to Radiology) • Other modalities coming down the pike
Current Trends in Imaging • 3D, 4D, … • Higher speed • Greater resolution • Measure function as well as structure • Combining modalities (including direct vision)
The Gold Standard • Dissection: • Medical School, Day 1: • Meet the Cadaver. • From Vesalius to the Visible Human
A brief C++ review • Review of object oriented programming • Inheritance & polymorphism • Public / private / protected derivation • Review of generic programming • templates • templatedclasses • specialization • typedef& typename keywords
Namespaces • Namespaces solve the problem of classes that have the same name • E.g., ITK contains an Array class, perhaps your favorite add-on toolkit does too • You can avoid conflicts by creating your own namespace around code namespace itk { code }
Namespaces, cont. • Within a given namespace, you refer to other classes in the same namespace by their name only, e.g. inside the itknamespace Array means “use the ITK array” • Outside of the namespace, you use the itk:: prefix, e.g. itk::Array • Only code which is part of ITK itself should be inside the itknamespace • At minimum, youʼre always in the global namespace
Namespaces, cont. • Note that code within the itknamespace should refer to code outside of the namespace explicitly • E.g. use std::cout instead of cout
Object-oriented programming • Identify functional units in your design • Write classes to implement these functional units • Preferably as “black boxes” • Separate functionality as much as possible to promote code re-use
Class membership • Classes have member variables and methods • ITK names class member variables with the “m_” prefix, as in “m_VariableName” • Class members are 1 of 3 types • Public • Private • Protected
Public membership • Everyone can access the member • The rest of the world • The class itself • Child classes • You should avoid making member variables public, in order to prevent undesired modification. • A black box shouldnʼt have openings
Private membership • Only the class itself can access the member • Itʼsnot visible to the rest of the world • Child classes canʼt access it either
Protected membership • The middle ground between public and private • The outside world canʼt access it… but derived classes can
ITK and membership • In ITK, member variables are almost always private • There are public accessor functions that allow the rest of the world to get and set the value of the private member • This ensures that the class knows when the value of a variable changes
Why do it this way? • Consider a filter class - if someone changes a variable in the filter, it should re-run itself the next time the user asks for output • If nothing has changed, it doesnʼt waste time running again • Accessorfunctions set a “modified flag” to notify the framework when things have changed
Inheritance in a nutshell • Pull common functionality into a base class • Implement specific functionality in derived classes • Donʼtre-invent the wheel! • Base classes = parents • Derived classes = children
Overloading • If a child class re-implements a function from the base class, it “overloads” the function • You can use this to change the behavior of a function in the child class, while preserving the global interface
An example of inheritance ina graphical drawing program • Shape • Polygon • Triangle • Quadrilateral • Rectangle • Trapezoid • Rhombus • Pentagon • ConicSection • Ellipse • Circle • Parabola
An example of ITK inheritance • itk::DataObject • itk::ImageBase< VImageDimension > • itk::Image< TPixel, VImageDimension>
Virtual functions • Virtual functions allow you to declare functions that “might” or “must” be in child classes • You can specify (and use) a virtual function without knowing how it will be implemented in child classes
Virtual functions, cont. • The “=0” declaration means that the function must be implemented in a child class • This allows for polymorphism • For example: • virtual void DrawSelf() = 0;
Example of polymorphism ina graphical drawing program • Shape: DrawSelf() = 0; • Polygon: int vertices; DrawSelf() connects vertices with line segments • Triangle: vertices=3 • Quadrilateral: vertices=4 • Rectangle • Trapezoid • Rhombus • Pentagon: vertices=5 • ConicSection • Ellipse: DrawSelf() uses semimajor and semiminor axes • Circle: forces length semiminor axis = length semimajor • Parabola
Generic programming • Generic programming encourages: • Writing code without reference to a specific data type (float, int, etc.) • Designing code in the most “abstract” manner possible • Why? • Trades a little extra design time for greatly improved re-usability
Image example • Images are usually stored as arrays of a particular data type • e.g. unsigned char[256*256] • Itʼsconvenient to wrap this array inside an image class (good object oriented design) • Allowing the user to change the image size is easy with dynamically allocated arrays
Image example, cont. • Unfortunately, changing the data type isnotso easy • Typically you make a design choice and live with it (most common) • Or, youʼre forced to implement a double class, a float class, an int class, and so on (less common, complicated)
Templates to the rescue • Templates provide a way out of the data type quandary • If youʼre familiar with macros, you can think of templates as macros on steroids • With templates, you design classes to handle an arbitrary “type”
Anatomy of a templated class • template <class TPixel, unsigned intVImageDimension=2> class ITK_EXPORT Image : public ImageBase<VImageDimension> • Template keyword, the < >’s enclose template parameters
Anatomy of a templated class • template <class TPixel, unsigned intVImageDimension=2> class ITK_EXPORT Image : public ImageBase<VImageDimension> • TPixel is a class (of some sort)
Anatomy of a templated class • template <class TPixel, unsigned intVImageDimension=2> class ITK_EXPORT Image : public ImageBase<VImageDimension> • VImageDimension is an unsigned int, with a default value of 2
Anatomy of a templated class • template <class TPixel, unsigned intVImageDimension=2> class ITK_EXPORT Image : public ImageBase<VImageDimension> • Image is the name of this class
Anatomy of a templated class • template <class TPixel, unsigned intVImageDimension=2> class ITK_EXPORT Image : publicImageBase<VImageDimension> • Image is derived from ImageBase in a public manner
Specialization • When you specify all of the template parameters, you “fully specialize” the class • In the previous example, ImageBase<VImageDimension> specializes the base class by specifying its template parameter. Note that the VImageDimension parameter is actually “passed through” from Imageʼstemplate parameters