[Dcmlib] Re: [Gdcm2] gdcmPrinter

Jean-Pierre Roux Jean-Pierre.Roux at creatis.insa-lyon.fr
Mon Feb 27 10:33:50 CET 2006


Mathieu Malaterre wrote:

>Salut,
>
>  
>
Il y a qq chose qui m'inquiete un peu, c'est que ctest pete tres 
rapidement sur le test 'TestAllLoadMinimumStuff".
C'est un truc archi nul que j'ai ecrit (et qui marchait, il y a ... 
longtemps) :
il ouvre chaque image :  
  gdcm::FileSeeker f;
  f.SetFileName(filename);
  f.Open();
  f.Initialize();
et tente de charger la vingtaine de Tags dont on a besoin tout le temps :
ex :
  const gdcm::Tag samplesPerPixel(0x0028,0x0002);
  const gdcm::Tag photomInterp(0x0028,0x0004);
  const gdcm::Tag planConfig(0x0028,0x0006);
  const gdcm::Tag nFrames(0x0028,0x0008);
  const gdcm::Tag nRows(0x0028,0x0010);
  const gdcm::Tag nCol(0x0028,0x0011);
  const gdcm::Tag nPlanes(0x0028,0x0012);
  const gdcm::Tag pixelSpacing(0x0028,0x0030);
  const gdcm::Tag bitsAllocated(0x0028,0x0100);
  const gdcm::Tag bitsStored(0x0028,0x0101);
  const gdcm::Tag highBit(0x0028,0x0102);
  const gdcm::Tag pixelRepresentation(0x0028,0x0103);

et ne fait rien d'autre ...

Voila ce que j'obtiens :


[jpr at localhost gdcmbin]$ ctest -V -I 1,1
Test project
Constructing a list of tests
Done constructing a list of tests
Changing directory into /home/jpr/gdcm2/gdcmbin/Tests/Parser
  1/ 28 Testing TestAllLoadMinimumStuff
Test command: /home/jpr/gdcm2/gdcmbin/bin/gdcmTests TestAllLoadMinimumStuff

UID of file: /home/jpr/DataLinuxWindoze/gdcmData/CT-MONO2-12-lomb-an2.acr
Warning: In /home/jpr/gdcm2/gdcm/Source/Parser/gdcmFileSeeker.cxx, line 
57, function bool gdcm::SkipGroup(gdcm::FileSeeker&) [with DEType = 
gdcm::ImplicitDataElement]
Group length seems to stop after group 0x8.Length seems to be wrong : 366
This file does not contains: Study Instance UID
*==> Normal, c'est un fichier ACR-NEMA*


UID of file: 
/home/jpr/DataLinuxWindoze/gdcmData/LIBIDO-8-ACR_NEMA-Lena_128_128.acr
This file does not contains: Study Instance UID
*==> Normal, c'est un fichier ACR-NEMA*

UID of file: /home/jpr/DataLinuxWindoze/gdcmData/MR-MONO2-12-an2.acr
This file contains: Study Instance UID
Value is: 1.3.12.2.1107.5.8.1.123456789.199507271758050705910
UID of file: /home/jpr/DataLinuxWindoze/gdcmData/MR-MONO2-12-angio-an1.acr
Warning: In /home/jpr/gdcm2/gdcm/Source/Parser/gdcmFileSeeker.cxx, line 
57, function bool gdcm::SkipGroup(gdcm::FileSeeker&) [with DEType = 
gdcm::ImplicitDataElement]
Group length seems to stop after group 0x8.Length seems to be wrong : 190
This file does not contains: Study Instance UID
*==> Normal, c'est un fichier ACR-NEMA

