SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
satdump::handlers::ImageProductHandler Class Reference
Inheritance diagram for satdump::handlers::ImageProductHandler:
satdump::handlers::ProductHandler satdump::handlers::Handler satdump::handlers::ProcessingHandler

Classes

struct  CalibInfo

Public Member Functions

 ImageProductHandler (std::shared_ptr< products::Product >, bool dataset_mode=false)
void initOverlayConverters ()
void do_process ()
 Actual processing function to be implemented by the child class.
void drawMenu ()
 Render explorer menu left sidebar.
void drawContents (ImVec2 win_size)
 Render explorer contents (center/left)
void drawMenuBar ()
 Render explorer menu bar (in the left sidebar)
void setConfig (nlohmann::json p)
 Optional, allows setting a configuration/state from JSON.
nlohmann::json getConfig ()
 Optional, allows getting a configuration/state as JSON.
void resetConfig ()
 Optional, allows resetting the handler's configuration.
void saveResult (std::string directory)
void addSubHandler (std::shared_ptr< Handler > handler, bool ontop=false)
 Add a new subhandler.
void delSubHandler (std::shared_ptr< Handler > handler, bool now=false)
 Delete a subhandler.
bool drawTreeMenu (std::shared_ptr< Handler > &h)
 Render explorer menu bar (in the left sidebar)
std::string getID ()
Public Member Functions inherited from satdump::handlers::ProductHandler
nlohmann::json getInstrumentCfg ()
 ProductHandler (std::shared_ptr< products::Product > p, bool dataset_mode=false, std::function< bool(nlohmann::ordered_json &)> filterPreset=[](auto &) { return true;})
 Constructor.
std::string getName ()
 Get this handler's readable name.
std::string getID ()
Public Member Functions inherited from satdump::handlers::Handler
std::string getTreeID ()
 Get this handler's ImGui ID for rendering in the tree.
bool hasSubhandlers ()
 Check if this handler contains any sub-handlers.
virtual std::vector< std::shared_ptr< Handler > > getAllSubHandlers ()
 Get all current subhandlers.
void setCanBeSelected (bool v)
 Set if a handler can be select in the tree.
void setCanBeDragged (bool v)
 Set if a handler can be dragged around in the tree.
void setCanBeDraggedTo (bool v)
 Set if a handler can be dragged to in the tree.
void setSubHandlersCanBeDragged (bool v)
 Set if a handler's subhandlers can be dragged to in the tree.
void setCanSubBeReorgTo (bool v)
 Set if a handler's subhandlers can be reordered.
Public Member Functions inherited from satdump::handlers::ProcessingHandler
void process ()
 Performing processing. This is not multi-threaded, intended to call it externally.
void set_is_processing (bool v)
 Set the processing status externally, to force waiting before starting a new thread.
void asyncProcess ()
 Perform processing asynchronously, in a thread.

Public Attributes

std::shared_ptr< ImageHandlerimg_handler
bool enabled_advanced_menus = false
products::ImageProductproduct
std::shared_ptr< products::ImageCalibratorimg_calibrator
bool needs_to_update = true
std::string channel_selection_box_str
int channel_selection_curr_id = 0
bool images_can_be_calibrated = false
bool channel_calibrated = false
std::map< int, std::map< std::string, CalibInfo > > channels_calibrated_ranges
std::string channels_calibrated_curr_unit
std::vector< std::pair< calibration::UnitInfo, std::shared_ptr< calibration::UnitConverter > > > channels_calibration_units_and_converters
std::string expression
float progress = 0
Public Attributes inherited from satdump::handlers::Handler
std::string handler_tree_icon = "N"

Additional Inherited Members

Static Public Member Functions inherited from satdump::handlers::ProcessingHandler
static std::string getID ()
static std::shared_ptr< HandlergetInstance ()
Protected Member Functions inherited from satdump::handlers::ProductHandler
void resetPreset ()
std::string generateFileName ()
bool renderPresetMenu ()
 Draw preset selection menu.
void tryApplyDefaultPreset ()
 Attempts to a apply a default preset if present in the configuration.
Protected Attributes inherited from satdump::handlers::ProductHandler
bool preset_reset_by_handler = false
std::shared_ptr< products::Productproduct
nlohmann::ordered_json instrument_cfg
std::string product_internal_name
Protected Attributes inherited from satdump::handlers::Handler
std::vector< std::shared_ptr< Handler > > subhandlers
std::mutex subhandlers_mtx
Protected Attributes inherited from satdump::handlers::ProcessingHandler
bool is_processing = false
std::mutex is_processing_mtx
std::thread async_thread

Member Function Documentation

◆ addSubHandler()

void satdump::handlers::ImageProductHandler::addSubHandler ( std::shared_ptr< Handler > handler,
bool ontop = false )
inlinevirtual

Add a new subhandler.

Parameters
handlerthe handler to add
ontopif true, adds the handler at the start of the list

Reimplemented from satdump::handlers::Handler.

◆ delSubHandler()

void satdump::handlers::ImageProductHandler::delSubHandler ( std::shared_ptr< Handler > handler,
bool now = false )
inlinevirtual

Delete a subhandler.

Parameters
handlerthe handler to delete

Reimplemented from satdump::handlers::Handler.

◆ do_process()

void satdump::handlers::ImageProductHandler::do_process ( )
virtual

Actual processing function to be implemented by the child class.

Implements satdump::handlers::ProcessingHandler.

◆ drawContents()

void satdump::handlers::ImageProductHandler::drawContents ( ImVec2 win_size)
virtual

Render explorer contents (center/left)

Implements satdump::handlers::Handler.

◆ drawMenu()

void satdump::handlers::ImageProductHandler::drawMenu ( )
virtual

Render explorer menu left sidebar.

Implements satdump::handlers::Handler.

◆ drawMenuBar()

void satdump::handlers::ImageProductHandler::drawMenuBar ( )
virtual

Render explorer menu bar (in the left sidebar)

Reimplemented from satdump::handlers::Handler.

◆ drawTreeMenu()

bool satdump::handlers::ImageProductHandler::drawTreeMenu ( std::shared_ptr< Handler > & h)
inlinevirtual

Render explorer menu bar (in the left sidebar)

Parameters
hcurrently selected handler, to be replaced if another is selected
Returns
true if the handler provided is present in the tree

Reimplemented from satdump::handlers::Handler.

◆ getConfig()

nlohmann::json satdump::handlers::ImageProductHandler::getConfig ( )
virtual

Optional, allows getting a configuration/state as JSON.

Returns
JSON object

Reimplemented from satdump::handlers::Handler.

◆ getID()

std::string satdump::handlers::ImageProductHandler::getID ( )
inlinevirtual

◆ resetConfig()

void satdump::handlers::ImageProductHandler::resetConfig ( )
inlinevirtual

Optional, allows resetting the handler's configuration.

Reimplemented from satdump::handlers::Handler.

◆ saveResult()

void satdump::handlers::ImageProductHandler::saveResult ( std::string directory)
virtual

Reimplemented from satdump::handlers::ProductHandler.

◆ setConfig()

void satdump::handlers::ImageProductHandler::setConfig ( nlohmann::json p)
virtual

Optional, allows setting a configuration/state from JSON.

Parameters
pJSON object

Reimplemented from satdump::handlers::Handler.


The documentation for this class was generated from the following files: