Karl Garsha | 1 Apr 20:43 2005
Picon

Re: vtk+OS X: can't read *.tiff files

An update: the crashing interpreter is due to some sort of conflict 
between the PyCrust interpreter or wxWindows and Python/VTK.  When I run 
a simple interpreter from the shell prompt, I can read *.tif files.  I'm 
still having render window problems though; vtkImageViewer just shows up 
for a split second with nothing in it and then dissappears.  I'm using 
the Carbon build. I have an older Fink VTK build that does the same 
thing in X11.  I'm just calling the Render() function of the 
ImageViewer, am I missing something?  An example of the code I'm using 
is below.  The only wierd thing I'm doing is using 8-bit color indexed 
tiff files; clearly I'm doing something wrong but I can't seem to figure 
out what it is that I'm forgetting.

#! python

class ImageRdDsply:
    def __init__(self, imgname):
        global ImgName
        global ImgData
        self.ImgName=imgname
        self.ReadImage_8bit()

    def ReadImage_8bit(self):
        import vtk
        TIFFReader=vtk.vtkTIFFReader()
        Reader=vtk.vtkImageReader()
        Image=vtk.vtkImageData()
        TIFFReader.SetFileName(self.ImgName)
        TIFFReader.Update()#Here I'm using the TIFFReader to extract 
pertinent info from the file
        DataExtent=TIFFReader.GetDataExtent()
(Continue reading)

Matt Schmiermund | 1 Apr 21:10 2005

using vtkFeatureEdges

I am trying to display only the outline of an object I
have. Someone on this list suggested using
vtkExtractEdges or vtkFeatureEdges. After looking at
the two it appears that vtkFeatureEdges should do what
I am looking to do. 

However I have been unable to get anything to display
when using this class.

Here is a piece of my code:

 
edgeExtractor->SetInput(reader->GetPolyDataOutput());
  edgeExtractor->ColoringOff();
  edgeExtractor->BoundaryEdgesOn();
  edgeExtractor->ManifoldEdgesOn();
  edgeExtractor->FeatureEdgesOn();

  outlineMapper->SetInput( edgeExtractor->GetOutput()
);
  outlineActor->SetMapper( outlineMapper );
  outlineActor->GetProperty()->
     SetRepresentationToWireframe();
  outlineActor->GetProperty()->SetColor( 0,0,1 );

Where reader is a vtkDataSetReader, edgeExtractor is a
vtkFeatureEdges, outlineMapper is a vtkPolyDataMapper.

When I try to add outlineActor to the render window
nothing appears.
(Continue reading)

Prabhu Ramachandran | 1 Apr 21:28 2005
Picon

Re: vtk+OS X: can't read *.tiff files

>>>>> "KG" == Karl Garsha <garsha <at> itg.uiuc.edu> writes:

    KG> An update: the crashing interpreter is due to some sort of
    KG> conflict between the PyCrust interpreter or wxWindows and
    KG> Python/VTK.  When I run a simple interpreter from the shell
    KG> prompt, I can read *.tif files.  I'm still having render
    KG> window problems though; vtkImageViewer just shows up for a
    KG> split second with nothing in it and then dissappears.  I'm
    KG> using the Carbon build. I have an older Fink VTK build that
    KG> does the same thing in X11.  I'm just calling the Render()
    KG> function of the ImageViewer, am I missing something?  An
    KG> example of the code I'm using is below.  The only wierd thing
    KG> I'm doing is using 8-bit color indexed tiff files; clearly I'm
    KG> doing something wrong but I can't seem to figure out what it
    KG> is that I'm forgetting.

It could be a library mismatch.  I ran into one pretty nasty one with
zlib in October.  See this thread:

 http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?11:mss:33378:fhggeejokfcfommhboka

It might not be of any use but you might want to run it under gdb and
see what is going on.

cheers,
prabhu
_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
(Continue reading)

Jeffrey Meng | 1 Apr 22:46 2005
Picon

How to turn volume data into triangle data (Not triangle strip)

Hi Amy, 

Thank you for your reply.

I transfered the data to triangles, and try to iterate through the
celldata, but the cell
data still seems like triangle strips, would you please have a quick
look at my source
listed below?

Thanks a million.

Best,
Jeffrey 

===============================================================
Command line parameter:  VTK_DATA_ROOT/headsq/Quarter

#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkVolume16Reader.h"
#include "vtkPolyDataMapper.h"
#include "vtkActor.h" 
#include "vtkOutlineFilter.h"
#include "vtkCamera.h"
#include "vtkStripper.h"
#include "vtkLookupTable.h"
#include "vtkImageDataGeometryFilter.h"
#include "vtkProperty.h"
(Continue reading)

