[ITK] [ITK-users] (no subject)

Harnish, Roy Roy.Harnish at ucsf.edu
Mon Jul 14 21:54:03 EDT 2014


One more iteration here with calls to both GetValueFromTag and GetLabelFromTag

CODE:

    std::string tagkey = "0119|1030";
    std::string labelId;
    std::string value;
    
    std::cout << "gdcmImageIO->GetValueFromTag( tagkey, labelId ): ";
    std::cout << gdcmImageIO->GetValueFromTag( tagkey, value ) << std::endl;
    std::cout << "value: " << value << std::endl;
    
    std::cout << "gdcmImageIO->GetLabelFromTag( tagkey, labelId ): ";
    std::cout << gdcmImageIO->GetLabelFromTag( tagkey, labelId ) << std::endl;
    std::cout << "labelId: " << labelId << std::endl;

OUTPUT:

gdcmImageIO->GetValueFromTag( tagkey, labelId ): 1
value: LTFcLTBcMFwtMFwtMVwwXDBcMFwxIA==
gdcmImageIO->GetLabelFromTag( tagkey, labelId ): 0
labelId: 


________________________________________
From: Harnish, Roy
Sent: Monday, July 14, 2014 6:48 PM
To: Matt McCormick
Cc: insight-users at itk.org
Subject: RE: [ITK] [ITK-users] (no subject)

Hi Matt,

I wasn't calling GetLabelFromTagWith the instance of GDCMImageIO that had been used to read the image.  Here's what I get when I do that:

RUNNING:

    std::string tagkey = "0119|1030";
    std::string labelId;
    std::string value;
    std::cout << "gdcmImageIO->GetValueFromTag( tagkey, labelId ): ";
    std::cout << gdcmImageIO->GetValueFromTag( tagkey, labelId ) << std::endl;
    std::cout << "labelId: " << labelId << std::endl;

OUTPUT:

gdcmImageIO->GetValueFromTag( tagkey, labelId ): 1
labelId: LTFcLTBcMFwtMFwtMVwwXDBcMFwxIA==

So it looks like there is something returned by get value from tag.

Thanks for taking a look.

Roy

________________________________________
From: Matt McCormick [matt.mccormick at kitware.com]
Sent: Monday, July 14, 2014 6:39 PM
To: Harnish, Roy
Cc: insight-users at itk.org
Subject: Re: [ITK] [ITK-users] (no subject)

On Mon, Jul 14, 2014 at 9:27 PM, Harnish, Roy <Roy.Harnish at ucsf.edu> wrote:
> Hi Matt,
>
> Here's what I'm running:
>
>     std::string tagkey = "0119|1030";
>     std::string labelId;
>     std::string value;
>     std::cout << "itk::GDCMImageIO::GetLabelFromTag( tagkey, labelId ): ";
>     std::cout << itk::GDCMImageIO::GetLabelFromTag( tagkey, labelId ) << std::endl;
>     std::cout << "labelId: " << labelId << std::endl;
>
> And here's the output
>
> itk::GDCMImageIO::GetLabelFromTag( tagkey, labelId ): 0
> labelId:
>

This means the tag is not found.  For more information, try [1]

HTH,
Matt

[1] http://www.itk.org/Doxygen/html/IO_2DicomImageReadPrintTags_8cxx-example.html#_a2

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users



More information about the Community mailing list