Texture analysis

advertisement

Medical Devices and MR sequences - QUESTIONNAIRE

File: MDD_MR2_questionnaire_texture

From Dr Dan Tozer, June 2004

1.

Introduction

This document gives the questionnaire to be answered by the MR physicist providing the Medical

Device. See also the MDD_ER_checklist (containing the essential requirements ER’s), the guidance notes for completing this (MDD_MR1_guidance), and the generic response

(MDD_MR3_generic_response).

2.

Seven specific responses (SR) are required. In each case, state how you have addressed the essential requirements that they relate to. Give supporting evidence (e.g. the instruction manual and device label). a.

SR1. The device (whether sequence or program) must be shown to work as intended

[ER3, ER12.1]

The purpose of this program is to produce estimates of the texture analysis parameters defined by Haralick in his paper in IEEE Trans. Syst. Man. Cybernet. 1973;3:610-621. These parameters have become a standard for much work on texture analysis, although this is not the only method used. At a very simple level the program works in that it takes the correct input files (see SR2) and produces a file containing values for each of the 14 parameters. The values differ with the input files, indicating that the results are not produced by the program in error.

An example of the output file is shown as appendix 1. The accuracy and precision of these results will be addressed in SR4 and SR5.

For texture analysis the image quality will play an important part in determining the actual texture values. This is because it is the relationships between neighbouring pixels that is being investigated, so an increase in noise will affect the co-occurrence matrix. However, this is not an indication of whether the program is functioning correctly. The user must make a judgement as to whether the data used is of a suitable standard for the purposes for which it is to be used. The program will calculate the texture of the image according to the parameters laid down by Haralick regardless of the type of image or image quality. However, if images of the same subject, but better quality (for example), show different texture values this is not due to the program, but the input data. Interpretation of the results is again independent of the workings of the program. b.

SR2. The device have an instruction manual and device label [ER13.1, ER13.3, ER13.4]

When run, the program displays the device label shown in appendix 2 which contains the program name, release date, name and contact details for the author and instructions on how to access the instruction manual. The instruction manual is given in appendix 3 and is only available on line. However as the program can only be run online, this is not considered a significant issue.

The program is intended for users who are familiar with computers in a general sense and understand the running of programs through the command line. No detailed knowledge of the operating system or the internal algorithms used to generate texture analysis parameters is

1

required, although users should be aware of the general theory of texture analysis to make use of the results. c.

SR3. the device must give output with proper (legal) units [ER10.3]

13 of the 14 parameters produced are calculated directly from the grey level co-occurrence matrix and the marginal probability matrix for the image, the 14 th

is the 2 nd

largest eigenvalue from a matrix dependent only of the above matrices. This means that there are no units for the texture parameters and the scale of the values will depend only on the size of the image and number of grey levels in it. d.

SR4. The accuracy of the device must be specified [ER10.1]

In this context the accuracy of the device can be measured by comparing the values obtained from a dataset with those obtained by other similar programs. The same input was fed to the device and an independently programmed device from another group measuring the same texture parameters. The results were identical to the 5 th

significant figure. The differences from here are likely to be due to rounding errors in the different methods and are small enough to be ignored. Although this does not mean that the values are accurate, as both may be wrong, it does indicate that there is a good chance that the values are accurate.

In addition a test image was constructed and the first 13 texture parameters calculated by hand.

These were compared with those from the program and the results were again the same down to round off in the 4 th

or 5 th

significant figure. This is most likely to be more accurate in the program as working things by hand is more susceptible to rounding error. The 14 th

parameter was not calculated as calculating eigenvectors and eigenvalues by hand is time consuming and the routines used come from a commercial package (Numerical Recipes in C, Press et al.). For details of the test image see appendix 4. e.

SR5 The precision (stability) of the device must be specified [ER10.1]

Running the software device on the same image set repeatedly produced identical results indicating that the program is stable with regard to fluctuations in the computation process, and indicates that the program does not pick up data from non controlled sources.

Values calculated by the program use floating point precision, so in line with the ANSI C standard precision runs to 6 significant figures. f.

SR6. The limits of accuracy of the device must be specified [ER10.1]

Given the response to SR4, the limits of accuracy with regard to round off are ±0.1% that is the 4 th

significant figure is accurate, but you cannot guarantee that the 5 source of inaccuracy than the precision limits which are ±0.01%. th

is. This is a greater g.

SR7. A sequence device must have safe RF power deposition SAR [ER1, ER9.2,

ER11.1.1, ER12.1]

There is no RF power deposition associated with this software device

2

h.

SR8. A sequence device must operate with the lowest reasonable static field, SAR and dB/dt.

There is no magnetic field associated with this software device i.

SR9. The device must be designed with ergonomic principles [ER10.2]

This software device is designed to run wholly on a computer, hence there are no unusual physical or environmental considerations. Most relevant ergonomic issues relate to the general considerations surrounding the workers environment and as such are not directly related to the device. The level of typing is low meaning that there should be no chance of RSI. Issues surrounding reading the output and/or any error messages are again related to the general environment and not the specific device.

