Hi,

Having the compilation problem solved now I have another question.

I have been able to read some tags I was interested into. But there is one
from which I'm not able to read the information that is stored into. When I
open this image with the Dicom Plugin in Value Field I found gdcm::Unfound.
But if I open this image with another software (for example mricro) I find
the information I need stored in the tag.

Do you know if there is any way to read this information?

Thanks,
Aida

2012/7/16 Aida Ninyerola <[email protected]>

> Hi,
>
> I'm using this lines of code in order to read some tags form a DICOM file
>
> in the include file
> --------------------
>
>
> #include <itkGDCMImageIO.h>
> #include <gdcmFile.h>
> #include "gdcmValEntry.h"
> #include "dcmTypes.h"
>
> namespace Core{ namespace Widgets {
>     class UserHelper;
>     class DataEntityListBrowser;
>
> }}
>
> typedef boost::shared_ptr< gdcm::ValEntry > GdcmValEntryPtr;
>
> ....
>
> in the .cpp file
> -----------------
>
>     gdcm::File gdcmFile;
>     gdcmFile.SetFileName(file );
>     gdcmFile.Load();
>
>     gdcm::DocEntry* entry = NULL;
>     entry = gdcmFile.GetDocEntry(0x0008, 0x0070);
>
>
>     if ( entry )
>     {
>         GdcmValEntryPtr valEntry;
>         valEntry.reset( new gdcm::ValEntry( entry ) );
>         dcmAPI::TagId timeTagId = GetFinalTimeTag(modality);
>
>         valEntry->SetValue(
> gdcmFile.GetEntryForcedAsciiValue(timeTagId.m_group,timeTagId.m_element) );
>         std::string value;
>         value = valEntry.get();
>     }
>
> but I get these errors
>
>    - I don't know where to define modality: Error    7    error C2065:
>    'modality' : identificador no declarado
>    
> c:\Code\src\VPHTK_1_4\vphtk_src\plugins\QuantiDopaPlugin\widgets\QuantiDopaPluginPreProjectionsPanelWidget\QuantiDopaPluginPreProjectionsPanelWidget.cpp
>    74
>    - Error    8    error C3861: 'GetFinalTimeTag': no se encontró el
>    identificador
>    
> c:\Code\src\VPHTK_1_4\vphtk_src\plugins\QuantiDopaPlugin\widgets\QuantiDopaPluginPreProjectionsPanelWidget\QuantiDopaPluginPreProjectionsPanelWidget.cpp
>    74
>    - Error    9    error C2679: '=' binario : no se encontró un operador
>    que adopte un operando en la parte derecha de tipo 'gdcm::ValEntry *' (o
>    bien no existe una conversión aceptable)
>    
> c:\Code\src\VPHTK_1_4\vphtk_src\plugins\QuantiDopaPlugin\widgets\QuantiDopaPluginPreProjectionsPanelWidget\QuantiDopaPluginPreProjectionsPanelWidget.cpp
>    77
>
> Thank you
> Aida
>
>
> 2012/7/11 Aida Ninyerola <[email protected]>
>
>> Hi!
>>
>> Thank you for your response.
>>
>> I think the best solution for our problem is the first one you have
>> proposed.
>>
>> Which are the firsts steps we must do?
>>
>> Thanks for your help!
>> Aida
>>
>> 2012/7/10, Xavier Planes <[email protected]>:
>> > Hi Aida,
>> >
>> >       When reading DICOM data, the DICOM tags are not stored in the
>> > imported DataEntity. There are a lot of tags and stored per slice, so It
>> > will be difficult to retrieve these data in a structured way for all the
>> > cases. There are several possible solutions to your problem:
>> >       1. Load the file directly in your plugin. We can store the
>> filename
>> > path of the DICOM data in the DataEntity. Your processor can read the
>> file
>> > using dcmAPI and retrieve the tags you need.
>> >       2. Add an "import tags" button/flag in the DICOM Plugin: We could
>> > add a button/flag in the DICOM Plugin to import the DICOM tags from the
>> > current slice and create a DataEntity with all this information. For
>> > example
>> > using the DICOM tags browser widget.
>> >
>> >       Please let me know what do you think is the best solution for your
>> > problem.
>> >
>> > Best regards,
>> > Xavi
>> >
>> > From: Aida Ninyerola [mailto:[email protected]]
>> > Sent: lunes, 09 de julio de 2012 14:42
>> > To: [email protected]
>> > Subject: [Gimias-developers] reading DICOM tags
>> >
>> > Hello,
>> >
>> > I need to read some tags from the dicom file loaded by the user. I need
>> > some
>> > of the information to proccess the images.
>> > Is there any way to have this information from the dicom tags in my
>> plugin?
>> >
>> > Thanks,
>> > Aida
>> >
>> >
>>
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers

Reply via email to