Amy Henderson | 1 Dec 15:49 2004

Re: Cutting a cylinder

Hi Sean,

Take a look at VTK/Graphics/Testing/Tcl/capSphere.tcl

What you want to do is pass each piece of the cylinder through 
vtkFeatureEdges (set to extract only boundary edges).  Clean each of these 
outputs (vtkCleanPolyData), and pass the results through vtkStripper to 
create a triangle strip filling in the polygon extracted from 
vtkFeatureEdges.  The relevant code from capSphere.tcl is shown below.

vtkFeatureEdges boundaryEdges
   boundaryEdges SetInput [clipper GetOutput]  # In your case, the input 
would be the output of your cutter.
   boundaryEdges BoundaryEdgesOn
   boundaryEdges FeatureEdgesOff
   boundaryEdges NonManifoldEdgesOff

vtkCleanPolyData boundaryClean
   boundaryClean SetInput [boundaryEdges GetOutput]

vtkStripper boundaryStrips
   boundaryStrips SetInput [boundaryClean GetOutput]

- Amy

At 09:27 AM 12/1/2004, Sean Richards wrote:
>Hello all!
>
>I am using vtkImplicitPlaneWidget to interactively slice a cylinder 
>(normal cylinder from vtkCylinderSource) in my scene.
(Continue reading)

ckchen@CIS | 1 Dec 16:12 2004
Picon

vtkViewport linking problem in VS.net 2003.

Hi~ I am a Newbie in vtk, and encounter some linking problems in MS. VS. net 
2003 when
I combine vtk and qt together.
In my program, the following code will cause linking problem, and I guess 
the problem is the
compiler can't find the proper vtkxxx.lib in the linking time when I use 
"RemoveActor( )" function.
Here is the code segment:

vtkRenderer *ren = vtkRenderer::New();
.....
ren->AddActor(mainActor);
...
ren->RemoveActor(mainActor);

The code works well when I remove "ren->RemoveActor(...)", and
Here is the error message:

Visualizer error LNK2019: unresolved external symbol "__declspec(dllimport) 
public: void __thiscall vtkViewport::RemovePropW(class vtkProp *)" 
(__imp_?RemovePropW <at> vtkViewport <at>  <at> QAEXPAVvtkProp <at>  <at>  <at> Z) referenced in function 
"private: void __thiscall QVTKFrame::Pipeline(void)" 
(?Pipeline <at> QVTKFrame <at>  <at> AAEXXZ)

I have already include every vtkxxx.lib in solution's property list
=> Linker->Input->Additional Dependencie =>
qt-mt323.lib qtmain.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib 
advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib 
winspool.lib
(Continue reading)

Lederer, Maitland | 1 Dec 16:23 2004

picking in a vtkTkImageViewerWidget

Hey users-

I'd like to pick a point in a vtkTkImageViewerWidget using a
vtkPropPicker and I'm running into a problem.  The picker is not finding
any vtkProps, despite the fact that there is one in the renderer's
vtkPropCollection.  Can anyone offer any suggestions?  Some of my code
(Tcl/Tk) is below.

Any help appreciated.  Thanks muchly.

-Maitland

set ::rf2D [vtkTkImageViewerWidget $::renderFrame.r2f -width 1024
-height 1024]
[$::rf2D GetImageViewer] SetColorWindow 255
[$::rf2D GetImageViewer] SetColorLevel 128
# slider for 2D view
scale $::renderFrame.s2 -orient horizontal -command SetVisibleSlice \
    -from [lindex $::extent 4] -to [lindex $::extent 5] -length 1000
grid $::rf2D -row 1 -column 2 
grid $::renderFrame.s2 -row 2 -column 2
::vtk::bind_tk_imageviewer_widget $::rf2D
bind $::rf2D <KeyRelease> { } 
bind $::rf2D <Expose> "$::rf2D Render"

**************************
M. Maitland Lederer
Staff Engineer 
Foster-Miller, Inc.
(781)684-4618
(Continue reading)

Sensei | 1 Dec 16:46 2004
Picon

Re: Huge numbers of cubes

Sensei wrote:
> Hi. I'm simulating the effect of a load over a tower of bricks, and I 
> wonder how to deal with such a huge number of elements.
> 
> I have 4000~6000 nodes and 3000~5000 bricks. These, multiplied by two: 
> the original and the tower after the analysis.
> 
> Can you suggest me a way of visualizing those two towers with vtk in the 
> same window? I would make the actors semi-transparent...

Have I asked a so stupid question? ........

--

-- 
Sensei <mailto:senseiwa <at> tin.it> <pgp:8998A2DB>
        <icqnum:241572242>
        <yahoo!:sensei_sen>
        <msn-id:sensei_sen <at> hotmail.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

