dynamic pet visualization of bone remodeling using naf-18866274/fulltext01.pdf · dynamic pet...

152
Dynamic PET visualization of bone remodeling using NaF-18 SABINE LEE, MARILYN E. NOZ, and GERALD Q. MAGUIRE JR. Technical report STOCKHOLM, SWEDEN 2015 KTH ROYAL INSTITUTE OF TECHNOLOGY INFORMATION AND COMMUNICATION TECHNOLOGY

Upload: others

Post on 14-May-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Dynamic PET visualization of bone remodeling using NaF-18

SABINE LEE, MARILYN E. NOZ, and GERALD Q. MAGUIRE JR.

Technical report STOCKHOLM, SWEDEN 2015

KTH ROYAL INSTITUTE OF TECHNOLOGY I N F O R M A T I O N A N D C O M M U N I C A T I O N T E C H N O L O G Y

Page 2: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Dynamic PET visualization of bone remodeling using NaF-18

Sabine Lee, Marilyn E. Noz, and Gerald Q. Maguire Jr.

2015-11-02

Technical Report

KTH Royal Institute of Technology School of Information and Communication Technology (ICT) Department of Communication Systems SE-100 44 Stockholm, Sweden

Page 3: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Abstract | i

Abstract

Positron emission tomography (PET) studies acquired in list mode offer the opportunity to provide a cine loop showing the dynamics of 18F- PET uptake, giving a visualization of regional bone remodeling. The focus of this report is a group of patients treated with Taylor spatial frames (TSF). The studies were acquired for a period of 45 minutes and saved in list mode. The list was decoded and subsequently segmented into time intervals of one minute each. For each time interval a sinogram was generated from which volumes of one minute each were reconstructed. Slices projected from these volumes could then be displayed as a dynamic loop superimposed on the corresponding computed tomography (CT) slice in order to visualize the 18F- uptake insitu. It was indicated that this technique has the potential of becoming an additional technique to that of using static volumes and SUV values only.

As the list mode data was decoded it also offered a method to evaluate the potential decrease in injected activity by eliminating every Nth event from the list before reconstructing the 45 minute volume. This was done and the indication was that the injected activity and hence the effective dose to the patient can be decreased. However, in this work, this was not proven clinically.

The open source STIR software was used to reconstruct volumes from sinograms to enable an unlimited access to reconstructing volumes without disturbing the daily routine at the clinic. The data was acquired on a clinical Siemens Medical Solutions Biograph 64 TruePoint TrueV, PET/CT scanner situated at the Nuclear Medicine Department at the Karolinska University Hospital in Solna. This scanner was not supported by the STIR software, hence the data collected by the Siemens PET/CT scanner was translated so that 3D reconstructions could be computed using the STIR tools. The reconstructions made in STIR resulted in volumes of sufficient visual quality, but not as good as those reconstructed by the scanner itself. Further optimization in STIR was left for future work.

According to the physicians who treat these patients, dynamic visualization was of sufficient interest to continue to develop and optimize this method. The cine loops that were presented to the physicians were made from JPEG slices produced from the one minute volumes and put together as GIF files. It was also possible to vary the reconstruction time (from uniformly one minute) as well as the presentation rate in the cine loop, but this was left for future work. Ultimately, the cine loop will be implemented in the locally developed software tool.

Keywords

PET, Image Reconstruction, Dynamic Visualization, List Mode, STIR

Page 4: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 5: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Sammanfattning | iii

Sammanfattning

Positronemissionstomografi (PET) studier som förvärvats i list mode erbjuder möjligheten att göra film slingor som visar dynamiken i 18F- PET upptag. Detta förväntas ge en dynamisk visualisering av var ben nybildas. Fokus i denna rapport är en grupp patienter som behandlats med Taylor spatial frames (TSF). Bilderna i studien förvärvades under en period av 45 minuter och sparades i list mode. List mode data avkodades och delades därefter upp i tidsintervaller på en minut vardera. För varje tidsintervall rekonstruerades ett sinogram för vilka bilder av volymen rekonstruerades. Skivor från dessa volymer kan sedan visas som en dynamisk slinga ovanpå motsvarande datortomografi (CT) skiva för att visualisera 18F- upptaget in situ. Denna teknik visade sig ha potential att bli en ytterligare teknik utöver de statiska volymer och SUV-värden som redan finns tillgängliga.

Eftersom listmode data avkodats erbjuds också en metod för att utvärdera en potentiell minskning av den injicerade aktivitet genom att eliminera varje N: te händelse från listan innan volymen på 45 minuter rekonstrueras. Detta utfördes och det visade sig att den injicerade aktiviteten och därmed den effektiva dosen till patienten potentiellt kan minskas men i detta arbete har detta inte bevisats kliniskt.

Mjukvaran STIR, som är tillgängligt för allmänheten, användes för att rekonstruera volymer från sinogram för att möjliggöra en obegränsad tillgång till att rekonstruera volymer utan att störa den dagliga rutinen på kliniken. Data förvärvades i en klinisk Siemens Medical Solutions Biograph 64 TruePoint TrueV, PET/CT-skanner som är placerad vid nuklearmedicinska avdelningen vid Karolinska Universitetssjukhuset i Solna. Skannern var inte kompatibel med STIR mjukvaran. Därför översattes det data som samlats in av Siemens PET/CT-skannern så att 3D-rekonstruktioner kan beräknas med hjälp av verktygen i STIR. De rekonstruktioner som gjorts i STIR gav upphov till volymer av tillräcklig visuell kvalitet för denna studie, men var inte lika bra som de som rekonstrueras genom själva skannern. Ytterligare optimering i STIR lämnades för framtida arbete.

Enligt de läkare som behandlar dessa patienter var en dynamisk visualisering av tillräckligt intresse att fortsätta utveckla och optimera den här metoden. Film slingor som presenterades för läkarna gjordes från JPEG bilder tagna från skivor av volymer på en minut vardera som producerats och sattes ihop som GIF-filer. Det var också möjligt att variera återuppbyggnadstiden (från jämnt en minut) samt presentationshastigheten i film slingan, men detta lämnades till framtida arbetet. I slutändan kommer film slingan implementeras i ett lokalt utvecklat verktyg.

Nyckelord

PET, Bildrekonstruktion, Dynamisk visualisering, List mode, STIR

Page 6: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 7: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Acknowledgments | v

Acknowledgments

I would like to thank Catherine Jonsson for being a very interested, creative, and helpful supervisor. Manne Joweini from Siemens sent me valuable information and Kris Thielmans in the STIR forum helped when I needed it the most.

I would like to thank everyone at the Clinical Department of Nuclear Medicine at Karolinska University Hospital, where all the patient acquisitions were collected. They have all been very helpful and patient, in particular when I had to use the Siemens workstation. I want to thank Lars Ideström for instructing and helping me with the NEMA phantom experiment and Fredrik Brolin for acquiring the images of the syringe that was an important key to understand the structure of the list mode and enabled me to learn how to correctly write the STIR headers. I wish to thank Fredrik Brolin and Robert Hatherly for teaching me reconstruction in Siemens workstation. I would also like to thank Henrik Lundblad for explaining the medical procedures of the patients being treated with a TSF from a physician’s point of view in a way that was clear to me as a medical physicist. I also want to thank the physicians Lars Weidenhielm, Henrik Lundblad, Henrik Olivecrona, Charlotte Karlsson Thur, Buster Sandgren, and Hans Jakobsson, for taking their time to give feed-back on the cine loops. Last I want to thank Thomas Lee for the help with the film making.

Finally, it should be noted that a draft version of this technical report served as the basis for a Master of Science thesis at Stockholms University.

Stockholm, November 2015 Sabine Lee

Page 8: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 9: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Table of contents | vii

Table of contents

Abstract ....................................................................................... i Keywords ................................................................................................... i

Sammanfattning ....................................................................... iii Acknowledgments ..................................................................... v Table of contents ..................................................................... vii List of Figures ........................................................................... xi List of Tables ........................................................................... xv List of acronyms and abbreviations .................................... xvii 1 Introduction .......................................................................... 1

1.1 Background .................................................................................. 2 1.1.1 Dynamical visualization of Na18F- PET for Patients

treated with TSF ............................................................... 3

1.2 Purpose ........................................................................................ 3 1.3 Goals ............................................................................................ 4 1.4 Research Methodology ............................................................... 4 1.5 Introducing 18F- .......................................................................... 5 1.6 Structure of this technical report .................................................... 6

2 Background .......................................................................... 7 2.1 CT volume acquisition ................................................................ 7 2.2 PET/CT bone scan acquisition protocol .................................... 8 2.3 PET list mode ............................................................................... 8 2.4 PET reconstruction as static volumes ....................................... 9 2.5 Interfile format ........................................................................... 10 2.6 QSH file header format .............................................................. 10 2.7 Volume Reconstruction Process ............................................. 11 2.8 Related work .............................................................................. 14

2.8.1 Benefits of Na18F- in studies of fractures and Bone Deformities ...................................................................... 15

2.8.2 Earlier work in Dynamic PET Visualization ..................... 15 2.8.3 Ernesto Fumero’s Thesis and Morena Galera’s

toolbox for List Mode ....................................................... 15

2.9 Procedures to Monitor Patients Being Treated with a TSF .... 15 2.10 Summary .................................................................................... 16

3 Siemens Biograph 64 True Point True V PET/CT scanner19 3.1 The Structure of the Siemens Scanner .................................... 19 3.2 The Data and embedded Header files produced by the Siemens Scanner for a List Mode acquisition .................................... 20 3.3 Siemens List Mode .................................................................... 26

4 STIR Version 3.0 ................................................................ 31 4.1 STIR basics ................................................................................ 31 4.2 STIR File System and Installation ............................................ 31

Page 10: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

viii | Table of contents

4.3 STIR Header Data and Parameter Files ................................... 32 4.4 Useful STIR Utilities .................................................................. 36 4.5 The General procedure of reconstructing volumes in STIR .. 39 4.6 The Recon Test Package .......................................................... 40 4.7 The Demo Tests in the Example Package ............................... 42

4.7.1 Compiling the demos in STIR 3.0 ................................... 42 4.7.2 Running the demos ......................................................... 43

5 Methodology ...................................................................... 49 5.1 Research Process ..................................................................... 49 5.2 Going from a list mode file to a set of 3D volumes ................ 50

5.2.1 Generating Sinograms and Volumes from the a List Mode Data of a NEMA Phantom ..................................... 51

5.2.2 The Recon_test_pack in STIR ........................................ 51 5.2.3 Examples and the Demo Tests ....................................... 52 5.2.4 Generating a Sinogram from the List based on

appropriate Time Intervals .............................................. 53 5.2.5 Displaying the cine loop superimposed on the CT

slice ................................................................................. 53 5.2.6 Simulating reduced injected activities ............................. 54

5.3 Research Paradigm ................................................................... 55 5.4 Data Collection .......................................................................... 55

5.4.1 Sampling ......................................................................... 55 5.4.2 Sample Size .................................................................... 56 5.4.3 Target Population ............................................................ 56

5.5 Experimental design/Planned Measurements ......................... 56 5.6 Test Environment and Hardware/Software Tools ................... 57 5.7 Assessing reliability and validity of the data collected .......... 57 5.8 Planned Data Analysis .............................................................. 58

5.8.1 Data Analysis Technique ................................................ 58 5.8.2 Software Tools ................................................................ 58

5.9 Evaluation framework ............................................................... 59 6 Executed Experiments ...................................................... 61

6.1 The NEMA phantom experiment .............................................. 61 6.2 The Syringe Experiment ........................................................... 66 6.3 Implementation of Test and Experiments................................ 67 6.4 Reconstructions of TSF patients ............................................. 69

6.4.1 Simulating Decrease in injected activity .......................... 69 6.4.2 Image Reconstructions to Produce Cine Loops .............. 75 6.4.3 Comparing Image Quality STIR vs. Siemens

Workstation ..................................................................... 75

6.5 Physicians’ opinions regarding the Cine loops ...................... 76 7 Analysis .............................................................................. 79

7.1 Effective Dose ............................................................................ 79 7.2 Major results .............................................................................. 80 7.3 Reliability Analysis .................................................................... 81 7.4 Validity Analysis ........................................................................ 82

Page 11: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

IntroductionTable of contents | 9

7.5 Discussion ................................................................................. 82 8 Conclusions and Future work .......................................... 85

8.1 Conclusions ............................................................................... 85 8.2 Limitations ................................................................................. 86 8.3 Future work ................................................................................ 86 8.4 Reflections ................................................................................. 87

References .............................................................................. 89 Appendix A: The parselist program....................................... 93 Appendix B: OSMAPOSL parameter file ............................. 109 Appendix C: Detailed results ............................................... 111 Appendix D: Source code for list decimation ..................... 113

Page 12: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 13: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

List of Figures | xi

List of Figures

Figure 2-1: PET slice superimposed on the corresponding CT slice (sagittal view); patient 11 to the left and patient 18 to the right. ..................................................................................... 7

Figure 2-2: Example of a LOR (in 2D) – this simplified diagram leaves out all of the details of the detectors. .............................. 9

Figure 2-3: A 20 ml syringe (such as the one shown above) was filled with 11 ml of FDG for the acquisition. .............................11

Figure 2-4: Axial, coronal, and sagittal views from the sinogram of the syringe that was reconstructed by the Siemens scanner. Notice that the number of segments are seven and that the sinogram covers 180 degrees due to coincidences in the opposite direction. ................................... 12

Figure 2-5: Axial, coronal, and sagittal views of the syringe reconstructed by the Siemens scanner. ................................... 13

Figure 2-6: Projection views of the sinograms after the use of SSRB tool in STIR. Note that there is only one segment as all segments have been projected into the direct segment. The orientation is also switched after implementing a STIR tool on data acquired in the Siemens scanner. .............. 13

Figure 2-7: The STIR reconstructed axial, coronal, and sagittal views of the syringe from the sinogram data acquired by the Siemens scanner. The reconstruction method is FBP2D on SSRB data. Note the streak artefacts that are common for FBP2D reconstructions. These are eliminated when using the iterative reconstructions provided by STIR ..................................................................... 13

Figure 2-8: The axial, coronal, and sagittal views of the STIR generated cylinder by which the syringe was approximated ........................................................................... 14

Figure 2-9: Axial, coronal, and sagittal projection views from the sinogram of the syringe that was simulated in STIR. ............. 14

Figure 2-10: Axial, coronal, and sagittal views from the back projection volume generated from cylinder that approximates the syringe......................................................... 14

Figure 2-11: Left and middle: a TSF patient CT image; right: a model of the TSF attached to the tibia and fibula. The TSF is attached into the skeleton in tibia. .......................................... 16

Figure 4-1: The structure of the STIR directories simplified. .................... 32 Figure 4-2: Sinogram produced by the recon test package of a

uniform cylinder for a GE Discovery STE scanner. The axial view is probably not complete. ...................................... 40

Figure 4-3: The reconstructed uniform cylinder in the recon test package. The reconstruction method is the OSMAPOSL. Left to right, the projection views are axial, coronal, and sagittal. ..................................................................................... 42

Figure 4-4: Projections from the generated volume of an ellipsoid cylinder and a small ellipsoid produced by the

Page 14: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

xii | List of Figures

generate_image function and the generated_image.par file. From the left; axial, coronal, and sagittal view. ............... 43

Figure 4-5: The demo1 output PET volume. The projection views as shown from the left are the axial, coronal, and sagittal. .........46

Figure 4-6: The demo sinogram containing all three segments. The projection views as shown from the left are the axial, coronal, and sagittal. ................................................................46

Figure 4-7: The resulting sinogram of the demo volume by executing the extract_segments function in the viewogram view. From the left the projection views are the axial, coronal, and sagittal. ................................................46

Figure 4-8: The demo sinogram of the ellipsoid and the cylinder after executing the SSRB tool. The orientation of the singram is the same after executing the SSRB tool in STIR no matter what the orientation of the projection data input. From the left the projection views are the coronal, axial, and sagittal view. .............................................. 47

Figure 5-1: Flow chart of the final desired artefact ....................................49 Figure 5-2: Research Process .................................................................... 50 Figure 5-3: A flowchart of the research process steps to produce

sinograms of the list mode data. .............................................. 51 Figure 5-4: The 3D sinogram of the uniform cylinder produced by

executing the run_simulate_and_recon.sh program. Notice that the alignment of the segments is different from the sinograms produced by the Siemens scanner. ......... 52

Figure 5-5: Flow chart to generate sinograms from the Siemens full list and then divide the list into time intervals. ....................... 53

Figure 5-6: Flow chart of reconstructing the volumes and displaying them as a cine loop ................................................. 53

Figure 5-7: Simulating reduced injected activities by dropping some events and then completing the rest of the processing ................................................................................ 54

Figure 6-1: The dry NEMA phantom before being filled with water and FDG to the left and the filled NEMA phantom being scanned in the Siemens PET scanner in the clinic to the right. ......................................................................................... 61

Figure 6-2: Projections from a one minute segment, non-attenuation volume reconstructed by the Siemens scanner. From the left: the axial, coronal, and sagittal views. ........................................................................................ 62

Figure 6-3: Projections from a one minute segment, attenuation correction volume reconstructed by the Siemens scanner. From the left: the axial, coronal, and sagittal views. ........................................................................................ 63

Figure 6-4: Projections from the one minute sinogram of the NEMA phantom acquisition produced the Siemens scanner. The sinogram was exported as a DICOM file. From the left: the axial, coronal, and sagittal views................ 63

Page 15: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

List of Figures | xiii

Figure 6-5: Projections of the sinogram of the NEMA phantom after using the SSRB tool in STIR. Notice that the orientation is changed after the SSRB tool is used, which is the STIR default orientation to read the projection data when reconstructing volumes. The axial and coronal views are swapped. The sagittal stay remains, but it is rotated 90º. ................................................. 63

Figure 6-6: Projections from the analytical FBP2D volume reconstruction in STIR on the SSRB projection data from generated from the list mode data produced by the Siemens scanner. Notice that the artefact distorts the image. The STIR reconstructed volume is reflected (left to right) compared to the Siemens. From the left: the axial, coronal, and sagittal views. ............................................64

Figure 6-7: Projections from the iterative OSMAPOSL reconstruction in STIR. Notice that the image quality is improved compared to the FBP2D method. The STIR reconstructed volume is still reflected (left to right) compared to the Siemens. From the left: the axial, coronal, and sagittal views. ......................................................64

Figure 6-8: Axial projections from the volume data of Patient 2, reconstructed by using the OSMAPOSL tool in STIR to the left and by the Siemens work station to the right. The purpose is to study the reflection, which occurred in the STIR reconstruction of the NEMA phantom but is not seen here. It was known that the fracture was to the left in the axial view, which is true for both the STIR and Siemens view. .................................................................... 65

Figure 6-9: The sinogram of patient 2 data extracted from the .PTD file with 7 segments, notice the orientation. From the left: the axial, coronal, and sagittal views................................ 65

Figure 6-10: The same sinogram for Patient 2 after using the SSRB tool in STIR - there is one segment. Notice the orientation. The axial and the coronal projections are swapped. The sagittal stays sagittal but is rotated 90º. This is same as for the NEMA phantom. .................................66

Figure 6-11: To the left a 3D view of the negative values in the sinogram from the list mode from patient 12. Notice the inverted appearance of this data compared to the sinogram of the same acquisition on the right. .......................69

Figure 6-12: Axial coronal, and sagittal slices projected from volumes reconstruction in STIR from the full 45 miniute acquisition of Patient 9. From the top: the full 100% of the list, then simulating 90% of activity, 75% of activity, 50%, 25% and 10% of activity. The saturation was changed to sustain the quality of the 25 and 10 %. The image quality is surprisingly good even with the radical removal of 90% of the events. ..................................... 71

Page 16: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

xiv | List of Figures

Figure 6-13: Axial coronal, and sagittal slices projected from volumes reconstruction in STIR from the full 45 minute acquisition of Patient 11. From the top: the full 100% of the list, then simulating 90% of activity, 75% of activity, 50%, 25% and 10% of activity. The saturation was changed to sustain the quality of the 25 and 10 %. The image quality is surprisingly good. .......................................... 72

Figure 6-14: Axial coronal, and sagittal slices projected from volumes reconstruction in STIR from the full 45 minute acquisition of Patient 12. From the top: the full 100% of the list, then simulating 90% of activity, 75% of activity, 50%, 25% and 10% of activity. The saturation was changed to sustain the quality of the 25 and 10 %. The image quality is surprisingly good. .......................................... 73

Figure 6-15: Axial coronal, and sagittal slices projected from the volumes reconstruction in STIR from the ful 45 minute acquisition of Patient 18. From the top: the full 100% of the list, then simulating 90% of activity, 75% of activity, 50%, 25% and 10% of activity. The saturation was changed to sustain the quality of the 25 and 10 %. The image quality is surprisingly good. .......................................... 74

Figure 6-16: Above: axial, coronal, and sagittal projection slices of patient 11 reconstructed by the Siemens work station: Below: the STIR reconstructed projection slices of the same acquisition. The image quality is better for the Siemens reconstructed projection slices, which was expected. .................................................................................. 75

Figure 6-17: Above: axial, coronal, and sagittal projection slices of patient 18 reconstructed by the Siemens work station. Below: the STIR reconstructed projection slices of the same acquisition. As for patient 11 the image quality is better for the Siemens reconstructed projection slices, which was expected. ................................................................. 76

Figure AC-1: Projection slices after the SSRB and extract_segment utilities were applied to the sinogram of the syringe before the problems with the STIR headers were solved. From the left, the axial, coronal, and sagittal slice. ............... 111

Figure AC-2: Projection slices derived from the volume by back projecting the syringe data on which the SSRB was used before the problems of the STIR headers were solved. From the left, the axial, coronal, and sagittal slice. ............... 111

Page 17: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

List of Tables | xv

List of Tables

Table 2-1: PET and CT Acquisition and Reconstruction Parameters ................................................................................ 8

Table 2-2: QSH Pixel format values ...........................................................11 Table 3-1: Some characteristics of the Siemens Biograph 64, True

Point, True V from [11] and the DICOM header information. ............................................................................ 20

Table 3-2: PETLINK32 high order 4 bits and the record type ................. 27 Table 5-1: The diagnoses of the patients for which the list mode

data was reconstructed. ........................................................... 56 Table 6-1: Activity correction .................................................................... 62 Table 7-1: Absorbed dose in organs and the effective dose in adults

injected with NaF-18 according to SSM .................................. 79 Table 7-2: Absorbed dose in organs and the effective dose in 15

year old child weighing 70kg injected with NaF-18 according to SSM .................................................................... 80

Table 7-3: CT parameters used for TSF patients at the Karolinska Hospital in Solna ..................................................................... 80

Page 18: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 19: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

List of acronyms and abbreviations | xvii

List of acronyms and abbreviations

CT Computed Tomography CTDIvol DICOM

Computed Tomography Dose Index computed over the volume Digital Imaging and Communications in Medicine

DLP FBP

Dose Length Product Filtered Back Projections

FBP2D 2D Filtered Back Projection algorithm GUI Graphical User Interface LOR Line of Response LSO Lutetium Oxyorthosilicate NEMA National Electrical Manufacturers Association OSEM Ordered Subset Expectation Maximisation OSMAPOSL OSEM One Step Later algorithm OSSPS Ordered Subsets Paraboloidal Surrogate algorithm PET Positron Emission Tomography PSF Point Spread Function SSM Strålsäkerhetsmydigheten SSRB Single Slice Re-binning algorithm STE See and Treat Elite STIR Software for Tomographic Image Reconstruction SUV Standardized Uptake Value TOF Time of Flight TSF

Taylor Spatial Frame

Page 20: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 21: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Introduction | 1

1 Introduction

Positron Emission Tomography (PET) utilizes a radioactive nuclide that decays by emitting a β+, i.e., a positron. Positrons are the anti-particles to electrons. Positrons and electrons interact by an annihilation mechanism which gives rise to two 511 keV photons. These two photons are produced at the same time and location. They travel in opposite directions in their frame of reference and are detected as coincidences by detector crystals positioned opposite to each other. True coincidences may be confused with other events, such as uncorrelated decays or Compton scatter; for more information see [1]. Different pharmaceuticals combined with positron emitting radionuclides are used depending on the biological function of interest. To determine areas of bone remodeling a salt in the form of Na18F- is used, as 18F- is rapidly taken up in bone, in particular in remodeling bone [2]. The Na is rapidly separated physiologically from the 18F-, which is a bone seeker.

The patients considered in this project were being treated with a Taylor Spatial Frame (TSF)*[3]. A TSF is often used to treat complicated fractures or deformations of the limbs. In this study, only the tibia and fibula were considered. During treatment the six struts of the TSF are adjusted according to a patient specific schedule in order to achieve both translational and rotational movements of the bones. This therapy takes approximately 12 months and is very painful and time consuming for the patients. Today the therapy process is traditionally monitored by a series of X-rays and Computed Tomography (CT) scans. The addition of dynamic and static PET scans is new to this. PET scans with 18F-, superimposed on CT scans, have been shown to be a useful way to evaluate the healing process [4]. Serial PET scans are matched using a landmark registration method to spatially orientate the scans and thus help determine where the bone remodeling is occurring [5]. With this 18F- PET technique it is possible to visualize where-remodeling is occurring and the rate at which this is occurring, to help determine if the patient is responding to the treatment as expected and when the TSF can be safely removed [4].

All of the data used in this technical report has been collected from a clinical PET/CT scanner (Biograph 64 TruePoint/TrueV, Siemens Medical Solutions, Erlangen, Germany) at the Nuclear Medicine Department at the Karolinska University Hospital Solna using a protocol described in [5]. In the remainder of this report this particular PET/CT scanner is referred to as the Siemens scanner. The events collected by the PET camera of this Siemens scanner in the optional dynamic portion of an acquisition are stored in a list. This mode of data collection is called “list mode”. This list consists of all coincidence events, time markers, delayed events, and additional information. The dynamic acquisition starts at the same time as a bolus injection of Na18F. In this project, the [dynamic] acquisition time was 45 minutes. The patient procedures are described in Section 2.9. The data is saved in a file from which sinograms can subsequently be constructed at selected points in time. After the data is collected the dynamic lists as well as the reconstructed PET and CT volumes are archived on a Hermes Medical Solutions (HERMES) system (Nuclear Diagnostics AB, Stockholm, Sweden). The HERMES system can read, process, store, and display images from several different manufacturers as well as serve as an archiving system. However, only the archiving function of the HERMES was used in this study.

To reconstruct volumes from list mode data the Software for Tomographic Image Reconstruction (STIR), described in Chapter 4, was chosen as it contains a number of tools for list mode data and offers several different reconstruction methods from which to choose. Unfortunately, neither the Siemens scanner nor the HERMES system produce list mode data that can be directly processed by STIR, therefore the format of the list mode data from this scanner was studied. This format had to be understood in order to transform the file so that the STIR reconstruction tools can be used. The programs that STIR uses for reconstruction and test simulations were studied to gain

* The patient data being used in this technical report came from a set of patient who had a TSF applied to the tibia. These patients were part of an approved study (Regional Ethics Committee Dnr. 2012/1049-31/1).

Page 22: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

2 | Introduction

an understanding of how the data must be presented to STIR for their existing tools to process the data properly, i.e., to generate correctly reconstructed volumes.

The CT data from the Siemens scanner is used to perform attenuation correction of the PET data, but this is not available in STIR. The CT and PET volumes are acquired serially in the same system without moving the patient; therefore the volumes are generally well registered. As a result the PET data can be shown superimposed on the CT. When there has been movement of the patient between the CT and PET scans the volumes can be registered using a software tool developed for research use at NYU and KI with collaborators from KTH and the University of Utah [6–8]. Moreover, this same software can be used to register studies acquired at different times, so that changes in the patient’s 18F- uptake can be followed over the course of the patient’s treatment.

If dynamic visualization turns out to offer an improved tool, then a study should be made to determine the optimal time point for each segment of the list mode data. The expectation of the segmentation of the list mode data is to reconstruct volumes of good quality and such that the number of segments produces a smooth loop that seems to be a natural means of viewing this data.

1.1 Background

Currently a bolus injection of 2 MBq per kilogram of the patient’s body weight is used. There is a suspicion that this amount of activity is unnecessary. For this reason, an expected benefit of dynamic visualizations of the distribution of the uptake of 18F- in the bone is a possible decrease in the injected activity and hence a reduced distributed effective radiation dose to the patients. This is of great importance for patients being treated with a TSF frame, as the treatment is long and the recurring PET scans expose the patient to a relatively high effective radiation dose, see Table 7-1. Moreover, reducing the injected activity and thus the effective radiation dose per study, could allow more studies to be performed. This coupled with the cine loops could help the physician to determine with better precision where the bone remodeling is occurring without relying on standardized uptake values (SUV). However, to do this it is necessary to understand the change in the signal to noise ratio due to a reduction in the number of true coincidences that will result from a lower injected activity. By reconstructing images from the list with randomly removed events we can study the image quality that would result from lower injected activities.

A CT scan is [also] acquired for each PET acquisition both for attenuation correction and to superimpose selected slices for anatomical localization. As the CT scan is distributing its radiation dose to the lower leg, [9], the effective dose is low in comparison to the PET acquisition. This occurs because Na18F- is injected and hence gives an internal effective dose to radiation sensitive organs. In order for the physician to monitor the healing process and to be sure that it is safe to remove the frame many imaging procedures (X-ray, CT, PET/CT) are executed repeatedly.

It is important to know with high precision where and if bone remodeling is occurring. For example, if the tibia and fibula are not healing in a comparable fashion, then it is sometimes necessary to cut the more rapidly healing bone or both; or if the patient is not responding to the treatment (i.e., the bone is not healing), further bone graphs or stimulation treatment might be applied. With dynamic visualization, the uptake of the 18F- can be followed and this dynamic uptake is expected to be used in the evaluation of the healing process. This is in contrast to the current method of attempting to estimate the patient’s status based upon SUVs computed over volumes of interest drawn on static PET studies acquired on different days. This SUV method is difficult to standardize and is not perfectly reliable [10].

Page 23: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Introduction | 3

1.1.1 Dynamical visualization of Na18F- PET for Patients treated with TSF

Currently –two or more PET/CT scans are acquired on different dates (usually six weeks apart) for each patient. A software tool, such as that mentioned above, can be used to register the volumes. These are presented to the physician who is treating the patient. For diagnostic purposes the physician requires studies that accurately show where the bone is remodeling. The amount of remodeling is now determined by the use of SUVs.

The idea in this work was to develop software to present the PET data as a series of slices in cine mode superimposed on the corresponding CT slice. This series of slices is based on PET data saved in list mode that is divided into time intervals and reconstructed into volumes. These time intervals can be a fixed number of minutes or any time interval. The intervals could be longer in the later parts of an acquisition, as the half-life of the radioactive isotope gives rise to a decreased rate of events with time.

The Siemens list mode data has time markers that appear every millisecond and thus the time resolution is a millisecond. Once the list mode was decoded it was possible to decide which events and time interval to include or remove, therefore it was possible to simulate a dynamic acquisition that would be acquired with a lower activity of Na18F- (i.e., less than the current 2 Mq/kg body weight). Reducing the injected activity is desirable, both because it can permit more PET scans to be done over the course of the patient’s treatment and because it may make it possible to apply this technique to younger patients who are being treated with a TSF in the future. It is also beneficial for the staff that takes care of the patients during the PET acquisition. How much the injected activity can be reduced was the next step to be studied once it was understood how to construct a dynamic loop of sufficient image quality. The idea was to use STIR for this reconstruction.

1.2 Purpose

Physicians who treat patients with a TSF are interested in determining with high precision where and at what rate the bone is remodeling. The thought behind this study was that a dynamic visualization of the uptake of the 18F- could be a helpful tool [for the physician] as a dynamic technique could be used to visualize the spatial and temporal uptake of the 18F-. This would avoid the need to rely on (frequently unreliable) SUVs to diagnose the patient’s condition.

As the data was acquired in list mode, it was possible to simulate decreased injected activity by removing different fractions of the events in the list (once the structure of the list mode data is fully understood). Subsequently this reduced list can be framed into time intervals (of the user’s choice) to make a smooth cine loop – hopefully with sufficient image quality for the physicians to use in their assessment of their patient’s condition. This dynamic visualization is expected to allow a reduction in the injected activity to patient, hopefully sufficiently so that it will be possible to use this technique on children in the future.

