[vtkusers] Texture Mapping Image Quality

Patrick Lowry plowry at scotia-group.com
Wed Sep 1 13:14:11 EDT 2004


David:

Thanks again for all of your help.  I am really impressed by your quick and 
on the mark recommendations.

I have not done anything with your last recommendations but I wanted to 
follow up on our dialogue.  I had mentioned to my client that the texture 
map images were unsatisfactory and that we should find an alternative way 
to look at the subject data.  His technical person, after navigating the 
images, disregarded my comments as unnecessary perfectionism.  The images 
looked great on his equipment .  Later he ported  the code to his laptop 
and saw the poor results.  It turns out that the quality of the texture 
mapped image is highly dependent on the video card.  We don't understand 
the details of why, only that the newer card renders the image at a much 
higher resolution than an older card.

Thanks again,
Patrick

At 04:01 PM 8/30/2004, you wrote:
>Hi Patrick,
>
>You can try using vtkImageActor instead of vtkTexture and vtkActor,
>I checked the c++ code and it doesn't resample the image regardless
>of the size.
>
>The vtkImageActor doesn't offer as much flexibility as vtkTexture,
>but it will probably do what you need.
>
>  - David
>
>On Mon, 30 Aug 2004, Patrick Lowry wrote:
>
> > David:
> >
> > VTK is subsampling the image.  Even for an image of less than 1000x1000
> > pixels, it resamples to a power of two (as the documentation says).  For
> > larger images it must resample it much more.
> >
> > Are we stuck with this or are there additional settings that allow bigger
> > image sizes?  It seems that large memory capacity, both on the mother board
> > and on the video card (128mb) would allow larger images.
> >
> > Thanks,
> > Patrick
> >
> > At 02:10 PM 8/30/2004, you wrote:
> > >Hi Patrick,
> > >
> > >VTK is subsampling the image before creating the texture, probably because
> > >VTK thinks it is too large for your graphics card.
> > >
> > >Try using
> > >atext DebugOn
> > >
> > >and see what kind of info it gives you.  You might have to break the
> > >image into patches in order to render it at full resolution.
> > >
> > >  - David
> > >
> > >
> > >On Mon, 30 Aug 2004, Patrick Lowry wrote:
> > >
> > > > David:
> > > >
> > > > The TIFF is 8-Bit Paletted.  A comparitive image is shown 
> below.  The TIFF
> > > > being loaded is on the left and a capture of the rendered texture 
> map is on
> > > > the right.  The script has the 32-bit flag setting you 
> suggested.   It is a
> > > > satellite image showing roads etc.
> > > >
> > > > Thanks for your help.
> > > >
> > > > Cheers,
> > > > Patrick Lowry
> > > >
> > > > Comp.jpg
> > > >
> > > >
> > > > At 01:17 PM 8/30/2004, you wrote:
> > > > >Hi Patrick,
> > > > >
> > > > >What do you mean by "image characteristics"?  I'm guessing that your
> > > > >image is either 8-bit greyscale or 24-bit RGB if it is a TIFF.  If
> > > > >this is the case, then VTK will use the data as a texture without
> > > > >any conversion, and the only things that should impact quality are
> > > > >the 32-bit flag I mentioned, and the actor's lighting properties.
> > > > >
> > > > >By "low quality" do you mean the image looks noisy, or do you mean
> > > > >that the contrast is poor?
> > > > >
> > > > >On Mon, 30 Aug 2004, Patrick Lowry wrote:
> > > > >
> > > > > > Hi David:
> > > > > >
> > > > > > Thanks for the quick reply.
> > > > > >
> > > > > > I tried your recommended setting and it didn't change the quality.
> > > > > >
> > > > > > Do image characteristics affect how they render?
> > > > > >
> > > > > > Patrick
> > > > > >
> > > > > > At 08:36 AM 8/30/2004, you wrote:
> > > > > > >Hi Patrick,
> > > > > > >
> > > > > > >Some graphics cards default to 16-bit textures, be sure to force
> > > > > > >VTK to use 32-bit textures:
> > > > > > >
> > > > > > >atext SetQualityTo32Bit
> > > > > > >
> > > > > > >  - David
> > > > > > >
> > > > > > >
> > > > > > >On Mon, 30 Aug 2004, Patrick Lowry wrote:
> > > > > > >
> > > > > > > > To All:
> > > > > > > >
> > > > > > > > The texture mapping capabilities of VTK are amazing but I
> > > noticed image
> > > > > > > > quality loss from the original TIFF.  Texture mapping done by a
> > > > > commercial
> > > > > > > > program I have does not suffer the same quality loss.  The 
> essence
> > > > > of the
> > > > > > > > image part of the TCL script are shown below.  Any ideas on
> > > preventing
> > > > > > > > image quality loss?
> > > > > > > >
> > > > > > > > Thanks in advance.
> > > > > > > >
> > > > > > > > Patrick Lowry
> > > > > > > >
> > > > > > > > .
> > > > > > > > .
> > > > > > > > .
> > > > > > > > vtkTIFFReader readTIFF
> > > > > > > >    readTIFF SetFileName "data/test1comp.TIF"
> > > > > > > >    readTIFF Update
> > > > > > > > vtkTexture atext
> > > > > > > >    atext SetInput [readTIFF GetOutput]
> > > > > > > >    atext InterpolateOn
> > > > > > > > .
> > > > > > > > .
> > > > > > > > .
> > > > > > > > vtkTextureMapToPlane test
> > > > > > > >    test SetInput [normals GetOutput]
> > > > > > > >    test SetOrigin $xmin $ymin 0.0
> > > > > > > >    test SetPoint1 $xmax $ymin 0.0
> > > > > > > >    test SetPoint2 $xmin $ymax 0.0
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > This is the private VTK discussion list.
> > > > > > > > Please keep messages on-topic. Check the FAQ at:
> > > > > > > <http://public.kitware.com/cgi-bin/vtkfaq>
> > > > > > > > Follow this link to subscribe/unsubscribe:
> > > > > > > > http://www.vtk.org/mailman/listinfo/vtkusers
> > > > > > > >
> > > > > > >
> > > > > > >_______________________________________________
> > > > > > >This is the private VTK discussion list.
> > > > > > >Please keep messages on-topic. Check the FAQ at:
> > > > > > ><http://public.kitware.com/cgi-bin/vtkfaq>
> > > > > > >Follow this link to subscribe/unsubscribe:
> > > > > > >http://www.vtk.org/mailman/listinfo/vtkusers
> > > > > >
> > > >
> >
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list