The device is easy to use in that the instruction manual clearly states the command line required and descriptions of the input parameters. There are no complex options which would require specialist knowledge or abilities.

3

Appendix 1: Example Output file tpf1 0.000098 tpf2 1063.311646 tpf3 0.716466 tpf4 26005.326172 tpf5 0.043896 tpf6 345.067596 tpf7 8941.342773 tpf8 5.891692 tpf9 9.772968 tpf10 1063.207397 tpf11 4.203634 tpf12 -0.118804 tpf13 0.841135 tpf14 0.749523

4

Appendix 2: Device Label

Label: text_anal

Written by: Daniel Tozer e-mail d.tozer@ion.ucl.ac.uk

Version Number: 1.00

Date of release 20/12/04

For information about the program and the methods used please type text_anal with no arguments.

5

Appendix 3: Instruction manual

Wrong number of command line agruments:

Usage: text_anal image mask

This program calculates the 14 texture parameters as defined by Haralick in his paper in IEEE Trans. Syst. Man. Cybernet. 1973;3:610-621.

It takes as input the image to be analysed in UNC format and a mask which has all pixels to be analysed set to 1 and all other pixels set to 0. This can be constructed from a region file using a program such as make_mask_image.

This version of the program works in a 2D fashion only and uses only the 8 adjoining voxels in plane as the nearest neighbours for grey level covariance matrix (GLCM) determination. This means that the values produced are not the true 3D values, but for images with slice thickness >> than in plane pixel dimensions it produces better results. If you want 3D or more pixels to count as nearest neighbours, then do not use this program.

The methods that the program uses are the standard texture analysis methods of this type. The GLCM is calculated from the image set as a nxn matrix where n is the number of grey levels in the image. From this matrix a number of parameters are calculated such as the entropy and contrast. it should be noted that the actual values are meaningful only to images of the same type with similar numbers of grey levels and, for example, values from T1 weighted images should not be compared with

T2 weighted images. Ideally only images with identical numbers of grey levels should be used. This is best achieved by running the images through a histogram equalisation program which will reduce the number of grey levels in the image. The number of grey levels in the final image should be chosen by the user as a function of the number of pixels to be used. The smaller the number of pixels the smaller the number of grey levels that should be used, this avoids sparseness in the GLCM.

The texture values are output into a file called image.text_params, where image is the name of your input file.

Common error messages and their meanings

Bad filename(2)

Exiting... The image (mask) to be analysed can't be found

Bad data(2)

Exiting... The image (mask) dimensions can't be obtained

Image (2) not of correct dimension Image (mask) does not have 2 or 3 dimensions

Image (2) not of correct type Image (mask) not of greytype

Bad input dimension(2) Can't get number of dimensions ofr image (mask)

Bad input file header(2) Can't get header for image (mask)

The images must be of the same size The image and mask have different dimensions

Can't read data1(3) Can't read data from the image the first (second) time

Can't read data2(4) Can't read data from the mask the first (second) time

The output file wont open Can't create the output file

These error messages tell the user where the error is, the user must then find out what is causing the error reported. The program can not diagnose specific errors related to the format of the images. For problems with the UNC image format type iman image at the prompt.

****Warning, the program will only work if the brain is away from the edge of the image****

6

Appendix 4: Test image and working.

The image was an 8 x 8 image with intensities as shown in figure 1.

0 0 0 0 0 0 0 0

0 1 1 1 1 1 1 0

0 1 1 1 1 1 1 0

0 1 1 10 1 1 1 0

0 1 1 1 1 1 1 0

0 1 1 1 1 1 1 0

0 1 1 1 1 1 1 0

0 0 0 0 0 0 0 0

Figure 1: The test image.

For definitions see any paper using the Haralick method e.g. Gibbs et al. MRM 50:92-98;2003

Non zero co-occurrence matrix elements: (1, 1) = 0.926667, (1, 10) = (10, 1) = 0.036667 p x

(1) = 0.963333, p x

(10) = 0.036667, p x+y

(2) = 0.926667, p x+y

(11) = 0.07333 p x-y

(0) = 0.926667, p x-y

(9) = 0.926667

Parameters from text_anal: tpf1 0.861400 tpf2 5.940000 tpf3 -0.038062 tpf4 2.861100 tpf5 0.927561 tpf6 2.660000 tpf7 5.504400 tpf8 0.262177 tpf9 0.313008 tpf10 5.504400 tpf11 0.262177 tpf12 -0.008880 tpf13 0.052801 tpf14 0.191353

Handworked parameters: tpf1 0.8614 tpf2 5.94 tpf3 -0.03807 tpf4 2.86419 tpf5 0.92756 tpf6 2.66 tpf7 5.5037 tpf8 -0.26218 tpf9 0.31301 tpf10 5.5037 tpf11 -0.26218 tpf12 -0.00888 tpf13 0.0528

7

Download