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");
The
Channel Definition Sequence(003A,0200) is a SubSequence within yourWaveform Sequence(5400,1000).There you can add your channels as much as you need, e.g.
and add your source and sensitivity like you have shown in your example.
Finally add your items to into
Channel Definition SequenceSee 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