Category: DicomObjects.NET

DICOM Extended Negotiation of User Identity

DicomObjects.NET supports extended negotation of user identity as defined in DICOM supplement 99: ftp://medical.nema.org/medical/dicom/final/sup99_ft.pdf Here is sample code for how to access this data using DicomObjects.NET SCU/Client DicomAssociation cn = new DicomAssociation(); cn.Identity = new DicomAssociation.UserIdentity(); cn.Identity.IdentityType = DicomObjects.Enums.UserIdentityType.Kerberos; cn.Identity.ResponseType = DicomObjects.Enums.UserIdentityResponseType.PositiveResponseRequested; cn.Identity.PrimaryField = new byte[] { 1, 2, 3, 4 }; // the Kerberos Service Ticket, or the username cn.RequestedContexts.Add(...); cn.Open(...); byte[] resp = cn.ServerResponse; // will be null is ResponseType is set to NoResponseRequested SCP/Server void server_AssociationRequest(object sender, DicomServer.

Continue reading..

DicomDataSet.Value Overview

Here is a complete list of all possible .NET objects that DicomDataset.Value can return. Notes: If the data element is empty, then the return value will be null The “Allowed VM” is the value in DICOM Part 6, and is not the number of values which happen to be present for any particular element UI values are all listed in Part 6 as having a VM of 1, and hence are normally returned as strings.

Continue reading..

DicomObjects.NET V8 versions

This page allows you to download both current and historical versions of DicomObjects.NET. For details of our support policy and the different version types, please see the Lifecycle Policy Page

Continue reading..

How to implement C-GET in .NET

C-GET in the .NET version of DicomObjects can be done via DicomQuery object or DicomConnection object DicomQuery.Get and DicomConnection.Get. Following are sample VB.NET code to show how to implement C-GET using DicomQuery and DicomConnection Objects. DicomQuery.Get() DimqAsNewDicomObjects.DicomQuery DimresultsAsDicomObjects.DicomDataSetCollection DimresultAsDicomObjects.DicomDataSet q.Root="STUDY"' Root q.Level="IMAGE"' Level q.Node="localhost"' IP address of Remote SCP q.Port=105' Port number of Remote SCP q.PatientID="222.22.2222"' Patient ID q.StudyUID="999.999.2.19941105.112000"' Study UID q.SeriesUID="1.2.826.0.1.3680043.4.1.19990124221049.3"' Series UID q.InstanceUID="1.2.826.0.1.3680043.4.1.19990124230602.1"' Instance UID results=q.

Continue reading..

How to show Grid in DicomViewer

Perhaps we might have done this internally and make a new DicomViewer ‘ShowGrid’ property. But that way the end users may lose some flexibilities in setting the grid style (width, color etc.etc.). For now if you would like to show the rows/columns grid before loading up any image, you can do so using the following VB code (or translate it into something else that you are using) : DicomObjects.

Continue reading..

Implementing DICOM Composite Instance Retrieve Without Bulk Data

DICOM Composite Instance Retrieve Without Bulk Data is supported by DicomObjects and it’s simple to implement. Client Side The following code demonstrates how to retrieve individual instances without bulk data: DicomObjects.NET DicomAssociaiton DicomAssociation cn = new DicomAssociation (); cn.RequestedContexts.Add("1.2.840.10008.5.1.4.1.2.5.3"); // CompositeInstanceRootRetrieveWithoutBulkData GET cn.RequestedContexts.Add("1.2.840.10008.5.1.4.1.1.7"); // SOP Class UID of the instance we are getting cn.Open("dicomserver.co.uk", 104, "client", "server"); DicomDataSet ds = new DicomDataSet (); ds.Add(8, 0x52, "INSTANCE"); ds.

Continue reading..

LabelType: Formatted


