Loading isis/src/qisis/objs/AdvancedTrackTool/AdvancedTrackTool.cpp +26 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ namespace Isis { // For mosaic tracking #define FLOAT_MIN -16777215 #define TABLE_MOSAIC_SRC "InputImages" /** * Constructs an AdvancedTrackTool object Loading Loading @@ -139,6 +138,7 @@ namespace Isis { installEventFilter(p_tableWin); m_showHelpOnStart = true; m_tableMosaicSrc = "InputImages"; readSettings(); } Loading Loading @@ -569,7 +569,30 @@ namespace Isis { Cube *cCube = cvp->cube(); int iTrackBand = -1; if(cCube->hasTable(TABLE_MOSAIC_SRC)) { if(cCube->hasGroup("Tracking")) { PvlGroup trackingGroup = cCube->group("Tracking"); trackingGroup.findKeyword("FileName")[0]; FileName trackingCubeFileName(trackingGroup.findKeyword("FileName")[0]); Cube trackingCube(trackingCubeFileName); // Read the cube DN value from TRACKING cube at location (piLine, piSample) Portal trackingPortal(trackingCube.sampleCount(), 1, trackingCube.pixelType()); trackingPortal.SetPosition(piSample, piLine, 1); trackingCube.read(trackingPortal); // FIXME: will need to be changed for whatever base + index DN value we end up using. int trackingTableIndex = (unsigned int)trackingPortal[0]; // Get the input file name and serial number Table trackingTable(m_tableMosaicSrc); trackingCube.read(trackingTable); int numRecs = trackingTable.Records(); if(trackingTableIndex >= 0 && trackingTableIndex < numRecs) { psSrcFileName = QString(trackingTable[trackingTableIndex][0]); psSrcSerialNum = QString(trackingTable[trackingTableIndex][1]); } } // Backwards compatability. Have this tool work with attached TRACKING bands else if(cCube->hasTable(m_tableMosaicSrc)) { Pvl *cPvl = cCube->label(); PvlObject cObjIsisCube = cPvl->findObject("IsisCube"); PvlGroup cGrpBandBin = cObjIsisCube.findGroup("BandBin"); Loading Loading @@ -604,7 +627,7 @@ namespace Isis { } // Get the input file name and serial number Table cFileTable(TABLE_MOSAIC_SRC); Table cFileTable(m_tableMosaicSrc); cCube->read(cFileTable); int iRecs = cFileTable.Records(); if(piOrigin >= 0 && piOrigin < iRecs) { Loading isis/src/qisis/objs/AdvancedTrackTool/AdvancedTrackTool.h +3 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,8 @@ namespace Isis { * before it attempts to record a point so that a table is created * to record the point into so that the first recorded point is drawn. * Fixes #5143. * @history 2018-07-18 Kristin Berry and Kaitlyn Lee - Updated TrackMosaicOrigin to work with * an external tracking band. */ class AdvancedTrackTool : public Tool { Q_OBJECT Loading Loading @@ -181,6 +183,7 @@ namespace Isis { int p_id; //!< The record id TableMainWindow *p_tableWin; //!< The table window bool m_showHelpOnStart; //!< True to show dialog When tool is started QString m_tableMosaicSrc; //! < Stores the name of the mosaic table }; Loading Loading
isis/src/qisis/objs/AdvancedTrackTool/AdvancedTrackTool.cpp +26 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ namespace Isis { // For mosaic tracking #define FLOAT_MIN -16777215 #define TABLE_MOSAIC_SRC "InputImages" /** * Constructs an AdvancedTrackTool object Loading Loading @@ -139,6 +138,7 @@ namespace Isis { installEventFilter(p_tableWin); m_showHelpOnStart = true; m_tableMosaicSrc = "InputImages"; readSettings(); } Loading Loading @@ -569,7 +569,30 @@ namespace Isis { Cube *cCube = cvp->cube(); int iTrackBand = -1; if(cCube->hasTable(TABLE_MOSAIC_SRC)) { if(cCube->hasGroup("Tracking")) { PvlGroup trackingGroup = cCube->group("Tracking"); trackingGroup.findKeyword("FileName")[0]; FileName trackingCubeFileName(trackingGroup.findKeyword("FileName")[0]); Cube trackingCube(trackingCubeFileName); // Read the cube DN value from TRACKING cube at location (piLine, piSample) Portal trackingPortal(trackingCube.sampleCount(), 1, trackingCube.pixelType()); trackingPortal.SetPosition(piSample, piLine, 1); trackingCube.read(trackingPortal); // FIXME: will need to be changed for whatever base + index DN value we end up using. int trackingTableIndex = (unsigned int)trackingPortal[0]; // Get the input file name and serial number Table trackingTable(m_tableMosaicSrc); trackingCube.read(trackingTable); int numRecs = trackingTable.Records(); if(trackingTableIndex >= 0 && trackingTableIndex < numRecs) { psSrcFileName = QString(trackingTable[trackingTableIndex][0]); psSrcSerialNum = QString(trackingTable[trackingTableIndex][1]); } } // Backwards compatability. Have this tool work with attached TRACKING bands else if(cCube->hasTable(m_tableMosaicSrc)) { Pvl *cPvl = cCube->label(); PvlObject cObjIsisCube = cPvl->findObject("IsisCube"); PvlGroup cGrpBandBin = cObjIsisCube.findGroup("BandBin"); Loading Loading @@ -604,7 +627,7 @@ namespace Isis { } // Get the input file name and serial number Table cFileTable(TABLE_MOSAIC_SRC); Table cFileTable(m_tableMosaicSrc); cCube->read(cFileTable); int iRecs = cFileTable.Records(); if(piOrigin >= 0 && piOrigin < iRecs) { Loading
isis/src/qisis/objs/AdvancedTrackTool/AdvancedTrackTool.h +3 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,8 @@ namespace Isis { * before it attempts to record a point so that a table is created * to record the point into so that the first recorded point is drawn. * Fixes #5143. * @history 2018-07-18 Kristin Berry and Kaitlyn Lee - Updated TrackMosaicOrigin to work with * an external tracking band. */ class AdvancedTrackTool : public Tool { Q_OBJECT Loading Loading @@ -181,6 +183,7 @@ namespace Isis { int p_id; //!< The record id TableMainWindow *p_tableWin; //!< The table window bool m_showHelpOnStart; //!< True to show dialog When tool is started QString m_tableMosaicSrc; //! < Stores the name of the mosaic table }; Loading