Thursday, May 17, 2012
Google Custom Search

ClearCanvas Highlights

Download our Open Source software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: JBauza
New Today New Today: 19
New Yesterday New Yesterday: 33
User Count Overall: 22559

People Online People Online:
Visitors Visitors: 15
Members Members: 1
Total Total: 16

Online Now Online Now:
01: dougsrl

ClearCanvas Community Forums

Changing DicomAttribute's VR
Last Post 2012-01-21 06:46 PM by MakiBor. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
MakiBor
New Member
New Member
Posts:7

--
2012-01-19 09:59 AM  

 Hi all,

I am working on a plugin which convers various formats to DICOM and I am having trouble setting Pixel Padding Value attribute. It is defined as US or SS, but how can I choose between these two. I need to store signed short value in it since Pixel Data is signed short. I tried something like this:

dataSet[DicomTags.PixelRepresentation].SetInt32(0, 1);
dataSet[DicomTags.PixelPaddingValue] = new DicomAttributeSS(DicomTags.PixelPaddingValue);
dataSet[DicomTags.PixelPaddingValue].SetInt16(0, -32768);

With this I manage to put "-32768" in Pixel Padding Value attribute but when I save this dataSet to DICOM file it changes it back to unsigned string and instead "-32768" it saves "32768". So I was wondering if there is a way to tell CC that VR of PixelPaddingValue supposed to be SS and not US.

Thank you in advance.

Best regards,
Mladen

Tags: Pixel Padding Value, VR
jasper.yeh
Senior Member
Senior Member
Posts:523
Avatar

--
2012-01-19 12:34 PM  
Hi Mladen,

The DicomTags.ABC members are just tag value constants - when you use them to access a dataset (either to read or write attributes), they will use the VR of the attribute if it already exists (and is known, e.g. explicit VR transfer syntax), defaulting to the first VR as defined in the DICOM data dictionary.

In the case where that VR is not the correct one, you can construct your own DicomTag instance and explicitly specify the VR (the constructor takes a number of arguments, including tag value, VR, name, VM, ...) then use the resulting tag object the same way as you used the tag value constant. Most of our API where a tag value is expected will also accept a DicomTag object.

Hope this helps,
// Jasper
MakiBor
New Member
New Member
Posts:7

--
2012-01-21 06:46 PM  
Hi Jasper,

Thank you for you response. That is exactly what I needed. It worked like a charm.

Thanks.

Regards,
Mladen
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2012 ClearCanvas Inc.