ImFusion C++ SDK 4.4.0
ImFusion::DataSet Class Reference
Inheritance diagram for ImFusion::DataSet:

Classes

class  TypeSpecificData
class  GeometricAnnotationData
class  PixelwiseData

Public Member Functions

const Imageimage () const
DataDescriptordescriptor () const
SharedImageSetdata ()
const SharedImageSetdata () const
size_t frame () const
size_t frameCount () const
void tryToLock ()
void refreshLock ()
void unlock ()
bool hasLock () const
std::optional< Network::LockTokenlockToken () const
bool isReadOnly () const
bool isEditable () const
 Returns whether the dataset can be edited (i.e.
CroppingMaskmask ()
const CroppingMaskmask () const
void setMaskChanged ()
void release ()
Utils::Expected< void, std::stringsave (Progress *progress)
bool hasData (size_t frame) const
std::unique_ptr< QImage > getThumbnail ()
SharedImageSetrelatedImage () const
void loadRelatedImage (const DataDescriptor::RelatedData &relatedData, Progress *progress=nullptr)
void unloadRelatedImage ()
PixelwiseDatapixelwise (std::optional< size_t >={})
const PixelwiseDatapixelwise (std::optional< size_t >={}) const
GeometricAnnotationDatageometricAnnotations (std::optional< size_t >={})
const GeometricAnnotationDatageometricAnnotations (std::optional< size_t >={}) const
bool saveLayersToImFusionFile (const std::string &path)
 Saves all layers into a ImFusionFile.
Utils::Expected< std::unique_ptr< SharedImageSet >, std::stringrestorePixelwiseLayerFromImFusionFile (const std::string &path, const std::string &layerId) const
 Restores a pixelwise layer from an ImFusionFile.
Utils::Expected< GeometricAnnotations, std::stringrestoreGeoAnnotationLayerFromImFusionFile (const std::string &path, const std::string &layerId) const
 Restores a pixelwise layer from an ImFusionFile.
Public Member Functions inherited from ImFusion::SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.

Static Public Member Functions

static Utils::Expected< std::unique_ptr< DataSet >, std::stringload (DataDescriptor &d, Progress *progress=nullptr)
static std::unique_ptr< DataSet > load (DataDescriptor &d, SharedImageSet &sis, SharedImageSet &labels, bool dataOwned)
static std::unique_ptr< DataSet > load (DataDescriptor &d, SharedImageSet &sis, std::unique_ptr< SharedImageSet > labels, bool dataOwned)
static bool setRelatedMatrix (const DataDescriptor::RelatedData &relatedData, const DataDescriptor *relatedDesc, const DataDescriptor *referenceDesc, SharedImageSet *relatedImage, const SharedImageSet *referenceImage)

Public Attributes

Signal signalRelatedImageLoadedPre
Signal signalRelatedImageLoadedPost
Signal maskChanged
Signal windowLevelChanged
Signal savedPre
Signal savedPost

Additional Inherited Members

Protected Member Functions inherited from ImFusion::SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.

Member Function Documentation

◆ isEditable()

bool ImFusion::DataSet::isEditable ( ) const

Returns whether the dataset can be edited (i.e.

name or tags can be changed). This depends on whether the Project or DataDescriptor is read-only and the current user having sufficient permissions.

◆ saveLayersToImFusionFile()

bool ImFusion::DataSet::saveLayersToImFusionFile ( const std::string & path)

Saves all layers into a ImFusionFile.

The labelmaps will be saved with the layer id as name. Geometric annotations are saved inside the properties in sub-properties also using the layer id as name.

◆ restorePixelwiseLayerFromImFusionFile()

Utils::Expected< std::unique_ptr< SharedImageSet >, std::string > ImFusion::DataSet::restorePixelwiseLayerFromImFusionFile ( const std::string & path,
const std::string & layerId ) const

Restores a pixelwise layer from an ImFusionFile.

Does not change the layers of this dataset! The ImFusionFile is assumed to be created by saveLayersToImFusionFile. An error is returned if no labelmap with layerId as name is contained in the file.

◆ restoreGeoAnnotationLayerFromImFusionFile()

Utils::Expected< GeometricAnnotations, std::string > ImFusion::DataSet::restoreGeoAnnotationLayerFromImFusionFile ( const std::string & path,
const std::string & layerId ) const

Restores a pixelwise layer from an ImFusionFile.

Does not change the layers of this dataset! The ImFusionFile is assumed to be created by saveLayersToImFusionFile. An error is returned if no annotations with layerId as name is contained in the properties of the file.


The documentation for this class was generated from the following file:
  • ImFusionLabels/lib/include/ImFusion/Labels/Core/DataSet.h
Search Tab / S to search, Esc to close