libCZI
Reading and Writing CZI documents made easy
|
#include <libCZI_Write.h>
Public Member Functions | |
virtual void | Create (std::shared_ptr< IOutputStream > stream, std::shared_ptr< ICziWriterInfo > info)=0 |
virtual void | SyncAddSubBlock (const AddSubBlockInfo &addSbBlkInfo)=0 |
virtual void | SyncAddAttachment (const AddAttachmentInfo &addAttachmentInfo)=0 |
virtual void | SyncWriteMetadata (const WriteMetadataInfo &metadataInfo)=0 |
virtual std::shared_ptr< libCZI::ICziMetadataBuilder > | GetPreparedMetadata (const PrepareMetadataInfo &info)=0 |
virtual void | Close ()=0 |
virtual libCZI::SubBlockStatistics | GetStatistics () const =0 |
void | SyncAddSubBlock (const AddSubBlockInfoMemPtr &addSbBlkInfo) |
void | SyncAddSubBlock (const libCZI::AddSubBlockInfoLinewiseBitmap &addSbInfoLinewise) |
void | SyncAddSubBlock (const AddSubBlockInfoStridedBitmap &addSbBlkInfoStrideBitmap) |
This interface is used in order to write a CZI-file. The sequence of operations is: the object is initialized by calling the Create-method. Then use SyncAddSubBlock, SyncAddAttachment and SyncWriteMetadata to put data into the document. Finally, call Close which will finalized the document. Note that this object is not thread-safe. Calls into any of the functions must be synchronized, i. e. at no point in time we may execute different methods (or the same method for that matter) concurrently. The class by itself does not guard itself against concurrent execution.
|
pure virtual |
Finalizes the CZI (i.e. writes out the final directory-segments) and closes the file. Note that this method must be called explicitely in order to get a valid CZI - calling the destructor alone will close the file immediately without finalization.
|
pure virtual |
Initialize the writer by passing in the output-stream-object.
stream | The stream-object. |
info | Settings for document-creation. May be null. |
|
pure virtual |
Gets a "pre-filled" metadata object. This metadata object contains the information which is already known by the writer.
info | Information controlling the operation. |
|
pure virtual |
Gets the statistics about the sub-blocks. This statistics is aggregated from the subblocks as they are added.
|
pure virtual |
Adds the specified attachment to the CZI-file. This is a synchronous method, meaning that it will return when all data has been written out to the file AND that it must not be called concurrently with other method-invocations of this object.
addAttachmentInfo | Information describing attachment to be added. |
|
pure virtual |
Adds the specified subblock to the CZI-file. This is a synchronous method, meaning that it will return when all data has been written out to the file AND that it must not be called concurrently with other method-invocations of this object. If there are bounds specified (with the 'info'-argument to 'Create') then the coordinate is checked against the bounds. In case of any error, an exception is thrown.
addSbBlkInfo | Information describing the subblock to be added. |
void libCZI::ICziWriter::SyncAddSubBlock | ( | const AddSubBlockInfoMemPtr & | addSbBlkInfo | ) |
This helper method uses the structure 'AddSubBlockInfoMemPtr' in order to describe the subblock to be added. What it does is to cast the parameters into the form required by the ICziWriter::SyncAddSubBlock method and call it.
addSbBlkInfo | Information describing the subblock to be added. |
void libCZI::ICziWriter::SyncAddSubBlock | ( | const AddSubBlockInfoStridedBitmap & | addSbBlkInfoStrideBitmap | ) |
This helper method uses the structure 'AddSubBlockInfoStridedBitmap' in order to describe the subblock to be added. What it does is to cast the parameters into the form required by the ICziWriter::SyncAddSubBlock method and call it.
addSbBlkInfoStrideBitmap | Information describing the subblock to be added. |
void libCZI::ICziWriter::SyncAddSubBlock | ( | const libCZI::AddSubBlockInfoLinewiseBitmap & | addSbInfoLinewise | ) |
This helper method uses the structure 'AddSubBlockInfoLinewiseBitmap' in order to describe the subblock to be added. What it does is to cast the parameters into the form required by the ICziWriter::SyncAddSubBlock method and call it.
addSbInfoLinewise | Information describing the subblock to be added. |
|
pure virtual |
Adds the specified metadata to the CZI-file. This is a synchronous method, meaning that it will return when all data has been written out to the file AND that it must not be called concurrently with other method-invocations of this object.
metadataInfo | Information describing the metadata to be added. |