comparison Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp @ 819:a68cd7ae8838

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 29 May 2019 13:39:31 +0200
parents 68f888812af4
children 2b4b6b86520a
comparison
equal deleted inserted replaced
817:68f888812af4 819:a68cd7ae8838
40 ExtractedSlice(const OrthancSeriesVolumeProgressiveLoader& that, 40 ExtractedSlice(const OrthancSeriesVolumeProgressiveLoader& that,
41 const CoordinateSystem3D& plane) : 41 const CoordinateSystem3D& plane) :
42 DicomVolumeImageMPRSlicer::Slice(*that.volume_, plane), 42 DicomVolumeImageMPRSlicer::Slice(*that.volume_, plane),
43 that_(that) 43 that_(that)
44 { 44 {
45 if (GetProjection() == VolumeProjection_Axial) 45 if (IsValid())
46 { 46 {
47 // For coronal and sagittal projections, we take the global 47 if (GetProjection() == VolumeProjection_Axial)
48 // revision of the volume because even if a single slice changes, 48 {
49 // this means the projection will yield a different result --> 49 // For coronal and sagittal projections, we take the global
50 // we must increase the revision as soon as any slice changes 50 // revision of the volume because even if a single slice changes,
51 SetRevision(that_.seriesGeometry_.GetSliceRevision(GetSliceIndex())); 51 // this means the projection will yield a different result -->
52 } 52 // we must increase the revision as soon as any slice changes
53 53 SetRevision(that_.seriesGeometry_.GetSliceRevision(GetSliceIndex()));
54 if (that_.strategy_.get() != NULL && 54 }
55 IsValid() && 55
56 GetProjection() == VolumeProjection_Axial) 56 if (that_.strategy_.get() != NULL &&
57 { 57 GetProjection() == VolumeProjection_Axial)
58 that_.strategy_->SetCurrent(GetSliceIndex()); 58 {
59 that_.strategy_->SetCurrent(GetSliceIndex());
60 }
59 } 61 }
60 } 62 }
61 }; 63 };
62 64
63 65
262 if (quality == BEST_QUALITY) 264 if (quality == BEST_QUALITY)
263 { 265 {
264 std::auto_ptr<GetOrthancImageCommand> tmp(new GetOrthancImageCommand); 266 std::auto_ptr<GetOrthancImageCommand> tmp(new GetOrthancImageCommand);
265 tmp->SetHttpHeader("Accept-Encoding", "gzip"); 267 tmp->SetHttpHeader("Accept-Encoding", "gzip");
266 tmp->SetHttpHeader("Accept", std::string(Orthanc::EnumerationToString(Orthanc::MimeType_Pam))); 268 tmp->SetHttpHeader("Accept", std::string(Orthanc::EnumerationToString(Orthanc::MimeType_Pam)));
267 tmp->SetInstanceUri(instance, slice.GetExpectedPixelFormat()); 269 tmp->SetInstanceUri(instance, slice.GetExpectedPixelFormat());
268 tmp->SetExpectedPixelFormat(slice.GetExpectedPixelFormat()); 270 tmp->SetExpectedPixelFormat(slice.GetExpectedPixelFormat());
269 command.reset(tmp.release()); 271 command.reset(tmp.release());
270 } 272 }
271 else 273 else
272 { 274 {