Jeff Marker | 1 Dec 16:50 2004
Picon

Re: Huge numbers of cubes

I have also run into problems as soon as I hit about 100 actors, and I
need to be able to support about 1000. I too am interested in
approaches to this.

-- Jeff

On Wed, 01 Dec 2004 16:46:32 +0100, Sensei <senseiwa <at> tin.it> wrote:
> Sensei wrote:
> > Hi. I'm simulating the effect of a load over a tower of bricks, and I
> > wonder how to deal with such a huge number of elements.
> >
> > I have 4000~6000 nodes and 3000~5000 bricks. These, multiplied by two:
> > the original and the tower after the analysis.
> >
> > Can you suggest me a way of visualizing those two towers with vtk in the
> > same window? I would make the actors semi-transparent...
> 
> Have I asked a so stupid question? ........
> 
> 
> 
> --
> Sensei <mailto:senseiwa <at> tin.it> <pgp:8998A2DB>
>         <icqnum:241572242>
>         <yahoo!:sensei_sen>
>         <msn-id:sensei_sen <at> hotmail.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:
(Continue reading)

Bocsi Esseigaz | 1 Dec 17:10 2004
Picon

Getting the progress state of a process object - What's wrong with this?

Hi all,
I'd like to link my VTK processes to a progressbar which in the statusbar. I think my code is almost OK, hopefully there shouldn't be much to change.
What my code does:
I created a class (derived from vtkCommand) and overrode the virtual Execute() method.
In my code I use ProcessObject->AddObserver(vtkCommand::ProgressEvent,&Proc) method (where Proc is an instance of the class derived from vtkCommand).
This works fine, because the overridden Execute() method gets called every time the process object starts but I don't know how to get the current state of progress (it should be a fraction between 0 and 1).
How do I get it? I tried "this->GetProgress()" but didn't compile...

Here's the code:

----------------------------------------------------------------
The header file of the class CProgressObserver:
----------------------------------------------------------------

class CProgressObserver : public vtkCommand {
public:
static CProgressObserver* New() {
 return new CProgressObserver;
}
virtual void Execute(vtkObject* caller, unsigned long, void *callData) {
 double* dProgress = (double*)(callData);
    
  //The progressbar is in the MainFrame
  CMainFrame* pFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
    CStatusProgress* setprogress = &pFrame->progress; 

  //Here I'd like to set the progressbar to the actual progress of my processobject
  setprogress->SetPos(?????);
}
};

----------------------------------------------------------------
Later in my code:
----------------------------------------------------------------
 
  CProgressObserver Proc;
  CProgressObserverEnd ProcEnd;
  m_openclose->AddObserver(vtkCommand::ProgressEvent,&Proc);


Any help would be greatly appreciated,
 Esseigaz

--------------------------------------------------------------------------------
Free vagy, de ez nem elég?
Szabadulj meg a kéretlen reklámlevelektől!
Nyiss egy kényelmes 20MB-os postafiókot ingyen!

CitroMail.hu - Stabil, gyors, kedves

_______________________________________________
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
Mathieu Malaterre | 1 Dec 17:22 2004

Re: vtkViewport linking problem in VS.net 2003.


> I have already include every vtkxxx.lib in solution's property list
> => Linker->Input->Additional Dependencie =>
> qt-mt323.lib qtmain.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib 
> advapi32.lib
> shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib 
> wsock32.lib winspool.lib
> delayimp.lib glu32.lib opengl32.lib
> vtkRendering.lib vtkIO.lib vtkHybrid.lib vtkGraphics.lib vtkImaging.lib 
> vtkftgl.lib  vtkfreetype.lib vtkFiltering.lib vtkCommon.lib vtkpng.lib 
> vtktiff.lib vtkzlib.lib vtkjpeg.lib vtkexpat.lib vtkPatented.lib 
> vtkParallel.lib
> 
> Can anyone tell me what's wrong with my solution? Do I miss something in 
> configuration setup?

You are missing vtkFiltering. Are you using cmake ? Because you should 
only mention vtkRendering and cmake will do the job for you.

HTH,
Mathieu

_______________________________________________
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

REGAT-BARREL Aurélien | 1 Dec 17:41 2004
Picon

Re: Win32 : VTK headers cleanup

Hi,
Yes, I ended my mail by reminding this problem. But I began to talk about a real header cleanup, I mean removing unneeded header inclusion. I found an other one :
in VTK/Rendering/vtkOpenGLProperty.h
This file includes some headers twice :
#include <math.h>
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLProperty.h"
#include <math.h>
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLProperty.h"
 
