comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Creating a dicom-file in HSV colors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Creating a dicom-file in HSV colors [message #58439] Fri, 01 February 2008 05:02
wengi is currently offline  wengi
Messages: 12
Registered: February 2008
Junior Member
On 31 Jan., 15:40, Abraham campbell <abra...@ittvis.com> wrote:
> andreas.w...@gmail.com wrote:
>> Hi there,
>
>> this is my first question to this newsgroup. I could not find my
>> problem in the archives.
>> I want to create a dicom-file in the HSV-color format. We have the
>> toolkit and I can create the files, but they do not contain what I
>> want them to.
>> I pass a an array with size (3,25,25) to the method. The three fields
>> contain the values for hue, saturation and value. Writing the file
>> with
>
>> obj->setpixeldata, data, bits_allocated=bitsAlloc, $
>> photometric_interpretation = 'HSV', $
>> columns = coli, $
>> rows = rowi, $
>> samples_per_pixel=3, $
>> planar_configuration = 0, $
>> pixel_representation = PixelRep, $
>> number_of_frames = 1
>
>> and commiting it produces a dcm-file with the size 25x25. Looking at
>> the file with a dicom-viewer shows that the first pixel-column of the
>> created image contains the values of the first row of the first field
>> of the input data.
>> Hard to describe...
>
>> Goal of the HSV-image should be to encode three different parameters
>> of an examination in one image.
>
>> So my question: Does anybody know if I have to rearrange my passed-in
>> data? IDL-Version is 6.3.
>
>> Greetings,
>> wengi
>
> You can also store anything you want as private tags--provided that you
> (and your organization) are the only consumers of your DICOM files.
> Private tags let you put your own custom data (i.e. non-standard) into a
> DICOM files. The down side is that private tags are not standard tags,
> so other DICOM software may not be able to read the data in private
> tags. If that is not an issue for you, then you might consider private
> tags, though their syntax is somewhat terse.
>
> You could create a private tag, store your HSV image as a data blob of
> OB type data (OB means "Other Byte"), then later, read in your blob of
> byte data, then re-interpret it as your HSV image. But, you won't have
> to convert it to any other image format before storing it, since you are
> just streaming your HSV image into a private tag as a collection of bytes.
>
> Just a thought.
> Abraham

Hi Abraham,

thank you for your ideas. But maybe this could be a problem for me. I
think our PACS system will have problems with that private tags
because of having the MUST of being standard. But creating the images
using color_convert in IDL solved my problem I think. The images look
as I want them to and they are "standard".
Thank you again.
wengi
Re: Creating a dicom-file in HSV colors [message #58473 is a reply to message #58439] Thu, 31 January 2008 06:40 Go to previous message
Abraham campbell is currently offline  Abraham campbell
Messages: 10
Registered: January 2008
Junior Member
andreas.weng@gmail.com wrote:
> Hi there,
>
> this is my first question to this newsgroup. I could not find my
> problem in the archives.
> I want to create a dicom-file in the HSV-color format. We have the
> toolkit and I can create the files, but they do not contain what I
> want them to.
> I pass a an array with size (3,25,25) to the method. The three fields
> contain the values for hue, saturation and value. Writing the file
> with
>
> obj->setpixeldata, data, bits_allocated=bitsAlloc, $
> photometric_interpretation = 'HSV', $
> columns = coli, $
> rows = rowi, $
> samples_per_pixel=3, $
> planar_configuration = 0, $
> pixel_representation = PixelRep, $
> number_of_frames = 1
>
> and commiting it produces a dcm-file with the size 25x25. Looking at
> the file with a dicom-viewer shows that the first pixel-column of the
> created image contains the values of the first row of the first field
> of the input data.
> Hard to describe...
>
> Goal of the HSV-image should be to encode three different parameters
> of an examination in one image.
>
> So my question: Does anybody know if I have to rearrange my passed-in
> data? IDL-Version is 6.3.
>
> Greetings,
> wengi

You can also store anything you want as private tags--provided that you
(and your organization) are the only consumers of your DICOM files.
Private tags let you put your own custom data (i.e. non-standard) into a
DICOM files. The down side is that private tags are not standard tags,
so other DICOM software may not be able to read the data in private
tags. If that is not an issue for you, then you might consider private
tags, though their syntax is somewhat terse.

You could create a private tag, store your HSV image as a data blob of
OB type data (OB means "Other Byte"), then later, read in your blob of
byte data, then re-interpret it as your HSV image. But, you won't have
to convert it to any other image format before storing it, since you are
just streaming your HSV image into a private tag as a collection of bytes.

Just a thought.
Abraham
Re: Creating a dicom-file in HSV colors [message #58481 is a reply to message #58473] Thu, 31 January 2008 03:45 Go to previous message
wengi is currently offline  wengi
Messages: 12
Registered: February 2008
Junior Member
Oki,

seems like color_convert with the H,S and V matrix as input will do it
for me.

wengi
Re: Creating a dicom-file in HSV colors [message #58482 is a reply to message #58481] Thu, 31 January 2008 03:31 Go to previous message
wengi is currently offline  wengi
Messages: 12
Registered: February 2008
Junior Member
Hmmm,

if I read it right, there's no more HSV-compatibility in dicom-
standard. So I have to convert my HSV-images to RGB-images and try to
write this in my dicom-files.
Is there any routine for this conversion or do I have to implement the
formulae myself?

wengi
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: CURVEFIT for multiple datasets
Next Topic: Re: Plot and Plots

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 06:57:21 PDT 2025

Total time taken to generate the page: 1.20018 seconds