*UID of file: 
/home/jpr/DataLinuxWindoze/gdcmData/SIEMENS_GBS_III-16-ACR_NEMA_1.acr
This file does not contains: Study Instance UID
UID of file: 
/home/jpr/DataLinuxWindoze/gdcmData/SIEMENS_SOMATOM-12-ACR_NEMA-ZeroLengthUs.acr
Warning: In /home/jpr/gdcm2/gdcm/Source/Parser/gdcmFileSeeker.cxx, line 
66, function bool gdcm::SkipGroup(gdcm::FileSeeker&) [with DEType = 
gdcm::ImplicitDataElement]
No group length found, fallback to seeking file instead
This file contains: Study Instance UID
Value is: 1.3.12.2.1107.5.8.99.484849.834848.79844848.2001082213291053
*==> Normal

*UID of file: /home/jpr/DataLinuxWindoze/gdcmData/gdcm-ACR-LibIDO.acr
This file does not contains: Study Instance UID
UID of file: /home/jpr/DataLinuxWindoze/gdcmData/gdcm-MR-SIEMENS-16-2.acr
This file contains: Study Instance UID
Value is: 1.3.12.2.1107.5.2.4.7630.20000918174641000
*==> Normal*


UID of file: /home/jpr/DataLinuxWindoze/gdcmData/test.acr
This file does not contains: Study Instance UID
UID of file: /home/jpr/DataLinuxWindoze/gdcmData/00191113.dcm
Warning: In /home/jpr/gdcm2/gdcm/Source/Parser/gdcmFileSeeker.cxx, line 
57, function bool gdcm::SkipGroup(gdcm::FileSeeker&) [with DEType = 
gdcm::ExplicitDataElement]
Group length seems to stop after group 0x28.Length seems to be wrong : 124
This file contains: Study Instance UID
Value is: 999.999.2.19940822.083000
*==> Normal*


UID of file: /home/jpr/DataLinuxWindoze/gdcmData/3E768EB7.dcm
Warning: In /home/jpr/gdcm2/gdcm/Source/Parser/gdcmFileSeeker.cxx, line 
66, function bool gdcm::SkipGroup(gdcm::FileSeeker&) [with DEType = 
gdcm::ExplicitDataElement]
No group length found, fallback to seeking file instead
This file contains: Study Instance UID
Value is: 1.2.124.113532.128.5.1.74.20030317.93902.1498477
*==> Normal*

UID of file: /home/jpr/DataLinuxWindoze/gdcmData/012345.002.050.dcm
gdcmTests: /home/jpr/gdcm2/gdcm/Source/Common/gdcmIStream.cxx:11: 
gdcm::IStream& gdcm::IStream::Read(char*, std::streamsize): Assertion 
`!(!InternalStream)' failed.

*==> ?!?*
*C'est un fichier DICOM tout a fait kasher : dciodvfy n'a d'autres 
reproches a lui faire que la syntaxe du nom du patient (il manque le ^ 
pour separer noim et prenom ...)

Any idea?
JPRx
*
-- Process completed

*** Exception executing: Child aborted
***Exception: Other
Changing directory into /home/jpr/gdcm2/gdcmbin/Tests/ModuleAttributes
Changing directory into /home/jpr/gdcm2/gdcmbin/Tests/Objects

0% tests passed, 1 tests failed out of 1

The following tests FAILED:
          1 - TestAllLoadMinimumStuff (OTHER_FAULT)


>   Ok j'ai un peu avancer dans la structure du gdcmPrinter. Si vous avez deux minutes merci de l'essayer. J'ai essayer de garder en tete une consommation memoire mimimun:
>- Je retuilise tout le temps le meme gdcm::DataElement, 
>- avec un taille max de 0xfff (meme astuce que gdcm1.x)
>
>Ca fais que j'ai sur tout gdcmData:
>$ time ./bin/gdcmTests TestPrinter >& /tmp/log
>./bin/gdcmTests TestPrinter >&/tmp/log  0.34s user 0.27s system 99% cpu 0.618 total
>
>
>Mathieu
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by xPML, a groundbreaking scripting language
>that extends applications into web and mobile media. Attend the live webcast
>and join the prime developer group breaking into this new coding territory!
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
>_______________________________________________
>Gdcm-developers mailing list
>Gdcm-developers at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gdcm-developers
>
>  
>



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Gdcm-developers mailing list
Gdcm-developers at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gdcm-developers



More information about the Dcmlib mailing list