From mreyesa at hotmail.com Tue Feb 1 02:52:30 2005 From: mreyesa at hotmail.com (reyes mauricio) Date: Tue, 01 Feb 2005 07:52:30 +0000 Subject: [vtkusers] Re: Re: vtkProgrammableGlyphFilter problem In-Reply-To: <20050131175329.19C4434A80@public.kitware.com> Message-ID: Hi, The problem still persists after trying what you recommend me Malcolm (add a translation to the transform filter). I only get one single sphere as output of vtkProgrammableGlyphFilter. Does the vtkProgrammableGlyphFilter duplicate the source data at each point by itself, or do I have to perform that task? thanks in advance, Mauricio > >Hi > >You need to add a translation to your transform - by the point's x,y,z. >Currently you're just scaling by the same amount every time at the origin, >so it looks like one glyph. > >HTH >Malcolm > >----- Original Message ----- >From: "reyes mauricio" >To: >Sent: Monday, January 31, 2005 6:36 PM >Subject: [vtkusers] vtkProgrammableGlyphFilter problem > > > > Hi VTK Users, > > > > I'm using vtkProgrammableGlyphFilter to manipulate individually (via > > setGlyphMethod) scaling and orientation of spheres. > > > > I cannot make the filter to work, it only gives me one single sphere >as > > output > > > > ( vtkGlyph3D works well wit the input data I pass. It copy the sphere >at > > different positions, but I need to scale them and orient them >differently ) > > > > Thanks in advance, > > Mauricio > > > > this is part of my code: > > > > > > // ********* part of code ************ > > > > vtkSphereSource *sphere=vtkSphereSource::New(); > > vtkProgrammableGlyphFilter >*pfilter=vtkProgrammableGlyphFilter::New(); > > pfilter->SetSource(sphere->GetOutput()); > > pfilter->SetInput(pd); <-------- pd (vtkPolyData) > > pfilter->SetGlyphMethod(func,(void *)pfilter); > > > > vtkPolyDataMapper *glyphMapper=vtkPolyDataMapper::New(); > > glyphMapper->SetInput(pfilter->GetOutput()); > > > > vtkActor *glyphActor=vtkActor::New(); > > glyphActor->SetMapper(glyphMapper); > > > > for the moment the function passed to SetGlyphMethod just scales: > > > > void static func(void *arg) > > { > > vtkProgrammableGlyphFilter *pfilter=(vtkProgrammableGlyphFilter*)arg; > > > > //float point[3]; > > //pfilter->GetPoint(point); > > > > vtkTransform *tr=vtkTransform::New(); > > tr->Scale(4,1,1); // testing > > > > vtkTransformPolyDataFilter *pdf=vtkTransformPolyDataFilter::New(); > > pdf->SetInput(pfilter->GetSource()); > > pdf->SetTransform(tr); > > > > tr->Delete(); > > pdf->Delete(); > > > > } _________________________________________________________________ Consigue aqu? las mejores y mas recientes ofertas de trabajo en Am?rica Latina y USA: http://latam.msn.com/empleos/ From StephanTheisen at gmx.de Tue Feb 1 06:57:51 2005 From: StephanTheisen at gmx.de (Stephan Theisen) Date: Tue, 1 Feb 2005 12:57:51 +0100 (MET) Subject: [vtkusers] how to build vtk.jar file Message-ID: <4417.1107259071@www61.gmx.net> Hi together! I've the following problem. I must rebuild the vtk.jar file in the C:\Programs\vtk42\bin folder. I use vtk with java on a windowsxp system. Until my last tryings to rebuild this file, the compiling process takes only a few seconds and Cmake exit without any error. But there is no bin folder or vtk.jar existing. Can anybody send me a good introduction or a screenshot of the list of variables in Cmake, how I must define them. Best reguards Stephan -- GMX im TV ... Die Gedanken sind frei ... Schon gesehen? Jetzt Spot online ansehen: http://www.gmx.net/de/go/tv-spot From sigmunau at idi.ntnu.no Tue Feb 1 07:59:29 2005 From: sigmunau at idi.ntnu.no (sigmunau at idi.ntnu.no) Date: Tue, 1 Feb 2005 13:59:29 +0100 Subject: [vtkusers] [patch] Speed up vtkKdTree::FindClosestPoint() Message-ID: <20050201125929.GC12656@hobbes> I was very happy to see vtk implementing a Kd-tree, and wanted to try it out for speeding up vtkIterativeClosestPointTransform. However, I found it to be much much slower than vtkCellLocator, which is currently used. After quite a bit of investigation I figured out that this was because vtkKdTree::FindClosestPoint regularly calls vtkKdTree::FindClosestPointInSphere. This method calls BSPCalculator->ComputeIntersectionsUsingDataBoundaryOn() which causes BSPCalculator's MTime to be updated, which triggers a full rebuild of BSPCalculators regionlist in BSPCalculator->IntersectsSphere2(). This causes the entire tree to be traversed and it is very very slow. It also turns out that BSPCalculators region list does not depend on the status of ComputeIntersectionsUsingDataBounds so this rebuild is totally unnecessary. I do however not now if it is allways safe to drop rebuilding the region list when it is older than BSPCalculator, so I didn't want to disable the rebuild. My solution was to introduce new methods in the BSPIntersections class for IntersectsSphere2 where whether to use data bounds is read from a parameter to the method, and not from the member variable. An alternative solution might be to also trigger the mtime on the region list after setting ComputeIntersectionsUsingDataBounds, but since the region list actually didn't change I figured that to be a bad thing. If this patch get accepted I will consider writing a patch to make vtkIterativeClosestPointTransform able to use both vtkKdTree and vtkCellLocator. Patch is agains current CVS as of 14.30 Norwegian time 01. februrary 2005 Regards Sigmund Augdal -------------- next part -------------- ? KdTree.patch ? myvtkKdTree.cxx Index: vtkBSPIntersections.cxx =================================================================== RCS file: /cvsroot/VTK/VTK/Graphics/vtkBSPIntersections.cxx,v retrieving revision 1.1 diff -u -r1.1 vtkBSPIntersections.cxx --- vtkBSPIntersections.cxx 17 Nov 2004 19:22:43 -0000 1.1 +++ vtkBSPIntersections.cxx 1 Feb 2005 12:33:06 -0000 @@ -335,19 +335,31 @@ // Intersection with a sphere--------------------------------------- // int vtkBSPIntersections::IntersectsSphere2(int regionId, double x, double y, double z, - double rSquared) + double rSquared) +{ + return IntersectsSphere2( regionId, x, y, z, rSquared, + this->ComputeIntersectionsUsingDataBounds ); +} +int vtkBSPIntersections::IntersectsSphere2(int regionId, double x, double y, double z, + double rSquared, int useDataBounds) { REGIONIDCHECK_RETURNERR(regionId, 0); vtkKdNode *node = this->RegionList[regionId]; - return node->IntersectsSphere2(x, y, z, rSquared, - this->ComputeIntersectionsUsingDataBounds); + return node->IntersectsSphere2(x, y, z, rSquared, useDataBounds); } //---------------------------------------------------------------------------- int vtkBSPIntersections::IntersectsSphere2(int *ids, int len, double x, double y, double z, double rSquared) +{ + return IntersectsSphere2(ids, len, x, y, z, rSquared, + this->ComputeIntersectionsUsingDataBounds); +} +//---------------------------------------------------------------------------- +int vtkBSPIntersections::IntersectsSphere2(int *ids, int len, + double x, double y, double z, double rSquared, int useDataBounds) { REGIONCHECK(0) @@ -356,7 +368,7 @@ if (len > 0) { nnodes = this->_IntersectsSphere2(this->Cuts->GetKdNodeTree(), - ids, len, x, y, z, rSquared); + ids, len, x, y, z, rSquared, useDataBounds); } return nnodes; } @@ -364,12 +376,18 @@ //---------------------------------------------------------------------------- int vtkBSPIntersections::_IntersectsSphere2(vtkKdNode *node, int *ids, int len, double x, double y, double z, double rSquared) +{ + return _IntersectsSphere2(node, ids, len, x, y, z, rSquared, + this->ComputeIntersectionsUsingDataBounds); +} + +int vtkBSPIntersections::_IntersectsSphere2(vtkKdNode *node, int *ids, int len, + double x, double y, double z, double rSquared, int useDataBounds) { int result, nnodes1, nnodes2, listlen; int *idlist; - result = node->IntersectsSphere2(x, y, z, rSquared, - this->ComputeIntersectionsUsingDataBounds); + result = node->IntersectsSphere2(x, y, z, rSquared, useDataBounds); if (!result) { @@ -382,14 +400,16 @@ return 1; } - nnodes1 = _IntersectsSphere2(node->GetLeft(), ids, len, x, y, z, rSquared); + nnodes1 = _IntersectsSphere2(node->GetLeft(), ids, len, x, y, z, rSquared, + useDataBounds); idlist = ids + nnodes1; listlen = len - nnodes1; if (listlen > 0) { - nnodes2 = _IntersectsSphere2(node->GetRight(), idlist, listlen, x, y, z, rSquared); + nnodes2 = _IntersectsSphere2(node->GetRight(), idlist, listlen, x, y, z, rSquared, + useDataBounds); } else { Index: vtkBSPIntersections.h =================================================================== RCS file: /cvsroot/VTK/VTK/Graphics/vtkBSPIntersections.h,v retrieving revision 1.2 diff -u -r1.2 vtkBSPIntersections.h --- vtkBSPIntersections.h 17 Nov 2004 21:52:40 -0000 1.2 +++ vtkBSPIntersections.h 1 Feb 2005 12:33:06 -0000 @@ -98,6 +98,9 @@ // and the square of it's radius. int IntersectsSphere2(int regionId, double x, double y, double z, double rSquared); + int IntersectsSphere2(int regionId, + double x, double y, double z, double rSquared, + int useDataBounds); // Description: // Compute a list of the Ids of all regions that @@ -106,6 +109,9 @@ // Returns: the number of ids in the list. int IntersectsSphere2(int *ids, int len, double x, double y, double z, double rSquared); + int IntersectsSphere2(int *ids, int len, + double x, double y, double z, double rSquared, + int useDataBounds); // Description: // Determine whether a region of the spatial decomposition @@ -171,6 +177,9 @@ int _IntersectsSphere2(vtkKdNode *node, int *ids, int len, double x, double y, double z, double rSquared); + int _IntersectsSphere2(vtkKdNode *node, int *ids, int len, + double x, double y, double z, double rSquared, + int useDataBounds); int _IntersectsCell(vtkKdNode *node, int *ids, int len, vtkCell *cell, int cellRegion=-1); Index: vtkKdNode.h =================================================================== RCS file: /cvsroot/VTK/VTK/Graphics/vtkKdNode.h,v retrieving revision 1.3 diff -u -r1.3 vtkKdNode.h --- vtkKdNode.h 17 Nov 2004 21:52:40 -0000 1.3 +++ vtkKdNode.h 1 Feb 2005 12:33:06 -0000 @@ -242,6 +242,9 @@ void PrintNode(int depth); void PrintVerboseNode(int depth); + vtkKdNode *Left; + vtkKdNode *Right; + protected: vtkKdNode(); @@ -260,9 +263,6 @@ vtkKdNode *Up; - vtkKdNode *Left; - vtkKdNode *Right; - int Dim; int ID; // region id Index: vtkKdTree.cxx =================================================================== RCS file: /cvsroot/VTK/VTK/Graphics/vtkKdTree.cxx,v retrieving revision 1.1 diff -u -r1.1 vtkKdTree.cxx --- vtkKdTree.cxx 17 Nov 2004 19:22:43 -0000 1.1 +++ vtkKdTree.cxx 1 Feb 2005 12:33:06 -0000 @@ -2351,12 +2351,8 @@ { int *regionIds = new int [this->NumberOfRegions]; - this->BSPCalculator->ComputeIntersectionsUsingDataBoundsOn(); - int nRegions = - this->BSPCalculator->IntersectsSphere2(regionIds, this->NumberOfRegions, x, y, z, radius); - - this->BSPCalculator->ComputeIntersectionsUsingDataBoundsOff(); + this->BSPCalculator->IntersectsSphere2(regionIds, this->NumberOfRegions, x, y, z, radius, 1); double minDistance2 = 4 * this->MaxWidth * this->MaxWidth; int closeId = -1; From sigmunau at idi.ntnu.no Tue Feb 1 08:15:21 2005 From: sigmunau at idi.ntnu.no (sigmunau at idi.ntnu.no) Date: Tue, 1 Feb 2005 14:15:21 +0100 Subject: [vtkusers] [patch] Speed up vtkKdTree::FindClosestPoint() In-Reply-To: <20050201125929.GC12656@hobbes> References: <20050201125929.GC12656@hobbes> Message-ID: <20050201131521.GA13201@hobbes> > Patch is agains current CVS as of 14.30 Norwegian time 01. februrary 2005 Update of patch without the clutter in vtkKdNode.h. Sorry about that. Also note that the patch is made in the Graphics subfolder of the sources. Regards Sigmund Augdal From sigmunau at idi.ntnu.no Tue Feb 1 08:22:07 2005 From: sigmunau at idi.ntnu.no (sigmunau at idi.ntnu.no) Date: Tue, 1 Feb 2005 14:22:07 +0100 Subject: [vtkusers] [patch] Speed up vtkKdTree::FindClosestPoint() In-Reply-To: <20050201131521.GA13201@hobbes> References: <20050201125929.GC12656@hobbes> <20050201131521.GA13201@hobbes> Message-ID: <20050201132207.GA13618@hobbes> On Tue, Feb 01, 2005 at 02:15:21PM +0100, Sigmund.Augdal at idi.ntnu.no wrote: > > Patch is agains current CVS as of 14.30 Norwegian time 01. februrary 2005 > Update of patch without the clutter in vtkKdNode.h. Sorry about that. Also > note that the patch is made in the Graphics subfolder of the sources. This time with the patch. Sorry about the noise. Sigmund > > Regards > > Sigmund Augdal > _______________________________________________ > 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 -------------- next part -------------- ? KdTree-2.patch ? KdTree.patch ? myvtkKdNode.h ? myvtkKdTree.cxx Index: vtkBSPIntersections.cxx =================================================================== RCS file: /cvsroot/VTK/VTK/Graphics/vtkBSPIntersections.cxx,v retrieving revision 1.1 diff -u -r1.1 vtkBSPIntersections.cxx --- vtkBSPIntersections.cxx 17 Nov 2004 19:22:43 -0000 1.1 +++ vtkBSPIntersections.cxx 1 Feb 2005 13:13:11 -0000 @@ -335,19 +335,31 @@ // Intersection with a sphere--------------------------------------- // int vtkBSPIntersections::IntersectsSphere2(int regionId, double x, double y, double z, - double rSquared) + double rSquared) +{ + return IntersectsSphere2( regionId, x, y, z, rSquared, + this->ComputeIntersectionsUsingDataBounds ); +} +int vtkBSPIntersections::IntersectsSphere2(int regionId, double x, double y, double z, + double rSquared, int useDataBounds) { REGIONIDCHECK_RETURNERR(regionId, 0); vtkKdNode *node = this->RegionList[regionId]; - return node->IntersectsSphere2(x, y, z, rSquared, - this->ComputeIntersectionsUsingDataBounds); + return node->IntersectsSphere2(x, y, z, rSquared, useDataBounds); } //---------------------------------------------------------------------------- int vtkBSPIntersections::IntersectsSphere2(int *ids, int len, double x, double y, double z, double rSquared) +{ + return IntersectsSphere2(ids, len, x, y, z, rSquared, + this->ComputeIntersectionsUsingDataBounds); +} +//---------------------------------------------------------------------------- +int vtkBSPIntersections::IntersectsSphere2(int *ids, int len, + double x, double y, double z, double rSquared, int useDataBounds) { REGIONCHECK(0) @@ -356,7 +368,7 @@ if (len > 0) { nnodes = this->_IntersectsSphere2(this->Cuts->GetKdNodeTree(), - ids, len, x, y, z, rSquared); + ids, len, x, y, z, rSquared, useDataBounds); } return nnodes; } @@ -364,12 +376,18 @@ //---------------------------------------------------------------------------- int vtkBSPIntersections::_IntersectsSphere2(vtkKdNode *node, int *ids, int len, double x, double y, double z, double rSquared) +{ + return _IntersectsSphere2(node, ids, len, x, y, z, rSquared, + this->ComputeIntersectionsUsingDataBounds); +} + +int vtkBSPIntersections::_IntersectsSphere2(vtkKdNode *node, int *ids, int len, + double x, double y, double z, double rSquared, int useDataBounds) { int result, nnodes1, nnodes2, listlen; int *idlist; - result = node->IntersectsSphere2(x, y, z, rSquared, - this->ComputeIntersectionsUsingDataBounds); + result = node->IntersectsSphere2(x, y, z, rSquared, useDataBounds); if (!result) { @@ -382,14 +400,16 @@ return 1; } - nnodes1 = _IntersectsSphere2(node->GetLeft(), ids, len, x, y, z, rSquared); + nnodes1 = _IntersectsSphere2(node->GetLeft(), ids, len, x, y, z, rSquared, + useDataBounds); idlist = ids + nnodes1; listlen = len - nnodes1; if (listlen > 0) { - nnodes2 = _IntersectsSphere2(node->GetRight(), idlist, listlen, x, y, z, rSquared); + nnodes2 = _IntersectsSphere2(node->GetRight(), idlist, listlen, x, y, z, rSquared, + useDataBounds); } else { Index: vtkBSPIntersections.h =================================================================== RCS file: /cvsroot/VTK/VTK/Graphics/vtkBSPIntersections.h,v retrieving revision 1.2 diff -u -r1.2 vtkBSPIntersections.h --- vtkBSPIntersections.h 17 Nov 2004 21:52:40 -0000 1.2 +++ vtkBSPIntersections.h 1 Feb 2005 13:13:11 -0000 @@ -98,6 +98,9 @@ // and the square of it's radius. int IntersectsSphere2(int regionId, double x, double y, double z, double rSquared); + int IntersectsSphere2(int regionId, + double x, double y, double z, double rSquared, + int useDataBounds); // Description: // Compute a list of the Ids of all regions that @@ -106,6 +109,9 @@ // Returns: the number of ids in the list. int IntersectsSphere2(int *ids, int len, double x, double y, double z, double rSquared); + int IntersectsSphere2(int *ids, int len, + double x, double y, double z, double rSquared, + int useDataBounds); // Description: // Determine whether a region of the spatial decomposition @@ -171,6 +177,9 @@ int _IntersectsSphere2(vtkKdNode *node, int *ids, int len, double x, double y, double z, double rSquared); + int _IntersectsSphere2(vtkKdNode *node, int *ids, int len, + double x, double y, double z, double rSquared, + int useDataBounds); int _IntersectsCell(vtkKdNode *node, int *ids, int len, vtkCell *cell, int cellRegion=-1); Index: vtkKdTree.cxx =================================================================== RCS file: /cvsroot/VTK/VTK/Graphics/vtkKdTree.cxx,v retrieving revision 1.1 diff -u -r1.1 vtkKdTree.cxx --- vtkKdTree.cxx 17 Nov 2004 19:22:43 -0000 1.1 +++ vtkKdTree.cxx 1 Feb 2005 13:13:11 -0000 @@ -2351,12 +2351,8 @@ { int *regionIds = new int [this->NumberOfRegions]; - this->BSPCalculator->ComputeIntersectionsUsingDataBoundsOn(); - int nRegions = - this->BSPCalculator->IntersectsSphere2(regionIds, this->NumberOfRegions, x, y, z, radius); - - this->BSPCalculator->ComputeIntersectionsUsingDataBoundsOff(); + this->BSPCalculator->IntersectsSphere2(regionIds, this->NumberOfRegions, x, y, z, radius, 1); double minDistance2 = 4 * this->MaxWidth * this->MaxWidth; int closeId = -1; From pier_jan at hotmail.com Tue Feb 1 08:42:39 2005 From: pier_jan at hotmail.com (Pierre-Jean Boulianne) Date: Tue, 01 Feb 2005 08:42:39 -0500 Subject: [vtkusers] vtkBMPReader 8 bits??? Message-ID: An HTML attachment was scrubbed... URL: From amy.henderson at kitware.com Tue Feb 1 08:57:48 2005 From: amy.henderson at kitware.com (Amy Henderson) Date: Tue, 01 Feb 2005 08:57:48 -0500 Subject: [vtkusers] how to build vtk.jar file In-Reply-To: <4417.1107259071@www61.gmx.net> References: <4417.1107259071@www61.gmx.net> Message-ID: <6.2.0.14.2.20050201085148.04184f98@pop.biz.rr.com> Did you actually rebuild VTK, or did you just run cmake on the source tree? In CMake, make sure that VTK_WRAP_JAVA is set to ON. Then CMake will try to fill in the appropriate values for the Java-related variables. CMake will give you error messages if it can't find what it is looking for, and it will let you know which variables still need to be set. - Amy At 06:57 AM 2/1/2005, Stephan Theisen wrote: >Hi together! > >I've the following problem. I must rebuild the vtk.jar file in the >C:\Programs\vtk42\bin folder. I use vtk with java on a windowsxp system. >Until my last tryings to rebuild this file, the compiling process takes only >a few seconds and Cmake exit without any error. But there is no bin folder >or vtk.jar existing. Can anybody send me a good introduction or a screenshot >of the list of variables in Cmake, how I must define them. > >Best reguards > >Stephan > >-- >GMX im TV ... Die Gedanken sind frei ... Schon gesehen? >Jetzt Spot online ansehen: http://www.gmx.net/de/go/tv-spot >_______________________________________________ >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 From malcolm at geovision.co.za Tue Feb 1 08:59:32 2005 From: malcolm at geovision.co.za (Malcolm Drummond) Date: Tue, 1 Feb 2005 15:59:32 +0200 Subject: [vtkusers] Re: Re: vtkProgrammableGlyphFilter problem References: Message-ID: <000201c50867$8a394570$0100a8c0@BART> Hi Mauricio I sent a second message - the transform is having no effect. If you want to use this approach you must create the vtkTransform and vtkTransformPolyData filters as part of the pipeline, used as the source into the vtkProgrammableGlyphFilter. See Graphics\Testing\Tcl\progGlyphsBySource.Tcl for an example. HTH Malcolm ----- Original Message ----- From: "reyes mauricio" To: Sent: Tuesday, February 01, 2005 9:52 AM Subject: [vtkusers] Re: Re: vtkProgrammableGlyphFilter problem > > Hi, > The problem still persists after trying what you recommend me Malcolm > (add a translation to the transform filter). I only get one single sphere as > output of vtkProgrammableGlyphFilter. > Does the vtkProgrammableGlyphFilter duplicate the source data at > each point by itself, or do I have to perform that task? > > thanks in advance, > Mauricio > > > > >Hi > > > >You need to add a translation to your transform - by the point's x,y,z. > >Currently you're just scaling by the same amount every time at the origin, > >so it looks like one glyph. > > > >HTH > >Malcolm > > > >----- Original Message ----- > >From: "reyes mauricio" > >To: > >Sent: Monday, January 31, 2005 6:36 PM > >Subject: [vtkusers] vtkProgrammableGlyphFilter problem > > > > > > > Hi VTK Users, > > > > > > I'm using vtkProgrammableGlyphFilter to manipulate individually (via > > > setGlyphMethod) scaling and orientation of spheres. > > > > > > I cannot make the filter to work, it only gives me one single sphere > >as > > > output > > > > > > ( vtkGlyph3D works well wit the input data I pass. It copy the sphere > >at > > > different positions, but I need to scale them and orient them > >differently ) > > > > > > Thanks in advance, > > > Mauricio > > > > > > this is part of my code: > > > > > > > > > // ********* part of code ************ > > > > > > vtkSphereSource *sphere=vtkSphereSource::New(); > > > vtkProgrammableGlyphFilter > >*pfilter=vtkProgrammableGlyphFilter::New(); > > > pfilter->SetSource(sphere->GetOutput()); > > > pfilter->SetInput(pd); <-------- pd (vtkPolyData) > > > pfilter->SetGlyphMethod(func,(void *)pfilter); > > > > > > vtkPolyDataMapper *glyphMapper=vtkPolyDataMapper::New(); > > > glyphMapper->SetInput(pfilter->GetOutput()); > > > > > > vtkActor *glyphActor=vtkActor::New(); > > > glyphActor->SetMapper(glyphMapper); > > > > > > for the moment the function passed to SetGlyphMethod just scales: > > > > > > void static func(void *arg) > > > { > > > vtkProgrammableGlyphFilter *pfilter=(vtkProgrammableGlyphFilter*)arg; > > > > > > //float point[3]; > > > //pfilter->GetPoint(point); > > > > > > vtkTransform *tr=vtkTransform::New(); > > > tr->Scale(4,1,1); // testing > > > > > > vtkTransformPolyDataFilter *pdf=vtkTransformPolyDataFilter::New(); > > > pdf->SetInput(pfilter->GetSource()); > > > pdf->SetTransform(tr); > > > > > > tr->Delete(); > > > pdf->Delete(); > > > > > > } > > _________________________________________________________________ > Consigue aqu? las mejores y mas recientes ofertas de trabajo en Am?rica > Latina y USA: http://latam.msn.com/empleos/ > > _______________________________________________ > 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 > From goodwin.lawlor at ucd.ie Tue Feb 1 09:11:45 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Tue, 1 Feb 2005 14:11:45 -0000 Subject: [vtkusers] Re: vtkBMPReader 8 bits??? References: Message-ID: Hi Pierre-Jean, >From the source code it looks like vtkBMPWriter writes out 24 bpp even if you only have 8 bpp... you'll get three identical RGB channels. Why not try a different format, vtkPNGReader/Writer for example... its lossless AFAIK hth Goodwin "Pierre-Jean Boulianne" wrote in message news:BAY103-F1347A88E5C7A84D82F1E5BFB7D0 at phx.gbl... Hi, I want to write a 8 bits bitmap. I can only write a 24 bits with vtkBMPWriter. Can you help me? I use vtkBMPReader ro read a 8 bits bitmap. Should I use vtkImageReader and a lookup table; how? I'm working in c++. Thanks a lot. Pierre-Jean _______________________________________________ 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 From jbw at ieee.org Tue Feb 1 10:24:20 2005 From: jbw at ieee.org (Jeremy Winston) Date: Tue, 01 Feb 2005 10:24:20 -0500 Subject: [vtkusers] Re: vtkBMPReader 8 bits??? In-Reply-To: References: Message-ID: <41FF9F24.8010504@ieee.org> Goodwin Lawlor wrote: > Hi Pierre-Jean, > > From the source code it looks like vtkBMPWriter writes out 24 bpp even if > you only have 8 bpp... you'll get three identical RGB channels. Why not try > a different format, vtkPNGReader/Writer for example... its lossless AFAIK Yep, PNG is lossless, and on images with lots of areas of uniform color, it does better than GIF, JPEG (at low levels of lossy-ness) & TIFF. BMP allows compression, but is almost always found uncompressed in practice, so even if you had 8-bit, the image sizes would be larger than necessary. Cf. http://www.libpng.org/pub/png/pngintro.html and http://www.faqs.org/faqs/graphics/fileformats-faq/part3/section-18.html HTH, -Jeremy From amg1 at student.cs.ucc.ie Tue Feb 1 10:47:05 2005 From: amg1 at student.cs.ucc.ie (Alanna Garvey) Date: Tue, 1 Feb 2005 15:47:05 +0000 Subject: [vtkusers] (no subject) Message-ID: <200502011547.j11Fl3Jj004485@student.cs.ucc.ie> vtkusers at vtk.org vtkusers at vtk.org X-EXP32-SerialNo: 00002719 Subject: Some Guidance Message-ID: <42007531 at webmail.ucc.ie> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: WebMail (Hydra) SMTP v3.61.08 Hi, I'm new to VTK, and wondered if someone could give me some guidance or help with something I'm having a little difficulty with. I'm trying to use a joystick (Logitech) to manuver a simple 3d object. I'm not sure how to go about connecting the Joystick to VTK however. Any advice would be appreciated. Thanks a lot! Aria From lafisk at sandia.gov Tue Feb 1 11:02:52 2005 From: lafisk at sandia.gov (lee ann fisk) Date: Tue, 01 Feb 2005 09:02:52 -0700 Subject: [vtkusers] Re: Speed up vtkKdTree::FindClosestPoint Message-ID: <1107273772.24069.154.camel@sadl14088.sandia.gov> Hello Sigmund. I'm sorry my code caused you this trouble. A few months ago I pulled the intersection calculations out of vtkKdTree into vtkBSPIntersections so that we could someday use the intersection calculations also with partitionings calculated using the Zoltan library. I did it quickly, and didn't notice that every time ComputeIntersectionsUsingDataBoundary was set, the region list would be needlessly recalculated. I will fix the class so it's Mtime is only updated when the actual spatial partitioning changes. I will test this and check it in today. Lee Ann ================================================================ Date: Tue, 1 Feb 2005 13:59:29 +0100 From: sigmunau at idi.ntnu.no Subject: [vtkusers] [patch] Speed up vtkKdTree::FindClosestPoint() I was very happy to see vtk implementing a Kd-tree, and wanted to try it out for speeding up vtkIterativeClosestPointTransform. However, I found it to be much much slower than vtkCellLocator, which is currently used. After quite a bit of investigation I figured out that this was because vtkKdTree::FindClosestPoint regularly calls vtkKdTree::FindClosestPointInSphere. This method calls BSPCalculator->ComputeIntersectionsUsingDataBoundaryOn() which causes BSPCalculator's MTime to be updated, which triggers a full rebuild of BSPCalculators regionlist in BSPCalculator->IntersectsSphere2(). This causes the entire tree to be traversed and it is very very slow. It also turns out that BSPCalculators region list does not depend on the status of ComputeIntersectionsUsingDataBounds so this rebuild is totally unnecessary. I do however not now if it is allways safe to drop rebuilding the region list when it is older than BSPCalculator, so I didn't want to disable the rebuild. My solution was to introduce new methods in the BSPIntersections class for IntersectsSphere2 where whether to use data bounds is read from a parameter to the method, and not from the member variable. An alternative solution might be to also trigger the mtime on the region list after setting ComputeIntersectionsUsingDataBounds, but since the region list actually didn't change I figured that to be a bad thing. If this patch get accepted I will consider writing a patch to make vtkIterativeClosestPointTransform able to use both vtkKdTree and vtkCellLocator. -- ================================================================ Lee Ann Fisk lafisk at sandia.gov Department 9215 Phone 505-844-2059 Discrete Algorithms and Math Fax 505-845-7442 Sandia National Laboratories Mail stop 1110 Albuquerque, NM, USA Office 980/15 ================================================================ From sigmunau at idi.ntnu.no Tue Feb 1 11:33:28 2005 From: sigmunau at idi.ntnu.no (sigmunau at idi.ntnu.no) Date: Tue, 1 Feb 2005 17:33:28 +0100 Subject: [vtkusers] Re: Speed up vtkKdTree::FindClosestPoint In-Reply-To: <1107273772.24069.154.camel@sadl14088.sandia.gov> References: <1107273772.24069.154.camel@sadl14088.sandia.gov> Message-ID: <20050201163328.GA16252@hobbes> On Tue, Feb 01, 2005 at 09:02:52AM -0700, lee ann fisk wrote: > Hello Sigmund. I'm sorry my code caused you this trouble. A > few months ago I pulled the intersection calculations out of > vtkKdTree into vtkBSPIntersections so that we could someday use the > intersection calculations also with partitionings calculated > using the Zoltan library. I did it quickly, and didn't notice > that every time ComputeIntersectionsUsingDataBoundary was set, > the region list would be needlessly recalculated. No problem. I didn't spend too much time tracking it down, and I learned a lot in the process. > > I will fix the class so it's Mtime is only updated > when the actual spatial partitioning changes. I will test this > and check it in today. Thanks, I will be happy to see such a change. At last a question about the KdTree: Would it be possible to extend this class to also support finding closest point on a more general dataset? I am thinking about something like this: * Find closest point among cell-node and cell centroids * Find closest point on cell(s) containing this point. * Return closest point of points return in above statement. I guess this approch isn't 100% correct in all situations, but will do very often provided the dataset doesn't represent too exotic shapes. Thanks once more. Regards Sigmund > > Lee Ann > > ================================================================ > Date: Tue, 1 Feb 2005 13:59:29 +0100 > From: sigmunau at idi.ntnu.no > Subject: [vtkusers] [patch] Speed up vtkKdTree::FindClosestPoint() > > I was very happy to see vtk implementing a Kd-tree, and wanted to try it > out > for speeding up vtkIterativeClosestPointTransform. However, I found it > to be > much much slower than vtkCellLocator, which is currently used. After > quite a > bit of investigation I figured out that this was because > vtkKdTree::FindClosestPoint regularly calls > vtkKdTree::FindClosestPointInSphere. This method calls > BSPCalculator->ComputeIntersectionsUsingDataBoundaryOn() which causes > BSPCalculator's MTime to be updated, which triggers a full rebuild of > BSPCalculators regionlist in BSPCalculator->IntersectsSphere2(). This > causes > the entire tree to be traversed and it is very very slow. > > It also turns out that BSPCalculators region list does not depend on the > status of ComputeIntersectionsUsingDataBounds so this rebuild is totally > unnecessary. I do however not now if it is allways safe to drop > rebuilding > the region list when it is older than BSPCalculator, so I didn't want to > disable the rebuild. My solution was to introduce new methods in the > BSPIntersections class for IntersectsSphere2 where whether to use data > bounds is read from a parameter to the method, and not from the member > variable. An alternative solution might be to also trigger the mtime on > the > region list after setting ComputeIntersectionsUsingDataBounds, but since > the > region list actually didn't change I figured that to be a bad thing. > > If this patch get accepted I will consider writing a patch to make > vtkIterativeClosestPointTransform able to use both vtkKdTree and > vtkCellLocator. > -- > ================================================================ > Lee Ann Fisk lafisk at sandia.gov > Department 9215 Phone 505-844-2059 > Discrete Algorithms and Math Fax 505-845-7442 > Sandia National Laboratories Mail stop 1110 > Albuquerque, NM, USA Office 980/15 > ================================================================ > > > > X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on hobbes > X-Spam-Level: > X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,MISSING_DATE, > MISSING_HEADERS,MISSING_SUBJECT autolearn=unavailable version=3.0.2 > > X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on hobbes > X-Spam-Level: > X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,MISSING_DATE, > MISSING_HEADERS,MISSING_SUBJECT autolearn=unavailable version=3.0.2 > > X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on hobbes > X-Spam-Level: > X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,MISSING_DATE, > MISSING_HEADERS,MISSING_SUBJECT autolearn=unavailable version=3.0.2 From rendezvous at dreamxplosion.com Tue Feb 1 11:46:05 2005 From: rendezvous at dreamxplosion.com (Marius S Giurgi) Date: Tue, 1 Feb 2005 11:46:05 -0500 Subject: [vtkusers] vtkFLTK examples Message-ID: <7f88c835c657ed20a218ba6f898f135d@dreamxplosion.com> Sean, In your MorningStarBase example (cxx file) isn't it supposed to be (this->Mace != NULL) in the first conditional instead of (this->Cone != NULL) ? Just wondering. MorningStarBase::~MorningStarBase() { if (this->Cone != NULL) { this->Mace->UnRegister(this); this->Mace = NULL; } if (this->Cone != NULL) { this->Cone->UnRegister(this); this->Cone = NULL; } if (this->MaceWindow != NULL) { this->MaceWindow->hide(); delete this->MaceWindow; this->MaceWindow = NULL; } if (this->ConeWindow != NULL) { this->ConeWindow->hide(); delete this->ConeWindow; this->ConeWindow = NULL; } } marius PS: Should I sent these kind of (possible) bug notices directly to you instead of posting it on vtkuser list? I sent you a few other emails regarding some possible errors in your examples but I'm not sure you got any. Let me know. From francesco.ferrise at tin.it Tue Feb 1 12:02:49 2005 From: francesco.ferrise at tin.it (francesco.ferrise at tin.it) Date: Tue, 1 Feb 2005 18:02:49 +0100 Subject: [vtkusers] create a streamline from an unstructured grid Message-ID: <41536AD5000F6398@ims3a.cp.tin.it> Hello to all I made a CFD simulation with cosmos floworks, and now I want display results with vtk. I need to create streamlines from an unstructured grid made up by vtkVertex. I associated to each vertex a vector, but I can't create a streamline. how can I? From lafisk at sandia.gov Tue Feb 1 12:11:47 2005 From: lafisk at sandia.gov (lee ann fisk) Date: Tue, 01 Feb 2005 10:11:47 -0700 Subject: [vtkusers] Re: Speed up vtkKdTree::FindClosestPoint In-Reply-To: <20050201163328.GA16252@hobbes> References: <1107273772.24069.154.camel@sadl14088.sandia.gov> <20050201163328.GA16252@hobbes> Message-ID: <1107277907.24069.165.camel@sadl14088.sandia.gov> On Tue, 2005-02-01 at 09:33, sigmunau at idi.ntnu.no wrote: > At last a question about the KdTree: Would it be possible to extend this > class to also support finding closest point on a more general dataset? I am > thinking about something like this: > * Find closest point among cell-node and cell centroids > * Find closest point on cell(s) containing this point. > * Return closest point of points return in above statement. > > I guess this approch isn't 100% correct in all situations, but will do very > often provided the dataset doesn't represent too exotic shapes. The locator is built from a list of points, and doesn't know about cell membership. I think you would need to write another BuildLocatorFromPoints that also takes a vtkCellArray and a location array (giving the location of the start of each cell in the vtkCellArray), and manages these lists along with the list of points. Then you could answer cell-based queries. Lee Ann -- ================================================================ Lee Ann Fisk lafisk at sandia.gov Department 9215 Phone 505-844-2059 Discrete Algorithms and Math Fax 505-845-7442 Sandia National Laboratories Mail stop 1110 Albuquerque, NM, USA Office 980/15 ================================================================ From sigmunau at idi.ntnu.no Tue Feb 1 12:23:23 2005 From: sigmunau at idi.ntnu.no (sigmunau at idi.ntnu.no) Date: Tue, 1 Feb 2005 18:23:23 +0100 Subject: [vtkusers] Re: Speed up vtkKdTree::FindClosestPoint In-Reply-To: <1107277907.24069.165.camel@sadl14088.sandia.gov> References: <1107273772.24069.154.camel@sadl14088.sandia.gov> <20050201163328.GA16252@hobbes> <1107277907.24069.165.camel@sadl14088.sandia.gov> Message-ID: <20050201172323.GB17074@hobbes> On Tue, Feb 01, 2005 at 10:11:47AM -0700, lee ann fisk wrote: > On Tue, 2005-02-01 at 09:33, sigmunau at idi.ntnu.no wrote: > > At last a question about the KdTree: Would it be possible to extend this > > class to also support finding closest point on a more general dataset? I am > > thinking about something like this: > > * Find closest point among cell-node and cell centroids > > * Find closest point on cell(s) containing this point. > > * Return closest point of points return in above statement. > > > > I guess this approch isn't 100% correct in all situations, but will do very > > often provided the dataset doesn't represent too exotic shapes. > > The locator is built from a list of points, and doesn't know > about cell membership. I think you would need to write > another BuildLocatorFromPoints that also takes a vtkCellArray > and a location array (giving the location of the start of > each cell in the vtkCellArray), and manages these lists along > with the list of points. Then you could answer cell-based > queries. I was more thinking along the lines of extending FindClosestPoint to work on locators built using SetData() and BuildLocator(), but this method could work as well. Sigmund > > Lee Ann > > -- > ================================================================ > Lee Ann Fisk lafisk at sandia.gov > Department 9215 Phone 505-844-2059 > Discrete Algorithms and Math Fax 505-845-7442 > Sandia National Laboratories Mail stop 1110 > Albuquerque, NM, USA Office 980/15 > ================================================================ > > > > X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on hobbes > X-Spam-Level: > X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,MISSING_DATE, > MISSING_HEADERS,MISSING_SUBJECT autolearn=unavailable version=3.0.2 > > X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on hobbes > X-Spam-Level: > X-Spam-Status: No, score=-0.9 required=5.0 tests=ALL_TRUSTED,MISSING_DATE, > MISSING_HEADERS,MISSING_SUBJECT autolearn=unavailable version=3.0.2 From rmilas at head.cfa.harvard.edu Tue Feb 1 14:40:07 2005 From: rmilas at head.cfa.harvard.edu (Robert Milaszewski) Date: Tue, 01 Feb 2005 14:40:07 -0500 Subject: [vtkusers] Re:Support for more fonts Message-ID: <41FFDB17.9000508@head.cfa.harvard.edu> Hello, I wonder if there is a plan to add support for more 2D fonts to vtk in the near future. I noticed that lates version(from CVS) of vtkFreeTypeUtilities.cc has some unused code to read in font faces from pfa, pfb files as well as allow for rotation of font faces. The code though is carefully commented out so I am suspecting that someone intends to add this functionality at some point. Robert M Milaszewski From scottjp at CLEMSON.EDU Tue Feb 1 14:43:59 2005 From: scottjp at CLEMSON.EDU (Scott J. Pearson) Date: Tue, 01 Feb 2005 14:43:59 -0500 Subject: [vtkusers] VtkUnstructuredGrid display Message-ID: I'm using vtkUnstructuredGrid to display mathematical data - the results of calculations along a 2-D mesh for a fiber-producing die. VTK serves me quite well with this. However, the other day, I discovered that they X scale is reversed on my display: Positive X values are on the left and negative X values are on the left! (The Y axis acts normally.) I could simply reverse camera angles, but this would also invert the numbers along my axes. A newbie at filtering, I've tried to filter the data via a vtkTransformFilter, but the data disappears when I call it. Any advice on what I should do? A potion of my code is attached below. Scott gridreader_ = vtkUnstructuredGridReader::New(); gridreader_->SetFileName(filename_.ansi_c_str()); //"fiber1d.vtk"); gridreader_->SetTensorsName("stress"); ugrid_ = gridreader_->GetOutput(); ugrid_->Update(); invert_ = vtkGeneralTransform::New(); invert_->Identity(); invert_->Scale(-1.0, 0.0, 0.0); transformFilter_ = vtkTransformFilter::New(); transformFilter_->SetTransform(invert_); transformFilter_->SetInput(ugrid_); // Defaults for scalmapper scalmapper_ = vtkDataSetMapper::New(); // scalmapper_->SetInput(transformFilter_->GetOutput()); scalmapper_->SetInput(ugrid_); actor_ = vtkActor::New(); actor_->SetMapper(scalmapper_); renderer_->AddActor(actor_); --- Scott J. Pearson Systems Programmer, Center for the Advanced Engineering of Fibers and Films Clemson University 864.656.6389 scottjp at clemson.edu 10 Riggs Hall, Clemson, SC 29634 http://www.clemson.edu/caeff/ From nacho at lncc.br Tue Feb 1 15:48:27 2005 From: nacho at lncc.br (Nacho Larrabide) Date: Tue, 1 Feb 2005 17:48:27 -0300 Subject: [vtkusers] Can't get the vtkBMPReader to work In-Reply-To: <20040709065016.0BA43DE46@public.kitware.com> References: <20040709065016.0BA43DE46@public.kitware.com> Message-ID: <697912207.20050201174827@lncc.br> Hi VtkUsers, I'm using the cvs repository version of vtk, and I'm trying to reafd a BMP-file series. My code is something like this: vtkBMPReaber imr=vtkBMPReader::New(); imr->SetNumberOfScalarComponents(1); imr->SetDataExtent(0,2,0,2,0,2); imr->SetFilePattern("c:\data\%s%d.bmp"); imr->SetFilePrefix("test"); imr->SetFileNameSliceOffset(1); imr->SetFileNameSliceSpacing(1); and in my hd i have: c:\data\test1.bmp c:\data\test2.bmp c:\data\test3.bmp all of them 3x3 8bpp images. In the resulting Structured points only the first image is properly readen an in the the rest of the 3d image (the other 2 planes for this case) I get trash. Any ideas?, Am I missing something?, Am I miss using the vtkBMPReader? Please help...:D Regards, Nacho ----------------------------------------------------- Nacho Larrabide Rua Getulio Vargas 333 - Quitandinha - CEP: 25651-070 Petropolis - RJ - Brasil Tel: +54 24 2233-6137 - Fax: +54 24 2233-6167 mailto:nacho at lncc.br ----------------------------------------------------- From tp500 at doc.ic.ac.uk Tue Feb 1 14:45:34 2005 From: tp500 at doc.ic.ac.uk (Theodore Papatheodorou) Date: Tue, 01 Feb 2005 19:45:34 +0000 Subject: [vtkusers] cutting or extracting surfaces (please help) Message-ID: <41FFDC5E.3020209@doc.ic.ac.uk> Hi all, I have been trying to write a program that will extract part of a cylinder. I define a box as an explicit fuction but I can't get it to work. The problems are that vtkCutter does not extract the whole geometry but instead just where the implicit fuction intersects the other surface. So I tried to use vtkExtractGeometry which takes all of the surface inside the area defined by the explicit function. That filter however, does not output the data as polydata. Any suggestions? The problem in simple terms is that I have a surface and I want to cut and keep half of it. Say I have a sphere, I want to keep half of it, as a polydata. Could someone give me some pointers before I waist my youth on this? theodoros From David.Pont at ForestResearch.co.nz Tue Feb 1 15:16:31 2005 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Wed, 2 Feb 2005 09:16:31 +1300 Subject: [vtkusers] cutting or extracting surfaces (please help) In-Reply-To: <41FFDC5E.3020209@doc.ic.ac.uk> Message-ID: Hi Theodoros, try vtkClipPolyData. Note that you can use GenerateClippedOutput and GetClippedOutput as well as GetOutput to get the parts inside and outside an implicit function. Dave P Theodore Papatheodorou wrote on 02/02/2005 08:45:34: > Hi all, > I have been trying to write a program that will extract part of a > cylinder. I define a box as an explicit fuction but I can't get it to > work. The problems are that vtkCutter does not extract the whole > geometry but instead just where the implicit fuction intersects the > other surface. > So I tried to use vtkExtractGeometry which takes all of the surface > inside the area defined by the explicit function. That filter however, > does not output the data as polydata. > Any suggestions? > The problem in simple terms is that I have a surface and I want to cut > and keep half of it. Say I have a sphere, I want to keep half of it, as > a polydata. Could someone give me some pointers before I waist my youth > on this? > theodoros > _______________________________________________ > 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 From jbw at ieee.org Tue Feb 1 16:04:35 2005 From: jbw at ieee.org (Jeremy Winston) Date: Tue, 01 Feb 2005 16:04:35 -0500 Subject: [vtkusers] Can't get the vtkBMPReader to work In-Reply-To: <697912207.20050201174827@lncc.br> References: <20040709065016.0BA43DE46@public.kitware.com> <697912207.20050201174827@lncc.br> Message-ID: <41FFEEE3.8010303@ieee.org> Nacho Larrabide wrote: > Hi VtkUsers, > > I'm using the cvs repository version of vtk, and I'm trying to > reafd a BMP-file series. My code is something like this: > > vtkBMPReaber imr=vtkBMPReader::New(); > imr->SetNumberOfScalarComponents(1); I believe # of scalar components is 3 (R,G&B) unless you set the Allow8BitBMP flag. Try adding this line: imr->Allow8BitBMPOn(); HTH, -Jeremy From jli023 at cs.auckland.ac.nz Tue Feb 1 16:02:47 2005 From: jli023 at cs.auckland.ac.nz (Jing Li) Date: Wed, 2 Feb 2005 10:02:47 +1300 Subject: [vtkusers] vtk 5.0 release Message-ID: <005e01c508a1$6214bbd0$412ad882@cs.auckland.ac.nz> Hi there, I understood from the VTK mailing that VTK 5.0 would be released in June 2004. Now it is February 2005. I could not find VTK 5.0 download from www.vtk.org. Could you tell me where I can find VTK 5.0 download? Thanks, Jing -------------- next part -------------- An HTML attachment was scrubbed... URL: From amy.henderson at kitware.com Tue Feb 1 16:13:16 2005 From: amy.henderson at kitware.com (Amy Henderson) Date: Tue, 01 Feb 2005 16:13:16 -0500 Subject: [vtkusers] vtk 5.0 release In-Reply-To: <005e01c508a1$6214bbd0$412ad882@cs.auckland.ac.nz> References: <005e01c508a1$6214bbd0$412ad882@cs.auckland.ac.nz> Message-ID: <6.2.0.14.2.20050201161141.041ba668@pop.biz.rr.com> This has been answered recently on this mailing list. See http://public.kitware.com/pipermail/vtkusers/2005-January/077927.html - Amy At 04:02 PM 2/1/2005, Jing Li wrote: >Hi there, > >I understood from the VTK mailing that VTK 5.0 would be released in June >2004. Now it is February 2005. I could not find VTK 5.0 download from >www.vtk.org. > >Could you tell me where I can find VTK 5.0 download? > >Thanks, > > >Jing >_______________________________________________ >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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andresba at hotmail.com Tue Feb 1 16:30:10 2005 From: andresba at hotmail.com (Andres Barrera) Date: Tue, 01 Feb 2005 15:30:10 -0600 Subject: [vtkusers] Applying same transfomation to multiple object In-Reply-To: Message-ID: Hi Vardhman, Try vtkAssembly Andres > >Hi, > Consider a scene in which there is a table and its legs, I >have rendered table using, say Disc and legs using cylinder, now how >do I make a transformation to both of them simultaneously. Does >vtkCollection help in achieving this? > > In open GL there is this Push and Pop Matrix fundamental, anything >similar to VTK ? > >Any code example/snip would be very helpful. >-- >border="0" alt="Get Firefox!" title="Get Firefox!" >src="http://www.spreadfirefox.com/community/images/affiliates/Buttons/120x60/trust.gif"/> >_______________________________________________ >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 From MckayEr at SESAHS.NSW.GOV.AU Tue Feb 1 17:40:09 2005 From: MckayEr at SESAHS.NSW.GOV.AU (Erin McKay) Date: Wed, 2 Feb 2005 09:40:09 +1100 Subject: [vtkusers] Documentation of Tcl interface? Message-ID: <3D4436658C43BD44B579F551E51D4137380A3C@STGEML01.lan.sesahs.nsw.gov.au> Hi all I'm having some trouble using VTK from Tcl. Is there any documentation that describes the Tcl interface? I'm particularly keen to know which elements of the C++ API are NOT available from Tcl. I'm not finding the "could not find requested method" error message particularly helpful and the trial and error process is slowly killing me... Erin McKay Dept. Nuclear Medicine, St. George Hospital ph: +61 (0)2 9350 3112 ext: 3130 SOUTH EAST HEALTH CONFIDENTIALITY NOTICE This email, and the files transmitted with it, are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are not permitted to distribute or use this email or any of its attachments in any way. We also request that you advise the sender of the incorrect addressing. This email message has been virus-scanned. Although no computer viruses were detected, South East Health accepts no liability for any consequential damage resulting from email containing any computer viruses. From e.mckay at unsw.edu.au Tue Feb 1 18:20:56 2005 From: e.mckay at unsw.edu.au (Erin McKay) Date: Wed, 2 Feb 2005 10:20:56 +1100 Subject: [vtkusers] Documentation of Tcl interface Message-ID: Hi all: I'm having some trouble using VTK from Tcl. Is there any documentation that describes the Tcl interface? I'm particularly keen to find out which elements of the C++ API are NOT available from tcl. I'm not finding the "could not find requested method or called with incorrect arguments" error message particularly helpful and the process of trial and error is slowly killing me. Is there any other way I can tell which of these two mistakes I'm making? Any help would be appreciated. Erin McKay Senior Physicist Dept. Nuclear Medicine, St. George Hospital Sydney, Australia From hvidal at tesseract-tech.com Tue Feb 1 20:04:18 2005 From: hvidal at tesseract-tech.com (hvidal at tesseract-tech.com) Date: Tue, 1 Feb 2005 20:04:18 -0500 (EST) Subject: [vtkusers] Documentation of Tcl interface In-Reply-To: References: Message-ID: <1535.192.67.48.158.1107306258.squirrel@webmail1.pair.com> It is my opinion that such documentation is not available. However, it may be possible to programmatically extract at least a list of tcl available functionality since there seems to be some master file that programs which methods and method signatures are exported. Anybody know which this is? hv > Hi all: > > I'm having some trouble using VTK from Tcl. Is there any documentation > that describes the Tcl interface? I'm particularly keen to find out > which elements of the C++ API are NOT available from tcl. I'm not > finding the "could not find requested method or called with incorrect > arguments" error message particularly helpful and the process of trial > and error is slowly killing me. Is there any other way I can tell which > of these two mistakes I'm making? > > Any help would be appreciated. > > > Erin McKay > Senior Physicist > Dept. Nuclear Medicine, St. George Hospital > Sydney, Australia > > _______________________________________________ > 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 > > From hhiraki at lab.nig.ac.jp Tue Feb 1 22:42:24 2005 From: hhiraki at lab.nig.ac.jp (HIRAKI Hideaki) Date: Wed, 02 Feb 2005 12:42:24 +0900 (JST) Subject: [vtkusers] Documentation of Tcl interface In-Reply-To: <1535.192.67.48.158.1107306258.squirrel@webmail1.pair.com> <20040416095809S.hhiraki@lab.nig.ac.jp> References: <1535.192.67.48.158.1107306258.squirrel@webmail1.pair.com> Message-ID: <20050202.124224.74753366.hhiraki@lab.nig.ac.jp> The methods not available from Tcl are put between "//BTX" and "//ETX" in header files. In Tcl, each vtk object has "ListMethods" method to show what methods are available. VTK Reflector in http://www.vtk.org/Wiki/VTK_Scripts may help you. Regards, Hideaki Hiraki At Tue, 1 Feb 2005 20:04:18 -0500 (EST), hvidal at tesseract-tech.com wrote: > It is my opinion that such documentation is not available. However, it may > be possible > to programmatically extract at least a list of tcl available functionality > since there > seems to be some master file that programs which methods and method > signatures are exported. Anybody know which this is? > > hv > > > Hi all: > > > > I'm having some trouble using VTK from Tcl. Is there any documentation > > that describes the Tcl interface? I'm particularly keen to find out > > which elements of the C++ API are NOT available from tcl. I'm not > > finding the "could not find requested method or called with incorrect > > arguments" error message particularly helpful and the process of trial > > and error is slowly killing me. Is there any other way I can tell which > > of these two mistakes I'm making? > > > > Any help would be appreciated. > > > > > > Erin McKay > > Senior Physicist > > Dept. Nuclear Medicine, St. George Hospital > > Sydney, Australia > > From e.mckay at unsw.edu.au Tue Feb 1 23:52:12 2005 From: e.mckay at unsw.edu.au (Erin McKay) Date: Wed, 2 Feb 2005 15:52:12 +1100 Subject: [vtkusers] Documentation of Tcl interface In-Reply-To: <20050202.124224.74753366.hhiraki@lab.nig.ac.jp> References: <1535.192.67.48.158.1107306258.squirrel@webmail1.pair.com> <20050202.124224.74753366.hhiraki@lab.nig.ac.jp> Message-ID: <33DB0F8E-74D6-11D9-BB6E-000A956D7C3E@unsw.edu.au> > The methods not available from Tcl are put between "//BTX" and "//ETX" > in header files. > My headers don't seem to follow this rule. I checked the headers for vtkFloatArray and vtkCharArray (VTK 4.4.2). According to the above, both should supply the SetArray method to the Tcl interface. But this command is only available for vtkCharArray in my build (on OSX 10.3). Is there something else going on here? erin From e.mckay at unsw.edu.au Wed Feb 2 00:19:53 2005 From: e.mckay at unsw.edu.au (Erin McKay) Date: Wed, 2 Feb 2005 16:19:53 +1100 Subject: [vtkusers] How can I insert a Tcl binary string into a vtkDataArray? Message-ID: <119B8E56-74DA-11D9-BB6E-000A956D7C3E@unsw.edu.au> I have a big chunk of data (from a database) in a Tcl binary string. I'd really like to stuff it into a vtkDataArray for analysis. Is there any fast way to do this? I've tried vtkCharArray::SetArray but it doesn't like string arguments. SetValue is too slow. I've seen similar questions asked in the mailing list archives but no definitive answers as yet. Surely it can't be that hard?? Erin McKay Senior Physicist Dept. Nuclear Medicine, St. George Hospital Sydney, Australia From hhiraki at lab.nig.ac.jp Wed Feb 2 02:22:17 2005 From: hhiraki at lab.nig.ac.jp (HIRAKI Hideaki) Date: Wed, 02 Feb 2005 16:22:17 +0900 (JST) Subject: [vtkusers] Documentation of Tcl interface In-Reply-To: <33DB0F8E-74D6-11D9-BB6E-000A956D7C3E@unsw.edu.au> References: <1535.192.67.48.158.1107306258.squirrel@webmail1.pair.com> <20050202.124224.74753366.hhiraki@lab.nig.ac.jp> <33DB0F8E-74D6-11D9-BB6E-000A956D7C3E@unsw.edu.au> Message-ID: <20050202.162217.41629345.hhiraki@lab.nig.ac.jp> At Wed, 2 Feb 2005 15:52:12 +1100, Erin McKay wrote: > > The methods not available from Tcl are put between "//BTX" and "//ETX" > > in header files. > > > > My headers don't seem to follow this rule. I checked the headers for > vtkFloatArray and vtkCharArray (VTK 4.4.2). According to the above, > both should supply the SetArray method to the Tcl interface. But this > command is only available for vtkCharArray in my build (on OSX 10.3). > Is there something else going on here? > > erin As the first argument type of vtkFloatArray::SetArray is "float*", this method cannot be wrapped. As the type in vtkCharArray is "char *", that happens to be same as a string, the method can be wrapped. It's because "everything is a string" in Tcl. Recent Tcl (later than 8.0?) supports binary data other than strings. But, as far as I know, VTK's wrapper doesn't utilize the new feature. Hideaki Hiraki From intrigue at ozemail.com.au Wed Feb 2 03:36:54 2005 From: intrigue at ozemail.com.au (Erin McKay) Date: Wed, 2 Feb 2005 19:36:54 +1100 Subject: [vtkusers] Using vtkImageImport from Tcl Message-ID: <45eb6dc62d1644f8c99c77b812cf85ca@ozemail.com.au> Has anyone ever used vtkImageImport from Tcl? It doesn't seem to have any methods for specifying the data to import. Is this intentional? Erin McKay Lead Programmer & Tea Boy Computerhead PS. I note, on searching the archive, that I asked much the same question at about this time last year. I apologize for repeating myself but I still have no idea how to do this, despite receiving a couple of replies that might have helped had I been game to dig into the wrapper code generator... From agalmat at hotmail.com Wed Feb 2 03:45:43 2005 From: agalmat at hotmail.com (Alejandro Galindo Mateo) Date: Wed, 02 Feb 2005 09:45:43 +0100 Subject: [vtkusers] vtkCutter In-Reply-To: <6.2.0.14.2.20050201161141.041ba668@pop.biz.rr.com> Message-ID: Hello VTK Users, I have used vtkCutter for extracting a plane from a vtkPolyData, but the output is a vtkPolyData oriented in the space, I would like to know if it?s possible to put this data into a 2D image for visualize or something like that. Thanks From StephanTheisen at gmx.de Wed Feb 2 06:14:20 2005 From: StephanTheisen at gmx.de (Stephan Theisen) Date: Wed, 2 Feb 2005 12:14:20 +0100 (MET) Subject: [vtkusers] replace volumepro files Message-ID: <18254.1107342860@www8.gmx.net> Hi together! I will implement the VolumePro hardware in vtk. So I must rebuild it. But must I REPLACE the following files on my pc? - vli3.h - vli3.lib - vli3.dll Because this files are already existing in the VolumePro Software. The only different is the size of this files and the files I have downloaded from vtk-support page. Thanks Stephan -- Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl From tp500 at doc.ic.ac.uk Wed Feb 2 09:27:53 2005 From: tp500 at doc.ic.ac.uk (Theodore Papatheodorou) Date: Wed, 02 Feb 2005 14:27:53 +0000 Subject: [vtkusers] creating elipsoid Message-ID: <4200E369.5060509@doc.ic.ac.uk> Hi, I would like to create an ellipsoid and I noticed that there is no "Source" class for that, like there is for sphere, box etc.... Any ideas? theodoros From jean-michel.rouet at philips.com Wed Feb 2 09:28:59 2005 From: jean-michel.rouet at philips.com (jean-michel.rouet at philips.com) Date: Wed, 2 Feb 2005 15:28:59 +0100 Subject: [vtkusers] socket communication Message-ID: Hi all, I'm trying to do the following. A vtk application A (the server) that renders a scene and has an interactor an other vtk application B (the client) that renders an onther scene and has also an interactor (in fact A and B are the same program ran twice) What I'd like to achieve is this: Whenever the user changes the camera in application A, the camera of the application B is updated accordingly. but when the user moves the camera in B, the camera is not changed in A. I managed to do almost what I want using a socket communication. a callback that reacts on camera modifed events in A sends through the socket the position of the camera, the focal point and the viewup vector. application B listens to the socket and updates its own camera. Unfortunately, this listening is blocking the interface of B. Then I tried to set the socket listenner of B in a spawned thread so that the main interaction loop continues to occur. But then, the renderer->Render() call in the thread fails saying that: " vtkWin32OpenGLRenderWindow (018F0F40): wglMakeCurrent failed in MakeCurrent(), error: resource in use" (translation from french La ressource demand?e est en cours d'utilisation). What is the solution then ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From uzayemir at boun.edu.tr Wed Feb 2 09:44:02 2005 From: uzayemir at boun.edu.tr (Uzay Emrah Emir) Date: Wed, 2 Feb 2005 16:44:02 +0200 Subject: [vtkusers] creating elipsoid Message-ID: <1107355442.4200e732146ae@webmail.boun.edu.tr> Hi you can use classes outlined below to create ellipsoid and spheres uzay vtkTensorGlyph vtkSphereSource Quoting Theodore Papatheodorou : > Hi, > I would like to create an ellipsoid and I noticed that there is no > "Source" class for that, like there is for sphere, box etc.... Any ideas? > theodoros > _______________________________________________ > 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 > Uzay E. Emir Institute of Biomedical Engineering Bogazici University Bebek, Istanbul, Turkey Office: +90 212 359 7523 Fax : +90 212 257 50 30 ----- End forwarded message ----- Uzay E. Emir Institute of Biomedical Engineering Bogazici University Bebek, Istanbul, Turkey Office: +90 212 359 7523 Fax : +90 212 257 50 30 From goodwin.lawlor at ucd.ie Wed Feb 2 09:46:45 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Wed, 2 Feb 2005 14:46:45 -0000 Subject: [vtkusers] Re: creating elipsoid References: <4200E369.5060509@doc.ic.ac.uk> Message-ID: Hi Theodore, You can use vtkQuadric with the correct coeffients to create an ellipsoid (use vtkSampleFunction to create the actual geometry). Recently in cvs there is a vtkParametricSuperEllipsoid class... you'll have to compile the source though. hth Goodwin "Theodore Papatheodorou" wrote in message news:4200E369.5060509 at doc.ic.ac.uk... > Hi, > I would like to create an ellipsoid and I noticed that there is no > "Source" class for that, like there is for sphere, box etc.... Any ideas? > theodoros > _______________________________________________ > 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 > From sdrouin at bic.mni.mcgill.ca Wed Feb 2 10:17:14 2005 From: sdrouin at bic.mni.mcgill.ca (Simon Drouin) Date: Wed, 02 Feb 2005 10:17:14 -0500 Subject: [vtkusers] socket communication In-Reply-To: References: Message-ID: <4200EEFA.5080805@bic.mni.mcgill.ca> jean-michel.rouet at philips.com wrote: > > Hi all, > > I'm trying to do the following. > > A vtk application A (the server) that renders a scene and has an > interactor > an other vtk application B (the client) that renders an onther scene > and has also an interactor > > (in fact A and B are the same program ran twice) > > What I'd like to achieve is this: > Whenever the user changes the camera in application A, the camera of > the application B is updated accordingly. > but when the user moves the camera in B, the camera is not changed in A. > > I managed to do almost what I want using a socket communication. > a callback that reacts on camera modifed events in A sends through the > socket the position of the camera, the focal point and the viewup vector. > > application B listens to the socket and updates its own camera. > Unfortunately, this listening is blocking the interface of B. > > Then I tried to set the socket listenner of B in a spawned thread so > that the main interaction loop continues to occur. > But then, the renderer->Render() call in the thread fails saying that: " > vtkWin32OpenGLRenderWindow (018F0F40): wglMakeCurrent failed in > MakeCurrent(), error: resource in use" (translation from french La > ressource demand?e est en cours d'utilisation). > > What is the solution then ? > >------------------------------------------------------------------------ > >_______________________________________________ >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 > > Hi, Rendering from a different thread than the main thread is never a good idea. Your listener thread should just post an event to the main loop when it receives a camera event from the socket. When the main loop processes the event, then you can call Render(). I do that with Qt under linux (QApplication::postEvent()), but it is probably as easy to do using Windows. Simon Drouin From pier_jan at hotmail.com Wed Feb 2 10:18:26 2005 From: pier_jan at hotmail.com (Pierre-Jean Boulianne) Date: Wed, 02 Feb 2005 10:18:26 -0500 Subject: [vtkusers] How to fit image size to rendering window? Message-ID: An HTML attachment was scrubbed... URL: From scottjp at CLEMSON.EDU Wed Feb 2 10:52:10 2005 From: scottjp at CLEMSON.EDU (Scott J. Pearson) Date: Wed, 02 Feb 2005 10:52:10 -0500 Subject: [vtkusers] Right-hand and left-hand coordinate systems Message-ID: Let me rephrase my previous question in a more blunt manner: VTK seems to use a right-hand coordinate system; because I am trying to graph some 2-D data on a 3-D display, I desire to use a left-hand coordinate system, with the X axis going to the right. Is there a way to make VTK use a left-hand coordinate system? If VTK doesn't have one, this may be a good feature for v5.0. Scott From jean-michel.rouet at philips.com Wed Feb 2 11:08:15 2005 From: jean-michel.rouet at philips.com (jean-michel.rouet at philips.com) Date: Wed, 2 Feb 2005 17:08:15 +0100 Subject: [vtkusers] socket communication Message-ID: On 02/02/2005 16:17:14 Simon Drouin wrote: >Hi, > >Rendering from a different thread than the main thread is never a good >idea. Your listener thread should just post an event to the main loop >when it receives a camera event from the socket. When the main loop >processes the event, then you can call Render(). I do that with Qt under >linux (QApplication::postEvent()), but it is probably as easy to do >using Windows. > >Simon Drouin Thanks for your answer Simon, I also tried posting an event from the listener thread using the renderer->InvokeEvent(vtkCommand::UserEvent,NULL); In the main code, I do have an observer of the UserEvent attached to the renderer that calls Render(). Nevertheless, this did not work and gave exactly the same error ! (wglMakeCurrent failed in MakeCurrent()). Any other idea ? Is there an other Event I can post/Invoke to force an update of the renderer? From goodwin.lawlor at ucd.ie Wed Feb 2 11:13:35 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Wed, 2 Feb 2005 16:13:35 -0000 Subject: [vtkusers] Re: Right-hand and left-hand coordinate systems References: Message-ID: Hi Scott, This might help: http://public.kitware.com/pipermail/vtkusers/2004-March/072812.html hth Goodwin "Scott J. Pearson" wrote in message news:BE26615A.D27%scottjp at clemson.edu... > Let me rephrase my previous question in a more blunt manner: > > VTK seems to use a right-hand coordinate system; because I am trying to > graph some 2-D data on a 3-D display, I desire to use a left-hand coordinate > system, with the X axis going to the right. > > Is there a way to make VTK use a left-hand coordinate system? If VTK doesn't > have one, this may be a good feature for v5.0. > > Scott > > > _______________________________________________ > 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 > From lucapl at rc.unesp.br Wed Feb 2 11:21:30 2005 From: lucapl at rc.unesp.br (Luca Pallozzi Lavorante) Date: Wed, 02 Feb 2005 14:21:30 -0200 Subject: [vtkusers] creating elipsoid In-Reply-To: <4200E369.5060509@doc.ic.ac.uk> References: <4200E369.5060509@doc.ic.ac.uk> Message-ID: <4200FE0A.7040001@rc.unesp.br> Theodore Papatheodorou wrote: > Hi, > I would like to create an ellipsoid and I noticed that there is no > "Source" class for that, like there is for sphere, box etc.... Any ideas? > theodoros > _______________________________________________ > 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 > Hi, Theodore, to create ellipsoids, you can use instances of vtkSphereSource and pass them to a vtkTransformPolyDataFilter. In that filter, you?ll have to explicitly create a matrix trasformation, using the vtkTransform class. You?ll have to invoke the Scale methods to properly specify the length of the ellipsoid?s axes. Have a look at vtkTransformPolyDataFilter?s documentation to see some examples. []?s Luca From goodwin.lawlor at ucd.ie Wed Feb 2 11:16:10 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Wed, 2 Feb 2005 16:16:10 -0000 Subject: [vtkusers] Re: How to fit image size to rendering window? References: Message-ID: Hi Pierre-Jean, This was answered a couple of weeks ago: http://public.kitware.com/pipermail/vtkusers/2005-January/077988.html hth Goodwin "Pierre-Jean Boulianne" wrote in message news:BAY103-F3110E3CFBD8BDA21A73301FB7E0 at phx.gbl... Hi, I want to know how to fit a rendered image to the size of the renderwindow? vtkImageActor *actor = vtkImageActor::New(); actor->SetInput(bmpReader->GetOutput()); vtkRenderer *renderer = vtkRenderer::New(); renderer->AddActor(actor); vtkRenderWindow *renderWindow = vtkRenderWindow::New(); renderWindow->AddRenderer(renderer); int extent[6]; bmpReader->GetDataExtent(extent); renderWindow->SetSize(extent[1], extent[3]); ??? The displayed image is always smaller than the window... How can I display the rendering window for a long time without an interactor? Is it possible? Thanks a lot. Pierre-Jean _______________________________________________ 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 From clinton at elemtech.com Wed Feb 2 11:21:49 2005 From: clinton at elemtech.com (Clinton Stimpson) Date: Wed, 2 Feb 2005 09:21:49 -0700 Subject: [vtkusers] socket communication In-Reply-To: <20050202143044.959BF343E5@public.kitware.com> References: <20050202143044.959BF343E5@public.kitware.com> Message-ID: <1107361309.4200fe1ddef31@webmail.xmission.com> > > Message: 13 > Date: Wed, 2 Feb 2005 15:28:59 +0100 > From: jean-michel.rouet at philips.com > Subject: [vtkusers] socket communication > To: vtkusers at vtk.org > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > I'm trying to do the following. > > A vtk application A (the server) that renders a scene and has an > interactor > an other vtk application B (the client) that renders an onther scene and > has also an interactor > > (in fact A and B are the same program ran twice) > > What I'd like to achieve is this: > Whenever the user changes the camera in application A, the camera of the > application B is updated accordingly. > but when the user moves the camera in B, the camera is not changed in A. > > I managed to do almost what I want using a socket communication. > a callback that reacts on camera modifed events in A sends through the > socket the position of the camera, the focal point and the viewup vector. > > application B listens to the socket and updates its own camera. > Unfortunately, this listening is blocking the interface of B. > > Then I tried to set the socket listenner of B in a spawned thread so that > the main interaction loop continues to occur. > But then, the renderer->Render() call in the thread fails saying that: " > vtkWin32OpenGLRenderWindow (018F0F40): wglMakeCurrent failed in > MakeCurrent(), error: resource in use" (translation from french La > ressource demand?e est en cours d'utilisation). > > What is the solution then ? > You'll probably find it easier to *not* make a new thread, overload the vtk*RenderWindowInteractor::Start method and add your socket(s) to the main event loop. You won't have to worry about doing inter-thread communication, locking/unlocking etc.. and you also won't have to worry about those video drivers that don't support multiple threads. Here's an example: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/waiting_in_a_message_loop.asp You may want to tweak it a bit for yourself. Just pass your socket in as on of the handle objects to be waited on. If you need Carbon or X11 equivalents, I can give you those if you need them. If you are using a GUI toolkit, there are usually ways to do this without threading. Clint From prabhu_r at users.sf.net Wed Feb 2 14:23:17 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Thu, 3 Feb 2005 00:53:17 +0530 Subject: [vtkusers] ANN: MayaVi-1.4 released Message-ID: <16897.10405.218101.694617@monster.linux.in> Hi, This is to announce the availability of the (long overdue) MayaVi Data Visualizer version 1.4. MayaVi is a free, easy to use, scientific data visualizer. It is written in Python, uses the Visualization Toolkit (VTK) for the graphics and provides a GUI written using Tkinter. MayaVi is distributed under a BSD license. It is also cross platform and should run on any platform where both Python and VTK are available. For more information, sources, binaries, screenshots, installation instructions, documentation etc. visit the MayaVi home page at: http://mayavi.sourceforge.net Also bundled with MayaVi is a VTK pipeline browser written in Python and a utility module that makes using VTK easier from the Python interpreter. New in this release: * Support for data files belonging to a time series. It is also possible to sweep through the time series. Thanks to Gerard Gorman for an initial patch! * Support for user defined modules and filters. A search path may be specified in the preferences. User defined modules and filters are searched for in these directories and automatically picked up by MayaVi. Thanks to Fernando Perez for an initial patch! * Fixed critical bugs in the Volume module. Anyone using the Volume module from the 1.3 release should upgrade! * Miscellaneous enhancements: allow the user to disable rendering temporarily, user can specify geometry of the MayaVi window. * Several other bug fixes and minor enhancements. Acknowledgements: Many thanks to SourceForge for their continued support in hosting MayaVi. Thanks also to various users who provided patches, bug reports, support and suggestions. Have fun! prabhu From e.mckay at unsw.edu.au Wed Feb 2 16:17:04 2005 From: e.mckay at unsw.edu.au (Erin McKay) Date: Thu, 3 Feb 2005 08:17:04 +1100 Subject: [vtkusers] Documentation of Tcl interface In-Reply-To: <20050202.162217.41629345.hhiraki@lab.nig.ac.jp> References: <1535.192.67.48.158.1107306258.squirrel@webmail1.pair.com> <20050202.124224.74753366.hhiraki@lab.nig.ac.jp> <33DB0F8E-74D6-11D9-BB6E-000A956D7C3E@unsw.edu.au> <20050202.162217.41629345.hhiraki@lab.nig.ac.jp> Message-ID: > At Wed, 2 Feb 2005 15:52:12 +1100, Erin McKay wrote: >>> The methods not available from Tcl are put between "//BTX" and >>> "//ETX" >>> in header files. >>> >> >> My headers don't seem to follow this rule. I checked the headers for >> vtkFloatArray and vtkCharArray (VTK 4.4.2). According to the above, >> both should supply the SetArray method to the Tcl interface. But this >> command is only available for vtkCharArray in my build (on OSX 10.3). >> Is there something else going on here? >> >> erin > > As the first argument type of vtkFloatArray::SetArray is "float*", > this method cannot be wrapped. As the type in vtkCharArray is "char *", > that happens to be same as a string, the method can be wrapped. > It's because "everything is a string" in Tcl. > > Recent Tcl (later than 8.0?) supports binary data other than strings. > But, as far as I know, VTK's wrapper doesn't utilize the new feature. > > Hideaki Hiraki > > OK, so I shouldn't expect to be able to use vtkCharArray::SetArray from Tcl even though its available... Well, at the risk of sounding like a broken record: does anyone know how to transfer the contents of a Tcl binary string (or any other non-vtk memory buffer for that matter) into VTK using only the facilities present in the current distribution? Alternatively, can someone confirm that there is no way to do this presently without modifying the VTK source? The two methods I have tried that work (a SetValue loop and file-based data transfer) are, sadly, too slow for my application. regards to all erin From jdhunter at ace.bsd.uchicago.edu Wed Feb 2 16:21:55 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Wed, 02 Feb 2005 15:21:55 -0600 Subject: [vtkusers] connectivity information Message-ID: I am using marching cubes to do some isocontouring of medical image CT data. Some colleagues would me to help them export the geometry to feed to a computational fluid dynamics program they have to model CSF flow in the brain. I know how to connect the marching cubes to the vtkPolyDataConnectivityFilter, and use SetExtractionMode combined with AddSpecifiedRegion to get my hands on the polydata in a certain region, eg mc = vtk.vtkMarchingCubes() mc.SetInput(imageData) ...set other params... connect = vtk.vtkPolyDataConnectivityFilter() connect.SetInput(mc.GetOutput()) .... print 'number of regions', connect.GetNumberOfExtractedRegions() connect.AddSpecifiedRegion(someid) connect.SetExtractionModeToSpecifiedRegions() poly = connect.GetOutput() and then feed this to a vtkDataSetWriter to get the poly data for that region. This seems to be working OK. What I need, in addition to the polydata, though, is some of the internal connectivity data within that connected polygon dataset. Eg, that two polygons share a point or an edge, and so on. Presumably this information is available to the connectivity filter while it is working. Is it stored or otherwise available? Or should I feed this poly data set to some other VTK filter to get that info? What is this best way to get this information? Ultimately I'll need to send it to a file for my colleagues to use. I've been reading over the VTK file format section of "The Visualization Toolkit" text, but don't see anything for this kind of information. Suggestions, pointers much appreciated! Thanks, JDH VTK 4.4 From steven.robbins at videotron.ca Wed Feb 2 17:26:23 2005 From: steven.robbins at videotron.ca (Steve M. Robbins) Date: Wed, 02 Feb 2005 17:26:23 -0500 Subject: [vtkusers] can I use Java's paint() to render over a vtkPanel? Message-ID: <20050202222623.GA20049@nyongwa.montreal.qc.ca> Hi, I'm working with vtk 4.2 and java. I'd like to display some overlay information in the vtkPanel window over top of the VTK rendering. My first attempt was to simply override vtkPanel's paint() method. Using the Assembly.java example from http://ij-plugins.sourceforge.net/vtk-examples/, I tried replacing renWin = new vtkPanel(); by renWin = new vtkPanel() { public void paint( Graphics g ) { super.paint( g ); g.drawString( "Overlay", 50, 50 ); } }; The window comes up OK. However, when I interact with it, the rendering all goes on in VTK and java's paint() is not called. The effect is that the overlay goes away. So my next thought was to catch the "EndEvent" from the vtkRenderWindow and draw the overlay at that time. The wrinkle is that I need a java Graphics object to do the drawing which I don't have. I tried a couple of ways to call repaint() without getting into an infinite loop of painting, but I haven't managed it yet. Is there a way to achieve what I want? Thanks, -Steve From hvidal at tesseract-tech.com Wed Feb 2 18:41:13 2005 From: hvidal at tesseract-tech.com (H.Vidal, Jr.) Date: Wed, 02 Feb 2005 18:41:13 -0500 Subject: [vtkusers] Documentation of Tcl interface In-Reply-To: References: <1535.192.67.48.158.1107306258.squirrel@webmail1.pair.com> <20050202.124224.74753366.hhiraki@lab.nig.ac.jp> <33DB0F8E-74D6-11D9-BB6E-000A956D7C3E@unsw.edu.au> <20050202.162217.41629345.hhiraki@lab.nig.ac.jp> Message-ID: <42016519.5050503@tesseract-tech.com> Erin McKay wrote: > >> At Wed, 2 Feb 2005 15:52:12 +1100, Erin McKay wrote: >> > OK, so I shouldn't expect to be able to use vtkCharArray::SetArray from > Tcl even though its available... It's available (from memory) as a method in the C++ object. It is not exported to TCL in stock code. However, it is a *very* minor hack to source just prior to 'make' in order to expose this interface. I found the very same problem when interfacing a camera API to vtl and tcl via swig interface. It's a tiny hack, but works entirely well. So just a little source patching (very intuitive for this minor bit) is all that is required. Hopefully these are inspiring words..... hv > Well, at the risk of sounding like a broken record: does anyone know how > to transfer the contents of a Tcl binary string (or any other non-vtk > memory buffer for that matter) into VTK using only the facilities > present in the current distribution? > > Alternatively, can someone confirm that there is no way to do this > presently without modifying the VTK source? > > The two methods I have tried that work (a SetValue loop and file-based > data transfer) are, sadly, too slow for my application. > > regards to all > erin > > _______________________________________________ > 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 > From hhiraki at lab.nig.ac.jp Thu Feb 3 00:00:14 2005 From: hhiraki at lab.nig.ac.jp (HIRAKI Hideaki) Date: Thu, 03 Feb 2005 14:00:14 +0900 (JST) Subject: [vtkusers] Documentation of Tcl interface In-Reply-To: References: <33DB0F8E-74D6-11D9-BB6E-000A956D7C3E@unsw.edu.au> <20050202.162217.41629345.hhiraki@lab.nig.ac.jp> Message-ID: <20050203.140014.74727145.hhiraki@lab.nig.ac.jp> Have you filed a feature request to the bug tracker? I think what you want is a missing feature of VTK. If no Tcl-only/general solution existed, a small C++ code might be a workaround. It could be outside the VTK source. How do you put your contents into Tcl? I guess a similar code would put it into vtkDataArray. Regards At Thu, 3 Feb 2005 08:17:04 +1100, Erin McKay wrote: > > > At Wed, 2 Feb 2005 15:52:12 +1100, Erin McKay wrote: > >>> The methods not available from Tcl are put between "//BTX" and > >>> "//ETX" > >>> in header files. > >>> > >> > >> My headers don't seem to follow this rule. I checked the headers for > >> vtkFloatArray and vtkCharArray (VTK 4.4.2). According to the above, > >> both should supply the SetArray method to the Tcl interface. But this > >> command is only available for vtkCharArray in my build (on OSX 10.3). > >> Is there something else going on here? > >> > >> erin > > > > As the first argument type of vtkFloatArray::SetArray is "float*", > > this method cannot be wrapped. As the type in vtkCharArray is "char *", > > that happens to be same as a string, the method can be wrapped. > > It's because "everything is a string" in Tcl. > > > > Recent Tcl (later than 8.0?) supports binary data other than strings. > > But, as far as I know, VTK's wrapper doesn't utilize the new feature. > > > > Hideaki Hiraki > > > > > > OK, so I shouldn't expect to be able to use vtkCharArray::SetArray from > Tcl even though its available... > > Well, at the risk of sounding like a broken record: does anyone know > how to transfer the contents of a Tcl binary string (or any other > non-vtk memory buffer for that matter) into VTK using only the > facilities present in the current distribution? > > Alternatively, can someone confirm that there is no way to do this > presently without modifying the VTK source? > > The two methods I have tried that work (a SetValue loop and file-based > data transfer) are, sadly, too slow for my application. > > regards to all > erin > From alexandre.thinnes at aist.go.jp Thu Feb 3 04:09:51 2005 From: alexandre.thinnes at aist.go.jp (Thinnes) Date: Thu, 03 Feb 2005 18:09:51 +0900 Subject: [vtkusers] Display tetrahedrons Message-ID: <4201EA5F.B4DC89C6@aist.go.jp> Dear VTKUsers, I have a 3D object made up by many tetrahedrons. I would like to know if any of you try to display a tetrahedron in VTK? And how you manage to do that? Do you know where I can found an example with tetrahedrons? thank's for all Alexandre Thinnes From jean-michel.rouet at philips.com Thu Feb 3 04:34:19 2005 From: jean-michel.rouet at philips.com (jean-michel.rouet at philips.com) Date: Thu, 3 Feb 2005 10:34:19 +0100 Subject: [vtkusers] socket communication Message-ID: On 02/02/2005 21:11:30 Simon Drouin wrote: >vtk event system is not related to your main event loop in any way. If >you call InvokeEvent from a thread, listeners's execute function will be >called from that same thread. > >If you post an event to the main loop (I don't think it can be done in >vtk), that event is added to the main loop's event queue. When the main >thread is scheduled, it will process the event and then you will be able >to call Render from the main thread. > Ok that was I was confused about vtkEvents and the main loop event processing... For those interested, I solved my problem by calling the follwing in the listening thread. PosteMessage((HWND)renWin->GetGenericWindowId(),WM_PAINT,NULL,NULL); And then it refreshes correctly the window as expected. Thanks for your help JM -------------- next part -------------- An HTML attachment was scrubbed... URL: From agalmat at hotmail.com Thu Feb 3 05:04:28 2005 From: agalmat at hotmail.com (Alejandro Galindo Mateo) Date: Thu, 03 Feb 2005 11:04:28 +0100 Subject: [vtkusers] Extract points In-Reply-To: <4201EA5F.B4DC89C6@aist.go.jp> Message-ID: Hello VTK users, I want to extract points from a vtkPolyData that are near a point in the space, I use vtkPolyDataConnectivityFilter with the option SetClosestPoint but it doesn?t work and I don?t know how to specify the maximum distance to the point. Is it possible whit this class or there is another one to do this?. Thanks for all From dsaussus at fugro-jason.com Thu Feb 3 06:05:08 2005 From: dsaussus at fugro-jason.com (Denis Saussus) Date: Thu, 3 Feb 2005 12:05:08 +0100 Subject: [vtkusers] problem viewing merged PolyData sets using AppendPolyData Message-ID: I am plotting a vtkPolyData set containing 3d points so that they display as spheres. I can get this to work very easily. Now I have two vtkPolyData sets, each containing 3d points. I want to plot them using a single mapper/actor. I am doing this simply by using vtkAppendPolyData to merge the two sets into one. My problem is that now nothing shows up. Below is the script I am using. Help greatly aprpeciated... ########################## # Why does this not work? ########################## somePolyData = vtk.vtkPolyData() # assume this contains some valid 3d points apd = vtk.vtkAppendPolyData() apd.AddInput(somePolyData) apd.AddInput(someMorePolyData) aSphere = vtk.vtkSphereSource() aSphere.SetRadius(1.0) spheres = vtk.vtkGlyph3D() spheres.SetInput(apd.GetOutput()) spheres.SetSource(aSphere.GetOutput()) mapSpheres = vtk.vtkPolyDataMapper() mapSpheres.SetInput(spheres.GetOutput()) spheresActor = vtk.vtkActor() spheresActor.SetMapper(mapSpheres) ren = vtk.vtkRenderer() ren.AddActor(spheresActor) renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) iren.Initialize() renWin.Render() iren.Start() Denis Saussus Fugro-Jason Plaza Building, Weena 598 PO Box 1573 3000 BN ROTTERDAM The Netherlands +31 (0)10 2801544 - direct +31 (0)10 2801511 - fax Visit us at : www.fugro-jason.com FUGRO-JASON ..... #1 in reservoir characterization This e-mail and any files transmitted with it are confidential and intended solely for the use of the addressee. This e-mail shall not be deemed binding unless confirmed in writing. If you have received it by mistake, please let us know by e-mail reply and delete it from your system; you may not copy this message or disclose its contents to anyone. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. transmission. From mathieu.malaterre at kitware.com Thu Feb 3 10:52:34 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Thu, 03 Feb 2005 10:52:34 -0500 Subject: [vtkusers] creating elipsoid In-Reply-To: <4200E369.5060509@doc.ic.ac.uk> References: <4200E369.5060509@doc.ic.ac.uk> Message-ID: <420248C2.3030809@kitware.com> Theodore Papatheodorou wrote: > Hi, > I would like to create an ellipsoid and I noticed that there is no > "Source" class for that, like there is for sphere, box etc.... Any ideas? > theodoros Theodore, Are you using VTK from CVS. If so pay attention that there has been some recent addition to the toolkit that could help you: http://www.vtk.org/doc/nightly/html/classvtkParametricSuperEllipsoid.html Is this waht you were looking for ? Mathieu From dsaussus at fugro-jason.com Thu Feb 3 11:51:55 2005 From: dsaussus at fugro-jason.com (Denis Saussus) Date: Thu, 3 Feb 2005 17:51:55 +0100 Subject: [vtkusers] number of points in vtkAppendPolyData Message-ID: How can I get the following to print the total number of points in the appended set? a = vtk.vtkPolyData() b = vtk.vtkPolyData() apd = vtk.vtkAppendPolyData() apd.AddInput(a) apd.AddInput(b) print apd.GetOutput().GetNumberOfPoints() ==> this prints '0' instead of a+b ? I tried doing apd.Update() before but it didn't help. What am I missing? From goodwin.lawlor at ucd.ie Thu Feb 3 11:47:13 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Thu, 3 Feb 2005 16:47:13 -0000 Subject: [vtkusers] Re: problem viewing merged PolyData sets using AppendPolyData References: Message-ID: Hi Denis, At a guess, I would say your vtkPolyData's have points (geometry) but no vertices (topology). vtkGlyph3D needs both to work, although in theory it should only need the points. Here's a trick to get it to work: ... ... apd = vtk.vtkAppendPolyData() apd.AddInput(somePolyData) apd.AddInput(someMorePolyData) verts = vtk.vtkMaskPoints() verts.SetInput(apd.GetOutput()) verts.GenerateVerticesOn() verts.SetOnRatio(1) aSphere = vtk.vtkSphereSource() aSphere.SetRadius(1.0) spheres = vtk.vtkGlyph3D() spheres.SetInput(verts.GetOutput()) spheres.SetSource(aSphere.GetOutput()) ... ... hth Goodwin "Denis Saussus" wrote in message news:F42290EAAE100A4A99A3A9BE2059504FBDB11C at MAIL.fugro-jason.local... I am plotting a vtkPolyData set containing 3d points so that they display as spheres. I can get this to work very easily. Now I have two vtkPolyData sets, each containing 3d points. I want to plot them using a single mapper/actor. I am doing this simply by using vtkAppendPolyData to merge the two sets into one. My problem is that now nothing shows up. Below is the script I am using. Help greatly aprpeciated... ########################## # Why does this not work? ########################## somePolyData = vtk.vtkPolyData() # assume this contains some valid 3d points apd = vtk.vtkAppendPolyData() apd.AddInput(somePolyData) apd.AddInput(someMorePolyData) aSphere = vtk.vtkSphereSource() aSphere.SetRadius(1.0) spheres = vtk.vtkGlyph3D() spheres.SetInput(apd.GetOutput()) spheres.SetSource(aSphere.GetOutput()) mapSpheres = vtk.vtkPolyDataMapper() mapSpheres.SetInput(spheres.GetOutput()) spheresActor = vtk.vtkActor() spheresActor.SetMapper(mapSpheres) ren = vtk.vtkRenderer() ren.AddActor(spheresActor) renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) iren.Initialize() renWin.Render() iren.Start() Denis Saussus Fugro-Jason Plaza Building, Weena 598 PO Box 1573 3000 BN ROTTERDAM The Netherlands +31 (0)10 2801544 - direct +31 (0)10 2801511 - fax Visit us at : www.fugro-jason.com FUGRO-JASON ..... #1 in reservoir characterization This e-mail and any files transmitted with it are confidential and intended solely for the use of the addressee. This e-mail shall not be deemed binding unless confirmed in writing. If you have received it by mistake, please let us know by e-mail reply and delete it from your system; you may not copy this message or disclose its contents to anyone. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. transmission. _______________________________________________ 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 From webstuff at suessstoffersatz.de Thu Feb 3 11:56:06 2005 From: webstuff at suessstoffersatz.de (webstuff at suessstoffersatz.de) Date: Thu, 03 Feb 2005 17:56:06 +0100 Subject: [vtkusers] Problems with wxVTK, wxGTK and pango (fonts) Message-ID: Hi, I try to use wxVTK on a Suse 9.2 Professional. I installed all necessary packages including wxGTK, GTK, atk, pango etc. I managed to compile the examples, but when I execute them I get the following error: ** (Sample1:11499): WARNING **: Cannot open font file for font Verdana 10 ** (Sample1:11499): WARNING **: Cannot open fallback font, nothing to do So I took a simple wx-widgets "Hello World" source and the cmake-files from wxVTK. I found that the linking to some vtk-libs makes the programs crash. LINK_LIBRARIES( vtkIO vtkHybrid vtkCommon vtkGraphics vtkRendering ${WXWINDOWS_LIBRARY} ) Unfortunately even the vtkRendering makes the program crash. I googled a bit around and found that the error comes from pango (I searched the source of pango) when it is unable to open a freetype font. I checked the permissions of /usr/X11R6/lib/X11/fonts etc where the fonts are missing. I tried the GDK_USE_XFT=0 flag, did a fc-cache -v -f but nothing works. Even compiling as root gives me the error-messages. On my gentoo-driven Laptop wxVTK works fine. Installing gentoo is no solution on this machine :-) Maybe someone can give me some hints, I am very desperate about solving this problem. Regards Richard Freitag From jdhunter at ace.bsd.uchicago.edu Thu Feb 3 12:16:50 2005 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Thu, 03 Feb 2005 11:16:50 -0600 Subject: [vtkusers] exporting mesh from image data Message-ID: I am trying to generate a mesh for a finite volume solver (gambit, fluent) from 3D image data (CT, MRI). To generate the fluent msh file, you need not only a list of vertices and polygons, much like what is available in the vtk file format, but also the volume elements in the mesh that the polygons abut. Eg for a given triangle in the mesh, you would have a line like 3 3 2 1 11 0 which is numfaces vert0 vert1 vert2 vol1 vol2 where vol1 and vol2 are indices that indicate the volume in the mesh that the triangle belongs to (vol2 is 0 for triangles on the surface). The specific problem at hand involves building a mesh for ventricles in the brain. I have no trouble building the isosurface that surrounds the ventricles using marching cubes and connectivity filters, but now need to be able to generate a mesh over the interior and assign volumes to faces. Does such capability exist in VTK, and if so I would be thankful for pointers to class docs or examples. I posted a related question yesterday but now have a clearer idea of the problem I am trying to solve so hopefully this post clarifies. Thanks! JDH VTK 4.4 From fisseler at rob.uni-luebeck.de Thu Feb 3 12:28:45 2005 From: fisseler at rob.uni-luebeck.de (Jens Fisseler) Date: Thu, 03 Feb 2005 18:28:45 +0100 Subject: [vtkusers] Problems with wxVTK, wxGTK and pango (fonts) In-Reply-To: References: Message-ID: <1107451725.7290.12.camel@pepe.rob.uni-luebeck.de> Hi Richard! > I try to use wxVTK on a Suse 9.2 Professional. I installed all necessary > packages including wxGTK, GTK, atk, pango etc. I managed to compile the > examples, but when I execute them I get the following error: > > ** (Sample1:11499): WARNING **: Cannot open font file for font Verdana 10 > ** (Sample1:11499): WARNING **: Cannot open fallback font, nothing to do > I googled a bit around and found that the error comes from pango (I > searched the source of pango) when it is unable to open a freetype font. I > checked the permissions of /usr/X11R6/lib/X11/fonts etc where the fonts > are missing. I tried the GDK_USE_XFT=0 flag, did a fc-cache -v -f but > nothing works. Even compiling as root gives me the error-messages. > > On my gentoo-driven Laptop wxVTK works fine. Installing gentoo is no > solution on this machine :-) Do you use wxwidgets with GTK+-2.0 support on your Suse-machine and wxwidgets with GTK+-1.x support on your Gentoo-laptop? I stumbled over this problem myself some time ago and suppose it's caused by some changes inside the "freetype"-library. The fonts installed on your system are not compatible with the "freetype"-library shipped with VTK. My "solution" was to install a newer version of "freetype" inside the VTK source tree. You have to do some changes to the "freetype" source code, and I have a list of the necessary steps, but only at home. So I can send you the list tomorrow, if my guess regarding the GTK+-version used with wxwidgets was right. So let me know. Regards, Jens From goodwin.lawlor at ucd.ie Thu Feb 3 12:50:47 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Thu, 3 Feb 2005 17:50:47 -0000 Subject: [vtkusers] Re: number of points in vtkAppendPolyData References: Message-ID: Can you post the code where you've added points to the vtkPolyData objects? "Denis Saussus" wrote in message news:F42290EAAE100A4A99A3A9BE2059504FBDB121 at MAIL.fugro-jason.local... How can I get the following to print the total number of points in the appended set? a = vtk.vtkPolyData() b = vtk.vtkPolyData() apd = vtk.vtkAppendPolyData() apd.AddInput(a) apd.AddInput(b) print apd.GetOutput().GetNumberOfPoints() ==> this prints '0' instead of a+b ? I tried doing apd.Update() before but it didn't help. What am I missing? _______________________________________________ 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 From beau.sapach at ualberta.ca Thu Feb 3 12:56:46 2005 From: beau.sapach at ualberta.ca (Beau Sapach) Date: Thu, 3 Feb 2005 10:56:46 -0700 Subject: [vtkusers] Profile an image? Message-ID: <200502031756.j13HulUL006759@pilsener.srv.ualberta.ca> Hello everyone, I'd like to be able to draw a line over an image and then plot a profile of the scalars that the line intersects with. Drawing the line etc is easy, basically I need a function that takes the 2 end points of the line and returns the points and scalars that the line intersects, does such a function already exist? ---------------------------------------- Beau Sapach Network Administrator Biomedical Engineering University of Alberta Phone: (780) 492-8098 Fax: (780) 492-8259 Email: beau.sapach at ualberta.ca ---------------------------------------- From amy.henderson at kitware.com Thu Feb 3 13:20:42 2005 From: amy.henderson at kitware.com (Amy Henderson) Date: Thu, 03 Feb 2005 13:20:42 -0500 Subject: [vtkusers] Profile an image? In-Reply-To: <200502031756.j13HulUL006759@pilsener.srv.ualberta.ca> References: <200502031756.j13HulUL006759@pilsener.srv.ualberta.ca> Message-ID: <6.2.0.14.2.20050203131728.03f91868@pop.biz.rr.com> Use vtkLineSource to create a line with the 2 selected end points. (The Resolution variable will determine at how many evenly-spaced points along the line you will sample the image.) Then use vtkProbeFilter with your image data as the Input and the output of vtkLineSource as the Source. - Amy At 12:56 PM 2/3/2005, Beau Sapach wrote: >Hello everyone, > >I'd like to be able to draw a line over an image and then plot a profile of >the scalars that the line intersects with. Drawing the line etc is easy, >basically I need a function that takes the 2 end points of the line and >returns the points and scalars that the line intersects, does such a >function already exist? > >---------------------------------------- >Beau Sapach >Network Administrator >Biomedical Engineering >University of Alberta >Phone: (780) 492-8098 >Fax: (780) 492-8259 >Email: beau.sapach at ualberta.ca >---------------------------------------- > >_______________________________________________ >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 From amy.henderson at kitware.com Thu Feb 3 13:39:01 2005 From: amy.henderson at kitware.com (Amy Henderson) Date: Thu, 03 Feb 2005 13:39:01 -0500 Subject: Fwd: RE: [vtkusers] Profile an image? Message-ID: <6.2.0.14.2.20050203133819.03f52460@pop.biz.rr.com> I'm forwarding this back to the VTK Users list. >From: "Beau Sapach" >To: "'Amy Henderson'" >Subject: RE: [vtkusers] Profile an image? >Date: Thu, 3 Feb 2005 11:35:36 -0700 >X-Mailer: Microsoft Office Outlook, Build 11.0.5510 >Thread-Index: AcUKHX5YQw3mI+amSZG147wWuoqUFAAAR/uw >X-NAS-Bayes: #0: 0; #1: 1 >X-NAS-Classification: 0 >X-NAS-MessageID: 3048 >X-NAS-Validation: {31391EF3-B3AC-4F12-94D8-DC2DA45E9526} > >Thanks! One thing I'm not clear on is that the points along the line may >not fall exactly on points within the dataset, so I'm assuming the filter >will interpolate values to match the resolution of the line, but is there >any way of getting the exact point values of all points directly on either >side of the line? > >Beau > >-----Original Message----- >From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf >Of Amy Henderson >Sent: Thursday, February 03, 2005 11:21 AM >To: vtkusers at vtk.org >Subject: Re: [vtkusers] Profile an image? > >Use vtkLineSource to create a line with the 2 selected end points. (The >Resolution variable will determine at how many evenly-spaced points along >the line you will sample the image.) Then use vtkProbeFilter with your >image data as the Input and the output of vtkLineSource as the Source. > >- Amy > >At 12:56 PM 2/3/2005, Beau Sapach wrote: > >Hello everyone, > > > >I'd like to be able to draw a line over an image and then plot a profile of > >the scalars that the line intersects with. Drawing the line etc is easy, > >basically I need a function that takes the 2 end points of the line and > >returns the points and scalars that the line intersects, does such a > >function already exist? > > > >---------------------------------------- > >Beau Sapach > >Network Administrator > >Biomedical Engineering > >University of Alberta > >Phone: (780) 492-8098 > >Fax: (780) 492-8259 > >Email: beau.sapach at ualberta.ca > >---------------------------------------- > > > >_______________________________________________ > >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 From pier_jan at hotmail.com Thu Feb 3 13:55:38 2005 From: pier_jan at hotmail.com (Pierre-Jean Boulianne) Date: Thu, 03 Feb 2005 13:55:38 -0500 Subject: [vtkusers] Gamma??? Message-ID: An HTML attachment was scrubbed... URL: From David.Pont at ForestResearch.co.nz Thu Feb 3 15:01:58 2005 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Fri, 4 Feb 2005 09:01:58 +1300 Subject: [vtkusers] Extract points In-Reply-To: Message-ID: Try vtkPointLocator Dave P "Alejandro Galindo Mateo" wrote on 03/02/2005 23:04:28: > Hello VTK users, > > I want to extract points from a vtkPolyData that are near a point in the > space, I use vtkPolyDataConnectivityFilter with the option SetClosestPoint > but it doesn?t work and I don?t know how to specify the maximum distance to > the point. Is it possible whit this class or there is another one to do > this?. > > Thanks for all > > > _______________________________________________ > 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 From darshanpai at gmail.com Thu Feb 3 15:35:08 2005 From: darshanpai at gmail.com (Darshan Pai) Date: Thu, 3 Feb 2005 15:35:08 -0500 Subject: [vtkusers] Need Help Message-ID: I have an M RI image which i have read in the vtkImageData object.. Now I want to retrieve the Scalar values of the MRI data SO i did void *output = imageData->GetScalarPointer(0,0,z); then memcpy writeptr, output, x*y I am trying to read the values in writeptr and i get only zeroes and no intensity values I am bugged Help From pier_jan at hotmail.com Thu Feb 3 16:57:12 2005 From: pier_jan at hotmail.com (Pierre-Jean Boulianne) Date: Thu, 03 Feb 2005 16:57:12 -0500 Subject: [vtkusers] Rend image without imageviewer and renderWindowInteractor? Message-ID: An HTML attachment was scrubbed... URL: From dean.inglis at camris.ca Thu Feb 3 21:36:11 2005 From: dean.inglis at camris.ca (dean.inglis at camris.ca) Date: Thu, 3 Feb 2005 21:36:11 -0500 Subject: [vtkusers] Profile an image? Message-ID: <20050204023611.CZQJ1814.tomts9-srv.bellnexxia.net@mxmta.bellnexxia.net> Hi Beau, An example of an image profile is here: Examples/GUI/Tcl/ProbeWithSplineWidget.tcl You could write a simple function/callback to quantize the spline's output vtkPolyData points to match image voxel/cell centers or points... an implementation of this is done in vtkImageTracerWidget's Snap() member function. Dean From vm1757 at yahoo.com Fri Feb 4 00:55:00 2005 From: vm1757 at yahoo.com (Vishal Majithia) Date: Thu, 3 Feb 2005 21:55:00 -0800 (PST) Subject: [vtkusers] New user request Message-ID: <20050204055500.79045.qmail@web50802.mail.yahoo.com> Hi, I've looked on the archives, and though I got some directions, I'm still not able to solve this problem, though it should be simple. I need to generate a 3D cube (surfaces) and save it as a binary file in ITK. The approach I took was to use PolyData, create a cube, and try to write it as a binary file. However, ITK registration algorithms are choking on it. My question is: Is the problem that it's a PolyData, rather than an Image? I used the SetFileTypeToBinary, and it is writing binary to the file. Any suggestions would be greatly appreciated. __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From gatos12 at hotmail.com Fri Feb 4 03:27:37 2005 From: gatos12 at hotmail.com (Gatos Gatos) Date: Fri, 04 Feb 2005 08:27:37 +0000 Subject: [vtkusers] vtk animation and interactor problem!!!! Message-ID: Hello I am a begginer with vtk and I am trying to create an animation using simultaneously the Interactor. The following code (I found it from the vtkuser news group) is very similar what I want to do but the vtkRenderWindowInteractor does not work during the loop. What changes I need to make for making possible (for example rotate with the mouse) the spheres during the animation? thank you very much in advance for your help kostas #include "vtkSphereSource.h" #include "vtkPolyDataMapper.h" #include "vtkRenderWindow.h" #include "vtkCamera.h" #include "vtkActor.h" #include "vtkRenderer.h" #include "vtkStructuredPointsReader.h" #include "vtkGlyph3D.h" #include "vtkRenderWindowInteractor.h" #include "vtkPoints.h" #include "vtkPolyData.h" #include "vtkProperty.h" int main( int argc, char *argv[] ) { vtkPoints *points = vtkPoints::New(); vtkSphereSource *sphere = vtkSphereSource::New(); vtkPolyData *data = vtkPolyData::New(); vtkGlyph3D *verts = vtkGlyph3D::New(); vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New(); vtkActor *sphereActor = vtkActor::New(); vtkRenderer *ren1= vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); const int ni = 20; points->SetNumberOfPoints(ni); for (int i=0; i SetPoint(i, (double)(i%30)*0.1, (double)0, (double)(i/20)); } sphere->SetRadius(0.04 ); sphere->SetPhiResolution( 4 ); sphere->SetThetaResolution( 4 ); data->SetPoints(points); verts->SetSource(sphere->GetOutput()); verts->SetInput(data); verts->ScalingOff(); sphereMapper->SetInput( verts->GetOutput() ); sphereActor->SetMapper( sphereMapper ); sphereActor->GetProperty()->SetOpacity(0.5); sphereActor->RotateY(-45.0); ren1->AddActor( sphereActor ); ren1->SetBackground( 1.0, 1.0, 1.0 ); renWin->AddRenderer( ren1 ); renWin->SetSize( 300, 300 ); double u=0.2; int uu=0; int n=0; while (1) { for (int i=0; i SetPoint(i, (double)(i%20)*0.1, (double)0.2*sin(u*i/10.0*u), (double)(i/20)); } u+=0.01; points->Modified(); renWin->Render(); vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); iren->Initialize(); iren->Start(); } return 0; } From fisseler at rob.uni-luebeck.de Fri Feb 4 03:53:33 2005 From: fisseler at rob.uni-luebeck.de (Jens Fisseler) Date: Fri, 04 Feb 2005 09:53:33 +0100 Subject: [vtkusers] vtk animation and interactor problem!!!! In-Reply-To: References: Message-ID: <1107507213.7296.13.camel@pepe.rob.uni-luebeck.de> Hi Kostas! The first problem with your program is that you create a new vtkRenderWindowInteractor with every iteration of your infinite "while"-loop. Fix this first. Your animation will probably also run as fast as it can, because you don't consider any timing information. One approach I have used recently is creating a timer which calls an "animate"-method every x msecs. For example if you want a framerate of 25 frames per second, this method must be called every 40 msecs. You then update your scene inside this method and render it. This way, the animation continues even while you're interacting with the scene. Creating a timer is quite easy if your use wxWidgets. Just use "wxTimer" and you're done. I think it should also be possible if you use another GUI toolkit, but I have only done it using wxWidgets. I hope this helps, Jens -- > #include "vtkSphereSource.h" > #include "vtkPolyDataMapper.h" > #include "vtkRenderWindow.h" > #include "vtkCamera.h" > #include "vtkActor.h" > #include "vtkRenderer.h" > #include "vtkStructuredPointsReader.h" > #include "vtkGlyph3D.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkPoints.h" > #include "vtkPolyData.h" > #include "vtkProperty.h" > > int main( int argc, char *argv[] ) > { > vtkPoints *points = vtkPoints::New(); > vtkSphereSource *sphere = vtkSphereSource::New(); > vtkPolyData *data = vtkPolyData::New(); > vtkGlyph3D *verts = vtkGlyph3D::New(); > vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New(); > vtkActor *sphereActor = vtkActor::New(); > vtkRenderer *ren1= vtkRenderer::New(); > vtkRenderWindow *renWin = vtkRenderWindow::New(); > > const int ni = 20; > > points->SetNumberOfPoints(ni); > for (int i=0; i points->SetPoint(i, > (double)(i%30)*0.1, > (double)0, > (double)(i/20)); > } > > sphere->SetRadius(0.04 ); > sphere->SetPhiResolution( 4 ); > sphere->SetThetaResolution( 4 ); > > data->SetPoints(points); > > verts->SetSource(sphere->GetOutput()); > verts->SetInput(data); > verts->ScalingOff(); > > sphereMapper->SetInput( verts->GetOutput() ); > > sphereActor->SetMapper( sphereMapper ); > sphereActor->GetProperty()->SetOpacity(0.5); > sphereActor->RotateY(-45.0); > > ren1->AddActor( sphereActor ); > ren1->SetBackground( 1.0, 1.0, 1.0 ); > > renWin->AddRenderer( ren1 ); > renWin->SetSize( 300, 300 ); > > double u=0.2; > int uu=0; > int n=0; > while (1) { > for (int i=0; i points->SetPoint(i, > (double)(i%20)*0.1, > (double)0.2*sin(u*i/10.0*u), > (double)(i/20)); > } > u+=0.01; > points->Modified(); > renWin->Render(); > > vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > iren->Initialize(); > iren->Start(); > } > return 0; > } From agalmat at hotmail.com Fri Feb 4 04:06:24 2005 From: agalmat at hotmail.com (Alejandro Galindo Mateo) Date: Fri, 04 Feb 2005 10:06:24 +0100 Subject: [vtkusers] vtkPointLocator In-Reply-To: <1107507213.7296.13.camel@pepe.rob.uni-luebeck.de> Message-ID: Hello, Thanks for the answer, vtkPointLocator is what I was looking for, but I have a problem. When I used this class with FindPointsWithinRadius I get an error: "vtkPointLocator [0x0249F520] No points to subdivide" Can anybody tell me what I have to do? Thanks for all From mail at oliwe.com Fri Feb 4 05:11:35 2005 From: mail at oliwe.com (Oliver Weinheimer) Date: Fri, 4 Feb 2005 11:11:35 +0100 Subject: [vtkusers] backprojection Message-ID: <000701c50aa1$e8c3b6c0$40655d86@radiologie.klinik.unimainz.de> Hi all, i'm trying to do a backprojection of few 2D images (x-ray projections) from different angles in one volume dataset. Is there anybody out there, who can give me hints? Is there any functionality in vtk i can use for this task? kind regards Oliver Weinheimer ---------------------------- Oliver Weinheimer Klinik fuer Radiologie Universitaet Mainz, Geb. 210 Langenbeckstr. 1 55131 Mainz, Germany phone: 06131-17-3908 email: mail at oliwe.com web: www.oliwe.com From saussus at skynet.be Fri Feb 4 04:50:09 2005 From: saussus at skynet.be (Denis Saussus) Date: Fri, 4 Feb 2005 10:50:09 +0100 Subject: [vtkusers] Re: problem viewing merged PolyData sets using Message-ID: Thanks for the replies Goodwin. You say that vtkGlyph3D needs both geometry and topology to work -- is that really true? How come the code fragment I posted works just fine as long as the input to vtkGlyph3D is the original vtkPolyData object (made manually with just points) and NOT the output of vtkAppendPolyData().GetOutput() ? Anyway, here is the how I created the vtkPolyData objects. import RandomArray points = vtk.vtkPoints() for n in range(1000): x,y,z = [ RandomArray.normal(0, 1) for i in range(3) ] points.InsertPoint(n, x, y, z) a = vtk.vtkPolyData() a.SetPoints(points) ... and so on for b = vtk.vtkPolyData() Let me clarify the problem what is at the heart of the problem (I think ;) This works: ... a = vtk.vtkPolyData() a.GetNumberOfPoints() ... This does not work: Why? ... a = vtk.vtkPolyData() apd = vtk.vtkAppendPolyData() apd.AddInput(a) apd.GetOutput().GetNumberOfPoints() Can you post the code where you've added points to the vtkPolyData objects? "Denis Saussus" wrote in message news:F42290EAAE100A4A99A3A9BE2059504FBDB121 at MAIL.fugro-jason.local... How can I get the following to print the total number of points in the appended set? a = vtk.vtkPolyData() b = vtk.vtkPolyData() apd = vtk.vtkAppendPolyData() apd.AddInput(a) apd.AddInput(b) print apd.GetOutput().GetNumberOfPoints() ==> this prints '0' instead of a+b ? I tried doing apd.Update() before but it didn't help. What am I missing? i Denis, At a guess, I would say your vtkPolyData's have points (geometry) but no vertices (topology). vtkGlyph3D needs both to work, although in theory it should only need the points. Here's a trick to get it to work: ... ... apd = vtk.vtkAppendPolyData() apd.AddInput(somePolyData) apd.AddInput(someMorePolyData) verts = vtk.vtkMaskPoints() verts.SetInput(apd.GetOutput()) verts.GenerateVerticesOn() verts.SetOnRatio(1) aSphere = vtk.vtkSphereSource() aSphere.SetRadius(1.0) spheres = vtk.vtkGlyph3D() spheres.SetInput(verts.GetOutput()) spheres.SetSource(aSphere.GetOutput()) ... ... hth Goodwin "Denis Saussus" wrote in message news:F42290EAAE100A4A99A3A9BE2059504FBDB11C at MAIL.fugro-jason.local... I am plotting a vtkPolyData set containing 3d points so that they display as spheres. I can get this to work very easily. Now I have two vtkPolyData sets, each containing 3d points. I want to plot them using a single mapper/actor. I am doing this simply by using vtkAppendPolyData to merge the two sets into one. My problem is that now nothing shows up. Below is the script I am using. Help greatly aprpeciated... ########################## # Why does this not work? ########################## somePolyData = vtk.vtkPolyData() # assume this contains some valid 3d points apd = vtk.vtkAppendPolyData() apd.AddInput(somePolyData) apd.AddInput(someMorePolyData) aSphere = vtk.vtkSphereSource() aSphere.SetRadius(1.0) spheres = vtk.vtkGlyph3D() spheres.SetInput(apd.GetOutput()) spheres.SetSource(aSphere.GetOutput()) mapSpheres = vtk.vtkPolyDataMapper() mapSpheres.SetInput(spheres.GetOutput()) spheresActor = vtk.vtkActor() spheresActor.SetMapper(mapSpheres) ren = vtk.vtkRenderer() ren.AddActor(spheresActor) renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) iren.Initialize() renWin.Render() iren.Start() -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 4000 bytes Desc: not available URL: From siebert at onco.uni-kiel.de Fri Feb 4 04:56:17 2005 From: siebert at onco.uni-kiel.de (=?iso-8859-1?Q?Frank-Andr=E9_Siebert?=) Date: Fri, 4 Feb 2005 10:56:17 +0100 Subject: AW: [vtkusers] backprojection Message-ID: <3E249C7010D9FA4DBB0C478DD2A2AB45022E29@oncomail.onco.local> Hi Oliver, what kind of backprojection do you need? Do you plan to simulate a CT with radon-transform or just to reconstruct easy objects ? I did a reconstrucution with three radiographs in vtk with tcl/tk. But I programmed everything by hand with vector algebra... Best regards, Frank-Andr? -------------------------------------------------- Frank-Andr? Siebert (PhD) Universit?tsklinikum Schleswig-Holstein Campus Kiel Klinik f?r Strahlentherapie (Radioonkologie) Direktor Prof. Dr. Dr. Kimmig Arnold-Heller-Str. 9 24105 Kiel, Germany -------------------------------------------------- Email: siebert at onco.uni-kiel.de Tel: 0431/597-3022 Fax: 0431/597-3110 -----Urspr?ngliche Nachricht----- Von: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org]Im Auftrag von Oliver Weinheimer Gesendet: Freitag, 4. Februar 2005 11:12 An: vtkusers at vtk.org Betreff: [vtkusers] backprojection Hi all, i'm trying to do a backprojection of few 2D images (x-ray projections) from different angles in one volume dataset. Is there anybody out there, who can give me hints? Is there any functionality in vtk i can use for this task? kind regards Oliver Weinheimer ---------------------------- Oliver Weinheimer Klinik fuer Radiologie Universitaet Mainz, Geb. 210 Langenbeckstr. 1 55131 Mainz, Germany phone: 06131-17-3908 email: mail at oliwe.com web: www.oliwe.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 From goodwin.lawlor at ucd.ie Fri Feb 4 07:05:27 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Fri, 4 Feb 2005 12:05:27 -0000 Subject: [vtkusers] Re: problem viewing merged PolyData sets using References: Message-ID: Hi Denis, I looked up the source to vtkGlyph3D and vtkAppendPolyData... You're right- vtkGlyph3D can use a vtkPolyData with just points set and no topology. The problem you seeing is because vtkAppendPolyData appends cells to its output and so needs topology... here's the code from vtkAppendPolyData if ( numPts < 1 || numCells < 1 ) { //vtkErrorMacro(<<"No data to append!"); return 1; } maybe that error macro should be changed to a debug macro and uncommented? Sorry for the confusion, Goodwin "Denis Saussus" wrote in message news:b004f848d9c67ed63cdbd70ee72f6b37 at skynet.be... Thanks for the replies Goodwin. You say that vtkGlyph3D needs both geometry and topology to work -- is that really true? How come the code fragment I posted works just fine as long as the input to vtkGlyph3D is the original vtkPolyData object (made manually with just points) and NOT the output of vtkAppendPolyData().GetOutput() ? Anyway, here is the how I created the vtkPolyData objects. import RandomArray points = vtk.vtkPoints() for n in range(1000): x,y,z = [ RandomArray.normal(0, 1) for i in range(3) ] points.InsertPoint(n, x, y, z) a = vtk.vtkPolyData() a.SetPoints(points) ... and so on for b = vtk.vtkPolyData() Let me clarify the problem what is at the heart of the problem (I think ;) This works: ... a = vtk.vtkPolyData() a.GetNumberOfPoints() ... This does not work: Why? ... a = vtk.vtkPolyData() apd = vtk.vtkAppendPolyData() apd.AddInput(a) apd.GetOutput().GetNumberOfPoints() Can you post the code where you've added points to the vtkPolyData objects? "Denis Saussus" wrote in message news:F42290EAAE100A4A99A3A9BE2059504FBDB121 at MAIL.fugro-jason.local... How can I get the following to print the total number of points in the appended set? a = vtk.vtkPolyData() b = vtk.vtkPolyData() apd = vtk.vtkAppendPolyData() apd.AddInput(a) apd.AddInput(b) print apd.GetOutput().GetNumberOfPoints() ==> this prints '0' instead of a+b ? I tried doing apd.Update() before but it didn't help. What am I missing? i Denis, At a guess, I would say your vtkPolyData's have points (geometry) but no vertices (topology). vtkGlyph3D needs both to work, although in theory it should only need the points. Here's a trick to get it to work: ... ... apd = vtk.vtkAppendPolyData() apd.AddInput(somePolyData) apd.AddInput(someMorePolyData) verts = vtk.vtkMaskPoints() verts.SetInput(apd.GetOutput()) verts.GenerateVerticesOn() verts.SetOnRatio(1) aSphere = vtk.vtkSphereSource() aSphere.SetRadius(1.0) spheres = vtk.vtkGlyph3D() spheres.SetInput(verts.GetOutput()) spheres.SetSource(aSphere.GetOutput()) ... ... hth Goodwin "Denis Saussus" wrote in message news:F42290EAAE100A4A99A3A9BE2059504FBDB11C at MAIL.fugro-jason.local... I am plotting a vtkPolyData set containing 3d points so that they display as spheres. I can get this to work very easily. Now I have two vtkPolyData sets, each containing 3d points. I want to plot them using a single mapper/actor. I am doing this simply by using vtkAppendPolyData to merge the two sets into one. My problem is that now nothing shows up. Below is the script I am using. Help greatly aprpeciated... ########################## # Why does this not work? ########################## somePolyData = vtk.vtkPolyData() # assume this contains some valid 3d points apd = vtk.vtkAppendPolyData() apd.AddInput(somePolyData) apd.AddInput(someMorePolyData) aSphere = vtk.vtkSphereSource() aSphere.SetRadius(1.0) spheres = vtk.vtkGlyph3D() spheres.SetInput(apd.GetOutput()) spheres.SetSource(aSphere.GetOutput()) mapSpheres = vtk.vtkPolyDataMapper() mapSpheres.SetInput(spheres.GetOutput()) spheresActor = vtk.vtkActor() spheresActor.SetMapper(mapSpheres) ren = vtk.vtkRenderer() ren.AddActor(spheresActor) renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) iren.Initialize() renWin.Render() iren.Start() _______________________________________________ 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 From wesbrooks at gmail.com Fri Feb 4 07:59:08 2005 From: wesbrooks at gmail.com (Wesley Brooks) Date: Fri, 4 Feb 2005 12:59:08 +0000 Subject: [vtkusers] Polydata cell connectivity list Message-ID: Dear Users, I'm presently trying to find out what other cells a cell is linked to by one of its vertexes. And it's driving me slightly mad! for supid in self.nobad: supcell = self.polydata.GetCell(supid) supid1 = supcell.GetPointId(0) supid2 = supcell.GetPointId(1) checklist = [supid1, supid2] for id in checklist: cells = vtk.vtkIdList() self.polydata.GetCellPoints(id, cells) numofid = cells.GetNumberOfIds() for cell in range(numofid): idcell = cells.GetId(cell) if idcell != supid: if idcell in self.lowbad: if id not in self.supportlist: print "S5" self.supportlist.append(id) Here's the section that is giving me the problem. In my program when run there are 1900 cells in the list self.nobad which it has to check. If the cell is connected to another cell in the lowbad list the shared vertexes id is stored in the list self.supportlist only if it is not already contained within this list. Run as above it runs until cell 656 out of 1900 and closes python with an error window without giving any error messages in the Python Shell just "pythonw.exe has encountered a problem and needs to close. We are sorry for the incovenience." I've tried adding combinations of self.polydata.Update(), self.polydata.BuildCells(), and self.polydata.BuildLinks() to no success. The last, BuildLinks() would only run if there were a 0 value inside the brackets, this tip was found from a previous post. I've also discovered through various print statements (since removed as after two days of bug hunting the language can get 'colourful'!) that the loop is crashing on the self.polydata.GetCellPoints(id, cells) statement on the 656th pass and does not seem to be finding any cells with more or less than 2 cells sharing a vertex when I expect most vertexes to be shared by up to ten cells. Any alternative, perhaps quicker approaches or feed back on the above code would also be greatly appreciated; I'm a beginner to programming and having to deal with datasets which have included up to 310000 cells. Many thanks for your time. Yours Faithfully, Wesley Brooks From s.yang at dkfz-heidelberg.de Fri Feb 4 08:02:19 2005 From: s.yang at dkfz-heidelberg.de (Siwei Yang) Date: Fri, 04 Feb 2005 14:02:19 +0100 Subject: [vtkusers] read a tiff file wich 3D data Message-ID: <4203725B.1040602@dkfz.de> Hello , every one, I want to read one single tiff file with 3D -RGB data using vtkTIFFReader, but it didn't work , the reader seems to only load 2D data. Can any one tell me , how should I do ? Or , which parameters should I add ? thanks best wishes From s.yang at dkfz-heidelberg.de Fri Feb 4 08:40:09 2005 From: s.yang at dkfz-heidelberg.de (Siwei Yang) Date: Fri, 04 Feb 2005 14:40:09 +0100 Subject: [vtkusers] read a tiff file wich 3D data Message-ID: <42037B39.3020408@dkfz.de> Hello , every one, I want to read one single tiff file with 3D -RGB data using vtkTIFFReader, but it didn't work , the reader seems to only load 2D data. Can any one tell me , how should I do ? Or , which parameters should I add ? thanks best wishes From psk1 at student.cs.ucc.ie Fri Feb 4 08:59:29 2005 From: psk1 at student.cs.ucc.ie (psk1) Date: Fri, 4 Feb 2005 13:59:29 +0000 Subject: [vtkusers] What is the best way to achieve video texturing? Message-ID: <4205025C@webmail.ucc.ie> Hi all, I need to display video clips on a surface, what is the best way to achieve this in VTK? Is it possible to use video files (.avi, .qt etc.) as textures, or do I need to display a sequence of images instead? If anyone has experience in this, any tips would be appreciated. From psk1 at student.cs.ucc.ie Fri Feb 4 10:47:33 2005 From: psk1 at student.cs.ucc.ie (psk1) Date: Fri, 4 Feb 2005 15:47:33 +0000 Subject: [vtkusers] What is the best way to achieve video texturing? Message-ID: <42052CE3@webmail.ucc.ie> Hi all, I need to display video clips on a surface, what is the best way to achieve this in VTK? Is it possible to use video files (.avi, .qt etc.) as textures, or do I need to display a sequence of images instead? If anyone has experience in this, any tips would be appreciated. From vm1757 at yahoo.com Fri Feb 4 13:00:10 2005 From: vm1757 at yahoo.com (Vishal Majithia) Date: Fri, 4 Feb 2005 10:00:10 -0800 (PST) Subject: [vtkusers] Simple problem Message-ID: <20050204180011.71170.qmail@web50809.mail.yahoo.com> Hi, I've looked on the archives, and though I got some directions, I'm still not able to solve this problem, though it should be simple. I need to generate a 3D cube (surfaces) and save it as a binary file in ITK. The approach I took was to use PolyData, create a cube, and try to write it as a binary file. However, ITK registration algorithms are choking on it. My question is: Is the problem that it's a PolyData, rather than an Image? I used the SetFileTypeToBinary, and it is writing binary to the file. Is it easier to use vtkCubeSource? Any suggestions would be greatly appreciated. __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From beau.sapach at ualberta.ca Fri Feb 4 13:45:01 2005 From: beau.sapach at ualberta.ca (Beau Sapach) Date: Fri, 4 Feb 2005 11:45:01 -0700 Subject: [vtkusers] vtkprobefilter: probing an image with a line Message-ID: <200502041845.j14Ij26L006178@pilsener.srv.ualberta.ca> Hello everyone, I'm trying to use vtkProbeFilter to probe a vtkImageData but it keeps crashing. Here is a code snippet: vtkProbeFilter * Probe = vtkProbeFilter::New(); vtkLineSource * ProbeLine = vtkLineSource::New(); vtkDataSet * Data; ProbeLine->SetPoint1(5,10,0); ProbeLine->SetPoint2(10,5,0); ProbeLine->SetResolution(11); ProbeLine->Update(); Probe->SetSource(ProbeLine->GetOutput()); Probe->SetInput(DS->GetCurrentImage()); Probe->Update(); Data = Probe->GetOutput(); Is there something obvious that I'm missing? I can verify that my DS->GetCurrentImage() function returns a proper vtkImageData because I use it with vtkImageActor. The program breaks in vtkprobefilter.cxx on line 151: if (output->IsA("vtkImageData")) { vtkImageData *out = (vtkImageData*)output; vtkDataArray *s = outPD->GetScalars(); **out->SetScalarType(s->GetDataType()); out->SetNumberOfScalarComponents(s->GetNumberOfComponents()); } Where s=0x00... outPD looks valid thoug, I don't get it.... ---------------------------------------- Beau Sapach Network Administrator Biomedical Engineering University of Alberta Phone: (780) 492-8098 Fax: (780) 492-8259 Email: beau.sapach at ualberta.ca ---------------------------------------- From amy.henderson at kitware.com Fri Feb 4 14:36:27 2005 From: amy.henderson at kitware.com (Amy Henderson) Date: Fri, 04 Feb 2005 14:36:27 -0500 Subject: [vtkusers] read a tiff file wich 3D data In-Reply-To: <42037B39.3020408@dkfz.de> References: <42037B39.3020408@dkfz.de> Message-ID: <6.2.0.14.2.20050204143531.03fcb4f0@pop.biz.rr.com> Try calling SetFileDimensionality(3), defined in vtkImageReader2 (the superclass of vtkTIFFReader). - Amy At 08:40 AM 2/4/2005, Siwei Yang wrote: >Hello , every one, >I want to read one single tiff file with 3D -RGB data using vtkTIFFReader, >but it didn't work , the reader seems to only load 2D data. >Can any one tell me , how should I do ? Or , which parameters should I add ? > >thanks >best wishes >_______________________________________________ >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 From mathieu.malaterre at kitware.com Fri Feb 4 15:13:41 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Fri, 04 Feb 2005 15:13:41 -0500 Subject: [vtkusers] Re: problem viewing merged PolyData sets using In-Reply-To: References: Message-ID: <4203D775.3080508@kitware.com> Denis, I changed the vtkErrorMacro commented it out with some vtkDebugMacro. To enable them you still need to call DebugOn() on the VTK object you want to debug. But there is no reason to consider an empty input as an error, there are cases where you cannot control your input. HTH Mathieu $ cvs ci -m"ENH: Change the vtkErrorMacro commented out with vtkDebugMacro." /cvsroot/ParaView/ParaView/VTK/Common/vtkMatrix4x4.cxx,v <-- vtkMatrix4x4.cxx new revision: 1.59; previous revision: 1.58 /cvsroot/ParaView/ParaView/VTK/Filtering/vtkGenericEdgeTable.cxx,v <-- vtkGenericEdgeTable.cxx new revision: 1.10; previous revision: 1.9 /cvsroot/ParaView/ParaView/VTK/Graphics/vtkAppendFilter.cxx,v <-- vtkAppendFilter.cxx new revision: 1.73; previous revision: 1.72 /cvsroot/ParaView/ParaView/VTK/Graphics/vtkAppendPolyData.cxx,v <-- vtkAppendPolyData.cxx new revision: 1.96; previous revision: 1.95 /cvsroot/ParaView/ParaView/VTK/Graphics/vtkBoxClipDataSet.cxx,v <-- vtkBoxClipDataSet.cxx new revision: 1.5; previous revision: 1.4 /cvsroot/ParaView/ParaView/VTK/Graphics/vtkClipDataSet.cxx,v <-- vtkClipDataSet.cxx new revision: 1.40; previous revision: 1.39 /cvsroot/ParaView/ParaView/VTK/Graphics/vtkClipPolyData.cxx,v <-- vtkClipPolyData.cxx new revision: 1.56; previous revision: 1.55 /cvsroot/ParaView/ParaView/VTK/Graphics/vtkElevationFilter.cxx,v <-- vtkElevationFilter.cxx new revision: 1.57; previous revision: 1.56 /cvsroot/ParaView/ParaView/VTK/Graphics/vtkFeatureEdges.cxx,v <-- vtkFeatureEdges.cxx new revision: 1.72; previous revision: 1.71 /cvsroot/ParaView/ParaView/VTK/Graphics/vtkQuadricClustering.cxx,v <-- vtkQuadricClustering.cxx new revision: 1.77; previous revision: 1.76 /cvsroot/ParaView/ParaView/VTK/Graphics/vtkSimpleElevationFilter.cxx,v <-- vtkSimpleElevationFilter.cxx new revision: 1.20; previous revision: 1.19 /cvsroot/ParaView/ParaView/VTK/Graphics/vtkSpherePuzzle.cxx,v <-- vtkSpherePuzzle.cxx new revision: 1.19; previous revision: 1.18 /cvsroot/ParaView/ParaView/VTK/Graphics/vtkStructuredGridGeometryFilter.cxx,v <-- vtkStructuredGridGeometryFilter.cxx new revision: 1.64; previous revision: 1.63 /cvsroot/ParaView/ParaView/VTK/IO/vtkDataSetReader.cxx,v <-- vtkDataSetReader.cxx new revision: 1.68; previous revision: 1.67 /cvsroot/ParaView/ParaView/VTK/IO/vtkEnSightGoldBinaryReader.cxx,v <-- vtkEnSightGoldBinaryReader.cxx new revision: 1.59; previous revision: 1.58 /cvsroot/ParaView/ParaView/VTK/Parallel/vtkPDataSetReader.cxx,v <-- vtkPDataSetReader.cxx new revision: 1.36; previous revision: 1.35 /cvsroot/ParaView/ParaView/VTK/Parallel/vtkParallelRenderManager.cxx,v <-- vtkParallelRenderManager.cxx new revision: 1.48; previous revision: 1.47 /cvsroot/ParaView/ParaView/VTK/Parallel/vtkSharedMemoryCommunicator.cxx,v <-- vtkSharedMemoryCommunicator.cxx new revision: 1.21; previous revision: 1.20 Goodwin Lawlor wrote: > Hi Denis, > > I looked up the source to vtkGlyph3D and vtkAppendPolyData... > > You're right- vtkGlyph3D can use a vtkPolyData with just points set and no > topology. > > The problem you seeing is because vtkAppendPolyData appends cells to its > output and so needs topology... > > here's the code from vtkAppendPolyData > > if ( numPts < 1 || numCells < 1 ) > { > //vtkErrorMacro(<<"No data to append!"); > return 1; > } > > maybe that error macro should be changed to a debug macro and uncommented? > > Sorry for the confusion, > > Goodwin > > "Denis Saussus" wrote in message > news:b004f848d9c67ed63cdbd70ee72f6b37 at skynet.be... > Thanks for the replies Goodwin. You say that vtkGlyph3D needs both geometry > and topology to work -- is that really true? How come the code fragment I > posted works just fine as long as the input to vtkGlyph3D is the original > vtkPolyData object (made manually with just points) and NOT the output of > vtkAppendPolyData().GetOutput() ? > > Anyway, here is the how I created the vtkPolyData objects. > > import RandomArray > > points = vtk.vtkPoints() > for n in range(1000): > x,y,z = [ RandomArray.normal(0, 1) for i in range(3) ] > points.InsertPoint(n, x, y, z) > a = vtk.vtkPolyData() > a.SetPoints(points) > > ... and so on for b = vtk.vtkPolyData() > > Let me clarify the problem what is at the heart of the problem (I think ;) > > This works: > ... > a = vtk.vtkPolyData() > a.GetNumberOfPoints() > ... > > This does not work: Why? > ... > a = vtk.vtkPolyData() > apd = vtk.vtkAppendPolyData() > apd.AddInput(a) > apd.GetOutput().GetNumberOfPoints() > > > > Can you post the code where you've added points to the vtkPolyData objects? > > > "Denis Saussus" wrote in message > news:F42290EAAE100A4A99A3A9BE2059504FBDB121 at MAIL.fugro-jason.local... > How can I get the following to print the total > number of points in the appended set? > > a = vtk.vtkPolyData() > b = vtk.vtkPolyData() > > apd = vtk.vtkAppendPolyData() > apd.AddInput(a) > apd.AddInput(b) > > print apd.GetOutput().GetNumberOfPoints() > > ==> this prints '0' instead of a+b ? > > I tried doing apd.Update() before but it didn't help. > > What am I missing? > > > i Denis, > > At a guess, I would say your vtkPolyData's have points (geometry) but no > vertices (topology). vtkGlyph3D needs both to work, although in theory it > should only need the points. > > Here's a trick to get it to work: > > ... > ... > apd = vtk.vtkAppendPolyData() > apd.AddInput(somePolyData) > apd.AddInput(someMorePolyData) > > verts = vtk.vtkMaskPoints() > verts.SetInput(apd.GetOutput()) > verts.GenerateVerticesOn() > verts.SetOnRatio(1) > > aSphere = vtk.vtkSphereSource() > aSphere.SetRadius(1.0) > > spheres = vtk.vtkGlyph3D() > spheres.SetInput(verts.GetOutput()) > spheres.SetSource(aSphere.GetOutput()) > > ... > ... > > > hth > > Goodwin > "Denis Saussus" wrote in message > news:F42290EAAE100A4A99A3A9BE2059504FBDB11C at MAIL.fugro-jason.local... > I am plotting a vtkPolyData set containing 3d points so that > they display as spheres. I can get this to work very easily. > > Now I have two vtkPolyData sets, each containing 3d points. > I want to plot them using a single mapper/actor. I am doing this > simply by using vtkAppendPolyData to merge the two sets into > one. My problem is that now nothing shows up. > > Below is the script I am using. Help greatly aprpeciated... > > > > > ########################## > # Why does this not work? > ########################## > > somePolyData = vtk.vtkPolyData() > # assume this contains some valid 3d points > > apd = vtk.vtkAppendPolyData() > apd.AddInput(somePolyData) > apd.AddInput(someMorePolyData) > > aSphere = vtk.vtkSphereSource() > aSphere.SetRadius(1.0) > > spheres = vtk.vtkGlyph3D() > spheres.SetInput(apd.GetOutput()) > spheres.SetSource(aSphere.GetOutput()) > > mapSpheres = vtk.vtkPolyDataMapper() > mapSpheres.SetInput(spheres.GetOutput()) > > spheresActor = vtk.vtkActor() > spheresActor.SetMapper(mapSpheres) > > ren = vtk.vtkRenderer() > ren.AddActor(spheresActor) > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(ren) > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > iren.Initialize() > renWin.Render() > iren.Start() > > > > _______________________________________________ > 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 > From toreaur at stud.ntnu.no Fri Feb 4 22:48:46 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Fri, 04 Feb 2005 22:48:46 -0500 Subject: [vtkusers] How do I plot xyz positional data? Message-ID: <1107575326.13412.5.camel@localhost.localdomain> I want to plot (x,y,z) positional data as small spheres to represent points in 3d space. How? (yes, i have tried) Tore Aurstad From toreaur at stud.ntnu.no Fri Feb 4 18:33:04 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Sat, 5 Feb 2005 00:33:04 +0100 Subject: [vtkusers] Most elegant way to plot xyz points? Message-ID: <1107559984.42040630574d4@webmail.ntnu.no> Is there anything more elegant than just traversing a vtkFloatArray to read xyz positional data, and for each xyz value then plot a sphere (vtkspheresource) at a location? Isn't this some sentral issue- read some xyz vals, and plot points (that is small spheres) in 3d space? If not, vtk should have some support for it. Tore Aurstad From darshanpai at gmail.com Sat Feb 5 01:26:11 2005 From: darshanpai at gmail.com (Darshan Pai) Date: Sat, 5 Feb 2005 01:26:11 -0500 Subject: [vtkusers] Re: Need Help In-Reply-To: References: Message-ID: THe answer was GetTuple1 On Thu, 3 Feb 2005 15:35:08 -0500, Darshan Pai wrote: > I have an M RI image which i have read in the vtkImageData object.. > > Now I want to retrieve the Scalar values of the MRI data > > SO i did > > void *output = imageData->GetScalarPointer(0,0,z); > > then memcpy writeptr, output, x*y > > I am trying to read the values in writeptr and i get only zeroes and > no intensity values > > I am bugged > > Help > From malcolm at geovision.co.za Sat Feb 5 04:10:01 2005 From: malcolm at geovision.co.za (Malcolm Drummond) Date: Sat, 5 Feb 2005 11:10:01 +0200 Subject: [vtkusers] Most elegant way to plot xyz points? References: <1107559984.42040630574d4@webmail.ntnu.no> Message-ID: <000301c50b62$e5956180$0100a8c0@BART> And indeed they do. There's vtkGlyph3D and variants of programmable filters (e.g. vtkProgrammableGlyphFilter) to do just that. HTH Malcolm ----- Original Message ----- From: "Tore Aurstad" To: Sent: Saturday, February 05, 2005 1:33 AM Subject: [vtkusers] Most elegant way to plot xyz points? > > > Is there anything more elegant than just traversing a vtkFloatArray > to read xyz positional data, and for each xyz value then > plot a sphere (vtkspheresource) at a location? > > Isn't this some sentral issue- read some xyz vals, and plot > points (that is small spheres) in 3d space? > > If not, vtk should have some support for it. > > Tore Aurstad > _______________________________________________ > 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 > From StephanTheisen at gmx.de Sat Feb 5 04:20:56 2005 From: StephanTheisen at gmx.de (Stephan Theisen) Date: Sat, 05 Feb 2005 10:20:56 +0100 Subject: [vtkusers] build TIFF-images to a volume? Message-ID: <42048FF8.9090605@gmx.de> Hi together! I've a lot of 2D images in the tiff format. These images are from a medical CT Dataset. Now I want to visualizise them in a volume. How can I put the slices together? Can anyboby tell me functons or classes I must for that. Thanks in advance Stephan From toreaur at stud.ntnu.no Sat Feb 5 10:19:46 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Sat, 5 Feb 2005 16:19:46 +0100 Subject: [vtkusers] Quick question about using vtk and qt Message-ID: <1107616786.4204e41255559@webmail.ntnu.no> I have a VTK scene which is very simple, but I need to show it in the GUI Qt. I have heard of both vtkqt and QVTKRenderWindowInteractor. I have installed python, qt and pyqt, vtk and tried out some examples that displays qt widgets. I now want to show the vtk scene inside the qt widget with QVTKRenderWindowInteractor. Can somebody provide me with a (smallest) example of how to display a vtk render window inside QT? I guess others also wonder about this important issue. Thanks in advance - Tore Aurstad From prabhu_r at users.sf.net Sat Feb 5 11:41:50 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Sat, 5 Feb 2005 22:11:50 +0530 Subject: [vtkusers] Quick question about using vtk and qt In-Reply-To: <1107616786.4204e41255559@webmail.ntnu.no> References: <1107616786.4204e41255559@webmail.ntnu.no> Message-ID: <16900.63310.401064.546433@monster.linux.in> >>>>> "TA" == Tore Aurstad writes: TA> Can somebody provide me with a (smallest) example of how to TA> display a vtk render window inside QT? Just run Wrapping/Python/vtk/qt/QVTKRenderWindowInteractor.py If it does not run (and gives you errors) get the file from CVS and try that. There were a few bugs fixed in the version in CVS. cheers, prabhu From toreaur at stud.ntnu.no Sun Feb 6 01:55:19 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Sun, 06 Feb 2005 01:55:19 -0500 Subject: [vtkusers] How to use QVTKRenderWindowInteractor Message-ID: <1107672919.5164.1.camel@localhost.localdomain> Hi, I updated my QVTKRenderWindowInteractor.py file and runned it. After updating from the URL it now works: (Gerard Vermeulen) I got up a cone object to interact with. Is there some more documentation on the usage of this python file? I want to use it inside PyQt to combine qt widgets and show a VTK scene. Thanks in advance, Tore Aurstad From suz at mito.ssd.ssg.fujitsu.com Sat Feb 5 21:54:59 2005 From: suz at mito.ssd.ssg.fujitsu.com (Koichiro Suzuki) Date: Sun, 06 Feb 2005 11:54:59 +0900 Subject: [vtkusers] How to save updated images etc. Message-ID: <20050206115437.5157.SUZ@mito.ssd.ssg.fujitsu.com> Hello all. Are there good ideas? 1. How to save a updated image I would like to save a new image after updating the camera position, cutting pl ane and so on. But I can't save the updated image after changing these value. The following code changes azimuth and saves images. But "camara.1.jpg" is just same as "camera.0.jpg". My coding is wrong..? --------------------------------------------------------------- package require vtk package require vtkinteraction package require vtktesting vtkPLOT3DReader pl3d pl3d SetXYZFileName "$VTK_DATA_ROOT/Data/combxyz.bin" pl3d SetQFileName "$VTK_DATA_ROOT/Data/combq.bin" pl3d SetScalarFunctionNumber 100 pl3d SetVectorFunctionNumber 202 pl3d Update vtkStructuredGridGeometryFilter plane plane SetInput [pl3d GetOutput] plane SetExtent 1 60 1 60 7 7 vtkLookupTable lut vtkPolyDataMapper planeMapper planeMapper SetLookupTable lut planeMapper SetInput [plane GetOutput] eval planeMapper SetScalarRange [[pl3d GetOutput] GetScalarRange] vtkActor planeActor planeActor SetMapper planeMapper vtkStructuredGridOutlineFilter outline outline SetInput [pl3d GetOutput] vtkPolyDataMapper outlineMapper outlineMapper SetInput [outline GetOutput] vtkActor outlineActor outlineActor SetMapper outlineMapper lut SetNumberOfColors 256 lut Build for {set i 0} {$i<16} {incr i 1} { eval lut SetTableValue [expr $i*16] $red 1 eval lut SetTableValue [expr $i*16+1] $green 1 eval lut SetTableValue [expr $i*16+2] $blue 1 eval lut SetTableValue [expr $i*16+3] $black 1 } vtkRenderer ren1 vtkRenderWindow renWin renWin AddRenderer ren1 ren1 AddActor outlineActor ren1 AddActor planeActor ren1 SetBackground 0.1 0.2 0.4 ren1 TwoSidedLightingOff renWin SetSize 250 250 set cam1 [ren1 GetActiveCamera] renWin Render # write a initial image vtkWindowToImageFilter w2i w2i SetInput renWin vtkJPEGWriter writer writer SetInput [w2i GetOutput] writer SetFileName "camara.0.jpg" writer Write # changing Azimuth $cam1 Azimuth 30 renWin Render # write a updated image , but the written image is not updated w2i Update writer SetFileName "camara.1.jpg" writer Write exit --------------------------------------------------------------- 2. How to get the grid mesh size The above code uses a vtkPLOT3DReader class. Can we get the grid mesh size ? We could "SetExtent 1 60 1 60 7 7" ,if we knew sizes previosly. But I would like to get sizes dinamically. Best regards. Koichiro Suzuki suz at mito.ssd.ssg.fujitsu.com From toreaur at stud.ntnu.no Sat Feb 5 22:16:02 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Sun, 6 Feb 2005 04:16:02 +0100 (MET) Subject: [vtkusers] Resolved how to use vtk and qt QVTKRenderWindowInteractor (fwd) Message-ID: ---------- Forwarded message ---------- Date: Sun, 6 Feb 2005 04:13:50 +0100 (MET) From: Tore Aurstad To: vtkusers at vtk.org Subject: Resolved how to use vtk and qt QVTKRenderWindowInteractor Basically, from vtk.qt.QVTKRenderWidget import * from vtk.qt.QVTKRenderWindowInteractor import * import os,math,vtk,vtkpython,qt #add more imports if neccessary (should suffice) Then take a look into the QVTKRenderWindowInteractor.py file and read the last lines which gives a function that can be called: QVTKRenderWidgetConeExample() If other VTK files than the standard cone is needed to be viewed in the PyQT/VTK application, study the function (def) QVTKRenderWidgetConeExample(), and make lines like: widget = QVTKRenderWindowInteractor() widget.Start() and so on.. (read the QVTKRenderWindowInteractor.py file!) I got some questions still- I do not want a separate window for the QVTKRenderWindowInteractor This is more like a Qt question, but.. : How do I make the QVTKRenderWindowInteractor window "inline", that is the PyQT/VTK application has got one window with a render window inside the containing Qt window (all in all window, with added buttons) And could I get one example how to link button events to the QVTKRenderWindowInteractor window, say let one button be a + sign and when that QPushbutton is clicked, the VTK scene zooms in.. I guess if there is no such support, the user must interact directly with the QVTKRenderWindowInteractor scene, but I have to run and stop animations and want to provide the user with some linkage between Qt and VTK. (This is a bit of Qt question, but the connection between porting VTK into Qt applications is I hope interesting for you vtkusers out there..) Tore Aurstad From toreaur at stud.ntnu.no Sat Feb 5 22:27:32 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Sun, 6 Feb 2005 04:27:32 +0100 (MET) Subject: [vtkusers] Question about including vtk files Message-ID: I want to provide some structure when using QVTKRenderWindowInteractor.. Say I have got different files for displaying VTK scenes written in Python Is there some "include" method to read a .py file defining a vtk scene to eg. update the QVTKRenderWindowInteractor of mine to show a new VTK scene? I guess I must somehow have some switching mechanism for changing VTK scenes from my PyQt/VTK applications, that is reload new VTK scenes somehow. I know I can perhaps use the vtkRenderer's update method. I also need to do some animation with my vtk files, I have managed to plot xyz positions as spheres in 3d space now with dynamically naming vtkActors and vtkSpheresources, and I got two positions for all points saved in a simple list (python list) and must animate linear interpolation against the two positions with e.g. 24 frames like: pos2 = (1-alpha)*pos1 + alpha*pos2, alpha:[0,1] Thanks for tips in all these different challenges of VTK: Current questions: How to make a PyQt/VTK QVTKRenderWindowInteractor "inline" in the application (do not show a new window). How to animate simple linear interpolation? (updates on the renderer?) How to time manage the different frame updates? (set desired framerate?) (1/24 second per frame i guess) How to include VTK scenes, that is load in new scenes (completely) into QVTKRenderWindowInteractor? And a Qt question - How to bind events like clicking a QPushButton to infer events inside the QVTKRenderWindowInteractor (So to support a GUI not only through the QVTKRenderWindowInteractor itself but a more friendly visual GUI in Qt (but this is Qt based quiz..)) Thanks for the help, I bet that VTK will get really popular once people can easily use e.g. Qt with it. (I suggest also users out there to try out "vtkdesigner", I couldn't get it compiled yet, but I hope to manage it soon as it looks really user friendly. If installation tips for vtkdesigner is known please share! I could not link -lhybrid btw) Tore Aurstad From suz at mito.ssd.ssg.fujitsu.com Sun Feb 6 09:19:49 2005 From: suz at mito.ssd.ssg.fujitsu.com (Koichiro Suzuki) Date: Sun, 06 Feb 2005 23:19:49 +0900 Subject: [vtkusers] How to save a updated image etc.. Message-ID: <20050206231819.EB5F.SUZ@mito.ssd.ssg.fujitsu.com> Hello all. Are there good ideas? 1. How to save a updated image I would like to save a new image after updating the camera position, cutting pl ane and so on. But I can't save the updated image after changing these value. The following code changes azimuth and saves images. But "camara.1.jpg" is just same as "camera.0.jpg". My coding is wrong..? --------------------------------------------------------------- package require vtk package require vtkinteraction package require vtktesting vtkPLOT3DReader pl3d pl3d SetXYZFileName "$VTK_DATA_ROOT/Data/combxyz.bin" pl3d SetQFileName "$VTK_DATA_ROOT/Data/combq.bin" pl3d SetScalarFunctionNumber 100 pl3d SetVectorFunctionNumber 202 pl3d Update vtkStructuredGridGeometryFilter plane plane SetInput [pl3d GetOutput] plane SetExtent 1 60 1 60 7 7 vtkLookupTable lut vtkPolyDataMapper planeMapper planeMapper SetLookupTable lut planeMapper SetInput [plane GetOutput] eval planeMapper SetScalarRange [[pl3d GetOutput] GetScalarRange] vtkActor planeActor planeActor SetMapper planeMapper vtkStructuredGridOutlineFilter outline outline SetInput [pl3d GetOutput] vtkPolyDataMapper outlineMapper outlineMapper SetInput [outline GetOutput] vtkActor outlineActor outlineActor SetMapper outlineMapper lut SetNumberOfColors 256 lut Build for {set i 0} {$i<16} {incr i 1} { eval lut SetTableValue [expr $i*16] $red 1 eval lut SetTableValue [expr $i*16+1] $green 1 eval lut SetTableValue [expr $i*16+2] $blue 1 eval lut SetTableValue [expr $i*16+3] $black 1 } vtkRenderer ren1 vtkRenderWindow renWin renWin AddRenderer ren1 ren1 AddActor outlineActor ren1 AddActor planeActor ren1 SetBackground 0.1 0.2 0.4 ren1 TwoSidedLightingOff renWin SetSize 250 250 set cam1 [ren1 GetActiveCamera] renWin Render # write a initial image vtkWindowToImageFilter w2i w2i SetInput renWin vtkJPEGWriter writer writer SetInput [w2i GetOutput] writer SetFileName "camara.0.jpg" writer Write # changing Azimuth $cam1 Azimuth 30 renWin Render # write a updated image , but the written image is not updated w2i Update writer SetFileName "camara.1.jpg" writer Write exit --------------------------------------------------------------- 2. How to get the grid mesh size The above code uses a vtkPLOT3DReader class. Can we get the grid mesh size ? We could "SetExtent 1 60 1 60 7 7" ,if we knew sizes previosly. But I would like to get sizes dinamically. Best regards. Koichiro Suzuki suz at mito.ssd.ssg.fujitsu.com From HChen at uwyo.edu Sun Feb 6 15:09:32 2005 From: HChen at uwyo.edu (Hong-Sen Chen) Date: Sun, 6 Feb 2005 13:09:32 -0700 Subject: [vtkusers] help on vtkDelaunay2D Message-ID: <5C79F2AC5661A34ABD643470C457743001393EE7@POSTOFFICE.uwyo.edu> Can some one give me a C++ example code showing how to generate a 2D grid (starting from a few input points) and then how to extract information about triangles, edges that have been generated and finally visualize the grid. Thank you very much, H Chen -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Pont at ForestResearch.co.nz Sun Feb 6 16:15:33 2005 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Mon, 7 Feb 2005 10:15:33 +1300 Subject: [vtkusers] Polydata cell connectivity list In-Reply-To: Message-ID: Hi Wesley, here are some fragments from C++ code that traverses cells connected to a point of given id (pid): int pid, nCells, cellNum, cid; vtkIdList *cells = vtkIdList::New(); vtkCell *cell; // get cells the point belongs to this->input->GetPointCells( pid, cells ); // for each cell nCells = cells->GetNumberOfIds(); for( cellNum=0; cellNumGetId( cellNum ); // get cell id from the list cell = this->input->GetCell( cid ); // get the actual cell // now do something with the cell... // for example get its points.... vtkPoints *pts = cell->GetPoints(); // now get points for this cell ... } See a couple of comments below, hope that helps, Dave P vtkusers-bounces at vtk.org wrote on 05/02/2005 01:59:08: > Dear Users, > > I'm presently trying to find out what other cells a cell is linked to > by one of its vertexes. And it's driving me slightly mad! > > for supid in self.nobad: > > supcell = self.polydata.GetCell(supid) > supid1 = supcell.GetPointId(0) > supid2 = supcell.GetPointId(1) > checklist = [supid1, supid2] the above assumes cells have just 2 points, I guess that is correct? > > for id in checklist: checklist is a list of (two) point ids > cells = vtk.vtkIdList() > self.polydata.GetCellPoints(id, cells) GetCellPoints expects a cell id, you are passing a point id ! > > numofid = cells.GetNumberOfIds() > > for cell in range(numofid): > idcell = cells.GetId(cell) > > if idcell != supid: > if idcell in self.lowbad: > if id not in self.supportlist: > print "S5" > self.supportlist.append(id) > > Here's the section that is giving me the problem. In my program when > run there are 1900 cells in the list self.nobad which it has to check. > If the cell is connected to another cell in the lowbad list the shared > vertexes id is stored in the list self.supportlist only if it is not > already contained within this list. > > Run as above it runs until cell 656 out of 1900 and closes python with > an error window without giving any error messages in the Python Shell > just "pythonw.exe has encountered a problem and needs to close. We are > sorry for the incovenience." > > I've tried adding combinations of self.polydata.Update(), > self.polydata.BuildCells(), and self.polydata.BuildLinks() to no > success. The last, BuildLinks() would only run if there were a 0 value > inside the brackets, this tip was found from a previous post. I've > also discovered through various print statements (since removed as > after two days of bug hunting the language can get 'colourful'!) that > the loop is crashing on the self.polydata.GetCellPoints(id, cells) > statement on the 656th pass and does not seem to be finding any cells > with more or less than 2 cells sharing a vertex when I expect most > vertexes to be shared by up to ten cells. > > Any alternative, perhaps quicker approaches or feed back on the above > code would also be greatly appreciated; I'm a beginner to programming > and having to deal with datasets which have included up to 310000 > cells. > > Many thanks for your time. > > Yours Faithfully, > > Wesley Brooks > _______________________________________________ > 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 From rendezvous at dreamxplosion.com Sun Feb 6 23:54:46 2005 From: rendezvous at dreamxplosion.com (Marius S Giurgi) Date: Sun, 6 Feb 2005 23:54:46 -0500 Subject: [vtkusers] compiling the vtkFLTK examples Message-ID: <3f10f009f487e46890627c1e07629a01@dreamxplosion.com> Hi, Sean Sorry to bother you again, but I feel a bit frustrated that I cannot start using your vtkfltk in my vkt projects. As I mentioned last time vktfltk errors when installing the included examples, so in the end I decided to install the vtkfltk package without the examples. I was thinking that later on I could just go to the example directory and run cmake and make to compile the individual examples; apparently I was wrong; it seems that I need a much better understanding of how cmake works (obviously I'm new to CMake). Indeed the code for simple and simple2 is very easy, but it's cmake files I'm having trouble with. I was wondering if you could give me an example of a simple CMakeList.txt that would work fine with a general project that uses your vtkFLTK. Say the project consists of just one .cxx file and it's located in some directory and I want the executable to be build in the same directory. (Charl's Cone3 example seems to have a pretty simple CMakeList.txt file that also compiles fine) Btw, when I try to compile your Simple example (cmake .) I get the following errors. Any idea what am I doing wrong here? Sakura:/Developer/vtkFLTK-0.6.1/Examples/Simple dolphin$ cmake . -- Check for working C compiler: gcc -- Check for working C compiler: gcc -- works -- Check for working CXX compiler: c++ -- Check for working CXX compiler: c++ -- works -- Configuring done -- Generating done -- Build files have been written to: /Developer/vtkFLTK-0.6.1/Examples/Simple Sakura:/Developer/vtkFLTK-0.6.1/Examples/Simple dolphin$ make Building dependencies. cmake.depends... Building object file Simple.o... /Developer/vtkFLTK-0.6.1/Examples/Simple/Simple.cxx: In function `int main(int, char**)': /Developer/vtkFLTK-0.6.1/Examples/Simple/Simple.cxx:56: warning: `AddProp' is deprecated (declared at /usr/local/include/vtk/vtkViewport.h:53) Building executable /Developer/vtkFLTK-0.6.1/Examples/Simple/Simple... ld: Simple.o illegal reference to symbol: vtkViewport::AddProp(vtkProp*) defined in indirectly referenced dynamic library /Developer/VTK/build/bin/libvtkFiltering.dylib ld: Simple.o illegal reference to symbol: vtkConeSource::New() defined in indirectly referenced dynamic library /Developer/VTK/build/bin/libvtkGraphics.dylib ld: Simple.o illegal reference to symbol: vtkDebugLeaksManager::~vtkDebugLeaksManager [in-charge]() defined in indirectly referenced dynamic library /Developer/VTK/build/bin/libvtkCommon.dylib make[1]: *** [/Developer/vtkFLTK-0.6.1/Examples/Simple/Simple] Error 1 make: *** [default_target] Error 2 "Karate is a form of martial arts in which people who have had years and years of training can, using only their hands and feet, make some of the worst movies in the history of the world." -- Dave Barry From suz at mito.ssd.ssg.fujitsu.com Mon Feb 7 04:18:10 2005 From: suz at mito.ssd.ssg.fujitsu.com (Koichiro Suzuki) Date: Mon, 07 Feb 2005 18:18:10 +0900 Subject: [vtkusers] How to save a updated image etc.. In-Reply-To: <20050206231819.EB5F.SUZ@mito.ssd.ssg.fujitsu.com> References: <20050206231819.EB5F.SUZ@mito.ssd.ssg.fujitsu.com> Message-ID: <20050207181306.38EB.SUZ@mito.ssd.ssg.fujitsu.com> I found the answer. > 1. How to save a updated image > I would like to save a new image after updating the camera position, cutting pl > ane > and so on. But I can't save the updated image after changing these value. > The following code changes azimuth and saves images. But "camara.1.jpg" > is just same as "camera.0.jpg". : I should use Modified instead of Update before Write... : writer SetFileName "camara.1.jpg" w2i Modified writer Write Thanks, all. But about the following question , I am looking for the answer.. > 2. How to get the grid mesh size > The above code uses a vtkPLOT3DReader class. > Can we get the grid mesh size ? > We could "SetExtent 1 60 1 60 7 7" ,if we knew sizes previosly. > But I would like to get sizes dinamically. From I.deBoer at polytec.de Mon Feb 7 06:46:17 2005 From: I.deBoer at polytec.de (de Boer Ingo) Date: Mon, 7 Feb 2005 12:46:17 +0100 Subject: [vtkusers] vtkLabeledDataMapper bug ? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD9014502DF@02polywbr.waldbronn.polytec.de> Hi, I am using the vtkLabeledDataMapper (VTK 4.2 release) The problem is that a label is not hidden, if the label is behind an object. Is this a bug or a feature ? greets Ingo --- Dr.-Ing. Ingo H. de Boer Polytec GmbH Polytec-Platz 1-7, 76337 Waldbronn, Germany phone: ++49 7243 604 106 fax : ++49 7243 604 255 From malcolm at geovision.co.za Mon Feb 7 07:00:31 2005 From: malcolm at geovision.co.za (Malcolm Drummond) Date: Mon, 7 Feb 2005 14:00:31 +0200 Subject: [vtkusers] vtkLabeledDataMapper bug ? References: <1484AEC8AB498A4EB64D4A8137D23FD9014502DF@02polywbr.waldbronn.polytec.de> Message-ID: <000201c50d0d$0e16ac30$0100a8c0@BART> Hi Ingo I think it's a feature. There's a an example script somewhere that uses a visible points filter (see vtkSelectVisiblePoints) to get the behaviour you want. HTH Malcolm ----- Original Message ----- From: "de Boer Ingo" To: Sent: Monday, February 07, 2005 1:46 PM Subject: [vtkusers] vtkLabeledDataMapper bug ? Hi, I am using the vtkLabeledDataMapper (VTK 4.2 release) The problem is that a label is not hidden, if the label is behind an object. Is this a bug or a feature ? greets Ingo --- Dr.-Ing. Ingo H. de Boer Polytec GmbH Polytec-Platz 1-7, 76337 Waldbronn, Germany phone: ++49 7243 604 106 fax : ++49 7243 604 255 _______________________________________________ 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 From I.deBoer at polytec.de Mon Feb 7 07:10:34 2005 From: I.deBoer at polytec.de (de Boer Ingo) Date: Mon, 7 Feb 2005 13:10:34 +0100 Subject: [vtkusers] vtkLabeledDataMapper bug ? Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD984EF87@02polywbr.waldbronn.polytec.de> Hi Malcom, I saw that sample, but I don't plan on using this filter. Quote from the documenation: "... You must carefully synchronize the execution of this filter. The filter refers to a renderer, which is modified every time a render occurs. Therefore, the filter is always out of date, and always executes...." So, this is not acceptable for a large object. There should be a simpler way, like using the z-buffer to hide the label... greets Ingo --- Dr.-Ing. Ingo H. de Boer Polytec GmbH Polytec-Platz 1-7, 76337 Waldbronn, Germany phone: ++49 7243 604 106 fax : ++49 7243 604 255 > I think it's a feature. There's a an example script somewhere > that uses a > visible points filter (see vtkSelectVisiblePoints) to get the > behaviour you > want. From sundgaard at inropa.com Mon Feb 7 07:49:29 2005 From: sundgaard at inropa.com (Thomas Sundgaard Pedersen) Date: Mon, 7 Feb 2005 13:49:29 +0100 Subject: [vtkusers] Textures on polydata. Message-ID: <000201c50d13$7b9a59e0$6e02a8c0@SUNDGAARD> Hi, I am new to visualization, and was trying to add textures to some stl-files, that I imported. It worked fine with a vtkPlaneSource as input to the vtkPolyDataMapper, but didn't work with vtkSTLReader as input. The actor is showen in the vtk window and represents the stl-file as it should, but if I set the texture, I only get the whole actor colored in the color of the bmp's first pixel, it seems? This code shows how I implemented it: vtkWin32OpenGLRenderWindow *renWin = vtkWin32OpenGLRenderWindow::New(); vtkRenderer *ren = vtkRenderer::New(); vtkSTLReader *STLReader = vtkSTLReader::New(); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); vtkActor *actor = vtkActor::New(); vtkBMPReader* bmpReader = vtkBMPReader::New(); vtkTexture* atext = vtkTexture::New(); renWin->AddRenderer(ren); STLReader->SetFileName("..\\parts\\bumper.stl"); mapper->SetInput(this->m_pSTLReader->GetOutput()); actor->SetMapper(this->m_pMapper); ren->AddActor(actor); bmpReader->SetFileName("..\\res\\rawmetal_160x160.bmp"); // 160 x 160 pixles. atext->SetInput(bmpReader->GetOutput()); atext->InterpolateOn(); actor->SetTexture(atext); //Works fine with vtkPlaneSource, but not with vtkSTLReader? renWin->render(); If I want to use textures on stl-files what do I do, or isn't it possible at all? greets Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From normand at lina.univ-nantes.fr Mon Feb 7 09:29:55 2005 From: normand at lina.univ-nantes.fr (Jean-Marie Normand) Date: Mon, 07 Feb 2005 15:29:55 +0100 Subject: [vtkusers] [Problem] How do I get the Connected Components of a vtkImplicitFunction ? Message-ID: <1107786595.4105.13.camel@pago.irin.sciences.univ-nantes.prive> Hi all, I'd like to extract the components of a vtkImplicitFunction, but I fail to obtain them. I perform some boolean operations on vtkImplicitFunctions which leads to a vtkImplicitBoolean that has multiple parts, and I'd like to extract each one. I didn't find any possibilities but to use a vtkPolyDataconnectivityFilter whichi requires first to "tessellate" my implicit functions. My first question would be : - Is it possible to obtain those components without sampling the function, then apply a contour filter and finally a vtkPolyDataConnectivityFilter ? In fact the method described above succeed on a toy example (a cube cut in two parts), but when I try to use it in my application, the following error is always rised : ERROR: In /home/jim/Download/VTK/VTK/Graphics/vtkPolyDataConnectivityFilter.cxx, line 90 vtkPolyDataConnectivityFilter (0x99ec4b0): No points! and it tells me that there are no connected components which is actually wrong since when I display the implicit function I can see the components. Here is my sample of code, any help would be greatly appreciated since I don't understand what's wrong. // Sampling the implicit function vtkSampleFunction *implicitSampleFunction = vtkSampleFunction::New(); implicitSampleFunction->SetImplicitFunction(impFunc); implicitSampleFunction->SetModelBounds(-1.5*WORLD_SIZE,1.5*WORLD_SIZE,-1.5*WORLD_SIZE,1.5*WORLD_SIZE,-1.5*WORLD_SIZE,1.5*WORLD_SIZE); implicitSampleFunction->SetSampleDimensions(100,100,100); implicitSampleFunction->ComputeNormalsOff(); // Creating a ContourFilter of the above Sample Function vtkContourFilter *implicitContourFilter = vtkContourFilter::New(); implicitContourFilter->SetInput(implicitSampleFunction->GetOutput()); implicitContourFilter->SetValue(0,0.); /* cleaning up the result in a vtkCleanPolyData before applying the vtkPolyDataConnectivityFilter */ vtkCleanPolyData *implicitCleaned = vtkCleanPolyData::New(); implicitCleaned->SetInput( implicitContourFilter->GetOutput() ); implicitCleaned->SetTolerance(0.); // Applying the vtkPolyDataConnectivityFilter vtkPolyDataConnectivityFilter *implicitPDCF = vtkPolyDataConnectivityFilter::New(); implicitPDCF->SetInput(implicitCleaned->GetOutput()); implicitPDCF->ScalarConnectivityOff(); // getting the number of connected components of the implicit function implicitPDCF->SetExtractionModeToAllRegions(); implicitPDCF->Update(); int nb_connected_components = implicitPDCF->GetNumberOfExtractedRegions(); cout<<"Nb connected components : "<SetExtractionModeToSpecifiedRegions(); // extracting all the regions in a loop for(int i=0; iAddSpecifiedRegion(i); implicitPDCF->Update(); // copying it into a vtkPolyData* extractedPolyData = implicitPDCF->GetOutput(); // Converting the vtkPolyData into a vtkImplicitFunction implicitFunc = vtkImplicitDataSet::New(); implicitFunc->SetDataSet(extractedPolyData); // Adding an implicit function to a list impList->addImplicitFunction(implicitFunc); } // Freeing memory implicitCleaned->Delete(); implicitContourFilter->Delete(); implicitSampleFunction->Delete(); extractedPolyData->Delete(); } Thanks in advance -- Jim From randall.hand at gmail.com Mon Feb 7 09:43:40 2005 From: randall.hand at gmail.com (Randall Hand) Date: Mon, 7 Feb 2005 08:43:40 -0600 Subject: [vtkusers] Textures on polydata. In-Reply-To: <000201c50d13$7b9a59e0$6e02a8c0@SUNDGAARD> References: <000201c50d13$7b9a59e0$6e02a8c0@SUNDGAARD> Message-ID: STL's have no stored texture data, so all the texture coordinates are missing. In order to generate texture coordinates, you'll need to use something like vtkTextureMapToPlane . There's also MapToSphere and MapToCylinder which will generate coordinates in a slightly differen fashion. On Mon, 7 Feb 2005 13:49:29 +0100, Thomas Sundgaard Pedersen wrote: > > > > Hi, > > > > I am new to visualization, and was trying to add textures to some stl-files, > that I imported. It worked fine with a vtkPlaneSource as input to the > vtkPolyDataMapper, but didn't work with vtkSTLReader as input. The actor is > showen in the vtk window and represents the stl-file as it should, but if I > set the texture, I only get the whole actor colored in the color of the > bmp's first pixel, it seems? > > This code shows how I implemented it: > > > > vtkWin32OpenGLRenderWindow *renWin = > vtkWin32OpenGLRenderWindow::New(); > > vtkRenderer *ren = vtkRenderer::New(); > > vtkSTLReader *STLReader = vtkSTLReader::New(); > > vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); > > vtkActor *actor = vtkActor::New(); > > vtkBMPReader* bmpReader = vtkBMPReader::New(); > > vtkTexture* atext = vtkTexture::New(); > > > > renWin->AddRenderer(ren); > > > > STLReader->SetFileName("..\\parts\\bumper.stl"); > > mapper->SetInput(this->m_pSTLReader->GetOutput()); > > actor->SetMapper(this->m_pMapper); > > > > ren->AddActor(actor); > > > > bmpReader->SetFileName("..\\res\\rawmetal_160x160.bmp"); // 160 > x 160 pixles. > > atext->SetInput(bmpReader->GetOutput()); > > atext->InterpolateOn(); > > > > actor->SetTexture(atext); //Works fine with vtkPlaneSource, but not with > vtkSTLReader? > > > > renWin->render(); > > > > If I want to use textures on stl-files what do I do, or isn't it possible at > all? > > > > greets > > Thomas > > > > > > > _______________________________________________ > 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 From castelo at qiwi.es.dupont.com Mon Feb 7 10:19:47 2005 From: castelo at qiwi.es.dupont.com (Adalberto Castelo) Date: Mon, 07 Feb 2005 10:19:47 -0500 Subject: [vtkusers] Status of VTK+MinGW cmake error [WAS: compile VTK with msys + mingw] Message-ID: <200502071019.48100.castelo@qiwi.es.dupont.com> I have the same problem as the original poster (find original message quoted at the bottom), except no msys here: I start cmakesetup from a cmd shell with the path fully defined to include the mingw tools. The full error message is: "CMakeError: Error in cmake code at /CMake/vtkLoadCMakeExtensions.cmake:7: LOAD_COMMAND Attempt to load command failed from file : cmVTK_WRAP_TCL2.dll" What is the status on this problem? I'm including my CMakeError.log and CMakeOutput.log below. Pardon me if I missed any responses to the OP. TIA, Adalberto CMake 2.0 patch 5 MinGW 3.1.0-1 mingw32-make 3.80.0-3 ActiveState Tcl Dev Kit 3.1.1 MS Windows 2000 VTK 4.4 (also happens with vtk 4.2) vanilla dell laptop ************* CMakeError.log: Determining if the include file sys/prctl.h exists failed with the following output: "Building object file CheckIncludeFile.o..." gcc.exe -o CheckIncludeFile.o -c C:/VTK/CMakeTmp/CheckIncludeFile.c C:/VTK/CMakeTmp/CheckIncludeFile.c:1:23: sys/prctl.h: No such file or directory make.exe: *** [CheckIncludeFile.o] Error 1 Determining if the include file pthread.h exists failed with the following output: "Building object file CheckIncludeFile.o..." gcc.exe -o CheckIncludeFile.o -c C:/VTK/CMakeTmp/CheckIncludeFile.c C:/VTK/CMakeTmp/CheckIncludeFile.c:1:21: pthread.h: No such file or directory make.exe: *** [CheckIncludeFile.o] Error 1 Determining the endianes of the system passed. The system is little endianTest produced following output: "Building object file TestBigEndian.o..." gcc.exe -o TestBigEndian.o -c C:/PROGRA~1/CMake20/Modules/TestBigEndian.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe TestBigEndian.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe ************************************************************ ************* CMakeOutput.log: The system is: Windows - 5.0 - x86 Determining if the C compiler is GNU succeeded with the following output: # 1 "C:/PROGRA~1/CMake20/Modules/CMakeTestGNU.c" # 1 "" # 1 "" # 1 "C:/PROGRA~1/CMake20/Modules/CMakeTestGNU.c" void THIS_IS_GNU(); void THIS_IS_MINGW(); Determining if the C++ compiler is GNU succeeded with the following output: # 1 "C:/PROGRA~1/CMake20/Modules/CMakeTestGNU.c" # 1 "" # 1 "" # 1 "C:/PROGRA~1/CMake20/Modules/CMakeTestGNU.c" void THIS_IS_GNU(); void THIS_IS_MINGW(); Determining if the C compiler works passed with the following output: "Building object file testCCompiler.o..." gcc.exe -o testCCompiler.o -c C:/VTK/CMakeTmp/testCCompiler.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe testCCompiler.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining if the CXX compiler works passed with the following output: "Building object file testCXXCompiler.o..." c++.exe -o testCXXCompiler.o -c C:/VTK/CMakeTmp/testCXXCompiler.cxx "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." c++.exe -fPIC testCXXCompiler.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining size of int passed with the following output: "Building object file CheckTypeSize.o..." gcc.exe -o CheckTypeSize.o -DCHECK_TYPE_SIZE_TYPE="int" -c C:/PROGRA~1/CMake20/Modules/CheckTypeSize.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe -DCHECK_TYPE_SIZE_TYPE="int" CheckTypeSize.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining size of long passed with the following output: "Building object file CheckTypeSize.o..." gcc.exe -o CheckTypeSize.o -DCHECK_TYPE_SIZE_TYPE="long" -c C:/PROGRA~1/CMake20/Modules/CheckTypeSize.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe -DCHECK_TYPE_SIZE_TYPE="long" CheckTypeSize.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining size of void* passed with the following output: "Building object file CheckTypeSize.o..." gcc.exe -o CheckTypeSize.o -DCHECK_TYPE_SIZE_TYPE="void*" -c C:/PROGRA~1/CMake20/Modules/CheckTypeSize.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe -DCHECK_TYPE_SIZE_TYPE="void*" CheckTypeSize.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining size of char passed with the following output: "Building object file CheckTypeSize.o..." gcc.exe -o CheckTypeSize.o -DCHECK_TYPE_SIZE_TYPE="char" -c C:/PROGRA~1/CMake20/Modules/CheckTypeSize.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe -DCHECK_TYPE_SIZE_TYPE="char" CheckTypeSize.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining size of short passed with the following output: "Building object file CheckTypeSize.o..." gcc.exe -o CheckTypeSize.o -DCHECK_TYPE_SIZE_TYPE="short" -c C:/PROGRA~1/CMake20/Modules/CheckTypeSize.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe -DCHECK_TYPE_SIZE_TYPE="short" CheckTypeSize.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining size of float passed with the following output: "Building object file CheckTypeSize.o..." gcc.exe -o CheckTypeSize.o -DCHECK_TYPE_SIZE_TYPE="float" -c C:/PROGRA~1/CMake20/Modules/CheckTypeSize.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe -DCHECK_TYPE_SIZE_TYPE="float" CheckTypeSize.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining size of double passed with the following output: "Building object file CheckTypeSize.o..." gcc.exe -o CheckTypeSize.o -DCHECK_TYPE_SIZE_TYPE="double" -c C:/PROGRA~1/CMake20/Modules/CheckTypeSize.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe -DCHECK_TYPE_SIZE_TYPE="double" CheckTypeSize.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining if the include file limits.h exists passed with the following output: "Building object file CheckIncludeFile.o..." gcc.exe -o CheckIncludeFile.o -c C:/VTK/CMakeTmp/CheckIncludeFile.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe CheckIncludeFile.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining if the include file unistd.h exists passed with the following output: "Building object file CheckIncludeFile.o..." gcc.exe -o CheckIncludeFile.o -c C:/VTK/CMakeTmp/CheckIncludeFile.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe CheckIncludeFile.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining if the include file iostream exists passed with the following output: "Building object file CheckIncludeFile.o..." c++.exe -o CheckIncludeFile.o -c C:/VTK/CMakeTmp/CheckIncludeFile.cxx "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." c++.exe -fPIC CheckIncludeFile.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining if the CXX compiler has std namespace passed with the following output: "Building object file TestForSTDNamespace.o..." c++.exe -o TestForSTDNamespace.o -c C:/PROGRA~1/CMake20/Modules/TestForSTDNamespace.cxx "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." c++.exe -fPIC TestForSTDNamespace.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining if the CXX compiler understands ansi for scopes passed with the following output: "Building object file TestForAnsiForScope.o..." c++.exe -o TestForAnsiForScope.o -c C:/PROGRA~1/CMake20/Modules/TestForAnsiForScope.cxx "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." c++.exe -fPIC TestForAnsiForScope.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining if the include file sstream exists passed with the following output: "Building object file CheckIncludeFile.o..." c++.exe -o CheckIncludeFile.o -c C:/VTK/CMakeTmp/CheckIncludeFile.cxx "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." c++.exe -fPIC CheckIncludeFile.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe Determining size of long long passed with the following output: "Building object file CheckTypeSize.o..." gcc.exe -o CheckTypeSize.o -DCHECK_TYPE_SIZE_TYPE="long long" -c C:/PROGRA~1/CMake20/Modules/CheckTypeSize.c "Building executable C:/VTK/CMakeTmp/cmTryCompileExec.exe..." gcc.exe -DCHECK_TYPE_SIZE_TYPE="long long" CheckTypeSize.o -o C:/VTK/CMakeTmp/cmTryCompileExec.exe On Friday 21 January 2005 09:02, William A. Hoffman wrote: > Can you send CMakeError.log and CMakeOutput.log? > > At 05:15 AM 1/21/2005, Axel Steuwer wrote: > >Dear All, > > > >I have a problem when trying to compile the VTK (4.4) > >with mingw and msys (latest version). I open > >an msys terminal, start 'cmakesetup' (version 2 patch 5) > >and select the Unix Makefiles build. > >During configuring, I always get an error > >'LOAD_COMMAND Attempt to load command failed from > >file: cmVTK_WRAP_TCL2.dll'. The system I use is a > >dual AMD opteron with XP SP2. > >Any help appreciated. > > > >Axel > > This communication is for use by the intended recipient and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. Unless explicitly and conspicuously designated as "E-Contract Intended", this e-mail does not constitute a contract offer, a contract amendment, or an acceptance of a contract offer. This e-mail does not constitute a consent to the use of sender's contact information for direct marketing purposes or for transfers of data to third parties. Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean http://www.DuPont.com/corp/email_disclaimer.html From gattani at aktina.com Mon Feb 7 10:41:43 2005 From: gattani at aktina.com (Abhishek) Date: Mon, 7 Feb 2005 10:41:43 -0500 Subject: [vtkusers] vtkImageMapper problem Message-ID: <200502070941506.SM02048@AGworkstation> Hello all, I have a problem using vtkImageMapper to display a single image slice from a 3D CT data that I loaded in vtkImageData. First, is vtkImageMapper the correct way to display 2D slices of 3D data? The error occurs in the internal function, *vtkActor::GetBounds()while executing the statement, bounds = this->Mapper->GetBounds(); Since I use the vtkImageMapper as the mapper for my Actor, I assume the problem lies in the way I have initialized vtkImageMapper. Here is the code: renWin->AddRenderer(aRenderer); renWin->SetParentId(this->m_hWnd); iren->SetRenderWindow(renWin); vtkImageMapper *twodview= vtkImageMapper::New(); twodview->SetInput((vtkImageData*)pData); twodview->SetColorWindow(255.0); twodview->SetColorLevel(127.5); vtkActor *skin = vtkActor::New(); skin->SetMapper((vtkMapper*)twodview); vtkCamera *aCamera = vtkCamera::New(); aCamera->SetViewUp (0, 0, -1); aCamera->SetPosition (0, 1, 0); aCamera->SetFocalPoint (0, 0, 0); aCamera->ComputeViewPlaneNormal(); aRenderer->AddActor(skin); aRenderer->SetActiveCamera(aCamera); aRenderer->ResetCamera (); aCamera->Dolly(1.5); aRenderer->SetBackground(1,1,1); renWin->SetSize(640, 480); iren->Start(); renWin->Render(); Could any tell me what am I doing wrong? Thanks in advance. -Best Regards, Abhishek -------------- next part -------------- An HTML attachment was scrubbed... URL: From wesbrooks at gmail.com Mon Feb 7 10:53:25 2005 From: wesbrooks at gmail.com (Wesley Brooks) Date: Mon, 7 Feb 2005 15:53:25 +0000 Subject: [vtkusers] Polydata cell connectivity list In-Reply-To: References: Message-ID: David, Thanks for your help. The program doesn't stall any more it just doesn't find any cells which share points with each other... This is the code as it stands now: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def SupportCheck(self): print self.polydata self.polydata.BuildLinks(0) self.polydata.Update() print self.polydata for cellid in self.nobad: supcell = self.polydata.GetCell(cellid) pntid1 = supcell.GetPointId(0) pntid2 = supcell.GetPointId(1) coord1 = self.polydata.GetPoint(pntid1) coord2 = self.polydata.GetPoint(pntid2) if coord1[2] == coord2[2]: flag1 = self.SelectPoint(coord1[2], pntid1, cellid) flag2 = self.SelectPoint(coord2[2], pntid2, cellid) if coord1[2] > coord2[2]: flag = self.SelectPoint(coord2, pntid2, cellid) if coord1[2] < coord2[2]: flag = self.SelectPoint(coord1, pntid1, cellid) return self.supportlist def SelectPoint(self, z, pntid, cellid): cells = vtk.vtkIdList() ncells = 0 self.polydata.GetPointCells(pntid, cells) numofcells = cells.GetNumberOfIds() for linkedcell in range(numofcells): idcell = cells.GetId(linkedcell) if idcell != self.nobad: chkcell = self.polydata.GetCell(idcell) chkpntid1 = chkcell.GetPointId(0) if chkpntid1 != pntid: flag = self.CheckPnt(chkpntid1, z) elif chkpntid1 == pntid: chkpntid2 = chkcell.GetPointId(1) flag = self.CheckPnt(chkpntid2, z) if flag == 1: if pntid not in self.supportlist: self.supportlist.append(pntid) def CheckPnt(self, pntid, z): flag = 1 chkcoord = self.polydata.GetPoint(pntid) if chkcoord[2] < z: flag = 0 return flag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I think my problem is something to do with the BuildLinks(0) call. Briefly the code is supposed to save the ids of points of cells (each cell is a line) which are in the list self.nobad and are connected to no cells which have a point lower than it's lowest point. However there's not much reason for you to look past the numofcells = line as this is always seems to equal 1 now which it should not. The polydata file is fine, I can view it before this opperation. I've also viewed the polydata before and after the BuildLinks() and seen no difference between them. Thanks again for your help. Wesley. From wesbrooks at gmail.com Mon Feb 7 11:01:15 2005 From: wesbrooks at gmail.com (Wesley Brooks) Date: Mon, 7 Feb 2005 16:01:15 +0000 Subject: [vtkusers] Polydata cell connectivity list In-Reply-To: References: Message-ID: Further to the last email I've attached a word document with the result of both the print polydata statements, the first on the left. The only difference I could find is in bold. -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkPolyData.doc Type: application/msword Size: 34816 bytes Desc: not available URL: From sdrouin at bic.mni.mcgill.ca Mon Feb 7 14:17:22 2005 From: sdrouin at bic.mni.mcgill.ca (Simon Drouin) Date: Mon, 07 Feb 2005 14:17:22 -0500 Subject: [vtkusers] Multiple views of a single 3D scene Message-ID: <4207BEC2.8040605@bic.mni.mcgill.ca> Hi all, I'm trying to render the same 3D scene in 2 different vtk windows with different camera angles and I am wondering what's the prefered way to do that in vtk. It doesn't seem to be possible to use the same vtkRenderer for different windows. Also, how do you deal with vtk3DWidget? Thanks in advance for any advice on this. Simon Drouin. From David.Pont at ForestResearch.co.nz Mon Feb 7 15:51:11 2005 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Tue, 8 Feb 2005 09:51:11 +1300 Subject: [vtkusers] Polydata cell connectivity list In-Reply-To: Message-ID: Wesley Brooks wrote on 08/02/2005 04:53:25: > David, > > Thanks for your help. The program doesn't stall any more it just > doesn't find any cells which share points with each other... > > This is the code as it stands now: > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > def SupportCheck(self): > > print self.polydata > > self.polydata.BuildLinks(0) I am only familiar with BuildLinks(), what does the 0 parameter signify? > > self.polydata.Update() Try calling Update before BuildLinks, this may be the source of the problems, causing BuildLinks to have nothing to 'link' ? > > print self.polydata > > for cellid in self.nobad: > > supcell = self.polydata.GetCell(cellid) > > pntid1 = supcell.GetPointId(0) > pntid2 = supcell.GetPointId(1) > > coord1 = self.polydata.GetPoint(pntid1) > coord2 = self.polydata.GetPoint(pntid2) > > if coord1[2] == coord2[2]: > flag1 = self.SelectPoint(coord1[2], pntid1, cellid) > flag2 = self.SelectPoint(coord2[2], pntid2, cellid) > > if coord1[2] > coord2[2]: > flag = self.SelectPoint(coord2, pntid2, cellid) > > if coord1[2] < coord2[2]: > flag = self.SelectPoint(coord1, pntid1, cellid) > > return self.supportlist > > > def SelectPoint(self, z, pntid, cellid): > > cells = vtk.vtkIdList() > > ncells = 0 > > self.polydata.GetPointCells(pntid, cells) > > numofcells = cells.GetNumberOfIds() > > for linkedcell in range(numofcells): > > idcell = cells.GetId(linkedcell) > > if idcell != self.nobad: > > chkcell = self.polydata.GetCell(idcell) > > chkpntid1 = chkcell.GetPointId(0) > > if chkpntid1 != pntid: > flag = self.CheckPnt(chkpntid1, z) > > elif chkpntid1 == pntid: > chkpntid2 = chkcell.GetPointId(1) > flag = self.CheckPnt(chkpntid2, z) > > if flag == 1: > if pntid not in self.supportlist: > self.supportlist.append(pntid) > > def CheckPnt(self, pntid, z): > > flag = 1 > > chkcoord = self.polydata.GetPoint(pntid) > > if chkcoord[2] < z: > flag = 0 > > return flag > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > I think my problem is something to do with the BuildLinks(0) call. > > Briefly the code is supposed to save the ids of points of cells (each > cell is a line) which are in the list self.nobad and are connected to > no cells which have a point lower than it's lowest point. > > However there's not much reason for you to look past the numofcells = > line as this is always seems to equal 1 now which it should not. The > polydata file is fine, I can view it before this opperation. > > I've also viewed the polydata before and after the BuildLinks() and > seen no difference between them. > > Thanks again for your help. > > Wesley. From toreaur at stud.ntnu.no Mon Feb 7 16:06:36 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Mon, 7 Feb 2005 22:06:36 +0100 Subject: [vtkusers] Simple question of how to integrate VTK scenes into qt Message-ID: <1107810395.4207d85c02d10@webmail.ntnu.no> I got a VTK scene that I want to show in a qt application with the shipped QVTKRenderWindowInteractor.py How do I make the window for the VTK scene dock into the Qt application? (Yes, I have tried and tested for ages, but no luck still..) Thanks Tore Aurstad From David.Pont at ForestResearch.co.nz Mon Feb 7 16:07:55 2005 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Tue, 8 Feb 2005 10:07:55 +1300 Subject: [vtkusers] [Problem] How do I get the Connected Components of a vtkImplicitFunction ? In-Reply-To: <1107786595.4105.13.camel@pago.irin.sciences.univ-nantes.prive> Message-ID: vtkusers-bounces at vtk.org wrote on 08/02/2005 03:29:55: > Hi all, > I'd like to extract the components of a vtkImplicitFunction, but I fail > to obtain them. > I perform some boolean operations on vtkImplicitFunctions which leads to > a vtkImplicitBoolean that has multiple parts, and I'd like to extract > each one. > > I didn't find any possibilities but to use a > vtkPolyDataconnectivityFilter whichi requires first to "tessellate" my > implicit functions. My first question would be : > > - Is it possible to obtain those components without sampling the > function, then apply a contour filter and finally a > vtkPolyDataConnectivityFilter ? > > In fact the method described above succeed on a toy example (a cube cut > in two parts), but when I try to use it in my application, the following > error is always rised : > ERROR: In > /home/jim/Download/VTK/VTK/Graphics/vtkPolyDataConnectivityFilter.cxx, > line 90 > vtkPolyDataConnectivityFilter (0x99ec4b0): No points! > > and it tells me that there are no connected components which is actually > wrong since when I display the implicit function I can see the > components. > Jim, how do you display the implicit function ? do you render the output of the Contour filter and/or CleanPolyData filters ? I just ask because it can be easy to 'miss' implicit functions, ie are you sure the Bounds and SampleDimensions for the SampleFunction are suitable for the surface, especially after it has been 'cut' into pieces. If the bounds are wrong you miss the surface completely, if the sample dimensions are too large the surface can fall between sample positions. Just a few suggestions, I have lost time on these kinds of problems before. Can you check the range of data from the SampleFunction, then contour that range with several contours. This would reveal how the sample space relates to the surface. Dave P > > Here is my sample of code, any help would be greatly appreciated since I > don't understand what's wrong. > > > // Sampling the implicit function > vtkSampleFunction *implicitSampleFunction = vtkSampleFunction::New(); > implicitSampleFunction->SetImplicitFunction(impFunc); > > implicitSampleFunction->SetModelBounds(-1.5*WORLD_SIZE,1. > 5*WORLD_SIZE,-1.5*WORLD_SIZE,1.5*WORLD_SIZE,-1.5*WORLD_SIZE,1.5 *WORLD_SIZE); > implicitSampleFunction->SetSampleDimensions(100,100,100); > implicitSampleFunction->ComputeNormalsOff(); > > // Creating a ContourFilter of the above Sample Function > vtkContourFilter *implicitContourFilter = vtkContourFilter::New(); > implicitContourFilter->SetInput(implicitSampleFunction->GetOutput()); > implicitContourFilter->SetValue(0,0.); > > /* cleaning up the result in a vtkCleanPolyData before applying the > vtkPolyDataConnectivityFilter */ > vtkCleanPolyData *implicitCleaned = vtkCleanPolyData::New(); > implicitCleaned->SetInput( implicitContourFilter->GetOutput() ); > implicitCleaned->SetTolerance(0.); > > // Applying the vtkPolyDataConnectivityFilter > vtkPolyDataConnectivityFilter *implicitPDCF = > vtkPolyDataConnectivityFilter::New(); > implicitPDCF->SetInput(implicitCleaned->GetOutput()); > implicitPDCF->ScalarConnectivityOff(); > // getting the number of connected components of the implicit function > implicitPDCF->SetExtractionModeToAllRegions(); > implicitPDCF->Update(); > int nb_connected_components = > implicitPDCF->GetNumberOfExtractedRegions(); > cout<<"Nb connected components : "< /* returns 0!*/ > > // declaring temporary variables needed in the loop > vtkPolyData *extractedPolyData = vtkPolyData::New(); > vtkImplicitDataSet *implicitFunc; > > // Declaring the vtkImplicitFunctionList > vtkImplicitFunctionList *impList = new vtkImplicitFunctionList(); > > implicitPDCF->SetExtractionModeToSpecifiedRegions(); > // extracting all the regions in a loop > for(int i=0; i { > // retrieving the ith region > implicitPDCF->AddSpecifiedRegion(i); > implicitPDCF->Update(); > // copying it into a vtkPolyData* > extractedPolyData = implicitPDCF->GetOutput(); > > // Converting the vtkPolyData into a vtkImplicitFunction > implicitFunc = vtkImplicitDataSet::New(); > implicitFunc->SetDataSet(extractedPolyData); > > // Adding an implicit function to a list > impList->addImplicitFunction(implicitFunc); > > } > > // Freeing memory > implicitCleaned->Delete(); > implicitContourFilter->Delete(); > implicitSampleFunction->Delete(); > extractedPolyData->Delete(); > } > > > Thanks in advance > > -- > Jim > > _______________________________________________ > 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 From e.mckay at unsw.edu.au Mon Feb 7 16:06:43 2005 From: e.mckay at unsw.edu.au (Erin McKay) Date: Tue, 8 Feb 2005 08:06:43 +1100 Subject: [vtkusers] How can I insert a Tcl binary string into a vtkDataArray? In-Reply-To: <3D4436658C43BD44B579F551E51D41371F4629@STGEML01.lan.sesahs.nsw .gov.au> References: <3D4436658C43BD44B579F551E51D41371F4629@STGEML01.lan.sesahs.nsw. gov.au> Message-ID: <2B6A2371-794C-11D9-BB6E-000A956D7C3E@unsw.edu.au> Actually its not that hard (ahem). SetArray works just fine... I have attached a brief code example for future reference: > I have a big chunk of data (from a database) in a Tcl binary string. > I'd really like to stuff it into a vtkDataArray for analysis. Is there > any fast way to do this? I've tried vtkCharArray::SetArray but it > doesn't like string arguments. SetValue is too slow. I've seen similar > questions asked in the mailing list archives but no definitive answers > as yet. Surely it can't be that hard?? > #------------------------- package require my_stuff package require vtk package require vtkinteraction set wd [$dbImage GetWidth] set ht [$dbImage GetHeight] set buffer [$dbImage CopyData] # buffer is a binary string produced, in this instance, using a SWIG typemap vtkCharArray imageData imageData SetArray $buffer [string bytelength $buffer] 1 vtkImageData myImage myImage SetDimensions $wd $ht 1 myImage SetScalarTypeToFloat [myImage GetPointData] SetScalars imageData vtkImageViewer viewer viewer SetInput myImage viewer SetColorWindow [expr $wd + $ht] viewer SetColorLevel [expr ($wd + $ht / 2)] viewer Render wm withdraw . From tohdj at bii.a-star.edu.sg Mon Feb 7 21:25:30 2005 From: tohdj at bii.a-star.edu.sg (Toh Da Jun) Date: Tue, 08 Feb 2005 10:25:30 +0800 Subject: [vtkusers] Problem with Render() in Java/Linux In-Reply-To: References: Message-ID: <1107829529.8025.5.camel@localhost.localdomain> Hi, I'm using Linux + Java and making use of the vtkPanel and vtkCanvas to develop a program. After I had set up the renderwindow etc etc, and my GUI is up and running, I clicked on a Menu option (public void ViewMedium()) and it adds an actor into the Renderer. When I did a count of the number of visible actors in the Renderer, the number is correct, but I cannot see the new actor in the display. Anybody know what's wrong with this? Thanks tohdj ======================================================================= import java.awt.*; import java.awt.event.*; import javax.swing.*; import vtk.*; public class MCSCanvas extends JPanel { private vtkCanvas renWin; private AxesActor MCSAxesActor; private MediumActor MCSMediumActor; private boolean isDisplayed = false; public MCSCanvas() { setLayout(new BorderLayout()); // Create the buttons. renWin = new vtkCanvas(); add(renWin, BorderLayout.CENTER); AxesActor MCSAxesActor = new AxesActor(renWin.GetRenderer()); renWin.GetRenderer().AddActor(MCSAxesActor); MCSMediumActor = new MediumActor(renWin.GetRenderer()); } public void ViewMedium() { if (isDisplayed == false) { System.out.println(renWin.GetRenderer().VisibleActorCount()); renWin.GetRenderer().AddActor(MCSMediumActor); renWin.Render(); isDisplayed = true; System.out.println("ViewMedium ON"); System.out.println(renWin.GetRenderer().VisibleActorCount()); } else { System.out.println(renWin.GetRenderer().VisibleActorCount()); renWin.GetRenderer().RemoveActor(MCSMediumActor); renWin.Render(); isDisplayed = false; System.out.println("ViewMedium OFF"); System.out.println(renWin.GetRenderer().VisibleActorCount()); } } public void reSize() { renWin.reSize(); } public static void main(String s[]) { MCSCanvas panel = new MCSCanvas(); MCSCanvas panel2 = new MCSCanvas(); JFrame frame = new JFrame("VTK Canvas Test!"); frame.getContentPane().setLayout(new GridLayout(2,1)); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) {System.exit(0);} }); frame.getContentPane().add(panel); frame.getContentPane().add(panel2); frame.pack(); frame.setVisible(true); } } From tohdj at bii.a-star.edu.sg Mon Feb 7 21:25:42 2005 From: tohdj at bii.a-star.edu.sg (Toh Da Jun) Date: Tue, 08 Feb 2005 10:25:42 +0800 Subject: [vtkusers] Problem with Render() in Java/Linux In-Reply-To: References: Message-ID: <1107829542.8025.7.camel@localhost.localdomain> Hi, I'm using Linux + Java and making use of the vtkPanel and vtkCanvas to develop a program. After I had set up the renderwindow etc etc, and my GUI is up and running, I clicked on a Menu option (public void ViewMedium()) and it adds an actor into the Renderer. When I did a count of the number of visible actors in the Renderer, the number is correct, but I cannot see the new actor in the display. Anybody know what's wrong with this? Thanks tohdj ======================================================================= import java.awt.*; import java.awt.event.*; import javax.swing.*; import vtk.*; public class MCSCanvas extends JPanel { private vtkCanvas renWin; private AxesActor MCSAxesActor; private MediumActor MCSMediumActor; private boolean isDisplayed = false; public MCSCanvas() { setLayout(new BorderLayout()); // Create the buttons. renWin = new vtkCanvas(); add(renWin, BorderLayout.CENTER); AxesActor MCSAxesActor = new AxesActor(renWin.GetRenderer()); renWin.GetRenderer().AddActor(MCSAxesActor); MCSMediumActor = new MediumActor(renWin.GetRenderer()); } public void ViewMedium() { if (isDisplayed == false) { System.out.println(renWin.GetRenderer().VisibleActorCount()); renWin.GetRenderer().AddActor(MCSMediumActor); renWin.Render(); isDisplayed = true; System.out.println("ViewMedium ON"); System.out.println(renWin.GetRenderer().VisibleActorCount()); } else { System.out.println(renWin.GetRenderer().VisibleActorCount()); renWin.GetRenderer().RemoveActor(MCSMediumActor); renWin.Render(); isDisplayed = false; System.out.println("ViewMedium OFF"); System.out.println(renWin.GetRenderer().VisibleActorCount()); } } public void reSize() { renWin.reSize(); } public static void main(String s[]) { MCSCanvas panel = new MCSCanvas(); MCSCanvas panel2 = new MCSCanvas(); JFrame frame = new JFrame("VTK Canvas Test!"); frame.getContentPane().setLayout(new GridLayout(2,1)); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) {System.exit(0);} }); frame.getContentPane().add(panel); frame.getContentPane().add(panel2); frame.pack(); frame.setVisible(true); } } From tohdj at bii.a-star.edu.sg Mon Feb 7 23:04:17 2005 From: tohdj at bii.a-star.edu.sg (Toh Da Jun) Date: Tue, 08 Feb 2005 12:04:17 +0800 Subject: [vtkusers] Problem with Render() in Java/Linux In-Reply-To: <1107829542.8025.7.camel@localhost.localdomain> References: <1107829542.8025.7.camel@localhost.localdomain> Message-ID: <1107835457.19696.2.camel@localhost.localdomain> Please ignore my previous post. I've found the bug...and it was in MediumActor. Where the actor was not added to the renderer at all. tohdj On Tue, 2005-02-08 at 10:25, Toh Da Jun wrote: > Hi, > > I'm using Linux + Java and making use of the vtkPanel and vtkCanvas to > develop a program. > > After I had set up the renderwindow etc etc, and my GUI is up and > running, I clicked on a Menu option (public void ViewMedium()) and it > adds an actor into the Renderer. > > When I did a count of the number of visible actors in the Renderer, the > number is correct, but I cannot see the new actor in the display. > > Anybody know what's wrong with this? Thanks > > > tohdj > > ======================================================================= > import java.awt.*; > import java.awt.event.*; > import javax.swing.*; > import vtk.*; > > public class MCSCanvas extends JPanel { > private vtkCanvas renWin; > private AxesActor MCSAxesActor; > private MediumActor MCSMediumActor; > private boolean isDisplayed = false; > > public MCSCanvas() { > setLayout(new BorderLayout()); > > // Create the buttons. > renWin = new vtkCanvas(); > add(renWin, BorderLayout.CENTER); > > AxesActor MCSAxesActor = new AxesActor(renWin.GetRenderer()); > renWin.GetRenderer().AddActor(MCSAxesActor); > > MCSMediumActor = new MediumActor(renWin.GetRenderer()); > } > > public void ViewMedium() > { > if (isDisplayed == false) { > System.out.println(renWin.GetRenderer().VisibleActorCount()); > renWin.GetRenderer().AddActor(MCSMediumActor); > renWin.Render(); > isDisplayed = true; > System.out.println("ViewMedium ON"); > System.out.println(renWin.GetRenderer().VisibleActorCount()); > } > else { > System.out.println(renWin.GetRenderer().VisibleActorCount()); > renWin.GetRenderer().RemoveActor(MCSMediumActor); > renWin.Render(); > isDisplayed = false; > System.out.println("ViewMedium OFF"); > System.out.println(renWin.GetRenderer().VisibleActorCount()); > } > } > > public void reSize() > { > renWin.reSize(); > } > > public static void main(String s[]) > { > MCSCanvas panel = new MCSCanvas(); > MCSCanvas panel2 = new MCSCanvas(); > > JFrame frame = new JFrame("VTK Canvas Test!"); > frame.getContentPane().setLayout(new GridLayout(2,1)); > frame.addWindowListener(new WindowAdapter() > { > public void windowClosing(WindowEvent e) {System.exit(0);} > }); > frame.getContentPane().add(panel); > frame.getContentPane().add(panel2); > frame.pack(); > frame.setVisible(true); > } > } > > > > _______________________________________________ > 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 > From alexandre.thinnes at aist.go.jp Tue Feb 8 03:54:34 2005 From: alexandre.thinnes at aist.go.jp (Thinnes) Date: Tue, 08 Feb 2005 17:54:34 +0900 Subject: [vtkusers] Display tetrahedrons References: <4201EA5F.B4DC89C6@aist.go.jp> <2d4570fc050203023831daa350@mail.gmail.com> Message-ID: <42087E4A.8DF60C99@aist.go.jp> Hello, Thank's for help Immo, But it seams Delaunay3D is used for no structured data. The original file give the coordinate of each vertex and also witch link they have each other. Like this: %% Version 2.0 %% VertexNumber: 8 %% EdgeNumber: 18 %% FaceNumber: 16 %% ElementNumber: 4 %% DO NOT CHANGE LINES ABOVE !!!! % NET: Vertices <-> Edges <-> Faces <-> Elements % Vertices: x y z 0 0 0 10 0 0 10 10 0 0 10 0 0 0 10 10 0 10 10 10 10 0 10 10 $ % Edges (Indices to List of Points): 0 5 5 7 7 0 0 4 7 4 4 5 5 3 3 7 7 6 3 6 6 5 0 3 0 1 5 1 3 1 7 2 0 2 3 2 $ % Faces (Indices to List of Edges): 0 1 2 0 3 4 3 5 2 4 1 5 1 7 6 8 9 7 10 9 6 8 10 1 0 6 11 12 0 13 11 14 12 6 13 14 2 7 11 2 15 16 11 17 16 7 17 15 $ % Elements (Indices to List of Faces): 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 I would like to know how to display this kind of file in VTK. I can easily get the points coordinates related with one element (So, I can display one tetrahedron with vtktetra in that case) but I didn't find the way to display all of them. Of course I could make different actor for each element, but this solution is not the good one if I have thousand of elements. Someone have any idea about the good way to do that? I looked lot of examples but all of them used a single tetrahedron. Thanks for your help, Alexandre Immo Trinks wrote: > Look at the man page of the vtkDelaunay3D command. > Then scroll down and click on Examples. > http://www.vtk.org/doc/release/4.0/html/c2_vtk_e_0.html#c2_vtk_e_vtkDelaunay3D > Hope that helps. > Immo > > On Thu, 03 Feb 2005 18:09:51 +0900, Thinnes > wrote: > > Dear VTKUsers, > > > > I have a 3D object made up by many tetrahedrons. > > I would like to know if any of you try to display a tetrahedron in VTK? > > And how you manage to do that? > > Do you know where I can found an example with tetrahedrons? > > > > thank's for all > > Alexandre Thinnes > > > > _______________________________________________ > > 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 > > From normand at lina.univ-nantes.fr Tue Feb 8 05:25:12 2005 From: normand at lina.univ-nantes.fr (Jean-Marie Normand) Date: Tue, 08 Feb 2005 11:25:12 +0100 Subject: [vtkusers] [Problem] How do I get the Connected Components of a vtkImplicitFunction ? In-Reply-To: References: Message-ID: <1107858312.4105.39.camel@pago.irin.sciences.univ-nantes.prive> Hi Dave, thanks for your reply! Actually I've created a class to display my implicit functions that consists in sampling the function via a vtkSampleFunction, then contouring it (vtkContourFilter) and finally creating the associated vtkPolyDataMapper and vtkActor. The problem seems indded to come from the bounds, I found yesterday that if I change my implicitSampleFunction->SetModelsBounds(-100.,100.,-100.,100.,-100.,100.); to implicitSampleFunction->SetModelsBounds(-101.,101.,-101.,101.,-101.,101.); then I get 11 connected components.... I don't really understand why with +/-100. I got the "No points!" error whereas with +/-101. it seems to work... The main problem of this approach is that I need to sample my implicit function to retrieve the number of connected components, and I have no infos on the bounds of my model apart from the fact that the boolean operations will remain within a global "world" representing the bounds at the beginning of the boolean ops, i.e. I can't reduce the bounds of my sampling domain. Moreover I have to use a vtkImplicitDataSet to have those connected components back as implicit functions, i.e. starting from a vtkImplcitFunction I need to sample, contour and clean it, afterwards passing it through a vtkPolyDataConnectivityFilter to finally retransform it in a implicit function by using the vtkImplicitDataSet. The whole process seems quite inadequate to me.... But I may be wrong in the way I'm doing it, I'd appreciate to know if there is a simpler way to get the components of an implicit function. Concerning your suggestions, do I need to contour the implicit functions with several contours? wouldn't it "inflate" the volume represented by my implicit functions?? Thanks again Jim Le lun 07/02/2005 ? 22:07, David.Pont at ForestResearch.co.nz a ?crit : > > > vtkusers-bounces at vtk.org wrote on 08/02/2005 03:29:55: > > > Hi all, > > I'd like to extract the components of a vtkImplicitFunction, but I fail > > to obtain them. > > I perform some boolean operations on vtkImplicitFunctions which leads to > > a vtkImplicitBoolean that has multiple parts, and I'd like to extract > > each one. > > > > I didn't find any possibilities but to use a > > vtkPolyDataconnectivityFilter whichi requires first to "tessellate" my > > implicit functions. My first question would be : > > > > - Is it possible to obtain those components without sampling the > > function, then apply a contour filter and finally a > > vtkPolyDataConnectivityFilter ? > > > > In fact the method described above succeed on a toy example (a cube cut > > in two parts), but when I try to use it in my application, the following > > error is always rised : > > ERROR: In > > /home/jim/Download/VTK/VTK/Graphics/vtkPolyDataConnectivityFilter.cxx, > > line 90 > > vtkPolyDataConnectivityFilter (0x99ec4b0): No points! > > > > and it tells me that there are no connected components which is actually > > wrong since when I display the implicit function I can see the > > components. > > > > Jim, > how do you display the implicit function ? do you render the output of > the Contour filter and/or CleanPolyData filters ? > I just ask because it can be easy to 'miss' implicit functions, ie are you > sure the Bounds and SampleDimensions for the SampleFunction are suitable > for the surface, especially after it has been 'cut' into pieces. If the > bounds are wrong you miss the surface completely, if the sample dimensions > are too large the surface can fall between sample positions. > Just a few suggestions, I have lost time on these kinds of problems before. > Can you check the range of data from the SampleFunction, then contour that > range with several contours. This would reveal how the sample space relates > to the surface. > > Dave P > > > > > Here is my sample of code, any help would be greatly appreciated since I > > don't understand what's wrong. > > > > > > // Sampling the implicit function > > vtkSampleFunction *implicitSampleFunction = vtkSampleFunction::New(); > > implicitSampleFunction->SetImplicitFunction(impFunc); > > > > implicitSampleFunction->SetModelBounds(-1.5*WORLD_SIZE,1. > > 5*WORLD_SIZE,-1.5*WORLD_SIZE,1.5*WORLD_SIZE,-1.5*WORLD_SIZE,1.5 > *WORLD_SIZE); > > implicitSampleFunction->SetSampleDimensions(100,100,100); > > implicitSampleFunction->ComputeNormalsOff(); > > > > // Creating a ContourFilter of the above Sample Function > > vtkContourFilter *implicitContourFilter = vtkContourFilter::New(); > > implicitContourFilter->SetInput(implicitSampleFunction->GetOutput()); > > implicitContourFilter->SetValue(0,0.); > > > > /* cleaning up the result in a vtkCleanPolyData before applying the > > vtkPolyDataConnectivityFilter */ > > vtkCleanPolyData *implicitCleaned = vtkCleanPolyData::New(); > > implicitCleaned->SetInput( implicitContourFilter->GetOutput() ); > > implicitCleaned->SetTolerance(0.); > > > > // Applying the vtkPolyDataConnectivityFilter > > vtkPolyDataConnectivityFilter *implicitPDCF = > > vtkPolyDataConnectivityFilter::New(); > > implicitPDCF->SetInput(implicitCleaned->GetOutput()); > > implicitPDCF->ScalarConnectivityOff(); > > // getting the number of connected components of the implicit function > > implicitPDCF->SetExtractionModeToAllRegions(); > > implicitPDCF->Update(); > > int nb_connected_components = > > implicitPDCF->GetNumberOfExtractedRegions(); > > cout<<"Nb connected components : "< > /* returns 0!*/ > > > > // declaring temporary variables needed in the loop > > vtkPolyData *extractedPolyData = vtkPolyData::New(); > > vtkImplicitDataSet *implicitFunc; > > > > // Declaring the vtkImplicitFunctionList > > vtkImplicitFunctionList *impList = new vtkImplicitFunctionList(); > > > > implicitPDCF->SetExtractionModeToSpecifiedRegions(); > > // extracting all the regions in a loop > > for(int i=0; i > { > > // retrieving the ith region > > implicitPDCF->AddSpecifiedRegion(i); > > implicitPDCF->Update(); > > // copying it into a vtkPolyData* > > extractedPolyData = implicitPDCF->GetOutput(); > > > > // Converting the vtkPolyData into a vtkImplicitFunction > > implicitFunc = vtkImplicitDataSet::New(); > > implicitFunc->SetDataSet(extractedPolyData); > > > > // Adding an implicit function to a list > > impList->addImplicitFunction(implicitFunc); > > > > } > > > > // Freeing memory > > implicitCleaned->Delete(); > > implicitContourFilter->Delete(); > > implicitSampleFunction->Delete(); > > extractedPolyData->Delete(); > > } > > > > > > Thanks in advance > > > > -- > > Jim > > > > _______________________________________________ > > 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 > From wesbrooks at gmail.com Tue Feb 8 06:37:09 2005 From: wesbrooks at gmail.com (Wesley Brooks) Date: Tue, 8 Feb 2005 11:37:09 +0000 Subject: [vtkusers] Polydata cell connectivity list In-Reply-To: References: Message-ID: I'm using BuildLinks(0) because BuildLinks() doesn't seem to work giving the error BuildLinks expects two arguments got one. I found the (0) from here: http://public.kitware.com/pipermail/vtkusers/2003-April/066746.html I've just tried putting the updata before, after the BuildLinks and it still does not see any connections. I tried putting self.polydata inside the brackets and got an error message 'TypeError: an integer is required'. I've also tried putting BuildCells() before and after with and without update calls between them to no effect. The program doesn't even raise an error messege when the build links and updates are commented out. This is the bit that creates the polydata item from a list of co-ordinates and a list of ids describing lines. Is this where my problem lies? self.links is a list where each entry within the list is two ids describing a line and self.gpnts is a list of the co-ordinates relating to the ids. ################################ def VTKObjector(self): self.lattice = vtk.vtkPolyData() points = vtk.vtkPoints() lines = vtk.vtkCellArray() for line in self.links: p0id = line[0] p1id = line[1] p0 = self.gpnts[p0id] p1 = self.gpnts[p1id] lines.InsertNextCell(2) vtkp0 = points.InsertNextPoint(p0[0], p0[1], p0[2]) lines.InsertCellPoint(vtkp0) vtkp1 = points.InsertNextPoint(p1[0], p1[1], p1[2]) lines.InsertCellPoint(vtkp1) self.lattice.SetLines(lines) self.lattice.SetPoints(points) ################################ When this problem is sorted I will reply as I feel it may be hit apon again. Cheers, Wesley. From prabhu_r at users.sf.net Tue Feb 8 08:43:21 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Tue, 8 Feb 2005 19:13:21 +0530 Subject: [vtkusers] Simple question of how to integrate VTK scenes into qt In-Reply-To: <1107810395.4207d85c02d10@webmail.ntnu.no> References: <1107810395.4207d85c02d10@webmail.ntnu.no> Message-ID: <16904.49657.669998.908276@monster.linux.in> >>>>> "TA" == Tore Aurstad writes: TA> I got a VTK scene that I want to show in a qt application with TA> the shipped QVTKRenderWindowInteractor.py TA> How do I make the window for the VTK scene dock into the Qt TA> application? TA> (Yes, I have tried and tested for ages, but no luck still..) If you want to be helped you could try and post a *small* example (ideally minimal) that failed for you. Then people atleast have a starting point to help you with. This might sound rude but you should consider reading this: http://www.catb.org/~esr/faqs/smart-questions.html cheers, prabhu From amg1 at student.cs.ucc.ie Tue Feb 8 09:49:05 2005 From: amg1 at student.cs.ucc.ie (Alanna Garvey) Date: Tue, 8 Feb 2005 14:49:05 +0000 Subject: [vtkusers] (no subject) Message-ID: <200502081449.j18En2Jj018124@student.cs.ucc.ie> vtkusers at vtk.org vtkusers at vtk.org X-EXP32-SerialNo: 00002719 Subject: Joystick Integration Message-ID: <42092977 at webmail.ucc.ie> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: WebMail (Hydra) SMTP v3.61.08 Hi, I'm currently involved in a project which requires the integration of a joystick (logitech) with VTK and C++. I've been trying to achieve this unsuccessfully. I have the VTK user manual but it doesn't deal much with this aspect of VTK. I was wondering if anyone had any experience with this problem that would point me in the right direction. Any advice would be very appreciated. Thanks! Aria From lachlan at chryatech.com.au Tue Feb 8 11:25:54 2005 From: lachlan at chryatech.com.au (Lachlan Blackhall) Date: Tue, 8 Feb 2005 17:25:54 +0100 Subject: [vtkusers] (no subject) In-Reply-To: <200502081449.j18En2Jj018124@student.cs.ucc.ie> References: <200502081449.j18En2Jj018124@student.cs.ucc.ie> Message-ID: I dont have specific experience in this area but heres my two cents worth anyway :) You could write a joystick handler that accepts the input from the joystick and then translates this into camera movements etc.. In this way you can separate the code which takes the joystick input and the code that actually moves the camera which makes it slightly more portable if you wanted to support different OSes and different joysticks in the future. Lachlan On 08/02/2005, at 3:49 PM, Alanna Garvey wrote: > vtkusers at vtk.org > vtkusers at vtk.org > > X-EXP32-SerialNo: 00002719 > Subject: Joystick Integration > Message-ID: <42092977 at webmail.ucc.ie> > Mime-Version: 1.0 > Content-Type: text/plain; charset="ISO-8859-1" > Content-Transfer-Encoding: 7bit > X-Mailer: WebMail (Hydra) SMTP v3.61.08 > > Hi, > I'm currently involved in a project which requires the integration of a > joystick (logitech) with VTK and > C++. I've been trying to achieve this unsuccessfully. I have the VTK > user > manual but it doesn't deal > much with this aspect of VTK. > I was wondering if anyone had any experience with this problem that > would > point me in the right > direction. Any advice would be very appreciated. > Thanks! > Aria > > > _______________________________________________ > 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 E-mail scanned for viruses by IntaServe - MailGuardian Service > at http://www.intaserve.com] > > From wesbrooks at gmail.com Tue Feb 8 11:45:16 2005 From: wesbrooks at gmail.com (Wesley Brooks) Date: Tue, 8 Feb 2005 16:45:16 +0000 Subject: [vtkusers] Polydata cell connectivity list In-Reply-To: References: Message-ID: Think I've got something. I know the list of co-ordinates that I have created all connect but I think the way I have created the polydata may leave them unconnected. If I add two lines that share a point - ie. add four co-ordinates in the above method - will vtk recognise that the points are identical? Any way to clean up identical points in vtk of have I just got to be more carefull and add the points and lines in a different method? Cheers again for your help. Wesley. From amy.henderson at kitware.com Tue Feb 8 11:51:08 2005 From: amy.henderson at kitware.com (Amy Henderson) Date: Tue, 08 Feb 2005 11:51:08 -0500 Subject: [vtkusers] Polydata cell connectivity list In-Reply-To: References: Message-ID: <6.2.0.14.2.20050208115027.03fad6d8@pop.biz.rr.com> Try using vtkCleanPolyData to get rid of duplicate points. - Amy At 11:45 AM 2/8/2005, Wesley Brooks wrote: >Think I've got something. I know the list of co-ordinates that I have >created all connect but I think the way I have created the polydata >may leave them unconnected. If I add two lines that share a point - >ie. add four co-ordinates in the above method - will vtk recognise >that the points are identical? Any way to clean up identical points in >vtk of have I just got to be more carefull and add the points and >lines in a different method? > >Cheers again for your help. > >Wesley. >_______________________________________________ >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 From wesbrooks at gmail.com Tue Feb 8 12:05:36 2005 From: wesbrooks at gmail.com (Wesley Brooks) Date: Tue, 8 Feb 2005 17:05:36 +0000 Subject: [vtkusers] Polydata cell connectivity list In-Reply-To: <6.2.0.14.2.20050208115027.03fad6d8@pop.biz.rr.com> References: <6.2.0.14.2.20050208115027.03fad6d8@pop.biz.rr.com> Message-ID: Cheers to you both. My few days of boredom have just ended. I now just need to sort out the rest of the bugs in my code! Home time in this part of the world so I'm off for the customary post-work pint, be it in a little better spirt today! Thanks again. Wesley. From freiman at cs.huji.ac.il Tue Feb 8 12:58:32 2005 From: freiman at cs.huji.ac.il (Moti Freiman) Date: Tue, 08 Feb 2005 19:58:32 +0200 Subject: [vtkusers] how to get he mouse position when pressed on vtkimageviewer window Message-ID: <4208FDC8.9070805@cs.huji.ac.il> Hello! i want to get the position of the mouse on image coordinates when the left button of the mouse pressed on imageviewer window, or general vtkRenderWindow. I did not find any function that do that. can someone give some help on this? Thanks! moti -- Moti Freiman, Graduate Student. Medical Image Processing and Computer-Assisted Surgery Laboratory. School of Computer Science and Engineering. The Hebrew University of Jerusalem Givat Ram, Jerusalem 91904, Israel Phone: +(972)-2-658-5371 (laboratory) E-mail: freiman at cs.huji.ac.il WWW site: http://www.cs.huji.ac.il/~freiman -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.6 - Release Date: 07/02/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.6 - Release Date: 07/02/2005 From randall.hand at gmail.com Tue Feb 8 15:08:36 2005 From: randall.hand at gmail.com (Randall Hand) Date: Tue, 8 Feb 2005 14:08:36 -0600 Subject: [vtkusers] XDMF Reader Message-ID: I see that paraview supports the XDMF format through the "vtkXdmfReader" class, but I can't find this class documented in either the 4.2 or 4.N documentation online. What version of VTK is required to get this? -- Randall Hand http://www.yeraze.com From amy.henderson at kitware.com Tue Feb 8 15:15:58 2005 From: amy.henderson at kitware.com (Amy Henderson) Date: Tue, 08 Feb 2005 15:15:58 -0500 Subject: [vtkusers] XDMF Reader In-Reply-To: References: Message-ID: <6.2.0.14.2.20050208151530.03fc6008@pop.biz.rr.com> That class is in ParaView, not in VTK. - Amy At 03:08 PM 2/8/2005, Randall Hand wrote: >I see that paraview supports the XDMF format through the >"vtkXdmfReader" class, but I can't find this class documented in >either the 4.2 or 4.N documentation online. > >What version of VTK is required to get this? >-- >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 From David.Pont at ForestResearch.co.nz Tue Feb 8 15:59:03 2005 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Wed, 9 Feb 2005 09:59:03 +1300 Subject: [vtkusers] Polydata cell connectivity list In-Reply-To: Message-ID: Hi Wesley, As suggested by Amy vtkCleanPolyData will tidy up coincident points. If you are constructing the vtk data set you could also use vtkMergePoints->InsertUniquePoint to have vtk handle re-using existing points for you. It gives you back a point id (possibly new or existing). Call this for each point in a new cell to build a list of point id's and then use these to add a new cell to your polydata. This is a 'fast' type of vtkPointLocator, but I dont know if it is any faster than just cleaning up later?! Its a very hot summer day in this part of the world, a pint sounds like a great idea... but it is now 10am, so a cuppa will have to do Dave P Wesley Brooks wrote on 09/02/2005 05:45:16: > Think I've got something. I know the list of co-ordinates that I have > created all connect but I think the way I have created the polydata > may leave them unconnected. If I add two lines that share a point - > ie. add four co-ordinates in the above method - will vtk recognise > that the points are identical? Any way to clean up identical points in > vtk of have I just got to be more carefull and add the points and > lines in a different method? > > Cheers again for your help. > > Wesley. From mathieu.malaterre at kitware.com Tue Feb 8 16:01:47 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Tue, 08 Feb 2005 16:01:47 -0500 Subject: [vtkusers] how to get he mouse position when pressed on vtkimageviewer window In-Reply-To: <4208FDC8.9070805@cs.huji.ac.il> References: <4208FDC8.9070805@cs.huji.ac.il> Message-ID: <420928BB.1050203@kitware.com> Moti Freiman wrote: > > Hello! > i want to get the position of the mouse on image coordinates when the > left button of the mouse pressed on imageviewer window, or general > vtkRenderWindow. > I did not find any function that do that. can someone give some help on > this? > Thanks! > moti > You need to setup a vtkRenderWindowInteractor for this purpose from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() reader = vtk.vtkPNGReader () reader.SetDataSpacing (0.8, 0.8, 1.5) reader.SetFileName ( VTK_DATA_ROOT + "/Data/fullhead15.png") iren = vtk.vtkRenderWindowInteractor() viewer = vtk.vtkImageViewer() viewer.SetInput ( reader.GetOutput() ) viewer.SetupInteractor (iren) iren.Initialize() iren.Start() Once you have a vtkRenderWindowInteractor you can have a look at GetEventPosition, be carefull with the Y orientation flip (whether the y start at bottom of screen or from the top). HTH Mathieu From lpe540 at yahoo.com Tue Feb 8 16:21:20 2005 From: lpe540 at yahoo.com (Joe Miller) Date: Tue, 8 Feb 2005 13:21:20 -0800 (PST) Subject: [vtkusers] render order of vtkActor and vtkActor2D Message-ID: <20050208212120.28163.qmail@web50003.mail.yahoo.com> Hi, In the archive I found a posting (http://public.kitware.com/pipermail/vtkusers/1999-September/051651.html) that said that the render order for the renderer was opaque geometry, translucent, ray tracing and then overlay actors. I was wondering if the overlay actors referred to 2D actors. I noticed in a program I'm working on that the vtkVectorText always appears behind a 2D plane I draw no matter when I add it to the renderer. I was wondering if there was anyway around this without going to a new renderer. I'm currently using version 4.2. Thanks for the advice. -joe __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 From kevin.hobbs.1 at ohiou.edu Tue Feb 8 16:58:29 2005 From: kevin.hobbs.1 at ohiou.edu (Kevin H. Hobbs) Date: Tue, 08 Feb 2005 16:58:29 -0500 Subject: [vtkusers] build TIFF-images to a volume? In-Reply-To: <42048FF8.9090605@gmx.de> References: <42048FF8.9090605@gmx.de> Message-ID: <1107899909.5654.78.camel@gargon.hooperlab> On Sat, 2005-02-05 at 10:20 +0100, Stephan Theisen wrote: > Hi together! > > I've a lot of 2D images in the tiff format. These images are from a > medical CT Dataset. Now I want to visualizise > them in a volume. How can I put the slices together? Can anyboby tell me > functons or classes I must for that. > > Thanks in advance > > Stephan > > _______________________________________________ > 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 In ITK there is an itkImageSeriesReader.h that does exactly this. There might be something like it in VTK too. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From juan.aja at gmail.com Tue Feb 8 20:00:03 2005 From: juan.aja at gmail.com (=?ISO-8859-1?Q?Juan_Jos=E9_Aja_Fern=E1ndez?=) Date: Tue, 8 Feb 2005 19:00:03 -0600 Subject: [vtkusers] Visualizing scalar data Message-ID: <9f83649305020817007a5025bf@mail.gmail.com> Hi everyone. I'm having a lot of trouble trying to volume render unstructured grids. Basically what I need is to read scalar (ASCII) data from a file (the scalars are arranged in a grid layout, so X increments first, then Y, then Z), and then visualize it applying volume rendering techniques. I started out by constructing a unstructured grid which will contain the scalars. Then I read each point of data and insert it into a vtkDoubleArray (let's call it scalars). This scalars represent values of emission of certain objects, they are arranged in cubes, and each point is in the order of 1.03e-12, 6.01449e-19 and so. I believe I need to construct a grid that containts the scalar data, and I've found that the only method that supports volume rendering works on untructured ones. Am I forced to use grids in order to render it? Supposing that I must use grids I began constructing one. Each point of this grid has assigned one scalar of my data by means of the following combination of methods: grid->GetPointData()->SetScalars(scalars) Now I would like to apply volume rendering techniques to the scalars of my grid, so I intend to use the method: vtkUnstructuredGridVolumeRayCastFunction and it's corresponding mapper vtkUntructuredGridVolumeRayCastMapper. As I understand it, I need to interpolate the data in each point and assign the result to each cell in order to apply volume rendering. Is this correct? If so, then I believe that vtkPointDataToCellData will do the job. If that's not true, how can I accomplish this? Thanks in advance. From jbw at ieee.org Tue Feb 8 20:27:10 2005 From: jbw at ieee.org (Jeremy Winston) Date: Tue, 08 Feb 2005 20:27:10 -0500 Subject: [vtkusers] Re: build TIFF-images to a volume? In-Reply-To: <1107899909.5654.78.camel@gargon.hooperlab> References: <42048FF8.9090605@gmx.de> <1107899909.5654.78.camel@gargon.hooperlab> Message-ID: <420966EE.5020601@ieee.org> Kevin H. Hobbs wrote: > On Sat, 2005-02-05 at 10:20 +0100, Stephan Theisen wrote: >> >>I've a lot of 2D images in the tiff format. These images are from a >>medical CT Dataset. Now I want to visualizise >>them in a volume. How can I put the slices together? If you have Tcl installed, and your files are named basenameN.tif where NN is between 1 & 50 inclusive, try this: # --- Begin: --- vtkTIFFReader tReader tReader SetFilePrefix "Path/To/Your/Data/Files/basename" tReader SetFilePattern "%s%i.tif" ;# I.e., {Prefix}{Image#}.tif tReader SetImageRange 1 50 ;# Slice numbers tReader SetDataSpacing 0.33 0.33 1.0 ;# x,y,z pixel spacing tReader SetDataOrigin 0 0 0 vtkContourFilter sfcExtractor sfcExtractor SetInput [tReader GetOutput] sfcExtractor SetValue 0 500 vtkPolyDataNormals sfcNormals sfcNormals SetInput [sfcExtractor GetOutput] sfcNormals SetFeatureAngle 60.0 vtkPolyDataMapper sfcMapper sfcMapper SetInput [sfcNormals GetOutput] sfcMapper ScalarVisibilityOff vtkActor sfc sfc SetMapper skinMapper vtkRenderer aRenderer vtkRenderWindow renWin renWin AddRenderer aRenderer vtkRenderWindowInteractor iren iren SetRenderWindow renWin aRenderer AddActor sfc iren AddObserver UserEvent {wm deiconify .vtkInteract} iren Initialize wm withdraw . # --- End. --- or something like that. You'll probably have to fiddle with the contour filter threshold values as appropriate for your data. Check out the example Tcl files for more ideas. HTH, -Jeremy From a.maclean at cas.edu.au Wed Feb 9 00:49:17 2005 From: a.maclean at cas.edu.au (Andrew Maclean) Date: Wed, 9 Feb 2005 16:49:17 +1100 Subject: [vtkusers] Getting the scalar value from vtkPolyData in TCl Message-ID: <200502090549.j195nNxO005052@lorica.ucc.usyd.edu.au> How do I get a scalar out of the vtkPolyData structure using TCL? I have been doing something like this in C++: double sc = polyData->GetPointData()->GetScalars()->GetComponent(j,0); I can't seem to translate this into TCL! Thanks for any help Andrew ___________________________________________ Andrew J. P. Maclean Centre for Autonomous Systems The Rose Street Building J04 The University of Sydney? 2006? NSW AUSTRALIA Ph: +61 2 9351 3283 Fax: +61 2 9351 7474 URL: http://www.cas.edu.au/ ___________________________________________ From hsalas at tuny.com.mx Wed Feb 9 00:57:58 2005 From: hsalas at tuny.com.mx (Hector Salas Rodriguez) Date: Tue, 8 Feb 2005 23:57:58 -0600 Subject: [vtkusers] Vtk and Dev-C++ Message-ID: <006201c50e6c$4efbaa60$da01a8c0@tuny.com.mx> Hi, friends I wish to build the vtk library with Dev-C++. Could you give me some help? -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank at qfin.net Wed Feb 9 02:35:49 2005 From: frank at qfin.net (Frank Conradie) Date: Tue, 08 Feb 2005 23:35:49 -0800 Subject: [vtkusers] Colour Gradient Background Message-ID: <4209BD55.5020806@qfin.net> Hi there Does anybody know how I can create a static colour gradient background in VTK, e.g. as used by some CAD programs and in the first 2 screenshots on this page: http://www.opencascade.org/showroom/screenshots/ Regards, Frank Conradie From aryeh at bigfoot.com Wed Feb 9 05:18:42 2005 From: aryeh at bigfoot.com (Arye) Date: Wed, 9 Feb 2005 11:18:42 +0100 Subject: [vtkusers] ClipCow with vtkImplicitPlaneWidget and degenerate Polygons Message-ID: <00fb01c50e90$bb470380$f30101c0@dev03> Hi all, vtkCutter displays a warning about degenerate polygons for some positions of the cutting plane. Can this be solved ? The attached python example is derived from ClipCow.py. Good day, Arye. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ClipCow2.py URL: From webstuff at suessstoffersatz.de Wed Feb 9 05:59:39 2005 From: webstuff at suessstoffersatz.de (webstuff at suessstoffersatz.de) Date: Wed, 09 Feb 2005 11:59:39 +0100 Subject: [vtkusers] wxVTK Question about freetype-changes (was: Problems with wxVTK...) Message-ID: Hi Jens, sorry for answering that late, but I only work twice a week on the problem. On both gentoo and SuSE I am able to compile the programs when I use GTK2. I manually have to change some libraries when I do a ccmake. When I try GTK1 the programs do not compile. You said something about changes within the freetype inside of VTK. Could you send me the list of changes you made to the freetype-branch of VTK? It is not the best solution, but it is a solution. Regards Richard Freitag From amy.henderson at kitware.com Wed Feb 9 09:03:20 2005 From: amy.henderson at kitware.com (Amy Henderson) Date: Wed, 09 Feb 2005 09:03:20 -0500 Subject: [vtkusers] Getting the scalar value from vtkPolyData in TCl In-Reply-To: <200502090549.j195nNxO005052@lorica.ucc.usyd.edu.au> References: <200502090549.j195nNxO005052@lorica.ucc.usyd.edu.au> Message-ID: <6.2.0.14.2.20050209090233.03f73df0@pop.biz.rr.com> At 12:49 AM 2/9/2005, Andrew Maclean wrote: >How do I get a scalar out of the vtkPolyData structure using TCL? I have >been doing something like this in C++: > >double sc = polyData->GetPointData()->GetScalars()->GetComponent(j,0); In Tcl, it would look like this: [[polyData GetPointData] GetScalars] GetComponent j 0 - Amy >I can't seem to translate this into TCL! > >Thanks for any help > > >Andrew > >___________________________________________ >Andrew J. P. Maclean >Centre for Autonomous Systems >The Rose Street Building J04 >The University of Sydney 2006 NSW >AUSTRALIA >Ph: +61 2 9351 3283 >Fax: +61 2 9351 7474 >URL: http://www.cas.edu.au/ >___________________________________________ > > >_______________________________________________ >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 From webstuff at suessstoffersatz.de Wed Feb 9 09:03:32 2005 From: webstuff at suessstoffersatz.de (webstuff at suessstoffersatz.de) Date: Wed, 09 Feb 2005 15:03:32 +0100 Subject: [vtkusers] Solved: Problem with wxVTK, wxGTK and pango Message-ID: Hi Jens, the hint you gave me was perfect. On the SuSE-machine freetype 2.1.9-3 was installed, VTK has freetype 2.1.2. So I took freetype 2.1.9 and copied the source into VTK. I deleted all the files from the base-freetype directory and took the CMakeLists.txt, .NoDartCoverage, vtkfreetypeConfig.h and vtkfreetypeConfig.h.in from the VTK-freetype-directory. Inside build/unix/ftconfig.in I changed a section: typedef signed short FT_Int16; typedef unsigned short FT_UInt16; //#if FT_SIZEOF_INT == 4 typedef signed int FT_Int32; typedef unsigned int FT_UInt32; //#elif FT_SIZEOF_LONG == 4 // typedef signed long FT_Int32; // typedef unsigned long FT_UInt32; //#else //#error "no 32bit type found -- please check your configuration files" //#endif because otherwise he gave me the error. Inside CMakeLists.txt there was a now false include, so I changed ftconfig.h.in to ftconfig.in. I also had to add the following into CMakeLists.txt: SET (FREETYPE_SRCS src/base/ftinit.c src/base/ftbase.c src/base/ftglyph.c #added by me: src/sfnt/sfnt.c src/lzw/ftlzw.c src/gzip/ftgzip.c ) Then I recompiled VTK and what a relief, the programs compile and work with wxGTK and VTK! Best wishes Richard Freitag From mathieu.malaterre at kitware.com Wed Feb 9 10:12:00 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Wed, 09 Feb 2005 10:12:00 -0500 Subject: [vtkusers] Solved: Problem with wxVTK, wxGTK and pango In-Reply-To: References: Message-ID: <420A2840.6060300@kitware.com> Jens, Rochard, Sorry I missed the beginning of the discussion. Could you tell me which version of wxVTK are you using, and which version of VTK are you using ? As a side note, VTK now includes freetype 2.1.9 (CVS only), since 8/8/2004. Mathieu webstuff at suessstoffersatz.de wrote: > Hi Jens, > > the hint you gave me was perfect. On the SuSE-machine freetype 2.1.9-3 was > installed, VTK has freetype 2.1.2. So I took freetype 2.1.9 and copied the > source into VTK. I deleted all the files from the base-freetype directory > and took the CMakeLists.txt, .NoDartCoverage, vtkfreetypeConfig.h and > vtkfreetypeConfig.h.in from the VTK-freetype-directory. > > Inside build/unix/ftconfig.in I changed a section: > > typedef signed short FT_Int16; > typedef unsigned short FT_UInt16; > > //#if FT_SIZEOF_INT == 4 > > typedef signed int FT_Int32; > typedef unsigned int FT_UInt32; > > //#elif FT_SIZEOF_LONG == 4 > > // typedef signed long FT_Int32; > // typedef unsigned long FT_UInt32; > > //#else > //#error "no 32bit type found -- please check your configuration files" > //#endif > > because otherwise he gave me the error. > > Inside CMakeLists.txt there was a now false include, so I changed > ftconfig.h.in to ftconfig.in. > > I also had to add the following into CMakeLists.txt: > > SET (FREETYPE_SRCS > src/base/ftinit.c > src/base/ftbase.c > src/base/ftglyph.c > > #added by me: > src/sfnt/sfnt.c > src/lzw/ftlzw.c > src/gzip/ftgzip.c > ) > > Then I recompiled VTK and what a relief, the programs compile and work > with wxGTK and VTK! > > Best wishes > > Richard Freitag > _______________________________________________ > 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 > From frank at qfin.net Wed Feb 9 10:30:08 2005 From: frank at qfin.net (Frank Conradie) Date: Wed, 09 Feb 2005 07:30:08 -0800 Subject: [vtkusers] Colour Gradient Background Message-ID: <420A2C80.1070405@qfin.net> Hi there Does anybody know how I can create a static colour gradient background in VTK, e.g. as used by some CAD programs and in the first 2 screenshots on this page: http://www.opencascade.org/showroom/screenshots/ Regards, Frank Conradie From dsaussus at fugro-jason.com Wed Feb 9 11:25:35 2005 From: dsaussus at fugro-jason.com (Denis Saussus) Date: Wed, 9 Feb 2005 17:25:35 +0100 Subject: [vtkusers] text orientation of vtkAxisActor label Message-ID: I am using a vtkXYPlotActor object and would like to change the orientation of the YaxisLabel text. I thought of just applying a vtkTransform.RotateX(90.) to the label actor but I cannot find a way to the vtkAxisActor itself. Is this the right way to accomplish what i want (if so, how to make it work?) or am I missing something much simpler? Thanks in advance for any hints From toreaur at stud.ntnu.no Wed Feb 9 12:25:52 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Wed, 09 Feb 2005 17:25:52 +0000 Subject: [vtkusers] Error when compiling VTK4.2.latest Message-ID: <1107969952.15104.3.camel@localhost.localdomain> When I try to install VTK 4.2 I get errors after cmake -i and make The errors lies in the IO directory. The compilation stops at the BMP- reader and says: Building object file vtkBMPReader.o... /usr/local/share/VTK/IO/vtkBMPReader.cxx: In function `void vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = double]': /usr/local/share/VTK/IO/vtkBMPReader.cxx:545: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: operator+(std:: ... and so on: make[3]: *** [vtkBMPReader.o] Error 1 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_IO] Error 2 make: *** [default_target] Error 2 What is wrong here? From rendezvous at dreamxplosion.com Wed Feb 9 11:52:10 2005 From: rendezvous at dreamxplosion.com (Marius S Giurgi) Date: Wed, 9 Feb 2005 11:52:10 -0500 Subject: [vtkusers] what are the vtk*macro for? Message-ID: <5477b5d067bbfc3ff02c010b81feb554@dreamxplosion.com> Hi vtkers, can anyone please explain what are these vtkTypeRevisionMacro, vtkStandardNewMacro etc for? thanks, marius From gustav at indiana.edu Wed Feb 9 15:47:13 2005 From: gustav at indiana.edu (Zdzislaw Meglicki) Date: Wed, 09 Feb 2005 15:47:13 -0500 Subject: [vtkusers] Mangled Mesa off-screen printing does not work Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 It seems that Mangled Mesa off-screen printing does not work on my system. Here are the details: OS: Linux 2.4.29-rc2 i686, i386 GNU/Linux Mesa: Mesa-6.2 VTK: vtk4.4 tcl: tcl8.3.3 tk: tk8.3.3 Python: Python-2.3.3 Symptoms: $ cd vtk4.4-src/VTK/Examples/MangledMesa/Tcl $ wish OffScreenPrinting.tcl This brings up the picture of a cone on my display with two push-buttons: "print" and "exit". On pressing "print" a file is generated, "MesaPrintout.png". The file contains an all-black page with no image on it. No error messages are flagged at any stage. Has this been reported before? What may be the problem? - -- Zdzislaw (Gustav) Meglicki, Office of the Vice President for Information Technology, Indiana University, 601 E. Kirkwood Ave., Room 116, Bloomington, IN 47405-1223, USA, http://beige.ucs.indiana.edu/gustav, ph: 812-856-5597 (o), 812-345-3284 (m), 812-856-3147 (fax) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Cygwin) Comment: Processed by Mailcrypt 3.5.8 iD8DBQFCCnbOmWA2y7s1YXMRAm0aAKCjyzY4IpiXG1YLEvPCFSPe68O84gCfXZOM fjaLb4z96s1e+G0jSuq9Pl4= =P55Y -----END PGP SIGNATURE----- From wesbrooks at gmail.com Thu Feb 10 06:34:02 2005 From: wesbrooks at gmail.com (Wesley Brooks) Date: Thu, 10 Feb 2005 11:34:02 +0000 Subject: Fwd: [vtkusers] Colour Gradient Background In-Reply-To: References: <420A2C80.1070405@qfin.net> Message-ID: ---------- Forwarded message ---------- From: Wesley Brooks Date: Thu, 10 Feb 2005 11:33:13 +0000 Subject: Re: [vtkusers] Colour Gradient Background To: Frank Conradie Dear Frank Conradie, You've mad me think about this now, it would certinally improve the look of my applications. Have you tried adding a 2D image actor? If this works it would be easily possible to add logos, ghost images etc. Yours Sincerely, Wesley Brooks On Wed, 09 Feb 2005 07:30:08 -0800, Frank Conradie wrote: > Hi there > > Does anybody know how I can create a static colour gradient background > in VTK, e.g. as used by some CAD programs and in the first 2 screenshots > on this page: http://www.opencascade.org/showroom/screenshots/ > > Regards, > Frank Conradie > _______________________________________________ > 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 > -- 25 Garmoyle Road, Liverpool, L15 3HN. 0795 172 0839 0151 222 6405 -- 25 Garmoyle Road, Liverpool, L15 3HN. 0795 172 0839 0151 222 6405 From toreaur at stud.ntnu.no Thu Feb 10 15:38:02 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Thu, 10 Feb 2005 15:38:02 -0500 Subject: [vtkusers] Problem compiling VTK4.2.2 Message-ID: <1108067882.5995.7.camel@localhost.localdomain> I always get an error now when compiling in the IO subdirectory. More specifically when compiling vtkBMPReader, I haven't done any changes but use the official tar.gz file from the website. First I download the file into /usr/local/share Then I run cmake -i And then make: I have tried also gmake -j which gets a bit further, but that parallell compilation method is too much for my P4 pc(!). I have also tried make - j make install does not work since the previous step faults I have also tried to force the make by: make -i -k That does not help either! I used to be able to compile on my Fedora Core 2, but not Fedora Core 3. I'm going to do a full update now (10GB), but have no clue if that will help. I have tried setting the compiler both to g++ c++ or gcc with the help of cmake -i.. Here is the output where all fails (I need to also be able to run VTK in Tcl and Python, to run Scicraft: /usr/local/share/VTK/Graphics: building default_target /usr/local/share/VTK/IO: building default_target Building object file vtkBMPReader.o... /usr/local/share/VTK/IO/vtkBMPReader.cxx: In function `void vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = double]': /usr/local/share/VTK/IO/vtkBMPReader.cxx:545: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: operator+(std::streamoff, long int) /usr/local/share/VTK/IO/vtkBMPReader.cxx:545: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: operator+(std::streamoff, long int) /usr/local/share/VTK/IO/vtkBMPReader.cxx: In function `void vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = float]': /usr/local/share/VTK/IO/vtkBMPReader.cxx:548: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: operator+(std::streamoff, long int) /usr/local/share/VTK/IO/vtkBMPReader.cxx:548: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: operator+(std::streamoff, long int) /usr/local/share/VTK/IO/vtkBMPReader.cxx: In function `void vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = long unsigned int]': /usr/local/share/VTK/IO/vtkBMPReader.cxx:551: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: operator+(std::streamoff, long int) /usr/local/share/VTK/IO/vtkBMPReader.cxx:551: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: operator+(std::streamoff, long int) /usr/local/share/VTK/IO/vtkBMPReader.cxx:554: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: operator+(std::streamoff, long int) /usr/local/share/VTK/IO/vtkBMPReader.cxx: In function `void vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = int]': /usr/local/share/VTK/IO/vtkBMPReader.cxx:560: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: operator+(std::streamoff, long int) /usr/local/share/VTK/IO/vtkBMPReader.cxx:560: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: operator+(std::streamoff, long int) /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: operator+(std::streamoff, long int) /usr/local/share/VTK/IO/vtkBMPReader.cxx: In function `void vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = unsigned char]': /usr/local/share/VTK/IO/vtkBMPReader.cxx:569: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: /usr/local/share/VTK/IO/vtkBMPReader.cxx:572: instantiated from here /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = mbstate_t] /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: operator+(std::streamoff, long int) make[3]: *** [vtkBMPReader.o] Error 1 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_IO] Error 2 make: *** [default_target] Error 2 I guess there are some setup problems, please help out. To run Scicraft I need to compile btw: Python PyQt PyQwt VTK Octave R RPy Scicraft I have installed the prerequisites except PyQwt and VTK.. Thanks for help, Tore Aurstad From mathieu.malaterre at kitware.com Thu Feb 10 09:55:27 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Thu, 10 Feb 2005 09:55:27 -0500 Subject: [vtkusers] Problem compiling VTK4.2.2 In-Reply-To: <1108067882.5995.7.camel@localhost.localdomain> References: <1108067882.5995.7.camel@localhost.localdomain> Message-ID: <420B75DF.9010401@kitware.com> Tore, I did a google search using your error message and I found the solution to be already posted in the vtkusers list: http://public.kitware.com/pipermail/vtkusers/2004-September/076440.html HTH Mathieu Tore Aurstad wrote: > I always get an error now when compiling in the IO subdirectory. More > specifically when compiling vtkBMPReader, I haven't done any changes but > use the official tar.gz file from the website. > > First I download the file into /usr/local/share > > Then I run cmake -i > > And then make: > > I have tried also gmake -j which gets a bit further, but that parallell > compilation method is too much for my P4 pc(!). I have also tried make - > j > > make install does not work since the previous step faults > > I have also tried to force the make by: make -i -k > > That does not help either! > > I used to be able to compile on my Fedora Core 2, but not Fedora Core 3. > I'm going to do a full update now (10GB), but have no clue if that will > help. I have tried setting the compiler both to g++ c++ or gcc with the > help of cmake -i.. > > Here is the output where all fails (I need to also be able to run VTK in > Tcl and Python, to run Scicraft: > > /usr/local/share/VTK/Graphics: building default_target > /usr/local/share/VTK/IO: building default_target > Building object file vtkBMPReader.o... > /usr/local/share/VTK/IO/vtkBMPReader.cxx: In function `void > vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = > double]': > /usr/local/share/VTK/IO/vtkBMPReader.cxx:545: instantiated from here > /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: > operator+(std::streamoff, long int) > /usr/local/share/VTK/IO/vtkBMPReader.cxx:545: instantiated from here > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: > operator+(std::streamoff, long int) > /usr/local/share/VTK/IO/vtkBMPReader.cxx: In function `void > vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = > float]': > /usr/local/share/VTK/IO/vtkBMPReader.cxx:548: instantiated from here > /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: > operator+(std::streamoff, long int) > /usr/local/share/VTK/IO/vtkBMPReader.cxx:548: instantiated from here > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: > operator+(std::streamoff, long int) > /usr/local/share/VTK/IO/vtkBMPReader.cxx: In function `void > vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = long > unsigned int]': > /usr/local/share/VTK/IO/vtkBMPReader.cxx:551: instantiated from here > /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: > operator+(std::streamoff, long int) > /usr/local/share/VTK/IO/vtkBMPReader.cxx:551: instantiated from here > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: > operator+(std::streamoff, long int) > /usr/local/share/VTK/IO/vtkBMPReader.cxx:554: instantiated from here > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: > operator+(std::streamoff, long int) > /usr/local/share/VTK/IO/vtkBMPReader.cxx: In function `void > vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = int]': > /usr/local/share/VTK/IO/vtkBMPReader.cxx:560: instantiated from here > /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate 2: > operator+(std::streamoff, long int) > /usr/local/share/VTK/IO/vtkBMPReader.cxx:560: instantiated from here > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: > operator+(std::streamoff, long int) > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: > operator+(std::streamoff, long int) > /usr/local/share/VTK/IO/vtkBMPReader.cxx: In function `void > vtkBMPReaderUpdate2(vtkBMPReader*, vtkImageData*, OT*) [with OT = > unsigned char]': > /usr/local/share/VTK/IO/vtkBMPReader.cxx:569: instantiated from here > /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:507: note: candidate > 2: /usr/local/share/VTK/IO/vtkBMPReader.cxx:572: instantiated from > here > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: error: ISO C++ says that > these are ambiguous, even though the worst conversion for the first is > better than the worst conversion for the second: > /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c+ > +/3.4.2/bits/postypes.h:176: note: candidate 1: std::fpos<_StateT> > std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = > mbstate_t] > /usr/local/share/VTK/IO/vtkBMPReader.cxx:511: note: candidate 2: > operator+(std::streamoff, long int) > make[3]: *** [vtkBMPReader.o] Error 1 > make[2]: *** [default_target] Error 2 > make[1]: *** [default_target_IO] Error 2 > make: *** [default_target] Error 2 > > > I guess there are some setup problems, please help out. > > To run Scicraft I need to compile btw: > > Python > PyQt > PyQwt > VTK > Octave > R > RPy > Scicraft > > I have installed the prerequisites except PyQwt and VTK.. > > Thanks for help, > > Tore Aurstad > > > > > _______________________________________________ > 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 > From StephanTheisen at gmx.de Thu Feb 10 10:12:10 2005 From: StephanTheisen at gmx.de (Stephan Theisen) Date: Thu, 10 Feb 2005 16:12:10 +0100 Subject: [vtkusers] Get values of a volume Message-ID: <420B79CA.3010009@gmx.de> Hi together! I've a volume of interest (voi) and will change some values of this volume. How can I get these values? Thanks in advance Stephan From yuhui.yang at imperial.ac.uk Thu Feb 10 10:07:46 2005 From: yuhui.yang at imperial.ac.uk (Yang, Yuhui) Date: Thu, 10 Feb 2005 15:07:46 -0000 Subject: [vtkusers] visualization of vtkPointSet Message-ID: <4AF1FA9AE80CC442B32A2BA6173C5360B81399@icex32.ic.ac.uk> Hi, I extracted the vtkPointSet from the vtkPolyData and applied computation to the points. I want to visualize the results of changes, how can I do that? Thanks alot -------------- next part -------------- An HTML attachment was scrubbed... URL: From rendezvous at dreamxplosion.com Thu Feb 10 10:42:01 2005 From: rendezvous at dreamxplosion.com (Marius S Giurgi) Date: Thu, 10 Feb 2005 10:42:01 -0500 Subject: [vtkusers] using vtkImageReslice with external data arrays In-Reply-To: References: Message-ID: <69bb1610699366beb59aa857e98bb1d8@dreamxplosion.com> Hi, David As vtkImageReslice is mostly your creation I thought I'd ask the master a very specific question. Please give me a hint, at your own convenience. The application I am trying to develop is dealing with processing MRI data, and I am going to use the vtkImageReslice to mainly to introduce motion to the brain data (rotation/translation), and I'd like this motion computation to be as quick as possible. I have a pointer to the actual 3D brain image (directly read from the disk) as a set of 181x217x181 double array. This data gets altered throughout the application, therefore I need to have a pointer to it available, besides having it wrapped into a vtkImageData object. Eventually, I need to pass this data to the reslicer to put the motion in, therefore I was wondering how can I get a hold on a pointer to the reslicer output data. I know I could use the vtkImageExport to get a hold on that pointer, but my question is does this pointer remain the same once I create the reslicer and produce its output? Say, I use the importer to wrap my data into a vtkImageData, pass it to the vtkImageReslice, and then get its output, and finally use the exporter to get the pointer to the output data. If I modify the transformation matrix connected to vtkImageReslice and have the result updated, will the output go into the same place so I can access it through the same pointer? To put it shortly, I'd like to have two pointers, one to the input data and one to the output data and let the vtkImageReslice do the work, avoiding any unnecessary copy of data. Eventually, the rigid rotation is just value mapping of an input grid onto an output grid, right? marius "To be really medieval, one should have no body. To be really modern, one should have no soul. To be really Greek, one should have no clothes." -- Oscar Wilde -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1881 bytes Desc: not available URL: From gatos12 at hotmail.com Thu Feb 10 12:44:54 2005 From: gatos12 at hotmail.com (Gatos Gatos) Date: Thu, 10 Feb 2005 17:44:54 +0000 Subject: [vtkusers] what is the best way to create a mesh? Message-ID: Hi, I'm new to VTK, and i have a few different questions. and I would like to know what is the best (faster) way and how to display a 3D volume surfaces? I have points that are from the surface of a cylindrical curved object. Do you think the best way to create the surface is by generating triangles? I have to take in account, a lot the speed because it would be more than 5000 cylinders with approximately 32 points each. Also I have to change the properties (etc...color) of each surface. thank you very much kostas From pier_jan at hotmail.com Thu Feb 10 13:55:49 2005 From: pier_jan at hotmail.com (Pierre-Jean Boulianne) Date: Thu, 10 Feb 2005 13:55:49 -0500 Subject: [vtkusers] Moving image in vtkimageviewer Message-ID: An HTML attachment was scrubbed... URL: From dgobbi at atamai.com Thu Feb 10 14:32:58 2005 From: dgobbi at atamai.com (David Gobbi) Date: Thu, 10 Feb 2005 14:32:58 -0500 (EST) Subject: [vtkusers] Re: using vtkImageReslice with external data arrays In-Reply-To: <69bb1610699366beb59aa857e98bb1d8@dreamxplosion.com> Message-ID: See below for replies to your questions. On Thu, 10 Feb 2005, Marius S Giurgi wrote: > Hi, David > > As vtkImageReslice is mostly your creation I thought I'd ask the master > a very specific question. > Please give me a hint, at your own convenience. > > The application I am trying to develop is dealing with processing MRI > data, and I am going to use the vtkImageReslice to mainly to introduce > motion to the brain data (rotation/translation), and I'd like this > motion computation to be as quick as possible. I have a pointer to the > actual 3D brain image (directly read from the disk) as a set of > 181x217x181 double array. This data gets altered throughout the > application, therefore I need to have a pointer to it available, > besides having it wrapped into a vtkImageData object. Eventually, I > need to pass this data to the reslicer to put the motion in, therefore > I was wondering how can I get a hold on a pointer to the reslicer > output data. I know I could use the vtkImageExport to get a hold on > that pointer, but my question is does this pointer remain the same once > I create the reslicer and produce its output? The pointer to the output data changes every time the Extent of the output changes. So, if you update the whole extent once, get the pointer, and then make sure the extent never changes, it should work. But isn't very safe! Also, note that with vtkImageExport, if you want to get a pointer without copying any data, you have to use the GetPointerToData() method and not the GetExportVoidPointer() method. > Say, I use the importer to wrap my data into a vtkImageData, pass it to > the vtkImageReslice, and then get its output, and finally use the > exporter to get the pointer to the output data. If I modify the > transformation matrix connected to vtkImageReslice and have the result > updated, will the output go into the same place so I can access it > through the same pointer? As long as the Output's Extent never changes, it should work. > To put it shortly, I'd like to have two pointers, one to the input data > and one to the output data and let the vtkImageReslice do the work, > avoiding any unnecessary copy of data. Eventually, the rigid rotation > is just value mapping of an input grid onto an output grid, right? Yes, but of course VTK is in control of the memory so you have to be careful. - David > > marius > > > "To be really medieval, one should have no body. To be really > modern, one should have no soul. To be really Greek, one should > have no clothes." > -- Oscar Wilde > From tdsternberg at lbl.gov Thu Feb 10 14:58:34 2005 From: tdsternberg at lbl.gov (Theodore Sternberg) Date: Thu, 10 Feb 2005 11:58:34 -0800 (PST) Subject: [vtkusers] pipeline introspection In-Reply-To: Message-ID: Is there any good way to make a VTK pipeline print out the names of its constituent sources, filters and sinks? Every VTK class has its PrintSelf() function. I guess the question is, does whatever GetOutput() returns know the object it belongs to? Theodore Sternberg Lawrence Berkeley National Laboratory From goodwin.lawlor at ucd.ie Thu Feb 10 15:34:57 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Thu, 10 Feb 2005 20:34:57 -0000 Subject: [vtkusers] Re: pipeline introspection References: Message-ID: Hi Theodore, vtkDataObject::GetSource() returns the filter that created the data object. There is a tool to do just this here: http://brighton.ncsa.uiuc.edu/prajlich/vtkPipeline/ I've noticed that the cvs vtk breaks this tool (a bit) hth Goodwin "Theodore Sternberg" wrote in message news:Pine.LNX.4.44.0502101153400.18669-100000 at hepburn.lbl.gov... > Is there any good way to make a VTK pipeline print out the names of its > constituent sources, filters and sinks? Every VTK class has its > PrintSelf() function. I guess the question is, does whatever GetOutput() > returns know the object it belongs to? > > Theodore Sternberg > Lawrence Berkeley National Laboratory > > > _______________________________________________ > 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 > From kplusplus at comcast.net Thu Feb 10 23:11:22 2005 From: kplusplus at comcast.net (kplusplus at comcast.net) Date: Thu, 10 Feb 2005 22:11:22 -0600 Subject: [vtkusers] I'm a vtk newbie, having a problem with vtkLODProp3D Message-ID: <420C306A.6030107@comcast.net> I'm writing my first vtk app in C++ and am running into a problem. I'm rendering a pretty large dataset on my not-very-powerful computer, so I need multiple levels of detail a-la ParaView, so I initially tried to use vtkLODActor. I didn't like the dot field visualization, so I decided to go to vtkLODProp3D instead. When I compile and run the program, it displays the high-detail version, which it's supposed to do. When I rotate it or zoom in for the first time, it switches to the low-detail verison and back to high detail when I stop moving the dataset. However, the next time I try to move it, the visualization "stutters" (actually, it can't decide between high- and low-detail for a couple seconds) and then permanently switches to low detail. This, of course, is not good. Here are (what I think are) the relevant lines: renWinInteractor->SetDesiredUpdateRate(5.0); renWinInteractor->SetStillUpdateRate(0.5); renWinInteractor->Initialize(); ..... vtkLODProp3D *prop = vtkLODProp3D::New(); prop->AddLOD(highMapper, 5.0); prop->AddLOD(lowMapper, 0.5); ren->AddActor(prop); I'm thinking I might be having a problem getting my head around the "time" arguments to SetDesiredUpdateRate/SetStillUpdateRate/AddLOD. Do they look proper? If so, what's causing my visualization to get all wonky? If not, how do I fix 'em? Thanks in advance, -- edk From moehl at akaflieg.extern.tu-berlin.de Fri Feb 11 03:53:13 2005 From: moehl at akaflieg.extern.tu-berlin.de (Torsten Sadowski) Date: Fri, 11 Feb 2005 09:53:13 +0100 (CET) Subject: [vtkusers] vtk, wx, MacOSX Message-ID: Hi, I'm trying to use my wx/vtk app under MacOSX and have the Problem that I don't get any OpenGL output. I just get a blank window (the same with wxVTKRenderWindow.py). Some investigations with Apple's OpenGL Profiler showed that 2 (two) OpenGL Contexts exist with only one used and probably the other one displayed. It seems that vtk doesn't get the wx GL Context and creates its own. Any Ideas why this is happening and how I could find a solution? Torsten From ljw at soc.soton.ac.uk Fri Feb 11 03:54:36 2005 From: ljw at soc.soton.ac.uk (Luke J West) Date: Fri, 11 Feb 2005 08:54:36 +0000 Subject: [vtkusers] vtkGetVector2Macro(name,vtkIdType); // Python Ouch!! Message-ID: <1108112076.420c72ccea60e@webmail.soc.soton.ac.uk> Hi folks, The vector accessor macros appear to make python fall over for the vtkIdType type. To demonstrate the effect, insert the following lines into your favourite class and rebuild with python wrapping on. Oh - I almost forgot - does anyone know a fix/workaround/hack for this? vtkIdType Example[2]; vtkGetVector2Macro(Example,vtkIdType); vtkSetVector2Macro(Example,vtkIdType); Luke J West : e-Science Research Assistant --------------------------------------------- Room 566/12, School of Ocean & Earth Sciences Southampton Oceanography Centre, Southampton SO14 3ZH United Kingdom --------------------------------------------- Tel: +44 23 8059 4801 Fax: +44 23 8059 3052 Mob: +44 79 6107 4783 Skype: ljwest --------------------------------------------- http://godiva.soc.soton.ac.uk/ From lachlan at chryatech.com.au Fri Feb 11 04:00:15 2005 From: lachlan at chryatech.com.au (Lachlan Blackhall) Date: Fri, 11 Feb 2005 10:00:15 +0100 Subject: [vtkusers] vtk, wx, MacOSX In-Reply-To: References: Message-ID: <06804fa554047ff7ada34bfa23761826@chryatech.com.au> You might try enclosing the script within a .app package. It seems this is necessary to allow proper registration of the graphics components with the operating system. Another option is to use a program like playtpus (free from version tracker) to wrap the code which should also ensure correct operating system registration of the program. hope it helps Lachlan On 11/02/2005, at 9:53 AM, Torsten Sadowski wrote: > Hi, > > I'm trying to use my wx/vtk app under MacOSX and have the Problem that > I > don't get any OpenGL output. I just get a blank window (the same with > wxVTKRenderWindow.py). Some investigations with Apple's OpenGL Profiler > showed that 2 (two) OpenGL Contexts exist with only one used and > probably > the other one displayed. It seems that vtk doesn't get the wx GL > Context > and creates its own. Any Ideas why this is happening and how I could > find > a solution? > > Torsten > > _______________________________________________ > 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 > From moehl at akaflieg.extern.tu-berlin.de Fri Feb 11 05:00:05 2005 From: moehl at akaflieg.extern.tu-berlin.de (Torsten Sadowski) Date: Fri, 11 Feb 2005 11:00:05 +0100 (CET) Subject: [vtkusers] vtk, wx, MacOSX In-Reply-To: <06804fa554047ff7ada34bfa23761826@chryatech.com.au> References: <06804fa554047ff7ada34bfa23761826@chryatech.com.au> Message-ID: Unluckily that is not the reason. The PyOpenGL demos and the wxPython demo work happily from the command line with pythonw. Torsten On Fri, 11 Feb 2005, Lachlan Blackhall wrote: > You might try enclosing the script within a .app package. > > It seems this is necessary to allow proper registration of the graphics > components with the operating system. > > Another option is to use a program like playtpus (free from version > tracker) to wrap > the code which should also ensure correct operating system registration > of the program. > > hope it helps > > Lachlan > > On 11/02/2005, at 9:53 AM, Torsten Sadowski wrote: > > > Hi, > > > > I'm trying to use my wx/vtk app under MacOSX and have the Problem that > > I > > don't get any OpenGL output. I just get a blank window (the same with > > wxVTKRenderWindow.py). Some investigations with Apple's OpenGL Profiler > > showed that 2 (two) OpenGL Contexts exist with only one used and > > probably > > the other one displayed. It seems that vtk doesn't get the wx GL > > Context > > and creates its own. Any Ideas why this is happening and how I could > > find > > a solution? > > > > Torsten > > > > _______________________________________________ > > 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 > > From moehl at akaflieg.extern.tu-berlin.de Fri Feb 11 05:04:22 2005 From: moehl at akaflieg.extern.tu-berlin.de (Torsten Sadowski) Date: Fri, 11 Feb 2005 11:04:22 +0100 (CET) Subject: [vtkusers] vtk's wx namespace collides with wx's wx Message-ID: Hi, after installing vtk I couldn't use my wxPython (2.5) anymore. The reason was the wx subdir in vtk_python which by importing overwrote the whole wx namespace which obviously does break some bits. Renaming the dir to wxvtk solved the issue. Torsten From ljw at soc.soton.ac.uk Fri Feb 11 05:06:03 2005 From: ljw at soc.soton.ac.uk (Luke J West) Date: Fri, 11 Feb 2005 10:06:03 +0000 Subject: [vtkusers] vtkGetVector2Macro(name,vtkIdType); // Python Ouch... Message-ID: <1108116363.420c838b2e63f@webmail.soc.soton.ac.uk> Hi folks, The vector accessor macros appear to make python fall over for the vtkIdType type. To demonstrate the effect, insert the following lines into your favourite class and rebuild with python wrapping on. I'm building on Linux(32) with 64bit Id's. Oh - I almost forgot - does anyone know a fix/workaround/hack for this? vtkIdType Example[2]; vtkGetVector2Macro(Example,vtkIdType); vtkSetVector2Macro(Example,vtkIdType); Luke J West : e-Science Research Assistant --------------------------------------------- Room 566/12, School of Ocean & Earth Sciences Southampton Oceanography Centre, Southampton SO14 3ZH United Kingdom --------------------------------------------- Tel: +44 23 8059 4801 Fax: +44 23 8059 3052 Mob: +44 79 6107 4783 Skype: ljwest --------------------------------------------- http://godiva.soc.soton.ac.uk/ From niemeijer at science-and-technology.nl Fri Feb 11 06:11:06 2005 From: niemeijer at science-and-technology.nl (Sander Niemeijer) Date: Fri, 11 Feb 2005 12:11:06 +0100 Subject: [vtkusers] vtk, wx, MacOSX In-Reply-To: Message-ID: Which versions of wxPython/VTK are you using? And are you using Carbon, Cocoa, or X11 (Gtk or Gtk2)? Best regards, Sander On vrijdag, feb 11, 2005, at 11:00 Europe/Amsterdam, Torsten Sadowski wrote: > Unluckily that is not the reason. The PyOpenGL demos and the wxPython > demo > work happily from the command line with pythonw. > > Torsten > > On Fri, 11 Feb 2005, Lachlan Blackhall wrote: > >> You might try enclosing the script within a .app package. >> >> It seems this is necessary to allow proper registration of the >> graphics >> components with the operating system. >> >> Another option is to use a program like playtpus (free from version >> tracker) to wrap >> the code which should also ensure correct operating system >> registration >> of the program. >> >> hope it helps >> >> Lachlan >> >> On 11/02/2005, at 9:53 AM, Torsten Sadowski wrote: >> >>> Hi, >>> >>> I'm trying to use my wx/vtk app under MacOSX and have the Problem >>> that >>> I >>> don't get any OpenGL output. I just get a blank window (the same with >>> wxVTKRenderWindow.py). Some investigations with Apple's OpenGL >>> Profiler >>> showed that 2 (two) OpenGL Contexts exist with only one used and >>> probably >>> the other one displayed. It seems that vtk doesn't get the wx GL >>> Context >>> and creates its own. Any Ideas why this is happening and how I could >>> find >>> a solution? >>> >>> Torsten >>> >>> _______________________________________________ >>> 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 >> >> > _______________________________________________ > 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 > From prabhu_r at users.sf.net Fri Feb 11 06:12:39 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Fri, 11 Feb 2005 16:42:39 +0530 Subject: [vtkusers] vtk's wx namespace collides with wx's wx In-Reply-To: References: Message-ID: <16908.37671.304618.543248@monster.linux.in> >>>>> "TS" == Torsten Sadowski writes: TS> Hi, after installing vtk I couldn't use my wxPython (2.5) TS> anymore. The reason was the wx subdir in vtk_python which by TS> importing overwrote the whole wx namespace which obviously TS> does break some bits. Renaming the dir to wxvtk solved the TS> issue. Huh? That looks like either a serious wxPython bug or a user error. I've never seen this bug under Linux or Win32. This is with wxPython 2.4.x and 2.5.x. cheers, prabhu From agalmat at hotmail.com Fri Feb 11 06:19:44 2005 From: agalmat at hotmail.com (Alejandro Galindo Mateo) Date: Fri, 11 Feb 2005 12:19:44 +0100 Subject: [vtkusers] BuildLocator Message-ID: Hello VTK users, I?m a beginner and I don?t know what does the following sentence mean: "These methods are thread safe if BuildLocator() is directly or indirectly called from a single thread fisrt" This sentence is related to the class vtkPointLocator and the function FindPointsWithinRadius What I have to do with BuildLocator? Have I to call it in other part of my code? Thanks, From moehl at akaflieg.extern.tu-berlin.de Fri Feb 11 06:21:33 2005 From: moehl at akaflieg.extern.tu-berlin.de (Torsten Sadowski) Date: Fri, 11 Feb 2005 12:21:33 +0100 (CET) Subject: [vtkusers] vtk, wx, MacOSX In-Reply-To: References: Message-ID: It's the latest wxPython-unicode 2.5.3 which is as far as I know Carbon and VTK 4.4 compiled for Carbon. wxCocoa is still in its infancy. Everything is running under 10.3.8. HTH, Torsten On Fri, 11 Feb 2005, Sander Niemeijer wrote: > Which versions of wxPython/VTK are you using? > And are you using Carbon, Cocoa, or X11 (Gtk or Gtk2)? > > Best regards, > Sander > > On vrijdag, feb 11, 2005, at 11:00 Europe/Amsterdam, Torsten Sadowski > wrote: > > > Unluckily that is not the reason. The PyOpenGL demos and the wxPython > > demo > > work happily from the command line with pythonw. > > > > Torsten > > > > On Fri, 11 Feb 2005, Lachlan Blackhall wrote: > > > >> You might try enclosing the script within a .app package. > >> > >> It seems this is necessary to allow proper registration of the > >> graphics > >> components with the operating system. > >> > >> Another option is to use a program like playtpus (free from version > >> tracker) to wrap > >> the code which should also ensure correct operating system > >> registration > >> of the program. > >> > >> hope it helps > >> > >> Lachlan > >> > >> On 11/02/2005, at 9:53 AM, Torsten Sadowski wrote: > >> > >>> Hi, > >>> > >>> I'm trying to use my wx/vtk app under MacOSX and have the Problem > >>> that > >>> I > >>> don't get any OpenGL output. I just get a blank window (the same with > >>> wxVTKRenderWindow.py). Some investigations with Apple's OpenGL > >>> Profiler > >>> showed that 2 (two) OpenGL Contexts exist with only one used and > >>> probably > >>> the other one displayed. It seems that vtk doesn't get the wx GL > >>> Context > >>> and creates its own. Any Ideas why this is happening and how I could > >>> find > >>> a solution? > >>> > >>> Torsten > >>> > >>> _______________________________________________ > >>> 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 > >> > >> > > _______________________________________________ > > 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 > > > > > From payman_vtk at yahoo.co.uk Fri Feb 11 07:07:21 2005 From: payman_vtk at yahoo.co.uk (payman labbaf) Date: Fri, 11 Feb 2005 12:07:21 +0000 (GMT) Subject: [vtkusers] vtkLookupTable-How to prevent a value from being mapped to colour array Message-ID: <20050211120721.24833.qmail@web26006.mail.ukl.yahoo.com> Dear Users, I appologise if this has already come up. I've mapped my colour array to my scalars and it's working fine. Now I need to exclude a particular scalar value (within our system called undefined value) from the mapping values. So colour mapping doesn't apply to that particular values. Because my dataset is referenced elsewhere in the program so I cannot make any changes at the dataset level (e.g blanking and etc...). Instead, I need to specify what value not to map in my lookup table. At the moment I know what table id is mapped to my undefined value I just need to know how to drop the colour table. p.s. I'm mapping values to tables implicitly as the number of tables is quite large. Many thanks --------------------------------- ALL-NEW Yahoo! Messenger - all new features - even more fun! -------------- next part -------------- An HTML attachment was scrubbed... URL: From moehl at akaflieg.extern.tu-berlin.de Fri Feb 11 07:50:25 2005 From: moehl at akaflieg.extern.tu-berlin.de (Torsten Sadowski) Date: Fri, 11 Feb 2005 13:50:25 +0100 (CET) Subject: [vtkusers] vtk's wx namespace collides with wx's wx In-Reply-To: <16908.37671.304618.543248@monster.linux.in> References: <16908.37671.304618.543248@monster.linux.in> Message-ID: It could be specific pythonw on Mac problem. .pth files seem to be ignored. I will ask on the pythonmac list. Torsten On Fri, 11 Feb 2005, Prabhu Ramachandran wrote: > >>>>> "TS" == Torsten Sadowski writes: > > TS> Hi, after installing vtk I couldn't use my wxPython (2.5) > TS> anymore. The reason was the wx subdir in vtk_python which by > TS> importing overwrote the whole wx namespace which obviously > TS> does break some bits. Renaming the dir to wxvtk solved the > TS> issue. > > Huh? That looks like either a serious wxPython bug or a user error. > I've never seen this bug under Linux or Win32. This is with wxPython > 2.4.x and 2.5.x. > > 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: > http://www.vtk.org/mailman/listinfo/vtkusers > > From niemeijer at science-and-technology.nl Fri Feb 11 09:10:51 2005 From: niemeijer at science-and-technology.nl (Sander Niemeijer) Date: Fri, 11 Feb 2005 15:10:51 +0100 Subject: [vtkusers] vtk, wx, MacOSX In-Reply-To: Message-ID: The last time I checked (which was indeed with wxPython 2.5.3 and VTK 4.4) wxVTK was not working for Carbon. As far as I know, nobody ever got it to work (it should be doable with the appropriate fixes to wxPython/VTK/wxVTK though). The main problem is that the wxWindow.GetHandle() function in wxPython does not return a proper handle yet and the wxVTKRenderWindowInteractor.py (which is what I was using instead of wxVTKRenderWindow.py) uses a vtkRenderWindow.WindowRemap() that is not supported on Carbon. For our project (VISAN: http://www.science-and-technology.nl/beat) I already moved to a C++ wxVTK class with my own Python wrapping so I could, among other things, get around the WindowRemap issue. However, I still haven't been able to get the Carbon build working. And while I am at it, I'll share with you the experiences I had with the other platforms: The Gtk-1.2 build in combination with my own Python wxVTK class still gives me problems on Mac OS X and Linux if I leave threading enabled in Python/wxWidgets. Unless I disable threads, when a vtkPythonCommand::Execute callback is called on one my own Python objects I receive a SEGFAULT (we are currently using Python 2.3.4 by the way): PyFrame_New (tstate=0x0, code=0x43997a20, globals=0x4187c3e4, locals=0x0) at Objects/frameobject.c:540 540 PyFrameObject *back = tstate->frame; Somehow the tstate (current Python thread state) is NULL, which should never be possible. I don't know whether this is a problem in wxPython, Python, or VTK, but if anyone can shed some light on this I would be happy to hear about it. I have also tried using GTK-2.0, but on both Linux and Mac OS X it gives me extreme cases of flickering with 2D plots and what looks like incorrect z-ordering for 3D visualizations. I haven't been able to figure out what was causing this. The Windows build is also still not perfect: VTK will sometimes give me a 'wglMakeCurrent failed in Clean()' error when I close a window (only happens when multiple wxVTK windows are open and occurs with both our own C++ wxVTK class as well as the wxVTKRenderWindowInteractor.py class). The program will however happily continue, so this is not a real show-stopper for us. Even considering all these problems, in the end we _did_ manage to create an application that uses a combination of wxPython and VTK (with VTK windows embedded in a wxWidgets window!) and is able to run on Linux, Mac OS X (using X11), and Windows. As far as I know, we are the only ones that ever got this to work. If there are other parties that also managed this, I would be extremely interested to hear about their experiences. Best regards, Sander Niemeijer On vrijdag, feb 11, 2005, at 12:21 Europe/Amsterdam, Torsten Sadowski wrote: > It's the latest wxPython-unicode 2.5.3 which is as far as I know Carbon > and VTK 4.4 compiled for Carbon. wxCocoa is still in its infancy. > Everything is running under 10.3.8. From madhu_lsu at yahoo.com Fri Feb 11 20:13:15 2005 From: madhu_lsu at yahoo.com (Madhusudhanan Balasubramanian) Date: Fri, 11 Feb 2005 17:13:15 -0800 (PST) Subject: [vtkusers] VolumePro 1000 Message-ID: <20050212011315.6018.qmail@web51709.mail.yahoo.com> Hi, Can someone give an example c/c++ program for a VolumePro? I couldn't find one with the built. Thanks very much, Madhu. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.mckay at unsw.edu.au Fri Feb 11 23:32:22 2005 From: e.mckay at unsw.edu.au (Erin McKay) Date: Sat, 12 Feb 2005 15:32:22 +1100 Subject: [vtkusers] Re: [solved] How can I insert a Tcl binary string into a vtkDataArray? Message-ID: <16BC179D-7CAF-11D9-BB6E-000A956D7C3E@unsw.edu.au> As noted previously, the vtkCharArray can be used with Tcl binary strings. But that's not the whole story. Thanks to HV for pointing me in the right direction... There is a SetArray interface in the vtkCharArrayTcl.cxx wrapping code. This interface works with the other array types as well but isn't included by default. To fix, just cut and paste a (slightly) modified version of this interface into each of the vtk*ArrayTcl.cxx files prior to making VTK. Here is the interface modified to suit the vtkFloatArray class. Note the reinterpret_cast - this is the only mod required. if ((!strcmp("SetArray",argv[1]))&&(argc == 5)) { char *temp0; long temp1; int temp2; error = 0; temp0 = argv[2]; if (Tcl_GetInt(interp,argv[3],&tempi) != TCL_OK) error = 1; temp1 = tempi; if (Tcl_GetInt(interp,argv[4],&tempi) != TCL_OK) error = 1; temp2 = tempi; if (!error) { op->SetArray(reinterpret_cast(temp0),temp1,temp2); Tcl_ResetResult(interp); return TCL_OK; } } Now, wouldn't it be nice if the wrapper generator did this for us? Erin McKay Senior Physicist Dept. Nuclear Medicine, St. George Hospital Sydney, Australia From hvidal at tesseract-tech.com Sat Feb 12 01:36:22 2005 From: hvidal at tesseract-tech.com (H.Vidal, Jr.) Date: Sat, 12 Feb 2005 01:36:22 -0500 Subject: [vtkusers] Re: [solved] How can I insert a Tcl binary string into a vtkDataArray? In-Reply-To: <16BC179D-7CAF-11D9-BB6E-000A956D7C3E@unsw.edu.au> References: <16BC179D-7CAF-11D9-BB6E-000A956D7C3E@unsw.edu.au> Message-ID: <420DA3E6.3070904@tesseract-tech.com> Erin McKay wrote: > As noted previously, the vtkCharArray can be used with Tcl binary > strings. But that's not the whole story. Thanks to HV for pointing me in > the right direction... Nothing like finding a working solution.......ahh, the simple things in life.... > > Now, wouldn't it be nice if the wrapper generator did this for us? I really want to spend the time to find out where the C++ interfaces are generated via cmake/make, then I guess we could just patch this once and for all and export these key missing interfaces.......is this sort of thing *well* documented somewhere? It almost seems like the char (byte) level interface to the array object was left out because char arrays are sort of 'special' in a string language like tcl; maybe exporting such an interface is considered kind of, uh, dangerous. Who knows. In any case, it's useful. Congrats! hv > > Erin McKay > Senior Physicist > Dept. Nuclear Medicine, St. George Hospital > Sydney, Australia > > _______________________________________________ > 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 > From prabhu_r at users.sf.net Sat Feb 12 06:49:48 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Sat, 12 Feb 2005 17:19:48 +0530 Subject: [vtkusers] vtk, wx, MacOSX In-Reply-To: References: Message-ID: <16909.60764.379891.368115@monster.linux.in> >>>>> "SN" == Sander Niemeijer writes: [...] SN> The Gtk-1.2 build in combination with my own Python wxVTK SN> class still gives me problems on Mac OS X and Linux if I leave SN> threading enabled in Python/wxWidgets. Unless I disable With Debian Sarge, using wxPython-2.4.2.6 via the libwxgtk2.4-python package, I use wxPython and VTK-4.4 fairly regularly. wxc.so links to libpthread so I'm guessing that wxPython is built with threads. No problems. This is even when I use wxPython and VTK interactively using IPython with the -wthread option. This is with GTK-1.2 and with the wxVTKRenderWindowInteractor.py from 4.4. [...] SN> The Windows build is also still not perfect: VTK will SN> sometimes give me a 'wglMakeCurrent failed in Clean()' error SN> when I close a window (only happens when multiple wxVTK SN> windows are open and occurs with both our own C++ wxVTK class SN> as well as the wxVTKRenderWindowInteractor.py class). The SN> program will however happily continue, so this is not a real SN> show-stopper for us. Hmm, using the Enthought enhanced Python build works perfectly for me under win32 + wxPython-2.4.x + VTK 4.4. cheers, prabhu From StephanTheisen at gmx.de Sat Feb 12 09:06:19 2005 From: StephanTheisen at gmx.de (Stephan Theisen) Date: Sat, 12 Feb 2005 15:06:19 +0100 Subject: [vtkusers] ImageReader don't work Message-ID: <420E0D5B.2050206@gmx.de> Hi together! I've a little problem with my ImageReader. I've a number slices which I will read in as a volume. So I implemented the the vtkImageReader function in my programm. But all what I get is a black screen. Is anything wrong in the following source code: vtkImageReader2 ireader = new vtkImageReader2(); ireader.SetDataExtent(0,512,0,512,1,30); ireader.SetDataSpacing(0.488,0.488,1.0); ireader.SetFilePrefix("G:/CT-BilderTiffumbenannt/basename"); ireader.SetFilePattern("%s%i.tif"); ireader.SetFileDimensionality(3); vtkContourFilter skinExtractor = new vtkContourFilter(); skinExtractor.SetInput(ireader.GetOutput()); skinExtractor.SetValue(0,1150); vtkDecimatePro skinDeci = new vtkDecimatePro(); skinDeci.SetInput(skinExtractor.GetOutput()); skinDeci.SetTargetReduction(0.9); skinDeci.SetFeatureAngle(50.0); skinDeci.SplittingOff(); skinDeci.AccumulateErrorOn(); skinDeci.SetMaximumError(0.2); skinDeci.PreserveTopologyOn(); vtkSmoothPolyDataFilter smoother = new vtkSmoothPolyDataFilter(); smoother.SetInput(skinDeci.GetOutput()); smoother.SetNumberOfIterations(50); vtkPolyDataNormals skinNormals = new vtkPolyDataNormals(); skinNormals.SetInput(smoother.GetOutput()); skinNormals.SetFeatureAngle(50.0); vtkPolyDataMapper skinMapper = new vtkPolyDataMapper(); skinMapper.SetInput(skinNormals.GetOutput()); skinMapper.ScalarVisibilityOff(); vtkActor skin = new vtkActor(); skin.SetMapper(skinMapper); skin.GetProperty().SetDiffuseColor(1, .49, .25); skin.GetProperty().SetSpecular(.3); skin.GetProperty().SetSpecularPower(20); skin.GetProperty().SetOpacity(1.0); renWin.GetRenderer().AddActor(skin); The rest of the programm is still works with a volumereader, but now I must use an imagereader. Thanks in advance Stephan From jbw at ieee.org Sat Feb 12 09:20:03 2005 From: jbw at ieee.org (Jeremy Winston) Date: Sat, 12 Feb 2005 09:20:03 -0500 Subject: [vtkusers] ImageReader don't work In-Reply-To: <420E0D5B.2050206@gmx.de> References: <420E0D5B.2050206@gmx.de> Message-ID: <420E1093.8000109@ieee.org> Stephan Theisen wrote: > > I've a little problem with my ImageReader. I've a number slices which I > will read in as a volume. So I implemented the > the vtkImageReader function in my programm. But all what I get is a > black screen. Is anything wrong in the following > source code: > > vtkImageReader2 ireader = new vtkImageReader2(); > ireader.SetDataExtent(0,512,0,512,1,30); > ireader.SetDataSpacing(0.488,0.488,1.0); > ireader.SetFilePrefix("G:/CT-BilderTiffumbenannt/basename"); > ireader.SetFilePattern("%s%i.tif"); vtkImageReader is meant to be subclassed for the specific file type. In your case, you're reading TIFFs, so you should instead use vtkTIFFReader ireader = new vtkTIFFReader(); Cf. http://www.vtk.org/doc/nightly/html/classvtkImageReader2.html and http://www.vtk.org/doc/nightly/html/classvtkTIFFReader.html Also, I note your x,y data extent is [0,512]. Likely it's [0,511], no? HTH, -Jeremy From jbw at ieee.org Sat Feb 12 13:55:28 2005 From: jbw at ieee.org (Jeremy Winston) Date: Sat, 12 Feb 2005 13:55:28 -0500 Subject: [vtkusers] ImageReader don't work In-Reply-To: <420E0D5B.2050206@gmx.de> References: <420E0D5B.2050206@gmx.de> Message-ID: <420E5120.3080404@ieee.org> Stephan Theisen wrote: > Hi together! > > I've a little problem with my ImageReader. I've a number slices which I > will read in as a volume. So I implemented the > the vtkImageReader function in my programm. But all what I get is a > black screen. A black screen may also be an indication that your contour filter threshold(s) is(are) outside your data values. -Jeremy From toreaur at stud.ntnu.no Sat Feb 12 17:12:22 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Sat, 12 Feb 2005 23:12:22 +0100 (MET) Subject: [vtkusers] Error when running vtk Message-ID: I can now run VTK with the Tcl examples, but not run Python. Here is the error that always shows up: File "/usr/local/lib/python2.3/site-packages/vtk_python/vtk/__init__.py", line 27, in ? from common import * File "/usr/local/lib/python2.3/site-packages/vtk_python/vtk/common.py", line 7, in ? from libvtkCommonPython import * ImportError: /usr/local/lib/python2.3/site-packages/vtk_python/libvtkCommonPython.so: undefined symbol: _ZN17vtkStructuredGrid10BlankingOnEv Tore Aurstad From g5 at iamganesh.com Sun Feb 13 04:51:39 2005 From: g5 at iamganesh.com (Ganesh Swami) Date: Sun, 13 Feb 2005 01:51:39 -0800 Subject: [vtkusers] vtkPolyData and vtkGlyph3D problems Message-ID: <16911.9003.544831.322775@localhost.localdomain> Hi, I'm trying to visualize a set of vectors in 3D space, scaled by magnitude. After a bit of reading, I realized that vtkGlyph3D with vtkArrowSource would be an ideal solution. Unfortunately, I'm not able to get it working. Here's some sample code: vtkPoints *points; vtkFloatArray *values; vtkPolyData *pointset; points = vtkPoints::New (); values = vtkFloatArray::New (); pointset = vtkPolyData::New (); points->SetNumberOfPoints (3); values->SetNumberOfComponents (3); for (int i=0; i<3; i++) { points->SetPoint (i, i+1, 0.0, 0.0); values->InsertTuple3 (i, 1.0, 0.0, 0.0); } pointset->SetPoints (points); vtkPointData *pointdata; pointdata = pointset->GetPointData (); pointdata->SetVectors (values); <....> I create my glyphs, mappers and actors the usual way. With the data above, I'm supposed to see three arrows points in the direction <1,0,0> and with positions <1,0,0> <2,0,0> <3,0,0>. But all I see is three overlapping arrows at the position <1,0,0>. I'd be grateful if somebody points out what I'm doing wrong. Thanks in advance, Ganesh From toreaur at stud.ntnu.no Sun Feb 13 17:11:00 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Sun, 13 Feb 2005 17:11:00 -0500 Subject: [vtkusers] Still having difficulties installing vtk Message-ID: <1108332660.3599.4.camel@hivemind> Hi, I recently updated from Fedora Core 2 to Fedora Core 3. The FC3 uses xorg and not xfree86 as wm. When I try to install I get an error with libvtkRendering.so and it cannot find the X11ext symbols necessary. Anybody had luck with installing VTK on FC3 recently? I just run cmake -i and use default plus enable python support and then cmake . then i run make and the errors pops up because the symbols cannot be found. If anybody has managed to install VTK on FC3 that would be nice to hear, or else I must try another distribution of Linux (again..) Tore Aurstad From toreaur at stud.ntnu.no Sun Feb 13 20:04:47 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Mon, 14 Feb 2005 02:04:47 +0100 Subject: [vtkusers] Still having difficulties installing vtk In-Reply-To: <20050213171346.GF25131@nyongwa.montreal.qc.ca> References: <1108332660.3599.4.camel@hivemind> <20050213171346.GF25131@nyongwa.montreal.qc.ca> Message-ID: <1108343087.420ff92feffc8@webmail.ntnu.no> Well,now I finally got Debian 3.0 up, i had problems getting my nic card up, and apt-get should help me out nicely as it looks from here. I find debian packages for all my needed programs, so hopefully I can install VTK directly from such packages. (apt-cache search reveals them all). I also think the main reason is that VTK is not working FC3 is that FC3 uses Xorg and FC2 uses XFree86. Let's hope that FC4 (future fedora projects) will make it simpler to install VTK. Tore Aurstad Norway Sitat "Steve M. Robbins" : > Hi Tore, > > I'm using FC2, not FC3, so I can't answer your specific question. > > However, it's not clear whether you're starting off from a clean VTK > directory or re-using an old one. If it's the second case, it's > worth > trying a completely fresh unpacking of the VTK sources as there might > be partially-built sources that aren't getting recompiled. > > > On Sun, Feb 13, 2005 at 05:11:00PM -0500, Tore Aurstad wrote: > > Hi, I recently updated from Fedora Core 2 to Fedora Core 3. > > > > The FC3 uses xorg and not xfree86 as wm. When I try to install I > > get an error with libvtkRendering.so and it cannot find the > > X11ext symbols necessary. > > That's a bit vague. > See http://www.catb.org/~esr/faqs/smart-questions.html > > Be sure you have the correct -devel package for libXext. Then > pick one of the missing symbols and go looking for it in the X11 > libraries. Google might help; look through the source if you have > to. > > > If anybody has managed to install VTK on FC3 that would be nice to > hear, > > or else I must try another distribution of Linux (again..) > > Or revert to FC2, since it definitely works there. ;-) > > Good Luck! > > -Steve > From vogler at calcreek.com Mon Feb 14 00:24:19 2005 From: vogler at calcreek.com (Bill Vogler) Date: Sun, 13 Feb 2005 21:24:19 -0800 Subject: [vtkusers] Unresolved External Symbols Message-ID: <029c01c51255$7eed53d0$8e21d0ce@GOPHER> I am having problems during the link phase of my application on MSV C++ V6.0. I am getting the LNK2001 link error "Unresolved external symbol" and it is associated with the following three member functions: vtkObject::PrintTrailer vtkObject::PrintHeader vtkInteractorStyleTrackball::PrintSelf This problem appeared after I defined VTK_USE_ANSI_STDLIB so I could build my app using STL (i.e., std::ostream). Interestingly enough these member functions in question are associated with the output stream ostream. Is anyone out there in vtk-land know what is happening in this situation? I've seen similar posts on this subject to this group, but I could not find any responses to those threads. TIA Bill Vogler Calabazas Creek Research (530) 642-1955 Voice (530) 642-9614 Fax vogler at calcreek.com From klocke at rob.uni-luebeck.de Mon Feb 14 06:25:10 2005 From: klocke at rob.uni-luebeck.de (Sebastian Klocke) Date: Mon, 14 Feb 2005 12:25:10 +0100 Subject: [vtkusers] Empty cut through different Images Message-ID: <42108A96.3090101@rob.uni-luebeck.de> Hi everybody, I'm using vtkImageReslice to get slices out of different vtkImageData objects. I use an ImplicitPlaneWidget to get the cutting plane, then apply it to each imageData in a vtkDataSetCollection. Now my problem: when the cutting plane is on the outside of one of the images, I get an empty slice over the whole output extent, which hides part of the output for other images. SetBackgroundLevel/Color for ImageReslice did not work for me, could someone please give me other ideas how to hide or avoid an empty slice? Thanks Sebastian From niemeijer at science-and-technology.nl Mon Feb 14 08:29:03 2005 From: niemeijer at science-and-technology.nl (Sander Niemeijer) Date: Mon, 14 Feb 2005 14:29:03 +0100 Subject: [vtkusers] vtk, wx, MacOSX In-Reply-To: <16909.60764.379891.368115@monster.linux.in> Message-ID: <650CF50A-7E8C-11D9-B387-00039383F730@science-and-technology.nl> > SN> The Gtk-1.2 build in combination with my own Python wxVTK > SN> class still gives me problems on Mac OS X and Linux if I leave > SN> threading enabled in Python/wxWidgets. Unless I disable > > With Debian Sarge, using wxPython-2.4.2.6 via the libwxgtk2.4-python > package, I use wxPython and VTK-4.4 fairly regularly. wxc.so links to > libpthread so I'm guessing that wxPython is built with threads. No > problems. This is even when I use wxPython and VTK interactively > using IPython with the -wthread option. This is with GTK-1.2 and with > the wxVTKRenderWindowInteractor.py from 4.4. But are you using the 'AddObserver' functionality to catch 'UserEvent' events and use a Python function as observer? If you don't use this, everything works fine, for sure. It is because of the broken observer functionality that we were forced to disable threads. > [...] > SN> The Windows build is also still not perfect: VTK will > SN> sometimes give me a 'wglMakeCurrent failed in Clean()' error > SN> when I close a window (only happens when multiple wxVTK > SN> windows are open and occurs with both our own C++ wxVTK class > SN> as well as the wxVTKRenderWindowInteractor.py class). The > SN> program will however happily continue, so this is not a real > SN> show-stopper for us. > > Hmm, using the Enthought enhanced Python build works perfectly for me > under win32 + wxPython-2.4.x + VTK 4.4. The last time I checked, Enthought was still using VTK 4.2 (see also http://www.enthought.com/downloads/downloads.htm). And the Enthought guys also applied some patches of their own to that version of VTK (AFAIKR one was also related to the problem I mentioned). And are you using VTK windows embedded in wxWidget windows/frames (i.e. combined with menus, buttons, etc.)? And are you using an application that is able to display multiple wxVTK windows that can be closed in any order by the user? These two facts are important if you want to reproduce the problem I mentioned. Best regards, Sander From prabhu_r at users.sf.net Mon Feb 14 09:08:34 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Mon, 14 Feb 2005 19:38:34 +0530 Subject: [vtkusers] vtk, wx, MacOSX In-Reply-To: <650CF50A-7E8C-11D9-B387-00039383F730@science-and-technology.nl> References: <16909.60764.379891.368115@monster.linux.in> <650CF50A-7E8C-11D9-B387-00039383F730@science-and-technology.nl> Message-ID: <16912.45282.976687.471239@monster.linux.in> >>>>> "SN" == Sander Niemeijer writes: SN> The Gtk-1.2 build in combination with my own Python wxVTK SN> class still gives me problems on Mac OS X and Linux if I leave SN> threading enabled in Python/wxWidgets. Unless I disable >> >> With Debian Sarge, using wxPython-2.4.2.6 via the >> libwxgtk2.4-python package, I use wxPython and VTK-4.4 fairly >> regularly. wxc.so links to libpthread so I'm guessing that >> wxPython is built with threads. No problems. This is even >> when I use wxPython and VTK interactively using IPython with >> the -wthread option. This is with GTK-1.2 and with the >> wxVTKRenderWindowInteractor.py from 4.4. SN> But are you using the 'AddObserver' functionality to catch SN> 'UserEvent' events and use a Python function as observer? If SN> you don't use this, everything works fine, for sure. It is SN> because of the broken observer functionality that we were SN> forced to disable threads. I don't catch 'UserEvent' but rely on the event mechanism for the standard messages a *lot* (yes, with Python callbacks). So yes, I do use observers but not for the 'UserEvent'. >> Hmm, using the Enthought enhanced Python build works perfectly >> for me under win32 + wxPython-2.4.x + VTK 4.4. SN> The last time I checked, Enthought was still using VTK 4.2 SN> (see also http://www.enthought.com/downloads/downloads.htm). That is correct. I am using a more recent version that was announced for testing on the scipy-dev list. This ships with 4.4. I believe a final release of this might be available sometime soon. SN> And the Enthought guys also applied some patches of their own SN> to that version of VTK (AFAIKR one was also related to the SN> problem I mentioned). And are you using VTK windows embedded SN> in wxWidget windows/frames (i.e. combined with menus, SN> buttons, etc.)? And are you using an application that is able SN> to display multiple wxVTK windows that can be closed in any SN> order by the user? These two facts are important if you want SN> to reproduce the problem I mentioned. The first yes, the second I have to admit, I have not tried. I.e. I do embed a VTK widget into a native wxWidget but I haven't added multiple widgets that I close arbitrarily. I do know of some folks who do embed multiple VTK windows in their apps. I don't think they close these windows in an arbitrary order though. cheers, prabhu From mathieu.malaterre at kitware.com Mon Feb 14 09:05:51 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 14 Feb 2005 09:05:51 -0500 Subject: [vtkusers] Unresolved External Symbols In-Reply-To: <029c01c51255$7eed53d0$8e21d0ce@GOPHER> References: <029c01c51255$7eed53d0$8e21d0ce@GOPHER> Message-ID: <4210B03F.4000306@kitware.com> Bill, You should only be changing: VTK_USE_ANSI_STDLIB within the Cmake interface. If you do so cmake will force you to do a complete rebuild and you won't have this problem of undefined symboles anymore. HTH Mathieu Bill Vogler wrote: > I am having problems during the link phase of my application on MSV C++ > V6.0. I am getting the LNK2001 link error "Unresolved external symbol" and > it is associated with the following three member functions: > > vtkObject::PrintTrailer > vtkObject::PrintHeader > vtkInteractorStyleTrackball::PrintSelf > > This problem appeared after I defined VTK_USE_ANSI_STDLIB so I could build > my app using STL (i.e., std::ostream). Interestingly enough these member > functions in question are associated with the output stream ostream. > > Is anyone out there in vtk-land know what is happening in this situation? > I've seen similar posts on this subject to this group, but I could not find > any responses to those threads. > > TIA > > Bill Vogler > Calabazas Creek Research > (530) 642-1955 Voice > (530) 642-9614 Fax > vogler at calcreek.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 > From mathieu.malaterre at kitware.com Mon Feb 14 09:14:24 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 14 Feb 2005 09:14:24 -0500 Subject: [vtkusers] Still having difficulties installing vtk In-Reply-To: <1108332660.3599.4.camel@hivemind> References: <1108332660.3599.4.camel@hivemind> Message-ID: <4210B240.4000508@kitware.com> Tore Aurstad wrote: > Hi, I recently updated from Fedora Core 2 to Fedora Core 3. > > The FC3 uses xorg and not xfree86 as wm. When I try to install I > get an error with libvtkRendering.so and it cannot find the > X11ext symbols necessary. Tore, Again could be more precise, we need some log file/exact error message, otherwise nobody will be able to help you. As a side note VTK build on a lot of *nix plateform with different X implementation, so I don't see why xorg would cause any particular problem. Thanks Mathieu From jbw at ieee.org Mon Feb 14 09:47:37 2005 From: jbw at ieee.org (Jeremy Winston) Date: Mon, 14 Feb 2005 09:47:37 -0500 Subject: [vtkusers] ImageReader don't work In-Reply-To: <420E0D5B.2050206@gmx.de> References: <420E0D5B.2050206@gmx.de> Message-ID: <4210BA09.4040405@ieee.org> Stephan Theisen wrote: > [...] > But all what I get is a black screen. > Is anything wrong in the following source code: > > vtkImageReader2 ireader = new vtkImageReader2(); > [...] > ireader.SetFileDimensionality(3); ^^^^^^^^^^^^^^^^^^^^^^^^ I think this line is the problem. The dimensionality of a given TIFF file is 2, not three. I.e., all three dimensions of the volume data set do not reside in a single file. Try removing this line. Cf. http://www.vtk.org/doc/nightly/html/classvtkImageReader2.html#z3102_0 -Jeremy From vhonnet at freenet.de Mon Feb 14 10:06:06 2005 From: vhonnet at freenet.de (Vincent Honnet) Date: Mon, 14 Feb 2005 16:06:06 +0100 Subject: [vtkusers] Pixel buffer to vtkContourFilter Message-ID: <4210BE5E.3090801@freenet.de> Hello, I'm trying to give to vtk a 3D pixelbuffer in order to extract some isosurface. But it crashes at the execution. Could you help me ? Thanks a lot in advance for your help. Vincent. Here is the source code: vtkImageImport *import = vtkImageImport::New(); int width = GetOriginalSlicesWidth(); int height =GetOriginalSlicesHeight(); float *imagePositionPatient = GetImagePositionPatient(0); import -> SetDataOrigin(imagePositionPatient[0], imagePositionPatient[1], imagePositionPatient[2]); import -> SetDataSpacing (GetSlicesXPixelspacing(), GetSlicesYPixelspacing(), GetSliceThickness()); import -> SetNumberOfScalarComponents(GetNumberOfOriginalSlices()); import -> SetDataExtent(0,width, 0,height, 0, GetNumberOfOriginalSlices() ); import -> SetWholeExtent(0,width, 0,height, 0, GetNumberOfOriginalSlices() ); switch(GetSlicesDepth()) { case 8: { if(GetPixelRepresentation() == 0) import->SetDataScalarType(VTK_UNSIGNED_CHAR); else import->SetDataScalarType(VTK_CHAR); break; } case 16: { if (GetPixelRepresentation() == 0) import->SetDataScalarType(VTK_UNSIGNED_SHORT); else import->SetDataScalarType(VTK_SHORT); break; } default: { std::cout << "Only 8 and 16 bits can be extracted, sorry !"; return; } } //here I convert my buffers in one buffer for vtk ..... // import->SetImportVoidPointer(vtkPointer); import->Update(); vtkContourFilter *extractor = vtkContourFilter::New(); extractor->SetInput( import->GetOutput()); extractor->SetValue(0, extractValue); vtkPolyDataNormals *normals = vtkPolyDataNormals::New(); normals->SetInput(extractor->GetOutput()); normals->SetFeatureAngle(60.0); vtkStripper *stripper = vtkStripper::New(); stripper->SetInput(normals->GetOutput()); stripper->Update(); vtkPolyData *stripsPolyData = stripper->GetOutput(); vtkCellArray * stripsCellArray = stripsPolyData->GetStrips(); From bant1708 at yahoo.com.br Mon Feb 14 13:19:13 2005 From: bant1708 at yahoo.com.br (Bruno) Date: Mon, 14 Feb 2005 15:19:13 -0300 Subject: [vtkusers] Vtk on linux Message-ID: <4210EBA1.1010409@yahoo.com.br> Hello, I want to create a program using C++ and VTK on Linux, using a visual interface on KDE. I tried the sphere example with KDevelop and QT. It worked, but when I press the button to show the Render Window, the main window of my program and all of its buttons become unvaliable, i.e, I can't push any other button or access any menu of the window. To do these things, I must close the Render Window. What should I do to solve this problem? thanks, Bruno. From nikolaus.heger at gmail.com Mon Feb 14 13:46:31 2005 From: nikolaus.heger at gmail.com (Nikolaus Heger) Date: Mon, 14 Feb 2005 10:46:31 -0800 Subject: [vtkusers] vtkImageViewer2 OS X display problem Message-ID: <0de571b9f87933043ae7a4b496480df0@gmail.com> hello! i compiled vtk 4.4 on OS X, and i can run all tests and all examples. i am running VTK via Python 2.3 TclTkAquaBI-8.4.9.0 the problem now is that the images displayed in either vtkImageViewer2 or using a vtkImageActor appear very garbled. attached - in case this mailing list allows attachments - is an image of the last supper, as it appears on screen on my mac in either vtkImageViewer2 or vktImageActor -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 477 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: garbled_supper.png Type: image/png Size: 20814 bytes Desc: not available URL: -------------- next part -------------- the same image appears normally using vtkImageViewer (not 2) and writing it out to disk. i also noticed that when i resize the widget containing the image, sometimes it suddenly appears rendered correctly. zoom / pan / rotate have no effect on the bug: if the image is garbled, it zooms/pans/rotates garbled as well, if it's ok it zooms/pans/rotates ok too. more often than not the image is garbled. this is on a powerbook G4 with ATI Rage M6 on OS X 10.3.8. my main suspect is the graphics card / OpenGL implementation. does anybody have experience with this / know what's going on? thanks!! nik -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 615 bytes Desc: not available URL: From agalmat at hotmail.com Mon Feb 14 13:58:56 2005 From: agalmat at hotmail.com (Alejandro Galindo Mateo) Date: Mon, 14 Feb 2005 19:58:56 +0100 Subject: [vtkusers] How to get points from VtkPolyData Message-ID: Hello VTK users, I have a vtkPolyData with points, polygons and scalars and I only want the points with the scalars. I tried with: vtkPolyData data data SetPoints [[Filter GetOutput] GetPoints] for the points and: [data GetPointData] SetScalars [[[Filter GetOutput] GetPointData] GetScalars] for the scalars. [Filter GetOutput] is a vtkPolyData and it?s not empy because I can render it with a mapper and the data is represented correctly. But the result is that the vtkPolyData data is empty. I would like to know if I need to do another thing to copy the points. Thanks for all, From nikolaus.heger at gmail.com Mon Feb 14 14:01:15 2005 From: nikolaus.heger at gmail.com (Nikolaus Heger) Date: Mon, 14 Feb 2005 11:01:15 -0800 Subject: [vtkusers] vtkImageViewer2 OS X display problem Message-ID: hello! i compiled vtk 4.4 on OS X, and i can run all tests and all examples. i am running VTK via Python 2.3 TclTkAquaBI-8.4.9.0 the problem now is that the images displayed in either vtkImageViewer2 or using a vtkImageActor appear very garbled. the same image appears normally using vtkImageViewer (not 2) and writing it out to disk. i also noticed that when i resize the widget containing the image, sometimes it suddenly appears rendered correctly. zoom / pan / rotate have no effect on the bug: if the image is garbled, it zooms/pans/rotates garbled as well, if it's ok it zooms/pans/rotates ok too. more often than not the image is garbled. this is on a powerbook G4 with ATI Rage M6 on OS X 10.3.8. my main suspect is the graphics card / OpenGL implementation. does anybody have experience with this / know what's going on? thanks!! nik -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 921 bytes Desc: not available URL: From kmorel at sandia.gov Mon Feb 14 14:05:26 2005 From: kmorel at sandia.gov (Moreland, Kenneth) Date: Mon, 14 Feb 2005 12:05:26 -0700 Subject: [vtkusers] How to get points from VtkPolyData Message-ID: <7137A9E1D1768C44BE7DF11D30FAB32307318B@ES21SNLNT.srn.sandia.gov> Did you call the Update method on the filter? The poly data mapper will do that before the first render, but if you otherwise want to inspect the data, you need to make sure the output data is up-to-date by calling Update. -Ken **** Kenneth Moreland *** Sandia National Laboratories *********** *** *** *** email: kmorel at sandia.gov ** *** ** phone: (505) 844-8919 *** fax: (505) 845-0833 > -----Original Message----- > From: vtkusers-bounces at vtk.org > [mailto:vtkusers-bounces at vtk.org] On Behalf Of Alejandro Galindo Mateo > Sent: Monday, February 14, 2005 11:59 AM > To: vtkusers at vtk.org > Subject: [vtkusers] How to get points from VtkPolyData > > Hello VTK users, > > I have a vtkPolyData with points, polygons and scalars and I > only want the points with the scalars. I tried with: > > vtkPolyData data > > data SetPoints [[Filter GetOutput] GetPoints] > > for the points and: > > [data GetPointData] SetScalars [[[Filter GetOutput] > GetPointData] GetScalars] > > for the scalars. [Filter GetOutput] is a vtkPolyData and it?s > not empy because I can render it with a mapper and the data > is represented correctly. > > But the result is that the vtkPolyData data is empty. I > would like to know if I need to do another thing to copy the points. > > Thanks for all, > > > _______________________________________________ > 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 > > From nacho at lncc.br Mon Feb 14 15:41:38 2005 From: nacho at lncc.br (Nacho Larrabide) Date: Mon, 14 Feb 2005 17:41:38 -0300 Subject: [vtkusers] Using vtkMergePoints In-Reply-To: <20050214184804.B07AB34D5E@public.kitware.com> References: <20050214184804.B07AB34D5E@public.kitware.com> Message-ID: <1414297292.20050214174138@lncc.br> Hi everybody, I'm using a cvs vtk version and I'm tryng to use the vtkMergePoints class to create the set of point corresponding to a very big triangle mesh. The code that I'm usind is this: vtkMergePoints *mp=vtkMergePoints::New(); mp->InitPointInsertion(puntos,bounds,estimatedSize); mp->SetAutomatic(1); .... float pt1[3],pt2[3]; int id1,id2; // some point initialization mp->InsertUniquePoint(pt1,id1); mp->InsertUniquePoint(pt2,id2); By wath I read so far this should do the work, but somewere around point 43.000 and something this blows up. Debugging the code I found that the bucket that vtkMergePoints is inserting the point can not be retreived by the HashTable. Am I missing something?, This same code use to work with an older vtk version (vtk4.0 I think). Please help...:D Regards, Nacho ----------------------------------------------------- Nacho Larrabide Rua Getulio Vargas 333 - Quitandinha - CEP: 25651-070 Petropolis - RJ - Brasil Tel: +54 24 2233-6137 - Fax: +54 24 2233-6167 mailto:nacho at lncc.br ----------------------------------------------------- From mathieu.malaterre at kitware.com Mon Feb 14 14:53:53 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 14 Feb 2005 14:53:53 -0500 Subject: [vtkusers] Using vtkMergePoints In-Reply-To: <1414297292.20050214174138@lncc.br> References: <20050214184804.B07AB34D5E@public.kitware.com> <1414297292.20050214174138@lncc.br> Message-ID: <421101D1.3080307@kitware.com> Nacho, vtkMergePoints does not do any bounds checking. So if you define a bound too small for all your points the programm will crash (it's a feature). I would suggest you atifically augment your bound. The fact that it used to run, I don't know. Could this be a problem with double that does not appear with float... HTH Mathieu Nacho Larrabide wrote: > Hi everybody, > > I'm using a cvs vtk version and I'm tryng to use the vtkMergePoints > class to create the set of point corresponding to a very big > triangle mesh. The code that I'm usind is this: > > vtkMergePoints *mp=vtkMergePoints::New(); > mp->InitPointInsertion(puntos,bounds,estimatedSize); > mp->SetAutomatic(1); > > .... > > float pt1[3],pt2[3]; > int id1,id2; > // some point initialization > mp->InsertUniquePoint(pt1,id1); > mp->InsertUniquePoint(pt2,id2); > > By wath I read so far this should do the work, but somewere around > point 43.000 and something this blows up. Debugging the code I > found that the bucket that vtkMergePoints is inserting the point > can not be retreived by the HashTable. > Am I missing something?, This same code use to work with an older > vtk version (vtk4.0 I think). > Please help...:D > > Regards, > > Nacho > > ----------------------------------------------------- > Nacho Larrabide > Rua Getulio Vargas 333 - Quitandinha - CEP: 25651-070 > Petropolis - RJ - Brasil > > Tel: +54 24 2233-6137 - Fax: +54 24 2233-6167 > > mailto:nacho at lncc.br > ----------------------------------------------------- > > _______________________________________________ > 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 > From madhu_lsu at yahoo.com Mon Feb 14 21:34:14 2005 From: madhu_lsu at yahoo.com (Madhusudhanan Balasubramanian) Date: Mon, 14 Feb 2005 18:34:14 -0800 (PST) Subject: [vtkusers] VolumePro 1000 In-Reply-To: <4210EF43.2020400@gmx.de> Message-ID: <20050215023414.14523.qmail@web51708.mail.yahoo.com> Hi Stephan, Thanks. But you do not need this file as this comes with the vtk installation. However I found that its simple to use vtk for volumepro 1000. This is all you have to do: 1. Recompile vtk (using cmake) with VTK_USE_VOLUMEPRO turned on. 2. Instead of using vtkRayCastMapper use vtkVolumeProMapper. This will automatically create vtkVolumeProVP1000Mapper / vtkVolumeProVP500Mapper depending on the available hardware. Rest is same as regular volume rendering. Hope this helps. Madhu. --- Stephan Theisen wrote: > Hi Madhu! > > I've attached the headerfile of the > vtkVolumeProVP1000Mapper and the > source file. I hope these are the files you need. > Have you an example that shows how to use the > VolumeProVp1000Mapper > correctly? Because I have the class and so on but I > don't know > how I must use the Mapper. For example Input, > etc..... > > Bye Stephan > > /*========================================================================= > > Program: Visualization Toolkit > Module: $RCSfile: > vtkVolumeProVP1000Mapper.cxx,v $ > > Copyright (c) Ken Martin, Will Schroeder, Bill > Lorensen > All rights reserved. > See Copyright.txt or > http://www.kitware.com/Copyright.htm for details. > > This software is distributed WITHOUT ANY > WARRANTY; without even > the implied warranty of MERCHANTABILITY or > FITNESS FOR A PARTICULAR > PURPOSE. See the above copyright notice for > more information. > > =========================================================================*/ > #include "vtkVolumeProVP1000Mapper.h" > > #include "vtkCamera.h" > #include "vtkColorTransferFunction.h" > #include "vtkDebugLeaks.h" > #include "vtkGraphicsFactory.h" > #include "vtkImageData.h" > #include "vtkLight.h" > #include "vtkLightCollection.h" > #include "vtkObjectFactory.h" > #include "vtkOpenGLVolumeProVP1000Mapper.h" > #include "vtkPiecewiseFunction.h" > #include "vtkPointData.h" > #include "vtkRenderWindow.h" > #include "vtkRenderer.h" > #include "vtkToolkits.h" > #include "vtkTransform.h" > #include "vtkVolume.h" > #include "vtkVolumeProperty.h" > > #include > #include > > vtkCxxRevisionMacro(vtkVolumeProVP1000Mapper, > "$Revision: 1.2 $"); > > //---------------------------------------------------------------------------- > // Needed when we don't use the vtkStandardNewMacro. > vtkInstantiatorNewMacro(vtkVolumeProVP1000Mapper); > //---------------------------------------------------------------------------- > > vtkVolumeProVP1000Mapper::vtkVolumeProVP1000Mapper() > { > VLIStatus status; > VLIConfiguration *config; > > this->ImageBuffer = NULL; > this->DepthBuffer = NULL; > > // Establish a connection with vli > status = VLIOpen(); > > if ( status != kVLIOK ) > { > vtkDebugMacro( << "VLIOpen failed!" ); > this->Context = NULL; > this->LookupTable = NULL; > > if ( status == kVLIErrNoHardware ) > { > this->NoHardware = 1; > } > else if ( status == kVLIErrVersion ) > { > this->WrongVLIVersion = 1; > } > return; > } > > // Gather some useful information > config = new VLIConfiguration; > this->NumberOfBoards = > config->GetNumberOfBoards(); > this->MajorBoardVersion = > config->GetBoardMajorVersion(); > this->MinorBoardVersion = > config->GetBoardMinorVersion(); > this->GradientTableSize = > config->GetGradientTableLength(); > delete config; > > // Create the context > this->Context = VLIContext::Create(); > if (!this->Context) > { > vtkErrorMacro( << "Context could not be > created!" ); > return; > } > > this->LookupTable = > VLILookupTable::Create(VLILookupTable::kSize4096); > > if ( !this->LookupTable ) > { > vtkErrorMacro( << "Lookup table could not be > created!" ); > return; > } > > > this->Context->GetClassifier().SetLookupTable(kVLITable0, > this->LookupTable); > > this->Cut = VLICutPlane::Create( 1.0, 0.0, 0.0, > 0.0, 0.0, 0.0 ); > > if ( !this->Cut ) > { > vtkErrorMacro( << "Cut plane could not be > created!" ); > return; > } > > int i ; > for ( i =0; i < 4; i++) > { > this->Cuts[i] = VLICutPlane::Create( 1.0, 0.0, > 0.0, 0.0, 0.0, 0.0 ); > > if ( !this->Cuts[i] ) > { > vtkErrorMacro( << "Cut plane could not be > created!" ); > return; > } > } > > this->DrawBoundingBox = 0; > } > > > > vtkVolumeProVP1000Mapper::~vtkVolumeProVP1000Mapper() > { > int i; > > // free the lights > if (this->NumberOfLights > 0) > { > for ( i = 0; i < this->NumberOfLights; i++ ) > { > this->Context->RemoveLight( this->Lights[i] ); > this->Lights[i]->Release(); > } > if ( this->Lights ) > { > delete [] this->Lights; > } > } > > if (this->Cut) > { > this->Cut->Release(); > } > > // Free the lookup table if it was created > if ( this->LookupTable ) > { > this->LookupTable->Release(); > } > > // Free the volume if necessary > if ( this->Volume ) > { > if (this->Volume->IsLocked() == VLItrue) > { > this->Volume->UnlockVolume(); > } > this->Volume->Release(); > } > > if (this->ImageBuffer) > { > this->ImageBuffer->Release(); > this->ImageBuffer = NULL; > } > > if (this->DepthBuffer) > { > this->DepthBuffer->Release(); > this->DepthBuffer = NULL; > } > > // Free the context if necessary > if (this->Context) > { > this->Context->Release(); > } > > // Terminate connection to the hardware > === message truncated ===> /*========================================================================= > > Program: Visualization Toolkit > Module: $RCSfile: vtkVolumeProVP1000Mapper.h,v > $ > > Copyright (c) Ken Martin, Will Schroeder, Bill > Lorensen > All rights reserved. > See Copyright.txt or > http://www.kitware.com/Copyright.htm for details. > > This software is distributed WITHOUT ANY > WARRANTY; without even > the implied warranty of MERCHANTABILITY or > FITNESS FOR A PARTICULAR > PURPOSE. See the above copyright notice for > more information. > > =========================================================================*/ > // .NAME vtkVolumeProVP1000Mapper - Superclass for > VP1000 board > // > // .SECTION Description > // vtkVolumeProVP1000Mapper is the superclass for > VolumePRO volume rendering > // mappers based on the VP1000 chip. Subclasses are > for underlying graphics > // languages. Users should not create subclasses > directly - > // a vtkVolumeProMapper will automatically create > the object of the right > // type. > // > // This class is not included in the Rendering > CMakeLists by default. If you > // want to add this class to your vtk build, you > need to have the vli header > // and library files, and you will need to perform > the following steps: > // > // 1. Run cmake, and set the VTK_USE_VOLUMEPRO flag > to true. > // 2. If the libary file (VLI_LIBRARY_FOR_VP1000) is > not found by cmake, set > // the path to that file, and rerun cmake. > // 3. If the header file > (VLI_INCLUDE_PATH_FOR_VP1000) is not found by cmake, > // set the path to that file, and rerun cmake. > // 4. Rebuild VTK. > // > // For more information on the VolumePRO hardware, > please see: > // > // > http://www.terarecon.com/products/volumepro_prod.html > // > // If you encounter any problems with this class, > please inform Kitware, Inc. > // at kitware at kitware.com. > // > // > // .SECTION See Also > // vtkVolumeMapper vtkVolumeProMapper > vtkOpenGLVolumeProVP1000Mapper > // > > #ifndef __vtkVolumeProVP1000Mapper_h > #define __vtkVolumeProVP1000Mapper_h > > #include "vtkVolumeProMapper.h" > > #ifdef _WIN32 > #include "VolumePro1000/inc/vli.h" // Needed for VLI > internal types > #else > #include "vli3/include/vli.h" // Needed for VLI > internal types > #endif > > #define VTK_VOLUME_16BIT 3 > #define VTK_VOLUME_32BIT 4 > > class VTK_EXPORT vtkVolumeProVP1000Mapper : public > vtkVolumeProMapper > { > public: > > vtkTypeRevisionMacro(vtkVolumeProVP1000Mapper,vtkVolumeProMapper); > static vtkVolumeProVP1000Mapper *New(); > virtual void PrintSelf(ostream& os, vtkIndent > indent); > > // Description: > // Render the image using the hardware and place > it in the frame buffer > virtual void Render( vtkRenderer *, vtkVolume * ); > virtual int GetAvailableBoardMemory(); > virtual void GetLockSizesForBoardMemory(unsigned > int type, > unsigned > int *xSize, > unsigned > int *ySize, > unsigned > int *zSize); > virtual void SetCutPlaneEquation(int index, double > cutA, double cutB, double cutC, double cutD); > virtual void GetCutPlaneEquation(int index, double > &cutA, double &cutB, double &cutC, double &cutD); > > virtual void SetCutPlane(int index, int isOn); > virtual void GetCutPlane(int index, int &isOn); > > virtual void SetCutPlaneThickness(int index, > double thickness); > virtual void GetCutPlaneThickness(int index, > double &thickness); > > virtual void SetCutPlaneFallOffDistance(int index, > double falloff); > virtual void GetCutPlaneFallOffDistance(int index, > double &falloff); > > > protected: > vtkVolumeProVP1000Mapper(); > ~vtkVolumeProVP1000Mapper(); > > // Update the camera - set the camera matrix > void UpdateCamera( vtkRenderer *, vtkVolume * ); > > // Update the lights > void UpdateLights( vtkRenderer *, vtkVolume * ); > > // Update the properties of the volume including > transfer functions > // and material properties > void UpdateProperties( vtkRenderer *, vtkVolume * > ); > > // Update the volume - create it if necessary > // Set the volume matrix. > void UpdateVolume( vtkRenderer *, vtkVolume * ); > > // Set the crop box (as defined in the > vtkVolumeMapper superclass) > void UpdateCropping( vtkRenderer *, vtkVolume * ); > > // Set the cursor > void UpdateCursor( vtkRenderer *, vtkVolume * ); > > // Update the cut plane > void UpdateCutPlane( vtkRenderer *, vtkVolume * ); > > // Render the image buffer to the screen > // Defined in the specific graphics > implementation. > virtual void RenderImageBuffer( vtkRenderer * > vtkNotUsed(ren), > vtkVolume * > vol, > int > size[2], > unsigned int * > outData ) > {(void)vol; (void)size; (void)outData;} > > // Render a bounding box of the volume because the > texture map would > // be too large. > virtual void RenderBoundingBox( vtkRenderer * > vtkNotUsed(ren), > vtkVolume * vol > ) > {(void)vol;} > > // Get the depth buffer values > virtual void GetDepthBufferValues( vtkRenderer > *vtkNotUsed(ren), > int size[2], > unsigned int > *outData ) > { (void)outData; } > > #if ((VTK_MAJOR_VERSION == 3)&&(VTK_MINOR_VERSION == > 2)) > vtkGetVectorMacro( VoxelCroppingRegionPlanes, > float, 6 ); > void ConvertCroppingRegionPlanesToVoxels(); > float VoxelCroppingRegionPlanes[6]; > #endif > > > // Keep track of the size of the data loaded so we > know if we can > // simply update when a change occurs or if we > need to release and > // create again > int LoadedDataSize[3]; > > === message truncated === __________________________________ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250 From sslee at midasit.com Tue Feb 15 00:16:50 2005 From: sslee at midasit.com (=?ks_c_5601-1987?B?wMy787z2?=) Date: Tue, 15 Feb 2005 14:16:50 +0900 Subject: [vtkusers] different face order in Wedge and Quadratic Wedge Message-ID: <002301c5131d$8e8b4b80$3a5f94dd@LocalHost> Hello, I've found that the face order of a quadratic wedge is different from that of a wedge. in vtkWedge.cxx, we see, static int faces[5][4] = { {0,1,2,-1}, {3,5,4,-1}, // <-- Triangles are first {0,3,4,1}, {1,4,5,2}, {2,5,3,0} }; and in vtkQuadraticWedge.cxx, we see, static int WedgeFaces[5][8] = { {0,3,4,1,12,9,13,6}, // <-- Quads are first {1,4,5,2,13,10,14,7}, {2,5,3,0,14,11,12,8}, {0,1,2,6,7,8,0,0}, {3,5,4,11,10,9,0,0}}; I think that this should be modified for them to have consistency. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sslee at midasit.com Tue Feb 15 00:36:03 2005 From: sslee at midasit.com (=?ks_c_5601-1987?B?wMy787z2?=) Date: Tue, 15 Feb 2005 14:36:03 +0900 Subject: [vtkusers] different face order in Wedge and Quadratic Wedge Message-ID: <003401c51320$4083ae20$3a5f94dd@LocalHost> Hello, I've found that the face order of a quadratic wedge is different from that of a wedge. in vtkWedge.cxx, we see, static int faces[5][4] = { {0,1,2,-1}, {3,5,4,-1}, // <-- Triangles are first {0,3,4,1}, {1,4,5,2}, {2,5,3,0} }; and in vtkQuadraticWedge.cxx, we see, static int WedgeFaces[5][8] = { {0,3,4,1,12,9,13,6}, // <-- Quads are first {1,4,5,2,13,10,14,7}, {2,5,3,0,14,11,12,8}, {0,1,2,6,7,8,0,0}, {3,5,4,11,10,9,0,0}}; I think that this should be modified for them to have consistency. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lachlan at chryatech.com.au Tue Feb 15 03:58:41 2005 From: lachlan at chryatech.com.au (Lachlan Blackhall) Date: Tue, 15 Feb 2005 09:58:41 +0100 Subject: [vtkusers] VTK in a c++ GUI Message-ID: Good Morning all, I have had a look through the forum but to no avail so heres my problem, i want to be able to embed a vtkrenderwindow inside a normal c++ GUI. basically i want to be able to have buttons, text boxes in the gui etc.. as well as a nice visualisation window on the same form. I am currently developing on mac os x but if people have done this with windows or linux id love some pointers. thanks Lachlan Blackhall From prashanth.udupa at gmail.com Tue Feb 15 04:08:19 2005 From: prashanth.udupa at gmail.com (Prashanth Udupa) Date: Tue, 15 Feb 2005 14:38:19 +0530 Subject: [vtkusers] VTK in a c++ GUI In-Reply-To: References: Message-ID: <912c00f0502150108d168091@mail.gmail.com> If you consider Qt as a "normal C++ gui" here are some places where you can find some good resources. VtkQt http://staff.science.uva.nl/~dshamoni/myprojects/VtkQt.html vtkQt classes http://www.matthias-koenig.net/vtkqt/ VTK Designer has a modified version of vtkQt that might suit your purpose better http://www.prashanthudupa.com/vtkdesigner Hope this helps Prashanth On Tue, 15 Feb 2005 09:58:41 +0100, Lachlan Blackhall wrote: > Good Morning all, > > I have had a look through the forum but to no avail so heres my problem, > > i want to be able to embed a vtkrenderwindow inside a normal c++ GUI. > basically i want to be able to have buttons, text boxes in the gui etc.. > as well as a nice visualisation window on the same form. > > I am currently developing on mac os x but if people have done this with > windows > or linux id love some pointers. > > thanks > > Lachlan Blackhall > > _______________________________________________ > 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 > -- Prashanth N Udupa http://www.prashanthudupa.com/ From dshamoni at science.uva.nl Tue Feb 15 04:14:52 2005 From: dshamoni at science.uva.nl (Denis Shamonin) Date: Tue, 15 Feb 2005 10:14:52 +0100 Subject: [vtkusers] VTK in a c++ GUI In-Reply-To: References: Message-ID: <4211BD8C.2000503@science.uva.nl> Lachlan Blackhall wrote: > Good Morning all, > > I have had a look through the forum but to no avail so heres my problem, > > i want to be able to embed a vtkrenderwindow inside a normal c++ GUI. > basically i want to be able to have buttons, text boxes in the gui etc.. > as well as a nice visualisation window on the same form. > > I am currently developing on mac os x but if people have done this > with windows > or linux id love some pointers. Hi, Have a look to VTK cvs version. http://www.vtk.org/get-software.php#cvs There is directory called VTK/GUISupport/Qt You can use Qt on mac as well as win or linux. Examples in VTK/Examples/GUI/Qt tnx, -- Denis Shamonin Section Computational Science University of Amsterdam Kruislaan 403, 1098 SJ Amsterdam The Netherlands E-mail : dshamoni at science.uva.nl URL : http://staff.science.uva.nl/~dshamoni/ Room number : F.215 Secr. number : +31 20 525 7463 Fax number : +31 20 525 7419 Office number : +31 20 525 7574 From niemeijer at science-and-technology.nl Tue Feb 15 04:33:56 2005 From: niemeijer at science-and-technology.nl (Sander Niemeijer) Date: Tue, 15 Feb 2005 10:33:56 +0100 Subject: [vtkusers] vtk, wx, MacOSX In-Reply-To: <16912.45282.976687.471239@monster.linux.in> Message-ID: On maandag, feb 14, 2005, at 15:08 Europe/Amsterdam, Prabhu Ramachandran wrote: >>>>>> "SN" == Sander Niemeijer >>>>>> writes: > > SN> The Gtk-1.2 build in combination with my own Python wxVTK > SN> class still gives me problems on Mac OS X and Linux if I leave > SN> threading enabled in Python/wxWidgets. Unless I disable >>> >>> With Debian Sarge, using wxPython-2.4.2.6 via the >>> libwxgtk2.4-python package, I use wxPython and VTK-4.4 fairly >>> regularly. wxc.so links to libpthread so I'm guessing that >>> wxPython is built with threads. No problems. This is even >>> when I use wxPython and VTK interactively using IPython with >>> the -wthread option. This is with GTK-1.2 and with the >>> wxVTKRenderWindowInteractor.py from 4.4. > > SN> But are you using the 'AddObserver' functionality to catch > SN> 'UserEvent' events and use a Python function as observer? If > SN> you don't use this, everything works fine, for sure. It is > SN> because of the broken observer functionality that we were > SN> forced to disable threads. > > I don't catch 'UserEvent' but rely on the event mechanism for the > standard messages a *lot* (yes, with Python callbacks). So yes, I do > use observers but not for the 'UserEvent'. Hmmm. Seems I was a bit hasty writing my answer. Probably one of the major factors causing this problem is of course that we are using our own C++ version of wxVTK now. I have to dig up some information about the exact problems that we saw. When we encountered the problem we didn't have a lot of time to analyse it, but it was at least a problem with sending VTK events, from a VTK class that was created in the C++ domain, through the VTK/Python binding to a Python function (at the time it looked like a bug in either VTK or Python). I will come back on this. Maybe somebody on the list can provide an answer to this problem. >>> Hmm, using the Enthought enhanced Python build works perfectly >>> for me under win32 + wxPython-2.4.x + VTK 4.4. > > SN> The last time I checked, Enthought was still using VTK 4.2 > SN> (see also http://www.enthought.com/downloads/downloads.htm). > > That is correct. I am using a more recent version that was announced > for testing on the scipy-dev list. This ships with 4.4. I believe a > final release of this might be available sometime soon. > > SN> And the Enthought guys also applied some patches of their own > SN> to that version of VTK (AFAIKR one was also related to the > SN> problem I mentioned). And are you using VTK windows embedded > SN> in wxWidget windows/frames (i.e. combined with menus, > SN> buttons, etc.)? And are you using an application that is able > SN> to display multiple wxVTK windows that can be closed in any > SN> order by the user? These two facts are important if you want > SN> to reproduce the problem I mentioned. > > The first yes, the second I have to admit, I have not tried. I.e. I > do embed a VTK widget into a native wxWidget but I haven't added > multiple widgets that I close arbitrarily. I do know of some folks > who do embed multiple VTK windows in their apps. I don't think they > close these windows in an arbitrary order though. Just some additional information to make clear what we are actually doing with the wxVTK windows: Our application is a command-based scientific application (dedicated to analysing atmospheric science data) with similarities to MATLAB, IDL, SciPy, etc. We use VTK to show our 2D and 3D visualizations. Each time a user issues a 'plot' command a new window (a wxWidgets frame with menu, buttons and a single wxVTK widget) appears and these plot windows can be closed in arbitrary order. The problem seems to appear when closing a plot window that currently doesn't have the focus (or OpenGL focus). But I am not entirely sure this is the cause, since I haven't been able to reliably reproduce the problem yet. Best regards, Sander From nNunn at ausport.gov.au Tue Feb 15 04:43:32 2005 From: nNunn at ausport.gov.au (Nigel Nunn) Date: Tue, 15 Feb 2005 20:43:32 +1100 Subject: [vtkusers] VTK in a c++ GUI Message-ID: Hi Lachlan, If you like native threading, native widgets, and C++ STL with your crossplatform GUI, wx has become a very interesting alternative to qt, mfc, tcl, python, etc: http://www.wxwidgets.org/ http://wiki.wxwidgets.org/ http://www.creatis.insa-lyon.fr/~malaterre/wxVTK/ Nigel > Good Morning all, > > I have had a look through the forum but to no avail so heres > my problem, > > i want to be able to embed a vtkrenderwindow inside a normal > c++ GUI. basically i want to be able to have buttons, text > boxes in the gui etc.. as well as a nice visualisation window > on the same form. > > I am currently developing on mac os x but if people have done > this with windows or linux id love some pointers. > > thanks > > Lachlan Blackhall _____________________________________________________________________________________ This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender. Keep up to date with what's happening in Australian sport. Visit www.ausport.gov.au _____________________________________________________________________________________ From lachlan at chryatech.com.au Tue Feb 15 04:43:34 2005 From: lachlan at chryatech.com.au (Lachlan Blackhall) Date: Tue, 15 Feb 2005 10:43:34 +0100 Subject: [vtkusers] VTK in a c++ GUI In-Reply-To: <589a255da7.55da7589a2@liu.se> References: <589a255da7.55da7589a2@liu.se> Message-ID: <639456e0eb0633167e445f85bdbdf00c@chryatech.com.au> Thanks for all the tips everyone, ill get cracking on it when i have some spare time :) Lachlan On 15/02/2005, at 10:27 AM, Hanna Jonsson wrote: > I have done it in windows. in window you can create your vtk-window as > a child window to your ordinary windows window. You do this using > "SetParentID" to your renderwindow. > (renWin->SetParentId(MainWindowHandle))Then it is easy to create > buttons etc in your Parent window. > > ----- Original Message ----- > From: Lachlan Blackhall > Date: Tuesday, February 15, 2005 9:58 am > Subject: [vtkusers] VTK in a c++ GUI > >> Good Morning all, >> >> I have had a look through the forum but to no avail so heres my >> problem, >> i want to be able to embed a vtkrenderwindow inside a normal c++ GUI. >> basically i want to be able to have buttons, text boxes in the gui >> etc..as well as a nice visualisation window on the same form. >> >> I am currently developing on mac os x but if people have done this >> with >> windows >> or linux id love some pointers. >> >> thanks >> >> Lachlan Blackhall >> >> _______________________________________________ >> This is the private VTK discussion list. >> Please keep messages on-topic. Check the FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQFollow this link to >> subscribe/unsubscribe:http://www.vtk.org/mailman/listinfo/vtkusers >> > > From mathieu.malaterre at kitware.com Tue Feb 15 09:40:39 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Tue, 15 Feb 2005 09:40:39 -0500 Subject: [vtkusers] VTK in a c++ GUI In-Reply-To: References: Message-ID: <421209E7.3000407@kitware.com> And the more general answer is: http://vtk.org/Wiki/VTK_Classes Which mention -I believe- everything you were told, in a more compact form :) HTH Mathieu Lachlan Blackhall wrote: > Good Morning all, > > I have had a look through the forum but to no avail so heres my problem, > > i want to be able to embed a vtkrenderwindow inside a normal c++ GUI. > basically i want to be able to have buttons, text boxes in the gui etc.. > as well as a nice visualisation window on the same form. > > I am currently developing on mac os x but if people have done this with > windows > or linux id love some pointers. > > thanks > > Lachlan Blackhall > > _______________________________________________ > 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 > From Vences_L at klinik.uni-wuerzburg.de Tue Feb 15 10:35:33 2005 From: Vences_L at klinik.uni-wuerzburg.de (Vences_L at klinik.uni-wuerzburg.de) Date: Tue, 15 Feb 2005 16:35:33 +0100 Subject: [vtkusers] Dicom Volume: A beginers question Message-ID: <05Feb15.163921cet.330241@firewall.kks.uni-wuerzburg.de> Hi *, What's the shortest way to read a dicom volume consisting in several 2D slices and render it with vtk? With help of the examples, I'm able to read and show single slices, but not a volume 8_( Thanks for any help, Plata From freiman at cs.huji.ac.il Tue Feb 15 11:16:36 2005 From: freiman at cs.huji.ac.il (Moti Freiman) Date: Tue, 15 Feb 2005 18:16:36 +0200 Subject: [vtkusers] Re: Dicom Volume: A beginers question Message-ID: <42122064.10100@cs.huji.ac.il> Hi! the following code demonstrate how to read a volume of dicom files using vtk in c++: vtkDICOMImageReader * reader = vtkDICOMImageReader::New(); reader->SetDirectoryName ("data_directory"); reader->Update (); then you can use: reader->GetOutput() to get the volume Regards! Moti -- Moti Freiman, Graduate Student. Medical Image Processing and Computer-Assisted Surgery Laboratory. School of Computer Science and Engineering. The Hebrew University of Jerusalem Givat Ram, Jerusalem 91904, Israel Phone: +(972)-2-658-5371 (laboratory) E-mail: freiman at cs.huji.ac.il WWW site: http://www.cs.huji.ac.il/~freiman -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 From brylee at fumbo.com Tue Feb 15 11:56:31 2005 From: brylee at fumbo.com (brylee at fumbo.com) Date: Tue, 15 Feb 2005 13:56:31 -0300 Subject: [vtkusers] Help on Spring Algorithm Message-ID: <1108486591.421229bf389c0@www.fumbo.com> Hello to every one i wonder if any one has any information on the spring algorithm implemented on VTK, or if anyone by chance knows a filter or procedure on how to conect a set of points eg 50 by a pipe or line (vectors) based on a set of other vector or path. thanks ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From prabhu_r at users.sf.net Tue Feb 15 12:23:29 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Tue, 15 Feb 2005 22:53:29 +0530 Subject: [vtkusers] vtk, wx, MacOSX In-Reply-To: References: <16912.45282.976687.471239@monster.linux.in> Message-ID: <16914.12305.501669.870908@monster.linux.in> >>>>> "SN" == Sander Niemeijer writes: SN> visualizations. Each time a user issues a 'plot' command a new SN> window (a wxWidgets frame with menu, buttons and a single SN> wxVTK widget) appears and these plot windows can be closed in SN> arbitrary order. The problem seems to appear when closing a SN> plot window that currently doesn't have the focus (or OpenGL SN> focus). But I am not entirely sure this is the cause, since I SN> haven't been able to reliably reproduce the problem yet. And this is only under Win32? Not on Linux? Because I can't seem to reproduce this with any of my tests under Linux. cheers, prabhu From brylee at fumbo.com Tue Feb 15 12:31:29 2005 From: brylee at fumbo.com (brylee at fumbo.com) Date: Tue, 15 Feb 2005 14:31:29 -0300 Subject: [vtkusers] Help on Spring algorithm Message-ID: <1108488689.421231f10f1b8@www.fumbo.com> Hello to every one i wonder if any one has any information on the spring algorithm implemented on VTK, or if anyone by chance knows a filter or procedure on how to conect a set of points eg 50 by a pipe or line (vectors) based on a set of other vector or path. thanks ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From mathieu.malaterre at kitware.com Tue Feb 15 13:06:48 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Tue, 15 Feb 2005 13:06:48 -0500 Subject: [vtkusers] different face order in Wedge and Quadratic Wedge In-Reply-To: <002301c5131d$8e8b4b80$3a5f94dd@LocalHost> References: <002301c5131d$8e8b4b80$3a5f94dd@LocalHost> Message-ID: <42123A38.2000705@kitware.com> Hi ???, Could you enter this as a bug in our bugtracker system: http://vtk.org/Bug and assign it to me. Thanks Mathieu ??? wrote: > Hello, > > I've found that the face order of a quadratic wedge is different from > that of a wedge. > > in vtkWedge.cxx, we see, > > static int faces[5][4] = { {0,1,2,-1}, {3,5,4,-1}, // <-- Triangles are > first > {0,3,4,1}, {1,4,5,2}, {2,5,3,0} }; > > and in vtkQuadraticWedge.cxx, we see, > > static int WedgeFaces[5][8] = { {0,3,4,1,12,9,13,6}, // <-- Quads are first > {1,4,5,2,13,10,14,7}, > {2,5,3,0,14,11,12,8}, > {0,1,2,6,7,8,0,0}, > {3,5,4,11,10,9,0,0}}; > I think that this should be modified for them to have consistency. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 From StephanTheisen at gmx.de Tue Feb 15 18:06:57 2005 From: StephanTheisen at gmx.de (Stephan Theisen) Date: Wed, 16 Feb 2005 00:06:57 +0100 (MET) Subject: [vtkusers] How to use VolumeProMapper Message-ID: <3743.1108508817@www2.gmx.net> Hi together! Has anybody an example for the use of a vtkVolumeProMapper. I've read in a Volume from several slices of Dicom Data. Now i will render this volume with a vtkVolumeProMapper or with a vtkVolumeProVP1000Mapper. Please send me an example or a link. Thanks in advance Stephan -- Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail From ljw at soc.soton.ac.uk Tue Feb 15 18:10:33 2005 From: ljw at soc.soton.ac.uk (Luke J West) Date: Tue, 15 Feb 2005 23:10:33 +0000 Subject: [vtkusers] using 3rd party shared libs with wrapping enabled Message-ID: <1108509033.42128169e2c61@webmail.soc.soton.ac.uk> Hi, I've written some VTK classes which use a third party shared library, and are working fine. However, I am now tying to incorporate them into VTK so that my users can access them from TCL and python, but I've not been able to get VTK to see the libraries at build time - and at the point where it tries to build the TCL wrappers in particular. At the end is a transcript of what happens when I type make. FYI - during the ccmake step, I append the -L and -l options appropriate for the third party libraries to the following variables... CMAKE_CXX_FLAGS CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS As far as I can see, that's everywhere, but have I missed something? Is there anywhere else I need to specify libraries? I've gotten as far as I can with this and would REALLY REALLY appreciate input from anyone who has successfully or unsuccessfully incoporated code (that uses an external shared library) into VTK. If I get this sussed - I'll write a howto for the community. Thanks very much, Luke Now here's that transcript.... /local/VTK> make Building dependencies. cmake.depends... -- Compiling VTK CMake commands -- Compiling VTK CMake commands - done -- Loading VTK CMake commands -- Loading VTK CMake commands - done -- Using Buildname: Linux-c++ cmake.depends is up-to-date /local/VTK/Wrapping: building default_target Building dependencies. cmake.depends... /local/VTK/Utilities: building default_target Building dependencies. cmake.depends... cmake.depends is up-to-date /local/VTK/Utilities/zlib: building default_target Building dependencies. cmake.depends... /local/VTK/Utilities/jpeg: building default_target Building dependencies. cmake.depends... /local/VTK/Utilities/png: building default_target Building dependencies. cmake.depends... /local/VTK/Utilities/tiff: building default_target Building dependencies. cmake.depends... /local/VTK/Utilities/expat: building default_target Building dependencies. cmake.depends... /local/VTK/Utilities/Doxygen: building default_target Building dependencies. cmake.depends... cmake.depends is up-to-date /local/VTK/Utilities/freetype: building default_target Building dependencies. cmake.depends... /local/VTK/Utilities/ftgl: building default_target Building dependencies. cmake.depends... /local/VTK/Common: building default_target Building dependencies. cmake.depends... /local/VTK/Filtering: building default_target Building dependencies. cmake.depends... /local/VTK/Imaging: building default_target Building dependencies. cmake.depends... /local/VTK/Graphics: building default_target Building dependencies. cmake.depends... /local/VTK/IO: building default_target Building dependencies. cmake.depends... /local/VTK/Rendering: building default_target Building dependencies. cmake.depends... /local/VTK/Hybrid: building default_target Building dependencies. cmake.depends... /local/VTK/Patented: building default_target Building dependencies. cmake.depends... /local/VTK/Parallel: building default_target Building dependencies. cmake.depends... /local/VTK/Wrapping/Tcl: building default_target Building dependencies. cmake.depends... Building executable /local/VTK/bin/vtk... /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::DataSet::read(void*, H5::DataType const&, H5::DataSpace const&, H5::DataSpace const&, H5::DSetMemXferPropList const&) const' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::DataSet::getSpace() const' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::DSetMemXferPropList::DEFAULT' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::FileAccPropList::DEFAULT' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::DataSpace::DataSpace[in-charge](int, unsigned long long const*, unsigned long long const*)' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::CommonFG::openDataSet(char const*) const' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::DataSet::DataSet[in-charge]()' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::Group::~Group [in-charge]()' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::H5File::H5File[in-charge](char const*, unsigned, H5::FileCreatPropList const&, H5::FileAccPropList const&)' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::PredType::NATIVE_INT' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::DataSpace::~DataSpace [in-charge]()' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::FileCreatPropList::DEFAULT' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::H5File::~H5File [in-charge]()' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::CommonFG::openGroup(std::basic_string, std::allocator > const&) const' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::DataSet::~DataSet [in-charge]()' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::DataSpace::selectHyperslab(H5S_seloper_t, unsigned long long const*, long long const*, unsigned long long const*, unsigned long longconst*) const' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::IdComponent::operator=(H5::IdComponent const&)' /local/VTK/bin/libvtkCommonTCL.so: undefined reference to `H5::CommonFG::openDataSet(std::basic_string, std::allocator > const&) const' collect2: ld returned 1 exit status make[3]: *** [/local/VTK/bin/vtk] Error 1 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_Wrapping_Tcl] Error 2 make: *** [default_target] Error 2 Luke J West : e-Science Research Assistant --------------------------------------------- Room 566/12, School of Ocean & Earth Sciences Southampton Oceanography Centre, Southampton SO14 3ZH United Kingdom --------------------------------------------- Tel: +44 23 8059 4801 Fax: +44 23 8059 3052 Mob: +44 79 6107 4783 Skype: ljwest --------------------------------------------- http://godiva.soc.soton.ac.uk/ ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From hesham at uni-paderborn.de Fri Feb 4 03:58:42 2005 From: hesham at uni-paderborn.de (hesham) Date: Fri, 4 Feb 2005 00:58:42 -0800 Subject: [vtkusers] problem with vtkqt Message-ID: <000501c50a97$ba487f60$734eea83@hesham> Hi, Im beginner ,I want to put my vtk code in qt window because I have to make menu and anther command button,I start to use very easy example but when I excute the programm I had this link error Can you help me ,I use vtk4.2 ,qt3.3.3 and vtk4qt3,, My code : #include "vtkQtRenderWindow.h" #include "vtkRenderer.h" int main (void) { vtkRenderer *ren = vtkRenderer::New(); vtkQtRenderWindow *renWindow = vtkQtRenderWindow::New(); renWindow->AddRenderer(ren); renWindow->SetWindowName("VtkQt-vtkQtRenderWindow"); return 0; } linking Error: vtkqt.cpp Linking... vtkqt.obj : error LNK2001: unresolved external symbol "public: static class vtkQtRenderWindow * __cdecl vtkQtRenderWindow::New(void)" (?New at vtkQtRenderWindow@@SAPAV1 at XZ) Debug/vtkqt.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. vtkqt.exe - 2 error(s), 0 warning(s) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marek.Wasilewski at dnv.com Wed Feb 16 03:12:15 2005 From: Marek.Wasilewski at dnv.com (Marek.Wasilewski at dnv.com) Date: Wed, 16 Feb 2005 08:12:15 -0000 Subject: [vtkusers] VTK in a c++ GUI Message-ID: Hi Lachlan If you are happy using a render window wrapped up as an ActiveX control for Windows then this might be of interest to you: http://www.data-visualization-software.com/visualization/vtkactivex.aspx Even if you don't go down the route of implementing your user interface using CFormView and the ActiveX control, you can use the provided source code to get pointers on how to anchor the render window to a parent window using an MFC/Windows approach. Hope this helps. Best regards Marek Dr. Marek Wasilewski Principal Software Engineer DNV Software - Risk Management DET NORSKE VERITAS, Highbank House Exchange Street, Stockport Cheshire, SK3 0ET Tel: +44 (0)161 477 3818 Fax: +44 (0)161 477 3819 E-mail: Internet: -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Lachlan Blackhall Sent: 15 February 2005 08:59 To: vtkusers at vtk.org Subject: [vtkusers] VTK in a c++ GUI Good Morning all, I have had a look through the forum but to no avail so heres my problem, i want to be able to embed a vtkrenderwindow inside a normal c++ GUI. basically i want to be able to have buttons, text boxes in the gui etc.. as well as a nice visualisation window on the same form. I am currently developing on mac os x but if people have done this with windows or linux id love some pointers. thanks Lachlan Blackhall _______________________________________________ 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 ************************************************************** Neither the confidentiality nor the integrity of this message can be vouched for following transmission on the Internet. All messages sent to a DNV email addressee are swept by Sybari Antigen for the presence of malicious code. DNV acknowledges that unsolicited email represents a potential security risk, and DNVs filters to block unwanted emails are therefore continuously adjusted. DNV has disabled "out of office" replies to Internet transmitted e-mail. ************************************************************** From cochrane at esscc.uq.edu.au Wed Feb 16 03:17:38 2005 From: cochrane at esscc.uq.edu.au (Paul Cochrane) Date: Wed, 16 Feb 2005 18:17:38 +1000 Subject: [vtkusers] Simple connectivity question Message-ID: <20050216081738.GQ20739@shake56.esscc.uq.edu.au> Hi, I'm trying to understand how vtk orders points when one comes to describing the connectivity between them. This is so that I can automatically generate vtk xml files from an application being developed at my centre. For instance, if I want to describe an UnstructuredGrid of 4 points, and 1 cell, with data defined on each point, and on the cell, one can come up with the vtk xml file something like the following: 0.1 0.2 0.3 0.4 0 0 1 0 0 1 1 1 10 0 1 2 3 4 9 Unfortunately, this doesn't load into mayavi, and so leads me to believe that I've stuffed something up. I believe I've narrowed my problem down to how I've described the connectivity within the Cells element (hence my post). My understanding from the way a VTK_QUAD object for example has its points ordered, then one would think that the cell and points would be something like this: 3 _____ 2 | | | | 0 ----- 1 Where I've tried my best with ascii art the labels I would expect on the object. My question is then: what's wrong with having the connectivity written as 0 -> 1 -> 2 -> 3, (as I understand I've written it in the xml file above)? Any help clearing this up would be greatly appreciated. Thanks in advance, Paul -- Paul Cochrane Computational Scientist/Software Developer Earth Systems Science Computational Centre University of Queensland Brisbane Queensland 4072 Australia cochrane at esscc dot uq dot edu dot au From niemeijer at science-and-technology.nl Wed Feb 16 04:28:36 2005 From: niemeijer at science-and-technology.nl (Sander Niemeijer) Date: Wed, 16 Feb 2005 10:28:36 +0100 Subject: [vtkusers] vtk, wx, MacOSX In-Reply-To: <16914.12305.501669.870908@monster.linux.in> Message-ID: <22A2652A-7FFD-11D9-8851-00039383F730@science-and-technology.nl> On dinsdag, feb 15, 2005, at 18:23 Europe/Amsterdam, Prabhu Ramachandran wrote: >>>>>> "SN" == Sander Niemeijer >>>>>> writes: > > SN> visualizations. Each time a user issues a 'plot' command a new > SN> window (a wxWidgets frame with menu, buttons and a single > SN> wxVTK widget) appears and these plot windows can be closed in > SN> arbitrary order. The problem seems to appear when closing a > SN> plot window that currently doesn't have the focus (or OpenGL > SN> focus). But I am not entirely sure this is the cause, since I > SN> haven't been able to reliably reproduce the problem yet. > > And this is only under Win32? Not on Linux? Because I can't seem to > reproduce this with any of my tests under Linux. This is indeed only on Win32. I receive the VTK error in VTK\Rendering\vtkWin32OpenGLRenderWindow.cxx::MakeCurrent() at line 215: --- NULL ); vtkErrorMacro("wglMakeCurrent failed in MakeCurrent(), error: " << (LPCTSTR)lpMsgBuf); ::LocalFree( lpMsgBuf ); --- This only happens when MakeCurrent is called from vtkWin32OpenGLRenderWindow::Clean() (i.e. when the window gets closed). Best regards, Sander From StephanTheisen at gmx.de Wed Feb 16 05:38:42 2005 From: StephanTheisen at gmx.de (Stephan Theisen) Date: Wed, 16 Feb 2005 11:38:42 +0100 Subject: [vtkusers] vtkDICOMImagereader Message-ID: <421322B2.1080504@gmx.de> Hi all! I've one question. I'm developing with vtk42 and Java and I have searched for the vtkDICOMImagereader, but in my list of classes there is no one. Is this class only available with an update package of vtk? If yes please give the link for this update. Thanks Stephan From sigmunau at idi.ntnu.no Wed Feb 16 06:00:16 2005 From: sigmunau at idi.ntnu.no (sigmunau at idi.ntnu.no) Date: Wed, 16 Feb 2005 12:00:16 +0100 Subject: [vtkusers] About vtkLocator and subclasses Message-ID: <20050216110016.GA7657@hobbes> I'm currently working with iterative closest point registration, and want to investigate how different Locator methods affect the quality and performance of the registration. Currently (as previously reported by me on this list) the iterative closest point transform class uses a vtkCellLocator reguardless. I have with some dirty hacks managed to make the transform use vtkKdTree, and with the recent fixes the vtkKdTree edition performs somewhat faster, but there seems to be no sane way to archive clean and nice polymorphism with the way current vtkLocator inheritance hierarchy. I propose to change it into something like this vtkLocator(unchanged) / | \ vtkAbstractPointLocator vtkAbstractCellLocator vtkKdTree AbstractPointLocator could be inherited by the current vtkPointLocator, and a vtkKdTree-based pointlocator (from the code currently available when using vtkKdTree::BuildLocatorFromPoints(). AbstractCellLocator could be inherited by the current vtkCellLocator and vtkOBBTree (or vtkOBBTree could still inherit from vtkCellLocator if that would be beneficial) and a KdTree based cell locator (I'm willing to try to write such a class). at last vtkKdTree could remain a standalone subclass of vtkLocator, doinging all the other stuff vtkKdTree do right now. Hopefully the new vtkLocator could get some methods that are common to all the subclasses, such as FindClosestPoint which currently exist in various ways in all three subclasses, but not in the superclass. Regards Sigmund Augdal -- Sigmund Augdal Edgar B. Schieldropsv 29-14 N-7033 Trondheim Norway tlf: 91809129 From jbw at ieee.org Wed Feb 16 06:35:11 2005 From: jbw at ieee.org (Jeremy Winston) Date: Wed, 16 Feb 2005 06:35:11 -0500 Subject: [vtkusers] Re: ImageReader don't work In-Reply-To: <42132AFB.6010609@gmx.de> References: <420E0D5B.2050206@gmx.de> <4210BA09.4040405@ieee.org> <42132AFB.6010609@gmx.de> Message-ID: <42132FEE.3040108@ieee.org> Stephan Theisen wrote: > [...] > Now I will use a vtkVolumeProMapper with the volume I > have get from the slices. > Do you have any example for that case? I don't have a VolumePro board, so I can't help you with that. Have a look at the links here: http://www.google.com/search?q=VolumePro+site%3Avtk.org -Jeremy From jbw at ieee.org Wed Feb 16 06:42:54 2005 From: jbw at ieee.org (Jeremy Winston) Date: Wed, 16 Feb 2005 06:42:54 -0500 Subject: [vtkusers] Re: vtkDICOMImagereader In-Reply-To: <421322B2.1080504@gmx.de> References: <421322B2.1080504@gmx.de> Message-ID: <421331BE.9020007@ieee.org> Stephan Theisen wrote: > [...] > I'm developing with vtk42 [...] and I have > searched for the vtkDICOMImagereader, but > in my list of classes there is no one. > Is this class only available with an update > package of vtk? If yes please give the link > for this update. You need vtk v4.4 or later. Cf. http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq06.003.htp -Jeremy From mhj_ensi at yahoo.fr Wed Feb 16 07:27:48 2005 From: mhj_ensi at yahoo.fr (Mehdi HAJJI) Date: Wed, 16 Feb 2005 13:27:48 +0100 (CET) Subject: [vtkusers] How to display only points by using vtkContourFilter? Message-ID: <20050216122748.42189.qmail@web25403.mail.ukl.yahoo.com> Hi Please, I have vtkpolyData structure in which I have list of points, triangles and scalars. I use vtkContourFilter to filter points which have definite value of scalars. The problem is that I have this point interpolated. and I'd like to get them displayed without Interpolation. below the structure I use: vtkPolyData* PolyData= vtkPolyData::New(); PolyData->SetPoints(mergedPts); PolyData->SetPolys(mergedPolys); PolyData->GetPointData()->SetScalars(m_Array); PolyData->Squeeze(); PolyData->Update(); --------------------------------- D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Cr?ez votre Yahoo! Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at chalkie.org.uk Wed Feb 16 08:53:24 2005 From: dan at chalkie.org.uk (Dr. Daniel James White PhD) Date: Wed, 16 Feb 2005 15:53:24 +0200 Subject: [vtkusers] Re: vtkLSMReader In-Reply-To: References: <8e651fc2f0176f2f86281468bc1c3f2b@chalkie.org.uk> Message-ID: <56d1a0a4cc56b4940a05a2e6053c7cf3@chalkie.org.uk> Hi Gaetan, So mandrake has a built in VTK package does it? cool. how are the VTK people with folks releasing VTK software with added bits in that aren't yet actually part of VTK? Our vtkLSMReader is not fully tested, and there are probably bugs we haven't found, so it has to be marked as alpha software, Isnt it better to get it committed to the VTK CVS first, before releasing it for example in mandrake linux ? If you just want to use it personally, then I can send you a development version, so you can try it before it makes it into the VTK CVS The lsm reader will be further refined in the future.... and new versions sent to vtk as they are developed. I just made a new bug report, for submission of the .lsm reader, and it is there on the vtk bugs system. looks like its assigned to Will Schroder.... wonder if it will make it into VTK5...I expect Will is rather busy! cheers Dan On 16 Feb 2005, at 15:36, Gaetan Lehmann wrote: > > can you send me files your are talking about (c++, .h and python > script) ? > > LSM support really lacks in VTK. > If everything works without problem, and if you agree, I would like to > include your LSM support in mandrake VTK package... > > > On Wed, 16 Feb 2005 14:12:53 +0200, Dr. Daniel James White PhD > wrote: > > > -- > Gaetan Lehmann > Tel: +33 1 34 65 22 34 > Biologie du D?veloppement et de la Reproduction > INRA de Jouy-en-Josas (France) > > Dr. Daniel James White BSc. (Hons.) PhD Bioimaging Coordinator Nanoscience Centre and Department of Biological and Environmental science Division of Molecular Recognition Ambiotica C242 PO Box 35 University of Jyv?skyl? Jyv?skyl? FIN 40014 Finland +358 14 260 4183 (work) +358 468102840 (mobile) http://www.chalkie.org.uk dan at chalkie.org.uk white at cc.jyu.fi From StephanTheisen at gmx.de Wed Feb 16 09:31:38 2005 From: StephanTheisen at gmx.de (Stephan Theisen) Date: Wed, 16 Feb 2005 15:31:38 +0100 Subject: [vtkusers] VTK 4.4 don't build vtk.jar file? Message-ID: <4213594A.40402@gmx.de> Hi together! I would upgrade my vtk4.2 package to vtk4.4. So I've rebuild vtk with the vtk4.4-latest-release and Cmake. I've set VTK_WRAPJAVA in Cmake to ON and it configured without any error.After that I compiled it with MSVisualStudio6.0. But I didn't get the vtk.jar file. What's wrong?? Thanks in advance Stephan From steven.robbins at videotron.ca Wed Feb 16 10:41:04 2005 From: steven.robbins at videotron.ca (Steve M. Robbins) Date: Wed, 16 Feb 2005 10:41:04 -0500 Subject: [vtkusers] VTK 4.4 don't build vtk.jar file? In-Reply-To: <4213594A.40402@gmx.de> References: <4213594A.40402@gmx.de> Message-ID: <20050216154104.GB14862@nyongwa.montreal.qc.ca> On Wed, Feb 16, 2005 at 03:31:38PM +0100, Stephan Theisen wrote: > Hi together! > > I would upgrade my vtk4.2 package to vtk4.4. So I've rebuild vtk with > the vtk4.4-latest-release and Cmake. > I've set VTK_WRAPJAVA in Cmake to ON and it configured without any > error.After that I compiled it with MSVisualStudio6.0. > But I didn't get the vtk.jar file. What's wrong?? I dunno. My conclusion is that nobody is using VTK 4.4 with java. See http://public.kitware.com/pipermail/vtkusers/2005-January/078170.html -Steve From brad.king at kitware.com Wed Feb 16 10:49:55 2005 From: brad.king at kitware.com (Brad King) Date: Wed, 16 Feb 2005 10:49:55 -0500 Subject: [vtkusers] VTK 4.4 don't build vtk.jar file? In-Reply-To: <20050216154104.GB14862@nyongwa.montreal.qc.ca> References: <4213594A.40402@gmx.de> <20050216154104.GB14862@nyongwa.montreal.qc.ca> Message-ID: <42136BA3.9020003@kitware.com> Steve M. Robbins wrote: > On Wed, Feb 16, 2005 at 03:31:38PM +0100, Stephan Theisen wrote: > >>Hi together! >> >>I would upgrade my vtk4.2 package to vtk4.4. So I've rebuild vtk with >>the vtk4.4-latest-release and Cmake. >>I've set VTK_WRAPJAVA in Cmake to ON and it configured without any >>error.After that I compiled it with MSVisualStudio6.0. >>But I didn't get the vtk.jar file. What's wrong?? > > > I dunno. My conclusion is that nobody is using VTK 4.4 with > java. > > See http://public.kitware.com/pipermail/vtkusers/2005-January/078170.html I just looked back through the CVS log. It seems that the IF(BOGO)/ENDIF(BOGO) was an accidental checkin that happend to be present when 4.4 was branched. The immediately following checkin removes the lines. Just remove these lines from VTK/Wrapping/Java/CMakeLists.txt and rebuild to get the jar file. I'll get this fixed on the 4.4 branch. -Brad From Steve.Joyce at sercoassurance.com Wed Feb 16 10:59:11 2005 From: Steve.Joyce at sercoassurance.com (Steve Joyce) Date: Wed, 16 Feb 2005 15:59:11 +0000 Subject: [vtkusers] Re: VTK 4.4 don't build vtk.jar file? Message-ID: Hi, Building VTK with Java wrapping seems to build the C++ Java wrapper files but doesn't build the class or jar files. You have to do that yourself. Instructions on how to do it can be found in the section "Build the JAR" at: http://www.duke.edu/~iwd/howto/VTK-Linux-Java_HOWTO.html Although this is for a Linux platform, the Java commands apply to Windows too if you replace / with \. It is also worth including the vtkPanel and vtkCanvas classes in your jar file too which are located separately. Regards, Steve > Hi together! > > I would upgrade my vtk4.2 package to vtk4.4. So I've rebuild vtk with > the vtk4.4-latest-release and Cmake. > I've set VTK_WRAPJAVA in Cmake to ON and it configured without any > error.After that I compiled it with MSVisualStudio6.0. > But I didn't get the vtk.jar file. What's wrong?? > I dunno. My conclusion is that nobody is using VTK 4.4 with > java. > See http://public.kitware.com/pipermail/vtkusers/2005-January/078170.html ****Disclaimer*********** This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information. Serco cannot guarantee that the e-mail or any attachments are free from viruses. The views expressed in this e-mail are those of the originator and do not necessarily represent the views of Serco. Nothing in this e-mail shall bind Serco in any contract or obligation. Serco Group plc. Registered in England and Wales. No: 2048608 Registered Office: Serco House, 16 Bartley Wood Business Park, Bartley Way, Hook, Hampshire, RG27 9UY, United Kingdom. ****End Disclaimer******* <<<>>> From mathieu.malaterre at kitware.com Wed Feb 16 11:20:31 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Wed, 16 Feb 2005 11:20:31 -0500 Subject: [vtkusers] Re: vtkLSMReader In-Reply-To: <56d1a0a4cc56b4940a05a2e6053c7cf3@chalkie.org.uk> References: <8e651fc2f0176f2f86281468bc1c3f2b@chalkie.org.uk> <56d1a0a4cc56b4940a05a2e6053c7cf3@chalkie.org.uk> Message-ID: <421372CF.9060307@kitware.com> Dan, If I am correct you just entered the bug today, right ? It takes a little while before anything is added in VTK. We need to verify the code properly compiles/runs on a variety of plateforms. Also can you provide a test for your reader (usually a dataset + a small tcl script). BTW you can add attachment to the bug tracker, just go to: http://vtk.org/Bug/bug.php?op=show&bugid=1600 And look for : "Create Attachment". Regards, Mathieu Dr. Daniel James White PhD wrote: > Hi Gaetan, > > So mandrake has a built in VTK package does it? > cool. > > how are the VTK people with folks releasing VTK software with added bits > in that aren't yet actually part of VTK? > > Our vtkLSMReader is not fully tested, and there are probably bugs we > haven't found, > so it has to be marked as alpha software, > > Isnt it better to get it committed to the VTK CVS first, before > releasing it for example in mandrake linux ? > > If you just want to use it personally, then I can send you a development > version, > so you can try it before it makes it into the VTK CVS > The lsm reader will be further refined in the future.... and new > versions sent to vtk as they are developed. > > I just made a new bug report, for submission of the .lsm reader, and it > is there on the vtk bugs system. > looks like its assigned to Will Schroder.... wonder if it will make it > into VTK5...I expect Will is rather busy! > > cheers > > Dan > > > On 16 Feb 2005, at 15:36, Gaetan Lehmann wrote: > >> >> can you send me files your are talking about (c++, .h and python >> script) ? >> >> LSM support really lacks in VTK. >> If everything works without problem, and if you agree, I would like to >> include your LSM support in mandrake VTK package... >> >> >> On Wed, 16 Feb 2005 14:12:53 +0200, Dr. Daniel James White PhD >> wrote: >> >> >> -- >> Gaetan Lehmann >> Tel: +33 1 34 65 22 34 >> Biologie du D?veloppement et de la Reproduction >> INRA de Jouy-en-Josas (France) >> >> > Dr. Daniel James White BSc. (Hons.) PhD > Bioimaging Coordinator > Nanoscience Centre and > Department of Biological and Environmental science > Division of Molecular Recognition > Ambiotica C242 > PO Box 35 > University of Jyv?skyl? > Jyv?skyl? FIN 40014 > Finland > +358 14 260 4183 (work) > +358 468102840 (mobile) > > http://www.chalkie.org.uk > dan at chalkie.org.uk > white at cc.jyu.fi > > _______________________________________________ > 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 > > From dan at chalkie.org.uk Wed Feb 16 12:09:41 2005 From: dan at chalkie.org.uk (Dr. Daniel James White PhD) Date: Wed, 16 Feb 2005 19:09:41 +0200 Subject: [vtkusers] Re: vtkLSMReader In-Reply-To: <421372CF.9060307@kitware.com> References: <8e651fc2f0176f2f86281468bc1c3f2b@chalkie.org.uk> <56d1a0a4cc56b4940a05a2e6053c7cf3@chalkie.org.uk> <421372CF.9060307@kitware.com> Message-ID: Hi Mattieu, OK, I will attach the c++ and h files and also Heikki's lsmreader.py testing script to the bug report. Kalle, have you got a latest and greatest version of the vtkLSMReader.c++ and .h files I can have for this? Or shall I use the old ones on the modeling machine? Cheers Dan On 16 Feb 2005, at 18:20, Mathieu Malaterre wrote: > Dan, > > If I am correct you just entered the bug today, right ? It takes a > little while before anything is added in VTK. We need to verify the > code properly compiles/runs on a variety of plateforms. Also can you > provide a test for your reader (usually a dataset + a small tcl > script). > > BTW you can add attachment to the bug tracker, just go to: > > http://vtk.org/Bug/bug.php?op=show&bugid=1600 > > And look for : "Create Attachment". > > Regards, > Mathieu > > Dr. Daniel James White PhD wrote: >> Hi Gaetan, >> So mandrake has a built in VTK package does it? >> cool. >> how are the VTK people with folks releasing VTK software with added >> bits in that aren't yet actually part of VTK? >> Our vtkLSMReader is not fully tested, and there are probably bugs we >> haven't found, >> so it has to be marked as alpha software, >> Isnt it better to get it committed to the VTK CVS first, before >> releasing it for example in mandrake linux ? >> If you just want to use it personally, then I can send you a >> development version, >> so you can try it before it makes it into the VTK CVS >> The lsm reader will be further refined in the future.... and new >> versions sent to vtk as they are developed. >> I just made a new bug report, for submission of the .lsm reader, and >> it is there on the vtk bugs system. >> looks like its assigned to Will Schroder.... wonder if it will make >> it into VTK5...I expect Will is rather busy! >> cheers >> Dan >> On 16 Feb 2005, at 15:36, Gaetan Lehmann wrote: >>> >>> can you send me files your are talking about (c++, .h and python >>> script) ? >>> >>> LSM support really lacks in VTK. >>> If everything works without problem, and if you agree, I would like >>> to include your LSM support in mandrake VTK package... >>> >>> >>> On Wed, 16 Feb 2005 14:12:53 +0200, Dr. Daniel James White PhD >>> wrote: >>> >>> >>> -- >>> Gaetan Lehmann >>> Tel: +33 1 34 65 22 34 >>> Biologie du D?veloppement et de la Reproduction >>> INRA de Jouy-en-Josas (France) >>> >>> >> Dr. Daniel James White BSc. (Hons.) PhD >> Bioimaging Coordinator >> Nanoscience Centre and >> Department of Biological and Environmental science >> Division of Molecular Recognition >> Ambiotica C242 >> PO Box 35 >> University of Jyv?skyl? >> Jyv?skyl? FIN 40014 >> Finland >> +358 14 260 4183 (work) >> +358 468102840 (mobile) >> http://www.chalkie.org.uk >> dan at chalkie.org.uk >> white at cc.jyu.fi >> _______________________________________________ >> 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 > > Dr. Daniel James White BSc. (Hons.) PhD Bioimaging Coordinator Nanoscience Centre and Department of Biological and Environmental science Division of Molecular Recognition Ambiotica C242 PO Box 35 University of Jyv?skyl? Jyv?skyl? FIN 40014 Finland +358 14 260 4183 (work) +358 468102840 (mobile) http://www.chalkie.org.uk dan at chalkie.org.uk white at cc.jyu.fi From randall.hand at gmail.com Wed Feb 16 12:29:16 2005 From: randall.hand at gmail.com (Randall Hand) Date: Wed, 16 Feb 2005 11:29:16 -0600 Subject: [vtkusers] Volume Rendering with multiple-array data Message-ID: I have a VTK Dataset with with multiple data values per point. Each data point in my rectilinear grid has both a scalar (fractional occupancy) and a vector (flow velocity). I want to generate a volume rendering from this dataset of the scalar field, using the RayCast volume code. How do I get from the vtkDataSet that vtkDataSetReader outputs, to the vtkImageData that the volume rendering routines want? Currently I'm using a GaussianSPlatter to convert to an imageData, & a vtkImageShiftScale to convert from the 0-1float to a 0-255unsigned char. Here's an exerpt from my code: ***BEGIN*** // Load model vtkDataSetReader *model = vtkDataSetReader::New(); model->SetFileName(filename); model->Update(); printf("File loaded\n"); model->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); printf("* Range: %f - %f\n", range[0], range[1]); vtkMaskPoints *mask = vtkMaskPoints::New(); mask->SetInput(model->GetOutput()); mask->RandomModeOn(); mask->SetMaximumNumberOfPoints(10); mask->Update(); printf("Data Masked\n"); mask->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); printf("* Range: %f - %f\n", range[0], range[1]); vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); filter->SetNullValue(0.0); filter->SetInput(mask->GetOutput()); filter->Update(); printf("Filter ran\n"); vtkImageShiftScale *scaled = vtkImageShiftScale::New(); scaled->SetInput(filter->GetOutput()); scaled->SetScale(255.0); scaled->SetOutputScalarTypeToUnsignedChar(); scaled->Update(); printf("Data Scaled ran\n"); printf("* Scaled data arrays:\n"); vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); for(n=0; n< dataptr->GetNumberOfArrays(); n++) { printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); } scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); printf("* Range: %f - %f\n", range[0], range[1]); vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); filter->SetNullValue(0.0); filter->SetInput(mask->GetOutput()); filter->Update(); printf("Filter ran\n"); vtkImageShiftScale *scaled = vtkImageShiftScale::New(); scaled->SetInput(filter->GetOutput()); scaled->SetScale(255.0); scaled->SetOutputScalarTypeToUnsignedChar(); scaled->Update(); printf("Data Scaled ran\n"); printf("* Scaled data arrays:\n"); vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); for(n=0; n< dataptr->GetNumberOfArrays(); n++) { printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); } scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); printf("* Range: %f - %f\n", range[0], range[1]); vtkVolumeRayCastCompositeFunction *compFunc = vtkVolumeRayCastCompositeFunction::New(); compFunc->SetCompositeMethodToInterpolateFirst(); vtkPiecewiseFunction *xf_Opacity = vtkPiecewiseFunction::New(); xf_Opacity->AddPoint(0,0.0); xf_Opacity->AddPoint(255,1.0); vtkColorTransferFunction *xf_Color = vtkColorTransferFunction::New(); xf_Color->AddRGBPoint(0, 0, 0, 1); xf_Color->AddRGBPoint(255, 0, 0, 1); vtkVolumeProperty *volProp = vtkVolumeProperty::New(); volProp->SetColor(xf_Color); volProp->SetScalarOpacity(xf_Opacity); volProp->SetInterpolationTypeToLinear(); modelMapper = vtkVolumeRayCastMapper::New(); modelMapper->SetInput(scaled->GetOutput()); modelMapper->SetVolumeRayCastFunction(compFunc); // modelMapper->Update(); printf("Mapper updated\n"); vtkVolume *volume = vtkVolume::New(); volume->SetMapper(modelMapper); volume->SetProperty(volProp); ***END*** When I run this, tho, I get the following output: =============== BEGIN OUTPUT ============== Loading file test.vtk... File loaded * Range: 0.000000 - 1.000000 Data Masked * Range: 0.000000 - 1.000000 Filter ran Data Scaled ran * Scaled data arrays: * [0] "(null)" * Range: 0.000000 - 253.000000 Mapper updated ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/Filtering/vtkExecutive.cxx, line 519 vtkStreamingDemandDrivenPipeline (0x109843b8): Non-forwarded requests are not yet implemented. Segmentation fault (core dumped) ================ END OUTPUT ============ Any ideas? -- Randall Hand http://www.yeraze.com From hesham at uni-paderborn.de Fri Feb 4 21:48:42 2005 From: hesham at uni-paderborn.de (hesham) Date: Fri, 4 Feb 2005 18:48:42 -0800 Subject: [vtkusers] linking problem Message-ID: <000501c50b2d$3448d770$734eea83@hesham> Hi again , i download my vtk4qt3 program from this site: http://www.matthias-koenig.net/vtkqt/ and there are no library files inside it , I don't know what shall I do , I run the program in command prompt but its still not working Can u please tell me the steps to execute my program correctly? Or maybe you can send the library file if u have it Thank you for help hesham -----Original Message----- From: Andrew Maclean [mailto:a.maclean at cas.edu.au] Sent: Dienstag, 15. Februar 2005 16:22 To: 'hesham' Subject: RE: [vtkusers] problem with vtkqt You are not linking in the library files for vtk4qt3. _____ From: hesham [mailto:hesham at uni-paderborn.de] Sent: Friday, 4 February 2005 19:59 To: vtkusers at vtk.org Subject: [vtkusers] problem with vtkqt Hi, Im beginner ,I want to put my vtk code in qt window because I have to make menu and anther command button,I start to use very easy example but when I excute the programm I had this link error Can you help me ,I use vtk4.2 ,qt3.3.3 and vtk4qt3,, My code : #include "vtkQtRenderWindow.h" #include "vtkRenderer.h" int main (void) { vtkRenderer *ren = vtkRenderer::New(); vtkQtRenderWindow *renWindow = vtkQtRenderWindow::New(); renWindow->AddRenderer(ren); renWindow->SetWindowName("VtkQt-vtkQtRenderWindow"); return 0; } linking Error: vtkqt.cpp Linking... vtkqt.obj : error LNK2001: unresolved external symbol "public: static class vtkQtRenderWindow * __cdecl vtkQtRenderWindow::New(void)" (?New at vtkQtRenderWindow@@SAPAV1 at XZ) Debug/vtkqt.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. vtkqt.exe - 2 error(s), 0 warning(s) -------------- next part -------------- An HTML attachment was scrubbed... URL: From infopipe at gmx.net Wed Feb 16 12:54:38 2005 From: infopipe at gmx.net (Bernhard Breinbauer) Date: Wed, 16 Feb 2005 18:54:38 +0100 Subject: [vtkusers] properties of transformed actors Message-ID: <200502161854.45106.infopipe@gmx.net> Hi list! I am a student at the technical university of vienna. At the moment I am working on a solid modeler for microelectronical design. The 3D Visualization should be done with vtk. But I'm getting problems testing the capabilities of vtk. It is possible to transform actors with e.g. vtkBoxWidgets, but I am not able to get the properties (coordinates, dimensions) of the transformed actor. Is there a way to get that information? every help will be appreciated! bernhard breinbauer -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From hesham at uni-paderborn.de Fri Feb 4 22:08:53 2005 From: hesham at uni-paderborn.de (hesham) Date: Fri, 4 Feb 2005 19:08:53 -0800 Subject: [vtkusers] RE: linking problem Message-ID: <002801c50b30$05f44f00$734eea83@hesham> Hi again , i download my vtk4qt3 program from this site: http://www.matthias-koenig.net/vtkqt/ and there are no library files inside it , I don't know what shall I do , I run the program in command prompt but its still not working Can u please tell me the steps to execute my program correctly? Or maybe you can send the library file if u have it Thank you for help hesham -------------- next part -------------- An HTML attachment was scrubbed... URL: From hesham at uni-paderborn.de Fri Feb 4 22:21:37 2005 From: hesham at uni-paderborn.de (hesham) Date: Fri, 4 Feb 2005 19:21:37 -0800 Subject: [vtkusers] FW: Undelivered Mail Returned to Sender Message-ID: <003e01c50b31$cd0d6f80$734eea83@hesham> -----Original Message----- From: Mail Delivery System [mailto:MAILER-DAEMON at public.kitware.com] Sent: Mittwoch, 16. Februar 2005 10:16 To: hesham at uni-paderborn.de Subject: Undelivered Mail Returned to Sender This is the Postfix program at host public.kitware.com. I'm sorry to have to inform you that your message could not be be delivered to one or more recipients. It's attached below. For further assistance, please send mail to If you do so, please include this problem report. You can delete your own text from the attached returned message. The Postfix program : mail forwarding loop for vtkusers at vtk.org -------------- next part -------------- An embedded message was scrubbed... From: "hesham" Subject: [vtkusers] RE: linking problem Date: Fri, 4 Feb 2005 19:08:53 -0800 Size: 7859 URL: From naim_canada at yahoo.ca Wed Feb 16 13:22:20 2005 From: naim_canada at yahoo.ca (Naim Himrane) Date: Wed, 16 Feb 2005 13:22:20 -0500 (EST) Subject: [vtkusers] Set Cell type In-Reply-To: <200502161854.45106.infopipe@gmx.net> Message-ID: <20050216182220.98017.qmail@web21430.mail.yahoo.com> Hi everybody, I am new to vtk, I tried to create a cube datatype (see the code below), when I called the polys->SetCells(12, IdTypeArray) function the system crashes. Is it the correct manner to set the cell type as VTK_TETRA like this? vtkIdTypeArray *IdTypeArray = vtkIdTypeArray::New(); IdTypeArray->SetNumberOfValues(12); for (i=0; i<12; i++) { polys->InsertNextCell(4,pts[i]); // tetra IdTypeArray->SetValue(i,VTK_TETRA); } polys->SetCells(12, IdTypeArray); thanks for your time Naim // code source void CGLModelViewCtrl::Cube() { static float x[9][3]={{5.000000e-001, -2.840789e-002, 4.103363e-002}, {0.000000e+000, -2.840789e-002, 4.103363e-002}, {5.000000e-001, -2.840789e-002, -4.589664e-001}, {0.000000e+000, -2.840789e-002, -4.589664e-001}, {5.000000e-001, 4.715921e-001, -4.589664e-001}, {0.000000e+000, 4.715921e-001, -4.589664e-001}, {5.000000e-001, 4.715921e-001, 4.103363e-002}, {0.000000e+000, 4.715921e-001, 4.103363e-002}, {3.438136e-001, 2.000117e-001, -2.254762e-001}}; static vtkIdType pts[12][4]={{1, 0, 8, 7}, {7, 0, 8, 6}, {1, 5, 8, 3}, {5, 3, 4, 8}, {4, 5, 8, 6}, {4, 8, 2, 6}, {8, 7, 5, 1}, {6, 8, 2, 0}, {0, 8, 2, 1}, {1, 8, 2, 3}, {8, 4, 2, 3}, {6, 7, 5, 8}}; // We'll create the building blocks of polydata including data attributes. cube = vtkPolyData::New(); points = vtkPoints::New(); polys = vtkCellArray::New(); scalars = vtkFloatArray::New(); // Load the point, cell, and data attributes. for (int i=0; i<9; i++) points->InsertPoint(i,x[i]); vtkIdTypeArray *IdTypeArray = vtkIdTypeArray::New(); IdTypeArray->SetNumberOfValues(12); for (i=0; i<12; i++) { polys->InsertNextCell(4,pts[i]); IdTypeArray->SetValue(i,VTK_TETRA); } polys->SetCells(12, IdTypeArray); scalars->InsertTuple1(0,0.866885); scalars->InsertTuple1(1,0.562442); scalars->InsertTuple1(2,0.661086); scalars->InsertTuple1(3,0); scalars->InsertTuple1(4,0.740853); scalars->InsertTuple1(5,1); scalars->InsertTuple1(6,0.728700); scalars->InsertTuple1(7,0.739150); scalars->InsertTuple1(8,0.260398); // We now assign the pieces to the vtkPolyData. cube->SetPoints(points); points->Delete(); cube->SetPolys(polys); polys->Delete(); cube->GetPointData()->SetScalars(scalars); cube->Squeeze(); cube->Update(); scalars->Delete(); // Now we'll look at it. cubeMapper = vtkPolyDataMapper::New(); cubeMapper->SetInput(cube); cubeActor = vtkActor::New(); cubeActor->SetMapper(cubeMapper); renderer->AddActor(cubeActor); renderer->SetActiveCamera(camera); renderer->ResetCamera(); } --------------------------------- Post your free ad now! Yahoo! Canada Personals -------------- next part -------------- An HTML attachment was scrubbed... URL: From marshbur at cs.unc.edu Wed Feb 16 14:40:22 2005 From: marshbur at cs.unc.edu (David Marshburn) Date: Wed, 16 Feb 2005 14:40:22 -0500 (EST) Subject: [vtkusers] VTK 4.4 don't build vtk.jar file? In-Reply-To: <20050216154130.6AF7B303D7@public.kitware.com> References: <20050216154130.6AF7B303D7@public.kitware.com> Message-ID: On Wed, 16 Feb 2005 vtkusers-request at vtk.org wrote: > Date: Wed, 16 Feb 2005 10:41:04 -0500 > From: "Steve M. Robbins" > Subject: Re: [vtkusers] VTK 4.4 don't build vtk.jar file? > > I dunno. My conclusion is that nobody is using VTK 4.4 with > java. > > See http://public.kitware.com/pipermail/vtkusers/2005-January/078170.html my group uses the java-wrapped version of vtk 4.4. yes, i noticed that the jar file isn't created. it was sufficiently easy to jar the files up myself that i never bothered to look into why the build process wasn't doing it. in ...\VTK\bin\java\vtk, i execute "javac *.java" then in ...\VTK\bin\java, i execute "jar -cvf vtk.jar vtk" we do more development with vtk than on vtk, so this was a rare operation. to be honest, steve, i saw your message and thought, "yep, that's a known bug." sorry if the lack of response left you thinking no one was using vtk44 w/java. cheers, -david From brilligent at gmail.com Wed Feb 16 15:15:00 2005 From: brilligent at gmail.com (Doug Henry) Date: Wed, 16 Feb 2005 15:15:00 -0500 Subject: [vtkusers] toolkit implementation Message-ID: <66f59a45050216121553614050@mail.gmail.com> I'm wondering if there are resources (documentation) available that dicuss the process of implementing a renderer for an unsupported toolkit? I found a vtk package for FLTK which looks like I would expect, but I'm unsure of some things that are being done. For example, vtkOpenGLRenderWindow is subclassed to create vtkFLTKOpenGLRenderWindow, but there are some mystery files created through the use of VTK_MAKE_INSTANTIATOR cmake macro. Anything that helps to explain the minimal set of things that need implemented would be extremely helpful. Thanks, Doug From ljw at soc.soton.ac.uk Wed Feb 16 17:23:04 2005 From: ljw at soc.soton.ac.uk (Luke J West) Date: Wed, 16 Feb 2005 22:23:04 +0000 Subject: [vtkusers] vtkAssembly for vtkActor2D? Message-ID: <1108592584.4213c7c8dde52@webmail.soc.soton.ac.uk> Hi folks, Is there something like a vtkAssembly - only for vtkActor2D? Thanks, Luke J West : e-Science Research Assistant --------------------------------------------- Room 566/12, School of Ocean & Earth Sciences Southampton Oceanography Centre, Southampton SO14 3ZH United Kingdom --------------------------------------------- Tel: +44 23 8059 4801 Fax: +44 23 8059 3052 Mob: +44 79 6107 4783 Skype: ljwest --------------------------------------------- http://godiva.soc.soton.ac.uk/ ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From hesham at uni-paderborn.de Sat Feb 5 02:37:15 2005 From: hesham at uni-paderborn.de (hesham) Date: Fri, 4 Feb 2005 23:37:15 -0800 Subject: [vtkusers] : linking problem Message-ID: <000a01c50b55$834e7550$734eea83@hesham> Hi , I hope every thing going ok with you , today I made what you told me yesterday, i downloaded vtk4qt3 package from the internet: http://www.matthias-koenig.net/vtkqt/ and i took the example code and included in my code but I have linking error: vtkqt.cpp Linking... vtkqt.obj : error LNK2001: unresolved external symbol "public: static class vtkQtRenderWindow * __cdecl vtkQtRenderWindow::New(void)" (?New at vtkQtRenderWindow@@SAPAV1 at XZ) Debug/vtkqt.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. vtkqt.exe - 2 error(s), 0 warning(s) I sent to vtkuser at vtk.org email and told them that I have this linking error The replayed today and told me Im not linking in the library files for vtk4qt3.i tried to look in the internet too to find solution for this problem and I found many people have the same problem and there are some new packages in the internet like : http://wwwipr.ira.uka.de/~kuebler/vtkqt/index.html But in this packages there are no vtkqtrenderwindow and vtkqtrenderwindowinteractor classes instead, vtkQGLrenderwindow and vtkQGlwindowinteractor I'm sorry again to ask so much but am not asking you to write code for me but only help me to find my way to make the things working. Hesham EL MOrsy From goodwin.lawlor at ucd.ie Wed Feb 16 18:07:10 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Wed, 16 Feb 2005 23:07:10 -0000 Subject: [vtkusers] Re: vtkAssembly for vtkActor2D? References: <1108592584.4213c7c8dde52@webmail.soc.soton.ac.uk> Message-ID: Hi Luke, vtkPropAssembly should work... you can add vtkProp to the assembly which is the superclass for all actors hth Goodwin "Luke J West" wrote in message news:1108592584.4213c7c8dde52 at webmail.soc.soton.ac.uk... Hi folks, Is there something like a vtkAssembly - only for vtkActor2D? Thanks, Luke J West : e-Science Research Assistant --------------------------------------------- Room 566/12, School of Ocean & Earth Sciences Southampton Oceanography Centre, Southampton SO14 3ZH United Kingdom --------------------------------------------- Tel: +44 23 8059 4801 Fax: +44 23 8059 3052 Mob: +44 79 6107 4783 Skype: ljwest --------------------------------------------- http://godiva.soc.soton.ac.uk/ ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ _______________________________________________ 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 From juan.aja at gmail.com Wed Feb 16 18:33:51 2005 From: juan.aja at gmail.com (=?ISO-8859-1?Q?Juan_Jos=E9_Aja_Fern=E1ndez?=) Date: Wed, 16 Feb 2005 17:33:51 -0600 Subject: [vtkusers] About Volume Rendering in VTK Message-ID: <9f83649305021615332374b20@mail.gmail.com> Hi. I've posted a couple of questions about volume rendering, but I guess they were too generic so I'm going to make it simple. I want to volume render an unstructured grid, so I guess I should use vtkUnstructuredGridVolumeRayCastFunction and Mapper. What I want to know is: What do I need to do this? I gues I will need a couple of points and voxels to define the grid. What else? Point Data or Cell Data? What I'm trying to say is: How does vtk does the volume rendering in unstructured grids? Does it work on the scalars of the grid?, or does it work on the point/cell Data?. Thanks in advance. Juan. From brilligent at gmail.com Wed Feb 16 21:59:32 2005 From: brilligent at gmail.com (Doug Henry) Date: Wed, 16 Feb 2005 21:59:32 -0500 Subject: [vtkusers] Toolkit Implementation Message-ID: <66f59a4505021618592352081d@mail.gmail.com> I'm wondering if there are resources (documentation) available that dicuss the process of implementing a renderer for an unsupported toolkit? I found a vtk package for FLTK which looks like what I would expect, but I'm unsure of some things that are being done. For example, vtkOpenGLRenderWindow is subclassed to create vtkFLTKOpenGLRenderWindow, which seems reasonable. But there are some mystery files created through the use of VTK_MAKE_INSTANTIATOR cmake macro. Anything that helps to explain the minimal set of things that need implemented would be extremely helpful. Thanks, Doug From mathieu.malaterre at kitware.com Wed Feb 16 22:43:56 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Wed, 16 Feb 2005 22:43:56 -0500 Subject: [vtkusers] Toolkit Implementation Message-ID: <200502170343.j1H3huvs018777@rrcs-mta-03.hrndva.rr.com> Doug, Please have a look at VTK's Wiki: http://vtk.org/Wiki/VTK_Classes#FLTK The code provided by C.P. Botha (vtkFlRenderWindowInteractor) is currently used in ITK. It has been proven to be robust and hopefully bug free ;) HTH Mathieu > I'm wondering if there are resources (documentation) available that > dicuss the process of implementing a renderer for an unsupported > toolkit? I found a vtk package for FLTK which looks like what I would > expect, but I'm unsure of some things that are being done. For > example, vtkOpenGLRenderWindow is subclassed to create > vtkFLTKOpenGLRenderWindow, which seems reasonable. But there are some > mystery files created through the use of VTK_MAKE_INSTANTIATOR cmake > macro. Anything that helps to explain the minimal set of things that > need implemented would be extremely helpful. > > Thanks, > > Doug > _______________________________________________ > 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 > From benkasmi at yahoo.com Thu Feb 17 01:57:21 2005 From: benkasmi at yahoo.com (Ali Hashimi) Date: Wed, 16 Feb 2005 22:57:21 -0800 (PST) Subject: [vtkusers] height map Message-ID: <20050217065721.91715.qmail@web13825.mail.yahoo.com> Hi everybody I am working on a school project to generate a 3D model from a gray scale image, the luminosite of the pixel needs to be scaled to give the z value of the XY point. after I used vtkPNGReader to read the PNG image file, I do not know what other classes in vtk to use to generate a set of XYZ points and render them. I appreciate any help. thank you __________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250 From steven.robbins at videotron.ca Thu Feb 17 02:21:14 2005 From: steven.robbins at videotron.ca (Steve M. Robbins) Date: Thu, 17 Feb 2005 02:21:14 -0500 Subject: [vtkusers] VTK 4.4 don't build vtk.jar file? In-Reply-To: <42136BA3.9020003@kitware.com> References: <4213594A.40402@gmx.de> <20050216154104.GB14862@nyongwa.montreal.qc.ca> <42136BA3.9020003@kitware.com> Message-ID: <20050217072114.GB21051@nyongwa.montreal.qc.ca> On Wed, Feb 16, 2005 at 10:49:55AM -0500, Brad King wrote: > Steve M. Robbins wrote: > >My conclusion is that nobody is using VTK 4.4 with java. > > > >See http://public.kitware.com/pipermail/vtkusers/2005-January/078170.html > > I just looked back through the CVS log. It seems that the > IF(BOGO)/ENDIF(BOGO) was an accidental checkin that happend to be > present when 4.4 was branched. The immediately following checkin > removes the lines. Just remove these lines from > VTK/Wrapping/Java/CMakeLists.txt and rebuild to get the jar file. I should have mentioned in my postings that I had tried removing the two BOGO lines. The result is: CMake Error: Attempt to add a custom rule to an output that already has a custom rule. For output: /usr/local/src/visualization/VTK/java/vtk/vtkTesting.class > I'll get this fixed on the 4.4 branch. I'm sure that would be appreciated. Thanks for your suggestion to look through the CVS log. I see that VTK 4.4 ships revision 1.30 of Wrapping/Java/CMakeLists.txt. I tried each subsequent revision of that file with 4.4 but failed each time in a different manner: rev 1.31: CMake Error: Attempt to add a custom rule to an output that already has a custom rule. For output: /usr/local/src/visualization/VTK/java/vtk/vtkTesting.class rev 1.32: make[3]: *** No rule to make target `/usr/local/src/visualization/VTK/Wrapping/Java/vtk/vtkTesting2.java rev 1.33: CMake Error: File /usr/local/src/visualization/VTK/Wrapping/Java/vtkBuildAllDriver.java.in does not exist. rev 1.34: CMake Error: File /usr/local/src/visualization/VTK/Wrapping/Java/vtkBuildAllDriver.java.in does not exist. -Steve From paul at opes.com.au Thu Feb 17 04:20:46 2005 From: paul at opes.com.au (Paul Tait) Date: Thu, 17 Feb 2005 17:20:46 +0800 Subject: [vtkusers] Lighting problem Message-ID: <002401c514d1$f6b71080$af0aa8c0@DEEPTHROAT> I've just modified my VTK app to accentuate the vertical distances between some oil reservoirs. Everything goes fine till start moving the model around. From many angles the it just shows black. By moving around to another position I can see it again. I'm using a plain vtlLightKit which normally works really well for me. Do I have to inform it or something else of the change in the scene ? Paul Tait PS Wil... Hows my high contrast LUT coming on ? -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 From dussere at labri.fr Thu Feb 17 04:55:34 2005 From: dussere at labri.fr (Michael Dussere) Date: Thu, 17 Feb 2005 10:55:34 +0100 Subject: [vtkusers] vtkImageActor position is not automatically set in VTK CVS Message-ID: <42146A16.8080109@labri.fr> I just get the CVS version of VTK and I remarked that vtkImageActor comportment changed. It no more uses its ImageData origin to automatically set its poition. Is it normal??? In VTK 4.2, I used to do imagedata = vtkImageData::New(); imagedata->SetDimensions(x1-x0+1, y1-y0+1, 1) ; imagedata->SetSpacing(dx, dy, 1); imagedata->SetOrigin (x0*dx,y0*dy,0); actor = vtkImageActor::New(); actor->SetInput(imagedata->GetOutput()); // actor position = {x0*dx, y0*dy, 0} Now, in VTK CVS, I have to do imagedata = vtkImageData::New(); imagedata->SetDimensions(x1-x0+1, y1-y0+1, 1) ; imagedata->SetSpacing(dx, dy, 1); imagedata->SetOrigin (x0*dx,y0*dy,0); actor = vtkImageActor::New(); actor->SetInput(imagedata->GetOutput()); // actor position = {0, 0, 0} actor->SetPosition(imagedata->GetOutput()->GetOrigin()); // actor position = {x0*dx, y0*dy, 0} From patgo at sapo.pt Thu Feb 17 05:20:33 2005 From: patgo at sapo.pt (=?iso-8859-1?Q?Patr=EDcia_Gon=E7alves?=) Date: Thu, 17 Feb 2005 10:20:33 -0000 Subject: [vtkusers] VTK source code Message-ID: <009501c514da$53d03ff0$1c23fea9@LurdesTeixeira> When I try to download the VTK source file (vtk42Src.zip) in the page http://www.itk.org/HTML/DownloadRelatedSoftware.htm an error message is shown saying /projects/VTK/WWW/vtkhtml/files/release/4.2/vtk42Src.zip does not exist and I'm redirected to http://public.kitware.com/. Where can I download the VTK source code? Thank you, Patr?cia Gon?alves -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Thu Feb 17 07:30:47 2005 From: brad.king at kitware.com (Brad King) Date: Thu, 17 Feb 2005 07:30:47 -0500 Subject: [vtkusers] VTK 4.4 don't build vtk.jar file? In-Reply-To: <20050217072114.GB21051@nyongwa.montreal.qc.ca> References: <4213594A.40402@gmx.de> <20050216154104.GB14862@nyongwa.montreal.qc.ca> <42136BA3.9020003@kitware.com> <20050217072114.GB21051@nyongwa.montreal.qc.ca> Message-ID: <42148E77.6040408@kitware.com> Steve M. Robbins wrote: > I should have mentioned in my postings that I had tried removing the > two BOGO lines. The result is: > > CMake Error: Attempt to add a custom rule to an output that already has a custom rule. For > output: /usr/local/src/visualization/VTK/java/vtk/vtkTesting.class You may be able to work around this just by commenting out the vtkTesting reference in VTK/Wrapping/Java/CMakeLists.txt. > Thanks for your suggestion to look through the CVS log. I see that > VTK 4.4 ships revision 1.30 of Wrapping/Java/CMakeLists.txt. I tried > each subsequent revision of that file with 4.4 but failed each time in > a different manner: That's because the future versions of the file past 1.31 depend on changes to other files. -Brad From dussere at labri.fr Thu Feb 17 08:40:58 2005 From: dussere at labri.fr (Michael Dussere) Date: Thu, 17 Feb 2005 14:40:58 +0100 Subject: [vtkusers] vtkImageActor position is not automatically set in VTK CVS Message-ID: <42149EEA.9030604@labri.fr> I just get the CVS version of VTK and I remarked that vtkImageActor comportment changed. It no more uses its ImageData origin to automatically set its poition. Is it normal??? Michael In VTK 4.2, I used to do imagedata = vtkImageData::New(); imagedata->SetDimensions(x1-x0+1, y1-y0+1, 1) ; imagedata->SetSpacing(dx, dy, 1); imagedata->SetOrigin (x0*dx,y0*dy,0); actor = vtkImageActor::New(); actor->SetInput(imagedata->GetOutput()); // actor position = {x0*dx, y0*dy, 0} Now, in VTK CVS, I have to do imagedata = vtkImageData::New(); imagedata->SetDimensions(x1-x0+1, y1-y0+1, 1) ; imagedata->SetSpacing(dx, dy, 1); imagedata->SetOrigin (x0*dx,y0*dy,0); actor = vtkImageActor::New(); actor->SetInput(imagedata->GetOutput()); // actor position = {0, 0, 0} actor->SetPosition(imagedata->GetOutput()->GetOrigin()); // actor position = {x0*dx, y0*dy, 0} From Rupert.Shute at awe.co.uk Thu Feb 17 06:54:20 2005 From: Rupert.Shute at awe.co.uk (Rupert Shute) Date: Thu, 17 Feb 2005 11:54:20 -0000 Subject: [vtkusers] Z-Depth compositing of Renderers Message-ID: Hi, I'm trying to create a setup with two renders that are composited and displayed in the same render window. The first handles the bulk of the rendering (volume and poly) and only requires re-rendering when the scene is rotated/translated/scaled. The second renderer requires almost continuous updating as it is being used to display the position of a haptic device. I've been delving through the VTK source and have a few ideas as to how to go about this, but would appreciate any hints/experiences people may have. In particular I'm unclear as to whether this is achievable using existing VTK code. Will I need to write my own z-depth compositer? Cheers Rupert -- _______________________________________________________________________________ The information in this email and in any attachment(s) is commercial in confidence. If you are not the named addressee(s) or if you receive this email in error then any distribution, copying or use of this communication or the information in it is strictly prohibited. Please notify us immediately by email at admin.internet(at)awe.co.uk, and then delete this message from your computer. While attachments are virus checked, AWE plc does not accept any liability in respect of any virus which is not detected. AWE Plc Registered in England and Wales Registration No 02763902 AWE, Aldermaston, Reading, RG7 4PR From brad.king at kitware.com Thu Feb 17 09:00:24 2005 From: brad.king at kitware.com (Brad King) Date: Thu, 17 Feb 2005 09:00:24 -0500 Subject: [vtkusers] VTK 4.4 don't build vtk.jar file? In-Reply-To: <20050217072114.GB21051@nyongwa.montreal.qc.ca> References: <4213594A.40402@gmx.de> <20050216154104.GB14862@nyongwa.montreal.qc.ca> <42136BA3.9020003@kitware.com> <20050217072114.GB21051@nyongwa.montreal.qc.ca> Message-ID: <4214A378.9090203@kitware.com> Steve M. Robbins wrote: > On Wed, Feb 16, 2005 at 10:49:55AM -0500, Brad King wrote: >>I'll get this fixed on the 4.4 branch. > I'm sure that would be appreciated. It looks like a non-trivial number of changes are needed to get this to work. We probably won't get to fixing this for a while if at all before the 5.0 release. If you can find someone to help you get it working then you can submit a bug report and patch to http://www.vtk.org/Bug Otherwise you can try the CVS version or just stick with 4.2. Sorry, -Brad From goodwin.lawlor at ucd.ie Thu Feb 17 09:54:47 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Thu, 17 Feb 2005 14:54:47 -0000 Subject: [vtkusers] Re: VTK source code References: <009501c514da$53d03ff0$1c23fea9@LurdesTeixeira> Message-ID: Hi Patr?cia, You can go here: http://www.vtk.org/get-software.php and follow the link to the download from sourceforge. hth Goodwin "Patr?cia Gon?alves" wrote in message news:009501c514da$53d03ff0$1c23fea9 at LurdesTeixeira... When I try to download the VTK source file (vtk42Src.zip) in the page http://www.itk.org/HTML/DownloadRelatedSoftware.htm an error message is shown saying /projects/VTK/WWW/vtkhtml/files/release/4.2/vtk42Src.zip does not exist and I'm redirected to http://public.kitware.com/. Where can I download the VTK source code? Thank you, Patr?cia Gon?alves _______________________________________________ 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 From Raymond.Maple at afit.edu Thu Feb 17 11:45:52 2005 From: Raymond.Maple at afit.edu (Maple Raymond C LtCol AFIT/ENY) Date: Thu, 17 Feb 2005 11:45:52 -0500 Subject: [vtkusers] AddArray problems Message-ID: <039A0DCC3D66EE4AB9AF11E119287F15152DDC@ms-afit-04.afit.edu> > Hello, > We are having some problems adding arrays of scalars to an > unstructured grid. We are doing the following: > > mygrid = ->GetOutput() > vtkDoubleArray *data = vtkDoubleArray::New(); > (set num tuples, components, allocate, fill data, set name, etc) > mygrid->GetCellData()->AddArray( data ); > data->Delete() > ... > > At this point, if we write the grid to an xml file, the file contains > an array section with the correct name in the cell data section, but > the data values themselves are missing. If we run the grid through a > vtkExtractUnstructuredGrid filter before we write the xml file, then > all the data is there as expected. We have verified that the array > dimensions match the number of cells in the grid. We have tried with > versions 4.2 and 4.4.2, and get the same results with both. > > The one clue I found in the archives was a statement that you can't > change an object in the middle of a pipeline, and that something like > a vtkMergeDataObjectFilter must be used. If that is the case, why > does everything work correctly if I go though a filter before writing > the grid? What am I missing? > > Thank you, > > RAYMOND C. MAPLE, Lt Col USAF > Deputy Head, Department of Aeronautics and Astronautics > Air Force Institute of Technology > > > RAYMOND C. MAPLE, Lt Col USAF > Deputy Head, Department of Aeronautics and Astronautics > Air Force Institute of Technology > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor at ucd.ie Thu Feb 17 10:12:30 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Thu, 17 Feb 2005 15:12:30 -0000 Subject: [vtkusers] Re: vtkImageActor position is not automatically set in VTKCVS References: <42149EEA.9030604@labri.fr> Message-ID: Hi Michael, See this CVS log: http://public.kitware.com/cgi-bin/viewcvs.cgi/Rendering/vtkImageActor.cxx?rev=1.18&view=markup hth Goodwin "Michael Dussere" wrote in message news:42149EEA.9030604 at labri.fr... > I just get the CVS version of VTK and I remarked that vtkImageActor > comportment changed. It no more uses its ImageData origin to > automatically set its poition. > > Is it normal??? > > Michael > > > > In VTK 4.2, I used to do > > imagedata = vtkImageData::New(); > imagedata->SetDimensions(x1-x0+1, y1-y0+1, 1) ; > imagedata->SetSpacing(dx, dy, 1); > imagedata->SetOrigin (x0*dx,y0*dy,0); > > actor = vtkImageActor::New(); > actor->SetInput(imagedata->GetOutput()); > // actor position = {x0*dx, y0*dy, 0} > > > Now, in VTK CVS, I have to do > > imagedata = vtkImageData::New(); > imagedata->SetDimensions(x1-x0+1, y1-y0+1, 1) ; > imagedata->SetSpacing(dx, dy, 1); > imagedata->SetOrigin (x0*dx,y0*dy,0); > > actor = vtkImageActor::New(); > actor->SetInput(imagedata->GetOutput()); > // actor position = {0, 0, 0} > actor->SetPosition(imagedata->GetOutput()->GetOrigin()); > // actor position = {x0*dx, y0*dy, 0} > _______________________________________________ > 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 > From gattani at aktina.com Thu Feb 17 12:14:44 2005 From: gattani at aktina.com (Abhishek) Date: Thu, 17 Feb 2005 12:14:44 -0500 Subject: [vtkusers] vtk and c# Message-ID: <200502171114726.SM01612@AGworkstation> Hello All, I am building Visual C++ Windows Control Libraries and putting VTK specific code and misc. logic in it. I add the control as a reference to my C# application and hence I am able to call methods and set attributes. Imagine the scenario I have created two windows controls. One windows control is importing data the other control is for rendering the data. The two controls need to communicate by exchanging an instance of vtkImageData. Since I would be using C# I would have to declare a variable of type vtkImageData and then pass that variable to the second control which I can't do because of managed/unmanaged code issues. Is the answer to write a managed extension to the class vtkImageData and use that to exchange information? Or can I simply exchange pointer addresses using void pointers? Because both my controls run in unmanaged environments and they can caste the received pointers to the vtkImageData. Does anyone have any input on this issue? I want to find an elegant and correct way to exchange vtk types between controls in a C# environment. Thanks in advance. Cheers -Abhishek -------------- next part -------------- An HTML attachment was scrubbed... URL: From steven.robbins at videotron.ca Thu Feb 17 12:59:10 2005 From: steven.robbins at videotron.ca (Steve M. Robbins) Date: Thu, 17 Feb 2005 12:59:10 -0500 Subject: [vtkusers] VTK 4.4 don't build vtk.jar file? In-Reply-To: <4214A378.9090203@kitware.com> References: <4213594A.40402@gmx.de> <20050216154104.GB14862@nyongwa.montreal.qc.ca> <42136BA3.9020003@kitware.com> <20050217072114.GB21051@nyongwa.montreal.qc.ca> <4214A378.9090203@kitware.com> Message-ID: <20050217175910.GD14862@nyongwa.montreal.qc.ca> On Thu, Feb 17, 2005 at 09:00:24AM -0500, Brad King wrote: > Steve M. Robbins wrote: > >On Wed, Feb 16, 2005 at 10:49:55AM -0500, Brad King wrote: > >>I'll get this fixed on the 4.4 branch. > >I'm sure that would be appreciated. > > It looks like a non-trivial number of changes are needed to get this to > work. We probably won't get to fixing this for a while if at all before > the 5.0 release. [...] > Otherwise you can try the CVS version or just stick with 4.2. > > Sorry, > -Brad Thanks for taking the trouble to investigate this. What about David Marshburn's workaround: just compile the java files and build the jar file by hand? I didn't do that because I was worried that some other step was missing. Do you know whether that's the case? -Steve From brad.king at kitware.com Thu Feb 17 13:04:12 2005 From: brad.king at kitware.com (Brad King) Date: Thu, 17 Feb 2005 13:04:12 -0500 Subject: [vtkusers] VTK 4.4 don't build vtk.jar file? In-Reply-To: <20050217175910.GD14862@nyongwa.montreal.qc.ca> References: <4213594A.40402@gmx.de> <20050216154104.GB14862@nyongwa.montreal.qc.ca> <42136BA3.9020003@kitware.com> <20050217072114.GB21051@nyongwa.montreal.qc.ca> <4214A378.9090203@kitware.com> <20050217175910.GD14862@nyongwa.montreal.qc.ca> Message-ID: <4214DC9C.7050502@kitware.com> Steve M. Robbins wrote: > On Thu, Feb 17, 2005 at 09:00:24AM -0500, Brad King wrote: > >>Steve M. Robbins wrote: >> >>>On Wed, Feb 16, 2005 at 10:49:55AM -0500, Brad King wrote: >>> >>>>I'll get this fixed on the 4.4 branch. >>> >>>I'm sure that would be appreciated. >> >>It looks like a non-trivial number of changes are needed to get this to >>work. We probably won't get to fixing this for a while if at all before >>the 5.0 release. [...] > > > >>Otherwise you can try the CVS version or just stick with 4.2. >> >>Sorry, >>-Brad > > > Thanks for taking the trouble to investigate this. > > What about David Marshburn's workaround: just compile the java files > and build the jar file by hand? I didn't do that because I was > worried that some other step was missing. Do you know whether > that's the case? I think that should be fine though I haven't tried it. -Brad From hesham at uni-paderborn.de Sun Feb 6 00:37:51 2005 From: hesham at uni-paderborn.de (hesham) Date: Sat, 5 Feb 2005 21:37:51 -0800 Subject: [vtkusers] Problem Message-ID: <000101c50c0d$ffefc920$734eea83@hesham> Hi I have done exactly what you told me in your last mail, but unfortunately the linking problem still unresolved. I do not know where this problem comes from. I tried all the way to path my lib files, I really don know what shall I do, I hope you have time this weak or next week so we can sit together and solve this problem. I'm asking you this after I made many trials, Hesham Linking error: ompiling... vtkQtRenderWindow.cpp Skipping... (no relevant changes detected) Cone3.cxx Linking... Cone3.obj : error LNK2001: unresolved external symbol "public: void __thiscall vtkQtRenderWindowInteractor::SetRenderWindow(class vtkQtRenderWindow *)" (?SetRenderWindow at vtkQtRenderWindowInteractor@@QAEXPAVvtkQtRenderWindow@ @@Z) vtkQtRenderWindow.obj : error LNK2001: unresolved external symbol "public: void __thiscall vtkQtRenderWindowInteractor::SetRenderWindow(class vtkQtRenderWindow *)" (?SetRenderWindow at vtkQtRenderWindowInteractor@@QAEXPAVvtkQtRenderWindow@ @@Z) Cone3.obj : error LNK2001: unresolved external symbol "public: __thiscall vtkQtRenderWindowInteractor::vtkQtRenderWindowInteractor(void)" (??0vtkQtRenderWindowInteractor@@QAE at XZ) vtkQtRenderWindow.obj : error LNK2001: unresolved external symbol "public: __thiscall vtkQtRenderWindowInteractor::vtkQtRenderWindowInteractor(void)" (??0vtkQtRenderWindowInteractor@@QAE at XZ) vtkQtRenderWindow.obj : error LNK2001: unresolved external symbol "protected: void __thiscall vtkQtRenderWindowInteractor::mousePressEvent(class QMouseEvent *)" (?mousePressEvent at vtkQtRenderWindowInteractor@@IAEXPAVQMouseEvent@@@Z) vtkQtRenderWindow.obj : error LNK2001: unresolved external symbol "protected: void __thiscall vtkQtRenderWindowInteractor::mouseReleaseEvent(class QMouseEvent *)" (?mouseReleaseEvent at vtkQtRenderWindowInteractor@@IAEXPAVQMouseEvent@@@Z) vtkQtRenderWindow.obj : error LNK2001: unresolved external symbol "protected: void __thiscall vtkQtRenderWindowInteractor::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent at vtkQtRenderWindowInteractor@@IAEXPAVQMouseEvent@@@Z) vtkQtRenderWindow.obj : error LNK2001: unresolved external symbol "protected: void __thiscall vtkQtRenderWindowInteractor::keyPressEvent(class QKeyEvent *)" (?keyPressEvent at vtkQtRenderWindowInteractor@@IAEXPAVQKeyEvent@@@Z) Debug/Cone3.exe : fatal error LNK1120: 6 unresolved externals Error executing link.exe. Cone3.exe - 9 error(s), 0 warning(s) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcplatt at lineone.net Thu Feb 17 19:26:57 2005 From: jcplatt at lineone.net (John Platt) Date: Fri, 18 Feb 2005 00:26:57 -0000 Subject: [vtkusers] AddArray problems In-Reply-To: <039A0DCC3D66EE4AB9AF11E119287F15152DDC@ms-afit-04.afit.edu> Message-ID: <000401c51550$9191ddf0$0b482850@pacsys4> Hi Raymond, There are 2 approaches you could use to add data arrays to a data set. The first is to ensure that the output is always up to date by calling Update() on your append filter. This will force the filter to execute and you will have a grid to add a data array (functional system). Alternatively, you can use vtkMergeDataObjectFilter to add an array from a data object at a time in the future when the pipeline executes in response to some event. I suspect that the append filter has not executed at the time you write your XML. Adding vtkExtractUnstructuredGrid probably causes the append filter to update. If a filter is out of date, most things you do to the current output will be lost when the filter next updates. A typical operation at the start of filter execution is to re-initialise the output. HTH John. -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Maple Raymond C LtCol AFIT/ENY Sent: 17 February 2005 16:46 To: vtkusers at vtk.org Subject: [vtkusers] AddArray problems Hello, We are having some problems adding arrays of scalars to an unstructured grid. We are doing the following: mygrid = ->GetOutput() vtkDoubleArray *data = vtkDoubleArray::New(); (set num tuples, components, allocate, fill data, set name, etc) mygrid->GetCellData()->AddArray( data ); data->Delete() ... At this point, if we write the grid to an xml file, the file contains an array section with the correct name in the cell data section, but the data values themselves are missing. If we run the grid through a vtkExtractUnstructuredGrid filter before we write the xml file, then all the data is there as expected. We have verified that the array dimensions match the number of cells in the grid. We have tried with versions 4.2 and 4.4.2, and get the same results with both. The one clue I found in the archives was a statement that you can't change an object in the middle of a pipeline, and that something like a vtkMergeDataObjectFilter must be used. If that is the case, why does everything work correctly if I go though a filter before writing the grid? What am I missing? Thank you, RAYMOND C. MAPLE, Lt Col USAF Deputy Head, Department of Aeronautics and Astronautics Air Force Institute of Technology RAYMOND C. MAPLE, Lt Col USAF Deputy Head, Department of Aeronautics and Astronautics Air Force Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: From sakieltang at 263.net Fri Feb 18 01:58:14 2005 From: sakieltang at 263.net (=?gb2312?B?c2FraWVs?=) Date: Fri, 18 Feb 2005 14:58:14 +0800 Subject: [vtkusers] How to realize shear-warp volume rendering in VTK? Message-ID: <20050218065808.83E72439C5@smtp.263.net> hi, all users, How to realize the shear-warp algorithm in VTK?I know there seems to be an open-source version in the site,but i can't find it.Did anyone use it?how about its performance?Is it a final version?I will appreciate very much if anyone can tell me how to find it. Thank in advance. TANG Yu ========================== 263??????????? From yxliu at fudan.edu.cn Fri Feb 18 01:15:31 2005 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Fri, 18 Feb 2005 14:15:31 +0800 Subject: [vtkusers] about getting the pixel values of raycasting Message-ID: <000801c51581$40f4d9c0$1f64a8c0@YXLIU> Hi, I want to get each pixel value after casting a ray through the 3D dataset. Anybody tell me the method which I should use? Regards, Yixun Liu -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at opes.com.au Fri Feb 18 02:24:55 2005 From: paul at opes.com.au (Paul Tait) Date: Fri, 18 Feb 2005 15:24:55 +0800 Subject: [vtkusers] Lighting problem In-Reply-To: <002401c514d1$f6b71080$af0aa8c0@DEEPTHROAT> Message-ID: <007a01c5158a$f1fff200$af0aa8c0@DEEPTHROAT> More info to perhaps pique your interest I'm moving my actors around with actor->AddPosition(0, 0, deltaZ) I can see the bottom of my actors but as soon as I get above the horizontal its as if the lights switch off. This only happens AFTER I've used actor->AddPosition(0, 0, deltaZ) Before that I can view them from any angle. Paul -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Paul Tait Sent: Thursday, 17 February 2005 5:21 PM To: vtkusers at vtk.org Subject: [vtkusers] Lighting problem I've just modified my VTK app to accentuate the vertical distances between some oil reservoirs. Everything goes fine till start moving the model around. From many angles the it just shows black. By moving around to another position I can see it again. I'm using a plain vtlLightKit which normally works really well for me. Do I have to inform it or something else of the change in the scene ? Paul Tait PS Wil... Hows my high contrast LUT coming on ? -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 _______________________________________________ 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 -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 From toreaur at stud.ntnu.no Fri Feb 18 05:14:48 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Fri, 18 Feb 2005 11:14:48 +0100 (CET) Subject: [vtkusers] How to realize shear-warp volume rendering in VTK? In-Reply-To: <20050218065808.83E72439C5@smtp.263.net> References: <20050218065808.83E72439C5@smtp.263.net> Message-ID: the shear transform can be based upon translation along one or two axes. This message was written by: Tore Aurstad 5 th Year Computer Engineering Student at the Norwegian Technical-Natural sciences University NTNU Trondheim, Norway ******************************************** End of message. On Fri, 18 Feb 2005, [gb2312] sakiel wrote: > hi, all users, > How to realize the shear-warp algorithm in VTK?I know there seems to be an open-source version in the site,but i can't find it.Did anyone use it?how about its performance?Is it a final version?I will appreciate very much if anyone can tell me how to find it. > Thank in advance. > TANG Yu > > > > > > ========================== > 263?????????????????????? > From jbiddiscombe at skippingmouse.co.uk Fri Feb 18 06:09:30 2005 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Fri, 18 Feb 2005 12:09:30 +0100 Subject: [vtkusers] How to realize shear-warp volume rendering in VTK? In-Reply-To: <4215CB7C.7070305@cscs.ch> References: <20050218065808.83E72439C5@smtp.263.net> <4215CB7C.7070305@cscs.ch> Message-ID: <4215CCEA.1010404@skippingmouse.co.uk> Sent from wrong account, trying again... > I think the question was regarding the Shear-Warp volume rendering > algorithm. > > There is Shear warp code in vtk, but currently, it's not working > correctly. I committed this code about a year ago, after Stefan > Bruckner and another chap (will locate name on request) donated it. > Unfortunately, the implementation was unstable and giving some dodgy > results (aside from not compiling either). I did a little work on this > to try to integrate it with nicely with vtk cvs head at the time, but > it was taking too much time and I had to stop work on it. > > http://public.kitware.com/cgi-bin/viewcvs.cgi/Rendering/vtkVolumeShearWarpMapper.h?rev=1.6&view=log > several other cxx and header files are also relevent, browse cvs to > find them and look at the source > > has the header file details. The code is al in vtk/rendering, all you > need to do is edit the cmakelists files to include it in the > compilation, then tweak the rendering object factory to return the > mapper when you ask for it. > > If you make any progress, please let me know and I'll try (one day) to > get the code up and running. > > JB > > > Tore Aurstad wrote: > >>the shear transform can be based upon translation along one or two >>axes. >> >> >> >> >> This message was written by: >> >> Tore Aurstad >> 5 th Year Computer Engineering Student at the >> Norwegian Technical-Natural sciences University >> NTNU >> Trondheim, Norway >> ******************************************** >> >> >> End of message. >> >>On Fri, 18 Feb 2005, [gb2312] sakiel wrote: >> >> >> >>>hi, all users, >>>How to realize the shear-warp algorithm in VTK?I know there seems to be an open-source version in the site,but i can't find it.Did anyone use it?how about its performance?Is it a final version?I will appreciate very much if anyone can tell me how to find it. >>>Thank in advance. >>>TANG Yu >>> >>> >>> >>> >>> >>>========================== >>>263?????????????????????? >>> >>> >>> >>_______________________________________________ >>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 >> >> >> > > > >-- >John Biddiscombe, email:biddisco @ cscs.ch >http://www.cscs.ch/about/BJohn.php >CSCS, Swiss National Supercomputing Centre | Tel: +41 (91) 610.82.07 >Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor at ucd.ie Fri Feb 18 08:06:35 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Fri, 18 Feb 2005 13:06:35 -0000 Subject: [vtkusers] Re: Lighting problem References: <002401c514d1$f6b71080$af0aa8c0@DEEPTHROAT> <007a01c5158a$f1fff200$af0aa8c0@DEEPTHROAT> Message-ID: Hi Paul, Try transforming your lights (position and focal point) by the actors transform. Maybe try actor->GetMatrix(matrix); light->SetTransformMatrix(matrix). I'd guess that the other actors in your scene wont look right then though... try moving the light position back along the direction of projection instead. hth Goodwin "Paul Tait" wrote in message news:007a01c5158a$f1fff200$af0aa8c0 at DEEPTHROAT... > More info to perhaps pique your interest > > I'm moving my actors around with actor->AddPosition(0, 0, deltaZ) > > I can see the bottom of my actors but as soon as I get above the > horizontal its as if the lights switch off. This only happens AFTER > I've used actor->AddPosition(0, 0, deltaZ) Before that I can view them > from any angle. > > Paul > > -----Original Message----- > From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On > Behalf Of Paul Tait > Sent: Thursday, 17 February 2005 5:21 PM > To: vtkusers at vtk.org > Subject: [vtkusers] Lighting problem > > > I've just modified my VTK app to accentuate the vertical distances > between some oil reservoirs. Everything goes fine till start moving the > model around. From many angles the it just shows black. By moving around > to another position I can see it again. I'm using a plain vtlLightKit > which normally works really well for me. Do I have to inform it or > something else of the change in the scene ? > > Paul Tait > > PS Wil... Hows my high contrast LUT coming on ? > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 > > > _______________________________________________ > 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 > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 > > > _______________________________________________ > 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 > From burlen at apollo.sr.unh.edu Fri Feb 18 11:08:46 2005 From: burlen at apollo.sr.unh.edu (Burlen) Date: Fri, 18 Feb 2005 11:08:46 -0500 Subject: [vtkusers] vtkHDFReader Message-ID: <200502181108.46942.burlen@apollo.sr.unh.edu> Hi does any one know if there is an HDF5 reader class for vtk?? I found a class that supports HDF4, but no reference to HDF5... From kshivann at engineering.uiowa.edu Fri Feb 18 11:23:14 2005 From: kshivann at engineering.uiowa.edu (kshivann at engineering.uiowa.edu) Date: Fri, 18 Feb 2005 10:23:14 -0600 Subject: [vtkusers] creating an axes in a view port Message-ID: <1108743793.4216167207cfd@webmail.engineering.uiowa.edu> hi all, i want to display a 3D axes at the bottom left corner of the viewport. the axes has to rotate about its origin when the mouse interaction is on. but the zoom and pan shouldn't apply to the 3D axes. is there a way to do the same. thanks kiran From kshivann at engineering.uiowa.edu Fri Feb 18 11:28:45 2005 From: kshivann at engineering.uiowa.edu (kshivann at engineering.uiowa.edu) Date: Fri, 18 Feb 2005 10:28:45 -0600 Subject: [vtkusers] faster searching of the intersecting triangle during ray tracing Message-ID: <1108744125.421617bd61c59@webmail.engineering.uiowa.edu> hi all, i work with triangulated surfaces some times containing as much as 100000 triangles. Problem with the ray tracing to find the intersection point is it has to loop through all the triangles to find the closest triangle. is there a way to eliminate the triangles that are faroff from the potential point of contact and speed up the process. thanks kiran From amy.henderson at kitware.com Fri Feb 18 11:55:15 2005 From: amy.henderson at kitware.com (Amy Henderson) Date: Fri, 18 Feb 2005 11:55:15 -0500 Subject: [vtkusers] creating an axes in a view port In-Reply-To: <1108743793.4216167207cfd@webmail.engineering.uiowa.edu> References: <1108743793.4216167207cfd@webmail.engineering.uiowa.edu> Message-ID: <6.2.0.14.2.20050218115239.03ff96e8@pop.biz.rr.com> If you're using VTK from CVS, then you can use the vtkOrientationMarkerWidget. - Amy At 11:23 AM 2/18/2005, kshivann at engineering.uiowa.edu wrote: >hi all, > i want to display a 3D axes at the bottom left corner of the > viewport. the >axes has to rotate about its origin when the mouse interaction is on. but the >zoom and pan shouldn't apply to the 3D axes. is there a way to do the same. > >thanks > >kiran > > > >_______________________________________________ >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 From burlen at apollo.sr.unh.edu Fri Feb 18 11:58:32 2005 From: burlen at apollo.sr.unh.edu (Burlen) Date: Fri, 18 Feb 2005 11:58:32 -0500 Subject: [vtkusers] vtkWindowToImageFilter Message-ID: <200502181158.32913.burlen@apollo.sr.unh.edu> Hi, when using the window to image filter, with python and tk, if the screen saver comes on during the lengthy processing of a series of visualizations all I end up with are a bunch of shots of the screen saver. also it seems to capture some of the task bar on some platforms. any way to fix this?? (besides turing the screen saver off?) self.PlotWindow.lift() # make certain that no other windows get grabbed renwin = self.RenderWidget.GetRenderWindow() renwin.Modified() renwin.Render() w2i = vtk.vtkWindowToImageFilter() w2i.SetInput(renwin) psw = vtk.vtkPostScriptWriter() psw.SetInput(w2i.GetOutput()) psw.SetFileName(sfn) psw.Write() From nikolaus.heger at gmail.com Fri Feb 18 12:05:07 2005 From: nikolaus.heger at gmail.com (Nikolaus Heger) Date: Fri, 18 Feb 2005 09:05:07 -0800 Subject: [vtkusers] what to set PYTHON_LIBRARY to? Message-ID: hi! i am trying to compile VTK 4.4 on windows, but running into serious trouble. i believe the cause to be that i don't have any idea what PYTHON_LIBRARY is supposed to be set to. the help for this item in ccmake lists lots of files that could be targets, but i don't have any of them (i have the Python 2.4 install binary for windows, and also tried Python 2.3 install binary). PYTHON_LIBRARY seems to expect a file (rather than a directory) so i tried setting it to Python24.lib (and Python23.lib) - but this produces lots of linking errors and eventually the build fails. what am i supposed set this to? thanks a lot! nik From nikolaus.heger at gmail.com Fri Feb 18 12:17:35 2005 From: nikolaus.heger at gmail.com (Nikolaus Heger) Date: Fri, 18 Feb 2005 09:17:35 -0800 Subject: [vtkusers] what to set PYTHON_LIBRARY to? Message-ID: hi! i am trying to compile VTK 4.4 on windows, but running into serious trouble. i believe the cause to be that i don't have any idea what PYTHON_LIBRARY is supposed to be set to. the help for this item in ccmake lists lots of files that could be targets, but i don't have any of them (i have the Python 2.4 install binary for windows, and also tried Python 2.3 install binary). PYTHON_LIBRARY seems to expect a file (rather than a directory) so i tried setting it to Python24.lib (and Python23.lib) - but this produces lots of linking errors and eventually the build fails. what am i supposed set this to? thanks a lot! nik From jcplatt at lineone.net Fri Feb 18 14:13:37 2005 From: jcplatt at lineone.net (John Platt) Date: Fri, 18 Feb 2005 19:13:37 -0000 Subject: [vtkusers] AddArray problems In-Reply-To: <039A0DCC3D66EE4AB9AF11E119287F15152DDD@ms-afit-04.afit.edu> Message-ID: <002a01c515ed$f6b5a8e0$254b2850@pacsys4> Hi Ray, You could try AppendFilter->Modified() followed by AppendFilter->Update() to force the filter to execute. If you are using the vtkMergeDataObjectFilter, you will probably need to follow this with vtkAssignFilter to set the attributes. Also, I seem to recall that the merge filter does not pass any of the input point/cell/field data - only the data from the data object. HTH John -----Original Message----- From: Maple Raymond C LtCol AFIT/ENY [mailto:Raymond.Maple at afit.edu] Sent: 18 February 2005 12:36 To: John Platt Subject: RE: [vtkusers] AddArray problems John, Thanks for your reply. We are updating the AppendFilter, as I have no guarantee that I will get any cells out of it. I have to update in order to get a valid cell count to decide whether to proceed with my pipeline. (Actually, I am probably calling something like AppendFilter->GetOutput()->Update().) I have my student trying the MergeDataObjectFilter route. BTW, I am having difficulty submitting to the mailing list. The DNS tables do not have valid MX (mail) entries for ftp.org. I got through yesterday on a manual route our IT shop set up for me, but it was only temporary. I'm surprised my initial message got through, since I got a bounce back reply saying it couldn't be delivered, even with the manual routing in place. Unfortunately, the email address to report problems is also an ftp.org address. If you could forward my problems on , I would appreciate it. Thanks, Ray RAYMOND C. MAPLE, Lt Col USAF Deputy Head, Department of Aeronautics and Astronautics Air Force Institute of Technology _____ From: John Platt [mailto:jcplatt at lineone.net] Sent: Thursday, February 17, 2005 7:27 PM To: Maple Raymond C LtCol AFIT/ENY Cc: vtkusers at vtk.org Subject: RE: [vtkusers] AddArray problems Hi Raymond, There are 2 approaches you could use to add data arrays to a data set. The first is to ensure that the output is always up to date by calling Update() on your append filter. This will force the filter to execute and you will have a grid to add a data array (functional system). Alternatively, you can use vtkMergeDataObjectFilter to add an array from a data object at a time in the future when the pipeline executes in response to some event. I suspect that the append filter has not executed at the time you write your XML. Adding vtkExtractUnstructuredGrid probably causes the append filter to update. If a filter is out of date, most things you do to the current output will be lost when the filter next updates. A typical operation at the start of filter execution is to re-initialise the output. HTH John. -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Maple Raymond C LtCol AFIT/ENY Sent: 17 February 2005 16:46 To: vtkusers at vtk.org Subject: [vtkusers] AddArray problems Hello, We are having some problems adding arrays of scalars to an unstructured grid. We are doing the following: mygrid = ->GetOutput() vtkDoubleArray *data = vtkDoubleArray::New(); (set num tuples, components, allocate, fill data, set name, etc) mygrid->GetCellData()->AddArray( data ); data->Delete() ... At this point, if we write the grid to an xml file, the file contains an array section with the correct name in the cell data section, but the data values themselves are missing. If we run the grid through a vtkExtractUnstructuredGrid filter before we write the xml file, then all the data is there as expected. We have verified that the array dimensions match the number of cells in the grid. We have tried with versions 4.2 and 4.4.2, and get the same results with both. The one clue I found in the archives was a statement that you can't change an object in the middle of a pipeline, and that something like a vtkMergeDataObjectFilter must be used. If that is the case, why does everything work correctly if I go though a filter before writing the grid? What am I missing? Thank you, RAYMOND C. MAPLE, Lt Col USAF Deputy Head, Department of Aeronautics and Astronautics Air Force Institute of Technology RAYMOND C. MAPLE, Lt Col USAF Deputy Head, Department of Aeronautics and Astronautics Air Force Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: From chouyiyu at hotmail.com Fri Feb 18 15:59:50 2005 From: chouyiyu at hotmail.com (Yi-Yu Chou) Date: Fri, 18 Feb 2005 20:59:50 +0000 Subject: [vtkusers] How to build my own vtk classes ? Help !! Message-ID: Dear all. I am trying to build my own local vtk-python classes under linux using vtk4.2. I can scuuessfully wrap vtk and python together based on Examples/Build/vtkLocal, but I got some problems (undefined symbol......) when trying to include other classes (not related to vtk). Any suggestions ?? Thanks in advance !!!! _________________________________________________________________ MSN Messenger 7.0 ??????????????????? http://messenger.msn.com.tw/beta From tfogal at apollo.sr.unh.edu Fri Feb 18 16:50:33 2005 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Fri, 18 Feb 2005 16:50:33 -0500 Subject: [vtkusers] mapping a different wrapping to SWIG wrapping Message-ID: <200502182150.j1ILoXFS011118@apollo.sr.unh.edu> Hi all, I seem to have hit a wall in terms of application structure due to the fact that the VTK library produces its own wrapping which is not recognized by SWIG. I have a C++ setup that is similar to: class Foo { ... void Bar(vtkDataSet*) const; ... }; the problem is that when trying to use this from python (via SWIG wrappers): #### import Foo import vtkpython foo = Foo.Foo() foo.Bar(vtkpython.vtkRectilinearGrid()) #### I get a "TypeError: Expected a pointer". I think I know why -- SWIG wraps the Bar method so that a C++-instantiated vtkDataSet can be passed into the python method, but that vtkDataSet is not actually usable from python (the pointer actually ends up like a python string of sorts similar to "_p_vtkDataSet"). VTK on the other hand creates a wrapper that hides the fact that an object is really a pointer. Thus vtkpython.vtkRectilinearGrid() gives a python object back that is actually usable from within python, and apparently NOT in a form that can be given back to C/C++ easily. Thus the problem is Bar wants an object that is actually a pointer, even though that "pointer" is represented a little funky when its visible from python. This doesn't work because VTK wrapping does not give a pointer. Is anyone trying to use SWIG and VTK, or has run into this problem with other libraries? What can I do? Is there a method that a majority of VTK objects have that gives a pointer and might be mappable to the pointer representation SWIG wrapping expects? Or perhaps there is an ideas for alternate application structure? Thanks, -tom From trifox at digitalgott.de Fri Feb 18 18:45:45 2005 From: trifox at digitalgott.de (.: c.kleinhuis :.) Date: Sat, 19 Feb 2005 00:45:45 +0100 Subject: [vtkusers] how to emulate ReadAllFieldsOn () under vtk 4.2 ? Message-ID: <42167E29.3000404@digitalgott.de> Hi all, i have the problem when using a vtkDataReader object in vtk that not all fields are read, at the moment i am merging all the fields found in the file seperately together with a vtkMergeFilter, is there a common method to emulate the behaviour of ReadAllFieldsOn under vtk 4.2 ? thanks in advance c.Kleinhuis From jzhang63 at cs.mcgill.ca Fri Feb 18 22:11:57 2005 From: jzhang63 at cs.mcgill.ca (jzhang63 at cs.mcgill.ca) Date: Fri, 18 Feb 2005 22:11:57 -0500 (EST) Subject: [vtkusers] VTKLight Message-ID: <33617.132.206.73.120.1108782717.squirrel@mail.cs.mcgill.ca> Hi everyone! I have a question about VtkLight. When I add a VtkLight object to the Renderer: ren->AddLight(light). And then I start the interactive: iren->Start(). But the light direction will go back to the default one. Can you help me with this? I don't want to the light direction to change when interactive the scene with the mouse. Thank you very much and have a good night! Best Regards, Juan Zhang From jzhang63 at cs.mcgill.ca Fri Feb 18 22:38:10 2005 From: jzhang63 at cs.mcgill.ca (jzhang63 at cs.mcgill.ca) Date: Fri, 18 Feb 2005 22:38:10 -0500 (EST) Subject: [vtkusers] VTKLight Message-ID: <33630.132.206.73.120.1108784290.squirrel@mail.cs.mcgill.ca> Hi everyone! I have a question about VtkLight. When I add a VtkLight object to the Renderer: ren->AddLight(light). And then I start the interactive: iren->Start(). But the light direction will go back to the default one. Can you help me with this? I don't want to the light direction to change when interactive the scene with the mouse. Thank you very much and have a good night! Best Regards, Juan Zhang From tfogal at apollo.sr.unh.edu Sat Feb 19 00:30:53 2005 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Sat, 19 Feb 2005 00:30:53 -0500 Subject: [vtkusers] mapping a different wrapping to SWIG wrapping Message-ID: <200502190530.j1J5Urt0012160@apollo.sr.unh.edu> Hi all, I seem to have hit a wall in terms of application structure due to the fact that the VTK library produces its own wrapping which is not recognized by SWIG. I have a C++ setup that is similar to: class Foo { ... void Bar(vtkDataSet*) const; ... }; the problem is that when trying to use this from python (via SWIG wrappers): #### import Foo import vtkpython foo = Foo.Foo() foo.Bar(vtkpython.vtkRectilinearGrid()) #### I get a "TypeError: Expected a pointer". I think I know why -- SWIG wraps the Bar method so that a C++-instantiated vtkDataSet can be passed into the python method, but that vtkDataSet is not actually usable from python (the pointer actually ends up like a python string of sorts similar to "_p_vtkDataSet"). VTK on the other hand creates a wrapper that hides the fact that an object is really a pointer. Thus vtkpython.vtkRectilinearGrid() gives a python object back that is actually usable from within python, and apparently NOT in a form that can be given back to C/C++ easily. Thus the problem is Bar wants an object that is actually a pointer, even though that "pointer" is represented a little funky when its visible from python. This doesn't work because VTK wrapping does not give a pointer. Is anyone trying to use SWIG and VTK, or has run into this problem with other libraries? What can I do? Is there a method that a majority of VTK objects have that gives a pointer and might be mappable to the pointer representation SWIG wrapping expects? Or perhaps there is an ideas for alternate application structure? Thanks, - -tom _______________________________________________ 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 ------- End of Forwarded Message From prabhu_r at users.sf.net Sat Feb 19 02:23:06 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Sat, 19 Feb 2005 12:53:06 +0530 Subject: [vtkusers] mapping a different wrapping to SWIG wrapping In-Reply-To: <200502182150.j1ILoXFS011118@apollo.sr.unh.edu> References: <200502182150.j1ILoXFS011118@apollo.sr.unh.edu> Message-ID: <16918.59738.58529.380247@monster.linux.in> >>>>> "TF" == tom fogal writes: TF> Hi all, I seem to have hit a wall in terms of application TF> structure due to the fact that the VTK library produces its TF> own wrapping which is not recognized by SWIG. TF> I have a C++ setup that is similar to: TF> class Foo { TF> ... void Bar(vtkDataSet*) const; ... TF> }; Why don't you write a typemap for the task. *Untested* example: %typemap (in) vtkDataSet *data_set { $1 = vtkPythonGetPointerFromObject($input, "vtkDataSet"); } You'll need to include vtkPythonUtil.h to be able to use vtkPythonGetPointerFromObject. HTH. cheers, prabhu From beau.sapach at ualberta.ca Sat Feb 19 02:59:06 2005 From: beau.sapach at ualberta.ca (Beau Sapach) Date: Sat, 19 Feb 2005 00:59:06 -0700 Subject: [vtkusers] vtkSplineFilter?? Message-ID: <1108799946.4216f1ca7fa34@webmail.bme.med.ualberta.ca> Hello everyone, I'm trying to draw a curved line in 2D using the vtkSplineFilter, but it doesn't seem to be working, the output line is always straight. Here is my code can anyone point out what I'm doing wrong? --Beau vtkRenderer * renderer = vtkRenderer::New(); vtkRenderWindow * renwin = vtkRenderWindow::New(); vtkPolyDataMapper * mapper = vtkPolyDataMapper::New(); vtkLineSource * Line = vtkLineSource::New(); vtkSplineFilter * Spline = vtkSplineFilter::New(); vtkActor * LineActor = vtkActor::New(); Spline->SetSubdivideToSpecified(); Spline->SetNumberOfSubdivisions(10); Line->SetPoint1(10,10,0); Line->SetPoint2(200,200,0); Spline->SetInput(Line->GetOutput()); mapper->SetInput(Spline->GetOutput()); renwin->AddRenderer(renderer); LineActor->SetMapper(mapper); renderer->AddActor(LineActor); renwin->Render(); From ahmadhosseinzadeh at yahoo.ca Sat Feb 19 06:50:07 2005 From: ahmadhosseinzadeh at yahoo.ca (Ahmad Hosseinzadeh) Date: Sat, 19 Feb 2005 06:50:07 -0500 (EST) Subject: [vtkusers] How to change the actor data without deleting it. Message-ID: <20050219115008.80181.qmail@web52208.mail.yahoo.com> Hi, I want to change the actor data (e.g. add/remove a filer to/from actor) without removing the previous actor and create a new one. I have disconnected the actor from renderer before setting the mapper but it dosen't work. The application halts when I want to connect data to actor using "setMapper()" method. Do you have idea how to figure it out? Thanks, ahmad. ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca From ahmadhosseinzadeh at yahoo.ca Sat Feb 19 10:10:32 2005 From: ahmadhosseinzadeh at yahoo.ca (Ahmad Hosseinzadeh) Date: Sat, 19 Feb 2005 10:10:32 -0500 (EST) Subject: [vtkusers] Display solid and outline. Message-ID: <20050219151032.97857.qmail@web52201.mail.yahoo.com> Hi I've used vtkUnstructuredGrid for saving my 3D data. I want to represent them in solid and outline but I cannot find the corresponding filters for vtkUnstructuredGrid. I found vtkFeatureEdge and vtkPolyDataNormals filters for PolyData, would you please help me find the same filters for vtkUnstructuredGrid? Thanks, ahmad. ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca From a.h.al-khalifah at reading.ac.uk Sat Feb 19 11:15:06 2005 From: a.h.al-khalifah at reading.ac.uk (Ali) Date: Sat, 19 Feb 2005 16:15:06 +0000 Subject: [vtkusers] installing vtk and cmake Message-ID: <1108829705.6385.9.camel@dawn.rdg.ac.uk> Dear all How can I install VTK on LINUX using Cmake, I have tried to install CMake. I have saved VTK in one directory and cmake in another. How can I install cmake and then how can I install VTK, I have followed the instructions on the instllation guides, but no luck. I have tared the cmake in its directory, now how can I complete the instllation using "ccmake" or "cmake -i" commands. Any help is appreciated. ali From jcplatt at lineone.net Sat Feb 19 12:09:41 2005 From: jcplatt at lineone.net (John Platt) Date: Sat, 19 Feb 2005 17:09:41 -0000 Subject: [vtkusers] How to change the actor data without deleting it. In-Reply-To: <20050219115008.80181.qmail@web52208.mail.yahoo.com> Message-ID: <000001c516a5$cde2b990$11482850@pacsys4> Hi Ahmad, If you want to destroy a mapper, try Actor->SetMapper( NULL ); Mapper->Delete(); If you use vtkDataSetMapper, you should not need to do this as this will handle both vtkPolyData & vtkUnstructuredGrid. HTH John. -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Ahmad Hosseinzadeh Sent: 19 February 2005 11:50 To: VTK List Subject: [vtkusers] How to change the actor data without deleting it. Hi, I want to change the actor data (e.g. add/remove a filer to/from actor) without removing the previous actor and create a new one. I have disconnected the actor from renderer before setting the mapper but it dosen't work. The application halts when I want to connect data to actor using "setMapper()" method. Do you have idea how to figure it out? Thanks, ahmad. ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca _______________________________________________ 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 From a.h.al-khalifah at reading.ac.uk Sat Feb 19 12:14:33 2005 From: a.h.al-khalifah at reading.ac.uk (Ali) Date: Sat, 19 Feb 2005 17:14:33 +0000 Subject: [vtkusers] vtk installation on LINUX Message-ID: <1108833273.6385.12.camel@dawn.rdg.ac.uk> Dear all How can I install VTK on LINUX using Cmake, I have tried to install CMake. I have saved VTK in one directory and cmake in another. How can I install cmake and then how can I install VTK, I have followed the instructions on the installation guidlines, but no luck. I have tared the cmake in its directory, now how can I complete the installation using "ccmake" or "cmake -i" commands. Any help is appreciated. ali From vardhman at gmail.com Sat Feb 19 15:41:07 2005 From: vardhman at gmail.com (Vardhman Jain) Date: Sat, 19 Feb 2005 20:41:07 +0000 Subject: [vtkusers] vtk installation on LINUX In-Reply-To: <1108833273.6385.12.camel@dawn.rdg.ac.uk> References: <1108833273.6385.12.camel@dawn.rdg.ac.uk> Message-ID: Unzip the VTK.zip to create a VTK directory. Assuming you have a directory setup like VTK (created after extracting VTK.zip) +-VTKBIN +-VTK CMAKE +-bin ... Now go to the directory VTKBIN and give the command ../CMAKE/bin/ccmake ../VTK press c to configure. After setting configuration and making configure file press q Now within VTKBIN give the command ../CMAKE/bin/cmake ../VTK This will(well it should) install VTK to you system. On Sat, 19 Feb 2005 17:14:33 +0000, Ali wrote: > Dear all > How can I install VTK on LINUX using Cmake, I have tried to install > CMake. I have saved VTK in one directory and cmake in another. How can I > install cmake and then how can I install VTK, I have followed the > instructions on the installation guidlines, but no luck. I have tared > the > cmake in its directory, now how can I complete the installation using > "ccmake" or "cmake -i" commands. Any help is appreciated. > ali > > _______________________________________________ > 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 > -- Get Firefox! From toreaur at stud.ntnu.no Sat Feb 19 23:20:41 2005 From: toreaur at stud.ntnu.no (Tore Aurstad) Date: Sun, 20 Feb 2005 05:20:41 +0100 (MET) Subject: [vtkusers] Inline VTK QT window Message-ID: How does one make a VTK Window inline in an QT application with QVTKRenderWindowInteractor? If you use the basic constructor you get the QVTKRendrewindow.. outside? This message was written by: Tore Aurstad 5 th Year Computer Engineering Student at the Norwegian Technical-Natural sciences University NTNU Trondheim, Norway ******************************************** End of message. From steven.robbins at videotron.ca Sun Feb 20 02:12:13 2005 From: steven.robbins at videotron.ca (Steve M. Robbins) Date: Sun, 20 Feb 2005 02:12:13 -0500 Subject: [vtkusers] vtkObject.toString() for java Message-ID: <20050220071212.GD21051@nyongwa.montreal.qc.ca> Hello java-vtk-users On Wed, Feb 16, 2005 at 02:40:22PM -0500, David Marshburn wrote: > to be honest, steve, i saw your message and thought, "yep, that's a known > bug." sorry if the lack of response left you thinking no one was using > vtk44 w/java. I'm heartened to hear that we're not alone in using vtk with java. I wonder if other java/vtk users have an opinion on implementing the toString() method. The patch below implements the toString() method on vtkObjects such that it returns the result of Print(). Does that seem reasonable? -Steve Index: Wrapping/vtkParseJava.c =================================================================== RCS file: /cvsroot/VTK/VTK/Wrapping/vtkParseJava.c,v retrieving revision 1.30 diff -u -b -B -r1.30 vtkParseJava.c --- Wrapping/vtkParseJava.c 14 Nov 2003 20:43:38 -0000 1.30 +++ Wrapping/vtkParseJava.c 20 Feb 2005 07:05:28 -0000 @@ -493,6 +493,7 @@ fprintf(fp," public native String Print();\n"); /* Add the PrintRevisions method to vtkObject. */ fprintf(fp," public native String PrintRevisions();\n"); + fprintf(fp," public String toString() { return Print(); }\n"); } if (!strcmp("vtkObject",data->ClassName)) From StephanTheisen at gmx.de Sun Feb 20 12:37:46 2005 From: StephanTheisen at gmx.de (Stephan Theisen) Date: Sun, 20 Feb 2005 18:37:46 +0100 Subject: [vtkusers] How to set Rotation Point? Message-ID: <4218CAEA.6020305@gmx.de> Hi together! I've the following question: How can I set the the Point about my Volune rotate? Because my Volume rotate about a point outside of the volume and I it should rotate about the center of the volume. For help I've attached the important cutout of my programm. vtkVolume16Reader volumer = new vtkVolume16Reader(); volumer.SetDataDimensions(512,512); volumer.SetDataByteOrderToLittleEndian(); volumer.SetFilePrefix ("G:/CT-Bilder_umbenannt/quarter"); volumer.SetImageRange(1,200); volumer.SetDataSpacing(0.488,0.488,1.0); vtkExtractVOI voi = new vtkExtractVOI(); voi.SetInput(volumer.GetOutput()); voi.SetVOI(110,400,30,480,0,200); vtkPiecewiseFunction opacityTransferFunction = new vtkPiecewiseFunction(); opacityTransferFunction.AddPoint(1000,0.0); opacityTransferFunction.AddPoint(1150,1.0); vtkColorTransferFunction colorTransferFunction = new vtkColorTransferFunction(); colorTransferFunction.AddRGBPoint(255.0,1.0,0.49,0.25); vtkVolumeProperty volumeprop = new vtkVolumeProperty(); volumeprop.SetColor(colorTransferFunction); volumeprop.SetScalarOpacity(opacityTransferFunction); volumeprop.ShadeOn(); volumeprop.SetInterpolationTypeToLinear(); vtkVolumeRayCastCompositeFunction compositefunction = new vtkVolumeRayCastCompositeFunction(); vtkVolumeRayCastMapper volumemapper = new vtkVolumeRayCastMapper(); volumemapper.SetVolumeRayCastFunction(compositefunction); volumemapper.SetInput(voi.GetOutput()); vtkVolume volume = new vtkVolume(); volume.SetMapper(volumemapper); volume.SetProperty(volumeprop); Thank's in advance Stephan From lapan_mv at inbox.ru Sun Feb 20 01:56:47 2005 From: lapan_mv at inbox.ru (Max Lapan) Date: 20 Feb 2005 09:56:47 +0300 Subject: [vtkusers] Error handling cells data in 2D grid when stored in XML format Message-ID: <878y5j3ej4.fsf@home.homenet.ru> Hello, I don't know is this ParaView of VTK issue, but netherless: when I trying to create VTS data file (XML structured grid) with cell data component, paraview fails to read it with strange error message: Error or warning: There was a VTK Error in file: /opt/build/paraview-1.8.1/VTK/Filtering/vtkDataSet.cxx (405) Cell array Part Id with 1 components, has only 0 tuples but there are 50000 cells ErrorMessage end When grid is 3D, etherything works ok, the same as for old data format (not XML). Paraview even fails to read data which saved by it before (use 'Point data to cell data' filter then Save). Any suggestions? -- Best regards, Max Lapan From cochrane at esscc.uq.edu.au Mon Feb 21 03:38:42 2005 From: cochrane at esscc.uq.edu.au (Paul Cochrane) Date: Mon, 21 Feb 2005 18:38:42 +1000 Subject: [vtkusers] xml data extraction Message-ID: <20050221083842.GN20739@shake56.esscc.uq.edu.au> Hi all, I'm a newbie to vtk, and have a question concerning the process of reading data from vtk xml files into vtk so that I can then manipulate and view the data. The vtk xml file contains an UnstructuredGrid, with Points for the locations of the data, PointData containing the scalar values of the data at those points, and various CellData elements containing tags, and connectivity etc. The process that I'm using is to read the data in like so: reader = vtk.vtkXMLUnstructuredGridReader() reader.SetFileName("geom26.xml") But then I run into my first wall. What do I do then? I assume that I should use some kind of data mapper, so I'd do something like: particleMapper = vtk.vtkDataSetMapper() particleMapper.SetInput(reader.GetOutput()) But what data out of the UnstructuredGrid did I just grab? I want to generate spheres at the locations of the Points, with radii from the PointData, and use other attributes defined in the CellData to specify such things as colour etc. How do I do this? I have read the vtk User's Guide, and _many_ of the examples, but it still isn't clear to me how vtk thinks. I.e. where do I pipe what data to what object (and importantly why?). Many thanks in advance for any assistance. Paul Cochrane -- Paul Cochrane Computational Scientist/Software Developer Earth Systems Science Computational Centre University of Queensland Brisbane Queensland 4072 Australia E: cochrane at esscc dot uq dot edu dot au From margaretha_s2002 at yahoo.com Mon Feb 21 04:33:35 2005 From: margaretha_s2002 at yahoo.com (Margaretha Sulistyoningsih) Date: Mon, 21 Feb 2005 01:33:35 -0800 (PST) Subject: [vtkusers] renderer`s layer and the interactor Message-ID: <20050221093335.25521.qmail@web14425.mail.yahoo.com> Hallo vtk-Group, I render two volumes using two renderer (layer 0 and layer 1). My problem is the renderwindowinteractor gives only effect to the image in layer 1. For instance, when I rotate the image using left-key-mouse, only the image in layer 1 is rotated, even I have called InteractiveOn() for both renderer. Any hint would be appreciated. Thank you. .Margaretha. --------------------------------- Do you Yahoo!? All your favorites on one personal page ? Try My Yahoo! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jacques.charreyron at caramail.com Mon Feb 21 05:24:49 2005 From: jacques.charreyron at caramail.com (jacques.charreyron) Date: Mon, 21 Feb 2005 10:24:49 GMT Subject: [vtkusers] Quadratic cell data bug ? Message-ID: <1108981489010774@lycos-europe.com> An HTML attachment was scrubbed... URL: From m.petrone at cineca.it Mon Feb 21 07:13:58 2005 From: m.petrone at cineca.it (Marco Petrone) Date: Mon, 21 Feb 2005 13:13:58 +0100 (MET) Subject: [vtkusers] vtkHDFReader In-Reply-To: <200502181108.46942.burlen@apollo.sr.unh.edu> References: <200502181108.46942.burlen@apollo.sr.unh.edu> Message-ID: <4219D086.2000401@cineca.it> Dear Burlen, take a look at here: http://www.cineca.it/cgi-bin/cvsweb.cgi/cosmolab/cosmoMAF/CosmoMAF/ there's an implementation of HDF5 imported developed for the CosmoLab/CosmoMAF project (look for vtkDHF5* files). I know it supports only a part of the HDF5 formatm and if I'm not wrong it relies on the libhdf distributed as part of the CosmoMAF application. Marco Burlen wrote: >Hi does any one know if there is an HDF5 reader class for vtk?? >I found a class that supports HDF4, but no reference to HDF5... >_______________________________________________ >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 > > > From zabaione at uk2.net Mon Feb 21 07:35:30 2005 From: zabaione at uk2.net (Martin Dunschen) Date: Mon, 21 Feb 2005 12:35:30 -0000 (GMT) Subject: [vtkusers] Offscreen rendering on Linux, segmentation fault Message-ID: <32791.81.153.134.146.1108989330.squirrel@maxproxy1.uk2net.com> Hi I am trying to use the offscreen rendering capabilities of VTK in connection with Mesa. After a bit of work I finally managed to compile a version of VTK that allows to use mangled Mesa. I used the latest VTK sources via cvs (as of Saturday19.2.2005), and I tried the attached code using Mesa version 6 and version 4 (www.mesa3d.org). If I enable offscreen rendering, I get a segmentation fault. With normal (onscreen) rendering the script works fine. My Linux is Debian. Am I doing something wrong? Any help would be greatly appreciated. Martin ----------------------------------->8------------------------->8 import vtk from vtk.util.colors import tomato class STLPolyData: def __init__(self): self.points = vtk.vtkPoints() self.cells = vtk.vtkCellArray() def PushTriangle(self, x0, y0, z0, x1, y1, z1, x2, y2, z2): id0 = self.points.InsertNextPoint(x0, y0, z0) id1 = self.points.InsertNextPoint(x1, y1, z1) id2 = self.points.InsertNextPoint(x2, y2, z2) self.cells.InsertNextCell(3) self.cells.InsertCellPoint(id0) self.cells.InsertCellPoint(id1) self.cells.InsertCellPoint(id2) def SaveToPNG(self, fname): triangles = vtk.vtkPolyData() triangles.SetPoints(self.points) triangles.SetPolys(self.cells) print "triangles" mp = vtk.vtkMesaPolyDataMapper() mp.SetInput(triangles) print "polydatamapper" actor = vtk.vtkMesaActor() actor.SetMapper(mp) actor.GetProperty().SetColor(tomato) actor.RotateX(-45.0) actor.RotateZ(-30.0) print "actor" ren = vtk.vtkMesaRenderer() ren.AddActor(actor) ren.SetBackground(0.1, 0.2, 0.4) ren.GetActiveCamera().Zoom(1.5) print "renderer" renwin = vtk.vtkXMesaRenderWindow() renwin.SetOffScreenRendering(0) # set to 1 and the code wont crash... renwin.SetSize(500, 500) renwin.AddRenderer(ren) filter = vtk.vtkWindowToImageFilter() filter.SetInput(renwin) writer = vtk.vtkPNGWriter() writer.SetInput(filter.GetOutput()) writer.SetFileName(fname) writer.Write() print "write" if __name__ == "__main__": stlpd = STLPolyData() stlpd.PushTriangle(0., 0., 0., 1., 0., 0., 1., 1., 0.) stlpd.SaveToPNG("test.png") From stefan.maas at fh-gelsenkirchen.de Mon Feb 21 08:30:15 2005 From: stefan.maas at fh-gelsenkirchen.de (Stefan Maas) Date: Mon, 21 Feb 2005 14:30:15 +0100 Subject: [vtkusers] vtkImagePlaneWidget - texture update In-Reply-To: <20050221123539.852853439F@public.kitware.com> Message-ID: <001b01c51819$7a1f0730$2fe6a8c0@maas2> Hi all, I have a little problem with vtkImagePlaneWidgets (=ipw). I use three ipws in one renderwindow and three ipws in own renderwindows (sum = 4). I want to move the first three ipws through a dataset and an automatic update on the other ones. No problem! Everything works fine (updating the position, updating window/level) until I place the ipw in a diagonal position like shown in the picture. The curious phenomenon is that the data seems to be on the correct position, because the value that I obtain by clicking on the plane is correct (in both windows). But as you can see, in the separate window the texture seems to be upended. I tried many things like updating extends/bounds/etc. but no success. What did I miss to do? Many thanks in advance for any assistance. Greetings, Stefan ------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 9080 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 9080 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 9080 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 9078 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 9078 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 9078 bytes Desc: not available URL: From stefan.maas at fh-gelsenkirchen.de Mon Feb 21 09:03:06 2005 From: stefan.maas at fh-gelsenkirchen.de (Stefan Maas) Date: Mon, 21 Feb 2005 15:03:06 +0100 Subject: [vtkusers] vtkImagePlaneWidgets texture update In-Reply-To: <20050221133044.60BB131C0C@public.kitware.com> Message-ID: <002101c5181e$115696a0$2fe6a8c0@maas2> Hi all, I have a little problem with a vtkImagePlaneWidget (=ipw). I use three ipws in one renderwindow and three ipws in own renderwindows (sum = 4). I want to move the first three ipws through a dataset and obtain an automatic update on the other ones. No problem! Everything works fine (updating the position, updating window/level...) until I place the ipw in a diagonal position like shown in the picture on http://www.maaster.de/ipw.jpg (The plane on the right side is the red one on the left.) The curious phenomenon is that the data seems to be on the correct position, because the value that I obtain by clicking on the plane is correct (in both windows). But as you can see, in the separate window the texture seems to be upended. I tried many things like updating extends/bounds/etc. but no success. What did I miss to do? Many thanks in advance for any assistance. And sorry: I don't know what happened with my last email. Greetings, Stefan From jcplatt at lineone.net Mon Feb 21 09:06:46 2005 From: jcplatt at lineone.net (John Platt) Date: Mon, 21 Feb 2005 14:06:46 -0000 Subject: [vtkusers] Quadratic cell data bug ? In-Reply-To: <1108981489010774@lycos-europe.com> Message-ID: <000001c5181e$95049c40$02482850@pacsys4> Hi Jacques, On a very quick look, check currentMapper->SetScalarModeToUseCellData(); Did you mean point data? HTH John. -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of jacques.charreyron Sent: 21 February 2005 10:25 To: vtkusers at vtk.org Subject: [vtkusers] Quadratic cell data bug ? Hello, I am trying to display values on quadratic cells. In my example I have one quadratic quad cell I allocate only one tuple in my float array and put an arbitrary value : vtkFloatArray *pointScalars = vtkFloatArray::New(); pointScalars->SetNumberOfComponents(1); pointScalars->SetNumberOfTuples(6); pointScalars->SetTuple1(0,10.0); grid->GetCellData()->SetScalars(pointScalars); When running this example I get this error : ERROR: In G:\Sandbox\Shared\common\intel_a\Api\Vtk\R4.4\Src\Common\vtkDataSet.cxx, line 403 vtkPolyData (0x01BADF98): Cell array with 1 components, has only 0 tuples but there are 6 cells When I allocate six tuples to put six value : ie one for each triangle like this : vtkFloatArray *pointScalars = vtkFloatArray::New(); pointScalars->SetNumberOfComponents(1); pointScalars->SetNumberOfTuples(6); pointScalars->SetTuple1(0,10.0); pointScalars->SetTuple1(1,10.0); pointScalars->SetTuple1(2,10.0); pointScalars->SetTuple1(3,10.0); pointScalars->SetTuple1(4,10.0); pointScalars->SetTuple1(5,10.0); grid->GetCellData()->SetScalars(pointScalars); I get the following error : Warning: In G:\Sandbox\Shared\common\intel_a\Api\Vtk\R4.4\Src\Common\vtkDataSet.cxx, line 411 vtkUnstructuredGrid (0x01B8CB00): Cell array with 1 components, has 6 tuples but there are only 1 cells ERROR: In G:\Sandbox\Shared\common\intel_a\Api\Vtk\R4.4\Src\Common\vtkDataSet.cxx, line 403 vtkPolyData (0x01BADF98): Cell array with 1 components, has only 0 tuples but there are 6 cells Any idea ? Here is a code snippet to reproduce the behaviour : #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main( int argc, char *argv[] ) { vtkPoints *points = vtkPoints::New(); points->SetNumberOfPoints(8); points->SetPoint(0, 0, 0, 0); points->SetPoint(1, 1, 0, 0); points->SetPoint(2, 1, 1, 0); points->SetPoint(3, 0, 1, 0); points->SetPoint(4, 0.5, 0, 0); points->SetPoint(5, 1, 0.5, 0); points->SetPoint(6, 0.5, 1, 0); points->SetPoint(7, 0, 0.5, 0); vtkIdType pointIds[8]; pointIds[0] = 0; pointIds[1] = 1; pointIds[2] = 2; pointIds[3] = 3; pointIds[4] = 4; pointIds[5] = 5; pointIds[6] = 6; pointIds[7] = 7; //-------------- // Quad grid //-------------- vtkUnstructuredGrid* grid = vtkUnstructuredGrid::New(); grid->Allocate(1); grid->SetPoints(points); grid->InsertNextCell(VTK_QUADRATIC_QUAD,8,pointIds); // Point data (scalars) vtkFloatArray *pointScalars = vtkFloatArray::New(); pointScalars->SetNumberOfComponents(1); pointScalars->SetNumberOfTuples(6); pointScalars->SetTuple1(0,10.0); grid->GetCellData()->SetScalars(pointScalars); // Lookup : vtkLookupTable *lookupTable = vtkLookupTable::New(); lookupTable->SetNumberOfColors(10); lookupTable->SetTableRange(0.0,1.0); lookupTable->Build(); // Scalar bar actor vtkScalarBarWidget *scalarBarWidget=vtkScalarBarWidget::New(); vtkScalarBarActor *scalarBarActor = vtkScalarBarActor::New(); scalarBarActor->SetLookupTable(lookupTable); scalarBarWidget->SetScalarBarActor(scalarBarActor); scalarBarActor->SetMaximumNumberOfColors(10); // Mapper vtkDataSetMapper *currentMapper=vtkDataSetMapper::New(); currentMapper->SetInput(grid); currentMapper->ScalarVisibilityOff(); currentMapper->SetLookupTable(lookupTable); currentMapper->SetInterpolateScalarsBeforeMapping(1); currentMapper->SetScalarModeToUseCellData(); // Actor vtkActor *quadActor = vtkActor::New(); quadActor->SetMapper(currentMapper); //-------------- // Visualization //-------------- // Renderer vtkRenderer *renderer= vtkRenderer::New(); renderer->SetLightFollowCamera(true); renderer->SetBackground(0.6,0.7,0.9); renderer->AddActor(quadActor); renderer->AddActor(scalarBarActor); // RenderWindow vtkRenderWindow *renderWindow = vtkRenderWindow::New(); renderWindow->AddRenderer(renderer); renderWindow->SetSize(300,300); // Interactor vtkRenderWindowInteractor *interactor = vtkRenderWindowInteractor::New(); interactor->SetRenderWindow(renderWindow); // Interactor style vtkInteractorStyleTrackballCamera *interactorStyle = vtkInteractorStyleTrackballCamera::New(); interactor->SetInteractorStyle(interactorStyle); // Event loop interactor->Initialize(); interactor->Start(); return 0; } 300 Mo gratuits sur CaraMail : Cliquez ici pour en profiter! -------------- next part -------------- An HTML attachment was scrubbed... URL: From hesham at uni-paderborn.de Mon Feb 21 09:07:40 2005 From: hesham at uni-paderborn.de (hesham) Date: Mon, 21 Feb 2005 14:07:40 -0000 Subject: [vtkusers] FW: linking problem Message-ID: <000001c50a45$0cf19fb0$734eea83@hesham> Hi again , i download my vtk4qt3 program from this site: http://www.matthias-koenig.net/vtkqt/ and there are no library files inside it , I don't know what shall I do , I run the program in command prompt but its still not working Can u please tell me the steps to execute my program correctly? Or maybe you can send the library file if u have it Thank you for help hesham -----Original Message----- From: Andrew Maclean [mailto:a.maclean at cas.edu.au] Sent: Dienstag, 15. Februar 2005 16:22 To: 'hesham' Subject: RE: [vtkusers] problem with vtkqt You are not linking in the library files for vtk4qt3. _____ From: hesham [mailto:hesham at uni-paderborn.de] Sent: Friday, 4 February 2005 19:59 To: vtkusers at vtk.org Subject: [vtkusers] problem with vtkqt Hi, Im beginner ,I want to put my vtk code in qt window because I have to make menu and anther command button,I start to use very easy example but when I excute the programm I had this link error Can you help me ,I use vtk4.2 ,qt3.3.3 and vtk4qt3,, My code : #include "vtkQtRenderWindow.h" #include "vtkRenderer.h" int main (void) { vtkRenderer *ren = vtkRenderer::New(); vtkQtRenderWindow *renWindow = vtkQtRenderWindow::New(); renWindow->AddRenderer(ren); renWindow->SetWindowName("VtkQt-vtkQtRenderWindow"); return 0; } linking Error: vtkqt.cpp Linking... vtkqt.obj : error LNK2001: unresolved external symbol "public: static class vtkQtRenderWindow * __cdecl vtkQtRenderWindow::New(void)" (?New at vtkQtRenderWindow@@SAPAV1 at XZ) Debug/vtkqt.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. vtkqt.exe - 2 error(s), 0 warning(s) -------------- next part -------------- An HTML attachment was scrubbed... URL: From chouyiyu at hotmail.com Mon Feb 21 10:20:33 2005 From: chouyiyu at hotmail.com (Yi-Yu Chou) Date: Mon, 21 Feb 2005 15:20:33 +0000 Subject: [vtkusers] How to include a class when building my own vtk-python classes ? Message-ID: Dear vtk-users, I am trying to build my own vtk-python classes under linux using vtk4.2. I can successfully build the class (vtkMyC1) based on /Examples/Build/vtkLocal. But inside the vtkMyC1 class, now I want to include another class (newClass.h with newClass.cpp) which is not related to vtk. How should I set to copile all the files ? Do I need to edit CMakeLists.txt or I have to do something else ? Any suggestions would be appreciated. Thanks in advacne !!!!! _________________________________________________________________ ???? MSN ??????????????? http://www.msn.com.tw/english/ From mathieu.malaterre at kitware.com Mon Feb 21 10:42:05 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 21 Feb 2005 10:42:05 -0500 Subject: [vtkusers] Display solid and outline. In-Reply-To: <20050219151032.97857.qmail@web52201.mail.yahoo.com> References: <20050219151032.97857.qmail@web52201.mail.yahoo.com> Message-ID: <421A014D.9040206@kitware.com> Ahmad Hosseinzadeh wrote: > Hi > > I've used vtkUnstructuredGrid for saving my 3D data. > I want to represent them in solid and outline but I > cannot find the corresponding filters for > vtkUnstructuredGrid. > I found vtkFeatureEdge and vtkPolyDataNormals filters > for PolyData, would you please help me find the same > filters for vtkUnstructuredGrid? vtkUnstructuredGrid are always displayed as polydata. Unless you use vtkShrinkFilter you cannot really see the 3d dimension. You can have a look at: [Surface and Wireframe Together?] http://www.vtk.org/pipermail/vtkusers/2004-July/074914.html HTH Mathieu From mathieu.malaterre at kitware.com Mon Feb 21 10:43:49 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 21 Feb 2005 10:43:49 -0500 Subject: [vtkusers] vtkObject.toString() for java In-Reply-To: <20050220071212.GD21051@nyongwa.montreal.qc.ca> References: <20050220071212.GD21051@nyongwa.montreal.qc.ca> Message-ID: <421A01B5.6080502@kitware.com> Steve, Could you please enter a bug for this. Simply go to : http://vtk.org/Bug After you enter a short description for your bug, you can later edit it and add your patch. BTW you'll need an account to enter a new bug. Thanks Mathieu Steve M. Robbins wrote: > Hello java-vtk-users > > On Wed, Feb 16, 2005 at 02:40:22PM -0500, David Marshburn wrote: > > >>to be honest, steve, i saw your message and thought, "yep, that's a known >>bug." sorry if the lack of response left you thinking no one was using >>vtk44 w/java. > > > I'm heartened to hear that we're not alone in using vtk with java. > > I wonder if other java/vtk users have an opinion on implementing the > toString() method. The patch below implements the toString() method > on vtkObjects such that it returns the result of Print(). Does that > seem reasonable? > > -Steve > > Index: Wrapping/vtkParseJava.c > =================================================================== > RCS file: /cvsroot/VTK/VTK/Wrapping/vtkParseJava.c,v > retrieving revision 1.30 > diff -u -b -B -r1.30 vtkParseJava.c > --- Wrapping/vtkParseJava.c 14 Nov 2003 20:43:38 -0000 1.30 > +++ Wrapping/vtkParseJava.c 20 Feb 2005 07:05:28 -0000 > @@ -493,6 +493,7 @@ > fprintf(fp," public native String Print();\n"); > /* Add the PrintRevisions method to vtkObject. */ > fprintf(fp," public native String PrintRevisions();\n"); > + fprintf(fp," public String toString() { return Print(); }\n"); > } > > if (!strcmp("vtkObject",data->ClassName)) > > _______________________________________________ > 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 > From mathieu.malaterre at kitware.com Mon Feb 21 10:45:33 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 21 Feb 2005 10:45:33 -0500 Subject: [vtkusers] Error handling cells data in 2D grid when stored in XML format In-Reply-To: <878y5j3ej4.fsf@home.homenet.ru> References: <878y5j3ej4.fsf@home.homenet.ru> Message-ID: <421A021D.5080000@kitware.com> Max, This looks like a bug to me. Is there a way for us to reproduce the problem on our side, if so could you describe it ? Thanks Mathieu Max Lapan wrote: > Hello, > > I don't know is this ParaView of VTK issue, but netherless: > > when I trying to create VTS data file (XML structured grid) with cell > data component, paraview fails to read it with strange error message: > > Error or warning: There was a VTK Error in file: /opt/build/paraview-1.8.1/VTK/Filtering/vtkDataSet.cxx (405) > Cell array Part Id with 1 components, has only 0 tuples but there are 50000 cells > ErrorMessage end > > When grid is 3D, etherything works ok, the same as for old data format > (not XML). > > Paraview even fails to read data which saved by it before > (use 'Point data to cell data' filter then Save). > > Any suggestions? From mathieu.malaterre at kitware.com Mon Feb 21 10:48:30 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 21 Feb 2005 10:48:30 -0500 Subject: [vtkusers] xml data extraction In-Reply-To: <20050221083842.GN20739@shake56.esscc.uq.edu.au> References: <20050221083842.GN20739@shake56.esscc.uq.edu.au> Message-ID: <421A02CE.7020704@kitware.com> Paul Cochrane wrote: > Hi all, > > I'm a newbie to vtk, and have a question concerning the process of reading > data from vtk xml files into vtk so that I can then manipulate and view the > data. > > The vtk xml file contains an UnstructuredGrid, with Points for the locations > of the data, PointData containing the scalar values of the data at those > points, and various CellData elements containing tags, and connectivity etc. > The process that I'm using is to read the data in like so: > > reader = vtk.vtkXMLUnstructuredGridReader() > reader.SetFileName("geom26.xml") > > But then I run into my first wall. What do I do then? I assume that I > should use some kind of data mapper, so I'd do something like: > > particleMapper = vtk.vtkDataSetMapper() > particleMapper.SetInput(reader.GetOutput()) > > But what data out of the UnstructuredGrid did I just grab? I want to > generate spheres at the locations of the Points, with radii from the > PointData, and use other attributes defined in the CellData to specify such > things as colour etc. How do I do this? > > I have read the vtk User's Guide, and _many_ of the examples, but it still > isn't clear to me how vtk thinks. I.e. where do I pipe what data to what > object (and importantly why?). You can always use the Print method to 'show' your vtk object. ex: ... reader.Update() print reader.Print() Otherwise VTK by default display wireframe or surface, so you'll need to glyph your unstructured grid with sphere to see the point. Maybe a simplier approach would be to use paraview(*). Once you play with it it is very easy to generate tcl script that will dump which vtk classes where used. HTH Mathieu (*) http://paraview.org From mathieu.malaterre at kitware.com Mon Feb 21 10:50:10 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 21 Feb 2005 10:50:10 -0500 Subject: [vtkusers] vtkHDFReader In-Reply-To: <4219D086.2000401@cineca.it> References: <200502181108.46942.burlen@apollo.sr.unh.edu> <4219D086.2000401@cineca.it> Message-ID: <421A0332.7010203@kitware.com> That looks great ! Marco by any chance could you add an entry in our Wiki(*) that point to this cvsweb ? Thanks Mathieu (*) http://vtk.org/Wiki Marco Petrone wrote: > Dear Burlen, take a look at here: > > http://www.cineca.it/cgi-bin/cvsweb.cgi/cosmolab/cosmoMAF/CosmoMAF/ > > there's an implementation of HDF5 imported developed for the > CosmoLab/CosmoMAF project (look for vtkDHF5* files). I know it supports > only a part of the HDF5 formatm and if I'm not wrong it relies on the > libhdf distributed as part of the CosmoMAF application. > > Marco > > Burlen wrote: > >> Hi does any one know if there is an HDF5 reader class for vtk?? >> I found a class that supports HDF4, but no reference to HDF5... >> _______________________________________________ >> 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 > From Patrick.Brockmann at cea.fr Mon Feb 21 11:56:55 2005 From: Patrick.Brockmann at cea.fr (Patrick Brockmann) Date: Mon, 21 Feb 2005 17:56:55 +0100 Subject: [vtkusers] QVTKRenderWindowInteractor examples of use Message-ID: <421A12D7.6040702@cea.fr> Hi all, I have read not-so-far-in-time some questions about use of QVTKRenderWindowInteractor in python. I have successfully used it in my python codes to get a VTK render window embeded in a Qt GUI. I have made a small deposit with 2 small basics examples at: http://dods.ipsl.jussieu.fr/brocksce/vtkqt/ Note that I still have a message "Fatal Python error: PyEval_RestoreThread: NULL tstate" when I quit the application. If you work in python, you may also found interessing the pyqt tutorial: http://www.python.org/moin/JonathanGardnerPyQtTutorial Hope that can help Patrick From mathieu.malaterre at kitware.com Mon Feb 21 11:56:28 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 21 Feb 2005 11:56:28 -0500 Subject: [vtkusers] vtkHDFReader In-Reply-To: <421A113D.1020907@cineca.it> References: <200502181108.46942.burlen@apollo.sr.unh.edu> <4219D086.2000401@cineca.it> <421A0332.7010203@kitware.com> <421A113D.1020907@cineca.it> Message-ID: <421A12BC.6080901@kitware.com> Looks good to me. Please mention the fact that vtkHDF5Reader is part of this project. Thanks Mathieu Marco Petrone wrote: > OK. Do you have any suggestion about the point where to add the link: I > would say your page about applications > (http://vtk.org/Wiki/VTK_Applications) could be a good place. Any other > more suitable place? > > Ciao, > > Marco > > > Mathieu Malaterre wrote: > >> That looks great ! Marco by any chance could you add an entry in our >> Wiki(*) that point to this cvsweb ? >> >> Thanks >> Mathieu >> (*) http://vtk.org/Wiki >> >> Marco Petrone wrote: >> >>> Dear Burlen, take a look at here: >>> >>> http://www.cineca.it/cgi-bin/cvsweb.cgi/cosmolab/cosmoMAF/CosmoMAF/ >>> >>> there's an implementation of HDF5 imported developed for the >>> CosmoLab/CosmoMAF project (look for vtkDHF5* files). I know it >>> supports only a part of the HDF5 formatm and if I'm not wrong it >>> relies on the libhdf distributed as part of the CosmoMAF application. >>> >>> Marco >>> >>> Burlen wrote: >>> >>>> Hi does any one know if there is an HDF5 reader class for vtk?? >>>> I found a class that supports HDF4, but no reference to HDF5... >>>> _______________________________________________ >>>> 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 >>> >> >> _______________________________________________ >> 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 >> > > From salah at gris.uni-tuebingen.de Mon Feb 21 12:02:50 2005 From: salah at gris.uni-tuebingen.de (salah) Date: Mon, 21 Feb 2005 18:02:50 +0100 Subject: [vtkusers] VTK Marching Cubes Filters / Iso-surfacing filter Message-ID: <4B943954DD289E47958BCEC8C32269BE62AB1E@wsi-server2.gris.uni-tuebingen.de> Hello All, Perhaps my questions are stupid, but I am not a vtk expert! unfortunately not even a good user :) 1. I am wondering if there is a difference between these itk isosurfacing filter? do they all generate triangulated surfaces? Do they all implement the traditional MC algorithm? vtkMarchingContourFilter, vtkKitwareContourFilter, vtkMarchingCubes, vtkImageMarchingCubes 2. Is the filter used in paraview for iso-surfacing (vtkPVKitwareContourFilter) even something different? 3. The output of the vtkImageMarchingCubes filter is a vtkPolyData, right? does not this vtkpolydata have normals informations? 4. I have been using the code segment bellow to generate, visualize, and save iso-surfaces from ITK 3d images. Now, - The surface rendered using this piece of code is properly lit. How could this happen if vertices' normals are not there? - I tried to load the saved vtkpolydata (the ASCII file generated by vtkPolyDataWriter) using paraview. Only a portion of the model is lit fine. Most parts of the model are black! By openning this ascii file using a text editor. I saw that normal information is written as the last part of the file. In short, and if I am missing/misunderstanding something, what is the right sequence to generate, render, and save triangulated iso-surfaces using vtk? I need normals for further processing. Many thanks, Zein // =============================== CODE ============================= // convert to vtk image typedef itk::ImageToVTKImageFilter Itk2VtkType; Itk2VtkType::Pointer m_Itk2Vtk = Itk2VtkType::New(); m_Itk2Vtk->SetInput(inputImage); // m_Reader reads a binary image m_Itk2Vtk->Update(); std::cout << "Image converted to VTK...." << std::endl; // generate iso surface vtkImageMarchingCubes *marcher = vtkImageMarchingCubes::New(); marcher->SetInput(m_Itk2Vtk->GetOutput()); marcher->SetValue(0, 100); marcher->Update(); std::cout << "Marching Cube finished...." << std::endl; vtkDecimate *decimator = vtkDecimate::New(); decimator->SetInput(marcher->GetOutput()); decimator->SetTargetReduction(0.1); decimator->SetMaximumIterations(4); decimator->SetInitialError(0.01); decimator->SetErrorIncrement(0.01); decimator->SetPreserveTopology(1); decimator->Update(); vtkSmoothPolyDataFilter* smoother = vtkSmoothPolyDataFilter::New(); smoother->SetInput(decimator->GetOutput()); smoother->SetNumberOfIterations(5); smoother->SetFeatureAngle(60); smoother->SetRelaxationFactor(0.05); smoother->FeatureEdgeSmoothingOff(); std::cout << "VTK Smoothing mesh finished...." << std::endl; // Save the mesh in an ASCII file char *meshFname = fl_file_chooser("Choose VTK Mesh File", "*.msh*", "d:/datanpr"); vtkPolyDataWriter *vtkwriter = vtkPolyDataWriter::New(); vtkwriter->SetFileName(meshFname); vtkwriter->SetInput(smoother->GetOutput()); vtkwriter->SetFileTypeToASCII(); vtkwriter->Update(); // render 3D model vtkPolyDataMapper* isoMapper = vtkPolyDataMapper::New(); isoMapper->SetInput(marcher->GetOutput()); isoMapper->ScalarVisibilityOff(); vtkActor* actor = vtkActor::New(); actor->SetMapper(isoMapper); actor->GetProperty()->SetDiffuseColor(1,1,0.9412); vtkRenderer* ren = vtkRenderer::New(); vtkRenderWindow* renwin = vtkRenderWindow::New(); vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); renwin->SetSize(500, 500); renwin->AddRenderer( ren ); iren->SetRenderWindow(renwin); ren->SetBackground(0.52, 0.57, 1.0); ren->AddActor(actor); renwin->Render(); iren->Start(); From mathieu.malaterre at kitware.com Mon Feb 21 12:00:48 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 21 Feb 2005 12:00:48 -0500 Subject: [vtkusers] QVTKRenderWindowInteractor examples of use In-Reply-To: <421A12D7.6040702@cea.fr> References: <421A12D7.6040702@cea.fr> Message-ID: <421A13C0.4040105@kitware.com> Patrick, Do you have a Wiki account ? If so could you add your personnal comment to your User page instead. This is easier if everything is gathered at the same place. For example: http://vtk.org/Wiki/User_talk:Dcthomp http://vtk.org/Wiki/User_talk:Maik http://vtk.org/Wiki/User:Goodwin Thanks Mathieu Patrick Brockmann wrote: > Hi all, > > I have read not-so-far-in-time some questions about use of > QVTKRenderWindowInteractor in python. > > I have successfully used it in my python codes to get a VTK render window > embeded in a Qt GUI. I have made a small deposit with 2 small basics > examples at: > http://dods.ipsl.jussieu.fr/brocksce/vtkqt/ > > Note that I still have a message "Fatal Python error: > PyEval_RestoreThread: NULL tstate" > when I quit the application. > > If you work in python, you may also found interessing the pyqt tutorial: > http://www.python.org/moin/JonathanGardnerPyQtTutorial > > Hope that can help > Patrick > > _______________________________________________ > 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 > From salah at gris.uni-tuebingen.de Mon Feb 21 12:19:58 2005 From: salah at gris.uni-tuebingen.de (salah) Date: Mon, 21 Feb 2005 18:19:58 +0100 Subject: [vtkusers] VTK Marching Cubes Filters / Iso-surfacing filter Message-ID: <4B943954DD289E47958BCEC8C32269BE6D09C7@wsi-server2.gris.uni-tuebingen.de> Hello All, Perhaps my questions are stupid, but I am not a vtk expert! unfortunately not even a good user :) 1. I am wondering if there is a difference between these itk isosurfacing filter? do they all generate triangulated surfaces? Do they all implement the traditional MC algorithm? vtkMarchingContourFilter, vtkKitwareContourFilter, vtkMarchingCubes, vtkImageMarchingCubes 2. Is the filter used in paraview for iso-surfacing (vtkPVKitwareContourFilter) even something different? 3. The output of the vtkImageMarchingCubes filter is a vtkPolyData, right? does not this vtkpolydata have normals informations? 4. I have been using the code segment bellow to generate, visualize, and save iso-surfaces from ITK 3d images. Now, - The surface rendered using this piece of code is properly lit. How could this happen if vertices' normals are not there? - I tried to load the saved vtkpolydata (the ASCII file generated by vtkPolyDataWriter) using paraview. Only a portion of the model is lit fine. Most parts of the model are black! By openning this ascii file using a text editor. I saw that normal information is written as the last part of the file. In short, and if I am missing/misunderstanding something, what is the right sequence to generate, render, and save triangulated iso-surfaces using vtk? I need normals for further processing. Many thanks, Zein // =============================== CODE ============================= // convert to vtk image typedef itk::ImageToVTKImageFilter Itk2VtkType; Itk2VtkType::Pointer m_Itk2Vtk = Itk2VtkType::New(); m_Itk2Vtk->SetInput(inputImage); // m_Reader reads a binary image m_Itk2Vtk->Update(); std::cout << "Image converted to VTK...." << std::endl; // generate iso surface vtkImageMarchingCubes *marcher = vtkImageMarchingCubes::New(); marcher->SetInput(m_Itk2Vtk->GetOutput()); marcher->SetValue(0, 100); marcher->Update(); std::cout << "Marching Cube finished...." << std::endl; vtkDecimate *decimator = vtkDecimate::New(); decimator->SetInput(marcher->GetOutput()); decimator->SetTargetReduction(0.1); decimator->SetMaximumIterations(4); decimator->SetInitialError(0.01); decimator->SetErrorIncrement(0.01); decimator->SetPreserveTopology(1); decimator->Update(); vtkSmoothPolyDataFilter* smoother = vtkSmoothPolyDataFilter::New(); smoother->SetInput(decimator->GetOutput()); smoother->SetNumberOfIterations(5); smoother->SetFeatureAngle(60); smoother->SetRelaxationFactor(0.05); smoother->FeatureEdgeSmoothingOff(); std::cout << "VTK Smoothing mesh finished...." << std::endl; // Save the mesh in an ASCII file char *meshFname = fl_file_chooser("Choose VTK Mesh File", "*.msh*", "d:/datanpr"); vtkPolyDataWriter *vtkwriter = vtkPolyDataWriter::New(); vtkwriter->SetFileName(meshFname); vtkwriter->SetInput(smoother->GetOutput()); vtkwriter->SetFileTypeToASCII(); vtkwriter->Update(); // render 3D model vtkPolyDataMapper* isoMapper = vtkPolyDataMapper::New(); isoMapper->SetInput(marcher->GetOutput()); isoMapper->ScalarVisibilityOff(); vtkActor* actor = vtkActor::New(); actor->SetMapper(isoMapper); actor->GetProperty()->SetDiffuseColor(1,1,0.9412); vtkRenderer* ren = vtkRenderer::New(); vtkRenderWindow* renwin = vtkRenderWindow::New(); vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); renwin->SetSize(500, 500); renwin->AddRenderer( ren ); iren->SetRenderWindow(renwin); ren->SetBackground(0.52, 0.57, 1.0); ren->AddActor(actor); renwin->Render(); iren->Start(); From gatos12 at hotmail.com Mon Feb 21 12:47:52 2005 From: gatos12 at hotmail.com (Gatos Gatos) Date: Mon, 21 Feb 2005 17:47:52 +0000 Subject: [vtkusers] Improve the Rendering Performance... Message-ID: Hi I would like to know if there is any way to to improve the performance on the following code. I run the following example with 100000 points (here only 6) and starts to be slow. I played with the vtkTriangleFilter, vtkStripper , and the ImmediateModeRenderingOff(); but it looks that there is no difference in preformance. Also how can I use the filter after I initialize the actor (eg: during the interaction)? //filter->SetTargetReduction(0.5); Is it any way or I have to reconstruct the triangle mesh from the begining? Thank you very much in advance kostas ----------------------------------------------------------------- vtkFloatArray* pcoords = vtkFloatArray::New(); pcoords->SetNumberOfComponents(3); pcoords->SetNumberOfTuples(6); float pts[6][3] = { {0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {1.0, 0.0, 0.0}, {1.0, 1.0, 0.0}, {2.0, 0.0, 0.0}, {2.0, 1.0, 0.0} }; for (int i=0; i<6; i++) { pcoords->SetTuple(i, pts[i]); } vtkPoints* points = vtkPoints::New(); points->SetData(pcoords); // Create the dataset. In this case, we create a vtkPolyData vtkPolyData* polydata = vtkPolyData::New(); // Assign points and cells polydata->SetPoints(points); vtkTriangle *triangle; vtkCellArray* tris = vtkCellArray::New(); triangle=vtkTriangle::New(); triangle->GetPointIds()->SetId(0,0); triangle->GetPointIds()->SetId(1,2); triangle->GetPointIds()->SetId(2,1); tris->InsertNextCell(triangle); triangle->Delete(); polydata->SetPolys(tris); //vtkDecimatePro * filter = vtkDecimatePro::New(); //filter->SetInput(polydata); //filter->SetMaximumError(0); //filter->SetTargetReduction(0.5); //polydata = (vtkPolyData*) filter->GetOutput(); vtkTriangleFilter *vtf = vtkTriangleFilter::New(); vtf->SetInput(polydata); polydata = (vtkPolyData*) vtf->GetOutput(); vtkPolyDataNormals *bNormals = vtkPolyDataNormals::New(); bNormals->SetInput(polydata); //bNormals->SetFeatureAngle(60.0); vtkStripper *bStripper = vtkStripper::New(); bStripper->SetInput(bNormals->GetOutput()); //Create the mapper vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInput(bStripper->GetOutput()); mapper->ScalarVisibilityOff(); mapper->ImmediateModeRenderingOff(); // Create an actor. vtkActor* actor = vtkActor::New(); actor->SetMapper(mapper); actor->GetProperty()->SetColor(1,1,0); renderer->AddActor(actor); From sunils at iastate.edu Mon Feb 21 13:31:14 2005 From: sunils at iastate.edu (Sunil Suram) Date: Mon, 21 Feb 2005 12:31:14 -0600 Subject: [vtkusers] Merging overlapping data sets Message-ID: <6.2.1.2.2.20050221123109.01fd70c8@sunils.mail.iastate.edu> Hi, I am new to VTK and I am looking for some help to try and figure this out. I am trying to merge two overlapping data sets. Each data set has slightly different scalars and vectors in the overlapping region( from experimental runs, that overlap each other ). I have tried using vtkExtractUnstructuredGrid, and switching on Merging, but I still see artifacts. I would like to know if there is some way of merging these data sets and getting rid of the artifacts. I should also mention that the grids in the data sets exactly match each other in the overlapping region. I understand that merging the data sets would change the scalars and vectors in the overlap region in some way ( maybe undesired) , but that is OK for now, since I am right now interested in viewing the data. Any help in solving this problem will be appreciated. Thanks. Sunil From yfl at doc.ic.ac.uk Mon Feb 21 13:40:44 2005 From: yfl at doc.ic.ac.uk (yfl at doc.ic.ac.uk) Date: Mon, 21 Feb 2005 18:40:44 +0000 Subject: [vtkusers] SetEndPickMethod Message-ID: <1109011244.421a2b2cee8e6@www.doc.ic.ac.uk> In vtk4.4, there is no SetEndPickMethod() in vtkRenderWindowInteractor, then which function can be used instead to invoke the action after picking? Thanks Krista From jcplatt at lineone.net Mon Feb 21 14:17:07 2005 From: jcplatt at lineone.net (John Platt) Date: Mon, 21 Feb 2005 19:17:07 -0000 Subject: [vtkusers] Quadratic cell data bug ? In-Reply-To: <1108998176005992@lycos-europe.com> Message-ID: <001c01c51849$f5c11c40$244b2850@pacsys4> Hi Jacques, Try replacing cellScalars ->SetNumberOfTuples(6); with cellScalars ->SetNumberOfTuples(1); When a quadratic quad is converted to polydata by vtkDataSetMapper (a helper class containing vtkDataSetSurfaceFilter which extracts faces/edges for the internal instance of vtkPolyDataMapper) it is triangulated into 6 linear triangles. Just set the number of cell tuples equal to the number of quadratic cells and you should have no problems. HTH John. -----Original Message----- From: jacques.charreyron [mailto:jacques.charreyron at caramail.com] Sent: 21 February 2005 15:03 To: John Platt Subject: Re: RE: [vtkusers] Quadratic cell data bug ? John, Thanks for your answer, In fact I really meant cell data and "currentMapper->SetScalarModeToUseCellData();" id used on purpose. Sorry my code snippets were wrong as fas as variable names are concerned . please read : vtkFloatArray *cellScalars = vtkFloatArray::New(); cellScalars ->SetNumberOfComponents(1); cellScalars ->SetNumberOfTuples(6); cellScalars ->SetTuple1(0,10.0); grid->GetCellData()->SetScalars(cellScalars ); instead of : vtkFloatArray *pointScalars = vtkFloatArray::New(); pointScalars->SetNumberOfComponents(1); pointScalars->SetNumberOfTuples(6); pointScalars->SetTuple1(0,10.0); grid->GetCellData()->SetScalars(pointScalars); Yours, Jacques _____ > De: "John Platt" > A: "'jacques.charreyron'" > Objet: RE: [vtkusers] Quadratic cell data bug ? > Date: Mon, 21 Feb 2005 14:06:46 -0000 Hi Jacques, On a very quick look, check currentMapper->SetScalarModeToUseCellData(); Did you mean point data? HTH John. -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of jacques.charreyron Sent: 21 February 2005 10:25 To: vtkusers at vtk.org Subject: [vtkusers] Quadratic cell data bug ? Hello, I am trying to display values on quadratic cells. In my example I have one quadratic quad cell I allocate only one tuple in my float array and put an arbitrary value : vtkFloatArray *pointScalars = vtkFloatArray::New(); pointScalars->SetNumberOfComponents(1); pointScalars->SetNumberOfTuples(6); pointScalars->SetTuple1(0,10.0); grid->GetCellData()->SetScalars(pointScalars); When running this example I get this error : ERROR: In G:\Sandbox\Shared\common\intel_a\Api\Vtk\R4.4\Src\Common\vtkDataSet.cxx, line 403 vtkPolyData (0x01BADF98): Cell array with 1 components, has only 0 tuples but there are 6 cells When I allocate six tuples to put six value : ie one for each triangle like this : vtkFloatArray *pointScalars = vtkFloatArray::New(); pointScalars->SetNumberOfComponents(1); pointScalars->SetNumberOfTuples(6); pointScalars->SetTuple1(0,10.0); pointScalars->SetTuple1(1,10.0); pointScalars->SetTuple1(2,10.0); pointScalars->SetTuple1(3,10.0); pointScalars->SetTuple1(4,10.0); pointScalars->SetTuple1(5,10.0); grid->GetCellData()->SetScalars(pointScalars); I get the following error : Warning: In G:\Sandbox\Shared\common\intel_a\Api\Vtk\R4.4\Src\Common\vtkDataSet.cxx, line 411 vtkUnstructuredGrid (0x01B8CB00): Cell array with 1 components, has 6 tuples but there are only 1 cells ERROR: In G:\Sandbox\Shared\common\intel_a\Api\Vtk\R4.4\Src\Common\vtkDataSet.cxx, line 403 vtkPolyData (0x01BADF98): Cell array with 1 components, has only 0 tuples but there are 6 cells Any idea ? Here is a code snippet to reproduce the behaviour : #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main( int argc, char *argv[] ) { vtkPoints *points = vtkPoints::New(); points->SetNumberOfPoints(8); points->SetPoint(0, 0, 0, 0); points->SetPoint(1, 1, 0, 0); points->SetPoint(2, 1, 1, 0); points->SetPoint(3, 0, 1, 0); points->SetPoint(4, 0.5, 0, 0); points->SetPoint(5, 1, 0.5, 0); points->SetPoint(6, 0.5, 1, 0); points->SetPoint(7, 0, 0.5, 0); vtkIdType pointIds[8]; pointIds[0] = 0; pointIds[1] = 1; pointIds[2] = 2; pointIds[3] = 3; pointIds[4] = 4; pointIds[5] = 5; pointIds[6] = 6; pointIds[7] = 7; //-------------- // Quad grid //-------------- vtkUnstructuredGrid* grid = vtkUnstructuredGrid::New(); grid->Allocate(1); grid->SetPoints(points); grid->InsertNextCell(VTK_QUADRATIC_QUAD,8,pointIds); // Point data (scalars) vtkFloatArray *pointScalars = vtkFloatArray::New(); pointScalars->SetNumberOfComponents(1); pointScalars->SetNumberOfTuples(6); pointScalars->SetTuple1(0,10.0); grid->GetCellData()->SetScalars(pointScalars); // Lookup : vtkLookupTable *lookupTable = vtkLookupTable::New(); lookupTable->SetNumberOfColors(10); lookupTable->SetTableRange(0.0,1.0); lookupTable->Build(); // Scalar bar actor vtkScalarBarWidget *scalarBarWidget=vtkScalarBarWidget::New(); vtkScalarBarActor *scalarBarActor = vtkScalarBarActor::New(); scalarBarActor->SetLookupTable(lookupTable); scalarBarWidget->SetScalarBarActor(scalarBarActor); scalarBarActor->SetMaximumNumberOfColors(10); // Mapper vtkDataSetMapper *currentMapper=vtkDataSetMapper::New(); currentMapper->SetInput(grid); currentMapper->ScalarVisibilityOff(); currentMapper->SetLookupTable(lookupTable); currentMapper->SetInterpolateScalarsBeforeMapping(1); currentMapper->SetScalarModeToUseCellData(); // Actor vtkActor *quadActor = vtkActor::New(); quadActor->SetMapper(currentMapper); //-------------- // Visualization //-------------- // Renderer vtkRenderer *renderer= vtkRenderer::New(); renderer->SetLightFollowCamera(true); renderer->SetBackground(0.6,0.7,0.9); renderer->AddActor(quadActor); renderer->AddActor(scalarBarActor); // RenderWindow vtkRenderWindow *renderWindow = vtkRenderWindow::New(); renderWindow->AddRenderer(renderer); renderWindow->SetSize(300,300); // Interactor vtkRenderWindowInteractor *interactor = vtkRenderWindowInteractor::New(); interactor->SetRenderWindow(renderWindow); // Interactor style vtkInteractorStyleTrackballCamera *interactorStyle = vtkInteractorStyleTrackballCamera::New(); interactor->SetInteractorStyle(interactorStyle); // Event loop interactor->Initialize(); interactor->Start(); return 0; } 300 Mo gratuits sur CaraMail : Cliquez ici pour en profiter! 300 Mo gratuits sur CaraMail : Cliquez ici pour en profiter! -------------- next part -------------- An HTML attachment was scrubbed... URL: From a-sen at northwestern.edu Mon Feb 21 14:29:20 2005 From: a-sen at northwestern.edu (a-sen at northwestern.edu) Date: Mon, 21 Feb 2005 13:29:20 -0600 Subject: [vtkusers] Memory issue Message-ID: <200502211929.j1LJTSlB016261@casbah.it.northwestern.edu> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From clinton at elemtech.com Mon Feb 21 14:40:57 2005 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 21 Feb 2005 12:40:57 -0700 Subject: [vtkusers] X11 offscreen rendering without Mesa In-Reply-To: <20050221191746.223C43043E@public.kitware.com> References: <20050221191746.223C43043E@public.kitware.com> Message-ID: <1109014857.421a394973e6c@webmail.xmission.com> Just wanted to let some people know that offscreen rendering is possible without Mesa on X11. You can use Xvfb. It isn't a complete replacement for Mesa, but using that instead of Mesa may be good enough for some people in some cases. Xvfb even let's you put entire GUIs in a virtual display, not just the graphics window. You can also connect to the virual display at some point during the process to see its progress. Clint From salah at gris.uni-tuebingen.de Mon Feb 21 15:47:33 2005 From: salah at gris.uni-tuebingen.de (salah) Date: Mon, 21 Feb 2005 21:47:33 +0100 Subject: [vtkusers] VTK Marching Cubes Filters / Iso-surfacing filter Message-ID: <4B943954DD289E47958BCEC8C32269BE62AB20@wsi-server2.gris.uni-tuebingen.de> Hello All, Perhaps my questions are stupid, but I am not a vtk expert! unfortunately not even a good user :) 1. I am wondering if there is a difference between these itk isosurfacing filter? do they all generate triangulated surfaces? Do they all implement the traditional MC algorithm? vtkMarchingContourFilter, vtkKitwareContourFilter, vtkMarchingCubes, vtkImageMarchingCubes 2. Is the filter used in paraview for iso-surfacing (vtkPVKitwareContourFilter) even something different? 3. The output of the vtkImageMarchingCubes filter is a vtkPolyData, right? does not this vtkpolydata have normals informations? 4. I have been using the code segment bellow to generate, visualize, and save iso-surfaces from ITK 3d images. Now, - The surface rendered using this piece of code is properly lit. How could this happen if vertices' normals are not there? - I tried to load the saved vtkpolydata (the ASCII file generated by vtkPolyDataWriter) using paraview. Only a portion of the model is lit fine. Most parts of the model are black! By openning this ascii file using a text editor. I saw that normal information is written as the last part of the file. In short, and if I am missing/misunderstanding something, what is the right sequence to generate, render, and save triangulated iso-surfaces using vtk? I need normals for further processing. Many thanks, Zein // =============================== CODE ============================= // convert to vtk image typedef itk::ImageToVTKImageFilter Itk2VtkType; Itk2VtkType::Pointer m_Itk2Vtk = Itk2VtkType::New(); m_Itk2Vtk->SetInput(inputImage); // m_Reader reads a binary image m_Itk2Vtk->Update(); std::cout << "Image converted to VTK...." << std::endl; // generate iso surface vtkImageMarchingCubes *marcher = vtkImageMarchingCubes::New(); marcher->SetInput(m_Itk2Vtk->GetOutput()); marcher->SetValue(0, 100); marcher->Update(); std::cout << "Marching Cube finished...." << std::endl; vtkDecimate *decimator = vtkDecimate::New(); decimator->SetInput(marcher->GetOutput()); decimator->SetTargetReduction(0.1); decimator->SetMaximumIterations(4); decimator->SetInitialError(0.01); decimator->SetErrorIncrement(0.01); decimator->SetPreserveTopology(1); decimator->Update(); vtkSmoothPolyDataFilter* smoother = vtkSmoothPolyDataFilter::New(); smoother->SetInput(decimator->GetOutput()); smoother->SetNumberOfIterations(5); smoother->SetFeatureAngle(60); smoother->SetRelaxationFactor(0.05); smoother->FeatureEdgeSmoothingOff(); std::cout << "VTK Smoothing mesh finished...." << std::endl; // Save the mesh in an ASCII file char *meshFname = fl_file_chooser("Choose VTK Mesh File", "*.msh*", "d:/datanpr"); vtkPolyDataWriter *vtkwriter = vtkPolyDataWriter::New(); vtkwriter->SetFileName(meshFname); vtkwriter->SetInput(smoother->GetOutput()); vtkwriter->SetFileTypeToASCII(); vtkwriter->Update(); // render 3D model vtkPolyDataMapper* isoMapper = vtkPolyDataMapper::New(); isoMapper->SetInput(marcher->GetOutput()); isoMapper->ScalarVisibilityOff(); vtkActor* actor = vtkActor::New(); actor->SetMapper(isoMapper); actor->GetProperty()->SetDiffuseColor(1,1,0.9412); vtkRenderer* ren = vtkRenderer::New(); vtkRenderWindow* renwin = vtkRenderWindow::New(); vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); renwin->SetSize(500, 500); renwin->AddRenderer( ren ); iren->SetRenderWindow(renwin); ren->SetBackground(0.52, 0.57, 1.0); ren->AddActor(actor); renwin->Render(); iren->Start(); From jaemoon at rice.edu Mon Feb 21 15:53:33 2005 From: jaemoon at rice.edu (James Moon) Date: Mon, 21 Feb 2005 14:53:33 -0600 Subject: [vtkusers] problem with installation Message-ID: <000001c51857$67d1ef00$64432a80@JamesOffice> Hi, I am a novice who's trying to install the VTK into my PC. When I use CMake_setup to build the files, what should I choose in "Build For" ? I tried every entry, but it says CMAKE_MAKE_PROGRAM-NOTFOUND. How can I resolve this? Thanks, James -------------- next part -------------- An HTML attachment was scrubbed... URL: From kplusplus at comcast.net Mon Feb 21 16:30:21 2005 From: kplusplus at comcast.net (kplusplus at comcast.net) Date: Mon, 21 Feb 2005 15:30:21 -0600 Subject: [vtkusers] vtkTexture -- only textures using a single color? Message-ID: <421A52ED.2040407@comcast.net> I'm writing an app that allows the user to visualize heightmaps, and am having problems with vtkTexture. For some reason, the correct texture isn't applied; rather, the color that occurs in the upper leftmost pixel of the texture map. The textures I'm using have the same dimensions as the heightmaps. Here's the code I'm testing with: ------ vtkPNGReader *hmReader = vtkPNGReader::New(); hmReader->SetFileName(filePath); vtkPNGReader *tReader = vtkPNGReader::New(); tReader->SetFileName(texturePath); vtkTexture *tex = vtkTexture::New(); tex->SetInput(tReader->GetOutput()); tex->RepeatOff(); tex->InterpolateOn(); vtkDataSetSurfaceFilter *geometry = vtkDataSetSurfaceFilter::New(); geometry->SetUseStrips(1); geometry->SetInput(hmReader->GetOutput()); vtkQuadricClustering *cluster = vtkQuadricClustering::New(); cluster->SetUseInputPoints(1); cluster->SetNumberOfXDivisions(128); cluster->SetNumberOfYDivisions(128); cluster->SetNumberOfZDivisions(128); cluster->SetInput(geometry->GetOutput()); vtkWarpScalar *warp = vtkWarpScalar::New(); warp->SetScaleFactor(1.0); warp->SetInput(cluster->GetOutput()); vtkDataSetMapper *mapper = vtkDataSetMapper::New(); mapper->ScalarVisibilityOff(); mapper->SetInput((vtkPolyData *)warp->GetOutput()); vtkActor *actor = vtkActor::New(); actor->SetTexture(tex); actor->SetMapper(mapper); ren->AddActor(actor); ------ What's going wrong here? How do I get my textures to work properly? From yfl at doc.ic.ac.uk Mon Feb 21 16:43:39 2005 From: yfl at doc.ic.ac.uk (yfl at doc.ic.ac.uk) Date: Mon, 21 Feb 2005 21:43:39 +0000 Subject: [vtkusers] Please help to solve the problem on Picking a point on surface Message-ID: <1109022219.421a560b0fa53@www.doc.ic.ac.uk> I try to pick a point on the surface. In vtk4.2, the action of picking is invoked by SetEndPickMethod() of vtkRenderWindowInteractor. But now I have upgraded to vtk4.4. Instead of using SetEndPickMethod(, what function I should call to invoke the picking? vtkRenderWindow *renWin = vtkRenderWindow::New(); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); vtkPointPicker *mouse_picker = vtkPointPicker::New(); mouse_picker->SetTolerance(0.01); iren->SetPicker(mouse_picker); renWin->Render(); iren->SetEndPickMethod(pickPoint,(void *)iren); iren->Start(); Thanks a lot. Krista From KunduSJ at moffitt.usf.edu Mon Feb 21 16:55:07 2005 From: KunduSJ at moffitt.usf.edu (Kundu, Sangeeta J.) Date: Mon, 21 Feb 2005 16:55:07 -0500 Subject: [vtkusers] vtkConfigure.h file missing Message-ID: Hello, I just downloaded the source package for VTK. But while using it , i found that the file "vtkConfigure.h" is missing. Can anyone please suggest, where will I be able to download it from. Thanks. -sk ###################################################################### This transmission may be confidential or protected from disclosure and is only for review and use by the intended recipient. Access by anyone else is unauthorized. Any unauthorized reader is hereby notified that any review, use, dissemination, disclosure or copying of this information, or any act or omission taken in reliance on it, is prohibited and may be unlawful. If you received this transmission in error, please notify the sender immediately. Thank you. ###################################################################### From david.cole at kitware.com Mon Feb 21 16:59:22 2005 From: david.cole at kitware.com (David Cole) Date: Mon, 21 Feb 2005 16:59:22 -0500 Subject: [vtkusers] Please help to solve the problem on Picking a point on surface In-Reply-To: <1109022219.421a560b0fa53@www.doc.ic.ac.uk> References: <1109022219.421a560b0fa53@www.doc.ic.ac.uk> Message-ID: <421A59BA.4070401@kitware.com> Did you try using AddObserver to listen for the EndPickEvent? Searching for "endpick" in the current CVS source code yields the following results: Common\vtkCommand.cxx:30: "EndPickEvent", Common\vtkCommand.h:110: EndPickEvent, Examples\Annotation\Python\annotatePick.py:59:picker.AddObserver("EndPickEvent", annotatePick) Examples\Annotation\Tcl\annotatePick.tcl:37: picker AddObserver EndPickEvent annotatePick Rendering\vtkAbstractPicker.h:28:// events are StartPickEvent, PickEvent, and EndPickEvent which are Rendering\vtkInteractorStyle.cxx:805: rwi->EndPickCallback(); Rendering\vtkInteractorStyleImage.cxx:76:void vtkInteractorStyleImage::EndPick() Rendering\vtkInteractorStyleImage.cxx:82: this->InvokeEvent(vtkCommand::EndPickEvent, this); Rendering\vtkInteractorStyleImage.cxx:189: this->EndPick(); Rendering\vtkInteractorStyleImage.h:84: virtual void EndPick(); Rendering\vtkPicker.cxx:452: this->InvokeEvent(vtkCommand::EndPickEvent,NULL); Rendering\vtkPropPicker.cxx:93: this->InvokeEvent(vtkCommand::EndPickEvent,NULL); Rendering\vtkRenderWindowInteractor.cxx:207:void vtkRenderWindowInteractor::EndPickCallback() Rendering\vtkRenderWindowInteractor.cxx:209: this->InvokeEvent(vtkCommand::EndPickEvent,NULL); Rendering\vtkRenderWindowInteractor.h:157: virtual void EndPickCallback(); Rendering\vtkWorldPointPicker.cxx:91: this->InvokeEvent(vtkCommand::EndPickEvent,NULL); Rendering\vtkWorldPointPicker.h:23:// The PickMethod() is not invoked, but StartPickMethod() and EndPickMethod () Wrapping\Tcl\vtkinteraction\bindings-iw.tcl:115: # EndPickEvent observer. Wrapping\Tcl\vtkinteraction\bindings-iw.tcl:208: ::vtk::set_widget_variable_value $istyle EndPickEventT ag \ Wrapping\Tcl\vtkinteraction\bindings-iw.tcl:209: [$istyle AddObserver EndPickEvent \ Hope this helps, David Cole From rendezvous at dreamxplosion.com Mon Feb 21 17:39:07 2005 From: rendezvous at dreamxplosion.com (Marius S Giurgi) Date: Mon, 21 Feb 2005 17:39:07 -0500 Subject: [vtkusers] planeWidget (toggle) & volume render issue Message-ID: Is there a way to have volume and planeWidget work together fine? It looks like the render order is not preserved while toggling the planeWidget back and forth. While it displays perfectly fine at the beginning, if toggled (off) and (on) the widget hides the volume. Why? I'm sure it must be something to do with the depth ordering (again). Is there a way to avoid this effect and have the volume in front of the widget? I wish someone finally found a solution to this annoying issue of getting the proper depth ordering for poly+volume rendering. marius From cochrane at esscc.uq.edu.au Mon Feb 21 19:05:35 2005 From: cochrane at esscc.uq.edu.au (Paul Cochrane) Date: Tue, 22 Feb 2005 10:05:35 +1000 Subject: [vtkusers] xml data extraction In-Reply-To: <421A02CE.7020704@kitware.com> References: <20050221083842.GN20739@shake56.esscc.uq.edu.au> <421A02CE.7020704@kitware.com> Message-ID: <20050222000535.GO20739@shake56.esscc.uq.edu.au> Mathieu, Many thanks for the help! Much appreciated. Paul * Mathieu Malaterre (mathieu.malaterre at kitware.com) [050222 01:57]: > You can always use the Print method to 'show' your vtk object. > > ex: > > ... > reader.Update() > print reader.Print() > > > Otherwise VTK by default display wireframe or surface, so you'll need to > glyph your unstructured grid with sphere to see the point. > > Maybe a simplier approach would be to use paraview(*). Once you play > with it it is very easy to generate tcl script that will dump which vtk > classes where used. > > HTH > Mathieu > (*) http://paraview.org -- Paul Cochrane Computational Scientist/Software Developer Earth Systems Science Computational Centre University of Queensland Brisbane Queensland 4072 Australia E: cochrane at esscc.uq.edu.au P: +61 7 3346 9797 F: +61 7 3365 7347 From paul at opes.com.au Mon Feb 21 19:51:59 2005 From: paul at opes.com.au (Paul Tait) Date: Tue, 22 Feb 2005 08:51:59 +0800 Subject: [vtkusers] Re: Lighting problem In-Reply-To: <005301c51819$3af968c0$0a01a8c0@Renasci> Message-ID: <005b01c51878$b6ddab90$af0aa8c0@DEEPTHROAT> Sorry should of told you I'd already tried that. It does the same but its dimmer. Just using plain old 4.2. with the vtkWin32RenderWindowInteractor I'm going to try an jiffy something up in python that exhibits the problem. Paul -----Original Message----- From: Goodwin Lawlor [mailto:goodwin.lawlor at ucd.ie] Sent: Monday, 21 February 2005 9:28 PM To: Paul Tait Subject: Re: [vtkusers] Re: Lighting problem Hi Paul, Sounds like there is a bug in the interactor style when using vtkLightKit... which one are you using? Have you tried your scene without the light kit and just the default light setup? Does it have the same problem? I tried an example I have with the light kit and it works ok when moving actors around. What version of VTK are you using? Goodwin ----- Original Message ----- From: "Paul Tait" To: "'Goodwin Lawlor'" Sent: Monday, February 21, 2005 4:56 AM Subject: RE: [vtkusers] Re: Lighting problem > Hmmmmm > > As I understand it vtkLightKit uses parallel light sources so distance > shouldn't make any difference. Interestingly when I first move my > actors they display correctly but only dissappear when I move them > with the mouse. Also I leave the position of my top (vertically > speaking) actor the same so you would think that it would still be lit > correctly. > > Paul > > To: vtkusers at public.kitware.com > Subject: [vtkusers] Re: Lighting problem > > > Hi Paul, > > Try transforming your lights (position and focal point) by the actors > transform. Maybe try actor->GetMatrix(matrix); > light->SetTransformMatrix(matrix). > > I'd guess that the other actors in your scene wont look right then > though... try moving the light position back along the direction of > projection instead. > > hth > > Goodwin > > "Paul Tait" wrote in message > news:007a01c5158a$f1fff200$af0aa8c0 at DEEPTHROAT... > > More info to perhaps pique your interest > > > > I'm moving my actors around with actor->AddPosition(0, 0, deltaZ) > > > > I can see the bottom of my actors but as soon as I get above the > > horizontal its as if the lights switch off. This only happens AFTER > > I've used actor->AddPosition(0, 0, deltaZ) Before that I can view > > them > > > from any angle. > > > > Paul > > > > -----Original Message----- > > From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On > > Behalf Of Paul Tait > > Sent: Thursday, 17 February 2005 5:21 PM > > To: vtkusers at vtk.org > > Subject: [vtkusers] Lighting problem > > > > > > I've just modified my VTK app to accentuate the vertical distances > > between some oil reservoirs. Everything goes fine till start moving > > the model around. From many angles the it just shows black. By > > moving around to another position I can see it again. I'm using a > > plain vtlLightKit which normally works really well for me. Do I have > > to inform it or something else of the change in the scene ? > > > > Paul Tait > > > > PS Wil... Hows my high contrast LUT coming on ? > > > > -- > > No virus found in this outgoing message. > > Checked by AVG Anti-Virus. > > Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: > > 14/02/2005 > > > > > > _______________________________________________ > > 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 > > > > -- > > No virus found in this incoming message. > > Checked by AVG Anti-Virus. > > Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: > > 14/02/2005 > > > > > > -- > > No virus found in this outgoing message. > > Checked by AVG Anti-Virus. > > Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: > > 14/02/2005 > > > > > > _______________________________________________ > > 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 > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005 > > > -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.3.0 - Release Date: 21/02/2005 From margaretha_s2002 at yahoo.com Mon Feb 21 20:48:12 2005 From: margaretha_s2002 at yahoo.com (Margaretha Sulistyoningsih) Date: Mon, 21 Feb 2005 17:48:12 -0800 (PST) Subject: [vtkusers] renderer`s layer and the interactor Message-ID: <20050222014812.45117.qmail@web14421.mail.yahoo.com> Hallo vtk-Group, I render two volumes using two renderer (layer 0 and layer 1). My problem is the renderwindowinteractor gives only effect to the image in layer 1. For instance, when I rotate the image using left-key-mouse, only the image in layer 1 is rotated, even I have called InteractiveOn() for both renderer. Any hint would be appreciated. Thank you. .Margaretha. --------------------------------- Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term' -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at opes.com.au Tue Feb 22 00:44:32 2005 From: paul at opes.com.au (Paul Tait) Date: Tue, 22 Feb 2005 13:44:32 +0800 Subject: [vtkusers] Re: Lighting problem In-Reply-To: <005b01c51878$b6ddab90$af0aa8c0@DEEPTHROAT> Message-ID: <006e01c518a1$95c341d0$af0aa8c0@DEEPTHROAT> Problem solved. All is well and vtkLightKit is not the problem. I had the classic of by one error which caused one of my actors to be moved by a huge amount which then caused a weird clipping problem. So what looked like dissappearing was actually clipping. Don?t really understand it but its fixed and my confidence in VTK is restored. Thanks for the help Paul -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Paul Tait Sent: Tuesday, 22 February 2005 8:52 AM To: vtkusers at vtk.org Subject: RE: [vtkusers] Re: Lighting problem Sorry should of told you I'd already tried that. It does the same but its dimmer. Just using plain old 4.2. with the vtkWin32RenderWindowInteractor I'm going to try an jiffy something up in python that exhibits the problem. Paul -----Original Message----- From: Goodwin Lawlor [mailto:goodwin.lawlor at ucd.ie] Sent: Monday, 21 February 2005 9:28 PM To: Paul Tait Subject: Re: [vtkusers] Re: Lighting problem Hi Paul, Sounds like there is a bug in the interactor style when using vtkLightKit... which one are you using? Have you tried your scene without the light kit and just the default light setup? Does it have the same problem? I tried an example I have with the light kit and it works ok when moving actors around. What version of VTK are you using? Goodwin ----- Original Message ----- From: "Paul Tait" To: "'Goodwin Lawlor'" Sent: Monday, February 21, 2005 4:56 AM Subject: RE: [vtkusers] Re: Lighting problem > Hmmmmm > > As I understand it vtkLightKit uses parallel light sources so distance > shouldn't make any difference. Interestingly when I first move my > actors they display correctly but only dissappear when I move them > with the mouse. Also I leave the position of my top (vertically > speaking) actor the same so you would think that it would still be lit > correctly. > > Paul > > To: vtkusers at public.kitware.com > Subject: [vtkusers] Re: Lighting problem > > > Hi Paul, > > Try transforming your lights (position and focal point) by the actors > transform. Maybe try actor->GetMatrix(matrix); > light->SetTransformMatrix(matrix). > > I'd guess that the other actors in your scene wont look right then > though... try moving the light position back along the direction of > projection instead. > > hth > > Goodwin > > "Paul Tait" wrote in message > news:007a01c5158a$f1fff200$af0aa8c0 at DEEPTHROAT... > > More info to perhaps pique your interest > > > > I'm moving my actors around with actor->AddPosition(0, 0, deltaZ) > > > > I can see the bottom of my actors but as soon as I get above the > > horizontal its as if the lights switch off. This only happens AFTER > > I've used actor->AddPosition(0, 0, deltaZ) Before that I can view > > them > > > from any angle. > > > > Paul > > > > -----Original Message----- > > From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On > > Behalf Of Paul Tait > > Sent: Thursday, 17 February 2005 5:21 PM > > To: vtkusers at vtk.org > > Subject: [vtkusers] Lighting problem > > > > > > I've just modified my VTK app to accentuate the vertical distances > > between some oil reservoirs. Everything goes fine till start moving > > the model around. From many angles the it just shows black. By > > moving around to another position I can see it again. I'm using a > > plain vtlLightKit which normally works really well for me. Do I have > > to inform it or something else of the change in the scene ? > > > > Paul Tait > > > > PS Wil... Hows my high contrast LUT coming on ? > > > > -- > > No virus found in this outgoing message. > > Checked by AVG Anti-Virus. > > Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: > > 14/02/2005 > > > > > > _______________________________________________ > > 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 > > > > -- > > No virus found in this incoming message. > > Checked by AVG Anti-Virus. > > Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: > > 14/02/2005 > > > > > > -- > > No virus found in this outgoing message. > > Checked by AVG Anti-Virus. > > Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: > > 14/02/2005 > > > > > > _______________________________________________ > > 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 > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005 > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005 > > > -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.1.0 - Release Date: 18/02/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.3.0 - Release Date: 21/02/2005 _______________________________________________ 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 -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.3.0 - Release Date: 21/02/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.3.0 - Release Date: 21/02/2005 From salah at gris.uni-tuebingen.de Tue Feb 22 04:32:49 2005 From: salah at gris.uni-tuebingen.de (salah) Date: Tue, 22 Feb 2005 10:32:49 +0100 Subject: [vtkusers] VTK Marching Cubes Filters / Iso-surfacing filter Message-ID: <4B943954DD289E47958BCEC8C32269BE6D09C8@wsi-server2.gris.uni-tuebingen.de> Hello All, Perhaps my questions are stupid, but I am not a vtk expert! unfortunately not even a good user :) 1. I am wondering if there is a difference between these itk isosurfacing filter? do they all generate triangulated surfaces? Do they all implement the traditional MC algorithm? vtkMarchingContourFilter, vtkKitwareContourFilter, vtkMarchingCubes, vtkImageMarchingCubes 2. Is the filter used in paraview for iso-surfacing (vtkPVKitwareContourFilter) even something different? 3. The output of the vtkImageMarchingCubes filter is a vtkPolyData, right? does not this vtkpolydata have normals informations? 4. I have been using the code segment bellow to generate, visualize, and save iso-surfaces from ITK 3d images. Now, - The surface rendered using this piece of code is properly lit. How could this happen if vertices' normals are not there? - I tried to load the saved vtkpolydata (the ASCII file generated by vtkPolyDataWriter) using paraview. Only a portion of the model is lit fine. Most parts of the model are black! By openning this ascii file using a text editor. I saw that normal information is written as the last part of the file. In short, and if I am missing/misunderstanding something, what is the right sequence to generate, render, and save triangulated iso-surfaces using vtk? I need normals for further processing. Many thanks, Zein // =============================== CODE ============================= // convert to vtk image typedef itk::ImageToVTKImageFilter Itk2VtkType; Itk2VtkType::Pointer m_Itk2Vtk = Itk2VtkType::New(); m_Itk2Vtk->SetInput(inputImage); // m_Reader reads a binary image m_Itk2Vtk->Update(); std::cout << "Image converted to VTK...." << std::endl; // generate iso surface vtkImageMarchingCubes *marcher = vtkImageMarchingCubes::New(); marcher->SetInput(m_Itk2Vtk->GetOutput()); marcher->SetValue(0, 100); marcher->Update(); std::cout << "Marching Cube finished...." << std::endl; vtkDecimate *decimator = vtkDecimate::New(); decimator->SetInput(marcher->GetOutput()); decimator->SetTargetReduction(0.1); decimator->SetMaximumIterations(4); decimator->SetInitialError(0.01); decimator->SetErrorIncrement(0.01); decimator->SetPreserveTopology(1); decimator->Update(); vtkSmoothPolyDataFilter* smoother = vtkSmoothPolyDataFilter::New(); smoother->SetInput(decimator->GetOutput()); smoother->SetNumberOfIterations(5); smoother->SetFeatureAngle(60); smoother->SetRelaxationFactor(0.05); smoother->FeatureEdgeSmoothingOff(); std::cout << "VTK Smoothing mesh finished...." << std::endl; // Save the mesh in an ASCII file char *meshFname = fl_file_chooser("Choose VTK Mesh File", "*.msh*", "d:/datanpr"); vtkPolyDataWriter *vtkwriter = vtkPolyDataWriter::New(); vtkwriter->SetFileName(meshFname); vtkwriter->SetInput(smoother->GetOutput()); vtkwriter->SetFileTypeToASCII(); vtkwriter->Update(); // render 3D model vtkPolyDataMapper* isoMapper = vtkPolyDataMapper::New(); isoMapper->SetInput(marcher->GetOutput()); isoMapper->ScalarVisibilityOff(); vtkActor* actor = vtkActor::New(); actor->SetMapper(isoMapper); actor->GetProperty()->SetDiffuseColor(1,1,0.9412); vtkRenderer* ren = vtkRenderer::New(); vtkRenderWindow* renwin = vtkRenderWindow::New(); vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); renwin->SetSize(500, 500); renwin->AddRenderer( ren ); iren->SetRenderWindow(renwin); ren->SetBackground(0.52, 0.57, 1.0); ren->AddActor(actor); renwin->Render(); iren->Start(); From salah at gris.uni-tuebingen.de Tue Feb 22 04:40:51 2005 From: salah at gris.uni-tuebingen.de (salah) Date: Tue, 22 Feb 2005 10:40:51 +0100 Subject: [vtkusers] WG: VTK Marching Cubes Filters / Iso-surfacing filter Message-ID: <4B943954DD289E47958BCEC8C32269BE6D09C9@wsi-server2.gris.uni-tuebingen.de> Hello, I am trying to post this message to the VTK mailing list since yesterday. The delivery failed many times. Is the server down? or I have some problem? Thanks, Zein > -----Urspr?ngliche Nachricht----- > Von: salah > Gesendet: Dienstag, 22. Februar 2005 10:33 > An: 'vtkusers at vtk.org' > Betreff: VTK Marching Cubes Filters / Iso-surfacing filter > > Hello All, > > Perhaps my questions are stupid, but I am not a vtk expert! unfortunately not even a good user :) > > 1. I am wondering if there is a difference between these itk isosurfacing filter? do they all > generate triangulated surfaces? Do they all implement the traditional MC algorithm? > > vtkMarchingContourFilter, vtkKitwareContourFilter, vtkMarchingCubes, vtkImageMarchingCubes > > 2. Is the filter used in paraview for iso-surfacing (vtkPVKitwareContourFilter) even something different? > > 3. The output of the vtkImageMarchingCubes filter is a vtkPolyData, right? does not this vtkpolydata > have normals informations? > > 4. I have been using the code segment bellow to generate, visualize, and save iso-surfaces from > ITK 3d images. > > Now, > - The surface rendered using this piece of code is properly lit. How could this happen if vertices' > normals are not there? > > - I tried to load the saved vtkpolydata (the ASCII file generated by vtkPolyDataWriter) using > paraview. Only a portion of the model is lit fine. Most parts of the model are black! > By openning this ascii file using a text editor. I saw that normal information is written > as the last part of the file. > > In short, and if I am missing/misunderstanding something, what is the right sequence to generate, render, > and save triangulated iso-surfaces using vtk? I need normals for further processing. > > Many thanks, > > Zein > > > // =============================== CODE ============================= > > // convert to vtk image > typedef itk::ImageToVTKImageFilter Itk2VtkType; > Itk2VtkType::Pointer m_Itk2Vtk = Itk2VtkType::New(); > > m_Itk2Vtk->SetInput(inputImage); // m_Reader reads a binary image > m_Itk2Vtk->Update(); > std::cout << "Image converted to VTK...." << std::endl; > > > > // generate iso surface > vtkImageMarchingCubes *marcher = vtkImageMarchingCubes::New(); > marcher->SetInput(m_Itk2Vtk->GetOutput()); > marcher->SetValue(0, 100); > marcher->Update(); > std::cout << "Marching Cube finished...." << std::endl; > > > vtkDecimate *decimator = vtkDecimate::New(); > decimator->SetInput(marcher->GetOutput()); > decimator->SetTargetReduction(0.1); > decimator->SetMaximumIterations(4); > decimator->SetInitialError(0.01); > decimator->SetErrorIncrement(0.01); > decimator->SetPreserveTopology(1); > decimator->Update(); > > vtkSmoothPolyDataFilter* smoother = vtkSmoothPolyDataFilter::New(); > smoother->SetInput(decimator->GetOutput()); > smoother->SetNumberOfIterations(5); > smoother->SetFeatureAngle(60); > smoother->SetRelaxationFactor(0.05); > smoother->FeatureEdgeSmoothingOff(); > std::cout << "VTK Smoothing mesh finished...." << std::endl; > > > // Save the mesh in an ASCII file > char *meshFname = fl_file_chooser("Choose VTK Mesh File", "*.msh*", "d:/datanpr"); > > vtkPolyDataWriter *vtkwriter = vtkPolyDataWriter::New(); > vtkwriter->SetFileName(meshFname); > vtkwriter->SetInput(smoother->GetOutput()); > vtkwriter->SetFileTypeToASCII(); > vtkwriter->Update(); > > // render 3D model > vtkPolyDataMapper* isoMapper = vtkPolyDataMapper::New(); > isoMapper->SetInput(marcher->GetOutput()); > isoMapper->ScalarVisibilityOff(); > > vtkActor* actor = vtkActor::New(); > actor->SetMapper(isoMapper); > actor->GetProperty()->SetDiffuseColor(1,1,0.9412); > > vtkRenderer* ren = vtkRenderer::New();> > vtkRenderWindow* renwin = vtkRenderWindow::New(); > vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); > > renwin->SetSize(500, 500); > renwin->AddRenderer( ren ); > iren->SetRenderWindow(renwin); > > ren->SetBackground(0.52, 0.57, 1.0); > ren->AddActor(actor); > > renwin->Render(); > iren->Start(); > > From steven.robbins at videotron.ca Tue Feb 22 08:15:15 2005 From: steven.robbins at videotron.ca (Steve M. Robbins) Date: Tue, 22 Feb 2005 08:15:15 -0500 Subject: [vtkusers] WG: VTK Marching Cubes Filters / Iso-surfacing filter In-Reply-To: <4B943954DD289E47958BCEC8C32269BE6D09C9@wsi-server2.gris.uni-tuebingen.de> References: <4B943954DD289E47958BCEC8C32269BE6D09C9@wsi-server2.gris.uni-tuebingen.de> Message-ID: <20050222131515.GJ21051@nyongwa.montreal.qc.ca> On Tue, Feb 22, 2005 at 10:40:51AM +0100, salah wrote: > Hello, > I am trying to post this message to the VTK mailing list since yesterday. The delivery > failed many times. On the contrary -- your post succeeded many times. There's at least five copies of it in the mailing list archives. > Is the server down? Probably you're concerned about the failure message you received. It happens every time I post. I imagine that some subscriber address can no longer be reached. To the list admins: can this be rectified? -Steve From amy.henderson at kitware.com Tue Feb 22 08:32:31 2005 From: amy.henderson at kitware.com (Amy Henderson) Date: Tue, 22 Feb 2005 08:32:31 -0500 Subject: [vtkusers] WG: VTK Marching Cubes Filters / Iso-surfacing filter In-Reply-To: <4B943954DD289E47958BCEC8C32269BE6D09C9@wsi-server2.gris.un i-tuebingen.de> References: <4B943954DD289E47958BCEC8C32269BE6D09C9@wsi-server2.gris.uni-tuebingen.de> Message-ID: <6.2.0.14.2.20050222081543.0402a8e0@pop.biz.rr.com> Your message has appeared now 3 times on the VTK mailing list. The delivery failure e-mail you received is from an e-mail account belonging to someone on the list, not from the list itself. This has been difficult to track down because the address is not actually in the list of subscibers to the VTK users list. Most likely someone on the list is forwarding their mail to an e-mail account that is producing the delivery failure messages. I've provided answers after each of the questions in your e-mail. - Amy At 04:40 AM 2/22/2005, salah wrote: >Hello, >I am trying to post this message to the VTK mailing list since yesterday. >The delivery >failed many times. Is the server down? or I have some problem? >Thanks, >Zein > > > -----Urspr?ngliche Nachricht----- > > Von: salah > > Gesendet: Dienstag, 22. Februar 2005 10:33 > > An: 'vtkusers at vtk.org' > > Betreff: VTK Marching Cubes Filters / Iso-surfacing filter > > > > Hello All, > > > > Perhaps my questions are stupid, but I am not a vtk expert! > unfortunately not even a good user :) > > > > 1. I am wondering if there is a difference between these itk > isosurfacing filter? do they all > > generate triangulated surfaces? Do they all implement the > traditional MC algorithm? > > > > vtkMarchingContourFilter, vtkKitwareContourFilter, vtkMarchingCubes, > vtkImageMarchingCubes They all generate triangulated surfaces, but they do not all implement the marching cubes algorithm. vtkMarchingContourFilter uses vtkMarchingSquares and vtkMarchingCubes if the input is of type vtkImageData (or vtkStructuredPoints, an empty subclass of vtkImageData); for all other data set types, it uses vtkContourFilter. vtkKitwareContourFilter uses various types of the synchronized templates algorithm depending on the input data set type (image data, structured grid, or rectilinear grid); for other data set types, vtkContourFilter is used. vtkMarchingCubes and vtkImageMarchingCubes implement varieties of the marching cubes algorithm. > > > > 2. Is the filter used in paraview for iso-surfacing > (vtkPVKitwareContourFilter) even something different? vtkPVKitwareContourFilter is a subclass of vtkKitwareContourFilter. The only benefit it adds is allowing you to select which scalar array to contour on. > > > > 3. The output of the vtkImageMarchingCubes filter is a vtkPolyData, > right? does not this vtkpolydata > > have normals informations? The output will have normals information if ComputeNormals is set to 1. This is its default value. > > > > 4. I have been using the code segment bellow to generate, visualize, > and save iso-surfaces from > > ITK 3d images. > > > > Now, > > - The surface rendered using this piece of code is properly lit. > How could this happen if vertices' > > normals are not there? > > > > - I tried to load the saved vtkpolydata (the ASCII file > generated by vtkPolyDataWriter) using > > paraview. Only a portion of the model is lit fine. Most parts > of the model are black! > > By openning this ascii file using a text editor. I saw that > normal information is written > > as the last part of the file. > > > > In short, and if I am missing/misunderstanding something, what is the > right sequence to generate, render, > > and save triangulated iso-surfaces using vtk? I need normals for > further processing. > > > > Many thanks, > > > > Zein > > > > > > // =============================== CODE ============================= > > > > // convert to vtk image > > typedef itk::ImageToVTKImageFilter Itk2VtkType; > > Itk2VtkType::Pointer m_Itk2Vtk = Itk2VtkType::New(); > > > > m_Itk2Vtk->SetInput(inputImage); // m_Reader reads a binary image > > m_Itk2Vtk->Update(); > > std::cout << "Image converted to VTK...." << std::endl; > > > > > > > > // generate iso surface > > vtkImageMarchingCubes *marcher = vtkImageMarchingCubes::New(); > > marcher->SetInput(m_Itk2Vtk->GetOutput()); > > marcher->SetValue(0, 100); > > marcher->Update(); > > std::cout << "Marching Cube finished...." << std::endl; > > > > > > vtkDecimate *decimator = vtkDecimate::New(); > > decimator->SetInput(marcher->GetOutput()); > > decimator->SetTargetReduction(0.1); > > decimator->SetMaximumIterations(4); > > decimator->SetInitialError(0.01); > > decimator->SetErrorIncrement(0.01); > > decimator->SetPreserveTopology(1); > > decimator->Update(); > > > > vtkSmoothPolyDataFilter* smoother = vtkSmoothPolyDataFilter::New(); > > smoother->SetInput(decimator->GetOutput()); > > smoother->SetNumberOfIterations(5); > > smoother->SetFeatureAngle(60); > > smoother->SetRelaxationFactor(0.05); > > smoother->FeatureEdgeSmoothingOff(); > > std::cout << "VTK Smoothing mesh finished...." << std::endl; > > > > > > // Save the mesh in an ASCII file > > char *meshFname = fl_file_chooser("Choose VTK Mesh File", > "*.msh*", "d:/datanpr"); > > > > vtkPolyDataWriter *vtkwriter = vtkPolyDataWriter::New(); > > vtkwriter->SetFileName(meshFname); > > vtkwriter->SetInput(smoother->GetOutput()); > > vtkwriter->SetFileTypeToASCII(); > > vtkwriter->Update(); > > > > // render 3D model > > vtkPolyDataMapper* isoMapper = vtkPolyDataMapper::New(); > > isoMapper->SetInput(marcher->GetOutput()); > > isoMapper->ScalarVisibilityOff(); > > > > vtkActor* actor = vtkActor::New(); > > actor->SetMapper(isoMapper); > > actor->GetProperty()->SetDiffuseColor(1,1,0.9412); > > > > vtkRenderer* ren = vtkRenderer::New();> > > vtkRenderWindow* renwin = vtkRenderWindow::New(); > > vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New(); > > > > renwin->SetSize(500, 500); > > renwin->AddRenderer( ren ); > > iren->SetRenderWindow(renwin); > > > > ren->SetBackground(0.52, 0.57, 1.0); > > ren->AddActor(actor); > > > > renwin->Render(); > > iren->Start(); > > > > >_______________________________________________ >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 From psk1 at student.cs.ucc.ie Tue Feb 22 09:12:07 2005 From: psk1 at student.cs.ucc.ie (psk1) Date: Tue, 22 Feb 2005 14:12:07 +0000 Subject: [vtkusers] How to animate textures? Message-ID: <421C1FA8@webmail.ucc.ie> Hi all, What is the best way to animate textures? I need to do videotexturing somewhow, and as far as I know it cannot be done directly. I presume it can only be done by animating individual frames as a texture map? Regards, Pasi Kettunen From Rob.VanTol at wtcm.be Tue Feb 22 09:25:50 2005 From: Rob.VanTol at wtcm.be (Rob van Tol) Date: Tue, 22 Feb 2005 15:25:50 +0100 Subject: [vtkusers] Converting Rectilinear To Unstructured Message-ID: <5.2.1.1.0.20050222150206.04be4130@server02.site02.wtcm.be> Dear vtkusers, Does anybody know an easy way to convert a vtkRectilinearGrid to a vtkUnstructuredGrid on a basis of scalar cell data? For instance remove the mesh cells with a scalar smaller than a certain value, and save the remaining mesh cells as an vtkUnstructuredGrid. Will it also be possible to eliminate the grid points that are unused ? Or do I alternatively have to write a new vtk class to perform this action? All suggestions will be appreciated. Kind regards, ROB dr. R. van Tol ( WTCM - CRIF ) Computer Simulations and Foundry Processes tel: 09 2645704 - gsm: 0498 919373 mailto:rob.vantol at wtcm.be WTCM-CRIF Belgian Center of the Technological Industry Technologiepark 915, B-9052 Gent-Zwijnaarde tel: 09 264 5697 - fax: 09 2645848 http://www.wtcm.be WTCM-CRIF "Your Gateway To Innovation". Have a look at the future of materials and manufacturing technology http://techniline.wtcm.be -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.alizier-ausy at irsn.fr Tue Feb 22 09:30:57 2005 From: julien.alizier-ausy at irsn.fr (ALIZIER Julien AUSY) Date: Tue, 22 Feb 2005 15:30:57 +0100 Subject: [vtkusers] Converting Rectilinear To Unstructured Message-ID: <4EB6E1738CC2E940BAD2EFBFBF5A38F102B2BF5A@OREADE.ipsn.fr> Hi Rob, Try vtkThreshold. Regards -- Julien -----Message d'origine----- De : Rob van Tol [mailto:Rob.VanTol at wtcm.be] Envoy? : mardi 22 f?vrier 2005 15:26 ? : vtkusers at vtk.org Objet : [vtkusers] Converting Rectilinear To Unstructured Dear vtkusers, Does anybody know an easy way to convert a vtkRectilinearGrid to a vtkUnstructuredGrid on a basis of scalar cell data? For instance remove the mesh cells with a scalar smaller than a certain value, and save the remaining mesh cells as an vtkUnstructuredGrid. Will it also be possible to eliminate the grid points that are unused ? Or do I alternatively have to write a new vtk class to perform this action? All suggestions will be appreciated. Kind regards, ROB dr. R. van Tol ( WTCM - CRIF ) Computer Simulations and Foundry Processes tel: 09 2645704 - gsm: 0498 919373 mailto:rob.vantol at wtcm.be WTCM-CRIF Belgian Center of the Technological Industry Technologiepark 915, B-9052 Gent-Zwijnaarde tel: 09 264 5697 - fax: 09 2645848 http://www.wtcm.be WTCM-CRIF "Your Gateway To Innovation". Have a look at the future of materials and manufacturing technology http://techniline.wtcm.be From dean.inglis at camris.ca Tue Feb 22 10:21:53 2005 From: dean.inglis at camris.ca (Dean Inglis) Date: Tue, 22 Feb 2005 10:21:53 -0500 Subject: [vtkusers] Re: vtkImagePlaneWidgets texture update Message-ID: Hi Stefan, One solution is to force the renderer with the face on view ipw to reset its camera position (ResetCamera) using a callback tied to the 3D ipw's in the one main renderer. This should force the face on view ipw to be centered in the renderer's viewport after every chnage in spatial position. The other solution is to not use 3 more ipw's: use an vtkImageActor for each of the individual slice face on views (see Hybrid/Testing/Cxx/TestImagePlaneWidget.cxx). Dean From Modjtabavi at rz.rwth-aachen.de Tue Feb 22 10:58:58 2005 From: Modjtabavi at rz.rwth-aachen.de (Babak Modjtabavi) Date: Tue, 22 Feb 2005 16:58:58 +0100 Subject: [vtkusers] vtkGenericEnSightReader Message-ID: <001e01c518f7$6b365a00$c1468286@win.rz.rwthaachen.de> Hi everybody, I have an EnSight case file (with other associated .geo and .var files) which I'm trying to read into a "vtkDataSet". I haven't been able to figure out how to gain access to the output file of the "vtkGenericEnSightReader"., Here is my attempt: ************************************************ . . . vtkGenericEnSightReader * reader = vtkGenericEnSightReader::New(); reader->SetFilePath("C:/....."); reader->SetCaseFileName("out.case"); reader->SetTimeValue(.000300); reader->ReadAllVariablesOn(); reader->Update(); cout << reader->GetNumberOfVariables() << endl; cout << reader->GetDescription(0) << endl; cout << reader->GetDescription(1) << endl; cout << reader->GetDescription(2) << endl; cout << reader->GetDescription(3) << endl << endl; cout << reader->GetVariableType(0) << endl; cout << reader->GetVariableType(1) << endl; cout << reader->GetVariableType(2) << endl; cout << reader->GetVariableType(3) << endl << endl; cout << reader->GetNumberOfPointArrays() << endl << endl; cout << reader->GetNumberOfOutputs() << endl << endl; vtkDataSet * data = reader->GetOutput(); . . ************************************************ It is simply not working! When I check the vtkDataset, I find that its contains nothing and there is no output! Has anyone experienced this before and have any comments and Ideas around this? workaround? Any helpful comments are Welcome -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan.maas at fh-gelsenkirchen.de Tue Feb 22 11:30:03 2005 From: stefan.maas at fh-gelsenkirchen.de (Stefan Maas) Date: Tue, 22 Feb 2005 17:30:03 +0100 Subject: [vtkusers] Re: Re: vtkImagePlaneWidgets texture update In-Reply-To: <20050222155954.9120D345C2@public.kitware.com> Message-ID: <000301c518fb$c3216210$2fe6a8c0@maas2> Hi Dean, resetting the camera doesn't help. This is not the problem, because the single ipw is in a face up position - all the time. And the mouse-click shows me the correct position and value on the single plane. But the texture seems to be...no...is(!) not on the correct position over the underlying values. So I thought the problem belongs to the extent of the ipw and the textureplane. But I printed out the values and they are equal to the corresponding values on the 3D-ipw. On the 3D-ipw the texture is shown correctly - on the 2D-ipw not. Sure, a vtkimageactor could be a solution...but this is not what I want to do...only if there is no other solution. Am I the only one who use ipw's in that way? Thanks for your suggestions! Stefan > > Hi Stefan, > > One solution is to force the renderer > with the face on view ipw to reset > its camera position (ResetCamera) > using a callback tied to the 3D ipw's in the > one main renderer. This should force the > face on view ipw to be centered in the renderer's > viewport after every chnage in spatial position. > The other solution is to not use 3 more ipw's: > use an vtkImageActor for each of the individual slice > face on views > (see Hybrid/Testing/Cxx/TestImagePlaneWidget.cxx). > > Dean From brilligent at gmail.com Tue Feb 22 11:57:43 2005 From: brilligent at gmail.com (Doug Henry) Date: Tue, 22 Feb 2005 11:57:43 -0500 Subject: [vtkusers] Simple plot question Message-ID: <66f59a45050222085757871fd7@mail.gmail.com> This is hopefully an easy "newbie" type question. I was looking at making a simple xy-plot as a way to figure out the basics of vtk (I'm going to wait for my VTK textbook to arrive before diving in with both feet). I have worked through the cone tutorials and created my own interactor for my toolkit, so I have some familiarity with the vtk toolkit. Looking at the xyPlot tcl example, it is not obvious to me how data is presented to xyplot. I was hoping someone could give me a starting point by explaining how I would simply plot two columns of numbers against each other. This should give me a simple example of how this data is mapped, and hopefully help me to better understand the probe stuff in the tcl example. Thanks for any help, Doug From kalpaha at st.jyu.fi Tue Feb 22 12:26:08 2005 From: kalpaha at st.jyu.fi (Kalle Pahajoki) Date: Tue, 22 Feb 2005 19:26:08 +0200 Subject: [vtkusers] wxVTKRenderWindowInteractor inside wxNotebook crashes Message-ID: <421B6B30.7060804@st.jyu.fi> Hi First of all, I am using Mandrake Linux 10.1 with Nvidia TNT2 and NVidia's drivers, wxPython 2.5.3.1 and VTK 4.4 and vtk.wx.wxVTKRenderWindowInteractor that comes with it. I tried to include a wxVTKRenderWindowInteractor (RWI from now on) inside a wxNotebook, so that the RWI was contained in a wxPanel that was a page in the notebook (it was a bit more complicated, but the problem reduced to this when I tried to simplified the code). The code would just crash If I ran it. The error messages are generally of the form: The program 'xxx.py' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 7 error_code 3 request_code 2 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) A further detail is that when I tried to run the program using the --sync switch, it would then run without crashing. I then found a simple example that worked, that had the RWI as the wxNotebook page itself. I tried to modify the example to have the RWI inside a panel, and it then crashed similiarly. The attached example works, but to get it to crash one will only need to add a line p=wxPanel(self,-1) and change the line wxVTK = wxVTKRenderWindowInteractor(nb, -1) to have p as RWI's parent: wxVTK = wxVTKRenderWindowInteractor(p, -1) and then change the code from: nb.AddPage(wxVTK, "wxVTK") to add p as the page: nb.AddPage(p, "wxVTK") Is there a way to get the RWI contained in a wxPanel working as a wxNotebook page? Kalle Pahajoki <-- Example of RWI inside wxNotebook, works --> import sys from wxPython.wx import * from vtk import * from vtk.wx.wxVTKRenderWindowInteractor import * class MainFrame(wxFrame): def __init__(self, parent=None): wxFrame.__init__(self, parent, -1, "test", size = (400, 400)) nb = wxNotebook(self, -1) # First page is empty just to postpone wxVTKRenderWindow nb.AddPage(wxWindow(nb, -1), "splash") wxVTK = wxVTKRenderWindowInteractor(nb, -1) ren = vtkRenderer () wxVTK.GetRenderWindow ().AddRenderer (ren) nb.AddPage(wxVTK, "wxVTK") nb.Refresh() # Some other actors are added lately... Mapper = vtkPolyDataMapper() Plane = vtkPlaneSource() #Comment out the following line and it will work #Mapper.SetInput(Plane.GetOutput()) Actor = vtkActor() Actor.SetMapper(Mapper) ren.AddActor(Actor) class MyApp(wxApp): def OnInit(self): frame = MainFrame() frame.Show(true) self.SetTopWindow(frame) wxYield() return true main = MyApp(0) main.MainLoop() From a.h.al-khalifah at reading.ac.uk Tue Feb 22 12:54:05 2005 From: a.h.al-khalifah at reading.ac.uk (a.h.al-khalifah at reading.ac.uk) Date: Tue, 22 Feb 2005 17:54:05 -0000 Subject: [vtkusers] VTK on IRIX Message-ID: Dear all I am trying to run VTK example from "/VTK-4.2.2/Examples/Medical/Cxx", but when I run "Medical1" for example, I get this message ... "7670:./Medical1: rld: Error: unresolvable symbol in /home/cave/devel/VTK-4.2.2/bin/libvtkexpat 7670:./Medical1: rld: Fatal Error: this executable has unresolvable symbols". I am runnin VTK on IRIX 6.5, Any sugessions please. Your help is highly appreciated. Ali From a.h.al-khalifah at reading.ac.uk Tue Feb 22 13:04:08 2005 From: a.h.al-khalifah at reading.ac.uk (a.h.al-khalifah at reading.ac.uk) Date: Tue, 22 Feb 2005 18:04:08 -0000 Subject: [vtkusers] VTK on IRIX 6.5 In-Reply-To: <20050219225911.59443.qmail@web13811.mail.yahoo.com> Message-ID: Dear all I am trying to run VTK example from "/VTK-4.2.2/Examples/Medical/Cxx", but when I run "Medical1" for example, I get this message ... "7670:./Medical1: rld: Error: unresolvable symbol in /home/cave/devel/VTK-4.2.2/bin/libvtkexpat 7670:./Medical1: rld: Fatal Error: this executable has unresolvable symbols". I am runnin VTK on IRIX 6.5, Any sugessions please. Your help is highly appreciated. Ali From a.h.al-khalifah at reading.ac.uk Tue Feb 22 13:04:17 2005 From: a.h.al-khalifah at reading.ac.uk (a.h.al-khalifah at reading.ac.uk) Date: Tue, 22 Feb 2005 18:04:17 -0000 Subject: [vtkusers] VTK on IRIX 6.5 In-Reply-To: <20050219225911.59443.qmail@web13811.mail.yahoo.com> Message-ID: Dear all I am trying to run VTK example from "/VTK-4.2.2/Examples/Medical/Cxx", but when I run "Medical1" for example, I get this message ... "7670:./Medical1: rld: Error: unresolvable symbol in /home/cave/devel/VTK-4.2.2/bin/libvtkexpat 7670:./Medical1: rld: Fatal Error: this executable has unresolvable symbols". I am runnin VTK on IRIX 6.5, Any sugessions please. Your help is highly appreciated. Ali From dean.inglis at camris.ca Tue Feb 22 13:44:45 2005 From: dean.inglis at camris.ca (dean.inglis at camris.ca) Date: Tue, 22 Feb 2005 13:44:45 -0500 Subject: [vtkusers] Re: vtkImagePlaneWidgets texture update Message-ID: <20050222184445.ZEEL1842.tomts8-srv.bellnexxia.net@mxmta.bellnexxia.net> Stefan, can you post code, tcl or cxx, that shows the problem (using data from VTKData)? I'm not clear on how you connect/relate the 2D ipw to the corresponding 3D ipw. Dean From lisa.avila at kitware.com Tue Feb 22 13:50:52 2005 From: lisa.avila at kitware.com (Lisa Avila) Date: Tue, 22 Feb 2005 13:50:52 -0500 Subject: [vtkusers] About Volume Rendering in VTK In-Reply-To: <9f83649305021615332374b20@mail.gmail.com> References: <9f83649305021615332374b20@mail.gmail.com> Message-ID: <6.2.0.14.2.20050222134432.04e56e58@pop.biz.rr.com> Hello Juan, The vtkUnstructuredGridVolumeRayCastMapper works on the scalars in your data - either point data or cell data or you can point it to some field data. These are the methods you need to look at: // Description: // Control how the filter works with scalar point data and cell attribute // data. By default (ScalarModeToDefault), the filter will use point data, // and if no point data is available, then cell data is used. Alternatively // you can explicitly set the filter to use point data // (ScalarModeToUsePointData) or cell data (ScalarModeToUseCellData). // You can also choose to get the scalars from an array in point field // data (ScalarModeToUsePointFieldData) or cell field data // (ScalarModeToUseCellFieldData). If scalars are coming from a field // data array, you must call SelectColorArray before you call // GetColors. vtkSetMacro(ScalarMode,int); vtkGetMacro(ScalarMode,int); void SetScalarModeToDefault() { this->SetScalarMode(VTK_SCALAR_MODE_DEFAULT);}; void SetScalarModeToUsePointData() { this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_DATA);}; void SetScalarModeToUseCellData() { this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_DATA);}; void SetScalarModeToUsePointFieldData() { this->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);}; void SetScalarModeToUseCellFieldData() { this->SetScalarMode(VTK_SCALAR_MODE_USE_CELL_FIELD_DATA);}; // Description: // When ScalarMode is set to UsePointFileData or UseCellFieldData, // you can specify which array to use for coloring using these methods. // The transfer function in the vtkVolumeProperty (attached to the calling // vtkVolume) will decide how to convert vectors to colors. virtual void SelectScalarArray(int arrayNum); virtual void SelectScalarArray(const char* arrayName); // Description: // Get the array name or number and component to color by. virtual char* GetArrayName() { return this->ArrayName; } virtual int GetArrayId() { return this->ArrayId; } virtual int GetArrayAccessMode() { return this->ArrayAccessMode; } // Description: // Return the method for obtaining scalar data. const char *GetScalarModeAsString(); Lisa At 06:33 PM 2/16/2005, Juan Jos? Aja Fern?ndez wrote: >Hi. >I've posted a couple of questions about volume rendering, but I guess >they were too generic so I'm going to make it simple. > >I want to volume render an unstructured grid, so I guess I should use >vtkUnstructuredGridVolumeRayCastFunction and Mapper. >What I want to know is: What do I need to do this? > >I gues I will need a couple of points and voxels to define the grid. >What else? Point Data or Cell Data? > >What I'm trying to say is: How does vtk does the volume rendering in >unstructured grids? Does it work on the scalars of the grid?, or does >it work on the point/cell Data?. > > >Thanks in advance. > >Juan. >_______________________________________________ >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 From brilligent at gmail.com Tue Feb 22 14:13:53 2005 From: brilligent at gmail.com (Doug Henry) Date: Tue, 22 Feb 2005 14:13:53 -0500 Subject: [vtkusers] test Message-ID: <66f59a450502221113241b03b2@mail.gmail.com> email keeps bouncing test, please ignore From brilligent at gmail.com Tue Feb 22 14:35:00 2005 From: brilligent at gmail.com (Doug Henry) Date: Tue, 22 Feb 2005 14:35:00 -0500 Subject: [vtkusers] Email problems Message-ID: <66f59a4505022211354d9cad1c@mail.gmail.com> I someone in charge of this list receives this message, I was wondering if you could look in to what is causing my emails to bounce back. Does the list have a problem with gmail? Thanks. From amy.henderson at kitware.com Tue Feb 22 14:43:09 2005 From: amy.henderson at kitware.com (Amy Henderson) Date: Tue, 22 Feb 2005 14:43:09 -0500 Subject: [vtkusers] Email problems In-Reply-To: <6.2.0.14.2.20050222081543.0402a8e0@pop.biz.rr.com> References: <4B943954DD289E47958BCEC8C32269BE6D09C9@wsi-server2.gris.uni-tuebingen.de> <6.2.0.14.2.20050222081543.0402a8e0@pop.biz.rr.com> Message-ID: <6.2.0.14.2.20050222144126.0406ea10@pop.biz.rr.com> I sent the following response earlier today to someone asking this same question. No, the problem is not gmail-specific. - Amy At 08:32 AM 2/22/2005, Amy Henderson wrote: >Your message has appeared now 3 times on the VTK mailing list. The >delivery failure e-mail you received is from an e-mail account belonging >to someone on the list, not from the list itself. This has been difficult >to track down because the address is not actually in the list of >subscibers to the VTK users list. Most likely someone on the list is >forwarding their mail to an e-mail account that is producing the delivery >failure messages. At 02:35 PM 2/22/2005, you wrote: >I someone in charge of this list receives this message, I was >wondering if you could look in to what is causing my emails to bounce >back. Does the list have a problem with gmail? > >Thanks. >_______________________________________________ >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 From brilligent at gmail.com Tue Feb 22 14:56:10 2005 From: brilligent at gmail.com (Doug Henry) Date: Tue, 22 Feb 2005 14:56:10 -0500 Subject: [vtkusers] Email problems In-Reply-To: <6.2.0.14.2.20050222144126.0406ea10@pop.biz.rr.com> References: <4B943954DD289E47958BCEC8C32269BE6D09C9@wsi-server2.gris.uni-tuebingen.de> <6.2.0.14.2.20050222081543.0402a8e0@pop.biz.rr.com> <6.2.0.14.2.20050222144126.0406ea10@pop.biz.rr.com> Message-ID: <66f59a450502221156494867e5@mail.gmail.com> thanks for the response, I will ignore the bounce messages. On Tue, 22 Feb 2005 14:43:09 -0500, Amy Henderson wrote: > I sent the following response earlier today to someone asking this same > question. No, the problem is not gmail-specific. > - Amy > > At 08:32 AM 2/22/2005, Amy Henderson wrote: > >Your message has appeared now 3 times on the VTK mailing list. The > >delivery failure e-mail you received is from an e-mail account belonging > >to someone on the list, not from the list itself. This has been difficult > >to track down because the address is not actually in the list of > >subscibers to the VTK users list. Most likely someone on the list is > >forwarding their mail to an e-mail account that is producing the delivery > >failure messages. > > At 02:35 PM 2/22/2005, you wrote: > >I someone in charge of this list receives this message, I was > >wondering if you could look in to what is causing my emails to bounce > >back. Does the list have a problem with gmail? > > > >Thanks. > >_______________________________________________ > >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 > From dean.inglis at camris.ca Tue Feb 22 15:39:53 2005 From: dean.inglis at camris.ca (dean.inglis at camris.ca) Date: Tue, 22 Feb 2005 15:39:53 -0500 Subject: [vtkusers] Re: vtkImagePlaneWidgets texture update Message-ID: <20050222203953.YEKA1796.tomts6-srv.bellnexxia.net@mxmta.bellnexxia.net> Stefan, I was tinkering a bit and came up with this tcl demo. For your purposes, you will likely want to control the camera in the 2nd (follower window) differently. good luck, Dean #------------------------------------------- package require vtk package require vtkinteraction vtkVolume16Reader v16 v16 SetDataDimensions 64 64 v16 SetDataByteOrderToLittleEndian v16 SetFilePrefix "$VTK_DATA_ROOT/Data/headsq/quarter" v16 SetImageRange 1 93 v16 SetDataSpacing 3.2 3.2 1.5 v16 Update # An outline is shown for context. # vtkOutlineFilter outline outline SetInput [v16 GetOutput] vtkPolyDataMapper outlineMapper outlineMapper SetInput [outline GetOutput] vtkActor outlineActor outlineActor SetMapper outlineMapper # create two image plane widgets: one to lead, one to follow # vtkImagePlaneWidget ipw ipw DisplayTextOn ipw SetInput [v16 GetOutput] ipw SetPlaneOrientationToXAxes ipw SetSliceIndex 32 set prop1 [ipw GetPlaneProperty] $prop1 SetColor 1 0 0 vtkImagePlaneWidget ipw2 ipw2 DisplayTextOn ipw2 SetInput [v16 GetOutput] ipw2 SetPlaneOrientationToXAxes ipw2 SetSliceIndex 32 set prop2 [ipw2 GetPlaneProperty] $prop2 SetColor 1 0 0 # share window level # ipw2 SetLookupTable [ipw GetLookupTable] vtkRenderWindowInteractor iren vtkInteractorStyleTrackballCamera style iren SetInteractorStyle style ipw SetInteractor iren ipw2 SetInteractor iren # Create the RenderWindow and Renderer # vtkRenderer ren1 ren1 SetViewport 0 0 0.5 1 ren1 SetBackground 0.2 0.2 0.6 vtkRenderer ren2 ren2 SetViewport 0.5 0 1 1 ren2 SetBackground 0.1 0.5 0.6 vtkRenderWindow renWin renWin AddRenderer ren1 renWin AddRenderer ren2 iren SetRenderWindow renWin ren1 AddActor outlineActor ipw SetDefaultRenderer ren1 ipw SetCurrentRenderer ren1 ipw On ipw2 SetDefaultRenderer ren2 ipw2 SetCurrentRenderer ren2 ipw2 On # trick to stop 2nd widget from pushing # ipw2 SetLeftButtonAction 0 ipw2 SetMiddleButtonAction 0 ipw2 SetRightButtonAction 2 # control the position of 2nd widget based on first + some camera tricks # ipw AddObserver InteractionEvent Update # Add the outline actor to the renderer, set the background color and size # ren1 AddActor outlineActor renWin SetSize 800 400 renWin Render set cam1 [ren1 GetActiveCamera] $cam1 Azimuth 90 $cam1 Roll 90 set cam2 [ren2 GetActiveCamera] $cam2 Azimuth 90 $cam2 Roll 90 ipw InvokeEvent InterctionEvent # render the image # iren AddObserver UserEvent {wm deiconify .vtkInteract} iren Initialize # prevent the tk window from showing up then start the event loop wm withdraw . proc Update { } { scan [ipw GetOrigin] "%f %f %f" \ ox oy oz scan [ipw GetPoint1] "%f %f %f" \ p1x p1y p1z scan [ipw GetPoint2] "%f %f %f" \ p2x p2y p2z set ax [expr $p1x - $ox] set ay [expr $p1y - $oy] set az [expr $p1z - $oz] set bx [expr $p2x - $ox] set by [expr $p2y - $oy] set bz [expr $p2z - $oz] set nx [expr $ay*$bz - $az*$by] set ny [expr $az*$bx - $ax*$bz] set nz [expr $ax*$by - $ay*$bx] set n [expr sqrt($nx*$nx + $ny*$ny + $nz*$nz)] set nx [expr $nx/$n] set ny [expr $ny/$n] set nz [expr $nz/$n] ipw2 SetOrigin $ox $oy $oz ipw2 SetPoint1 $p1x $p1y $p1z ipw2 SetPoint2 $p2x $p2y $p2z ipw2 UpdatePlacement set vx [expr $ox - $p2x] set vy [expr $oy - $p2y] set vz [expr $oz - $p2z] set fx [expr $p2x*0.5 + $p1x*0.5] set fy [expr $p2y*0.5 + $p1y*0.5] set fz [expr $p2z*0.5 + $p1z*0.5] set camera [ ren2 GetActiveCamera ] set d [$camera GetDistance] set px [expr $fx + $d*$nx] set py [expr $fy + $d*$ny] set pz [expr $fz + $d*$nz] $camera SetViewUp $vx $vy $vz $camera SetFocalPoint $fx $fy $fz $camera SetPosition $px $py $pz $camera OrthogonalizeViewUp ren2 ResetCamera } From randall.hand at gmail.com Tue Feb 22 16:20:12 2005 From: randall.hand at gmail.com (Randall Hand) Date: Tue, 22 Feb 2005 15:20:12 -0600 Subject: [vtkusers] Fwd: Volume Rendering with multiple-array data In-Reply-To: References: Message-ID: Still looking for any help with this... I've gotten it to work witht he vtkVolumeTextureMapper2D just fine, but simply replacing that with the vtkVolumeRayCastMapper calls results in all kinds of weird behaviour. Sometimes it exits with a segfault/core dump, but no error. Sometimes it runs to completion, but the volume rendering doesn't work (I get the text & outline, but no data). Most commonly I get anywhere from 1 to 3 messages like this: ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/Filtering/vtkExecutive.cxx, line 519 vtkStreamingDemandDrivenPipeline (0x1d6038d0): Non-forwarded requests are not yet implemented. And sometimes I get garbage like this: (looks like multiple errors interlaced) ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/FiltEEeRRrRRiOOnRRg::/ vIItnnk E//xvveiiczzu//thhioovmmeee.//crrxhhxaa,nn ddl//issnrrecc //5ee1zz9VV iivzzt//kUUStttiirlleiiattmiiieenssg//DVVeTTmKKa//nFFdiiDllrttieevrreiinnnPggi//pvvettlkkiEEnxxeee cc(uu0ttxii1vv0ee9..7cc1xxdxxb,,8 )ll:ii nnNeeo n55-11f99o (truncated by me, you get the point) The messages seem to occur after the ->Render() call, and during the part where I write it to disk. (with a vtkTIFFWriter). Sometimes it segfaults right after the error messages, and sometimes it just hangs indefinately. Once or twice it's even run to completion after the error messages, but the Volume Rendering never appears. I'm using OffScreen rendering with MangledMesa. Please? Anyone? ---------- Forwarded message ---------- From: Randall Hand Date: Wed, 16 Feb 2005 11:29:16 -0600 Subject: Volume Rendering with multiple-array data To: vtkusers at vtk.org I have a VTK Dataset with with multiple data values per point. Each data point in my rectilinear grid has both a scalar (fractional occupancy) and a vector (flow velocity). I want to generate a volume rendering from this dataset of the scalar field, using the RayCast volume code. How do I get from the vtkDataSet that vtkDataSetReader outputs, to the vtkImageData that the volume rendering routines want? Currently I'm using a GaussianSPlatter to convert to an imageData, & a vtkImageShiftScale to convert from the 0-1float to a 0-255unsigned char. Here's an exerpt from my code: ***BEGIN*** // Load model vtkDataSetReader *model = vtkDataSetReader::New(); model->SetFileName(filename); model->Update(); printf("File loaded\n"); model->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); printf("* Range: %f - %f\n", range[0], range[1]); vtkMaskPoints *mask = vtkMaskPoints::New(); mask->SetInput(model->GetOutput()); mask->RandomModeOn(); mask->SetMaximumNumberOfPoints(10); mask->Update(); printf("Data Masked\n"); mask->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); printf("* Range: %f - %f\n", range[0], range[1]); vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); filter->SetNullValue(0.0); filter->SetInput(mask->GetOutput()); filter->Update(); printf("Filter ran\n"); vtkImageShiftScale *scaled = vtkImageShiftScale::New(); scaled->SetInput(filter->GetOutput()); scaled->SetScale(255.0); scaled->SetOutputScalarTypeToUnsignedChar(); scaled->Update(); printf("Data Scaled ran\n"); printf("* Scaled data arrays:\n"); vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); for(n=0; n< dataptr->GetNumberOfArrays(); n++) { printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); } scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); printf("* Range: %f - %f\n", range[0], range[1]); vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); filter->SetNullValue(0.0); filter->SetInput(mask->GetOutput()); filter->Update(); printf("Filter ran\n"); vtkImageShiftScale *scaled = vtkImageShiftScale::New(); scaled->SetInput(filter->GetOutput()); scaled->SetScale(255.0); scaled->SetOutputScalarTypeToUnsignedChar(); scaled->Update(); printf("Data Scaled ran\n"); printf("* Scaled data arrays:\n"); vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); for(n=0; n< dataptr->GetNumberOfArrays(); n++) { printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); } scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); printf("* Range: %f - %f\n", range[0], range[1]); vtkVolumeRayCastCompositeFunction *compFunc = vtkVolumeRayCastCompositeFunction::New(); compFunc->SetCompositeMethodToInterpolateFirst(); vtkPiecewiseFunction *xf_Opacity = vtkPiecewiseFunction::New(); xf_Opacity->AddPoint(0,0.0); xf_Opacity->AddPoint(255,1.0); vtkColorTransferFunction *xf_Color = vtkColorTransferFunction::New(); xf_Color->AddRGBPoint(0, 0, 0, 1); xf_Color->AddRGBPoint(255, 0, 0, 1); vtkVolumeProperty *volProp = vtkVolumeProperty::New(); volProp->SetColor(xf_Color); volProp->SetScalarOpacity(xf_Opacity); volProp->SetInterpolationTypeToLinear(); modelMapper = vtkVolumeRayCastMapper::New(); modelMapper->SetInput(scaled->GetOutput()); modelMapper->SetVolumeRayCastFunction(compFunc); // modelMapper->Update(); printf("Mapper updated\n"); vtkVolume *volume = vtkVolume::New(); volume->SetMapper(modelMapper); volume->SetProperty(volProp); ***END*** When I run this, tho, I get the following output: =============== BEGIN OUTPUT ============== Loading file test.vtk... File loaded * Range: 0.000000 - 1.000000 Data Masked * Range: 0.000000 - 1.000000 Filter ran Data Scaled ran * Scaled data arrays: * [0] "(null)" * Range: 0.000000 - 253.000000 Mapper updated ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/Filtering/vtkExecutive.cxx, line 519 vtkStreamingDemandDrivenPipeline (0x109843b8): Non-forwarded requests are not yet implemented. Segmentation fault (core dumped) ================ END OUTPUT ============ Any ideas? -- Randall Hand http://www.yeraze.com -- Randall Hand http://www.yeraze.com From Grace.Chen at swri.ca Tue Feb 22 16:50:32 2005 From: Grace.Chen at swri.ca (Grace Chen) Date: Tue, 22 Feb 2005 16:50:32 -0500 Subject: [vtkusers] append two vtkImageData with different extent? Message-ID: <004901c51928$887607b0$291e4c8e@WSG39Grace> Hi there, I have been a faithful user of VTK for the past year. But lately, I ran into this problem I cannot solve, so I subscribe myself to this list asking for help for the first time! I try to extract a slice from a 3D image data. The original data (data) has an extent of (0, 511, 0, 511, 0, 3) , and I want to extract different slices from a volumn (in "data") and store them in two vtkImageData. So, my code goes: extractS1 = vtk.vtkExtractVOI( ) extractS1.SetInput(data) extractS1.SetVOI(0, 511, 0, 511, 0, 0) extractS1.Update( ) slice1 = extractS1.GetOutput( ) <-- slice1 has extent (0, 511, 0, 511, 0, 0) extractS2 = vtk.vtkExtractVOI( ) extractS2.SetInput(data) extractS2.SetVOI(0, 511, 0, 511, 2, 2) extractS2.Update( ) slice2 = extractS2.GetOutput( ) <-- slice1 has extent (0, 511, 0, 511, 2, 2) I append these two slices in z direction in different order to create two image data: filter = vtk.vtkImageAppend() filter.AddInput(slice1) filter.AddInput(slice2) filter.AddInput(slice1) filter.SetAppendAxis(2) filter.Update() image1 = filter.GetOutput() <-- has extent (0, 511, 0, 511, 0, 2) filter1 = vtk.vtkImageAppend() filter1.AddInput(slice2) filter1.AddInput(slice1) filter1.AddInput(slice2) filter1.SetAppendAxis(2) filter1.Update() image2 = filter1.GetOutput() <-- has extent(0, 511, 0, 511, 2,4) When I combine those two image data into one by the following code: filter2 = vtk.vtkImageAppendComponents() filter2.AddInput(image2) filter2.AddInput(image1) filter2.Update() image3 = filter2.GetOutput() I get error message that tells me the extents of the data doesn't lie within the whole extent: ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 548 vtkImageData (1B2DBC68): Update extent does not lie within whole extent ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 555 vtkImageData (1B2DBC68): Update extent is: 0, 511, 0, 511, 2, 4 ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 562 vtkImageData (1B2DBC68): Whole extent is: 0, 511, 0, 511, 0, 2 ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 548 vtkImageData (1B2DBC68): Update extent does not lie within whole extent ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 555 vtkImageData (1B2DBC68): Update extent is: 0, 511, 0, 511, 2, 4 ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 562 vtkImageData (1B2DBC68): Whole extent is: 0, 511, 0, 511, 0, 2 How do I fix this problem??? Thanx!! Grace -------------- next part -------------- An HTML attachment was scrubbed... URL: From safi_lydia at yahoo.fr Tue Feb 22 17:02:07 2005 From: safi_lydia at yahoo.fr (Safi Lydia) Date: Tue, 22 Feb 2005 23:02:07 +0100 (CET) Subject: [vtkusers] vtkimageviewer2 problem Message-ID: <20050222220207.18043.qmail@web26509.mail.ukl.yahoo.com> Dear all I have the following problem with vtkimageviewer2, all the images are well displayed as long as their dimensions are less or equal to 512. If the height or the width is greater than 512, the display is bad and the image is distorded. Could anyone help on this matter please? --------------------------------- D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Cr?ez votre Yahoo! Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From Grace.Chen at swri.ca Tue Feb 22 17:03:28 2005 From: Grace.Chen at swri.ca (Grace Chen) Date: Tue, 22 Feb 2005 17:03:28 -0500 Subject: [vtkusers] how to append two image data with different extent? Message-ID: <00a801c5192a$5702f6a0$291e4c8e@WSG39Grace> Hi there, I have been a faithful user of VTK for the past year. But lately, I ran into this problem I cannot solve, so I subscribe myself to this list asking for help for the first time! I try to extract a slice from a 3D image data. The original data (data) has an extent of (0, 511, 0, 511, 0, 3) , and I want to extract different slices from a volumn (in "data") and store them in two vtkImageData. So, my code goes: extractS1 = vtk.vtkExtractVOI( ) extractS1.SetInput(data) extractS1.SetVOI(0, 511, 0, 511, 0, 0) extractS1.Update( ) slice1 = extractS1.GetOutput( ) <-- slice1 has extent (0, 511, 0, 511, 0, 0) extractS2 = vtk.vtkExtractVOI( ) extractS2.SetInput(data) extractS2.SetVOI(0, 511, 0, 511, 2, 2) extractS2.Update( ) slice2 = extractS2.GetOutput( ) <-- slice1 has extent (0, 511, 0, 511, 2, 2) I append these two slices in z direction in different order to create two image data: filter = vtk.vtkImageAppend() filter.AddInput(slice1) filter.AddInput(slice2) filter.AddInput(slice1) filter.SetAppendAxis(2) filter.Update() image1 = filter.GetOutput() <-- has extent (0, 511, 0, 511, 0, 2) filter1 = vtk.vtkImageAppend() filter1.AddInput(slice2) filter1.AddInput(slice1) filter1.AddInput(slice2) filter1.SetAppendAxis(2) filter1.Update() image2 = filter1.GetOutput() <-- has extent(0, 511, 0, 511, 2,4) When I combine those two image data into one by the following code: filter2 = vtk.vtkImageAppendComponents() filter2.AddInput(image2) filter2.AddInput(image1) filter2.Update() image3 = filter2.GetOutput() I get error message that tells me the extents of the data doesn't lie within the whole extent: ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 548 vtkImageData (1B2DBC68): Update extent does not lie within whole extent ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 555 vtkImageData (1B2DBC68): Update extent is: 0, 511, 0, 511, 2, 4 ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 562 vtkImageData (1B2DBC68): Whole extent is: 0, 511, 0, 511, 0, 2 ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 548 vtkImageData (1B2DBC68): Update extent does not lie within whole extent ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 555 vtkImageData (1B2DBC68): Update extent is: 0, 511, 0, 511, 2, 4 ERROR: In \OCCIviewerSDK10\Vtk42\Common\vtkDataObject.cxx, line 562 vtkImageData (1B2DBC68): Whole extent is: 0, 511, 0, 511, 0, 2 How do I fix this problem??? Thanx!! Grace -------------- next part -------------- An HTML attachment was scrubbed... URL: From safid_lydia at yahoo.fr Tue Feb 22 17:18:52 2005 From: safid_lydia at yahoo.fr (lydia safid) Date: Tue, 22 Feb 2005 23:18:52 +0100 (CET) Subject: [vtkusers] vtkImageViewer2 problem of image resolution Message-ID: <20050222221852.93284.qmail@web26609.mail.ukl.yahoo.com> Dear all I have the following problem with vtkimageviewer2, all the images are well displayed as long as their dimensions are less or equal to 512. If the height or the width is greater than 512, the display is bad and the image is distorded. Could anyone help on this matter please? --------------------------------- D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Cr?ez votre Yahoo! Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From cochrane at esscc.uq.edu.au Tue Feb 22 19:38:55 2005 From: cochrane at esscc.uq.edu.au (Paul Cochrane) Date: Wed, 23 Feb 2005 10:38:55 +1000 Subject: [vtkusers] Simple plot question In-Reply-To: <66f59a45050222085757871fd7@mail.gmail.com> References: <66f59a45050222085757871fd7@mail.gmail.com> Message-ID: <20050223003855.GA14546@shake56.esscc.uq.edu.au> Doug, I'm a newbie to vtk too, but I've sort of worked out the xy-plot stuff alright. It doesn't seem that straightforward (to me) why one has to do so many steps to be able to do something as "simple" as an xy plot but oh well. I finally worked out how to do this by modifying the C++ example posted to the vtkusers list by Sander Niemeijer (in the list archive). The following code is in python, but shouldn't be that hard to translate to Tcl or C++. import vtk from Numeric import * x = arange(10, typecode=Float) y = x**2 # set up the renderer and the render window _ren = vtk.vtkRenderer() _renWin = vtk.vtkRenderWindow() _renWin.AddRenderer(_ren) # do a quick check to make sure x and y are same length if len(x) != len(y): raise ValueError, "x and y vectors must be same length" # set up the x and y data arrays to be able to accept the data (code # here adapted from the C++ of a vtk-users mailing list reply by Sander # Niemeijer) _xData = vtk.vtkDataArray.CreateDataArray(vtk.VTK_FLOAT) _xData.SetNumberOfTuples(len(x)) _yData = vtk.vtkDataArray.CreateDataArray(vtk.VTK_FLOAT) _yData.SetNumberOfTuples(len(y)) # put the data into the data arrays for i in range(len(x)): _xData.SetTuple1(i,x[i]) _yData.SetTuple1(i,y[i]) # create a field data object # (I think this is as a containter to hold the data arrays) _fieldData = vtk.vtkFieldData() _fieldData.AllocateArrays(2) _fieldData.AddArray(_xData) _fieldData.AddArray(_yData) # now put the field data object into a data object so that can add it as # input to the xyPlotActor _dataObject = vtk.vtkDataObject() _dataObject.SetFieldData(_fieldData) # set up the actor _plot = vtk.vtkXYPlotActor() _plot.AddDataObjectInput(_dataObject) # set the title and stuff _plot.SetTitle("Example 2D plot") _plot.SetXTitle("x") _plot.SetYTitle("x^2") _plot.SetXValuesToValue() # set which parts of the data object are to be used for which axis _plot.SetDataObjectXComponent(0,0) _plot.SetDataObjectYComponent(0,1) # add the actor _ren.AddActor2D(_plot) # render the scene _iren = vtk.vtkRenderWindowInteractor() _iren.SetRenderWindow(_renWin) _iren.Initialize() _renWin.Render() _iren.Start() Just so you know, I embed this code in something else, so that's why I use all of the leading underscores. What I think is going on is that vtk needs data packaged in a particular form, and there are a few hoops one must go through to get it into that form so that one can pass it off to the vtkActor object. Going through the code, I set up the renderer and render window at the start rather than the end (dunno why, but must have seemed like a good idea at the time). I do a check on the x and y variables I'm passing into the script to make sure the dimensions are correct (this is a simple plot of y = x^2). One then needs to generate vtkDataArray objects to hold the x and y data, telling vtk the number of tuples allocates the relevant amount of memory. Then using SetTuple1() (for some reason SetTuple() doesn't work in vtk python) to assign the elements of the x and y arrays to the vtkDataArrays. The vtkDataArrays then need to be packaged up as a vtkFieldData object with two sub arrays. The vtkFieldData object is then passed to a vtkDataObject which can then be used as input to a vtkXYPlotActor. Then you have to set which component of the vtkDataObject to use as the X or Y component, and the rest of the code is just setting stuff up, adding the plot actor to the renderer, and rendering stuff in an interactive window. This has been more verbose than I intended, but I hope it has been of some help. Regards, Paul * Doug Henry (brilligent at gmail.com) [050223 02:59]: > This is hopefully an easy "newbie" type question. I was looking at > making a simple xy-plot as a way to figure out the basics of vtk (I'm > going to wait for my VTK textbook to arrive before diving in with both > feet). I have worked through the cone tutorials and created my own > interactor for my toolkit, so I have some familiarity with the vtk > toolkit. Looking at the xyPlot tcl example, it is not obvious to me > how data is presented to xyplot. I was hoping someone could give me a > starting point by explaining how I would simply plot two columns of > numbers against each other. This should give me a simple example of > how this data is mapped, and hopefully help me to better understand > the probe stuff in the tcl example. > > Thanks for any help, > Doug > _______________________________________________ > 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 -- Paul Cochrane Computational Scientist/Software Developer Earth Systems Science Computational Centre University of Queensland Brisbane Queensland 4072 Australia E: cochrane at esscc dot uq dot edu dot au From david.netherway at adelaide.edu.au Wed Feb 23 00:31:35 2005 From: david.netherway at adelaide.edu.au (David J. Netherway) Date: Wed, 23 Feb 2005 16:01:35 +1030 Subject: [vtkusers] length of a curve Message-ID: <421C1537.7030305@adelaide.edu.au> Hi, I have been unable to find a procedure that returns the length of a curve. The data is the output of a vtkPolyDataConnectivity filter which selects the largest contour from vtkContourFilter. Do I need to set up a loop to get the points and calculate the sum of line lengths or is there a procedure that will provide this? I am working in tcl so I am not keen to set up loops like this. I thought that vtkCurvatures might make the curve length available, or perhaps vtkSplineFilter but this is not the case. Thanks, David From prabhu_r at users.sf.net Wed Feb 23 01:10:03 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Wed, 23 Feb 2005 11:40:03 +0530 Subject: [vtkusers] wxVTKRenderWindowInteractor inside wxNotebook crashes In-Reply-To: <421B6B30.7060804@st.jyu.fi> References: <421B6B30.7060804@st.jyu.fi> Message-ID: <16924.7739.525816.248338@monster.linux.in> >>>>> "KP" == Kalle Pahajoki writes: KP> p=wxPanel(self,-1) and change the line ^^^^^ That should be wxPanel(nb, -1)! Besides, why do you need to use a panel? For some reason the sizing of the panel is badly affected and I only get a tiny window embedded. Use a SplitterWindow instead. It works and looks nicer as well. [...] KP> from wxPython.wx import * KP> from vtk import * Importing so many symbols is generally bad practice and can lead to heartache. I would assiduously avoid such imports. prabhu From xubinbin2004 at gmail.com Wed Feb 23 01:12:19 2005 From: xubinbin2004 at gmail.com (Xu Bin) Date: Wed, 23 Feb 2005 14:12:19 +0800 Subject: [vtkusers] How can I compute a 3d object's Volume in vtk? Message-ID: <8f1c3d50050222221274e85238@mail.gmail.com> Hello everyone, I have rendered a 3d object(a bone) using vtkContourFilter from a set of slices, but How can I get this 3d Object's Volume? Is there any class or Method in VTK that can acomplish this Job? Thanks From kalpaha at st.jyu.fi Wed Feb 23 02:48:43 2005 From: kalpaha at st.jyu.fi (Kalle Pahajoki) Date: Wed, 23 Feb 2005 09:48:43 +0200 Subject: [vtkusers] wxVTKRenderWindowInteractor inside wxNotebook crashes In-Reply-To: <16924.7739.525816.248338@monster.linux.in> References: <421B6B30.7060804@st.jyu.fi> <16924.7739.525816.248338@monster.linux.in> Message-ID: <421C355B.1040906@st.jyu.fi> Prabhu Ramachandran wrote: > KP> p=wxPanel(self,-1) and change the line > ^^^^^ > >That should be wxPanel(nb, -1)! > > And it was in the code, but of course I managed to typo it for my posting. So that was not the issue. >Besides, why do you need to use a panel? For some reason the sizing >of the panel is badly affected and I only get a tiny window embedded. >Use a SplitterWindow instead. It works and looks nicer as well. > > I get the same crash, If I use a splitterwindow that is inside a notebook as the parent to the RWI. If, OTOH, I move the splitter window out of the notebook, then it works fine. So the problem seems not to be so much the containing widget, but that it is embedded in a wxNotebook. I guess it's something to do with the management of the windows that notebook does, but with my limited understanding of such issues, cannot guess where to begin to look for the problems. I understand that my way of using these widgets may be rare :-) If this is not something that someone has already encounterd & solved, I'll try to go around the issue using the SplitterWindow you mention, but splitting the window in a way that the notebook is in it's own half. >[...] > KP> from wxPython.wx import * > KP> from vtk import * > >Importing so many symbols is generally bad practice and can lead to >heartache. I would assiduously avoid such imports. > > That was just a simple example that I found and modified for my own purposes. I never do this on my own code :-) From stefan.maas at fh-gelsenkirchen.de Wed Feb 23 05:09:15 2005 From: stefan.maas at fh-gelsenkirchen.de (Stefan Maas) Date: Wed, 23 Feb 2005 11:09:15 +0100 Subject: [vtkusers] Re: vtkImagePlaneWidgets texture update In-Reply-To: <20050222220254.2012B34665@public.kitware.com> Message-ID: <001501c5198f$bad02cb0$2fe6a8c0@maas2> Hi Dean, this is a piece of my code (java) where you can see, how the ipws are connected. Your trick with holding the camera seems to be very nice but the problem is that the 2D-ipw still is moving around - what is not so nice. I tried this before, too. What I now do is following: ipw1.SetInput(mandelbrot1.GetOutput()); ipw1.SetInteractor(renWin.getIren()); ipw1.SetPlaneOrientationToXAxes(); ipw1.GetPlaneProperty().SetColor(1, 0, 0); ipw1.SetSliceIndex(0); ipw1.On(); ipw1.UpdatePlacement(); ipw2.SetInput(mandelbrot1.GetOutput()); ipw2.SetPlaneOrientationToXAxes(); ipw2.GetTexture().SetInput(ipw1.GetTexture().GetInput()); ipw2.GetPlaneProperty().SetColor(ipw1.GetPlaneProperty().GetColor()); ipw2.SetSliceIndex(ipw1.GetSliceIndex()); ipw2.SetLookupTable(ipw1.GetLookupTable()); ipw2.SetColorMap(ipw1.GetColorMap()); I tried to connect many values between the ipws, but only if I share everything (like ipw2 = ipw1) the texture is shown correctly when I try a diagonal cut. (But then the 2D-ipw is moving and I need your camera-trick.) In principle I need to know what "holds" the texture on the correct position on the ipw without moving the 2D-ipw. Something must happen with the texture when I change to "diagonal-cutting-mode". But only with the texture, because the data that I get by clicking on the ipw are still correct...very strange. Thanks for your help. Stefan ------------------------------------------------- >Stefan, >can you post code, tcl or cxx, >that shows the problem (using data from VTKData)? >I'm not clear on how you connect/relate the 2D ipw to the corresponding 3D >ipw. >Dean From agalmat at hotmail.com Wed Feb 23 06:20:19 2005 From: agalmat at hotmail.com (Alejandro Galindo Mateo) Date: Wed, 23 Feb 2005 12:20:19 +0100 Subject: [vtkusers] vtkShepardMethod Message-ID: Hello Vtk users, I?m triying to use the class vtkShepardMethod to convert unstructured data to structured data and I?d like to know what?s the difference between the functions: virtual void SetModelBounds (double, double, double, double, double, double) void SetSampleDimensions (int i, int j, int k) I think both of them set the dimensions of the dataset but I?m not sure, I need some help about this. Thanks for all, From goodwin.lawlor at ucd.ie Wed Feb 23 07:44:05 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Wed, 23 Feb 2005 12:44:05 -0000 Subject: [vtkusers] Re: vtkShepardMethod References: Message-ID: Hi Alejandro, ModelBounds sets the physical space the algorithm works in; SampleDimensions is the number of pieces your space is divided up into (along each axis). So, the the length of a voxel in the x direction would: ModelBounds(x)/SampleDimensions(x) hth Goodwin "Alejandro Galindo Mateo" wrote in message news:BAY10-F946A8466B4E2F199E8AFFBC630 at phx.gbl... > Hello Vtk users, > > I?m triying to use the class vtkShepardMethod to convert unstructured data > to structured data and I?d like to know what?s the difference between the > functions: > > virtual void SetModelBounds (double, double, double, double, double, > double) > > void SetSampleDimensions (int i, int j, int k) > > I think both of them set the dimensions of the dataset but I?m not sure, I > need some help about this. > > Thanks for all, > > > _______________________________________________ > 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 > From goodwin.lawlor at ucd.ie Wed Feb 23 07:45:49 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Wed, 23 Feb 2005 12:45:49 -0000 Subject: [vtkusers] Re: How can I compute a 3d object's Volume in vtk? References: <8f1c3d50050222221274e85238@mail.gmail.com> Message-ID: Hi, Have a look at vtkMassProperties::GetVolume() hth Goodwin "Xu Bin" wrote in message news:8f1c3d50050222221274e85238 at mail.gmail.com... > Hello everyone, > > I have rendered a 3d object(a bone) using vtkContourFilter from a set of slices, > > but How can I get this 3d Object's Volume? > > Is there any class or Method in VTK that can acomplish this Job? > > Thanks > _______________________________________________ > 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 > From jiksed at yahoo.com Wed Feb 23 10:31:09 2005 From: jiksed at yahoo.com (jiksed) Date: Wed, 23 Feb 2005 07:31:09 -0800 (PST) Subject: [vtkusers] Volume rendering of vtkUnstructuredGrid Message-ID: <20050223153109.35048.qmail@web61105.mail.yahoo.com> My scalar data is the variable values at nodes of 3D irregular hexahedral cells from the finite element modeling. I have been trying to volume-render this unstructured grid but have had no luck so far. My questions would be 1) How do I add hexahedral cells to the vtkUnstructuredGrid? 2) According to posts in this list, vtkUnstructuredGridVolumeRayCastMapper renders tretrahedral cells only. Is vtkDataSetTriangleFilter the right filter to convert hexahedral cells to tretrahedral cells? 3) I got an error message like this " E2316 'SetVolumeRayCastFunction' is not a member of 'vtkUnstructuredGridVolumeRayCastMapper". Did I miss including any header file? According to an example IntermixedUnstructuredGrid.tcl, 'SetVolumeRayCastFunction' is not required. Is this true? I am using VTK4.4 and running WinXP Pro. Here is part of my code. Thank you. ---------------------------------------------------- // Points and scalars vtkPoints *pts = vtkPoints::New(); vtkDoubleArray *scalars = vtkDoubleArray::New(); vtkUnstructuredGrid *ugrid = vtkUnstructuredGrid::New(); ugrid->Allocate(NumPoints, NumPoints); for (i=0; iInsertNextPoint(X[i], Y[i], Z[i]); scalars->InsertNextTuple1(V[i]); } ugrid->SetPoints(pts); ugrid->GetPointData()->SetScalars(scalars); // Cells int nyz = ny * nz; int IndexOffset[8] = {0, 1, nz, nz+1, nyz, nyz+1, nyz+nz, nyz+nz+1}; vtkHexahedron *hexa = vtkHexahedron::New(); n = 0; for (i=0; iGetPointIds()->SetId(VTK_HEXAHEDRON, n+IndexOffset[kk]); } ugrid->InsertNextCell(hexa->GetCellType(), hexa->GetPointIds()); ++n; } } } // Volume rendering vtkUnstructuredGridVolumeRayCastMapper *volumeMapper = vtkUnstructuredGridVolumeRayCastMapper::New(); vtkDataSetTriangleFilter *tri = vtkDataSetTriangleFilter::New(); tri->SetInput(ugrid); volumeMapper->SetInput(tri->GetOutput()); vtkUnstructuredGridBunykRayCastFunction *compositeFunction = vtkUnstructuredGridBunykRayCastFunction::New(); // E2316 'SetVolumeRayCastFunction' is not a member // of 'vtkUnstructuredGridVolumeRayCastMapper' volumeMapper->SetVolumeRayCastFunction(compositeFunction); // Error volume->SetMapper(volumeMapper); vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New(); volumeProperty->SetColor(colorFunc); volumeProperty->SetScalarOpacity(opacityFunc); volumeProperty->ShadeOff(); volumeProperty->SetInterpolationTypeToLinear(); volume->SetProperty(volumeProperty); ..... --------------------------------- Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. -------------- next part -------------- An HTML attachment was scrubbed... URL: From prabhu_r at users.sf.net Wed Feb 23 12:02:51 2005 From: prabhu_r at users.sf.net (Prabhu Ramachandran) Date: Wed, 23 Feb 2005 22:32:51 +0530 Subject: [vtkusers] wxVTKRenderWindowInteractor inside wxNotebook crashes In-Reply-To: <421C355B.1040906@st.jyu.fi> References: <421B6B30.7060804@st.jyu.fi> <16924.7739.525816.248338@monster.linux.in> <421C355B.1040906@st.jyu.fi> Message-ID: <16924.46907.845621.332021@monster.linux.in> >>>>> "KP" == Kalle Pahajoki writes: KP> I get the same crash, If I use a splitterwindow that is inside KP> a notebook as the parent to the RWI. If, OTOH, I move the KP> splitter window out of the notebook, then it works fine. So FWIW, I don't get a crash for these cases using 2.4.2.6. I don't have the time to check with 2.5.x. cheers, prabhu From mathieu.malaterre at kitware.com Wed Feb 23 13:51:16 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Wed, 23 Feb 2005 13:51:16 -0500 Subject: [vtkusers] Fwd: Volume Rendering with multiple-array data In-Reply-To: References: Message-ID: <421CD0A4.5040608@kitware.com> Randall, I tried reproducing your bug with blow.vtk (part of VTKData) with no luck. If you were able to reproduce the bug with blow.vtk I could look into it, or just send my your dataset. BTW you script redeclare twice: > vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); > filter->SetNullValue(0.0); > filter->SetInput(mask->GetOutput()); > filter->Update(); > printf("Filter ran\n"); > > vtkImageShiftScale *scaled = vtkImageShiftScale::New(); > scaled->SetInput(filter->GetOutput()); > scaled->SetScale(255.0); > scaled->SetOutputScalarTypeToUnsignedChar(); > scaled->Update(); > printf("Data Scaled ran\n"); > printf("* Scaled data arrays:\n"); > vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); > for(n=0; n< dataptr->GetNumberOfArrays(); n++) { > printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); > } > scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); > printf("* Range: %f - %f\n", range[0], range[1]); Is this a copy/paste mistake ? Thanks, Mathieu Randall Hand wrote: > Still looking for any help with this... I've gotten it to work witht > he vtkVolumeTextureMapper2D just fine, but simply replacing that with > the vtkVolumeRayCastMapper calls results in all kinds of weird > behaviour. > > Sometimes it exits with a segfault/core dump, but no error. > > Sometimes it runs to completion, but the volume rendering doesn't work > (I get the text & outline, but no data). > > Most commonly I get anywhere from 1 to 3 messages like this: > ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/Filtering/vtkExecutive.cxx, > line 519 > vtkStreamingDemandDrivenPipeline (0x1d6038d0): Non-forwarded requests > are not yet implemented. > > And sometimes I get garbage like this: (looks like multiple errors interlaced) > ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/FiltEEeRRrRRiOOnRRg::/ > vIItnnk E//xvveiiczzu//thhioovmmeee.//crrxhhxaa,nn ddl//issnrrecc > //5ee1zz9VV > iivzzt//kUUStttiirlleiiattmiiieenssg//DVVeTTmKKa//nFFdiiDllrttieevrreiinnnPggi//pvvettlkkiEEnxxeee > cc(uu0ttxii1vv0ee9..7cc1xxdxxb,,8 )ll:ii nnNeeo n55-11f99o > (truncated by me, you get the point) > > The messages seem to occur after the ->Render() call, and during the > part where I write it to disk. (with a vtkTIFFWriter). Sometimes it > segfaults right after the error messages, and sometimes it just hangs > indefinately. Once or twice it's even run to completion after the > error messages, but the Volume Rendering never appears. I'm using > OffScreen rendering with MangledMesa. > > Please? Anyone? > > ---------- Forwarded message ---------- > From: Randall Hand > Date: Wed, 16 Feb 2005 11:29:16 -0600 > Subject: Volume Rendering with multiple-array data > To: vtkusers at vtk.org > > > I have a VTK Dataset with with multiple data values per point. Each > data point in my rectilinear grid has both a scalar (fractional > occupancy) and a vector (flow velocity). I want to generate a volume > rendering from this dataset of the scalar field, using the RayCast > volume code. > > How do I get from the vtkDataSet that vtkDataSetReader outputs, to the > vtkImageData that the volume rendering routines want? Currently I'm > using a GaussianSPlatter to convert to an imageData, & a > vtkImageShiftScale to convert from the 0-1float to a 0-255unsigned > char. > > Here's an exerpt from my code: > > ***BEGIN*** > > // Load model > vtkDataSetReader *model = vtkDataSetReader::New(); > model->SetFileName(filename); > model->Update(); > printf("File loaded\n"); > model->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); > printf("* Range: %f - %f\n", range[0], range[1]); > > vtkMaskPoints *mask = vtkMaskPoints::New(); > mask->SetInput(model->GetOutput()); > mask->RandomModeOn(); > mask->SetMaximumNumberOfPoints(10); > mask->Update(); > printf("Data Masked\n"); > mask->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); > printf("* Range: %f - %f\n", range[0], range[1]); > > vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); > filter->SetNullValue(0.0); > filter->SetInput(mask->GetOutput()); > filter->Update(); > printf("Filter ran\n"); > > vtkImageShiftScale *scaled = vtkImageShiftScale::New(); > scaled->SetInput(filter->GetOutput()); > scaled->SetScale(255.0); > scaled->SetOutputScalarTypeToUnsignedChar(); > scaled->Update(); > printf("Data Scaled ran\n"); > printf("* Scaled data arrays:\n"); > vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); > for(n=0; n< dataptr->GetNumberOfArrays(); n++) { > printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); > } > scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); > printf("* Range: %f - %f\n", range[0], range[1]); > vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); > filter->SetNullValue(0.0); > filter->SetInput(mask->GetOutput()); > filter->Update(); > printf("Filter ran\n"); > > vtkImageShiftScale *scaled = vtkImageShiftScale::New(); > scaled->SetInput(filter->GetOutput()); > scaled->SetScale(255.0); > scaled->SetOutputScalarTypeToUnsignedChar(); > scaled->Update(); > printf("Data Scaled ran\n"); > printf("* Scaled data arrays:\n"); > vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); > for(n=0; n< dataptr->GetNumberOfArrays(); n++) { > printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); > } > scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); > printf("* Range: %f - %f\n", range[0], range[1]); > > vtkVolumeRayCastCompositeFunction *compFunc = > vtkVolumeRayCastCompositeFunction::New(); > compFunc->SetCompositeMethodToInterpolateFirst(); > > vtkPiecewiseFunction *xf_Opacity = vtkPiecewiseFunction::New(); > xf_Opacity->AddPoint(0,0.0); > xf_Opacity->AddPoint(255,1.0); > > vtkColorTransferFunction *xf_Color = vtkColorTransferFunction::New(); > xf_Color->AddRGBPoint(0, 0, 0, 1); > xf_Color->AddRGBPoint(255, 0, 0, 1); > > vtkVolumeProperty *volProp = vtkVolumeProperty::New(); > volProp->SetColor(xf_Color); > volProp->SetScalarOpacity(xf_Opacity); > volProp->SetInterpolationTypeToLinear(); > > modelMapper = vtkVolumeRayCastMapper::New(); > modelMapper->SetInput(scaled->GetOutput()); > modelMapper->SetVolumeRayCastFunction(compFunc); > // modelMapper->Update(); > > printf("Mapper updated\n"); > vtkVolume *volume = vtkVolume::New(); > volume->SetMapper(modelMapper); > volume->SetProperty(volProp); > ***END*** > > When I run this, tho, I get the following output: > =============== BEGIN OUTPUT ============== > Loading file test.vtk... > File loaded > * Range: 0.000000 - 1.000000 > Data Masked > * Range: 0.000000 - 1.000000 > Filter ran > Data Scaled ran > * Scaled data arrays: > * [0] "(null)" > * Range: 0.000000 - 253.000000 > Mapper updated > ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/Filtering/vtkExecutive.cxx, > line 519 > vtkStreamingDemandDrivenPipeline (0x109843b8): Non-forwarded requests > are not yet implemented. > > Segmentation fault (core dumped) > ================ END OUTPUT ============ > > Any ideas? > -- > Randall Hand > http://www.yeraze.com > > From randall.hand at gmail.com Wed Feb 23 14:09:31 2005 From: randall.hand at gmail.com (Randall Hand) Date: Wed, 23 Feb 2005 13:09:31 -0600 Subject: [vtkusers] Fwd: Volume Rendering with multiple-array data In-Reply-To: <421CD0A4.5040608@kitware.com> References: <421CD0A4.5040608@kitware.com> Message-ID: Sorry, yeah that's a cut/paste mistake. to prevent it again, I've attached my source file to this email. i've made alot of modifications, namely 2 defines at the top to control Texture2D vs Raycast mapping, & Onscreen vs Offscreen mapping. Everything I've done, i've been able to simply comment the "#define RAYCAST" line, and it works beautifully with Texture2d. I tried it just now with blow.vtk, & with ironProt.vtk and both do similar things. Sometimes they'll render initially, then crash as soon as I interact with it. Other times they just crash immediately. Thanks for the help :) On Wed, 23 Feb 2005 13:51:16 -0500, Mathieu Malaterre wrote: > Randall, > > I tried reproducing your bug with blow.vtk (part of VTKData) with no > luck. If you were able to reproduce the bug with blow.vtk I could look > into it, or just send my your dataset. > > BTW you script redeclare twice: > > > vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); > > filter->SetNullValue(0.0); > > filter->SetInput(mask->GetOutput()); > > filter->Update(); > > printf("Filter ran\n"); > > > > vtkImageShiftScale *scaled = vtkImageShiftScale::New(); > > scaled->SetInput(filter->GetOutput()); > > scaled->SetScale(255.0); > > scaled->SetOutputScalarTypeToUnsignedChar(); > > scaled->Update(); > > printf("Data Scaled ran\n"); > > printf("* Scaled data arrays:\n"); > > vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); > > for(n=0; n< dataptr->GetNumberOfArrays(); n++) { > > printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); > > } > > scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); > > printf("* Range: %f - %f\n", range[0], range[1]); > > Is this a copy/paste mistake ? > > Thanks, > Mathieu > > > Randall Hand wrote: > > Still looking for any help with this... I've gotten it to work witht > > he vtkVolumeTextureMapper2D just fine, but simply replacing that with > > the vtkVolumeRayCastMapper calls results in all kinds of weird > > behaviour. > > > > Sometimes it exits with a segfault/core dump, but no error. > > > > Sometimes it runs to completion, but the volume rendering doesn't work > > (I get the text & outline, but no data). > > > > Most commonly I get anywhere from 1 to 3 messages like this: > > ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/Filtering/vtkExecutive.cxx, > > line 519 > > vtkStreamingDemandDrivenPipeline (0x1d6038d0): Non-forwarded requests > > are not yet implemented. > > > > And sometimes I get garbage like this: (looks like multiple errors interlaced) > > ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/FiltEEeRRrRRiOOnRRg::/ > > vIItnnk E//xvveiiczzu//thhioovmmeee.//crrxhhxaa,nn ddl//issnrrecc > > //5ee1zz9VV > > iivzzt//kUUStttiirlleiiattmiiieenssg//DVVeTTmKKa//nFFdiiDllrttieevrreiinnnPggi//pvvettlkkiEEnxxeee > > cc(uu0ttxii1vv0ee9..7cc1xxdxxb,,8 )ll:ii nnNeeo n55-11f99o > > (truncated by me, you get the point) > > > > The messages seem to occur after the ->Render() call, and during the > > part where I write it to disk. (with a vtkTIFFWriter). Sometimes it > > segfaults right after the error messages, and sometimes it just hangs > > indefinately. Once or twice it's even run to completion after the > > error messages, but the Volume Rendering never appears. I'm using > > OffScreen rendering with MangledMesa. > > > > Please? Anyone? > > > > ---------- Forwarded message ---------- > > From: Randall Hand > > Date: Wed, 16 Feb 2005 11:29:16 -0600 > > Subject: Volume Rendering with multiple-array data > > To: vtkusers at vtk.org > > > > > > I have a VTK Dataset with with multiple data values per point. Each > > data point in my rectilinear grid has both a scalar (fractional > > occupancy) and a vector (flow velocity). I want to generate a volume > > rendering from this dataset of the scalar field, using the RayCast > > volume code. > > > > How do I get from the vtkDataSet that vtkDataSetReader outputs, to the > > vtkImageData that the volume rendering routines want? Currently I'm > > using a GaussianSPlatter to convert to an imageData, & a > > vtkImageShiftScale to convert from the 0-1float to a 0-255unsigned > > char. > > > > Here's an exerpt from my code: > > > > ***BEGIN*** > > > > // Load model > > vtkDataSetReader *model = vtkDataSetReader::New(); > > model->SetFileName(filename); > > model->Update(); > > printf("File loaded\n"); > > model->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); > > printf("* Range: %f - %f\n", range[0], range[1]); > > > > vtkMaskPoints *mask = vtkMaskPoints::New(); > > mask->SetInput(model->GetOutput()); > > mask->RandomModeOn(); > > mask->SetMaximumNumberOfPoints(10); > > mask->Update(); > > printf("Data Masked\n"); > > mask->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); > > printf("* Range: %f - %f\n", range[0], range[1]); > > > > vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); > > filter->SetNullValue(0.0); > > filter->SetInput(mask->GetOutput()); > > filter->Update(); > > printf("Filter ran\n"); > > > > vtkImageShiftScale *scaled = vtkImageShiftScale::New(); > > scaled->SetInput(filter->GetOutput()); > > scaled->SetScale(255.0); > > scaled->SetOutputScalarTypeToUnsignedChar(); > > scaled->Update(); > > printf("Data Scaled ran\n"); > > printf("* Scaled data arrays:\n"); > > vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); > > for(n=0; n< dataptr->GetNumberOfArrays(); n++) { > > printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); > > } > > scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); > > printf("* Range: %f - %f\n", range[0], range[1]); > > vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); > > filter->SetNullValue(0.0); > > filter->SetInput(mask->GetOutput()); > > filter->Update(); > > printf("Filter ran\n"); > > > > vtkImageShiftScale *scaled = vtkImageShiftScale::New(); > > scaled->SetInput(filter->GetOutput()); > > scaled->SetScale(255.0); > > scaled->SetOutputScalarTypeToUnsignedChar(); > > scaled->Update(); > > printf("Data Scaled ran\n"); > > printf("* Scaled data arrays:\n"); > > vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); > > for(n=0; n< dataptr->GetNumberOfArrays(); n++) { > > printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); > > } > > scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); > > printf("* Range: %f - %f\n", range[0], range[1]); > > > > vtkVolumeRayCastCompositeFunction *compFunc = > > vtkVolumeRayCastCompositeFunction::New(); > > compFunc->SetCompositeMethodToInterpolateFirst(); > > > > vtkPiecewiseFunction *xf_Opacity = vtkPiecewiseFunction::New(); > > xf_Opacity->AddPoint(0,0.0); > > xf_Opacity->AddPoint(255,1.0); > > > > vtkColorTransferFunction *xf_Color = vtkColorTransferFunction::New(); > > xf_Color->AddRGBPoint(0, 0, 0, 1); > > xf_Color->AddRGBPoint(255, 0, 0, 1); > > > > vtkVolumeProperty *volProp = vtkVolumeProperty::New(); > > volProp->SetColor(xf_Color); > > volProp->SetScalarOpacity(xf_Opacity); > > volProp->SetInterpolationTypeToLinear(); > > > > modelMapper = vtkVolumeRayCastMapper::New(); > > modelMapper->SetInput(scaled->GetOutput()); > > modelMapper->SetVolumeRayCastFunction(compFunc); > > // modelMapper->Update(); > > > > printf("Mapper updated\n"); > > vtkVolume *volume = vtkVolume::New(); > > volume->SetMapper(modelMapper); > > volume->SetProperty(volProp); > > ***END*** > > > > When I run this, tho, I get the following output: > > =============== BEGIN OUTPUT ============== > > Loading file test.vtk... > > File loaded > > * Range: 0.000000 - 1.000000 > > Data Masked > > * Range: 0.000000 - 1.000000 > > Filter ran > > Data Scaled ran > > * Scaled data arrays: > > * [0] "(null)" > > * Range: 0.000000 - 253.000000 > > Mapper updated > > ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/Filtering/vtkExecutive.cxx, > > line 519 > > vtkStreamingDemandDrivenPipeline (0x109843b8): Non-forwarded requests > > are not yet implemented. > > > > Segmentation fault (core dumped) > > ================ END OUTPUT ============ > > > > Any ideas? > > -- > > Randall Hand > > http://www.yeraze.com > > > > > > -- Randall Hand http://www.yeraze.com -------------- next part -------------- A non-text attachment was scrubbed... Name: main.cpp Type: application/octet-stream Size: 15609 bytes Desc: not available URL: From mathieu.malaterre at kitware.com Wed Feb 23 14:17:17 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Wed, 23 Feb 2005 14:17:17 -0500 Subject: [vtkusers] Fwd: Volume Rendering with multiple-array data In-Reply-To: References: <421CD0A4.5040608@kitware.com> Message-ID: <421CD6BD.1030700@kitware.com> Randall, Sorry I cannot reproduce any problem. You seems to be using VTK CVS, can you update to today ? Also if you are using an ATI card on linux, could you export : export LIBGL_ALWAYS_INDIRECT=1 before running your program ? Or if you have mesa on your system can you do: export LD_PRELOAD=/opt/Mesa/lib/libGL.so before running your program Thanks Mathieu Randall Hand wrote: > Sorry, yeah that's a cut/paste mistake. to prevent it again, I've > attached my source file to this email. i've made alot of > modifications, namely 2 defines at the top to control Texture2D vs > Raycast mapping, & Onscreen vs Offscreen mapping. Everything I've > done, i've been able to simply comment the "#define RAYCAST" line, and > it works beautifully with Texture2d. > > I tried it just now with blow.vtk, & with ironProt.vtk and both do > similar things. Sometimes they'll render initially, then crash as > soon as I interact with it. Other times they just crash immediately. > > Thanks for the help :) > > > On Wed, 23 Feb 2005 13:51:16 -0500, Mathieu Malaterre > wrote: > >>Randall, >> >> I tried reproducing your bug with blow.vtk (part of VTKData) with no >>luck. If you were able to reproduce the bug with blow.vtk I could look >>into it, or just send my your dataset. >> >> BTW you script redeclare twice: >> >> > vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); >> > filter->SetNullValue(0.0); >> > filter->SetInput(mask->GetOutput()); >> > filter->Update(); >> > printf("Filter ran\n"); >> > >> > vtkImageShiftScale *scaled = vtkImageShiftScale::New(); >> > scaled->SetInput(filter->GetOutput()); >> > scaled->SetScale(255.0); >> > scaled->SetOutputScalarTypeToUnsignedChar(); >> > scaled->Update(); >> > printf("Data Scaled ran\n"); >> > printf("* Scaled data arrays:\n"); >> > vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); >> > for(n=0; n< dataptr->GetNumberOfArrays(); n++) { >> > printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); >> > } >> > scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); >> > printf("* Range: %f - %f\n", range[0], range[1]); >> >> Is this a copy/paste mistake ? >> >>Thanks, >>Mathieu >> >> >>Randall Hand wrote: >> >>>Still looking for any help with this... I've gotten it to work witht >>>he vtkVolumeTextureMapper2D just fine, but simply replacing that with >>>the vtkVolumeRayCastMapper calls results in all kinds of weird >>>behaviour. >>> >>>Sometimes it exits with a segfault/core dump, but no error. >>> >>>Sometimes it runs to completion, but the volume rendering doesn't work >>>(I get the text & outline, but no data). >>> >>>Most commonly I get anywhere from 1 to 3 messages like this: >>>ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/Filtering/vtkExecutive.cxx, >>>line 519 >>>vtkStreamingDemandDrivenPipeline (0x1d6038d0): Non-forwarded requests >>>are not yet implemented. >>> >>>And sometimes I get garbage like this: (looks like multiple errors interlaced) >>>ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/FiltEEeRRrRRiOOnRRg::/ >>> vIItnnk E//xvveiiczzu//thhioovmmeee.//crrxhhxaa,nn ddl//issnrrecc >>>//5ee1zz9VV >>>iivzzt//kUUStttiirlleiiattmiiieenssg//DVVeTTmKKa//nFFdiiDllrttieevrreiinnnPggi//pvvettlkkiEEnxxeee >>>cc(uu0ttxii1vv0ee9..7cc1xxdxxb,,8 )ll:ii nnNeeo n55-11f99o >>>(truncated by me, you get the point) >>> >>>The messages seem to occur after the ->Render() call, and during the >>>part where I write it to disk. (with a vtkTIFFWriter). Sometimes it >>>segfaults right after the error messages, and sometimes it just hangs >>>indefinately. Once or twice it's even run to completion after the >>>error messages, but the Volume Rendering never appears. I'm using >>>OffScreen rendering with MangledMesa. >>> >>>Please? Anyone? >>> >>>---------- Forwarded message ---------- >>>From: Randall Hand >>>Date: Wed, 16 Feb 2005 11:29:16 -0600 >>>Subject: Volume Rendering with multiple-array data >>>To: vtkusers at vtk.org >>> >>> >>>I have a VTK Dataset with with multiple data values per point. Each >>>data point in my rectilinear grid has both a scalar (fractional >>>occupancy) and a vector (flow velocity). I want to generate a volume >>>rendering from this dataset of the scalar field, using the RayCast >>>volume code. >>> >>>How do I get from the vtkDataSet that vtkDataSetReader outputs, to the >>>vtkImageData that the volume rendering routines want? Currently I'm >>>using a GaussianSPlatter to convert to an imageData, & a >>>vtkImageShiftScale to convert from the 0-1float to a 0-255unsigned >>>char. >>> >>>Here's an exerpt from my code: >>> >>>***BEGIN*** >>> >>> // Load model >>> vtkDataSetReader *model = vtkDataSetReader::New(); >>> model->SetFileName(filename); >>> model->Update(); >>> printf("File loaded\n"); >>> model->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); >>> printf("* Range: %f - %f\n", range[0], range[1]); >>> >>> vtkMaskPoints *mask = vtkMaskPoints::New(); >>> mask->SetInput(model->GetOutput()); >>> mask->RandomModeOn(); >>> mask->SetMaximumNumberOfPoints(10); >>> mask->Update(); >>> printf("Data Masked\n"); >>> mask->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); >>> printf("* Range: %f - %f\n", range[0], range[1]); >>> >>> vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); >>> filter->SetNullValue(0.0); >>> filter->SetInput(mask->GetOutput()); >>> filter->Update(); >>> printf("Filter ran\n"); >>> >>> vtkImageShiftScale *scaled = vtkImageShiftScale::New(); >>> scaled->SetInput(filter->GetOutput()); >>> scaled->SetScale(255.0); >>> scaled->SetOutputScalarTypeToUnsignedChar(); >>> scaled->Update(); >>> printf("Data Scaled ran\n"); >>> printf("* Scaled data arrays:\n"); >>> vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); >>> for(n=0; n< dataptr->GetNumberOfArrays(); n++) { >>> printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); >>> } >>> scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); >>> printf("* Range: %f - %f\n", range[0], range[1]); >>> vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); >>> filter->SetNullValue(0.0); >>> filter->SetInput(mask->GetOutput()); >>> filter->Update(); >>> printf("Filter ran\n"); >>> >>> vtkImageShiftScale *scaled = vtkImageShiftScale::New(); >>> scaled->SetInput(filter->GetOutput()); >>> scaled->SetScale(255.0); >>> scaled->SetOutputScalarTypeToUnsignedChar(); >>> scaled->Update(); >>> printf("Data Scaled ran\n"); >>> printf("* Scaled data arrays:\n"); >>> vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); >>> for(n=0; n< dataptr->GetNumberOfArrays(); n++) { >>> printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); >>> } >>> scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); >>> printf("* Range: %f - %f\n", range[0], range[1]); >>> >>> vtkVolumeRayCastCompositeFunction *compFunc = >>> vtkVolumeRayCastCompositeFunction::New(); >>> compFunc->SetCompositeMethodToInterpolateFirst(); >>> >>> vtkPiecewiseFunction *xf_Opacity = vtkPiecewiseFunction::New(); >>> xf_Opacity->AddPoint(0,0.0); >>> xf_Opacity->AddPoint(255,1.0); >>> >>> vtkColorTransferFunction *xf_Color = vtkColorTransferFunction::New(); >>> xf_Color->AddRGBPoint(0, 0, 0, 1); >>> xf_Color->AddRGBPoint(255, 0, 0, 1); >>> >>> vtkVolumeProperty *volProp = vtkVolumeProperty::New(); >>> volProp->SetColor(xf_Color); >>> volProp->SetScalarOpacity(xf_Opacity); >>> volProp->SetInterpolationTypeToLinear(); >>> >>> modelMapper = vtkVolumeRayCastMapper::New(); >>> modelMapper->SetInput(scaled->GetOutput()); >>> modelMapper->SetVolumeRayCastFunction(compFunc); >>>// modelMapper->Update(); >>> >>> printf("Mapper updated\n"); >>> vtkVolume *volume = vtkVolume::New(); >>> volume->SetMapper(modelMapper); >>> volume->SetProperty(volProp); >>>***END*** >>> >>>When I run this, tho, I get the following output: >>>=============== BEGIN OUTPUT ============== >>>Loading file test.vtk... >>>File loaded >>>* Range: 0.000000 - 1.000000 >>>Data Masked >>>* Range: 0.000000 - 1.000000 >>>Filter ran >>>Data Scaled ran >>>* Scaled data arrays: >>>* [0] "(null)" >>>* Range: 0.000000 - 253.000000 >>>Mapper updated >>>ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/Filtering/vtkExecutive.cxx, >>>line 519 >>>vtkStreamingDemandDrivenPipeline (0x109843b8): Non-forwarded requests >>>are not yet implemented. >>> >>>Segmentation fault (core dumped) >>>================ END OUTPUT ============ >>> >>>Any ideas? >>>-- >>>Randall Hand >>>http://www.yeraze.com >>> >>> >> >> > > From randall.hand at gmail.com Wed Feb 23 15:15:07 2005 From: randall.hand at gmail.com (Randall Hand) Date: Wed, 23 Feb 2005 14:15:07 -0600 Subject: [vtkusers] Fwd: Volume Rendering with multiple-array data In-Reply-To: <421CD6BD.1030700@kitware.com> References: <421CD0A4.5040608@kitware.com> <421CD6BD.1030700@kitware.com> Message-ID: I just updated to the latest CVS (not much changed), and tried again. No change. TExture2D works, RayCast segfaults. I'm using an SGI Irix system, 32-processor, 32G Ram Onyx340 with IR4's. Excerpt from an hinv: 32 600 MHZ IP35 Processors CPU: MIPS R14000 Processor Chip Revision: 2.4 FPU: MIPS R14010 Floating Point Chip Revision: 2.4 Main memory size: 32768 Mbytes Instruction cache size: 32 Kbytes Data cache size: 32 Kbytes On Wed, 23 Feb 2005 14:17:17 -0500, Mathieu Malaterre wrote: > Randall, > > Sorry I cannot reproduce any problem. You seems to be using VTK CVS, > can you update to today ? > Also if you are using an ATI card on linux, could you export : > > export LIBGL_ALWAYS_INDIRECT=1 > > before running your program ? Or if you have mesa on your system can you do: > > export LD_PRELOAD=/opt/Mesa/lib/libGL.so > > before running your program > > Thanks > Mathieu > > Randall Hand wrote: > > Sorry, yeah that's a cut/paste mistake. to prevent it again, I've > > attached my source file to this email. i've made alot of > > modifications, namely 2 defines at the top to control Texture2D vs > > Raycast mapping, & Onscreen vs Offscreen mapping. Everything I've > > done, i've been able to simply comment the "#define RAYCAST" line, and > > it works beautifully with Texture2d. > > > > I tried it just now with blow.vtk, & with ironProt.vtk and both do > > similar things. Sometimes they'll render initially, then crash as > > soon as I interact with it. Other times they just crash immediately. > > > > Thanks for the help :) > > > > > > On Wed, 23 Feb 2005 13:51:16 -0500, Mathieu Malaterre > > wrote: > > > >>Randall, > >> > >> I tried reproducing your bug with blow.vtk (part of VTKData) with no > >>luck. If you were able to reproduce the bug with blow.vtk I could look > >>into it, or just send my your dataset. > >> > >> BTW you script redeclare twice: > >> > >> > vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); > >> > filter->SetNullValue(0.0); > >> > filter->SetInput(mask->GetOutput()); > >> > filter->Update(); > >> > printf("Filter ran\n"); > >> > > >> > vtkImageShiftScale *scaled = vtkImageShiftScale::New(); > >> > scaled->SetInput(filter->GetOutput()); > >> > scaled->SetScale(255.0); > >> > scaled->SetOutputScalarTypeToUnsignedChar(); > >> > scaled->Update(); > >> > printf("Data Scaled ran\n"); > >> > printf("* Scaled data arrays:\n"); > >> > vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); > >> > for(n=0; n< dataptr->GetNumberOfArrays(); n++) { > >> > printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); > >> > } > >> > scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); > >> > printf("* Range: %f - %f\n", range[0], range[1]); > >> > >> Is this a copy/paste mistake ? > >> > >>Thanks, > >>Mathieu > >> > >> > >>Randall Hand wrote: > >> > >>>Still looking for any help with this... I've gotten it to work witht > >>>he vtkVolumeTextureMapper2D just fine, but simply replacing that with > >>>the vtkVolumeRayCastMapper calls results in all kinds of weird > >>>behaviour. > >>> > >>>Sometimes it exits with a segfault/core dump, but no error. > >>> > >>>Sometimes it runs to completion, but the volume rendering doesn't work > >>>(I get the text & outline, but no data). > >>> > >>>Most commonly I get anywhere from 1 to 3 messages like this: > >>>ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/Filtering/vtkExecutive.cxx, > >>>line 519 > >>>vtkStreamingDemandDrivenPipeline (0x1d6038d0): Non-forwarded requests > >>>are not yet implemented. > >>> > >>>And sometimes I get garbage like this: (looks like multiple errors interlaced) > >>>ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/FiltEEeRRrRRiOOnRRg::/ > >>> vIItnnk E//xvveiiczzu//thhioovmmeee.//crrxhhxaa,nn ddl//issnrrecc > >>>//5ee1zz9VV > >>>iivzzt//kUUStttiirlleiiattmiiieenssg//DVVeTTmKKa//nFFdiiDllrttieevrreiinnnPggi//pvvettlkkiEEnxxeee > >>>cc(uu0ttxii1vv0ee9..7cc1xxdxxb,,8 )ll:ii nnNeeo n55-11f99o > >>>(truncated by me, you get the point) > >>> > >>>The messages seem to occur after the ->Render() call, and during the > >>>part where I write it to disk. (with a vtkTIFFWriter). Sometimes it > >>>segfaults right after the error messages, and sometimes it just hangs > >>>indefinately. Once or twice it's even run to completion after the > >>>error messages, but the Volume Rendering never appears. I'm using > >>>OffScreen rendering with MangledMesa. > >>> > >>>Please? Anyone? > >>> > >>>---------- Forwarded message ---------- > >>>From: Randall Hand > >>>Date: Wed, 16 Feb 2005 11:29:16 -0600 > >>>Subject: Volume Rendering with multiple-array data > >>>To: vtkusers at vtk.org > >>> > >>> > >>>I have a VTK Dataset with with multiple data values per point. Each > >>>data point in my rectilinear grid has both a scalar (fractional > >>>occupancy) and a vector (flow velocity). I want to generate a volume > >>>rendering from this dataset of the scalar field, using the RayCast > >>>volume code. > >>> > >>>How do I get from the vtkDataSet that vtkDataSetReader outputs, to the > >>>vtkImageData that the volume rendering routines want? Currently I'm > >>>using a GaussianSPlatter to convert to an imageData, & a > >>>vtkImageShiftScale to convert from the 0-1float to a 0-255unsigned > >>>char. > >>> > >>>Here's an exerpt from my code: > >>> > >>>***BEGIN*** > >>> > >>> // Load model > >>> vtkDataSetReader *model = vtkDataSetReader::New(); > >>> model->SetFileName(filename); > >>> model->Update(); > >>> printf("File loaded\n"); > >>> model->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); > >>> printf("* Range: %f - %f\n", range[0], range[1]); > >>> > >>> vtkMaskPoints *mask = vtkMaskPoints::New(); > >>> mask->SetInput(model->GetOutput()); > >>> mask->RandomModeOn(); > >>> mask->SetMaximumNumberOfPoints(10); > >>> mask->Update(); > >>> printf("Data Masked\n"); > >>> mask->GetOutput()->GetPointData()->GetArray("Fraction")->GetRange(range,0); > >>> printf("* Range: %f - %f\n", range[0], range[1]); > >>> > >>> vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); > >>> filter->SetNullValue(0.0); > >>> filter->SetInput(mask->GetOutput()); > >>> filter->Update(); > >>> printf("Filter ran\n"); > >>> > >>> vtkImageShiftScale *scaled = vtkImageShiftScale::New(); > >>> scaled->SetInput(filter->GetOutput()); > >>> scaled->SetScale(255.0); > >>> scaled->SetOutputScalarTypeToUnsignedChar(); > >>> scaled->Update(); > >>> printf("Data Scaled ran\n"); > >>> printf("* Scaled data arrays:\n"); > >>> vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); > >>> for(n=0; n< dataptr->GetNumberOfArrays(); n++) { > >>> printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); > >>> } > >>> scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); > >>> printf("* Range: %f - %f\n", range[0], range[1]); > >>> vtkGaussianSplatter *filter = vtkGaussianSplatter::New(); > >>> filter->SetNullValue(0.0); > >>> filter->SetInput(mask->GetOutput()); > >>> filter->Update(); > >>> printf("Filter ran\n"); > >>> > >>> vtkImageShiftScale *scaled = vtkImageShiftScale::New(); > >>> scaled->SetInput(filter->GetOutput()); > >>> scaled->SetScale(255.0); > >>> scaled->SetOutputScalarTypeToUnsignedChar(); > >>> scaled->Update(); > >>> printf("Data Scaled ran\n"); > >>> printf("* Scaled data arrays:\n"); > >>> vtkPointData *dataptr = scaled->GetOutput()->GetPointData(); > >>> for(n=0; n< dataptr->GetNumberOfArrays(); n++) { > >>> printf("* [%i] \"%s\"\n", n, dataptr->GetArrayName(n)); > >>> } > >>> scaled->GetOutput()->GetPointData()->GetArray(0)->GetRange(range,0); > >>> printf("* Range: %f - %f\n", range[0], range[1]); > >>> > >>> vtkVolumeRayCastCompositeFunction *compFunc = > >>> vtkVolumeRayCastCompositeFunction::New(); > >>> compFunc->SetCompositeMethodToInterpolateFirst(); > >>> > >>> vtkPiecewiseFunction *xf_Opacity = vtkPiecewiseFunction::New(); > >>> xf_Opacity->AddPoint(0,0.0); > >>> xf_Opacity->AddPoint(255,1.0); > >>> > >>> vtkColorTransferFunction *xf_Color = vtkColorTransferFunction::New(); > >>> xf_Color->AddRGBPoint(0, 0, 0, 1); > >>> xf_Color->AddRGBPoint(255, 0, 0, 1); > >>> > >>> vtkVolumeProperty *volProp = vtkVolumeProperty::New(); > >>> volProp->SetColor(xf_Color); > >>> volProp->SetScalarOpacity(xf_Opacity); > >>> volProp->SetInterpolationTypeToLinear(); > >>> > >>> modelMapper = vtkVolumeRayCastMapper::New(); > >>> modelMapper->SetInput(scaled->GetOutput()); > >>> modelMapper->SetVolumeRayCastFunction(compFunc); > >>>// modelMapper->Update(); > >>> > >>> printf("Mapper updated\n"); > >>> vtkVolume *volume = vtkVolume::New(); > >>> volume->SetMapper(modelMapper); > >>> volume->SetProperty(volProp); > >>>***END*** > >>> > >>>When I run this, tho, I get the following output: > >>>=============== BEGIN OUTPUT ============== > >>>Loading file test.vtk... > >>>File loaded > >>>* Range: 0.000000 - 1.000000 > >>>Data Masked > >>>* Range: 0.000000 - 1.000000 > >>>Filter ran > >>>Data Scaled ran > >>>* Scaled data arrays: > >>>* [0] "(null)" > >>>* Range: 0.000000 - 253.000000 > >>>Mapper updated > >>>ERROR: In /viz/home/rhand/src/ezViz/Utilities/VTK/Filtering/vtkExecutive.cxx, > >>>line 519 > >>>vtkStreamingDemandDrivenPipeline (0x109843b8): Non-forwarded requests > >>>are not yet implemented. > >>> > >>>Segmentation fault (core dumped) > >>>================ END OUTPUT ============ > >>> > >>>Any ideas? > >>>-- > >>>Randall Hand > >>>http://www.yeraze.com > >>> > >>> > >> > >> > > > > > > -- Randall Hand http://www.yeraze.com From ferdinando.rodriguez at imperial.ac.uk Wed Feb 23 15:18:44 2005 From: ferdinando.rodriguez at imperial.ac.uk (Ferdinando Rodriguez y Baena) Date: Wed, 23 Feb 2005 20:18:44 -0000 Subject: [vtkusers] vtkFollower problem Message-ID: <015b01c519e4$dfb38810$64d0d30a@lupus2> Dear all, I am trying to get a vtkFollower to track a particular object on screen i.e. I would like the X,Y,Z coordinates of the follower to move with a particular mesh on screen, but the orientation to stay fixed ( facing the screen). I setup an assembly with a mesh (representing a tool) and two followers, that should track the extremities of the tool. On first display everything looks alright. However, as soon as I SetCamera() in each Follower, all relative information between them and the tool seems to be lost. The difference in position along the depth of the tool is converted into difference in position with respect to the screen i.e. once the camera is set, the position between the two followers never changes, while there should be relative movement between them as the two followers are placed at different depths. Is this a bug, or is this the way vtkFollower is intended to work? And if the latter is the case, does anyone know of an easy way to accomplish what I am trying to do? Any help would be much appreciated. Thanks! Ferdinando -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiksed at yahoo.com Wed Feb 23 19:00:45 2005 From: jiksed at yahoo.com (jiksed) Date: Wed, 23 Feb 2005 16:00:45 -0800 (PST) Subject: [vtkusers] Volume rendering of vtkUnstructuredGrid Message-ID: <20050224000045.15447.qmail@web61108.mail.yahoo.com> No one responded to my last email. Now I cut my qestion short. Here are a few errors I got while compiling my program: E2316: SetScalarModeToUseCellData() is not a member of vtkUnstructuredGridVolumeRayCastMapper E2316: SetVolumeRayCastFunction() is not a member of vtkUnstructuredGridVolumeRayCastMapper There is no example or test about how to use vtkUnstructuredGridBunykRayCastFunction. IntermixedUnstructuredGrid.tcl did not use any raycast function either. Any comments about this? I am using VTK4.4 on WinXP. Will someone please tell me what's wrong? Thanks a bunch. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at opes.com.au Thu Feb 24 02:35:58 2005 From: paul at opes.com.au (Paul Tait) Date: Thu, 24 Feb 2005 15:35:58 +0800 Subject: [vtkusers] vtkCamera to follow vtkActor Message-ID: <011b01c51a43$7cb95960$af0aa8c0@DEEPTHROAT> Hi I have several actors in a scene and am using AddPosition(0, 0, n) to move them interactively up and down vertically. This means actors move off the bottom of the screen so I have to use the mouse middlebutton to follow them. How can I program vtk so that when I move my actors the actor in the centre of the screen (focalpoint?) stays centred ? Thanks Paul -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 From goodwin.lawlor at ucd.ie Thu Feb 24 04:11:54 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Thu, 24 Feb 2005 09:11:54 -0000 Subject: [vtkusers] Re: vtkCamera to follow vtkActor References: <011b01c51a43$7cb95960$af0aa8c0@DEEPTHROAT> Message-ID: Hi Paul, Try the vtkRenderer::ResetCamera() method. You might also need vtkRenderer::ResetCameraClippingRange() method hth Goodwin "Paul Tait" wrote in message news:011b01c51a43$7cb95960$af0aa8c0 at DEEPTHROAT... > Hi > > I have several actors in a scene and am using AddPosition(0, 0, n) to > move them interactively up and down vertically. This means actors move > off the bottom of the screen so I have to use the mouse middlebutton to > follow them. How can I program vtk so that when I move my actors the > actor in the centre of the screen (focalpoint?) stays centred ? > > Thanks Paul > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 > > > _______________________________________________ > 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 > From agalmat at hotmail.com Thu Feb 24 05:47:53 2005 From: agalmat at hotmail.com (Alejandro Galindo Mateo) Date: Thu, 24 Feb 2005 11:47:53 +0100 Subject: [vtkusers] vtkAppendPolyData Message-ID: Hello vtk users, I have a lot of vtkPolyData so I put it in a vtkAppendPolyData, but when I try to set the input of a filter as vtkAppendPolyData I get an error because the filter acepts vtkPolyData but doesn?t acept vtkAppendPolyData. How can I transform vtkAppendPolyData with all the vtkPolyData into a single vtkPolyData or something like this? Thanks for all, From dsaussus at fugro-jason.com Thu Feb 24 06:05:17 2005 From: dsaussus at fugro-jason.com (Denis Saussus) Date: Thu, 24 Feb 2005 12:05:17 +0100 Subject: [vtkusers] vtkAppendPolyData Message-ID: Unless I misunderstood, just use apd = vtk.vtkAppendPolyData() apd.GetOutput() <== use this as the input to the filter requiring vtkPolyData hth Denis -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org]On Behalf Of Alejandro Galindo Mateo Sent: Thursday, February 24, 2005 11:48 AM To: vtkusers at vtk.org Subject: [vtkusers] vtkAppendPolyData Hello vtk users, I have a lot of vtkPolyData so I put it in a vtkAppendPolyData, but when I try to set the input of a filter as vtkAppendPolyData I get an error because the filter acepts vtkPolyData but doesn?t acept vtkAppendPolyData. How can I transform vtkAppendPolyData with all the vtkPolyData into a single vtkPolyData or something like this? Thanks for all, _______________________________________________ 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 From yianisn at gmail.com Thu Feb 24 06:30:00 2005 From: yianisn at gmail.com (Yianis Nikolaou) Date: Thu, 24 Feb 2005 13:30:00 +0200 Subject: [vtkusers] vtkAppendPolyData In-Reply-To: References: Message-ID: > > How can I transform vtkAppendPolyData with all the vtkPolyData into a single > vtkPolyData or something like this? > use vtkAppendPolyData->GetOutput(); before that you might have to call vtkAppendPolyData->Update() to force the update of the pipeline yianis nikolaou From hvidal at tesseract-tech.com Thu Feb 24 08:28:54 2005 From: hvidal at tesseract-tech.com (H.Vidal, Jr.) Date: Thu, 24 Feb 2005 08:28:54 -0500 Subject: [vtkusers] test Message-ID: <421DD696.1090300@tesseract-tech.com> sorry had a lapsed domain and wanted to see if I am still here. From hanjo013 at student.liu.se Thu Feb 24 08:35:43 2005 From: hanjo013 at student.liu.se (Hanna Jonsson) Date: Thu, 24 Feb 2005 14:35:43 +0100 Subject: [vtkusers] Ensight-reader Message-ID: <4e9d494eb2ba.4eb2ba4e9d49@liu.se> Hi, I am trying to read ensight-files in vtk. I have tried many different files (ensight 6 and gold as well as binary and ascii) and some work and some aren't. The only differences that I can see is that the files that aren't working have one or no output and the other files have several outputs, using reader->GetNumberOfOutputs(). My question is about the GetNumberOfOutputs, what does the number say? Has anyone had the same problem? Is there anyone that has been working with ensight-files and visualised them in vtk? How can I get hold of the different parts of the .geo file, so that I can be able to put each part into separate actors? //Hanna From mathieu.malaterre at kitware.com Thu Feb 24 11:32:41 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Thu, 24 Feb 2005 11:32:41 -0500 Subject: [vtkusers] Volume rendering of vtkUnstructuredGrid In-Reply-To: <20050224000045.15447.qmail@web61108.mail.yahoo.com> References: <20050224000045.15447.qmail@web61108.mail.yahoo.com> Message-ID: <421E01A9.60600@kitware.com> jiksed There is already another thread on vtkusers: http://public.kitware.com/pipermail/vtkusers/2004-May/073865.html There are examples on how to use a vtkUnstructuredGridVolumeRayCastMapper: http://www.vtk.org/doc/nightly/html/c2_vtk_e_7.html#c2_vtk_e_vtkUnstructuredGridVolumeRayCastMapper and tests: http://www.vtk.org/doc/nightly/html/c2_vtk_t_14.html#c2_vtk_t_vtkUnstructuredGridVolumeRayCastMapper You can override the default RayCastfunction of vtkUnstructuredGridVolumeRayCastMapper, by using: vtkUnstructuredGridVolumeRayCastMapper::SetRayCastFunction(vtkUnstructuredGridVolumeRayCastFunction * f) http://www.vtk.org/doc/nightly/html/classvtkUnstructuredGridVolumeRayCastMapper.html#z4108_0 But keep in mind that vtkUnstructuredGridBunykRayCastFunction *is* the default RayCastFunction so you don't need anything fancy in your code to use it. Just instanciate the vtkUnstructuredGridVolumeRayCastMapper HTH Mathieu jiksed wrote: > No one responded to my last email. Now I cut my qestion short. Here are > a few errors I got > while compiling my program: > > E2316: SetScalarModeToUseCellData() is not a member of > vtkUnstructuredGridVolumeRayCastMapper > E2316: SetVolumeRayCastFunction() is not a member of > vtkUnstructuredGridVolumeRayCastMapper > > There is no example or test about how to use > vtkUnstructuredGridBunykRayCastFunction. > IntermixedUnstructuredGrid.tcl did not use any raycast function either. > Any comments > about this? I am using VTK4.4 on WinXP. > > Will someone please tell me what's wrong? Thanks a bunch. > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.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 From kmorel at sandia.gov Thu Feb 24 13:37:18 2005 From: kmorel at sandia.gov (Moreland, Kenneth) Date: Thu, 24 Feb 2005 11:37:18 -0700 Subject: [vtkusers] Volume rendering of vtkUnstructuredGrid Message-ID: <7137A9E1D1768C44BE7DF11D30FAB32307319E@ES21SNLNT.srn.sandia.gov> First error: I do not think the SetScalarModeToUseCellData method exists in the 4.4 release of VTK. At the time, only point data was supported (and if I recall you could only use the active scalars). The CVS trunk has this method and the ability to render cell data. Second error: To reiterate what Mathieu said, the name of the method is SetRayCastFunction, not SetVolumeRayCastFunction. However, there is no reason to call this since a default vtkUnstructuredGridBunykRayCastFunction is created for you and that is the only concrete implementation of vtkUnstructuredGridVolumeRayCastFunction available. -Ken **** Kenneth Moreland *** Sandia National Laboratories *********** *** *** *** email: kmorel at sandia.gov ** *** ** phone: (505) 844-8919 *** fax: (505) 845-0833 ________________________________ From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of jiksed Sent: Wednesday, February 23, 2005 5:01 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] Volume rendering of vtkUnstructuredGrid No one responded to my last email. Now I cut my qestion short. Here are a few errors I got while compiling my program: E2316: SetScalarModeToUseCellData() is not a member of vtkUnstructuredGridVolumeRayCastMapper E2316: SetVolumeRayCastFunction() is not a member of vtkUnstructuredGridVolumeRayCastMapper There is no example or test about how to use vtkUnstructuredGridBunykRayCastFunction. IntermixedUnstructuredGrid.tcl did not use any raycast function either. Any comments about this? I am using VTK4.4 on WinXP. Will someone please tell me what's wrong? Thanks a bunch. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ykyang at gmail.com Thu Feb 24 17:10:18 2005 From: ykyang at gmail.com (Yi-Kun Yang) Date: Thu, 24 Feb 2005 15:10:18 -0700 Subject: [vtkusers] vtkMesaActor for Java Message-ID: <3db0b3040502241410cf82be6@mail.gmail.com> Dear All, I have compiled VTK-4.2 with Java wrapping. When I tried to use vtkMesaActor, vtkMesaPolyDataMapper, ..., I found that those Java files were not compiled. Could someone let me know how to modify the CMake configuration files so those Java files are included in the compilation list. Thank you. -- //// // Yi-Kun Yang // Research Associate // Dept. of Chemical Engineering // University of Utah // TEL:(801)585-5594 // http://www.perc.utah.edu/Members/yang //// From ykyang at gmail.com Thu Feb 24 17:30:29 2005 From: ykyang at gmail.com (Yi-Kun Yang) Date: Thu, 24 Feb 2005 15:30:29 -0700 Subject: [vtkusers] vtkMesa with Java Message-ID: <3db0b304050224143079adeb66@mail.gmail.com> Dear All, I have compiled VTK-4.2 with Java wrapping. When I tried to use vtkMesaActor, vtkMesaPolyDataMapper, ..., I found that those Java files were not compiled. Could someone let me know how to modify the CMake configuration files so those Java files are included in the compilation list. Thank you. -- //// // Yi-Kun Yang // Research Associate // Dept. of Chemical Engineering // University of Utah // TEL:(801)585-5594 // http://www.perc.utah.edu/Members/yang //// From ykyang at gmail.com Thu Feb 24 19:04:24 2005 From: ykyang at gmail.com (Yi-Kun Yang) Date: Thu, 24 Feb 2005 17:04:24 -0700 Subject: [vtkusers] vtkMesa with Java Message-ID: <3db0b304050224160457d1c595@mail.gmail.com> Dear All, I have compiled VTK-4.2 with Java wrapping. When I tried to use vtkMesaActor, vtkMesaPolyDataMapper, ..., I found that those Java files were not compiled. Could someone let me know how to modify the CMake configuration files so those Java files are included in the compilation list. Thank you. -- //// // Yi-Kun Yang // Research Associate // Dept. of Chemical Engineering // University of Utah // TEL:(801)585-5594 // http://www.perc.utah.edu/Members/yang //// From paul at opes.com.au Thu Feb 24 21:37:52 2005 From: paul at opes.com.au (Paul Tait) Date: Fri, 25 Feb 2005 10:37:52 +0800 Subject: [vtkusers] Re: vtkCamera to follow vtkActor In-Reply-To: <001101c51adb$9b13c010$0c01a8c0@Renasci> Message-ID: <002101c51ae3$014ba440$af0aa8c0@DEEPTHROAT> Closer.... I'm not specifically interested in "one" of "one or two" the actors, just the region in the centre of the screen -----Original Message----- From: Goodwin Lawlor [mailto:goodwin.lawlor at ucd.ie] Sent: Friday, 25 February 2005 9:45 AM To: Paul Tait Subject: Re: [vtkusers] Re: vtkCamera to follow vtkActor In that case you'll have to set up your camera manually. You need to set the camera focalpoint, position and viewup To keep focused on a particular actor, try something like: ren->GetActiveCamera()->SetFocalPoint(actor->GetCenter()); ----- Original Message ----- From: "Paul Tait" To: "'Goodwin Lawlor'" Sent: Friday, February 25, 2005 12:50 AM Subject: RE: [vtkusers] Re: vtkCamera to follow vtkActor That?s not excactly what I had in mind. What I want to happen is this. As the actors move further and further apart I will zoom in on one or two. The next time I magnify the vertical distance I want these one or two actors to remain in the centre of the screen and not move off the top or bottom. I basically want to be able to say to vtk is this is now the area of interest stay there even when I move the actors. Paul -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Goodwin Lawlor Sent: Thursday, 24 February 2005 5:12 PM To: vtkusers at public.kitware.com Subject: [vtkusers] Re: vtkCamera to follow vtkActor Hi Paul, Try the vtkRenderer::ResetCamera() method. You might also need vtkRenderer::ResetCameraClippingRange() method hth Goodwin "Paul Tait" wrote in message news:011b01c51a43$7cb95960$af0aa8c0 at DEEPTHROAT... > Hi > > I have several actors in a scene and am using AddPosition(0, 0, n) to > move them interactively up and down vertically. This means actors move > off the bottom of the screen so I have to use the mouse middlebutton > to follow them. How can I program vtk so that when I move my actors > the actor in the centre of the screen (focalpoint?) stays centred ? > > Thanks Paul > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 > > > _______________________________________________ > 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 -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 From pietro.cerveri at biomed.polimi.it Fri Feb 25 02:37:10 2005 From: pietro.cerveri at biomed.polimi.it (Pietro Cerveri) Date: Fri, 25 Feb 2005 08:37:10 +0100 Subject: [vtkusers] VTK stops rendering during animation after interaction Message-ID: <5.1.0.14.2.20050225083413.02428830@mail.polimi.it> Hi my name is Pieto Cerveri from Italy. I am experiencing the same drawback. I implemented a multithreading application for managing mouse interaction during animation but the application stops rendering or comes out with error when interacting with the mouse (rotating the camera). Have you found a solution ? Please let me know in positive case. Thank you, in advance Pietro Pietro Cerveri, Ph.D. Biomedical Engineering Department Politecnico di Milano via Golgi 39 - 20133 Milano, Italy Tel. Office +39-02-2399-3369 Fax. +39-02-2399-3360 E-Mail. pietro.cerveri at biomed.polimi.it From pietro.cerveri at biomed.polimi.it Fri Feb 25 02:37:37 2005 From: pietro.cerveri at biomed.polimi.it (Pietro Cerveri) Date: Fri, 25 Feb 2005 08:37:37 +0100 Subject: [vtkusers] VTK stops rendering during animation after interaction Message-ID: <5.1.0.14.2.20050225083732.0242fe30@mail.polimi.it> Hi my name is Pieto Cerveri from Italy. I am experiencing the same drawback. I implemented a multithreading application for managing mouse interaction during animation but the application stops rendering or comes out with error when interacting with the mouse (rotating the camera). Have you found a solution ? Please let me know in positive case. Thank you, in advance Pietro Pietro Cerveri, Ph.D. Biomedical Engineering Department Politecnico di Milano via Golgi 39 - 20133 Milano, Italy Tel. Office +39-02-2399-3369 Fax. +39-02-2399-3360 E-Mail. pietro.cerveri at biomed.polimi.it From nNunn at ausport.gov.au Fri Feb 25 05:41:53 2005 From: nNunn at ausport.gov.au (Nigel Nunn) Date: Fri, 25 Feb 2005 21:41:53 +1100 Subject: [vtkusers] VTK stops rendering during animation after interaction Message-ID: On Friday, 25 February 2005 6:38 PM Pietro Cerveri [pietro.cerveri at biomed.polimi.it] wrote > I implemented a multithreading application for managing > mouse interaction during animation but the application > stops rendering or comes out with error when interacting > with the mouse (rotating the camera). Need to be careful when more than one thread attempts to touch the graphics pipeline. Can you describe what your threads are attempting to do? What works for me is to have those threads which create (or change) data send a message to the window managing the Vtk pipeline, then allow that window to update itself in a predictable way. Nigel From jcplatt at lineone.net Fri Feb 25 05:50:25 2005 From: jcplatt at lineone.net (John Platt) Date: Fri, 25 Feb 2005 10:50:25 -0000 Subject: [vtkusers] Rendering progress Message-ID: <000001c51b27$d3de8fa0$134b2850@pacsys4> Hi Users, This might be a naive question but is there any way of getting a Win32 render window to show the image as it gets its data from the renderer rather than writing it to a buffer and then swapping the buffers? I think this might be more interesting than viewing a blank screen until rendering is complete. I tried SwapBuffersOff() but I get no drawing and a window littered with remnants of menus. Many thanks. John. -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.yang at dkfz-heidelberg.de Fri Feb 25 06:21:22 2005 From: s.yang at dkfz-heidelberg.de (Siwei Yang) Date: Fri, 25 Feb 2005 12:21:22 +0100 Subject: [vtkusers] Building with error: relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC Message-ID: <421F0A32.9090506@dkfz.de> Hello everyone, I 'm building VTK 4.2, but get the following error : Build with error: relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC And the latest version fails also. I 've tested with -fPIC, but it didn't work. Does anyone have the same problem? My computer is: CPU : AMD Opteron(tm) Processor 144 (64 bit ) cpu MHz : 1792.663 cache size : 1024 KB and I use SUSE linux 9.1 By the way, it works all right with 32 bit mashine . best wishes Siwei Yang From steven.robbins at videotron.ca Fri Feb 25 08:36:35 2005 From: steven.robbins at videotron.ca (Steve M. Robbins) Date: Fri, 25 Feb 2005 08:36:35 -0500 Subject: [vtkusers] java's vtkPanel does too much Message-ID: <20050225133635.GA29284@nyongwa.montreal.qc.ca> Hi, A question to fellow Java/VTK users. We're going to use VTK with our own handling for mouse and keyboard events. However the base java Component -- vtkPanel -- registers mouse and keyboard listeners, which I find inconvenient. For playing with VTK, I resorted to deriving a "bare" vtk panel class: public class vtkBarePanel extends vtkPanel { public vtkBarePanel() { removeMouseListener(this); removeMouseMotionListener(this); removeKeyListener(this); } } This strikes me as inverted: the base class should be bare, with a subclass that adds default mouse & keyboard handling. Don't you agree? I'm prepared to submit a patch to fix this by introducing vtkBarePanel, moving the native methods there, and having vtkPanel derive from it. I'm mainly wondering about naming. My preference would be that the compoment be called vtkCanvas, since it derives from an AWT Canvas. But that name's already taken for a subclass of vtkPanel that uses render window interactor! Thus, I'm proposing vtkBarePanel as a compromise. I'm open to suggestions. -Steve [Incidentally, I've played a /little/ bit with example code using render window interactor and find it is very easy to crash the JVM with a segfault in VTK code. I stress that I haven't done too much playing, but I'm curious: are others out there using render window interactors with java?] From jeff at cdnorthamerica.com Fri Feb 25 08:57:12 2005 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Fri, 25 Feb 2005 08:57:12 -0500 Subject: [vtkusers] java's vtkPanel does too much In-Reply-To: <20050225133635.GA29284@nyongwa.montreal.qc.ca> References: <20050225133635.GA29284@nyongwa.montreal.qc.ca> Message-ID: <421F2EB8.5050805@cdnorthamerica.com> Hi Steve, vtkPanel and vtkCanvas are just example code to show how things work, and are ok for basic interaction - the only real important things are how the native methods are exposed. Because the native methods are mapped to vtkPanel (see Common/vtkJavaAwt.h), the base class needs to be vtkPanel. That is your tie into the c++ world. That being said, I would recommend overriding vtkPanel.java in your own build area - just make sure your package name is vtk/vtkPanel.java and then you can do whatever you want (make sure you retain the native methods). If there are bugs in vtkCanvas, please submit a bug report, or post some sample code so we can see what's going on. In the long run, we should probably provide a base class with only native methods which can then be extended, without the above tinkering. Probably call it vtkNativeHook or something obvious, then vtkPanel is a subclass. This will require changes to the c++ code in vtkJavaAwt.h to change the mangled jni method signatures, but it is trivial. Sublcassing as you have suggested below will not work. Regards, -Jeff Steve M. Robbins wrote: >Hi, > >A question to fellow Java/VTK users. > >We're going to use VTK with our own handling for mouse and keyboard >events. However the base java Component -- vtkPanel -- registers >mouse and keyboard listeners, which I find inconvenient. > >For playing with VTK, I resorted to deriving a "bare" vtk panel class: > > > public class vtkBarePanel extends vtkPanel > { > public vtkBarePanel() > { > removeMouseListener(this); > removeMouseMotionListener(this); > removeKeyListener(this); > } > } > > >This strikes me as inverted: the base class should be bare, with a subclass >that adds default mouse & keyboard handling. Don't you agree? > >I'm prepared to submit a patch to fix this by introducing >vtkBarePanel, moving the native methods there, and having vtkPanel >derive from it. > >I'm mainly wondering about naming. My preference would be that the >compoment be called vtkCanvas, since it derives from an AWT Canvas. >But that name's already taken for a subclass of vtkPanel that uses >render window interactor! Thus, I'm proposing vtkBarePanel as a >compromise. I'm open to suggestions. > >-Steve > >[Incidentally, I've played a /little/ bit with example code using >render window interactor and find it is very easy to crash the JVM >with a segfault in VTK code. I stress that I haven't done too much >playing, but I'm curious: are others out there using render window >interactors with java?] > >_______________________________________________ >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 > > > > From chenxin48 at hotmail.com Fri Feb 25 09:32:25 2005 From: chenxin48 at hotmail.com (=?gb2312?B?s8Ig6r8=?=) Date: Fri, 25 Feb 2005 22:32:25 +0800 Subject: [vtkusers] Build C++ applications without using CMake Message-ID: Hi, I'm a beginner. I want to know is there a way to invoke ITK or VTK functions in other C++ applications without writting the CMakeLists? For instance, involving all the libraries or headers in VC++6.0 and just call them. It seems that someone else has asked similar questions but I can't find the anwser neither in FAQ nor the mailling list user guide. I would appreciate if you can help me. Thanks a lot. Chen _________________________________________________________________ ???? MSN Explorer: http://explorer.msn.com/lccn From brad.king at kitware.com Fri Feb 25 09:38:30 2005 From: brad.king at kitware.com (Brad King) Date: Fri, 25 Feb 2005 09:38:30 -0500 Subject: [vtkusers] Fwd: Volume Rendering with multiple-array data In-Reply-To: References: <421CD6BD.1030700@kitware.com> <421DE920.5070104@kitware.com> <421DFC2B.4020300@kitware.com> <421E7E4C.1030005@kitware.com> Message-ID: <421F3866.4060808@kitware.com> Randall Hand wrote: > [1001] [rhand at prism:~] > [8:09:43am]% gcc -v > Reading specs from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.2.2/specs > Configured with: ../configure --prefix=/usr/freeware > --enable-version-specific-runtime-libs --disable-shared > --enable-threads --enable-haifa --disable-c-mbchar > Thread model: single > gcc version 3.2.2 > [1002] [rhand at prism:~] > [8:09:46am]% > > Now, this goes a little into uncharted territory for me :) Does > "Thread model: single" mean multithreading support isn't enabled? I > remember having a simliar problem (on a different SGI system) with > VRJuggler a few years ago with non-thread-safe STL libraries, that was > resolved by an upgrade. Yes, and this is almost certainly the problem. You'll need to refer to GCC documentation for your platform to see how to enable threads. -Brad From agalmat at hotmail.com Fri Feb 25 11:00:00 2005 From: agalmat at hotmail.com (Alejandro Galindo Mateo) Date: Fri, 25 Feb 2005 17:00:00 +0100 Subject: [vtkusers] Problem with vtkPolyData Message-ID: Hello vtk users, I made my own vtkPolyData by inserting points and scalars then I set it as Input in a vtkAppedPolyData, but when I got the output of the vtkAppedPolyData and wrote it in a file the file was empty. I tried the same with the output of a filter that returns a PolyData and the data was written correctly so I think the problem is that I need to update my PolyData or something like that. I tried with Update but I got the same result. Can anyone help me? Thanks for all, From jnorris at mcs.anl.gov Fri Feb 25 11:24:02 2005 From: jnorris at mcs.anl.gov (Johnny C. Norris II) Date: Fri, 25 Feb 2005 10:24:02 -0600 Subject: [vtkusers] Error in vtkAppendPolyData Message-ID: <421F5122.9010703@mcs.anl.gov> Or maybe I'm just doing something wrong. In my vis app, users can apply cutting planes to whatever they're visualizing. If they're visualizing the surface, then I use vtkClipPolyData to clip the output of vtkDataSetSurfaceFilter, and combine that with the output of a vtkCutter to cap the hole in the surface. Anyway, something doesn't work right if the initial data has cell data and 2D cells. But vtkAppendPolyData doesn't process the cell data correctly. I've appended a code example that demonstrates the problem (change the "#define CLIP" from 0 to 1 and recompile to see the error), as well as two images illustrating the error. Notice how the colors are obviously incorrect in the clipped object. I'm using the latest VTK from CVS, BTW. Any help here would be greatly appreciated. Thanks! John -- John Norris Research Programmer Center for Simulation of Advanced Rockets http://www.uiuc.edu/ph/www/jnorris -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: vtktest.cpp URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.jpg Type: image/jpeg Size: 34054 bytes Desc: not available URL: From yasser.khadra at creatis.insa-lyon.fr Fri Feb 25 11:27:51 2005 From: yasser.khadra at creatis.insa-lyon.fr (yasser.khadra) Date: Fri, 25 Feb 2005 17:27:51 +0100 Subject: [vtkusers] (no subject) Message-ID: <5.0.2.1.2.20050225171405.00a82ff8@pop3.creatis.insa-lyon.fr> i'm trying to develop some algorithm for my thesis. Now i need to extract the curvature value at each point of 3d volume which represented by vtkPolyData object. can I do that from vtkCurvatures? if yes, How? thank you ________________________________________ Yasser KHADRA -- Doctorat Images et Syst?mes CREATIS, UMR 5515 INSA - B?timent Blaise Pascal 7, Rue Jean Capelle -- Campus de la Doua 69621 Villeurbanne Cedex France Tel: 33 4 72 43 64 67 Fax: 33 4 72 43 63 12 e-mail: yasser.khadra at creatis.insa-lyon.fr http://www.creatis.insa-lyon.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From ykyang at gmail.com Fri Feb 25 11:33:01 2005 From: ykyang at gmail.com (Yi-Kun Yang) Date: Fri, 25 Feb 2005 09:33:01 -0700 Subject: [vtkusers] vtkMesa with Java Message-ID: <3db0b30405022508335023f406@mail.gmail.com> Dear All, I have compiled VTK-4.2 with Java wrapping. When I tried to use vtkMesaActor, vtkMesaPolyDataMapper, ..., I found that those Java files were not compiled. Could someone let me know how to modify the CMake configuration files so those Mesa Java files are included in the compilation list. Thank you. -- //// // Yi-Kun Yang // Research Associate // Dept. of Chemical Engineering // University of Utah // TEL:(801)585-5594 // http://www.perc.utah.edu/Members/yang //// From randall.hand at gmail.com Fri Feb 25 11:33:18 2005 From: randall.hand at gmail.com (Randall Hand) Date: Fri, 25 Feb 2005 10:33:18 -0600 Subject: [vtkusers] Creating Volume-Rendering compatible data Message-ID: I'm using the following code to "pad" the data the way I want for rendering: It takes my Scalar+Vector dataset and adds a field that's a 2-component Scalar (Original Scalar + Vector Magnitude), both scaled between 0 & 255. I want to map Opacity to the first component, & color through a lookup table to the 2nd component. But when it's done, I still can't hand it off to the RayCast mapper because 1) It's not an "ImageData" 2) It's not "unsigned char's", it's "floats" How can I get from what I have to something that's RayCastMapper compatible? *snip* vtkDataSetReader *model = vtkDataSetReader::New(); model->SetFileName(filename); model->Update(); char function[128]; vtkArrayCalculator *addMag = vtkArrayCalculator::New(); addMag->SetInput(model->GetOutput()); addMag->AddVectorArrayName("Velocity", 0); model->GetOutput()->GetPointData()->GetArray("Velocity")->GetRange(range, -1); sprintf(function, "mag(Velocity) * %f", 255.0 / (range[1] - range[0])); addMag->SetFunction(function); addMag->SetResultArrayName("Magnitude"); addMag->Update(); printf("**************************************************\n"); PrintStatistics(addMag); PrintStatistics(addMag->GetOutput());/*}}}*/ // Scale Fraction field {{{ vtkArrayCalculator *scaled = vtkArrayCalculator::New(); scaled->SetInput(addMag->GetOutput()); scaled->AddScalarArrayName("Fraction", 0); scaled->SetFunction("Fraction * 255.0"); scaled->SetResultArrayName("ScaledFraction"); scaled->Update(); printf("**************************************************\n"); PrintStatistics(scaled); PrintStatistics(scaled->GetOutput());/*}}}*/ vtkMergeFields *doubleScalar = vtkMergeFields::New(); doubleScalar->SetInput(scaled->GetOutput()); doubleScalar->SetOutputField("Combined", vtkMergeFields::POINT_DATA); doubleScalar->SetNumberOfComponents(2); doubleScalar->Merge(0, "Magnitude", 0); doubleScalar->Merge(1, "ScaledFraction", 0); doubleScalar->Update(); PrintStatistics(doubleScalar); PrintStatistics(doubleScalar->GetOutput()); *snip* -- Randall Hand http://www.yeraze.com From yasser.khadra at creatis.insa-lyon.fr Fri Feb 25 11:34:29 2005 From: yasser.khadra at creatis.insa-lyon.fr (yasser.khadra) Date: Fri, 25 Feb 2005 17:34:29 +0100 Subject: [vtkusers] extract the curvature value Message-ID: <5.0.2.1.2.20050225173358.00ad3d98@pop3.creatis.insa-lyon.fr> i'm trying to develop some algorithm for my thesis. Now i need to extract the curvature value at each point of 3d volume which represented by vtkPolyData object. can I do that from vtkCurvatures? if yes, How? thank you ________________________________________ Yasser KHADRA -- Doctorat Images et Syst?mes CREATIS, UMR 5515 INSA - B?timent Blaise Pascal 7, Rue Jean Capelle -- Campus de la Doua 69621 Villeurbanne Cedex France Tel: 33 4 72 43 64 67 Fax: 33 4 72 43 63 12 e-mail: yasser.khadra at creatis.insa-lyon.fr http://www.creatis.insa-lyon.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From randall.hand at gmail.com Fri Feb 25 11:35:38 2005 From: randall.hand at gmail.com (Randall Hand) Date: Fri, 25 Feb 2005 10:35:38 -0600 Subject: [vtkusers] Fwd: Volume Rendering with multiple-array data In-Reply-To: <421F3866.4060808@kitware.com> References: <421DE920.5070104@kitware.com> <421DFC2B.4020300@kitware.com> <421E7E4C.1030005@kitware.com> <421F3866.4060808@kitware.com> Message-ID: Ok, we just upgraded GCC to the latest SGI-published version. [1024] [rhand at prism:~/src/offscreen-raycast] [10:34:28am]% gcc -v Reading specs from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/specs Configured with: ../configure --prefix=/usr/freeware --enable-version-specific-runtime-libs --disable-shared --enable-threads --enable-haifa --enable-libgcj --disable-c-mbchar Thread model: single gcc version 3.3 [1025] [rhand at prism:~/src/offscreen-raycast] [10:34:29am]% You can see --enable-threads, but "Thread model:single" is still there. RayCast'ing still crashes with >1 threads enabled. The admins are currently downloading source for the latest 3.4 release, and will have that installed in a little while. I'll let ya know how that goes. On Fri, 25 Feb 2005 09:38:30 -0500, Brad King wrote: > Randall Hand wrote: > > [1001] [rhand at prism:~] > > [8:09:43am]% gcc -v > > Reading specs from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.2.2/specs > > Configured with: ../configure --prefix=/usr/freeware > > --enable-version-specific-runtime-libs --disable-shared > > --enable-threads --enable-haifa --disable-c-mbchar > > Thread model: single > > gcc version 3.2.2 > > [1002] [rhand at prism:~] > > [8:09:46am]% > > > > Now, this goes a little into uncharted territory for me :) Does > > "Thread model: single" mean multithreading support isn't enabled? I > > remember having a simliar problem (on a different SGI system) with > > VRJuggler a few years ago with non-thread-safe STL libraries, that was > > resolved by an upgrade. > > Yes, and this is almost certainly the problem. You'll need to refer to > GCC documentation for your platform to see how to enable threads. > > -Brad > -- Randall Hand http://www.yeraze.com From ykyang at gmail.com Fri Feb 25 11:47:55 2005 From: ykyang at gmail.com (Yi-Kun Yang) Date: Fri, 25 Feb 2005 09:47:55 -0700 Subject: [vtkusers] vtkMesa with Java Message-ID: <3db0b30405022508471d3c53e1@mail.gmail.com> Dear All, I have compiled VTK-4.2 with Java wrapping. When I tried to use vtkMesaActor, vtkMesaPolyDataMapper, ..., I found that those Java files were not compiled. Could someone let me know how to modify the CMake configuration files so those Mesa Java files are included in the compilation list. Thank you. //// // Yi-Kun Yang // Research Associate // Dept. of Chemical Engineering // University of Utah // TEL:(801)585-5594 // http://www.perc.utah.edu/Members/yang //// From randall.hand at gmail.com Fri Feb 25 11:50:47 2005 From: randall.hand at gmail.com (Randall Hand) Date: Fri, 25 Feb 2005 10:50:47 -0600 Subject: [vtkusers] Build C++ applications without using CMake In-Reply-To: References: Message-ID: Well, I can't speak for VC++, but in GNU-land I've been able to do it without CMake by crafting a Makefile that simply has : -L/home/u/rhand/local/lib/vtk -lvtkRendering -lvtkGraphics -lvtkCommon -lvtkFiltering In the compile line. On Fri, 25 Feb 2005 22:32:25 +0800, ? ? wrote: > Hi, > I'm a beginner. I want to know is there a way to invoke ITK or VTK > functions in other C++ applications without writting the CMakeLists? For > instance, involving all the libraries or headers in VC++6.0 and just call > them. It seems that someone else has asked similar questions but I can't > find the anwser neither in FAQ nor the mailling list user guide. > I would appreciate if you can help me. Thanks a lot. > > Chen > > _________________________________________________________________ > ???? MSN Explorer: http://explorer.msn.com/lccn > > _______________________________________________ > 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 From mathieu.malaterre at kitware.com Fri Feb 25 12:40:19 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Fri, 25 Feb 2005 12:40:19 -0500 Subject: [vtkusers] Build C++ applications without using CMake In-Reply-To: References: Message-ID: <421F6303.70102@kitware.com> The general answer is saving 5 min in not writting the CMakeList.txt file will make you loose your hair and a lot of time. So as it has been mention -I am sure- in the post you read. You should *really* consider in switching to CMake. The time lost in tweaking VC++ could instead be use in devloping ITK algorithms. Mathieu > On Fri, 25 Feb 2005 22:32:25 +0800, ? ? wrote: > >>Hi, >> I'm a beginner. I want to know is there a way to invoke ITK or VTK >>functions in other C++ applications without writting the CMakeLists? For >>instance, involving all the libraries or headers in VC++6.0 and just call >>them. It seems that someone else has asked similar questions but I can't >>find the anwser neither in FAQ nor the mailling list user guide. >>I would appreciate if you can help me. Thanks a lot. >> >>Chen >> >>_________________________________________________________________ >>???? MSN Explorer: http://explorer.msn.com/lccn >> >>_______________________________________________ >>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 >> > > > From goodwin.lawlor at ucd.ie Fri Feb 25 13:27:56 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Fri, 25 Feb 2005 18:27:56 -0000 Subject: [vtkusers] Re: vtkCamera to follow vtkActor References: <002101c51ae3$014ba440$af0aa8c0@DEEPTHROAT> Message-ID: <001901c51b67$ba6ec450$0c01a8c0@Renasci> You want to keep the initial focal point? Before you do any translating, cache the focal point and the re-apply it afterwards. double fp[3]; ren->GetActiveCamera()->GetFocalPoint(fp); ... ... ... ren->GetActiveCamera()->SetFocalPoint(fp); ----- Original Message ----- From: "Paul Tait" To: "'Goodwin Lawlor'" Cc: Sent: Friday, February 25, 2005 2:37 AM Subject: RE: [vtkusers] Re: vtkCamera to follow vtkActor Closer.... I'm not specifically interested in "one" of "one or two" the actors, just the region in the centre of the screen -----Original Message----- From: Goodwin Lawlor [mailto:goodwin.lawlor at ucd.ie] Sent: Friday, 25 February 2005 9:45 AM To: Paul Tait Subject: Re: [vtkusers] Re: vtkCamera to follow vtkActor In that case you'll have to set up your camera manually. You need to set the camera focalpoint, position and viewup To keep focused on a particular actor, try something like: ren->GetActiveCamera()->SetFocalPoint(actor->GetCenter()); ----- Original Message ----- From: "Paul Tait" To: "'Goodwin Lawlor'" Sent: Friday, February 25, 2005 12:50 AM Subject: RE: [vtkusers] Re: vtkCamera to follow vtkActor That?s not excactly what I had in mind. What I want to happen is this. As the actors move further and further apart I will zoom in on one or two. The next time I magnify the vertical distance I want these one or two actors to remain in the centre of the screen and not move off the top or bottom. I basically want to be able to say to vtk is this is now the area of interest stay there even when I move the actors. Paul -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Goodwin Lawlor Sent: Thursday, 24 February 2005 5:12 PM To: vtkusers at public.kitware.com Subject: [vtkusers] Re: vtkCamera to follow vtkActor Hi Paul, Try the vtkRenderer::ResetCamera() method. You might also need vtkRenderer::ResetCameraClippingRange() method hth Goodwin "Paul Tait" wrote in message news:011b01c51a43$7cb95960$af0aa8c0 at DEEPTHROAT... > Hi > > I have several actors in a scene and am using AddPosition(0, 0, n) to > move them interactively up and down vertically. This means actors move > off the bottom of the screen so I have to use the mouse middlebutton > to follow them. How can I program vtk so that when I move my actors > the actor in the centre of the screen (focalpoint?) stays centred ? > > Thanks Paul > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 > > > _______________________________________________ > 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 -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 From guanw at rhpcs.mcmaster.ca Fri Feb 25 14:32:21 2005 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Fri, 25 Feb 2005 14:32:21 -0500 (EST) Subject: [vtkusers] stereoskopic view with two projectors In-Reply-To: <20041022072929.E681B2D989@public.kitware.com> Message-ID: Hi Jorg, Have you made stereo work? If yes please let me know how. I have similar problem to what you had last Oct. I would very much appreciate it if someone could give me a hint. Below is a brief description of my system setting and what I did in attempt to achieve stereo effect. ======= Setting ======= Linux with nVidia Quadro graphics card (in Clone mode, stereo 4). The two outputs of the graphics card are connected to two monitors (later will be two polarized projectors) ========== What I did ========== Add renWin StereoCapableWindowOn renWin SetStereoTypeToCrystalEyes right after vtkRenderWindow renWin in Examples/Tutorial/Step5/Tcl/Cone5.tcl. Run it, hit key "3", then I got error message, saying "Adjusting stereo mode on a window that does not support stereo type CrystalEyes is not possible". As a result, I did't see any disparity between the left and right renderings (they are identical). I suspect that the window failed to configured itself to be stereo capable as I request. Many thanks in advance. Weiguang -- ======================================================== Weiguang Guan, Research Engineer RHPCS, McMaster University ======================================================== On Fri, 22 Oct 2004, trull78yaoo wrote: > Hi all, > > now somebody how can i test the stereoscopic view without vtk. > Because i have no stereoscopic effect with my > nvidia quadro fx500 in vtk. Can somebody help me? > Which settinge need Windows, graphic card or vtk? > My settings for graphic card: display mode is Clone, > enable stereo in OpenGL and the stereo display mode > is set to nView Clone. > Here my code: > > #include "vtkConeSource.h" > #include "vtkPolyDataMapper.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkCamera.h" > #include "vtkActor.h" > #include "vtkRenderer.h" > #include "vtkInteractorStyleTrackballCamera.h" > > > int main( int argc, char *argv[] ) > { > vtkConeSource *cone = vtkConeSource::New(); > cone->SetHeight( 3.0 ); > cone->SetRadius( 1.0 ); > cone->SetResolution( 1000 ); > > vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New(); > coneMapper->SetInput( cone->GetOutput() ); > > vtkActor *coneActor = vtkActor::New(); > coneActor->SetMapper( coneMapper ); > > vtkRenderer *ren1= vtkRenderer::New(); > ren1->AddActor( coneActor ); > ren1->SetBackground( 0.1, 0.2, 0.4 ); > > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->StereoCapableWindowOn(); > renWin->SetStereoTypeToCrystalEyes(); > // renWin->SetStereoTypeToDresden(); > renWin->StereoRenderOn(); > renWin->SetFullScreen(1); > renWin->AddRenderer( ren1 ); > > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > > vtkInteractorStyleTrackballCamera *style = > vtkInteractorStyleTrackballCamera::New(); > iren->SetInteractorStyle(style); > > iren->Initialize(); > iren->Start(); > > cone->Delete(); > coneMapper->Delete(); > coneActor->Delete(); > ren1->Delete(); > renWin->Delete(); > iren->Delete(); > style->Delete(); > > return 0; > } > > Thank J?rg > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From mathieu.malaterre at kitware.com Fri Feb 25 14:35:00 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Fri, 25 Feb 2005 14:35:00 -0500 Subject: [vtkusers] Error in vtkAppendPolyData In-Reply-To: <421F5122.9010703@mcs.anl.gov> References: <421F5122.9010703@mcs.anl.gov> Message-ID: <421F7DE4.5080503@kitware.com> John, Could you please add this bug to the bug tracker. Simply go to : http://vtk.org/Bug Login (or create an account). And enter a new bug. Please include your code (thank so much for providing it!). And assign the bug to me. Thanks Mathieu Johnny C. Norris II wrote: > Or maybe I'm just doing something wrong. > > In my vis app, users can apply cutting planes to whatever they're > visualizing. If they're visualizing the surface, then I use > vtkClipPolyData to clip the output of vtkDataSetSurfaceFilter, and > combine that with the output of a vtkCutter to cap the hole in the surface. > > Anyway, something doesn't work right if the initial data has cell data > and 2D cells. But vtkAppendPolyData doesn't process the cell data > correctly. I've appended a code example that demonstrates the problem > (change the "#define CLIP" from 0 to 1 and recompile to see the error), > as well as two images illustrating the error. Notice how the colors are > obviously incorrect in the clipped object. > > I'm using the latest VTK from CVS, BTW. > > Any help here would be greatly appreciated. > > Thanks! > John > > > ------------------------------------------------------------------------ > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > #define CLIP 0 > > int main() > { > vtkFloatArray* pData = vtkFloatArray::New(); > pData->SetNumberOfValues(5); > pData->SetValue(0, 0.f); > pData->SetValue(1, 1.f); > pData->SetValue(2, 2.f); > pData->SetValue(3, 1.f); > pData->SetValue(4, 0.f); > > vtkStructuredPoints* pGrid = vtkStructuredPoints::New(); > pGrid->SetDimensions(6, 2, 2); > pGrid->GetCellData()->SetScalars(pData); > pData->Delete(); > > vtkDataSetSurfaceFilter* pSurface = vtkDataSetSurfaceFilter::New(); > pSurface->SetInput(pGrid); > > vtkPlane* pPlane = vtkPlane::New(); > pPlane->SetOrigin(2.5, 0.0, 0.0); > pPlane->SetNormal(1.0, 0.0, 0.0); > > vtkClipPolyData* pClipper = vtkClipPolyData::New(); > pClipper->SetInput(pSurface->GetOutput()); > pClipper->SetClipFunction(pPlane); > > vtkCutter* pCutter = vtkCutter::New(); > pCutter->SetInput(pSurface->GetOutput()); > pCutter->SetCutFunction(pPlane); > pPlane->Delete(); > > vtkAppendPolyData* pAppender = vtkAppendPolyData::New(); > #if CLIP > pAppender->AddInput(pClipper->GetOutput()); > pAppender->AddInput(pCutter->GetOutput()); > #else > pAppender->AddInput(pSurface->GetOutput()); > #endif // CLIP > pSurface->Delete(); > pClipper->Delete(); > pCutter->Delete(); > > vtkPolyDataMapper* pMapper = vtkPolyDataMapper::New(); > pMapper->SetInput(pAppender->GetOutput()); > pMapper->SetScalarRange(0.0, 2.0); > > vtkScalarBarActor* pSB = vtkScalarBarActor::New(); > pMapper->CreateDefaultLookupTable(); > pSB->SetLookupTable(pMapper->GetLookupTable()); > > vtkActor* pActor = vtkActor::New(); > pActor->SetMapper(pMapper); > pMapper->Delete(); > > vtkRenderer* pRenderer = vtkRenderer::New(); > pRenderer->AddActor(pActor); > pActor->Delete(); > pRenderer->AddActor(pSB); > pSB->Delete(); > > vtkOutlineFilter* pOutline = vtkOutlineFilter::New(); > pOutline->SetInput(pGrid); > pGrid->Delete(); > > pMapper = vtkPolyDataMapper::New(); > pMapper->SetInput(pOutline->GetOutput()); > pOutline->Delete(); > > pActor = vtkActor::New(); > pActor->SetMapper(pMapper); > pActor->GetProperty()->SetColor(1.0, 1.0, 1.0); > pMapper->Delete(); > > pRenderer->AddActor(pActor); > pActor->Delete(); > > vtkRenderWindow* pWindow = vtkRenderWindow::New(); > pWindow->AddRenderer(pRenderer); > pRenderer->Delete(); > > vtkRenderWindowInteractor* pInteractor = vtkRenderWindowInteractor::New(); > pInteractor->SetRenderWindow(pWindow); > pWindow->Delete(); > > pInteractor->Start(); > > pInteractor->Delete(); > > return 0; > } > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 From vidyadhar at lucidindia.net Fri Feb 25 23:12:52 2005 From: vidyadhar at lucidindia.net (vidyadhar) Date: Sat, 26 Feb 2005 09:42:52 +0530 Subject: [vtkusers] Creating Volume-Rendering compatible data References: Message-ID: <001701c51bb9$71ed6450$2d01a8c0@pf244> Hi, How about using vtkImageCast filter ----- Original Message ----- From: "Randall Hand" To: Sent: Friday, February 25, 2005 10:03 PM Subject: [vtkusers] Creating Volume-Rendering compatible data > I'm using the following code to "pad" the data the way I want for rendering: > > It takes my Scalar+Vector dataset and adds a field that's a > 2-component Scalar (Original Scalar + Vector Magnitude), both scaled > between 0 & 255. I want to map Opacity to the first component, & > color through a lookup table to the 2nd component. > > But when it's done, I still can't hand it off to the RayCast mapper because > 1) It's not an "ImageData" > 2) It's not "unsigned char's", it's "floats" > > How can I get from what I have to something that's RayCastMapper compatible? > > > *snip* > vtkDataSetReader *model = vtkDataSetReader::New(); > model->SetFileName(filename); > model->Update(); > char function[128]; > vtkArrayCalculator *addMag = vtkArrayCalculator::New(); > addMag->SetInput(model->GetOutput()); > addMag->AddVectorArrayName("Velocity", 0); > model->GetOutput()->GetPointData()->GetArray("Velocity")->GetRange(range, > -1); > sprintf(function, "mag(Velocity) * %f", 255.0 / (range[1] - range[0])); > addMag->SetFunction(function); > addMag->SetResultArrayName("Magnitude"); > addMag->Update(); > printf("**************************************************\n"); > PrintStatistics(addMag); > PrintStatistics(addMag->GetOutput());/*}}}*/ > > // Scale Fraction field {{{ > vtkArrayCalculator *scaled = vtkArrayCalculator::New(); > scaled->SetInput(addMag->GetOutput()); > scaled->AddScalarArrayName("Fraction", 0); > scaled->SetFunction("Fraction * 255.0"); > scaled->SetResultArrayName("ScaledFraction"); > scaled->Update(); > printf("**************************************************\n"); > PrintStatistics(scaled); > PrintStatistics(scaled->GetOutput());/*}}}*/ > > vtkMergeFields *doubleScalar = > vtkMergeFields::New(); > doubleScalar->SetInput(scaled->GetOutput()); > doubleScalar->SetOutputField("Combined", vtkMergeFields::POINT_DATA); > doubleScalar->SetNumberOfComponents(2); > doubleScalar->Merge(0, "Magnitude", 0); > doubleScalar->Merge(1, "ScaledFraction", 0); > doubleScalar->Update(); > PrintStatistics(doubleScalar); > PrintStatistics(doubleScalar->GetOutput()); > *snip* > -- > Randall Hand > http://www.yeraze.com > > From steven.robbins at videotron.ca Sat Feb 26 03:38:37 2005 From: steven.robbins at videotron.ca (Steve M. Robbins) Date: Sat, 26 Feb 2005 03:38:37 -0500 Subject: [vtkusers] java's vtkPanel does too much In-Reply-To: <421F2EB8.5050805@cdnorthamerica.com> References: <20050225133635.GA29284@nyongwa.montreal.qc.ca> <421F2EB8.5050805@cdnorthamerica.com> Message-ID: <20050226083837.GO21051@nyongwa.montreal.qc.ca> On Fri, Feb 25, 2005 at 08:57:12AM -0500, Jeff Lee wrote: > That being said, I would recommend overriding vtkPanel.java in your > own build area - just make sure your package name is > vtk/vtkPanel.java and then you can do whatever you want (make sure > you retain the native methods). I hadn't thought about doing that, but it's an option. The drawback is that I would have to merge any bugfixes to the vtkPanel.Render() method that might come along. That's my main motivation to have VTK provide a bare-bones base class that sets up a java window for VTK rendering. > In the long run, we should probably provide a base class with only > native methods which can then be extended, without the above tinkering. > Probably call it vtkNativeHook or something obvious, then vtkPanel is a > subclass. This will require changes to the c++ code in vtkJavaAwt.h to > change the mangled jni method signatures, but it is trivial. What I had in mind is for the base class to have the three native methods, as well as Render() and paint(). Is that what you had in mind, or is vtkNativeHook just the three native methods? -Steve From jeff at cdnorthamerica.com Sat Feb 26 07:12:34 2005 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Sat, 26 Feb 2005 07:12:34 -0500 Subject: [vtkusers] java's vtkPanel does too much In-Reply-To: <20050226083837.GO21051@nyongwa.montreal.qc.ca> References: <20050225133635.GA29284@nyongwa.montreal.qc.ca> <421F2EB8.5050805@cdnorthamerica.com> <20050226083837.GO21051@nyongwa.montreal.qc.ca> Message-ID: <422067B2.2060907@cdnorthamerica.com> Steve M. Robbins wrote: >On Fri, Feb 25, 2005 at 08:57:12AM -0500, Jeff Lee wrote: > > > >>That being said, I would recommend overriding vtkPanel.java in your >>own build area - just make sure your package name is >>vtk/vtkPanel.java and then you can do whatever you want (make sure >>you retain the native methods). >> >> > >I hadn't thought about doing that, but it's an option. The >drawback is that I would have to merge any bugfixes to the >vtkPanel.Render() method that might come along. That's my >main motivation to have VTK provide a bare-bones base class >that sets up a java window for VTK rendering. > > There would be no bugfixes - vtkPanel.java in the vtk distribution would be out of the picture. You would have your own Render() method, and basically could toss out or re-implement everything but the native methods. A bare-bones base-class would sublcass vtkNativeHook if you wanted to provide basic Render() and Paint() capabilities and mabey an Interactor of some sort. > > > >>In the long run, we should probably provide a base class with only >>native methods which can then be extended, without the above tinkering. >>Probably call it vtkNativeHook or something obvious, then vtkPanel is a >>subclass. This will require changes to the c++ code in vtkJavaAwt.h to >>change the mangled jni method signatures, but it is trivial. >> >> > >What I had in mind is for the base class to have the three native >methods, as well as Render() and paint(). Is that what you >had in mind, or is vtkNativeHook just the three native methods? > > Just the 3 native methods - I believe that people may have different needs from Render() and paint(). For example, if you are updating pipeline data from multiple threads, you need finer control over Render and paint to mutex access to the pipeline. For the simple cases where you set up a pipeline and Render, what is in vtkPanel now is fine. For those who want finer control, they either go through the gymnastics above, or we provide a base class. For example, * vtkNativePanel.java - base class with native methods * vtkPanel.java - sublcass of vtkNativePanel, adding paint and render capabilities, addNotify,removeNotify,Lock,UnLock - here is what you describe as a "bare-bones" base class * vtkCanvas.java - layers GenericInteractor I really think that we'll never be able to write a generic Render() method, because of the multithreading issue. One way to make it solid is to assume that all pipeline updates come on the main event thread - then the event thread synchronizes everything. If a developer decides to let values change on a thread to improve ui responsiveness, then that model would break. Another way might be to somehow synchronize pipeline execution and rendering at a lower level. For instance, before any filter can execute, it must obtain a lock from the renderWindow. BTW, how you are breaking vtkCanvas? Regards, Jeff >-Steve >_______________________________________________ >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 > > > > From ahrivera at yahoo.com Sat Feb 26 15:13:33 2005 From: ahrivera at yahoo.com (Alexis H. Rivera-Rios) Date: Sat, 26 Feb 2005 12:13:33 -0800 (PST) Subject: [vtkusers] approach to overlay drawing on a 2D image Message-ID: <20050226201333.75364.qmail@web30704.mail.mud.yahoo.com> Hi, I will appreciate if someone can tell me an approach to do the following: I want to visualize the output of an image processing algorithm which detects objets on an image. After the algorithm runs I want to draw the 2D gray scale input image and colored circles around the detections. Using vtkImageData, I'm able to draw the image. But I don't know what to do about the circles. I'd like to be able to add them as actors in the scene so I can control their position. I tried using the vtkImageCanvasSource2D, but I didn't have any luck specifying the image. Has anybody done something similar? Any ideas on how to approach this problem? Thanks, Alexis ===== Programming Tutorial: In Python: To do this, do this In Perl: To do this, do this or this or this or this... In C: To do this, do this, but be careful In C++: To do this, do this, but don't do this, be careful of this, watch out for this, and whatever you do, don't do this __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jinzishuai at yahoo.com Sat Feb 26 15:50:36 2005 From: jinzishuai at yahoo.com (Shi Jin) Date: Sat, 26 Feb 2005 12:50:36 -0800 (PST) Subject: [vtkusers] How to combine several actors into a single entity? Message-ID: <20050226205037.31638.qmail@web51105.mail.yahoo.com> Hi there, I am very new to VTK. I have now a problem drawing a multiple spring-bead polymer model. For example, I want to draw a dumbbell with one spring and two spheres at the end. Now what I do is to make three actors for them. But ideally I think I should be able to make them into a single identity so that it is easier to manipulate them as a whole. Is there a way to make these three actors into a single actor or something similiar? I initialy thought that they are just data so that I can make them into one polyData object by inserting several parts. But I then found out that all I can insert is cells, but not the primitives such as spheres and springs(which is a vtkRotationalExtrusionFilter). Can you help me? Thanks a lot. Shi __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail From diegocantorcol at yahoo.com Sat Feb 26 19:35:31 2005 From: diegocantorcol at yahoo.com (Diego Cantor) Date: Sat, 26 Feb 2005 16:35:31 -0800 (PST) Subject: [vtkusers] problem running vtk + java Message-ID: <20050227003531.48092.qmail@web60402.mail.yahoo.com> Hello, I have this problem: 1. I have downloaded the VTK-4.2-LatestRelease.zip 2. I used cmake to generate the visual c 6.0 project 3. I build the project in c++ 4. I am trying to run the tutorial included in \Examples\Tutorial. However I get the following error: java.lang.UnsatisfiedLinkError: C:\vtk4.2\bin\Release\vtkCommonJava.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:834) at Cone.(Cone.java:18) Exception in thread "main" I know that the library vtkCommonJava.dll has been found because my java.library.path include it : c:\j2sdk1.4.2_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;c:\j2sdk1.4.2_04\bin;C:\vtk4.2\bin\Release I can test that is true by removing it from the java.library.path When I run Cone.class again I get: java.lang.UnsatisfiedLinkError: no vtkCommonJava in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491) at java.lang.Runtime.loadLibrary0(Runtime.java:788) at java.lang.System.loadLibrary(System.java:834) at Cone.(Cone.java:18) Exception in thread "main" I mean, this error is not because I have not included the library vtkCommonJava.dll in the java.library.path. I think is something more but I am clueless. Thanks for your help, Diego. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahrivera at yahoo.com Sat Feb 26 21:33:09 2005 From: ahrivera at yahoo.com (Alexis H. Rivera-Rios) Date: Sat, 26 Feb 2005 18:33:09 -0800 (PST) Subject: [vtkusers] overlaying 2D images and rectangles Message-ID: <20050227023309.38250.qmail@web30708.mail.mud.yahoo.com> Hi, I will appreciate if someone can tell me an approach to do the following: I want to visualize the output of an image processing algorithm which detects objets on an image. After the algorithm runs I want to draw the 2D gray scale input image and colored rectangles around the detections. Using vtkImageData, I'm able to draw the image. And using vtkCell and vtkPoints I can draw rectangles. But, if I use vtkImageViewer2, my rectangles and the drawing are in different coordinate systems. So I can't center a rectangle around the detection coordinate (the detection coordinate is in pixels). Using vtkImageViewer seems to do the trick except when my images are small ... then I can't resize them (or don't know how to). Has anybody done something similar? Any ideas on how to approach this problem? Thanks, Alexis __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From xubinbin2004 at gmail.com Sun Feb 27 00:29:06 2005 From: xubinbin2004 at gmail.com (Xu Bin) Date: Sun, 27 Feb 2005 13:29:06 +0800 Subject: [vtkusers] How can I can use a vtkboxwidget to interactively selecta 3d region of interest?? Message-ID: <8f1c3d5005022621291e693ceb@mail.gmail.com> Hello every, I have rendered a 3d volume from a set of slices,now I want to use vtkboxwidget to select a 3d region. Can anyone give me an example? thanks. From charfeddine_amir at yahoo.fr Sun Feb 27 08:30:09 2005 From: charfeddine_amir at yahoo.fr (charfeddine amir) Date: Sun, 27 Feb 2005 14:30:09 +0100 (CET) Subject: [vtkusers] Dicom images In-Reply-To: <421CB24D.90709@kitware.com> Message-ID: <20050227133009.62027.qmail@web25710.mail.ukl.yahoo.com> hi man i'm new there and feel you can really help me to read dicom image so the problem is that i need to write a script that read a dicom file (containing 46 dicom image) and extract the data of image (one or more)to be stored in 2d matrice to be computed next. i rely in your help and advise thankx, amir --------------------------------- D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Cr?ez votre Yahoo! Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.Hennecke at web.de Sun Feb 27 09:33:02 2005 From: M.Hennecke at web.de (Marius Hennecke) Date: Sun, 27 Feb 2005 14:33:02 +0000 Subject: [vtkusers] NullpointerException with vtkPanel Message-ID: <4221DA1E.20909@web.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I have a problem with vtkPanel. I've donwloaded the nightlies and everything compiled (after a few hours of trouble ;) ) I have compiled with Java wrapping. The Cone.java example works fine, so I expect my vtk Base-Installation is not the problem. I had to compile and pack the Java wrapping stuff manually into vtk.jar it wasn't done by make. I've added the compiled vtkPanel and vtkCanvas classes to vtk.jar, too. This piece of code crashes at the line where the actor is added to the renderer of the panel. Without this line the file compiles but nothing is shown :) package aufgaben; import java.awt.FlowLayout; import javax.swing.JFrame; import vtk.*; public class Aufgabe_Kegel_1 { ~ static { ~ System.loadLibrary("vtkCommonJava"); ~ System.loadLibrary("vtkFilteringJava"); ~ System.loadLibrary("vtkIOJava"); ~ System.loadLibrary("vtkImagingJava"); ~ System.loadLibrary("vtkGraphicsJava"); ~ System.loadLibrary("vtkRenderingJava"); ~ } ~ public static void main(String[] args) { ~ JFrame aFrame = new JFrame(); ~ aFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ~ aFrame.getContentPane().setLayout(new FlowLayout()); ~ vtkPanel thePanel = new vtkPanel(); ~ aFrame.getContentPane().add(thePanel); ~ vtkConeSource srcCone = new vtkConeSource(); ~ srcCone.SetHeight(3); ~ srcCone.SetRadius(1); ~ srcCone.SetResolution(10); ~ vtkPolyDataMapper pdmMapper = new vtkPolyDataMapper(); ~ pdmMapper.SetInput(srcCone.GetOutput()); ~ vtkActor coneActor = new vtkActor(); ~ coneActor.SetMapper(pdmMapper); ~ coneActor.GetProperty().SetColor(.0, .0, 1.0); ~ //NullpointerException Here ~ thePanel.GetRenderer().AddActor(coneActor); ~ aFrame.pack(); ~ aFrame.setVisible(true); ~ } } This is the stack trace Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at vtk.vtkPanel.UnLock(Native Method) at vtk.vtkPanel.Render(vtkPanel.java:135) at vtk.vtkPanel.paint(vtkPanel.java:155) at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248) at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:56) at sun.awt.RepaintArea.paint(RepaintArea.java:224) at Sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:632) at java.awt.Component.dispatchEventImpl(Component.java:4031) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) I'm running JRE 1.5.0.01 on a Gentoo 2.6.10-r5 box. mfg Marius Hennecke -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCIdoe+STWoLopCpURAm4GAJ9Dfm5PQxS/2N6rGs4/cBUO2JCwPACcCe1e DpH6Ags125Maj2Fha1m3xcA= =MLj+ -----END PGP SIGNATURE----- From charfeddine_amir at yahoo.fr Sun Feb 27 08:39:05 2005 From: charfeddine_amir at yahoo.fr (charfeddine amir) Date: Sun, 27 Feb 2005 14:39:05 +0100 (CET) Subject: [vtkusers] error of using cmake In-Reply-To: <421F6303.70102@kitware.com> Message-ID: <20050227133905.57764.qmail@web25708.mail.ukl.yahoo.com> hi man this is the second time i install vtk4.0 itk1.0.0 and fltk1.1.4 and cmake1.6 with the vc++ 6.0 it works at the begin and after that if i would to compile a script with cmake it start pinging and then it shows me a full window of error message "cl.exe cant compile a simple test program...." or something near that i didn't understand what to do? thankx, amir, --------------------------------- D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Cr?ez votre Yahoo! Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor at ucd.ie Sun Feb 27 13:00:48 2005 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Sun, 27 Feb 2005 18:00:48 -0000 Subject: [vtkusers] Re: extract the curvature value References: <5.0.2.1.2.20050225173358.00ad3d98@pop3.creatis.insa-lyon.fr> Message-ID: Hi Yasser, > Now i need to extract the curvature value at each point of 3d volume which > represented by vtkPolyData object. In VTK a 3D volume would be represented by a vtkImageData. Do you mean you have a closed surface? > can I do that from vtkCurvatures? if yes, How? If you have a surface, you can use vtkCurvatures to get the Min, Max, Gaussian, and Mean curvature. You can use the class like you would any filter. In tcl: vtkCurvatures curv curv SetInput [reader GetOutput] curv SetCurvatureTypeToGaussian curv Update # to access the data points set data [[[curv GetOutput] GetPointData] GetScalars] set num [data GetNumberOfTuples] for {set i 0} {$i < $num} {incr i} { $data GetTuple1 $i } hth Goodwin From lachlan at vpac.org Sun Feb 27 19:25:49 2005 From: lachlan at vpac.org (Lachlan Hurst) Date: Mon, 28 Feb 2005 11:25:49 +1100 Subject: [vtkusers] stereoskopic view with two projectors References: Message-ID: <001b01c51d2c$0de42830$8eb8aa83@is03> Hi, Must say, i'm not 100% on the details of your system, but to run vtk with SetStereoTypeToCrystalEyes you must have a display system capable of refreshing at close to 120Hz (not sure on exact frequency). The simple example is to have a single monitor and suitable graphics card that supports stereo and a fast refresh rate (you will also need active stereo glasses). The method used for polarized projectors involves an external "frame splitter" - whereby the graphics card outputs at 120Hz and the frame splitter redirects every second frame to the other projector (splitter has one video in two video out). An alternative method of stereo for polarized projectors only is as follows. Do not clone the displays, create a vtk render window on each display and simply set one renderer to left eye, and the other to right eye. Good luck, Lachlan ----- Original Message ----- From: "Weiguang Guan" To: "trull78yaoo" Cc: Sent: Saturday, February 26, 2005 6:32 AM Subject: Re: [vtkusers] stereoskopic view with two projectors Hi Jorg, Have you made stereo work? If yes please let me know how. I have similar problem to what you had last Oct. I would very much appreciate it if someone could give me a hint. Below is a brief description of my system setting and what I did in attempt to achieve stereo effect. ======= Setting ======= Linux with nVidia Quadro graphics card (in Clone mode, stereo 4). The two outputs of the graphics card are connected to two monitors (later will be two polarized projectors) ========== What I did ========== Add renWin StereoCapableWindowOn renWin SetStereoTypeToCrystalEyes right after vtkRenderWindow renWin in Examples/Tutorial/Step5/Tcl/Cone5.tcl. Run it, hit key "3", then I got error message, saying "Adjusting stereo mode on a window that does not support stereo type CrystalEyes is not possible". As a result, I did't see any disparity between the left and right renderings (they are identical). I suspect that the window failed to configured itself to be stereo capable as I request. Many thanks in advance. Weiguang -- ======================================================== Weiguang Guan, Research Engineer RHPCS, McMaster University ======================================================== On Fri, 22 Oct 2004, trull78yaoo wrote: > Hi all, > > now somebody how can i test the stereoscopic view without vtk. > Because i have no stereoscopic effect with my > nvidia quadro fx500 in vtk. Can somebody help me? > Which settinge need Windows, graphic card or vtk? > My settings for graphic card: display mode is Clone, > enable stereo in OpenGL and the stereo display mode > is set to nView Clone. > Here my code: > > #include "vtkConeSource.h" > #include "vtkPolyDataMapper.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkCamera.h" > #include "vtkActor.h" > #include "vtkRenderer.h" > #include "vtkInteractorStyleTrackballCamera.h" > > > int main( int argc, char *argv[] ) > { > vtkConeSource *cone = vtkConeSource::New(); > cone->SetHeight( 3.0 ); > cone->SetRadius( 1.0 ); > cone->SetResolution( 1000 ); > > vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New(); > coneMapper->SetInput( cone->GetOutput() ); > > vtkActor *coneActor = vtkActor::New(); > coneActor->SetMapper( coneMapper ); > > vtkRenderer *ren1= vtkRenderer::New(); > ren1->AddActor( coneActor ); > ren1->SetBackground( 0.1, 0.2, 0.4 ); > > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->StereoCapableWindowOn(); > renWin->SetStereoTypeToCrystalEyes(); > // renWin->SetStereoTypeToDresden(); > renWin->StereoRenderOn(); > renWin->SetFullScreen(1); > renWin->AddRenderer( ren1 ); > > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > > vtkInteractorStyleTrackballCamera *style = > vtkInteractorStyleTrackballCamera::New(); > iren->SetInteractorStyle(style); > > iren->Initialize(); > iren->Start(); > > cone->Delete(); > coneMapper->Delete(); > coneActor->Delete(); > ren1->Delete(); > renWin->Delete(); > iren->Delete(); > style->Delete(); > > return 0; > } > > Thank J?rg > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > > 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 From kshivann at engineering.uiowa.edu Sun Feb 27 19:42:07 2005 From: kshivann at engineering.uiowa.edu (kshivann at engineering.uiowa.edu) Date: Sun, 27 Feb 2005 18:42:07 -0600 Subject: [vtkusers] how to update getbounds after applying transformations Message-ID: <1109551327.422268df82e0c@webmail.engineering.uiowa.edu> hi, i rotate STL objects and calculate the bounds of the object using GetBounds (). still the value is not updated and new bounds are not calculated. does anyone know how to automatically update the bounds and calculate the changed coordinates when any transformation is applied. thanks kiran From liubo at sa.buaa.edu.cn Sun Feb 27 21:48:00 2005 From: liubo at sa.buaa.edu.cn (=?GB2312?B?wfWyqQ==?=) Date: Mon, 28 Feb 2005 10:48:00 +0800 (CST) Subject: [vtkusers] (no subject) Message-ID: <20050228024800.DCE8237F69@mx2.buaa.edu.cn> hi, i'm a new learner.when studying the examples in vtk source code(VTK\Examples\GUI\Win32\vtkMFC),i encounter an annoying problem.the compile progresse is ok.but when linking there are lots of problem similar to the one below: <<<>>> i don't kown why. i would be honored if someone could help me. ralph in china From KunduSJ at moffitt.usf.edu Mon Feb 28 01:26:09 2005 From: KunduSJ at moffitt.usf.edu (Kundu, Sangeeta J.) Date: Mon, 28 Feb 2005 01:26:09 -0500 Subject: [vtkusers] problem linking vtk library Message-ID: Hi, I'm a novice learner too, and while trying to run the examples, I could compile the code but I encounter linking errors, though the linking path is correct. If anyone encountered similar probs, please help. My lib is in archive format (eg. libvtkRendering.a) Thanks. -SK -----Original Message----- From: vtkusers-bounces at vtk.org on behalf of ?? Sent: Sun 2/27/2005 9:48 PM To: vtkusers at vtk.org Subject: [vtkusers] (no subject) hi, i'm a new learner.when studying the examples in vtk source code(VTK\Examples\GUI\Win32\vtkMFC),i encounter an annoying problem.the compile progresse is ok.but when linking there are lots of problem similar to the one below: <<<>>> i don't kown why. i would be honored if someone could help me. ralph in china ----------------------------------------- ########################################################################### ## This transmission may be confidential or protected from disclosure and is only for review and use by the intended recipient. Access by anyone else is unauthorized. Any unauthorized reader is hereby notified that any review, use, dissemination, disclosure or copying of this information, or any act or omission taken in reliance on it, is prohibited and may be unlawful. If you received this transmission in error, please notify the sender immediately. Thank you. ######################################### #################################### From alexandre.thinnes at aist.go.jp Mon Feb 28 02:55:42 2005 From: alexandre.thinnes at aist.go.jp (Thinnes) Date: Mon, 28 Feb 2005 16:55:42 +0900 Subject: [vtkusers] unstructuredgrid number of cells Message-ID: <4222CE7E.CC01DE93@aist.go.jp> Dear vtkusers, I have a strange question: Is the unstructuredgrid limited to a maximum amount of cells ? thank's for your answer. Alexandre From ttickle at cs.uno.edu Mon Feb 28 03:53:06 2005 From: ttickle at cs.uno.edu (ttickle) Date: Mon, 28 Feb 2005 02:53:06 -0600 Subject: [vtkusers] (no subject) In-Reply-To: <20050228024800.DCE8237F69@mx2.buaa.edu.cn> References: <20050228024800.DCE8237F69@mx2.buaa.edu.cn> Message-ID: <4222DBF2.2070908@cs.uno.edu> ?? wrote: >hi, > i'm a new learner.when studying the examples in vtk source code(VTK\Examples\GUI\Win32\vtkMFC),i encounter an annoying problem.the compile progresse is ok.but when linking there are lots of problem similar to the one below: > ><<<>>> > >i don't kown why. i would be honored if someone could help me. > ralph in china > > >------------------------------------------------------------------------ > >_______________________________________________ >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 > > >------------------------------------------------------------------------ > >No virus found in this incoming message. >Checked by AVG Anti-Virus. >Version: 7.0.300 / Virus Database: 266.5.0 - Release Date: 2/25/ > > Your missing an include file somewhere. You probably need to include vtkftlgl.lib. This should solve your problems. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.5.0 - Release Date: 2/25/2005 From ttickle at cs.uno.edu Mon Feb 28 03:55:08 2005 From: ttickle at cs.uno.edu (ttickle) Date: Mon, 28 Feb 2005 02:55:08 -0600 Subject: [vtkusers] problem linking vtk library In-Reply-To: References: Message-ID: <4222DC6C.5030805@cs.uno.edu> Kundu, Sangeeta J. wrote: >Hi, >I'm a novice learner too, and while trying to run the examples, I could compile the code but I encounter linking errors, though the linking path is correct. If anyone encountered similar probs, please help. >My lib is in archive format (eg. libvtkRendering.a) > >Thanks. >-SK > >-----Original Message----- >From: vtkusers-bounces at vtk.org on behalf of ?? >Sent: Sun 2/27/2005 9:48 PM >To: vtkusers at vtk.org >Subject: [vtkusers] (no subject) > >hi, > i'm a new learner.when studying the examples in vtk source code(VTK\Examples\GUI\Win32\vtkMFC),i encounter an annoying problem.the compile progresse is ok.but when linking there are lots of problem similar to the one below: > ><<<>>> > >i don't kown why. i would be honored if someone could help me. > ralph in china > > >----------------------------------------- >########################################################################### >## This transmission may be confidential or protected from disclosure and >is only for review and use by the intended recipient. Access by anyone else >is unauthorized. Any unauthorized reader is hereby notified that any >review, use, dissemination, disclosure or copying of this information, or >any act or omission taken in reliance on it, is prohibited and may be >unlawful. If you received this transmission in error, please notify the >sender immediately. Thank you. ######################################### >#################################### > >_______________________________________________ >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 > > > > > > You sound like you are using a unix based compiler (based upon the .a extensions). You need to set the option flag for which libs you want to use when compiling. Example: gcc -lvtkRendering helloworld.c -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.5.0 - Release Date: 2/25/2005 From jcplatt at lineone.net Mon Feb 28 06:22:33 2005 From: jcplatt at lineone.net (John Platt) Date: Mon, 28 Feb 2005 11:22:33 -0000 Subject: [vtkusers] vtkCutter on unstructured grid overwrites cell data (VTK 4.4) Message-ID: <000201c51d87$d14f9010$334b2850@pacsys4> Hi Users, I think there is a problem colour mapping cell scalars using vtkCutter on an unstructured grid. The grid contains 2 cells, a hex and a quad. Cutting the hex creates 2 triangles - vtkHexahedron::Contour() calls newCellId = polys->InsertNextCell(3,pts); outCd->CopyData(inCd,cellId,newCellId); creating new triangles with newCellId = 0 & 1. Cutting the quad gives a single line - vtkQuad::Contour() calls newCellId = lines->InsertNextCell(2,pts); outCd->CopyData(inCd,cellId,newCellId); creating a new line with newCellId = 0. Unfortunately, the CopyData() in vtkQuad::Contour() overwrites the cell data for the first triangle. On more complex geometries this causes the renderer to crash because the cell data is not present. I think the calls to copy the cell data need the new cell Id in the aggregate polydata, not the individual lines or polys - something like outCD->CopyData(inCd, cellId, vtkCutter->NumberOfNewCells++ ); Any suggestions for a resolution would be very much appreciated. John. -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Mon Feb 28 09:49:58 2005 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Mon, 28 Feb 2005 09:49:58 -0500 (EST) Subject: [vtkusers] stereoskopic view with two projectors In-Reply-To: <001b01c51d2c$0de42830$8eb8aa83@is03> Message-ID: Hi Lachlan, I'm a little confused of what you said. I was trying to create a passive stereo system, which is very similar to GeoWall. There is email addressing this written by Nicholas Schwarz with subject "Re: Stereo effect with two projectors and polarized lenses". They set nVidia into clone mode. Using debug I found that vtkXOpenGLRenderWindow::vtkXOpenGLRenderWindowTryForVisual(...) cannot find out a stereo-capable visual. Then, I used glxinfo and could not find any stereo visual either. This is where the problem is. After that, I check XF86Config, and everything seems ok --- twinview, clone, stereo 4 ... Weiguang -- ======================================================== Weiguang Guan, Research Engineer RHPCS, McMaster University ======================================================== On Mon, 28 Feb 2005, Lachlan Hurst wrote: > Hi, > Must say, i'm not 100% on the details of your system, but to run vtk with > SetStereoTypeToCrystalEyes you must have a display system capable of > refreshing at close to 120Hz (not sure on exact frequency). The simple > example is to have a single monitor and suitable graphics card that supports > stereo and a fast refresh rate (you will also need active stereo glasses). > The method used for polarized projectors involves an external "frame > splitter" - whereby the graphics card outputs at 120Hz and the frame > splitter redirects every second frame to the other projector (splitter has > one video in two video out). > An alternative method of stereo for polarized projectors only is as follows. > Do not clone the displays, create a vtk render window on each display and > simply set one renderer to left eye, and the other to right eye. > > Good luck, > Lachlan > > ----- Original Message ----- > From: "Weiguang Guan" > To: "trull78yaoo" > Cc: > Sent: Saturday, February 26, 2005 6:32 AM > Subject: Re: [vtkusers] stereoskopic view with two projectors > > > Hi Jorg, > > Have you made stereo work? If yes please let me know how. I have similar > problem to what you had last Oct. I would very much appreciate it if > someone could give me a hint. Below is a brief description of my system > setting and what I did in attempt to achieve stereo effect. > > ======= > Setting > ======= > Linux with nVidia Quadro graphics card (in Clone mode, stereo 4). The two > outputs of the graphics card are connected to two monitors (later will be > two polarized projectors) > > ========== > What I did > ========== > Add > renWin StereoCapableWindowOn > renWin SetStereoTypeToCrystalEyes > right after > vtkRenderWindow renWin > in Examples/Tutorial/Step5/Tcl/Cone5.tcl. > > Run it, hit key "3", then I got error message, saying "Adjusting stereo > mode on a window that does not support stereo type CrystalEyes is not > possible". As a result, I did't see any disparity between the left and > right renderings (they are identical). I suspect that the window failed to > configured itself to be stereo capable as I request. > > Many thanks in advance. > > Weiguang > > From KunduSJ at moffitt.usf.edu Mon Feb 28 10:43:10 2005 From: KunduSJ at moffitt.usf.edu (Kundu, Sangeeta J.) Date: Mon, 28 Feb 2005 10:43:10 -0500 Subject: [vtkusers] problem linking vtk library Message-ID: Hey, Yes I'm compiling on Unix systems. I give the correct linking option too(as u mentioned -l), but i am constntly getting the same errors, "Cannot resolve symbol, " during the linking process. please help. -SK -----Original Message----- From: ttickle [mailto:ttickle at cs.uno.edu] Sent: Mon 2/28/2005 3:55 AM To: Kundu, Sangeeta J. Cc: ??; vtkusers at vtk.org Subject: Re: [vtkusers] problem linking vtk library Kundu, Sangeeta J. wrote: >Hi, >I'm a novice learner too, and while trying to run the examples, I could compile the code but I encounter linking errors, though the linking path is correct. If anyone encountered similar probs, please help. >My lib is in archive format (eg. libvtkRendering.a) > >Thanks. >-SK > >-----Original Message----- >From: vtkusers-bounces at vtk.org on behalf of ?? >Sent: Sun 2/27/2005 9:48 PM >To: vtkusers at vtk.org >Subject: [vtkusers] (no subject) > >hi, > i'm a new learner.when studying the examples in vtk source code(VTK\Examples\GUI\Win32\vtkMFC),i encounter an annoying problem.the compile progresse is ok.but when linking there are lots of problem similar to the one below: > ><<<>>> > >i don't kown why. i would be honored if someone could help me. > ralph in china > > >----------------------------------------- >########################################################################### >## This transmission may be confidential or protected from disclosure and >is only for review and use by the intended recipient. Access by anyone else >is unauthorized. Any unauthorized reader is hereby notified that any >review, use, dissemination, disclosure or copying of this information, or >any act or omission taken in reliance on it, is prohibited and may be >unlawful. If you received this transmission in error, please notify the >sender immediately. Thank you. ######################################### >#################################### > >_______________________________________________ >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 > > > > > > You sound like you are using a unix based compiler (based upon the .a extensions). You need to set the option flag for which libs you want to use when compiling. Example: gcc -lvtkRendering helloworld.c -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.5.0 - Release Date: 2/25/2005 ----------------------------------------- ########################################################################### ## This transmission may be confidential or protected from disclosure and is only for review and use by the intended recipient. Access by anyone else is unauthorized. Any unauthorized reader is hereby notified that any review, use, dissemination, disclosure or copying of this information, or any act or omission taken in reliance on it, is prohibited and may be unlawful. If you received this transmission in error, please notify the sender immediately. Thank you. ######################################### #################################### From StephanTheisen at gmx.de Mon Feb 28 10:54:29 2005 From: StephanTheisen at gmx.de (Stephan Theisen) Date: Mon, 28 Feb 2005 16:54:29 +0100 (MET) Subject: [vtkusers] problems with dicom Message-ID: <4655.1109606069@www33.gmx.net> Hi together! I've the following problem. I've read in 200 slices of dicom images. That works fine and the rendered volume displayed every time. But it seems that several slices are shifted a little bit in one direction. Does anybody know this problem? Thanks in advance Stephan -- Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail From michnay at freemail.hu Mon Feb 28 13:06:20 2005 From: michnay at freemail.hu (=?ISO-8859-2?Q?Michnay_Bal=E1zs?=) Date: Mon, 28 Feb 2005 19:06:20 +0100 (CET) Subject: [vtkusers] Is there a way to build a volume like this? Message-ID: Dear VTK Users, I've seen many examples on how to build a volume from image files stored on the HDD (using SetFilePrefix and SetFilePattern of the reader), but what should I do if my images are created run-time? Writing the images to disk and then reading them back is certainly unnecessary, there must be a way to add them to a volume immediately they're creted. The images have different extent size. Is is still possible? (I hope so...) Thanks for your help, MB From eduardo at ctm.ulpgc.es Mon Feb 28 14:42:31 2005 From: eduardo at ctm.ulpgc.es (Eduardo Suarez) Date: Mon, 28 Feb 2005 19:42:31 +0000 Subject: [vtkusers] running python from the interpreter Message-ID: <42237427.6050903@ctm.ulpgc.es> I would like to know if it is possible to run from python a renderwindow example, and then to run it again. Or just to run it and then exit without breaking. I have tried but i get next error [otto:python_itk_vtk/ 513]$ python Python 2.3.5 (#2, Feb 9 2005, 00:38:15) [GCC 3.3.5 (Debian 1:3.3.5-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import RenderWithVtk [works ok, but when i click close windows (q key does not work)...] X connection to :0.0 broken (explicit kill or server shutdown). [otto:python_itk_vtk/ 514]$ Thanks a lot, -Eduardo From guanw at rhpcs.mcmaster.ca Mon Feb 28 14:53:15 2005 From: guanw at rhpcs.mcmaster.ca (Weiguang Guan) Date: Mon, 28 Feb 2005 14:53:15 -0500 (EST) Subject: [vtkusers] stereoskopic view with two projectors In-Reply-To: Message-ID: Just a followup. I've just made our passive stereo work. The problem is that vertical refresh rates of two monitors were not explicitly set to be identical. After this was corrected, glxinfo could find stereo-capable visual, and my application runs properly. Weiguang -- ======================================================== Weiguang Guan, Research Engineer RHPCS, McMaster University ======================================================== On Mon, 28 Feb 2005, Weiguang Guan wrote: > Hi Lachlan, > > I'm a little confused of what you said. I was trying to create a passive > stereo system, which is very similar to GeoWall. There is email addressing > this written by Nicholas Schwarz with subject "Re: Stereo effect with two > projectors and polarized lenses". They set nVidia into clone mode. > > Using debug I found that > vtkXOpenGLRenderWindow::vtkXOpenGLRenderWindowTryForVisual(...) cannot > find out a stereo-capable visual. Then, I used glxinfo and could not find > any stereo visual either. This is where the problem is. After that, I > check XF86Config, and everything seems ok --- twinview, clone, stereo 4 > ... > > Weiguang > > From mathieu.malaterre at kitware.com Mon Feb 28 15:15:00 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 28 Feb 2005 15:15:00 -0500 Subject: [vtkusers] running python from the interpreter In-Reply-To: <42237427.6050903@ctm.ulpgc.es> References: <42237427.6050903@ctm.ulpgc.es> Message-ID: <42237BC4.9020109@kitware.com> Eduardo, The problem of "X connection to :0.0 broken (explicit kill or server shutdown)." was only very recenlty fixed in VTK CVS. But you should be albe to exit properly your app pressing q or Q. All example using wxWidget, tk, Qt or GTK works this way. Have a look within : - VTK/Wrapping/Python/vtk/qt - VTK/Wrapping/Python/vtk/tk - VTK/Wrapping/Python/vtk/wx - VTK/Wrapping/Python/vtk/gtk HTH Mathieu Eduardo Suarez wrote: > I would like to know if it is possible to run from python a renderwindow > example, and then to run it again. Or just to run it and then exit > without breaking. I have tried but i get next error > > [otto:python_itk_vtk/ 513]$ python > Python 2.3.5 (#2, Feb 9 2005, 00:38:15) > [GCC 3.3.5 (Debian 1:3.3.5-8)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import RenderWithVtk > > [works ok, but when i click close windows (q key does not work)...] > > X connection to :0.0 broken (explicit kill or server shutdown). > [otto:python_itk_vtk/ 514]$ > > Thanks a lot, > -Eduardo > _______________________________________________ > 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 > From mathieu.malaterre at kitware.com Mon Feb 28 15:19:08 2005 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 28 Feb 2005 15:19:08 -0500 Subject: [vtkusers] problems with dicom In-Reply-To: <4655.1109606069@www33.gmx.net> References: <4655.1109606069@www33.gmx.net> Message-ID: <42237CBC.1070705@kitware.com> Stephan Theisen wrote: > Hi together! > > I've the following problem. I've read in 200 slices of dicom images. That > works fine and the rendered volume displayed every time. But it seems that > several slices are shifted a little bit in one direction. Does anybody know > this problem? Without the dicom data it is hard to tell. Can you reproduce the problem on only one slice ? Can you turn DebugOn on the vtkDICOMImageReader and look at anything that might be suspicious. Another alternative is to use the vtkGdcmReader from: http://www.creatis.insa-lyon.fr/Public/Gdcm/ HTH Mathieu From randall.hand at gmail.com Mon Feb 28 17:24:33 2005 From: randall.hand at gmail.com (Randall Hand) Date: Mon, 28 Feb 2005 16:24:33 -0600 Subject: [vtkusers] Compiling VTK on SGI Irix with CCMipsPro Message-ID: I've realized that most of the problems I've had with VTK up to this point have been due to an old/buggy version of gcc, so I've switched back to our CCMipspro compiler, but I can't get VTK to compile with it. I get the following message in the Utilities/DICOMParser stuff. (I have Verbose Makefiles turned on, to help debug this) --- C++ prelinker: DICOMFile.o --- CC -DEFAULT:abi=n32:isa=mips4:proc=r10k -O -g -n32 -LANG:std -r8000 -Wl,-woff84 -woff 15 -woff 84 -woff 3439 -woff 1424 -woff 3201 -I/viz/home/rhand/src/ezViz/Utilities/VTK -I/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities -I/viz/home/rhand/src/ezViz/Utilities/VTK/Parallel -I/viz/home/rhand/src/ezViz/Utilities/VTK/Hybrid -I/viz/home/rhand/src/ezViz/Utilities/VTK/Patented -I/viz/home/rhand/src/ezViz/Utilities/VTK/Rendering -I/viz/home/rhand/src/ezViz/Utilities/VTK/Rendering/Testing/Cxx -I/viz/home/rhand/src/ezViz/Utilities/VTK/IO -I/viz/home/rhand/src/ezViz/Utilities/VTK/Imaging -I/viz/home/rhand/src/ezViz/Utilities/VTK/Graphics -I/viz/home/rhand/src/ezViz/Utilities/VTK/GenericFiltering -I/viz/home/rhand/src/ezViz/Utilities/VTK/Filtering -I/viz/home/rhand/src/ezViz/Utilities/VTK/Common -I/viz/home/rhand/src/ezViz/Utilities/VTK/Common/Testing/Cxx -I/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities/DICOMParser -I/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities/freetype/include -I/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities/freetype -I/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities/ftgl/src -I/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities/ftgl -DVTK_IN_VTK -c /viz/home/rhand/src/ezViz/Utilities/VTK/Utilities/DICOMParser/DICOMFile.cxx -o DICOMFile.o C++ prelinker: get_pid_from_pipe(): job control table corrupted gmake[5]: *** [/viz/home/rhand/src/ezViz/Utilities/VTK/bin/libvtkDICOMParser.a] Error 2 gmake[5]: Leaving directory `/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities/DICOMParser' gmake[4]: *** [default_target] Error 2 gmake[4]: Leaving directory `/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities/DICOMParser' gmake[3]: *** [default_target_DICOMParser] Error 2 gmake[3]: Leaving directory `/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities' gmake[2]: *** [default_target] Error 2 gmake[2]: Leaving directory `/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities' gmake[1]: *** [default_target_Utilities] Error 2 gmake[1]: Leaving directory `/viz/home/rhand/src/ezViz/Utilities/VTK' gmake: *** [default_target] Error 2 As you can see, I've added the following flags via cmake: -O -g -n32 -LANG:std -r8000 Has anyone gotten VTK to compile with CCMipsPro? (I see it on the Dashboard, so somebody must have). We're using MIPSpro Compilers: Version 7.3.1.3m -- Randall Hand http://www.yeraze.com From schwarz at evl.uic.edu Mon Feb 28 18:06:42 2005 From: schwarz at evl.uic.edu (Nicholas Schwarz) Date: Mon, 28 Feb 2005 17:06:42 -0600 Subject: [vtkusers] stereoskopic view with two projectors Message-ID: <000801c51dea$2e2a15f0$e64fc183@ibmikxfh0gjlm6> I've successfully gotten stereo to work with a passive projection system by using a nVidia quadro card and its clone mode and stereo features without a signal splitter. The quadro cards are supposed to have that feature built-in. I've never tested this with a quadro fx500 so I can't say anything about that specific card. Check out this from the archive. It may help... http://www.vtk.org/pipermail/vtkusers/2004-July/075262.html Make sure that your code looks something like this: vtkRenderWindow* renWin = vtkRenderWindow::New(); renWin -> StereoCapableWindowOn(); renWin -> StereoRenderOn(); renWin -> SetStereoTypeToCrystalEyes(); renWin -> SetSize(600, 600); renWin -> AddRenderer(ren); If everything is working correctly you won't need to press '3' to activate stereo. It should be in stereo when the window is realized. My linux XF86Config file has this in it: Option "TwinView" Option "TwinViewOrientation" "Clone" Option "Connectedmonitor" "CRT, CRT" Option "MetaModes" "1024x768,1024x768" Option "Stereo" "4" Hope this helps, Nicholas ----------------------------------------------------------------------- Nicholas Schwarz - Research Assistant Electronic Visualization Laboratory E-Mail: schwarz at evl.uic.edu Department of Computer Science Telephone: 312-996-3002 University of Illinois at Chicago Facsimile: 312-413-7585 ----------------------------------------------------------------------- Message: 2 Date: Mon, 28 Feb 2005 11:25:49 +1100 From: "Lachlan Hurst" Subject: Re: [vtkusers] stereoskopic view with two projectors To: Message-ID: <001b01c51d2c$0de42830$8eb8aa83 at is03> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Hi, Must say, i'm not 100% on the details of your system, but to run vtk with SetStereoTypeToCrystalEyes you must have a display system capable of refreshing at close to 120Hz (not sure on exact frequency). The simple example is to have a single monitor and suitable graphics card that supports stereo and a fast refresh rate (you will also need active stereo glasses). The method used for polarized projectors involves an external "frame splitter" - whereby the graphics card outputs at 120Hz and the frame splitter redirects every second frame to the other projector (splitter has one video in two video out). An alternative method of stereo for polarized projectors only is as follows. Do not clone the displays, create a vtk render window on each display and simply set one renderer to left eye, and the other to right eye. Good luck, Lachlan ----- Original Message ----- From: "Weiguang Guan" To: "trull78yaoo" Cc: Sent: Saturday, February 26, 2005 6:32 AM Subject: Re: [vtkusers] stereoskopic view with two projectors Hi Jorg, Have you made stereo work? If yes please let me know how. I have similar problem to what you had last Oct. I would very much appreciate it if someone could give me a hint. Below is a brief description of my system setting and what I did in attempt to achieve stereo effect. ======= Setting ======= Linux with nVidia Quadro graphics card (in Clone mode, stereo 4). The two outputs of the graphics card are connected to two monitors (later will be two polarized projectors) ========== What I did ========== Add renWin StereoCapableWindowOn renWin SetStereoTypeToCrystalEyes right after vtkRenderWindow renWin in Examples/Tutorial/Step5/Tcl/Cone5.tcl. Run it, hit key "3", then I got error message, saying "Adjusting stereo mode on a window that does not support stereo type CrystalEyes is not possible". As a result, I did't see any disparity between the left and right renderings (they are identical). I suspect that the window failed to configured itself to be stereo capable as I request. Many thanks in advance. Weiguang -- ======================================================== Weiguang Guan, Research Engineer RHPCS, McMaster University ======================================================== On Fri, 22 Oct 2004, trull78yaoo wrote: > Hi all, > > now somebody how can i test the stereoscopic view without vtk. Because > i have no stereoscopic effect with my nvidia quadro fx500 in vtk. Can > somebody help me? Which settinge need Windows, graphic card or vtk? > My settings for graphic card: display mode is Clone, > enable stereo in OpenGL and the stereo display mode > is set to nView Clone. > Here my code: > > #include "vtkConeSource.h" > #include "vtkPolyDataMapper.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkCamera.h" > #include "vtkActor.h" > #include "vtkRenderer.h" > #include "vtkInteractorStyleTrackballCamera.h" > > > int main( int argc, char *argv[] ) > { > vtkConeSource *cone = vtkConeSource::New(); > cone->SetHeight( 3.0 ); > cone->SetRadius( 1.0 ); > cone->SetResolution( 1000 ); > > vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New(); > coneMapper->SetInput( cone->GetOutput() ); > > vtkActor *coneActor = vtkActor::New(); > coneActor->SetMapper( coneMapper ); > > vtkRenderer *ren1= vtkRenderer::New(); > ren1->AddActor( coneActor ); > ren1->SetBackground( 0.1, 0.2, 0.4 ); > > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->StereoCapableWindowOn(); > renWin->SetStereoTypeToCrystalEyes(); > // renWin->SetStereoTypeToDresden(); > renWin->StereoRenderOn(); > renWin->SetFullScreen(1); > renWin->AddRenderer( ren1 ); > > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > > vtkInteractorStyleTrackballCamera *style = > vtkInteractorStyleTrackballCamera::New(); > iren->SetInteractorStyle(style); > > iren->Initialize(); > iren->Start(); > > cone->Delete(); > coneMapper->Delete(); > coneActor->Delete(); > ren1->Delete(); > renWin->Delete(); > iren->Delete(); > style->Delete(); > > return 0; > } > > Thank J?rg > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From lachlan at vpac.org Mon Feb 28 19:23:20 2005 From: lachlan at vpac.org (Lachlan Hurst) Date: Tue, 1 Mar 2005 11:23:20 +1100 Subject: [vtkusers] stereoskopic view with two projectors References: <000801c51dea$2e2a15f0$e64fc183@ibmikxfh0gjlm6> Message-ID: <002501c51df4$df7e4fb0$8eb8aa83@is03> Hi, Must say thats news for me. I always suspected that nVidia would eventually incorperate this functionality into their cards, had no idea that they already had! Will have to have a closer look at our setup. Thanks Nicholas. Cheers, Lachlan ----- Original Message ----- From: "Nicholas Schwarz" To: Sent: Tuesday, March 01, 2005 10:06 AM Subject: Re: [vtkusers] stereoskopic view with two projectors I've successfully gotten stereo to work with a passive projection system by using a nVidia quadro card and its clone mode and stereo features without a signal splitter. The quadro cards are supposed to have that feature built-in. I've never tested this with a quadro fx500 so I can't say anything about that specific card. Check out this from the archive. It may help... http://www.vtk.org/pipermail/vtkusers/2004-July/075262.html Make sure that your code looks something like this: vtkRenderWindow* renWin = vtkRenderWindow::New(); renWin -> StereoCapableWindowOn(); renWin -> StereoRenderOn(); renWin -> SetStereoTypeToCrystalEyes(); renWin -> SetSize(600, 600); renWin -> AddRenderer(ren); If everything is working correctly you won't need to press '3' to activate stereo. It should be in stereo when the window is realized. My linux XF86Config file has this in it: Option "TwinView" Option "TwinViewOrientation" "Clone" Option "Connectedmonitor" "CRT, CRT" Option "MetaModes" "1024x768,1024x768" Option "Stereo" "4" Hope this helps, Nicholas ----------------------------------------------------------------------- Nicholas Schwarz - Research Assistant Electronic Visualization Laboratory E-Mail: schwarz at evl.uic.edu Department of Computer Science Telephone: 312-996-3002 University of Illinois at Chicago Facsimile: 312-413-7585 ----------------------------------------------------------------------- Message: 2 Date: Mon, 28 Feb 2005 11:25:49 +1100 From: "Lachlan Hurst" Subject: Re: [vtkusers] stereoskopic view with two projectors To: Message-ID: <001b01c51d2c$0de42830$8eb8aa83 at is03> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Hi, Must say, i'm not 100% on the details of your system, but to run vtk with SetStereoTypeToCrystalEyes you must have a display system capable of refreshing at close to 120Hz (not sure on exact frequency). The simple example is to have a single monitor and suitable graphics card that supports stereo and a fast refresh rate (you will also need active stereo glasses). The method used for polarized projectors involves an external "frame splitter" - whereby the graphics card outputs at 120Hz and the frame splitter redirects every second frame to the other projector (splitter has one video in two video out). An alternative method of stereo for polarized projectors only is as follows. Do not clone the displays, create a vtk render window on each display and simply set one renderer to left eye, and the other to right eye. Good luck, Lachlan ----- Original Message ----- From: "Weiguang Guan" To: "trull78yaoo" Cc: Sent: Saturday, February 26, 2005 6:32 AM Subject: Re: [vtkusers] stereoskopic view with two projectors Hi Jorg, Have you made stereo work? If yes please let me know how. I have similar problem to what you had last Oct. I would very much appreciate it if someone could give me a hint. Below is a brief description of my system setting and what I did in attempt to achieve stereo effect. ======= Setting ======= Linux with nVidia Quadro graphics card (in Clone mode, stereo 4). The two outputs of the graphics card are connected to two monitors (later will be two polarized projectors) ========== What I did ========== Add renWin StereoCapableWindowOn renWin SetStereoTypeToCrystalEyes right after vtkRenderWindow renWin in Examples/Tutorial/Step5/Tcl/Cone5.tcl. Run it, hit key "3", then I got error message, saying "Adjusting stereo mode on a window that does not support stereo type CrystalEyes is not possible". As a result, I did't see any disparity between the left and right renderings (they are identical). I suspect that the window failed to configured itself to be stereo capable as I request. Many thanks in advance. Weiguang -- ======================================================== Weiguang Guan, Research Engineer RHPCS, McMaster University ======================================================== On Fri, 22 Oct 2004, trull78yaoo wrote: > Hi all, > > now somebody how can i test the stereoscopic view without vtk. Because > i have no stereoscopic effect with my nvidia quadro fx500 in vtk. Can > somebody help me? Which settinge need Windows, graphic card or vtk? > My settings for graphic card: display mode is Clone, > enable stereo in OpenGL and the stereo display mode > is set to nView Clone. > Here my code: > > #include "vtkConeSource.h" > #include "vtkPolyDataMapper.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkCamera.h" > #include "vtkActor.h" > #include "vtkRenderer.h" > #include "vtkInteractorStyleTrackballCamera.h" > > > int main( int argc, char *argv[] ) > { > vtkConeSource *cone = vtkConeSource::New(); > cone->SetHeight( 3.0 ); > cone->SetRadius( 1.0 ); > cone->SetResolution( 1000 ); > > vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New(); > coneMapper->SetInput( cone->GetOutput() ); > > vtkActor *coneActor = vtkActor::New(); > coneActor->SetMapper( coneMapper ); > > vtkRenderer *ren1= vtkRenderer::New(); > ren1->AddActor( coneActor ); > ren1->SetBackground( 0.1, 0.2, 0.4 ); > > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->StereoCapableWindowOn(); > renWin->SetStereoTypeToCrystalEyes(); > // renWin->SetStereoTypeToDresden(); > renWin->StereoRenderOn(); > renWin->SetFullScreen(1); > renWin->AddRenderer( ren1 ); > > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > > vtkInteractorStyleTrackballCamera *style = > vtkInteractorStyleTrackballCamera::New(); > iren->SetInteractorStyle(style); > > iren->Initialize(); > iren->Start(); > > cone->Delete(); > coneMapper->Delete(); > coneActor->Delete(); > ren1->Delete(); > renWin->Delete(); > iren->Delete(); > style->Delete(); > > return 0; > } > > Thank J?rg > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > > 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 From clinton at elemtech.com Mon Feb 28 20:01:48 2005 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 28 Feb 2005 18:01:48 -0700 Subject: [vtkusers] Compiling VTK on SGI Irix with CCMipsPro In-Reply-To: <20050301002325.B875C34C09@public.kitware.com> References: <20050301002325.B875C34C09@public.kitware.com> Message-ID: <20050228180148.6beso6lri4zooksg@webmail.xmission.com> > > Message: 6 > Date: Mon, 28 Feb 2005 16:24:33 -0600 > From: Randall Hand > Subject: [vtkusers] Compiling VTK on SGI Irix with CCMipsPro > To: VTK Users > Message-ID: > Content-Type: text/plain; charset=US-ASCII > > I've realized that most of the problems I've had with VTK up to this > point have been due to an old/buggy version of gcc, so I've switched > back to our CCMipspro compiler, but I can't get VTK to compile with > it. [snip] > > /viz/home/rhand/src/ezViz/Utilities/VTK/Utilities/DICOMParser/DICOMFile.cxx > -o DICOMFile.o > C++ prelinker: get_pid_from_pipe(): job control table corrupted > gmake[5]: *** > [/viz/home/rhand/src/ezViz/Utilities/VTK/bin/libvtkDICOMParser.a] > Error 2 > gmake[5]: Leaving directory > `/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities/DICOMParser' > gmake[4]: *** [default_target] Error 2 > gmake[4]: Leaving directory > `/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities/DICOMParser' > gmake[3]: *** [default_target_DICOMParser] Error 2 > gmake[3]: Leaving directory > `/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities' > gmake[2]: *** [default_target] Error 2 > gmake[2]: Leaving directory > `/viz/home/rhand/src/ezViz/Utilities/VTK/Utilities' > gmake[1]: *** [default_target_Utilities] Error 2 > gmake[1]: Leaving directory `/viz/home/rhand/src/ezViz/Utilities/VTK' > gmake: *** [default_target] Error 2 > > As you can see, I've added the following flags via cmake: -O -g -n32 > -LANG:std -r8000 > Has anyone gotten VTK to compile with CCMipsPro? (I see it on the > Dashboard, so somebody must have). We're using MIPSpro Compilers: > Version 7.3.1.3m I've built it too with 7.4.2m. I didn't use any -r option though. How did you add the flags to CMake? Or did you actually just set the CMAKE_BUILD_TYPE which in turn takes care of -O -g and flags like that? Is your -LANG:std consistent with your VTK_USE_ANSI_STDLIB flag? Newer versions of the compiler do -LANG:std by default. An idea for you is that I've seen weird compling errors when the compiler wasn't patched correctly. Clint > > > -- > Randall Hand > http://www.yeraze.com > > From vv_rahul97 at yahoo.com Mon Feb 28 21:33:24 2005 From: vv_rahul97 at yahoo.com (rahul kumar) Date: Mon, 28 Feb 2005 18:33:24 -0800 (PST) Subject: [vtkusers] Hardware Assisted Volume rending in VTK In-Reply-To: <20050226121247.2DD3333F97@public.kitware.com> Message-ID: <20050301023324.28206.qmail@web40527.mail.yahoo.com> Hi all, i want to implement hardware assisted (using 3D Texture memory of graphics card like ATI Raedon 8500 ) volume rendering. has anybody tried doing this in VTK before? Any help, suggestions are highly appreciated. regards amit __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 From yeriny at ihug.co.nz Mon Feb 28 23:17:50 2005 From: yeriny at ihug.co.nz (yeriny at ihug.co.nz) Date: Tue, 01 Mar 2005 17:17:50 +1300 Subject: [vtkusers] DESPERATE help needed for texturing with 3DS import Message-ID: <4223ecee.3af.649e.1134622544@ihug.co.nz> Hello! I am a vtk newbie, and trying to import .3DS file containing texture coordinates, but how can I get the texture coordinate information by using vtk3DSImporter? I have this code, which basically shows me the model with black texture (of course, because there's no mapping information anywhere!!) but i have NO idea where or how to put that into the code. Here's a snippet of my code (in Visual C++), ANY help is appreciated!! <<<< Snippet of the code >>> // Import the scene from the 3ds file this->importer->ComputeNormalsOn(); this->importer->SetRenderWindow(renWin); this->importer->SetFileName("spaceship.3ds"); this->importer->Read(); // set up our renderer and add it to the window this->ren = this->importer->GetRenderer(); this->renWin->AddRenderer(this->ren); //vtkOutputWindow::GetInstance()-> // setup the parent window this->renWin->SetParentId(this->m_hWnd); this->iren->SetRenderWindow(this->renWin); // Set the default interactor style to "Trackball" this->style = vtkInteractorStyleSwitch::New(); this->iren->SetInteractorStyle(style); this->style->SetCurrentStyleToTrackballCamera(); // Set up texture by linking the image to the texture this->jpegReader->SetFileName("spaceship.jpg"); this->texture->SetInput(this->jpegReader->GetOutput()); this->texture->InterpolateOn(); // get the actors that's imported form 3DS file, // which can be taken from the renderer this->actors = ren->GetActors(); this->actors->InitTraversal(); // Just get the first actor to test // (we know that there's only one actor in the scene!!) this->theActor = this->actors->GetNextActor(); // give texture to the actor this->theActor->SetTexture(this->texture); <<<< Snippet END >>>>> Thank you VERY much!! Yerin