<commit_before>/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkImageReslice.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$
  Thanks:    Thanks to <NAME> who developed this class.

Copyright (c) 1993-2000 <NAME>, <NAME>, <NAME> 
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice,
   this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

 * Neither name of <NAME>, <NAME>, or <NAME> nor the names
   of any contributors may be used to endorse or promote products derived
   from this software without specific prior written permission.

 * Modified source versions must be plainly marked as such, and must not be
   misrepresented as being the original software.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

=========================================================================*/
// .NAME vtkImageReslice - Reslices a volume along the axes specified.
// .SECTION Description
// vtkImageReslice will re-grid a volume along the axes specified by
// a matrix.  The extent, origin, and sample spacing of the output data 
// can also be set.  
// <p>The primary uses of this class are to extract either oblique or
// orthogonal slices from a volume, or to apply either a linear, 
// perspective, or warp transformation to a volume.
// <p>This class is the swiss-army-knife of image geometry filters:  
// It can permute, flip, rotate, scale, resample, and pad image data 
// in any combination at close to the efficiency of the specialized
// image filters that do the same things.
// .SECTION Caveats
// This filter is very inefficient if the output X dimension is 1.
// .SECTION see also
// vtkGeneralTransform vtkMatrix4x4


#ifndef __vtkImageReslice_h
#define __vtkImageReslice_h


#include "vtkImageToImageFilter.h"
#include "vtkGeneralTransform.h"
#include "vtkMatrix4x4.h"

class vtkMatrix4x4;

#define VTK_RESLICE_NEAREST 0
#define VTK_RESLICE_LINEAR 1
#define VTK_RESLICE_CUBIC 3

class VTK_EXPORT vtkImageReslice : public vtkImageToImageFilter
{
public:
  static vtkImageReslice *New();
  vtkTypeMacro(vtkImageReslice,vtkImageToImageFilter);

  virtual void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Use this method, in conjunction with SetResliceOrigin(), 
  // SetResliceSpacing() and SetResliceExtent(), to set up a
  // grid of points at which to resample the input.  
  // <p>The Axes specify the axes of the resampling grid, 
  // the ResliceSpacing specifies the grid spacing,
  // the ResliceOrigin() specifies the location of the origin of 
  // the grid (i.e the coordinates of voxel index (0,0,0) 
  // in the coordinate system specified by
  // the Axes), and the ResliceExtent() specifies the size of
  // resampling grid i.e. the ranges of the (i,j,k) indices.
  // <p>The matrix can specify a perspective transformation, but
  // the matrix must be invertible.
  vtkSetObjectMacro(ResliceAxes,vtkMatrix4x4);
  vtkGetObjectMacro(ResliceAxes,vtkMatrix4x4);

  // Description:
  // Set a transform to be applied to the resampling grid that was
  // specified in SetResliceAxes(). 
  // <p>Note that applying a transform to the resampling grid is
  // equivalent to applying the inverse of the same transform to
  // the image before resampling it.  Nonlinear transforms can be
  // used here.
  vtkSetObjectMacro(ResliceTransform,vtkGeneralTransform);
  vtkGetObjectMacro(ResliceTransform,vtkGeneralTransform);
<commit_msg>Documentation: fixed typos and improved explanations.<commit_after>/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkImageReslice.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$
  Thanks:    Thanks to <NAME> who developed this class.

Copyright (c) 1993-2000 <NAME>, <NAME>, <NAME> 
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice,
   this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

 * Neither name of <NAME>, <NAME>, or <NAME> nor the names
   of any contributors may be used to endorse or promote products derived
   from this software without specific prior written permission.

 * Modified source versions must be plainly marked as such, and must not be
   misrepresented as being the original software.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

=========================================================================*/
// .NAME vtkImageReslice - Reslices a volume along the axes specified.
// .SECTION Description
// vtkImageReslice will re-grid a volume along the axes specified by
// a matrix.  The extent, origin, and sample spacing of the output data 
// can also be set.  
// <p>The primary uses of this class are to extract either oblique or
// orthogonal slices from a volume, or to apply either a linear, 
// perspective, or warp transformation to a volume.
// <p>This class is the swiss-army-knife of image geometry filters:  
// It can permute, flip, rotate, scale, resample, and pad image data 
// in any combination at similar efficiency to the specialized
// image filters that do the same things.
// .SECTION Caveats
// This filter is very inefficient if the output X dimension is 1.
// .SECTION see also
// vtkGeneralTransform vtkMatrix4x4


#ifndef __vtkImageReslice_h
#define __vtkImageReslice_h


#include "vtkImageToImageFilter.h"
#include "vtkGeneralTransform.h"
#include "vtkMatrix4x4.h"

class vtkMatrix4x4;

#define VTK_RESLICE_NEAREST 0
#define VTK_RESLICE_LINEAR 1
#define VTK_RESLICE_CUBIC 3

class VTK_EXPORT vtkImageReslice : public vtkImageToImageFilter
{
public:
  static vtkImageReslice *New();
  vtkTypeMacro(vtkImageReslice,vtkImageToImageFilter);

  virtual void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Use this method, in conjunction with SetOutputOrigin(), 
  // SetOutputSpacing() and SetOutputExtent(), to set up a
  // grid of points at which to resample the input.  
  // <p>The Axes specify the axes of the resampling grid, 
  // the OutputSpacing specifies the grid spacing,
  // the OutputOrigin specifies the location of the origin of 
  // the grid (i.e the coordinates of voxel index (0,0,0) 
  // in the coordinate system specified by
  // the Axes), and the OutputExtent specifies the size of
  // resampling grid i.e. the ranges of the (i,j,k) indices.
  // <p>The first column of the matrix specifies the x-axis 
  // vector (set the fourth element to zero), the second
  // column specifies the y-axis, and the third column the
  // z-axis.  The fourth column specifies the origin of the
  // axes (set the fourth element to one).  The matrix can be used
  // to specify a perspective transformation (i.e. non-zero fourth
  // elements for the axes), but the matrix must be invertible.  
  vtkSetObjectMacro(ResliceAxes,vtkMatrix4x4);
  vtkGetObjectMacro(ResliceAxes,vtkMatrix4x4);

  // Description:
  // Set a transform to be applied to the resampling grid that was
  // specified in SetResliceAxes(). 
  // <p>Note that applying a transform to the resampling grid is
  // equivalent to applying the inverse of the same transform to
  // the image before resampling it.  Nonlinear transforms can be
  // used here.
  vtkSetObjectMacro(ResliceTransform,vtkGeneralTransform);
  vtkGetObjectMacro(ResliceTransform,vtkGeneralTransform);

{'fraction_non_alphanumeric': 0.09281279595917079, 'fraction_numerical': 0.005261496369567505, 'mean_word_length': 4.227722772277228, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5492154', 'n_tokens_mistral': 2755, 'n_tokens_neox': 2525, 'n_words': 1188}