Updated frame handling with any type of hierarchy (see #4008)

Images can now be detected in nested IFDs or as root IFDs.
This commit is contained in:
Hombre57
2017-09-16 22:30:07 +02:00
parent ae19b6485a
commit ee0bff4124
11 changed files with 667 additions and 494 deletions

View File

@@ -1068,6 +1068,22 @@ public:
};
CAFocalPlaneInterpreter caFocalPlaneInterpreter;
class RawImageSegmentationInterpreter : public Interpreter
{
public:
virtual std::string toString (Tag* t)
{
int segmentNumber = t->toInt(0, SHORT);
int segmentWidth = t->toInt(2, SHORT);
int lastSegmentWidth = t->toInt(4, SHORT);
char buffer[32];
sprintf (buffer, "%d %d %d", segmentNumber, segmentWidth, lastSegmentWidth);
return buffer;
}
};
RawImageSegmentationInterpreter rawImageSegmentationInterpreter;
class CAExposureTimeInterpreter : public Interpreter
{
public:
@@ -1995,6 +2011,7 @@ const TagAttrib canonAttribs[] = {
{1, AC_WRITE, 0, nullptr, 0x4005, AUTO, "UnknownBlock2", &stdInterpreter},
{1, AC_WRITE, 0, nullptr, 0x4008, AUTO, "BlackLevel", &stdInterpreter},
{1, AC_WRITE, 0, canonMicroAdjustAttrib, 0x4013, AUTO, "AFMicroAdj", &stdInterpreter},
{1, AC_WRITE, 0, nullptr, 0xc640, AUTO, "RawImageSegmentation", &rawImageSegmentationInterpreter},
{ -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}
};
}