1

I am using clearcanvas library for dicomizing ecg image.

I need to define channel information (channel source sequence and channel sensitivity unit sequence) for each channel which I extract. How do I define each channel in ClearCanvas?

Sample code is below;

channelSeq[i] = new DicomSequenceItem();
channelSeq[i][DicomTags.ChannelBaseline].SetUInt32(0, 0);
channelSeq[i][DicomTags.ChannelTimeSkew].SetUInt32(0, 0);
channelSeq[i][DicomTags.ChannelSampleSkew].SetUInt32(0, 0);
channelSeq[i][DicomTags.WaveformBitsAllocated].SetInt32(0, 16); // 16 bit
channelSeq[i][DicomTags.ChannelSensitivityCorrectionFactor].SetUInt32(0, 1);
channelSeq[i][DicomTags.ChannelSensitivity].SetUInt32(0, 1);
channelSourceSeq = new DicomSequenceItem();
channelSourceSeq[DicomTags.CodeValue].SetStringValue(HttpContext.GetGlobalResourceObject("EcgCodes", ecgType).ToString());
channelSourceSeq[DicomTags.ContextIdentifier].SetStringValue("CID 3001");
channelSeq[i][DicomTags.ChannelSourceSequence].Values = channelSourceSeq;
channelSensUnitSeq = new DicomSequenceItem();
channelSensUnitSeq[DicomTags.CodeValue].SetStringValue("uV"); // millivolt
channelSeq[i][DicomTags.ChannelSensitivityUnitsSequence].Values = channelSensUnitSeq;
channelSeq[i][DicomTags.WaveformChannelNumber].SetStringValue((i + 1).ToString());
channelSeq[i][DicomTags.ChannelLabel].SetStringValue("Channel " + (i + 1));
channelSeq[i][DicomTags.ChannelStatus].SetStringValue("OK");
E_net4
  • 27,810
  • 13
  • 101
  • 139
Ozan Deniz
  • 1,087
  • 7
  • 22

1 Answers1

1

The Channel Definition Sequence (003A,0200) is a SubSequence within your Waveform Sequence (5400,1000).

There you can add your channels as much as you need, e.g.

channelSeq[i][DicomTags.WaveformChannelNumber].SetStringValue("1");
channelSeq[i][DicomTags.ChannelLabel].SetStringValue("Channel 1");
channelSeq[i][DicomTags.ChannelStatus].SetStringValue("OK");

and add your source and sensitivity like you have shown in your example.

Finally add your items to into Channel Definition Sequence

myWaveFormSequence[DicomTags.ChannelDefinitionSequence].AddSequenceItem(channelSeq[i]);

See further tags what you can specify for a channel sequence at http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.10.9.html

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
JohnnyQ
  • 1,591
  • 1
  • 16
  • 25
  • Do I need to specify channel sensitivty unit sequence? By the way, is channel 1 example or correct value for channel 1. – Ozan Deniz May 06 '15 at 10:39
  • The "channel 1" was just an example. the sensitivity unit sequence is only required if you have a `Channel Sensitivity` (003A,0210) specified within your `Channel Definition Sequence`. – JohnnyQ May 06 '15 at 10:57
  • For (aV5) lead do i write "channel aV5" or sth different? – Ozan Deniz May 06 '15 at 11:06
  • The channel label is may be used for display purposes, so you can add here anything you like. – JohnnyQ May 06 '15 at 11:11
  • I defined the channels but when I look at the tags with a dicom tag viewer , I noticed that sub sequence length is -1. I am using AddSequenceItem function for adding sub sequences – Ozan Deniz May 06 '15 at 11:15
  • You can check here: http://www.pictureshack.us/view_62905_ecgtags.png I think the problem is because of this. I updated my code in question. – Ozan Deniz May 06 '15 at 11:17
  • See my edit, probably you need to use the `AddSequenceItem` method on `Channel Definition Sequence`. – JohnnyQ May 06 '15 at 11:37
  • I edit my code as your edit but length is still -1 in viewer. I suppose that I cannot define multiple sequences because of this length issue. – Ozan Deniz May 06 '15 at 11:52