<div dir="ltr"><div>Hi Howard,</div><div>Since it's a linking problem, maybe you should check that you have linked the RTK_libraries, see e.g.,</div><div><a href="https://github.com/SimonRit/RTK/blob/master/examples/FirstReconstruction/CMakeLists.txt#L12">https://github.com/SimonRit/RTK/blob/master/examples/FirstReconstruction/CMakeLists.txt#L12</a></div><div>I can try to fix the problem if you provide a full example.<br></div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 24, 2019 at 9:45 PM Howard <<a href="mailto:lomahu@gmail.com">lomahu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I was trying to play with the simple example to reconstruct a sphere<br>
from the RTK wiki page. The sample code:<br>
<br>
 // Projection matrices<br>
  unsigned int numberOfProjections = 360;<br>
  unsigned int firstAngle = 0;<br>
  unsigned int angularArc = 360;<br>
  unsigned int sid =  80; // source to isocenter distance in mm<br>
  unsigned int sdd = 160; // source to detector distance in mm<br>
  int isox = 0; // X coordinate on the projection image of isocenter<br>
  int isoy = 0; // Y coordinate on the projection image of isocenter<br>
<br>
<br>
  for(unsigned int noProj=0; noProj<numberOfProjections; noProj++) {<br>
      double angle = (float)firstAngle + (float)noProj * angularArc /<br>
(float)numberOfProjections;<br>
      geometry->AddProjection(sid, sdd, angle, isox, isoy);<br>
  }<br>
