Web server

  • I have started thumbnails, and I´m trying to adapt your metadata function to that. But I dont´t have weasis to test.




  • Hi, thumbnails will be jpg images, so it is similar to the wadoi function. You may need to run a short query to get the middle image for a series thumbnail.


    -- get middle slice for series

    q=DicomObject:new()

    q.xxx -- fill in study and series uids

    q.SOPInstanceUID=''

    q.QueryRetrieveLevel='IMAGE'

    q["9999,0c00"]='ImageNumber' -- database field name to sort

    r=dicomquery(AE, 'IMAGE', q)

    n=math.floor(#r/2)


    -- generate thumbnail

    x=DicomObject:new()

    outfile = tempfile('.jpg')

    x:Read(':'..r[n].SOPInstanceUID)

    x:script('save jpg to '..outfile)

    returnfile = outfile


    Marcel

  • Thanks,

    I did the next.

    In this line, how I can save a frame to jpg?

    Code
    x:Script('save frame '..oframe..' to '..outfile)

    is this syntax ok:

    Code
    x:Script('save jpg frame '..oframe..' to '..outfile)
  • Yes


    you can always add a frame clause to "save jpg" it is ignored if the object is not multiframe.


    From the manual


    save [bmp/gif/jpg]

    level N

    window N

    frame N

    size N

    quality NN integer quality factor for jpg export only

    gamma NN floating point gamma correction value

    [to/as] filename


    Marcel

  • Luiz, most studies show in OHIF with this metadata function; it queries all items and if not in database copies values from the first image.

    Easy to expand to other levels as well, just pass the values into the query.


  • Do you restarted conquest?

    Sometimes it solves the problem.


    I have touched some parts.

    The metadata code is:





    Here is


    pasted-from-clipboard.zip

Participate now!

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