RawSpeed
fast raw decoding library
Loading...
Searching...
No Matches
rawspeed::TiffIFD Class Reference

#include "tiff/TiffIFD.h"

Inheritance diagram for rawspeed::TiffIFD:
[legend]
Collaboration diagram for rawspeed::TiffIFD:
[legend]

Classes

struct  Limits

Public Member Functions

 TiffIFD (TiffIFD *parent)
 TiffIFD (TiffIFD *parent, NORangesSet< Buffer > *ifds, DataBuffer data, uint32_t offset)
virtual ~TiffIFD ()=default
 TiffIFD (const TiffIFD &)=delete
TiffIFDoperator= (const TiffIFD &)=delete
uint32_t getNextIFD () const
std::vector< const TiffIFD * > getIFDsWithTag (TiffTag tag) const
const TiffIFDgetIFDWithTag (TiffTag tag, uint32_t index=0) const
TiffEntrygetEntry (TiffTag tag) const
TiffEntry *RAWSPEED_READONLY getEntryRecursive (TiffTag tag) const
bool RAWSPEED_READONLY hasEntry (TiffTag tag) const
bool hasEntryRecursive (TiffTag tag) const
const std::vector< TiffIFDOwner > & getSubIFDs () const

Private Member Functions

virtual void anchor () const
void recursivelyIncrementSubIFDCount ()
void checkSubIFDs (int headroom) const
void recursivelyCheckSubIFDs (int headroom) const
void add (TiffIFDOwner subIFD)
void add (TiffEntryOwner entry)
TiffRootIFDOwner parseMakerNote (NORangesSet< Buffer > *ifds, const TiffEntry *t)
void parseIFDEntry (NORangesSet< Buffer > *ifds, ByteStream &bs)

Private Attributes

uint32_t nextIFD = 0
TiffIFD *const parent
std::vector< TiffIFDOwnersubIFDs
int subIFDCount = 0
int subIFDCountRecursive = 0
std::map< TiffTag, TiffEntryOwnerentries

Friends

class TiffEntry
class FiffParser
class TiffParser

Detailed Description

Definition at line 49 of file TiffIFD.h.

Constructor & Destructor Documentation

◆ TiffIFD() [1/3]

rawspeed::TiffIFD::TiffIFD ( TiffIFD * parent)
explicit

Definition at line 103 of file TiffIFD.cpp.

References TiffIFD(), parent, recursivelyCheckSubIFDs(), and recursivelyIncrementSubIFDCount().

Referenced by TiffIFD(), TiffIFD(), TiffIFD(), rawspeed::TiffRootIFD::TiffRootIFD(), getIFDWithTag(), operator=(), parseMakerNote(), recursivelyCheckSubIFDs(), and recursivelyIncrementSubIFDCount().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TiffIFD() [2/3]

rawspeed::TiffIFD::TiffIFD ( TiffIFD * parent,
NORangesSet< Buffer > * ifds,
DataBuffer data,
uint32_t offset )

Definition at line 111 of file TiffIFD.cpp.

References TiffIFD(), assert(), rawspeed::Buffer::getSubView(), rawspeed::ByteStream::getU16(), rawspeed::ByteStream::getU32(), rawspeed::NORangesSet< T >::insert(), nextIFD, parseIFDEntry(), rawspeed::ByteStream::setPosition(), and ThrowTPE.

Here is the call graph for this function:

◆ ~TiffIFD()

virtual rawspeed::TiffIFD::~TiffIFD ( )
virtualdefault

◆ TiffIFD() [3/3]

rawspeed::TiffIFD::TiffIFD ( const TiffIFD & )
delete

References TiffIFD().

Here is the call graph for this function:

Member Function Documentation

◆ add() [1/2]

void rawspeed::TiffIFD::add ( TiffEntryOwner entry)
private

Definition at line 308 of file TiffIFD.cpp.

References entries.

◆ add() [2/2]

void rawspeed::TiffIFD::add ( TiffIFDOwner subIFD)
private

Definition at line 299 of file TiffIFD.cpp.

References assert(), and subIFDs.

Referenced by parseIFDEntry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ anchor()

void rawspeed::TiffIFD::anchor ( ) const
privatevirtual

Reimplemented in rawspeed::TiffRootIFD.

Definition at line 48 of file TiffIFD.cpp.

◆ checkSubIFDs()

void rawspeed::TiffIFD::checkSubIFDs ( int headroom) const
private

Definition at line 269 of file TiffIFD.cpp.

