Scroom 0.14-48-ga0fee447
Loading...
Searching...
No Matches
opentiledbitmapinterface.hh
Go to the documentation of this file.
1/*
2 * Scroom - Generic viewer for 2D data
3 * Copyright (C) 2009-2026 Kees-Jan Dijkzeul
4 *
5 * SPDX-License-Identifier: LGPL-2.1
6 */
7
8#pragma once
9
10#include <memory>
11
12#include <gtk/gtk.h>
13
15#include <scroom/interface.hh>
16#include <scroom/logger.hh>
17#include <scroom/point.hh>
18#include <scroom/rectangle.hh>
21
23{
41
43 {
44 std::string type;
45 unsigned int bitsPerSample;
46 unsigned int samplesPerPixel;
48 boost::optional<Scroom::Utils::Point<double>> aspectRatio;
50 };
51
52 std::ostream& to_stream(std::ostream& os, const BitmapMetaData& bmd);
53 std::string to_string(const BitmapMetaData& bmd);
55
57 {
58 public:
59 using Ptr = std::shared_ptr<OpenTiledBitmapInterface>;
60
61 public:
62 virtual std::list<GtkFileFilter*> getFilters() = 0;
63
64 virtual std::tuple<BitmapMetaData, Layer::Ptr, ReloadFunction> open(const std::string& fileName) = 0;
65 };
66
68
70
71 extern const std::string RGB;
72 extern const std::string CMYK;
73 extern const std::string Greyscale;
74 extern const std::string Colormapped;
75
76 using LayerSpecResult = std::tuple<LayerSpec, ColormapHelperBase::Ptr>;
78 std::function<LayerSpecResult(const Scroom::Logger& logger, const BitmapMetaData& bitmapMetaData)>;
79
81
84
85} // namespace Scroom::TiledBitmap
std::shared_ptr< ColormapHelperBase > Ptr
Definition colormappable.hh:158
Definition interface.hh:11
std::shared_ptr< Layer > Ptr
Definition tiledbitmaplayer.hh:250
std::shared_ptr< OpenPresentationInterface > Ptr
Definition scroominterface.hh:55
std::shared_ptr< ProgressInterface > Ptr
Definition progressinterface.hh:20
Definition logger.hh:49
Definition opentiledbitmapinterface.hh:57
virtual std::list< GtkFileFilter * > getFilters()=0
std::shared_ptr< OpenTiledBitmapInterface > Ptr
Definition opentiledbitmapinterface.hh:59
virtual std::tuple< BitmapMetaData, Layer::Ptr, ReloadFunction > open(const std::string &fileName)=0
Definition rectangle.hh:29
std::shared_ptr< SourcePresentation > Ptr
Definition tiledbitmapinterface.hh:191
std::vector< std::pair< std::string, std::string > > Metadata
Definition showmetadata.hh:15
Definition opentiledbitmapinterface.hh:23
const std::string Greyscale
Definition layerspecforbitmap.cc:53
LayerSpecResult LayerSpecForBitmap(const BitmapMetaData &bitmapMetaData)
Definition layerspecforbitmap.cc:227
const std::string CMYK
Definition layerspecforbitmap.cc:52
const std::string Colormapped
Definition layerspecforbitmap.cc:54
Scroom::Utils::Stuff scheduleLoadingBitmap(const SourcePresentation::Ptr &sp, const Layer::Ptr &layer, const ProgressInterface::Ptr &progress)
Definition tiled-bitmap.cc:32
Metadata::Metadata to_metadata(const BitmapMetaData &bmd)
Definition layerspecforbitmap.cc:35
std::function< LayerSpecResult(const Scroom::Logger &logger, const BitmapMetaData &bitmapMetaData)> LayerSpecForBitmapFunc
Definition opentiledbitmapinterface.hh:78
const std::string RGB
Definition layerspecforbitmap.cc:51
std::tuple< LayerSpec, ColormapHelperBase::Ptr > LayerSpecResult
Definition opentiledbitmapinterface.hh:76
std::string to_string(const BitmapMetaData &bmd)
Definition layerspecforbitmap.cc:28
std::function< Scroom::Utils::Stuff(const ProgressInterface::Ptr &)> ReloadFunction
Definition opentiledbitmapinterface.hh:40
OpenPresentationInterface::Ptr ToOpenPresentationInterface(OpenTiledBitmapInterface::Ptr openTiledBitmapInterface)
Definition tiledbitmappresentation.cc:442
std::ostream & to_stream(std::ostream &os, const BitmapMetaData &bmd)
Definition layerspecforbitmap.cc:20
std::shared_ptr< void > Stuff
Definition stuff.hh:17
stub progress
Definition progressinterfaceconversion-tests.cc:65
Definition opentiledbitmapinterface.hh:43
std::string type
Definition opentiledbitmapinterface.hh:44
ColormapHelperBase::Ptr colormapHelper
Definition opentiledbitmapinterface.hh:49
unsigned int bitsPerSample
Definition opentiledbitmapinterface.hh:45
unsigned int samplesPerPixel
Definition opentiledbitmapinterface.hh:46
boost::optional< Scroom::Utils::Point< double > > aspectRatio
Definition opentiledbitmapinterface.hh:48
Scroom::Utils::Rectangle< int > rect
Definition opentiledbitmapinterface.hh:47