This commit is contained in:
2025-06-06 22:32:45 -04:00
parent dfcd9672a3
commit 8373a6148f
10 changed files with 263 additions and 9 deletions

View File

@ -41,10 +41,16 @@ namespace ams
public:
float R,G,B,A;
amspixel();
amspixel(float _R ,float _G, float _B, float _A);
uint8_t& operator[](const int ind);
const uint8_t& operator[](const int ind) const;
amsfloatpixel();
amsfloatpixel(float _R ,float _G, float _B, float _A);
float& operator[](const int ind);
const float& operator[](const int ind) const;
amsfloatpixel operator+(amsfloatpixel rhs);
amsfloatpixel operator-(amsfloatpixel rhs);
amsfloatpixel operator*(float rhs);
amsfloatpixel operator/(float rhs);
};
class amsimage
@ -82,6 +88,9 @@ namespace ams
uint8_t& operator()(int Nc, int I, int J);
const uint8_t& operator()(int Nc, int I, int J) const;
amsfloatpixel get_fpixel(int x, int y) const;
int set_fpixel(int x, int y, amsfloatpixel p);
void clear();
void setall(amspixel color);
@ -97,7 +106,7 @@ namespace ams
//applied color to any pixels where the bitplane's value is >= thresh
int apply_bitplane_mask(int x0, int y0, const amsbitplane* bp, amspixel color, uint8_t thresh);
amsfloatpixel interpolate(float x, float y);
amsfloatpixel interpolate(float x, float y) const;
//rescales the image with linear interpolation
amsimage rescale(int nnx, int nny);
@ -138,6 +147,10 @@ namespace ams
const uint8_t& operator()(int I, int J) const;
uint8_t& operator[](long I);
const uint8_t& operator[](long I) const;
float getf(int x, int y) const;
int setf(int x, int y, float f) const;
float interpolate(int x, int y);
void clear();

View File

@ -104,8 +104,10 @@ void amsimage_planeregion_set(
uint8_t val
);
double mod(double x, double n);
float mod(float x, float n);
int32_t mod(int32_t x, int32_t n);
int64_t mod(int64_t x, int64_t n);
}; //end namespace imglib4
}; //end namespace ams