Mercurial > hg > orthanc-stone
diff Framework/Toolbox/FiniteProjectiveCamera.cpp @ 811:ffec76a5f7eb
deprecating ParallelSlices
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 May 2019 18:21:00 +0200 |
parents | c3bbb130abc4 |
children | 2d8ab34c8c91 |
line wrap: on
line diff
--- a/Framework/Toolbox/FiniteProjectiveCamera.cpp Tue May 28 18:09:48 2019 +0200 +++ b/Framework/Toolbox/FiniteProjectiveCamera.cpp Tue May 28 18:21:00 2019 +0200 @@ -23,7 +23,6 @@ #include "GeometryToolbox.h" #include "SubpixelReader.h" -#include "ParallelSlices.h" #include <Core/Logging.h> #include <Core/OrthancException.h> @@ -317,7 +316,7 @@ LOG(WARNING) << "Output image size: " << target.GetWidth() << "x" << target.GetHeight(); LOG(WARNING) << "Output pixel format: " << Orthanc::EnumerationToString(target.GetFormat()); - std::auto_ptr<OrthancStone::ParallelSlices> slices(OrthancStone::ParallelSlices::FromVolumeImage(geometry, projection)); + const unsigned int slicesCount = geometry.GetProjectionDepth(projection); const OrthancStone::Vector pixelSpacing = geometry.GetVoxelDimensions(projection); const unsigned int targetWidth = target.GetWidth(); const unsigned int targetHeight = target.GetHeight(); @@ -329,11 +328,11 @@ typedef SubpixelReader<SourceFormat, ImageInterpolation_Nearest> SourceReader; - for (size_t z = 0; z < slices->GetSliceCount(); z++) + for (unsigned int z = 0; z < slicesCount; z++) { - LOG(INFO) << "Applying raytracer on slice: " << z << "/" << slices->GetSliceCount(); - - const OrthancStone::CoordinateSystem3D& slice = slices->GetSlice(z); + LOG(INFO) << "Applying raytracer on slice: " << z << "/" << slicesCount; + + OrthancStone::CoordinateSystem3D slice = geometry.GetProjectionSlice(projection, z); OrthancStone::ImageBuffer3D::SliceReader sliceReader(source, projection, static_cast<unsigned int>(z)); SourceReader pixelReader(sliceReader.GetAccessor());