Commit 143c65c5 authored by Kaj Williams's avatar Kaj Williams
Browse files

Fixed typo error in example. Minor reformatting for standards compliance. Ref#2261

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7574 41f8697f-d340-4b68-9986-7bafba869bb8
parent 3528430b
Loading
Loading
Loading
Loading
+7 −23
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ namespace Isis {
    return Process::SetInputCube(parameter, allRequirements);
  }


  /**
   * Opens an input cube file specified by the user with cube attributes and
   * requirements. For more information see Process::SetInputCube
@@ -93,13 +94,11 @@ namespace Isis {
   *
   * @param inCube - Pointer to input Cube
   */
  void ProcessByLine::SetInputCube(Isis::Cube *inCube)
  {
  void ProcessByLine::SetInputCube(Isis::Cube *inCube) {
    Process::SetInputCube(inCube);
  }



  void ProcessByLine::SetBricks(IOCubes cn) {

      switch(cn){
@@ -116,7 +115,6 @@ namespace Isis {

          break;


        case InputOutput:

          SetInputBrickSize(InputCubes[0]->sampleCount(), 1, 1);
@@ -124,7 +122,6 @@ namespace Isis {

          break;


        case InputOutputList:

          for (unsigned int i = 0; i < InputCubes.size(); i++) {
@@ -134,14 +131,8 @@ namespace Isis {
            SetOutputBrickSize(OutputCubes[i]->sampleCount(), 1, 1, i + 1);
          }


          break;


      }



  }


@@ -166,15 +157,12 @@ namespace Isis {
   *                                     written.
   */
  void ProcessByLine::StartProcess(void funct(Isis::Buffer &inout)) {


    VerifyCubes(InPlace);
    SetBricks(InPlace);    
    ProcessByBrick::StartProcess(funct);
  }



  /**
   * This method invokes the process by line operation over exactly one input
   * and one output cube. Typically, this method is used for simple operations
@@ -188,15 +176,12 @@ namespace Isis {
   * @throws Isis::IException::Message
   */
  void ProcessByLine::StartProcess(void funct(Isis::Buffer &in, Isis::Buffer &out)) {

      VerifyCubes(InputOutput);
      SetBricks(InputOutput);
      ProcessByBrick::StartProcess(funct);
  }




  /**
   * This method invokes the process by line operation over multiple input and
   * output cubes. Typically, this method is used when two input cubes are
@@ -210,7 +195,6 @@ namespace Isis {
   */
  void ProcessByLine::StartProcess(void funct(std::vector<Isis::Buffer *> &in,
                  std::vector<Isis::Buffer *> &out)) {

      VerifyCubes(InputOutputList);
      SetBricks(InputOutputList);    
      ProcessByBrick::StartProcess(funct);
+19 −18
Original line number Diff line number Diff line
@@ -45,8 +45,8 @@ namespace Isis {
   *  #include "SpecialPixel.h"
   *  void mirror (Buffer &in, Buffer &out);
   *  void IsisMain() {
   *    // We will be processing by line ProcessByLine p;
   *    // Setup the input and output cubes
   *    // We will be processing by line
   *    ProcessByLine p; // Setup the input and output cubes
   *    p.SetInputCube("FROM");
   *    p.SetOutputCube ("TO");
   *    // Start the processing
@@ -93,12 +93,22 @@ namespace Isis {
   *                           $temporary variable instead of /tmp directory.
   *                           Added some documentation to methods.
   *   @history 2015-09-25 Tyler Wilson  - Combined SetBrickSizesForProcessCube,
   *   SetBrickSizesForProcessCubeInPlace, and SetBrickSizesForProcessCubes into one
   *   function:  SetBricks(CubeNum) which takes in the enumerated date type enum
   *   as an argument  (CubeNum = {InPlace, InputOutput, InputOutputList}).  Also moved
   *   the verification of cubes out of the SetBrick functions and into
   *   ProcessByBrick:: VerifyCubes(CubeNum) in parent class.
   *
   *                           SetBrickSizesForProcessCubeInPlace,
   *                           and SetBrickSizesForProcessCubes
   *                           into one
   *                           function:SetBricks(CubeNum) which
   *                           takes in the enumerated date type
   *                           enum as an argument (CubeNum =
   *                           {InPlace, InputOutput,
   *                           InputOutputList}). Also moved the
   *                           verification of cubes out of the
   *                           SetBrick functions and into
   *                           ProcessByBrick::
   *                           VerifyCubes(CubeNum) in parent
   *                           class.
   *   @history 2017-04-13 Kaj Williams - Fixed a minor typo in
   *                           the API documentation. Fixed a few
   *                           source code formatting issues.
   */
  class ProcessByLine : public Isis::ProcessByBrick {

@@ -116,17 +126,13 @@ namespace Isis {

      void SetInputCube(Isis::Cube *inCube);


      void StartProcess(void funct(Isis::Buffer &inout));
      void StartProcess(void funct(Isis::Buffer &in, Isis::Buffer &out));
      void StartProcess(void
                        funct(std::vector<Isis::Buffer *> &in,
                              std::vector<Isis::Buffer *> &out));


      void SetBricks(IOCubes cn);
      //void VerifyCubes(IOCubes cn);

      
      /**
       * Same functionality as StartProcess(void funct(Isis::Buffer &inout))
@@ -138,17 +144,14 @@ namespace Isis {
       * @param funct - Functor with overloaded operator()(Isis::Buffer &)
       * @param threaded @see ProcessByBrick::ProcessCubeInPlace()
       */

      template <typename Functor>
      void ProcessCubeInPlace(const Functor & funct, bool threaded = true) {

        VerifyCubes(InPlace);
        SetBricks(InPlace);
        ProcessByBrick::ProcessCubeInPlace(funct, threaded);
      }



      /**
       * Same functionality as
       * StartProcess(void funct(Isis::Buffer &in, Isis::Buffer &out)) using
@@ -163,7 +166,6 @@ namespace Isis {
       */
      template <typename Functor>
      void ProcessCube(const Functor & funct, bool threaded = true) {

        VerifyCubes(InputOutput);
        SetBricks(InputOutput);
        ProcessByBrick::ProcessCube(funct, threaded);
@@ -185,7 +187,6 @@ namespace Isis {
       */
      template <typename Functor>
      void ProcessCubes(const Functor & funct, bool threaded = true) {

        VerifyCubes(InputOutputList);
        SetBricks(InputOutputList);
        ProcessByBrick::ProcessCubes(funct, threaded);