Page MenuHomePhabricator

Aliasing behavior on binary images
Closed, ResolvedPublic

Description

The 3D rendering window is drawing binary images (noticed on BallBinary30x30x30 from Core/Testing/Data) with aliased boundary. For illustration see the attached image.

This is not the effect of 'Texture Interpolation' property, it occurs independent of the Interpolation flag value.

Screen shot 2010-04-09 at 1.55.43 PM.png (666×837 px, 45 KB)

Event Timeline

Possibly related: when working with Pic3D.pic.gz, there are more vessel structures visible in the 2D Window compared to the parts visible in 3D Window. See for illustration the attached screenshot.

changing platfrom/OS to 'All' since this occurs also on WinXP.

Is this really a bug? Or is the behavior as supposed?

The ball is drawn with anti aliased boundary. I am not really sure whether this can be called a bug.

It looks as if the 2D window stretches the available gray values over a smaller level window than the 3D viewer. i.e. more low gray values are black (to the eye) in the 3D window.

Looks like a problem with vtkOpenGLTexture.cxx. VTK requires the texture to be a power of 2 and resamples it, when it isn't the case yet.

Sent the following message to the vtk mailling list:

vtkOpenGLTexture still uses power of 2 textures and resamples all textures that are not power of 2. Since OpenGL 2.0 using power of 2 textures is not necessary anymore. This resampling introduces an unwanted interpolation in my application. During debugging it becomes obvious that not setting the “resampleNeeded” flag circumvents this problem, but there is no option to avoid resampling from outside the class.
Is there another implementation for using textures without resampling? Is there a bug listed for this issue?

//End of message

Remove active assignee flag till answer is available. Probable workaround is to inherit from vtkOpenGLTexture and outcomment the line that sets the resampling flag.

The problem is fixed from VTK 5.6