Using icons in C-FIND


DICOM has from the start had the facility to include icon images in C-FIND requests, but it is rarely used. Of course, it only makes sense for STUDY, SERIES and IMAGE level queries as the image used should be representative of the study/series being queried, but it can be useful in some circumstances. Support is easy to add into projects using DicomObjects, and though it will normally work most reliably where the same vendor provides the SCU & SCP, it is a proper DICOM solution, and may work with other vendors’ applications also. The icon is sent (if requested and supported) in the (0088, 0200) attribute of the C-FIND response.

SCU Usage

There are 2 aspects, requesting that you be sent an icon, and then (if the SCP sends you one) displaying it.

1. Requesting the icon


All you need to do is to add a Null item to the request with the tag 0088,0200. If you are already doing a raw query, then simply add the attribute directly to the query as shown below:

DicomObjects.NET

The method needed is DicomQuery.Find(DicomDataset), you can use the default query as a starting point using the QueryDataSet method.

For example, replace this line:

 DicomDataSetCollection result = query.Find();

by this:

   
 DicomDataSet queryDS = query.QueryDataSet();
 queryDS.Add(Keyword.IconImageSequence, null);
 DicomDataSetCollection result = query.Find(queryDS);
	

DicomObjects.COM

The method needed is DicomQuery.DoRawQuery, you can use the default query as a starting point using the QueryDataSet method.

    
 set results = query.DoQuery()
by this:

   
 set queryDS = query.QueryDataSet() ' queryDS is a DicomDataSet
 queryDS.Attributes.Add(&H0088, &H0200,"")
 set results = query.DoRawQuery(queryDS)	

2. Displaying the icon


The first thing you need to do is to check if the SCP has sent you an icon, because it is an optional attribute to be included in the response. Check if the IconImageSequence exists and if so you need to extract the icon into a new DicomImage as follows:

DicomObjects.NET

	
 if (response[Keyword.IconImageSequence].ExistsWithValue)
 {
	var iconImageSequence = response[Keyword.IconImageSequence].Value as DicomImageCollection;
	DicomImage imageIcon = new DicomImage(iconImageSequence.First());
 }
	

DicomObjects.COM

   
 Dim images as New DicomImages
 If response.Attributes(&H0088, &H0200).ExistsWithValue Then
	Dim iconSequence As DicomDataSets
	Set iconSequence = response.Attributes(&H0088, &H0200)
	images.Add iconSequence(1)
 End If
	

The images collection will then hold a single icon which you can display in a DicomViewer or present it to the user the way you like.

SCP code changes

See the article on Creating thumbnails and icons for details of how to make an icon. You are responsible for choosing a suitable image to “represent” a whole study or series or perhaps a frame of a multi-frame image. You then simply need to add the sequence according the article Adding Sequence Items

DicomObjects.NET

 DicomDataSetCollection sequence = new DicomDataSetCollection();
 // Image representing your Icon, DicomImage may be added to a DicomDataSets collection
 sequence.Add(IconImage);
 response.Add(Keyword.IconImageSequence, sequence);

DicomObjects.COM

 Dim sequence as New DicomDataSets
 ' Image representing your Icon, DicomImage may be added to a DicomDataSets collection
 sequence.Add IconImage
 response.Attributes.Add &H0088, &H0200, sequence 

Remember that according to the general DICOM rules, you should only add an icon such as this if requested by the SCU (i.e. if a blank sequence item exists in the request as shown above).



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