|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Maps continuous image intensity values to discrete histogram bin indices. More...
#include <mitkIntensityQuantifier.h>


Public Member Functions | |
| mitkClassMacro (IntensityQuantifier, BaseData) | |
| Pointer | Clone () const |
| IntensityQuantifier () | |
| void | InitializeByMinimumMaximum (double minimum, double maximum, unsigned int bins) |
| Initialize with explicit minimum, maximum, and number of bins. More... | |
| void | InitializeByBinsizeAndBins (double minimum, unsigned int bins, double binsize) |
| Initialize with explicit minimum, number of bins, and bin size. More... | |
| void | InitializeByBinsizeAndMaximum (double minimum, double maximum, double binsize) |
| Initialize with explicit minimum, maximum, and bin size. More... | |
| void | InitializeByImage (const Image *image, unsigned int bins) |
| Initialize from the full intensity range of an image. More... | |
| void | InitializeByImageAndMaximum (const Image *image, double maximum, unsigned int bins) |
| Initialize from an image with a specified maximum; minimum is computed from the image. More... | |
| void | InitializeByImageAndMinimum (const Image *image, double minimum, unsigned int bins) |
| Initialize from an image with a specified minimum; maximum is computed from the image. More... | |
| void | InitializeByImageRegion (const Image *image, const Image *mask, unsigned int bins) |
| Initialize from the intensity range of masked voxels in an image. More... | |
| void | InitializeByImageRegionAndMinimum (const Image *image, const Image *mask, double minimum, unsigned int bins) |
| Initialize from masked image region with a specified minimum; maximum is computed. More... | |
| void | InitializeByImageRegionAndMaximum (const Image *image, const Image *mask, double maximum, unsigned int bins) |
| Initialize from masked image region with a specified maximum; minimum is computed. More... | |
| void | InitializeByImageAndBinsize (const Image *image, double binsize) |
| Initialize from the full image intensity range using a specified bin size. More... | |
| void | InitializeByImageAndBinsizeAndMinimum (const Image *image, double minimum, double binsize) |
| Initialize from an image with specified minimum and bin size; maximum is computed. More... | |
| void | InitializeByImageAndBinsizeAndMaximum (const Image *image, double maximum, double binsize) |
| Initialize from an image with specified maximum and bin size; minimum is computed. More... | |
| void | InitializeByImageRegionAndBinsize (const Image *image, const Image *mask, double binsize) |
| Initialize from masked image region using a specified bin size. More... | |
| void | InitializeByImageRegionAndBinsizeAndMinimum (const Image *image, const Image *mask, double minimum, double binsize) |
| Initialize from masked image region with specified minimum and bin size; maximum is computed. More... | |
| void | InitializeByImageRegionAndBinsizeAndMaximum (const Image *image, const Image *mask, double maximum, double binsize) |
| Initialize from masked image region with specified maximum and bin size; minimum is computed. More... | |
| unsigned int | IntensityToIndex (double intensity) |
| Map a continuous intensity value to a histogram bin index. More... | |
| double | IndexToMinimumIntensity (unsigned int index) |
| Get the lower bound intensity of a histogram bin. More... | |
| double | IndexToMeanIntensity (unsigned int index) |
| Get the center intensity of a histogram bin. More... | |
| double | IndexToMaximumIntensity (unsigned int index) |
| Get the upper bound intensity of a histogram bin. More... | |
| virtual bool | GetInitialized () const |
| Get whether the quantifier has been initialized. More... | |
| virtual unsigned int | GetBins () const |
| Get the number of histogram bins. More... | |
| virtual double | GetBinsize () const |
| Get the bin size (width of each bin). More... | |
| virtual double | GetMinimum () const |
| Get the minimum intensity of the histogram range. More... | |
| virtual double | GetMaximum () const |
| Get the maximum intensity of the histogram range. More... | |
| void | SetRequestedRegionToLargestPossibleRegion () override |
| Set the RequestedRegion to the LargestPossibleRegion. More... | |
| bool | RequestedRegionIsOutsideOfTheBufferedRegion () override |
| Determine whether the RequestedRegion is outside of the BufferedRegion. More... | |
| bool | VerifyRequestedRegion () override |
| Verify that the RequestedRegion is within the LargestPossibleRegion. More... | |
| void | SetRequestedRegion (const itk::DataObject *) override |
| Set the requested region from this data object to match the requested region of the data object passed in as a parameter. More... | |
| bool | IsEmpty () const override |
| Check whether the object contains data at any time step. More... | |
Public Member Functions inherited from mitk::BaseData | |
| mitkClassMacroItkParent (BaseData, itk::DataObject) | |
| BaseProperty::ConstPointer | GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override |
| Get a const property by its key. More... | |
| std::vector< std::string > | GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override |
| Get all property keys stored in the property list. More... | |
| std::vector< std::string > | GetPropertyContextNames () const override |
| Get the names of all property contexts. More... | |
| BaseProperty * | GetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override |
| Get a non-const property by its key. More... | |
| void | SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
| Set a property in the property list. More... | |
| void | RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
| Remove a property from the property list. More... | |
| const mitk::TimeGeometry * | GetTimeGeometry () const |
| Return the TimeGeometry of the data as const pointer. More... | |
| mitk::TimeGeometry * | GetTimeGeometry () |
| Return the TimeGeometry of the data as non-const pointer. More... | |
| const mitk::TimeGeometry * | GetUpdatedTimeGeometry () |
| Return the TimeGeometry of the data after ensuring it is up-to-date. More... | |
| virtual void | Expand (unsigned int timeSteps) |
| Expand the TimeGeometry to a number of time steps. More... | |
| const mitk::BaseGeometry * | GetUpdatedGeometry (int t=0) |
| Return the BaseGeometry of the data at time step t after ensuring it is up-to-date. More... | |
| mitk::BaseGeometry * | GetGeometry (int t=0) const |
| Return the BaseGeometry of the data at time step t as a non-const pointer. More... | |
| void | UpdateOutputInformation () override |
| Update the information for this BaseData so that it can be used as an output of a BaseProcess. More... | |
| void | CopyInformation (const itk::DataObject *data) override |
| Copy information from the specified data set. More... | |
| virtual bool | IsInitialized () const |
| Check whether the data has been initialized. More... | |
| virtual void | Clear () |
| Reset the data object by calling ClearData() and InitializeEmpty(). More... | |
| virtual bool | IsEmptyTimeStep (unsigned int t) const |
| Check whether the object contains data at the specified time step. More... | |
| void | ExecuteOperation (Operation *operation) override |
| Execute an operation on this data object. More... | |
| virtual void | SetGeometry (BaseGeometry *aGeometry3D) |
| Set the BaseGeometry of the data, which will be referenced (not copied!). More... | |
| virtual void | SetTimeGeometry (TimeGeometry *geometry) |
| Set the TimeGeometry of the data, which will be referenced (not copied!). More... | |
| virtual void | SetClonedGeometry (const BaseGeometry *aGeometry3D) |
| Set a clone of the provided geometry as the BaseGeometry of the data. More... | |
| virtual void | SetClonedTimeGeometry (const TimeGeometry *geometry) |
| Set a clone of the provided TimeGeometry as the TimeGeometry of the data. More... | |
| virtual void | SetClonedGeometry (const BaseGeometry *aGeometry3D, unsigned int time) |
| Set a clone of the provided geometry as the BaseGeometry of a given time step. More... | |
| mitk::PropertyList::Pointer | GetPropertyList () const |
| Get the data's property list. More... | |
| void | SetPropertyList (PropertyList *propertyList) |
| Set the data's property list, replacing the existing one. More... | |
| mitk::BaseProperty::Pointer | GetProperty (const char *propertyKey) const |
| Get a property by its key from the PropertyList. More... | |
| void | SetProperty (const char *propertyKey, BaseProperty *property) |
| Set a property in the PropertyList. More... | |
| virtual void | SetOrigin (const Point3D &origin) |
| Convenience method for setting the origin of the BaseGeometry instances of all time steps. More... | |
| itk::SmartPointer< mitk::BaseDataSource > | GetSource () const |
| Get the process object that generated this data object. More... | |
| unsigned int | GetTimeSteps () const |
| Get the number of time steps from the TimeGeometry. More... | |
| itk::ModifiedTimeType | GetMTime () const override |
| Get the modification time of this data object or its geometry, whichever was modified most recently. More... | |
| void | Graft (const DataObject *) override |
| Graft data and information from another data object. More... | |
Public Member Functions inherited from mitk::OperationActor | |
| itkTypeMacroNoParent (OperationActor) virtual ~OperationActor() | |
Public Member Functions inherited from mitk::Identifiable | |
| Identifiable () | |
| Default constructor. Generates a new random UID. More... | |
| Identifiable (const UIDType &uid) | |
| Construct with a pre-existing UID. More... | |
| Identifiable (const Identifiable &)=delete | |
| Copy construction is deleted to prevent UID duplication. More... | |
| Identifiable (Identifiable &&) noexcept | |
| Move constructor. Transfers ownership of the UID. More... | |
| virtual | ~Identifiable () |
| Virtual destructor. More... | |
| Identifiable & | operator= (const Identifiable &)=delete |
| Copy assignment is deleted to prevent UID duplication. More... | |
| Identifiable & | operator= (Identifiable &&other) noexcept |
| Move assignment operator. Transfers ownership of the UID. More... | |
| virtual UIDType | GetUID () const |
| Get the unique identifier of this object. More... | |
| UIDType | GetRuntimeUID () const noexcept |
| Get a runtime-unique ID for this object instance. More... | |
Public Member Functions inherited from mitk::IPropertyOwner | |
| ~IPropertyOwner () override | |
| virtual bool | PropertyIsOwned (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const |
| Checks if a certain property exists. More... | |
Public Member Functions inherited from mitk::IPropertyProvider | |
| virtual | ~IPropertyProvider () |
| Virtual destructor. More... | |
Static Public Member Functions | |
| static Pointer | New () |
Additional Inherited Members | |
Public Types inherited from mitk::Identifiable | |
| using | UIDType = std::string |
| Type alias for unique identifiers. More... | |
Protected Member Functions inherited from mitk::BaseData | |
| BaseData () | |
| BaseData (const BaseData &other) | |
| ~BaseData () override | |
| virtual void | InitializeTimeGeometry (unsigned int timeSteps=1) |
| Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and evenly timed. In many cases it will be necessary to overwrite this in sub-classes. More... | |
| virtual void | ClearData () |
| reset to non-initialized state, release memory More... | |
| virtual void | InitializeEmpty () |
| Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least create one empty object and call Superclass::InitializeTimeGeometry() to ensure an existing valid geometry. More... | |
| void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
Protected Member Functions inherited from mitk::Identifiable | |
| virtual void | SetUID (const UIDType &uid) |
Protected Attributes inherited from mitk::BaseData | |
| bool | m_LastRequestedRegionWasOutsideOfTheBufferedRegion |
| unsigned int | m_SourceOutputIndexDuplicate |
| bool | m_Initialized |
Maps continuous image intensity values to discrete histogram bin indices.
IntensityQuantifier provides various initialization strategies for setting up an intensity-to-bin-index mapping. Initialization can be done by explicitly providing minimum, maximum, bin count, and/or bin size, or by computing these from an image (optionally restricted to a masked region).
After initialization, IntensityToIndex() maps a continuous intensity value to a zero-based bin index, and the IndexTo*Intensity() methods perform the reverse mapping.
Definition at line 38 of file mitkIntensityQuantifier.h.
| mitk::IntensityQuantifier::IntensityQuantifier | ( | ) |
| Pointer mitk::IntensityQuantifier::Clone | ( | ) | const |
|
virtual |
Get the number of histogram bins.
|
virtual |
Get the bin size (width of each bin).
|
virtual |
Get whether the quantifier has been initialized.
|
virtual |
Get the maximum intensity of the histogram range.
|
virtual |
Get the minimum intensity of the histogram range.
| double mitk::IntensityQuantifier::IndexToMaximumIntensity | ( | unsigned int | index | ) |
Get the upper bound intensity of a histogram bin.
| [in] | index | Zero-based bin index. |
| double mitk::IntensityQuantifier::IndexToMeanIntensity | ( | unsigned int | index | ) |
Get the center intensity of a histogram bin.
| [in] | index | Zero-based bin index. |
| double mitk::IntensityQuantifier::IndexToMinimumIntensity | ( | unsigned int | index | ) |
Get the lower bound intensity of a histogram bin.
| [in] | index | Zero-based bin index. |
| void mitk::IntensityQuantifier::InitializeByBinsizeAndBins | ( | double | minimum, |
| unsigned int | bins, | ||
| double | binsize | ||
| ) |
Initialize with explicit minimum, number of bins, and bin size.
Maximum is computed as minimum + bins * binsize.
| [in] | minimum | The lower bound of the intensity range. |
| [in] | bins | Number of histogram bins. |
| [in] | binsize | Width of each bin. |
| void mitk::IntensityQuantifier::InitializeByBinsizeAndMaximum | ( | double | minimum, |
| double | maximum, | ||
| double | binsize | ||
| ) |
Initialize with explicit minimum, maximum, and bin size.
The number of bins is computed as ceil((maximum - minimum) / binsize). The actual maximum may be adjusted to be an exact multiple of binsize.
| [in] | minimum | The lower bound of the intensity range. |
| [in] | maximum | The upper bound of the intensity range. |
| [in] | binsize | Width of each bin. |
| void mitk::IntensityQuantifier::InitializeByImage | ( | const Image * | image, |
| unsigned int | bins | ||
| ) |
Initialize from the full intensity range of an image.
| [in] | image | The image from which to determine minimum and maximum intensities. |
| [in] | bins | Number of histogram bins. |
| void mitk::IntensityQuantifier::InitializeByImageAndBinsize | ( | const Image * | image, |
| double | binsize | ||
| ) |
Initialize from the full image intensity range using a specified bin size.
| [in] | image | The image from which to determine minimum and maximum intensities. |
| [in] | binsize | Width of each bin. |
| void mitk::IntensityQuantifier::InitializeByImageAndBinsizeAndMaximum | ( | const Image * | image, |
| double | maximum, | ||
| double | binsize | ||
| ) |
Initialize from an image with specified maximum and bin size; minimum is computed.
| [in] | image | The image from which to determine the minimum intensity. |
| [in] | maximum | The upper bound of the intensity range. |
| [in] | binsize | Width of each bin. |
| void mitk::IntensityQuantifier::InitializeByImageAndBinsizeAndMinimum | ( | const Image * | image, |
| double | minimum, | ||
| double | binsize | ||
| ) |
Initialize from an image with specified minimum and bin size; maximum is computed.
| [in] | image | The image from which to determine the maximum intensity. |
| [in] | minimum | The lower bound of the intensity range. |
| [in] | binsize | Width of each bin. |
| void mitk::IntensityQuantifier::InitializeByImageAndMaximum | ( | const Image * | image, |
| double | maximum, | ||
| unsigned int | bins | ||
| ) |
Initialize from an image with a specified maximum; minimum is computed from the image.
| [in] | image | The image from which to determine the minimum intensity. |
| [in] | maximum | The upper bound of the intensity range. |
| [in] | bins | Number of histogram bins. |
| void mitk::IntensityQuantifier::InitializeByImageAndMinimum | ( | const Image * | image, |
| double | minimum, | ||
| unsigned int | bins | ||
| ) |
Initialize from an image with a specified minimum; maximum is computed from the image.
| [in] | image | The image from which to determine the maximum intensity. |
| [in] | minimum | The lower bound of the intensity range. |
| [in] | bins | Number of histogram bins. |
| void mitk::IntensityQuantifier::InitializeByImageRegion | ( | const Image * | image, |
| const Image * | mask, | ||
| unsigned int | bins | ||
| ) |
Initialize from the intensity range of masked voxels in an image.
| [in] | image | The image from which to determine intensities. |
| [in] | mask | Binary mask; only voxels with mask value > 0 are considered. |
| [in] | bins | Number of histogram bins. |
| void mitk::IntensityQuantifier::InitializeByImageRegionAndBinsize | ( | const Image * | image, |
| const Image * | mask, | ||
| double | binsize | ||
| ) |
Initialize from masked image region using a specified bin size.
| [in] | image | The image from which to determine intensities. |
| [in] | mask | Binary mask; only voxels with mask value > 0 are considered. |
| [in] | binsize | Width of each bin. |
| void mitk::IntensityQuantifier::InitializeByImageRegionAndBinsizeAndMaximum | ( | const Image * | image, |
| const Image * | mask, | ||
| double | maximum, | ||
| double | binsize | ||
| ) |
Initialize from masked image region with specified maximum and bin size; minimum is computed.
| [in] | image | The image from which to determine intensities. |
| [in] | mask | Binary mask; only voxels with mask value > 0 are considered. |
| [in] | maximum | The upper bound of the intensity range. |
| [in] | binsize | Width of each bin. |
| void mitk::IntensityQuantifier::InitializeByImageRegionAndBinsizeAndMinimum | ( | const Image * | image, |
| const Image * | mask, | ||
| double | minimum, | ||
| double | binsize | ||
| ) |
Initialize from masked image region with specified minimum and bin size; maximum is computed.
| [in] | image | The image from which to determine intensities. |
| [in] | mask | Binary mask; only voxels with mask value > 0 are considered. |
| [in] | minimum | The lower bound of the intensity range. |
| [in] | binsize | Width of each bin. |
| void mitk::IntensityQuantifier::InitializeByImageRegionAndMaximum | ( | const Image * | image, |
| const Image * | mask, | ||
| double | maximum, | ||
| unsigned int | bins | ||
| ) |
Initialize from masked image region with a specified maximum; minimum is computed.
| [in] | image | The image from which to determine intensities. |
| [in] | mask | Binary mask; only voxels with mask value > 0 are considered. |
| [in] | maximum | The upper bound of the intensity range. |
| [in] | bins | Number of histogram bins. |
| void mitk::IntensityQuantifier::InitializeByImageRegionAndMinimum | ( | const Image * | image, |
| const Image * | mask, | ||
| double | minimum, | ||
| unsigned int | bins | ||
| ) |
Initialize from masked image region with a specified minimum; maximum is computed.
| [in] | image | The image from which to determine intensities. |
| [in] | mask | Binary mask; only voxels with mask value > 0 are considered. |
| [in] | minimum | The lower bound of the intensity range. |
| [in] | bins | Number of histogram bins. |
| void mitk::IntensityQuantifier::InitializeByMinimumMaximum | ( | double | minimum, |
| double | maximum, | ||
| unsigned int | bins | ||
| ) |
Initialize with explicit minimum, maximum, and number of bins.
The bin size is computed as (maximum - minimum) / bins.
| [in] | minimum | The lower bound of the intensity range. |
| [in] | maximum | The upper bound of the intensity range. |
| [in] | bins | Number of histogram bins. |
| unsigned int mitk::IntensityQuantifier::IntensityToIndex | ( | double | intensity | ) |
Map a continuous intensity value to a histogram bin index.
The index is clamped to [0, Bins-1].
| [in] | intensity | The intensity value to quantize. |
|
inlineoverridevirtual |
Check whether the object contains data at any time step.
Iterates over all time steps and returns true only if every time step is empty (or the object is not initialized).
Reimplemented from mitk::BaseData.
Definition at line 247 of file mitkIntensityQuantifier.h.
| mitk::IntensityQuantifier::mitkClassMacro | ( | IntensityQuantifier | , |
| BaseData | |||
| ) |
|
static |
|
inlineoverridevirtual |
Determine whether the RequestedRegion is outside of the BufferedRegion.
This method returns true if the RequestedRegion is outside the BufferedRegion (true if at least one pixel is outside). This is used by the pipeline mechanism to determine whether a filter needs to re-execute in order to satisfy the current request. If the current RequestedRegion is already inside the BufferedRegion from the previous execution (and the current filter is up to date), then a given filter does not need to re-execute.
Implements mitk::BaseData.
Definition at line 242 of file mitkIntensityQuantifier.h.
|
inlineoverridevirtual |
Set the requested region from this data object to match the requested region of the data object passed in as a parameter.
This method is implemented in the concrete subclasses of BaseData.
| [in] | data | The data object whose requested region will be matched. |
Implements mitk::BaseData.
Definition at line 244 of file mitkIntensityQuantifier.h.
|
inlineoverridevirtual |
Set the RequestedRegion to the LargestPossibleRegion.
This forces a filter to produce all of the output in one execution (i.e., not streaming) on the next call to Update().
Implements mitk::BaseData.
Definition at line 241 of file mitkIntensityQuantifier.h.
|
inlineoverridevirtual |
Verify that the RequestedRegion is within the LargestPossibleRegion.
If the RequestedRegion is not within the LargestPossibleRegion, then the filter cannot possibly satisfy the request. This method returns true if the request can be satisfied (even if it will be necessary to process the entire LargestPossibleRegion) and returns false otherwise. Used by PropagateRequestedRegion(), which throws an InvalidRequestedRegionError exception if the requested region is not within the LargestPossibleRegion.
Implements mitk::BaseData.
Definition at line 243 of file mitkIntensityQuantifier.h.