-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into develop/update-externals
- Loading branch information
Showing
24 changed files
with
645 additions
and
679 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
 | ||
|
||
# SIX Release Notes | ||
|
||
## (WIP: Version 3.1.9); ????, ??, 2022 | ||
* replace KDTree *`std::complex<float>` -> AMP8I_PHS8I conversion* with a | ||
["math based" approach](https://github.com/ngageoint/six-library/pull/537#issuecomment-1026453353). | ||
* restore SIDD 2.0 `AngleMagnitudeType`, SIDD 3.0 is `AngleZeroToExclusive360MagnitudeType` | ||
|
||
## Version 3.1.8; December 13, 2021 | ||
* [coda-oss](https://github.com/mdaus/coda-oss) version [2021-12-13](https://github.com/mdaus/coda-oss/releases/tag/2021-12-13) | ||
* [nitro](https://github.com/mdaus/nitro) version [2.10.7](https://github.com/mdaus/nitro/releases/tag/NITRO-2.10.7) | ||
* write [8AMPI_PHSI](https://github.com/ngageoint/six-library/tree/feature/8AMPI_PHSI) files | ||
* update schema for [SIDD 3.0](https://github.com/ngageoint/six-library/tree/feature/SIDD-3.0) | ||
|
||
----- | ||
|
||
## Contact | ||
February 2022, Dan <dot> Smith <at> Maxar <dot> <see><oh><em> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
six/modules/c++/six.sicd/include/six/sicd/ComplexToAMP8IPHS8I.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* ========================================================================= | ||
* This file is part of six.sicd-c++ | ||
* ========================================================================= | ||
* | ||
* (C) Copyright 2021, Maxar Technologies, Inc. | ||
* | ||
* six.sicd-c++ is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this program; If not, | ||
* see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
#ifndef SIX_six_sicd_ComplexToAMP8IPHS8I_h_INCLUDED_ | ||
#define SIX_six_sicd_ComplexToAMP8IPHS8I_h_INCLUDED_ | ||
#pragma once | ||
|
||
#include <stdint.h> | ||
|
||
#include <array> | ||
#include <complex> | ||
#include <memory> | ||
#include <vector> | ||
|
||
#include <six/sicd/ImageData.h> | ||
|
||
namespace six | ||
{ | ||
namespace sicd | ||
{ | ||
namespace details | ||
{ | ||
/*! | ||
* \brief A utility that's used to convert complex values into 8-bit amplitude and phase values. | ||
*/ | ||
class ComplexToAMP8IPHS8I final | ||
{ | ||
/*! | ||
* Create a lookup structure that converts from complex to amplitude and phase. | ||
* @param pAmplitudeTable optional amplitude table. | ||
*/ | ||
explicit ComplexToAMP8IPHS8I(const six::AmplitudeTable* pAmplitudeTable = nullptr); | ||
public: | ||
static const ComplexToAMP8IPHS8I* make(const six::AmplitudeTable* pAmplitudeTable, std::unique_ptr<ComplexToAMP8IPHS8I>&); | ||
|
||
~ComplexToAMP8IPHS8I() = default; | ||
ComplexToAMP8IPHS8I(const ComplexToAMP8IPHS8I&) = delete; | ||
ComplexToAMP8IPHS8I& operator=(const ComplexToAMP8IPHS8I&) = delete; | ||
ComplexToAMP8IPHS8I(ComplexToAMP8IPHS8I&&) = delete; | ||
ComplexToAMP8IPHS8I& operator=(ComplexToAMP8IPHS8I&&) = delete; | ||
|
||
/*! | ||
* Get the nearest amplitude and phase value given a complex value | ||
* @param v complex value to query with | ||
* @return nearest amplitude and phase value | ||
*/ | ||
AMP8I_PHS8I_t nearest_neighbor(const std::complex<float>& v) const; | ||
|
||
private: | ||
//! The sorted set of possible magnitudes order from small to large. | ||
std::vector<long double> uncached_magnitudes; // Order is important! This must be ... | ||
const std::vector<long double>& magnitudes; // ... before this. | ||
|
||
//! The difference in phase angle between two UINT phase values. | ||
long double phase_delta; | ||
//! Unit vector rays that represent each direction that phase can point. | ||
std::array<std::complex<long double>, UINT8_MAX + 1> phase_directions; | ||
}; | ||
} | ||
} | ||
} | ||
#endif // SIX_six_sicd_ComplexToAMP8IPHS8I_h_INCLUDED_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.