References assert(), rawspeed::TiffIFD::Limits::RecursiveSubIFDCount, rawspeed::TiffIFD::Limits::SubIFDCount, subIFDCount, subIFDCountRecursive, and ThrowTPE.

Here is the call graph for this function:

◆ getEntry()

TiffEntry * rawspeed::TiffIFD::getEntry ( TiffTag tag) const
nodiscard

Definition at line 313 of file TiffIFD.cpp.

References entries, ThrowTPE, and TiffEntry.

Referenced by rawspeed::anonymous_namespace{Rw2Decoder.cpp}::DecompressorV8Params::DecompressorV8Params(), rawspeed::DngDecoder::decodeBlackLevels(), rawspeed::ArwDecoder::decodeCurve(), rawspeed::DngDecoder::decodeData(), rawspeed::ArwDecoder::DecodeLJpeg(), rawspeed::DngDecoder::decodeMaskedAreas(), rawspeed::OrfDecoder::decodeMetaDataInternal(), rawspeed::Rw2Decoder::decodeMetaDataInternal(), rawspeed::Cr2Decoder::decodeNewFormat(), rawspeed::ArwDecoder::decodeRawInternal(), rawspeed::DngDecoder::decodeRawInternal(), rawspeed::MosDecoder::decodeRawInternal(), rawspeed::Rw2Decoder::decodeRawInternal(), rawspeed::Rw2Decoder::decodeRawV8(), rawspeed::ArwDecoder::decodeSRF(), rawspeed::ArwDecoder::decodeTransitionalArw(), rawspeed::ArwDecoder::DecodeUncompressed(), rawspeed::StiDecoder::DecodeUncompressed(), rawspeed::ThreefrDecoder::DecodeUncompressed(), rawspeed::RawDecoder::decodeUncompressed(), rawspeed::OrfDecoder::getBitsPerPixel(), rawspeed::anonymous_namespace{Rw2Decoder.cpp}::getPanasonicTiffVector(), rawspeed::DngDecoder::getTilingDescription(), rawspeed::ArwDecoder::GetWB(), rawspeed::DngDecoder::handleMetadata(), rawspeed::NefDecoder::NEFIsUncompressed(), rawspeed::NefDecoder::NEFIsUncompressedRGB(), rawspeed::DngDecoder::parseACTIVEAREA(), and rawspeed::DngDecoder::parseCFA().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEntryRecursive()

TiffEntry *RAWSPEED_READONLY rawspeed::TiffIFD::getEntryRecursive ( TiffTag tag) const
nodiscard

Definition at line 246 of file TiffIFD.cpp.

References entries, subIFDs, and TiffEntry.

Referenced by rawspeed::KdcDecoder::decodeMetaDataInternal(), rawspeed::Cr2Decoder::decodeNewFormat(), rawspeed::DcrDecoder::decodeRawInternal(), rawspeed::KdcDecoder::decodeRawInternal(), rawspeed::PefDecoder::decodeRawInternal(), rawspeed::TiffRootIFD::getID(), rawspeed::ArwDecoder::GetWB(), hasEntryRecursive(), and rawspeed::MosDecoder::isAppropriateDecoder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIFDsWithTag()

std::vector< const TiffIFD * > rawspeed::TiffIFD::getIFDsWithTag ( TiffTag tag) const
nodiscard

Definition at line 226 of file TiffIFD.cpp.

References entries, and subIFDs.

Referenced by getIFDWithTag().

Here is the caller graph for this function:

◆ getIFDWithTag()

const TiffIFD * rawspeed::TiffIFD::getIFDWithTag ( TiffTag tag,
uint32_t index = 0 ) const
nodiscard

Definition at line 238 of file TiffIFD.cpp.

References TiffIFD(), getIFDsWithTag(), and ThrowTPE.

Here is the call graph for this function:

◆ getNextIFD()

uint32_t rawspeed::TiffIFD::getNextIFD ( ) const
inlinenodiscard

Definition at line 112 of file TiffIFD.h.

References nextIFD.

◆ getSubIFDs()

const std::vector< TiffIFDOwner > & rawspeed::TiffIFD::getSubIFDs ( ) const
inlinenodiscard

Definition at line 126 of file TiffIFD.h.

References subIFDs.

◆ hasEntry()

◆ hasEntryRecursive()

bool rawspeed::TiffIFD::hasEntryRecursive ( TiffTag tag) const
inlinenodiscard

Definition at line 122 of file TiffIFD.h.

