3#include <NDEVR/ImageFactory.h>
4#include <NDEVR/VectorFunctions.h>
5#include <NDEVR/RGBColor.h>
6#include <NDEVR/INIInterface.h>
63 ,
m_pixels(4 * raster_info.pixel_size[
X] * raster_info.pixel_size[
Y], 255)
176 loc[
Y] = 2.0 - loc[
Y];
179 loc[
X] = fmod(loc[
X], 1.0);
Stores an angle in an optimized format.
Definition StringStream.h:352
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:57
constexpr void addToBounds(const t_vertex &vector)
Adds to the bounds such that the new bounds fully encompasses the argument.
Definition Bounds.hpp:498
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
void setAllToValue(const t_o_type &fill_element, const t_index_type offset=0, t_index_type fill_size=Constant< t_index_type >::NaN)
Definition Buffer.hpp:1378
Definition INIReader.h:57
void addOption(const String &label, Resource< Vector< t_dims, t_type > > &mem_loc)
Definition INIReader.h:236
Definition INIInterface.h:40
static ImageFactory & DefaultFactory()
void addImageUncompressed(const String &image_id, const Buffer< uint01 > &uncompressed, bool clear_other)
Definition MaterialRaster.h:40
virtual void updateImage()=0
virtual const String & imageID() const =0
virtual void addPixelInfo(const RGBColor &pixel, const Vector< 2, uint04 > &location, uint08 weight)=0
virtual void addImageBuffer(const Buffer< uint01 > &pixels, const Vector< 2, uint04 > &size, const Matrix< fltp08 > &camera_matrix)=0
MaterialRasterBase(const RasterInfo &raster_info)
Definition MaterialRaster.h:42
RasterInfo m_raster_info
Definition MaterialRaster.h:53
virtual void addPixelInfo(const Vector< 4, fltp04 > &pixel, const Vector< 2, uint04 > &location, uint08 weight)=0
virtual void addPixelInfo(const RGBColor &pixel, const Vector< 2, fltp08 > &location, uint04 weight)=0
virtual void addPixelInfo(const Vector< 4, fltp04 > &pixel, const Vector< 2, fltp08 > &location, uint08 weight)=0
Definition MaterialRaster.h:235
static MaterialRasterFactory * s_default_raster_factory
Definition MaterialRaster.h:241
virtual MaterialRasterBase * createRaster(const String &image_id, const RasterInfo &info)=0
Definition MaterialRaster.h:56
void addPixelInfo(const Vector< 4, fltp04 > &pixel, const Vector< 2, fltp08 > &location, uint08 weight) override
Definition MaterialRaster.h:206
Bounds< 2, uint04 > m_update_bounds
Definition MaterialRaster.h:231
virtual void addImageBuffer(const Buffer< uint01 > &pixels, const Vector< 2, uint04 > &size, const Matrix< fltp08 > &camera_matrix) override
Definition MaterialRaster.cpp:16
void addPixelInfo(const RGBColor &pixel, const Vector< 2, fltp08 > &location, uint04 weight) override
Definition MaterialRaster.h:188
Buffer< Vector< 3, uint08 > > m_color_channels
Definition MaterialRaster.h:228
MaterialRaster(const String &image_id, const RasterInfo &raster_info)
Definition MaterialRaster.h:58
void addPixelInfo(const RGBColor &pixel, const Vector< 2, uint04 > &location, uint08 weight) override
Definition MaterialRaster.h:195
static uint04 Weight(const Vertex< 2, fltp08 > &location, fltp08 y_dist)
Definition MaterialRaster.h:110
uint04 convertToIndex(const Vector< 2, uint04 > &location) const
Definition MaterialRaster.h:184
Vector< 2, uint04 > convertLocation(const Vector< 2, fltp08 > &location) const
Definition MaterialRaster.h:166
virtual void clearRaster()
Definition MaterialRaster.h:72
const String & imageID() const override
Definition MaterialRaster.h:68
virtual void updateImage() override
Definition MaterialRaster.h:93
Buffer< uint01 > m_pixels
Definition MaterialRaster.h:230
void addPixelInfo(const Vector< 4, fltp04 > &pixel, const Vector< 2, uint04 > &location, uint08 weight) override
Definition MaterialRaster.h:211
Buffer< uint08 > m_color_channel_average_count
Definition MaterialRaster.h:229
virtual void setUnsetColor(RGBColor color)
Definition MaterialRaster.h:77
String m_image_id
Definition MaterialRaster.h:227
Definition Matrix.hpp:173
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:53
static const uint01 r_pos
Definition RGBColor.h:55
static const uint01 g_pos
Definition RGBColor.h:56
static const uint01 b_pos
Definition RGBColor.h:57
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
constexpr t_type magnitudeSquared() const
Definition Vector.hpp:458
constexpr Vector< t_dims, t_new_type > as() const
Definition Vector.hpp:324
A vertex.
Definition Vertex.hpp:54
constexpr t_type getMax(const t_type &left, const t_type &right)
Finds the max of the given arguments using the > operator.
Definition BaseFunctions.hpp:116
@ MIN
Definition BaseValues.hpp:226
@ MAX
Definition BaseValues.hpp:227
@ DEGREES
Definition Angle.h:66
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer -Can represent exact integer values 0 thro...
Definition BaseValues.hpp:132
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:514
@ Y
Definition BaseValues.hpp:202
@ X
Definition BaseValues.hpp:200
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Definition BaseValues.hpp:272
Definition MaterialRaster.h:10
bool is_enabled
Definition MaterialRaster.h:27
virtual void getINI(INIFactory &factory) override
Definition MaterialRaster.h:28
fltp08 radial_distortion_scale
Definition MaterialRaster.h:22
uint04 side_crop
Definition MaterialRaster.h:26
Vector< 2, uint04 > pixel_size
Definition MaterialRaster.h:21
RasterInfo(const File &ini_file)
Definition MaterialRaster.h:14
bool isEnabled() const
Definition MaterialRaster.h:17
Vector< 2, Angle< fltp08 > > angle_offset
Definition MaterialRaster.h:25
RasterInfo()
Definition MaterialRaster.h:11
Vector< 2, Angle< fltp08 > > camera_drape_move_angle
Definition MaterialRaster.h:24
fltp08 radial_distortion_offset
Definition MaterialRaster.h:23