comparison Framework/Volumes/VolumeReslicer.cpp @ 783:cd13a062c9bd

DicomVolumeImage
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 27 May 2019 15:54:53 +0200
parents fa5febe0f0c2
children a7351ad54960
comparison
equal deleted inserted replaced
782:b24c208fa953 783:cd13a062c9bd
777 const VolumeImageGeometry& geometry, 777 const VolumeImageGeometry& geometry,
778 const CoordinateSystem3D& plane, 778 const CoordinateSystem3D& plane,
779 double voxelSize) 779 double voxelSize)
780 { 780 {
781 Reset(); 781 Reset();
782 pixelSpacing_ = voxelSize;
782 783
783 // Firstly, compute the intersection of the source volumetric 784 // Firstly, compute the intersection of the source volumetric
784 // image with the reslicing plane. This leads to a polygon with 3 785 // image with the reslicing plane. This leads to a polygon with 3
785 // to 6 vertices. We compute the extent of the intersection 786 // to 6 vertices. We compute the extent of the intersection
786 // polygon, with respect to the coordinate system of the reslicing 787 // polygon, with respect to the coordinate system of the reslicing
815 interpolation_, hasLinearFunction_, scaling_, offset_); 816 interpolation_, hasLinearFunction_, scaling_, offset_);
816 } 817 }
817 818
818 success_ = true; 819 success_ = true;
819 } 820 }
821
822
823 double VolumeReslicer::GetPixelSpacing() const
824 {
825 if (success_)
826 {
827 return pixelSpacing_;
828 }
829 else
830 {
831 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
832 }
833 }
820 } 834 }