<commit_before>catch {load vtktcl}
# get the interactor ui
source ../../examplesTcl/vtkInt.tcl
source ../../examplesTcl/colors.tcl






# A simple script that tests the vtkTree object.
# Directory structure is traversed and converted to a vtkStringTree object.

# this test is for coverage test (which needs an image)


# move to root vtk directory
cd ..

# initialize the directory list

set entry [pwd]
vtkStringTree dirTree
dirTree SetItem [file tail $entry]



proc DirGrow {t e} {
    # assumes e is a directory
    set entryList [glob -nocomplain $e/*]
    foreach entry $entryList {
	if {[file isdirectory $entry]} {
	    set idx [$t AddNewNode [file tail $entry]]
	    $t MoveToChild $idx
	    DirGrow $t $entry
	    $t MoveToParent
	} else {
	    set idx [$t AddNewLeaf [file tail $entry]]
	}
    }
}


if {[file isdirectory $entry]} {
    DirGrow dirTree $entry
}


wm withdraw .
#wm deiconify .vtkInteract
#dovtk "dirTree Print" .vtkInteract





# draw something for regression tests

# Create the RenderWindow, Renderer and both Actors
#
vtkRenderer ren1
vtkRenderWindow renWin
    renWin AddRenderer ren1
vtkRenderWindowInteractor iren
    iren SetRenderWindow renWin

vtkConeSource cone
    cone SetResolution 6
    cone SetRadius .1

vtkPolyDataMapper hairMapper
  hairMapper SetInput [cone GetOutput]

vtkActor hair
  hair SetMapper hairMapper

# Add the actors to the renderer, set the background and size
#
ren1 AddActor hair
[ren1 GetActiveCamera] Dolly 2
[ren1 GetActiveCamera] Azimuth 30
[ren1 GetActiveCamera] Elevation 30

eval [hair GetProperty] SetDiffuseColor $saddle_brown

renWin SetSize 320 240
ren1 SetBackground .1 .2 .4

iren Initialize
renWin Render

renWin DebugOn
renWin SetFileName "TestStringTree2.tcl.ppm"
renWin SaveImageAsPPM
renWin DebugOff
exit

# render the image
#
iren SetUserMethod {wm deiconify .vtkInteract}

# prevent the tk window from showing up then start the event loop
wm withdraw .

<commit_msg>Coverage testing<commit_after>catch {load vtktcl}
# get the interactor ui
source ../../examplesTcl/vtkInt.tcl
source ../../examplesTcl/colors.tcl






# A simple script that tests the vtkTree object.
# Directory structure is traversed and converted to a vtkStringTree object.

# this test is for coverage test (which needs an image)


# move to root vtk directory
cd ..

# initialize the directory list

set entry [pwd]
vtkStringTree dirTree
dirTree SetItem [file tail $entry]



proc DirGrow {t e} {
    # assumes e is a directory
    set entryList [glob -nocomplain $e/*]
    foreach entry $entryList {
	if {[file isdirectory $entry]} {
	    set idx [$t AddNewNode [file tail $entry]]
	    $t MoveToChild $idx
	    DirGrow $t $entry
	    $t MoveToParent
	} else {
	    set idx [$t AddNewLeaf [file tail $entry]]
	}
    }
}


if {[file isdirectory $entry]} {
    DirGrow dirTree $entry
}


wm withdraw .
#wm deiconify .vtkInteract
#dovtk "dirTree Print" .vtkInteract





# draw something for regression tests

# Create the RenderWindow, Renderer and both Actors
#
vtkRenderer ren1
vtkRenderWindow renWin
    renWin AddRenderer ren1
vtkRenderWindowInteractor iren
    iren SetRenderWindow renWin

vtkConeSource cone
    cone SetResolution 6
    cone SetRadius .1

vtkPolyDataMapper hairMapper
  hairMapper SetInput [cone GetOutput]

vtkActor hair
  hair SetMapper hairMapper

# Add the actors to the renderer, set the background and size
#
ren1 AddActor hair
[ren1 GetActiveCamera] Dolly 2
[ren1 GetActiveCamera] Azimuth 30
[ren1 GetActiveCamera] Elevation 30

eval [hair GetProperty] SetDiffuseColor $saddle_brown

renWin SetSize 320 240
ren1 SetBackground .1 .2 .4

iren Initialize
renWin Render

# render the image
#
iren SetUserMethod {wm deiconify .vtkInteract}

# prevent the tk window from showing up then start the event loop
wm withdraw .

# move back 
cd examplesTcl
{'fraction_non_alphanumeric': 0.0650130548302872, 'fraction_numerical': 0.01227154046997389, 'mean_word_length': 3.800751879699248, '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': '808614', 'n_tokens_mistral': 1305, 'n_tokens_neox': 1218, 'n_words': 471}