Generalizing vesselness with respect to dimensionality and shape Release 1.00

Similar documents
Package vesselr. R topics documented: April 3, Type Package

Introduction to ITK. David Doria. (Funded by the US National Library of Medicine)

Modeling and preoperative planning for kidney surgery

Automatic Vascular Tree Formation Using the Mahalanobis Distance

Comparison of Vessel Segmentations using STAPLE

Evaluation of Hessian-based filters to enhance the axis of coronary arteries in CT images

2D Vessel Segmentation Using Local Adaptive Contrast Enhancement

Vessel Centerline Tracking in CTA and MRA Images Using Hough Transform

Comparison of Vessel Segmentations Using STAPLE

Cerebral Artery Segmentation with Level Set Methods

Probabilistic Tracking and Model-based Segmentation of 3D Tubular Structures

Accurate Quantification of Small-Diameter Tubular Structures in Isotropic CT Volume Data Based on Multiscale Line Filter Responses

Multiscale Vessel Enhancement Filtering*

Characterizing Vascular Connectivity from microct Images

Automatic Cerebral Aneurysm Detection in Multimodal Angiographic Images

A Hybrid Method for Coronary Artery Stenoses Detection and Quantification in CTA Images

Direction-adaptive grey-level morphology. Application to 3D vascular brain imaging

Lecture 13 Theory of Registration. ch. 10 of Insight into Images edited by Terry Yoo, et al. Spring (CMU RI) : BioE 2630 (Pitt)

DETECTING and extracting blood vessels in magnetic resonance

An Advanced Automatic Fuzzy Rule-Based Algorithm for 3D Vessel Segmentation

Classification-based summation of cerebral digital subtraction angiography series for image post-processing algorithms

Rigid and Deformable Vasculature-to-Image Registration : a Hierarchical Approach

Application of level set based method for segmentation of blood vessels in angiography images

4D Motion Modeling of the Coronary Arteries from CT Images for Robotic Assisted Minimally Invasive Surgery

TECHNICAL REPORT. Smart Linking of 2D and 3D Views in Medical Applications

BLUT : Fast and Low Memory B-spline Image Interpolation

Chapter 4. Clustering Core Atoms by Location

Evaluation of Diffusion Techniques for Improved Vessel Visualization and Quantification in Three-Dimensional Rotational Angiography

AUTOMATIC BLASTOMERE DETECTION IN DAY 1 TO DAY 2 HUMAN EMBRYO IMAGES USING PARTITIONED GRAPHS AND ELLIPSOIDS

Automatic segmentation of cortical vessels in pre- and post- tumor resection laser range scan images

Lecture 14 Shape. ch. 9, sec. 1-8, of Machine Vision by Wesley E. Snyder & Hairong Qi. Spring (CMU RI) : BioE 2630 (Pitt)

An ITK Filter for Bayesian Segmentation: itkbayesianclassifierimagefilter

Model-Based Respiratory Motion Compensation for Image-Guided Cardiac Interventions

Programming into Slicer3

Segmentation of hepatic artery in multi-phase liver CT using directional dilation and connectivity analysis

GPU-Based Airway Segmentation and Centerline Extraction for Image Guided Bronchoscopy

Interactive segmentation of vascular structures in CT images for liver surgery planning

ADAPTIVE GRAPH CUTS WITH TISSUE PRIORS FOR BRAIN MRI SEGMENTATION

Multiscale Blood Vessel Segmentation in Retinal Fundus Images

Chapter 3 Image Registration. Chapter 3 Image Registration

A Geometric Flow for Segmenting Vasculature in Proton-Density Weighted MRI

Motion Tracking and Event Understanding in Video Sequences

Introduction to Digital Image Processing

Analysis of inner fracture surfaces in CFRP based on µ-ct image data

Coronary Artery Tracking from Dynamic Cardiac CT Sequences

Floating-point numbers. Phys 420/580 Lecture 6

Augmented Reality VU. Computer Vision 3D Registration (2) Prof. Vincent Lepetit

Robust Centerline Extraction from Tubular Structures in Medical Images

Homework 1 Introduction to Computational Finance Spring 2019