The purpose of using STIR to reconstruct volumes from data acquired by the Siemens scanner, rather than using the Siemens workstation was to avoid disturbing the clinical activities. This is necessary because the reconstructions are quite time consuming and we anticipated the need to perform many different reconstructions when simulating different injected activities. A side effect of this effort will be that it was possible to document how to make the data from this Siemens scanner compatible with the STIR software; hence others will also be able to use this open source software to do reconstructions of data from such a scanner. Although this project is scanner specific, a lot of what has been learned about list mode data and the translation of the header data from the scanner’s output to STIR headers gives clues about how data from similar scanners can be adapted for use with STIR.

Page 24: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

4 | Introduction

1.3 Goals

The overall goal of this project was to reconstruct a suitable cine loop from the list mode data of patients treated with a TSF frame. This has been divided into the following sub-goals:

1. Study how the STIR software reads sinograms to enable creation of sinograms from the Siemens list mode data so that they can be put into the STIR reconstruction tools.

2. Understand the list mode format produced by the Siemens PET scanner, so that sinograms can be correctly constructed and processed by STIR.

3. Cut the list mode data into 1 minute segments (or any arbitrary segments, but one minute was used in this project) and make cine loops [and] to display [these loops] superimposed on the CT.

4. Study the possibility of reducing the injected activity by reconstructing volumes that simulate reduced injected activity by excluding events from the acquired list.

5. Show the cine loop with one minute segments to physicians for a qualitative opinion of its value.

These sub-goals lead to the following steps in the project:

1. Perform a phantom experiment to collect a list that can be used to reconstruct volumes with a geometrically simple and well known structure such as the NEMA phantom and the syringe.

2. Understand the structure of list mode data produced by the Siemens scanner by studying the statistics of the different data tags.

3. Create a program that takes the Siemens list mode data and produces a sinogram that STIR can use for reconstruction.

4. Translate the header information embedded in the Digital Imaging and Communications in Medicine (DICOM) files that the Siemens scanner produces into STIR headers.

5. Test this by reconstructing an image of the NEMA phantom and a syringe. These objects were selected because it was easy to recognize when the reconstruction was correct.

6. Divide the lists acquired from actual patients into time intervals of one minute and construct sinograms for each interval and then reconstruct these sinograms into volumes using STIR.

7. Compare reconstructions of the same patient’s list mode data using the Siemens workstation.

8. Superimpose the cine loops of the patient’s data on top of the corresponding CT.

9. Evaluate a series of simulations of decreased injected activity with different fractions of the original events in order to study the impact of a decrease in injected activity.

1.4 Research Methodology

The project applied a design science methodology in that an iterative research method was applied to produce a series of artefacts (embodied in algorithms and realized by software). The reduced injected activity was tested by producing volumes of simulated decreased injected activity. This

Page 25: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Introduction | 5

research also makes a previous unsupported image format into a potentially supported image format for STIR.

The research is quantitative in that the list mode data is used to produce sinograms that are subsequently reconstructed into volumes. There is also a qualitative aspect to this research as the volumes were viewed by the physicians treating these patients in such a way that they would be able to perceive the spatio-temporal dynamics of the 18F- uptake.

If dynamic visualization turns out to be a good alternative or complement to the static imaging technique, then a future research project should be conducted to further optimize the dynamic visualization. Different solutions could be developed and evaluated in discussion with those physicians who are to interpret the cine loop for diagnostic purposes. STIR provides various reconstruction methods from which to choose and new reconstruction methods are continuously being developed.

Dividing the list into different time intervals can be done in many different ways. The decrease in coincidences with time due to the half-life of the radionuclide could be taken into account when selecting [these] time intervals by segmenting the list based upon the number of detected events rather than based on time intervals, which might ensure stable image quality throughout the entire cine loop. The number of segments and a better procedure to form them can be optimized by taking into account the resulting image quality or physiological phenomenon. The number of images in the final cine loop must be sufficient for the visualization to be perceived (by the human eye) as dynamic.

The actual reduction of effective dose to the patient must be thoroughly studied and this work lies outside the scope of this project. However, the results here should give some indication of how much of a reduction of injected activity might be possible, while still retaining sufficient image quality.

This project gives a description of how to enable STIR to be used for data from the Siemens scanner and gives a foundation to enable similar processing for other (similar) scanners. The decoding of the list mode data structure ought to be of help when decoding list mode data from other scanners as well by following the steps and ideas described in this report. Scanners with time of flight (TOF) or Point Spread Function (PSF) have shown that a decrease in injected activity is possible, hence continuing the work presented here by producing a cine loop from data acquired by such a scanner is of interest [11].

1.5 Introducing 18F-

PET bone scanning commonly uses the radionuclide 18F-. This radionuclide is produced in a cyclotron. Its half-life is approximately 110 minutes and the patient can go home after the scanning is completed. The maximum energy of the emitted positron is 633.5 keV*.

Bone scintigraphy using positron emitting 18F- fluoride was introduced in 1962 by M. Blau, W. Nagler, and M.A. Bender. Dworkin, et al. showed that 18F- is rapidly taken up by remodeling bone as compared to other bone [12]. This gives rise to a signal to background ratio that is sufficiently large to use SUVs in conjunction with static PET imaging. Today, 18F- is widely used in PET/CT for bone studies and the Society of Nuclear Medicine has written guidelines for its use [13].

The Na18F- solution that is used in the acquisitions of the data sets used in this project was made in a laboratory located at the Karolinska Solna hospital. The 18F- radionuclide is produced in a cyclotron situated in the basement of the hospital. Before the solution is distributed to the patients it

* Data from http://ie.lbl.gov/toi

Page 26: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

6 | Introduction

must be quality controlled and approved. The activity injected into the patient is 2 MBq per kilogram of body weight. Thus, if a patient weights 65-kg the amount of injected activity is 130 MBq.

1.6 Structure of this technical report

Chapter 2 presents relevant background information about the imaging techniques for PET/CT and some expected beneficial outcomes of the work. Some earlier works that are relevant for this project are also shortly presented in this chapter. Chapter 3 gives a description of the Siemens Biograph 64 True Point True V scanner hardware, parameters, and list mode. In Chapter 4 the STIR software is presented, both the structure and how it is used. Chapter 5 presents the methodology and methods used to solve the problem of STIR and Siemens not being compatible with each other. In Chapter 6, the experiment and tests are described. The results and the validity of these results are presented in Chapter 7. Finally conclusions, limitations, and future work are discussed in Chapter 8.

Page 27: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

2

TdrevouacouthSthrevim

2

CnPvothcocoscmgeth

tidaup

Fi

2 Backg

This chapter pdescription ofemodeling bolumes can b

uptake data incquisition thrientation to

used to acquihe PET list mection 2.5 anhe clinical Sielated work isualizations

monitor their

2.1 CT v

CT volumes cnumber of roPET volumes

olume that che rings of dorrespond ifombined PEcanner to an

making the reenerally acquhe PET acqui

If the PETime they ne

demonstratedutomatic techysiological

igure 2-1:

ground

provides basf the monitoone using thbe superimpn the contex

hat is used asool for the phire data for p

mode. Static Pnd the QSH iemens PET

done to ests using list mr TSF patient

volume ac

can be acquiotations at a

are also acqcan be acquidetector crysf they are a

ET/CT scannnother; hencegistration ofuired at rougisition), henc

T and CT imaed to be reg

d in Figure 2chniques andco-homolog

PatienPET slice spatient 18 t

sic backgrounring procedu

he radionucliosed on the t of their spa

s both an attehysician. Secpatients beinPET scans arimage formascanner thattablish the bmode data. ts and this ch

cquisition

red using a hspecified an

quired for a rred with PETtals. The axi

acquired at ners were ince, it is less f the two volghly the samce the patien

ages are acqugistered befo2-1. There ad semi-automous points.

t 11 uperimposed oo the right.

nd informatiures, and somide 18F- togetcorrespondiatial positionenuation maction 2.2 givng treated wire described at is presentt acquired albenefits of 18

Section 2.9hapter ends w

helical scannngle and covrange of pos

ET using a sinial coverage different tim

ntroduced solikely that t

lumes easier.me time as thnt’s position s

uired in diffeore the PET

are various mmatic techni

on the corresp

ion that thisme data file dther with a Png CT to faci

n in the boneap when recoves some infoith a TSF. Sein Section 2ed in Sectionl the data in8F- in imagipresents th

with a short s

ning motionvers a range sitions along ngle bed posof the PET

mes or on do that the pthere is patie. The CT scan

he PET imageshould (gene

erent scannerT volume is methods useiques that re

ponding CT slic

study reliesdescriptionsPET scannerilitate underse. Section 2.1nstructing th

ormation aboection 2.3 co.4. The interfn 2.6. There Section 2.7

ng bone frae procedure summary in S

. The scan isof distance athe axis of t

sition is limitand the CT different maatient need ent motion bn acquired foe (either justerally) be the

rs or they aresuperimpos

ed to do thisequire some

Patice (sagittal view

s on such as:. It is possib

r (Section 1.5rstanding of t1 describes thhe PET volumout the PET/ontains inforrfile format is

is a short inand Section

actures and de used by thSection 2.10

s acquired ualong the axthe bed. Theted by the fiscans mightachines. Fornot be movbetween theor attenuatiot prior to or je same for bo

e not acquiresed on the Cs. These mete manual ide

ient 18 w); patient 11 t

Background |

earlier workle to visualiz

5). These PEthe functionahe CT volummes and as a/CT protocol

rmation abous presented i

ntroduction t2.8 describe

dynamic PEhe clinician t

.

sing a certaixis of the bede extent of thinite extent ot not perfectlr this reasonved from one two scans on purposes ijust followin

oth volumes.

ed at the samCT volume athods includentification o

to the left and

| 7

k, ze

ET al

me an ls ut in to es

ET to

in d. he of ly n, ne – is

ng

me as de of

Page 28: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

8 | Background

2.2 PET/CT bone scan acquisition protocol

In the PET/CT bone acquisition protocol [used in these studies], a high dose CT and an attenuation correction CT were acquired immediately before the PET study. The attenuation correction CT was used as an attenuation map for the PET volumes and for orientation when the PET study is superimposed on the CT. Two examples of a selected slice from the PET volume superimposed on corresponding CT slice are presented in Figure 2-1. The two patients are patient 11 and 18 and they are further discussed in Section 5.4.1. The CT and PET volumes are acquired with the patient in a single position, thus the bed is not moved during the course of the data collection.

Table 2-1 summarizes the acquisition and reconstruction parameters for the static PET and CT volumes. Details of the acquisition protocol are given in [5].

Table 2-1: PET and CT Acquisition and Reconstruction Parameters

Resolution Pixel Size (mm)

Modality Parameters Reconstruction

X Y Z X Y Z

PET

Static five minute scan sixty minutes after injection and 30 minute and 45 minute static scans reconstructed from the dynamic list

OSEM2D 4 iterations 8 subsets Gaussian Filter 5 mm

168 168 74 4.07 4.07 3.00

CT

120/140 kVp, 50/60 mAs 0.5/1.0 second per revolution

1.0 pitch

Attenuation Correction

512 512 74 1.37 1.37 3.00

Diagnostic 512 512 277/737 0.98 0.98 0.80/0.30

2.3 PET list mode

When the β+, i.e., a positron, interacts with an electron there is an annihilation that produces a pair of 511 keV photons, emitted roughly 180 degrees apart. When these photons are detected within a short period of time (the coincidence time) by two detectors, a line of response (LOR) is generated. The coordinates of this LOR are in terms of an angle and a radial distance from the center of the detectors to the LOR [14]. The angle is determined in relation to the Cartesian coordinates of the PET scanner’s array of detectors. Figure 2-2 shows a 2D example of a LOR with a single ring of detectors. The coordinates of the LOR are r and θ. In list mode, each coincidence event is recorded individually.

Page 29: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Background | 9

Figure 2-2: Example of a LOR (in 2D) – this simplified diagram leaves out all of the details of the detectors.

Time of Flight (TOF) information would limit the LOR to a chord whose length would be proportional to the time resolution of the coincidence detectors. Unfortunately, this model of Siemens PET scanner does not support TOF.

In addition to the LOR data, the list also has time markers that indicate the time since the start of the list mode acquisition. In this particular PET scanner, the markers have a granularity of one millisecond.

There are different types of events, those called “prompt events”, come from coincidences, while those called “delayed events” are not as simultaneous as the prompt events. Delayed events might come from an event where one photon is Compton scattered before it is absorbed in a detector crystal [15]. In addition, some “prompt events” are actually due to two different events in which one photon from each event is detected by a pair of detectors, while the other two photons escape without detection.

Because the PET scanner consists of multiple rings of detectors, it is possible to have coincidence events between pairs of detectors, where the detectors are in different rings. These oblique events are organized in terms of pairs that go across adjacent rings of detectors and those that go between a pair of rings that are farther apart.

2.4 PET reconstruction as static volumes

Reconstructed static PET volumes can be acquired in list mode or in frame mode. In frame mode the data represents the number of coincidences detected at each point within a particular bed position in the particular time interval. This data is output as a sinogram. A volume is reconstructed from this sinogram using one of the many different reconstruction algorithms. While frame mode saves a lot of storage space, it lacks any information about when the events occurred.

Because list mode data records all of the individual events and has time markers, this data can be post processed to produce static frames of any chosen portion of the list and these frames can utilize data from any chosen duration. While list mode acquisition allows great flexibility in post processing the data, it comes at the cost of greatly increased storage for the list.

The PET event data can be used to reconstruct either 3D or 2D volumes. In the case of 2D reconstructions, there are no sinograms based upon coincidences between oblique planes. Instead,

r θ

Page 30: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

10 | Background

the 2D volumes are reconstructed considering only coincidences that are detected in transaxial planes. For 3D PET volumes, in addition to the transaxial data the data from several oblique planes are utilized [14]. The number of oblique planes depends on the number of detector rings and the obliqueness of the planes used in the reconstruction. The more tilted an oblique plane is, the smaller the sinogram. Generally, there is a gain in spatial resolution within a plane in a 2D reconstruction, while a 3D reconstruction offers a gain in sensitivity.

Tomographic reconstruction can be done by filtered back projection (FBP) or using iterative methods. The back projection methods give rise to unwanted artefacts. These artefacts can be filtered away, but important information might be lost due to this filtering. Iterative reconstruction methods do not give rise to the same artefacts as FBP, but the amount of noise increases with the number of iterations and this noise needs to be filtered out in order to produce nice looking images. A commonly used filter (often used as a default) is a Gaussian filter of 5 mm that makes the image look smoother, to which many physicians are accustomed. Due to the increase of noise with the number of iterations, methods have been developed to divide the image into subsets that are separately processed in the iterations.

2.5 Interfile format

Volumes in Interfile format can be either two files (a header (editable ASCII) file and a binary data file) or the binary data can follow the Interfile header information. STIR uses Interfile format header files for many different purposes; hence, it is very useful to cover some of the details of this file format. This section will give a very short introduction to the Interfile header file format; further details can be found in [16].

A header file in Interfile format consists of a series of keys and values separated by the string “:=” and ending with a newline. Both keys and values are written as ASCII strings. Therefore, this format is very easy for humans to read (unlike the binary encoded DICOM format) and is quite flexible.

The first line of an Interfile format file is:

!INTERFILE :=

Lines that begin with a “;” are comments, designed to be read by humans. Lines beginning with a “!” are designed to provide meta-data, for example:

!GENERAL DATA := !data offset in bytes := 0 … !GENERAL IMAGE DATA := !type of data := PET !originating system := 1094

The list and sinogram files that are produced in the Siemens scanner encode the acquisition information differently from what STIR expects. The Siemens files also contain additional information about the position of the patient and the injected radionuclide.

2.6 QSH file header format

The locally developed image processing tool that is used by the orthopaedic surgeons uses QSH formatted files. Details about this software and how to use its various tools can be found in its user

Page 31: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

mthbF

xxenp

PBNSSS

Ta

C

ushuinufl

2

Arestevdm

Fi

* in

manual*. Thehe QSH formased upon th

Format For D

For convexxx.qim, whncoded datarimarily used

ixel formaytes per pumber of dize of dimize of dimize of dim

able 2-2:

Correspondin

unsigned charhort int

unsigned shornt

unsigned int loat

2.7 Volu

As an exampeconstructiontudy was acqvery millisec

duration the minute of the

igure 2-3:

file:///opt/d

nstalled

e header formmat [17]) for he American

Digital Image

enience, the here the .qhd

. For the purd. In this for

at:=2 pixel:=1 dimensions:mension[0]:mension[1]:mension[2]:

QSH Pixel f

ng C TYPE

r

rt int

ume Recon

le to illustran and displaquired in thecond, which user wishes acquisition w

A 20 ml syr

dx_cvs/User_

mat associatedescribing t

n AssociationExchange, R

QSH files ad file containrposes of thisrmat a simple

:=3 :=1 :=64 :=64

format values

Pixel formatvalue

2 8 9

128 130 256

nstruction

ate the reconay, a syringee Siemens scmakes it poto reconstru

were chosen

ringe (such as

_Guide/UserG

ed with this the contents n Of PhysicisReport #10 [1

are split intons a QSH fors technical re header file

t

n Process

nstruction pre filled with canner and sossible to deuct as a volu

n.

the one shown

Guide.book.h

software alsoof binary fil

sts In Medic18].

o two files wrmatted heaeport the pixfor a 1x64x6

rocess of a P11 ml of FDGsaved in a lietermine whume. In the s

n above) was fi

html on an

o uses a key-les. Both this

cine (AAPM)

ith names oder and the

xel formats s64 by 8 bits p

PET volume G was emplost mode fileich events fasyringe case

illed with 11 m

ny machine

y-value pair fs format and

) Standard M

of the form: .qim file co

shown in Tabper pixel icon

from acquisoyed, see Fig

e. A time mafall in the time the events

l of FDG for th

where the

Background | 1

