<commit_before>package ch.unibas.cs.gravis.scalismo

import scalismo.common._
import scalismo.geometry._
import scalismo.image.{DiscreteImageDomain, DiscreteScalarImage}
import scalismo.ui.api.SimpleAPI.ScalismoUI


object ExampleApp {

  def main(args: Array[String]) {
    
    // Your application code goes here. Below is a dummy application that creates a layered image and displays it  
    scalismo.initialize()
    
    val imageDomain = DiscreteImageDomain(Point(0f, 0f, 0f), Vector(1f, 1f, 1f), IntVector(100, 100, 100))

    val values = imageDomain.points.zipWithIndex.map {
      case (p, i) =>
        if (imageDomain.index(PointId(i))(0) % 10 < 3 && imageDomain.index(PointId(i))(1) % 10 < 3) 200 else 0
    }
    val image = DiscreteScalarImage(imageDomain, ScalarArray(values.toArray))

    // create a visualization window 
    val ui = ScalismoUI()
    ui.show(image, "grid")

  }
}
<commit_msg>simplified example application<commit_after>package ch.unibas.cs.gravis.scalismo

import scalismo.image.{DiscreteImageDomain, DiscreteScalarImage}
import scalismo.io.MeshIO
import scalismo.ui.api.SimpleAPI.ScalismoUI
import java.io.File

object ExampleApp {

  def main(args: Array[String]) {
    
    // required to initialize native libraries (VTK, HDF5 ..)
    scalismo.initialize()
    
    // Your application code goes below here. Below is a dummy application that reads a mesh and displays it

    // create a visualization window
    val ui = ScalismoUI()

    // read a mesh from file
    val mesh = MeshIO.readMesh(new File("data/facemesh.stl")).get

    // display it
    ui.show(mesh, "face")

  }
}

{'fraction_non_alphanumeric': 0.10523076923076922, 'fraction_numerical': 0.01723076923076923, 'mean_word_length': 3.5041551246537397, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '1691739', 'n_tokens_mistral': 543, 'n_tokens_neox': 505, 'n_words': 139}