Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkImageTimeSelector.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 mitkImageTimeSelector_h
14 #define mitkImageTimeSelector_h
15 
16 #include <mitkSubImageSelector.h>
17 #include <MitkCoreExports.h>
18 
19 namespace mitk
20 {
36  {
37  public:
39 
40  itkFactorylessNewMacro(Self);
41 
42  itkCloneMacro(Self);
43 
45  itkGetConstMacro(TimeNr, int);
47  itkSetMacro(TimeNr, int);
48 
50  itkGetConstMacro(ChannelNr, int);
52  itkSetMacro(ChannelNr, int);
53 
54  protected:
56 
57  ~ImageTimeSelector() override;
58 
60  void GenerateOutputInformation() override;
61 
64 
66  void GenerateData() override;
67 
68  int m_TimeNr;
69 
71  };
72 
73 
87  MITKCORE_EXPORT Image::ConstPointer SelectImageByTimeStep(const Image* image, unsigned int timestep);
88 
98  MITKCORE_EXPORT Image::Pointer SelectImageByTimeStep(Image* image, unsigned int timestep);
99 
113  MITKCORE_EXPORT Image::ConstPointer SelectImageByTimePoint(const Image* image, TimePointType timePoint);
114 
124  MITKCORE_EXPORT Image::Pointer SelectImageByTimePoint(Image* image, TimePointType timePoint);
125 
126 } // namespace mitk
127 
128 #endif
#define MITKCORE_EXPORT
Provides access to a volume at a specific time step of the input image.
~ImageTimeSelector() override
void GenerateData() override
Extract the selected volume data from the input image.
void GenerateOutputInformation() override
Initialize output information (geometry, pixel type, dimensions) for the 3D volume output.
mitkClassMacro(ImageTimeSelector, SubImageSelector)
void GenerateInputRequestedRegion() override
Set the requested region on the input to match the selected time step and channel.
Image class for storing multi-dimensional medical image data.
Definition: mitkImage.h:76
Base class of all classes providing access to parts of an image.
Find image slices visible on a given plane.
MITKCORE_EXPORT Image::ConstPointer SelectImageByTimeStep(const Image *image, unsigned int timestep)
Convenience helper to extract a single time step from a 4D image.
MITKCORE_EXPORT Image::ConstPointer SelectImageByTimePoint(const Image *image, TimePointType timePoint)
Convenience helper to extract a single time step from a 4D image by time point.
mitk::ScalarType TimePointType
Type for time point values in milliseconds (ms).