Interface FaceService

All Known Implementing Classes:
FaceServiceImpl

public interface FaceService
Service used for manipulation with faces
  • Method Details

    • getFaceByReference

      StoredHumanFace getFaceByReference(FaceReference reference)
      Returns face based on given reference
      Parameters:
      reference - reference
      Returns:
      face based on given reference
    • getHumanFaceById

      StoredHumanFace getHumanFaceById(Long id)
      Returns face based on given id
      Parameters:
      id - id
      Returns:
      face based on given id
    • deleteAllFacesByTaskId

      void deleteAllFacesByTaskId(Long taskId)
      Deletes face based on given task id
      Parameters:
      taskId -
    • deleteAllFacesByProjectId

      void deleteAllFacesByProjectId(Long projectId)
      Deletes face based on given project id
      Parameters:
      projectId -
    • updateHumanFace

      void updateHumanFace(StoredHumanFace humanFace)
      Updates face in the database
      Parameters:
      humanFace - HumanFace
    • getFaceReferenceById

      FaceReference getFaceReferenceById(Long id)
      Returns face reference based on given id
      Parameters:
      id - id
      Returns:
      face reference based on given id
    • createTemporaryInMemoryFace

      HumanFace createTemporaryInMemoryFace(MeshModel meshModel)
      Parameters:
      meshModel - from which is HumanFace created
      Returns:
      new instance of HumanFace which is not saved in HumanFaceMemoryManager
    • createCopyOfFace

      FaceReference createCopyOfFace(FaceReference reference)
      Parameters:
      reference - of HumanFace that is copied
      Returns:
      FaceReference of new independent copy of HumanFace
    • createCopyOfFaceWithTaskId

      FaceReference createCopyOfFaceWithTaskId(FaceReference reference, Long taskId)
      Parameters:
      reference - of HumanFace that is copied
      Returns:
      FaceReference of new independent copy of HumanFace
    • createFaceFromMeshModel

      FaceReference createFaceFromMeshModel(MeshModel meshModel, File file, boolean isAverageFace, Long taskId, Long projectId) throws IOException
      Creates face from mesh model.
      Parameters:
      meshModel - mesh model
      file - Face file
      isAverageFace - Average face indicator
      Returns:
      face reference
      Throws:
      IOException - on failure
    • loadFace

      FaceReference loadFace(Long projectId, File file) throws IOException
      Loads face from file.
      Parameters:
      file - File
      Returns:
      face reference
      Throws:
      IOException - on failure
    • getAllFacesByProjectId

      List<FaceReference> getAllFacesByProjectId(long projectId)
      Parameters:
      projectId -
      Returns:
      all faces from project
    • getAllFacesByTaskId

      List<FaceReference> getAllFacesByTaskId(long taskId)
      Parameters:
      taskId -
      Returns:
      all faces from task
    • removeFace

      boolean removeFace(FaceReference faceReference)
      Parameters:
      faceReference - that is supposed to be deleted from HumanFaceMemoryManager
      Returns:
      true when the HumanFace was successfully deleted from HumanFaceMemoryManager, false when FaceReference wasn't found etc.
    • loadTemporaryInMemoryFace

      HumanFace loadTemporaryInMemoryFace(File file) throws IOException
      Load face into the memory
      Parameters:
      file - Face file
      Returns:
      Face
      Throws:
      IOException - om failure
    • setDumpStrategy

      void setDumpStrategy(HumanFaceMemoryManager.Strategy strategy)
      Sets dumping strategy
      Parameters:
      strategy - Strategy