Hello everyone,
I wanted to create a small application to simulate a geometry for a
tomosynthesis acquisition scanner whose source displacement is along the
x axis only.
I created a rtksimulatedtomogeometry directory in the rtk/applications
folder made a few changes to rtksimulatedgeometry.
I added the corresponding line in the CMakeList.txt in the
rtk/applications folder.
When I recompile RTK, I get the following error message:
/rtksimulatedtomogeometry.cxx:19:42: fatal error:
rtksimulatedtomogeometry_ggo.h: No such file or directory
Indeed, this file does not exist but I could not find any rtkXXX_ggo.h
in my sources folder.
Could someone please tell me what I missed ?
I attached the three files I modified if it can be of any help. If I can
make it work, I would be happy to share it with the rest of the RTK
community.
Thank you for your help,
Kindest regards,
Vincent
WRAP_GGO(rtksimulatedtomogeometry_GGO_C rtksimulatedtomogeometry.ggo
${RTK_BINARY_DIR}/rtkVersion.ggo)
add_executable(rtksimulatedtomogeometry rtksimulatedtomogeometry.cxx
${rtksimulatedgeometry_GGO_C})
target_link_libraries(rtksimulatedtomogeometry RTK)
#Installation code
if(NOT RTK_INSTALL_NO_EXECUTABLES)
foreach(EXE_NAME rtksimulatedtomogeometry)
install(TARGETS ${EXE_NAME}
RUNTIME DESTINATION ${RTK_INSTALL_RUNTIME_DIR} COMPONENT Runtime
LIBRARY DESTINATION ${RTK_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${RTK_INSTALL_ARCHIVE_DIR} COMPONENT Development)
endforeach()
endif()
/*=========================================================================
*
* Copyright RTK Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#include "rtksimulatedtomogeometry_ggo.h"
#include "rtkGgoFunctions.h"
#include "rtkThreeDCircularProjectionGeometryXMLFile.h"
int main(int argc, char * argv[])
{
GGO(rtksimulatedtomogeometry, args_info);
// RTK geometry object
typedef rtk::ThreeDCircularProjectionGeometry GeometryType;
GeometryType::Pointer geometry = GeometryType::New();
// Projection matrices
for(int noProj=0; noProj<args_info.nproj_arg; noProj++)
{
double posX = args_info.first_posX_arg + noProj * args_info.deltaX_arg / args_info.nproj_arg;
geometry->AddProjection(args_info.sid_arg,
args_info.sdd_arg,
args_info.first_angle,
args_info.proj_iso_x_arg,
args_info.proj_iso_y_arg,
args_info.out_angle_arg,
args_info.in_angle_arg,
posX,
args_info.source_y_arg);
}
// Set cylindrical detector radius
if (args_info.rad_cyl_given)
geometry->SetRadiusCylindricalDetector(args_info.rad_cyl_arg);
// Write
rtk::ThreeDCircularProjectionGeometryXMLFileWriter::Pointer xmlWriter =
rtk::ThreeDCircularProjectionGeometryXMLFileWriter::New();
xmlWriter->SetFilename(args_info.output_arg);
xmlWriter->SetObject(&(*geometry) );
TRY_AND_EXIT_ON_ITK_EXCEPTION( xmlWriter->WriteFile() )
return EXIT_SUCCESS;
}
package "rtksimulatedgeometry"
purpose "Creates an RTK geometry file from simulated/regular trajectory."
option "verbose" v "Verbose execution"
flag off
option "config" - "Config file"
string no
option "output" o "Output file name"
string yes
option "first_angle" f "First angle in degrees"
double no default="0"
option "nproj" n "Number of projections"
int yes
option "arc" a "Angular arc covevered by the acquisition in degrees"
double no default="360"
option "sdd" - "Source to detector distance (mm)"
double no default="1536"
option "sid" - "Source to isocenter distance (mm)"
double no default="1000"
option "proj_iso_x" - "X coordinate on the projection image of isocenter"
double no default="0"
option "proj_iso_y" - "Y coordinate on the projection image of isocenter"
double no default="0"
option "firstPosX" - "In-place x source position wrt to central ray"
double no default="0"
option "deltaX" - "Length of the tomo linear trajectory"
double no default="1"
option "source_y" - "In-place y source position wrt to central ray"
double no default="0"
option "out_angle" - "Out of plane angle"
double no default="0"
option "in_angle" - "In plane angle"
double no default="0"
option "rad_cyl" - "Radius cylinder of cylindrical detector"
double no default="0"
_______________________________________________
Rtk-users mailing list
[email protected]
https://public.kitware.com/mailman/listinfo/rtk-users