I did some changes to run but I am getting an error:
Code
[CONQUESTSRV1] 9999,0400 826 LO ConquestConsoleComma "lua: local ofile='86557:1.3.46.670589.30.1.6.1.116520970982.1481396381703.2';\n local osize='128';\n local ographic='jpg';\n local otemp='.jpg'\n local outfile = tempfile(otemp)\n local x = DicomObject:new()\n x:Read(ofile)\n\n local c = (x.WindowCenter or"
[CONQUESTSRV1] Where : SOPInstanc = '1.3.46.670589.30.1.6.1.116520970982.1481396381703.2' AND ImagePat = '86557'
[CONQUESTSRV1] Locating file:MAG0 86557\1.3.46.670589.30.1.6.1.116520970982.1481396381781.1_0001_000001_16575404220007.dcm
[CONQUESTSRV1] *** lua run error [string " local ofile='86557:1.3.46.670589.30.1.6.1..."]:24: attempt to concatenate global 'frame' (a nil value) in ' local ofile='86557:1.3.46.670589.30.1.6.1.116520970982.1481396381703.2'; local osize='128'; local ographic='jpg'; local otemp='.jpg' local outfile = tempfile(otemp) local x = DicomObject:new() x:Read(ofile) local c = (x.WindowCenter or 0) if c=='' then c=0 end local w = (x.WindowWidth or 0) if w=='' then w=0 end local s = (x.RescaleSlope or 1) if s=='' then s=1 end local i = (x.RescaleIntercept or 0) if i=='' then i=0 end if string.find(c, '%\\') then c = string.match(c, '(.-)\\') end if string.find(w, '%\\') then w = string.match(w, '(.-)\\') end w = tonumber(w)/tonumber(s) c = tonumber(c)/tonumber(s) x:Script('save '..ographic..' level '..math.floor(c)..' window '..(math.ceil(w/2))..' size 512 frame '..frame..' to '..outfile) returnfile = outfile '