Skip to content

Instantly share code, notes, and snippets.

View Ghazi-Bouabene's full-sized avatar

Ghazi Bouabene Ghazi-Bouabene

View GitHub Profile
@Ghazi-Bouabene
Ghazi-Bouabene / MyScalarMeshIO.scala
Created August 4, 2017 09:14
Custom version of Scalar mesh IO, allowing to change the index of the read array.
package local
import java.io.{File, IOException}
import scalismo.common.Scalar
import scalismo.io.ImageIO
import scalismo.mesh.ScalarMeshField
import scalismo.utils.{MeshConversion, VtkHelpers}
import vtk.{vtkPolyData, vtkPolyDataReader}
package com.example
import java.awt.Color
import scalismo.io.{LandmarkIO, MeshIO, StatismoIO}
import java.io.File
import breeze.linalg.{DenseMatrix, DenseVector}
import scalismo.common._
import scalismo.geometry._
package com.example
import java.awt.Color
import scalismo.io.{LandmarkIO, MeshIO, StatismoIO}
import java.io.File
import breeze.linalg.{DenseMatrix, DenseVector}
import scalismo.common._
import scalismo.geometry._
val noseless = MeshIO.readMesh(new File("datasets/noseless.stl")).get
show(noseless,"noseless")
val littleModel = StatismoIO.readStatismoMeshModel(new File("datasets/model.h5")).get
show(littleModel, "littleModel")
val zeroMean = VectorField(RealSpace[_3D], (pt:Point[_3D]) => Vector(0,0,0))
@Ghazi-Bouabene
Ghazi-Bouabene / reconstructionEval.scala
Created February 23, 2016 10:21
Evaluation method for the femur reconstruction contest of the FutureLearn course: Statistical Shape Modelling
package ch.unibas.cs.gravis.shapemodelling
import java.io.{PrintWriter, File}
import scalismo.geometry._
import scalismo.io.MeshIO
import scalismo.mesh.{MeshMetrics, Mesh, TriangleMesh}
import scalismo.utils.MeshConversion
import vtk.{vtkPolyData, vtkPolyDataConnectivityFilter}
@Ghazi-Bouabene
Ghazi-Bouabene / VSDLegStatus.scala
Created November 26, 2015 13:21
Retrieve status of ETH automatic segmentation of femur on VSD
package vsdClientSeed
import java.io.File
import ch.unibas.cs.gravis.vsdclient.{VSDCommonObjectInfo, VSDClient}
import ch.unibas.cs.gravis.vsdclient.VSDJson._
import scala.concurrent.Future
object VSDLegStatus {