chop-dbhi / studycentric

StudyCentric - research DICOM viewer
Other
26 stars 13 forks source link

Only client #5

Closed camol closed 11 years ago

camol commented 11 years ago

Hi first of all studycentric looks realy awesome. I'm developing my own simple dicom related Rails application. Is there a way to use only the client part of studycentric and somehow pass locally the dicom files which I store in my app folder and use these features of the client?

jeffmax commented 11 years ago

Hi, thanks for the compliment. It might be a fair amount of work as a DICOM PACS does quite a bit of work for you. To get it working you would need to implement three things in your server. First you would need to implement a WADO interface that returns the DICOM images when requested. For example, if the front-end issues a request like

wado?contentType=image%2Fjpeg&requestType=WADO&studyUID=1.3.6.1.4.1.5962.1.2.65535.20090407071000.6523764&seriesUID=1.3.6.1.4.1.5962.1.3.65535.202.1239106254.3824.0&objectUID=1.3.6.1.4.1.5962.1.1.65535.202.1.1239106254.3824.0&rows=100

your server would need to respond with the jpeg for that particular DICOM object. Basically it is requesting the the DICOM object with instance UID of 1.3.6.1.4.1.5962.1.1.65535.202.1.1239106254.3824.0 with 100 pixel height as a jpeg.

Second, you would need to respond to queries from the front-end asking the following type of questions: "GIve me all the DICOM series uids that are in this study uid" and "Give me all the instance uids in this this series uid". The queries from the front end that do that look like this:

/series/1.3.6.1.4.1.5962.1.3.65535.102.1239106253.3780.0

this asks for all the instance uids with that series uid and responds with a JSON list.

Finally, to get things like series/study name displayed and measurement working, you need to create a service that when given an instance uid responds with certain DICOM attributes like pixel spacing, window level and study/series name. You can see this being done in the Ruby code for StudyCentric. Basically we request the full DICOM object from the PACS server and pull out the attributes required, responding with a JSON object. For example, for the following query

/object/1.3.6.1.4.1.5962.1.1.65535.104.1.1239106253.3786.0

you would need to respond with something like this

{
    "pixelMessage":"Measurement has been calibrated, details = Not available.",
    "studyDescr":"Test support of different pixel spacing attributes",
    "pixelAttr":"0028,0030",
    "seriesDescr":"Computed Radiography - Pixel Spacing and Imager Pixel Spacing",
    "nativeRows":512,
    "objectUID":"1.3.6.1.4.1.5962.1.1.65535.104.1.1239106253.3786.0",
    "xSpacing":"0.25",
    "windowCenter":127,
    "nativeCols":512,
    "ySpacing":"0.25",
     "windowWidth":256
}
camol commented 11 years ago

If I understand enough the client part doesn't do any dicom stuff like windowing it only emulates this by sending specific requests to the server which is responsible for sending back the JPEG image for specific window values right?

Kamil Łęczycki Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Friday, 19 April 2013 at 14:36, Jeff Miller wrote:

Hi, thanks for the compliment. It might be a fair amount of work as a DICOM PACS does quite a bit of work for you. To get it working you would need to implement three things in your server. First you would need to implement a WADO interface that returns the DICOM images when requested. For example, if the front-end issues a request like
wado?contentType=image%2Fjpeg&requestType=WADO&studyUID=1.3.6.1.4.1.5962.1.2.65535.20090407071000.6523764&seriesUID=1.3.6.1.4.1.5962.1.3.65535.202.1239106254.3824.0&objectUID=1.3.6.1.4.1.5962.1.1.65535.202.1.1239106254.3824.0&rows=100
your server would need to respond with the jpeg for that particular DICOM object. Basically it is requesting the the DICOM object with instance UID of 1.3.6.1.4.1.5962.1.1.65535.202.1.1239106254.3824.0 with 100 pixel height as a jpeg.
Second, you would need to respond to queries from the front-end asking the following type of questions "GIve me all the DICOM series uids that are in this study uid" and "Give me all the instance uids in this this series uid". The queries from the front end that do that look like this: /series/1.3.6.1.4.1.5962.1.3.65535.102.1239106253.3780.0 this asks for all the instance uids with that series uid and responds with a JSON list. Finally, to get things like measurement working, you need to create a service that when given an instance uid responds with certain DICOM attributes like pixel spacing and window level. You can see this being done in the Ruby code for study centric. Basically we request the full DICOM object from the PACS server and pull out the attributes required, responding with a JSON object. For example, for the following query /object/1.3.6.1.4.1.5962.1.1.65535.104.1.1239106253.3786.0 you would need to respond with something like this {"pixelMessage":"Measurement has been calibrated, details = Not available.", "studyDescr":"Test support of different pixel spacing attributes","pixelAttr":"0028,0030","seriesDescr":"Computed Radiography - Pixel Spacing and Imager Pixel Spacing","nativeRows":512,"objectUID":"1.3.6.1.4.1.5962.1.1.65535.104.1.1239106253.3786.0","xSpacing":"0.25","windowCenter":127,"nativeCols":512,"ySpacing":"0.25","windowWidth":256}

— Reply to this email directly or view it on GitHub (https://github.com/cbmi/studycentric/issues/5#issuecomment-16650584).

jeffmax commented 11 years ago

That is correct. It relies on the WADO interface (which supports windowing) for things like that. There are projects out there that do windowing/read the actual DICOM binary in the browser, but StudyCentric was built to support older browsers with no plugins.

camol commented 11 years ago

Are maybe in possiesion of some links to those projects becouse as I see I'm bit more interested in sth which will do this in the browser. I think it will be easier for me to implement becouse the browser is not the limitation. But still the whole projects is really nice in the idea.

jeffmax commented 11 years ago

Take a look at the Oviyam2(HTML5, I know they intend to support this, not sure if they do yet) and the Weasis(Java) projects.

camol commented 11 years ago

Thx

Kamil Łęczycki Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Friday, 19 April 2013 at 14:59, Jeff Miller wrote:

Take a look at the Oviyam2 (http://oviyam.raster.in/oviyam2.html)(HTML5, I know they intend to support this, not sure if they do yet) and the Weasis(Java) projects.

— Reply to this email directly or view it on GitHub (https://github.com/cbmi/studycentric/issues/5#issuecomment-16651505).