Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled...

12
Introduction to IDL Dr James Scuffham

Transcript of Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled...

Page 1: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.

Introduction to IDL

Dr James Scuffham

Page 2: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.

What is IDL?

• “Procedural” programming language

• Compiled functions and procedures OR run-time interpreter

• Enormous library of pre-written and validated routines

• Widely used in the medical imaging community

Interactive Data Language

Page 3: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.
Page 4: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.

What can it do?• Data Analysis and

modelling:– Maths: calculus, solve

equations, FFT, DWT, optimisation

– Statistics: regression, hypothesis testing, curve fitting

• Image Processing:– Translate, transpose, rotate,

zoom, resample, extract, warp– Regions of interest, profiles,

histograms– Filtering, edge enhancement,

2D-FFT– Convolution, correlation,

feature extraction

• Data Visualisation:– Plot graphs and display

images– Animate dynamic data– Volume rendered surface

plots– Vector field visualisation

• Application development:– ‘Widgets’– Cross-platform capability:

“Virtual Machine”

Page 5: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.

Applications in Nuclear Medicine

• Supports DICOM and Interfile formats

• Displaying static images, drawing ROIs, obtaining statistics

• Displaying dynamic images, plotting time-activity curves, processing results

• Performing advanced image processing

Page 6: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.

Basic Image ProcessingREAD_INTERFILE, ‘muga.HDR’, X

frame0=ROTATE(X,7)

frame0 = CONGRID(frame0,512,512)

XROI, BYTSCL(frame0), STATISTICS=stats

Page 7: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.

Dynamic Images

PRO cine_muga, data, repeats

data = BYTSCL(ROTATE(data,7))

data = CONGRID(data, 512, 512)

howbig = SIZE(data)

FOR c = 0, howbig[3]*repeats DO BEGIN

display_image = data[*,*,(c MOD howbig[3]-1)]

TV, display_image

ENDFOR

END

Page 8: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.

Curve Processingleft_area = INT_TABULATED(time, left_kid)

right_area = INT_TABULATED(time, right_kid)

left_div_func = 100.0*left_area/(left_area+right_area)

right_div_func = 100.0*right_area/(left_area+right_area)

Right = 44%

Left = 56%

Page 9: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.

3D Data Visualisation

• slices

• isosurfaces

• contours

Page 10: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.

Application Development

Page 11: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.

Advanced Image Processing

Page 12: Introduction to IDL Dr James Scuffham. What is IDL? “Procedural” programming language Compiled functions and procedures OR run- time interpreter Enormous.

Summary

IDL is really useful…..

……and not just for image processing