format (called Interfile ar

Magnetic Tap

xxxx.qhd anontains binarble 2-2 will bn would be:

sition to finagure 2-3. Th

arker is addeme offset anfrom the firs

e acquisition.

software i

11

ed re pe

nd ry be

al he ed nd st

is

Page 32: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

12

secopcoissialraIn(cthfi

Fi

2itanalSptimtoFSpsctr

2 | Background

The Siemegment is thoincidences hotons that oincidences s the limit ininograms or lso contains adius as the n the coroncommonly rehe axial coorinally the ±3

igure 2-4:

The recon-5. This figur

terative OSEnalytical 2Dlgorithm, as iemens sinoroject the daime of reco

misinterpretinool is present

FBP2D reconiemens reconarameters ucanner files aranslation be

mens scannerhe collectionin this segmare detected

that differ byn obliquenesprojection d

seven sinogx-axis and a

nal view theeferred to asrdinate (withsegments (fr

Axial, coronSiemens sc180 degrees

nstructed vore shows the

EM algorithm Filtered Baimplemente

ogram data ata from the

onstructing ng the obliquted in Figure

nstruction innstruction shsed in the STand the STIRetween them

r produces dn of direct cent are detecd by adjaceny +2 or -2 rinss for four rdata from thgrams, but tangle is on the x-axis shows the z-axis). the order berom top to bo

nal, and sagittacanner. Notice s due to coinc

lume of the e axial, coronm with 8 sub

ck Projectioned by their Sibefore apply

e oblique sinin STIR is ue sinograme 2-6 and then STIR is prhow a syringTIR header fR interfile he.

data in sevencoincidencescted within tnt rings +1 ongs, and the rings. The sehe Siemens sthey are hiddhe y-axis. Thws the radiIn the sagit

eing the direottom).

al views from tthat the numbidences in the

syringe prodnal, and sagitbsets and 4 in algorithm ingle Slice Rying the FB

nograms intodecreased

ms is minimize resulting axresented in ge with the safile were cor

eader files ar

n segments, as. The detecthe same detor -1 ring. Ttwo last sino

even segmenscanner is prden behind

his is the mosius and the tal view the ct segment, t

the sinogram ober of segments

opposite direc

duced by thettal projectioiterations. To

(FBP2D) reRe-binning alBP2D reconso the direct and the ris

zed. The projxial, coronal,Figure 2-7.

ame proportirrect. The hee described i

as it has fourcted photonstector ring. TThe next twoograms diffe

nts give rise resented in Feach other Tst common w

y- axis shox-axis showsthe ±1 segme

of the syringe ts are seven anction.

e Siemens scn views. Theo reconstruc

econstructiongorithm (SS

struction. Thwithout anysk of the Sjection data and sagittal The views f

ions and sizeader files proin Sections 3

ur physical ris that are in

The two next o sinogramser by +3 or -3

to seven sinFigure 2-4. TThe axial vieway to preseows the axi

ws the angle aents, the ±2 s

that was reconnd that the sino

canner is shoe Siemens scact the syringen was used.

SRB) tool, wahis re-binniny loss of infoSTIR reconsafter the use

l projection vfrom both te, which indiroduced from3.2 and 4.3, a

ings. The firsnterpreted asegments arhave photo

3 rings, whicnograms. Th

The axial viewew shows thnt sinogramal coordinatand the y-axisegments, an

structed by theogram covers

own in Figuranner used ae in STIR thSTIR’s re-bi

as used on thng is used tormation. Thstruction tooe of the SSRviews after ththe STIR anicates that th

m the Siemenalong with th

st as re on ch he w

he s. te is

nd

e

re an he in he to he ol

RB he nd he ns he

Page 33: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Fi

Fi

Fi

ththSpTdax

igure 2-5:

igure 2-6:

igure 2-7:

STIR can he same lenghis templateubsequentlyrojection dat

The simulateddata is presen

xial, coronal

Axial, coron

Projection vsegment asswitched af

The STIR reacquired bystreak artefthe iterative

be used to cgth and diame another toy a reconstruta is simulatd cylinder thnted in Figur, and sagittal

nal, and sagitta

views of the sis all segments fter implement

econstructed ay the Siemens facts that are ce reconstructio

create a simumeter. This isool forward uction algorited without ahat approximre 2-9 and thl views using

al views of the

nograms after have been pro

ting a STIR too

axial, coronal, ascanner. The r

common for FBons provided b

ulation of thes done by a S

projects thithm can beany scatter omated the syhere is just og STIR’s back

syringe recon

the use of SSRojected into theol on data acqu

and sagittal viereconstructionBP2D reconstruby STIR

e syringe by aSTIR tool thahe data to pe used to recr other artefyringe is preone segmentk projection t

structed by the

RB tool in STIRe direct segmeired in the Siem

ews of the syri method is FBP

uctions. These

approximatinat generates produce a pconstruct thefacts a simpleesented in Fi

in this projetool is presen

e Siemens sca

R. Note that thent. The orientamens scanner.

nge from the sP2D on SSRB

e are eliminated

ng it by a sma volume tem

projection de projectione back projeigure 2-8. Tection data. nted in Figur

Background | 1

anner.

ere is only oneation is also .

sinogram data data. Note the

d when using

all cylinder omplate. Giveata template data. As thction suffice

The projectioThe resultin

re 2-10

13

e

of en e.

he s.

on ng

Page 34: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

14

Fi

Fi

Fi

htoSalfi

2

Inraim

4 | Background

igure 2-8:

igure 2-9:

igure 2-10:

The shorthow it could bo run STIR aiemens scanlong with hoiles into STIR

2.8 Rela

n this sectadiopharmacmages are me

The axial, capproximat

Axial, coronin STIR.

Axial, coronapproximat

t descriptionbe used to siand its variounner and howow to translaR Interfile he

ated work

ion some rceutical andentioned, as

coronal, and sated

nal, and sagitta

nal, and sagittates the syringe

n above descrmulate an acus tools. Howw to simulatate the binaryeader files.

related worthe practic

well as some

agittal views of

al projection v

al views from te.

ribed how STcquired dataw to reconstrte images in ry headers co

rk that thiscal and techne earlier dyn

f the STIR gene

iews from the s

the back projec

TIR reconstra set. Chapterruct images iSTIR are th

ontained in D

s project rnical clinicaamic visualiz

erated cylinder

sinogram of th

ction volume g

ructs volumer 4 gives a dein STIR from

horoughly deDICOM (or P

elies on is l procedureszation techni

r by which the

he syringe that

generated from

e from sinogetailed descr

m the data acescribed in laPTD Siemens

s briefly diss for the aciques.

syringe was

was simulated

m cylinder that

gram data anription of howcquired by thater chapters proprietary

scussed. Thquiring stati

d

nd w

he s, y)

he ic

Page 35: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Background | 15

Dynamic visualization has been done before, for example to correct for rhythmic motions such as in cardiac and respiratory studies by using gating techniques to determine the recurring motion pattern. The earlier work that resulted in the procedures used to acquire static volumes to exploit the benefits of the Na18F- and CT data are also mentioned in this section.

2.8.1 Benefits of Na18F- in studies of fractures and Bone Deformities

18F- has been shown to have a number of important qualities when imaging fractures and bone deformities. 18F- is more likely to be taken up by remodeling bone than other bone [19]. Additionally, PET imaging using 18F- has been shown to be more efficient than SPECT using a 99mTc labelled tracer [20]. The difference in 18F- uptake is sufficient to derive SUVs when using PET techniques. Moreover, the 18F- radionuclide is commonly used in PET imaging and it is relatively inexpensive and easy to produce.

2.8.2 Earlier work in Dynamic PET Visualization

Dynamic PET visualizations are possible when the data is acquired as list mode data. Dynamic visualizations have been developed for cardiac and respiratory gating corrections [21]. In these modalities events at corresponding points in time in a breathing cycle or the repetitive heart-beat cycle are collected and reconstructed into volumes, resulting in less motion artefacts. This is done with gating and supervising the rhythm of the motion. Subsequently, the list mode events are divided into parts and several volumes are reconstructed and shown as a cine loop.

2.8.3 Ernesto Fumero’s Thesis and Morena Galera’s toolbox for List Mode

Ernesto Fumero presents information about the Siemens scanner in his thesis [22]. His thesis project simulated the Biograph 64 PET/CT True Point scanner and reconstructed images of a point source using STIR. His thesis contains some information about STIR reconstructions and how to make a header file from the Siemens scanner data that STIR can read. In his conclusions he mentions that the geometric data used in the header was not confirmed by Siemens. He concluded that the use of STIR for his thesis project was a correct decision.

Amalia Moreno Galera’s thesis [14] gives a description of the general structure of list mode data from a detected event to the list mode data from which sinograms can be constructed. Together with Ernesto’s thesis an understanding of the Siemens scanner and a general understanding of list mode data was gained.

2.9 Procedures to Monitor Patients Being Treated with a TSF

The healing process of patients treated with TSF frames is monitored with repeated X-rays and CT scans taken several times over the course of the patient’s treatment. By using landmarks a physician can determine how and where the healing process was proceeding and whether it is successful or not. Today 18F- PET imaging has been shown to be an important complement to CT scans as 18F- is rapidly taken up by remodeling bone [4].

Patients in this study have severe fractures or deformities in the lower leg that requires extra help to heal properly. This is sometimes due to former fractures that have been healing in a faulty manner or the patient suffers from some congenital anomaly. The TSF is attached to the bone by an operation while the patient is under general anesthesia. During this operation fluoroscopy is used to ensure that nerves and vessels are not harmed. A CT volume is acquired post operation, typically within a week to have a clear image of the bone and the TSF. The first PET scan acquisition is done

Page 36: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

16

~enwshra

scptrpobim

Fi

voSvoacactiimthqNcoththac

2

Tpinre

6 | Background

~6 weeks aftensure that th

widely used bhown to be uays indicate t

The long chedule of micture in Fireatment somatient may sbvious that

mportance.

igure 2-11:

The mostolume. To aciemens PET olume acquicquisition stcquisition stime that themportant. Thhere is a fin

quantify the lNa18F- a smalollecting thehe time is nohe exact injectually admi

2.10 Sum

This chapter rocedures us

n this projececonstructed

er the operathe TSF can bbecause phyunreliable bethat the bone

treatment tmanipulatingigure 2-11. Dmetimes takesuffer from a rigorous m

Left and mifibula. The

t advanced clcquire this dbed, in a he

isition (see ttarts. The patarts. There me other nursehe dynamic a

nal static PETlatest activitll amount of

e activity andoted and righected activityinistered to e

mmary

summarizedsed for patiect and the p

d volume was

tion and a sebe removed 2ysicians are uecause the bres have heale

time is tiringg the struts During treates up to a yeanew brakes

monitoring p

ddle: a TSF paTSF is attache

linical imagidata a patientead first posithe left two fatient is injemust be twoe injects the

acquisition laT acquisitionty in the bonf extra activid the injectioht after the iny is calculatedeach patient.

d some of thnts being trepurpose ands also descri

econd PET im2D X-rays arused to interoken bone sed.

g and painfuof the TSF ftment the Tar (sometimedue to the b

process to fo

atient CT imageed into the skel

ing techniqut comes to thtion. The acqfigures of Figected with th

o nurses prese Na18F- soluasts 45 minutn for 5 minune. To ensurity is collecteon. The activnjection the ad. This proce

he relevant eeated with TSd expected oibed. The exp

mage is acqure acquired f

erpreting thesometimes lo

ul for the paframe. Thes

TSF must noes more). If tbones in theollow the pa

e; right: a modleton in tibia.

ue today is tohe nuclear mquisition beggure 2-11). The Na18F- sosent: one to ution. For thtes and is fol

utes. The pure that the ped in the syr

vity that is inactivity that iedure is imp

earlier work SF. The chapoutcome. Thpected result

ired ~3 monfrom two ang

ese images. Uooks as if it i

atient who me struts are ot be removthe TSF is ree growing aratient respon

el of the TSF a

o overlay a stmedicine depagins with a toThere is a sholution at thstart the PE

he dynamic allowed by a 1rpose of the

patient is givringe to corr

nitially in theis left in the s

portant to ha

and it descrpter also explhe procedurets and outco

nth after the gles. These 2Using CT alis not healed

must follow visible in th

ved prematuemoved too sreas being tonse to the tr

attached to the

tatic PET voartment andopogram foll

hort pause behe time the ET acquisition

acquisition t10 minutes be last 5 minuven the correrect for the e syringe is msyringe is me

ave a record

ribes the datlained the pre from acquomes were al

operation. T2D X-rays arone has bee

d, while the X

a strict dailhe right hanurely and thsoon, then thoo weak. It ireatment is o

tibia and

lume on a Cd is put on thlowed by a Cefore the PEPET dynamin at the samthis timing ireak and theute scan is tect amount otime betwee

measured aneasured. Thuof the activit

ta acquisitiorocedure useuiring data tlso presented

To re en X-

ly nd he he is of

CT he CT ET

ic me

is en to of en nd us ty

on ed to d.

Page 37: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Background | 17

This chapter also introduced some features of the STIR software and the Interfile and QSH file formats were shortly described.

Page 38: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 39: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Siemens Biograph 64 True Point True V PET/CT scanner | 19

3 Siemens Biograph 64 True Point True V PET/CT scanner

A Biograph 64 TruePoint TrueV (Siemens Medical Solutions, Erlangen, Germany) that is capable of saving data in list mode was used in this project. Unfortunately, this list mode format was not (yet) supported by STIR. Additionally, the structure of the list mode data was initially not completely known. It was necessary to understand the details of this file format in order to be able to manipulate this data with the STIR tools and to divide the list into time intervals for the cine loop.

This chapter describes the structure of the scanner itself and explains the data produced by the Siemens scanner.The scanner has four rings that give rise to seven segments: one direct and six oblique. The physical structure of the scanner is further discussed in Section 3.1. The data files that are produced by this scanner for each acquisition are either DICOM or PTD files with the header information and data embedded in the same binary file. While DICOM is a widely used format, PTD is a Siemens specific format. With exception of the NEMA phantom, all the files used in this report were in DICOM format. The (binary) header contains data about the injected activity and which isotope was used. It also contains information about the image reconstruction algorithm that was used and the geometry of the scanner. The data and header file are discussed further in Section 3.2. The list consists of 32 bit binary words. There are time markers and prompts and delay markers in the list mode file. For each prompt and delay the coordinates of the LOR are given in the 32 bit word format. Details of the list mode file are discussed and explained further in Section 3.3.

3.1 The Structure of the Siemens Scanner

The Siemens scanner consists of both a PET scanner and a CT scanner. This combined instrument enables good CT/PET volume registration. The PET scanner contains four rings. Each ring consists of 48 detector blocks and each detector block contains 169 Lutetium Oxyorthosilicate (LSO) crystals arranged as a 13x13 matrix. Between the detector blocks there are gaps of the same dimensions as the crystals. These gaps give rise to the diamond pattern apparent in the acquired sinograms (such as shown in Figure 2-4). Each block is coupled to 4 photo multiplier tubes. The crystals themselves are radioactive due to the lutetium isotope 176Lu that comprises 2.6 % of lutetium. This radioactive isotope has a half-live of 37.8 years and emits γ and β-, but their energy (86 to 182 keV [23]) is outside the energy window (435 to 650 keV) of the PET acquisition [24].

The data in Table 3-1 was taken from the Siemens headers and Lee, et al.[11]. The detectors of the Siemens scanner are structured into blocks and buckets. The 4 rings are ordered in 48 buckets, each bucket contains 1 block in the tangential direction and 4 blocks in the axial direction. Each block contains 13x13 LSO detector crystals.

Page 40: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

20 | Siemens Biograph 64 True Point True V PET/CT scanner

Table 3-1: Some characteristics of the Siemens Biograph 64, True Point, True V from [11] and the DICOM header information.

Characteristics Value

Detector material LSO Number of detector rings 52 (13x4) Image planes per bed 109 Number of crystals per ring 624 (13x48) Crystal size (mm3) 4x4x20 Face of crystal block (mm2) 52x2 (13x4) Detector elements per block 169 (13x13) Number of detector blocks 192 (48x4) Patient port diameter (cm) 70 Axial FOV (cm) 216 Transaxial FOV (cm) 60.5 Plan spacing 2.0 Coincidence time window (ns) 4.5 Energy window (keV) 435-650

3.2 The Data and embedded Header files produced by the Siemens Scanner for a List Mode acquisition

The list mode files extracted from the Siemens scanner consist of data files containing all of the image/event data as well as containing binary encoded header information. The header portion of the file contains information about the scanner and the acquisition. The DICOM (and PTD) header portion included an Interfile format header information file. The list mode header is very short. However, much more specific information is the header portion of the sinogram which also includes a Interfile section.

An example (patient 12) of an Interfile header stored inside a DICOM sinogram file is presented below. The first part states the name of the data file it requires and that the acquisition was saved in list mode.

!INTERFILE:= %comment:=Created from listmode data !originating system:=1094 %SMS-MI header name space:=sinogram subheader %SMS-MI version number:=2.0 !GENERAL DATA:= %listmode header file:=D:\scratch\_JM_222947_2066_2291889199.00000004\tmpdata\listmode1.mhdr %listmode data file:=\\PETCTRECON\PETDATA\data-4.0.23101010 !name of data file:=\\PETCTRECON\PETDATA\Replay\4.0.22894770-_JM_222947_2066_2291889199.00000004-3.s

The next part of this Interfile header gives some general data (see the listing below), such as the time and date of the acquisition and which isotope was used along with its activity and its half-life. The data file is in little-endian order, with signed integers, 2 bytes per pixel. This portion of the header also contains the patient orientation, bed position, and the matrix coordinates. The matrix coordinates are 336, 336, and 559 (559 is the sum of 109+97+97+75+75+53+53). The last is the number of direct and oblique sinograms. Additional information is given – including the pixel size and that the number of detector crystal rings is 55. There are actually 52 rings of detector crystals (13x4=52), but there are three gaps between the rings (of the same dimensions as crystal modules): these counts as rings. The axial compression factor tells us that the maximum number of sinograms that can be compressed in

Page 41: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Siemens Biograph 64 True Point True V PET/CT scanner | 21

each segment is 11 and that the maximum difference between the detector’s crystal rings is 38. As stated in Table 3-1, the energy window spans from 435 to 650 keV.

!GENERAL IMAGE DATA:= %study date (yyyy:mm:dd):=2014:01:30 %study time (hh:mm:ss GMT+00:00):=07:47:36 isotope name:=F-18 isotope gamma halflife (sec):=6586.2 isotope branching factor:=0.97 radiopharmaceutical:=Flouride %tracer injection date (yyyy:mm:dd):=2014:01:30 %tracer injection time (hh:mm:ss GMT+00:00):=07:40:00 tracer activity at time of injection (Bq):=1.96e+008 injected volume (ml):=0.0 image data byte order:=LITTLEENDIAN %patient orientation:=HFS !PET data type:=emission data format:=sinogram number format:=signed integer !number of bytes per pixel:=2 number of dimensions:=3 matrix axis label[1]:=x matrix axis label[2]:=y matrix axis label[3]:=z matrix size[1]:=336 matrix size[2]:=336 matrix size[3]:=559 scale factor (mm/pixel) [1]:=2.005 scale factor (mm/pixel) [2]:=1 scale factor (mm/pixel) [3]:=2.027 horizontal bed translation:=stepped start horizontal bed position (mm):=-2437 end horizontal bed position (mm):=-2437 start vertical bed position (mm):=160 %axial compression:=11 %maximum ring difference:=38 number of rings:=55 %number of TOF time bins:=1 %number of segments:=7 %segment table:={109,97,97,75,75,53,53} %total number of sinograms:=559 number of energy windows:=1 %energy window lower level (keV) [1]:=435 %energy window upper level (keV) [1]:=650 gantry tilt angle (degrees):=0.0 number of scan data types:=1 scan data type description[1]:=net trues data offset in bytes[1]:=0

The next part contains some information about the image data, such as the number of prompts, random events, and the resulting net true coincidences. The duration time as stated in this specific image’s Interfile is 60 seconds and the timing tags duration is given 60000 (in milliseconds), which implies that there is a time tag each millisecond. The header ends with a long list of bucket singles rates and the total singles rate for all 48 buckets.

Page 42: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

22 | Siemens Biograph 64 True Point True V PET/CT scanner

!IMAGE DATA DESCRIPTION:= !total number of data sets:=1 total prompts:=4158435 %total randoms:=773957 %total net trues:=3384478 !image duration (sec):=60 !image relative start time (sec):=180 %image duration from timing tags:=240000 %GIM loss fraction:=0.999949 %PDR loss fraction:=1 %DETECTOR BLOCK SINGLES:= %number of buckets:=48 %total uncorrected singles rate:=3768868 %bucket singles rate[1]:=72899 %bucket singles rate[2]:=69018 %bucket singles rate[3]:=62888 %bucket singles rate[4]:=53859 %bucket singles rate[5]:=57693 %bucket singles rate[6]:=52834 %bucket singles rate[7]:=53295 %bucket singles rate[8]:=56091 %bucket singles rate[9]:=65454 %bucket singles rate[10]:=71726 %bucket singles rate[11]:=78052 %bucket singles rate[12]:=78297 %bucket singles rate[13]:=97398 %bucket singles rate[14]:=93300 %bucket singles rate[15]:=78997 %bucket singles rate[16]:=67621 %bucket singles rate[17]:=75696 %bucket singles rate[18]:=71001 %bucket singles rate[19]:=71844 %bucket singles rate[20]:=75500 %bucket singles rate[21]:=84210 %bucket singles rate[22]:=89479 %bucket singles rate[23]:=95044 %bucket singles rate[24]:=101664 %bucket singles rate[25]:=102146 %bucket singles rate[26]:=97886 %bucket singles rate[27]:=82288 %bucket singles rate[28]:=71941 %bucket singles rate[29]:=77968 %bucket singles rate[30]:=74388 %bucket singles rate[31]:=76982 %bucket singles rate[32]:=77817 %bucket singles rate[33]:=85964 %bucket singles rate[34]:=89929 %bucket singles rate[35]:=95911 %bucket singles rate[36]:=104404 %bucket singles rate[37]:=94804 %bucket singles rate[38]:=90891 %bucket singles rate[39]:=77420

Page 43: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Siemens Biograph 64 True Point True V PET/CT scanner | 23

%bucket singles rate[40]:=65746 %bucket singles rate[41]:=72867 %bucket singles rate[42]:=70257 %bucket singles rate[43]:=71947 %bucket singles rate[44]:=73231 %bucket singles rate[45]:=78796 %bucket singles rate[46]:=81276 %bucket singles rate[47]:=85536 %bucket singles rate[48]:=94613

The example file presented below comes from the binary portion of the header information contained in the acquisition of patient 12. The first part of the header information explains that the patient is an adult and that the patient is in the supine position and the head is into the scanner. The acquisition is a PET/CT scan of the lower leg. Note that the personally identifiable data has been replaced by Xs, such as the value of the Ident Field xxxxxxxxxx. This file contains 5.5 kB data.

MlScanProtocolAttributes_Begin: 138 ActiveEntry: 0 AEC_SlopeObese: 0.33 AEC_SlopeSmall: 0.50 AutoReferenceLinesMode: MlAutoReferenceLinesModeOff BedIndexPosition: 0 BodySizeOld: MlAdult BreathHold: 18.000 BreathingDefault: 15.000 Cardiac: 0 CustomProtocol: 1 DefPatPos: MlFaceUpHeadFirst Ident: xxxxxxxxxx Partial: 1 PatientID: "xxxxxxxxx" PatientName: "xxxx, xxxxxx" PatientPosition: MlPositionUndefined PreCond4Displ: 8453119 ProtocolName: "PETCT_Underben" Region: MlSpecials Service: 0 StudyDescription: "Specials^PETCT_Underben (Adult)" StudyID: "xxxxxxxxx" TotalmAs: 969 TotalNoOfScans: 2 CursorPos: 0 MlScanProtocolAttributes_End: 138 PROTOCOL_ENTRY_NO: 1 MlOtherModalityEntry_Begin: 138 ModalityEntryType: "PET_WholeBody" Version: -1 ActivityID: "" AutoRange: MlAutoRangeNone EntrySelected: 1 MapProtocolEntryUID: 10 PatientPositionFoR: MlFaceUpHeadFirst ProtocolEntryUID: 26 Visible: 1 ModeEntryUID: 27 OtherModalityEntryAttributes_Begin: OtherModalityEntryAttributes_End:

Page 44: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

24 | Siemens Biograph 64 True Point True V PET/CT scanner

MlModeScanNotNULL: MlModeScan_Begin: 1 ModalityScanType: "Static_MultiBed" Version: 1 SeriesLoid: "" AutoLoad: 1 BeginPos: 0.000 Contrast: 0 FrameOfReferenceUID: "1.3.12.2.1107.5.1.4.1001.30000014013005520195300000105" RangeName: "PET 45 minuter" RangeStart: MlRangeStartConsole RawDataLoid: "" ScanNumber: 2 ScanState: MlStateScanned ScanTime: 2700.000 StartDelay: 2.000 TopoLoid: "" VertPos: 160.0

The header information continues with the pharmaceutical (Flouride) and the energy window (435 to 650). The injected activity was 196 MBq. The duration of the acquisition was 45 minutes and there is also information about the position of the bed.

OtherModalityModeScanAttributes_Begin: LLD: 435 ULD: 650 Isotope: F-18 Pharmaceutical: Flouride InjectionDate: yyyymmdd InjectionTime: 084000.000000 InjectedDose: 196(PtMegaBequerels) NumberOfBeds: 1 BedDuration: 45(PtMinutes) VertPos: 160 BeginPos: -1618 EndPos: -1618 BedStep: 149.998 TableDirectionPatient: MlCaudocranial XOffset: -1.09722 YOffset: 2.00814 ZOffset: 818.831 SinogramLoidList: 4.0.22894770 SinogramDicomUIDList: 1.3.12.2.1107.5.1.4.1001.30000014013006013537500000007 NormLoid: 4.0.22894750 NormDicomUID: 1.3.12.2.1107.5.1.4.1001.30000014013006013537500000004

Following this information tells us the acquisition is in list mode with 32 bits per word and the gantry model is 1094 (this corresponds to a Biograph 64, True Point, True V scanner). Information is also given about the size of the patient. The SinogramDicomUIDList line calls for the data file and the size of this file gives the information if this is a sinogram from a static scan or a list mode acquisition. In this case the size of the file 1.3.12.2.1107.5.1.4.1001.30000014013006013537500000007 is 1.0 GB, which implies that this data file is from a list mode acquisition. The sinogram is of the size 126.2 MB which is equal to 559 x 336 x 336 x 2. This is the number of planes in the three spatial directions multiplied and by 2 as the number format is signed integer, 2 bytes per pixel. The line NormDicomUID calls for the file 1.3.12.2.1107.5.1.4.1001.30000014013006013537500000004 that is a PET normalization header.

Page 45: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Siemens Biograph 64 True Point True V PET/CT scanner | 25

RebinnerLut: 0 RebinnerMode: PtListMode32 HistogramMode: PtTrues GantryModel: 1094 PostProcessing: StartMode: PtManual SourceType: PtPatient Volume: 31400 DefaultPlan: 1 PostProcessingType: 0 CrossCalibrationFactor: 1 PhantomRadius: 10 NumberOfBedsCompleted: 1 PhysioInputType: PtPhysioNone OtherModalityModeScanAttributes_End: MlModeScan_End: 1

Following this there is some information about the image reconstruction algorithm and its parameters. The algorithm that was used is OSEM, an iterative algorithm. The x-y matrix size is 168, the number of subsets is 8, and the number of iterations 4. We are also informed that a Gaussian filter has been applied.

First_MlOtherModalityModeRecon_Is_NULL: No_Of_Valid_Recons: 1 MlModeRecon_Begin: 3 ModalityReconType: "OSEM" Version: 3 SeriesLoid: "" AutoRecon: 1 FailedReason: "" ModeReconJMUID: "" ModeReconUID: 28 NoOfImages: 1 NoOfImagesEntryDone: 0 ReconSelected: 1 ReconState: MlReconStateInactive ReconStateJM: MlReconStateJMCreated ReconTaskNumber: 1 OtherModalityModeReconAttributes_Begin: CTAttenCorrModeList: (1,1) CTAttenCorrDicomUIDList: OutputImageType: PtNoRecon ReconMethod: PtIterative SinogramRebinMethod: PtFORE ImageSize: 168 Subsets: 8 Iterations: 4 Zoom: 1 FilterFWHM: 5 ScatterCorrect: 1 Trim: 1 XYFilterType: PtGaussian ZFilterType: PtGaussian SinogramLoidList: ACFLoidList: BedLoidList: Normalize: 1 NormLoid: 9.0.1726956 PostProcessing:

Page 46: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

26 | Siemens Biograph 64 True Point True V PET/CT scanner

SegmentCT: 1 MatchCTSliceLocation: 1 AutoTransfer: 0 Transfer1: Hermes Transfer2: NMLEO3 Transfer3: PACS ScatterScale: 3.14 SeriesDescription: PET Listmode 45 min BedBegin: -1 BedEnd: -1 XOffset: 0 YOffset: 0 PostProcessingType: 0 MaxSinoRebinBins: 336 SaveIntermediateData: 0 BodyPartExamined: FilterOrder: 3 ImageComments: OtherModalityModeReconAttributes_End: MlModeRecon_End: 3 MlOtherModalityEntry_End: 138 MlScanProtocol_End: 138

The final part of the header portion of the file (shown above) tells that the data was transferred to Hermes, PACS, and NMLEO3, along with some additional information. The line SeriesDescription also gives the information that it is a 45 minute PET list mode acquisition.

3.3 Siemens List Mode

The Siemens scanner used in the clinic is capable of saving its data in list mode, but as noted earlier this list mode format is not (yet) supported by STIR. Additionally, the structure of the list mode data was initially not completely known. Therefore, in order to manipulate this data with the STIR tools, the structure of this list data had to be understood.

The list mode data collected in the Siemens scanner is stored in a file that either begins (DICOM format) or ends (PTD format) with an embedded DICOM 3 Part 10 header. This header was recognized because it consists of 128 bytes of (usually) zero bytes followed by the string “DICM”. Within this DICOM header is an Interfile header.

The Siemens list mode file format is described in their document “Guideline to the PETLINK™ Proposal”, Revision J1, 26-Mar-2013 [25]. The lists that have been examined all used the 32 bit format (as identified by the value of the key “%SMS-MI header name space” in the Interfile header). This format distinguishes the different types of data stored as 32 bit quantities based upon the upper bits of each 32 bit word. Table 3-2 shows the mapping of the high order 4 bits to a specific type of data.

Page 47: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Siemens Biograph 64 True Point True V PET/CT scanner | 27

Table 3-2: PETLINK32 high order 4 bits and the record type

0, 1, 2, and 3 Prompt event packet

4, 5, 6, and 7 Delay event packet

8 and 9: TAG_1: Elapsed Time Marker

0xA and 0xB TAG_1: Dead Time Tracking

0xC and 0xD TAG_2: Gantry Motions and Positions

0xE TAG_3: Patient Monitoring Gating: Physiological Head Tracking

0xF TAG_4: Control or Acquisition Parameters

The file 1.3.12.2.1107.5.1.4.1001.30000014013006013537500000004 below is the header file in the list for patient 12. This file contains information that is important to translate the correct parameters to the STIR headers for reconstructions from data acquired by the Siemens scanner. This header says that the file was acquired on a Siemens type 1094 system (i.e., a Biograph 64, True Point, True V) and that this file was produced from a list mode acquisition. The header also gives that the data file is in little-endian (written in the header in all upper case without a hyphen) byte order, in floating point format that consists of normalized data. Little-endian order means that the least significant byte is first, while the most significant byte of a number is last. The calibration acquisition was 7200 seconds in duration and the isotope used for calibration was Ge-68. The number of random and prompt events is also given and the number of buckets is 12. In the end there is some information about the geometry of the scanner (used later in the STIR header).

!INTERFILE:= %comment:=Created from listmode data !originating system:=1094 %SMS-MI header name space:=sinogram subheader %SMS-MI version number:=2.0 !GENERAL DATA:= %listmode header comment:=CPS ECAT8 sinogram common attributes !originating system:=1094 %SMS-MI header name space:=normalization header %SMS-MI version number:=0.1 !GENERAL DATA:= data description:=PET scanner normalization Coefficients !name of data file:=norm3d.n %expiration date (yyyy:mm:dd):=2099:01:01 %expiration time (hh:mm:ss GMT-05:00):=12:00:00 !GENERAL IMAGE DATA:= %study date (yyyy:mm:dd):=2015:03:13 %study time (hh:mm:ss GMT+00:00):=05:48:43 image data byte order:=LITTLEENDIAN !PET data type:=normalization %data format:=sinogram - expandable from norm components number format:=float number of bytes per pixel:=4 %RAW NORMALIZATION SCANS DESCRIPTION:= %number of normalization scans:=2 %normalization scan[1]:=geometric profile scan %normalization scan[2]:=axial profile scan isotope name[1]:=Ge-68

Page 48: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

28 | Siemens Biograph 64 True Point True V PET/CT scanner

isotope name[2]:=Ge-68 radiopharmaceutical[1]:=PHARM_TEST radiopharmaceutical[2]:=PHARM_TEST total prompts[1]:=0 total prompts[2]:=606438670 %total randoms[1]:=0 %total randoms[2]:=239382307 image duration (sec) [1]:=0 image duration (sec) [2]:=7200 %number of buckets:=12 %total uncorrected singles rate[1]:=0 %total uncorrected singles rate[2]:=0 %NORMALIZATION COMPONENTS DESCRIPTION:= %number of normalization components:=7 %normalization component[1]:=geometric effects %normalization component[2]:=crystal interference %normalization component[3]:=crystal efficiencies %normalization component[4]:=axial effects %normalization component[5]:=paralyzing ring DT parameters %normalization component[6]:=non-paralyzing ring DT parameters %normalization component[7]:=TX crystal DT parameter data offset in bytes[1]:=0 data offset in bytes[2]:=146496 data offset in bytes[3]:=165312 data offset in bytes[4]:=313152 data offset in bytes[5]:=315388 data offset in bytes[6]:=315608 data offset in bytes[7]:=315828 number of dimensions[1]:=2 number of dimensions[2]:=2 number of dimensions[3]:=2 number of dimensions[4]:=1 number of dimensions[5]:=1 number of dimensions[6]:=1 number of dimensions[7]:=1 %matrix size[1]:={336,109} %matrix size[2]:={14,336} %matrix size[3]:={672,55} %matrix size[4]:={559} %matrix size[5]:={55} %matrix size[6]:={55} %matrix size[7]:={14} %matrix axis label[1]:={sinogram projection bins,sinogram planes} %matrix axis label[2]:={crystal number,sinogram projection bins} %matrix axis label[3]:={crystal number,ring number} %matrix axis label[4]:={plane number} %matrix axis label[5]:={ring number} %matrix axis label[6]:={ring number} %matrix axis label[7]:={crystal number} %matrix axis unit[1]:={mm/pixel,mm/pixel} %matrix axis unit[2]:={mm/pixel,mm/pixel} %matrix axis unit[3]:={mm/pixel,mm/pixel} %matrix axis unit[4]:={mm/pixel}

Page 49: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Siemens Biograph 64 True Point True V PET/CT scanner | 29

%matrix axis unit[5]:={mm/pixel} %matrix axis unit[6]:={mm/pixel} %matrix axis unit[7]:={mm/pixel} %scale factor[1]:={2.005,2.027} %scale factor[2]:={2.005,2.005} %scale factor[3]:={2.005,4.054} %scale factor[4]:={2.027} %scale factor[5]:={4.054} %scale factor[6]:={4.054} %scale factor[7]:={2.027} %axial compression:=11 %maximum ring difference:=38 number of rings:=55 number of energy windows:=1 %energy window lower level (keV) [1]:=435 %energy window upper level) (keV) [1]:=650 %GLOBAL SCANNER CALIBRATION FACTOR:= %scanner quantification factor (Bq/ml):=3.2872e+007 %calibration date (yyyy:mm:dd):=2015:03:13 %calibration time (hh:mm:ss GMT+00:00):=05:48:43

The order of the coordinates in Siemens list mode data was not known at this point. The low order 30 bits in the 32 bit word contained information about the LOR. However, it provides this information simply as a bin number, rather than as an angle, radius, and segment. A bit of permutation testing revealed that the fastest running coordinate in the bin numbering is the radial coordinate followed by the angle and the last piece identifies the segment. When the list was decoded, one of us (GQM) wrote a program that parsed the Siemens list mode data (See Appendix A). The user tells the program how long a time interval into which the list is to be split, and then it emits sinograms for each of these intervals. Subsequently STIR can be used to reconstruct each of these sinograms into a volume. The program is called “parselist” and the user can choose to have the sinogram reconstructed using the direct segment or all of the segments. In order for STIR to read the resulting the sinogram, the file is renamed to have a “.s” extension and a corresponding STIR header, with an extension “.hs”, is written (details of this are explained in Section 4.3.).

Page 50: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 51: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

STIR Version 3.0 | 31

4 STIR Version 3.0

This chapter introduces Software for Tomographic Image Reconstruction (STIR). This reconstruction software was used to reconstruct volumes from sinograms. As provided the software has support for selected PET scanners (e.g., Discovery STE PET/CT scanner, General Electric Healthcare Systems, Waukesha, WI), but unfortunately it did not yet support the Siemens scanner. STIR contains tools to generate volumes, generate projection data and volumes, and reconstruct volumes from SPECT or PET scanners. In this chapter we discuss the tools that are used to reconstruct PET data. Section 4.1 gives a general description of STIR. Section 4.2 explains the files and the file system that STIR uses. The different types of files that STIR uses and produces such as header, data, and parameter files are described in Section 4.3. In Section 4.4 some utility programs are described. Section 4.5 explains the procedure for reconstructing a volume in STIR starting from generating a sinogram to the final reconstructed volume. The recon test package was developed to test the tools of STIR (Section 4.6). The program CMake was used to compile STIR. STIR is built of C and C++ programs. CMake and the various C++ programs are discussed in the context of building and testing STIR. STIR also contains demos that can be used to study how STIR works (Section 4.7).

4.1 STIR basics

STIR is made available as open source software. The source can be downloaded from the STIR homepage (https://www.stir.sourceforge.net). The STIR software was chosen because it has many reconstruction methods and tools. Additionally, STIR also uses header files and supports several different manufacturers’ scanners. STIR contains some tools for processing list mode directly, but those were not used in this project. As it is an open source program, it was expected that it would be possible to reconstruct volumes from a scanner that was not (yet) supported.

A new STIR user is advised to run tests to ensure that the downloaded STIR utilities function properly. The recon_test_package can be downloaded from the STIR home page. Familiarity with running different reconstructions in STIR can be gained by running the demo programs found in the STIR example/src folder. Further details of these are given in Section 4.6 and 4.7.

4.2 STIR File System and Installation

The file system and the different types of utilities and programs in STIR are executed by using a header parameter file, an Interfile format header, or both. This file is used by the utility or tool of interest as input. The header parameter files and the header Interfile files are easy to manipulate and the data file that is processed is identified in the header file.

The source code of the tools is available for the user to manipulate. The people that developed STIR answer questions via the two STIR mailing lists. Additionally, anyone can become a STIR developer, as the tools are written in C and C++ with classes and hierarchies. Unfortunately, the whole package has a quite complicated structure.

As mentioned earlier STIR also contains tools for SPECT. Additionally, there is an ECAT version of STIR whose files come with STIR 3.0, but has to be compiled separately. However, it requires a library that does not seem to be available any longer, therefore the ECAT files were not compiled. The STIR ECAT code supported older Siemens scanners and would most probably read Siemens data files correctly by default. However, since the missing library proved to be a difficulty this method of reading Siemens data was not used.

Installing STIR begins with downloading the package from the homepage. The installation procedure is described in the STIR-UsersGuide. The Boost library is required. This library can be downloaded from https://www.boost.org. A C++ compiler is required. The “STIR-UsersGuide”

Page 52: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

32 | STIR V

recommin this p

STIRfunction

The other wotest pacrecon_teThe testwithout shown in

The found inwrite thSTIR/STtools. Thsource c

4.3

The heafile it cothe actuvolume 4 dimensegmentfile this i

Unfoproduceaccepts. Additionstudy th(i.e., 4 b

Version 3.0

mends managproject. The u

R has a granality was no

recon test pork and can ckage, whichest_pack. Thts are execuany error m

n Figure 4-1.

utilities andn the directorhe parameteTIR/examplehe STIR/STIcode for the d

STIR Hea

der files conorresponds. Tual data. The

data header nsions: the ts. The Interinformation

ortunately, Sed from the S

The STIR nally, the heahe critical inytes per pixe

ex

sample

ging the builduser guide de

aphical usert used in this

package is a be download

h compiles ihe files that buted in the Smessages, the.

Figure 4-1:

d tools are exry STIR/STIer files for es/src directoIR/src directdifferent tool

ader Data

ntain the neceThe header fsinogram (afiles have thtangential c

rfile formatteis structured

STIR does nSiemens scanheader file ader containformation w

el).

xamples

src

d

es

d process wiescribes how

r interface s project as a

test packageded from thein the STIRbegin with ruSTIR/STIR/ren STIR is re

The str

ecutable in tIR/examples

the differeory. The demtory containsls can be foun

and Param

essary informfiles are easyalso called prhe extension coordinate, aed “.hs” files d in three dim

not accept thnner, and thincludes the

ns general infwas that the

c

demos

ith CMake foto initiate th

(GUI) to faalternative so

e to be run be STIR hom

R/STIR direcun and end wrecon_test_eady to be u

ructure of the S

the STIR/ST/samples. Th

ent tools inmos can be uss many direcnd.

meter File

mation abouty to change arojection) dat“.hv”. The inaxial coordin

also containmensions: x,

he header inherefore these name of tformation abvoxels are e

STIR

STIR

src

utilities

or Linux , thahe compilatio

acilitate dispoftware for d

before startine page. The ctory. First

with the extenpack directo

used. The str

STIR directorie

IR directoryhese exampln STIR. A sed to learn hctories, such

s

t the scanneand manipulata header filenformation snate, numben informatioy, and z (as i

nformation ee must be trthe data filebout the dataencoded as l

at was the opon of the enti

playing voluisplaying vol

ng to performfirst step is connect to

nsion “.sh” arory. When eructure of th

es simplified.

. A collectiones can be stunumber of

how to use STas the utility

r. These alsoate without hes have the estored in “.hser of views, n about the in DICOM fil

extracted froranslated intoe in the nama included inittle-endian

Recon_te

perating systire package.

umes. Howelumes was av

m reconstruto compile tthe director

re files that reach test canhe STIR direc

n of parametudied to lear

demos areTIR and the y directory w

o states to whhaving to maextension “.hs” file is stru

and the nuscanner. In

iles).

om the DICo a header thme of data n the data fil

signed long

est_pack

tem used

ever, this vailable.

ctions or the recon ry called run tests. n be run ctories is

er files is rn how to e in the different

where the

hich data anipulate hs”, while ctured in

umber of the “.hv”

OM files hat STIR file line. e. In this

g integers

Page 53: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

STIR Version 3.0 | 33

The four matrix axis labels in a STIR sinogram header are by default ordered so that the segments are the fourth axis, the views are the third axis, the axial coordinates are the second axis, and the tangential coordinates are the first axis. The Siemens scanner produces 7 segments, 336 views, 559 axial coordinates ordered as {109, 97, 97, 75, 75, 53, 53} and the tangential coordinates range from 0 to 335 (i.e., 336 different values). In the header file below the matrix axis label for the view and the axial coordinate must be swapped due to the structure of the sinogram data produced by the Siemens scanner. The remainder of the header contains scanner information as found in the Siemens DICOM files in the field containing the Interfile header. A header file in Interfile format suitable for STIR is shown below. The input data was produced by the program “parselist” that produces sinograms that are accepted by STIR as long as the header file is correct. The number format of the sinograms that “parselist” produces is little-endian, signed integers and 4 bytes per pixel.

!INTERFILE := !imaging modality := PT name of data file := image_data_file_name.s originating system := Userdefined !version of keys := STIR3.0 !GENERAL DATA := !GENERAL IMAGE DATA := !type of data :=PET image data byte order :=LITTLEENDIAN !PET STUDY (General) := !PET data type := Emission applied corrections := {None} !number format := signed integer !number of bytes per pixel := 4 number of dimensions := 4 matrix axis label [4] := segment !matrix size [4] := 7 matrix axis label [3] := axial coordinate !matrix size [3] := { 109,97,97,75,75,53,53} matrix axis label [2] := view !matrix size [2] := 336 matrix axis label [1] := tangential coordinate !matrix size [1] := 336 minimum ring difference per segment := { -5,-16,6,-27,17,-38,28} maximum ring difference per segment := { 5,-6,16,-17,27,-28,38} Scanner parameters:= Scanner type := Userdefined Number of rings := 56 Number of detectors per ring:= 672 Inner ring diameter (cm) := 85.52 Average depth of interaction (cm) := 1 Distance between rings (cm) := 0.4054 Default bin size (cm):= 0.2005 View offset (degrees) := 0 Maximum number of non-arc-corrected bins := 0 Default number of arc-corrected bins := 0 Number of blocks per bucket in transaxial direction := 1 Number of blocks per bucket in axial direction := 4 Number of crystals per block in axial direction := 14 Number of crystals per block in transaxial direction := 14 Number of detector layers := 1 Number of crystals per singles unit in axial direction := 14

Page 54: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

34 | STIR Version 3.0

Number of crystals per singles unit in transaxial direction := 14 end scanner parameters:= effective central bin size (cm) := 0.204577 number of time frames := 1 !END OF INTERFILE :=

The scanner information that is used in the STIR header comes from the DICOM Interfile header which is extracted as described in Section 3.3. The relevant lines (with comments in red to the right) are:

distance between rings (cm) := 0.4054 gantry crystal radius (cm) := 42.76 this is half the Inner ring diameter := 85.52 cm bin size (cm) := 0.2005 interpreted to be the default bin size

%singles scale factor := 8 %total number of singles blocks := 48 %axial compression := 11

The axial compression gives the information that each segment collects events from 11 aligned crystals, which when translated to a STIR header gives the minimum ring different per segment {-5,-16,6,-27,17,-38,28} and the maximum ring difference per segment {5,-6,15,-17,27,-28,38}.

%maximum ring difference := 38 gives the -38 and 38 in the segment statement above %number of projections := 336 the tangential coordinate

%number of views := 336

%number of segments := 7 %segment table := {109, 97, 97, 75, 75, 53, 53} the axial coordinate

The DICOM Interfile header information given below is used to create the STIR Interfile format header. This header says that the number of detector crystal rings is 55, which is 4x13+3. This makes sense as in the z-axis there are 13 crystals in each of the four rings and there are three gaps between the four rings. STIR complains about this as 14 times 4 are 56 rather than 55; hence the number of rings is set to 56 in the STIR Interfile format header. In the DICOM Interfile header it is stated that the number of crystals is 14 in both z and the tangential direction, which is equal to 13+1. This means that the gap is counted as a crystal in the header, probably to keep the correct geometry; hence the number of crystals per bucket is set to 14 in both axial and tangential direction in the STIR header. The number of sinogram planes is 109, which is the number of direct sinograms. The plane number is 559, which corresponds to the sum 109+97+97+75+75+53+53, i.e., the sum of all direct and oblique sinogram planes.

%matrix size[1]:={336,109} %matrix axis label[1]:={sinogram projection bins, sinogram planes} %matrix size[2]:={14,336} %matrix axis label[2]:={crystal number, sinogram projection bins} %matrix size[3]:={672,55} %matrix axis label[3]:={crystal number, ring number} %matrix size[4]:={559} %matrix axis label[4]:={plane number} %matrix size[5]:={55} %matrix axis label[5]:={ring number} %matrix size[6]:={55} %matrix axis label[6]:={ring number} %matrix size[7]:={14} %matrix axis label[7]:={crystal number}

Page 55: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

STIR Version 3.0 | 35

In STIR the data volume has two headers with the extensions “.ahv” and “.hv”. The “.ahv” file contains less information than the “.hv” file and the “.ahv” files are not expected to be present in future versions of STIR. Below is an example of an “.ahv” file for a reconstructed 3D image:

!INTERFILE := !name of data file := data_file_name.v !total number of images := 109 !data offset in bytes := 0 !imagedata byte order := LITTLEENDIAN !number format := short float !number of bytes per pixel := 4 matrix axis label [1] := x !matrix size [1] := 336 scaling factor (mm/pixel) [1] := 2.005 matrix axis label [2] := y !matrix size [2] := 336 scaling factor (mm/pixel) [2] := 2.005 ;Correct value is of keyword (commented out) ;!slice thickness (pixels) := 1.01097 ;Value for Analyze !slice thickness (pixels) := 2.027 !END OF INTERFILE :=

As specified above, the number of axial slices is 109, as this was the number of sinograms from which this 3D volume was reconstructed. The data in the volume file is little-endian floats with 4 bytes per pixel. This is the default data representation for voxels in STIR. Each image has two dimensions, with an x and y matrix size of 336 each. Additionally, the pixel size is 2.005 mm. The pixel slice thickness is 2.027 mm, which is the distance between two consecutive slices of the 109 slices that are placed along the z axis.

The “.hv” file is a bit longer and it differs from the “.ahv” file. It contains information about the three dimensions, such as the number of slices and the slice thickness is specified as the scaling factor for the z axis. Here is an example of such a file:

!INTERFILE := name of data file := data_file_name.v !GENERAL DATA := !GENERAL IMAGE DATA := !type of data := PET imagedata byte order := LITTLEENDIAN !PET STUDY (General) := !PET data type := Image process status := Reconstructed !number format := float !number of bytes per pixel := 4 number of dimensions := 3 matrix axis label [1] := x !matrix size [1] := 336 scaling factor (mm/pixel) [1] := 2.005 matrix axis label [2] := y !matrix size [2] := 336 scaling factor (mm/pixel) [2] := 2.005 matrix axis label [3] := z !matrix size [3] := 109 scaling factor (mm/pixel) [3] := 2.027 first pixel offset (mm) [1] := -336.84 first pixel offset (mm) [2] := -336.84

Page 56: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

36 | STIR Version 3.0

first pixel offset (mm) [3] := 0 number of time frames := 1 !END OF INTERFILE :=

A “.v” data file contains volume information and a “.s” data file contains sinogram information. These data files are indicated in the STIR Interfile formatted files by the line with the key “name of data file”.

While the STIR default data representation is floats with 4 bytes per pixel, STIR can read other kinds of data as well. For example, the data representation of an element in a sinogram produced from the Siemens list mode is a signed integer with 4 bytes per pixel. The data representation must be stated in the STIR projection data header in order for STIR to read this data correctly.

The segments in the projection data from the Siemens list mode data are ordered in a different way than the STIR default. Therefore, the key “matrix axis label [3]” must be changed from view to axial coordinate and the value of the key “matrix label [2]” is changed from axial coordinate to view. The “!matrix size [3]” must be changed from 336 to { 109, 97, 97, 75, 75, 53, 53} and the “!matrix size [2]” must be changed from { 109, 97, 97, 75, 75, 53, 53} to 336 in order for STIR to read the simogram data files the correct way. This flexibility of STIR proved to validate STIR as a good choice for this project.

The parameter files have the ending “.par” and they are quite similar to the Interfile format header files in that they are easy to manipulate without having to modify the data files or the programs that are executed with these parameter files. In the parameter files the input header file that corresponds to a data file and an output filename are usually stated. Several utilities such as generate_image, FBP2D, OSMAPOSL, and other tools are executed with a “.par” file. For example; a “.par” file to execute the generate_image tool contains information about a geometric object and the pixel size that generate_image will use to generate a volume template. For the OSMAPOSL reconstruction the “.par” file contains information about the matrix type, an image as a first guess, the number of subsets and sub-iterations, and information about the filter that is to be used for the reconstruction. The parameter file for an OSMAPOSL reconstruction can be long and complicated. In comparison, the FBP2D and FBP3D parameter files are simpler, as they contain information about the input header and the output name and not much more. Each tool that uses a parameter file can require different information depending on what the tool needs in order to execute.

4.4 Useful STIR Utilities

The STIR utilities that were used for this project are described in this section; they range from a utility to create a volume for simulating data to a utility to process acquired data in order to reconstruct a volume. The creation of simulated data was useful in order to understand STIR and to have volumes that could be compared with acquired data (for example, to understand what the sinogram of a given object should look like). Volumes can be simulated of simple geometric objects, such as a syringe that can be approximated by a small cylinder or a NEMA phantom for which it may suffice to approximate it as a cylinder with six spheres of different radii.

The generate_image tool creates a volume template. Rather than using volume data acquired from a scanner, such as the Siemens scanner, it is convenient to create a volume template of a simple geometric object that is to be studied. The generate_image tool is executed with a parameter file in which the geometry of the objects is stated. This is run by saying the following (where “>>” is the shell prompt):

>> generate_image name_of_parameter_file.par

The create_projdata_template utility creates an Interfile header that corresponds to a scanner chosen by the user along with an empty data file. When this utility is run, the user can either choose a scanner that is supported by STIR or can input the information about the chosen scanner by answering questions. The execution of this program is as follows:

Page 57: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

STIR Version 3.0 | 37

>> create_projdata_template output_name_of_projdata_template.hs

After typing the above command, the user is first given a list of scanners that are supported by STIR and if the scanner of interest is not in the list, then STIR asks the user many questions in order to build a header that corresponds to the desired scanner. The result is a header and an empty data file for which the header file calls. This utility was not used very much during this project because it was possible to directly write the header and make an empty data file for which this header file calls. The questions asked are the parameters that can be found in the STIR header file shown in Section 4.3.

While STIR assumes that the data file is little-endian floats of 4 bytes per pixel, since the data in the list mode file from the Siemens scanner is signed integers of 4 bytes per pixel this data representation needed to be specifid in the STIR header file in order to process this data. However, the resulting data files produced by executing a STIR tool are always little-endian floats of 4 bytes per pixel.

The Single Slice Re-Binning (SSRB) algorithm is implemented in a SSRB utility. This utility can be used to project the oblique sinogram segments into the direct segment and according to the STIR-UsersGuide this occurs without data loss. SSRB is executed with the following command:

>> SSRB output_file_name input_filename.hs nosegments n0combined segments 1 (1 if normalized and 0 if not)

The number of segments in the Siemens scanner data is 7 and the number of combined segments is 1. It is not possible for SSRB to correctly combine seven segments into more than one segment. The argument “0” is used for data that is not normalized. If the sinogram data is normalized the final argument is “1”.

The fwdtest utility is a forward projection tool that produces projection data and sinograms from a volume such that the generated volume is the result of executing the generate_image tool. To execute the fwdtest tool the command line looks something like the following:

>> fwdtest output_file_name header_file.hs image_template.hv

The fwdtest utility does not need a parameter file and it produces two files: one sinogram data file that is given the output name with the extension “.s” and the other file is the corresponding header file that is given the same output name with the extension “.hs”. The header file “.hs” can be used as an input file that contains information about the scanner that the sinogram data is modeled by and the data file “.s” it calls for can be or should be empty and can be written or produced by the STIR tool create_projdata_template. The volume template input is the simulated volume for which the sinogram data is made.

The back_project utility back projects sinogram data into a volume. This tool uses no filtration; it simply computes the back projection and is executed as follows:

>>back_project output_file_name projection_header_file.hs image_template.hv

The back_project utility produces a template named by the output file name. The result is a template containing a data file that ends with “.v” and the two volume header files that end with “.ahv” and “.hv” (respectively).

The FBP2D utility back projects and filters projection data for non-oblique slices. The filter reduces the impact of the streak artefacts that are unfiltered in the back_projection utility. This is a 2D back projection, while the data that is acquired in the Siemens scanner is 3D. The SSRB utility can be used on the projection data from the Siemens scanner before FBP2D is used. To execute FBP2D a parameter (.par) file is used. This file contains the following information:

FBP2DParameters :=

input file := sinogram_data_to_FBP2D.hs

xy output image size (in pixels) := 336 (for the Siemens scanner)

Page 58: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

38 | STIR Version 3.0

zoom := 1

output file name prefix := file_name_of_your_choice

END :=

The command to execute FBP2D looks like the following:

>> FBP2D FBP2D_parameter_file.par

The FBP3DRP utility is a FBP in 3D, where the “RP” stands for Re-Projection algorithm. This utility is executed in a manner similar to FBP2D with a parameter file. Inside the source code of the FBP3DRP utility one can see that the SSRB tool is executed. The parameter file to run the FBP3DRP utility might look like the following:

FBP3DRPparameters :=

input file := sinogram_data_to_FBP3DRP.hs

xy output image size (in pixels) := 336 (for the Siemens scanner)

zoom := 1

output filename prefix := file_name_of_your_choice

END :=

The command to execute this utility is simple as it uses a parameter file that contains all necessary information; hence it looks like the following:

>> FBP3DRP FBP3DRP_parameter_file.par

The sinogram data that is produced by the Siemens scanner is structured into seven segments. The direct segment is called segment 0 in STIR and consists of the 109 non-oblique segments from the Siemens scanner acquisition. The first oblique segments in STIR are called segments 1 and -1 and so on. All seven segments are called in STIR: 0, -1, 1, -2, 2, -3, 3. STIR has a segmentation tools to divide the data of a sinogram into its segments.

The extract_segments utility extracts the segments of the sinogram data and produces templates that are presented as volume or sinogram views. The difference between these two views is due to the different orientations of the axial, coronal, and sagittal views. The sinogram and volume views are explained in the STIR-DevelopersGuide. This tool produces templates containing “.ahv”, “.hv”, and “.v” files for each segment. The extract_segments utility is run with a sinogram data header file as follows:

>> extract_segments projection_data_to_segmentate.hs

The scanner data given in the “.hs” file is processed and the user is asked if the template is to be presented in a volume or sinogram view.

There are many more utilities in STIR. A few examples are manip_projdata for sinogram data and manip_image for volume data that give the user several options to display the data and to manipulate the data in different ways, such as adding a constant or combining volumes (among other operations). There are also STIR utilities to scatter correct and to correct for motion. STIR has utilities to reconstruct from list mode, but as STIR does not support the Siemens list mode format these utilities were not used. Instead sinograms that could be read by STIR were produced from the list mode data outside of STIR. The tools that concerned SPECT were not relevant to this project.

Page 59: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

STIR Version 3.0 | 39

4.5 The General procedure of reconstructing volumes in STIR

The procedure to reconstruct volumes in STIR from data collected in a scanner or from making up geometric objects in STIR is explained in the follow steps:

1. The first step is to construct a STIR Interfile format header that describes the geometry and structure parameters of the detector. This header also specifies the number of segments and the number of slices in each segment. The utility create_projdata_template creates such a header and an empty sinogram data file. It is also possible to write such a header following the STIR recipe for a sinogram header. As the sinogram data file that is produced by the create_projdata_template is empty an empty sinogram file to use with the header can be made.

2. The generate_image utility produces a template of a geometric object described in the parameter file.

3. To generate a sinogram from the template the easiest utility to use is fwdtest. This utility is executed with the header file that is produced by the create_projdata template (or the one made) along with the header file of the volume template.

4. From projection data or sinograms the next step is to reconstruct the volume. To reconstruct volumes that were produced from the generate_image tool in STIR the back_project utility will probably suffice.

In this project, the acquired list mode data was reconstructed into sinogram data files that STIR can read outside of STIR, therefore the image reconstruction procedure is a bit shorter:

1. Make a sinogram header that corresponds correctly to the Siemens scanner and put the name of the sinogram data file on the line that says: name of data file. The files have the endings “.hs” and “.s” (respectively) in STIR.

2. The utility SSRB is used because STIR structures the data differntly compared to the Siemens scanner. This gives rise to a problematic interpretation of the data when STIR is reconstructing images acquired by the Siemens scanner. By running the SSRB utility reconstruction time was also shorter. The SSRB algorithm preserves the data and the resolution in the z axis, but the oblique data is projected into the corresponding direct axial positions according to the user manual. Sinogram data that contains 7 segments is re-binned into 1 segment by the SSRB utility.

3. The last step is to run the preferred reconstruction algorithm. As has already been mentioned, STIR has several reconstruction methods from which to choose. The analytical algorithms are the back_project that does not use filters, FBP2D, and FB3DRP. FBP2D is relatively fast and simple to use, but gives rise to many streak artefacts, as does the FBP3DRP. However, FBP2D might be a good choice for a small object with less activity (such as the syringe experiment). In this project, the iterative reconstruction method OSMAPOSL is used for reconstructions of the data acquired from patients. This produces volumes from data acquired by the Siemens scanner of high quality, but not quite as good as the Siemens scanner itself. The OSMAPOSL algorithm is executed with a parameter file that contains a lot of information; therefore, this method is more complicated than the analytical reconstruction methods.

How the different reconstruction methods and other STIR tools were used for this work will be further discussed in Chapters 5 and 6. This chapter is intended primarily as an introduction to STIR. In the STIR-UsersGuide additional utilities are described (but they were not used in this project). The STIR-DevelopersGuide gives further descriptions of the structure of STIR and how the data is organized internally inside the STIR functions.

Page 60: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

40 | STIR V

4.6

As notedusing th“run_tesgeneraterecon_tescript gestatisticareconstr

If thprogramgeneraterun_teststudy enby the dthe data

The containethese heproducedifferentFigure 4scanner,three seSiemens

Figure 4-2

STIRformat his view swappedInterfile

!INTERF!imaginname oforigina

* The imOSSEMPOSMA

Version 3.0

The Reco

d earlier thehe actual Sst_simulate_e a volumeest_packageenerates an aal noise to ruction algor

he execution ms in STIR wed files ct_simulate_

nabled the undifferent utilia acquired fro

recon test paed the relevaeaders must ed in the rect ways. The

4-2. This sho, which is al

egments ands scanner has

2: Sinogscan

R by default header for thand the valu

d in the Intere format head

FILE := ng modalityf data fileating syste

mage reconst

M, POSMAPOAPOSL and P

on Test Pa

e recon test pSTIR tools _and_recon.e. The para) shows the attenuation c

simulate arithms*.

of run_recoork properly

can be reand_recon.snderstandingities, and whom the Sieme

ackage’s defaant informati

contain thecon_test_pacprojection d

ould be complmost a cylin

d the Interfils seven segm

gram producedner. The axial v

reads sinogrhis is presentue for the marfile file headder that read

y := PT e := name_em := GE D

truction algoOSL and POPOSSEM.

ckage

package is a to ensure

sh” file wasameter file

parameters correction von acquired

on_and_simuy and many fiemoved, bush script coulg of how the hat they contens scanner.

ault scanner ion for this s

informationckage and bdata or sinogpared to the snder (see Figle format he

ments.

d by the recon view is probab

ram data as sted below. Natrix axisder when rea

ds sinogram d

of_data_fiiscovery S

orithms availOSSEM. How

test packagethe proper

s run. The sgenerate_u

of a cylindeolume using

PET image

ulation.hs enfiles with namut were ld be studiedheader files

tain, and to

is a GE Discscanner. To rn correspondby the Siemegrams of thesinogram of

gure 2-4). Theader inform

test package obly not complet

structured byNotice that ths label [2ading the sindata acquired

ile_from_GESTE

lable in STIRwever, the s

e that the STr functionalscript first u

uniform_cyliner – as the the stir_ma

e. The next

nds successfmes of the forsaved for

d in order to are written, successfully

covery STE screconstruct iding to the Sens scanner e GE Discovthe syringe t

he recon testmation is for

of a uniform cyte.

y the GE Disce value for th] is axial

nogram data d in the Siem

E_Discovery

R 3.0 are FBscript tests a

TIR user is ality of STIRuses the gennder.par filtest object. Tth utitlity. Tstep tests

fully without rm my_xxxx

this projfigure out hhow the pardo reconstru

canner. The hmages from Siemens scanalign the sin

very STE scathat was acqt pack produ

a GE Disco

ylinder for a GE

covery STE she key matricoordinatefrom a Siem

mens scanner

y_STE.s

BP2D, FBP3ll of these a

advised to ruR. The shenerate_imagele (includedThe next ste

This utility adall of the

t any errors, x are produceject so th

how STIR worameter files ructions in ST

headers thatthe Siemensnner. The sinogram segm

anner is presquired in the uces a sinogrovery STE, w

E Discovery ST

scanner. Theix axis lae. These two mens scannerr is presented

3DRP, OSMalgorithms ex

un before ell script e tool to

d in the ep in the dds some different

then the ed. These hat the

orks. This are used

TIR with

t are used s scanner inograms ments in sented in Siemens

ram with while the

TE

e Interfile bel [3] must be

r. A STIR d.

MAPOSL, xcept for

Page 61: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

STIR Version 3.0 | 41

!version of keys := STIR3.0 !GENERAL DATA := !GENERAL IMAGE DATA := !type of data := PET imagedata byte order := LITTLEENDIAN !PET STUDY (General) := !PET data type := Emission applied corrections := {None} !number format := float !number of bytes per pixel := 4 number of dimensions := 4 matrix axis label [4] := segment !matrix size [4] := 3 matrix axis label [3] := view !matrix size [3] := 280 matrix axis label [2] := axial coordinate !matrix size [2] := { 22,47,22} matrix axis label [1] := tangential coordinate !matrix size [1] := 329 minimum ring difference per segment := { -2,-1,2} maximum ring difference per segment := { -2,1,2} Scanner parameters:= Scanner type := GE Discovery STE Number of rings := 24 Number of detectors per ring := 560 Inner ring diameter (cm) := 88.62 Average depth of interaction (cm) := 0.84 Distance between rings (cm) := 0.654 Default bin size (cm) := 0.2397 View offset (degrees) := -4.549 Maximum number of non-arc-corrected bins := 329 Default number of arc-corrected bins := 293 Number of blocks per bucket in transaxial direction := 2 Number of blocks per bucket in axial direction := 4 Number of crystals per block in axial direction := 6 Number of crystals per block in transaxial direction := 8 Number of detector layers := 1 Number of crystals per singles unit in axial direction := 1 Number of crystals per singles unit in transaxial direction := 1 end scanner parameters:= effective central bin size (cm) := 0.25329 number of time frames := 1 !END OF INTERFILE :=

All the information from the number of rings to the effective central bin size is scanner specific and determines the geometry of the scanner and ultimately reflects the geometry and proportions of the reconstructed volume. The matrix information determines the coordinate information. The maximum and minimum ring difference gives STIR information about the segmentation of the acquired data. The data from GE Discovery STE scanner has three segments, for which the direct segment is detected in a direct ring or in the adjacent rings on both sides {-1, 0, 1}. This segment is called segment 0 in STIR. The oblique segments which come from detections that differ by two rings {-2, -2} is called the -1 segment and the other that differs by two rings {2, 2} is called the 1 segment.

Page 62: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

42 | STIR V

The uniformiterative

Figure 4-3

4.7

Anothermanipulobjects cdemo2.cparametdemo1.cmodifiedprogram

The diffedemos aSTIR. ThSTIR/STRATPETsmall.hs

BefoSTIR pafile that after thiGQM) an

4.7.1

Details o3.0 is a incorrecmust be the text

>> m

Howchangedmust be

Version 3.0

run_simulam cylinder (gee OSMAPOSL

3: The rOSMA

The Demo

r tool for tlating the pcan be genecxx, demo3.cter files. The cxx reconstrud version of

m demo3.cxx

erent demo pare further dehere are alsoTIR/exampleT that is coms uses as its d

ore the demoackage was co

is found in tis descriptionnd thus the p

Compiling

of the compilbit different

ct. The files replaced witthe following

mkdir –p ..

wever, this pd in the STIR

changed int

ate_and_recoenerated by tL reconstruct

reconstructed APOSL. Left to

o Tests in

testing simuparameter filerated. The ecxx, and demprograms de

ucts a volumf demo1.cxx is modified s

programs shoescribed in Ro two files ce/src directo

mmonly useddata file. Deta

os can be usompiled. Thethe same dirn was writteprograms we

the demos i

lation of the t from earlieextra_dirs.mth the word “g is written:

./src/local

ath is not vaR version 3.0o:

on.sh prograthe generate_tion is presen

uniform cylindo right, the proj

the Exam

ulations andles found inexample/src moPR.par filemo1.cxx, dee by back prwhere the u

so that all pa

ow the user hREADME.txtcalled “smallory. The file sd for laboratoails of the file

ed they musere is a descrectory. Howe

en. This probere successfu

in STIR 3.0

demos are gr versions an

mk and extra“examples” b

l

alid in STIR 0. The correc

am produces_image tool)nted in Figu

der in the reconojection views a

mple Packa

d reconstrucn the STIR/

directory coles. The dememo2.cxx, anrojecting theuser is aske

arameters are

how utilitiest in the STIRl.hs” and “smsmall.hs is thory rats in re small.hs ar

st be compileription of how

wever, some fiblem was unully compiled

given in this nd thereforea_stir_dirs.cbefore the ste

R 3.0 as it refct path is STI

s reconstruct). The resulti

