12 #ifndef mitkLevelWindow_h
13 #define mitkLevelWindow_h
17 #include <nlohmann/json_fwd.hpp>
197 bool tryPicTags =
true,
198 bool guessByCentralSlice =
true,
199 unsigned selectedComponent = 0);
Image class for storing multi-dimensional medical image data.
The LevelWindow class Class to store level/window values.
ScalarType GetRangeMax() const
Get the maximum of the valid value range.
void SetToImageRange(const Image *image)
Set level/window to the full min/max grey value range of the given image.
bool IsFixed() const
Return whether the level window settings are fixed.
ScalarType GetRange() const
Get the total size of the grey value range (max - min).
void ResetDefaultLevelWindow()
Reset the level and window to their default values.
void SetAuto(const Image *image, bool tryPicTags=true, bool guessByCentralSlice=true, unsigned selectedComponent=0)
Automatically set level/window to optimize image contrast.
LevelWindow(ScalarType level=127.5, ScalarType window=255.0)
Construct a LevelWindow with given level (center) and window (range) values.
LevelWindow(const mitk::LevelWindow &levWin)
Copy constructor.
bool IsFloatingValues() const
Check whether the image uses floating-point values.
ScalarType GetRangeMin() const
Get the minimum of the valid value range.
void SetFloatingValues(bool value)
Set whether the image uses floating-point values.
bool GetFixed() const
Return whether the level window settings are fixed.
void SetDefaultLevelWindow(ScalarType level, ScalarType window)
Set the default level and window values.
void SetFixed(bool fixed)
Lock or unlock the level window settings.
ScalarType GetDefaultUpperBound() const
Get the default upper bound (default range maximum).
ScalarType GetDefaultWindow() const
Get the default window size for the image.
ScalarType m_DefaultLowerBound
ScalarType m_DefaultUpperBound
ScalarType GetDefaultLevel() const
Get the default level value for the image.
ScalarType GetLowerWindowBound() const
Get the lower bound of the current window.
ScalarType GetDefaultLowerBound() const
Get the default lower bound (default range minimum).
virtual ~LevelWindow()
Virtual destructor.
void SetDefaultBoundaries(ScalarType low, ScalarType up)
Set the default lower and upper boundaries.
virtual bool operator!=(const LevelWindow &levWin) const
Compare two LevelWindow objects for inequality.
void SetLevelWindow(ScalarType level, ScalarType window, bool expandRangesIfNecessary=true)
Set the level and window values.
ScalarType GetUpperWindowBound() const
Get the upper bound of the current window.
ScalarType GetLevel() const
Get the level value, i.e. the center of the current grey value interval.
void ResetDefaultRangeMinMax()
Reset the range min/max to the default boundaries.
void SetWindowBounds(ScalarType lowerBound, ScalarType upperBound, bool expandRangesIfNecessary=true)
Set the lower and upper window bounds directly.
ScalarType GetWindow() const
Get the current window size, i.e. the width of the current grey value interval.
void SetRangeMinMax(ScalarType min, ScalarType max)
Set the minimum and maximum of the valid value range.
void SetToMaxWindowSize()
Set the window to cover the entire valid range.
virtual bool operator==(const LevelWindow &levWin) const
Compare two LevelWindow objects for equality.
ScalarType m_UpperWindowBound
virtual LevelWindow & operator=(const LevelWindow &levWin)
Assignment operator.
ScalarType m_LowerWindowBound
Convenience header that includes all MITK numeric types.
Find image slices visible on a given plane.
void from_json(const nlohmann::json &, GenericLookupTable< T > &)
Deserialize a GenericLookupTable from JSON.
void to_json(nlohmann::json &j, const GenericLookupTable< T > &t)
Serialize a GenericLookupTable to JSON.
double ScalarType
Scalar type used throughout MITK for geometric computations.