3#include <NDEVR/ImageFactory.h>
4#include <NDEVR/VectorFunctions.h>
5#include <NDEVR/RGBColor.h>
6#include <NDEVR/INIInterface.h>
72 ,
m_pixels(4 * raster_info.pixel_size[
X] * raster_info.pixel_size[
Y], 255)
185 loc[
Y] = 2.0 - loc[
Y];
188 loc[
X] = fmod(loc[
X], 1.0);
The primary angle storage class for this API. Stores an angle in an optimized format.
Definition StringStream.h:540
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:52
constexpr void addToBounds(const t_vertex &vector)
Definition Bounds.hpp:390
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
void setAllToValue(const t_o_type &fill_element, const t_index_type offset=0, t_index_type fill_size=Constant< t_index_type >::Invalid)
Definition Buffer.hpp:782
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
Contains methods for easily reading and writing to an INI file including efficient casting,...
Definition INIReader.h:68
void addOption(const String &label, Resource< Vector< t_dims, t_type > > &mem_loc)
Definition INIReader.h:76
Contains methods for easily reading and writing to an INI file including.
Definition INIInterface.h:45
static ImageFactory & DefaultFactory()
void addImageUncompressed(const String &image_id, const Buffer< uint01 > &uncompressed, bool clear_other)
Base class for painting pixels at a time into a 2D texture.
Definition MaterialRaster.h:46
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:48
RasterInfo m_raster_info
Definition MaterialRaster.h:59
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
Creates rasters for converting points and directions into 2D images.
Definition MaterialRaster.h:246
static void SetDefaultMaterialRasterFactory(MaterialRasterFactory *factory)
static MaterialRasterFactory * s_default_raster_factory
Definition MaterialRaster.h:252
static MaterialRasterBase * CreateRaster(const String &image_id, const RasterInfo &info)
virtual MaterialRasterBase * createRaster(const String &image_id, const RasterInfo &info)=0
Stores information for painting pixels at a time into a 2D texture.
Definition MaterialRaster.h:65
void addPixelInfo(const Vector< 4, fltp04 > &pixel, const Vector< 2, fltp08 > &location, uint08 weight) override
Definition MaterialRaster.h:215
Bounds< 2, uint04 > m_update_bounds
Definition MaterialRaster.h:240
void addPixelInfo(const RGBColor &pixel, const Vector< 2, fltp08 > &location, uint04 weight) override
Definition MaterialRaster.h:197
Buffer< Vector< 3, uint08 > > m_color_channels
Definition MaterialRaster.h:237
MaterialRaster(const String &image_id, const RasterInfo &raster_info)
Definition MaterialRaster.h:67
void addPixelInfo(const RGBColor &pixel, const Vector< 2, uint04 > &location, uint08 weight) override
Definition MaterialRaster.h:204
static uint04 Weight(const Vertex< 2, fltp08 > &location, fltp08 y_dist)
Definition MaterialRaster.h:119
uint04 convertToIndex(const Vector< 2, uint04 > &location) const
Definition MaterialRaster.h:193
Vector< 2, uint04 > convertLocation(const Vector< 2, fltp08 > &location) const
Definition MaterialRaster.h:175
virtual void addImageBuffer(const Buffer< uint01 > &pixels, const Vector< 2, uint04 > &size, const Matrix< fltp08 > &camera_matrix) override
virtual void clearRaster()
Definition MaterialRaster.h:81
const String & imageID() const override
Definition MaterialRaster.h:77
virtual void updateImage() override
Definition MaterialRaster.h:102
Buffer< uint01 > m_pixels
Definition MaterialRaster.h:239
void addPixelInfo(const Vector< 4, fltp04 > &pixel, const Vector< 2, uint04 > &location, uint08 weight) override
Definition MaterialRaster.h:220
Buffer< uint08 > m_color_channel_average_count
Definition MaterialRaster.h:238
virtual void setUnsetColor(RGBColor color)
Definition MaterialRaster.h:86
String m_image_id
Definition MaterialRaster.h:236
Definition Matrix.hpp:176
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
static const uint01 r_pos
Definition RGBColor.h:56
static const uint01 g_pos
Definition RGBColor.h:57
static const uint01 b_pos
Definition RGBColor.h:58
The core String class for the NDEVR API.
Definition String.h:69
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
constexpr t_type magnitudeSquared() const
Definition Vector.hpp:426
constexpr Vector< t_dims, t_new_type > as() const
Definition Vector.hpp:300
A vertex or point. A specific type of Vector used primarily for spacial location information.
Definition Vertex.hpp:48
constexpr t_type getMax(const t_type &left, const t_type &right)
Finds the max of the given arguments using the > operator The only requirement is that t_type have > ...
Definition BaseFunctions.hpp:94
@ MIN
Definition BaseValues.hpp:196
@ MAX
Definition BaseValues.hpp:197
@ DEGREES
Definition Angle.h:58
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
Definition BaseValues.hpp:106
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:375
@ Y
Definition BaseValues.hpp:169
@ X
Definition BaseValues.hpp:167
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233
Stores information for painting pixels at a time into a 2D texture used with MaterialRaster.
Definition MaterialRaster.h:13
bool is_enabled
Definition MaterialRaster.h:30
virtual void getINI(INIFactory &factory) override
Definition MaterialRaster.h:31
fltp08 radial_distortion_scale
Definition MaterialRaster.h:25
uint04 side_crop
Definition MaterialRaster.h:29
Vector< 2, uint04 > pixel_size
Definition MaterialRaster.h:24
RasterInfo(const File &ini_file)
Definition MaterialRaster.h:17
bool isEnabled() const
Definition MaterialRaster.h:20
Vector< 2, Angle< fltp08 > > angle_offset
Definition MaterialRaster.h:28
RasterInfo()
Definition MaterialRaster.h:14
Vector< 2, Angle< fltp08 > > camera_drape_move_angle
Definition MaterialRaster.h:27
fltp08 radial_distortion_offset
Definition MaterialRaster.h:26