Class TLcdTransformingModelFactory
Class containing factory methods to create ALcdTransformingModel instances.
- Since:
- 2016.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic ALcdTransformingModelcreateTransformingModel(ILcdModel aOriginalModel, TLcdClusteringTransformer aModelTransformer) Creates a newALcdTransformingModelinstance which will contain the transformed data ofaOriginalModel.static ALcdTransformingModelcreateTransformingModel(ILcdModel aOriginalModel, TLcdClusteringTransformer aModelTransformer, ALcdPaintExecutorService aPaintExecutorService) Creates a newALcdTransformingModelinstance which will contain the transformed data ofaOriginalModel.
-
Method Details
-
createTransformingModel
public static ALcdTransformingModel createTransformingModel(ILcdModel aOriginalModel, TLcdClusteringTransformer aModelTransformer) Creates a new
ALcdTransformingModelinstance which will contain the transformed data ofaOriginalModel. The data is transformed by usingaModelTransformer.As the data transformations can be time-consuming, it will happen on a dedicated thread. Once the transformations have been calculated, the resulting
ALcdTransformingModelwill 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
aOriginalModelto 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 modelaModelTransformer- The model transformer- Returns:
- a new
ALcdTransformingModel
-
createTransformingModel
public static ALcdTransformingModel createTransformingModel(ILcdModel aOriginalModel, TLcdClusteringTransformer aModelTransformer, ALcdPaintExecutorService aPaintExecutorService) Creates a new
ALcdTransformingModelinstance which will contain the transformed data ofaOriginalModel. The data is transformed by usingaModelTransformer.As the data transformations can be time-consuming, it will happen on a dedicated thread. Once the transformations have been calculated, the resulting
ALcdTransformingModelwill be updated on a thread created by theaPaintExecutorService. 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 theALcdPaintExecutorServiceexecutes 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
aOriginalModelto 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 modelaModelTransformer- The model transformeraPaintExecutorService- Executor service on which the runnables to update theALcdTransformingModelwill be scheduled- Returns:
- a new
ALcdTransformingModel
-