The LabelType “Formatted” in .NET version of DicomObjects provides a very useful way to access the value of any DicomImage property. For property which has a shortcut name, you can just put the name of the property within a pair of square brackets. You can also specify the “Group” and “Element” of any particular attribute. The code shows how to use the formatted label.

Continue reading..

Network Transfer Syntax Control (NET)

Background in earlier versions of DicomObjects, both .NET & COM the same basic mechanism was used for selecting transfer syntaxes: When initiating, they can be created specifically using Contexts.Add etc. When accepting, they can be selected specifically using Context.AcceptedTS or Reject If neither of the above is used (as most people don’t) then a default mechansim is used, based on the TransferSyntax registry hive, which allows: Setting of specific values for different SOP classes using TransferSyntax/SOP class UID A more generic setting for all other SOP classes in the TransferSyntax/ default value This system, which is described here worked well for many years, but has 3 main drawbacks:

Continue reading..

New API for control of text labels in DicomObjects V8 onwards

Continue reading..

Printing without using DicomPrint

Although DicomPrint object is designed to make printing simple and easy for developers to code, it is possible to use a more advanced DicomConnection (COM version) or DicomAssociation (.NET version) object to meet your special requirement. The code below gives a starting point for those wishing to do this themselves DicomObjects.NET DicomAssociation cn = new DicomAssociation(); DicomDataSet printer; DicomImageCollection ims; DicomImage thisim; string BFSUID, filmboxUID, uidroot; DicomDataSetCollection ImageBoxList; DicomDataSet session; DicomDataSet filmbox; DicomDataSet refSessionItem; DicomDataSetCollection refSessionSequence; DicomDataSet ImageSequenceHolder; DicomDataSetCollection ImageSequence; DicomDataSet NullDataSet; int imno; int imnofilm; int uidint; // This example uses explicit UIDs for objects created.

Continue reading..

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/solution from our values users. Objects doesn’t support this property or method Make sure you do NOT have a com ocx version of DicomObjects registered on your computer.

Continue reading..

Querying Patient Information by Modality

It is possible to query for Patient Information using a DICOM C-FIND operation with Modality as a filter, in order to find all patients who have ever had a series with a particular modality. This can be done by a STUDY root STUDY level C-FIND query. A DoRawQuery(QueryDataSet) method in COM version of DicomObjects or Find(QueryDataSet) method in .NET version is required with ModatiesInStudy field (0008,0061) being explicitly added as a modality to search for.

Continue reading..

Registering Custom Codec with DicomObjects.NET

Contents Create new CodecFactory class Implement DicomObjects.DicomCodecs.IDecompressor Implement DicomObjects.DicomCodecs.ICompressor interface Registering your CodecFactory with DicomObjects.NET DicomObjects.NET (only) Create new CodecFactory class You need to create a new Class that derives from DicomObjects.DicomCodecs.CodecFactory. See the sample code below: public class MyCodecFactory : DicomObjects.DicomCodecs.CodecFactory { public override bool CheckStart(Stream stream, string TransferSyntax) { return true; } public override DicomObjects.DicomCodecs.ICompressor Compressor(string TransferSyntax) { return new MyEncoder(); } public override DicomObjects.

Continue reading..

Rendering Image as a DicomLabel


Out of the many label types available in DicomObjects .NET, LabelType.Image can be used to directly reference a System.Drawing.Image object (jpg, png, bmp, etc) and to be rendered as a DicomLabel on the viewer.

Continue reading..

SetCompressedPixelFile

Directly importing compressed data into DICOM is possible by the _SetCompressedPixelFile_ method which maps an external file as the compressed pixel data of that DicomImage instance. Unlike the import method, this just sets the pixel data and nothing else, so it is required to update the rest yourself (e.g. bit depth, frame count, etc). Example code snippet with dummy values : int width = 1280; int height=720; int frameRate=25; // 25 frames per seconds for example float duration = 5; // 5 seconds the total duration of video, for example string transferSyntax = "1.

Continue reading..