STIR  6.2.0
zoom.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2000 PARAPET partners
3  Copyright (C) 2000- 2007, Hammersmith Imanet Ltd
4  Copyright (C) 2018-2019, University College London
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
8 
9  See STIR/LICENSE.txt for details
10 */
11 #ifndef __stir_ZOOM_H__
12 #define __stir_ZOOM_H__
13 
84 #include "stir/common.h"
85 #include "stir/ZoomOptions.h"
86 
87 START_NAMESPACE_STIR
88 
89 template <typename elemT>
90 class Viewgram;
91 template <typename elemT>
92 class RelatedViewgrams;
93 template <typename elemT>
94 class VoxelsOnCartesianGrid;
95 template <typename elemT>
96 class PixelsOnCartesianGrid;
97 template <typename elemT>
98 class CartesianCoordinate3D;
99 template <int num_dimensions, typename elemT>
100 class BasicCoordinate;
101 
107 
112 void zoom_viewgrams(RelatedViewgrams<float>& viewgrams,
113  const float zoom,
114  const int min_tang_pos_num,
115  const int max_tang_pos_num,
116  const float x_offset_in_mm = 0,
117  const float y_offset_in_mm = 0);
118 
123 void zoom_viewgram(Viewgram<float>& viewgram,
124  const float zoom,
125  const int min_tang_pos_num,
126  const int max_tang_pos_num,
127  const float x_offset_in_mm = 0,
128  const float y_offset_in_mm = 0);
136 void zoom_viewgram(Viewgram<float>& out_viewgram,
137  const Viewgram<float>& in_viewgram,
138  const float x_offset_in_mm = 0,
139  const float y_offset_in_mm = 0);
140 
147 VoxelsOnCartesianGrid<float> zoom_image(const VoxelsOnCartesianGrid<float>& image,
148  const CartesianCoordinate3D<float>& zooms,
149  const CartesianCoordinate3D<float>& offsets_in_mm,
150  const BasicCoordinate<3, int>& new_sizes,
151  const ZoomOptions = ZoomOptions::preserve_sum);
152 
177 void zoom_image_in_place(VoxelsOnCartesianGrid<float>& image,
178  const CartesianCoordinate3D<float>& zooms,
179  const CartesianCoordinate3D<float>& offsets_in_mm,
180  const BasicCoordinate<3, int>& new_sizes,
181  const ZoomOptions = ZoomOptions::preserve_sum);
182 
197 void zoom_image(VoxelsOnCartesianGrid<float>& image_out,
198  const VoxelsOnCartesianGrid<float>& image_in,
199  const ZoomOptions = ZoomOptions::preserve_sum);
200 
201 //------------------ 2D zooms---------------------
202 
209 void zoom_image(PixelsOnCartesianGrid<float>& image2D_out,
210  const PixelsOnCartesianGrid<float>& image2D_in,
211  const ZoomOptions = ZoomOptions::preserve_sum);
212 
217 VoxelsOnCartesianGrid<float> zoom_image(const VoxelsOnCartesianGrid<float>& image,
218  const float zoom,
219  const float x_offset_in_mm,
220  const float y_offset_in_mm,
221  const int new_size,
222  const ZoomOptions = ZoomOptions::preserve_sum);
223 
228 void zoom_image_in_place(VoxelsOnCartesianGrid<float>& image,
229  const float zoom,
230  const float x_offset_in_mm,
231  const float y_offset_in_mm,
232  const int new_size,
233  const ZoomOptions = ZoomOptions::preserve_sum);
234 
236 
237 END_NAMESPACE_STIR
238 
239 #endif
void zoom_viewgram(Viewgram< float > &in_view, const float zoom, const int min_tang_pos_num, const int max_tang_pos_num, const float x_offset_in_mm, const float y_offset_in_mm)
zoom viewgram, replacing it with the new data
Definition: zoom.cxx:138
void zoom_image_in_place(VoxelsOnCartesianGrid< float > &image, const float zoom, const float x_offset_in_mm, const float y_offset_in_mm, const int new_size, const ZoomOptions zoom_options)
zoom image, replacing the first argument with the new data
Definition: zoom.cxx:264
VoxelsOnCartesianGrid< float > zoom_image(const VoxelsOnCartesianGrid< float > &image, const float zoom, const float x_offset_in_mm, const float y_offset_in_mm, const int new_size, const ZoomOptions zoom_options)
zoom image, replacing the first argument with the new data
Definition: zoom.cxx:276
basic configuration include file
void zoom_viewgrams(RelatedViewgrams< float > &in_viewgrams, const float zoom, const int min_tang_pos_num, const int max_tang_pos_num, const float x_offset_in_mm, const float y_offset_in_mm)
zoom a RelatedViewgrams object, replacing it with the new data
Definition: zoom.cxx:98
Declaration of class stir::ZoomOptions.