ure 4-3.

n test packageare axial, coron

age

ctions in ST/examples/srontains the dmo.par and nd demo3.cxxe sinogram ded which bace parsed from

and class hieR/STIR/exammall.s”, and he header fil

research andre presented

ed, as this ww to compilefiles and direnderstood and (as describe

section becae the instructcmake must eps given in t

fers to the pIR/STIR/exa

ted images aing volume o

. The reconstrunal, and sagitta

TIR is the rc directory demo files ddemoPM.parx generate voata. The prock projectionm one param

erarchies funmple/src dire

a sinogram le for a smalthe small.s

in Section 4.

was not done e these democtories have d solved by

ed in the next

use it is a bittions in the be opened a

the README

path STIR/STamples/src a

and sinogramof a cylinder

uction methodal.

demo packvarious geo

demo.par, dear files are tholumes. The

ogram demo2n utility to

meter file.

nction in STIectory of the data templall PET scannis an empty

.7.2.

e by default wos in the REA

changed in two of us (M

xt subsection)

t tricky. STIRREADME.txand the worE.txt are exe

TIR/exampleand therefore

ms of the from the

is the

kage. By ometrical emo1.cxx, he “.par” program

2.cxx is a use. The

IR. These installed

ate in the ner called y file that

when the ADME.txt

STIR 3.0 MEN and ).

R version xt file are rd “local” ecuted. In

es that is e the line

Page 63: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

>> m

The utilities directory

>> c

The

>> c

Then

>> m

The

>> m

Thisexecuted

4.7.2

When ththe toolsFirst thewhich tgenerate

>> g

As previparametellipsoidexampleimage.hvdata file

Figure 4-4

mkdir –p ..

next step teand tools cay where the R

d ../../

next comma

cmake

n the exampl

make exampl

last step is t

make instal

s initiates thd when it is f

Running th

he compilatios can be exece small.hs anthe demos we_image utili

generate_im

iously describter file gendal cylinder e 4-1. The gv and an im is the image

4: Projethe gsagit

./../src/lo

ells the useran be executeREADME.tx

and is to reco

les are made

les

o install ever

ll

he installationfinished.

he demos

on has finishcuted). The Rnd small.s fiwill be exeity that is exe

mage genera

bed generaterate_imageand an ellipgenerate_image.v file. Th

e.v file. The g

ections from thgenerate_imagettal view.

ocal

r to go to thed, i.e., the St is, go to thi

onfigure the p

e by the follow

rything inclu

n and compi

hed the demoREADME.txtiles must be cuted. The ecuted with t

ate_image.p

te_image gene.par. The ppsoid (as shomage tool crhe image.hv generated im

he generated voe function and

he built-in-dSTIR/STIR dis directory b

project by en

wing line:

uding the dem

ilation of the

os can be exet contains a scopied fromnext step

the generate_

par

nerates a volparameter fown in Figurreates a temis the heade

mage.hv file is

olume of an ellthe generated

directory. Thdirectory. Froby entering:

ntering:

mos and this

e demos in t

ecuted in thestep by step

m the STIR/eis to gener_image.par f

lume based ufile in the re 4-4). This

mplate consier file and it s displayed as

lipsoid cylinde_image.par file

his is the dirom the STIR

is executed b

the example

e STIR/STIRmanual for e

examples/srcate the temfile as input:

upon the parexample pa

s parameter isting of thrcontains thes File examp

er and a small ee. From the left

STIR Ve

rectory wherR/STIR/exam

by the line:

package tha

R directory (wexecuting thc directory t

mplate by u

rameters givackage gene

file is showree files: ime informationple 4-2.

ellipsoid produt; axial, corona

rsion 3.0 | 43

re all the mples/src

at can be

where all e demos.

to that in using the

ven in the rates an

wn in File mage.ahv, n that its

uced by al, and

Page 64: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

44 | STIR Version 3.0

File example 4-1: The generate_image.par file

generate_image Parameters := The name of the file and that it is a parameter file output filename:=image The name of the body of the output file X output image size (in pixels):=56 Pixel and voxel parameters Y output image size (in pixels):=56 Z output image size (in pixels):=15 X voxel size (in mm):= 2.05941 Y voxel size (in mm):= 2.05941 Z voxel size (in mm) :=3.125 shape type:= ellipsoidal cylinder The geometric parameters of the ellipsoidal cylinder Ellipsoidal Cylinder Parameters:= radius-x (in mm):=40 radius-y (in mm):=20 length-z (in mm):=50 origin (in mm):={30,6,-0.5} END:= value :=1 next shape := The geometric parameters of the small ellipsoid that is the second object. shape type:= ellipsoid Ellipsoid Parameters:= radius-x (in mm):=10 radius-y (in mm):=10 radius-z (in mm):=20 origin (in mm):={20,-8,10} END:= value:=2 END:=

File example 4-2: The image.hv file

!INTERFILE := name of data file := image.v The data file is the image.v !GENERAL DATA := !GENERAL IMAGE DATA := !type of data := PET imagedata byte order := LITTLEENDIAN !PET STUDY (General) := !PET data type := Image process status := Reconstructed !number format := float !number of bytes per pixel := 4 number of dimensions := 3 In STIR headers the number of dimensions for volumes is 3, and for sinograms it is 4 matrix axis label [1] := x !matrix size [1] := 56 scaling factor (mm/pixel) [1] := 2.05941 matrix axis label [2] := y !matrix size [2] := 56 scaling factor (mm/pixel) [2] := 2.05941 matrix axis label [3] := z !matrix size [3] := 15 scaling factor (mm/pixel) [3] := 3.125 first pixel offset (mm) [1] := -57.6635 first pixel offset (mm) [2] := -57.6635 first pixel offset (mm) [3] := 0 number of time frames := 1 !END OF INTERFILE :=

Page 65: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

STIR Version 3.0 | 45

The file small.hs (shown in File example 4-3) contains the information about a small PET scanner called RATPET. The geometric information, such as the inner ring diameter stated as 11.5 cm, indicates a small scanner. The file small.hs indicates that the output data is to be put in the empty small.s file. We can create sinogram data for the template by executing the fwdtest tool with sino small.hs and image,hv as inputs, as follows:

>> fwdtest sino small.hs image.hv File example 4-3: The small.hs file

!INTERFILE := name of data file := small.s originating system := RATPET !GENERAL DATA := !GENERAL IMAGE DATA := !type of data := PET imagedata byte order := LITTLEENDIAN !PET STUDY (General) := !PET data type := Emission applied corrections := {arc correction} !number format := float !number of bytes per pixel := 4 number of dimensions := 4 matrix axis label [4] := segment !matrix size [4] := 3 matrix axis label [3] := view !matrix size [3] := 28 matrix axis label [2] := axial coordinate !matrix size [2] := { 11,15,11} matrix axis label [1] := tangential coordinate !matrix size [1] := 56 minimum ring difference per segment := { -4,-1,2} maximum ring difference per segment := { -2,1,4} number of rings := 8 number of detectors per ring := 112 inner ring diameter (cm) := 11.5 distance between rings (cm) := 0.625 default bin size (cm) := 0.165 number of blocks_per_bucket in axial direction := 1 number of crystals_per_block in axial direction := 8 number of crystals_per_block in transaxial direction := 7 number of detector layers := 1 image scaling factor[1] := 1 data offset in bytes[1] := 0 number of time frames := 1 !END OF INTERFILE :=

This creates a sinogram data file and a header that are named sino.s and sino.hs. The last step is to run the demo1. When demo1 is running the user will be asked for the input file, which is sino.hs. This creates a template called output. The template contains the files output.ahv, output.hv, and output.v. The resulting volume is presented in Figure 4-5. The sinogram data sino.s is presented in Figure 4-6. This sinogram contains all three segments. However, it can be a bit difficult to understand so the STIR tool extract_segments was used to extract segment 0 (i.e., the direct segment) which is shown in Figure 4-7.

Page 66: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

46 | STIR V

Figure 4-5

Figure 4-6

Figure 4-7

The Additionhow to wresultingunderstasinogramno matte

Version 3.0

5: The dand s

6: The dthe a

7: The rviewo

demos werenally, by studwrite parameg volume. Banding of them after execuer the orient

demo1 output Psagittal.

demo sinogram

axial, coronal, a

resulting sinogogram view. Fr

e used for tedying the demeter files to ry changing te parametersuting the SSRation of the i

PET volume. T

m containing aland sagittal.

gram of the demrom the left the

esting the difmos an undereconstruct othe paramets that are repRB tool is prinput sinogra

The projection v

ll three segme

mo volume bye projection vie

fferent tools erstanding waother objectsters in the hpresented in resented. Thiam data.

views as show

nts. The projec

executing the ews are the ax

that were suas gained of h. The parame

header files tthe STIR he

is tool produ

wn from the left

ction views as

extract_segmeial, coronal, an

ubsequently how to use theters in the hthis can be taders. In Fig

uces sinogram

t are the axial,

shown from th

ents function ind sagittal.

y used in thishe different theader files atested to ga

gure 4-8 the ms of this or

coronal,

he left are

n the

s project. tools and affect the

ain better resulting ientation

Page 67: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Figure 4-8

8: The dof thethe p

demo sinograme singram is th

projection data

m of the ellipsohe same after e

input. From th

oid and the cyliexecuting the She left the proje

inder after exeSSRB tool in STection views ar

cuting the SSRTIR no matter wre the coronal,

STIR Ve

RB tool. The orwhat the orien axial, and sag

rsion 3.0 | 47

rientation tation of

gittal view.

Page 68: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 69: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Methodology | 49

5 Methodology

This chapter provides an overview of the research method used in this project. Sections 5.1 and 5.2 describe the research process. Section 5.3 details the research paradigm. Section 5.4 focuses on the data collection techniques used for this research. Section 5.5 describes the experimental design and the test environment with hardware and software tools described in Section 5.6. Section 5.7 explains the techniques used to evaluate the reliability and validity of the data collected. Section 5.8 describes the method used for the data analysis. Finally, Section 5.9 describes the framework selected to evaluate the study.

5.1 Research Process

As described in Section 1.4, this project applies a design science methodology to produce a series of artefacts (embodied in algorithms and realized by software). List mode data from both a phantom and from patients are used to produce sinograms that are subsequently reconstructed into volumes by using STIR. Subsequently these volumes will be viewed as a dynamic cine loop by the physicians treating these patients so that they can perceive the dynamics of the 18F- uptake. The desired final artefact should perform the functions shown in Figure 5-1. However, initially some of the information necessary to directly produce this artefact was missing; hence an iterative research methodology to gain this knowledge was performed. The overall research process is illustrated in Figure 5-2.

Figure 5-1: Flow chart of the final desired artefact

Convert list into sinograms

Reconstruct volumes from sinograms

Display 3D volume set as cine loop superimposed on CT image

list List of time intervals

Page 70: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

50 | Methodology

Figure 5-2: Research Process

5.2 Going from a list mode file to a set of 3D volumes

In order to generate the 3D volumes to be presented in a cine loop the dynamic list mode data file is discussed first. The first problem encountered is that either the Siemens Wizard workstation has to be used to reconstruct volumes with specific time intervals or some sort of software to do this on another computer is required. Unfortunately, the first alternative would occupy the Wizard workstation that is being used by the clinical staff to reconstruct the clinical studies being collected each day. In addition, utilizing the second alternative allows post processing the data at any time and enables reconstructions independent of the scanner, which can be of interest for other studies. It seemed that STIR would provide a good basis for the reconstruction needed in this project, but the problem remains of how to take the Siemens list mode data and get it into the STIR reconstruction programs.

With the parselist” program it was possible to produce a sinogram accepted by STIR. By studying the statistics of different tags and trying many permutations of the tags, it was found from the prompt and delayed events that the radius was the fastest running index, followed by the angle, and then the segments. The “parselist” program was extended so that it would extract sinograms from the list based upon time intervals of the user’s choice. Additionally, a program “fracdecimatelist” was written by GQM that fractionates the list in user selected fractional rates. If the user wishes to simulate half the injected activity the user gives the program the fraction 0.5 and it can either remove every other event in the list or statistically remove each event with a probability of 50%.

By comparing the information in the Siemens scanner produced header files with information in STIR header files and an iterative trial and error method beginning with the syringe and NEMA phantom data sets the parameters of the header files were translated from Siemens to STIR. Before moving on to actual patient acquisitions, the feasibility of STIR reconstructing volumes from sinograms acquired in the Siemens scanner was demonstrated. As a result the goal to reconstruct volumes in STIR from the list mode data acquired by the Siemens scanner was completed. In addition, the sinograms derived from list mode data files that simulated decreased injected activity could also be reconstructed in STIR.

Understand structure of STIR sinograms

Understand structure of Siemens list mode

Reconstruct Sinograms that STIR accepts

Use patient acquisition and reconstruct volumes using the STIR tools

Segment the 45 minute list into one minute segments

Reconstruct in STIR and Siemens work station to compare image quality

Exclude events in list to simulate a decrease in

injected activity

Page 71: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Methodology | 51

5.2.1 Generating Sinograms and Volumes from the a List Mode Data of a NEMA Phantom

Cathrine Jonsson suggested that collecting list mode data for a NEMA phantom using the Siemens scanner was a good way to begin as the phantom has a simple geometry and thus it was expected that it would be easy to recognize the patterns in its sinogram. Or at least much easier than recognizing patterns in the sinograms acquired from patients with broken bones (due to the complexity of these sinograms). Based upon the set of bins occupied in the list mode data set from the phantom it was expected that it should be possible to understand the unknown mapping function of the bin indices in the list to the angle, radius, and segment coordinates of each LOR. Moreover, if a mapping function is correct, then the volume that is reconstructed from the list would correctly show the NEMA phantom! A flowchart of this process of realizing the decoding of the list mode data is presented in Figure 5-3.

Figure 5-3: A flowchart of the research process steps to produce sinograms of the list mode data.

The work with reconstructing volumes in STIR of the NEMA phantom acquisition turned out to be more cumbersome than expected and its sinogram was quite complex, therefore an acquisition of an even simpler object with low activity was necessary, thus list mode data was acquired for a syringe. A syringe is approximately a small cylinder; hence the sinogram is the well-known 180º sinus curve. From iterative tests of the syringe acquisition it was finally understood how to reconstruct in STIR the sinograms from the list. The necessary manipulations of the STIR header files were made, thus programming skills in C++ were not required to solve this problem.

The PET list mode acquisition of the NEMA phantom used an acquisition time of 45 minutes, which is the same protocol used for the clinical acquisition of the volumes of patients. The Siemens Wizard workstation was used to reconstruct this data using 1 minute time intervals. The list mode data for each time interval was converted into a sinogram that could be reconstructed into a volume. When all 45 volumes had been reconstructed they could be viewed as a cine loop. Framing the list into 1 minute time frames was a starting point to create an initial series of 3D volumes that could be viewed. The sinograms produced by the Siemens Wizard workstation also produced volumes with which to compare the output of STIR.

5.2.2 The Recon_test_pack in STIR

The recon_test_pack was described in Section 4.6. The purpose of this package is to test the tools and reconstruction algorithms available in STIR. The package contains some scripts for the STIR user to execute. By default these programs use the GE Discovery STE scanner. The files in the recon test package and the script called run_recon_and_simulate.sh were examined. These scripts were useful to gain an understanding of how to use STIR tools, how to write parameter files, and for many other things that were essential for the further use of STIR.

An important feature to learn was to properly understand the data files and the headers that STIR makes by default. The example shown in Figure 5-4 helped in understanding the difference between the data and header files expected by STIR and the data and header files produced by the program

list

Acquire CT and PET scan of NEMA Phantom and the syringe

Use Wizard to generate sinogramsUse “parselist” program to generate sinograms

Page 72: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

52 | Method

describenecessarsolve thneeding

Figure 5-4

AddThese w

5.2.3

The demto gain k

As descrsimple reconstrand indi

Aftedata acqtwo alteprogramthe first then alsdocumenwas deci

Boththe inforsinogramformat. into sino

Unfonot a simthere ar4.2 of thindex inthe restdocumenthis info

Fortseveral p

dology

ed earlier thary to translate problem oto modify ST

4: The 3progrthe S

ditional tests were studied t

Examples

mo programsknowledge of

ribed in Sectgeometric d

ructed into a icated how S

er studying thquired from ernatives: (1)

m to read the of these alte

so to undersntation abouided to explo

h alternativermation aboms. AdditionHowever, inograms that S

ortunately, tmple matter e not enoughhe PETLINK

nto these 30 bt of the infontation does

ormation.

tunately accepatients), (2

at produced te the heade

of the differeTIR.

3D sinogram ofram. Notice tha

Siemens scann

are availablto gain furthe

s and the De

that are fouf the relevant

tion 4.2 one description volume. CarTIR might b

he Siemen lisa syringe (to) create a Slist and simpernatives it wstand how tut how to wrore the secon

es required gout the scannnally, both a the second aSTIR can pro

the encodingas there are

h bits to direK document bits. This me

ormation abos not give th

ess was avail) sinograms

