How is the medical image processing carried out

Introduction to medical image processing WS 12/13

Transcript

1 Introduction to Medical Image Processing WS 12/13 Stephan Gimbel

2 Brief repetition of ITK concepts from PAD1 / 2 template classes Typedefs Smart Pointer (for ITK objects) Troubleshooting Documentation, mailing list Image data Nd Array any data type Image Regions LargestPossibleRegion (entire data set) BufferedRegion (in memory) RequestedRegion (sub-region) Spaces Data Space (Indices in Nd array) Physical Space (origin and spacing)

3 Short repetition of direct pixel access (index / position) slow Nd problem iterators for regions, and much more. Simple, easy-to-read code, wrapping and optimized const & non-const pipeline objects, data objects (eg itk :: image), process objects (eg filters) Input and output (exception: Sources, only have output) SetInput () & GetOutput () Initialization, connection of pipeline stages and execution

4 Brief repetition of the pipeline status objects update their status through update () may be passed up to the start of the pipeline Reading / writing of images via reader / further formats Pixels via data types represents ITK takes care of that for us, format does not matter as a rule. Gray values ​​(8-bit, 10-bit, 12-bit, 16-bit, ...) Image processing Beautify images for humans and computers Zoom, rotate, mirror, etc.

5 Basics - Processing of Medical Image Data Pattern Recognition Pipeline The processing of med. Image data is created using various methods and algorithms, e.g. for the automatic recognition of image objects (tumors, organs, etc.) ... Image data Image preprocessing Segmentation Image analysis for feature extraction Classification Recognized image objects [Source: B.Preim, Medical Image Processing]

6 Basics - Processing of Medical Image Data Pattern Recognition Pipeline The processing of med. Image data is generated using various methods and algorithms, e.g. for the automatic recognition of image objects (tumors, organs, etc.) ... Image data Captured image data in raw format serve as a starting point for pattern recognition Image preprocessing Segmentation Image analysis for feature extraction Classification Recognized image objects [Source: B.Preim, Medical Image Processing]

7 Basics - Processing of Medical Image Data Pattern Recognition Pipeline The processing of med. Image data is generated using various methods and algorithms, e.g. for the automatic detection of image objects (tumors, organs, etc.) ... Image data Image preprocessing Segmentation Image analysis for feature extraction Serves to improve the quality with regard to the subsequent segmentation, e.g. by smoothing filters to eliminate noise. But does not necessarily improve the image quality. Different image data can also be transferred into a common coordinate system through registration processes and processed further as multispectral image data. Classification of recognized image objects [Source: B.Preim, Medical Image Processing]

8 Basics - Processing of Medical Image Data Pattern Recognition Pipeline The processing of med. Image data is generated using various methods and algorithms, e.g. for automatic recognition of image objects (tumors, organs, etc.) ... Image data Image preprocessing Segmentation Serves to delimit interesting image objects Image analysis for feature extraction Classification Recognized image objects [Source: B.Preim, Medical Image Processing]

9 Basics - Processing of Medical Image Data Pattern Recognition Pipeline The processing of med. Image data is created using various methods and algorithms, e.g. for the automatic recognition of image objects (tumors, organs, etc.) ... Image data Image preprocessing Segmentation Image analysis for feature extraction Extraction of characteristic features from the various image objects Classification Recognized image objects [Source: B.Preim, Medical Image Processing]

10 Basics - Processing of Medical Image Data Pattern Recognition Pipeline The processing of med. Image data is created using various methods and algorithms, e.g. for the automatic recognition of image objects (tumors, organs, etc.) ... Image data Image preprocessing Segmentation Image analysis for feature extraction Classification Recognized image objects Image object recognition using the previously extracted features (e.g. skin tumor or birthmark, etc.) and previously defined interpretation options [Source: B. Preim, Medical Image Processing]

11 Basics - Processing of Medical Image Data Pattern Recognition Pipeline The processing of med. Image data is created using various methods and algorithms, e.g. for the automatic recognition of image objects (tumors, organs, etc.) ... Image data Image preprocessing Bones Lungs Segmentation Lungs Image analysis for feature extraction Liver classification Recognized image objects [Source: B.Preim, Medical Image Processing]

12 Basics - Processing of medical image data 3D visualization pipeline or for 3D visualization Image data Image preprocessing Segmentation 3D model generation 3D visualization 3D representation

13 Basics - Processing of medical image data 3D visualization pipeline or for 3D visualization Image data Captured image data in raw format serve as a starting point for pattern recognition Image preprocessing Segmentation 3D model generation 3D visualization 3D representation

14 Basics - Processing of medical image data 3D visualization pipeline or for 3D visualization Image data Image preprocessing Segmentation 3D model generation Used to improve the quality with regard to the subsequent segmentation, e.g. by smoothing filters to eliminate noise. But does not necessarily improve the image quality. Different image data can also be transferred into a common coordinate system by means of registration processes and processed further as multispectral image data. 3D visualization 3D representation

15 Basics - Processing of medical image data 3D visualization pipeline or for 3D visualization Image data Image preprocessing Segmentation Serves to delimit interesting image objects 3D model generation 3D visualization 3D representation

16 Basics - Processing of medical image data 3D visualization pipeline or for 3D visualization Image data Image preprocessing Segmentation 3D model generation Generation of 3D models using the previously segmented data 3D visualization 3D representation

17 Basics - Processing of medical image data 3D visualization pipeline or for 3D visualization Image data Image preprocessing Segmentation 3D model generation 3D visualization Application of visualization methods for the representation of the virtual body models 3D representation

18 Basics - Processing of medical image data 3D visualization pipeline or for 3D visualization Image data Image preprocessing Segmentation 3D model generation 3D visualization 3D representation