The SIFT (Scale Invariant Feature

OpenCV. Basics. Department of Electrical Engineering and Computer Science

Guide wire tracking in interventional radiology

Normalized cuts and image segmentation

Spinal Crawlers: Deformable Organisms for Spinal Cord Segmentation and Analysis

International Association of Scientific Innovation and Research (IASIR) (An Association Unifying the Sciences, Engineering, and Applied Research)

Automatic Hepatic Vessel Segmentation Using Graphics Hardware

Segmentation of Fat and Fascias in Canine Ultrasound Images

8/3/2017. Contour Assessment for Quality Assurance and Data Mining. Objective. Outline. Tom Purdie, PhD, MCCPM

SuRVoS Workbench. Super-Region Volume Segmentation. Imanol Luengo

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

Image Enhancement in Spatial Domain. By Dr. Rajeev Srivastava

1.Some Basic Gray Level Transformations

Automatic No-Reference Quality Assessment for Retinal Fundus Images Using Vessel Segmentation

Bioimage Informatics

Lecture 3: Camera Calibration, DLT, SVD

Vessel Filtering of Photoacoustic Images

Corner Detection. Harvey Rhody Chester F. Carlson Center for Imaging Science Rochester Institute of Technology

8. Tensor Field Visualization

Robotics Programming Laboratory

Laser sensors. Transmitter. Receiver. Basilio Bona ROBOTICA 03CFIOR

Segmenting the Left Ventricle in 3D Using a Coupled ASM and a Learned Non-Rigid Spatial Model

Retinal Vessel Centerline Extraction Using Multiscale Matched Filters, Confidence and Edge Measures

A GENTLE INTRODUCTION TO THE BASIC CONCEPTS OF SHAPE SPACE AND SHAPE STATISTICS

IMAGE PROCESSING >FILTERS AND EDGE DETECTION FOR COLOR IMAGES UTRECHT UNIVERSITY RONALD POPPE

Retinal Vessel Centerline Extraction Using Multiscale Matched Filters, Confidence and Edge Measures

Tubular Anisotropy Segmentation

Lecture 2 September 3

Identify the Centerline of Tubular Structure in Medical Images

Dense Image-based Motion Estimation Algorithms & Optical Flow

3D/2D Model-to-Image Registration Applied to TIPS Surgery

n o r d i c B r a i n E x Tutorial DTI Module

Motion and Tracking. Andrea Torsello DAIS Università Ca Foscari via Torino 155, Mestre (VE)

Nonrigid Registration with Adaptive, Content-Based Filtering of the Deformation Field

An Intuitive Explanation of Fourier Theory

A Quadrature Filter Approach for Registration Accuracy Assessment of Fundus Images

Processing of MRI images weighted in TOF for blood vessels analysis: 3-D Reconstruction

Using Subspace Constraints to Improve Feature Tracking Presented by Bryan Poling. Based on work by Bryan Poling, Gilad Lerman, and Arthur Szlam

NIH Public Access Author Manuscript Proc Soc Photo Opt Instrum Eng. Author manuscript; available in PMC 2014 October 07.

Foveal Algorithm for the Detection of Microcalcification Clusters: a FROC Analysis

Digital Image Processing ERRATA. Wilhelm Burger Mark J. Burge. An algorithmic introduction using Java. Second Edition. Springer

Coarse-to-fine image registration

Computer Vision for HCI. Topics of This Lecture

SURF. Lecture6: SURF and HOG. Integral Image. Feature Evaluation with Integral Image

SYDE 575: Introduction to Image Processing

Identifying microcracks in multi-phase crystalline rocks by X-ray CT

Efficient 3D-3D Vascular Registration Based on Multiple Orthogonal 2D Projections

Edge and local feature detection - 2. Importance of edge detection in computer vision

Luis Ibáñez William Schroeder Insight Software Consortium. ITK and Graphical User Interface

Recognition: Face Recognition. Linda Shapiro EE/CSE 576

Simultaneous Model-based Segmentation of Multiple Objects

Transcription:

Generalizing vesselness with respect to dimensionality and shape Release 1.00 Luca Antiga 1 August 3, 2007 1 Medical Imaging Unit Mario Negri Institute, Bergamo, Italy email: antiga at marionegri.it Abstract In this paper we present a generalization of Frangi s vesselness measure [2] for the enhacement of M- dimensional shapes in N-dimensional images, together with the implementation of the corresponding Insight Toolkit (ITK) filter [3]. Inspired by the implementation of a multiscale vesselness measure recently presented on the Insight Journal [1], we also propose a unified framework for the evaluation of generic multiscale Hessian-based measures. The manuscript is accompanied by source code and examples. Contents 1 Introduction 2 2 Generalization to M-dimensional objects in N-dimensions 3 3 ITK implementation 4 4 Experiments and results 5 5 Conclusions and future directions 5 A Example 1 - Multiscale 3D Objectness (M=1) 8 B Example 2 - Multiscale 2D Objectness (M=1) 10 C Example 3 - Multiscale 3D Vesselness 12

2 1 Introduction Vessel enhancement techniques are employed for the identification and quantification of vascular structures in 2D and 3D angiographic images. They provide enhancement of visual appearance of vascular structures for clinical evaluation and they have been successfully used for centerline extraction and for pre-processing, initialization and feature definition in segmentation procedures. The majority of vessel enhancement filters are based on the analysis of eigenvalues of the Hessian matrix of image intensity. The mutual magnitude of eigenvalues is indicative of the shape of the underlying object. Isotropic structures are associated to eigenvalues having a similar non-zero magnitude, while vessels present one negligible and two similar non-zero eigenvalues. Recalling Frangi s formulation [2] and indicating the eigenvalues of a Hessian matrix as λ 1, λ 2 and λ 3, with λ 1 λ 2 λ 3, vesselness is defined in 3D as V σ (λ) = (1 e R2 A 2α 2 ) e R2 B 2β 2 (1 e S2 2γ 2 ) if λ 2 < 0 and λ 3 < 0 0 otherwise (1) where S = R A = λ 2 λ 3 (2) R B = λ 1 λ 2 λ 3 (3) λ 2 1 + λ2 2 + λ2 3 (4) and α, β and γ are user-defined parameters. The constraint on the sign of eigenvalues assumes that vessels to enhance are bright on a dark background, and has to be reversed in opposite case. In Equation (1), the term containing R A yields a large value (closer to 1) when the ratio R A is large, i.e. when the magnitude of the two largest eigenvalues is similar. In contrast, the term containing R B yields a value closer to 1 when the smallest eigenvalue is much smaller than the other two. Considering the second-order ellipsoid defined by the eigenvalues, we are requiring that the ellipsoid has a high aspect ratio (high anisotropy) along the λ 1 axis and a low aspect ratio (low anisotropy) in the λ 2 λ 3 plane. In fact, R A and R B can be rewritten as R A = λ 2λ 3 λ 3 2 Largest cross sect area Largest cross sect largest axis R B = λ 1λ 2 λ 3 λ 2 λ 3 3 2 Volume Largest cross sect area (5) (6) The term containing S, the Frobenius norm of the Hessian matrix, or second-order structureness, serves to control the sensitivity of V σ to background noise. The σ footer in V σ indicates that vesselness is computed on a smoothed version of the image and is therefore representative of the variations of image intensity at the spatial scale σ. Vesselness is evaluated at a range of spatial scales, and the maximum response is selected at every voxel

3 V (λ) = max V σ(λ) (7) σ [σ min,σ max ] Equation (1) can be adapted to extract, for example, isotropic blob-like structures by replacing e R2 B 2β 2 (1 e R2 B 2β 2 ), therefore requesting that all three eigenvalues have a similar magnitude. This is equivalent to requiring that the second-order ellipsoid has a low aspect ratio for all three axes. Indeed, since eigenvalues are sorted, the condition on R A is redundant, since it is implied by the condition on R B. with 2 Generalization to M-dimensional objects in N-dimensions From the latter consideration and from Equation (5) we can induce the expression of Equation (1) for the enhancement of M-dimensional structures in N-dimensional images, with M < N (M = 0 for blobs, M = 1 for vessels, M = 2 for plates, M = 3 for hyper-plates, etc.). In order to do this, we have to require that the Mth moment of the Nth order ellipsoid is small with respect to higher moments, while the M + 1th moment of the Nth order ellipsoid is large with respect to higher moments, in the same way as in Equation (5). Since eigenvalues are sorted in magnitude, these two conditions imply analogous conditions on lower and higher moments, respectively. Let s indicate as λ 1...λ N the N eigenvalues of the N N Hessian matrix, such that λ 1 λ N. For the enhancement of M-dimensional structures in a N-dimensional image we define the following ratios R A = R B = N i=m+1 λ i N i=m+2 λ i N M N M 1 N i=m λ i N i=m+1 λ i N M+1 N M (8) (9) which have been expressed as ratio of moments of the Nth order ellipsoid, for ease of comparison to Equation (5). Simple manipulation of Equation (8) leads to the following expressions for R A and R B R A = R B = λ M+1 N i=m+2 λ i λ M N i=m+1 λ i 1 N M 1 1 N M (10) (11) In the above expressions, two special cases can be identified. The first is the case M = N 1 (enhancement of hyperplanes), for which the denominator of R A is not defined. In this case we can allow R A for M = N 1. The second is the case M = 0 (enhancement of blobs), for which the numerator of R B is not defined, since λ 0 is not defined. Setting it to zero yields R B = 0 for M = 0. The Frobenius norm of the Hessian matrix follows the usual definition S = N λ 2 j (12) j=1

4 Last, analogously to Equation (1), we associate R A, R B and S to the weights α, β and γ. We finally define the objectness measure as O(λ) σ = (1 e R2 A 2α 2 ) e R2 B 2β 2 (1 e S2 2γ 2 ) if λ j < 0 for M < j N 0 otherwise (13) where the constraint on the sign of eigenvalues has been set in the assumption that structures are bright on a dark background, and has to be reversed in case of dark structures on a bright background. As to the special cases identified above, for the case M = N 1 the first term of the product (involving R A ) is 1, while for the case M = 0 the second term of the product (involving R B ) is 1. This is consistent with the requirements of penalizing all eigenvalues with respect to the largest for the M = N 1 case, and not penalizing any eigenvalue for the M = 0 case. As expected, Equation (13) reduces to Equation (1) for N = 3 and M = 1. Equivalently to vesselness, Equation (13) is evaluated at a range of spatial scales, and the maximum response is selected O(λ) = max O σ(λ) (14) σ [σ min,σ max ] 3 ITK implementation The described technique has been implemented in the Insight Toolkit following the design adopted by Enquobahrie et al for multiscale vesselness [1]. The computation of the objectness measure for a given scale is performed in itk::hessiantoobjectnessmeasureimagefilter, which computes the measure from a input Hessian matrix image. The implementation closely follows Equation (13). N is derived from the dimensionality of the input image, while M is set through the SetObjectDimensionality metric. The metric is optionally scaled with the magnitude of the largest eigenvalue (throught the SetScaleObjectnessMeasure method), while the case of a bright object over a dark background or vice-versa is specified through the SetBrightObject method. Multiscale computation in itk::multiscalehessianbasedmeasureimagefilter. This class builds on itk::multiscalehessiansmoothed3dtovesselnessmeasure presented in [1], adding some general functionality to it. As in [1] the filter takes a scalar image in input and internally computes the Hessian using itk::hessianrecursivegaussianimagefilter for each of the scales defined by the SetSigmaMin SetSigmaMax and SetNumberOfSigmaStep methods. It then passes the Hessian matrix image to the filter that implements the Hessian-based measure computation and fills the output image with the best response from all the scales. itk::multiscalehessianbasedmeasureimagefilter is templated over the Hessianbased measure filter type, so it can be employed with the currently available Hessian-based measure filters namely itk::hessiantoobjectnessmeasureimagefilter, itk::hessian3dtovesselnessmeasureimagefilter and itk::hessiansmoothed3dtovesselnessmeasureimagefilter. In addition, itk::multiscalehessianbasedmeasureimagefilter produces two outputs. The first is the image containing the actual measure, returned by the GetOutput method. The second is the image containing the value of the scale at which the pixels gave the best response, and it is returned by the

5 Figure 1: Left: DSA dataset depicting cerebral circulation and two cerebral aneurysms. Center: Multiscale 2D blobness (objectness with N = 2 and M = 0), σ [1,10], 10 steps. Right: Multiscale 2D vesselness (objectness with N = 2 and M = 1), σ [1,10], 10 steps, α = 0.5, β = 0.5, γ = 5.0. GetScalesOutput method. This second image can be employed to derive an estimate of the size of the structures being enhanced. 4 Experiments and results In Figure 1, the multiscale objectness filter has been applied to a 2D digital subtraction angiography (DSA) image of the cerebral criculation depicting two aneurysms. Both blobness and vesselness are computed for σ [1,10] (pixel spacing is 1). In Figure 2, blobness (N = 2, M = 0) with σ [5,10] is shown, together with the second filter output, depicting the best response spatial scales. Figure 2 shows the same information relative to vesselness (N = 2, M = 0). For direct comparison with [1], the cropped lung dataset has been enhanced using the same parameters (N = 3, M = 1, σ [0.5,4] in 10 steps, α = 0.5, β = 0.5, γ = 0.5), as shown in Figure 4, upper. In the lower left image, the same measure has been computed by scaling the measure with the largest eigenvalue. In the lower right, the result of multiscale Sato s vesselness 3D computed using the new generalized multiscale Hessian-based analysis filter is shown (as detailed in Example 3). 5 Conclusions and future directions In this paper, a general definition for a Hessian-based object enhancement measure was presented, together with the implementation of a generalized multiscale filter for Hessian based measures. Future work will involve the generalization of the smooth metric presented in [1]. The smoothing term will have to be expressed with an expression of the type e 2c2 R C, with R C = N i=m+1 λ i i 1. This will provide a smoother objectness measure and the possibility of employing it for anisotropic diffusion.

6 Figure 2: Left: Multiscale 2D blobness (objectness with N = 2 and M = 0), σ [5,10], 10 steps, α = 0.5, β = 0.5, γ = 5.0. Aneurysms, bifurcations and vessel overlaps are enhanced. Right: best response scales. Figure 3: Left: Multiscale 2D vesselness (objectness with N = 2 and M = 1), σ [5,10], 10 steps, α = 0.5, β = 0.5, γ = 5.0. Right: best response scales.

7 Figure 4: Upper left: Cropped lung dataset employed in [1]. Upper right: multiscale Frangi s vesselness computed with the objectness measure, N = 3, M = 1, σ [0.5, 4], 10 steps, α = 0.5, β = 0.5, γ = 5.0. Lower left: multiscale Frangi s vesselness normalized with the magnitude of the largest eigenvalue computed with the objectness measure (same parameters). Lower right: multiscale Sato s vesselness computed using ITK s 3D vesselness, σ [0.5, 4], 10 steps, α 1 =0.5, α 2 = 0.5, within the new multiscale Hessian based measure filter.

8 Additional work will also include broader testing of the algorithms presented in this paper, especially on 4D (3D+time) datasets, for the evaluation of enhancement performance and optimization of user-defined parameters. A Example 1 - Multiscale 3D Objectness (M=1) #include "itkhessiantoobjectnessmeasureimagefilter.h" #include "itkmultiscalehessianbasedmeasureimagefilter.h" #include "itkimagefilereader.h" #include "itkimagefilewriter.h" #include "itkrescaleintensityimagefilter.h" #include "itkimage.h" int main( int argc, char *argv[] ) if ( argc < 4 ) std::cerr << "Missing Parameters: " << argv[0] << " Input_Image" << " Enhanced_Output_Image" << " Scales_Output_Image" << std::endl; return EXIT_FAILURE; // Define the dimension of the images const unsigned char Dim = 3; typedef float PixelType; // Declare the types of the images typedef itk::image<pixeltype,dim> ImageType; typedef itk::imagefilereader<imagetype> FileReaderType; typedef itk::imagefilewriter<imagetype> FileWriterType; typedef itk::rescaleintensityimagefilter<imagetype> RescaleFilterType; // Declare the type of enhancement filter typedef itk::hessiantoobjectnessmeasureimagefilter<double,dim> ObjectnessFilterType; // Declare the type of multiscale enhancement filter typedef itk::multiscalehessianbasedmeasureimagefilter<imagetype,objectnessfiltertype> MultiScaleEnhancementFilterType; // Read the image FileReaderType::Pointer imagereader = FileReaderType::New(); imagereader->setfilename(argv[1]); imagereader->update();

9 catch (itk::exceptionobject &ex) std::cout << ex << std::endl; return EXIT_FAILURE; // Instantiate the multiscale filter and set the input image MultiScaleEnhancementFilterType::Pointer multiscaleenhancementfilter = MultiScaleEnhancementFilterType::New(); multiscaleenhancementfilter->setinput(imagereader->getoutput()); multiscaleenhancementfilter->setsigmamin(0.5); multiscaleenhancementfilter->setsigmamax(4.0); multiscaleenhancementfilter->setnumberofsigmasteps(10); // Get the objectness filter and set the parameters ObjectnessFilterType* objectnessfilter = multiscaleenhancementfilter->gethessiantomeasurefilter(); objectnessfilter->setscaleobjectnessmeasure(false); objectnessfilter->setbrightobject(true); objectnessfilter->setalpha(0.5); objectnessfilter->setbeta(0.5); objectnessfilter->setgamma(5.0); objectnessfilter->setobjectdimension(1); // The above is equivalent to vesselness // Now run the multiscale filter multiscaleenhancementfilter->update(); // Write the enhanced image FileWriterType::Pointer writer = FileWriterType::New(); writer->setfilename(argv[2]); writer->setinput(multiscaleenhancementfilter->getoutput()); writer->update(); // Write the image containing the best response scales FileWriterType::Pointer writer2 = FileWriterType::New(); writer2->setfilename(argv[3]); writer2->setinput(multiscaleenhancementfilter->getscalesoutput());

10 writer2->update(); B Example 2 - Multiscale 2D Objectness (M=1) #include "itkhessiantoobjectnessmeasureimagefilter.h" #include "itkmultiscalehessianbasedmeasureimagefilter.h" #include "itkimagefilereader.h" #include "itkimagefilewriter.h" #include "itkrescaleintensityimagefilter.h" #include "itkimage.h" int main( int argc, char *argv[] ) if ( argc < 5 ) std::cerr << "Missing Parameters: " << argv[0] << " Input_Image" << " Enhanced_Output_Image" << " Scales_Output_Image" << " [SigmaMin SigmaMax NumberOfScales ObjectDimension]" << std::endl; return EXIT_FAILURE; // Define the dimension of the images const unsigned char Dim = 2; typedef float PixelType; // Declare the types of the images typedef itk::image<pixeltype,dim> ImageType; typedef itk::imagefilereader<imagetype> FileReaderType; typedef itk::imagefilewriter<imagetype> FileWriterType; typedef itk::rescaleintensityimagefilter<imagetype> RescaleFilterType; // Declare the type of enhancement filter typedef itk::hessiantoobjectnessmeasureimagefilter<double,dim> ObjectnessFilterType; // Declare the type of multiscale enhancement filter typedef itk::multiscalehessianbasedmeasureimagefilter<imagetype,objectnessfiltertype> MultiScaleEnhancementFilterType;

11 FileReaderType::Pointer imagereader = FileReaderType::New(); imagereader->setfilename(argv[1]); imagereader->update(); catch (itk::exceptionobject &ex) std::cout << ex << std::endl; return EXIT_FAILURE; MultiScaleEnhancementFilterType::Pointer multiscaleenhancementfilter = MultiScaleEnhancementFilterType::New(); multiscaleenhancementfilter->setinput(imagereader->getoutput()); ObjectnessFilterType* objectnessfilter = multiscaleenhancementfilter->gethessiantomeasurefilter(); objectnessfilter->setscaleobjectnessmeasure(false); objectnessfilter->setbrightobject(false); objectnessfilter->setgamma(5.0); if ( argc >= 5 ) multiscaleenhancementfilter->setsigmamin( atof(argv[4]) ); if ( argc >= 6 ) multiscaleenhancementfilter->setsigmamax( atof(argv[5]) ); if ( argc >= 7 ) multiscaleenhancementfilter->setnumberofsigmasteps( atoi(argv[6]) ); if ( argc >= 8 ) objectnessfilter->setobjectdimension( atoi(argv[7]) ); multiscaleenhancementfilter->update(); RescaleFilterType::Pointer rescale = RescaleFilterType::New(); rescale->setinput(multiscaleenhancementfilter->getoutput()); rescale->setoutputminimum(0);

12 rescale->setoutputmaximum(255); FileWriterType::Pointer writer = FileWriterType::New(); writer->setfilename(argv[2]); writer->setinput(rescale->getoutput()); writer->update(); RescaleFilterType::Pointer rescale2 = RescaleFilterType::New(); rescale2->setinput(multiscaleenhancementfilter->getscalesoutput()); rescale2->setoutputminimum(0); rescale2->setoutputmaximum(255); FileWriterType::Pointer writer2 = FileWriterType::New(); writer2->setfilename(argv[3]); writer2->setinput(rescale2->getoutput()); writer2->update(); C Example 3 - Multiscale 3D Vesselness #include "itkhessian3dtovesselnessmeasureimagefilter.h" #include "itkmultiscalehessianbasedmeasureimagefilter.h" #include "itkimagefilereader.h" #include "itkimagefilewriter.h" #include "itkrescaleintensityimagefilter.h" #include "itkimage.h" int main( int argc, char *argv[] ) if ( argc < 4 ) std::cerr << "Missing Parameters: " << argv[0] << " Input_Image" << " Enhanced_Output_Image" << " Scales_Output_Image" << std::endl;

13 return EXIT_FAILURE; // Define the dimension of the images const unsigned char Dim = 3; typedef float PixelType; // Declare the types of the images typedef itk::image<pixeltype,dim> ImageType; typedef itk::imagefilereader<imagetype> FileReaderType; typedef itk::imagefilewriter<imagetype> FileWriterType; typedef itk::rescaleintensityimagefilter<imagetype> RescaleFilterType; // Declare the type of enhancement filter - use ITK s 3D vesselness (Sato) typedef itk::hessian3dtovesselnessmeasureimagefilter<double> VesselnessFilterType; // Declare the type of multiscale enhancement filter typedef itk::multiscalehessianbasedmeasureimagefilter<imagetype,vesselnessfiltertype> MultiScaleEnhancementFilterType; // Read the image FileReaderType::Pointer imagereader = FileReaderType::New(); imagereader->setfilename(argv[1]); imagereader->update(); catch (itk::exceptionobject &ex) std::cout << ex << std::endl; return EXIT_FAILURE; // Instantiate the multiscale filter and set the input image MultiScaleEnhancementFilterType::Pointer multiscaleenhancementfilter = MultiScaleEnhancementFilterType::New(); multiscaleenhancementfilter->setinput(imagereader->getoutput()); multiscaleenhancementfilter->setsigmamin(0.5); multiscaleenhancementfilter->setsigmamax(4.0); multiscaleenhancementfilter->setnumberofsigmasteps(10); // Get the vesselness filter and set the parameters VesselnessFilterType* vesselnessfilter = multiscaleenhancementfilter->gethessiantomeasurefilter(); vesselnessfilter->setalpha1(0.5); vesselnessfilter->setalpha2(0.5); // Now run the multiscale filter multiscaleenhancementfilter->update();

References 14 // Write the enhanced image FileWriterType::Pointer writer = FileWriterType::New(); writer->setfilename(argv[2]); writer->setinput(multiscaleenhancementfilter->getoutput()); writer->update(); // Write the image containing the best response scales FileWriterType::Pointer writer2 = FileWriterType::New(); writer2->setfilename(argv[3]); writer2->setinput(multiscaleenhancementfilter->getscalesoutput()); writer2->update(); References [1] A. Enquobahrie, L. Ibanez, E. Bullit, and S. Aylward. Vessel enhancing diffusion filter. The Insight Journal, 2007. (document), 3, 4, 5, 4 [2] A. F. Frangi, W. J. Niessen, K. L. Vincken, and M. A. Viergever. Multiscale vessel enhancement filtering. In W. M. Wells, A. Colchester, and S. Delp, editors, MICCAI 98 Medical Image Computing and Computer-Assisted Intervention, Lecture Notes in Computer Science, pages 130 137. Springer Verlag, 1998. (document), 1 [3] L. Ibanez, W. Schroeder, L. Ng, and J. Cates. The ITK Software Guide. Kitware, Inc. ISBN 1-930934- 10-6, http://www.itk.org/itksoftwareguide.pdf, first edition, 2003. (document)