Loading isis/src/base/apps/campt/campt.xml +20 −20 Original line number Diff line number Diff line Loading @@ -68,12 +68,12 @@ Group = GroundPoint <def>Sample</def> = 1.0 <def>Line</def> = 1.0 <def link="Digital Number">PixelValue</def> = 0.0607816 <def link="Right Ascension">RightAscension</def> = 65.749350916052 <def>Declination</def> = -18.390093214966 <def link="Planetocentric Latitude">PlanetocentricLatitude</def> = 34.444196777763 <def link="Planetographic Latitude">PlanetographicLatitude</def> = 34.760399604837 <def link="Positive East Longitude">PositiveEastLongitude</def> = 223.84999971299 <def link="Positive West Longitude">PositiveWestLongitude</def> = 136.15000028701 <def link="Right Ascension">RightAscension</def> = 65.749350916052 <DEGREE> <def>Declination</def> = -18.390093214966 <DEGREE> <def link="Planetocentric Latitude">PlanetocentricLatitude</def> = 34.444196777763 <DEGREE> <def link="Planetographic Latitude">PlanetographicLatitude</def> = 34.760399604837 <DEGREE> <def link="Positive East Longitude">PositiveEastLongitude</def> = 223.84999971299 <DEGREE> <def link="Positive West Longitude">PositiveWestLongitude</def> = 136.15000028701 <DEGREE> <def link="Body Fixed Coordinate">BodyFixedCoordinate</def> = (-2015.9595225544, -1936.6155808127, 1917.2574858384) <km> <def link="Local Radius">LocalRadius</def> = 3389756.4767145 <m> <def link="Sample Resolution">SampleResolution</def> = 536.05556350077 <m/pixel> Loading @@ -84,34 +84,34 @@ Group = GroundPoint <def link="Oblique Sample Resolution">ObliqueSampleResolution</def> = 605.06647637166 <m/pixel> # Spacecraft Information SpacecraftPosition = (-2025.6211429076, -2130.1417975758, 2009.318879871) <km> <def link="Spacecraft Azimuth">SpacecraftAzimuth</def> = 0.006855593033889 <def link="Spacecraft Azimuth">SpacecraftAzimuth</def> = 0.006855593033889 <DEGREE> <def link="Slant Distance">SlantDistance</def> = 214.52515878961 <km> <def link="Target Center Distance">TargetCenterDistance</def> = 3560.6189705415 <km> <def link="SubSpacecraft Latitude">SubSpacecraftLatitude</def> = 34.354896748841 <def link="SubSpacecraft Longitude">SubSpacecraftLongitude</def> = 226.44072947174 <def link="SubSpacecraft Latitude">SubSpacecraftLatitude</def> = 34.354896748841 <DEGREE> <def link="SubSpacecraft Longitude">SubSpacecraftLongitude</def> = 226.44072947174 <DEGREE> SpacecraftAltitude = 170.83335389965 <km> <def link="Off Nadir Angle">OffNadirAngle</def> = 36.149255932304 <def link="SubSpacecraft Ground Azimuth">SubSpacecraftGroundAzimuth</def> = 91.64525294858 <def link="Off Nadir Angle">OffNadirAngle</def> = 36.149255932304 <DEGREE> <def link="SubSpacecraft Ground Azimuth">SubSpacecraftGroundAzimuth</def> = 91.64525294858 <DEGREE> # Sun Information SunPosition = (-177337948.13839, 112957442.69098, -33704752.205292) <km> <def link="Sun Azimuth">SubSolarAzimuth</def> = 172.30460990873 <def link="Sun Azimuth">SubSolarAzimuth</def> = 172.30460990873 <DEGREE> SolarDistance = 1.4234246174889 <AU> <def link="SubSolar Latitude">SubSolarLatitude</def> = -9.1071705738361 <def link="SubSolar Longitude">SubSolarLongitude</def> = 147.50443340123 <def link="Subsolar Ground Azimuth">SubSolarGroundAzimuth</def> = 254.69139701227 <def link="SubSolar Latitude">SubSolarLatitude</def> = -9.1071705738361 <DEGREE> <def link="SubSolar Longitude">SubSolarLongitude</def> = 147.50443340123 <DEGREE> <def link="Subsolar Ground Azimuth">SubSolarGroundAzimuth</def> = 254.69139701227 <DEGREE> # Illumination and Other <def link="Phase Angle">Phase</def> = 120.59515694473 <def link="Incidence Angle">Incidence</def> = 84.106289446623 <def link="Emission Angle">Emission</def> = 38.288719431206 <def link="North Azimuth">NorthAzimuth</def> = 261.46910874636 <def link="Phase Angle">Phase</def> = 120.59515694473 <DEGREE> <def link="Incidence Angle">Incidence</def> = 84.106289446623 <DEGREE> <def link="Emission Angle">Emission</def> = 38.288719431206 <DEGREE> <def link="North Azimuth">NorthAzimuth</def> = 261.46910874636 <DEGREE> # Time <def link="Ephemeris Time">EphemerisTime</def> = -69382819.160519 <seconds> <def>UTC</def> = 1997-10-20T10:58:37.6570806 LocalSolarTime = 17.089704420784 <hour> <def link="Solar Longitude">SolarLongitude</def> = 201.83159041209 <def link="Solar Longitude">SolarLongitude</def> = 201.83159041209 <DEGREE> Error = NULL End_Group </pre> Loading isis/src/base/apps/photomet/photomet.xml +251 −240 Original line number Diff line number Diff line Loading @@ -1002,6 +1002,16 @@ incidence</def> and <def link="Emission Angle">emission angles</def>, respective Added cast to void on 'changePar.simplified()' function call to silience unused return value warnings on OS X </change> <change name="Curtis Rose" date="2016-11-16"> Decoupled ANGLESOURCE and USEDEM parameters. They were working incorrectly before and were tangled together a bit. They are separated now and working as expected. Anglesource DEM makes the photometric calculations based on the DEM of the image if it exists. Anglesource ELLIPSOID makes the photometric calculations based on the radius obtained from the DEM shape model. Usedem true trims the image using the photometric calculations on the radius obtained from the DEM shape model. Usedem false trims the image using the from the IAU/NAIF target body file, which is defined within the cube's kernel group as the TargetAttitudeShape. Fixes #4180. </change> </history> <category> Loading Loading @@ -3492,3 +3502,4 @@ incidence</def> and <def link="Emission Angle">emission angles</def>, respective </examples> </application> isis/src/base/apps/photomet/tsts/useDem/Makefile +3 −0 Original line number Diff line number Diff line APPNAME = photomet angleSourceDemUsedemFalse.cub.TOLERANCE = 0.0005 angleSourceDemUsedemTrue.cub.TOLERANCE = 0.0005 include $(ISISROOT)/make/isismake.tsts commands: Loading isis/src/docsys/documents/Glossary/Glossary.xml +50 −5 Original line number Diff line number Diff line Loading @@ -996,6 +996,45 @@ equator. </definition> <definition name="Look Direction"> The look direction is the direction that the instrument is pointing. In ISIS, it is represented as a mathematical unit vector. For images that have a body (i.e. not star fields), this vector is parallel to the line from the sensor to the observed point on the surface of the target. The look direction can be represented in any of several coordinate systems, including: <a href="#Body-FixedCoordinateSystem"> Body-fixed coordinate system</a>, <a href="#CameraCoordinateSystem">Camera coordinate system</a>, <a href="#J2000CoordinateSystem">J2000 coordinate system</a>. </definition> <definition name="Body-Fixed Coordinate System"> A body-fixed coordinate system is used to determine positions and directions of objects and vectors with respect to a target body. The origin is at the center of mass for the target and the axes rotate and move through space with the body. These systems are non-inertial, meaning the velocity of the origin is non-constant. Many body-fixed coordinate systems, or reference frames, are defined in NAIF PCK files. </definition> <definition name="Camera Coordinate System"> A camera coordinate system is used to determine positions and directions of objects and vectors with respect to a sensor (i.e. camera). The origin is at the center of the sensor and the axes rotate and move through space with the sensor. These systems are non-inertial, meaning the velocity of the origin is non-constant. The location of the center of a spacecraft and its instruments at a given time are defined in NAIF SPK files. Generally, one or more frames are associated with a particular instrument. </definition> <definition name="J2000 Coordinate System"> The J2000 coordinate system (also known as EME2000) is based on the earth mean equator and dynamical equinox at midnight January 1, 2000. The origin is at the solar system barycenter. This system is inertial, since it does not rotate with respect to stars and the origin is not accelerating (i.e it has a constant velocity). This coordinate system is the root reference for NAIF's SPICE files and software. </definition> </definitions> </body> Loading Loading @@ -1053,5 +1092,11 @@ Changed Brief description to "ISIS and Image Processing Terms and Definitions" and fixed misspellings. </change> <change name="Curtis Rose" date="2016-08-05"> Added definitions for Look Direction, Body-Fixed Coordinate System, Camera Coordinate System and J2000 Coordinate System. The coordinate systems are highly related to the look direction so they are also linked in that location. </change> </history> </documentation> isis/src/local/apps/camtest/camtest.cpp +119 −18 Original line number Diff line number Diff line Loading @@ -2,14 +2,14 @@ #include "ProcessByLine.h" #include "Camera.h" #include "SpecialPixel.h" #include "Pvl.h" using namespace std; using namespace Isis; // Globals and prototypes Camera *cam; void doIt(Buffer &in, Buffer &out); //void doIt(Buffer &in, Buffer &out); enum OutputType { Lat, Loading @@ -17,40 +17,140 @@ enum OutputType { Err, Samp, Line } OutputFormat; }; class CamTestFunctor { public: CamTestFunctor() {}; ~CamTestFunctor() {}; void setCamera(Camera* cam); void setOutType(OutputType outType); void setResults(Statistics* results); void operator()(Buffer &in, Buffer &out) const; private: Camera* m_cam; OutputType m_outType; Statistics* m_resultsStats; }; void IsisMain() { UserInterface &ui = Application::GetUserInterface(); ProcessByLine p; ProcessByBrick p; // Open the input cube Cube *icube = p.SetInputCube("FROM"); cam = icube->camera(); Cube *iCube = p.SetInputCube("FROM"); Camera *cam = iCube->camera(); p.SetOutputCube("TO"); // Set to process by line p.SetBrickSize(iCube->sampleCount(), 1, 1); IString format = ui.GetString("FORMAT"); OutputType outFormat = Lat; if (format == "LAT") { OutputFormat = Lat; outFormat = Lat; } else if (format == "LON") { OutputFormat = Lon; outFormat = Lon; } else if (format == "ERR") { OutputFormat = Err; outFormat = Err; } else if (format == "SAMP") { OutputFormat = Samp; outFormat = Samp; } else if (format == "LINE") { OutputFormat = Line; outFormat = Line; } // Create process functor CamTestFunctor func; func.setCamera(cam); func.setOutType(outFormat); Statistics resultsStats; func.setResults(&resultsStats); p.ProcessCube(func, false); // Collect results PvlGroup results = PvlGroup("CamTestResults"); results += PvlKeyword("FailedConversionsToLatLong", toString(resultsStats.LrsPixels())); results += PvlKeyword("FailedConversionsToSampleLine", toString(resultsStats.HrsPixels())); results += PvlKeyword("SuccessfulConversions", toString(resultsStats.ValidPixels())); if (outFormat == Err) { results += PvlKeyword("Average", toString(resultsStats.Average())); results += PvlKeyword("StandardDeviation", toString(resultsStats.StandardDeviation())); results += PvlKeyword("Minimum", toString(resultsStats.Minimum())); results += PvlKeyword("Maximum", toString(resultsStats.Maximum())); } p.StartProcess(doIt); // Log output results Application::Log(results); p.EndProcess(); } // Functor Definitions void CamTestFunctor::setCamera(Camera* cam) { m_cam = cam; } void CamTestFunctor::setOutType(OutputType outType) { m_outType = outType; } void CamTestFunctor::setResults(Statistics* resultsStats) { m_resultsStats = resultsStats; } void CamTestFunctor::operator()(Buffer &in, Buffer &out) const { if (in.Line() == 1) { m_cam->SetBand(in.Band()); } double line = in.Line(); for (int samp = 0; samp < in.SampleDimension(); samp++) { double sample = in.Sample(samp); if (!m_cam->SetImage(sample, line)) { out[samp] = Lrs; continue; } if (m_outType == Lat) { out[samp] = m_cam->UniversalLatitude(); } else if (m_outType == Lon) { out[samp] = m_cam->UniversalLongitude(); } else { if (!m_cam->SetUniversalGround(m_cam->UniversalLatitude(), m_cam->UniversalLongitude())) { out[samp] = Hrs; continue; } if (m_outType == Samp) { out[samp] = m_cam->Sample(); } else if (m_outType == Line) { out[samp] = m_cam->Line(); } else { double deltaS = m_cam->Sample() - sample; double deltaL = m_cam->Line() - line; out[samp] = sqrt(deltaS * deltaS + deltaL * deltaL); } } } m_resultsStats->AddData(out.DoubleBuffer(), out.size()); } /* Old Processing Routine // Line processing routine void doIt(Buffer &in, Buffer &out) { if(in.Line() == 1) { Loading Loading @@ -93,3 +193,4 @@ void doIt(Buffer &in, Buffer &out) { } } } */ No newline at end of file Loading
isis/src/base/apps/campt/campt.xml +20 −20 Original line number Diff line number Diff line Loading @@ -68,12 +68,12 @@ Group = GroundPoint <def>Sample</def> = 1.0 <def>Line</def> = 1.0 <def link="Digital Number">PixelValue</def> = 0.0607816 <def link="Right Ascension">RightAscension</def> = 65.749350916052 <def>Declination</def> = -18.390093214966 <def link="Planetocentric Latitude">PlanetocentricLatitude</def> = 34.444196777763 <def link="Planetographic Latitude">PlanetographicLatitude</def> = 34.760399604837 <def link="Positive East Longitude">PositiveEastLongitude</def> = 223.84999971299 <def link="Positive West Longitude">PositiveWestLongitude</def> = 136.15000028701 <def link="Right Ascension">RightAscension</def> = 65.749350916052 <DEGREE> <def>Declination</def> = -18.390093214966 <DEGREE> <def link="Planetocentric Latitude">PlanetocentricLatitude</def> = 34.444196777763 <DEGREE> <def link="Planetographic Latitude">PlanetographicLatitude</def> = 34.760399604837 <DEGREE> <def link="Positive East Longitude">PositiveEastLongitude</def> = 223.84999971299 <DEGREE> <def link="Positive West Longitude">PositiveWestLongitude</def> = 136.15000028701 <DEGREE> <def link="Body Fixed Coordinate">BodyFixedCoordinate</def> = (-2015.9595225544, -1936.6155808127, 1917.2574858384) <km> <def link="Local Radius">LocalRadius</def> = 3389756.4767145 <m> <def link="Sample Resolution">SampleResolution</def> = 536.05556350077 <m/pixel> Loading @@ -84,34 +84,34 @@ Group = GroundPoint <def link="Oblique Sample Resolution">ObliqueSampleResolution</def> = 605.06647637166 <m/pixel> # Spacecraft Information SpacecraftPosition = (-2025.6211429076, -2130.1417975758, 2009.318879871) <km> <def link="Spacecraft Azimuth">SpacecraftAzimuth</def> = 0.006855593033889 <def link="Spacecraft Azimuth">SpacecraftAzimuth</def> = 0.006855593033889 <DEGREE> <def link="Slant Distance">SlantDistance</def> = 214.52515878961 <km> <def link="Target Center Distance">TargetCenterDistance</def> = 3560.6189705415 <km> <def link="SubSpacecraft Latitude">SubSpacecraftLatitude</def> = 34.354896748841 <def link="SubSpacecraft Longitude">SubSpacecraftLongitude</def> = 226.44072947174 <def link="SubSpacecraft Latitude">SubSpacecraftLatitude</def> = 34.354896748841 <DEGREE> <def link="SubSpacecraft Longitude">SubSpacecraftLongitude</def> = 226.44072947174 <DEGREE> SpacecraftAltitude = 170.83335389965 <km> <def link="Off Nadir Angle">OffNadirAngle</def> = 36.149255932304 <def link="SubSpacecraft Ground Azimuth">SubSpacecraftGroundAzimuth</def> = 91.64525294858 <def link="Off Nadir Angle">OffNadirAngle</def> = 36.149255932304 <DEGREE> <def link="SubSpacecraft Ground Azimuth">SubSpacecraftGroundAzimuth</def> = 91.64525294858 <DEGREE> # Sun Information SunPosition = (-177337948.13839, 112957442.69098, -33704752.205292) <km> <def link="Sun Azimuth">SubSolarAzimuth</def> = 172.30460990873 <def link="Sun Azimuth">SubSolarAzimuth</def> = 172.30460990873 <DEGREE> SolarDistance = 1.4234246174889 <AU> <def link="SubSolar Latitude">SubSolarLatitude</def> = -9.1071705738361 <def link="SubSolar Longitude">SubSolarLongitude</def> = 147.50443340123 <def link="Subsolar Ground Azimuth">SubSolarGroundAzimuth</def> = 254.69139701227 <def link="SubSolar Latitude">SubSolarLatitude</def> = -9.1071705738361 <DEGREE> <def link="SubSolar Longitude">SubSolarLongitude</def> = 147.50443340123 <DEGREE> <def link="Subsolar Ground Azimuth">SubSolarGroundAzimuth</def> = 254.69139701227 <DEGREE> # Illumination and Other <def link="Phase Angle">Phase</def> = 120.59515694473 <def link="Incidence Angle">Incidence</def> = 84.106289446623 <def link="Emission Angle">Emission</def> = 38.288719431206 <def link="North Azimuth">NorthAzimuth</def> = 261.46910874636 <def link="Phase Angle">Phase</def> = 120.59515694473 <DEGREE> <def link="Incidence Angle">Incidence</def> = 84.106289446623 <DEGREE> <def link="Emission Angle">Emission</def> = 38.288719431206 <DEGREE> <def link="North Azimuth">NorthAzimuth</def> = 261.46910874636 <DEGREE> # Time <def link="Ephemeris Time">EphemerisTime</def> = -69382819.160519 <seconds> <def>UTC</def> = 1997-10-20T10:58:37.6570806 LocalSolarTime = 17.089704420784 <hour> <def link="Solar Longitude">SolarLongitude</def> = 201.83159041209 <def link="Solar Longitude">SolarLongitude</def> = 201.83159041209 <DEGREE> Error = NULL End_Group </pre> Loading
isis/src/base/apps/photomet/photomet.xml +251 −240 Original line number Diff line number Diff line Loading @@ -1002,6 +1002,16 @@ incidence</def> and <def link="Emission Angle">emission angles</def>, respective Added cast to void on 'changePar.simplified()' function call to silience unused return value warnings on OS X </change> <change name="Curtis Rose" date="2016-11-16"> Decoupled ANGLESOURCE and USEDEM parameters. They were working incorrectly before and were tangled together a bit. They are separated now and working as expected. Anglesource DEM makes the photometric calculations based on the DEM of the image if it exists. Anglesource ELLIPSOID makes the photometric calculations based on the radius obtained from the DEM shape model. Usedem true trims the image using the photometric calculations on the radius obtained from the DEM shape model. Usedem false trims the image using the from the IAU/NAIF target body file, which is defined within the cube's kernel group as the TargetAttitudeShape. Fixes #4180. </change> </history> <category> Loading Loading @@ -3492,3 +3502,4 @@ incidence</def> and <def link="Emission Angle">emission angles</def>, respective </examples> </application>
isis/src/base/apps/photomet/tsts/useDem/Makefile +3 −0 Original line number Diff line number Diff line APPNAME = photomet angleSourceDemUsedemFalse.cub.TOLERANCE = 0.0005 angleSourceDemUsedemTrue.cub.TOLERANCE = 0.0005 include $(ISISROOT)/make/isismake.tsts commands: Loading
isis/src/docsys/documents/Glossary/Glossary.xml +50 −5 Original line number Diff line number Diff line Loading @@ -996,6 +996,45 @@ equator. </definition> <definition name="Look Direction"> The look direction is the direction that the instrument is pointing. In ISIS, it is represented as a mathematical unit vector. For images that have a body (i.e. not star fields), this vector is parallel to the line from the sensor to the observed point on the surface of the target. The look direction can be represented in any of several coordinate systems, including: <a href="#Body-FixedCoordinateSystem"> Body-fixed coordinate system</a>, <a href="#CameraCoordinateSystem">Camera coordinate system</a>, <a href="#J2000CoordinateSystem">J2000 coordinate system</a>. </definition> <definition name="Body-Fixed Coordinate System"> A body-fixed coordinate system is used to determine positions and directions of objects and vectors with respect to a target body. The origin is at the center of mass for the target and the axes rotate and move through space with the body. These systems are non-inertial, meaning the velocity of the origin is non-constant. Many body-fixed coordinate systems, or reference frames, are defined in NAIF PCK files. </definition> <definition name="Camera Coordinate System"> A camera coordinate system is used to determine positions and directions of objects and vectors with respect to a sensor (i.e. camera). The origin is at the center of the sensor and the axes rotate and move through space with the sensor. These systems are non-inertial, meaning the velocity of the origin is non-constant. The location of the center of a spacecraft and its instruments at a given time are defined in NAIF SPK files. Generally, one or more frames are associated with a particular instrument. </definition> <definition name="J2000 Coordinate System"> The J2000 coordinate system (also known as EME2000) is based on the earth mean equator and dynamical equinox at midnight January 1, 2000. The origin is at the solar system barycenter. This system is inertial, since it does not rotate with respect to stars and the origin is not accelerating (i.e it has a constant velocity). This coordinate system is the root reference for NAIF's SPICE files and software. </definition> </definitions> </body> Loading Loading @@ -1053,5 +1092,11 @@ Changed Brief description to "ISIS and Image Processing Terms and Definitions" and fixed misspellings. </change> <change name="Curtis Rose" date="2016-08-05"> Added definitions for Look Direction, Body-Fixed Coordinate System, Camera Coordinate System and J2000 Coordinate System. The coordinate systems are highly related to the look direction so they are also linked in that location. </change> </history> </documentation>
isis/src/local/apps/camtest/camtest.cpp +119 −18 Original line number Diff line number Diff line Loading @@ -2,14 +2,14 @@ #include "ProcessByLine.h" #include "Camera.h" #include "SpecialPixel.h" #include "Pvl.h" using namespace std; using namespace Isis; // Globals and prototypes Camera *cam; void doIt(Buffer &in, Buffer &out); //void doIt(Buffer &in, Buffer &out); enum OutputType { Lat, Loading @@ -17,40 +17,140 @@ enum OutputType { Err, Samp, Line } OutputFormat; }; class CamTestFunctor { public: CamTestFunctor() {}; ~CamTestFunctor() {}; void setCamera(Camera* cam); void setOutType(OutputType outType); void setResults(Statistics* results); void operator()(Buffer &in, Buffer &out) const; private: Camera* m_cam; OutputType m_outType; Statistics* m_resultsStats; }; void IsisMain() { UserInterface &ui = Application::GetUserInterface(); ProcessByLine p; ProcessByBrick p; // Open the input cube Cube *icube = p.SetInputCube("FROM"); cam = icube->camera(); Cube *iCube = p.SetInputCube("FROM"); Camera *cam = iCube->camera(); p.SetOutputCube("TO"); // Set to process by line p.SetBrickSize(iCube->sampleCount(), 1, 1); IString format = ui.GetString("FORMAT"); OutputType outFormat = Lat; if (format == "LAT") { OutputFormat = Lat; outFormat = Lat; } else if (format == "LON") { OutputFormat = Lon; outFormat = Lon; } else if (format == "ERR") { OutputFormat = Err; outFormat = Err; } else if (format == "SAMP") { OutputFormat = Samp; outFormat = Samp; } else if (format == "LINE") { OutputFormat = Line; outFormat = Line; } // Create process functor CamTestFunctor func; func.setCamera(cam); func.setOutType(outFormat); Statistics resultsStats; func.setResults(&resultsStats); p.ProcessCube(func, false); // Collect results PvlGroup results = PvlGroup("CamTestResults"); results += PvlKeyword("FailedConversionsToLatLong", toString(resultsStats.LrsPixels())); results += PvlKeyword("FailedConversionsToSampleLine", toString(resultsStats.HrsPixels())); results += PvlKeyword("SuccessfulConversions", toString(resultsStats.ValidPixels())); if (outFormat == Err) { results += PvlKeyword("Average", toString(resultsStats.Average())); results += PvlKeyword("StandardDeviation", toString(resultsStats.StandardDeviation())); results += PvlKeyword("Minimum", toString(resultsStats.Minimum())); results += PvlKeyword("Maximum", toString(resultsStats.Maximum())); } p.StartProcess(doIt); // Log output results Application::Log(results); p.EndProcess(); } // Functor Definitions void CamTestFunctor::setCamera(Camera* cam) { m_cam = cam; } void CamTestFunctor::setOutType(OutputType outType) { m_outType = outType; } void CamTestFunctor::setResults(Statistics* resultsStats) { m_resultsStats = resultsStats; } void CamTestFunctor::operator()(Buffer &in, Buffer &out) const { if (in.Line() == 1) { m_cam->SetBand(in.Band()); } double line = in.Line(); for (int samp = 0; samp < in.SampleDimension(); samp++) { double sample = in.Sample(samp); if (!m_cam->SetImage(sample, line)) { out[samp] = Lrs; continue; } if (m_outType == Lat) { out[samp] = m_cam->UniversalLatitude(); } else if (m_outType == Lon) { out[samp] = m_cam->UniversalLongitude(); } else { if (!m_cam->SetUniversalGround(m_cam->UniversalLatitude(), m_cam->UniversalLongitude())) { out[samp] = Hrs; continue; } if (m_outType == Samp) { out[samp] = m_cam->Sample(); } else if (m_outType == Line) { out[samp] = m_cam->Line(); } else { double deltaS = m_cam->Sample() - sample; double deltaL = m_cam->Line() - line; out[samp] = sqrt(deltaS * deltaS + deltaL * deltaL); } } } m_resultsStats->AddData(out.DoubleBuffer(), out.size()); } /* Old Processing Routine // Line processing routine void doIt(Buffer &in, Buffer &out) { if(in.Line() == 1) { Loading Loading @@ -93,3 +193,4 @@ void doIt(Buffer &in, Buffer &out) { } } } */ No newline at end of file