<br>
<br>
When I compiled the code, I got an error from the line in the projection loop:<br>
<br>
geometry->AddProjection(sid, sdd, angle, isox, isoy);<br>
<br>
I am using an old version of RTK 1.1 but it should not matter. Can<br>
anyone help me out? Thanks!<br>
<br>
[chaom02@minerva2 recon]$ make<br>
Scanning dependencies of target Test1<br>
[ 50%] Building CXX object CMakeFiles/Test1.dir/Test1.cxx.o<br>
[100%] Linking CXX executable Test1<br>
/sc/orga/work/chaom02/usr/local/RTK/RTK-bin/bin/libRTK.a(rtkThreeDCircularProjectionGeometry.cxx.o):<br>
In function `itk::MatrixOffsetTransformBase<double, 3u,<br>
3u>::GetFixedParameters() const':<br>
rtkThreeDCircularProjectionGeometry.cxx:(.text._ZNK3itk25MatrixOffsetTransformBaseIdLj3ELj3EE18GetFixedParametersEv[_ZNK3itk25MatrixOffsetTransformBaseIdLj3ELj3EE18GetFixedParametersEv]+0x23):<br>
undefined reference to `vnl_vector<double>::set_size(unsigned int)'<br>
/sc/orga/work/chaom02/usr/local/RTK/RTK-bin/bin/libRTK.a(rtkThreeDCircularProjectionGeometry.cxx.o):<br>
In function `itk::MatrixOffsetTransformBase<double, 3u,<br>
3u>::SetFixedParameters(itk::OptimizerParameters<double> const&)':<br>
rtkThreeDCircularProjectionGeometry.cxx:(.text._ZN3itk25MatrixOffsetTransformBaseIdLj3ELj3EE18SetFixedParametersERKNS_19OptimizerParametersIdEE[_ZN3itk25MatrixOffsetTransformBaseIdLj3ELj3EE18SetFixedParametersERKNS_19OptimizerParametersIdEE]+0x4f):<br>
undefined reference to `vnl_vector<double>::set_size(unsigned int)'<br>
/sc/orga/work/chaom02/usr/local/RTK/RTK-bin/bin/libRTK.a(rtkThreeDCircularProjectionGeometry.cxx.o):<br>
In function `itk::CenteredEuler3DTransform<double>::SetParameters(itk::OptimizerParameters<double><br>
const&)':<br>
rtkThreeDCircularProjectionGeometry.cxx:(.text._ZN3itk24CenteredEuler3DTransformIdE13SetParametersERKNS_19OptimizerParametersIdEE[_ZN3itk24CenteredEuler3DTransformIdE13SetParametersERKNS_19OptimizerParametersIdEE]+0x31):<br>
undefined reference to `vnl_vector<double>::set_size(unsigned int)'<br>
/sc/orga/work/chaom02/usr/local/RTK/RTK-bin/bin/libRTK.a(rtkThreeDCircularProjectionGeometry.cxx.o):<br>
In function `itk::Euler3DTransform<double>::SetParameters(itk::OptimizerParameters<double><br>
const&)':<br>
rtkThreeDCircularProjectionGeometry.cxx:(.text._ZN3itk16Euler3DTransformIdE13SetParametersERKNS_19OptimizerParametersIdEE[_ZN3itk16Euler3DTransformIdE13SetParametersERKNS_19OptimizerParametersIdEE]+0x40):<br>
undefined reference to `vnl_vector<double>::set_size(unsigned int)'<br>
/sc/orga/work/chaom02/usr/local/RTK/RTK-bin/bin/libRTK.a(rtkThreeDCircularProjectionGeometry.cxx.o):<br>
In function `itk::Transform<double, 3u, 3u>::Transform(unsigned<br>
long)':<br>
rtkThreeDCircularProjectionGeometry.cxx:(.text._ZN3itk9TransformIdLj3ELj3EEC2Em[_ZN3itk9TransformIdLj3ELj3EEC5Em]+0x49):<br>
undefined reference to `vnl_vector<double>::vnl_vector(unsigned int)'<br>
rtkThreeDCircularProjectionGeometry.cxx:(.text._ZN3itk9TransformIdLj3ELj3EEC2Em[_ZN3itk9TransformIdLj3ELj3EEC5Em]+0xa3):<br>
undefined reference to `vnl_vector<double>::vnl_vector(unsigned int)'<br>
/sc/orga/work/chaom02/usr/local/RTK/RTK-bin/bin/libRTK.a(rtkThreeDCircularProjectionGeometry.cxx.o):<br>
In function `itk::MatrixOffsetTransformBase<double, 3u,<br>
3u>::MatrixOffsetTransformBase()':<br>
rtkThreeDCircularProjectionGeometry.cxx:(.text._ZN3itk25MatrixOffsetTransformBaseIdLj3ELj3EEC2Ev[_ZN3itk25MatrixOffsetTransformBaseIdLj3ELj3EEC5Ev]+0x21b):<br>
undefined reference to `vnl_vector<double>::set_size(unsigned int)'<br>
/sc/orga/work/chaom02/usr/local/RTK/RTK-bin/bin/libRTK.a(rtkThreeDCircularProjectionGeometry.cxx.o):<br>
In function `itk::Rigid3DTransform<double>::SetParameters(itk::OptimizerParameters<double><br>
const&)':<br>
rtkThreeDCircularProjectionGeometry.cxx:(.text._ZN3itk16Rigid3DTransformIdE13SetParametersERKNS_19OptimizerParametersIdEE[_ZN3itk16Rigid3DTransformIdE13SetParametersERKNS_19OptimizerParametersIdEE]+0x3e):<br>
undefined reference to `vnl_vector<double>::set_size(unsigned int)'<br>
/sc/orga/work/chaom02/usr/local/RTK/RTK-bin/bin/libRTK.a(rtkThreeDCircularProjectionGeometry.cxx.o):<br>
In function `itk::MatrixOffsetTransformBase<double, 3u,<br>
3u>::SetParameters(itk::OptimizerParameters<double> const&)':<br>
rtkThreeDCircularProjectionGeometry.cxx:(.text._ZN3itk25MatrixOffsetTransformBaseIdLj3ELj3EE13SetParametersERKNS_19OptimizerParametersIdEE[_ZN3itk25MatrixOffsetTransformBaseIdLj3ELj3EE13SetParametersERKNS_19OptimizerParametersIdEE]+0x43):<br>
undefined reference to `vnl_vector<double>::set_size(unsigned int)'<br>
/sc/orga/work/chaom02/usr/local/RTK/RTK-bin/bin/libRTK.a(rtkThreeDCircularProjectionGeometry.cxx.o):<br>
In function `itk::MatrixOffsetTransformBase<double, 3u,<br>
3u>::TransformVector(itk::VariableLengthVector<double> const&) const':<br>
rtkThreeDCircularProjectionGeometry.cxx:(.text._ZNK3itk25MatrixOffsetTransformBaseIdLj3ELj3EE15TransformVectorERKNS_20VariableLengthVectorIdEE[_ZNK3itk25MatrixOffsetTransformBaseIdLj3ELj3EE15TransformVectorERKNS_20VariableLengthVectorIdEE]+0x2f):<br>
undefined reference to `vnl_vector<double>::vnl_vector(unsigned int)'<br>
/sc/orga/work/chaom02/usr/local/RTK/RTK-bin/bin/libRTK.a(rtkThreeDCircularProjectionGeometry.cxx.o):<br>
In function `itk::MatrixOffsetTransformBase<double, 3u,<br>
3u>::TransformCovariantVector(itk::VariableLengthVector<double><br>
const&) const':<br>
rtkThreeDCircularProjectionGeometry.cxx:(.text._ZNK3itk25MatrixOffsetTransformBaseIdLj3ELj3EE24TransformCovariantVectorERKNS_20VariableLengthVectorIdEE[_ZNK3itk25MatrixOffsetTransformBaseIdLj3ELj3EE24TransformCovariantVectorERKNS_20VariableLengthVectorIdEE]+0x3a):<br>
undefined reference to `vnl_vector<double>::vnl_vector(unsigned int)'<br>
collect2: error: ld returned 1 exit status<br>
make[2]: *** [Test1] Error 1<br>
make[1]: *** [CMakeFiles/Test1.dir/all] Error 2<br>
make: *** [all] Error 2<br>
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a><br>
</blockquote></div>