<br>Here is the very very old code about GDCM. I can't really recall anything from this project, you might need to dig into it yourself. But I believe all the comments and the sample usage may help you a bit. I am very busy recently and I can't offer you more help.<br>
<br><a href="http://www.rpi.edu/~chens/download/DicomLoad.cpp">http://www.rpi.edu/~chens/download/DicomLoad.cpp</a><br><br>Cheers,<br>Siqi<br><br><div class="gmail_quote">On Wed, Mar 10, 2010 at 4:51 AM, <span dir="ltr"><<a href="mailto:edoardo.belletti@alice.it">edoardo.belletti@alice.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p><font size="2">Thanks<br>
Ok I have download gdcm-2.0.12, compile it and set ITK_USE_SYSTEM_GDCM: ON<br>
than it is correcto to use a CMakeList.txt as this to run my code?:<br>
<br>
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)<br>
<br>
PROJECT(ImageIO)<br>
<br>
# Find ITK.<br>
FIND_PACKAGE(ITK REQUIRED)<br>
IF(ITK_FOUND)<br>
INCLUDE(${ITK_USE_FILE})<br>
ENDIF(ITK_FOUND)<br>
<br>
OPTION(MITK_USE_SYSTEM_GDCM "Use an outside build of GDCM." OFF)<br>
MARK_AS_ADVANCED(MITK_USE_SYSTEM_GDCM)<br>
IF(MITK_USE_SYSTEM_GDCM)<br>
FIND_PACKAGE(GDCM)<br>
IF(GDCM_FOUND)<br>
INCLUDE(${GDCM_USE_FILE})<br>
IF( "${GDCM_MAJOR_VERSION}" LESS 2.0 )<br>
SET(MITK_GDCM_LIBRARIES gdcm)<br>
ELSE( "${GDCM_MAJOR_VERSION}" LESS 2.0 )<br>
SET(MITK_GDCM_LIBRARIES gdcmMSFF)<br>
ENDIF( "${GDCM_MAJOR_VERSION}" LESS 2.0 )<br>
ELSE(GDCM_FOUND)<br>
MESSAGE(FATAL_ERROR "Must set GDCM_DIR for MITK_USE_SYSTEM_GDCM.")<br>
ENDIF(GDCM_FOUND)<br>
ELSE(MITK_USE_SYSTEM_GDCM)<br>
SET(MITK_GDCM_LIBRARIES itkgdcm)<br>
SET(GDCM_INCLUDE_DIR<br>
${ITK_SOURCE_DIR}/Utilities/gdcm/src<br>
)<br>
ENDIF(MITK_USE_SYSTEM_GDCM)<br>
<br>
<br>
ADD_EXECUTABLE(dicom dicom.cxx)<br>
TARGET_LINK_LIBRARIES(dicom ITKCommon ITKIO)<br>
<br>
<br>
But if it is correct, how can I create a code in gdcm to access all the tags of my dicom file?<br>
and in particular the SQ tag because the tag that I need is: "SequenceOfUltrasoundReagions".<br>
<br>
thank you very much for your interes<br>
Edoardo<br>
<br>
================================================================<br>
<br>
================================================================<br>
-----Messaggio originale-----<br>
Da: siqi chen [<a href="mailto:siqichensc@gmail.com" target="_blank">mailto:siqichensc@gmail.com</a>]<br>
Inviato: mer 10/03/2010 1.31<br>
A: <a href="mailto:edoardo.belletti@alice.it" target="_blank">edoardo.belletti@alice.it</a>; insight-users<div><div></div><div class="h5"><br>
Oggetto: Re: [Insight-users] Dicom Image : How to access to all the tags<br>
<br>
Yes. You need to download the latest version of GDCM, compile it (same as<br>
you do with ITK), in your cmake, you need to link your code to their<br>
libraries. I believe ITK does not include all libraries of GDCM, at least a<br>
couple of months ago.<br>
<br>
I wrote some code before to access patient tag (patient ID, and some very<br>
subtle things) from Dicom image I will try to find it and send it to you.<br>
<br>
Siqi<br>
<br>
On Tue, Mar 9, 2010 at 6:48 PM, <<a href="mailto:edoardo.belletti@alice.it" target="_blank">edoardo.belletti@alice.it</a>> wrote:<br>
<br>
> Sorry but I don't undersand. What can I do for access all the tag<br>
> information?<br>
> I must install GDCM 2.x and than cofigure it for ITK? How can I do this?<br>
><br>
> Sorry thank you very much<br>
> Edoardo<br>
><br>
> -----Messaggio originale-----<br>
> Da: <a href="mailto:insight-users-bounces@itk.org" target="_blank">insight-users-bounces@itk.org</a> per conto di siqi chen<br>
> Inviato: mar 09/03/2010 18.02<br>
> A: Mathieu Malaterre<br>
> Cc: ITK_forum<br>
> Oggetto: Re: [Insight-users] Dicom Image : How to access to all the tags<br>
><br>
><br>
> GDCM can access all the tag information, at least in my case.<br>
><br>
> <a href="http://www.creatis.insa-lyon.fr/software/public/Gdcm/" target="_blank">http://www.creatis.insa-lyon.fr/software/public/Gdcm/</a><br>
><br>
> On Tue, Mar 9, 2010 at 4:58 AM, Mathieu Malaterre <<br>
> <a href="mailto:mathieu.malaterre@gmail.com" target="_blank">mathieu.malaterre@gmail.com</a>> wrote:<br>
><br>
> > > <a href="mailto:edoardo.belletti@alice.it" target="_blank">edoardo.belletti@alice.it</a> wrote:<br>
> > >><br>
> > >> Hi Insight-users,<br>
> > >> I have a problem: I don't know how can I access to all the tags<br>
> present<br>
> > in<br>
> > >> a dicom image.<br>
> > >> With the code used in the example of the manual<br>
> > >> (Examples/IO/DicomImageReadPrintTags.cxx) not all the tags are printed<br>
> > and<br>
> > >> for accuracy in the output there isn't the tag<br>
> > >> "SequenceOfUltrasoundReagions" that interest me. But I know that in<br>
> the<br>
> > file<br>
> > >> which I run this tag is present.<br>
> > >> How can I access to this tag?<br>
> > >> I hope I was understandable.<br>
> > >> In particular the piece of code is:<br>
> > ><br>
> > On Tue, Mar 9, 2010 at 10:49 AM, Gomez, Alberto <<a href="mailto:alberto.gomez@kcl.ac.uk" target="_blank">alberto.gomez@kcl.ac.uk</a><br>
> ><br>
> > wrote:<br>
> > > Hi,<br>
> > ><br>
> > > I have had the same problem but I think that there is no solution. It<br>
> > > depends on the manufacturer of the US acquisition system, and whether<br>
> the<br>
> > > tags are private or not, and the data encrypted.<br>
> ><br>
> > No.<br>
> ><br>
> > The DICOM Attribute the OP refers to is a VR:SQ (a public element). As<br>
> > of now itk::GDCMImageIO does not load VR:SQ DICOM attribute. As<br>
> > described here:<br>
> ><br>
> > <a href="http://www.itk.org/Doxygen/html/classitk_1_1GDCMImageIO.html#_details" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1GDCMImageIO.html#_details</a><br>
> ><br>
> > ...<br>
> > Warning:<br>
> > There are several restrictions to this current writer:<br>
> ><br>
> > * Eventhough during the writing process you pass in a DICOM<br>
> > file as input The output file may not contains ALL DICOM field from<br>
> > the input file. In particular:<br>
> > o The SeQuence DICOM field (SQ).<br>
> > o Fields from Private Dictionary<br>
> > * Some very long (>0xfff) binary fields are not loaded<br>
> > (typically 0029|0010), you need to explicitely set the maximum length<br>
> > of elements to load to be bigger (see Get/SetMaxSizeLoadEntry)<br>
> > ...<br>
> ><br>
> ><br>
> > You have to use the underlying DICOM library (GDCM 1.x or GDCM 2.x) to<br>
> > extract that particular -nested- information.<br>
> ><br>
> > HTH<br>
> > --<br>
> > Mathieu<br>
> > _____________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
> ><br>
> > Visit other Kitware open-source projects at<br>
> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Kitware offers ITK Training Courses, for more information visit:<br>
> > <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
> ><br>
> > Please keep messages on-topic and check the ITK FAQ at:<br>
> > <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
> ><br>
><br>
><br>
<br>
</div></div></font>
</p>
</div>
</blockquote></div><br>