Skip to content

Commit 2ddd6d4

Browse files
committed
Merge branch 'release'
2 parents 7078af4 + 3db190c commit 2ddd6d4

File tree

8 files changed

+37
-17
lines changed

8 files changed

+37
-17
lines changed

Source/DataDictionary/gdcmPrivateDefaultDicts.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,9 +1159,12 @@ static const DICT_ENTRY DICOMV3DataDict [] = {
11591159
{0x2013,0x0007,"BioClinicaImagingSegmentGroup",VR::OB,VM::VM1,"Custom Storage Segment Blob #7",false},
11601160
{0x2013,0x0008,"BioClinicaImagingSegmentGroup",VR::OB,VM::VM1,"Custom Storage Segment Blob #8",false},
11611161
{0x2013,0x0009,"BioClinicaImagingSegmentGroup",VR::OB,VM::VM1,"Custom Storage Segment Blob #9",false},
1162-
{0x7fe1,0x0001,"Bioclinica",VR::UT,VM::VM1,"??",false},
1163-
{0x7fe1,0x0002,"Bioclinica",VR::LO,VM::VM1,"??",false},
1164-
{0x7fe1,0x0003,"Bioclinica",VR::LO,VM::VM1,"??",false},
1162+
{0x2213,0x0001,"Clario",VR::UT,VM::VM1,"AES tag",false},
1163+
{0x2213,0x0002,"Clario",VR::LO,VM::VM1,"PX version",false},
1164+
{0x2213,0x0003,"Clario",VR::LO,VM::VM1,"Mask Name",false},
1165+
{0x7fe1,0x0001,"Bioclinica",VR::UT,VM::VM1,"AES tag",false},
1166+
{0x7fe1,0x0002,"Bioclinica",VR::LO,VM::VM1,"PX version",false},
1167+
{0x7fe1,0x0003,"Bioclinica",VR::LO,VM::VM1,"Mask Name",false},
11651168
{0x5533,0x0033,"Visus Change",VR::SQ,VM::VM1,"Visus Data Save Sequence",false},
11661169
{0x5533,0x0035,"Visus Change",VR::DA,VM::VM1,"Visus Data Save Date",false},
11671170
{0x5533,0x0037,"Visus Change",VR::LO,VM::VM1,"Visus Data Save Originator",false},

Source/DataStructureAndEncodingDefinition/gdcmExplicitDataElement.txx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,11 @@ std::istream &ExplicitDataElement::ReadValue(std::istream &is, bool readvalues)
203203
gdcm_assert( VRField & VR::OB_OW || VRField == VR::UN );
204204
ValueField = new SequenceOfFragments;
205205
}
206+
else if( TagField == Tag(0x7fe1,0x1060) && VRField == VR::OB )
207+
{
208+
gdcmWarningMacro( "IllegalPrivatePixelSequence (7fe1,1060)" );
209+
ValueField = new SequenceOfFragments;
210+
}
206211
else
207212
{
208213
// Support cp246 conforming file:

Source/DataStructureAndEncodingDefinition/gdcmFileMetaInformation.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ void FileMetaInformation::ComputeDataSetTransferSyntax()
835835
const ByteValue *bv = de.GetByteValue();
836836
if( !bv )
837837
{
838-
throw Exception( "Unknown Transfer syntax" );
838+
throw Exception( "NULL Transfer syntax" );
839839
}
840840
// Pad string with a \0
841841
ts = std::string(bv->GetPointer(), bv->GetLength());

Source/DataStructureAndEncodingDefinition/gdcmTransferSyntax.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ static const char *TSStrings[] = {
8787
"1.2.840.10008.1.2.4.202",
8888
// High-Throughput JPEG 2000 Image Compression
8989
"1.2.840.10008.1.2.4.203",
90+
// Deflated Image Frame Compression
91+
"1.2.840.10008.1.2.8.1",
9092
// Unknown
9193
"Unknown Transfer Syntax", // Pretty sure we never use this case... until a new transfer syntax is added
9294
nullptr // Compilers have no obligation to finish by NULL, do it ourselves
@@ -195,6 +197,7 @@ bool TransferSyntax::CanStoreLossy() const
195197
TSField == JPEGLSLossless ||
196198
TSField == JPEG2000Lossless ||
197199
TSField == JPEG2000Part2Lossless ||
200+
TSField == DeflatedImageFrameCompression ||
198201
TSField == RLELossless
199202
)
200203
{
@@ -311,6 +314,7 @@ bool TransferSyntax::IsEncapsulated() const
311314
case HTJ2KLossless:
312315
case HTJ2KRPCLLossless:
313316
case HTJ2K:
317+
case DeflatedImageFrameCompression:
314318

315319
ret = true;
316320
break;

Source/DataStructureAndEncodingDefinition/gdcmTransferSyntax.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class GDCM_EXPORT TransferSyntax
8989
HTJ2KLossless,
9090
HTJ2KRPCLLossless,
9191
HTJ2K,
92+
DeflatedImageFrameCompression,
9293
TS_END
9394
} TSType;
9495

Source/MediaStorageAndFileFormat/gdcmPixmapReader.cxx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -631,13 +631,17 @@ bool PixmapReader::ReadImageInternal(MediaStorage const &ms, bool handlepixeldat
631631
{
632632
// PHILIPS_Gyroscan-12-MONO2-Jpeg_Lossless.dcm
633633
// PHILIPS_Gyroscan-12-Jpeg_Extended_Process_2_4.dcm
634-
gdcmDebugMacro( "Mixture of ACR NEMA and DICOM file" );
635-
isacrnema = true;
636634
const char *str = ds.GetDataElement( trecognitioncode ).GetByteValue()->GetPointer();
637-
gdcm_assert( strncmp( str, "ACR-NEMA", strlen( "ACR-NEMA" ) ) == 0 ||
638-
strncmp( str, "ACRNEMA", strlen( "ACRNEMA" ) ) == 0 ||
639-
strncmp( str, "MIPS 2.0", strlen( "MIPS 2.0" ) ) == 0 );
640-
(void)str;//warning removal
635+
if( strncmp( str, "ACR-NEMA", strlen( "ACR-NEMA" ) ) == 0 ||
636+
strncmp( str, "ACRNEMA", strlen( "ACRNEMA" ) ) == 0 ||
637+
strncmp( str, "MIPS 2.0", strlen( "MIPS 2.0" ) ) == 0) {
638+
gdcmDebugMacro("Mixture of ACR NEMA and DICOM file");
639+
isacrnema = true;
640+
} else {
641+
Attribute<0x0008, 0x0010> at;
642+
at.SetFromDataSet(ds);
643+
gdcmWarningMacro("Junk recognition code: " + at.GetValue());
644+
}
641645
}
642646

643647
std::vector<unsigned int> vdims = ImageHelper::GetDimensionsValue(*F);

Source/MediaStorageAndFileFormat/gdcmPixmapWriter.cxx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,12 @@ bool PixmapWriter::PrepareWrite( MediaStorage const & ref_ms )
576576
}
577577
else
578578
{
579+
if( ts_orig == TransferSyntax::JPEG2000Lossless )
580+
{
581+
static const CSComp newvalues2[] = {"ISO_15444_1"};
582+
at3.SetValues( newvalues2, 1 );
583+
ds.Replace( at3.GetAsDataElement() );
584+
}
579585
if( ds.FindDataElement( at1.GetTag() ) ) {
580586
at1.Set( ds );
581587
if( atoi(at1.GetValue().c_str()) != 1 ) {
@@ -584,16 +590,13 @@ bool PixmapWriter::PrepareWrite( MediaStorage const & ref_ms )
584590
ds.Replace( at1.GetAsDataElement() );
585591
}
586592
} else {
593+
at1.SetValue( "01" );
594+
ds.Replace( at1.GetAsDataElement() );
595+
// Assume originally JPEGLossy and override previous value ISO_15444_1
587596
if( pi_orig == PhotometricInterpretation::YBR_FULL_422 ) {
588-
at1.SetValue( "01" );
589-
ds.Replace( at1.GetAsDataElement() );
590-
591597
static const CSComp newvalues2[] = {"ISO_10918_1"};
592598
at3.SetValues( newvalues2, 1 );
593599
ds.Replace( at3.GetAsDataElement() );
594-
} else {
595-
gdcmErrorMacro( "Unhandled Lossy flag for Pixel Data" );
596-
return false;
597600
}
598601
}
599602
}

Source/MediaStorageAndFileFormat/gdcmPrinter.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ VR Printer::PrintDataElement(std::ostringstream &os, const Dicts &dicts, const D
642642
}
643643
else if ( sqf )
644644
{
645-
gdcm_assert( t == Tag(0x7fe0,0x0010) );
645+
gdcm_assert( t == Tag(0x7fe0,0x0010) || t == Tag(0x7fe1,0x1060) );
646646
//os << *sqf;
647647
}
648648
else if ( sqi )

0 commit comments

Comments
 (0)