From husky22 at web.de Sat Dec 2 00:01:35 2006 From: husky22 at web.de (Clemens Hentschke) Date: Sat, 02 Dec 2006 00:01:35 +0100 Subject: [Dcmlib] Problem integrating GDCM in FLTK/ITK-Project Message-ID: <939193723@web.de> Hello, i wrote some code that reads some Header-tags from DICOM. The code works, i tried it in a single cxx-file. But now i want to integrate in my project, that contains also ITK and FLTK. I copied the code as a function in my project and added the right functions to CMakeLists.txt, so that the compiler/linker finds GDCM. But my Compiler (gcc) don't want to compile my project, the error is: /usr/local/include/gdcm/gdcmDataEntry.h:39: error: ISO C++ forbids declaration of `gdcmTypeMacro' with no type Here is my CMakeLists: PROJECT(fbp) # Look for FLTK INCLUDE (${CMAKE_ROOT}/Modules/FindFLTK.cmake) # and ITK INCLUDE (${CMAKE_ROOT}/Modules/FindITK.cmake) IF (USE_ITK_FILE) INCLUDE(${USE_ITK_FILE}) ENDIF(USE_ITK_FILE) Look for GDCM FIND_PACKAGE(GDCM REQUIRED) INCLUDE(${GDCM_USE_FILE}) INCLUDE_DIRECTORIES( ${GDCM_SOURCE_DIR}/src ${GDCM_BINARY_DIR} ${GDCM_BINARY_DIR}/src ) LINK_LIBRARIES( # FLTK libraries ${FLTK_BASE_LIBRARY} ${FLTK_FORMS_LIBRARY} ${FLTK_PLATFORM_DEPENDENT_LIBS} # ITK libraries ITKCommon ITKIO ITKMetaIO ) SET( fbp_App_SRCS migAppBase migAppGUI migApp gsproject ) ADD_EXECUTABLE( fbp main ${fbp_App_SRCS} ./ospect/ospect.c ./ospect/common_reconst.c ./ospect/common_ospect.c ) TARGET_LINK_LIBRARIES(fbp gdcm) Do you have an idea what could be the problem?? Thank you in advance -Clemens _____________________________________________________________________ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071&distributionid=000000000066 From jpr at creatis.insa-lyon.fr Thu Dec 7 20:35:06 2006 From: jpr at creatis.insa-lyon.fr (Jean-Pierre Roux) Date: Thu, 07 Dec 2006 20:35:06 +0100 Subject: [Dcmlib] [Fwd: the ultimate dicom reader fight] In-Reply-To: <457840F9.1080007@theralys.com> References: <457840F9.1080007@theralys.com> Message-ID: <45786CEA.3020201@creatis.univ-lyon1.fr> Emmanuel Olart wrote: > Salut Vous ! > Voici une petite colle pour vous. > > Pour nos besoins internes on est en train de valider gdcm (comme je te > l avais dit) et on tombe sur quelques curiosit?s avec certaines images > (surtout des philips) > On compare les valeurs lues dans les headers par gdcm d'une part, et > dcmtk d'autre part (on savait pas trop choisir comme gold standard, on > s'est dit pkoi pas lui). > On compare ?galement les images data qu'on recupere. > Outre le fait que dcmtk est un enfer a utiliser (et je pese mes mots), > on a fini par extraire les valeurs des image data par les deux methodes. > On les compare sur 150 series tests (un peu tous les imageurs qu'on a > pu trouver) et on regarde ce qui match / match pas. > > Dans le cas des images ci jointes, on a des diff?rentes tres > importantes dans les valeurs d'intensit? des pixels qu'on r?cupere. > - gdcm nous donne en gros des valeurs entre 0 et 500 > - dcmtk entre 0 et 3500 OK; On a de la chance : les images ne sont pas compress?es, elles sont LittleEndian et mon PC aussi, elles sont MONOCHROME2 (0, c'est noir, 4095, c'est blanc ...) J'ai fait un programme de bourricot, qui saute (fseek) l'entete, avec la taille que me montre PrintFile filein= TOF-MRA_93_0051 level=2 (8454) et qui fait des read, 2 octets a la fois, et calcule le max. Je retrouve la meme valeur que gdcm (441). Ou alors, un coup d'editeur hexadecimal sur l'image, et tu recherches (au traitement de texte) BB (car 3003 en base 10, ca fait BBB en base 16. Any comment? JP > > on a regard? efilm pour arbitrer : il est ok avec gdcm > on a regard? avec la librairie de Leads : elle penche pour dcmtk > Avez vous une id?e quelquonque de pourquoi on trouve de telles > diff?rences ? Interpr?tation des data ? LUT ? encodage ? > Au niveau des headers, ca colle globalement, a qques espaces et \0 prets. > > Merci d'avance ! > > Manu > > -------- Message original -------- > Sujet: the ultimate dicom reader fight > Date: Thu, 07 Dec 2006 17:19:37 +0100 > De: Nicolas Villetard > Pour: Emmanuel Olart > > > > > TOF-MRA_93_0051 > gdcm, efilm: valeur max = 441 > dcmtk, LEADS medical imaging: valeur max = 3003 > > 3DT1_88_0074 > gdcm, efilm: valeur max = 492 > dcmtk, LEADS medical imaging: valeur max = 2253 > > diantre! > > -- > > Nicolas Villetard. > Quality Assurance & Regulatory Affairs > > *THERALYS* > Diagnostic & Therapeutic Image Analysis in Clinical Trials > > Address : > > > > THERALYS > 60 avenue Rockefeller > 69008 Lyon (France) > > Phone : > > > > +33 (0)4 26 23 05 05 > > Fax : > > > > +33 (0)4 26 23 05 06 > > Email : > > > > nvilletard at theralys.com > > Web site: > > > > www.theralys.com > > > -- > Emmanuel OLART, IT Manager > *THERALYS* > Diagnostic & Therapeutic Image Analysis in Clinical Trials > > Address : Bioparc, 60 av. Rockefeller, 69008 Lyon, France > +33 (0)4 26 23 05 05 (Phone) > +33 (0)4 26 23 05 06 (Fax) > Email : eolart at theralys.com > THERALYS From mathieu.malaterre at kitware.com Thu Dec 7 20:43:00 2006 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Thu, 07 Dec 2006 14:43:00 -0500 Subject: [Dcmlib] [Fwd: the ultimate dicom reader fight] In-Reply-To: <45786CEA.3020201@creatis.univ-lyon1.fr> References: <457840F9.1080007@theralys.com> <45786CEA.3020201@creatis.univ-lyon1.fr> Message-ID: <45786EC4.20608@kitware.com> Juste pour etre consistant est-ce que vous pouvez essayer ITK-gdcm pour lire les images et et faire un print image->GetScalarRange(); gdcm n'applique pas le Modality LUT, donc slope et intercept sont ignores. Mais c'est fais au niveau de ITK. @+ -M Ps: si j'avais access au images en question je pourrais repondre de maniere plus sur, mais pour l'instant c'est le seul probleme que j'envisage... Jean-Pierre Roux wrote: > Emmanuel Olart wrote: > >> Salut Vous ! >> Voici une petite colle pour vous. >> >> Pour nos besoins internes on est en train de valider gdcm (comme je te >> l avais dit) et on tombe sur quelques curiosit?s avec certaines images >> (surtout des philips) >> On compare les valeurs lues dans les headers par gdcm d'une part, et >> dcmtk d'autre part (on savait pas trop choisir comme gold standard, on >> s'est dit pkoi pas lui). >> On compare ?galement les images data qu'on recupere. >> Outre le fait que dcmtk est un enfer a utiliser (et je pese mes mots), >> on a fini par extraire les valeurs des image data par les deux methodes. >> On les compare sur 150 series tests (un peu tous les imageurs qu'on a >> pu trouver) et on regarde ce qui match / match pas. >> >> Dans le cas des images ci jointes, on a des diff?rentes tres >> importantes dans les valeurs d'intensit? des pixels qu'on r?cupere. >> - gdcm nous donne en gros des valeurs entre 0 et 500 >> - dcmtk entre 0 et 3500 > > OK; > On a de la chance : les images ne sont pas compress?es, elles sont > LittleEndian et mon PC aussi, elles sont MONOCHROME2 (0, c'est noir, > 4095, c'est blanc ...) > J'ai fait un programme de bourricot, qui saute (fseek) l'entete, avec la > taille que me montre PrintFile filein= TOF-MRA_93_0051 level=2 (8454) > et qui fait des read, 2 octets a la fois, et calcule le max. > Je retrouve la meme valeur que gdcm (441). > Ou alors, un coup d'editeur hexadecimal sur l'image, et tu recherches > (au traitement de texte) BB (car 3003 en base 10, ca fait BBB en base 16. > > Any comment? > JP > >> >> on a regard? efilm pour arbitrer : il est ok avec gdcm >> on a regard? avec la librairie de Leads : elle penche pour dcmtk >> Avez vous une id?e quelquonque de pourquoi on trouve de telles >> diff?rences ? Interpr?tation des data ? LUT ? encodage ? >> Au niveau des headers, ca colle globalement, a qques espaces et \0 prets. >> >> Merci d'avance ! >> >> Manu >> >> -------- Message original -------- >> Sujet: the ultimate dicom reader fight >> Date: Thu, 07 Dec 2006 17:19:37 +0100 >> De: Nicolas Villetard >> Pour: Emmanuel Olart >> >> >> >> >> TOF-MRA_93_0051 >> gdcm, efilm: valeur max = 441 >> dcmtk, LEADS medical imaging: valeur max = 3003 >> >> 3DT1_88_0074 >> gdcm, efilm: valeur max = 492 >> dcmtk, LEADS medical imaging: valeur max = 2253 >> >> diantre! >> >> -- >> >> Nicolas Villetard. >> Quality Assurance & Regulatory Affairs >> >> *THERALYS* >> Diagnostic & Therapeutic Image Analysis in Clinical Trials >> >> Address : >> >> >> >> THERALYS >> 60 avenue Rockefeller >> 69008 Lyon (France) >> >> Phone : >> >> >> >> +33 (0)4 26 23 05 05 >> >> Fax : >> >> >> >> +33 (0)4 26 23 05 06 >> >> Email : >> >> >> >> nvilletard at theralys.com >> >> Web site: >> >> >> >> www.theralys.com >> >> >> -- >> Emmanuel OLART, IT Manager >> *THERALYS* >> Diagnostic & Therapeutic Image Analysis in Clinical Trials >> >> Address : Bioparc, 60 av. Rockefeller, 69008 Lyon, France >> +33 (0)4 26 23 05 05 (Phone) >> +33 (0)4 26 23 05 06 (Fax) >> Email : eolart at theralys.com >> THERALYS > > From mathieu.malaterre at gmail.com Fri Dec 8 18:59:40 2006 From: mathieu.malaterre at gmail.com (Mathieu) Date: Fri, 08 Dec 2006 17:59:40 -0000 Subject: [Dcmlib] Fwd: JasPer 1.900.0 Available Message-ID: --- In jasper-announce at yahoogroups.com, Michael Adams wrote: Dear JasPer Users: I am pleased to announce the availability of JasPer version 1.900.0. Numerous changes have been made to the software since the last release. A few of the highlights are listed below. This list is in no particular order, and is not intended to be exhaustive. 1) The wavelet transform code has been rewritten in order to be more cache efficient (via loop tiling). As a few individuals have noted, the old code could often result in an excessive number of cache misses. 2) Some man pages have been added to the distribution as provided by Roland Stigge . 3) Some simple timer routines have been added to facilitate performance measurements. 4) Numerous bugs have been fixed (e.g., memory leaks, JP2 box processing problem, etc.). 5) Some name space pollution issues have been resolved. 6) A few compiler warnings have been fixed. I would like to thank the individuals listed below for providing reports/patches/corrections for some of the bugs fixed in this release. (My apologies if I have missed any names here.) Ben Harper Bob Friesenhahn Bob Murphy Conrad Terrill David Pritchard d binderman Eric Brooks Francisca Munoz Guillaume ODIN jabbah_69 James Lacey jefferypalmer Jens Brandenburger Kaspar Daugaard Larry Beck Martin Willers Matthias Kurz Pavel Nemec Pierre-e Gougelet Ray Johnston rexdieter Scott Marovich Stefan Sikora The new JasPer release is available from the JasPer Project Home Page (i.e., http://www.ece.uvic.ca/~mdadams/jasper) and the JPEG web site (i.e., http://www.jpeg.org/software). Regards, Michael --- Michael Adams, Assistant Professor Dept. of Elec. and Comp. Engineering, University of Victoria P.O. Box 3055 STN CSC, Victoria, BC, V8W 3P6, CANADA E-mail: mdadams at ..., Web: www.ece.uvic.ca/~mdadams --- End forwarded message --- From hudr at hotmail.com Tue Dec 12 01:35:47 2006 From: hudr at hotmail.com (Dennis) Date: Mon, 11 Dec 2006 16:35:47 -0800 Subject: [Dcmlib] Multi-frames DICOM reading in vtkGDCMReader consumes too much of memory. Message-ID: Hello, I have tried to read multi-frames DICOM file by using vtkGDCMReader. I found vtkGDCMReader will allocate one huge block memory to load image PixelData from file and another block of memory of the same size for destination(for flipping in y-direction). This approach will cause the peak memory size is very high because it will allocate two huge block memory during executing. For examples, if the imageData File's size is 170M, the peak memory size will hit 340M. Is there any possible to read just one slice pixelData from file instead of reading all? So we can do data streaming to avoid the high peak memory size. Bests, Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: From husky22 at web.de Tue Dec 12 02:01:51 2006 From: husky22 at web.de (Clemens Hentschke) Date: Tue, 12 Dec 2006 02:01:51 +0100 Subject: [Dcmlib] Writing Dicom to Raw Message-ID: <966383156@web.de> Hello, i have a DICOM and just want to convert this into a image-raw-format (without image header), just the pixel-values as they are in the dicom. My code is: file = gdcm::File::New( ); file->SetLoadMode ( gdcm::LD_ALL ); file->SetFileName("test.dcm"); bool res = file->Load(); if (!res) { std::cerr << "Sorry, " << " not a gdcm-readable " << "DICOM / ACR File" << std::endl; file->Delete(); return -1; } gdcm::FileHelper *fh = gdcm::FileHelper::New(file); fh->SetWriteModeToRaw(); fh->WriteRawData("Neu.IMG"); but there is always the error: Error: In /usr/gdcm/src/gdcmFileHelper.cxx, line 603, function bool gdcm::FileHelper::WriteRawData(const std::string&) Nothing written. where is my error? I have the cvs version of gdcm, downloaded about two weeks ago Thanks -Clemens ______________________________________________________________________________ "Ein Herz f?r Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de Unser Dankesch?n: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht! From eolart at theralys.com Tue Dec 12 09:27:33 2006 From: eolart at theralys.com (Emmanuel Olart) Date: Tue, 12 Dec 2006 09:27:33 +0100 Subject: [Dcmlib] Writing Dicom to Raw In-Reply-To: <966383156@web.de> References: <966383156@web.de> Message-ID: <457E67F5.1000806@theralys.com> I clemens, I think you just have to add the following line before writing anything : fh->GetImageData(); This will actually load the image data into memory wo you can write it. Best Emmanuel Clemens Hentschke a ?crit : > Hello, > > i have a DICOM and just want to convert this into a image-raw-format (without image header), just the pixel-values as they are in the dicom. > > My code is: > file = gdcm::File::New( ); > file->SetLoadMode ( gdcm::LD_ALL ); > file->SetFileName("test.dcm"); > > bool res = file->Load(); > if (!res) { > std::cerr << "Sorry, " << " not a gdcm-readable " << "DICOM / ACR File" << std::endl; > file->Delete(); > return -1; > } > gdcm::FileHelper *fh = gdcm::FileHelper::New(file); > fh->SetWriteModeToRaw(); > fh->WriteRawData("Neu.IMG"); > but there is always the error: Error: In /usr/gdcm/src/gdcmFileHelper.cxx, line 603, function bool gdcm::FileHelper::WriteRawData(const std::string&) > Nothing written. > > where is my error? I have the cvs version of gdcm, downloaded about two weeks ago > Thanks > -Clemens > > ______________________________________________________________________________ > "Ein Herz f?r Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de > Unser Dankesch?n: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht! > > > _______________________________________________ > Dcmlib mailing list > Dcmlib at creatis.insa-lyon.fr > http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib > -- Emmanuel OLART, IT Manager *THERALYS* Diagnostic & Therapeutic Image Analysis in Clinical Trials Address : Bioparc, 60 av. Rockefeller, 69008 Lyon, France +33 (0)4 26 23 05 05 (Phone) +33 (0)4 26 23 05 06 (Fax) Email : eolart at theralys.com THERALYS -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Theralys_small.gif Type: image/gif Size: 3177 bytes Desc: not available URL: From jpr at creatis.insa-lyon.fr Tue Dec 12 11:15:02 2006 From: jpr at creatis.insa-lyon.fr (Jean-Pierre Roux) Date: Tue, 12 Dec 2006 11:15:02 +0100 Subject: [Dcmlib] Writing Dicom to Raw In-Reply-To: <966383156@web.de> References: <966383156@web.de> Message-ID: <457E8126.2040603@creatis.univ-lyon1.fr> Clemens Hentschke wrote: >Hello, > >i have a DICOM and just want to convert this into a image-raw-format (without image header), just the pixel-values as they are in the dicom. > >My code is: >file = gdcm::File::New( ); > file->SetLoadMode ( gdcm::LD_ALL ); > file->SetFileName("test.dcm"); > > bool res = file->Load(); > if (!res) { > std::cerr << "Sorry, " << " not a gdcm-readable " << "DICOM / ACR File" << std::endl; > file->Delete(); > return -1; > } > > OK. Probablely the name 'Load' confused you. The method load the *header*, not the image pixels. Just add fh->GetImageDataRaw(); to load the pixels. (using fh->GetImageData(); would convert any image with a LUT into an RGB image. For 'gray level images', GetImageData() and GetImageDataRaw() are equivalent) > gdcm::FileHelper *fh = gdcm::FileHelper::New(file); > fh->SetWriteModeToRaw(); > fh->WriteRawData("Neu.IMG"); > but there is always the error: Error: In /usr/gdcm/src/gdcmFileHelper.cxx, line 603, function bool gdcm::FileHelper::WriteRawData(const std::string&) >Nothing written. > >where is my error? I have the cvs version of gdcm, downloaded about two weeks ago > > By the way, did you solve your compile time ITK problem? Just tell me : you dowloaded gdcm (version 1.3.1) and you work with a standard version of ITK, right? ITK uses dgcm1.2.x, nad prbabely, this confuses the complier. Actually, I don't know waht you wanted to do is possible? Mathieu, any comment? (maybe you told Clemens to convert his data into Raw images?) Jean-Pierre Roux >Thanks > -Clemens > >______________________________________________________________________________ >"Ein Herz f?r Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de >Unser Dankesch?n: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht! > > >_______________________________________________ >Dcmlib mailing list >Dcmlib at creatis.insa-lyon.fr >http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib > > > From husky22 at web.de Wed Dec 13 03:21:16 2006 From: husky22 at web.de (Clemens M. Hentschke) Date: Tue, 12 Dec 2006 18:21:16 -0800 Subject: [Dcmlib] Writing Dicom to Raw In-Reply-To: <457E8126.2040603@creatis.univ-lyon1.fr> References: <966383156@web.de> <457E8126.2040603@creatis.univ-lyon1.fr> Message-ID: <457F639C.8040008@web.de> Jean-Pierre Roux schrieb: > Clemens Hentschke wrote: > >> Hello, >> >> i have a DICOM and just want to convert this into a image-raw-format >> (without image header), just the pixel-values as they are in the dicom. >> My code is: >> file = gdcm::File::New( ); >> file->SetLoadMode ( gdcm::LD_ALL ); >> file->SetFileName("test.dcm"); >> >> bool res = file->Load(); if (!res) { >> std::cerr << "Sorry, " << " not a gdcm-readable " << "DICOM / >> ACR File" << std::endl; >> file->Delete(); >> return -1; >> } >> >> > OK. > Probablely the name 'Load' confused you. > The method load the *header*, not the image pixels. > Just add > fh->GetImageDataRaw(); > to load the pixels. > (using > fh->GetImageData(); would convert any image with a LUT into an RGB image. > For 'gray level images', GetImageData() and GetImageDataRaw() are > equivalent) > >> gdcm::FileHelper *fh = gdcm::FileHelper::New(file); >> fh->SetWriteModeToRaw(); >> fh->WriteRawData("Neu.IMG"); >> but there is always the error: Error: In >> /usr/gdcm/src/gdcmFileHelper.cxx, line 603, function bool >> gdcm::FileHelper::WriteRawData(const std::string&) >> Nothing written. >> >> where is my error? I have the cvs version of gdcm, downloaded about >> two weeks ago >> >> > > By the way, did you solve your compile time ITK problem? > > > Just tell me : you dowloaded gdcm (version 1.3.1) and you work with a > standard version of ITK, right? > ITK uses dgcm1.2.x, nad prbabely, this confuses the complier. > Actually, I don't know waht you wanted to do is possible? > Mathieu, any comment? > (maybe you told Clemens to convert his data into Raw images?) > Jean-Pierre Roux > >> Thanks >> -Clemens >> >> ______________________________________________________________________________ >> >> "Ein Herz f?r Kinder" - Ihre Spende hilft! Aktion: >> www.deutschlandsegelt.de >> Unser Dankesch?n: Ihr Name auf dem Segel der 1. deutschen America's >> Cup-Yacht! >> >> >> _______________________________________________ >> Dcmlib mailing list >> Dcmlib at creatis.insa-lyon.fr >> http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib >> >> >> > > Thank you, the GetImageDataRaw() works fine! I couldnt solve the ITK Problem. I am working with the standard ITK Version 2.8.1 and the Current gdcm version. However, with using an external GDCM version in ITK the ITK build process failed and with the integrated version (1.2) there was missing a class (DataEntry). However, gdcm has all the methods i need (to read the dicom header and the pixel information), and because of that i dont need ITK anymore in my project and i dont have to handle with it, so all that i want works fine. Thanks for the help! -Clemens From mathieu.malaterre at kitware.com Fri Dec 15 19:36:29 2006 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Fri, 15 Dec 2006 13:36:29 -0500 Subject: [Dcmlib] [Insight-users] GDCM in ITK In-Reply-To: <457E10EB.9030404@film-streifen.de> References: <20061205202013.189460@gmx.net> <9ddb27260612052013g607743b0i9a509581e6ad9f08@mail.gmail.com> <4576DA2C.8080301@kitware.com> <457E10EB.9030404@film-streifen.de> Message-ID: <4582EB2D.1020504@kitware.com> > Yes, there are not as much changes, but the problem is i want to read > SQ-Tags from DICOM. So i cant use ITK, i have to use gdcm. As in the > gdcm version from ITK (1.2) there is no class DataEntry, i cant compile > there (i have to cast DocEntry to Data Entry or SeqEntry) and i cant > access these values in SQ-Tags. I found no other way to do that. ITK > does that, as far as i understand, with MetaDataInformation. > My solution is not using anymore ITK, only gdcm but i have to make some > changes... It used to be BinEntry, ValEntry and SQEntry. See implementation of itk::GDCMImageIO for example: http://public.kitware.com/cgi-bin/cvsweb.cgi/Code/IO/itkGDCMImageIO.cxx?annotate=1.110&root=Insight Look for the line: if ( gdcm::BinEntry* b = dynamic_cast(d) ) Do not hesitate to use this mailing list if you have any further question, HTH Mathieu