19 Image processing phases In practice, the phases can vary depending on the requirements. However, all work processes do not necessarily require preprocessing of the image material to improve the quality for humans, but for the computer filter smoothing filters are used to reduce image noise (noise suppression), i.e. random local variation of the image function also for image smoothing ) homogenizes the images Edge filter is used to strengthen the edges (strong local change in the image function) makes it easier to recognize different regions

20 Frequency Basics - Image Generation Image Processing Histograms Graphic representation of the frequency distribution of certain features (in our case gray values) Data (gray values) are divided into classes (bins) for med. 2D gray value images, histograms are shown in 2D x-axis: the class or bins y-axis: absolute or relative frequency bins bins: number of different gray values ​​(8-bit = 256) frequency: number of gray values ​​with this value (how many pixels e.g. have the value 100?)

21 Image processing histograms Distribution of gray values ​​mostly uneven, can be read from the histogram ... mostly the gray values ​​are only in a small area of ​​low image contrast, unfavorable for image processing also for the human eye Improvement: scaling of the gray values ​​in the range [za, zb] um fill in the area [zl, zk] Gray value z in the original image is mapped to z z '= zkzlzbza (zz) a + zl numerically efficient via lookup table 1st order polynomial linear non-linear LUTs: exponential function or 2nd order polynomial Improvement of the Contrast in light or dark areas, including binarization, is part of the histogram scaling

22 Image processing linear lookup table Input Lookuptable Lower Limit Upper Limit Output 150 Output Draw a histogram Input

23 Image processing non-linear mapping Sigmoid filter continuous and even transfer of gray values ​​emphasizes certain gray values ​​for the visualization and reduces values ​​outside this range Pixel-by-pixel transformation 1 I '= (Max Min) 1+ e 1 β α + Min with: I' = Output Pixel I = input pixel min, max = min and max value of the result image α = width of the input intensity range β = center intensity range

24 Image processing Alpha = -1 OutputMaximum Beta = 4 Beta = 2 Beta = Alpha = 4 Alpha = 2 Alpha = 0.25 Alpha = 1 Alpha = 0.5 OutputMinimum Beta = 2 Beta =

25 Image processing

26 Image processing Thresholding definition with one threshold value Formal: g (x, y) = with several threshold values ​​Formal: g (x, y) = 1 0 abc if if if if if ()> T () T fx, yfx, y ()> T 2 () T 2 () T 1 fx, y T 1

27 Image processing Thresholding Change or identification of gray values ​​Based on the specification of one or more values ​​(threshold value) e.g. for binarization (transfer x-bit image to 1-bit image) Example: two thresholds (upper & lower threshold) two gray values ​​(inside & Outside) if the gray value is within [Lower, Upper], the inside value is assigned; if the gray value is outside [Lower, Upper], the outside value is assigned Thresholding is usually carried out at the end of the pipeline Inside Value Output Intensity Outside Value Lower Threshold Upper Threshold Input Intensity

28 Image processing Threshold-Below a Threshold Value & an Outside Value all gray values ​​below the Threshold are mapped to OutsideValue Rest remains unchanged Output Intensity Unchanged Intensities Outside Value Threshold Below Input Intensity

29 Image processing Threshold-Above a Threshold Value & an Outside Value all gray values ​​above the threshold are mapped to OutsideValue Rest remains unchanged Output Intensity Outside Value Unchanged Intensities Input Intensity Threshold Above

30 Image processing Threshold-Outside Lower- and Upper-Threshold Value & an Outside Value All gray values ​​within [Lower, Upper] remain unchanged. The rest is mapped to OutsideValue. Output Intensity Outside Value Unchanged Intensities Lower Threshold Upper Threshold Input Intensity

31 Image processing Thresholding the result depends on finding a good threshold if objects are clearly separated from each other (background, foreground) this is simply a simple iterative algorithm for determining a threshold: 1. Estimate a threshold 2. Divide the image into two groups ( G 1> T and G 2 T) a 3. compute mean gray value m 1 and m 2 for all pixels in G 1 and G 2 4. compute new threshold: T = 1 (2 m + m 1 2) 5. repeat steps 2 to 4 until subsequent values ​​of T in the next iteration are smaller than ΔT there are other algorithms and procedures for determining the threshold Noise has a strong influence on the histogram and finding ideal threshold values

32 Image processing Filters and their effects 1400 A B C D Mean value Gauss median [Source: H. Handels, Medical Image Processing]

33 Image processing Linear filters Definition of a linear system Input of a pulse generates system response as an output Local independence of the response from the location of the input pulse spatially invariant system (same weighting factors of the core for the entire image) Output h (x, y) corresponds to the convolution of the Input function f (x, y) with impulse response g (x, y) h (x, y) = f (x, y) gx, y () = f (x ', y') g (x x ', yy ') dx'dy' interesting for us, discrete function: is linear: h [i, j] = f [i, j] gi, jg [i, j] a 1 h [1 i, j] + a 2 h 2 i, jnmk = nl = m [] = fk, l {[]} = a 1 gi, j [] gik, jl [] {[] h [1 i, j]} + a 2 g [i, j] h 2 i, j {[]}

34 Filter application take an original image B, apply an algorithm to it and get a result image B Filters in ITK contain the algorithms and parameters Operation can take place on the whole image, per-pixel basis or through a convolution, using a convolution matrix or kernel on a partial area of the image Example: 3x3 kernel on image B application to 2D image grid

35 Filter application take an original image B, apply an algorithm to it and get a result image B Filters in ITK contain the algorithms and parameters Operation can take place on the whole image, per-pixel basis or through a convolution, using a convolution matrix or kernel on a partial area of the image Example: 3x3 kernel on image B application to 2D image grid