[Rtk-users] rtkThreeDCircularProjectionGeometry cannot be cloned
Fredrik Hellman
fredrik.hellman at gmail.com
Wed Oct 25 08:15:33 EDT 2017
Hi,
I would like to clone a geometry object, but it does not seem to be
possible. Is this the expected behaviour or a bug?
The code below prints
1
0
i.e. the two geometry objects (seemingly clones) have different number of
projections.
Code:
#include <rtkThreeDCircularProjectionGeometry.h>
#include <iostream>
int main(int argc, char *argv[])
{
rtk::ThreeDCircularProjectionGeometry::Pointer geometry =
rtk::ThreeDCircularProjectionGeometry::New();
double sourceToIsocenterDistance = 1;
double sourceToDetectorDistance = 1;
double gantryAngleInDegrees = 0;
geometry->AddProjection(sourceToIsocenterDistance,
sourceToDetectorDistance,
gantryAngleInDegrees);
rtk::ThreeDCircularProjectionGeometry::Pointer geometryClone =
geometry->Clone();
std::cout << geometry->GetGantryAngles().size() << std::endl;
std::cout << geometryClone->GetGantryAngles().size() << std::endl;
return 0;
}
Best regards,
Fredrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20171025/61ab7a10/attachment.html>
More information about the Rtk-users
mailing list