sinograms fer files from ent structure

f the uniform cat the alignmener.

e in STIR, suer knowledge

mo Tests

und in the exat STIR progr

of the STIR to a simula

refully examie used to ach

st mode datao simplify thSiemens list ply generate would be neo make a nite a new list

nd of these alt

generating anner that STIRalternatives alternative, oocess would b

g of the infore only 30 bitectly encode[25], the ap

eans that theout an LOR e details of t

lable to (1) thcomputed fr

from the Siethe Siemens

e of the data

cylinder producnt of the segm

uch as the dee of STIR.

amples/src frams

test scripts ated sinogrining this scrhieve the goa

a acquired frhe acquired d

mode readisinograms t

ecessary to unew list mod

t mode readternatives.

n Interfile foR needs in or

required thonly a stand-be needed.

rmation abouts available te the informapproach that ere is a mapp

R that maps this mappin

he list modefrom this list

emens list ms scanner to

a by manipul

ced by executients is differen

emo tests us

folder and de

was used to am and theript helped inals described

rom a NEMAdata even furing package hat could benderstand th

de reading rer for STIR,

ormat headerder to be ab

he understan-alone progra

ut which twoto encode thation about t

is used is toping function

it to an indg function; h

data from at mode data

mode data. Ththe correct

lating the ST

ng the run_simnt from the sino

sed in the fol

escribed in S

learn how Sen how thin understandin Section 1.

A phantom anrther), it seefor STIR orused by STI

he Siemens loutine for Sand the code

er for the sinble to do thending of theam that conv

o detectors his informatiothe LOR. As o bin the da

n that takes tdex. Unfortuhence, it was

a syringe, a Nby the Siem

his led to thSTIR header

TIR headers,

mulate_and_reograms produ

llowing secti

Section 4.7, w

STIR could gis sinogramding how ST.3.

nd later the lemed that thr (2) use a

IR. In order tlist mode forSTIR. As thede is written i

nogram that e reconstructe Siemens liverts the Siem

have a coincon. The resudescribed in

ata and placethe angle, radunately, the s necessary

NEMA phantmens Wizard,

he insight rs and to , without

con.sh ced by

ion 5.2.3.

were used

go from a can be

IR works

list mode here were

separate to pursue rmat and ere is no in C++ it

contains tion from ist mode mens list

cidence is ult is that n Section e the bin dius, and Siemens to derive

tom (and , (3) how

Page 73: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Methodology | 53

the STIR simulation program produces LORs and generates a sinogram could be examined, and (4) constructed sinograms could be used with STIR to reconstruct a volume, and then view the result using the locally developed software tools.

Once the sinograms generated from Siemens list mode data of the syringe and NEMA phantom could be successfully processed and correctly reconstructed by the STIR tools, then the same process can be used to generate sinograms and reconstruction volumes from clinical patient data. The STIR reconstructed volumes were compared with those reconstructed by the Siemens workstation of the same acquisition data in order to ensure that the geometry is the same in both reconstructions. Thus the solution of swapping the labels of two of the axes was verified.

5.2.4 Generating a Sinogram from the List based on appropriate Time Intervals

The list mode data of clinical patients’ needs to be divided into suitable time intervals, converted to sinograms, and reconstructed by the STIR tools to generate 3D volumes. An important task was to understand what the “suitable” time intervals that would give rise to cine loops of good image quality and that could be superimposed on a CT slice were. There are two components to this work: (1) determining what makes a “suitable” time interval and (2) actually generating the sinograms from the list for the selected time intervals. Figure 5-5 shows the over-all process of generating the sinograms from the specified time intervals. Volumes reconstructions from one minute segments were shown to be suitable, but other durations were not tested, and the selection of the time interval remains to be optimized.

Figure 5-5: Flow chart to generate sinograms from the Siemens full list and then divide the list into time intervals.

5.2.5 Displaying the cine loop superimposed on the CT slice

Once sinograms that STIR could read were produced, these could be reconstructed using one of the reconstruction algorithms implemented by STIR. Then the resulting 3D volumes (projected into slices) could be superimposed on the CT slices using an extension to- our software tool. This step in the research process is summarized in Figure 5-6.

Figure 5-6: Flow chart of reconstructing the volumes and displaying them as a cine loop

Convert list into sinograms

Reconstruct volume from sinograms

list List of time intervals

Reconstruct volume from sinograms

Display 3D set projected into slices as cine loop superimposed on a CT slice in software tool

Page 74: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

54 | Methodology

5.2.6 Simulating reduced injected activities

To study how much the injected activity* could be reduced; a study was simulated with a lower injected activity by excluding a certain fraction of events from the list mode file. Figure 5-7 shows how an event dropping process could be introduced. The rest of the processing would remain unchanged, but some information in the DICOM header has to be changed to reflect the change in the number of remaining events when the reduced list is reconstructed by the Siemens workstation. In STIR, the reduced sinograms were read and reconstructed without any change in the STIR header file.

Figure 5-7: Simulating reduced injected activities by dropping some events and then completing the rest of the processing

* As a side effect also reducing the radiation dose to patient

Convert list into sinograms

Reconstruct volume from sinograms

Display 3D set projected into slices as cine loop superimposed on a CT slice

list

List of time intervals Events dropping process

Page 75: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Methodology | 55

5.3 Research Paradigm

As noted in Section 1.4 this project combines both quantitative and qualitative research paradigms. There are two main aspects of the application of the quantitative paradigm in this project: (1) creation of 3D volume sets from the list mode data and (2) evaluation of the effects of reducing the injected activity. Most of the aspects of the first of these have been addressed in Section 5.2. For this reason, the second aspect is examined in this section.

In PET imaging a radionuclide is injected into the patient and this radionuclide is distributed throughout the body. While a great deal of this radionuclide is taken up in the remodeling bone, some is also taken up by normal bone (as it also is continuously undergoing bone remodeling), and some is being eliminated from the body (hence there is some amount of the radionuclide in the bladder). It is highly desirable that the effective dose to the patient be as low as reasonably achievable, while the activity must be sufficiently large to achieve the desired benefit to the patient. The expected outcome is that a dynamic visualization could lead to a reduced effective dose to these patients. This dynamic visualization, using cine loops should facilitate the viewer’s understanding of the spatial-temporal uptake of the 18F-. As described in Section 5.2.6 the ability to transform the list mode data files to produce a series of data sets with different fractions of the actual injected can be exploited.

The current CT and static PET scanning technique is not used for children and young patients, as there is a relatively high radiation dose to the patient. Moreover, for monitoring purposes these procedures should be repeated several times over the course of the patient’s treatment. 18F- has been shown to be taken up in the remodeling bones of children and has been used previously to assess fractures of bone in children [11]. Moreover, in children and young patients all of their bones are remodeling, hence one could argue that there is more uptake spread through the patient’s body, unlike the case for an adult where the major uptake will be at the sight of the broken bone. A study has shown that 18F- is an option to monitor fractures in children and young adults [20]. Injected activity administered to children has also been studied for example in [26].

There is also a qualitative aspect to this research as the resulting volumes will be superimposed on the CT, then viewed as a cine loop by the physicians treating these patients. There is a need to perform a qualitative assessment of whether this cine display actually enables these physicians to better perceive the dynamics of the 18F- uptake (note that this perception is both in terms of spatial distribution and time activity of this spatial uptake).

5.4 Data Collection

The data that was collected for reconstruction consists of an acquisition of a NEMA phantom, a syringe, and several actual patients’ list mode data sets. Several patient data acquisitions were selected from those patients with different diagnosis who were being treated with a TSF. These patients were chosen to investigate the applicability of this visualization method for different types of TSF patients.

The acquisition parameters were the same for each of the patients. The list mode acquisition was used (separately) for diagnostic purposes. This implies that the technique developed in this project could potentially be a complementary tool to give the physician additional information (from the same data that is already collected). However, there is a greater amount of processing required for this technique as the list needs to be divided into a moderately large number of time intervals and the sinogram from each of these time intervals needs to be reconstructed. The technique can also consume more disk storage as a cine loop that contains many volumes takes up more storage space than one volume.

5.4.1 Sampling

The remodeling bone were acquired and saved in list mode and subsequently were used for clinical purposes using the current static PET procedures, but as the data were acquired (and saved) in list

Page 76: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

56 | Methodology

mode they can also be used for dynamic visualization. This means that there was no extra acquisition necessary and therefore no change in the effective dose for the patients. There was also no effect on the patient, the static image quality, or reconstruction method used for the clinical volumes. The patients that were chosen for this project had different diagnoses as presented in Table 5-1.

Table 5-1: The diagnoses of the patients for which the list mode data was reconstructed.

Patient number Diagnosis

Patient 11: Arthodesis

Patient 12: Left Osteotomy

Patient 18: Fracture

Patient 9: Pseudoarthosis

Patient 2: Fracture

5.4.2 Sample Size

Cine loops were produced for patients 11 and 18 to show to the physicians in order to gather their opinion of the benefits of such a cine loop in terms of their ability to diagnose/monitor these patients. The list mode data of the first four patients was used to study the simulated impact of reduced injected activity on the quality of the STIR reconstructed images. Two patients, patient 11 and 18 were used to compare the quality of STIR reconstructions and reconstructions made by the Siemens workstation with both reduced and unreduced injected activity.

The size of the sample is small but sufficient for the aim of this project which was to show a proof of concept of a cine loop for a dynamic visualization of TSF patients and to present some examples of this technique to physicians for their opinion as to the usefulness of this technique. Statistically optimizing the time intervals and deeper analysis of how much the injected activity could be decreased remain for future work.

5.4.3 Target Population

This study concerns TSF patients and the expectation is that this is beneficial for them as an improvement of the current diagnostic tool. This technique could also be beneficial for other dynamic patient studies as a technique to visualize the spatial-temporal uptake of a radioactive tracer.

The technique of decimating the events in the list to simulate decreased injected activity could be done for any acquisition that has been saved in list mode. The technique is ready to be tested on any list mode acquisition from the Siemens scanner. The technique is not patient or radionuclide specific. To be able to use this technique on acquisitions for other scanners additional work has to be done to decode the list mode data of the particular machine and to enable STIR to reconstruct volumes from the scanner specific data. This would be interesting as the Siemens scanner that was used in this project does not have TOF or PSF (as can be found in newer PET scanners).

5.5 Experimental design/Planned Measurements

Acquisitions of simple objects were done to help in the process of decoding the Siemens list mode data. The list mode data was decoded by iteratively comparing the LOR response with the response computed by the Siemens scanner.

These simple objects were also used to help enable STIR to reconstruct projection data acquired by the Siemens scanner. The Siemens workstation was used to reconstruct images to compare the geometry and quality of the volumes reconstructed in STIR.

Page 77: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Methodology | 57

The patient acquisitions were used to construct a cine loop by reconstructing volumes from a sequence of time intervals and displaying the resulting projection slices in time order. The acquisition parameters of the patient data collected in list mode were the same as those used for current clinical purposes. The volumes used for diagnostic purposes were simply static PET volumes reconstructed from the same data as the dynamic data presented in this project.

5.6 Test Environment and Hardware/Software Tools

The PET/CT acquisitions followed the TSF patient protocol described in Section 2.9. The NEMA phantom and the syringe acquisitions are described in Sections 2.7, 6.1and 6.2 1. The list mode raw data and constructed sinograms and the Siemens workstation reconstructions of the acquired volumes were send to the HERMES system to be stored and from there, transferred to a separate workstation.

STIR was downloaded and installed, as described in Chapter 4. How to use STIR and how to enable STIR to read the data acquired by the Siemens scanner are described in the same chapter. All manipulations to enable STIR to read the sinograms were made by changes to the header and parameter files.

The reconstructed volumes and projected slices were displayed using our software tool. Volumes can also be displayed using STIR, but our tool has registration applications that enable the PET to be superimposed on the CT (even for volumes that have been acquired at different times).

5.7 Assessing reliability and validity of the data collected

The validation of the technique developed in this project begins by comparing the quality of the STIR reconstructed volumes with those reconstructed by the Siemens scanner or workstation (see Section 6.4.3).

An evaluation is made of the possible decrease in injected activity by comparing volumes for which the decrease in injected activity is simulated. This evaluation is presented in Section 6.4.1.

The idea of the cine loop is tested by showing it to physicians who regularly diagnoses patients being treated with TSF. Their opinion is used to evaluation the value of the cine loop. The expected future use of the cine loop is a complementary tool, as both the current and proposed techniques derived their volumes from the same list mode acquisition.

The validity of the evaluations will indicate if the developments explored in this project are improvements and whether this work is of interest, and hence should be continued. The work to statistically establish different parameters regarding the optimal reconstruction method and its parameters in STIR, the precise determination of what decrease in injected activity is possible without compromising the image quality, and the best time intervals to use for the list mode data to produce a smooth cine loop without compromising the image quality remain as future work.

An evaluation of the cine loop by physicians who have experience with the current static PET volumes on this group of patients will be a qualitative comparison of the findings possible via a reconstructed loop with the current static reconstruction method and use of SUVs. This would give an indication of the potential advantages the cine loop presents and whether the work ought to be continued. The reliability of these answers is assumed to be sufficient to determine whether these efforts should continue.

The future work to perform a validation study with statistics will require more physicians and many more patient cases as input data. The test should also take into consideration that the cine loop is intended to be complementary to the current static method and SUVs technique.

The reconstructions in STIR might be improved. The current reconstruction method was chosen because the images it produces were considered of a sufficient quality for the purpose of testing a new technique. The volumes in STIR are not scatter or attenuation corrected. The iterative OSMAPOSL

Page 78: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

58 | Methodology

algorithm gave rise to the best volumes in this project, but the parameter file consists of many parameters and a sensitivity map could potentially be used to optimize the resulting volume. Also left for future work are tests of the required and achievable image quality when using STIR for reconstructions.

5.8 Planned Data Analysis

The data analysis that is within the scope of this project concerns the realization of a cine loop. Comparing analysis of sinograms and volumes constructed from the decoded list mode data and projection data serves to ensure the decoding is valid. The quality of the volumes reconstructed in STIR was compared to the volumes reconstructed by the Siemens work station of the same acquisitions. The list mode data is to be divided into shorter time intervals to extract the sinograms to use for reconstruction of volumes for the cine loop. The decoded list mode data will also be fractioned event by event to simulate decreased injected activity of certain fractions.

5.8.1 Data Analysis Technique

The decoding of the list mode data was monitored by analyzing the statistics of the tags from which the different events could be identified. Some information such as gating was expected to be 0. The number of prompt and delayed events was expected to be large (depending on the activity). The time tags were expected to result in markers spread though the 45 minutes’ worth of events. The coordinates of the LOR of the detected events was determined by studying and comparing the statistics of the detected events in terms of LORs produced by the decoded list mode data compared with the statistics of the acquisition according to the Siemens scanner. The pixel values of the projection data were studied by comparing the sinograms produced from the Siemens list mode interpreter and the sinograms produced by the Siemens scanner and workstation. The evaluation to determine the validity of the decoding was also done by comparing volumes of the same acquisitions reconstructed from sinograms produced using the decoded list and those reconstructed directly in the Siemens workstation. If the coordinates are confused this will appear in the sinogram and the reconstructed volume.

The determination of whether the reconstructions of the list mode data using STIR was acceptable, was made by comparing volumes reconstructed in STIR with volumes reconstructed by the Siemens workstation. It was obvious in the volumes when the coordinates were correct. Fine tuning of scanner geometry information in the STIR headers relies on the information extracted from the DICOM or PTD files that the Siemens scanner produces. The reconstruction method analysis is based on testing FBP2D, FBP3DRP, and OSMAPOSL. OSMAPOSL gives rise to less artefacts and better image quality.

The decrease in injected activity is tested by retaining different fractions of the events to see at what point a decrease is no longer possible. The purpose is not to state an exact decrease, but simply to illustrate the potential of this technique.

5.8.2 Software Tools

The STIR software is described in Chapter 4 and the Siemens scanner is described in Chapter 3. Our software tool was used to display all volumes. This software is briefly described in Section 2.6. The programs to decode and decimate the list mode data are written in C and the information necessary to compile these programs is given in the source. The “parselist” program that decodes the list mode data and produces sinograms is presented in Appendix A. The program to perform the list decimation is presented in Appendix D.

Page 79: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Methodology | 59

5.9 Evaluation framework

Evaluations are done of STIR reconstructions and the cine loop. They will serve to determine whether to pursue the work of presenting the PET data from this patient group with a cine loop and testing the use of STIR as an alternative method to reconstruct volumes. The evaluation of the work of the cine loop technique is to determine whether this technique gives the physicians useful additional information. The framework is based upon a demonstration to a small number of physicians who will give their opinion. The evaluation of the ability of reconstructing in STIR is done by comparing volumes reconstructed in STIR with volumes reconstructed by the Siemens workstation. The quality is expected to be better for the volumes reconstructed by the Siemens workstation itself, as the data is acquired in that machine and the vendor has the most information about their PET scanner’s geometry and other characteristics. However, an evaluation is done to determine the potential use of STIR for testing purposes.

The evaluations of STIR will determine whether STIR is sufficiently good enough to be of use for the purposes of this work. If further work is done with the reconstruction method OMAPOSL, it is quite probable that the quality can be improved. The proportions of the volumes must be the same in both the STIR and Siemens reconstructions. There must not be too many artefacts in the STIR reconstructed volumes.

Page 80: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 81: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

6 Ex

A set of by lookiwith theprovidedsuccessfmode dasyringe files, andthe progand expdescribe

6.1

The purpin the rewith a w

A NEPET scaquality aradionucsphere othe spheper unitnumber was waradionucshieldin

Figure 6-1

The considerto ensur

xecuted E

experimentsng at the sta

e sinograms pd simple imful. The sameata compatibexperiment d parameter

grams run ineriments is d

ed in Section

The NEMA

pose of perfoeconstructio

well-known ge

EMA phantoanner (as shoand the six sclide (to proone can see ieres were fillt volume) to of volumes w

ater to whicclide (18F-) ag appropriat

1: The dphan

total activitred a sufficiere that the sp

Experim

s were conduatistics of theproduced fro

mage data, se acquisitionble with STIR

is describedr files in the n the test; thu

detailed in S6.4.

A phantom

orming a dynn experimeneometry, and

om of 9.7 liteown in Figuspheres are ovide a sourcin the acquirled with a hig

provide a bwith high upch fluorodeoas the Na18Fte for the ene

dry NEMA phanntom being sca

ty at the staent amount. Tpheres could

ents

ucted to learne different ta

om the decodso that it wns were used R. The NEMAd in Sections

STIR recon us learning hSection 6.3. T

m experim

namic list mnts. The NEMd it is easy to

ers with six spre 6-1). Suchempty, whilece of activityred image, thgher activity

background aptake. The sooxyglucose (F- solution. Tergy of this ra

ntom before beanned in the Sie

rt of the acqThe backgro

d be properly

n the structuags and comded list. The

was visually to find out h

A phantom es 2.7 and 6.2test pack an

how the STIRThis lead to

ment

mode acquisitMA phantomo recognize.

pheres of difh a NEMA pe the phantoy). The sphehe better they than the resand to simul

olution used t(C6H1118FO5) The FDG soadionuclide.

eing filled withemens PET sc

quisition waound to sphey seen in the

ure of the listmparing the S

NEMA phaneasy to rec

how to makeexperiment is2. As describnd its demos R tools work

the OSMAP

tion of a NEMm is a simple

fferent diamephantom is uom is filled weres are of de image qualist of the phalate a TSF pto fill the sph

(18F-FDG) olution was h

water and FDGanner in the cl

as approximare activity rae image. Thi

mode data. Siemens recontom and thecognize whene the sinograms described ibed earlier th

were studied. The implemOSL reconst

MA phantome (compared

eters was scausually usedwith water a

different size ity. Howeverntom (which

patient whereheres and the

was addedhandled with

G to the left aninic to the righ

ately 53 MBqatio was chosis was achiev

Executed Expe

The list wasonstructed sie syringe acqn the decodms from Siemin Section 6.1he programsd to underst

mentation of truction algo

m was to use d to a patient

anned in thed to determinand some β+ e and the smr, for this exph had a lowee there are ae rest of the p

d. This is thh syringes w

nd the filled NEht.

q, but 44.9 Msen to be oneved by mixin

eriments | 61

decoded inograms quisitions ding was mens list 1 and the s, header tand how f the tests orithm as

this data t) object,

Siemens ne image emitting

maller the periment

er activity a smaller phantom he same with lead

EMA

MBq was e to eight ng all the

Page 82: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

62 | Execute

water inthe wate

The the phanwas ther

Table 6-1:

Tim

Con

Pha

Tota

Acti

Tota

Tota

The dimensiPET acqacquisitisegmentsets expmm Gaufor the imnon-atteprojectioproducethe coroscanner.for the reconstr

Figure 6-2

ed Experiments

n the phantomer that was in

actual start ntom at 16:0refore 44.9 M

: Activ

me between

ncentration

antom volu

al backgrou

ivity correc

al activity i

al activity a

acquisition ons of a hum

quisition. Thion was finist a sinogram ectation max

ussian filter wmaging recoenuation coron views in

ed by the Siemonal and sagi. All of the dexperiments

ructs were m

2: Projescan

m with 1/8 onjected into t

of the acqui05 was 63.5 MMBq. Table 6

vity correction

n injection a

n of activity

ume, sphere

und activit

ction

injected int

at the start

list mode pman torso. Thhe time of thshed the collwas reconst

ximum) withwas applied.nstructions urrected voluFigure 6-3.

mens scanneittal views. Tata was saves to unders

made as soon

ections from a ner. From the

of the activitthe spheres.

sition was 17MBq. The re-1 shows the

and start of

y

es excluded

ty in the ph

to the phan

of acquisit

protocol callhe program e PET acquilected data wructed. The r

h 4 iterations. All the imaused for the

umes are prFigure 6-4

er. Note the sThe black diaed to the Hertand the lisas the segme

one minute seleft: the axial, c

ty in the sph

7:00 and theesulting actue activity corr

f acquisitio

d

hantom

ntom

tion

led “torso” wcollected a t

isition was 4was segmentreconstructios and 8 subs

age reconstruclinical TSF

resented inshow the siseven layers

amond patterrmes archivest mode datents sinogram

egment, non-attcoronal, and s

heres. The re

e activity thatal total activrection in det

on

was chosen topogram, an45 minutes ated into one on algorithmsets. The imauction param

patients. ThFigure 6-2

nograms of (“segments”

rn is due to t system fromta. The volums were reco

tenuation voluagittal views.

est of the act

t was measuvity at the statail.

41 minu

5.3 kBq

9652 ml

51155.6

66233.6

63500 k

44900 k

as the NEMn attenuationand the list w

minute segmm used was thage matrix w

meters were che projection

and the atthe NEMA p

”) of the sinothe gaps betw

m where it waumes that thonstructed.

me reconstruc

tivity was mi

ured and injeart of the ac

utes

q/ml

ml

kBq

618 kBq

kBq

kBq

MA phantomn CT, and a lwas saved. Wments and frhe OSEM2D

was 168 x 168chosen to be

n views from ttenuation cphantom ac

ograms can bween the rinas retrieved he Siemens

cted by the Sie

ixed with

ected into cquisition

m has the list mode

When the rom each (ordered

8 and a 5 e same as resulting corrected cquisition be seen in ngs in the and used

scanner

mens

Page 83: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Figure 6-3

Figure 6-4

The to compreconstrunderstotool in S

Figure 6-5

The STpresentewhich sthe OS

3: ProjeSiem

4: Projescanviews

primary usepare them wructing the ood and are

STIR is used.

5: Proje orienprojesagit

TIR reconsed in Figureshows the it

SEM algori

ections from a

mens scanner. F

ections from thner. The sinogs.

e of the imagwith volumes

same volumcorrect. The

ections of the sntation is changection data whettal stay remain

tructed imae 6-6 whichterative OSithm and g

one minute seFrom the left: t

he one minute sgram was expo

ges of the NEthat are rec

mes. This ene sinogram s

sinogram of theged after the Sen reconstructns, but it is rota

ages of theh shows the SMAPOSL rgives rise t

egment, attenuathe axial, coron

sinogram of thrted as a DICO

EMA phantoconstructed

nsures that shown in Fig

e NEMA phantSSRB tool is usting volumes. Tated 90º.

e NEMA presult of usreconstructto images

ation correctional, and sagitta

he NEMA phantOM file. From th

om reconstruby STIR to the parame

gure 6-5 is fr

om after usingsed, which is thThe axial and c

phantom frsing FBP2Dion. The Oof better

on volume recoal views.

tom acquisitionhe left: the axia

ucted in the Scheck that t

eters of the rom one seg

g the SSRB toohe STIR defaultcoronal views a

rom the SSD reconstruc

SMAPOSLquality com

Executed Expe

onstructed by t

n produced theal, coronal, and

Siemens scanthe STIR soSTIR head

gment after t

ol in STIR. Notict orientation toare swapped. T

SRB sinogction and FigL is developmpared to

eriments | 63

the

e Siemens d sagittal

nner was ftware is ers were the SSRB

ce that theo read the The

ram are gure 6-7

ped from FBP2D

Page 84: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

64 | Execute

reconstrthe Siem

Figure 6-6

Figure 6-7

The volvolumestation; phantomtranslatsymmettranslatsubsequ

volumetool useSiemenof patiefor bothimplies

ed Experiments

ruction. Homens scanne

6: Projefrom distoSiem

7: Projeimproright)

lumes that aes are reflec

see Figurem was recoes the DICOtry as the Ned by this uently recon

The list moe in STIR bed was the

ns work statient 2 was inh the STIR

that no r

owever, theser.

ections from thgenerated fro

orts the imagemens. From the

ections from thoved compare) compared to

are reconstructed compare 6-2 and Fonstructed frOM was th

NEMA phanprogram a

nstructed in

ode data of by the samee OSMAPOion is prese

n the right leand the Sie

reflection h

se images a

he analytical Fm the list mod

e. The STIR releft: the axial,

he iterative OSd to the FBP2the Siemens. F

ucted in STred to the vigure 6-3. T

from the .PTe reason forntom had toand then bSTIR.

patient 2 we procedureOSL. The reented as axiaeg. The fracemens workhas occurre

are still poo

BP2D volume de data produceconstructed vcoronal, and s

SMAPOSL recoD method. TheFrom the left: t

TIR are presvolume thatThe reason TD file it hr this. Anot

o be reconstby the “par

was in a PTDes as the NEeconstructeal slices in Fcture is corrkstation recod in this v

orer than th

reconstructionced by the Siemvolume is reflsagittal views.

onstruction in e STIR reconstthe axial, coron

