This works!
Display MoreCode
Great, It works.
This works!
Display MoreCode
Great, It works.
Display Morechange line 12 into
return f
and the last line 26-28 into
print(b)
Marcel
Hi, Marcel
Regarding images, I need to get ImageDate,ImageTime,ObjectFile,DeviceName in the results.
With query commands I use:
--query:DICOMImages|SOPInstanc,ImageNumbe, ImageDate, ImageTime, ImagePat, SeriesInst, ObjectFile, DeviceName
and I get all columns
I am using the next code but thwse columns don´t appear in the result.
Is there some file where I can see the columns avaliables to dicomquery results? For now, I am using the pdf manual
a=DicomObject:new()
a.ImageDate=''
a.ImageTime=''
a.ObjectFile=''
a.DeviceName=''
a.PatientID = '66971'
a.SeriesInstanceUID= '1.3.46.670589.11.17521.5.0.3124.2008081915302126599'
a.InstanceNumber = ''
a.SOPInstanceUID = ''
a.SliceLocation = ''
a.ImageComments = ''
a.NumberOfFrames = ''
b=remotequery(ae, 'IMAGE', a);
io.write(b)
dicom.sql lists all fields in the database with dicom codes. A dicom query uses dicom tag names, not sql names or dicom codes.
So try
a["9999,0800"]=''"
a["9999,0801"]=''"
instead of
a.ObjectFile=''
a.DeviceName=''
These must be added to dgate.dic (on the server side) to be converted into json though
(9999,0800) VERS="CQ" VR="US" VM="1" Keyword="ConquestDevice" Name="Conquest Device"
(9999,0801) VERS="CQ" VR="US" VM="1" Keyword="ConquestObjectFile" Name="Conquest Object File"
If you add them to dgate.dic on the client side you can do:
a.ConquestDevice=''"
a.ConquestObjectFile=''"
Marcel
Display Moredicom.sql lists all fields in the database with dicom codes. A dicom query uses dicom tag names, not sql names or dicom codes.
So try
a["9999,0800"]=''"
a["9999,0801"]=''"
instead of
a.ObjectFile=''
a.DeviceName=''
These must be added to dgate.dic (on the server side) to be converted into json though
(9999,0800) VERS="CQ" VR="US" VM="1" Keyword="ConquestDevice" Name="Conquest Device"
(9999,0801) VERS="CQ" VR="US" VM="1" Keyword="ConquestObjectFile" Name="Conquest Object File"
If you add them to dgate.dic on the client side you can do:
a.ConquestDevice=''"
a.ConquestObjectFile=''"
Marcel
I did, but it´s not returning a string. And How about ImageDate and ImageTime?
[ ...{"TransferSyntaxUID":"1.2.840.10008.1.2","SOPInstanceUID":"1.3.46.670589.11.17521.5.0.3124.2008081915354076610","QueryRetrieveLevel":"IMAGE","PatientName":"LOMBIX","PatientID":"66971","SeriesInstanceUID":"1.3.46.670589.11.17521.5.0.3124.2008081915302126599","InstanceNumber":"10","NumberOfFrames":"","ConquestDevice":[13878,14137,23601,11825,11827,13876,13870,12343,14389,11833,12593,12590,13623,12594,13614,12334,13102,12849,11828,12338,14384,14384,14641,13617,12339,12594,13874,14645,24377,14384,12592,12383,12336,12592,24368,13873,14133,13365,13360,14386,12336,26161,25646,28003],"ConquestObjectFile":[16717,12359]}]
Sorry US in dgate.dic is wrong is must be LO (long string)
ImageDate and ImageTime do not exist (see dgate.dic), try one of these:
(0008,0020) VERS="4" VR="DA" VM="1" Keyword="StudyDate" Name="Study Date"
(0008,0021) VERS="4" VR="DA" VM="1" Keyword="SeriesDate" Name="Series Date"
(0008,0022) VERS="4" VR="DA" VM="1" Keyword="AcquisitionDate" Name="Acquisition Date"
(0008,0023) VERS="4" VR="DA" VM="1" Keyword="ContentDate" Name="Content Date"
(0008,0030) VERS="4" VR="TM" VM="1" Keyword="StudyTime" Name="Study Time"
(0008,0031) VERS="4" VR="TM" VM="1" Keyword="SeriesTime" Name="Series Time"
(0008,0032) VERS="4" VR="TM" VM="1" Keyword="AcquisitionTime" Name="Acquisition Time"
(0008,0033) VERS="4" VR="TM" VM="1" Keyword="ContentTime" Name="Content Time"
Marcel
Also 800 and 801 must be swapped.
Also 800 and 801 must be swapped.
Thank you.
Is possible pass arguments to lua file script? Something as:
dgate64 "--dolua:dofile([[pacientes.lua]],(a,b,c))"
If yes, how can I read the arguments into script?
Hi,
you can create one or more lua functions in the file and call them after dofile:
e.g.
dgate64 "--dolua:dofile([[queryfunctions.lua]]);pacientes([[CONQUESTSRV1]],[[99*]]))"
Marcel
Display MoreHi,
you can create one or more lua functions in the file and call them after dofile:
e.g.
dgate64 "--dolua:dofile([[queryfunctions.lua]]);pacientes([[CONQUESTSRV1]],[[99*]]))"
Marcel
Ok,
Is there some difference caling the next code into script to get AE and explicitly pass AE as parameters?
local ae = servercommand('get_param:MyACRNema')
the latter is better, because it will more likely be right.
the latter is better, because it will more likely be right.
I have changed all code from query commands to lua scripts.
When I run the command on my backend it complains about queryfunctions.lua not found.
I have queryfunctions.lua in my backend api folder. After the error I tried to put into Conquest Main folder as well.
But the same error occurs.
Where should I put lua scripts?
Hi,
--dolua runs in the frontend so it must be in F:\Programas\vuejs\nuxt-iclindoctor\server_iclindoctor/api/dicomap folder
Marcel
Hi,
--dolua runs in the frontend so it must be in F:\Programas\vuejs\nuxt-iclindoctor\server_iclindoctor/api/dicomap folder
Marcel
It works only when I run the command right into conquest main folder and queryfunctions.lua too.
Outside conquest folder, when I run the commando I get:
I solved it. Thank you Marcel
I needed to use the fullpath in queryfunctions.lua
I will send you the final API using lua scripts.
Now we have two options: with lua script or query commands
Hi, Marcel
I am working to make a better code.
I´d like to converter a dicom file on the fly and get a gif result. It will be used in a thumbnail in the front end.
I have tried the next but no look:
Result:
Hi,
There is no direct Lua based image conversion. Maybe the fastest way to convert is the following using old conquest scripting, code mostly taken from extension folder:
local infile = pslice or 'f://programas//appprog//dicomserver150c//data//86557//1.3.46.670589.30.1.6.1.116520970982.1493417302625.1_0003_000001_1657540423000b.dcm'
Marcel
Hi, Marcel,
How can I send the output to stdout?
I add some code to your sample to read the output file and send to stdout. But It doesn´t work.
I created a file called test "slicema.lua" the content below.
And I execute:
-- slicema.lua file
Hi,
Sorry I was not clear the code I posted needs to be run remotely in the server, not in the client. If you pass the outfilename to returnfile is will be deleted by the server. Also when you read the image you do not need to know the MAG device, just say x:Read(PatientID..[[:]]..SOPInstanceUID)
Marcel
Hi,
Sorry I was not clear the code I posted needs to be run remotely in the server, not in the client. If you pass the outfilename to returnfile is will be deleted by the server. Also when you read the image you do not need to know the MAG device, just say x:Read(PatientID..[[:]]..SOPInstanceUID)
Marcel
Hi, Marcel
Now I am very lost.
My question is: In my backend, I need to take a slice, convert to jpeg and send it to browser (frontend).
For now, all nodejs code API in my backend send the dgate lua scripts to remote conquest server and captures the results in the backend stdout.
So, I need to take the jpeg from stdout.
Could you post a sample, please?
Don’t have an account yet? Register yourself now and be a part of our community!