an in VTK/Common/vtkMutexLock.h and VTK/Common/vtkCriticalSection.h, <winbase.h> is unneeded. The same for VTK/Common/vtkDirectory.cxx which include <windows.h>. etc...
 
For the removing of <windows.h>, I managed to do it.
I am preparing a document about it + a binary distrib, I will ask for feedbacks and testers here once I have finished it.
 
Regards.


Brad King <brad.king <at> kitware.com> wrote:
REGAT-BARREL Aurélien wrote:
> I worked on VTK headers and I think the following minor corrections
> could be done:

We already have your report in the bug tracker:

http://www.vtk.org/Bug/bug.php?op=show&bugid=836&pos=0

This is on my to-do list but is low priority right now. It will be
addressed when we have time.

-Brad



Aurélien REGAT-BARREL
My VTK blog : http://aurelien_regat-barrel.blogspot.com

Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. Téléchargez GRATUITEMENT ici !
_______________________________________________
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
Toon Huysmans | 1 Dec 17:41 2004
Picon

Re: Getting the progress state of a process object - What'swrong with this?

hmmm, maybe
 
    dynamic_cast<vtkAlgorithm*>(caller)->GetProgress();
 
works....
 
Toon Huysmans.
----- Original Message -----
Sent: Wednesday, December 01, 2004 5:10 PM
Subject: [vtkusers] Getting the progress state of a process object - What'swrong with this?

Hi all,
I'd like to link my VTK processes to a progressbar which in the statusbar. I think my code is almost OK, hopefully there shouldn't be much to change.
What my code does:
I created a class (derived from vtkCommand) and overrode the virtual Execute() method.
In my code I use ProcessObject->AddObserver(vtkCommand::ProgressEvent,&Proc) method (where Proc is an instance of the class derived from vtkCommand).
This works fine, because the overridden Execute() method gets called every time the process object starts but I don't know how to get the current state of progress (it should be a fraction between 0 and 1).
How do I get it? I tried "this->GetProgress()" but didn't compile...

Here's the code:

----------------------------------------------------------------
The header file of the class CProgressObserver:
----------------------------------------------------------------

class CProgressObserver : public vtkCommand {
public:
static CProgressObserver* New() {
 return new CProgressObserver;
}
virtual void Execute(vtkObject* caller, unsigned long, void *callData) {
 double* dProgress = (double*)(callData);
    
  //The progressbar is in the MainFrame
  CMainFrame* pFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd;
    CStatusProgress* setprogress = &pFrame->progress; 

  //Here I'd like to set the progressbar to the actual progress of my processobject
  setprogress->SetPos(?????);
}
};

----------------------------------------------------------------
Later in my code:
----------------------------------------------------------------
 
  CProgressObserver Proc;
  CProgressObserverEnd ProcEnd;
  m_openclose->AddObserver(vtkCommand::ProgressEvent,&Proc);


Any help would be greatly appreciated,
 Esseigaz

--------------------------------------------------------------------------------
Free vagy, de ez nem elég?
Szabadulj meg a kéretlen reklámlevelektől!
Nyiss egy kényelmes 20MB-os postafiókot ingyen!

CitroMail.hu - Stabil, gyors, kedves

_______________________________________________
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
_______________________________________________
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
Mathieu Malaterre | 1 Dec 17:27 2004

Re: vtkViewport linking problem in VS.net 2003.

Mathieu Malaterre wrote:
> 
>> I have already include every vtkxxx.lib in solution's property list
>> => Linker->Input->Additional Dependencie =>
>> qt-mt323.lib qtmain.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib 
>> advapi32.lib
>> shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib 
>> wsock32.lib winspool.lib
>> delayimp.lib glu32.lib opengl32.lib
>> vtkRendering.lib vtkIO.lib vtkHybrid.lib vtkGraphics.lib 
>> vtkImaging.lib vtkftgl.lib  vtkfreetype.lib vtkFiltering.lib 
>> vtkCommon.lib vtkpng.lib vtktiff.lib vtkzlib.lib vtkjpeg.lib 
>> vtkexpat.lib vtkPatented.lib vtkParallel.lib
>>
>> Can anyone tell me what's wrong with my solution? Do I miss something 
>> in configuration setup?

Discard my previous mail, I didn't read carefully enough. In vtkViewport 
you have :

void vtkViewport::RemoveProp(vtkProp *p)

but this symbol is changed to : vtkViewport::RemovePropW (because of 
UNICODE)

Have a look at:

http://aurelien_regat-barrel.blogspot.com/
http://public.kitware.com/Bug/bug.php?op=show&bugid=836

HTH
Mathieu

_______________________________________________
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