Shutters are a means to “black out” areas of an image outside the area of interest, and are defined in DICOM and in presentation states.

Contents

Implementing Shutters in the .NET Version of DicomObjects

  1. Circular Shutter
  2. Rectangular Shutter

Implementing Shutters in the COM Version of DicomObjects

  1. Circular Shutter
  2. Rectangular Shutter

DicomObjects.NET

In .NET version of DicomObjects, Shutters can be represented by DicomLabel objects, so users don’t have to search the DICOM Standard for the corresponding attributes for Shutter. This is achieved by using the isShutter property - setting this to true causes the brush to be applied outside the area of the label rather than inside.

Circular Shutter

	DicomLabel shutter = new DicomLabel();
	shutter.LabelType = LabelType.Ellipse;  // Ellipse and Circle
	shutter.isShutter = true;               // Needs to be set to TRUE
	//Location and Size of the Label
	shutter.Left = 100;
	shutter.Top = 100;
	shutter.Width = 300;
	shutter.Height = 300;
	viewer.CurrentImage.Labels.Add(shutter);

Rectangular Shutter

	DicomLabel shutter = new DicomLabel();
	shutter.LabelType = LabelType.Rectangle;    // Ellipse and Circle
	shutter.isShutter = true;                   // Needs to be set to TRUE
	//Location and Size of the Label
	shutter.Left = 100;
	shutter.Top = 100;
	shutter.Width = 300;
	shutter.Height = 300;
	viewer.CurrentImage.Labels.Add(shutter);

DicomObjects.COM

In COM version of DicomObjects, users have to manually add in Shutter-Related DICOM tags to define the shape and the size of the Shutter.

Circular Shutter

 
	Dim centre(1) As Integer
	'Shutter Shape
	Image.Attributes.Add &H18, &H1600, "CIRCULAR"
	'Y Coordinate of the Center
	centre(0) = Image.SizeY / 2
	'X Coordinate of the Center
	centre(1) = Image.SizeX / 2
	'Note order must be Y, X
	' Center of Circular Shutter
	Image.Attributes.Add &H18, &H1610, centre
	'Radius of Circular Shutter
	Image.Attributes.Add &H18, &H1612, Image.SizeX / 2

Rectangular Shutter

     
	'Shutter Shape
	Image.Attributes.Add &H18, &H1600, "RECTANGULAR"
	'Shutter Left Vertical Edge
	Image.Attributes.Add &H18, &H1602, Image.SizeX / 5
	'Shutter Right Vertical Edge
	Image.Attributes.Add &H18, &H1604, Image.SizeX - Image.SizeX / 5
	'Shutter Upper Horizontal Edge
	Image.Attributes.Add &H18, &H1606, Image.SizeY - Image.SizeY / 5
	'Shutter Lower Horizontal Edge
	Image.Attributes.Add &H18, &H1608, Image.SizeY / 5