Merge tag 'upstream/2.6.5'
Upstream version 2.6.5
Gert Wollny
7 years ago
24 | 24 | - CFLAGS="-g -O2" |
25 | 25 | - CXXFLAGS="-g -O2" |
26 | 26 | - B_NAME=default |
27 | - CPACK_NAME=Linux | |
27 | 28 | - compiler: gcc |
28 | 29 | os: linux |
29 | 30 | addons: {apt: {packages: [default-jdk, mono-devel, swig, libcharls-dev, libvtk5-dev, libopenjpeg-dev, libexpat-dev, libz-dev, uuid-dev, python-all-dev, libpoppler-dev, xsltproc, docbook-xsl, dcmtk]}} |
32 | 33 | - CXXFLAGS="-Wall -Wextra -m64" |
33 | 34 | - CMAKE_EXTRA="-DGDCM_USE_SYSTEM_OPENSSL:BOOL=ON -DGDCM_WRAP_PYTHON:BOOL=ON -DGDCM_WRAP_CSHARP:BOOL=ON -DGDCM_WRAP_JAVA:BOOL=ON -DGDCM_WRAP_PHP:BOOL=OFF -DGDCM_USE_SYSTEM_EXPAT:BOOL=ON -DGDCM_USE_SYSTEM_JSON:BOOL=OFF -DGDCM_USE_SYSTEM_LIBXML2:BOOL=ON -DGDCM_USE_SYSTEM_OPENJPEG:BOOL=ON -DGDCM_USE_SYSTEM_POPPLER:BOOL=ON -DGDCM_USE_SYSTEM_UUID:BOOL=ON -DGDCM_USE_SYSTEM_ZLIB:BOOL=ON -DGDCM_WEAK_SWIG_CHECK:BOOL=ON -DGDCM_LEGACY_SILENT:BOOL=ON" |
34 | 35 | - B_NAME=system |
36 | - CPACK_NAME=Linux | |
35 | 37 | - compiler: clang |
36 | 38 | os: linux |
37 | 39 | env: |
38 | 40 | - CFLAGS="-g -O0 -Wall -Wextra -m64 -fsanitize=address,undefined,shift" |
39 | 41 | - CXXFLAGS="-g -O0 -Wall -Wextra -m64 -fsanitize=address,undefined,shift" |
40 | 42 | - B_NAME=fsanitize |
43 | - CPACK_NAME=Linux | |
41 | 44 | - compiler: clang |
42 | 45 | os: osx |
43 | 46 | env: |
44 | 47 | - CFLAGS="-Wall -Wextra" # -m64 -fsanitize=address,undefined |
45 | 48 | - CXXFLAGS="-Wall -Wextra" # -m64 -fsanitize=address,undefined |
46 | 49 | - B_NAME=default |
50 | - CPACK_NAME=Darwin | |
47 | 51 | |
48 | 52 | before_install: |
49 | 53 | #- env |
79 | 83 | api_key: |
80 | 84 | secure: R5+dbibdcgPHq6cAPC8uepifDuS3yjZu2dBB2oSeQtBZTAeN1VIfJMrF8TeQDqj2GC28RHxXm4BHwdJ2FUpBXjOS2eUE6Mto1Rbbvfi63MREnFPIAWkNyLtR2Jxq/Gzb8X05PbCWGwCNvX9eeo+qcWTpczuQvJ+/bds7MyRsk45+sUc+j7rglAbxewgijsXebCkObwaXmhqTYJwrvf2lyEnA2Jo1gL2WmK6iPjHvTOVS9JfBMqVRmlk7j8efnqag8fMCzNp1Ess5wBy5Jf58qvVs7RuuBi16s7vOOBtb9xVjcDB1KaAxc/dDQGQhRkrveBtH18ZpFrArOj6DBPbupS3+xuU4ywdYbCuGnvdpRFafBc+iNU4M81crkFUDmSPEQChBnL4wwpaYaQ1LlgdlF0r9/Rlu2/iqKe4t7rdZnkQqQ/3SNNf+x4AKnGmaSGasV/VUXstTGVrtl7hsDMzSdrVCXODao0SRv5tPSI3BgAZi7NzCJ/xv5LgA1EQVkGdTQN0ZpKZCQYfifL5K6oYDI+WlAFU0OcH+9dy4KNqF+QnzMh9iPwP0zR6BN9yE0w6ydnyNt0CkIUaxgaTtr+pHPXsmmtgXzQScESC8B9JHGocOXjT6MtyUmoP/ewlPz2G6x114PnAL7LlZ07jPqAASJwW/ZiXtBcVxv50hPhC7L80= |
81 | 85 | file: |
82 | - GDCM-$VTAG-Linux-x86_64.tar.gz | |
83 | - GDCM-$VTAG-Linux-x86_64.tar.bz2 | |
86 | - GDCM-$VTAG-$CPACK_NAME-x86_64.tar.gz | |
87 | - GDCM-$VTAG-$CPACK_NAME-x86_64.tar.bz2 | |
84 | 88 | skip_cleanup: true |
85 | 89 | on: |
86 | 90 | repo: malaterre/GDCM |
141 | 141 | std::cout << " -C --sop-class-uid SOP Class UID (name or value)." << std::endl; |
142 | 142 | std::cout << " -T --study-uid Study UID." << std::endl; |
143 | 143 | std::cout << " -S --series-uid Series UID." << std::endl; |
144 | std::cout << " --template DICOM template." << std::endl; | |
145 | std::cout << " --keep-meta Keep meta info from template file (advanced users only)." << std::endl; | |
144 | 146 | std::cout << " --root-uid Root UID." << std::endl; |
145 | 147 | std::cout << "Fill Options:" << std::endl; |
146 | 148 | std::cout << " -R --region %d,%d Region." << std::endl; |
413 | 415 | gdcm::Filename filename; |
414 | 416 | gdcm::Directory::FilenamesType filenames; |
415 | 417 | gdcm::Filename outfilename; |
418 | gdcm::Filename templatefilename; | |
416 | 419 | unsigned int region[6] = {}; // Rows & Columns are VR=US anyway... |
417 | 420 | unsigned int color = 0; |
418 | 421 | int bregion = 0; |
422 | 425 | int pconf = 0; // planar configuration |
423 | 426 | int studyuid = 0; |
424 | 427 | int seriesuid = 0; |
428 | int templated = 0; | |
429 | int keepmeta = 0; | |
425 | 430 | unsigned int size[3] = {0,0,0}; |
426 | 431 | unsigned int ndimension = 2; |
427 | 432 | int depth = 0; |
472 | 477 | {"pi", 1, &pinter, 1}, // |
473 | 478 | {"pf", 1, &pformat, 1}, // |
474 | 479 | {"offset", 1, &poffset, 1}, // |
480 | {"template", 1, &templated, 1}, | |
481 | {"keep-meta", 0, &keepmeta, 1}, // by default we do not want to keep | |
475 | 482 | |
476 | 483 | // General options ! |
477 | 484 | {"verbose", 0, &verbose, 1}, |
585 | 592 | assert( strcmp(s, "offset") == 0 ); |
586 | 593 | poffset = 1; |
587 | 594 | start_pos = (size_t)atoll(optarg); |
595 | } | |
596 | else if( option_index == 17 ) /* template */ | |
597 | { | |
598 | assert( strcmp(s, "template") == 0 ); | |
599 | templated = 1; | |
600 | templatefilename = optarg; | |
588 | 601 | } |
589 | 602 | //printf (" with arg %s", optarg); |
590 | 603 | } |
830 | 843 | //if( !inputextension || !outputextension ) return 1; |
831 | 844 | if( inputextension ) |
832 | 845 | { |
846 | gdcm::Reader reader; | |
847 | if( templated ) | |
848 | { | |
849 | reader.SetFileName( templatefilename ); | |
850 | if( !reader.Read() ) | |
851 | { | |
852 | std::cerr << "Failed to read: " << templatefilename << std::endl; | |
853 | return 1; | |
854 | } | |
855 | } | |
833 | 856 | if( gdcm::System::StrCaseCmp(inputextension,".raw") == 0 // watch out that .raw for kakadu means big-endian |
834 | 857 | || gdcm::System::StrCaseCmp(inputextension,".rawl") == 0 // kakadu convention for raw little endian |
835 | 858 | || gdcm::System::StrCaseCmp(inputextension,".gray") == 0 // imagemagick convention |
843 | 866 | } |
844 | 867 | gdcm::RAWCodec raw; |
845 | 868 | gdcm::PixmapWriter writer; |
869 | writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) ); | |
870 | writer.SetFile( reader.GetFile() ); | |
846 | 871 | // Because the RAW stream is not self sufficient, we need to pass in some extra |
847 | 872 | // user info: |
848 | 873 | unsigned int dims[3] = {}; |
908 | 933 | } |
909 | 934 | gdcm::RLECodec rle; |
910 | 935 | gdcm::PixmapWriter writer; |
936 | writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) ); | |
937 | writer.SetFile( reader.GetFile() ); | |
911 | 938 | // Because the RLE stream is not self sufficient, we need to pass in some extra |
912 | 939 | // user info: |
913 | 940 | unsigned int dims[3] = {}; |
946 | 973 | if( !GetPixelFormat( pf, depth, bpp, sign, pixelsign ) ) return 1; |
947 | 974 | pnm.SetPixelFormat( pf ); |
948 | 975 | gdcm::PixmapWriter writer; |
976 | writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) ); | |
977 | writer.SetFile( reader.GetFile() ); | |
949 | 978 | if( !Populate( writer, pnm, filenames ) ) return 1; |
950 | 979 | // populate will guess pixel format and photometric inter from file, need |
951 | 980 | // to override after calling Populate: |
976 | 1005 | { |
977 | 1006 | gdcm::PGXCodec pnm; |
978 | 1007 | gdcm::PixmapWriter writer; |
1008 | writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) ); | |
1009 | writer.SetFile( reader.GetFile() ); | |
979 | 1010 | if( !Populate( writer, pnm, filenames ) ) return 1; |
980 | 1011 | if( !AddUIDs(sopclassuid, sopclass, study_uid, series_uid, writer ) ) return 1; |
981 | 1012 | |
992 | 1023 | { |
993 | 1024 | gdcm::JPEGLSCodec jpeg; |
994 | 1025 | gdcm::PixmapWriter writer; |
1026 | writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) ); | |
1027 | writer.SetFile( reader.GetFile() ); | |
995 | 1028 | if( !Populate( writer, jpeg, filenames ) ) return 1; |
996 | 1029 | if( !AddUIDs(sopclassuid, sopclass, study_uid, series_uid, writer ) ) return 1; |
997 | 1030 | |
1017 | 1050 | */ |
1018 | 1051 | gdcm::JPEG2000Codec jpeg; |
1019 | 1052 | gdcm::PixmapWriter writer; |
1053 | writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) ); | |
1054 | writer.SetFile( reader.GetFile() ); | |
1020 | 1055 | if( !Populate( writer, jpeg, filenames ) ) return 1; |
1021 | 1056 | if( !AddUIDs(sopclassuid, sopclass, study_uid, series_uid, writer ) ) return 1; |
1022 | 1057 | |
1041 | 1076 | if( !GetPixelFormat( pf, depth, bpp, sign, pixelsign ) ) return 1; |
1042 | 1077 | jpeg.SetPixelFormat( pf ); |
1043 | 1078 | gdcm::PixmapWriter writer; |
1079 | writer.SetCheckFileMetaInformation( (keepmeta > 0 ? false : true) ); | |
1080 | writer.SetFile( reader.GetFile() ); | |
1044 | 1081 | if( !Populate( writer, jpeg, filenames ) ) return 1; |
1045 | 1082 | if( !AddUIDs(sopclassuid, sopclass, study_uid, series_uid, writer ) ) return 1; |
1046 | 1083 |
17 | 17 | # (To distribute this file outside of CMake, substitute the full |
18 | 18 | # License text for the above reference.) |
19 | 19 | |
20 | # Try first to locate a cmake config file | |
20 | # Try with pkg-config first | |
21 | find_package(PkgConfig) | |
22 | pkg_check_modules(OPENJPEG libopenjpeg1) | |
23 | if(OPENJPEG_FOUND) | |
24 | set(OPENJPEG_MAJOR_VERSION 1) | |
25 | set(OPENJPEG_INCLUDE_DIR ${OPENJPEG_INCLUDE_DIRS}) | |
26 | set(OPENJPEG_LIBRARIES ${OPENJPEG_LDFLAGS}) | |
27 | else() | |
28 | # Try to locate a cmake config file | |
21 | 29 | find_package(OpenJPEG QUIET NO_MODULE) |
22 | 30 | mark_as_advanced(OpenJPEG_DIR) |
23 | 31 | |
51 | 59 | OPENJPEG_INCLUDE_DIR |
52 | 60 | ) |
53 | 61 | endif() |
62 | endif() |
31 | 31 | #---------------------------------------------------------------------------- |
32 | 32 | set(GDCM_MAJOR_VERSION 2) |
33 | 33 | set(GDCM_MINOR_VERSION 6) |
34 | set(GDCM_BUILD_VERSION 4) | |
34 | set(GDCM_BUILD_VERSION 5) | |
35 | 35 | set(GDCM_VERSION |
36 | 36 | "${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}") |
37 | 37 | # let advanced user the option to define GDCM_API_VERSION: |
25 | 25 | FileStreaming |
26 | 26 | FileChangeTS |
27 | 27 | FileChangeTSLossy |
28 | DumpCSA | |
28 | 29 | ) |
29 | 30 | |
30 | 31 | if(BUILD_TESTING) |
0 | /*========================================================================= | |
1 | ||
2 | Program: GDCM (Grassroots DICOM). A DICOM library | |
3 | ||
4 | Copyright (c) 2006-2011 Mathieu Malaterre | |
5 | All rights reserved. | |
6 | See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. | |
7 | ||
8 | This software is distributed WITHOUT ANY WARRANTY; without even | |
9 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | |
10 | PURPOSE. See the above copyright notice for more information. | |
11 | ||
12 | =========================================================================*/ | |
13 | ||
14 | /* | |
15 | * Usage: | |
16 | * $ bin/DumpCSA.exe input.dcm | |
17 | */ | |
18 | using System; | |
19 | using gdcm; | |
20 | ||
21 | public class DumpCSA | |
22 | { | |
23 | public static int Main(string[] args) | |
24 | { | |
25 | string filename = args[0]; | |
26 | ||
27 | gdcm.Reader reader = new gdcm.Reader(); | |
28 | reader.SetFileName( filename ); | |
29 | if (!reader.Read()) return 1; | |
30 | ||
31 | gdcm.File f = reader.GetFile(); | |
32 | gdcm.DataSet ds = f.GetDataSet(); | |
33 | ||
34 | string[] expectedSiemensTags = new string[] { "B_value" , "AcquisitionMatrixText" }; | |
35 | using (PrivateTag gtag = CSAHeader.GetCSAImageHeaderInfoTag()) | |
36 | { | |
37 | if (ds.FindDataElement(gtag)) | |
38 | { | |
39 | using (DataElement de = ds.GetDataElement(gtag)) | |
40 | { | |
41 | if (de != null && !de.IsEmpty()) | |
42 | { | |
43 | using (CSAHeader csa = new CSAHeader()) | |
44 | { | |
45 | if (csa.LoadFromDataElement(de)) | |
46 | { | |
47 | foreach (string str in expectedSiemensTags) | |
48 | { | |
49 | if (csa.FindCSAElementByName(str)) | |
50 | { | |
51 | using (CSAElement elem = csa.GetCSAElementByName(str)) | |
52 | { | |
53 | if (elem != null) | |
54 | { | |
55 | System.Console.WriteLine( elem.toString() ); | |
56 | } | |
57 | } | |
58 | } | |
59 | } | |
60 | } | |
61 | } | |
62 | } | |
63 | } | |
64 | } | |
65 | } | |
66 | ||
67 | ||
68 | return 0; | |
69 | } | |
70 | } |
0 | find_package(Java REQUIRED) # javac, jar | |
0 | find_package(Java ${GDCM_DEFAULT_JAVA_VERSION} REQUIRED) # javac, jar | |
1 | 1 | find_package(JNI REQUIRED) |
2 | 2 | include_directories( |
3 | 3 | #${JNI_INCLUDE_PATH} |
322 | 322 | { 0,"D_CLUNIE_VL4_RLE.dcm" }, |
323 | 323 | { 0,"D_CLUNIE_RG1_RLE.dcm" }, |
324 | 324 | { 1,"JDDICOM_Sample2.dcm" }, |
325 | {0,"AMIInvalidPrivateDefinedLengthSQasUN.dcm" }, | |
325 | { 0,"AMIInvalidPrivateDefinedLengthSQasUN.dcm" }, | |
326 | 326 | { 0,"SIEMENS_MAGNETOM-12-MONO2-FileSeq3.dcm" }, |
327 | 327 | { 0,"CT-MONO2-8-abdo.dcm" }, |
328 | 328 | { 0,"D_CLUNIE_SC1_RLE.dcm" }, |
415 | 415 | { 1,"multiframegrayscalewordscis.dcm" }, |
416 | 416 | { 1,"multiframesinglebitscis.dcm" }, |
417 | 417 | { 1,"multiframetruecolorscis.dcm" }, |
418 | { 1, "SinglePrecisionSC.dcm" }, | |
419 | { 0, "signedtruecoloroldsc.dcm" }, | |
420 | { 0, "o.dcm" }, | |
421 | { 0, "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" }, | |
422 | { 0, "IM-0001-0066.CommandTag00.dcm" }, | |
423 | { 0, "NM_Kakadu44_SOTmarkerincons.dcm" }, | |
424 | { 0, "GDCMJ2K_TextGBR.dcm" }, | |
425 | { 0, "PhilipsInteraSeqTermInvLen.dcm" }, | |
426 | { 0, "LIBIDO-24-ACR_NEMA-Rectangle.dcm" }, | |
427 | { 0, "TOSHIBA_J2K_SIZ1_PixRep0.dcm" }, | |
428 | { 0, "TOSHIBA_J2K_SIZ0_PixRep1.dcm" }, | |
429 | { 0, "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" }, | |
430 | { 0, "NM-PAL-16-PixRep1.dcm" }, | |
431 | { 0, "MEDILABInvalidCP246_EVRLESQasUN.dcm" }, | |
432 | { 0, "JPEGInvalidSecondFrag.dcm" }, | |
433 | { 0, "SC16BitsAllocated_8BitsStoredJ2K.dcm" }, | |
434 | { 0, "SC16BitsAllocated_8BitsStoredJPEG.dcm" }, | |
435 | { 0, "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" }, | |
418 | { 1,"SinglePrecisionSC.dcm" }, | |
419 | { 0,"signedtruecoloroldsc.dcm" }, | |
420 | { 0,"o.dcm" }, | |
421 | { 0,"UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" }, | |
422 | { 0,"IM-0001-0066.CommandTag00.dcm" }, | |
423 | { 0,"NM_Kakadu44_SOTmarkerincons.dcm" }, | |
424 | { 0,"GDCMJ2K_TextGBR.dcm" }, | |
425 | { 0,"PhilipsInteraSeqTermInvLen.dcm" }, | |
426 | { 0,"LIBIDO-24-ACR_NEMA-Rectangle.dcm" }, | |
427 | { 0,"TOSHIBA_J2K_SIZ1_PixRep0.dcm" }, | |
428 | { 0,"TOSHIBA_J2K_SIZ0_PixRep1.dcm" }, | |
429 | { 0,"TOSHIBA_J2K_OpenJPEGv2Regression.dcm" }, | |
430 | { 0,"NM-PAL-16-PixRep1.dcm" }, | |
431 | { 0,"MEDILABInvalidCP246_EVRLESQasUN.dcm" }, | |
432 | { 0,"JPEGInvalidSecondFrag.dcm" }, | |
433 | { 0,"SC16BitsAllocated_8BitsStoredJ2K.dcm" }, | |
434 | { 0,"SC16BitsAllocated_8BitsStoredJPEG.dcm" }, | |
435 | { 0,"SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" }, | |
436 | { 0,"JPEGLS_CharLS_10742.dcm" }, | |
437 | { 1,"JPEGLosslessYBR_FULL_422.dcm" }, | |
438 | { 1,"JPEGNote_empty.dcm" }, | |
439 | { 1,"JPEGNote_missing.dcm" }, | |
440 | { 1,"JPEGNote_bogus.dcm" }, | |
441 | { 0,"RLEDebianBug816607Orig.dcm" }, | |
442 | { 0,"IllegalGroup2ImplicitTS.dcm" }, | |
436 | 443 | { 0, NULL } |
437 | 444 | }; |
438 | 445 |
777 | 777 | } |
778 | 778 | } |
779 | 779 | // Now is a good time to find out the dataset transfer syntax |
780 | try { | |
780 | 781 | ComputeDataSetTransferSyntax(); |
782 | } catch( gdcm::Exception & ex ) { | |
783 | // We were able to read some of the Meta Header, but failed to compute the DataSetTS | |
784 | // technically GDCM is able to cope with any value here. But be kind and try to have a good guess: | |
785 | ||
786 | gdcmWarningMacro( "Meta Header is bogus. Guessing DataSet TS." ); | |
787 | Tag t; | |
788 | if( !t.Read<SwapperNoOp>(is) ) | |
789 | { | |
790 | throw Exception( "Cannot read very first tag" ); | |
791 | } | |
792 | ||
793 | char vr_str[3]; | |
794 | is.read(vr_str, 2); | |
795 | vr_str[2] = '\0'; | |
796 | VR::VRType vr = VR::GetVRType(vr_str); | |
797 | if( vr != VR::VR_END ) | |
798 | { | |
799 | DataSetTS = TransferSyntax::ExplicitVRLittleEndian; | |
800 | } | |
801 | else | |
802 | { | |
803 | DataSetTS = TransferSyntax::ImplicitVRLittleEndian; | |
804 | } | |
805 | is.seekg(-6, std::ios::cur); // Seek back | |
806 | ||
807 | } | |
781 | 808 | } |
782 | 809 | } |
783 | 810 | // else |
83 | 83 | protected: |
84 | 84 | std::ostream *Stream; |
85 | 85 | std::ofstream *Ofstream; |
86 | bool GetCheckFileMetaInformation() const { return CheckFileMetaInformation; } | |
86 | 87 | |
87 | 88 | private: |
88 | 89 | SmartPointer<File> F; |
95 | 95 | { |
96 | 96 | assert( NumberOfDimensions ); |
97 | 97 | //assert( Dimensions.empty() ); |
98 | #if 0 | |
98 | 99 | Dimensions = std::vector<unsigned int>(dims, |
99 | 100 | dims+NumberOfDimensions); |
101 | #else | |
102 | assert( Dimensions.size() == 3 ); | |
103 | Dimensions[0] = dims[0]; | |
104 | Dimensions[1] = dims[1]; | |
105 | if( NumberOfDimensions == 2 ) | |
106 | Dimensions[2] = 1; | |
107 | else | |
108 | Dimensions[2] = dims[2]; | |
109 | #endif | |
100 | 110 | } |
101 | 111 | |
102 | 112 | void Bitmap::SetDimension(unsigned int idx, unsigned int dim) |
395 | 405 | i->SetPixelFormat( codec.GetPixelFormat() ); |
396 | 406 | } |
397 | 407 | #endif |
408 | if( GetDimensions()[0] != codec.GetDimensions()[0] | |
409 | || GetDimensions()[1] != codec.GetDimensions()[1] ) | |
410 | { | |
411 | gdcmWarningMacro( "dimension mismatch for JPEG" ); | |
412 | ((Bitmap*)this)->SetDimensions( codec.GetDimensions() ); //JPEGNote_bogus.dcm | |
413 | } | |
398 | 414 | |
399 | 415 | return true; |
400 | 416 | } |
23 | 23 | class ImageRegionReaderInternals; |
24 | 24 | /** |
25 | 25 | * \brief ImageRegionReader |
26 | * This class is able to read a region from a DICOM file containing an image. This implementation | |
27 | * requires that the information stored in the DICOM header are consistent with what is in the | |
28 | * encapsulated Pixel Data. This is technically not required by DICOM standard, which makes | |
29 | * this implementation illegal with regards to the famous JPEG note: | |
30 | * http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2.html\#para_4bcb841e-c6bf-4e26-82a5-3fad3c942da0 | |
26 | 31 | * \see ImageReader |
27 | 32 | */ |
28 | 33 | class GDCM_EXPORT ImageRegionReader : public ImageReader |
35 | 35 | |
36 | 36 | namespace gdcm |
37 | 37 | { |
38 | ||
39 | /* Part 1 Table A.2 List of markers and marker segments */ | |
40 | typedef enum { | |
41 | FF30 = 0xFF30, | |
42 | FF31 = 0xFF31, | |
43 | FF32 = 0xFF32, | |
44 | FF33 = 0xFF33, | |
45 | FF34 = 0xFF34, | |
46 | FF35 = 0xFF35, | |
47 | FF36 = 0xFF36, | |
48 | FF37 = 0xFF37, | |
49 | FF38 = 0xFF38, | |
50 | FF39 = 0xFF39, | |
51 | FF3A = 0xFF3A, | |
52 | FF3B = 0xFF3B, | |
53 | FF3C = 0xFF3C, | |
54 | FF3D = 0xFF3D, | |
55 | FF3E = 0xFF3E, | |
56 | FF3F = 0xFF3F, | |
57 | SOC = 0xFF4F, | |
58 | CAP = 0xFF50, | |
59 | SIZ = 0xFF51, | |
60 | COD = 0xFF52, | |
61 | COC = 0xFF53, | |
62 | TLM = 0xFF55, | |
63 | PLM = 0XFF57, | |
64 | PLT = 0XFF58, | |
65 | QCD = 0xFF5C, | |
66 | QCC = 0xFF5D, | |
67 | RGN = 0xFF5E, | |
68 | POC = 0xFF5F, | |
69 | PPM = 0XFF60, | |
70 | PPT = 0XFF61, | |
71 | CRG = 0xFF63, | |
72 | COM = 0xFF64, | |
73 | SOT = 0xFF90, | |
74 | SOP = 0xFF91, | |
75 | EPH = 0XFF92, | |
76 | SOD = 0xFF93, | |
77 | EOC = 0XFFD9 /* EOI in old jpeg */ | |
78 | } MarkerType; | |
79 | ||
80 | typedef enum { | |
81 | JP = 0x6a502020, | |
82 | FTYP = 0x66747970, | |
83 | JP2H = 0x6a703268, | |
84 | JP2C = 0x6a703263, | |
85 | JP2 = 0x6a703220, | |
86 | IHDR = 0x69686472, | |
87 | COLR = 0x636f6c72, | |
88 | XML = 0x786d6c20, | |
89 | CDEF = 0x63646566, | |
90 | CMAP = 0x636D6170, | |
91 | PCLR = 0x70636c72, | |
92 | RES = 0x72657320, | |
93 | } OtherType; | |
94 | ||
95 | static inline bool hasnolength( uint_fast16_t marker ) | |
96 | { | |
97 | switch( marker ) | |
98 | { | |
99 | case FF30: | |
100 | case FF31: | |
101 | case FF32: | |
102 | case FF33: | |
103 | case FF34: | |
104 | case FF35: | |
105 | case FF36: | |
106 | case FF37: | |
107 | case FF38: | |
108 | case FF39: | |
109 | case FF3A: | |
110 | case FF3B: | |
111 | case FF3C: | |
112 | case FF3D: | |
113 | case FF3E: | |
114 | case FF3F: | |
115 | case SOC: | |
116 | case SOD: | |
117 | case EOC: | |
118 | case EPH: | |
119 | return true; | |
120 | } | |
121 | return false; | |
122 | } | |
123 | ||
124 | ||
125 | static inline bool read16(const char ** input, size_t * len, uint16_t * ret) | |
126 | { | |
127 | if( *len >= 2 ) | |
128 | { | |
129 | union { uint16_t v; char bytes[2]; } u; | |
130 | memcpy(u.bytes, *input, 2); | |
131 | *ret = SwapperDoOp::Swap(u.v); | |
132 | *input += 2; *len -= 2; | |
133 | return true; | |
134 | } | |
135 | return false; | |
136 | } | |
137 | ||
138 | ||
139 | static inline bool read32(const char ** input, size_t * len, uint32_t * ret) | |
140 | { | |
141 | if( *len >= 4 ) | |
142 | { | |
143 | union { uint32_t v; char bytes[4]; } u; | |
144 | memcpy(u.bytes, *input, 4); | |
145 | *ret = SwapperDoOp::Swap(u.v); | |
146 | *input += 4; *len -= 4; | |
147 | return true; | |
148 | } | |
149 | return false; | |
150 | } | |
151 | ||
152 | static inline bool read64(const char ** input, size_t * len, uint64_t * ret) | |
153 | { | |
154 | if( *len >= 8 ) | |
155 | { | |
156 | union { uint64_t v; char bytes[8]; } u; | |
157 | memcpy(u.bytes, *input, 8); | |
158 | *ret = SwapperDoOp::Swap(u.v); | |
159 | *input += 8; *len -= 8; | |
160 | return true; | |
161 | } | |
162 | return false; | |
163 | } | |
164 | ||
165 | ||
166 | static bool parsej2k_imp( const char * const stream, const size_t file_size, bool * lossless ) | |
167 | { | |
168 | uint16_t marker; | |
169 | uintmax_t sotlen = 0; | |
170 | size_t lenmarker; | |
171 | const char * cur = stream; | |
172 | size_t cur_size = file_size; | |
173 | *lossless = false; // default init | |
174 | while( read16(&cur, &cur_size, &marker) ) | |
175 | { | |
176 | if ( !hasnolength( marker ) ) | |
177 | { | |
178 | uint16_t l; | |
179 | bool r = read16( &cur, &cur_size, &l ); | |
180 | if( !r || l < 2 ) | |
181 | break; | |
182 | lenmarker = (size_t)l - 2; | |
183 | ||
184 | if( marker == COD ) | |
185 | { | |
186 | const uint8_t Transformation = *(cur+9); | |
187 | if( Transformation == 0x0 ) { *lossless = false; return true; } | |
188 | else if( Transformation == 0x1 ) *lossless = true; | |
189 | else return false; | |
190 | } | |
191 | cur += lenmarker; cur_size -= lenmarker; | |
192 | } | |
193 | else if( marker == SOD ) | |
194 | return true; | |
195 | } | |
196 | return false; | |
197 | } | |
198 | ||
199 | static bool parsejp2_imp( const char * const stream, const size_t file_size, bool * lossless ) | |
200 | { | |
201 | uint32_t marker; | |
202 | uint64_t len64; /* ref */ | |
203 | uint32_t len32; /* local 32bits op */ | |
204 | const char * cur = stream; | |
205 | size_t cur_size = file_size; | |
206 | ||
207 | while( read32(&cur, &cur_size, &len32) ) | |
208 | { | |
209 | bool b = read32(&cur, &cur_size, &marker); | |
210 | if( !b ) break; | |
211 | len64 = len32; | |
212 | if( len32 == 1 ) /* 64bits ? */ | |
213 | { | |
214 | bool b = read64(&cur, &cur_size, &len64); | |
215 | assert( b ); | |
216 | len64 -= 8; | |
217 | } | |
218 | if( marker == JP2C ) | |
219 | { | |
220 | const size_t start = cur - stream; | |
221 | if( !len64 ) | |
222 | { | |
223 | len64 = (size_t)(file_size - start + 8); | |
224 | } | |
225 | assert( len64 >= 8 ); | |
226 | return parsej2k_imp( cur, len64 - 8, lossless ); | |
227 | } | |
228 | const size_t lenmarker = len64 - 8; | |
229 | cur += lenmarker; | |
230 | } | |
231 | ||
232 | return false; | |
233 | } | |
234 | ||
38 | 235 | |
39 | 236 | /** |
40 | 237 | sample error callback expecting a FILE* client object |
93 | 290 | |
94 | 291 | void gdcm_error_callback(const char* msg, void* f) |
95 | 292 | { |
293 | #if 0 | |
96 | 294 | if( strcmp( msg, "Cannot read data with no size known, giving up\n" ) == 0 ) |
97 | 295 | { |
98 | 296 | OPJ_UINT32 **s = (OPJ_UINT32**)f; |
99 | 297 | *s[1] = *s[0]; |
100 | 298 | gdcmWarningMacro( "Recovering from odd J2K file" ); |
101 | } | |
102 | // else | |
103 | // { | |
104 | // fprintf( stderr, msg ); | |
105 | // } | |
106 | } | |
107 | ||
108 | ||
109 | OPJ_UINT32 opj_read_from_memory(void * p_buffer, OPJ_UINT32 p_nb_bytes, myfile* p_file) | |
299 | assert(0); | |
300 | } | |
301 | else | |
302 | #endif | |
303 | { | |
304 | fprintf( stderr, msg ); | |
305 | } | |
306 | } | |
307 | ||
308 | ||
309 | OPJ_SIZE_T opj_read_from_memory(void * p_buffer, OPJ_SIZE_T p_nb_bytes, myfile* p_file) | |
110 | 310 | { |
111 | 311 | //OPJ_UINT32 l_nb_read = fread(p_buffer,1,p_nb_bytes,p_file); |
112 | OPJ_UINT32 l_nb_read; | |
113 | if( p_file->cur + p_nb_bytes < p_file->mem + p_file->len ) | |
312 | OPJ_SIZE_T l_nb_read; | |
313 | if( p_file->cur + p_nb_bytes <= p_file->mem + p_file->len ) | |
114 | 314 | { |
115 | 315 | l_nb_read = 1*p_nb_bytes; |
116 | 316 | } |
117 | 317 | else |
118 | 318 | { |
119 | l_nb_read = (OPJ_UINT32)(p_file->mem + p_file->len - p_file->cur); | |
319 | l_nb_read = (OPJ_SIZE_T)(p_file->mem + p_file->len - p_file->cur); | |
120 | 320 | assert( l_nb_read < p_nb_bytes ); |
121 | 321 | } |
122 | 322 | memcpy(p_buffer,p_file->cur,l_nb_read); |
123 | 323 | p_file->cur += l_nb_read; |
124 | 324 | assert( p_file->cur <= p_file->mem + p_file->len ); |
125 | 325 | //std::cout << "l_nb_read: " << l_nb_read << std::endl; |
126 | return l_nb_read ? l_nb_read : ((OPJ_UINT32)-1); | |
127 | } | |
128 | ||
129 | OPJ_UINT32 opj_write_from_memory (void * p_buffer, OPJ_UINT32 p_nb_bytes, myfile* p_file) | |
326 | return l_nb_read ? l_nb_read : ((OPJ_SIZE_T)-1); | |
327 | } | |
328 | ||
329 | OPJ_SIZE_T opj_write_from_memory (void * p_buffer, OPJ_SIZE_T p_nb_bytes, myfile* p_file) | |
130 | 330 | { |
131 | 331 | //return fwrite(p_buffer,1,p_nb_bytes,p_file); |
132 | OPJ_UINT32 l_nb_write; | |
332 | OPJ_SIZE_T l_nb_write; | |
133 | 333 | //if( p_file->cur + p_nb_bytes < p_file->mem + p_file->len ) |
134 | 334 | // { |
135 | 335 | l_nb_write = 1*p_nb_bytes; |
147 | 347 | //return p_nb_bytes; |
148 | 348 | } |
149 | 349 | |
150 | OPJ_SIZE_T opj_skip_from_memory (OPJ_SIZE_T p_nb_bytes, myfile * p_file) | |
350 | OPJ_OFF_T opj_skip_from_memory (OPJ_OFF_T p_nb_bytes, myfile * p_file) | |
151 | 351 | { |
152 | 352 | //if (fseek(p_user_data,p_nb_bytes,SEEK_CUR)) |
153 | 353 | // { |
154 | 354 | // return -1; |
155 | 355 | // } |
156 | if( p_file->cur + p_nb_bytes < p_file->mem + p_file->len ) | |
356 | if( p_file->cur + p_nb_bytes <= p_file->mem + p_file->len ) | |
157 | 357 | { |
158 | 358 | p_file->cur += p_nb_bytes; |
159 | 359 | return p_nb_bytes; |
160 | 360 | } |
161 | 361 | |
162 | 362 | p_file->cur = p_file->mem + p_file->len; |
163 | return (OPJ_SIZE_T)-1; | |
164 | } | |
165 | ||
166 | bool opj_seek_from_memory (OPJ_SIZE_T p_nb_bytes, myfile * p_file) | |
363 | return -1; | |
364 | } | |
365 | ||
366 | OPJ_BOOL opj_seek_from_memory (OPJ_OFF_T p_nb_bytes, myfile * p_file) | |
167 | 367 | { |
168 | 368 | //if (fseek(p_user_data,p_nb_bytes,SEEK_SET)) |
169 | 369 | // { |
170 | 370 | // return false; |
171 | 371 | // } |
172 | 372 | //return true; |
173 | if( p_file->cur + p_nb_bytes < p_file->mem + p_file->len ) | |
174 | { | |
175 | p_file->cur += p_nb_bytes; | |
176 | return true; | |
177 | } | |
373 | if( p_nb_bytes <= p_file->len ) | |
374 | { | |
375 | p_file->cur = p_file->mem + p_nb_bytes; | |
376 | return OPJ_TRUE; | |
377 | } | |
378 | ||
178 | 379 | p_file->cur = p_file->mem + p_file->len; |
179 | return false; | |
180 | } | |
181 | ||
182 | opj_stream_t* OPJ_CALLCONV opj_stream_create_memory_stream (myfile* p_mem,OPJ_UINT32 p_size,bool p_is_read_stream) | |
380 | return OPJ_FALSE; | |
381 | } | |
382 | ||
383 | opj_stream_t* OPJ_CALLCONV opj_stream_create_memory_stream (myfile* p_mem,OPJ_SIZE_T p_size,bool p_is_read_stream) | |
183 | 384 | { |
184 | 385 | opj_stream_t* l_stream = 00; |
185 | 386 | if |
198 | 399 | opj_stream_set_write_function(l_stream, (opj_stream_write_fn) opj_write_from_memory); |
199 | 400 | opj_stream_set_skip_function(l_stream, (opj_stream_skip_fn) opj_skip_from_memory); |
200 | 401 | opj_stream_set_seek_function(l_stream, (opj_stream_seek_fn) opj_seek_from_memory); |
402 | opj_stream_set_user_data_length(l_stream, p_mem->len /* p_size*/); /* important to avoid an assert() */ | |
201 | 403 | return l_stream; |
202 | 404 | } |
203 | 405 | |
537 | 739 | s[1] = 0; |
538 | 740 | opj_set_error_handler(dinfo, gdcm_error_callback, s); |
539 | 741 | |
540 | #ifdef OPJ_J2K_STREAM_CHUNK_SIZE | |
541 | 742 | cio = opj_stream_create_memory_stream(fsrc,OPJ_J2K_STREAM_CHUNK_SIZE, true); |
542 | #else | |
543 | cio = opj_stream_create_memory_stream(fsrc,J2K_STREAM_CHUNK_SIZE, true); | |
544 | #endif | |
545 | 743 | |
546 | 744 | /* setup the decoder decoding parameters using user parameters */ |
547 | opj_setup_decoder(dinfo, ¶meters); | |
548 | 745 | bool bResult; |
746 | bResult = opj_setup_decoder(dinfo, ¶meters); | |
747 | assert( bResult ); | |
549 | 748 | OPJ_INT32 l_tile_x0,l_tile_y0; |
550 | 749 | OPJ_UINT32 l_tile_width,l_tile_height,l_nb_tiles_x,l_nb_tiles_y; |
551 | 750 | #if 0 |
567 | 766 | #endif |
568 | 767 | assert( bResult ); |
569 | 768 | |
570 | #if OPENJPEG_MAJOR_VERSION == 1 | |
571 | #else | |
572 | 769 | #if 0 |
573 | // needs to be before call to opj_decode... | |
574 | reversible = opj_get_reversible(dinfo, ¶meters ); | |
575 | assert( reversible == 0 || reversible == 1 ); | |
576 | #else | |
577 | reversible = 0; | |
578 | #endif | |
770 | /* Optional if you want decode the entire image */ | |
771 | opj_set_decode_area(dinfo, image, (OPJ_INT32)parameters.DA_x0, | |
772 | (OPJ_INT32)parameters.DA_y0, (OPJ_INT32)parameters.DA_x1, (OPJ_INT32)parameters.DA_y1); | |
579 | 773 | #endif |
580 | 774 | |
581 | 775 | bResult = opj_decode(dinfo, cio,image); |
631 | 825 | gdcmErrorMacro( "Impossible happen" ); |
632 | 826 | return std::make_pair<char*,size_t>(0,0); |
633 | 827 | } |
828 | #else | |
829 | bool b = false; | |
830 | bool lossless; | |
831 | if( parameters.decod_format == JP2_CFMT ) | |
832 | b = parsejp2_imp( dummy_buffer, buf_size, &lossless); | |
833 | else if( parameters.decod_format == J2K_CFMT ) | |
834 | b = parsej2k_imp( dummy_buffer, buf_size, &lossless); | |
835 | ||
836 | reversible = 0; | |
837 | if( b ) | |
838 | reversible = lossless; | |
634 | 839 | #endif // OPENJPEG_MAJOR_VERSION == 1 |
635 | 840 | LossyFlag = !reversible; |
636 | 841 | |
980 | 1185 | } |
981 | 1186 | |
982 | 1187 | if(parameters.cp_comment == NULL) { |
983 | const char comment[] = "Created by GDCM/OpenJPEG version 2.0"; | |
1188 | #if OPENJPEG_MAJOR_VERSION == 1 | |
1189 | const char comment[] = "Created by GDCM/OpenJPEG version 1.4.0"; | |
984 | 1190 | parameters.cp_comment = (char*)malloc(strlen(comment) + 1); |
985 | 1191 | strcpy(parameters.cp_comment, comment); |
1192 | #else | |
1193 | const char comment[] = "Created by GDCM/OpenJPEG version %s"; | |
1194 | const char * vers = opj_version(); | |
1195 | parameters.cp_comment = (char*)malloc(strlen(comment) + 10); | |
1196 | snprintf( parameters.cp_comment, strlen(comment) + 10, comment, vers ); | |
1197 | #endif | |
986 | 1198 | /* no need to delete parameters.cp_comment on exit */ |
987 | 1199 | //delete_comment = false; |
988 | 1200 | } |
1064 | 1276 | myfile *fsrc = &mysrc; |
1065 | 1277 | char *buffer_j2k = new char[inputlength]; // overallocated |
1066 | 1278 | fsrc->mem = fsrc->cur = buffer_j2k; |
1067 | fsrc->len = 0; | |
1279 | fsrc->len = 0; //inputlength; | |
1068 | 1280 | |
1069 | 1281 | /* open a byte stream for writing */ |
1070 | 1282 | /* allocate memory for all tiles */ |
1362 | 1574 | // FIXME |
1363 | 1575 | assert( mct == 0 || mct == 1 ); |
1364 | 1576 | #else |
1577 | bool b = false; | |
1578 | bool lossless; | |
1579 | if( parameters.decod_format == JP2_CFMT ) | |
1580 | b = parsejp2_imp( dummy_buffer, buf_size, &lossless); | |
1581 | else if( parameters.decod_format == J2K_CFMT ) | |
1582 | b = parsej2k_imp( dummy_buffer, buf_size, &lossless); | |
1583 | ||
1365 | 1584 | reversible = 0; |
1585 | if( b ) | |
1586 | reversible = lossless; | |
1366 | 1587 | #endif |
1367 | 1588 | #endif // OPENJPEG_MAJOR_VERSION == 1 |
1368 | 1589 | LossyFlag = !reversible; |
550 | 550 | || cinfo.Y_density != 1 |
551 | 551 | ) |
552 | 552 | { |
553 | gdcmErrorMacro( "Pixel Density from JFIF Marker is not supported (for now)" ); | |
553 | gdcmWarningMacro( "Pixel Density from JFIF Marker is not supported (for now)" ); | |
554 | 554 | //return false; |
555 | 555 | } |
556 | 556 | |
792 | 792 | if( cinfo.image_width != dims[0] |
793 | 793 | || cinfo.image_height != dims[1] ) |
794 | 794 | { |
795 | gdcmErrorMacro( "Unhandled: dimension mismatch. JPEG is " << | |
795 | gdcmWarningMacro( "dimension mismatch. JPEG is " << | |
796 | 796 | cinfo.image_width << "," << cinfo.image_height << " while DICOM " << dims[0] << |
797 | "," << dims[1] ); // FIXME is this ok by standard ? | |
797 | "," << dims[1] ); | |
798 | //this->Dimensions[0] = cinfo.image_width; | |
799 | //this->Dimensions[1] = cinfo.image_height; | |
800 | /* | |
801 | * Long story short, the real issue is that class such as ImageRegionReader expect to read the | |
802 | * image information without ever touching the JPEG codestream... | |
803 | */ | |
798 | 804 | return false; |
799 | 805 | } |
800 | 806 | assert( cinfo.image_width == dims[0] ); |
261 | 261 | //assert( Internal->BitPosition >= 12 ); |
262 | 262 | if( ds.FindDataElement( Tag(0x7fe0,0x0010) ) ) |
263 | 263 | { |
264 | gdcmErrorMacro("Could not find Pixel Data. Cannot extract Overlay." ); | |
264 | gdcmWarningMacro("Could not find Pixel Data. Cannot extract Overlay." ); | |
265 | 265 | return false; |
266 | 266 | } |
267 | 267 | const DataElement &pixeldata = ds.GetDataElement( Tag(0x7fe0,0x0010) ); |
572 | 572 | } |
573 | 573 | else |
574 | 574 | { |
575 | assert( ds.FindDataElement( at1.GetTag() ) ); | |
576 | //assert( ds.FindDataElement( at3.GetTag() ) ); | |
577 | at1.Set( ds ); | |
578 | assert( atoi(at1.GetValue().c_str()) == 1 ); | |
575 | if( ds.FindDataElement( at1.GetTag() ) ) { | |
576 | //assert( ds.FindDataElement( at3.GetTag() ) ); | |
577 | at1.Set( ds ); | |
578 | if( atoi(at1.GetValue().c_str()) != 1 ) { | |
579 | gdcmWarningMacro( "Invalid value for LossyImageCompression" ); | |
580 | } | |
581 | } else { | |
582 | gdcmWarningMacro( "Missing attribute for LossyImageCompression" ); | |
583 | } | |
579 | 584 | } |
580 | 585 | } |
581 | 586 | |
756 | 761 | } |
757 | 762 | |
758 | 763 | FileMetaInformation &fmi = file.GetHeader(); |
759 | fmi.Clear(); | |
760 | //assert( ts == TransferSyntax::ImplicitVRLittleEndian ); | |
761 | { | |
762 | const char *tsuid = TransferSyntax::GetTSString( ts ); | |
763 | DataElement de( Tag(0x0002,0x0010) ); | |
764 | VL::Type strlenTSUID = (VL::Type)strlen(tsuid); | |
765 | de.SetByteValue( tsuid, strlenTSUID ); | |
766 | de.SetVR( Attribute<0x0002, 0x0010>::GetVR() ); | |
767 | fmi.Replace( de ); | |
768 | fmi.SetDataSetTransferSyntax(ts); | |
769 | } | |
770 | fmi.FillFromDataSet( ds ); | |
764 | if( GetCheckFileMetaInformation() ) | |
765 | { | |
766 | fmi.Clear(); | |
767 | //assert( ts == TransferSyntax::ImplicitVRLittleEndian ); | |
768 | { | |
769 | const char *tsuid = TransferSyntax::GetTSString( ts ); | |
770 | DataElement de( Tag(0x0002,0x0010) ); | |
771 | VL::Type strlenTSUID = (VL::Type)strlen(tsuid); | |
772 | de.SetByteValue( tsuid, strlenTSUID ); | |
773 | de.SetVR( Attribute<0x0002, 0x0010>::GetVR() ); | |
774 | fmi.Replace( de ); | |
775 | fmi.SetDataSetTransferSyntax(ts); | |
776 | } | |
777 | fmi.FillFromDataSet( ds ); | |
778 | } | |
779 | else | |
780 | { | |
781 | Attribute<0x0002,0x0010> at; | |
782 | at.SetFromDataSet( fmi ); | |
783 | const char *tsuid = TransferSyntax::GetTSString( ts ); | |
784 | UIComp tsui = at.GetValue(); | |
785 | if( tsui != tsuid ) | |
786 | { | |
787 | gdcmErrorMacro( "Incompatible TransferSyntax." ); | |
788 | return false; | |
789 | } | |
790 | } | |
771 | 791 | |
772 | 792 | |
773 | 793 | return true; |
228 | 228 | { "027faefc8031768dad1afc100f7aee27" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" }, |
229 | 229 | { "f7c4fbb93b0347101e21e36f223b4d46" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" }, |
230 | 230 | { "af580e6202a240005a5a05adc5c691f2" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" }, |
231 | { "236713383dd9d315415f3a5957707ad1" , "JPEGNote_empty.dcm" }, | |
232 | { "5b6f7f59dbefd679aa29e9082f100ff5" , "JPEGLS_CharLS_10742.dcm" }, | |
233 | { "66fe7d517941802364e7ad8dee7149e7" , "JPEGLosslessYBR_FULL_422.dcm" }, | |
234 | { "dcb4b29b7e0f0da441ab3e5cdcb506b4" , "JPEGNote_missing.dcm" }, | |
235 | { "2c30e74ee3db1895027932bb0566f54e" , "JPEGNote_bogus.dcm" }, | |
236 | { "c71a2cf95325395264c4dc6e15a898bd" , "RLEDebianBug816607Orig.dcm" }, | |
237 | { "e49c403278663d9739014ad1d57c276f" , "IllegalGroup2ImplicitTS.dcm" }, | |
238 | { "299df0175ea4d3ab1f02651f88ffe9f3" , "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm" }, | |
239 | { "9add5fd3c83cc0946633e792f448f732" , "LengthOfItemLarger.dcm" }, | |
231 | 240 | |
232 | 241 | { NULL, NULL} |
233 | 242 | }; |
227 | 227 | { "d17a34f8ae066048442ab5b110d43c412472ea7e" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" }, |
228 | 228 | { "71517fce6c32625f1051b72085cfceeee58bd164" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" }, |
229 | 229 | { "0d19e4a98265afc3c782db02bc64bd32124ed2f6" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" }, |
230 | { "5cb6c554e80b552ea68cad05409dce4fe92b6dd7" , "IllegalGroup2ImplicitTS.dcm" }, | |
231 | { "031f8cb2cbbe7b5e524b1f79aef6674a66e7f390" , "JPEGLosslessYBR_FULL_422.dcm" }, | |
232 | { "4710e6cfd86c0d349c61b60ae69a684b246db3ff" , "JPEGNote_bogus.dcm" }, | |
233 | { "197e47b5afeeeb75eccafe04e5a1bb0af1a7957a" , "JPEGNote_empty.dcm" }, | |
234 | { "08828e913a7a1ebbc0129c42974b64ce702814b6" , "JPEGNote_missing.dcm" }, | |
235 | { "99c169688190a66100b61319eaeefb3db1936125" , "RLEDebianBug816607Orig.dcm" }, | |
230 | 236 | |
231 | 237 | { NULL, NULL} |
232 | 238 | }; |
63 | 63 | MR-MONO2-12-angio-an1.acr |
64 | 64 | # Openjpeg / Part 2: |
65 | 65 | lena512_rot90.j2k.dcm |
66 | # Remove this one for now: | |
67 | LengthOfItemLarger.dcm | |
68 | # Need CharLS 1.1 | |
69 | JPEG_LS_InvalidEscapeSequence_COM_padding.dcm | |
70 | # something wrong with OPJ 1.4 | |
71 | JPEGLS_CharLS_10742.dcm | |
66 | 72 | ) |
67 | 73 | if(NOT GDCM_USE_PVRG) |
68 | 74 | set(BLACK_LIST_READER |
688 | 688 | |
689 | 689 | { "4a5d8549791432b29948dd8ff63e2534" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" }, |
690 | 690 | |
691 | { "2c8630ae1bff925b258d98e742dfc632" , "JPEGLS_CharLS_10742.dcm" }, | |
692 | { "f666a95dde9ddfdec0cf9574a7985ae3" , "IllegalGroup2ImplicitTS.dcm" }, | |
693 | ||
694 | { "b85686dd3169b99725149abb00181254" , "RLEDebianBug816607Orig.dcm" }, | |
695 | { "464960d948dff0ded72b0380080f18a3" , "JPEGNote_empty.dcm" }, | |
696 | { "cdfb5dd0c999d88badeb00a16f96554f" , "JPEGLosslessYBR_FULL_422.dcm" }, | |
697 | { "464960d948dff0ded72b0380080f18a3" , "JPEGNote_missing.dcm" }, | |
698 | { "161e9fd986ea87adf2596e8e16641f11" , "JPEGNote_bogus.dcm" }, | |
699 | ||
700 | ||
691 | 701 | |
692 | 702 | /* Stopping condition */ |
693 | 703 | { 0 ,0 } |
238 | 238 | { "SC16BitsAllocated_8BitsStoredJPEG.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, |
239 | 239 | { "SC16BitsAllocated_8BitsStoredJ2K.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, |
240 | 240 | { "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" , "1.2.840.10008.5.1.4.1.1.4" }, |
241 | { "JPEGNote_empty.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, | |
242 | { "JPEGLS_CharLS_10742.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, | |
243 | { "JPEGLosslessYBR_FULL_422.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, | |
244 | { "JPEGNote_missing.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, | |
245 | { "JPEGNote_bogus.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, | |
246 | { "RLEDebianBug816607Orig.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, | |
247 | { "IllegalGroup2ImplicitTS.dcm" , "1.2.840.10008.5.1.4.1.1.1" }, | |
248 | { "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm" , "1.2.840.10008.5.1.4.1.1.7" }, | |
249 | { "LengthOfItemLarger.dcm" , "1.2.840.10008.5.1.4.1.1.4" }, | |
241 | 250 | |
242 | 251 | /* Stopping condition */ |
243 | 252 | { 0 ,0 } |
220 | 220 | { "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm",1314}, |
221 | 221 | { "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm", 1596 }, |
222 | 222 | { "00191113.dcm",536 }, |
223 | { "JPEGNote_empty.dcm", 482 }, | |
224 | { "JPEGLS_CharLS_10742.dcm", 532 }, | |
225 | { "JPEGLosslessYBR_FULL_422.dcm", 534 }, | |
226 | { "JPEGNote_missing.dcm", 406 }, | |
227 | { "JPEGNote_bogus.dcm", 482 }, | |
228 | { "RLEDebianBug816607Orig.dcm", 534 }, | |
229 | { "IllegalGroup2ImplicitTS.dcm", 1088 }, | |
230 | { "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm", 534 }, | |
231 | { "LengthOfItemLarger.dcm", 1044 }, | |
223 | 232 | { "dicomdir_With_embedded_icons",7125212 }, |
224 | 233 | { "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents",37218 }, |
225 | 234 | { "dicomdir_Acusson_WithPrivate_WithSR",3826 }, |
222 | 222 | { "ELSCINT1_PMSCT_RLE1_priv.dcm",298002 }, |
223 | 223 | { "00191113.dcm",922 }, |
224 | 224 | { "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm", 48714 }, |
225 | { "JPEGNote_empty.dcm", 704 }, | |
226 | { "JPEGLS_CharLS_10742.dcm", 748 }, | |
227 | { "JPEGLosslessYBR_FULL_422.dcm", 802 }, | |
228 | { "JPEGNote_missing.dcm", 596 }, | |
229 | { "JPEGNote_bogus.dcm", 722 }, | |
230 | { "RLEDebianBug816607Orig.dcm", 768 }, | |
231 | { "IllegalGroup2ImplicitTS.dcm", 2264 }, | |
232 | { "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm", 752 }, | |
233 | { "LengthOfItemLarger.dcm", 12748 }, | |
225 | 234 | { "dicomdir_Acusson_WithPrivate_WithSR",3826 }, |
226 | 235 | { "dicomdir_Pms_WithVisit_WithPrivate_WithStudyComponents",37218 }, |
227 | 236 | { "dicomdir_Pms_With_heavy_embedded_sequence",3003414 }, |
227 | 227 | { "SC16BitsAllocated_8BitsStoredJ2K.dcm", 764 }, |
228 | 228 | { "SC16BitsAllocated_8BitsStoredJPEG.dcm", 958 }, |
229 | 229 | { "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm", 48726 }, |
230 | ||
230 | { "JPEGNote_empty.dcm", 716 }, | |
231 | { "JPEGLS_CharLS_10742.dcm", 760 }, | |
232 | { "JPEGLosslessYBR_FULL_422.dcm", 814 }, | |
233 | { "JPEGNote_missing.dcm", 608 }, | |
234 | { "JPEGNote_bogus.dcm", 734 }, | |
235 | { "RLEDebianBug816607Orig.dcm", 780 }, | |
236 | { "IllegalGroup2ImplicitTS.dcm", 2272 }, | |
237 | { "JPEG_LS_InvalidEscapeSequence_COM_padding.dcm", 764 }, | |
238 | { "LengthOfItemLarger.dcm", 12748 }, | |
231 | 239 | |
232 | 240 | /* Stopping condition */ |
233 | 241 | { 0 ,0 }, |
40 | 40 | ret = 0; |
41 | 41 | } |
42 | 42 | // This is not an error if you are in the black list: |
43 | if( strcmp(name, "BuggedDicomWorksImage_Hopeless.dcm" ) != 0 | |
44 | || strcmp(name, "Philips_Wrong_Terminator_XX_0277" ) != 0 | |
45 | || strcmp(name, "DICOMDIR_noPATIENT_noSTUDY" ) != 0 | |
46 | || strcmp(name, "JpegLosslessMultiframePapyrus.pap" ) != 0 | |
47 | || strcmp(name, "Fish-1.img" ) != 0 | |
48 | || strcmp(name, "NM_FromJulius_Caesar.dcm" ) != 0 | |
49 | || strcmp(name, "Siemens-leonardo-bugged.dcm" ) != 0 | |
50 | || strcmp(name, "illegal_UN_stands_for_OB.dcm" ) != 0 | |
51 | || strcmp(name, "MR_PHILIPS_LargePreamble.dcm" ) != 0 | |
52 | || strcmp(name, "illegal_UN_stands_for_OB.dcm.secu" ) != 0 ) | |
43 | if( strcmp(name, "BuggedDicomWorksImage_Hopeless.dcm" ) == 0 | |
44 | || strcmp(name, "Philips_Wrong_Terminator_XX_0277" ) == 0 | |
45 | || strcmp(name, "DICOMDIR_noPATIENT_noSTUDY" ) == 0 | |
46 | || strcmp(name, "JpegLosslessMultiframePapyrus.pap" ) == 0 | |
47 | || strcmp(name, "Fish-1.img" ) == 0 | |
48 | || strcmp(name, "NM_FromJulius_Caesar.dcm" ) == 0 | |
49 | || strcmp(name, "Siemens-leonardo-bugged.dcm" ) == 0 | |
50 | || strcmp(name, "illegal_UN_stands_for_OB.dcm" ) == 0 | |
51 | || strcmp(name, "MR_PHILIPS_LargePreamble.dcm" ) == 0 | |
52 | || strcmp(name, "illegal_UN_stands_for_OB.dcm.secu" ) == 0 ) | |
53 | 53 | { |
54 | 54 | ret = 0; |
55 | 55 | } |
3 | 3 | ) |
4 | 4 | |
5 | 5 | # Do not change anything after here: |
6 | find_package(Java REQUIRED) # javac, jar | |
6 | find_package(Java ${GDCM_DEFAULT_JAVA_VERSION} REQUIRED) # javac, jar | |
7 | 7 | find_package(JNI REQUIRED) |
8 | 8 | include_directories( |
9 | 9 | ${JNI_INCLUDE_PATH} |
44 | 44 | { |
45 | 45 | checktemplate = true; |
46 | 46 | } |
47 | if( strcmp(name, "JPEGNote_empty.dcm" ) == 0 | |
48 | || strcmp(name, "JPEGNote_missing.dcm" ) == 0 ) | |
49 | { | |
50 | // cannot read dims from DICOM header... | |
51 | return 0; | |
52 | } | |
47 | 53 | |
48 | 54 | gdcm::ImageRegionReader irr; |
49 | 55 | irr.SetFileName( filename ); |
83 | 89 | |
84 | 90 | const gdcm::Tag pixeldata(0x7fe0,0x0010); |
85 | 91 | |
86 | bool b; | |
92 | bool b = true; | |
93 | if( strcmp(name, "libido1.0-vol.acr" ) != 0 ) // use Planes instead of Number of Frames | |
94 | { | |
87 | 95 | b = fs.CheckDataElement( pixeldata ); // will be checking file size |
96 | } | |
88 | 97 | if( !b ) |
89 | 98 | { |
90 | 99 | std::cerr << "Failed to CheckDataElement: " << outfilename << std::endl; |
29 | 29 | // attribute is (b500,b700) which make ReadUpToTag(7fe0,0010) fails... |
30 | 30 | if( strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 |
31 | 31 | || strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJ2K.dcm" ) == 0 // mismatch pixel format in JPEG 200 vs DICOM |
32 | || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 ) // bogus JPEG cannot be streamed | |
32 | || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 // bogus JPEG cannot be streamed | |
33 | ||
34 | // FIXME: we should be able to handle those at some point: | |
35 | || strcmp(fn.GetName(), "JPEGNote_empty.dcm" ) == 0 | |
36 | || strcmp(fn.GetName(), "JPEGNote_missing.dcm" ) == 0 | |
37 | || strcmp(fn.GetName(), "JPEGNote_bogus.dcm" ) == 0 | |
38 | ) | |
33 | 39 | { |
34 | 40 | std::cerr << "Skipping impossible file: " << filename << std::endl; |
35 | 41 | return 0; |
29 | 29 | // attribute is (b500,b700) which make ReadUpToTag(7fe0,0010) fails... |
30 | 30 | if( strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 |
31 | 31 | || strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJ2K.dcm" ) == 0 // mismatch pixel format in JPEG 200 vs DICOM |
32 | || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 ) // bogus JPEG cannot be streamed | |
32 | || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 // bogus JPEG cannot be streamed | |
33 | ||
34 | // FIXME: we should be able to handle those at some point: | |
35 | || strcmp(fn.GetName(), "JPEGNote_empty.dcm" ) == 0 | |
36 | || strcmp(fn.GetName(), "JPEGNote_missing.dcm" ) == 0 | |
37 | || strcmp(fn.GetName(), "JPEGNote_bogus.dcm" ) == 0 | |
38 | ) | |
33 | 39 | { |
34 | 40 | std::cerr << "Skipping impossible file: " << filename << std::endl; |
35 | 41 | return 0; |
31 | 31 | // attribute is (b500,b700) which make ReadUpToTag(7fe0,0010) fails... |
32 | 32 | if( strcmp(fn.GetName(), "DMCPACS_ExplicitImplicit_BogusIOP.dcm" ) == 0 |
33 | 33 | || strcmp(fn.GetName(), "SC16BitsAllocated_8BitsStoredJ2K.dcm" ) == 0 // mismatch pixel format in JPEG 200 vs DICOM |
34 | || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 ) // bogus JPEG cannot be streamed | |
34 | || strcmp(fn.GetName(), "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" ) == 0 // bogus JPEG cannot be streamed | |
35 | ||
36 | // FIXME: we should be able to handle those at some point: | |
37 | || strcmp(fn.GetName(), "JPEGNote_empty.dcm" ) == 0 | |
38 | || strcmp(fn.GetName(), "JPEGNote_missing.dcm" ) == 0 | |
39 | || strcmp(fn.GetName(), "JPEGNote_bogus.dcm" ) == 0 | |
40 | ) | |
35 | 41 | { |
36 | 42 | std::cerr << "Skipping impossible file: " << filename << std::endl; |
37 | 43 | return 0; |
23 | 23 | // GetValueAsSQ to solve that issue. |
24 | 24 | static const char * const printmd5[][2] = { |
25 | 25 | { "a19bffac370df32acbf6b4991d1cbafe" , "00191113.dcm" } , |
26 | { "2e7d47d86dc6b541fccfa928c2ee05e8" , "012345.002.050.dcm" } , | |
26 | { "a5b2cb7d27bf0565296ae0391c07dd54" , "012345.002.050.dcm" } , | |
27 | 27 | { "94f8c6ab090bdc11e61625bfc2dd39b7" , "05115014-mr-siemens-avanto-syngo-with-palette-icone.dcm" } , |
28 | 28 | { "20c11831c616eb121a405cd73de5cba2" , "05148044-mr-siemens-avanto-syngo.dcm" } , |
29 | 29 | { "ec10dcbf1b13ace8a6c0cc5b24c6c870" , "3E768EB7.dcm" } , |
30 | 30 | { "fde1da68a1707dcc687ddffd57e6b3c3" , "ACUSON-24-YBR_FULL-RLE-b.dcm" } , |
31 | 31 | { "a27c6628d6379783a3be223481d5cba4" , "ACUSON-24-YBR_FULL-RLE.dcm" } , |
32 | 32 | { "9f3aa114b955a812942f815b6b456eaf" , "ALOKA_SSD-8-MONO2-RLE-SQ.dcm" } , |
33 | { "8b9bca2a22732c6165eba2fd3114d323" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" } , | |
34 | { "0df5a880b1973062f1e3850c27ee9568" , "BugGDCM2_UndefItemWrongVL.dcm" } , | |
33 | { "6c18a8fdd766660fbb475c05d0611634" , "AMIInvalidPrivateDefinedLengthSQasUN.dcm" } , | |
34 | { "9ddd03e5fd29f92bd02c3d3812b4e93e" , "BugGDCM2_UndefItemWrongVL.dcm" } , | |
35 | 35 | { "6d2af85d2af299c223b684538d42d9e5" , "CR-MONO1-10-chest.dcm" } , |
36 | 36 | { "820d45cefd528e011921ea129bec9084" , "CT_16b_signed-UsedBits13.dcm" } , |
37 | 37 | { "fcf2ca019aa3138188edb18552983733" , "CT-MONO2-12-lomb-an2.acr" } , |
54 | 54 | { "b770b1ca257d7c1c885f69a5a1b58808" , "D_CLUNIE_MR2_JPLL.dcm" } , |
55 | 55 | { "da74aefef4e8ac49dbe1a4dd3b1dcb26" , "D_CLUNIE_MR2_JPLY.dcm" } , |
56 | 56 | { "023eb2a9ecbfd3c04bb148ec339865f0" , "D_CLUNIE_MR2_RLE.dcm" } , |
57 | { "dca2414a88e95ef5ed59c088d20021b8" , "D_CLUNIE_MR3_JPLL.dcm" } , | |
58 | { "73c16bde7114f03b976009cba63c5f65" , "D_CLUNIE_MR3_JPLY.dcm" } , | |
59 | { "d1c358c3f79a5fc5592abe2b4b4a3571" , "D_CLUNIE_MR3_RLE.dcm" } , | |
57 | { "4ac28edcc53e3c5a2b14cee29ac4b350" , "D_CLUNIE_MR3_JPLL.dcm" } , | |
58 | { "1279c4aaacd1a058fc4b101cbfebec54" , "D_CLUNIE_MR3_JPLY.dcm" } , | |
59 | { "d6ca154c96d206995023f7349f6ca861" , "D_CLUNIE_MR3_RLE.dcm" } , | |
60 | 60 | { "1646ec013060ef3f261849db705f80f3" , "D_CLUNIE_MR4_JPLL.dcm" } , |
61 | 61 | { "fbbfe4caab2179641bd0de5d8ccf79ae" , "D_CLUNIE_MR4_JPLY.dcm" } , |
62 | 62 | { "fafdb8499580e59c2f6d9047894272ea" , "D_CLUNIE_MR4_RLE.dcm" } , |
99 | 99 | { "3493bf0e698798529fde6ef488289879" , "ELSCINT1_JP2vsJ2K.dcm" } , |
100 | 100 | { "8f5581be656bd6f1ab6c9ec94f302284" , "ELSCINT1_LOSSLESS_RICE.dcm" } , |
101 | 101 | { "54f138a1aa6819ec1560a7ed344cde1a" , "ELSCINT1_PMSCT_RLE1.dcm" } , |
102 | { "ff2965f3ca39bc0795df9850aa25467e" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" } , | |
102 | { "d576bf8e8b2ca71fd543d29698807e85" , "ExplicitVRforPublicElementsImplicitVRforShadowElements.dcm" } , | |
103 | 103 | { "3199cd21166043d619209d7a2073fb56" , "fffc0000UN.dcm" } , |
104 | 104 | { "9b426b02521cbc2f3ee25ab383ca835e" , "FUJI-10-MONO1-ACR_NEMA_2.dcm" } , |
105 | 105 | { "2aba3dacd00a0bc14a06e2d7142b916a" , "gdcm-ACR-LibIDO.acr" } , |
115 | 115 | { "9e126a24f81534e1cd653f16739a6192" , "GE_DLX-8-MONO2-Multiframe.dcm" } , |
116 | 116 | { "6b66f8c38fe96db805e7dedd9a997811" , "GE_DLX-8-MONO2-Multiframe-Jpeg_Lossless.dcm" } , |
117 | 117 | { "61ca6c5115e6f74565f6f2ca06647444" , "GE_DLX-8-MONO2-PrivateSyntax.dcm" } , |
118 | { "459247061fb21a9cbf0bbb359a0af160" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" } , | |
118 | { "7920bf7f1269ba54dd8d0e0d375dc4b9" , "GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm" } , | |
119 | 119 | { "8d398fce426d3a248d8c3f7582e3751d" , "GE_GENESIS-16-MONO2-WrongLengthItem.dcm" } , |
120 | 120 | { "bb5d500a0391a399b035968496b6fd5d" , "GE_LOGIQBook-8-RGB-HugePreview.dcm" } , |
121 | { "7aad71b9c70060c0a39a73b2f489d68f" , "GE_MR_0025xx1bProtocolDataBlock.dcm" } , | |
121 | { "1ad963ca1e91932bb1ac58f3dddd981f" , "GE_MR_0025xx1bProtocolDataBlock.dcm" } , | |
122 | 122 | { "d5efa34d8091e1ad04683eefb41f33c7" , "GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm" } , |
123 | 123 | { "d41d8cd98f00b204e9800998ecf8427e" , "IM-0001-0066.dcm" } , |
124 | 124 | { "cd085d783924d8a7fa2270ff40c6dc3e" , "ITK_GDCM124_MultiframeSecondaryCaptureInvalid.dcm" } , |
149 | 149 | { "497d6ea45b8f3f7f6a3bf8125dcc43b1" , "MR16BitsAllocated_8BitsStored.dcm" } , |
150 | 150 | { "5b23ccf10ad6358b253a7ec185deb2a9" , "MR-Brucker-CineTagging-NonSquarePixels.dcm" } , |
151 | 151 | { "31246836410a24124acf6bea5a36a942" , "MR_ELSCINT1_00e1_1042_SQ_feff_00e0_Item.dcm" } , |
152 | { "285433f0db3a7aae20a4734644fc959d" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" } , | |
152 | { "7a61574251f8788a11cfe06ddc109bd9" , "MR_GE_with_Private_Compressed_Icon_0009_1110.dcm" } , | |
153 | 153 | { "8419613dfb8d4b190ef8a988f8927bce" , "MR-MONO2-12-an2.acr" } , |
154 | 154 | { "b4058b67ec1eb3d3d3acde27d51eb24a" , "MR-MONO2-12-angio-an1.acr" } , |
155 | 155 | { "f782f6ea25928310bd69c3ca5c6a97d2" , "MR-MONO2-12-shoulder.dcm" } , |
156 | 156 | { "7f6bccb00b34a7d277eacaffd2bb0362" , "MR-MONO2-16-head.dcm" } , |
157 | 157 | { "9bd4d79cc59c66b19c21577e12cd6226" , "MR-MONO2-8-16x-heart.dcm" } , |
158 | 158 | { "cd623ac04602182dc66adb505c516341" , "MR_Philips-Intera_BreaksNOSHADOW.dcm" } , |
159 | { "f295d87a398e0bcd96c5dfa20d96a419" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" } , | |
160 | { "af3c49db53cfb30aa438e7369dba117b" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" } , | |
161 | { "d7019c1822870140965fa3345b53886c" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" } , | |
162 | { "69ccce1a3bb1c481d90a1df109acf3b7" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" } , | |
159 | { "ced145431248f1e00e9bdc23b0c61674" , "MR_Philips_Intera_No_PrivateSequenceImplicitVR.dcm" } , | |
160 | { "8eab7fcf9c53d06968dde33f6b3a8918" , "MR_Philips_Intera_PrivateSequenceExplicitVR_in_SQ_2001_e05f_item_wrong_lgt_use_NOSHADOWSEQ.dcm" } , | |
161 | { "3d24233b19788d349f64b7b267723186" , "MR_Philips_Intera_PrivateSequenceImplicitVR.dcm" } , | |
162 | { "1693399bc1edb7cdc494095a27201eab" , "MR_Philips_Intera_SwitchIndianess_noLgtSQItem_in_trueLgtSeq.dcm" } , | |
163 | 163 | { "5797c9dfe94e4a4bccfbf81ab0aaa957" , "MR-SIEMENS-DICOM-WithOverlays.dcm" } , |
164 | 164 | { "df28467760104edc923d0625a0e2a778" , "MR-SIEMENS-DICOM-WithOverlays-extracted-overlays.dcm" } , |
165 | 165 | { "bf324a1c91d3a09d9136f54f5910e570" , "MR_SIEMENS_forceLoad29-1010_29-1020.dcm" } , |
170 | 170 | { "7f4cddc9a88f8c5147b89f769eb1cae7" , "OT-PAL-8-face.dcm" } , |
171 | 171 | { "5fce2728bd9457d4fc1224a374829e2f" , "PET-cardio-Multiframe-Papyrus.dcm" } , |
172 | 172 | { "071b840050588d14fde61646e058e1c6" , "PHILIPS_Brilliance_ExtraBytesInOverlay.dcm" } , |
173 | { "244e8beb3151f9a26dd8c0650a4adede" , "PHILIPS_GDCM12xBug2.dcm" } , | |
174 | { "3d7cc6eaf1c2f065290c50473bc8001a" , "PHILIPS_GDCM12xBug.dcm" } , | |
173 | { "a7eb66c4f66784ad456d060b7123ea15" , "PHILIPS_GDCM12xBug2.dcm" } , | |
174 | { "48203ef1f45cb1f7f919de53062db5d0" , "PHILIPS_GDCM12xBug.dcm" } , | |
175 | 175 | { "c38ad661c6a14f8bd88b304755e7ba7b" , "PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm" } , |
176 | 176 | { "e0a690636c608f312ca550908d4b551f" , "PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm" } , |
177 | 177 | { "03d88060c3bd820b96840599c0099470" , "PHILIPS_Gyroscan-8-MONO2-Odd_Sequence.dcm" } , |
178 | { "1caa6b627fa7dc0995efc2a36765055e" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" } , | |
178 | { "1f198bdb09f5e52dc3f9ad1dfced8a4d" , "PHILIPS_Intera-16-MONO2-Uncompress.dcm" } , | |
179 | 179 | { "4f34474ed72e6a5960fc4691e588f8e0" , "PICKER-16-MONO2-Nested_icon.dcm" } , |
180 | 180 | { "629da04611e097e2cc532d6fe5e6454d" , "PICKER-16-MONO2-No_DicomV3_Preamble.dcm" } , |
181 | 181 | { "3aaca1826b4a4deb9e41ebf2af4fa6b2" , "PrivateGEImplicitVRBigEndianTransferSyntax16Bits.dcm" } , |
205 | 205 | { "cbd59e416dd82dc14df251ea6fccb55b" , "test.acr" } , |
206 | 206 | { "0c2c475f6d21ae0aeadbf16565dcdbc4" , "TG18-CH-2k-01.dcm" } , |
207 | 207 | { "e8cc7ed19eedf9bed9ab60683f3dbfa1" , "THERALYS-12-MONO2-Uncompressed-Even_Length_Tag.dcm" } , |
208 | { "463888b21317e5816584541c7243e124" , "TheralysGDCM120Bug.dcm" } , | |
208 | { "aa708d3b15e451c8367e7909257d9346" , "TheralysGDCM120Bug.dcm" } , | |
209 | 209 | { "e8819809884c214fe78ee2b227417e5c" , "TOSHIBA_MRT150-16-MONO2-ACR_NEMA_2.dcm" } , |
210 | { "9fcf7924fef1b48977b8c4b9a84caa87" , "undefined_length_un_vr.dcm" } , | |
210 | { "fafc22cde1c9092cb188982ecee8da9b" , "undefined_length_un_vr.dcm" } , | |
211 | 211 | { "787ca80c8dd1aa619d5f85610862380b" , "US-GE-4AICL142.dcm" } , |
212 | 212 | { "f1e9c893391e1d458cffa2a1e0904160" , "US-IRAD-NoPreambleStartWith0003.dcm" } , |
213 | 213 | { "d1d9be67c9d066fabc8e1c4ae124f9a0" , "US-IRAD-NoPreambleStartWith0005.dcm" } , |
220 | 220 | { "d2cb6962750eb8f92c480e6cc2f4d104" , "GDCMJ2K_TextGBR.dcm" }, |
221 | 221 | { "2e039bbc7520f809963e051ff5144ccf" , "UnexpectedSequenceDelimiterInFixedLengthSequence.dcm" }, |
222 | 222 | { "0a90894370ba84dbe31acd1290ff9999" , "NM_Kakadu44_SOTmarkerincons.dcm" }, |
223 | { "bcadb7b0f72d2ea3d4e910b885f07087" , "PhilipsInteraSeqTermInvLen.dcm" }, | |
223 | { "fdd8a53915712a924ac74c26ec4d1051" , "PhilipsInteraSeqTermInvLen.dcm" }, | |
224 | 224 | { "2940bd46f097f79012d24f47504c3c8c" , "TOSHIBA_J2K_OpenJPEGv2Regression.dcm" }, |
225 | 225 | { "696917fea41e83b9980bad82b609162c" , "TOSHIBA_J2K_SIZ0_PixRep1.dcm" }, |
226 | 226 | { "7ef3da46c43e51cfe2eb82e4d23dd623" , "TOSHIBA_J2K_SIZ1_PixRep0.dcm" }, |
230 | 230 | { "4be7f56f11ce6090b7139879c4fdc71f" , "SC16BitsAllocated_8BitsStoredJPEG.dcm" }, |
231 | 231 | { "1060ff4eb8731d4b2152db83fed2eedd" , "SC16BitsAllocated_8BitsStoredJ2K.dcm" }, |
232 | 232 | { "7dc0a8ffffc8fb441dbd4129111eaf8b" , "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm" }, |
233 | { "41d1baead629d878d09d6c1037faf47a" , "JPEGNote_empty.dcm" }, | |
234 | { "3cb9917c468226c265ef637aac5f4b61" , "JPEGLS_CharLS_10742.dcm" }, | |
235 | { "8381875d83ce321955a064e40d047dde" , "JPEGLosslessYBR_FULL_422.dcm" }, | |
236 | { "67f7b36ad6e54889b4a2581baa41afdf" , "JPEGNote_missing.dcm" }, | |
237 | { "807bf2aef3bc1885217c8a12d2d2bc19" , "JPEGNote_bogus.dcm" }, | |
238 | { "669cc0e807673ebe57124739a1874f35" , "RLEDebianBug816607Orig.dcm" }, | |
239 | { "1daa9bb53a8ce090041472f528248686" , "IllegalGroup2ImplicitTS.dcm" }, | |
240 | ||
233 | 241 | |
234 | 242 | { 0 ,0 } |
235 | 243 | }; |
0 | GDCM binaries have moved ! | |
1 | -------------------------- | |
2 | ||
3 | They are now automatically uploaded to github: | |
4 | ||
5 | [github release](https://github.com/malaterre/GDCM/releases) | |
6 | ||
7 | They are build using travis and appveyor automatically | |
8 | ||
9 | As a side note the old zip (source) file is not available anymore on sf.net, | |
10 | please see instead on github. |
125 | 125 | # https://sourceforge.net/project/admin/explorer.php?group_id=137895 |
126 | 126 | # https://sourceforge.net/projects/gdcm/files/gdcm%202.x/#folder-create |
127 | 127 | |
128 | # Update default version: | |
129 | #https://sourceforge.net/p/forge/documentation/Using%20the%20Release%20API/ | |
130 | exit 1 | |
128 | 131 | rsync -e ssh GDCM-$version-Linux-x86_64.tar.gz "malat,gdcm@frs.sourceforge.net:/home/frs/project/g/gd/gdcm/gdcm\ 2.x/GDCM\ $version" |
129 | 132 | check_exit_value $? "rsync did not return properly" || exit 1 |
130 | 133 | rsync -e ssh GDCM-$version-Linux-x86_64.tar.bz2 "malat,gdcm@frs.sourceforge.net:/home/frs/project/g/gd/gdcm/gdcm\ 2.x/GDCM\ $version" |
635 | 635 | |
636 | 636 | if(GDCM_WRAP_JAVA) |
637 | 637 | if(VTK_WRAP_JAVA) |
638 | find_package(Java 1.5 REQUIRED) # javac, jar | |
638 | find_package(Java ${GDCM_DEFAULT_JAVA_VERSION} REQUIRED) # javac, jar | |
639 | 639 | find_package(JNI REQUIRED) |
640 | 640 | include_directories(${JNI_INCLUDE_DIRS}) |
641 | 641 | set(VTK_WRAP_JAVA3_INIT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") |
651 | 651 | # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533193 |
652 | 652 | set(GDCM_VTK_JAVA_JAR ${VTK_JAVA_JAR}) |
653 | 653 | else() |
654 | #Â http://bugs.debian.org/834493 | |
654 | 655 | find_file(VTK_JAVA_JAR NAMES vtk.jar vtk6.jar vtk5.jar |
655 | PATHS ${vtkWrappingJava_RUNTIME_LIBRARY_DIRS}) | |
656 | PATHS ${vtkWrappingJava_RUNTIME_LIBRARY_DIRS} /usr/share/java) | |
656 | 657 | set(GDCM_VTK_JAVA_JAR ${VTK_JAVA_JAR}) |
657 | 658 | endif() |
658 | 659 | if(EXISTS /usr/lib/jni/libvtkCommonJava.so) |
221 | 221 | { "SC16BitsAllocated_8BitsStoredJPEG.dcm","c9f9d07783496fa9a9e5b28a90603a70", "c164a73ba18ab4e88977921ffc7c3a65" }, |
222 | 222 | { "SC16BitsAllocated_8BitsStoredJ2K.dcm","96639bac776d875b02f6aa9b35ee2db7", "dbf83984984741c98205d77a947b442c" }, |
223 | 223 | { "SIEMENS_SYNGO-12-MONO2-LUTWrongLength512.dcm","81f79e2fcb3caec752e55be8077441dc", "4a5d8549791432b29948dd8ff63e2534" }, |
224 | { "IllegalGroup2ImplicitTS.dcm","7c922536b5cf4143ce931ff5f552f588", "f666a95dde9ddfdec0cf9574a7985ae3" }, | |
225 | { "JPEGLosslessYBR_FULL_422.dcm","90a95c01f320809e3f6b6c720e78d457", "cdfb5dd0c999d88badeb00a16f96554f" }, | |
226 | { "JPEGNote_bogus.dcm","eeb1028e53ef4dcfc6b4100f8525be41", "161e9fd986ea87adf2596e8e16641f11" }, | |
227 | { "JPEGNote_empty.dcm","e6add795da6e0ccd4ed02f5689a61260", "464960d948dff0ded72b0380080f18a3" }, | |
228 | { "JPEGNote_missing.dcm","dce9f8853a528d423efc95a9bafee938", "464960d948dff0ded72b0380080f18a3" }, | |
229 | { "RLEDebianBug816607Orig.dcm","bb7bb73068f494c3cf947d2375af3501", "b85686dd3169b99725149abb00181254" }, | |
224 | 230 | |
225 | 231 | |
226 | 232 | /* Stopping condition */ |
269 | 269 | string(REGEX MATCH "^.*systemIdStartString=\"http://docbook.sourceforge.net/release/xsl-ns/\".*" out1 ${line}) |
270 | 270 | string(REGEX REPLACE "^.*systemIdStartString=\"http://docbook.sourceforge.net/release/xsl-ns/\".*\"([A-Za-z ]*)\".*" "\\1" output_variable ${line}) |
271 | 271 | if(out1) |
272 | message("Your docbook install was found here :${output_variable}") | |
272 | message(STATUS "Your docbook install was found here :${output_variable}") | |
273 | 273 | set(DOCBOOK_REWRITE_PREFIX_FOUND TRUE) |
274 | 274 | endif() |
275 | 275 | endforeach() |
168 | 168 | <para>convert GDCM 1.2.0 broken UN-2-bytes fields, </para> |
169 | 169 | </listitem> |
170 | 170 | <listitem> |
171 | <para>&... </para> | |
171 | <para>... </para> | |
172 | 172 | </listitem> |
173 | 173 | <listitem> |
174 | 174 | <para>All other broken files listed in the supported refsection.</para> |
100 | 100 | </literallayout></para> |
101 | 101 | |
102 | 102 | <para><literallayout># Dicom-File-Format |
103 | \&... | |
103 | ... | |
104 | 104 | (0008,0000) ?? (UL) 434 # 4,1 Generic Group Length |
105 | 105 | (0008,0005) ?? (CS) [ISO_IR 100] # 10,1-n Specific Character Set |
106 | 106 | (0008,0008) ?? (CS) [ORIGINAL\\PRIMARY\\SINGLE PLANE ] # 30,2-n Image Type |
114 | 114 | (0008,0031) ?? (TM) [101229.000] # 10,1 Series Time |
115 | 115 | (0008,0032) ?? (TM) [102653.000] # 10,1 Acquisition Time |
116 | 116 | (0008,0033) ?? (TM) [102653.000] # 10,1 Content Time |
117 | \&... | |
117 | ... | |
118 | 118 | </literallayout></para> |
119 | 119 | </refsection> |
120 | 120 | <refsection xml:id="gdcmdump_1private_attribute"> |
125 | 125 | <para><literallayout>$ gdcmdump 012345.002.050.dcm |
126 | 126 | </literallayout></para> |
127 | 127 | |
128 | <para><literallayout>\&... | |
128 | <para><literallayout>... | |
129 | 129 | (0009,0010) LO [GEMS_IDEN_01] # 12,1 Private Creator |
130 | 130 | (0009,1001) LO [GE_GENESIS_FF ] # 14,1 Full fidelity |
131 | 131 | (0009,1002) SH [MRCV] # 4,1 Suite id |
137 | 137 | (0009,10e6) SH [08] # 2,1 Genesis Version - now |
138 | 138 | (0009,10e7) UL 2757786872 # 4,1 Exam Record checksum |
139 | 139 | (0009,10e9) SL 985968523 # 4,1 Actual series data time stamp |
140 | \&... | |
140 | ... | |
141 | 141 | (0019,0000) UL 1208 # 4,1 Generic Group Length |
142 | 142 | (0019,0010) LO [GEMS_ACQU_01] # 12,1 Private Creator |
143 | 143 | (0019,100f) DS [424.399994] # 10,1 Horiz. Frame of ref. |
144 | 144 | (0019,1011) SS 0 # 2,1 Series contrast |
145 | \&... | |
145 | ... | |
146 | 146 | (0019,10e0) DS [0.000000] # 8,1 User data 24 {# DTI Diffusion Dir., release 10.0 & above} |
147 | 147 | (0019,10e2) DS [0.000000] # 8,1 Velocity Encode Scale |
148 | 148 | (0019,10f2) SS 0 # 2,1 Fast phases |
149 | 149 | (0019,10f9) DS [98] # 2,1 Transmit gain |
150 | \&... | |
150 | ... | |
151 | 151 | (0021,0000) UL 372 # 4,1 Generic Group Length |
152 | 152 | (0021,0010) LO [GEMS_RELA_01] # 12,1 Private Creator |
153 | 153 | (0021,1003) SS 0 # 2,1 Series from which Prescribed |
154 | \&... | |
154 | ... | |
155 | 155 | </literallayout></para> |
156 | 156 | </refsection> |
157 | 157 | <refsection xml:id="gdcmdump_1siemens_csa"> |
176 | 176 | 6 - 'B_value' VM 1, VR IS, SyngoDT 6, NoOfItems 6, Data '0 ' |
177 | 177 | 7 - 'Filter1' VM 1, VR IS, SyngoDT 6, NoOfItems 0, Data |
178 | 178 | 8 - 'Filter2' VM 1, VR IS, SyngoDT 6, NoOfItems 0, Data |
179 | \&... | |
179 | ... | |
180 | 180 | </literallayout></para> |
181 | 181 | </refsection> |
182 | 182 | <refsection xml:id="gdcmdump_1gems_pdb"> |
205 | 205 | TRICKSIMG "1" |
206 | 206 | TAG_SPACE "7" |
207 | 207 | TAG_TYPE "None" |
208 | \&... | |
208 | ... | |
209 | 209 | </literallayout></para> |
210 | 210 | </refsection> |
211 | 211 | <refsection xml:id="gdcmdump_1elscint_pi"> |
240 | 240 | ACS-learn-allowed [no] |
241 | 241 | ACS-water-radius [-1.000000] |
242 | 242 | ACS-water-radius-scan [-1] |
243 | \&... | |
243 | ... | |
244 | 244 | </literallayout></para> |
245 | 245 | </refsection> |
246 | 246 | <refsection xml:id="gdcmdump_1vepro_pi"> |
301 | 301 | <para><literallayout>$ gdcmdump --sds PMS_SeriesDataStorage.dcm |
302 | 302 | </literallayout></para> |
303 | 303 | |
304 | <para><literallayout>\&... | |
304 | <para><literallayout>... | |
305 | 305 | PMS/Item name: [PDF_CONTROL_GEN_PARS/IEEE_PDF/Y ] |
306 | \&... | |
306 | ... | |
307 | 307 | PMS/Item name: [PDF_CONTROL_PREP_PARS /IEEE_PDF/Y ] |
308 | \&... | |
308 | ... | |
309 | 309 | PMS/Item name: [PDF_CONTROL_RECON_PARS/IEEE_PDF/Y ] |
310 | \&... | |
310 | ... | |
311 | 311 | PMS/Item name: [PDF_CONTROL_SCAN_PARS /IEEE_PDF/Y ] |
312 | \&... | |
312 | ... | |
313 | 313 | PMS/Item name: [PDF_EXAM_PARS /IEEE_PDF/Y ] |
314 | \&... | |
314 | ... | |
315 | 315 | PMS/Item name: [PDF_HARDWARE_PARS /IEEE_PDF/Y ] |
316 | \&... | |
316 | ... | |
317 | 317 | PMS/Item name: [PDF_PREP_PARS /IEEE_PDF/Y ] |
318 | \&... | |
318 | ... | |
319 | 319 | PMS/Item name: [PDF_SPT_PARS/IEEE_PDF/Y ] |
320 | 320 | SP_scan_resol [256\256] # 2 |
321 | 321 | SP_pda_profiles [0\0] # 2 |
339 | 339 | SP_rg_result [0] # 1 |
340 | 340 | SP_dc_result [0] # 1 |
341 | 341 | SP_ph_result [0] # 1 |
342 | \&... | |
342 | ... | |
343 | 343 | </literallayout></para> |
344 | 344 | </refsection> |
345 | 345 | <refsection xml:id="gdcmdump_1asn1"> |
350 | 350 | <para><literallayout>$ gdcmdump encrypted.dcm |
351 | 351 | </literallayout></para> |
352 | 352 | |
353 | <para><literallayout>\&... | |
353 | <para><literallayout>... | |
354 | 354 | (0400,0500) SQ # u/l,1 Encrypted Attributes Sequence |
355 | 355 | (fffe,e000) na (Item with undefined length) |
356 | 356 | (0400,0510) UI [1.2.840.10008.1.2] # 18,1 Encrypted Content Transfer Syntax UID |
357 | 357 | (0400,0520) OB 30\\82\\03\\ba\\06\\09\\2a\\86\\48\\55\\04\\08\\13 # 958,1 Encrypted Content |
358 | 358 | (fffe,e00d) |
359 | 359 | (fffe,e0dd) |
360 | \&... | |
360 | ... | |
361 | 361 | </literallayout></para> |
362 | 362 | |
363 | 363 | <para><literallayout>$ gdcmdump --asn1 encrypted.dcm |
63 | 63 | -C --sop-class-uid SOP Class UID (name or value). |
64 | 64 | -T --study-uid Study UID. |
65 | 65 | -S --series-uid Series UID. |
66 | --template Template DICOM file. | |
66 | 67 | --root-uid Root UID. |
67 | 68 | </literallayout></para> |
68 | 69 | </refsection> |
220 | 221 | <para><literallayout>$ gdcmimg --sop-class-uid 1.2.840.10008.5.1.4.1.1.77.1.4 input.jpg output.dcm |
221 | 222 | </literallayout></para> |
222 | 223 | </refsection> |
224 | <refsection xml:id="gdcmimg_1template"> | |
225 | <title>Specifying a template DICOM file</title> | |
226 | ||
227 | <para>Instead of the default Secondary Capture Image Storage, generated with default values, one may want to specify a DICOM file that will serve as template to fill in the DICOM attributes.</para> | |
228 | ||
229 | <para><literallayout>$ gdcmimg --sign 1 --template template.dcm input.jpg output.dcm | |
230 | </literallayout></para> | |
231 | <para>Pay attention that any values from template.dcm that are not consistent with what is found inside the reference image will be overriden (eg. image size). On particular case should be of concern: the Pixel Representation for the JPEG family.</para> | |
232 | ||
233 | </refsection> | |
223 | 234 | </refsection> |
224 | 235 | <refsection xml:id="gdcmimg_1multiple_files"> |
225 | 236 | <title>Multiple Files</title> |
103 | 103 | <para><literallayout>$ gdcmdump D_CLUNIE_CT1_J2KR.dcm |
104 | 104 | </literallayout></para> |
105 | 105 | |
106 | <para><literallayout>\&... | |
106 | <para><literallayout>... | |
107 | 107 | (7fe0,0010) OB # u/l,1 Pixel Data |
108 | 108 | (fffe,e000) ?? [] # 0,1 Item |
109 | 109 | (fffe,e000) ?? ff\\4f\\ff\\51\\00\\29\\00\\00\\00\\00\\02\\00\\00\\00\\02\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\02\\00\\00\\00\\02\\00 # 65536,1 Item |
168 | 168 | <para><literallayout>$ gdcmdump 00191113.dcm |
169 | 169 | </literallayout></para> |
170 | 170 | |
171 | <para><literallayout>\&... | |
171 | <para><literallayout>... | |
172 | 172 | (7fe0,0010) OB # u/l,1 Pixel Data |
173 | 173 | (fffe,e000) ?? 00\\00\\00\\00\\6b\\38\\01\\00\\10\\77\\02\\00\\37\\b6\\03\\00\\a7\\f4\\04\\00 # 20,1 Item |
174 | 174 | (fffe,e000) ?? ff\\d8\\ff\\c3\\00\\0b\\08\\02\\00\\02\\00\\01\\00\\11\\00\\ff\\c4\\00\\1b\\00\\01\\01\\01\\01\\01\\01\\01\\01\\00\\00\\00\\00 # 79970,1 Item |
86 | 86 | TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian] |
87 | 87 | NumberOfDimensions: 2 |
88 | 88 | Dimensions: (384,384,1) |
89 | \&... | |
89 | ... | |
90 | 90 | </literallayout></para> |
91 | 91 | |
92 | 92 | <para><literallayout>$ gdcmtar --mosaic -i MR-sonata-3D-as-Tile.dcm -o mosaic --pattern %03d.dcm |
134 | 134 | TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian] |
135 | 135 | NumberOfDimensions: 2 |
136 | 136 | Dimensions: (64,64,1) |
137 | \&... | |
137 | ... | |
138 | 138 | </literallayout></para> |
139 | 139 | </refsection> |
140 | 140 | </refsection> |
5352 | 5352 | // File: classgdcm_1_1ImageRegionReader.xml |
5353 | 5353 | %feature("docstring") gdcm::ImageRegionReader " |
5354 | 5354 | |
5355 | ImageRegionReader. | |
5355 | ImageRegionReader This class is able to read a region from a DICOM | |
5356 | file containing an image. This implementation requires that the | |
5357 | information stored in the DICOM header are consistent with what is in | |
5358 | the encapsulated Pixel Data. This is technically not required by DICOM | |
5359 | standard, which makes this implementation illegal with regards to the | |
5360 | famous JPEG | |
5361 | note:http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2.html | |
5362 | #para_4bcb841e-c6bf-4e26-82a5-3fad3c942da0. | |
5356 | 5363 | |
5357 | 5364 | See: ImageReader |
5358 | 5365 | |
5696 | 5703 | http://gdcm.sourceforge.net/wiki/index.php/Imager_Pixel_Spacing |
5697 | 5704 | |
5698 | 5705 | Bug There are currently a couple of bugs in this implementation: |
5706 | ||
5699 | 5707 | Gantry Tilt is not considered (always an error) |
5700 | 5708 | |
5701 | 5709 | Application programmer should only sort valid DataSet (eg. |
8712 | 8720 | gdcm::PythonFilter::ToPyObject(const Tag &t) const "; |
8713 | 8721 | |
8714 | 8722 | %feature("docstring") gdcm::PythonFilter::UseDictAlways "void |
8715 | gdcm::PythonFilter::UseDictAlways(bool use) "; | |
8723 | gdcm::PythonFilter::UseDictAlways(bool) "; | |
8716 | 8724 | |
8717 | 8725 | |
8718 | 8726 | // File: classgdcm_1_1QueryBase.xml |
15044 | 15052 | // File: bug.xml |
15045 | 15053 | |
15046 | 15054 | |
15047 | // File: dir_48be02fb937e08881437e02515417ab2.xml | |
15048 | ||
15049 | ||
15050 | // File: dir_dbdfee04788ce02e68d05e06d5e6d98f.xml | |
15051 | ||
15052 | ||
15053 | // File: dir_422e8974cbd0b7203ed9c70ede735192.xml | |
15054 | ||
15055 | ||
15056 | // File: dir_fc2dbd93ff698b14d78f486017ee822b.xml | |
15057 | ||
15058 | ||
15059 | // File: dir_63e84970519399936bea68aa0151439e.xml | |
15060 | ||
15061 | ||
15062 | // File: dir_a3a231e2bd7f702d85036607d7d87964.xml | |
15063 | ||
15064 | ||
15065 | // File: dir_bfc3201f3b82d7ccf14c524caa3c389b.xml | |
15066 | ||
15067 | ||
15068 | // File: dir_9a6580727919559370fc2250dcaca6b8.xml | |
15069 | ||
15070 | ||
15071 | // File: dir_087222ad62d2f517f4e0198672951648.xml | |
15072 | ||
15073 | ||
15074 | // File: dir_2a74275ceded0a5f3b0fb2e9bd792825.xml | |
15075 | ||
15076 | ||
15077 | // File: dir_acafdc7d686494cf0735517ddc7a7669.xml | |
15078 | ||
15079 | ||
15080 | // File: dir_d2ab22b73e3ee89be3a207288d7a9056.xml | |
15055 | // File: dir_041d54874d9fecec94d9cb4ae010b51e.xml | |
15056 | ||
15057 | ||
15058 | // File: dir_8021392154ea27d3da33100afd5b42a1.xml | |
15059 | ||
15060 | ||
15061 | // File: dir_83a82e6a2bc4a0f6429532cb237ca746.xml | |
15062 | ||
15063 | ||
15064 | // File: dir_9760e222fce508c3b7270d68e6523d76.xml | |
15065 | ||
15066 | ||
15067 | // File: dir_90174c188c639015dd869d1a853f914f.xml | |
15068 | ||
15069 | ||
15070 | // File: dir_aceed280bd27dc60f64c2cb4efae4f90.xml | |
15071 | ||
15072 | ||
15073 | // File: dir_5aab2906425e8d9a7aa9fea4f8d0a2fa.xml | |
15074 | ||
15075 | ||
15076 | // File: dir_5daaa9a41ac240f7de3019ff61b11839.xml | |
15077 | ||
15078 | ||
15079 | // File: dir_b138abe427a068e1da5116454e79caa4.xml | |
15080 | ||
15081 | ||
15082 | // File: dir_6b1a62c3f439db8dff4e3363f340e91f.xml | |
15083 | ||
15084 | ||
15085 | // File: dir_776c231028699256e0cc13f46def7474.xml | |
15086 | ||
15087 | ||
15088 | // File: dir_6285418b2babf39982c6f35dbd05cbb5.xml | |
15081 | 15089 | |
15082 | 15090 | |
15083 | 15091 | // File: AWTMedical3_8java-example.xml |