I am starting to write up a lua script to block out pixel data (such as patient names on ultrasounds and CT dosage reports) as part of a research project that requires anonymized data. I have successfully gotten single frame images blocked out, but when multi-frame images are sent to Conquest, I get an error message "dgate64.exe has stopped working" message (details below). Conquest logs do not contain any information as to why it crashed.
Here's the lua script that I am running - this is in the VERY early stages. I will eventually research how to create a function with LUA so it's a little less repetitive. I will also eventually need to figure out how to tell the script to change multiple frames on multi-frame files (is there a way to get a count of frames?)... First things first is to figure out why it is crashing when trying to handle multi-frame images. The section of code it's choking on would be the code under the "-- US GE Logiq E9 normal images" comment
-- Script to anonymize pixels when certain conditions are met--uncomment below print statements (and last line of this document)for debugging--print('------ Anon Pixel script running --------')--print ('Manuf', Data.Manufacturer)--print ('SeriesNum', Data.SeriesNumber)--print ('Modality', Data.Modality)--print ('SeriesDesc', Data.SeriesDescription)--print ('ManufacturerModelNam', Data.ManufacturerModelName)--print ('imagenumber', Data.ImageNumber)--print ('imagedesc', Data.ImageDescription)--print ('InstanceNumber', Data.InstanceNumber)-- Toshiba CT dose pageif Data.Manufacturer == "TOSHIBA" and Data.SeriesNumber == "1000" and Data.Modality == "CT" then print('------ condition for Toshiba dose page met------') for r=0, 300 do for c=0, 511 do setpixel(c, r, 0, 0) end endend-- CT Series named "screen save"if Data.SeriesDescription == "Screen save" then print('------ condition for screen save page met------') for r=0, 63 do for c=300, 511 do setpixel(c, r, 0, 0) end endend-- US GE Logiq E9 Cover Pageif Data.ManufacturerModelName == "LOGIQE9" and Data.InstanceNumber == "0" then print('------ condition for LogicE9 cover page met------') for r=16, 45 do for c=175, 350 do setpixel(c, r, 0, 0) end for c=510, 685 do setpixel(c, r, 0, 0) end for c=830, 950 do setpixel(c, r, 0, 0) end end for r=65, 90 do for c=175, 350 do setpixel(c, r, 0, 0) end for c=510, 685 do setpixel(c, r, 0, 0) end for c=830, 950 do setpixel(c, r, 0, 0) end end for r=110, 140 do for c=510, 685 do setpixel(c, r, 0, 0) end endend-- US GE Logiq E9 normal imagesif Data.ManufacturerModelName == "LOGIQE9" and Data.InstanceNumber ~= "0" then print('------ condition for GE LogiqE9 normal images met------') for r=0, 65 do for c=338, 670 do setpixel(c, r, 0, 0) end endend--print('------ Anon Pixel script stopping --------')
And below is the details on the dgate64.exe crash as reported by windows.