FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
RawFileCreator.hpp
1#ifndef FIBER_FIBERIO_RAW_RAWCREATOR_HPP
2#define FIBER_FIBERIO_RAW_RAWCREATOR_HPP
3
4#include <libraw/libraw.h>
5
6#include <memcore/Loader.hpp>
7
8#include <memcore/AlzheimerCreator.hpp>
9
10#include <fiber/field/MemBase.hpp>
11#include <fiber/field/CreativeArray.hpp>
12#include <fiber/field/UniformCartesianArray.hpp>
13#include <fiber/grid/Grid.hpp>
14
15
16#include <eagle/ColorSpace.hpp>
17
18#include <future>
19#include <mutex>
20
21#include "FiberIOrawimagesDllApi.h"
22
23namespace Fiber
24{
25
26using namespace MemCore;
27
28using Eagle::rgb_t;
29using Eagle::rgba_t;
30using Eagle::rgb16_t;
31using Eagle::rgba16_t;
32
33
34class FiberIOrawimages_API RawFileCreator : public AlzheimerCreator<MemBase, CreativeArrayBase>
35{
36public:
38
40 const RefPtr<MemBase>&Data = nullptr,
42
44
50// RefPtr<MemBase> produce() override;
51
52#if 0
53 bool request(const RefPtr<Result>&R) override;
54
55 bool isUnderCreation() const override;
56
57 bool discardCreation() override;
58
59 Creature::ReasonForReleasal release() override;
60#endif
61
62};
63
64
69{
70public:
71 LibRaw RawProcessor;
72 string url;
73 string error;
74 MultiIndex<3> dims;
75
76 // mutex to avoid multiple processing calls
77 std::mutex processing;
78 string method;
79
80 RawImageBufferCreator(const RefPtr<LoaderProgress>&BLP, const string&url, Grid&G);
82
83 RefPtr<UniformCartesianArray> newPositions() const;
84
85 RefPtr<MemBase> produce() override;
86
87 bool isValid() const
88 {
89 return dims.size() > 0;
90 }
91};
92
93
98{
99public:
100 RefPtr<RawImageBufferCreator> myRawImageBufferCreator;
101 bool dcRawProcess = true;
102
114 int interpolation_type = 0;
115
116 string method;
117
119 int InterpolationType = 0);
120
122
123 RefPtr<MemBase> produce() override;
124};
125
126} // namespace Fiber
127
128
129#endif // FIBER_FIBERIO_RAW_RAWCREATOR_HPP
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.
Definition Grid.hpp:60
Definition RawFileCreator.hpp:35
https://www.libraw.org/docs
Definition RawFileCreator.hpp:69
There is one common RawImageBufferCreator for many RawImageCreator.
Definition RawFileCreator.hpp:98
static RefPtr< Cache, CacheBase > & MemCache()
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2