@@ -48,6 +48,7 @@ namespace gdcm
48
48
bool ImageHelper::ForceRescaleInterceptSlope = false ;
49
49
bool ImageHelper::PMSRescaleInterceptSlope = true ;
50
50
bool ImageHelper::ForcePixelSpacing = false ;
51
+ bool ImageHelper::SecondaryCaptureImagePlaneModule = false ;
51
52
52
53
static bool GetOriginValueFromSequence (const DataSet& ds, const Tag& tfgs, std::vector<double > &ori)
53
54
{
@@ -577,7 +578,7 @@ std::vector<double> ImageHelper::GetOriginValue(File const & f)
577
578
578
579
// else
579
580
const Tag timagepositionpatient (0x0020 , 0x0032 );
580
- if ( ds.FindDataElement ( timagepositionpatient ) )
581
+ if ( (ms != MediaStorage::SecondaryCaptureImageStorage || SecondaryCaptureImagePlaneModule) && ds.FindDataElement ( timagepositionpatient ) )
581
582
{
582
583
const DataElement& de = ds.GetDataElement ( timagepositionpatient );
583
584
Attribute<0x0020 ,0x0032 > at = {{0 ,0 ,0 }}; // default value if empty
@@ -729,7 +730,7 @@ std::vector<double> ImageHelper::GetDirectionCosinesValue(File const & f)
729
730
}
730
731
731
732
dircos.resize ( 6 );
732
- if ( !GetDirectionCosinesFromDataSet (ds, dircos) )
733
+ if ( (ms != MediaStorage::SecondaryCaptureImageStorage || SecondaryCaptureImagePlaneModule) && !GetDirectionCosinesFromDataSet (ds, dircos) )
733
734
{
734
735
dircos[0 ] = 1 ;
735
736
dircos[1 ] = 0 ;
@@ -773,6 +774,16 @@ bool ImageHelper::GetForcePixelSpacing()
773
774
return ForcePixelSpacing;
774
775
}
775
776
777
+ void ImageHelper::SetSecondaryCaptureImagePlaneModule (bool b)
778
+ {
779
+ SecondaryCaptureImagePlaneModule = b;
780
+ }
781
+
782
+ bool ImageHelper::GetSecondaryCaptureImagePlaneModule ()
783
+ {
784
+ return SecondaryCaptureImagePlaneModule;
785
+ }
786
+
776
787
bool GetRescaleInterceptSlopeValueFromDataSet (const DataSet& ds, std::vector<double > & interceptslope)
777
788
{
778
789
Attribute<0x0028 ,0x1052 > at1;
0 commit comments