ented in Figt was reconfor this is

had to be uther volumetructed fromrselist” pro

D file. ThisEMA phantd volume oFigure 6-8.rectly visibonstructionvolume. To

e reconstruc

n in STIR on thmens scannerected (left to

STIR. Notice ttructed volumenal, and sagitta

gure 6-6 andnstructed in not known

understood ie which didm a Siemensgram to co

was used ftom. The reof patient 2It was knowle on the les as seen ino understan

uctions prod

he SSRB projer. Notice that th

right) compar

that the imagee is still reflecal views.

d Figure 6-7n the Siemen but as theif the progr

d not have ts PTD file tonstruct sin

for reconstreconstructio2 in STIR wn that the

eft in the axn Figure 6-8nd further

duced by

ection data he artefact red to the

e quality is ted (left to

7. Those ns work NEMA ram that he same that was nograms

ructing a on STIR and the fracture

xial view 8, which what is

Page 85: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

happeniSSRB p

Figure 6-8

In Fto the chsame wasame orreflectioprogram

Figure 6-9

ing, the sinprogram we

8: AxialSTIR whicthat t

Figure 6-9 anhange in orieay as the NEMrientation be

on of the NEm.

9: The sFrom

nograms foere examine

l projections frto the left and

h occurred in tthe fracture wa

nd Figure 6-1entation of tMA phantomefore and af

EMA phantom

sinogram of pam the left: the ax

r both the d.

rom the volumd by the Siemethe STIR reconas to the left in

10 a sinogramthe sinogramm is. The sinofter the SSRm is not du

atient 2 data exxial, coronal, a

Siemens w

e data of Patiens work statio

nstruction of th the axial view

m of patient ms in STIR. Tograms of thRB tool in Sue to the SSR

xtracted from thand sagittal vie

workstation

ent 2, reconstron to the right. he NEMA phant, which is true

2 is presenteThe sinogram

he patient 2 aSTIR was apRB tool in S

he .PTD file witews.

and STIR

ucted by usingThe purpose istom but is not for both the ST

ed to study ifm for Patientand the NEMpplied, whic

STIR or our

th 7 segments,

Executed Expe

after apply

g the OSMAPOs to study the seen here. It wTIR and Sieme

f the reflectiot 2 is reflect

MA phantom ch indicates

DICOM inte

, notice the ori

eriments | 65

ying the

OSL tool in reflection,

was known ens view.

on is due ed in the show the that the

erpreting

ientation.

Page 86: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

66 | Execute

Figure 6-1

An eThis behreconstrThe sinodoes notis that th

6.2

The proand a lisexpectedactivity phantomlist used

Fredreconstrattenuat(5x1), fiv

The the FDGvolume oSiemensreconstrsimilar t

The an inter“.IMG”)Interfilewas one

The pixel. Thbytes, bodocumenSTIR wifurther tthe syrin

ed Experiments

10: The sthe orotate

explanation havior of refruction algorogram from t have informhe reflection

The Syrin

cedure of mst from an ed to help thewas necessa

m as a DICOd the Siemens

dric Brolin ructions madtion correcteve images at

syringe was G in the syriof 10.2 ml. Ts scanner wiructed volumto the syringe

data that corfile header . The Interf

e format headof the two m

data in the he data in thoth little endntation that ll be able to translation onge is explain

same sinogramorientation. Theed 90º. This is

might be thaflection has rithms could such an acq

mation of whhappens in S

nge Experi

making STIR even simpler e process ofary (as it waM file, sinces PTD “.ptd”

acquired thde by the Sieed volumes rthree minute

a 20 ml syriinge was ap

The idea was ith a sinogra

mes were alsoe by simulati

mes from HEwas derived

file format hder to enable

major purpos

sinogram filhe sinogramdian. Howeve

if the headeread it. After

of the data froned below. F

m for Patient 2e axial and the same as for th

at the spherebeen noticednot have a w

quisition wouhich is correcSTIR not in o

iment

process the object than

f decoding thas not actuae the list was file). The sy

he images oemens worksreconstructede intervals (5

inge filled wiproximately to compare t

am from theo compared wing a cylinde

ERMES are d (with the header informe STIR to pees of the syri

es from the ms derived di

er, STIR worer files says tr running a Som signed in

Figures showi

2 after using the coronal projehe NEMA phant

es of the NEd before in way to interpuld be the sact-either oneour program

data acquirethe NEMA p

he list modeally possible s more than yringe experim

of the syrinstation wered from the l5x3), and two

ith 11 ml of F18 mm and

the sinograme “parselist”with a recon

er in STIR wi

saved in DICextension “.

rmation in therform a recoinge acquisit

Siemens scairectly from rks with floatthat the dataSTIR programnteger into floing the syrin

he SSRB tool ictions are swatom.

EMA phantomvolumes witpret a sinograme as one te of the reflec

ms.

ed by the Siephantom wa

e data. Additto export th2GBytes in sment is also

nge and sene: sinograms,list with fiveo images at f

FDG. From rod the length m and the rec

program annstructed volth the dimen

COM files. Fr.HDR”) and he .HDR filonstruction. tion.

anner represelist by “parsts of 4 bytes

a file is BIGEm the outputoats is requir

nge and the o

n STIR - thereapped. The sag

m are all in tth symmetrierams which hthat is rotatection can hap

emens scannas required. Ationally, an he list acquisize – thus tdescribed in

nt the data, attenuatione images at ofive minute in

ough measur40 mm, wh

constructed imnd reconstruume of a geo

nsions of the

rom this dataa data file

e must be tSolving this

ent signed inselist” represper pixel. It

ENDIAN andt data type isred. The procutcome of ea

e is one segmegittal stays sag

the same axies in one plhave such syed 180º andppen. The co

ner was cumA simpler obacquisition wired with ththe processin

n Section 2.7.

