save TAA OutputHistory as png

Hello,
I want to save TAA OutputHistory as png file for data collection. Also wan to save SceneColorInput etc. I want to collect those data to train a deep learning algorithm which can achieve the same effect as TAA.

SceneColorInput 's type is FRDGTexture, OutputHistory 's type is IPooledRenderTarget. I know those are RDG at render thread and delayed execution. So it maybe hard to get those data directly.

How can I save those render result as png? Then I want to save those data on disk to train a network.
Thanks


struct FTemporalAAHistory
{
	// Number of render target in the history.
	static constexpr uint32 kRenderTargetCount = 4;

	// Render targets holding's pixel history.
	//  scene color's RGBA are in RT[0].
	TStaticArray<TRefCountPtr<IPooledRenderTarget>, kRenderTargetCount> RT;

	// Reference size of RT. Might be different than RT's actual size to handle down res.
	FIntPoint ReferenceBufferSize;

	// Viewport coordinate of the history in RT according to ReferenceBufferSize.
	FIntRect ViewportRect;


	void SafeRelease()
	{
		for (uint32 i = 0; i < kRenderTargetCount; i++)
		{
			RT[i].SafeRelease();
		}
	}

	bool IsValid() const
	{
		return RT[0].IsValid();
	}
};


	
        // Full resolution depth and velocity textures to reproject the history.
	FRDGTexture* SceneDepthTexture = nullptr;
	FRDGTexture* SceneVelocityTexture = nullptr;

	// Anti aliased scene color.
	// Can have alpha channel, or CoC for DOF.
	FRDGTexture* SceneColorInput = nullptr;

Does anyone have an idea? :grinning:
I really need a help