refactor: enhance vtkVoxImage volume rendering with dynamic shader range scaling, improved transfer function management, and synchronized VTK property updates.
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
|
||||
class vtkImageData;
|
||||
class vtkActor;
|
||||
class vtkColorTransferFunction;
|
||||
class vtkPiecewiseFunction;
|
||||
|
||||
namespace uLib {
|
||||
namespace Vtk {
|
||||
@@ -55,6 +57,8 @@ public:
|
||||
|
||||
void SetContent();
|
||||
|
||||
vtkProp3D *GetProp() override { return m_Asm; }
|
||||
|
||||
vtkImageData *GetImageData();
|
||||
|
||||
void SaveToXMLFile(const char *fname);
|
||||
@@ -65,8 +69,10 @@ public:
|
||||
|
||||
void setShadingPreset(int blendType = 2);
|
||||
void SetRepresentation(Representation mode);
|
||||
void RescaleShaderRange();
|
||||
|
||||
void Update() override;
|
||||
void SyncFromVtk() override;
|
||||
void serialize_display(uLib::Archive::display_properties_archive & ar, const unsigned int version = 0) override;
|
||||
|
||||
protected:
|
||||
@@ -88,6 +94,11 @@ private:
|
||||
float m_Window;
|
||||
float m_Level;
|
||||
int m_ShadingPreset;
|
||||
|
||||
Connection m_UpdateConnection;
|
||||
|
||||
class vtkColorTransferFunction *m_ColorFun;
|
||||
class vtkPiecewiseFunction *m_OpacityFun;
|
||||
};
|
||||
|
||||
} // namespace Vtk
|
||||
|
||||
Reference in New Issue
Block a user