Knowledge Base Articles

Coronal, Sagittal & Transverse position calculation

To calculate frame position in terms of Sagittal, Coronal and Transverse position please see the attached code. /* get info from file */ // (0028,0030) float[] pixel_space = new float[2]; string[] pixel_space_p = Viewer.CurrentImage.DataSet[0x0028, 0x0030].Value as string[]; pixel_space[0] = float.Parse(pixel_space_p[0]); //Pixel size (row to row) pixel_space[1] = float.Parse(pixel_space_p[1]); //Pixel size (colums to columns) // (0028,0010) & (0028,0011) ushort rows = (ushort)(Viewer.CurrentImage.DataSet[0x0028, 0x0010].Value); // number of rows ushort colums = (ushort)(Viewer.

Continue reading..

Counting Studies, Series and Instances

There are many times when users need to know how many objects there of a given type, without needing to enumerate each one. The good news is: DICOM does allow such queries Such queries are possible using DicomObjects The less good news is: The feature is optional (though strongly recommended) so many PACS do not support it It is not a default feature of DicomObjects queries (due to the load placed on the server), so a little work is required to enable it.

Continue reading..

Creating DICOM Images from raw Pixel data

Sometimes we are asked the question of how to create a new DICOM image from imaging source (such as a detector) that outputs raw pixel data. With the help of DicomImage.SetPixelFile method, this becomes fairly simple. The following C# code shows how to load a single frame CT pixel data file from disk and create a new DicomImage object for display purposes only: DicomObjects.NET SetPixelFile method DicomImage img = new DicomImage(); // add all relevant group 28 attributes to image to tell DicomObjects how to display img.

Continue reading..

Creating Frame-Specific DICOM Presentation State using DicomObjects

in DICOM,

Sometimes we are asked about how to create frame-specific DICOM presentation state files for multiframe images. This is not difficult in DicomObjects and can by done in a slightly awkward way. Instead of adding the entire “Referenced Series Sequence” to the top level of the presentation state file, all you need to do is adding the “Referenced Frame Number” item into “Referenced Image Sequence” under “Graphic Annotation Sequence”, as shown in the following picture:

Continue reading..

Creating Overlays

DicomObjects does not have direct, simple ways to create DICOM overlays. This is because most people regard them as obsolete, having been replaced since 1998 or so by DICOM Presentation states, which we do fully support, using CurrentToPresentationState method. However, there are equivalent ways of burning the images into the pixel data using “PrinterImage” method (though that requires the pixel data to be re-imported into the image as a PrinterImage does not have any demographics)

Continue reading..

Creating Secondary Capture Images

Any ‘valid’ Dicom Image is a conglomeration of Pixel data and several mandatory data attributes. To generate a Secondary Capture (SC) Image from existing non-Dicom image then all that is required is to load the required image into a DicomImage using the import function and then adding on the appropriate attributes. Dicom Objects will automatically take care of all the attributes relating to the pixel data (Group 0x0028). Part 3 of the Dicom Standard Contains Table A.

Continue reading..

Creating Thumbnails and Icons

There are 2 methods within DicomObjects that can be used to create a Thumbnail image (PrinterImage and SubImage). If you want to create an icon for the purpose of inclusion into the embedded icon sequence attribute (&H88,&H200) of an image then use the PrinterImage method. The reason for using PrinterImage is that the resultant image only contains minimalist image information (the &H28 group) and the icon sequence attribute only permits attributes from the &H28 group to be included.

Continue reading..

Creating a UID Hierarchy

in DICOM,

Developers often ask for advice on how to create their own UIDs and manage roots, so here is a suggested simple scheme. There is nothing special about this scheme, but it is as good as any, so feel free to use it “as is” or to modify in any way you like. Throughout this page {YOURROOT} is used to represent the single root used by your company. See the pages on [UIDs] for details of how to get a root yourself, either by right (e.

Continue reading..

Custom Print Formats

in DICOM,

Many people wish to “merge” images to make print formats which the printer does not support, and this is possible, but a lot more work than simply asking the printer to do it for you! Basically, you need to make a raw image as follows: Make a single large image to hold the merged pictures Use AllocatePixelSpace to make a blank pixel area Set all the 0028 attributes to define bit depth, size etc.

Continue reading..

DICOM

in DICOM,

Digital Imaging & Communication in Medicine DICOM is the main standard used in medical imaging, and is the main purpose of DicomObjects HISTORY Both the ACR (American College of Radiology) and NEMA (National Electrical Manufacturers Association) jointly created a standard called ACR-NEMA. This “standard” was introduced around 1985 to simply ensure that imaging equipment had a unified method of connectivity. This was considered version 1.0. In 1988, version 2.0 was created, and in 1992, version 3.

Continue reading..

DICOM DateTime Format

The Standard DICOM DateTime Format The standard DateTime format (YYYYMMDD) is explained in Table 6.2-1 of Part 5 of the DICOM standard. What Format DicomObjects Accepts Simple Dates DicomObjects takes String format as well as DateTime format and turns whatever dates it is given into DICOM dates, according to the Regional Settings of the machine DicomObjects is running on, so on a European machine the value “04/03/2007” will be 20070304 in DICOM format and on a US machine it will produce 20070403.

Continue reading..

DICOM Enhanced Imaging Objects

in DICOM,

History The legacy CT object was standardised back in 1993 by the DICOM committee. In 2003 the DICOM WG 21 has decided that it is necessary to create a new CT object to meet the needs of modern CT technology that had evolved substantially. Furthermore, new applications such as cardiac CT, gated studies, perfusion CT, CT fluoroscopy, contrast tracking and post-processing are not supported by the current standard at that time.

Continue reading..

DICOM Error and Warning Codes

in DICOM,

Below is a list of common DICOM Error/Warning Codes (not necessarily a complete list): Code (Hex) Code (Decimal) Warning Failure Meaning 105 261   Y No such attribute 106 262   Y Invalid attribute value 107 263 Y   Attribute List Error 110 272   Y Processing failure 111 273   Y Duplicate SOP instance 112 274   Y No such object instance 113 275   Y No such event type 114 276   Y No such argument 115 277   Y Invalid argument value 116 278 Y   Attribute Value Out of Range 117 279   Y Invalid object instance 118 280   Y No such SOP class 119 281   Y Class-instance conflict 120 282   Y Missing attribute 121 283   Y Missing attribute value 122 284   Y SOP class not supported 123 285   Y No such action type 210 528   Y Duplicate invocation 211 529   Y Unrecognized operation 212 530   Y Mistyped argument 213 531   Y Resource limitation

Continue reading..

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 using DicomObjects.Enums; DicomAssociation cn = new DicomAssociation(); cn.Identity = new DicomAssociation.UserIdentity(); cn.Identity.IdentityType = UserIdentityType.Kerberos; cn.Identity.ResponseType = 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 using DicomObjects.

Continue reading..

DICOM Hierarchy

in DICOM,

There are 4 hierarchical levels in DICOM: PATIENT, STUDY, SERIES and IMAGE. Each PATIENT can have one or more Studies. Each STUDY can have one or more Series. Each SERIES can have one or more IMAGES. Patient Root Hierarchy Study Root Hierarchy

Continue reading..


We use cookies to give you the best possible experience on our website. By continuing to use this website, you agree with our use of cookies. for more information please click HERE