a to HERMn corrected aone minute ntervals (2x5

rements the hich gives a images deriv

ucted by STIometric objesyringe.

a as describe(with the e

translated ins translation

ntegers of 2 bsent signed iis stated in

d signed intes always floatcedure to recach step can

ent. Notice gittal but is

ial plane. lane. The ymmetry. d as STIR onclusion

mbersome bject was with less e NEMA

ng of this

MES. The and non-intervals

5).

radius of resulting ed by the R. These

ect that is

ed above, extension nto STIR problem

bytes per integer 4 the STIR ger, then ts and no construct be found

Page 87: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Executed Experiments | 67

in Section 2.7 where an introduction to volume reconstruction is given. The STIR tools were described in Section 4.4.

The procedure from acquisition of list mode data to a STIR reconstructed volume are as follows: The “parselist” program parses the list mode file and constructs sinograms. The name of the sinogram file that is produced is changed so that it ends with “.s” in order for STIR to read it. A STIR header file that calls for the “sinogram.s” data file containing the Siemens scanner information must be written in order for the STIR tool to execute. The SSRB tool was used because it simplifies the reconstructions without any loss of information from the oblique segments (the oblique segments might also introduce an uncertainty of how STIR handles them). While there are several choices of how to reconstruct volumes in STIR, back_project is the simplest. However, FBP2D produced volumes of the syringe of sufficient quality to confirm that the syringe header contains the expected information; therefore the decoding of the list mode data by the “parselist” program was accurate.

The sinograms generated by the “parselist” code corresponded with the ones generated by the Siemens scanner, again verifying that the list mode data decoding was correct. The understanding of how data is read in STIR was also verified by studying the sinograms. This helped to understand the order of the coordinates in the projection data header – as this was the critical understanding needed to apply STIR to the data produced by the Siemens scanner.

In Appendix C Figure AC-1 shows the sinogram that the STIR tool SSRB produced and Figure AC-2 shows the resulting volume reconstructed by using the back_projection STIR tool before the translation of data acquired in the Siemens scanner to STIR was understood.

6.3 Implementation of Test and Experiments

As described in Section 5.2.1, the starting point was a Siemens list from which it was derised to create a sinogram that can be input to STIR for reconstruction. Some of the details of the format of this file were described in Section 3.3, the high order bits in Table 3-2, and some relevant header lines in the Siemens header are:

!PET STUDY (Emission data) := PET scanner type := cylindrical transaxial FOV diameter (cm) := 61.1 number of rings := 55 distance between rings (cm) := 0.4054 gantry tilt angle (degrees) := 0 gantry crystal radius (cm) := 42.76 bin size (cm) := 0.2005 septa state := none %number of TOF time bins:= 1

The above lines indicate that the scanner has a cylindrical geometry and gives the geometric parameters of this scanner.

The following lines tell about the data – which in this case is the list mode data. These lines indicate that the data was collected for 2700 seconds = 45 minutes. Additionally, it says that the total number of 32 word entries in the list is 578,379,007.

!IMAGE DATA DESCRIPTION := %preset type := time %preset value := 2700 %preset unit:= seconds image duration (sec) := 2700 %total listmode word counts := 578379007

The lines below contain information about the coincidence list data –this has been split into two parts, the first set of lines show that the list mode events and the tags are each encoded in 32 bit words

Page 88: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

68 | Executed Experiments

and that information about the number of singles is included in singles blocks that have been included in the list every 2 seconds and that the numbers in these reports have to be scaled by a factor of 8.

%COINCIDENCE LIST DATA := %LM event and tag words format (bits) := 32 %timing tagwords interval (msec) := 1 %singles polling method := Instantaneous %singles polling interval (sec) := 2 %singles scale factor := 8 %total number of singles blocks := 48

The second set of lines shows how the LORs are going to be mapped into bins. From this data it is understood that there are 7 segments of the bins (which correspond to 7 different sinograms). The first set of sinograms consists of 109 sets of 336 x 336 sinograms and these correspond to the transaxial events (also called direct events). The next sets of 97 sinograms are from the +1/-1 oblique events, followed by 75 sets from the +2/-2 oblique events, and finally the 53 sets from the +3/-3 oblique events.

%axial compression := 11 %maximum ring difference := 38 %number of projections := 336 %number of views := 336 %number of segments := 7 %segment table := {109, 97, 97, 75, 75, 53, 53}

An initial assumption was that the mapping function put the transaxial events into the first 109 x 336 x 336 bins. If so, then it should be possible to process these events with these bin numbers one by one and increment counters in a 109 x 336 x 336 array to compute a sinogram of the transaxial events. What was unknown from the start was the order of the indices that should be used to compute the bin number (for example, is angle the fastest changing coordinate, followed by the radial component, and followed by the z component (the segments)? Or are they in another order?).

The axial compression tells that the maximum and minimum ring difference is 11 in each segment. Hence the direct segments have a minimum of -5 and maximum of 5; the -1 oblique segment has a minimum of -16 and maximum of -6, the 1 oblique segment has a minimum of 6 and a maximum of 16, and so on.

The order of the angle, radial, and the segment coordinates of the prompt and delay events was understood by assuming that the low order 30 bits in the 32 bit word contains the coordinate information which describes the LOR of a particular event. However, because there are not enough bits to divide the 30 bits into fields which directly encode the coordinates, it was further assumed that the coordinates are derived from a mapping between the bin number (the 30 bit value) and the coordinates – and that the successive segments were mapped densely into the bins. These assumptions were initially made because one must start at some point and it seemed a highly probable way of encoding the coordinate information into the limited number of bits for each event. The list from the syringe acquisition was used as it is a simple geometric shape for which both the volume and the sinogram are easy to recognize.

As the Siemens scanner has no TOF data, each 32 bit word describing an event corresponds to a LOR. Each LOR can have a different number of events (depending upon the distribution of the decays in the volume imaged by the detectors and the position of each of the pairs of detectors that see a coincidence. For the syringe acquisition the number of LOR that have no events was expected to be large as the syringe occupies a very limited extent in the scanner. A program that orders the bins by the number of events was written by one of us (GQM). By looking for the pattern of the bins with the highest frequency it was possible to guess the relationship between the bin indices and the LOR coordinates. When the decoding of the list agreed with the Siemens projection data, the sinogram and

Page 89: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

the recosuccessfsegment

HownegativeLORs shof the nmeaningscatter chave soSection

Figure 6-1

6.4

The syrifigure outhe toolsTSF. Byevaluatevisualizafor the pparametsimulatiof STIR executioalgorithmresult is better im

6.4.1

To simuacquisiti

onstructed vful. The radits.

wever, in thee LORs seemhowed a pattnegative LORg of these necorrection oromething to 6.1 does not

11: To thNoticthe ri

Reconstru

inge and theut how to recs to reconstr

y comparing e the correcations of the patient dataters was useion of reducereconstructe

on the initial m is run ag presented in

mage quality.

Simulatin

ulate reducedions were rem

volume correial coordinat

e Siemens prmed complettern of the inR is presenteegative LORsr random eve

do with thhappen.

he left a 3D viewce the inverted ight.

uctions of

e NEMA phaconstruct theruct volumes

the same dactness and spatio-temp

a was OSMAed to procesed injected aed images arestimation iain with then Figure 6-16.

g Decrease

d injected acmoved. As th

esponded to te is the fast

rojection dattely random,nverted imaged beside thes is not yet fents. It couldhe orientatio

w of the negatiappearance of

f TSF patie

ntom acquise sinograms ps from the lisata as reconusefulness

poral uptake APOSL. The sss all of the

activity. The pe improved iis 1. This proe resulting v6 and Figure

in injected ac

ctivity some he concern is

the expectetest running

ta some neg, but for an

ge. For exampe sinogram ofully understd be a markeron of the im

ive values in thf this data com

ents

sitions were produced frost mode acqu

nstructed by of STIR foof 18F-). The same reconse patient’s lparameter fiif the OSMA

oduces volumvolume as the 6-17. The n

ctivity

of the evens to preserve

ed values, thg coordinate

gative LORs acquisition

ple, in the acof the posititood, but it ir of where nomage to ens

he sinogram frompared to the s

used to verifom this list uuisitions of aboth the scar these desSTIR recons

struction algist mode acile is found iPOSL algorit

mes of sufficiehe initial estnumber of ite

nts from the the dynamic

hen the deco, followed by

were found.with more

cquisition of ve LOR in Fs probable tho events are dsure reflectio

om the list modsinogram of the

fy the decodsing STIR. T

actual patienanner and Ssired task (struction algogorithm withcquisitions an Appendix thm is execuent quality bimate the querations can

list mode ocs of the stud

Executed Expe

oding of theby the angle,

. For the syractivity the

f patient 12 thFigure 6-11. hat it is somdetected andons as desc

de from patiene same acquis

ding of the liThe final goalnts being treaSTIR it is po(generating orithm that w

h the same fand for the B. The imag

uted twice. Inbut if the OSMuality improalso be incre

of the full 45dy it is not po

eriments | 69

e list was and the

ringe the negative

he image The true

me sort of d it might cribed in

nt 12. ition on

st and to l is to use ated with ossible to

dynamic was used filter and study of

ge quality n the first MAPOSL oves. The eased for

5 minute ossible to

Page 90: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

70 | Executed Experiments

simulate a decrease by simply removing chunks of the list, but rather it was necessary to probabilistically remove or retain each event to preserve the dynamics of the acquisition. One of us (GQM) wrote a program to fractionate the list based upon by the user’s choice of fraction. This program is called “fracdecimatelist”. The user executes “fracdecimatelist” with the name of the list mode file and a decimal value indicating the user’s desired fractionation. This code only fractionates detected events. All other information, such as the time tags and gating, are not affected. The fraction is verified by the size of the resulting file.

The decimated list mode data files were the same type of file as the undecimated lists data files. The program “parselist” was used to produce the sinograms for STIR and suitable header and par file were writen. The slices projected from the volumes of the simulated fractions derived from the full 45 minute list as reconstructed in STIR are presented in Figure 6-12 to Figure 6-15 where 90%, 75%, 50%, 25%, and 10% of the full list have been simulated for patients 9, 11, 12, and 18. The simulation of 10% was thought to be an obvious lower limit, but the image quality turned out to be better than expected. As access to Siemens workstation was limited the same reconstructions were done only for simulations of 100%, 50%, 25%, and 10% of the list for patients 11 and 18. It was decided that this subset of comparison would suffice for the purpose of illustrating the proposed dynamic cine loop.

Page 91: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

100%

90%

75%

50%

25%

10%

Figure 6-1

12: Axialminiuactivquali90%

l coronal, and sute acquisitionity, 75% of actty of the 25 anof the events.

sagittal slices n of Patient 9. Fivity, 50%, 25%d 10 %. The im

projected fromFrom the top: t% and 10% of amage quality is

m volumes recohe full 100% ofctivity. The satsurprisingly g

onstruction in Sf the list, then sturation was chood even with

Executed Expe

STIR from the simulating 90%hanged to sus the radical rem

eriments | 71

full 45 % of tain the moval of

Page 92: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

72 | Execute

100%

90%

75%

50%

25%

10%

Figure 6-1

ed Experiments

13: Axialminuactivquali

l coronal, and s

ute acquisition ity, 75% of actty of the 25 an

sagittal slices of Patient 11. Fivity, 50%, 25%d 10 %. The im

projected fromFrom the top: t

% and 10% of amage quality is

m volumes recothe full 100% octivity. The satsurprisingly g

onstruction in Sof the list, then turation was chood.

STIR from the simulating 90%

hanged to sus

full 45 % of tain the

Page 93: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

100%

90%

75%

50%

25%

10%

Figure 6-114: Axialminuactivquali

l coronal, and sute acquisition ity, 75% of actty of the 25 an

sagittal slices of Patient 12. Fivity, 50%, 25%d 10 %. The im

projected fromFrom the top: t

% and 10% of amage quality is

m volumes recothe full 100% octivity. The satsurprisingly g

onstruction in Sof the list, then turation was chood.

Executed Expe

STIR from the simulating 90%

hanged to sus

eriments | 73

full 45 % of tain the

Page 94: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

74 | Execute

100%0

90%

75%

50%

25%

10%

Figure 6-1

ed Experiments

00

15: Axialminuactivquali

l coronal, and sute acquisition ity, 75% of actty of the 25 an

sagittal slices of Patient 18. Fivity, 50%, 25%d 10 %. The im

projected fromFrom the top: t

% and 10% of amage quality is

m the volumes the full 100% octivity. The satsurprisingly g

reconstructionof the list, then turation was chood.

n in STIR from simulating 90%

hanged to sus

the ful 45 % of tain the

Page 95: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

6.4.2

For the 100%, 5understoprogramsagittal sreduced volumesconsecut

6.4.3

The quausing threconstrquality, Further attenuatSTIR recby the Sacquisiti

Siemeworksta

STIR

Figure 6-1

Image Re

cine loop re50%, 25%, anood and dec

m produced sslices were p activity one

s were placedtively in the

Comparin

ality of the onhe Siemens ructed by the

but the STIinvestigatio

tion correctioconstructioniemens scanions of patien

ens ation

R

16: Abovworkquali

econstruction

econstructionnd 10% for Pcoded it is psinograms of projected frome minutes wed in time ordcine loop.

ng Image Qu

ne minute Sworkstation

e two methoIR reconstru

ons to impron to them i

n and attenuanner. The STInts 11 and 18

ve: axial, corok station: Belowty is better for

ns to Produce

ns the list wPatients 11 apossible to

f one minute m each of there also reco

der and a sag

ality STIR vs

TIR reconstrn by viewingods. The Siemucted projecrove the quais outside thation correctIR images ar

8 are present

nal, and sagitw: the STIR rethe Siemens r

e Cine Loops

was divided iand 18. As thdivide this each that co

he 45 minuteonstuction ogittal slice wa

s. Siemens W

ructed volumg projection mens reconstction slices sality of volu

his project, btion methodre also not scted in Figure

ttal projection econstructed preconstructed

s

nto one minhe structure list into any

ould be read e volumes recon the Siemeas projected

Workstation

mes were comslices of th

tructed projesufficed to sumes reconsut it would b

d and to test catter correct6-16 and Fig

slices of patiprojection sliceprojection slic

nute intervalof the data

y time interby STIR. To

constructed ien workstatio

from each v

mpared withhe same oneection slices see the dynastructed by be of interesit properly f

ted. Paired rgure 6-17.

ent 11 reconses of the samees, which was

Executed Expe

ls. This was in the list m

rvals. The “po produce a cin STIR. Theon. In each

volume and d

h those recone minute ac

are clearly oamics of the

STIR and st to find thefor the data

reconstructio

structed by thee acquisition. Texpected.

eriments | 75

done for mode was parselist” cine loop, e full and case, the

displayed

nstructed cquisition of higher e uptake. to apply

e optimal acquired

ons of the

e Siemens The image

Page 96: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

76 | Execute

Siemeworksta

STIR

Figure 6-1

6.5

Cine looused thephysiciafrom Pat

ed Experiments

ens ation

R

17: Abovworkpatieexpe

Physician

ops for two pe static Na1

ans stated thtients 11 and

• Lars Weidevelopinwhere theuptake alorientatio

• Henrik Lpatients wof addingbone. Thaccordingwhen usin

• Henrik Oof interes

• Charlottetreating p

• Buster Sinterest to

• Hans Jakclear abopresenteda limited

ve: axial, corok station. Beloent 11 the imagcted.

ns’ opinion

patients were8F- acquisiti

he following d 18. The sim

idenhielm, Mng the cine e bone is remlso for the sion made this Lundblad, Mwith TSF, wag the extra inhe cine loopg to him as thng SUVs.

Olivecrona: Mst to pursue te Karlsson Tpatients with Sandgren: Mo pursue devkobsson: M.Dout who wod colored in ointerest to p

nal, and sagitow: the STIR rge quality is b

ns regardi

e presented ons and SUopinions aboulated reduc

M.D. Ph.D, Ploop as a to

modeling. Thimulated redtechnique a .D. Ph.D, Oas positive abnformation o

ps that simulhe dynamics

M.D. Ph.D, Ohe developm

Thur, M.D. PTSF. So far,

M.D. Ph.D., Oveloping the cD. Ph.D, Prould actuallyone color andursue, partic

ttal projection reconstructed

better for the S

ing the Ci

to physicianUVs. While tout these looction of activ

Professor,Orool to determhe cine loop duction of inj

potentially grthopaedic Sbout the cineof the 18F- uplate decreases of the uptak

Orthopaedic ment of the ciPh.D, Orthop, she has notOrthopaedic cine loop ofessor Rad

y benefit frod the loop is

cularly with t

slices of patiprojection sl

Siemens recon

ne loops

ns who treat the number ops. The cin

vity was 100,

rthopaedic Sumine regionsvisualized th

njected activigood tool. Surgeon, whe loops and thptake to detee in injectedke is shown.

Surgeon, waine loop techpaedic Surget given a resp

Surgeon, w

iology, Nuclm this technshowing on

the CT super

ent 18 reconsices of the sa

nstructed proje

patients withof cine loo

e loops were50, 25 and 1

urgeon, was s of 18F- upthe dynamics ity. The supe

o is very exhought that termine the red activity wThis inform

as positive anhnique. eon, who is ponse. was positive

ler Medicinenique, but ie image per

rimposed for

structed by theame acquisitioection slices, w

th TSF and wops was smae from data 0% of the ful

s positive to take for det of the regioerimposed o

xperienced inthey had the egions of rem

were also infmation is not

nd thought th

very experi

and said it

e Specialist, if the cine lsecond it mi

r orientation.

e Siemens on. As for which was

who have all, these acquired ll list:

continue ermining

ons of the n CT for

n treating potential

modeling formative available

hat it was

ienced in

t was of

was not oops are

ight be of

Page 97: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Executed Experiments | 77

Overall their impression was positive and the physicians showed an interest in a continued development of the dynamic cine loop. The cine loop must not be too fast and the speed could be decided while watching it in the future. The time segments in the beginning could be shorter as the uptake is a quick process and it is not required that the image quality is high in the beginning of the acquisition. The time segmentation can include longer time sequences later when the 18F- is taken up in the remodeling bone, segments of longer time gives rise to better image quality. This would mean a time segmentation that relies on the physical process of the 18F- interaction in the bone rather than parameters such as the smoothnes of the loop or half-life of the isotope of interest.

• The loops are available at https://petloops.weebly.com.

Page 98: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 99: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Analysis | 79

7 Analysis

In this chapter, the results are presented and discussed. The work to reconstruct volumes with STIR was not straight forward nor was the decoding of the list mode data. Being able to use open source software, such as STIR, to reconstruct volumes from data acquired from the Siemens scanner is worthwhile as a research tool that is independent of the clinical scanner and workstation. The material in this project which discusses how to take sinogram information from a scaner unknown to STIR and format it for volume reconstruction with STIR is a valuable result.

In Section 7.1 the effective dose to patient is presented and in Section 7.2 the major results are discussed. In Section 7.3 the reliability analysis is given and in Section 7.4 the validity analysis. The Chapter ends with a discussion in Section 7.5.

7.1 Effective Dose

The PET acquisition leads to a distributed internal effective dose to several radiation sensitive organs, of which the uterus is of the most interest. Unfortunately, this distributed dose cannot be avoided when injecting a patient with Na18F- solution. However, it should be noted that as 18F- is mostly distributed to bone, it does not deposit much activity in other organs with the exception of the bladder. Table 7-1 presents the effective dose and absorbed dose to organs of interest for an adult weighing 70 kg. Table 7-2 presents the effective dose and absorbed dose to the same organs in a child 15 years of age and also weighing 70 kg. These tables are from the Swedish Radiation Safety Authority (Strålsäkerhetsmyndigheten)*. The effective dose distributed by the CT scan is less disturbing as the lower leg is not a radio sensitive part of the body. It might be for children due to the red bone marrow that is spread into the legs as well.

Table 7-1: Absorbed dose in organs and the effective dose in adults injected with NaF-18 according to SSM

F-18, FLUORIDE Adult, 70kg Injected activity 140 MBqEffective dose 2.38 mSv 0.017 mSv/MBq

Organ Absorbed dose Skeleton surfaces 11.2 mGy Adrenal gland 0.896 mGy Pancreas, Bukspottkörtel 0.672 mGy Liver 0.546 mGy Lungs 0.63 mGy Spleen 0.546 mGy Kidneys 0.644 mGy Ovaries 1.148 mGy Red bone marrow 5.46 mGy Thyroid 0.686 mGy Testis 0.854 mGy Colon 0.938 mGy Bladder 21 mGy Uterus 1.82 mGy

* www.ssm.se

Page 100: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

80 | Analysis

Table 7-2: Absorbed dose in organs and the effective dose in 15 year old child weighing 70kg injected with NaF-18 according to SSM

F-18, FLUORIDE Child 15 years, 70kg Injected activity 140 MBqEffective dose 2.94 mSv 0.021 mSv/MBq

Organ Absorbed dose Skeleton surfaces 11.2 mGy Adrenal glands 1.176 mGy Pancreas 0.826 mGy Liver 0.7 mGy Lungs 0.798 mGy Spleen 0.728 mGy Kidneys 0.854 mGy Ovaries 1.54 mGy Red bone marrow 6.86 mGy Thyroid 0.798 mGy Testis 1.162 mGy Colon 1.162 mGy Bladder 26.6 mGy Uterus 2.1 mGy

The parameters of the CT scans that are acquired simultaneously with the PET images are shownin Table 7-3. The CTDIvol is 7.61 mGy. As the lower leg is not a radiosensitive part of the body theeffective dose is relatively low compared to the PET scan that affects radiosensitive organs, such as thebladder. However, the CT scan contributes to the effective dose to the patient. The following example is calculated for Patient 11.

Table 7-3: CT parameters used for TSF patients at the Karolinska Hospital in Solna

Effective mAs 60 kV 140 Rotation 1 sec Scan Length 737 x 0.5 mm Pitch 1.0 CTDIvol 3.14 mGy Effective dose 0.08 mSv

The effective dose is calculated as DLP *body part coefficient=CTDIvol*scan length*k. In this case, the body part is the tibia, which we approximate here as k = 0.0023 (head in AAPM report No.96). The effective dose due to the CT scan in this case is 0.08 mSv.

7.2 Major results

There are several outcomes from this project work apart from the cine loop that might be beneficial for future studies. The understanding of the structure of the Siemens list mode data and its decoding opens up opportunities for dynamic studies of any patient acquisitions from this scanner that are saved in list mode. It also offers a tool to simulate and study the effect on image quality from decreasing the injected activity that takes into account dynamic effects.

Page 101: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Analysis | 81

To have open source software for image reconstructions, such as STIR, that is compatible with the data from the Siemens scanner opens up opportunities to perform studies while doing the reconstructions outside of the Siemens clinical workstation. The knowledge gained by making STIR compatible with the Siemens scanner can be of help to make STIR compatible with other scanners. There are 4 main results from this project:

1. The Siemens list mode data was decoded.

2. It was shown that it is very probable that the injected activity can be decreased.

3. STIR can reconstruct volumes acquired by the Siemens scanner and saved in list mode and since the scanner characteristics required have been determined, any sinogram produced by this scanner can be resconstructed in STIR,

4. The cine loop is a useful tool and it can be used as a complement to the current static volumes.

The decoding of the Siemens list mode opens opportunities for all kinds of dynamic studies. The cine loop that is produced is not limited to one minute intervals, time intervals could instead be selected by taking in to account the half-life of the radionuclide or the processes of the uptake instead. As STIR is available this gives an opportunity to do many tests without disturbing the clinic. Having the list decoded for this particular scanner probably helps understand the structure of other Siemens scanners, even though they implement TOF or PSF.

The cine loops continue to show the spatio-temporal dynamics of uptake even with a large amount of decreased injected activity simulated. Furthermore, the quality of the volumes reconstructed from lists that simulated a decrease in injected activity indicates that it is possible to greatly decrease the injected activity. However, how much of a decrease is acceptable has to be determined in further studies.

The STIR software was proven to be a good alternative for the volume reconstruction as it was impossible (due to limited availability) to perform all the desired reconstructions with the Siemens workstation. This software makes the researcher independent of the Siemens workstation, so that it is possible to reconstruct volumes whenever it is necessary without disturbing the clinical activities. By reconstructing volumes from sinograms in STIR the decoding of the list was confirmed.

The physicians to whom the cine loops were presented were generally positive. The temporal resolution of the cine loop might benefit by relying on the uptake processes in the body rather than using fixed time intervals, or by taking into account the half-life of the isotope of interest. The time from the injection to the uptake of 18F- in broken bone is short and the cine loop would probably benefit from having very short time segments in the first few minutes. Later on the time sequences could be elongated successively for better spatial resolution once the majority of the 18F- is taken up in the remodeling bone. The 18F- that is taken up in the remodeling bone stays there. To determine the temporal resolution by the processes of interaction between the 18F- and the broken bone became apparent once the cine loops were made.

7.3 Reliability Analysis

The analysis that was done decoding the list mode relies on volumes reconstructed by STIR to confirm the decoding. The cine loops were made of slices projected from the reconstructed volumes in the Siemens workstation and STIR. However, the cine loops relied on investigations of the volumes reconstructed by STIR, to decide a first possible temporal resolution of the cine loops to demonstrate the conceptual idea. The volumes reconstructed in STIR show a sufficiently good quality, but are not as good as those reconstructed by the Siemens workstation according to physicians who are used to studying the volumes produced by the current PET/CT technique and this is quite visible. However, the goal of the analysis was to determine whether this new dynamic visualization technique was an improved tool which complements the existing techniques used by physicians who diagnose/monitor the patient group of interest. Therefore, there is a need for a follow up study with proper statistical

Page 102: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

82 | Analysis

tests and refinements of the technique. Follow up studies to optimize STIR reconstructions of data acquired by the Siemens scanner, optimizing temporal sequencing of the cine loop and the possible decrease in injected activity is of interest for future work and not included in this work. STIR is also continuously improving itself, which is a development of interest to study.

7.4 Validity Analysis

The primary purpose of this project was to display a cine loop of dynamic PET volumes superimposed upon a CT volume. A secondary purpose, that was useful to facilitate the achievement of the primary purpose, was to enable STIR to reconstruct volumes acquired via the Siemens scanner. A tertiary purpose of this project was to investigate and simulate how a reduced injected activity might affect the image quality, so as to estimate to what extent this injected activity might be reduced without losing too much image quality.

A demonstration was performed to compare the current display procedures with the newly developed cine technique. The true potential of this technique has yet to be determined statistically; hence this would be a natural continuation of this work. However, based upon watching the dynamic cine loop it seems that the injected activity could potentially be reduced quite radically. To determine exactly by how much, needs further investigations.

There is also a need for future work to determine the best time interval into which to divide the acquired data before generating the volumes to be displayed via cine loops. As noted earlier it may be possible to take the half-life of the radionuclide into account – potentially maintaining a given signal to noise ratio rather than a direct temporal relationship to the acquired data. The reconstruction method that is used in STIR was not optimized; hence, this too might be of interest for future studies.

7.5 Discussion

It has already been stated that this project describes the development of a technique for dynamic visualization of 18F- uptake for patients being treated with TSF frames. This project contains a thorough description of how STIR could reconstruct volumes from lists acquired by the Siemens Biograph 64, True Point True V scanner. This project also describes the structure of the list mode data produced by this scanner.

The open source STIR software was able to produce reconstructed volumes from list mode data from the Siemens scanner, which confirmed the decoding was correct. The local software tool is being modified to produce a cine loop from a series of PET projection slices superimposed on a CT image volume. These reconstructions and cine loops (2D video animations as the cine loop in the local software was not yet implemented at the time of presenting this work) were shown to interested physicians.

Once the list mode file was decoded and sinograms could be produced based upon user selected time intervals that were correctly reconstructed by STIR, a program was written to produce sinograms from a fractionated list. For example, by decimating the list by removing every other event enables simulation of a list that would have been acquired with 50% of the injected activity. Similarly by removing every fourth event enables simulation of a list from an acquisition with 75% of the inject activity, and similarly for other fractionations. The size of the resulting list verifies the simulated decrease.

The technique is of interest to pursue according to the physicians to whom the cine loop was demonstrated. However, the method of presenting the cine loop was not done to statistically evaluate the value of using the cine loop for diagnostic purposes, but rather simply as a demonstration of the probable utility in understanding of the 18F- uptake (particularly to understand where there is no uptake, but where uptake is expected).

Page 103: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Analysis | 83

This technique of dynamic visualization might benefit other patient groups. However, investigating this remains for future work.

Page 104: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 105: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Conclusions and Future work | 85

8 Conclusions and Future work

From discussions with physicians the visualization provided by the dynamic cine loop is advantageous to monitor the remodeling in bone of patients being treated with TSF. An obvious next step is to further evaluate and optimize this cine loop. The time intervals of the volumes that are used for the cine loop can be further optimized and then tested. The reconstruction parameters used by STIR can be optimized and the image quality further studied. However, the translation of the header files is believed to be accurate as all numbers are derived from the DICOM (PTD) header files but this could of course be further studied.

There might be other groups of patients that could benefit from dynamic cine loop visualization. Other radionuclides used for PET imaging have different half-lives, hence the acquisition procedures can differ - but the technique developed in this project can generally be utilized. Different tracer substances are taken up in various manners; hence this dynamic visualization could be used to study these tracers as well.

Conclusions are discussed in Section 8.1 and the limitations are discussed in Section 8.2. In Section 8.3 some future work are presented and the Chapter ends with reflections of the study in Section 8.4.

8.1 Conclusions

Many problems and obstacles encountered in this work had to be sorted out at every step along the way. Before it was possible to reconstruct volumes using the STIR software, the STIR source code had to be studies to understand how it works. However, in the end problems were solved by manipulating the headers, hence no programming was actually needed to solve this problem. Before knowing how to solve a problem, the problem must be attacked from different angles. This process generated a lot of knowledge about many things surrounding the problem and a bigger picture was gained. As a result a thorough understanding of the PET data starting from the formation of LORs and ending with a reconstructed volume was acquired. Also a deeper understanding of the process of collecting the list mode data, the formats of the different files that are used, and the different data representations used in these files was gained. While the focus of this project was not on PET reconstructions per se, understanding of the relationship between the sinograms and the reconstructed volumes as well as the algorithms used for this reconstruction was very valuable.

The goals of the project were generally accomplished. The results of the simulation of the decreased injected activity were striking and unanticipated. STIR was able to produce sufficient quality volumes from the patient data – although they could be improved. As a result performing reconstructions on the Siemens workstation could be kept to a minimum – to only those needed for comparison reasons.

The main advice to anyone who is beginning to use STIR is to study the header files and the parameter files found in the recon test package and the sample directory. Spending some time to see how different parameters change the outcomes is time well spent. There is a lot to be gained by studying the result of running the various STIR programs. Experimenting by simulating a variety of geometric objects rapidly improved the ability to mentally go between sinogram space and reconstructed volumes. It was found that it was very important to feel free to test new things, make changes in the source code of the tools, etc. As STIR is free it can be downloaded as many times as desired – so dare to experiment! However, it is very important to document everything along with the outcome. This ensures that the user will not repeat him/herself or forget results that can be of interest in the future.

Page 106: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

86 | Conclusions and Future work

8.2 Limitations

The staff in the nuclear department was very helpful and allowed all the reconstructions that needed to be done by the Siemens workstation as well as helping to collect the NEMA phantom and syringe data sets. The daily routines of the work with patients in the clinic must not be interrupted and therefore enabling STIR to be used for reconstructions was very welcomed by the staff.

The reconstructions in STIR are very time consuming and it is therefore good to plan these reconstructions in advance. For example, to reconstruct 45 different one minute image volumes from the 45 input sinograms took 3 to 5 hours. Although access was available to a very powerful computer that could process many reconstructions at the same time it was important to plan the reconstructions steps in advance. Note that for comparison the time required to do the same reconstruction on the Siemens workstation was approximately 10-30 minutes.

The programming skills of one of us (SL) limited her involvement in the programming part of the list mode decoding. Hence in the future it would be worth improving these skills as it would be beneficial to more quickly gain a better understanding of the STIR programs.

As a practical matter list mode files take a lot of storage space (1 to 2 GB) as each event occupies 4 bytes. The sinograms in the case of this scanner each take 126,217,728 bytes irrespective of the injected activity! Therefore it is advisable to ensure that plenty of disk space as well as a suitable means to transfer the acquired image from the scanner to the computer to be used are available. Note that in this project sinograms from the fractionated lists were moved back to the Siemens workstation for reconstruction – hence there needs to be both space and time to do these transfers and processing.

8.3 Future work

There are several things to be done in the future to improve the cine loop, such as determining the most appropriate time intervals. The reconstruction method in STIR is not optimized and the image quality has not been assessed beyond the impression that they look “fine”, but are clearly not as nice as the reconstructions on the Siemens scanner workstation. A formal evaluation of this difference was undertaken by using profile taken through matching slices for those produced by the STIR and Siemens scanner. This is not reported here. A more formal evaluation (with appropriate statistical power) should be conducted to determine how useful the cine loop is. Such an evaluation could be used to decide if this technique is an alternative or complementary tool. As the current static and dynamic technique both utilize the same data (derived from the same acquisition) it is not necessary to decide in advance which technique is to be used – other than to store the list mode acquisition data.

One of the major goals of this project was to investigate if it is possible to reduce the injected activity. This project has shown that this is possible and that the reduction might be quite dramatic. However, before reducing the injected data in patient studies, there is a need for a more thorough quantitative evaluation (with appropriate statistical tests). The cine loop opens one way for a reduced injected activity test and it seems that this technique would rely less on SUVs derived from the present static technique. However, this is left for future work.

The knowledge gained from decoding list mode data can certainly give clues about the structure of the list mode files in other scanners. PET scanner features such as TOF and PSF have been shown to give rise to better image quality from less injected activity. The work to produce a cine loop from list mode data from such a scanner by decoding the list mode data would of course be of interest in the future. As the work is scanner specific the decoding of the list mode data implies additional work. However, it is known that for the Siemens list mode format that the TOF data is encoded in a field in the high order (6) bits of the bin field [27]. This work would be of interest concerning the work to decrease the injected activity.

Page 107: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Conclusions and Future work | 87

Currently the negative LOR or pixel values in the Siemens sinogram produced from the list mode data are not fully understood. It is suspected that this might be due to scatter correction, but a study of this remains for the future.

The parameters of the cine loop must be standardized before this visualization technique can be used as a standard patient protocol in the clinic. Before that, work needs to be done to determine the appropriate parameters.

8.4 Reflections

If the injected activity is reduced and the monitoring process can be improved with the use of cine loops, it would be possible to acquire more studies with the same total effective dose as now. This would result in a safer surveillance of those patients as it enables an increase of the number of acquisitions. An increased number of acquisitions could potentially decrease the risk of unnecessary fractures and a prolonged painful treatment. Additionally, reducing the injected activity decreases the staff exposure.

If it is possible to decrease the effective dose sufficiently for this procedure to be used with children and young adults who are more sensitive to radiation, this would benefit this group of patients. Complicated congenital anomalies of the lower leg that require a TSF treatment could then be better monitored for younger patients than with the existing procedures.

The studies and testing of reduced dose can be done using STIR, thus they need not disturb the daily clinical routines. As noted in Section 8.2, the list mode data files and sinograms take a lot of storage space. Adding cine loops will also take a large amount of storage, which might be problematic if the storage is limited. However, this should not be a problem in practice due to the low cost of high capacity disk drives.

The general impression of the physicians to whom the temporary loop was demonstrated was positive and a further development is of interest as this technique implies that additional and complementary information could be gained. The realization of the loop showed that the uptake processes of interest could rely on the decisions of an optimal temporal segmentation of the list.

The gain for the patients treated with TSF is a safer monitoring process and a lower risk of additional fractures inflicted by an early removal of the TSF. As it is very inconvenient for the patients to wear the TSF, hence it is undesirable to delay removing it for longer than necessary.

Some of the patients that are being treated with the TSF can work during their treatment, depending on their work and the effect this work has on the patient. While in other cases the patient is not able to work while being treated with a TSF, so reducing the treatment time for these patients can have a positive social and economic effect. Some patients suffer from a lot of pain during the course of the treatment and need painkillers which increases the risk of addiction problems the longer the treatment lasts. Hence reducing the treatment time can also have a positive social effect by reducing the risk of addiction.

Page 108: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 109: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

References | 89

References

[1] Awen Autret, Julien Bert, Olivier Strauss, and Dimitris Visvikis, ‘3D PET list-mode reconstruction including all available information provided by the detector’, Université Joseph Fourier, Grenoble, France, 16-September-2013, Available at http://membres-timc.imag.fr/Laurent.Desbat/ProjetsRecherches/DROITE/workshops/droite20130910/Presentations/Sept11Afternoon/BertJulienLatim.WorkshopTomopdf.

[2] Vanessa Starr, H. Olivecrona, M.E. Noz, G.Q. Maguire Jr., M.P. Zeleznik, and Karl-åke Jannsson, ‘A potential means of improving the evaluation of deformity corrections with Taylor Spatial Frames over time by using volumetric imaging: Preliminary results’, Computer Aided Surgery, vol. 14, no. 4–6, pp. 100–108, January 2009, DOI:10.3109/10929080903454969.

[3] J. C. Taylor, ‘web page for J. Charles Taylor M.D.’ [Online]. Available: http://www.jcharlestaylor.com/index/content.shtml. [Accessed: 11-August-2013].

[4] H. Lundblad, G. Q. Maguire, H. Olivecrona, C. Jonsson, H. Jacobsson, M. E. Noz, M. P. Zeleznik, L. Weidenhielm, and A. Sundin, ‘Can Na18F PET/CT Be Used to Study Bone Remodeling in the Tibia When Patients Are Being Treated with a Taylor Spatial Frame?’, The Scientific World Journal, vol. 2014, pp. 1–9, 2014, DOI:10.1155/2014/249326.

[5] R. Hatherly, F. Brolin, A. Oldner, A. Sundin, H. Lundblad, G. Q. Maguire Jr, C. Jonsson, H. Jacobsson, and M. E. Noz, ‘Technical Requirements for Na18F PET Bone Imaging of Patients Being Treated Using a Taylor Spatial Frame’, Journal of nuclear medicine technology, January 2014, DOI:10.2967/jnmt.113.133082.

[6] M. E. Noz, G. Q. Maguire Jr., M. P. Zeleznik, E. L. Kramer, F. Mahmoud, and J. Crafoord, ‘A versatile functional-anatomic image fusion method for volume data sets’, Journal of medical systems, vol. 25, no. 5, pp. 297–307, October 2001.

[7] L. Olivecrona, J. Crafoord, H Olivecrona, M. E. Noz, G. Q. Maguire Jr., M. P. Zeleznik, L. Svensson, and L. Weidenhielm, ‘Acetabular component migration in total hip arthroplasty using CT and a semiautomated program for volume merging’, Acta Radiologica (Stockholm, Sweden: 1987), vol. 43, no. 5, pp. 517–527, September 2002.

[8] R. J. T. Gorniak, E. L. Kramer, G. Q. Maguire Jr., M. E. Noz, C. J. Schettino, and M. P. Zeleznik, ‘Evaluation of a semiautomatic 3D fusion technique applied to molecular imaging and MRI brain/frame volume data sets’, Journal of medical systems, vol. 27, no. 2, pp. 141–156, April 2003.

[9] K. Mirzadeh, ‘TLD Measurements on Patients being treated with a Taylor Spatial Frame : Using Radiation from Na18F PET/CT Studies and from Naturally Occurring Radioisotopes’, Masters Thesis, Stockholm University, Department of Physics, Stockholm, Sweden, Available at http://urn.kb.se/resolve?urn=urn%3Anbn%3Ase%3Asu%3Adiva-109361, 2014.

[10] P. E. Kinahan and J. W. Fletcher, ‘PET/CT Standardized Uptake Values (SUVs) in Clinical Practice and Assessing Response to Therapy’, Seminars in ultrasound, CT, and MR, vol. 31, no. 6, pp. 496–505, December 2010, DOI:10.1053/j.sult.2010.10.001.

[11] Y. S. Lee, J. S. Kim, K. M. Kim, J. H. Kang, S. M. Lim, and H.-J. Kim, ‘Performance measurement of PSF modeling reconstruction (True X) on Siemens Biograph TruePoint TrueV PET/CT’, Annals of Nuclear Medicine, vol. 28, no. 4, pp. 340–348, May 2014, DOI:10.1007/s12149-014-0815-z.

[12] M. Blau, W. Nagler, and M. A. Bender, ‘Fluorine-18: a new isotope for bone scanning’, Journal of Nuclear Medicine: Official Publication, Society of Nuclear Medicine, vol. 3, pp. 332–334, July 1962.

[13] G. Segall, D. Delbeke, M. G. Stabin, E. Even-Sapir, J. Fair, R. Sajdak, G. T. Smith, and SNM, ‘SNM practice guideline for sodium 18F-fluoride PET/CT bone scans 1.0’,

Page 110: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

90 | References

Journal of nuclear medicine: official publication, Society of Nuclear Medicine, vol. 51, no. 11, pp. 1813–1820, November 2010, DOI:10.2967/jnumed.110.082263.

[14] Amalia Moreno Galera, ‘Data Processing Tool Box for PET Scanners’, Master’s thesis, Tampere University of Technology, Tampere, Finland, Available at http://urn.fi/URN:NBN:fi:tty-201405131156, 2013.

[15] C. S. Ferreira, ‘Image reconstruction and first clinical results with ClearPEM’, Braga, 07-January-2010, Available at https://indico.cern.ch/event/77313/session/7/contribution/35/material/slides/0.pdf.

[16] A. Todd-Pokropek, T. D. Cradduck, and F. Deconinck, ‘A file format for the exchange of nuclear medicine image data: a specification of Interfile version 3.3’, Nuclear Medicine Communications, vol. 13, no. 9, pp. 673–699, September 1992.

[17] M. E. Noz and G. Q. Maguire Jr., ‘QSH: a minimal but highly portable image display and handling toolkit’, Computer methods and programs in biomedicine, vol. 27, no. 3, pp. 229–240, December 1988.

[18] G. Q. Maguire, B. S. Baxter, and L. E. Hitchner, ‘An American-Association-of-Physicists-in-Medicine (AAPM) Standard Magnetic-tape Format for Digital Image Exchange’, Proceedings of the Society of Photo-Optical Instrumentation Engineers, vol. 318, pp. 284–293, 1982.

[19] L. A. Drubach, P. R. Johnston, A. W. Newton, J. M. Perez-Rossello, F. D. Grant, and P. K. Kleinman, ‘Skeletal Trauma in Child Abuse: Detection with 18F-NaF PET’, Radiology, vol. 255, no. 1, pp. 173–181, March 2010, DOI:10.1148/radiol.09091368.

[20] L. A. Drubach, S. A. Connolly, and E. L. Palmer, ‘Skeletal scintigraphy with 18F-NaF PET for the evaluation of bone pain in children’, AJR. American journal of roentgenology, vol. 197, no. 3, pp. 713–719, September 2011, DOI:10.2214/AJR.11.6670.

[21] F. Buther, M. Dawood, L. Stegger, F. Wubbeling, M. Schafers, O. Schober, and K. P. Schafers, ‘List Mode-Driven Cardiac and Respiratory Gating in PET’, Journal of Nuclear Medicine, vol. 50, no. 5, pp. 674–681, May 2009, DOI:10.2967/jnumed.108.059204.

[22] Ernesto Fumero, ‘Monte Carlo simulations on the PET scanner of a Siemens Biograph 64 PET/CT camera, development of a model and processing procedures’, Master of Science in Medical Radiation Physics, Stockholms Universitet, Stockholm, 2007.

[23] R. Yao, J. Cadorette, J.-F. Beaudoin, and R. Lecomte, ‘Energy window optimization of PET detectors for SPECT imaging’, in 2013 IEEE Nuclear Science Symposium and Medical Imaging Conference (NSS/MIC), 2013, pp. 1–4, DOI:10.1109/NSSMIC.2013.6829104.

[24] S. Yamamoto, H. Horii, M. Hurutani, K. Matsumoto, and M. Senda, ‘Investigation of single, random, and true counts from natural radioactivity in LSO-based clinical PET’, Annals of Nuclear Medicine, vol. 19, no. 2, pp. 109–114, April 2005.

[25] William F. Jones, ‘Guideline to the PETLINK TM Proposal - A proposed digital inteconnect standard for data acquisition in nuclear medicine’. Siemens Medical Solutions, USA, 26-March-2013, Available at http://usa.healthcare.siemens.com/siemens_hwem-hwem_ssxa_websites-context-root/wcm/idc/groups/public/@us/@imaging/@molecular/documents/download/mdax/mjky/~edisp/petlink_guideline_j1-00672485.pdf.

[26] F. D. Grant, M. J. Gelfand, L. A. Drubach, S. T. Treves, and F. H. Fahey, ‘Radiation doses for pediatric nuclear medicine studies: comparing the North American consensus guidelines and the pediatric dosage card of the European Association of Nuclear Medicine’, Pediatric Radiology, November 2014, DOI:10.1007/s00247-014-3211-x.

[27] J. E. Breeding, W. F. Jones, W. K. Luk, A. P. Moor, J. H. Reed, and D. Townsend, ‘On-line tof-pet mashed rebinning for continuous bed motion acquisitions’, U.S.

Page 111: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

References | 91

Patent US20100074498 A125-March-2010Available at http://www.google.com/patents/US20100074498.

Page 112: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 113: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix A: The parselist program | 93

Appendix A: The parselist program

Note that some of the comments have been excluded since the field’s description can be found in the PETLINK™ document cited in Section 3.3.

/* * parse-list.c * to take a Siemens PET event list from the KI/KS and parse it * * * compile with: * gcc -g parse-list.c -lm -o parselist * * run with: * ./parse-list syringe-full-list.IMG 60 120 * create a sinograms starting at time 60 seconds upto 120 seconds * or * ./parse-list syringe-full-list.IMG 120 * format into 120 second sinograms * or * ./parse-list syringe-full-list.IMG * create a sinogram minute long * use the flag -a if you want to get all 7 segements * use the flag -v if you want verbose mode * use the flag -h or just the program name to get usage information */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #define MB_size 1048576 #define Maximum_description_string 200 #define Maximum_file_name_length 1000 #define Maximum_key_length 10000 #define Number_of_angles 336 #define Number_of_radii 336 #define Number_of_Slices_segment_0 109 #define Number_of_Slices_segment_all 559 #define Total_bins_segment_0 (Number_of_angles*Number_of_radii*Number_of_Slices_segment_0) #define Number_of_bins_segment_0 ((Total_bins_segment_0)+1) #define Number_of_time_bin 3000 #define min(a, b) (((a) < (b)) ? (a) : (b)) extern int errno; char *strerror(int errnum);

Page 114: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

94 | Appendix A: The parselist program

char *program_name; int singles_scale_factor=0; int verbose_flag=0; /* 0 turns off verbose printing of messages */ int all_segments_flag=0; /* by default only extract segment 0 */ int *Bins; int Number_of_bins; unsigned long int last_time_stamp; int process_events_flag; /* only process events during the selected time range */ long int statistics[16]; /* to record the number times of each 4 bit prefix appears */ char statistics_name[16][Maximum_description_string]={ "Delay_0","Delay_1","Delay_2","Delay_3", "Prompt_4", "Prompt_5", "Prompt_6", "Prompt_7", "TAG_1_Elapsed_Time_Marker_8", "TAG_1_Elapsed_Time_Marker_9", "TAG_1_Dead_Time_Tracking_A", "TAG_1_Dead_Time_Tracking_B", "TAG_2_Gantry_Motions_and_Positions_C", "TAG_2_Gantry_Motions_and_Positions_D", "TAG_3_Patient_Monitoring_Gating_Physiological_Head_Tracking_E", "TAG_4_Control_or_Acquisition_Parameters" }; void process_an_event_packet_Prompt(unsigned int UL_value) { unsigned int bin_number; bin_number = UL_value & 0x3FFFFFFF; if (bin_number < Number_of_bins) Bins[bin_number]=Bins[bin_number]+1; if (verbose_flag) fprintf(stdout, "Prompt event %8.8X \n", bin_number); } void process_an_event_packet_Delay(unsigned int UL_value) { unsigned int bin_number; bin_number = UL_value & 0x3FFFFFFF; if (bin_number < Number_of_bins) Bins[bin_number]=Bins[bin_number]+1; if (verbose_flag){

Page 115: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix A: The parselist program | 95

fprintf(stdout, "Delay event %8.8X\n ", bin_number); } } void process_TAG_1_Elapsed_Time_Marker(unsigned int UL_value,unsigned int *elapsed_time) { *elapsed_time = UL_value & 0x1FFFFFFF; verbose_flag=0; if (verbose_flag) { fprintf(stdout, "TAG_1_Time_Marker %d milliseconds", *elapsed_time); fprintf(stdout, "UL_value %d\n", UL_value); } last_time_stamp=*elapsed_time; if (verbose_flag) fprintf(stdout, "TAG_1_Time_Marker %d milliseconds\n", *elapsed_time); } /* * Dead-Time Tracking (Legacy Block Singles) * 101B BBBB BBBB BSSS SSSS SSSS SSSS SSSS * |9 0||18 0| * B: Block Number : 0-9 * S: Singles per second (per 0.25 sec. May-02; per 0.125 sec. Aug-07): 0-18 */ void process_TAG_1_Dead_Time_Tracking(UL_value) { unsigned int block_number; unsigned int singles_field; unsigned int data_field; unsigned int type_field; unsigned int lost_field; type_field = (UL_value >> 26) & 0x7; switch (type_field) { case 0: block_number = (UL_value & 0x1FFFFFFF) >> 19; singles_field= UL_value & 0x0007FFFF; if (verbose_flag) if (singles_scale_factor != 0) { fprintf(stdout, "TAG_1_Dead_Time_Tracking block %d, %d singles per

Page 116: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

96 | Appendix A: The parselist program

second\n", block_number, singles_field*singles_scale_factor); } else { fprintf(stdout, "TAG_1_Dead_Time_Tracking block %d singles_field %d\n", block_number, singles_field); } break; case 6: case 7: lost_field = (UL_value & 0x000FFFFF); fprintf(stdout, "TAG_1_Dead_Time_Tracking Lost Event Counter, %d per 1M events\n", lost_field); break; default: fprintf(stdout, "TAG_1_Dead_Time_Tracking block - unknown type field = %d\n", type_field); } } void process_TAG_2_Gantry_Motions_and_Positions(UL_value) { /* Detector Rotation Position To be extracted and applied by the Rebinner in PET/ SPECT PET mode. 1100 0000 BAFF FFFF FFFF FFFF PPPP PPPP |13 0| |7 0| P: PET Rotational Position: 0-7 [For PET mode nee d 0 - 255d for 0-360 o - wfj] F: Full Precision Rot. Position: 0-13 [Useful for SPECT] A: CW Rotation: 0 [ 1 = clockwise gantry rotation as viewed from bed side] B: CCW Rotation: 0 [ 1 = counterclockwise gantry r otation as viewed from bed side] Note: (A=0 & B=0) indicates non-rotating gantry. Head I "A" Radial Position 1100 0001 uuuu uuuu uuuR RRRR RRRR RRRR |12 0| u: Undefined (Default: Set to zero.) R: Radial Position: 0-12 Head II "B" Radial Position 1100 0010 uuuu uuuu uuuR RRRR RRRR RRRR |12 0| u: Undefined (Default: Set to zero.) R: Radial Position: 0-12 Vertical Bed Position 1100 0011 uuuu uuuu uuVV VVVV VVVV VVVV

Page 117: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix A: The parselist program | 97

|13 0| u: Undefined (Default: Set to zero.) V: Vertical Position: 0-13 Horizontal Bed Position 1100 0100 uuuM HHHH HHHH HHHH HHHH HHHH |19 0| u: Undefined (Default: Set to zero.) H: Horizontal Position: 0-19 [Note: F or VG30 on Nov-2010 and later mCT systems, this 20- bit H value is always a 2’s complement number. When H is near zero - e.g. H = -1(dec) or FFFFF(hex), the bed approaches (or is) fully retrac ted from the FOV. When H is at its largest negative extent, the bed is fully extended into the FOV. The LSB of H represents 0.001cm of horizontal bed movement. In typical practice, the a ctual precision reported by the PHS has been limited to 0.05cm – i.e. the minimum increment/decr ement change for H is 50(dec).] M: Moving. Single Bit. Set to 0 if horizontal bed m otion is unchanging. Set to 1 if horizontal bed motion is changing. [This bit was requested but imp lementation may be pending.] Example 32-bit Horiz. Bed Pos. Tag packet (hex) wit h H = 0: C400 0000 (hex) Gantry Left/Right Position 1100 0101 uuuu uuuu uuuP PPPP PPPP PPPP |12 0| u: Undefined (Default: Set to zero.) P: Gantry Left/Right Position: 0-12 [-2287 to 508 decimal in 0.1 mm steps] ( Positive to the left as viewed from bed side of g antry) Guideline to the PETLINK™ Proposal 26-Mar-2013 Rev J1 Page 8 Source Axial Position & Rotation (Point Source, Rotating Rod, etc.) 1100 0110 AAAA AAAA AAAA RRRR RRRR RRRR |11 0| |11 0| A: Axial Position: 0-11 R: Rotational Position: 0-11 HRRT Single Photon Source Position 1100 0111 uuuu HHHH AAAA AAAA RRRR RRRR 3210 |7 0| |7 0| u: Undefined (Default: Set to zero.) H: Head Number: 0-3 A: Axial Position: 0-7 R: Rotational Position (within the Head): 0-7

Page 118: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

98 | Appendix A: The parselist program

*/ if (verbose_flag) fprintf(stdout, "TAG_2_Gantry_Motions_and_Positions %8.8X ", UL_value & 0x1FFFFFFF); } void process_TAG_3_Patient_Monitoring_Gating_Physiological_Head_Tracking(UL_value) { if (verbose_flag) fprintf(stdout, "TAG_3_Patient_Monitoring_Gating_Physiological_Head_Tracking %8.8X ", UL_value); } void process_TAG_4_Control_or_Acquisition_Parameters(unsigned int UL_value) { if (verbose_flag) fprintf(stdout, "TAG_4_Control_or_Acquisition_Parameters %8.8X ", UL_value); } int parse_header_file(char *file_name) { FILE *header_file; char * line = NULL; size_t line_length = 0; size_t amount_read; char *scan_match; char key[Maximum_key_length]; if (verbose_flag) fprintf(stdout, "parse_header file: %s\n", file_name); header_file=fopen(file_name,"rb"); if (header_file < 0) { fprintf(stderr, "error opening file: %s\n", file_name); return(-1); } while ((amount_read = getline(&line, &line_length, header_file)) != -1) { // printf("Retrieved line of length %zu :\n", amount_read); // printf("%s", line); // %singles scale factor:=8 strncpy(key, "%singles scale factor:=", Maximum_key_length-1); // fprintf(stdout, "key is %s\n", key);

Page 119: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix A: The parselist program | 99

scan_match=strstr(line, key); if (scan_match != NULL) { sscanf(&line[strlen(key)], "%d", &singles_scale_factor); fprintf(stdout, "FOUND: singles scale factor:=%d\n", singles_scale_factor); } } if (line_length) free(line); fclose(header_file); } void Output_Slice(FILE *fp, int i) { int slice_offset; slice_offset = i * Number_of_angles * Number_of_radii; fwrite(&Bins[slice_offset], sizeof(int), (Number_of_angles * Number_of_radii), fp); //fprintf(stdout, ":=%d\n", slice_offset); } /* * check_for_dicom_header * int amount_in_buffer # amount of entries in the buffer that are valid * * return -1 if a DICOM header is not found, * return offset if a DICOM header is found */ int check_for_dicom_header(unsigned int *big_buffer, size_t amount_in_buffer) { int event_word_index; unsigned int UL_value; int number_of_zeros=0; fprintf(stderr, "entering check_for_dicom_header(%ld)\n", (long int) amount_in_buffer); for (event_word_index=0; event_word_index < amount_in_buffer; event_word_index++) { UL_value = big_buffer[event_word_index]; #ifdef NEVER fprintf(stdout, "%d ", event_word_index); fprintf(stdout, "%8.8X\n", UL_value);

Page 120: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

100 | Appendix A: The parselist program

#endif if (UL_value == 0) { number_of_zeros++; continue; } if ((number_of_zeros >= 32) && (UL_value == 0x4D434944 )) { /* "DICM" = 0x4449434d check in reverse order*/ /* we found a DICOM header */ fprintf(stdout, "We found a DICOM header at %d\n", event_word_index); return (event_word_index-32); } number_of_zeros=0; } return -1; } void init_Bins() { int i; for (i=0; i < Number_of_bins; i++) Bins[i]=0; fprintf(stdout, "Initialized %d bins\n", Number_of_bins); } void init_statistics() { int i; for (i=0; i < 16; i++) { statistics[i]=0; } } void output_sinogram(char *file_base_name, unsigned int start_time_period, unsigned int end_time_period) { FILE *sinogram_file; int i; int sum=0; char output_file_name[Maximum_file_name_length];

Page 121: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix A: The parselist program | 101

for (i=0; i < 16; i++) { fprintf(stdout, "statistics[%d]=%ld\t%s\n", i, statistics[i], statistics_name[i]); } fprintf(stdout, "last time stamp = %ld milliseconds = %f minutes\n", last_time_stamp, (float)last_time_stamp/(float)(1000*60)); memset(output_file_name, 0, Maximum_file_name_length); sprintf(output_file_name, "%s.sinogram.s%010de%010d", file_base_name, start_time_period, end_time_period); sinogram_file=fopen(output_file_name,"wb"); if (all_segments_flag) { for (i=0; i < Number_of_Slices_segment_all; i++) Output_Slice(sinogram_file, i); } else { for (i=0; i < Number_of_Slices_segment_0; i++) Output_Slice(sinogram_file, i); } fclose(sinogram_file); for (i=0; i < Number_of_bins; i++) sum=sum+Bins[i]; fprintf(stdout, "sum of Bins entries %d\n", sum); if (all_segments_flag) { fprintf(stdout, "Number of slice segments %d\n", Number_of_Slices_segment_all); } else { fprintf(stdout, "Number of slice segments %d\n", Number_of_Slices_segment_0); } } void usage() { fprintf(stdout, "%s file_name start_seconds end_seconds ::does specific duration\n", program_name); fprintf(stdout, "%s file_name duration_in_seconds ::does whole file with specified duration\n", program_name); fprintf(stdout, "%s file_name ::does whole file in 1 minute parts\n", program_name); fprintf(stdout, "use the flag -a if you want to get all 7 segements\n"); fprintf(stdout, "use the flag -v if you want verbose mode\n"); fprintf(stdout, "use the flag -h or just the program name to get usage information\n"); }

Page 122: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

102 | Appendix A: The parselist program

int main(int argc, char **argv) { int i; int arg_index; int call_number=0; int dicom_header_flag=0; int dicom_header_offset; int extract_all; int file_name_length; int ptd_flag; int zero_bins=0; long int file_offset; long int length_of_file; long int number_of_list_entries; /* must be a long int to accommodate lists larger than 4 Gbytes */ long int event_word_index=0; /* - ditto - above */ unsigned int *big_buffer; unsigned int elapsed_time; unsigned int start_time_period, end_time_period; /* starting and ending time in milliseconds */ unsigned int duration_in_ms; unsigned int nth_time_period=1; unsigned int UL_value; char *file_name; char file_base_name[Maximum_file_name_length]; char header_file_name[Maximum_file_name_length]; FILE *list_file; FILE *header_file; size_t amount_read; size_t amount_written; size_t option_index; verbose_flag = 0; /* silent mode 0 */ ptd_flag = 0; /* check for ptd file */ /* parse the command line argument(s) to the program */ if (verbose_flag) fprintf(stderr, "argc = %d\n", argc); program_name = argv[0]; /* if there is only the name of the program then print out usage instructions */

Page 123: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix A: The parselist program | 103

if (argc == 1) { usage(); return(-1); } arg_index=1; do { char const *option = argv[arg_index]; /* check each of the arguments to see if it is an option or positional argument */ if (option[0] == '-') { switch (option[1]) { case 'v': verbose_flag = 1; break; case 'a': all_segments_flag=1; break; case 'h': usage(); return(-1); default: fprintf(stderr, "unrecognized flag %c\n", option[1]); usage(); return(-1); } } else { file_name = argv[arg_index]; fprintf(stdout, "file_name = %s, and arg_index = %d\n", file_name, arg_index); arg_index++; /* used an argument */ list_file=fopen(file_name,"rb"); if (list_file == NULL) { fprintf(stderr, "error opening file: %s, errno = %d, %s \n", file_name, errno, strerror(errno)); return(-1); } if (verbose_flag) fprintf(stdout, "( argc - arg_index ) = %d\n", argc - arg_index); switch(argc - arg_index) { case 0: /* no remaining arguments */ start_time_period=0; end_time_period=0; duration_in_ms=60000; extract_all=1; /* extract multiple sinograms */

Page 124: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

104 | Appendix A: The parselist program

process_events_flag=1; /* immediate start processing events */ break; case 1: /* specify a single duration*/ start_time_period=0; end_time_period=0; duration_in_ms=atoi(argv[arg_index])*1000; extract_all=1; /* extract multiple sinograms */ process_events_flag=1; /* immediate start processing events */ arg_index++; /* used another argument */ break; case 2: /* specify a specific duration */ start_time_period=atoi(argv[arg_index])*1000; end_time_period=atoi(argv[arg_index+1])*1000; duration_in_ms=end_time_period-start_time_period; extract_all=0; /* extract only one sinogram */ process_events_flag=0; /* wait to start processing events */ arg_index = arg_index + 2; /* used two arguments */ break; default: fprintf(stderr, "too many arguments\n"); usage(); return(-1); } } arg_index++; if (verbose_flag) fprintf(stderr, " at end of while loop arg_index = %d\n", arg_index); } while ( arg_index < argc); if (end_time_period == 0) { fprintf(stdout, "starting time offset = %d milliseconds\n", start_time_period); } else fprintf(stdout, "starting time offset = %d milliseconds, ending time = %d milliseconds\n", start_time_period, end_time_period); fprintf(stdout, "duration_in_ms = %d milliseconds\n", duration_in_ms); if (extract_all) fprintf(stdout, "extract_all is true\n"); if (all_segments_flag) Number_of_bins =

Page 125: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix A: The parselist program | 105

(Number_of_angles*Number_of_radii*Number_of_Slices_segment_all); else Number_of_bins = (Number_of_angles*Number_of_radii*Number_of_Slices_segment_0); Bins = (int *)malloc(sizeof(int)*(Number_of_bins+1)); if (Bins == NULL) { fprintf(stderr, "error in malloc of Bins\n"); return(-1); } /* read in the whole list */ memset(file_base_name, 0, Maximum_file_name_length); memset(header_file_name, 0, Maximum_file_name_length); if (strcasestr(file_name, ".ptd") != 0) { fprintf(stderr, "This is a ptd file %s\n", file_name); ptd_flag = 1; } else { ptd_flag = 0; } file_offset = 0; if (verbose_flag) fprintf(stdout, "initial file_offset %d \n", file_offset); fseek(list_file, file_offset, SEEK_END); length_of_file=ftell(list_file); if (verbose_flag) fprintf(stdout, "length of list_file= %ld\n", length_of_file); rewind(list_file); file_offset=ftell(list_file); if (verbose_flag) fprintf(stdout, "file_offset should be at start, it is at %ld \n", file_offset); big_buffer=(unsigned int *)malloc((size_t)length_of_file); if (big_buffer == NULL) { fprintf(stderr, "error in malloc of buffer\n"); goto clean_up; } amount_read=fread(big_buffer,1,length_of_file,list_file); fprintf(stdout, "amount_read is %ld\n", amount_read); if (amount_read == 0) { goto clean_up; } number_of_list_entries = (long int)(amount_read/sizeof(unsigned int)); fprintf(stdout, "number_of_list_entries is %ld\n",

Page 126: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

106 | Appendix A: The parselist program

number_of_list_entries); init_Bins(); init_statistics(); fprintf(stderr, "ptd flag = %d\n", ptd_flag); if (ptd_flag) { dicom_header_offset = check_for_dicom_header(big_buffer, number_of_list_entries); if (dicom_header_offset > 0) { fprintf(stderr, "number of list entries %d, found dicom header at %d\n", number_of_list_entries, dicom_header_offset); } number_of_list_entries = dicom_header_offset; fprintf(stderr, "new number of list entries %d\n", number_of_list_entries); } for (event_word_index=0; event_word_index < number_of_list_entries; event_word_index++) { UL_value = big_buffer[event_word_index]; if (verbose_flag) { fprintf(stdout, "%d ", event_word_index); //fprintf(stdout, "%8.8X ", UL_value); } statistics[UL_value >> 28]++; switch (UL_value >> 28 ) { case 0: case 1: case 2: case 3: if (process_events_flag) process_an_event_packet_Delay(UL_value); break; case 4: case 5: case 6: case 7: if (process_events_flag) process_an_event_packet_Prompt(UL_value); break; case 0x8: case 0x9: process_TAG_1_Elapsed_Time_Marker(UL_value,&elapsed_time); if (elapsed_time >= start_time_period) process_events_flag=1; /* start processing events */ else process_events_flag=0; /* do not process event */

Page 127: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix A: The parselist program | 107

if (elapsed_time >= (start_time_period + (nth_time_period*duration_in_ms))) { fprintf(stdout, "ending with TAG_1_Time_Marker %d milliseconds\n", elapsed_time); output_sinogram(file_base_name, start_time_period + ((nth_time_period-1)*duration_in_ms), elapsed_time); /* if we are only to extract a single slide then finish up */ if (extract_all == 0) goto clean_up; /* re-initialize the Bins and statistics vectors */ init_Bins(); init_statistics(); process_events_flag=1; /* keep processing events */ nth_time_period++; /* increment the time period */ } break; case 0xA: case 0xB: if (process_events_flag) process_TAG_1_Dead_Time_Tracking(UL_value); break; case 0xC: case 0xD: if (process_events_flag) process_TAG_2_Gantry_Motions_and_Positions(UL_value); break; case 0xE: if (process_events_flag) process_TAG_3_Patient_Monitoring_Gating_Physiological_Head_Tracking(UL_value & 0x0FFFFFFF); break; case 0xF: if (process_events_flag) process_TAG_4_Control_or_Acquisition_Parameters(UL_value & 0x0FFFFFFF); break; } if (verbose_flag) fprintf(stdout, "\n"); /* At the end of the list output the final sinogram */ if (event_word_index == (number_of_list_entries-1)) { fprintf(stdout, "ending with last word in list at %d milliseconds\n", elapsed_time); output_sinogram(file_base_name, start_time_period +

Page 128: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

108 | Appendix A: The parselist program

((nth_time_period-1)*duration_in_ms), elapsed_time); goto clean_up; } } return(0); clean_up: fclose(list_file); return(1); }

Page 129: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix B: OSMAPOSL parameter file | 109

Appendix B: OSMAPOSL parameter file

OSMAPOSLParameters := ;lines starting with semicolons are comments objective function type:= \ PoissonLogLikelihoodWithLinearModelForMeanAndProjData PoissonLogLikelihoodWithLinearModelForMeanAndProjData Parameters:= ; input, sensitivity and prior parameters here input file := name_of_input_file.hs ; use -1 to use the maximum available maximum absolute segment number to process := 0 zero end planes of segment 0 := 1 ; keywords that specify the projectors to be used Projector pair type := Matrix Projector Pair Using Matrix Parameters := ; Use the PET Ray-tracing matrix. ; This needs to be changed to SPECT UB when using SPECT data Matrix type := Ray Tracing Ray Tracing Matrix Parameters:= End Ray Tracing Matrix Parameters:= End Projector Pair Using Matrix Parameters := ; background (e.g. randoms) additive sinogram := 0 ; sensitivity related keywords ; time frame info used for dead-time calculation when using ECAT7 ;time frame definition filename:= ;time frame number:= 1 ; normalisation and attenuation info ; Bin Normalisation type:= None recompute sensitivity := 1 use subset sensitivities:=1 ; recommended ; optional filename to store/read the sensitivity image ; (if use subset sensitivity is off) ;sensitivity filename:= ; optional filename to store/read the subsensitivities ; use %d where you want the subset-number (a la printf) subset sensitivity filenames:= sens_%d.hv ; keywords for specifying the prior information prior type := None ; next keywords can be used to specify image size, but will be removed ; they are ignored when using an initial image zoom := 1 ; use --1 for default sizes that cover the whole field of view XY output image size (in pixels) := -1 end PoissonLogLikelihoodWithLinearModelForMeanAndProjData Parameters:= ; set output file format, if omitted a default value will be used Output file format := Interfile Interfile Output File Format Parameters := ; byte order := little-endian ; number format := signed integer ; number of bytes per pixel := 4 End Interfile Output File Format Parameters := initial estimate:= 1 (or an estimate_image_file.hv)

Page 130: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

110 | Appendix B: OSMAPOSL parameter file

number of subsets:= 12 start at subset:= 0 number of subiterations:= 4 start at subiteration number:=1 output filename prefix := name_of_output_file save estimates at subiteration intervals:= 2 uniformly randomise subset order:= 1 ; keywords that specify the filtering that occurs after every subiteration ; warning: do not normally use together with a prior inter-iteration filter subiteration interval := 4 inter-iteration filter type := Separable Cartesian Metz ; keywords below will depend on the filter type (see text) separable cartesian metz filter parameters := x-dir filter fwhm (in mm) := 6 y-dir filter fwhm (in mm) := 6 z-dir filter fwhm (in mm) := 6 ; use some sharpening here as example (not really recommended though) x-dir filter metz power := 2 y-dir filter metz power := 2 z-dir filter metz power := 2 end separable cartesian metz filter parameters := ; keywords that specify the filtering that occurs at the end ; of the reconstruction post-filter type := None ; keywords that specify the filtering that occurs before ; multiplying with the update image inter-update filter subiteration interval := 4 ; would have to be filled in. inter-update filter type := None map model := additive ; keywords for preventing too drastic (multiplicative) updates ; below just set to their default values maximum relative change := 3.40282e+38 minimum relative change := 0 ; enabling this will write the multiplicative update images ; every sub-iteration write update image := 0 END :=

Page 131: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

App

ProjextrSTIR

Figur

Figur

pendix C:

jection sliceact_segmentR before the

re AC-1: s

re AC-2: tt

Detailed r

es from thet utilties werSiemens sca

Projection slicsinogram of thleft, the axial, c

Projection slicthe SSRB was the axial, coro

results

e volume ore applied, a

anner data wa

es after the SShe syringe befocoronal, and sa

es derived fromused before th

nal, and sagitta

of the sinoand from theas properly t

SRB and extracore the problemagittal slice.

m the volume bhe problems ofal slice.

ogram prode back_projetranslated.

ct_segment utims with the STI

by back projecf the STIR head

Appendix

uced after ect utility (FB

lities were appIR headers wer

cting the syringders were solv

C: Detailed result

the SSRB BP2D) applie

plied to the re solved. From

ge data on whived. From the le

ts | 111

and ed in

m the

ch eft,

Page 132: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald
Page 133: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix D: Source code for list decimation | 113

Appendix D: Source code for list decimation

/* * frac-decimate-list.c * Read a Siemens PET event list from the KI/KS and decimate it (i.e., leave out a certain fraction of the events) * * * compile with: * gcc -g frac-decimate-list.c -lm -o fracdecimatelist * * run with: * ./frac-decimate-list.c filename.dcm decimation_ratio * * a decimation_ratio of 0.9, keep 90% of events * a decimation_ratio of 0.8, keep 80% of event * ... * * use the flag -v if you want verbose mode * use the flag -h or just the program name to get usage information */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #define Maximum_file_name_length 1000 #define min(a, b) (((a) < (b)) ? (a) : (b)) extern int errno; char *strerror(int errnum); char *program_name; int verbose_flag=0; /* 0 turns off verbose printing of messages */ float decimation_ratio; int prompt_event_number=0; int delayed_event_number=0; unsigned long int last_time_stamp; unsigned long int number_of_events_output=0; /**

Page 134: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

114 | Appendix D: Source code for list decimation

* strnstr - Find the first substring in a length-limited string * s1: The string to be searched * s2: The string to search for * len: the maximum number of characters to search */ char *strnstr(const char *s1, const char *s2, size_t len) { size_t l1 = len, l2; l2 = strlen(s2); if (!l2) return (char *)s1; while (l1 >= l2) { l1--; if (!memcmp(s1, s2, l2)) return (char *)s1; s1++; } return NULL; } void output_event(unsigned int value, FILE *fp) { size_t written_amount; written_amount = fwrite(&value, sizeof(unsigned int), (long)1, fp); if ( feof(fp) || ferror(fp)) fprintf(stderr, "Error writing to output list at event %ld, \n", number_of_events_output); number_of_events_output++; } void usage() { fprintf(stdout, "%s file_name decimation_ratio ::does specified decimation\n", program_name); fprintf(stdout, "use the flag -v if you want verbose mode\n"); fprintf(stdout, "use the flag -h or just the program name to get usage information\n"); } int main(int argc, char **argv) { int i; int arg_index;

Page 135: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix D: Source code for list decimation | 115

int dicom_header_flag=0; int dicom_header_offset; int file_name_length; /* for parsing your way through the DICOM header */ int keynumb=0; int group; int element; int length; int Interfile_header_found = 0; /* this is set to non-zero once the Interfile header is found */ int Interfile_header_offset; int Interfile_header_length; char *Interfile_header_original; /* copy the original header */ char *Interfile_header_new; /* modified copy of the header */ char number_of_events_in_list_as_string_original[32]; char number_of_events_in_list_as_string_new[32]; char *number_of_events_in_list_pointer; char *number_of_event_pointer; const char *event_count_key = "%total listmode word counts"; int number_of_events_in_list_as_string_original_length; int number_of_events_in_list_as_string_new_length; int start_of_number; int remaining_length; long int file_offset; long int length_of_file; long int number_of_list_entries; /* must be a long int to accommodate lists larger than 4 Gbytes */ long int event_word_index=0; /* - ditto - above */ long int final_length_offset; long int list_offset; unsigned int final_lenth = 0; /* place holder */ unsigned char *big_buffer; unsigned int UL_value; char *file_name; char file_base_name[Maximum_file_name_length]; char output_file_name[Maximum_file_name_length]; FILE *list_file; FILE *outputlist_file; int outputlist_file_is_open=0; size_t amount_read; size_t amount_written;

Page 136: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

116 | Appendix D: Source code for list decimation

size_t option_index; unsigned int seed; /* seed for random number generator */ int random_integer; verbose_flag = 0; /* silent mode 0 */ /* parse the command line argument(s) to the program */ if (verbose_flag) fprintf(stderr, "argc = %d\n", argc); program_name = argv[0]; /* if there is only the name of the program then print out usage instructions */ if (argc == 1) { usage(); return(-1); } arg_index=1; do { char const *option = argv[arg_index]; /* check each of the arguments to see if it is an option or positional argument */ if (option[0] == '-') { switch (option[1]) { case 'v': verbose_flag = 1; break; case 'h': usage(); return(-1); default: fprintf(stderr, "unrecognized flag %c\n", option[1]); usage(); return(-1); } } else { file_name = argv[arg_index]; fprintf(stdout, "file_name = %s, and arg_index = %d\n", file_name, arg_index); arg_index++; /* used an argument */ list_file=fopen(file_name,"rb"); if (list_file == NULL) { fprintf(stderr, "error opening file: %s, errno = %d, %s \n", file_name, errno, strerror(errno));

Page 137: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix D: Source code for list decimation | 117

return(-1); } if (verbose_flag) fprintf(stdout, "( argc - arg_index ) = %d\n", argc - arg_index); switch(argc - arg_index) { case 0: /* no remaining arguments: default decimate by 0.5 */ decimation_ratio=0.5; arg_index++; /* used another argument */ break; case 1: /* specify a decimation ratio*/ decimation_ratio=atof(argv[arg_index]); arg_index++; /* used another argument */ break; default: fprintf(stderr, "too many arguments\n"); usage(); return(-1); } } arg_index++; if (verbose_flag) fprintf(stderr, " at end of while loop arg_index = %d\n", arg_index); } while ( arg_index < argc); fprintf(stdout, "decimation ratio = %f\n", decimation_ratio); memset(file_base_name, 0, Maximum_file_name_length); strncpy(file_base_name, file_name, strlen(file_name)-4); fprintf(stdout, "base name = %s\n", file_base_name); /* read in the whole list */ file_offset = 0; if (verbose_flag) fprintf(stdout, "initial file_offset %d \n", file_offset); fseek(list_file, file_offset, SEEK_END); length_of_file=ftell(list_file); if (verbose_flag) fprintf(stdout, "length of list_file= %ld\n", length_of_file); rewind(list_file);

Page 138: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

118 | Appendix D: Source code for list decimation

file_offset=ftell(list_file); if (verbose_flag) fprintf(stdout, "file_offset should be at start, it is at %ld \n", file_offset); big_buffer=(unsigned char *)malloc((size_t)length_of_file); if (big_buffer == NULL) { fprintf(stderr, "error in malloc of buffer\n"); goto clean_up; } amount_read=fread(big_buffer,1,length_of_file,list_file); fprintf(stdout, "amount_read is %ld\n", amount_read); if (amount_read == 0) { goto clean_up; } /* Process the DICOM header */ /* skip first 128 bytes */ file_offset=128; /* sanity check for "DICM" */ if ((strncmp(&big_buffer[file_offset], "DICM", 4)) == 0) fprintf(stdout, "possibly a DICOM file\n"); else fprintf(stdout, "not a DICOM file\n"); // fprintf(stdout, "%c %x", big_buffer[file_offset]); file_offset = file_offset + 4; /* parse through the DICOM header to find the list mode data */ for (keynumb=0; keynumb < 1000; keynumb++) { group = big_buffer[file_offset+1]*256 + big_buffer[file_offset]; element = big_buffer[file_offset+3]*256 + big_buffer[file_offset+2]; /* if (verbose_flag) */ fprintf(stdout, "%d ", file_offset); /* if (verbose_flag) */ fprintf(stdout, "%4.4X,%4.4X ", group, element); if (group == 0x7FE1 && element == 0x1010) { /* we have reached the data */ fprintf(stdout, "Data ...\n", group, element); goto process_list; break; } if (group == 0x7FE0 && element == 0x0010) { /* we have reached the data */ /* if (verbose_flag) */ fprintf(stdout, "Data* ...\n", group, element); break; }

Page 139: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix D: Source code for list decimation | 119

if ((strncmp(&big_buffer[file_offset+4], "UL", 2)) == 0) { fprintf(stdout, "UL"); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; UL_value = big_buffer[file_offset+11]<< 24 | big_buffer[file_offset+10]<< 16 | big_buffer[file_offset+9]<< 8 | big_buffer[file_offset+8]; if (verbose_flag) fprintf(stdout, "UL length=%d, value=%8.8x\n", length, UL_value); // fprintf(stdout, "%2.2X%2.2X %2.2X%2.2X\n", big_buffer[file_offset+8],big_buffer[file_offset+9], big_buffer[file_offset+10],big_buffer[file_offset+11]); file_offset = file_offset + 12; continue; } if ((strncmp(&big_buffer[file_offset+4], "OB", 2)) == 0) { fprintf(stdout, "OB "); if ((big_buffer[file_offset+6] == 0) && (big_buffer[file_offset+7] == 0)) length = big_buffer[file_offset+11]<<8 | big_buffer[file_offset+10]<<8 | big_buffer[file_offset+9]<<8 | big_buffer[file_offset+8]; else fprintf(stdout, "byte following OB is %4.4x", big_buffer[file_offset+6]); if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+12+i]); file_offset = file_offset + 12 + length; } else { file_offset = file_offset + 12; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "OW", 2)) == 0) { fprintf(stdout, "OW "); if ((big_buffer[file_offset+6] == 0) && (big_buffer[file_offset+7] == 0)) length = big_buffer[file_offset+11]<<8 | big_buffer[file_offset+10]<<8 | big_buffer[file_offset+9]<<8 | big_buffer[file_offset+8]; else fprintf(stdout, "byte following OW is %4.4x", big_buffer[file_offset+6]); if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+12+i]);

Page 140: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

120 | Appendix D: Source code for list decimation

file_offset = file_offset + 12 + length; } else { file_offset = file_offset + 12; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "SQ", 2)) == 0) { fprintf(stdout, "SQ "); if ((big_buffer[file_offset+6] == 0) && (big_buffer[file_offset+7] == 0)) length = big_buffer[file_offset+11]<<8 | big_buffer[file_offset+10]<<8 | big_buffer[file_offset+9]<<8 | big_buffer[file_offset+8]; else fprintf(stdout, "byte following SQ is %4.4x", big_buffer[file_offset+6]); if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+12+i]); file_offset = file_offset + 12 + length; } else { file_offset = file_offset + 12; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "UI", 2)) == 0) { fprintf(stdout, "UI "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else { file_offset = file_offset + 8; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "SH", 2)) == 0) { fprintf(stdout, "SH "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++)

Page 141: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix D: Source code for list decimation | 121

fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else { file_offset = file_offset + 8; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "CS", 2)) == 0) { fprintf(stdout, "CS "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else { file_offset = file_offset + 8; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "DA", 2)) == 0) { fprintf(stdout, "DA "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else { file_offset = file_offset + 8; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "TM", 2)) == 0) { fprintf(stdout, "TM "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length;

Page 142: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

122 | Appendix D: Source code for list decimation

} else { file_offset = file_offset + 8; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "DT", 2)) == 0) { fprintf(stdout, "TM "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else { file_offset = file_offset + 8; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "LO", 2)) == 0) { fprintf(stdout, "LO "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else file_offset = file_offset + 8; fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "LT", 2)) == 0) { fprintf(stdout, "LT "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else file_offset = file_offset + 8; fprintf(stdout, "\n"); continue; }

Page 143: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix D: Source code for list decimation | 123

if ((strncmp(&big_buffer[file_offset+4], "ST", 2)) == 0) { fprintf(stdout, "ST "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else { file_offset = file_offset + 8; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "PN", 2)) == 0) { fprintf(stdout, "PN "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else { file_offset = file_offset + 8; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "AS", 2)) == 0) { fprintf(stdout, "AS "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else { file_offset = file_offset + 8; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "DS", 2)) == 0) {

Page 144: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

124 | Appendix D: Source code for list decimation

fprintf(stdout, "DS "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else file_offset = file_offset + 8; fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "IS", 2)) == 0) { fprintf(stdout, "IS "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else { file_offset = file_offset + 8; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "FD", 2)) == 0) { fprintf(stdout, "FD "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else { file_offset = file_offset + 8; } fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "US", 2)) == 0) { fprintf(stdout, "US "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) {

Page 145: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix D: Source code for list decimation | 125

fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else file_offset = file_offset + 8; fprintf(stdout, "\n"); continue; } if ((strncmp(&big_buffer[file_offset+4], "FL", 2)) == 0) { fprintf(stdout, "FL "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); file_offset = file_offset + 8 + length; } else file_offset = file_offset + 8; fprintf(stdout, "\n"); continue; } fprintf(stdout, "XX "); length = big_buffer[file_offset+7]<<8 | big_buffer[file_offset+6] | big_buffer[file_offset+5]<<8 | big_buffer[file_offset+4]; if (length != 0) { fprintf(stdout, "length=%d, value=", length); for (i=0; i < length; i++) fprintf(stdout, "%c", big_buffer[file_offset+8+i]); if (group == 0x0029 && element == 0x1010) { /* we have reached the Interfile header, remember where we are and how long it is */ Interfile_header_found = 1; Interfile_header_offset = file_offset+8; /* the extra 8 are to avoid writing on the group, element, and length values */ Interfile_header_length = length; fprintf(stdout, "Interfile header found at offset = %d, of length = %d\n", Interfile_header_offset, Interfile_header_length); /* save the current Interfile header */ Interfile_header_original=(unsigned char *)malloc((size_t)length); memset(Interfile_header_original, 0, length); for (i=0; i < length; i++) Interfile_header_original[i] = big_buffer[file_offset+8+i]; if (verbose_flag) {

Page 146: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

126 | Appendix D: Source code for list decimation

fprintf(stdout, "saved away Interfile header as:\n"); for (i=0; i < length; i++) fprintf(stdout, "%c", Interfile_header_original[i]); fprintf(stdout, "\n"); } } file_offset = file_offset + 8 + length; fprintf(stdout, "\n"); continue; } else { fprintf(stdout, "length=%d", length); file_offset = file_offset + 8; fprintf(stdout, "\n"); continue; } fprintf(stdout, "\n"); } fprintf(stderr, "Failed to find list mode data\n"); return(-1); process_list: /* create output list file */ memset(output_file_name, 0, Maximum_file_name_length); sprintf(output_file_name, "%s-decimated-by-%f.dcm", file_base_name, decimation_ratio); outputlist_file=fopen(output_file_name,"wb"); outputlist_file_is_open = 1; /* copy DICOM header to output list - to give it a DICOM header */ /* at this point file_offset+4 points to the start of where the length will later have to be written */ final_length_offset = file_offset+4; fwrite(big_buffer, sizeof(unsigned char), final_length_offset, outputlist_file); final_lenth = 0; /* place holder */ fwrite(&final_lenth, sizeof(unsigned int), (long int)1, outputlist_file); /* pointer to the start of the list data */ list_offset = final_length_offset + 4;