References getEntryRecursive().

Referenced by rawspeed::KdcDecoder::decodeMetaDataInternal(), and rawspeed::DngDecoder::isAppropriateDecoder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

TiffIFD & rawspeed::TiffIFD::operator= ( const TiffIFD & )
delete

References TiffIFD().

Here is the call graph for this function:

◆ parseIFDEntry()

void rawspeed::TiffIFD::parseIFDEntry ( NORangesSet< Buffer > * ifds,
ByteStream & bs )
private

Definition at line 53 of file TiffIFD.cpp.

References add(), assert(), rawspeed::DNGPRIVATEDATA, rawspeed::EXIFIFDPOINTER, rawspeed::FUJI_RAW_IFD, rawspeed::ByteStream::getPosition(), rawspeed::MAKERNOTE, rawspeed::MAKERNOTE_ALT, parseMakerNote(), rawspeed::ByteStream::setPosition(), and rawspeed::SUBIFDS.

Referenced by TiffIFD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseMakerNote()

TiffRootIFDOwner rawspeed::TiffIFD::parseMakerNote ( NORangesSet< Buffer > * ifds,
const TiffEntry * t )
private

Definition at line 142 of file TiffIFD.cpp.

References TiffIFD(), assert(), rawspeed::big, rawspeed::TiffEntry::getData(), rawspeed::ByteStream::getPosition(), rawspeed::ByteStream::getRemainSize(), rawspeed::TiffEntry::getString(), rawspeed::ByteStream::getSubStream(), rawspeed::getTiffByteOrder(), rawspeed::ByteStream::hasPatternAt(), rawspeed::ByteStream::hasPrefix(), rawspeed::little, rawspeed::MAKE, rawspeed::DataBuffer::setByteOrder(), rawspeed::ByteStream::skipBytes(), rawspeed::ByteStream::skipPrefix(), TiffEntry, and rawspeed::trimSpaces().

Referenced by parseIFDEntry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recursivelyCheckSubIFDs()

void rawspeed::TiffIFD::recursivelyCheckSubIFDs ( int headroom) const
private

Definition at line 283 of file TiffIFD.cpp.

References TiffIFD(), assert(), rawspeed::TiffIFD::Limits::Depth, and ThrowTPE.

Referenced by TiffIFD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recursivelyIncrementSubIFDCount()

void rawspeed::TiffIFD::recursivelyIncrementSubIFDCount ( )
private

Definition at line 258 of file TiffIFD.cpp.

References TiffIFD(), and parent.

Referenced by TiffIFD().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FiffParser

friend class FiffParser
friend

Definition at line 64 of file TiffIFD.h.

References FiffParser.

Referenced by FiffParser.

◆ TiffEntry

friend class TiffEntry
friend

Definition at line 63 of file TiffIFD.h.

References TiffEntry.

Referenced by getEntry(), getEntryRecursive(), parseMakerNote(), TiffEntry, and TiffParser.

◆ TiffParser

friend class TiffParser
friend

Definition at line 65 of file TiffIFD.h.

References TiffEntry, and TiffParser.

Referenced by TiffParser.

Member Data Documentation

◆ entries

std::map<TiffTag, TiffEntryOwner> rawspeed::TiffIFD::entries
private

Definition at line 59 of file TiffIFD.h.

Referenced by add(), getEntry(), getEntryRecursive(), getIFDsWithTag(), and hasEntry().

◆ nextIFD

uint32_t rawspeed::TiffIFD::nextIFD = 0
private

Definition at line 50 of file TiffIFD.h.

Referenced by TiffIFD(), and getNextIFD().

◆ parent

TiffIFD* const rawspeed::TiffIFD::parent
private

Definition at line 52 of file TiffIFD.h.

Referenced by TiffIFD(), and recursivelyIncrementSubIFDCount().

◆ subIFDCount

int rawspeed::TiffIFD::subIFDCount = 0
private

Definition at line 56 of file TiffIFD.h.

Referenced by checkSubIFDs().

◆ subIFDCountRecursive

int rawspeed::TiffIFD::subIFDCountRecursive = 0
private

Definition at line 57 of file TiffIFD.h.

Referenced by checkSubIFDs().

◆ subIFDs

std::vector<TiffIFDOwner> rawspeed::TiffIFD::subIFDs
private

Definition at line 54 of file TiffIFD.h.

Referenced by add(), getEntryRecursive(), getIFDsWithTag(), and getSubIFDs().


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