Esempio n. 1
0
IOHandle::IOHandle(const char* fname,
                   nitf::AccessFlags access,
                   nitf::CreationFlags creation) throw (nitf::NITFException) :
    IOInterface(open(fname, access, creation))
{
    setManaged(false);
}
Esempio n. 2
0
nitf::SegmentMemorySource::SegmentMemorySource(const char * data, size_t size,
        nitf::Off start, int byteSkip, bool copyData) throw (nitf::NITFException)
{
    setNative(nitf_SegmentMemorySource_construct(data, size, start, byteSkip,
    		                                     copyData, &error));
    setManaged(false);
}
Esempio n. 3
0
IOHandle::IOHandle(const std::string& fname,
                   nitf::AccessFlags access,
                   nitf::CreationFlags creation) throw (nitf::NITFException) :
    IOInterface(open(fname.c_str(), access, creation))
{
    setManaged(false);
}
Esempio n. 4
0
MemoryIO::MemoryIO(size_t capacity) throw(nitf::NITFException) :
    IOInterface(create(NRT_MALLOC(capacity), capacity, true))
{
    // NOTE: We are telling the C layer to adopt this memory which means it
    //       will use NRT_FREE() to deallocate it.  So, we must allocate with
    //       NRT_MALLOC().
    setManaged(false);
}
Esempio n. 5
0
nitf::SegmentReaderSource::SegmentReaderSource(nitf::SegmentReader reader)
        throw (nitf::NITFException)
{
    setNative(nitf_SegmentReaderSource_construct(reader.getNativeOrThrow(),
                                                 &error));
    setManaged(false);
    reader.setManaged(true); //TODO unmanage on deletion
}
Esempio n. 6
0
nitf::FileSource::FileSource(nitf::IOHandle & io,
                             nitf::Off start,
                             int numBytesPerPixel,
                             int pixelSkip) throw(nitf::NITFException)
{
    setNative(nitf_IOSource_construct(io.getNative(), start, numBytesPerPixel, pixelSkip, &error));
    setManaged(false);
    io.setManaged(true); //TODO must release this on destruction
}
Esempio n. 7
0
nitf::MemorySource::MemorySource(const void* data,
                                 size_t size,
                                 nitf::Off start,
                                 int numBytesPerPixel,
                                 int pixelSkip) throw(nitf::NITFException)
{
    setNative(nitf_MemorySource_construct(data, size, start, numBytesPerPixel, pixelSkip, &error));
    setManaged(false);
}
Esempio n. 8
0
nitf::DirectBlockSource::DirectBlockSource(nitf::ImageReader& imageReader, nitf::Uint32 numBands)
    throw(nitf::NITFException)
{
    setNative(nitf_DirectBlockSource_construct(this,
                                               &DirectBlockSource::nextBlock, 
                                               imageReader.getNative(), 
                                               numBands, &error));
    setManaged(false);
}
Esempio n. 9
0
nitf::SegmentFileSource::SegmentFileSource(nitf::IOHandle & io,
        nitf::Off start, int byteSkip) throw (nitf::NITFException)
{
    setNative(nitf_SegmentFileSource_constructIO(io.getNative(),
                                                 start, byteSkip,
                                                 &error));
    setManaged(false);
    io.setManaged(true); //TODO unmanage on deletion
}
Esempio n. 10
0
nitf::FileSource::FileSource(const std::string& fname,
                             nitf::Off start,
                             int numBytesPerPixel,
                             int pixelSkip) throw (nitf::NITFException)
{
    setNative(nitf_FileSource_constructFile(fname.c_str(),
                                            start,
                                            numBytesPerPixel,
                                            pixelSkip, & error));
    setManaged(false);
}
Esempio n. 11
0
nitf::RowSource::RowSource(
    nitf::Uint32 band,
    nitf::Uint32 numRows,
    nitf::Uint32 numCols,
    nitf::Uint32 pixelSize,
    nitf::RowSourceCallback *callback) throw(nitf::NITFException)
    : mBand(band),
      mNumRows(numRows),
      mNumCols(numCols),
      mPixelSize(pixelSize)
{
    setNative(nitf_RowSource_construct(callback,
                                       &RowSource::nextRow,
                                       mBand,
                                       mNumRows,
                                       mNumCols * mPixelSize,
                                       &error));
    setManaged(false);
}
Esempio n. 12
0
ImageSubheader::ImageSubheader() throw(nitf::NITFException)
{
    setNative(nitf_ImageSubheader_construct(&error));
    getNativeOrThrow();
    setManaged(false);
}
Esempio n. 13
0
nitf::HashTable::HashTable(int nbuckets) throw(nitf::NITFException)
{
    setNative(nitf_HashTable_construct(nbuckets, &error));
    getNativeOrThrow();
    setManaged(false);
}
Esempio n. 14
0
MemoryIO::MemoryIO(void* buffer, size_t size, bool adopt)
        throw(nitf::NITFException) :
    IOInterface(create(buffer, size, adopt))
{
    setManaged(false);
}
Esempio n. 15
0
nitf::PixelSkip::PixelSkip(nitf::Uint32 rowSkip, nitf::Uint32 colSkip)
        throw (nitf::NITFException)
{
    setNative(nitf_PixelSkip_construct(rowSkip, colSkip, &error));
    setManaged(false);
}
Esempio n. 16
0
nitf::Select2DownSample::Select2DownSample(nitf::Uint32 rowSkip,
        nitf::Uint32 colSkip) throw (nitf::NITFException)
{
    setNative(nitf_Select2DownSample_construct(rowSkip, colSkip, &error));
    setManaged(false);
}
Esempio n. 17
0
CustomIO::CustomIO() :
    IOInterface(createInterface(this))
{
    setManaged(false);
}