Amy Squillacote | 1 Apr 23:04 2005

Re: How to turn volume data into triangle data (Not triangle strip)

Hi Jeffrey,

Why are you passing your data through vtkStripper and then through 
vtkTriangleFilter?  This creates triangle strips and then breaks them back 
apart.  When vtkTriangleFilter breaks the triangle strips apart, it copies 
the cell data values of the entire triangle strip to each triangle that was 
a part of that strip.  In VTK, a triangle strip is a single cell; there is 
not separate cell data per triangle composing that strip.  If what you mean 
by "the cell data still seems like triangle strips" is that the same value 
is repeated for each triangle that was in a particular strip, this should 
explain why.  If that is not what you mean, please clarify.

- Amy

At 03:46 PM 4/1/2005, Jeffrey Meng wrote:
>Hi Amy,
>
>Thank you for your reply.
>
>I transfered the data to triangles, and try to iterate through the
>celldata, but the cell
>data still seems like triangle strips, would you please have a quick
>look at my source
>listed below?
>
>Thanks a million.
>
>Best,
>Jeffrey
>
(Continue reading)

Jeffrey Meng | 1 Apr 23:21 2005
Picon

Re: vtkusers Digest, Vol 12, Issue 4

Hi Amy,

Basically, I am new to VTK, so I am really stupid. 

What I want to do is: I want to be able to iterate through a volume 
data as triangles, then change each triangle's color separately.
And that's why I need vtkTriangleFilter. As to vtkStripper, I really
don't know if I need it or not. :(

So assume I have a vtkTriangleFilter object, I pass it to vtkPolyDataMapper.
Now, the problem is how I iterate through the triangles? 

The code I wrote below was to iterate through the cells, hoping each
cell is a triangle
instead of a triangle strip, but looking at the execution, a Cell
isn't a Triangle here. (It seems like a Cell is still a Triangle
Strips, instead)

---------------------------------------------------------------------------------------

	vtkPolyData* pPolyData = pTriangles->GetOutput(); //skinMapper->GetInput();
        vtkCellData* pCellData = pPolyData->GetCellData();
        vtkDataArray* pCellArray = pCellData->GetScalars(); 

       
	int nTuples = pCellArray->GetNumberOfTuples();
	for (int i = 0; i < nTuples / 2; ++i)
	{
		pCellArray->SetTuple(i, scalar);
	}
(Continue reading)

Amy Squillacote | 1 Apr 23:29 2005

Re: Re: vtkusers Digest, Vol 12, Issue 4

What happens if you take vtkStripper out of your code?  I think this would 
get rid of your problem with triangle strips because they would not be 
created in the first place.

- Amy

At 04:21 PM 4/1/2005, Jeffrey Meng wrote:
>Hi Amy,
>
>Basically, I am new to VTK, so I am really stupid.
>
>What I want to do is: I want to be able to iterate through a volume
>data as triangles, then change each triangle's color separately.
>And that's why I need vtkTriangleFilter. As to vtkStripper, I really
>don't know if I need it or not. :(
>
>So assume I have a vtkTriangleFilter object, I pass it to vtkPolyDataMapper.
>Now, the problem is how I iterate through the triangles?
>
>The code I wrote below was to iterate through the cells, hoping each
>cell is a triangle
>instead of a triangle strip, but looking at the execution, a Cell
>isn't a Triangle here. (It seems like a Cell is still a Triangle
>Strips, instead)
>
>---------------------------------------------------------------------------------------
>
>         vtkPolyData* pPolyData = pTriangles->GetOutput(); 
> //skinMapper->GetInput();
>         vtkCellData* pCellData = pPolyData->GetCellData();
(Continue reading)

Cameron Slayden | 1 Apr 23:36 2005

Problems installing

Hello Everyone,

I'm looking forward to using VTK, but I can't seem to get it to install
on my computer. I am running Windows XP, and when I installed the
pre-compiled version on my computer, the peripheral files and folders
were there but there was no .exe file and so I couldn't actually RUN the
program. I followed the directions on the website for compiling the
source code with CMAKE, but it encountered a bunch of errors when I
tried.  

Can anyone help?

Cameron Slayden
_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

Randall Hand | 1 Apr 23:43 2005
Picon

Re: Problems installing

With VTK, there's nothing to run.. it's not an application, but merely a library that can be used by other applications.

If you're looking for a visualization application, try ParaView.  It's also from Kitware, & built upon VTK.

On Apr 1, 2005 3:36 PM, Cameron Slayden <cslayden <at> aaas.org> wrote:
Hello Everyone,

