NVIDIA DeepLearning Dataset Synthesizer (NDDS)
 All Classes Namespaces Functions Variables Typedefs Pages
NVSceneFeatureExtractor.h
1 /*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * NVIDIA CORPORATION and its licensors retain all intellectual property
5 * and proprietary rights in and to this software, related documentation
6 * and any modifications thereto. Any use, reproduction, disclosure or
7 * distribution of this software and related documentation without an express
8 * license agreement from NVIDIA CORPORATION is strictly prohibited.
9 */
10 
11 #pragma once
12 
13 #include "Components/SceneComponent.h"
14 #include "Components/SceneCaptureComponent.h"
15 #include "Engine/TextureRenderTarget2D.h"
16 #include "NVSceneCapturerUtils.h"
17 #include "NVTextureReader.h"
18 #include "NVSceneFeatureExtractor.generated.h"
19 
24 
25 USTRUCT(BlueprintType)
26 struct NVSCENECAPTURER_API FNVFeatureExtractorSettings
27 {
28  GENERATED_BODY()
29 
30 public:
31  UPROPERTY(EditAnywhere, Instanced, Category = FeatureExtraction, meta = (ShowOnlyInnerProperties))
32  UNVSceneFeatureExtractor* FeatureExtractorRef;
33 };
34 
35 ///
36 ///
37 ///
38 UCLASS(Blueprintable, DefaultToInstanced, editinlinenew, Abstract, ClassGroup = (NVIDIA))
39 class NVSCENECAPTURER_API UNVSceneFeatureExtractor : public UObject
40 {
41  GENERATED_BODY()
42 
43 public:
44  UNVSceneFeatureExtractor(const FObjectInitializer& ObjectInitializer);
45 
46  virtual class UWorld* GetWorld() const override;
47 
48  bool IsEnabled() const;
49  FString GetDisplayName() const;
50 
51  void Init(UNVSceneCapturerViewpointComponent* InOwnerViewpoint);
52 
53  virtual void StartCapturing();
54  virtual void StopCapturing();
55 
56  virtual void UpdateCapturerSettings() PURE_VIRTUAL(UNVSceneFeatureExtractor::UpdateCapturerSettings,);
57 protected:
58  virtual void UpdateSettings() PURE_VIRTUAL(UNVSceneFeatureExtractor::UpdateSettings,);
59 
60 public: // Editor properties
61  /// If true, the feature extractor will capture otherwise it won't
62  /// ToDo: Move to protected.
63  UPROPERTY(EditAnywhere, SimpleDisplay, Category = Config)
64  bool bIsEnabled;
65  /// Name of the feature extractor to show
66  UPROPERTY(EditAnywhere, SimpleDisplay, Category = Config)
67  FString DisplayName;
68  ///
69  UPROPERTY(EditAnywhere, SimpleDisplay, Category = Config)
70  FString Description;
71  /// The string to add to the end of the exported file's name captured from this feature extractor. e.g: "depth", "mask" ...
72  UPROPERTY(EditAnywhere, SimpleDisplay, Category = Config)
73  FString ExportFileNamePostfix;
74 
75 protected: // Transient properties
76  UPROPERTY(Transient)
77  ANVSceneCapturerActor* OwnerCapturer;
78  UPROPERTY(Transient)
79  UNVSceneCapturerViewpointComponent* OwnerViewpoint;
80  UPROPERTY(Transient)
81  bool bCapturing;
82 };
83 
84 USTRUCT()
86 {
87  GENERATED_BODY()
88 
89 public:
90  UPROPERTY()
91  UNVSceneCaptureComponent2D* SceneCaptureComp2D;
92 
93  UPROPERTY()
94  FString ComponentName;
95 };
UNVSceneCapturerViewpointComponent: Represents each viewpoint from where the capturer captures data...
The scene exporter actor.