#include <vtkRenderWindowInteractor.h>
#include <vtkRenderWindow.h>
+#include <vtkImageData.h>
#include <vtkRenderer.h>
#include <vtkCamera.h>
#include <vtkActor.h>
strcat( anAlphaTexture, "/share/salome/resources/sprite_alpha.vti" );
//cout << anAlphaTexture << endl;
- aPresent->SetImageData( VISU_GaussPointsPL::MakeTexture( aMainTexture, anAlphaTexture ) );
+ vtkSmartPointer<vtkImageData> aTextureValue = VISU_GaussPointsPL::MakeTexture( aMainTexture, anAlphaTexture );
+ aPresent->SetImageData( aTextureValue.GetPointer() );
aPresent->Update();
}
//----------------------------------------------------------------------------
-vtkImageData*
+vtkSmartPointer<vtkImageData>
VISU_GaussPointsPL
::MakeTexture( const char* theMainTexture,
const char* theAlphaTexture )
if(aMainImageSize[0] != anAlphaImageSize[0] || aMainImageSize[1] != anAlphaImageSize[1])
return NULL;
+ vtkSmartPointer<vtkImageData> aCompositeImageData = vtkImageData::New();
+ aCompositeImageData->Delete();
+
int aNbCompositeComponents = 4;
- vtkImageData* aCompositeImageData = vtkImageData::New();
aCompositeImageData->SetDimensions(aMainImageSize);
aCompositeImageData->SetScalarTypeToUnsignedChar();
aCompositeImageData->SetNumberOfScalarComponents(aNbCompositeComponents);
* Second parameter - texture for alpha mask.
*/
static
- vtkImageData*
+ vtkSmartPointer<vtkImageData>
MakeTexture( const char* theMainTexture,
const char* theAlphaTexture );