Skip to content
  • George Zagaris's avatar
    ENH: Update extract structured data filters · 296ace04
    George Zagaris authored
    This commit updates the extract/sub-sample structured data filters
    to reflect the changes of refactoring the piece and extent in VTK.
    Namely, vtkExtractGrid, vtkExtractVOI and vtkExtractRectilinearGrid,
    which operate on vtkStructuredGrid, vtkImageData, and vtkRectilinearGrid
    respectively, are updated.
    
    These datatypes, albeit different, they share common functionality. To
    avoid replicating essentially the same code in all of these three classes,
    a helper class, called vtkExtractStructuredGridHelper, is introduced. This
    new class is part of VTK's vtkCommonDataModel module since it needs to be
    used by both the vtkImagingCore and vtkFiltersExtraction module.
    
    One minor caveat, is that Imaging algorithms/tests require that the origin
    of the image to be retained and that the output extent is w.r.t.
    to the input extent, when there is no sub-sampling. For that reason,
    when there is no sub-sampling vtkExtractVOI, will yield an output extent
    that is with respect to the origin. All other filters re-number the
    output extent starting from zero. The output extent is always re-numbered
    when the data is sub-sampled.
    
    Change-Id: I26fe5a115032333db9814987a6c9dc949e51ef52
    296ace04