13 #ifndef QmitkImageStatisticsDataGenerator_h
14 #define QmitkImageStatisticsDataGenerator_h
121 bool m_IgnoreZeroValueVoxel =
false;
122 unsigned int m_HistogramNBins = 100;
#define MITKIMAGESTATISTICSUI_EXPORT
Base class for background data generation jobs used by QmitkDataGeneratorBase and derived classes.
Base class for data generators that accept image and ROI nodes as vectors.
QmitkImageAndRoiDataGeneratorBase & operator=(const QmitkImageAndRoiDataGeneratorBase &)=delete
Generates and manages ImageStatisticsContainer results for image/ROI pairs.
QmitkImageStatisticsDataGenerator(QObject *parent=nullptr)
Constructs the generator without an initial data storage.
mitk::DataNode::Pointer GetLatestResult(const mitk::DataNode *imageNode, const mitk::DataNode *roiNode, bool onlyIfUpToDate=false, bool noWIP=true) const
Returns the latest statistics result node for a given image/ROI pair and current settings.
bool ChangedNodeIsRelevant(const mitk::DataNode *changedNode) const
Determines whether a changed data node is relevant and should trigger a regeneration.
mitk::DataNode::Pointer PrepareResultForStorage(const std::string &label, mitk::BaseData *result, const QmitkDataGenerationJobBase *job) const
Wraps a generation result in a data node suitable for storage.
bool GetIgnoreZeroValueVoxel() const
Returns whether zero-valued voxels are currently being ignored.
void RemoveObsoleteDataNodes(const mitk::DataNode *imageNode, const mitk::DataNode *roiNode) const
Removes obsolete result nodes for the given image/ROI pair from the data storage.
void IndicateFutureResults(const mitk::DataNode *imageNode, const mitk::DataNode *roiNode) const
Adds placeholder nodes and WIP dummy data to the data storage for missing or outdated results.
bool IsValidResultAvailable(const mitk::DataNode *imageNode, const mitk::DataNode *roiNode) const
Checks whether a valid, up-to-date statistics result exists for the given image/ROI pair.
std::string GenerateStatisticsNodeName(const mitk::Image *image, const mitk::BaseData *roi) const
Generates a unique node name for a statistics result based on image, ROI, and current settings.
void SetIgnoreZeroValueVoxel(bool _arg)
Sets whether zero-valued voxels should be ignored in statistics computation.
unsigned int GetHistogramNBins() const
Returns the current number of histogram bins.
QmitkImageStatisticsDataGenerator(mitk::DataStorage::Pointer storage, QObject *parent=nullptr)
Constructs the generator with a data storage.
QmitkImageStatisticsDataGenerator(const QmitkImageStatisticsDataGenerator &)=delete
std::pair< QmitkDataGenerationJobBase *, mitk::DataNode::Pointer > GetNextMissingGenerationJob(const mitk::DataNode *imageNode, const mitk::DataNode *roiNode) const
Returns the next generation job and its associated placeholder node.
void SetHistogramNBins(unsigned int nbins)
Sets the number of bins for histogram computation.
Base class of all data objects.
Central node class of the MITK data tree, associating a data object with properties and mappers.
Image class for storing multi-dimensional medical image data.