13 #include "NVSceneCapturerUtils.h"
14 #include "NVImageExporter.h"
15 #include "NVSceneDataHandler.generated.h"
17 DECLARE_LOG_CATEGORY_EXTERN(LogNVSceneDataHandler, Log, All)
22 UCLASS(NotBlueprintable, Abstract, DefaultToInstanced, editinlinenew, ClassGroup = (NVIDIA))
34 virtual bool IsHandlingData()
const PURE_VIRTUAL(UNVSceneDataHandler::IsHandlingData,
return false; );
51 virtual bool HandleSceneAnnotationData(
const TSharedPtr<FJsonObject>& CapturedData,
56 virtual void OnStartCapturingSceneData() PURE_VIRTUAL(UNVSceneDataHandler::OnStartCapturingSceneData,
return; );
57 virtual void OnStopCapturingSceneData() PURE_VIRTUAL(UNVSceneDataHandler::OnStopCapturingSceneData,
return; );
58 virtual void OnCapturingCompleted() PURE_VIRTUAL(UNVSceneDataHandler::OnCapturingCompleted,
return; );
63 enum class ENVCaptureDirectoryConflictHandleType : uint8
66 OverwriteExistingFiles UMETA(DisplayName =
"Overwrite existing files"),
69 CleanDirectory UMETA(DisplayName =
"Remove existing files"),
72 CreateNewDirectoryWithTimestampPostfix UMETA(DisplayName =
"Create new directory with timestamp as postfix in name"),
74 CaptureDirectoryConflictHandleType_MAX UMETA(Hidden)
80 UCLASS(Blueprintable, ClassGroup = (NVIDIA))
90 virtual bool CanHandleMoreData()
const override;
91 virtual bool IsHandlingData()
const override;
101 int32 FrameIndex)
override;
108 virtual bool HandleSceneAnnotationData(
const TSharedPtr<FJsonObject>& CapturedData,
111 int32 FrameIndex)
override;
113 virtual void OnStartCapturingSceneData()
override;
114 virtual void OnStopCapturingSceneData()
override;
115 virtual void OnCapturingCompleted()
override;
117 UFUNCTION(BlueprintCallable, Category =
"Exporter")
118 FString GetRootCaptureDirectoryPath()
const;
119 UFUNCTION(BlueprintCallable, Category =
"Exporter")
120 virtual FString GetExportFolderName()
const;
122 UFUNCTION(BlueprintCallable, Category =
"Exporter")
123 FString GetConfiguredOutputDirectoryPath()
const;
124 UFUNCTION(BlueprintCallable, Category =
"Exporter")
125 FString GetConfiguredOutputDirectoryName()
const;
126 UFUNCTION(BlueprintCallable, Category =
"Exporter")
127 FString GetFullOutputDirectoryPath()
const;
129 UFUNCTION(BlueprintCallable, Category =
"Exporter")
130 virtual FString GetSubFolderName()
const;
131 UFUNCTION(BlueprintCallable, Category =
"Exporter")
132 void SetSubFolderName(
const FString& NewSubFolderName);
134 UFUNCTION(BlueprintCallable, Category =
"Exporter")
138 const FString& FileExtension)
const;
141 void ExportCapturerSettings();
147 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category =
"Save Path")
148 bool bUseMapNameForCapturedDirectory;
150 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Save Path", meta = (EditCondition = "!bUseMapNameForCapturedDirectory"))
151 FString CustomDirectoryName;
155 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Save Path")
156 FDirectoryPath RootCapturedDirectoryPath;
159 UPROPERTY(EditAnywhere, Category = "Save Path")
160 ENVCaptureDirectoryConflictHandleType DirectoryConflictHandleType;
163 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Capture")
164 bool bAutoOpenExportedDirectory;
166 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = "Capture")
167 uint32 MaxSaveImageAsyncCount;
171 FString SubFolderName;
174 FString FullOutputDirectoryPath;
177 IImageWrapperModule* ImageWrapperModule;
179 static const FString DefaultDataOutputFolder;
186 UCLASS(Blueprintable, ClassGroup = (NVIDIA))
195 virtual bool CanHandleMoreData()
const override;
196 virtual bool IsHandlingData()
const override;
206 int32 FrameIndex)
override;
213 virtual bool HandleSceneAnnotationData(
const TSharedPtr<FJsonObject>& CapturedData,
216 int32 FrameIndex)
override;
218 virtual void OnCapturingCompleted()
override;
220 TArray<FString> GetVizNameList()
const;
221 UTextureRenderTarget2D* GetTexture(
const FString& VizName);
226 TMap<FString, UTextureRenderTarget2D*> VizTextureMap;
UNVSceneCapturerViewpointComponent: Represents each viewpoint from where the capturer captures data...
NVSceneDataExporter - export all the captured data (image buffer and object annotation info) to files...
virtual bool HandleSceneAnnotationData(const TSharedPtr< FJsonObject > &CapturedData, class UNVSceneFeatureExtractor_AnnotationData *CapturedFeatureExtractor, class UNVSceneCapturerViewpointComponent *CapturedViewpoint, int32 FrameIndex)
Handle the annotation data captured from the scene.
virtual bool CanHandleMoreData() const
Check whether this handler can process more scene data If it can't then we should stop getting more d...
NVSceneDataVisualizer - visualize all the captured data (image buffer and object annotation info) usi...
Base interface for serializing/visualizing captured pixel and annotation data.
virtual bool HandleScenePixelsData(const FNVTexturePixelData &CapturedPixelData, class UNVSceneFeatureExtractor_PixelData *CapturedFeatureExtractor, class UNVSceneCapturerViewpointComponent *CapturedViewpoint, int32 FrameIndex)
Handle the pixels data captured from the scene.