I'm looking forward to using VTK, but I can't seem to get it to install
on my computer. I am running Windows XP, and when I installed the
pre-compiled version on my computer, the peripheral files and folders
were there but there was no .exe file and so I couldn't actually RUN the
program. I followed the directions on the website for compiling the
source code with CMAKE, but it encountered a bunch of errors when I
tried.

Can anyone help?

Cameron Slayden
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



--
Randall Hand
http://www.yeraze.com
_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Iain Dooley | 2 Apr 16:51 2005

extension "GLX" missing on display (vtkXOpenGLRenderWindow (0x805fe00): Could not find a decent visual)

hi there,

i'm running:

FreeBSD 4.10-STABLE FreeBSD 4.10-STABLE #0: Wed Jun 23 01:36:48 GMT 2004

i use XFree86. i successfully built the C++ test app for VTK, and when i run it, i get:

Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
ERROR: In /usr/home/iain/dist/vtk/VTKFiles/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 219
vtkXOpenGLRenderWindow (0x805fe00): Could not find a decent visual

Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
ERROR: In /usr/home/iain/dist/vtk/VTKFiles/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 219
vtkXOpenGLRenderWindow (0x805fe00): Could not find a decent visual

Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
ERROR: In /usr/home/iain/dist/vtk/VTKFiles/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 219
vtkXOpenGLRenderWindow (0x805fe00): Could not find a decent visual

X Error of failed request:  BadColor (invalid Colormap parameter)
  Major opcode of failed request:  84 (X_AllocColor)
  Resource id in failed request:  0x0
  Serial number of failed request:  18
  Current serial number in output stream:  18

the result of xdpyinfo is:

iain <at> piper> xdpyinfo
name of display:    :0.0
version number:    11.0
vendor string:    The XFree86 Project, Inc
vendor release number:    40300000
XFree86 version: 4.3.0
maximum request size:  4194300 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    7
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 15, bits_per_pixel 16, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  window 0x1a00005, revert to PointerRoot
number of extensions:    25
    BIG-REQUESTS
    DOUBLE-BUFFER
    DPMS
    Extended-Visual-Information
    FontCache
    LBX
    MIT-SCREEN-SAVER
    MIT-SHM
    MIT-SUNDRY-NONSTANDARD
    RANDR
    RENDER
    SECURITY
    SHAPE
    SYNC
    TOG-CUP
    X-Resource
    XC-APPGROUP
    XC-MISC
    XFree86-Bigfont
    XFree86-Misc
    XFree86-VidModeExtension
    XInputExtension
    XKEYBOARD
    XTEST
    XVideo
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    800x600 pixels (271x203 millimeters)
  resolution:    75x75 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0x37
  depth of root window:    24 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store NO, save-unders NO
  largest cursor:    64x64
  current input event mask:    0xda4031
    KeyPressMask             EnterWindowMask          LeaveWindowMask
    KeymapStateMask          StructureNotifyMask      SubstructureNotifyMask
    SubstructureRedirectMask PropertyChangeMask       ColormapChangeMask
  number of visuals:    1
  default visual id:  0x21
  visual:
    visual id:    0x21
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits

the result of glxinfo is:

Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Error: couldn't find RGB GLX visual

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
0x21 24 tc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None

after reading these posts:

http://public.kitware.com/pipermail/vtkusers/2002-January/058980.html
http://public.kitware.com/pipermail/vtkusers/2000-January/052691.html

i have uncommented the line in my XF86Config file:

Load "glx"

and restarted x. my video card is quite crappy, so i'm not sure if it can, like, load glx or not. here is the
relevant section from XF86Config:

Section "Device"
    Identifier  "Standard VGA"
    VendorName  "Unknown"
    BoardName   "Unknown"

# The chipset line is optional in most cases.  It can be used to override
# the driver's chipset detection, and should not normally be specified.

#    Chipset    "generic"

# The Driver line must be present.  When using run-time loadable driver
# modules, this line instructs the server to load the specified driver
# module.  Even when not using loadable driver modules, this line
# indicates which driver should interpret the information in this section.

    Driver     "vga"
# The BusID line is used to specify which of possibly multiple devices
# this section is intended for.  When this line isn't present, a device
# section can only match up with the primary video device.  For PCI
# devices a line like the following could be used.  This line should not
# normally be included unless there is more than one video device
# intalled.

#    BusID      "PCI:0:10:0"

#    VideoRam   256

#    Clocks     25.2 28.3

EndSection

# Device configured by xf86config:

Section "Device"
    Identifier  "My Video Card"
    Driver      "vga"
        # unsupported card
    #VideoRam    1024
    # Insert Clocks lines here if appropriate
EndSection

i'm using a card that i just found lying around. i have no idea what it is, but will generic vga drivers support
glx? i don't even know what GLX is really!

let me know if there is any more info that it would be useful to supply

cheers

iain
_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


Gmane