Commit 93ca9bb5 authored by Kristin Berry's avatar Kristin Berry
Browse files

Added documentation for the new IsisPreferences options to specify the use of...

Added documentation for the new IsisPreferences options to specify the use of Embree/Bullet and also removed unnecessary checks for removed IsisPreferences keywords. Fixes #5184

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@8249 41f8697f-d340-4b68-9986-7bafba869bb8
parent 6b9a202d
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -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
#
+0 −4
Original line number Diff line number Diff line
@@ -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");
  }
+10 −0
Original line number Diff line number Diff line
@@ -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,
@@ -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>
+5 −11
Original line number Diff line number Diff line
@@ -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.
@@ -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_);
@@ -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);

@@ -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) 
@@ -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 {

@@ -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);

@@ -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;
        }
      }

+3 −0
Original line number Diff line number Diff line
@@ -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