Page 147: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix D: Source code for list decimation | 127

seed = 2; srand(seed); number_of_list_entries = (long int)(amount_read - list_offset)/sizeof(unsigned int); fprintf(stdout, "number_of_list_entries is %ld\n", number_of_list_entries); for (event_word_index=0; event_word_index < number_of_list_entries; event_word_index++) { UL_value = big_buffer[event_word_index*4 + list_offset] + (big_buffer[event_word_index*4 + list_offset + 1] << 8) + (big_buffer[event_word_index*4 + list_offset + 2] << 16) + (big_buffer[event_word_index*4 + list_offset + 3] << 24); if (verbose_flag) { fprintf(stdout, "%d ", event_word_index); //fprintf(stdout, "%8.8X ", UL_value); } switch (UL_value >> 28 ) { case 0: case 1: case 2: case 3: random_integer = rand(); if ( ((float)random_integer/(float)RAND_MAX) < decimation_ratio) { output_event(UL_value, outputlist_file); } delayed_event_number++; break; case 4: case 5: case 6: case 7: random_integer = rand(); if ( ((float)random_integer/(float)RAND_MAX) < decimation_ratio) { output_event(UL_value, outputlist_file); } prompt_event_number++; break; case 0x8: case 0x9: output_event(UL_value, outputlist_file); break; case 0xA: case 0xB: output_event(UL_value, outputlist_file); break; case 0xC:

Page 148: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

128 | Appendix D: Source code for list decimation

case 0xD: output_event(UL_value, outputlist_file); break; case 0xE: output_event(UL_value, outputlist_file); case 0xF: output_event(UL_value, outputlist_file); break; } if (verbose_flag) fprintf(stdout, "\n"); /* At the end of the list output the final sinogram */ if (event_word_index == (number_of_list_entries-1)) { fprintf(stdout, "ending with last word in list\n"); goto clean_up; } } return(0); clean_up: fclose(list_file); if (outputlist_file_is_open) { rewind(outputlist_file); fseek(outputlist_file, final_length_offset, SEEK_CUR); if (number_of_events_output >> 30) { fprintf(stderr, "more than 4GB of events in list\n"); } final_lenth = (unsigned int)((number_of_events_output * 4 ) & 0xFFFFFFFF); fprintf(stdout, "final_lenth (i.e., number of events output) = %d\n", final_lenth); fwrite(&final_lenth, sizeof(unsigned int), (long int)1, outputlist_file); if (Interfile_header_found) { rewind(outputlist_file); fseek(outputlist_file, Interfile_header_offset, SEEK_CUR); /* update the number of events in the Interfile header - do this in a new copy */ Interfile_header_new=(unsigned char *)malloc((size_t)Interfile_header_length); memset(Interfile_header_new, 0, Interfile_header_length);

Page 149: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix D: Source code for list decimation | 129

/* clear the buffers to put the string version of the number of events in the list */ memset(number_of_events_in_list_as_string_original, 0, 32); memset(number_of_events_in_list_as_string_new, 0, 32); if (verbose_flag) fprintf(stdout, "Interfile header is %s\n", Interfile_header_original); /* in the original header look for the key "%total listmode word counts" */ number_of_events_in_list_pointer = strnstr(Interfile_header_original, event_count_key, (size_t)Interfile_header_length); if (number_of_events_in_list_pointer != NULL) { /* skip key */ number_of_events_in_list_pointer+= strlen(event_count_key); /* skip white space */ while (*number_of_events_in_list_pointer == ' ') { number_of_events_in_list_pointer++; } if (*number_of_events_in_list_pointer == ':') number_of_events_in_list_pointer++; if (*number_of_events_in_list_pointer == '=') number_of_events_in_list_pointer++; while (*number_of_events_in_list_pointer == ' ') { number_of_events_in_list_pointer++; } /* remember where the number is */ number_of_event_pointer = number_of_events_in_list_pointer; for (i=0; i < 32; i++) { if (*number_of_events_in_list_pointer == 0xd) break; number_of_events_in_list_as_string_original[i]=*number_of_events_in_list_pointer; number_of_events_in_list_pointer++; } number_of_events_in_list_as_string_original_length = strlen(number_of_events_in_list_as_string_original); fprintf(stdout, "number_of_events_in_list_as_string_original = %s, with string length = %d\n", number_of_events_in_list_as_string_original, number_of_events_in_list_as_string_original_length); fprintf(stdout, "original number of events = %s\n", number_of_events_in_list_as_string_original);

Page 150: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

130 | Appendix D: Source code for list decimation

/* strncpy(Interfile_header_new, Interfile_header_original, Interfile_header_length); */ sprintf(number_of_events_in_list_as_string_new, "%d", number_of_events_output); number_of_events_in_list_as_string_new_length = strlen(number_of_events_in_list_as_string_new); fprintf(stdout, "new number of events = %s, new length = %d\n", number_of_events_in_list_as_string_new, number_of_events_in_list_as_string_new_length); /* copy old Interfile header upto the start of the number of events to the new Interfile header */ start_of_number = (int)(number_of_event_pointer-Interfile_header_original); fprintf(stderr, "start_of_number = %d\n", start_of_number); strncpy(Interfile_header_new, Interfile_header_original, (size_t)start_of_number); /* insert new count */ strncpy(&Interfile_header_new[start_of_number], number_of_events_in_list_as_string_new, (size_t)number_of_events_in_list_as_string_new_length); /* copy remainder of header */ remaining_length = Interfile_header_length - (start_of_number + number_of_events_in_list_as_string_original_length); strncpy(&Interfile_header_new[start_of_number + number_of_events_in_list_as_string_new_length], &Interfile_header_original[start_of_number + number_of_events_in_list_as_string_original_length], (size_t)remaining_length); /* write out the update Interfile header - not that it must be exactly the same size as the original header */ fwrite(Interfile_header_new, sizeof(char), (long int)Interfile_header_length, outputlist_file); } else { fprintf(stderr, "unable to find key %s in Interfile header\n", event_count_key); } } fclose(outputlist_file); }

Page 151: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

Appendix D: Source code for list decimation | 131

return(1); }

Page 152: Dynamic PET visualization of bone remodeling using NaF-18866274/FULLTEXT01.pdf · Dynamic PET visualization of bone remodeling using NaF-18 Sabine Lee, Marilyn E. Noz, and Gerald

TRITA-ICT 2015:24

www.kth.se