Class TLcdTransformingModelFactory

java.lang.Object
com.luciad.model.transformation.TLcdTransformingModelFactory

public final class TLcdTransformingModelFactory extends Object

Class containing factory methods to create ALcdTransformingModel instances.

Since:
2016.0
  • Method Details

    • createTransformingModel

      public static ALcdTransformingModel createTransformingModel(ILcdModel aOriginalModel, TLcdClusteringTransformer aModelTransformer)

      Creates a new ALcdTransformingModel instance which will contain the transformed data of aOriginalModel. The data is transformed by using aModelTransformer.

      As the data transformations can be time-consuming, it will happen on a dedicated thread. Once the transformations have been calculated, the resulting ALcdTransformingModel will be updated on the EDT. This means that the resulting model of this method call should only be used to visualize data which is shown in a view that it painted on the EDT (the majority of the views in LuciadLightspeed). However, when the view does not allow asynchronous operations, the transformations and the model updates are executed on the calling thread.

      If you want to show the data on another type of view (for example an offscreen view), you need to use the createTransformingModel(ILcdModel, TLcdClusteringTransformer, ALcdPaintExecutorService) method.

      Note that the transforming model will loop over all elements contained in aOriginalModel to calculate the transformed elements. This means that you should only call this method with in-memory models, and not with models which load their data in a lazy manner.

      Parameters:
      aOriginalModel - The original model
      aModelTransformer - The model transformer
      Returns:
      a new ALcdTransformingModel
    • createTransformingModel

      public static ALcdTransformingModel createTransformingModel(ILcdModel aOriginalModel, TLcdClusteringTransformer aModelTransformer, ALcdPaintExecutorService aPaintExecutorService)

      Creates a new ALcdTransformingModel instance which will contain the transformed data of aOriginalModel. The data is transformed by using aModelTransformer.

      As the data transformations can be time-consuming, it will happen on a dedicated thread. Once the transformations have been calculated, the resulting ALcdTransformingModel will be updated on a thread created by the aPaintExecutorService. This means that the resulting model of this method call should only be used to visualize data which is shown in a view that it painted on the same thread as on which the ALcdPaintExecutorService executes its runnables (for example an offscreen view). However, when the view does not allow asynchronous operations, the transformations and the model updates are executed on the calling thread.

      Note that the transforming model will loop over all elements contained in aOriginalModel to calculate the transformed elements. This means that you should only call this method with in-memory models, and not with models which load their data in a lazy manner.

      Parameters:
      aOriginalModel - The original model
      aModelTransformer - The model transformer
      aPaintExecutorService - Executor service on which the runnables to update the ALcdTransformingModel will be scheduled
      Returns:
      a new ALcdTransformingModel