Loading isis/IsisPreferences +22 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,28 @@ Group = ErrorFacility StackTrace = Off EndGroup ######################################################## # Specify which ray-tracing engine to use for shape # models. # # Leave the ShapeModel Group commented-out to continue # using the ISIS3 default. # # RayTraceEngine = Bullet | Embree # OnError = Continue | Fail # Tolerance = { numerical value that will be set as the # tolerance for the Bullet or Embree shape # model } # ######################################################## #Group = ShapeModel # RayTraceEngine = Embree # OnError = Continue # CubeSupported = False # Tolerance = DBL_MAX #EndGroup ######################################################## # Customize how session logging is handled # Loading isis/src/base/apps/spiceinit/spiceinit.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -379,10 +379,6 @@ bool tryKernels(Cube *icube, Process &p, currentKernels.deleteKeyword("OnError"); } if (currentKernels.hasKeyword("CubeSupported")) { currentKernels.deleteKeyword("CubeSupported"); } if (currentKernels.hasKeyword("Tolerance")) { currentKernels.deleteKeyword("Tolerance"); } Loading isis/src/base/apps/spiceinit/spiceinit.xml +10 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,12 @@ Please note: Kernel Files specified that reside in the current working directory will not have their paths expanded. This is to allow variables like $msg/ to work correctly. </p> <p> The spiceinit program will also add the RayTraceEngine, OnError, and Tolerance keywords to the Kernels group if specified in the IsisPreferences file. If included, these keywords specify the ray-tracing engine to use and how to use it for shapemodels. Please see the IsisPreferences file for more details. </p> <p><b>Troubleshooting:</b> If spiceinit is failing with the error "No Camera Kernel found for the image ..." then try enabling the "CKPREDICTED" or "CKNADIR" option. A similar error exists for SPK kernels, Loading Loading @@ -276,6 +282,10 @@ group. Like other keywords in the kernels group, if they are present at the beginning of a spiceinit run (if we are re-spiceiniting) they are removed. </change> <change name="Kristin Berry" date="2017-08-06"> Updated spiceinit to remove code dealing with the CubeSupported Pvl Keyword, from the ShapeModel group in the IsisPreferences file, which has been removed. </change> </history> <oldName> Loading isis/src/base/objs/ShapeModelFactory/ShapeModelFactory.cpp +5 −11 Original line number Diff line number Diff line Loading @@ -162,7 +162,6 @@ namespace Isis { QString preferred = parameters.get("RayTraceEngine", "None").toLower(); QString onerror = parameters.get("OnError", "Continue").toLower(); bool cubeSupported = toBool(parameters.get("CubeSupported", "False")); double tolerance = toDouble(parameters.get("Tolerance", toString(DBL_MAX))); // A file error message will be appened to the finalError, if no shape model is constructed. Loading @@ -175,14 +174,14 @@ namespace Isis { // Check to see of ISIS cube DEMs get a pass FileName v_shapefile(shapeModelFilenames); QString ext = v_shapefile.extension().toLower(); bool cubeErrorContinue = ( ("cub" == ext) && (!cubeSupported) ); // Cubes are not supported at this time. try { BulletTargetShape *bullet = BulletTargetShape::load(shapeModelFilenames); if ( 0 == bullet ) { // Bullet failed to load the kernel...test failure conditions if ( ("cub" == ext) && cubeSupported ) { if ("cub" == ext) { onerror = "fail"; // This is fatal no matter the condition QString mess = "Bullet could not initialize ISIS Cube DEM"; throw IException(IException::Unknown, mess, _FILEINFO_); Loading @@ -201,8 +200,6 @@ namespace Isis { // Do this here, otherwise default behavior will ensue from here on out kernelsPvlGroup.addKeyword(PvlKeyword("RayTraceEngine", preferred), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("OnError", onerror), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("CubeSupported", toString(cubeSupported)), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("Tolerance", toString(tolerance)), PvlContainer::Replace); Loading @@ -212,7 +209,7 @@ namespace Isis { fileError.append(ie); QString mess = "Unable to create preferred BulletShapeModel"; fileError.append(IException(IException::Unknown, mess, _FILEINFO_)); if ( ("fail" == onerror) && (!cubeErrorContinue) ) throw fileError; if ("fail" == onerror) throw fileError; } // Don't have ShapeModel yet - invoke pre-exising behavior (2017-03-23) Loading @@ -224,8 +221,7 @@ namespace Isis { // Check to see of ISIS cube DEMs get a pass FileName v_shapefile(shapeModelFilenames); QString ext = v_shapefile.extension().toLower(); // TODO make an embreeCubeSupported boolean and check that instead bool cubeErrorContinue = ( ("cub" == ext) && (!cubeSupported) ); // Cubes are not supported at this time try { Loading @@ -238,8 +234,6 @@ namespace Isis { // Do this here, otherwise default behavior will ensue from here on out kernelsPvlGroup.addKeyword(PvlKeyword("RayTraceEngine", preferred), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("OnError", onerror), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("CubeSupported", toString(cubeSupported)), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("Tolerance", toString(tolerance)), PvlContainer::Replace); Loading @@ -249,7 +243,7 @@ namespace Isis { fileError.append(ie); QString mess = "Unable to create preferred EmbreeShapeModel"; fileError.append(IException(IException::Unknown, mess, _FILEINFO_)); if ( ("fail" == onerror) && (!cubeErrorContinue) ) throw fileError; if ("fail" == onerror) throw fileError; } } Loading isis/src/base/objs/ShapeModelFactory/ShapeModelFactory.h +3 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ namespace Isis { * @history 2017-06-08 Makayla Shepherd - Added a cube pointer deletion to fix a memory leak. * Fixes #4890. * @history 2017-03-23 Kris Becker - Added support for Embree and Bullet models. * @history 2017-08-04 Kristin Berry - Removed checks for a 'CubeSupported' IsisPreferences Pvl * Keyword. ISIS3 Cube DEMs are not supported by Embree and Bullet * at this time. */ class ShapeModelFactory { public: Loading Loading
isis/IsisPreferences +22 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,28 @@ Group = ErrorFacility StackTrace = Off EndGroup ######################################################## # Specify which ray-tracing engine to use for shape # models. # # Leave the ShapeModel Group commented-out to continue # using the ISIS3 default. # # RayTraceEngine = Bullet | Embree # OnError = Continue | Fail # Tolerance = { numerical value that will be set as the # tolerance for the Bullet or Embree shape # model } # ######################################################## #Group = ShapeModel # RayTraceEngine = Embree # OnError = Continue # CubeSupported = False # Tolerance = DBL_MAX #EndGroup ######################################################## # Customize how session logging is handled # Loading
isis/src/base/apps/spiceinit/spiceinit.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -379,10 +379,6 @@ bool tryKernels(Cube *icube, Process &p, currentKernels.deleteKeyword("OnError"); } if (currentKernels.hasKeyword("CubeSupported")) { currentKernels.deleteKeyword("CubeSupported"); } if (currentKernels.hasKeyword("Tolerance")) { currentKernels.deleteKeyword("Tolerance"); } Loading
isis/src/base/apps/spiceinit/spiceinit.xml +10 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,12 @@ Please note: Kernel Files specified that reside in the current working directory will not have their paths expanded. This is to allow variables like $msg/ to work correctly. </p> <p> The spiceinit program will also add the RayTraceEngine, OnError, and Tolerance keywords to the Kernels group if specified in the IsisPreferences file. If included, these keywords specify the ray-tracing engine to use and how to use it for shapemodels. Please see the IsisPreferences file for more details. </p> <p><b>Troubleshooting:</b> If spiceinit is failing with the error "No Camera Kernel found for the image ..." then try enabling the "CKPREDICTED" or "CKNADIR" option. A similar error exists for SPK kernels, Loading Loading @@ -276,6 +282,10 @@ group. Like other keywords in the kernels group, if they are present at the beginning of a spiceinit run (if we are re-spiceiniting) they are removed. </change> <change name="Kristin Berry" date="2017-08-06"> Updated spiceinit to remove code dealing with the CubeSupported Pvl Keyword, from the ShapeModel group in the IsisPreferences file, which has been removed. </change> </history> <oldName> Loading
isis/src/base/objs/ShapeModelFactory/ShapeModelFactory.cpp +5 −11 Original line number Diff line number Diff line Loading @@ -162,7 +162,6 @@ namespace Isis { QString preferred = parameters.get("RayTraceEngine", "None").toLower(); QString onerror = parameters.get("OnError", "Continue").toLower(); bool cubeSupported = toBool(parameters.get("CubeSupported", "False")); double tolerance = toDouble(parameters.get("Tolerance", toString(DBL_MAX))); // A file error message will be appened to the finalError, if no shape model is constructed. Loading @@ -175,14 +174,14 @@ namespace Isis { // Check to see of ISIS cube DEMs get a pass FileName v_shapefile(shapeModelFilenames); QString ext = v_shapefile.extension().toLower(); bool cubeErrorContinue = ( ("cub" == ext) && (!cubeSupported) ); // Cubes are not supported at this time. try { BulletTargetShape *bullet = BulletTargetShape::load(shapeModelFilenames); if ( 0 == bullet ) { // Bullet failed to load the kernel...test failure conditions if ( ("cub" == ext) && cubeSupported ) { if ("cub" == ext) { onerror = "fail"; // This is fatal no matter the condition QString mess = "Bullet could not initialize ISIS Cube DEM"; throw IException(IException::Unknown, mess, _FILEINFO_); Loading @@ -201,8 +200,6 @@ namespace Isis { // Do this here, otherwise default behavior will ensue from here on out kernelsPvlGroup.addKeyword(PvlKeyword("RayTraceEngine", preferred), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("OnError", onerror), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("CubeSupported", toString(cubeSupported)), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("Tolerance", toString(tolerance)), PvlContainer::Replace); Loading @@ -212,7 +209,7 @@ namespace Isis { fileError.append(ie); QString mess = "Unable to create preferred BulletShapeModel"; fileError.append(IException(IException::Unknown, mess, _FILEINFO_)); if ( ("fail" == onerror) && (!cubeErrorContinue) ) throw fileError; if ("fail" == onerror) throw fileError; } // Don't have ShapeModel yet - invoke pre-exising behavior (2017-03-23) Loading @@ -224,8 +221,7 @@ namespace Isis { // Check to see of ISIS cube DEMs get a pass FileName v_shapefile(shapeModelFilenames); QString ext = v_shapefile.extension().toLower(); // TODO make an embreeCubeSupported boolean and check that instead bool cubeErrorContinue = ( ("cub" == ext) && (!cubeSupported) ); // Cubes are not supported at this time try { Loading @@ -238,8 +234,6 @@ namespace Isis { // Do this here, otherwise default behavior will ensue from here on out kernelsPvlGroup.addKeyword(PvlKeyword("RayTraceEngine", preferred), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("OnError", onerror), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("CubeSupported", toString(cubeSupported)), PvlContainer::Replace); kernelsPvlGroup.addKeyword(PvlKeyword("Tolerance", toString(tolerance)), PvlContainer::Replace); Loading @@ -249,7 +243,7 @@ namespace Isis { fileError.append(ie); QString mess = "Unable to create preferred EmbreeShapeModel"; fileError.append(IException(IException::Unknown, mess, _FILEINFO_)); if ( ("fail" == onerror) && (!cubeErrorContinue) ) throw fileError; if ("fail" == onerror) throw fileError; } } Loading
isis/src/base/objs/ShapeModelFactory/ShapeModelFactory.h +3 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ namespace Isis { * @history 2017-06-08 Makayla Shepherd - Added a cube pointer deletion to fix a memory leak. * Fixes #4890. * @history 2017-03-23 Kris Becker - Added support for Embree and Bullet models. * @history 2017-08-04 Kristin Berry - Removed checks for a 'CubeSupported' IsisPreferences Pvl * Keyword. ISIS3 Cube DEMs are not supported by Embree and Bullet * at this time. */ class ShapeModelFactory { public: Loading