• Hello,
    Thanks for your Dicom Pacs wich seems to be very customizable.
    I want to know how with Lua (or not) to count the number of slice from a specific modality and for a specific series that receive my conquest server.
    i tried the counter saved, received ... but either they count nothing otherwise they count the total of images received, not for a specific series.
    thanks for your answer
    Vince

  • Hi,


    I believe this could be done for instance by using a third party database driver (SQlite is great), and write records according to tests in lua. There are few global variables you can write to yet, so therefore a database may be the best way to go. You can write into dicom.ini (create an entry yourself and write to e.g., Global.Yourcounter, but this may be a bit slow.


    Edit:


    For instance, if you create CounterCT and CounterMR etc in dicom ini, this may work:


    [lua]
    ImportConverter0 = Global['Counter' .. Data.Modality] = Global['Counter' .. Data.Modality] + 1;


    Marcel

  • Hello, thanks for your reply;
    it seems not to work:


    [PACSBETA] *** lua run error [string "Global['Counter' .. Data.Modality] = Global..."]:1: attempt to perform arithmetic on field '?' (a nil value) in 'Global['Counter' .. Data.Modality] = Global['Counter' .. Data.Modality] + 1;'


    with in my dicom.ini:
    Importconverters = 3
    ImportConverter0 = Global['Counter' .. Data.Modality] = Global['Counter' .. Data.Modality] + 1;
    ImportConverter1 = print(Global.CounterCT)
    ImportConverter2 = print(Global.CounterPT)


    is something wrong in my dicom.ini ?
    Vince

  • Hi,


    it works for me, but you have to manually create the variables in dicom.ini before they can be used.


    Counter = 2


    [lua]
    ImportConverter1 = Global['Counter'] = Global['Counter'] + 1;


    Marcel

  • Thank you for your answer,
    i progress with your help but i have some strange things:


    i do a :
    ImportConverter0 = Global['Counter' .. Data.Modality] = Global['Counter' .. Data.Modality] + 1;
    ImportConverter1 = print(Global.CounterCT)
    it works but the counter stay at the same number for some slice.
    counter: 90, 91 ... in this sample :


    [PACSBETA] 90
    [PACSBETA] 4
    [PACSBETA] 7
    [PACSBETA] CT
    [PACSBETA] Written file: C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000023_130147618300d2.dcm
    [PACSBETA] Exportconverter0.0 executes: cmd /c mkdir c:\pacstest\jpeg\11_00914\20110301
    [PACSBETA] Exportconverter1.0 executes: dcmj2pnm +oj +Wm C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000023_130147618300d2.dcm c:\pacstest\jpeg\11_00914\20110301\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000023_130147618300d2.jpg
    [PACSBETA] 91
    [PACSBETA] 4
    [PACSBETA] 7
    [PACSBETA] CT
    [PACSBETA] Written file: C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000022_130147618400d3.dcm
    [PACSBETA] Exportconverter0.0 executes: cmd /c mkdir c:\pacstest\jpeg\11_00914\20110301
    [PACSBETA] Exportconverter1.0 executes: dcmj2pnm +oj +Wm C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000022_130147618400d3.dcm c:\pacstest\jpeg\11_00914\20110301\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000022_130147618400d3.jpg
    [PACSBETA] 91
    [PACSBETA] 4
    [PACSBETA] 7
    [PACSBETA] CT
    [PACSBETA] Written file: C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000021_130147618400d4.dcm
    [PACSBETA] Exportconverter0.0 executes: cmd /c mkdir c:\pacstest\jpeg\11_00914\20110301
    [PACSBETA] Exportconverter1.0 executes: dcmj2pnm +oj +Wm C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000021_130147618400d4.dcm c:\pacstest\jpeg\11_00914\20110301\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000021_130147618400d4.jpg
    [PACSBETA] 91
    [PACSBETA] 4
    [PACSBETA] 7
    [PACSBETA] CT
    [PACSBETA] Written file: C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000020_130147618500d5.dcm
    [PACSBETA] Exportconverter0.0 executes: cmd /c mkdir c:\pacstest\jpeg\11_00914\20110301
    [PACSBETA] Exportconverter1.0 executes: dcmj2pnm +oj +Wm C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000020_130147618500d5.dcm c:\pacstest\jpeg\11_00914\20110301\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000020_130147618500d5.jpg
    [PACSBETA] 91
    [PACSBETA] 4
    [PACSBETA] 7
    [PACSBETA] CT
    [PACSBETA] Written file: C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000019_130147618500d6.dcm
    [PACSBETA] Exportconverter0.0 executes: cmd /c mkdir c:\pacstest\jpeg\11_00914\20110301
    [PACSBETA] Exportconverter1.0 executes: dcmj2pnm +oj +Wm C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000019_130147618500d6.dcm c:\pacstest\jpeg\11_00914\20110301\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000019_130147618500d6.jpg
    [PACSBETA] 91
    [PACSBETA] 4
    [PACSBETA] 7
    [PACSBETA] CT
    [PACSBETA] Written file: C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000018_130147618500d7.dcm
    [PACSBETA] Exportconverter0.0 executes: cmd /c mkdir c:\pacstest\jpeg\11_00914\20110301
    [PACSBETA] Exportconverter1.0 executes: dcmj2pnm +oj +Wm C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000018_130147618500d7.dcm c:\pacstest\jpeg\11_00914\20110301\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000018_130147618500d7.jpg
    [PACSBETA] 92
    [PACSBETA] 4
    [PACSBETA] 7
    [PACSBETA] CT
    [PACSBETA] Written file: C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000017_130147618600d8.dcm
    [PACSBETA] Exportconverter1.0 executes: dcmj2pnm +oj +Wm C:\pacstest\Data\11_00914\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000017_130147618600d8.dcm c:\pacstest\jpeg\11_00914\20110301\1.3.12.2.1107.5.6.1.68224.30400111030112213720300000657_0004_000017_130147618600d8.jpg
    [PACSBETA] Exportconverter0.0 executes: cmd /c mkdir c:\pacstest\jpeg\11_00914\20110301
    [PACSBETA] 92
    [PACSBETA] 4
    [PACSBETA] 7
    [PACSBETA] CT


    i realize another strange things :
    when i send 230 slices of CT from a scanner to conquest (Pacsbeta) ; pacsbeta receive 230 slices but the export converter make only 222 jpg images ...


    i dont understand why ...
    if you have some explanation ... thank you very much !
    (my aim is a jpg by slice and the count of slice )
    best regards
    Vince

  • well after some time i realize that i was in beta patch 4 ...
    with the patch 6,
    the number of JPG is the same of the number of dicom slice : cool !
    but (there is a but...) i have the same pb with my counter .....
    while conquest compute slices the counter stay at the same number....
    if you have an idea ....
    best regards
    vince.

  • Hi,


    I now realize dicom.ini has a caching function. It will only check for updates once a second. so it will often read the old counter. So I guess that is the issue. I will add it to the bug list.


    Marcel

  • Hello Marcel,
    thanks for your answer,


    i have installed the new version 16;
    i see that now the counter is saved in the dicom.ini but there is always the same strange wrong counting....


    And the last problem wich was solved by the RC6 reappear: some slice are not converted in JPEG...(if i have a patient CT with 230 slice , i have 230 slice in conquest but there is only 216 JPEG after conversion with 1.4.16 non beta.
    If you have some idea ...
    Best regards,
    Vince

  • Ah,


    I force a retest of the ini file, but the filetime used has a resolution of 1 s as well, so this ini file thing is not fixed yet. Sorry for that, added to buglist.


    I am really not sure what happens with the missing jpeg images. rc6 was not changed a lot for the final release. You can maybe try the new "save jpg to ...." export converter.


    Marcel

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!