<commit_before>catch {load vtktcl}
# Simple viewer for images.

source vtkImageInclude.tcl

# Image pipeline

vtkImageVolume16Reader reader
reader ReleaseDataFlagOff
reader SetDataByteOrderToLittleEndian
reader SetDataDimensions 256 256 1
reader SetFilePrefix "../../../data/fullHead/headsq"
reader SetDataMask 0x7fff
#reader DebugOn
#reader Update


vtkImageViewer viewer
#viewer SetAxes $VTK_IMAGE_X_AXIS $VTK_IMAGE_Z_AXIS $VTK_IMAGE_Y_AXIS
viewer SetInput [reader GetOutput]
viewer SetCoordinate2 0
viewer SetColorWindow 2000
viewer SetColorLevel 1000
viewer SetOriginLocationToUpperLeft
#viewer DebugOn
viewer Render

wm withdraw .


# time the window level operation
set i 0;
proc timeit {} {
  global i
  puts [expr 1000000.0/[lindex [time {viewer SetColorLevel $i; viewer Render; incr i} 100] 0]]
}



<commit_msg>added 512 option<commit_after>catch {load vtktcl}
# Simple viewer for images.

source vtkImageInclude.tcl

# Image pipeline

vtkImageVolume16Reader reader
reader ReleaseDataFlagOff
reader SetDataByteOrderToLittleEndian
reader SetDataDimensions 256 256 1
reader SetFilePrefix "../../../data/fullHead/headsq"
reader SetDataMask 0x7fff
#reader DebugOn
#reader Update

vtkImageMagnify magnify
magnify SetDimensionality 2
magnify SetInput [reader GetOutput]
magnify SetMagnificationFactors 2 2
magnify InterpolateOn
magnify ReleaseDataFlagOff

vtkImageViewer viewer
#viewer SetAxes $VTK_IMAGE_X_AXIS $VTK_IMAGE_Z_AXIS $VTK_IMAGE_Y_AXIS
#viewer SetInput [reader GetOutput]
viewer SetInput [magnify GetOutput]
viewer SetCoordinate2 0
viewer SetColorWindow 2000
viewer SetColorLevel 1000
viewer SetOriginLocationToUpperLeft
#viewer DebugOn
viewer Render

wm withdraw .


# time the window level operation
set i 0;
proc timeit {} {
  global i
  puts [expr 1000000.0/[lindex [time {viewer SetColorLevel $i; viewer Render; incr i} 100] 0]]
}




{'fraction_non_alphanumeric': 0.05768194070080863, 'fraction_numerical': 0.039892183288409704, 'mean_word_length': 5.874074074074074, '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': '2988801', 'n_tokens_mistral': 691, 'n_tokens_neox': 602, 'n_words': 193}