Thursday, October 25, 2012

Patches to the Modality Worklist Database

It turns out that the Modality Worklist Server draws a lot of attention and that there were couple of glitches in the last release. The main issue comes from date and time columns in the database (i.e. datetime sql type). Until this is fixed in the DICOM Database Plugin, here's a little patch that maps the database date and time fields to valid DICOM date and time formats.

The DICOM date format is YYYYMMDD and the DICOM time format is HHMMSS.TTT or HHMMSS

Another issue that is going to be solved in the next release is the case sensitive column names. This means that in order to add more fields to your MWL C-FIND Response, you should add the columns to the view exactly as they are named in the toolkit dictionary with the correct case. This problem was in the last build modality field that should have been Modality with a capital M.

Sunday, October 21, 2012

The DICOM Server API

The very long Holidays season here delayed a bit the upcoming release of version of RZDCX DICOM Toolkit and DSRSVC DICOM Server. This year the Jewish holidays fell just one after another on Tuesdays and Wednesdays and everyone were busy bridging complete weeks and going abroad for long vacations that didn't take much of their leave credits. It was almost impossible to work this way.

But, finally we're passed that and until the end-of-year Christian Holidays season we can make some progress and release new products and features.

This post is a very quick pass over the DICOM Server API. We'll do it by going over the full source code of the INI File Plugin DLL. but before that here's the release notes of version that is now available for download from the Tech-Zone download page. The packages are divided to RZDCX and DSRSVC and for each one there's a Win32 and x64 packages.

DICOM Server and DICOM Toolkit Release Notes -

Add Q/R SCP Support to DSRSVC DicomServer
1. Implement calls to DicomNet framework. 2. Create plugin for using database.
If port is taken, accepter may throw access violation
The problem is in DicomNetwork::Start There's a assert there on the cond but than no release error handling
Add Dynamic filenaming to DICOM Server Ini FIle Plugin
Add a INI entry FILENAME_TEMPLATE that uses DICOM Attributes values to name the incoming files
DICOM Server crash when port is taken
If the port (104) is taken by another process, DICOM server crashes
Add logging to DICOM Server
Add logging and service controller to start and stop the logging
DCXIMG.SaveBitmap creates gray file on attached
See attached files crated using DICOMImageExample
Set default window center/width when creating new DCXIMG.LoadFile
When opening a new DCXIMG from file using LoadFile no window center/window width is selected Check if a wc/ww is present use the default (first) one.
If port is taken, accepter may throw access violation
Same as in DSRSVC
RZDCX ReadBuffer API is not suitable for 64 bit
there seems to be an error in the interface for 64 bit OS, because ReadBuffer is defined as HRESULT ReadBuffer(int buffer, long size). If the address of the buffer is above 4GBytes, which can happen in our application, the function will crash. So it should be HRESULT ReadBuffer(size_t buffer, size_t size) because size_t is 64 bit on 64bit OS. Even better would be HRESULT ReadBuffer(void *buffer, size_t size). Now buffer is a pointer which has the correct size automatically.
DICOM DB Plugin fails on nvarchar(max) fields
When the DB column is of type nvarchar(max) the ResultsIterator ctor sets the iterator to an error state (at dataaccess.cpp line 1754)