Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/ShearWarpProjectiveTransform.cpp @ 1299:c38c89684d83 broker
replacing std::auto_ptr by std::unique_ptr
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 02 Mar 2020 17:21:24 +0100 |
parents | 2d8ab34c8c91 |
children | 30deba7bc8e2 |
comparison
equal
deleted
inserted
replaced
1297:6ab03e429f06 | 1299:c38c89684d83 |
---|---|
412 * intermediate image. The sheared images are accumulated into the | 412 * intermediate image. The sheared images are accumulated into the |
413 * Float32 image "accumulator". The number of samples available | 413 * Float32 image "accumulator". The number of samples available |
414 * for each pixel is stored in the "counter" image. | 414 * for each pixel is stored in the "counter" image. |
415 **/ | 415 **/ |
416 | 416 |
417 std::auto_ptr<Orthanc::ImageAccessor> accumulator, counter, intermediate; | 417 std::unique_ptr<Orthanc::ImageAccessor> accumulator, counter, intermediate; |
418 | 418 |
419 accumulator.reset(new Orthanc::Image(Orthanc::PixelFormat_Float32, | 419 accumulator.reset(new Orthanc::Image(Orthanc::PixelFormat_Float32, |
420 intermediateWidth, intermediateHeight, false)); | 420 intermediateWidth, intermediateHeight, false)); |
421 counter.reset(new Orthanc::Image(Orthanc::PixelFormat_Grayscale16, | 421 counter.reset(new Orthanc::Image(Orthanc::PixelFormat_Grayscale16, |
422 intermediateWidth, intermediateHeight, false)); | 422 intermediateWidth, intermediateHeight, false)); |
633 double pixelSpacing, | 633 double pixelSpacing, |
634 unsigned int countSlices, | 634 unsigned int countSlices, |
635 ImageInterpolation shearInterpolation, | 635 ImageInterpolation shearInterpolation, |
636 ImageInterpolation warpInterpolation) | 636 ImageInterpolation warpInterpolation) |
637 { | 637 { |
638 std::auto_ptr<Orthanc::ImageAccessor> target | 638 std::unique_ptr<Orthanc::ImageAccessor> target |
639 (new Orthanc::Image(targetFormat, targetWidth, targetHeight, false)); | 639 (new Orthanc::Image(targetFormat, targetWidth, targetHeight, false)); |
640 | 640 |
641 if (source.GetFormat() == Orthanc::PixelFormat_Grayscale16 && | 641 if (source.GetFormat() == Orthanc::PixelFormat_Grayscale16 && |
642 targetFormat == Orthanc::PixelFormat_Grayscale16) | 642 targetFormat == Orthanc::PixelFormat_Grayscale16) |
643 { | 643 { |