<commit_before><commit_msg>Better coverage<commit_after>catch {load vtktcl}
# Simple viewer for images.

source ../../imaging/examplesTcl/vtkImageInclude.tcl

# Image pipeline

vtkImageReader reader
  reader ReleaseDataFlagOff
  reader SetDataByteOrderToLittleEndian
  reader SetDataExtent 0 255 0 255 1 93
  reader SetDataOrigin -127.5 -127.5 -47
  reader SetFilePrefix "../../../vtkdata/fullHead/headsq"
  reader SetDataMask 0x7fff
  reader UpdateWholeExtent

vtkTransform transform
  transform RotateX 10
  transform RotateY 20
  transform RotateZ 30

vtkImageReslice reslice
  reslice SetInput [reader GetOutput]
  reslice SetResliceTransform transform
  reslice InterpolateOff
  reslice SetBackgroundLevel 1023

vtkImageViewer viewer
  viewer SetInput [reslice GetOutput]
  viewer SetZSlice 120
  viewer SetColorWindow 2000
  viewer SetColorLevel 1000
  viewer Render

source ../../imaging/examplesTcl/WindowLevelInterface.tcl

vtkWindowToImageFilter windowToimage
  windowToimage SetInput [viewer GetImageWindow]
vtkPNMWriter pnmWriter
  pnmWriter SetInput [windowToimage GetOutput]
  pnmWriter SetFileName "TestReslice.tcl.ppm"
#  pnmWriter Write

{'fraction_non_alphanumeric': 0.05199306759098787, 'fraction_numerical': 0.038128249566724434, 'mean_word_length': 4.953608247422681, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '663485', 'n_tokens_mistral': 412, 'n_tokens_neox': 363, 'n_words': 100}