Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkImage.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkImage_h
14 #define mitkImage_h
15 
16 #include <mitkBaseData.h>
17 #include <mitkImageAccessorBase.h>
18 #include <mitkImageDataItem.h>
19 #include <mitkImageDescriptor.h>
21 #include <mitkLevelWindow.h>
22 #include <mitkPlaneGeometry.h>
23 #include <mitkSlicedData.h>
24 #include <MitkCoreExports.h>
26 
27 #ifndef __itkHistogram_h
28 #include <itkHistogram.h>
29 #endif
30 
31 class vtkImageData;
32 
33 namespace itk
34 {
35  template <class T>
37 }
38 
39 namespace mitk
40 {
41  class SubImageSelector;
42  class ImageTimeSelector;
43 
44  class ImageStatisticsHolder;
45 
76  {
77  friend class SubImageSelector;
78 
79  friend class ImageAccessorBase;
80  friend class ImageVtkReadAccessor;
81  friend class ImageVtkWriteAccessor;
82  friend class ImageReadAccessor;
83  friend class ImageWriteAccessor;
84 
85  public:
87 
88  itkFactorylessNewMacro(Self);
89 
90  itkCloneMacro(Self);
91 
94 
96  typedef itk::Statistics::Histogram<double> HistogramType;
97 
100 
108  {
112  DontManageMemory = ReferenceMemory
113  };
114 
121  typedef std::vector<ImageDataItemPointer> ImageDataItemPointerArray;
122 
123  public:
131  const mitk::PixelType GetPixelType(int n = 0) const;
132 
138  unsigned int GetDimension() const;
139 
151  unsigned int GetDimension(int i) const;
152 
153  public:
165  virtual vtkImageData *GetVtkImageData(int t = 0, int n = 0);
166 
168  virtual const vtkImageData *GetVtkImageData(int t = 0, int n = 0) const;
169 
178  bool IsSliceSet(int s = 0, int t = 0, int n = 0) const override;
179 
187  bool IsVolumeSet(int t = 0, int n = 0) const override;
188 
195  bool IsChannelSet(int n = 0) const override;
196 
214  virtual bool SetSlice(const void *data, int s = 0, int t = 0, int n = 0);
215 
232  virtual bool SetVolume(const void *data, int t = 0, int n = 0);
233 
249  virtual bool SetChannel(const void *data, int n = 0);
250 
267  virtual bool SetImportSlice(
268  void *data, int s = 0, int t = 0, int n = 0, ImportMemoryManagementType importMemoryManagement = CopyMemory);
269 
285  virtual bool SetImportVolume(void *data,
286  int t = 0,
287  int n = 0,
288  ImportMemoryManagementType importMemoryManagement = CopyMemory);
289 
300  virtual bool SetImportVolume(const void *const_data, int t = 0, int n = 0);
301 
316  virtual void AllocateZeroedVolume(int t = 0, int n = 0);
317 
332  virtual bool SetImportChannel(void *data,
333  int n = 0,
334  ImportMemoryManagementType importMemoryManagement = CopyMemory);
335 
347  virtual void Initialize(const mitk::PixelType &type,
348  unsigned int dimension,
349  const unsigned int *dimensions,
350  unsigned int channels = 1);
351 
360  virtual void Initialize(const mitk::PixelType &type,
361  const mitk::BaseGeometry &geometry,
362  unsigned int channels = 1,
363  int tDim = 1);
364 
374  virtual void Initialize(const mitk::PixelType &type,
375  const mitk::TimeGeometry &geometry,
376  unsigned int channels = 1,
377  int tDim = -1);
378 
394  virtual void Initialize(const mitk::PixelType &type,
395  int sDim,
396  const mitk::PlaneGeometry &geometry2d,
397  unsigned int channels = 1,
398  int tDim = 1);
399 
407  virtual void Initialize(const mitk::Image *image);
408 
414  virtual void Initialize(const mitk::ImageDescriptor::Pointer inDesc);
415 
428  virtual void Initialize(vtkImageData *vtkimagedata, int channels = 1, int tDim = -1, int sDim = -1, int pDim = -1);
429 
442  template <typename itkImageType>
443  void InitializeByItk(const itkImageType *itkimage, int channels = 1, int tDim = -1, int sDim = -1)
444  {
445  if (itkimage == nullptr)
446  return;
447 
448  MITK_DEBUG << "Initializing MITK image from ITK image.";
449  // build array with dimensions in each direction with at least 4 entries
450  m_Dimension = itkimage->GetImageDimension();
451  unsigned int i, *tmpDimensions = new unsigned int[m_Dimension > 4 ? m_Dimension : 4];
452  for (i = 0; i < m_Dimension; ++i)
453  tmpDimensions[i] = itkimage->GetLargestPossibleRegion().GetSize().GetSize()[i];
454  if (m_Dimension < 4)
455  {
456  unsigned int *p;
457  for (i = 0, p = tmpDimensions + m_Dimension; i < 4 - m_Dimension; ++i, ++p)
458  *p = 1;
459  }
460 
461  // overwrite number of slices if sDim is set
462  if ((m_Dimension > 2) && (sDim >= 0))
463  tmpDimensions[2] = sDim;
464  // overwrite number of time points if tDim is set
465  if ((m_Dimension > 3) && (tDim >= 0))
466  tmpDimensions[3] = tDim;
467 
468  // rough initialization of Image
469  // mitk::PixelType importType = ImportItkPixelType( itkimage::PixelType );
470 
471  Initialize(
472  MakePixelType<itkImageType>(itkimage->GetNumberOfComponentsPerPixel()), m_Dimension, tmpDimensions, channels);
473  const typename itkImageType::SpacingType &itkspacing = itkimage->GetSpacing();
474 
475  MITK_DEBUG << "ITK spacing " << itkspacing;
476  // access spacing of itk::Image
477  Vector3D spacing;
478  FillVector3D(spacing, itkspacing[0], 1.0, 1.0);
479  if (m_Dimension >= 2)
480  spacing[1] = itkspacing[1];
481  if (m_Dimension >= 3)
482  spacing[2] = itkspacing[2];
483 
484  // access origin of itk::Image
485  Point3D origin;
486  const typename itkImageType::PointType &itkorigin = itkimage->GetOrigin();
487  MITK_DEBUG << "ITK origin " << itkorigin;
488  FillVector3D(origin, itkorigin[0], 0.0, 0.0);
489  if (m_Dimension >= 2)
490  origin[1] = itkorigin[1];
491  if (m_Dimension >= 3)
492  origin[2] = itkorigin[2];
493 
494  // access direction of itk::Imagm_PixelType = new mitk::PixelType(type);e and include spacing
495  const typename itkImageType::DirectionType &itkdirection = itkimage->GetDirection();
496  MITK_DEBUG << "ITK direction " << itkdirection;
497  mitk::Matrix3D matrix;
498  matrix.SetIdentity();
499  unsigned int j, itkDimMax3 = (m_Dimension >= 3 ? 3 : m_Dimension);
500  // check if spacing has no zero entry and itkdirection has no zero columns
501  bool itkdirectionOk = true;
502  mitk::ScalarType columnSum;
503  for (j = 0; j < itkDimMax3; ++j)
504  {
505  columnSum = 0.0;
506  for (i = 0; i < itkDimMax3; ++i)
507  {
508  columnSum += fabs(itkdirection[i][j]);
509  }
510  if (columnSum < mitk::eps)
511  {
512  itkdirectionOk = false;
513  }
514  if ((spacing[j] < -mitk::eps) // (normally sized) negative value
515  &&
516  (j == 2) && (m_Dimensions[2] == 1))
517  {
518  // Negative spacings can occur when reading single DICOM slices with ITK via GDCMIO
519  // In these cases spacing is not determined by ITK correctly (because it distinguishes correctly
520  // between slice thickness and inter slice distance -- slice distance is meaningless for
521  // single slices).
522  // I experienced that ITK produced something meaningful nonetheless because it is
523  // evaluating the tag "(0018,0088) Spacing between slices" as a fallback. This tag is not
524  // reliable (http://www.itk.org/pipermail/insight-users/2005-September/014711.html)
525  // but gives at least a hint.
526  // In real world cases I experienced that this tag contained the correct inter slice distance
527  // with a negative sign, so we just invert such negative spacings.
528  MITK_WARN << "Illegal value of itk::Image::GetSpacing()[" << j << "]=" << spacing[j]
529  << ". Using inverted value " << -spacing[j];
530  spacing[j] = -spacing[j];
531  }
532  else if (spacing[j] < mitk::eps) // value near zero
533  {
534  MITK_ERROR << "Illegal value of itk::Image::GetSpacing()[" << j << "]=" << spacing[j]
535  << ". Using 1.0 instead.";
536  spacing[j] = 1.0;
537  }
538  }
539  if (itkdirectionOk == false)
540  {
541  MITK_ERROR << "Illegal matrix returned by itk::Image::GetDirection():" << itkdirection
542  << " Using identity instead.";
543  for (i = 0; i < itkDimMax3; ++i)
544  for (j = 0; j < itkDimMax3; ++j)
545  if (i == j)
546  matrix[i][j] = spacing[j];
547  else
548  matrix[i][j] = 0.0;
549  }
550  else
551  {
552  for (i = 0; i < itkDimMax3; ++i)
553  for (j = 0; j < itkDimMax3; ++j)
554  matrix[i][j] = itkdirection[i][j] * spacing[j];
555  }
556 
557  // re-initialize PlaneGeometry with origin and direction
558  PlaneGeometry *planeGeometry = static_cast<PlaneGeometry *>(GetSlicedGeometry(0)->GetPlaneGeometry(0));
559  planeGeometry->SetOrigin(origin);
560  planeGeometry->GetIndexToWorldTransform()->SetMatrix(matrix);
561 
562  // re-initialize SlicedGeometry3D
563  SlicedGeometry3D *slicedGeometry = GetSlicedGeometry(0);
564  slicedGeometry->InitializeEvenlySpaced(planeGeometry, m_Dimensions[2]);
565  slicedGeometry->SetSpacing(spacing);
566 
567  // re-initialize TimeGeometry
568  ProportionalTimeGeometry::Pointer timeGeometry = ProportionalTimeGeometry::New();
569  timeGeometry->Initialize(slicedGeometry, m_Dimensions[3]);
570  SetTimeGeometry(timeGeometry);
571 
572  // clean-up
573  delete[] tmpDimensions;
574 
575  this->Initialize();
576  }
577 
588  virtual bool IsValidSlice(int s = 0, int t = 0, int n = 0) const;
589 
599  virtual bool IsValidVolume(int t = 0, int n = 0) const;
600 
609  virtual bool IsValidChannel(int n = 0) const;
610 
619  bool IsRotated() const;
620 
627  unsigned int *GetDimensions() const;
628 
634  ImageDescriptor::Pointer GetImageDescriptor() const { return m_ImageDescriptor; }
635 
642  ChannelDescriptor GetChannelDescriptor(int id = 0) const { return m_ImageDescriptor->GetChannelDescriptor(id); }
643 
652  void SetGeometry(BaseGeometry *aGeometry3D) override;
653 
668  int t = 0,
669  int n = 0,
670  void *data = nullptr,
671  ImportMemoryManagementType importMemoryManagement = CopyMemory) const;
672 
686  int n = 0,
687  void *data = nullptr,
688  ImportMemoryManagementType importMemoryManagement = CopyMemory) const;
689 
702  void *data = nullptr,
703  ImportMemoryManagementType importMemoryManagement = CopyMemory) const;
704 
723  void *GetData(int t = 0, int n = 0);
724 
726  const void *GetData(int t = 0, int n = 0) const;
727 
737  StatisticsHolderPointer GetStatistics() const { return m_ImageStatistics; }
738 
739  protected:
741 
742  typedef std::lock_guard<std::mutex> MutexHolder;
743 
744  int GetSliceIndex(int s = 0, int t = 0, int n = 0) const;
745 
746  int GetVolumeIndex(int t = 0, int n = 0) const;
747 
749 
750  virtual bool IsValidTimeStep(int t) const;
751 
752  void Expand(unsigned int timeSteps) override;
753 
755  int s = 0,
756  int t = 0,
757  int n = 0,
758  void *data = nullptr,
759  ImportMemoryManagementType importMemoryManagement = CopyMemory) const;
760 
762  int t = 0, int n = 0, void *data = nullptr, ImportMemoryManagementType importMemoryManagement = CopyMemory) const;
763 
765  int n = 0, void *data = nullptr, ImportMemoryManagementType importMemoryManagement = CopyMemory) const;
766 
767  Image();
768 
769  Image(const Image &other);
770 
771  ~Image() override;
772 
773  void Clear() override;
774 
776  void Initialize() override;
777 
778  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
779 
783  mutable std::mutex m_ImageDataArraysLock;
784 
785  unsigned int m_Dimension;
786 
787  unsigned int *m_Dimensions;
788 
789  ImageDescriptor::Pointer m_ImageDescriptor;
790 
791  size_t *m_OffsetTable;
793 
794  // Image statistics Holder replaces the former implementation directly inside this class
795  friend class ImageStatisticsHolder;
797 
798  private:
799  ImageDataItemPointer GetSliceData_unlocked(
800  int s, int t, int n, void *data, ImportMemoryManagementType importMemoryManagement) const;
801  ImageDataItemPointer GetVolumeData_unlocked(int t,
802  int n,
803  void *data,
804  ImportMemoryManagementType importMemoryManagement) const;
805  ImageDataItemPointer GetChannelData_unlocked(int n,
806  void *data,
807  ImportMemoryManagementType importMemoryManagement) const;
808 
809  ImageDataItemPointer AllocateSliceData_unlocked(
810  int s, int t, int n, void *data, ImportMemoryManagementType importMemoryManagement) const;
811  ImageDataItemPointer AllocateVolumeData_unlocked(int t,
812  int n,
813  void *data,
814  ImportMemoryManagementType importMemoryManagement) const;
815  ImageDataItemPointer AllocateChannelData_unlocked(int n,
816  void *data,
817  ImportMemoryManagementType importMemoryManagement) const;
818 
819  bool IsSliceSet_unlocked(int s, int t, int n) const;
820  bool IsVolumeSet_unlocked(int t, int n) const;
821  bool IsChannelSet_unlocked(int n) const;
822 
824  mutable std::vector<ImageAccessorBase *> m_Readers;
826  mutable std::vector<ImageAccessorBase *> m_Writers;
828  mutable std::vector<ImageAccessorBase *> m_VtkReaders;
829 
831  mutable std::mutex m_ReadWriteLock;
833  mutable std::mutex m_VtkReadersLock;
834  };
835 
836 
837  using ImageDimensionVectorType = std::vector<unsigned int>;
839 
858  MITKCORE_EXPORT bool Equal(const mitk::Image &leftHandSide,
859  const mitk::Image &rightHandSide,
860  ScalarType eps,
861  bool verbose);
862 
863 } // namespace mitk
864 
865 #endif
#define MITKCORE_EXPORT
Abstract base class describing the geometry of a data object.
void SetSpacing(const mitk::Vector3D &aSpacing, bool enforceSetSpacing=false)
Set the spacing (voxel size) for each axis.
mitk::AffineTransform3D * GetIndexToWorldTransform()
Get the affine transform that maps index coordinates to world coordinates.
void SetOrigin(const Point3D &origin)
Set the origin of the geometry in world coordinates (mm).
Holds essential information about a single channel of an Image.
Provides locked read-only access to a particular region of image data.
Class holding the statistics information about a single mitk::Image.
Provides read access to image data in the form required by VTK methods.
Provides write access to image data in the form required by VTK methods.
Provides locked write access to a particular region of image data.
Image class for storing multi-dimensional medical image data.
Definition: mitkImage.h:76
virtual void Initialize(const mitk::PixelType &type, int sDim, const mitk::PlaneGeometry &geometry2d, unsigned int channels=1, int tDim=1)
Initialize (or re-initialize) image from a PlaneGeometry and number of slices.
~Image() override
bool IsRotated() const
Check whether the image has a rotated geometry.
ImageDataItemPointerArray m_Slices
Definition: mitkImage.h:782
void SetGeometry(BaseGeometry *aGeometry3D) override
Set the geometry of the image.
ImageDataItemPointerArray m_Channels
Definition: mitkImage.h:780
ImageDataItemPointer m_CompleteData
Definition: mitkImage.h:792
itk::Statistics::Histogram< double > HistogramType
Histogram type used for image statistics (double-precision).
Definition: mitkImage.h:96
unsigned int * GetDimensions() const
Get the sizes of all dimensions as an integer array.
void Expand(unsigned int timeSteps) override
Expand the TimeGeometry to a number of time steps.
virtual void AllocateZeroedVolume(int t=0, int n=0)
Allocate a zero-initialized volume at time t in channel n.
StatisticsHolderPointer m_ImageStatistics
Definition: mitkImage.h:796
virtual bool SetImportVolume(void *data, int t=0, int n=0, ImportMemoryManagementType importMemoryManagement=CopyMemory)
Set data as volume at time t in channel n with configurable memory management.
virtual ImageDataItemPointer AllocateSliceData(int s=0, int t=0, int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const
std::mutex m_ImageDataArraysLock
Definition: mitkImage.h:783
std::vector< ImageDataItemPointer > ImageDataItemPointerArray
Vector container of SmartPointers to ImageDataItems.
Definition: mitkImage.h:121
void Clear() override
Reset the data object by calling ClearData() and InitializeEmpty().
virtual bool SetImportChannel(void *data, int n=0, ImportMemoryManagementType importMemoryManagement=CopyMemory)
Set data as the data for channel n with configurable memory management.
size_t * m_OffsetTable
Definition: mitkImage.h:791
mitk::ImageStatisticsHolder * StatisticsHolderPointer
Pointer type to the ImageStatisticsHolder.
Definition: mitkImage.h:99
void PrintSelf(std::ostream &os, itk::Indent indent) const override
virtual bool SetSlice(const void *data, int s=0, int t=0, int n=0)
Set data as slice s at time t in channel n.
std::lock_guard< std::mutex > MutexHolder
Definition: mitkImage.h:742
itk::SmartPointer< ImageDataItem > ImageDataItemPointer
Smart Pointer type to an ImageDataItem.
Definition: mitkImage.h:90
virtual void Initialize(const mitk::PixelType &type, const mitk::BaseGeometry &geometry, unsigned int channels=1, int tDim=1)
Initialize (or re-initialize) image from a BaseGeometry.
virtual bool IsValidVolume(int t=0, int n=0) const
Check whether the volume at time t in channel n is valid.
void ComputeOffsetTable()
ImageDescriptor::Pointer GetImageDescriptor() const
Get the image descriptor containing type and dimension information.
Definition: mitkImage.h:634
virtual ImageDataItemPointer GetSliceData(int s=0, int t=0, int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const
Get the ImageDataItem for slice s at time t in channel n.
ChannelDescriptor GetChannelDescriptor(int id=0) const
Get the channel descriptor for channel id.
Definition: mitkImage.h:642
virtual ImageDataItemPointer AllocateVolumeData(int t=0, int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const
virtual bool SetImportSlice(void *data, int s=0, int t=0, int n=0, ImportMemoryManagementType importMemoryManagement=CopyMemory)
Set data as slice s at time t in channel n with configurable memory management.
int GetVolumeIndex(int t=0, int n=0) const
virtual void Initialize(const mitk::ImageDescriptor::Pointer inDesc)
Initialize (or re-initialize) image from an ImageDescriptor.
unsigned int * m_Dimensions
Definition: mitkImage.h:787
void InitializeByItk(const itkImageType *itkimage, int channels=1, int tDim=-1, int sDim=-1)
Initialize (or re-initialize) image from a templated ITK image.
Definition: mitkImage.h:443
virtual bool IsValidTimeStep(int t) const
virtual ImageDataItemPointer GetChannelData(int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const
Get the ImageDataItem for channel n.
virtual void Initialize(vtkImageData *vtkimagedata, int channels=1, int tDim=-1, int sDim=-1, int pDim=-1)
Initialize (or re-initialize) image from a vtkImageData.
virtual bool IsValidChannel(int n=0) const
Check whether channel n is valid.
void Initialize() override
mitkClassMacro(Image, SlicedData)
bool IsChannelSet(int n=0) const override
Check whether channel n is set.
unsigned int GetDimension(int i) const
Get the size of dimension i.
unsigned int GetDimension() const
Get the number of dimensions of the image.
void * GetData(int t=0, int n=0)
Get a raw pointer to the volume data at t in channel n without locking.
int GetSliceIndex(int s=0, int t=0, int n=0) const
bool IsVolumeSet(int t=0, int n=0) const override
Check whether the volume at time t in channel n is set.
Image(const Image &other)
virtual bool SetImportVolume(const void *const_data, int t=0, int n=0)
Set const_data as volume at time t in channel n (copy-only).
ImageDescriptor::Pointer m_ImageDescriptor
Definition: mitkImage.h:789
virtual bool SetVolume(const void *data, int t=0, int n=0)
Set data as volume at time t in channel n.
virtual ImageDataItemPointer AllocateChannelData(int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const
const mitk::PixelType GetPixelType(int n=0) const
Returns the PixelType of channel n.
virtual ImageDataItemPointer GetVolumeData(int t=0, int n=0, void *data=nullptr, ImportMemoryManagementType importMemoryManagement=CopyMemory) const
Get the ImageDataItem for the volume at time t in channel n.
bool IsSliceSet(int s=0, int t=0, int n=0) const override
Check whether slice s at time t in channel n is set.
virtual void Initialize(const mitk::PixelType &type, const mitk::TimeGeometry &geometry, unsigned int channels=1, int tDim=-1)
Initialize (or re-initialize) image from a TimeGeometry.
virtual vtkImageData * GetVtkImageData(int t=0, int n=0)
Get a volume at a specific time step t of channel n as a vtkImageData.
unsigned int m_Dimension
Definition: mitkImage.h:785
virtual bool SetChannel(const void *data, int n=0)
Set data as the data for channel n.
virtual const vtkImageData * GetVtkImageData(int t=0, int n=0) const
Get a volume at a specific time step t of channel n as a vtkImageData.
StatisticsHolderPointer GetStatistics() const
Get the ImageStatisticsHolder that provides statistics for this image.
Definition: mitkImage.h:737
mitkCloneMacro(Self)
ImportMemoryManagementType
Defines how imported memory is managed when setting data on an Image.
Definition: mitkImage.h:108
@ CopyMemory
Data is copied to a new memory block owned by the Image. The original buffer is not freed by Image.
Definition: mitkImage.h:109
@ ReferenceMemory
Data is referenced by the Image. The Image does not free the buffer on deletion; the caller retains o...
Definition: mitkImage.h:111
@ ManageMemory
Data is referenced by the Image. The Image takes ownership and will free the buffer on deletion.
Definition: mitkImage.h:110
virtual void Initialize(const mitk::PixelType &type, unsigned int dimension, const unsigned int *dimensions, unsigned int channels=1)
Initialize (or re-initialize) image with pixel type and dimensions.
ImageDataItemPointerArray m_Volumes
Definition: mitkImage.h:781
const void * GetData(int t=0, int n=0) const
Get a raw pointer to the volume data at t in channel n without locking.
virtual void Initialize(const mitk::Image *image)
Initialize (or re-initialize) image from another mitk::Image.
virtual bool IsValidSlice(int s=0, int t=0, int n=0) const
Check whether slice s at time t in channel n is valid.
MITK matrix type extending itk::Matrix with additional constructors and utility methods.
Definition: mitkMatrix.h:32
Describes the data type of image pixels.
Definition: mitkPixelType.h:75
Describes the geometry of a plane object.
Super class of data objects consisting of slices.
Describes the geometry of a data object consisting of slices.
virtual void InitializeEvenlySpaced(mitk::PlaneGeometry *geometry2D, unsigned int slices)
Completely initialize this instance as evenly-spaced with slices parallel to the provided PlaneGeomet...
Base class of all classes providing access to parts of an image.
#define MITK_ERROR
Log an error message.
Definition: mitkLog.h:372
#define MITK_WARN
Log a warning message.
Definition: mitkLog.h:365
#define MITK_DEBUG
Definition: mitkLog.h:390
Find image slices visible on a given plane.
MITKCORE_EXPORT const ScalarType eps
Epsilon value for floating point comparison (vnl_math::eps * 100).
MITKCORE_EXPORT ImageDimensionVectorType DetermineImageDimensionsFromTimeGeometry(const TimeGeometry *timeGeometry)
std::vector< unsigned int > ImageDimensionVectorType
Definition: mitkImage.h:837
void FillVector3D(Tout &out, mitk::ScalarType x, mitk::ScalarType y, mitk::ScalarType z)
Fill a 3D array/vector with the given x, y, z values.
Definition: mitkArray.h:102
double ScalarType
Scalar type used throughout MITK for geometric computations.
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.