Registry Values

Many of the less commonly used features of DicomObjects are controlled by "registry" values, which can be specified in one of 2 ways:

Problems using DicomObjects.NET from VBScript

Following our first article about how to Host_.NET_Viewer_on_Web_Page, people asked questions about using DicomObjects.NET from their VB/Java scripts.

We created this page to sum up some of the most commons problems, and we will continue to update this page should we get more questions/sulution from our values users.

Can not use DicomObjects.NET in Visual Studio 2010

Problem Description

Sometimes people are facing the problem of using DicomObjects .NET version in Visual Studio 2010 due to error "DicomObjects is not decalred. It may be inaccessible due to its protection level".

Run DicomObjects.NET Based 32-bit Application under 64-bit Windows

DicomObjects.NET, including all codecs are now native code, and should run equally well under 64-bit Windows as under 32-bit versions, using the AnyCPU option.

If you need to force 32 bit mode (e.g. if you need the Acrobat display otpion, which is 32 bit only), then you should make the following change to force your application to run in 32-bit mode under 64-bit Windows.

Open up project properties and click the Compile:

Config File

As of Version 5.6 of the .NET version a config file is available to allow some aspects of DicomObjects behaviour to be modified without the need to recompile. This is broadly equivalent to the registry as used in the COM version, but has the advantage of being application-specific, avoiding any side-effects for other applications.

Deleting or Over-writing Files Which have been Read using ReadFile

Image files which have been read by DicomObjects using ReadFile cannot normally be deleted (or over-written using WriteFile etc.) until the file is released. This is because memory mapping is enabled (Default DicomObjects's behaviour), causing only the data actually needed at any time to be read into memory. This requires that the file be locked whilst the associated image object exists.

You can use one of the following three methods to solve this problem:

Pixel Data to Byte Array

We are often asked how to retrieve the pixel data of a DicomImage into a Byte array. The following code will load an image and copy the pixel data into a byte array.

Limiting Transfer Syntax for RT SOP Classes

There is a known issue in the Dicom Standard. SOP classes related to RT can legitimately be write / transferred using several different Transfer Syntaxes. HOWEVER The length of some of the attributes associated to RT is such that they can not be represent within a 32 bit word. As such it is imposable to represent them using an explicit Transfer Syntax.

Therefore it is often appropriate to limit these SOP classes so that they can only use Implicit VR Little-endian (1.2.840.10008.1.2)

Initialising an image to the viewer size (stretch and scroll)

It is often useful to zoom and scroll an image to fill the viewer. The quick way of doing this is by using StretchMode method i.e.


Subscribe to RSS - .NET

We Currently Accept:

Other currencies

For Reference purposes only:

The price is based on current exchange rates but is only an approximation. Please contact us for a final price