From endre-somogyi at comcast.net Sun Aug 1 21:35:24 2004 From: endre-somogyi at comcast.net (Andy Somogyi) Date: Sun, 01 Aug 2004 19:35:24 -0600 Subject: [vtkusers] c# port of VTK Message-ID: <410D9A5C.1010200@comcast.net> Hello VTK users I am in the process of completly porting VTK (4.2) to c#. As this is c#, it can be used nativly from any .net language. When finished, it will be freely availble under the existing VTL lisence. My question is this: The c++ version of VTK uses length 3 arrays to represent a vector in 3 space. This is fine in c++ because you can create arrays on the stack. It is not possible to create a managed array in c# on the stack, they are allways heap allocated and garbage collected. So using a large number of managed arrays, or creating large numbers of transitory arrays is very inefficient. The use of a 'value type' or a 'struct' in other words is far more effcient when large numbers of objects are involved as they are created on the stack and are not garbage collected. I have thought about using a raw double pointer (double*) instead of an managed array for all functions that use a vector (double[3]). This has the advantage of being very fast, but on the other hand, it is highly error prone, and a user of one of these functions must declare thier method 'unsafe'. I would suspsct that this would discourage many users. There are many good vector and matrix classes avaible for .net, such as the standard vector and matrix types that ship with directx 9. So my question to any perspective vtk.net users is would you prefer all existing methods that currently accept a c++ style array (double[3]) accept the following in the new c# port: 1: managed array (new double[3]) advantages: 1.1 farmiliar syntax 1.2 do not have to declare 'unsafe' code disadvanteges: 1.2 very ineffcient both in terms of size and performance 2: unmanaged pointer (double*) advanteges: 2.1 very effecient disadvantes: 2.2 error prone 2.3 need to pin a managed array or use 'stackalloc' 3: use a 'Vector3' value type advanteges 3.1 very effcient 3.2 very safe 3.3 easy to convert to and from a 'double*' disadvantes: 3.3 introduces unfarmiliair syntax Any ides or oppinions would be greatly appcieated thanks From ppau at risc.uni-linz.ac.at Mon Aug 2 02:54:59 2004 From: ppau at risc.uni-linz.ac.at (Petru Pau) Date: Mon, 02 Aug 2004 08:54:59 +0200 Subject: [vtkusers] about vtkStreamer References: <410A3EB0.5020406@risc.uni-linz.ac.at> <6.1.2.0.2.20040730083900.04145ec0@pop.biz.rr.com> <410A49C0.6030600@risc.uni-linz.ac.at> <410A49F4.3000800@risc.uni-linz.ac.at> <410A4C5D.6020005@cdnorthamerica.com> Message-ID: <410DE543.7020205@risc.uni-linz.ac.at> Hi Jeff, It seems that I forgot to mention the most important thing: Yes, thank you, I would very much appreciate your guidance. I modified the code of vtkStreamTracer, but it seems that the algorithm always stops when it reaches the border of the first cell. On that cell, constraining the stream line to the surface works OK. I added some code that computes one more point, by intersecting the line generated by the last two computed points with the boundary of the cell. After that, I switch the current cell of the vtkInterpolatedVelocityField to the adjacent cell and give the control back to the original code. Now it seems that this last point, computed by my code, is not detected as belonging to an adjacent cell, and the first call to vtkInterpolatedVelocityField's FunctionValues() returns 0. I intend to add the computation of one extra point, which should be in the interior of the adjacent cell (I reckon maybe the algorithm stops because VTK does not really like points on edges), and only afterwards pass the control back to original code. I am not really satisfied with this, but I don't know what else to do to persuade the vtkInterpolatedVelocityField that the point on the edge belongs to the cell. Most probably there is a simpler way to do things: if so, I would be very grateful for any help. Petru From lucepz at caramail.com Mon Aug 2 03:18:13 2004 From: lucepz at caramail.com (Prin-Zanet Lucile ) Date: Mon, 02 Aug 2004 07:18:13 GMT Subject: [vtkusers] vtk and tcl/tk Message-ID: <1091431093028014@lycos-europe.com> An HTML attachment was scrubbed... URL: From schirski at rz.rwth-aachen.de Mon Aug 2 04:00:52 2004 From: schirski at rz.rwth-aachen.de (Marc Schirski) Date: Mon, 02 Aug 2004 10:00:52 +0200 Subject: [vtkusers] Delaunay3D Problem Message-ID: <200408020800.i7280qxv025315@relay.rwth-aachen.de> Hi there, I've got a problem with the vtkDelaunay3D filter and I'm not quite sure, what I'm doing wrong... I've got some rather small points sets of about 6 to 12 points, which I want to tetrahedrize with the help of the aforementioned filter, but for some reasons I don't get any satifying results. Depending on the point sets I get between 0 and 7 tetras, which is obiviously not exactly what one would want. Basically, I just read in the points (or generate the corresponding vtkUnstructuredGrid on the fly), stuff them into the vtkDelaunay3D filter, and keep on working with its output. Playing a little with the filter's parameters didn't help much. Am I missing something obvious? I've included two examples at the end of this post - the first one gives only one tetra, the second one doesn't give me anything... Actually, these tetrahedrizations are just workarounds for problems I've got with polyhedral (sp?) cells. I'm trying to visualize data, which has been generated by the fluid solver StarCD, and as long as the data sets contain only standard cell types (like hexahedras, wedges, pyramids etc.), everything works fine, but as they are switching to using more complex cell types, which are not supported by VTK as far as I know, problems start to arise... Most of the new cell types are created from hexahedrons, which have parts of them cut away. Up to now, I just collect their points and tetrahedrize them. I know, there might be some problems with topology and continuity... I should mention, that we write out the data from StarCD with some macros and convert them to VTK data with self-made converters, because we found the provided exporters (and importers for VTK) lacking in some respects. Does anyone have the same problem or even a better idea about dealing with polyhedral cells? Thanks in advance and best regards, Marc Example data files: Resulting in one tetra: # vtk DataFile Version 3.0 vtk output ASCII DATASET UNSTRUCTURED_GRID POINTS 8 float 0.00537343 0.0372491 0.00427497 0.00444438 0.0367304 0.00437597 0.00534854 0.0366205 0.0043661 0.00458916 0.036248 0.0049958 0.00435543 0.0370227 0.00550448 0.00528037 0.0370245 0.00518234 0.00534554 0.0362377 0.00530908 0.004414 0.0372877 0.00428951 CELL_TYPES 0 POINT_DATA 8 Resulting in no tetra at all: # vtk DataFile Version 3.0 vtk output ASCII DATASET UNSTRUCTURED_GRID POINTS 8 float 0.004414 0.0372877 0.00428951 0.00537343 0.0372491 0.00427497 0.00444438 0.0367304 0.00437597 0.00534854 0.0366205 0.0043661 0.00458916 0.036248 0.0049958 0.00435543 0.0370227 0.00550448 0.00528037 0.0370245 0.00518234 0.00534554 0.0362377 0.00530908 CELL_TYPES 0 POINT_DATA 8 From Jonathan.Bailleul at greyc.ismra.fr Mon Aug 2 07:36:06 2004 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Mon, 02 Aug 2004 13:36:06 +0200 Subject: [vtkusers] Wiki References: <20040730105204.CCC9E1431E@public.kitware.com> Message-ID: <410E2726.88B7279E@greyc.ismra.fr> Err, it's a rather stupid question, but what is the precise url of vtk-wiki? Thanks in advance, -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From jeff at cdnorthamerica.com Mon Aug 2 08:00:54 2004 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Mon, 02 Aug 2004 08:00:54 -0400 Subject: [vtkusers] about vtkStreamer In-Reply-To: <410DE543.7020205@risc.uni-linz.ac.at> References: <410A3EB0.5020406@risc.uni-linz.ac.at> <6.1.2.0.2.20040730083900.04145ec0@pop.biz.rr.com> <410A49C0.6030600@risc.uni-linz.ac.at> <410A49F4.3000800@risc.uni-linz.ac.at> <410A4C5D.6020005@cdnorthamerica.com> <410DE543.7020205@risc.uni-linz.ac.at> Message-ID: <410E2CF6.6060002@cdnorthamerica.com> Hi Petru, What you explain below seems correct - you need to intersect the streamline with the terminating boundary. vtkStreamTracer actually keeps the last point (if the integration goes outside of the domain) so you can intersect the cell boundary with the line containing the last successful integration point and the "last-point" from the shoot of the integration. Are you sure that your intersection was successful? -Jeff Petru Pau wrote: > Hi Jeff, > > It seems that I forgot to mention the most important thing: Yes, thank > you, I would very much appreciate your guidance. > > I modified the code of vtkStreamTracer, but it seems that the algorithm > always stops when it reaches the border of the first cell. On that cell, > constraining the stream line to the surface works OK. > > I added some code that computes one more point, by intersecting the > line generated > by the last two computed points with the boundary of the cell. After > that, I switch the current > cell of the vtkInterpolatedVelocityField to the adjacent cell and give > the control back > to the original code. Now it seems that this last point, computed by > my code, > is not detected as belonging to an adjacent cell, and the first call to > vtkInterpolatedVelocityField's FunctionValues() returns 0. > > I intend to add the computation of one extra point, which should be > in the interior of the adjacent cell (I reckon maybe the algorithm > stops because > VTK does not really like points on edges), and only afterwards pass > the control > back to original code. I am not really satisfied with this, but I > don't know what else > to do to persuade the vtkInterpolatedVelocityField that the point on > the edge > belongs to the cell. > > Most probably there is a simpler way to do things: if so, I would be > very grateful > for any help. > > Petru > > > _______________________________________________ > 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 > > -- Jeff Lee Senior Software Engineer Computational Dynamics North America Ltd 21 Lafayette Street, Suite 230 Lebanon NH 03766 USA fax: 603 643 9994 phone: 603 643 9993 x109 http://www.cd-adapco.com From hampdonald at yahoo.com Mon Aug 2 08:36:32 2004 From: hampdonald at yahoo.com (Hamp Donald) Date: Mon, 2 Aug 2004 05:36:32 -0700 (PDT) Subject: [vtkusers] Texture Message-ID: <20040802123632.54396.qmail@web42003.mail.yahoo.com> Hi May I know whether obj format or .vtk format displays texture on surface. This is very important for my work. Texture does not work with VRML format in VTK. Best Regards Donald __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From hampdonald at yahoo.com Mon Aug 2 08:36:32 2004 From: hampdonald at yahoo.com (Hamp Donald) Date: Mon, 2 Aug 2004 05:36:32 -0700 (PDT) Subject: [vtkusers] Texture Message-ID: <20040802123632.54396.qmail@web42003.mail.yahoo.com> Hi May I know whether obj format or .vtk format displays texture on surface. This is very important for my work. Texture does not work with VRML format in VTK. Best Regards Donald __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From T.Hutton at eastman.ucl.ac.uk Mon Aug 2 08:44:29 2004 From: T.Hutton at eastman.ucl.ac.uk (Tim Hutton) Date: Mon, 02 Aug 2004 13:44:29 +0100 Subject: [vtkusers] Texture In-Reply-To: <20040802123632.54396.qmail@web42003.mail.yahoo.com> Message-ID: <5.1.0.14.0.20040802133835.02ddb900@144.82.123.1> Donald, VTK can't load textured surfaces directly, but you can load in the texture image separately, since the texture coordinates *are* picked-up by vtkOBJReader, vtkVRMLImporter, etc. We do this all the time. The only problem is when the texture image is stored *in* the VRML file, then you need to extract it somehow, I haven't done this. Hope this helps, Tim At 05:36 02/08/2004 -0700, Hamp Donald wrote: >Hi > May I know whether obj format or .vtk format >displays texture on surface. This is very important >for my work. >Texture does not work with VRML format in VTK. > >Best Regards >Donald > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >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 specht at ifi.unizh.ch Mon Aug 2 08:57:18 2004 From: specht at ifi.unizh.ch (matthias specht) Date: Mon, 02 Aug 2004 14:57:18 +0200 Subject: [vtkusers] java problems (swing) In-Reply-To: <20040730122800.00BB3B5A8@public.kitware.com> References: <20040730122800.00BB3B5A8@public.kitware.com> Message-ID: <410E3A2E.90501@ifi.unizh.ch> hi all, I just installed the new nvidia-kernel-1.0.6106-r1 [on gentoo linux, don't know if it's available for other distributions] - and my app doesn't crash anymore on exit. regards matthias >Date: Fri, 30 Jul 2004 07:22:21 -0400 >From: Jeff Lee >Subject: Re: [vtkusers] java problems (swing) >To: Christian Werner , VTK-User > >Message-ID: <410A2F6D.9080003 at cdnorthamerica.com> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >Since this also happens in jdk1.4.2, i think it is an nvidia problem. I >came up with a test which reproduces the problem and I have them looking >at it now - I will post their findings when I hear back. Editorially >speaking, I would sooner revert back to 5336 than hack around >System.exit() - is there something in 6106 that you really need? Good luck. >-Jeff > From amy.henderson at kitware.com Mon Aug 2 09:32:28 2004 From: amy.henderson at kitware.com (Amy Henderson) Date: Mon, 02 Aug 2004 09:32:28 -0400 Subject: [vtkusers] Wiki In-Reply-To: <410E2726.88B7279E@greyc.ismra.fr> References: <20040730105204.CCC9E1431E@public.kitware.com> <410E2726.88B7279E@greyc.ismra.fr> Message-ID: <6.1.2.0.2.20040802093213.033771e0@pop.biz.rr.com> http://www.vtk.org/Wiki/VTK At 07:36 AM 8/2/2004, Jonathan Bailleul wrote: >Err, it's a rather stupid question, but what is the precise url of >vtk-wiki? > >Thanks in advance, > >-- >----------------------------------- >Jonathan BAILLEUL, Doctorant >GREYC Image - Universit? de Caen >http://www.greyc.ismra.fr/~bailleul > >_______________________________________________ >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 gva06 at elai.upm.es Mon Aug 2 09:40:56 2004 From: gva06 at elai.upm.es (Nuria Paniagua) Date: Mon, 2 Aug 2004 15:40:56 +0200 Subject: [vtkusers] a strange error when using vtk on MFC References: <20040727144922.AA2067B1375@mx1.sjtu.edu.cn> Message-ID: <000c01c47896$5996f770$8a64648a@elai.upm.es> Hello. I am trying to do a program based on MFC and that simultaneously uses the bookshops VTK but not as doing it. The problem is that not like beginning. Because if I open first MFC's project it cannot include the VTK because these generate his own project on having used the CMake. Please, Could you help me? Thank you ----- Original Message ----- From: "jiang-gx" To: "vtk" Sent: Tuesday, July 27, 2004 4:49 PM Subject: [vtkusers] a strange error when using vtk on MFC > hi everyone: > there was a strange mistake occured when i used the vtk in the MFC platform, the problem is as below: > > i wrote a new vtk class named "vtkCenterLine" which calculates the skeleton line of input image such as the tharm image. and a use the vtkMarchingCube meanwhile. > > when i write the pipline like : > " > pDoc->centerLine->SetInput(pDoc->v16->GetOutput()); > pDoc->centerLineMapper ->SetInput(pDoc->centerLine->GetOutput()); > pDoc->centerLineActor ->SetMapper(pDoc->centerLineMapper ); > pDoc->centerLineActor ->GetProperty()->SetColor(1,0,0); > this->ren1 ->AddActor(pDoc->centerLineActor); > > pDoc->volume_Extractor->SetInput(pDoc->v16->GetOutput()); > pDoc->volume_Extractor->SetValue(0, 500); > pDoc->volume_Stripper->SetInput(pDoc->volume_Extractor->GetOutput()); > pDoc->volume_Mapper->SetInput(pDoc->volume_Stripper->GetOutput()); > pDoc->volume_Mapper->ScalarVisibilityOff(); > pDoc->volume_Actor ->SetMapper(pDoc->volume_Mapper); > pDoc->volume_Actor->GetProperty()->SetDiffuseColor(0.8, 0.8, 0.6); > pDoc->volume_Actor->GetProperty()->SetSpecular(.3); > pDoc->volume_Actor->GetProperty()->SetSpecularPower(20); > pDoc->volume_Actor->GetProperty()->SetOpacity(0.5); > this->ren1 ->AddActor(pDoc->volume_Actor); > > " > it get a right result. > > but when i change the code a little as > " > pDoc->volume_Extractor->SetInput(pDoc->v16->GetOutput()); > pDoc->volume_Extractor->SetValue(0, 500); > pDoc->volume_Stripper->SetInput(pDoc->volume_Extractor->GetOutput()); > pDoc->volume_Mapper->SetInput(pDoc->volume_Stripper->GetOutput()); > pDoc->volume_Mapper->ScalarVisibilityOff(); > pDoc->volume_Actor ->SetMapper(pDoc->volume_Mapper); > pDoc->volume_Actor->GetProperty()->SetDiffuseColor(0.8, 0.8, 0.6); > pDoc->volume_Actor->GetProperty()->SetSpecular(.3); > pDoc->volume_Actor->GetProperty()->SetSpecularPower(20); > pDoc->volume_Actor->GetProperty()->SetOpacity(0.5); > this->ren1 ->AddActor(pDoc->volume_Actor); > > > > pDoc->centerLine->SetInput(pDoc->v16->GetOutput()); > pDoc->centerLineMapper ->SetInput(pDoc->centerLine->GetOutput()); > pDoc->centerLineActor ->SetMapper(pDoc->centerLineMapper ); > pDoc->centerLineActor ->GetProperty()->SetColor(1,0,0); > this->ren1 ->AddActor(pDoc->centerLineActor); > " > > a error will occured at the runtime. > > why ? thank you for answerring!! > > _______________________________________________ > 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 gva06 at elai.upm.es Mon Aug 2 09:47:08 2004 From: gva06 at elai.upm.es (Nuria Paniagua) Date: Mon, 2 Aug 2004 15:47:08 +0200 Subject: [vtkusers] MFC and VTK References: <20040727144922.AA2067B1375@mx1.sjtu.edu.cn> Message-ID: <001c01c47897$341ff180$8a64648a@elai.upm.es> ----- Original Message ----- From: "jiang-gx" To: "vtk" Sent: Tuesday, July 27, 2004 4:49 PM Subject: [vtkusers] a strange error when using vtk on MFC > hi everyone: > there was a strange mistake occured when i used the vtk in the MFC platform, the problem is as below: > > i wrote a new vtk class named "vtkCenterLine" which calculates the skeleton line of input image such as the tharm image. and a use the vtkMarchingCube meanwhile. > > when i write the pipline like : > " > pDoc->centerLine->SetInput(pDoc->v16->GetOutput()); > pDoc->centerLineMapper ->SetInput(pDoc->centerLine->GetOutput()); > pDoc->centerLineActor ->SetMapper(pDoc->centerLineMapper ); > pDoc->centerLineActor ->GetProperty()->SetColor(1,0,0); > this->ren1 ->AddActor(pDoc->centerLineActor); > > pDoc->volume_Extractor->SetInput(pDoc->v16->GetOutput()); > pDoc->volume_Extractor->SetValue(0, 500); > pDoc->volume_Stripper->SetInput(pDoc->volume_Extractor->GetOutput()); > pDoc->volume_Mapper->SetInput(pDoc->volume_Stripper->GetOutput()); > pDoc->volume_Mapper->ScalarVisibilityOff(); > pDoc->volume_Actor ->SetMapper(pDoc->volume_Mapper); > pDoc->volume_Actor->GetProperty()->SetDiffuseColor(0.8, 0.8, 0.6); > pDoc->volume_Actor->GetProperty()->SetSpecular(.3); > pDoc->volume_Actor->GetProperty()->SetSpecularPower(20); > pDoc->volume_Actor->GetProperty()->SetOpacity(0.5); > this->ren1 ->AddActor(pDoc->volume_Actor); > > " > it get a right result. > > but when i change the code a little as > " > pDoc->volume_Extractor->SetInput(pDoc->v16->GetOutput()); > pDoc->volume_Extractor->SetValue(0, 500); > pDoc->volume_Stripper->SetInput(pDoc->volume_Extractor->GetOutput()); > pDoc->volume_Mapper->SetInput(pDoc->volume_Stripper->GetOutput()); > pDoc->volume_Mapper->ScalarVisibilityOff(); > pDoc->volume_Actor ->SetMapper(pDoc->volume_Mapper); > pDoc->volume_Actor->GetProperty()->SetDiffuseColor(0.8, 0.8, 0.6); > pDoc->volume_Actor->GetProperty()->SetSpecular(.3); > pDoc->volume_Actor->GetProperty()->SetSpecularPower(20); > pDoc->volume_Actor->GetProperty()->SetOpacity(0.5); > this->ren1 ->AddActor(pDoc->volume_Actor); > > > > pDoc->centerLine->SetInput(pDoc->v16->GetOutput()); > pDoc->centerLineMapper ->SetInput(pDoc->centerLine->GetOutput()); > pDoc->centerLineActor ->SetMapper(pDoc->centerLineMapper ); > pDoc->centerLineActor ->GetProperty()->SetColor(1,0,0); > this->ren1 ->AddActor(pDoc->centerLineActor); > " > > a error will occured at the runtime. > > why ? thank you for answerring!! > > _______________________________________________ > 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 gva06 at elai.upm.es Mon Aug 2 10:08:46 2004 From: gva06 at elai.upm.es (Nuria Paniagua) Date: Mon, 2 Aug 2004 16:08:46 +0200 Subject: [vtkusers] VTK and MFC Message-ID: <003001c4789a$39e54540$8a64648a@elai.upm.es> Hello. I am trying to do a program based on MFC and that simultaneously uses the bookshops VTK but not as doing it. The problem is that not like beginning. Because if I open first MFC's project it cannot include the VTK because these generate his own project on having used the CMake. Please, Could you help me? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From lucepz at caramail.com Mon Aug 2 10:55:02 2004 From: lucepz at caramail.com (Prin-Zanet Lucile ) Date: Mon, 02 Aug 2004 14:55:02 GMT Subject: [vtkusers] MIL and Tk Message-ID: <1091458502011873@lycos-europe.com> An HTML attachment was scrubbed... URL: From ppau at risc.uni-linz.ac.at Mon Aug 2 11:03:06 2004 From: ppau at risc.uni-linz.ac.at (Petru Pau) Date: Mon, 02 Aug 2004 17:03:06 +0200 Subject: [vtkusers] about vtkStreamer References: <410A3EB0.5020406@risc.uni-linz.ac.at> <6.1.2.0.2.20040730083900.04145ec0@pop.biz.rr.com> <410A49C0.6030600@risc.uni-linz.ac.at> <410A49F4.3000800@risc.uni-linz.ac.at> <410A4C5D.6020005@cdnorthamerica.com> <410DE543.7020205@risc.uni-linz.ac.at> <410E2CF6.6060002@cdnorthamerica.com> Message-ID: <410E57AA.7080207@risc.uni-linz.ac.at> Jeff, > you need to intersect the streamline with the terminating boundary. > [...] Are you sure that your intersection was successful? The problem is that for some perfectly legal input the algorithm does not get there. There are two important points in the "while" loop that generates the points on the stream line: - at the computation of the next point: if ((tmp= integrator->ComputeNextStep(...)) != 0) { /********************************** my code *************************************/ if (tmp!=OUT_OF_DOMAIN) break; // compute intersection with edge and try to switch to next cell // .... } - at the computation of the velocity vector for the newly generated point: if ( !func->FunctionValues(point2, velocity) ) { retVal = OUT_OF_DOMAIN; memcpy(lastPoint, point2, 3*sizeof(double)); break; } Now for a very simple example the loop exits from the second condition (I enclose at the end of this message the .vtk file). This means that the integration step has taken place succesfully, but the FunctionValues fails; more exactly, it calls EvaluatePosition, and this fails. Note that the point is in the current cell - see the attached image (the seed point is (0.05, 0.02, 0). Each computed point is projected on the current cell. I inserted the following code right before inserting the point. I wrote a function "Project" because I do not really know the meaning of the 0 or -1 returned by EvaluatePosition, if the point under consideration is outside the cell and its projection onto the cell's plane is internal to the cell (or on its boundary). if (cell->GetCellDimension()==2) { double projPoint[3]; if (Project(cell, point1, projPoint)) { memcpy(point1, projPoint, 3*sizeof(double)); } } I think that for this case integrator->ComputeNextStep is successful because both the initial point and the point+delta/2 fall within the cell; the next point, however, gets out of the cell, and FunctionValues somehow detects this. Which means that I have to hack also around the call of FunctionValues. Petru ------------------- # vtk DataFile Version 2.0 Sample data for polydata ASCII DATASET POLYDATA POINTS 5 float 0.0 0.0 0.0 2.0 0.0 0.0 0.0 2.0 0.0 2.0 2.0 1.0 1.5 3.5 1.5 POLYGONS 3 12 3 0 1 2 3 1 2 3 3 2 3 4 POINT_DATA 5 SCALARS scalars float 1 LOOKUP_TABLE default 0.0 1.0 2.0 3.0 4.0 VECTORS vectors float 1 1 21 4 2 21 6 3 21 8 4 21 10 5 21 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: simple_ex_1.jpg Type: image/jpeg Size: 13052 bytes Desc: not available URL: From vtk072404 at thinkpeak.com Mon Aug 2 11:42:48 2004 From: vtk072404 at thinkpeak.com (Chris Kennedy) Date: Mon, 02 Aug 2004 11:42:48 -0400 Subject: [vtkusers] file format: Polygonal Data - POINTS, POLYGONS - wireframe, surface visualization Message-ID: <410E60F8.5080204@thinkpeak.com> hi, I'm creating VTK format files and I have trouble when I visualize the data. In wireframe it looks ok, but in Surface mode I have triangles showing up that I don't understand. I get the same behavior independent of whether I close the polygon or not. # vtk DataFile Version 2.0 polydata for mask m3 ASCII DATASET POLYDATA POINTS 12 float 25.0 0.0 3.0 25.0 8.0 3.0 15.5 8.0 3.0 15.5 11.0 3.0 12.5 11.0 3.0 12.5 19.0 3.0 0.5 19.0 3.0 0.5 9.0 3.0 10.5 9.0 3.0 10.5 6.5 3.0 14.0 6.5 3.0 14.0 0.0 3.0 POLYGONS 1 14 13 0 1 2 3 4 5 6 7 8 9 10 11 0 # ===================== Do I need to define additional data for the POLYDATA type to get this to show up properly? or is subsequent processing thru a filter required? thanks Chris Kennedy Think Peak, Inc. From jarv0075 at umn.edu Mon Aug 2 12:00:47 2004 From: jarv0075 at umn.edu (jarv0075) Date: Mon, 02 Aug 2004 11:00:47 CDT Subject: [vtkusers] file format: Polygonal Data - POINTS, POLYGONS - wireframe, surface visualization Message-ID: <200408021600.i72G0lln019898@trojan.software.umn.edu> Try triangulating it. -Tim On 2 Aug 2004, Chris Kennedy wrote: > hi, > I'm creating VTK format files and I have trouble when I visualize the > data. In wireframe it looks ok, but in Surface mode I have triangles > showing up that I don't understand. I get the same behavior independent > of whether I close the polygon or not. > > # vtk DataFile Version 2.0 > polydata for mask m3 > ASCII > DATASET POLYDATA > POINTS 12 float > 25.0 0.0 3.0 > 25.0 8.0 3.0 > 15.5 8.0 3.0 > 15.5 11.0 3.0 > 12.5 11.0 3.0 > 12.5 19.0 3.0 > 0.5 19.0 3.0 > 0.5 9.0 3.0 > 10.5 9.0 3.0 > 10.5 6.5 3.0 > 14.0 6.5 3.0 > 14.0 0.0 3.0 > > POLYGONS 1 14 > 13 0 1 2 3 4 5 6 7 8 9 10 11 0 > > # ===================== > > Do I need to define additional data for the POLYDATA type to get this to > show up properly? or is subsequent processing thru a filter required? > > thanks > > Chris Kennedy > Think Peak, Inc. > > > > > _______________________________________________ > 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 > --------------------------------------- Timothy R. Jarvis --------------------------------------- Graduate Research Assistant International Neuroimaging Consortium VA Medical Center 612-467-2619 http://www.neurovia.umn.edu --------------------------------------- From melanies at neo.tamu.edu Mon Aug 2 12:28:23 2004 From: melanies at neo.tamu.edu (Sarzynski, Melanie D) Date: Mon, 2 Aug 2004 16:28:23 -0000 Subject: [vtkusers] VTK and FEM meshes Message-ID: <200408021628.i72GSNQA092222@smtp-relay.tamu.edu> I am attempting to use VTK to output *.stl files that can be loaded into a finite element analysis tool, ie Patran/Abaqus. My problem consists of a cube with a cylindrical hole through the middle. When I export this problem, it consists of two surfaces--the outside of the cube and the surface of the cylindrical hole, with nothing in between. I have been able to import the *.stl file into Patran. The data consists of nodes and 2D elements. However, I want solid elements for the analysis. Does anyone know how to convert this data into solid elements? Alternatively, does anyone know how to export geometric primitives (points, lines, etc) from VTK? If I could do this I could define surfaces, etc and create the mesh myself. Thanks, Melanie From cowell at arsc.edu Mon Aug 2 13:32:44 2004 From: cowell at arsc.edu (Mackenzie L. Cowell) Date: Mon, 2 Aug 2004 09:32:44 -0800 Subject: [vtkusers] can't find function vtkContourFilter::SetInput(vtkImageData*) Message-ID: Hello dear list members! I'm using an implicit modeller to generate a scalar field around a sort of stick figure I made (which is simply a collection of points and lines in a vtkPolyData object), and then using vtkContourFilter to generate an isosurface from that scalar field (which is, I believe, generated as vtkImageData. I was inspired to do this by the hello.tcl example, and the little program I wrote works perfectly *in* tcl. I need to port it over to c++, and it's there that I'm running into problems. Here is the relevent c++ code: (awData is the stick figure) vtkImplicitModeller * imp = vtkImplicitModeller::New(); imp->SetInput( awData ); imp->SetSampleDimensions( 80, 80, 256 ); //resolution imp->SetMaximumDistance( 4 ); //perimiter of calculation imp->SetModelBounds( -15, 20, -5, 5, -1.0, 50.0 ); vtkContourFilter * contour = vtkContourFilter::New(); contour->SetInput( imp->GetOutput() ); contour->SetValue( 0, 1.0 ); vtkPolyDataMapper * impMapper = vtkPolyDataMapper::New(); impMapper->SetInput( contour->GetOutput() ); impMapper->ScalarVisibilityOff(); However! I get this funky compile-time error: /imports/archive/u1/uaf/cowell/airway/airway.cxx:113: no matching function for call to `vtkContourFilter::SetInput(vtkImageData*)' /imports/projects/UAFINSP/vtk-src/Filtering/vtkDataSetToPolyDataFilter.h:44: candidates are: virtual void vtkDataSetToPolyDataFilter::SetInput(vtkDataSet*) Am I just setting up the pipeline wrong? It works fine in tcl: vtkContourFilter contour contour SetInput [imp GetOutput] anyway, your help is desperately needed and appreciated! thanks! Mac Cowell Summer Intern Arctic Region Supercomputing Center Fairbanks, AK From bob at stlcc.org Mon Aug 2 15:11:17 2004 From: bob at stlcc.org (Bob Palank) Date: Mon, 2 Aug 2004 14:11:17 -0500 Subject: [vtkusers] c# port of VTK In-Reply-To: <410D9A5C.1010200@comcast.net> Message-ID: What a great project. I for one, look forward to your first release. BR Bob Palank -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org]On Behalf Of Andy Somogyi Sent: Sunday, August 01, 2004 8:35 PM To: vtkusers at vtk.org Subject: [vtkusers] c# port of VTK Hello VTK users I am in the process of completly porting VTK (4.2) to c#. As this is c#, it can be used nativly from any .net language. When finished, it will be freely availble under the existing VTL lisence. My question is this: The c++ version of VTK uses length 3 arrays to represent a vector in 3 space. This is fine in c++ because you can create arrays on the stack. It is not possible to create a managed array in c# on the stack, they are allways heap allocated and garbage collected. So using a large number of managed arrays, or creating large numbers of transitory arrays is very inefficient. The use of a 'value type' or a 'struct' in other words is far more effcient when large numbers of objects are involved as they are created on the stack and are not garbage collected. I have thought about using a raw double pointer (double*) instead of an managed array for all functions that use a vector (double[3]). This has the advantage of being very fast, but on the other hand, it is highly error prone, and a user of one of these functions must declare thier method 'unsafe'. I would suspsct that this would discourage many users. There are many good vector and matrix classes avaible for .net, such as the standard vector and matrix types that ship with directx 9. So my question to any perspective vtk.net users is would you prefer all existing methods that currently accept a c++ style array (double[3]) accept the following in the new c# port: 1: managed array (new double[3]) advantages: 1.1 farmiliar syntax 1.2 do not have to declare 'unsafe' code disadvanteges: 1.2 very ineffcient both in terms of size and performance 2: unmanaged pointer (double*) advanteges: 2.1 very effecient disadvantes: 2.2 error prone 2.3 need to pin a managed array or use 'stackalloc' 3: use a 'Vector3' value type advanteges 3.1 very effcient 3.2 very safe 3.3 easy to convert to and from a 'double*' disadvantes: 3.3 introduces unfarmiliair syntax Any ides or oppinions would be greatly appcieated thanks _______________________________________________ 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 seanm at nmr.mgh.harvard.edu Mon Aug 2 15:51:29 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Mon, 02 Aug 2004 15:51:29 -0400 Subject: [vtkusers] c# port of VTK In-Reply-To: <410D9A5C.1010200@comcast.net> References: <410D9A5C.1010200@comcast.net> Message-ID: <410E9B41.6030500@nmr.mgh.harvard.edu> Andy, I am sure that a C# port could be very popular. Are you using a wrapping approach or are you parsing C++ code to generate C#? Also, I am unsure of where you are encountering the problem that you describe in your message. Could you provide a few specific instances? -Sean Andy Somogyi wrote: > Hello VTK users > > I am in the process of completly porting VTK (4.2) to c#. > As this is c#, it can be used nativly from any .net language. > > When finished, it will be freely availble under the existing VTL lisence. > > My question is this: > > The c++ version of VTK uses length 3 arrays to represent a vector in 3 > space. > This is fine in c++ because you can create arrays on the stack. > > It is not possible to create a managed array in c# on the stack, they > are allways > heap allocated and garbage collected. So using a large number of managed > arrays, or > creating large numbers of transitory arrays is very inefficient. > > The use of a 'value type' or a 'struct' in other words is far more > effcient when > large numbers of objects are involved as they are created on the stack > and are not > garbage collected. > > I have thought about using a raw double pointer (double*) instead of an > managed array > for all functions that use a vector (double[3]). This has the advantage > of being very > fast, but on the other hand, it is highly error prone, and a user of one > of these functions > must declare thier method 'unsafe'. I would suspsct that this would > discourage many users. > > There are many good vector and matrix classes avaible for .net, such as > the standard vector and > matrix types that ship with directx 9. > > So my question to any perspective vtk.net users is would you prefer all > existing methods > that currently accept a c++ style array (double[3]) accept the following > in the new > c# port: > > 1: managed array (new double[3]) > advantages: > 1.1 farmiliar syntax > 1.2 do not have to declare 'unsafe' code > disadvanteges: > 1.2 very ineffcient both in terms of size and performance > > 2: unmanaged pointer (double*) > advanteges: > 2.1 very effecient > disadvantes: > 2.2 error prone > 2.3 need to pin a managed array or use 'stackalloc' > > 3: use a 'Vector3' value type > advanteges > 3.1 very effcient > 3.2 very safe > 3.3 easy to convert to and from a 'double*' > disadvantes: > 3.3 introduces unfarmiliair syntax > > Any ides or oppinions would be greatly appcieated > > thanks > > > > _______________________________________________ > 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 eugene at salk.edu Mon Aug 2 16:20:46 2004 From: eugene at salk.edu (Eugene Kim) Date: Mon, 2 Aug 2004 13:20:46 -0700 (PDT) Subject: [vtkusers] jawt_md.h Message-ID: <20040802131408.A1210@gauss.snl.salk.edu> Hi everyone, I submitted a bug a couple weeks ago to bug tracker... but perhaps that wasn't the place to get a response. Anyway, the new jawt files in the java sdk 1.4.2, specifically jawt_md.h, has an object whose sole member is a NSView object. The call to this from vtk in vtkJavaAwt.h is for a NSWindow object, (or at the very least a member named cocoaWindowRef). These are mismatched, and to get vtk to compile, you need to change either the jawt_md.h or vtkJavaAwt.h file. I say either because stranglely enough, both types of changes work. Now, I assumed that the files included with java were the correct ones, so I currently build vtk modifying the vtkJavaAwt.h file. Could someone look at this? Btw, I am trying to wrap vtk with java for the mac osx 10.3.4. As said, I'm using java 1.4.2. Thanks, Eugene Kim From seanm at nmr.mgh.harvard.edu Mon Aug 2 16:20:21 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Mon, 02 Aug 2004 16:20:21 -0400 Subject: [vtkusers] file format: Polygonal Data - POINTS, POLYGONS - wireframe, surface visualization In-Reply-To: <410E60F8.5080204@thinkpeak.com> References: <410E60F8.5080204@thinkpeak.com> Message-ID: <410EA205.3080600@nmr.mgh.harvard.edu> Hi Chris, The polygon that you have created is non-convex. Neither OpenGL nor most other rendering systems will abide this. This will work: POLYGONS 3 19 5 0 1 2 10 11 6 2 3 4 8 9 10 5 4 5 6 7 8 -Sean Chris Kennedy wrote: > hi, > I'm creating VTK format files and I have trouble when I visualize the > data. In wireframe it looks ok, but in Surface mode I have triangles > showing up that I don't understand. I get the same behavior independent > of whether I close the polygon or not. > > # vtk DataFile Version 2.0 > polydata for mask m3 > ASCII > DATASET POLYDATA > POINTS 12 float > 25.0 0.0 3.0 > 25.0 8.0 3.0 > 15.5 8.0 3.0 > 15.5 11.0 3.0 > 12.5 11.0 3.0 > 12.5 19.0 3.0 > 0.5 19.0 3.0 > 0.5 9.0 3.0 > 10.5 9.0 3.0 > 10.5 6.5 3.0 > 14.0 6.5 3.0 > 14.0 0.0 3.0 > > POLYGONS 1 14 > 13 0 1 2 3 4 5 6 7 8 9 10 11 0 > > # ===================== > > Do I need to define additional data for the POLYDATA type to get this to > show up properly? or is subsequent processing thru a filter required? > > thanks > > Chris Kennedy > Think Peak, Inc. > From eugene at salk.edu Mon Aug 2 16:36:33 2004 From: eugene at salk.edu (Eugene Kim) Date: Mon, 2 Aug 2004 13:36:33 -0700 (PDT) Subject: [vtkusers] Mac problem, vtkCocoaGLView.mm Message-ID: <20040802132537.W1240@gauss.snl.salk.edu> Hi everyone, I'm not sure if i'm the first one to encounter this bug, but it seems pretty major. I'm using a mac with osx 10.3.4, and java version 1.4.2. I've gotten vtk to compile for java with some complications, however this is not the end to my problems. No java program calling vtk libraries has ever been consistent for me, and in trying to find out where the problem is, i've wrapped for Tcl and things work there just fine. Recently, I built vtk again with debugging info, and using gdb, I get this nice error message: Program received signal EXC_BAD_ACCESS, Could not access memory. -[vtkCocoaGLView drawRect:] (self=0x33cbf0, _cmd=0x33cc08, theRect={origin = {x = 0, y = 0}, size = {width = 300, height = 300}}) at /Develop/VTK/Rendering/vtkCocoaGLView.mm:85 85 if ( myVTKRenderWindow->GetMapped() ) This is after running the Cone.java example. To be more clear, sometimes running Cone works, sometimes it doesn't... more often it doesn't. This seems to be a memory issue then, and the error message would agree. I'm not too familiar with objective-C, and so I really have no idea what to do about this. I'm wondering if other mac users with 10.3.4 and java 1.4.2 have similar issues. I've heard some things about nvidia cards, as my mac has an nvidia card. Also, a workstation that I use also has an nvidia card, and vtk with java is not consistent there either (it runs freebsd). Someone recently said they installed new nvidia drivers which solved some problems, and so far I haven't had a mac update in awhile. Any news, suggestions, comments? Thanks, Eugene Kim From dclunie at dclunie.com Mon Aug 2 16:59:09 2004 From: dclunie at dclunie.com (David Clunie) Date: Mon, 02 Aug 2004 16:59:09 -0400 Subject: [vtkusers] Compiling VTK Java wrappers on MacOSX Panther In-Reply-To: <20040730113102.S5124@gauss.snl.salk.edu> References: <410A2694.3090300@dclunie.com> <20040730113102.S5124@gauss.snl.salk.edu> Message-ID: <410EAB1D.4060204@dclunie.com> Thanks for the various helpful suggestions. I made the following two changes and at least it compiles now (whether or not it works is another matter, TBD). Also, one needs to use COCOA and not CARBON. This change allows it to compile the Objective C JAWT header: Index: Rendering/CMakeLists.txt =================================================================== RCS file: /cvsroot/VTK/VTK/Rendering/CMakeLists.txt,v retrieving revision 1.185 diff -r1.185 CMakeLists.txt 461a462,465 > > IF(APPLE AND VTK_WRAP_JAVA) > ADD_DEFINITIONS("-ObjC++") > ENDIF(APPLE AND VTK_WRAP_JAVA) This change accounts for the change in Apple's jawt_md.h for 1.4.2 whether the point is to a cocoaViewRef rather than a cocoaWindowRef Index: Common/vtkJavaAwt.h =================================================================== RCS file: /cvsroot/VTK/VTK/Common/vtkJavaAwt.h,v retrieving revision 1.22 diff -r1.22 vtkJavaAwt.h 111c111,112 < temp0->SetWindowId((void *)dsi_mac->cocoaWindowRef); --- > //temp0->SetWindowId((void *)dsi_mac->cocoaWindowRef); > temp0->SetWindowId((void *)dsi_mac->cocoaViewRef); // DAC. 20040731 for Panther and 1.4.2 (no such thing as cocoaWindowRef) david From tfogal at apollo.sr.unh.edu Mon Aug 2 17:05:40 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Mon, 02 Aug 2004 17:05:40 -0400 Subject: [vtkusers] StreamTracer usage Message-ID: <200408022105.i72L5eBe026062@apollo.sr.unh.edu> I'm trying to switch to using vtkStreamTracer instead of vtkStreamLine, as from what I hear its the 'right' thing to do. I've changed my 'SetIntegrationStepLength' calls with calls to 'SetMaximumPropagationStep'. I don't set a minimum propagation step at all, because I don't care much if it chooses a smaller step length. I'm assuming that smaller steps also means more of them, and more accurate results. I also do a 'SetMaximumPropagation(99999999.9999)', because I found that I just had a little blip on my screen otherwise. It would be cool if there was a 'UntilItsDone' setting for the maximum propagation. I've been using RungeKutta4 for both methods of generating streamlines. I take the output of the StreamTracer object and give it to a TubeFilter which I setup to vary its radius by vector. The input is a rectilinear grid (the output of vtkInterpolateDataSetAttributes, to be exact). Now that setup is done, on to my questions =). I noticed that my 'Tube's seem a lot smaller with StreamTracer. Mostly though, they don't appear to vary their radii at all. I'm not sure if it should exactly, but it seems to me that either StreamLine or StreamTracer must be 'wrong'... Secondly I end up with two lines somehow. The program is animating magnetic field lines and it starts out with a small line that looks like a backwards question mark. About 20% into the animation I start seeing the half-oval shape that I should be seeing, but I still see the question mark. Sometimes the "correct" field line disappears and I'm left with the question mark for a frame. Occasionally I see 3 streamlines -- the question mark, the half-oval i described above that is mostly confined to an XY plane, and finally a third half-oval that lies mostly in an XZ plane. As an aside, vtkStreamTracer is MUCH faster than vtkStreamLine, at least with the datasets I've tried so far. Very nice. Any ideas on the above quirks? Do I need to setup vtkStreamTracer more completely? Maybe I should set high maximums for all types of units (TIME, LENGTH, CELL_LENGTH...)? Is there a better guide for using this or even (salivates) a StreamLine -> StreamTracer list of 'gotchas'? Thanks for any help! -tom From endre-somogyi at comcast.net Mon Aug 2 17:32:09 2004 From: endre-somogyi at comcast.net (endre-somogyi at comcast.net) Date: Mon, 02 Aug 2004 21:32:09 +0000 Subject: [vtkusers] c# port of VTK Message-ID: <080220042132.1787.410EB2D900042C5D000006FB22007374780797090103019CD30A9D0B020A@comcast.net> No wrapping at all. This is a pure 'port' of the original c++ library. Basically, I copy the contents of each original file (e.g. vtkPoints.cxx) to a new file, Points.cs, make a new class, and fix the errors. So far, most of the files in the 'Common' directory have been ported. An example of my question would be the 'vtkPoints' class. It currently has method signatures of : void SetPoint(vtkIdType id, const double x[3]) ; void SetPoint(vtkIdType id, double x, double y, double z); The first one, the one that take a const double x[3] is problimatic for c#. If I were to use a 'managed array', the c# signarure of the method would be: public void SetPoint(IdType id, double[] x) ; This looks nice syntacially, however allocating thousands of length 3 arrays just to store vectors is VERY EXPENSIVE because they are all garbage collected, not to mention that each managed array is a reference type, so that tacks on an extra 12 bytes of size for each instance. That is why I am considering changing the interface to use a Vector struct instead of a managed array. A struct in c# is a value type, it is allways allocated on the stack, and has virtually no overhead. It behaves just like a good old C style struct. So, using a Vector struct, the new method signatures would look like: public void SetPoint(IdType id, Vector3 x) ; public void SetPoint(IdType id, double x, double y, double z); The other advantage of useing a struct is that in time critical sections, it can be cast as a double* and accessed just like a raw memory block. The biggest disadvantage of using a Vector struct is that in introduces an unfarmiliar syntax to current VTK users who are used to using a double x[3] array in c++. > Andy, > > I am sure that a C# port could be very popular. Are you using a > wrapping approach or are you parsing C++ code to generate C#? > > Also, I am unsure of where you are encountering the problem that you > describe in your message. Could you provide a few specific instances? > > -Sean > > Andy Somogyi wrote: > > Hello VTK users > > > > I am in the process of completly porting VTK (4.2) to c#. > > As this is c#, it can be used nativly from any .net language. > > > > When finished, it will be freely availble under the existing VTL lisence. > > > > My question is this: > > > > The c++ version of VTK uses length 3 arrays to represent a vector in 3 > > space. > > This is fine in c++ because you can create arrays on the stack. > > > > It is not possible to create a managed array in c# on the stack, they > > are allways > > heap allocated and garbage collected. So using a large number of managed > > arrays, or > > creating large numbers of transitory arrays is very inefficient. > > > > The use of a 'value type' or a 'struct' in other words is far more > > effcient when > > large numbers of objects are involved as they are created on the stack > > and are not > > garbage collected. > > > > I have thought about using a raw double pointer (double*) instead of an > > managed array > > for all functions that use a vector (double[3]). This has the advantage > > of being very > > fast, but on the other hand, it is highly error prone, and a user of one > > of these functions > > must declare thier method 'unsafe'. I would suspsct that this would > > discourage many users. > > > > There are many good vector and matrix classes avaible for .net, such as > > the standard vector and > > matrix types that ship with directx 9. > > > > So my question to any perspective vtk.net users is would you prefer all > > existing methods > > that currently accept a c++ style array (double[3]) accept the following > > in the new > > c# port: > > > > 1: managed array (new double[3]) > > advantages: > > 1.1 farmiliar syntax > > 1.2 do not have to declare 'unsafe' code > > disadvanteges: > > 1.2 very ineffcient both in terms of size and performance > > > > 2: unmanaged pointer (double*) > > advanteges: > > 2.1 very effecient > > disadvantes: > > 2.2 error prone > > 2.3 need to pin a managed array or use 'stackalloc' > > > > 3: use a 'Vector3' value type > > advanteges > > 3.1 very effcient > > 3.2 very safe > > 3.3 easy to convert to and from a 'double*' > > disadvantes: > > 3.3 introduces unfarmiliair syntax > > > > Any ides or oppinions would be greatly appcieated > > > > thanks > > > > > > > > _______________________________________________ > > 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 seanm at nmr.mgh.harvard.edu Mon Aug 2 18:31:54 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Mon, 02 Aug 2004 18:31:54 -0400 Subject: [vtkusers] c# port of VTK In-Reply-To: <080220042132.1787.410EB2D900042C5D000006FB22007374780797090103019CD30A9D0B020A@comcast.net> References: <080220042132.1787.410EB2D900042C5D000006FB22007374780797090103019CD30A9D0B020A@comcast.net> Message-ID: <410EC0DA.80909@nmr.mgh.harvard.edu> endre-somogyi at comcast.net wrote: > No wrapping at all. This is a pure 'port' of the original c++ library. > Basically, I copy the contents of each original file (e.g. > vtkPoints.cxx) to a new file, Points.cs, make a new class, and fix the > errors. > IMHO Debugging code into existence is usually problematic. In this case it will also be *extremely* laborious to maintain as the underlying VTK library changes. You may want to have a look at either VTK's own wrapping mechanism and create a C# version -OR- have a look at Swig since it already has a means of compiling C/C++ interfaces into C#. > So far, most of the files in the 'Common' directory have been ported. > You go girl! ... uhhh ... Andy! But there are some caveats. > An example of my question would be the 'vtkPoints' class. It currently > has method signatures of : > void SetPoint(vtkIdType id, const double x[3]) ; > void SetPoint(vtkIdType id, double x, double y, double z); > > The first one, the one that take a const double x[3] is problimatic > for c#. If I were to use a 'managed array', the c# signarure of the > method would be: > public void SetPoint(IdType id, double[] x) ; > This looks nice syntacially, however allocating thousands of length 3 > arrays just to store vectors is VERY EXPENSIVE because they are all > garbage collected, not to mention that each managed array is a > reference type, so that tacks on an extra 12 bytes of size for each > instance. > I am not C# savvy, but are you saying that you cannot just pass a good old array of 3 doubles? Whatever you pass in (array[3] or 3 doubles), the point coordinates are *copied* into the internal instance of vtkDataArray. There is no need to be allocating a new array[3] each time you call SetPoint. For example, you could implement the first version of SetPoint using the second: void SetPoint(vtkIdType id, const double a[3]) { this->SetPoint(id, a[0], a[1], a[2]); } > That is why I am considering changing the interface to use a Vector > struct instead of a managed array. A struct in c# is a value type, it > is allways allocated on the stack, and has virtually no overhead. It > behaves just like a good old C style struct. > > So, using a Vector struct, the new method signatures would look like: > public void SetPoint(IdType id, Vector3 x) ; > public void SetPoint(IdType id, double x, double y, double z); > > The other advantage of useing a struct is that in time critical > sections, it can be cast as a double* and accessed just like a raw > memory block. > > The biggest disadvantage of using a Vector struct is that in > introduces an unfarmiliar syntax to current VTK users who are used to > using a double x[3] array in c++. > Well ... in the case that my assessment above is wrong *and* since you are porting rather than wrapping VTK ... I suppose making API changes is not out of the question. Just consider that the road that you are going down is similar to that of the Mesa port of OpenGL. You may find that this is more than a one man show. The point at which you port from C++ will be a separate branch of development. This is what I mean by difficult to maintain. I think that you really should consider an automated wrapping approach. -Sean >>Andy, >> >> I am sure that a C# port could be very popular. Are you using a >>wrapping approach or are you parsing C++ code to generate C#? >> >> Also, I am unsure of where you are encountering the problem that you >>describe in your message. Could you provide a few specific instances? >> >>-Sean >> >>Andy Somogyi wrote: >> >>>Hello VTK users >>> >>>I am in the process of completly porting VTK (4.2) to c#. >>>As this is c#, it can be used nativly from any .net language. >>> >>>When finished, it will be freely availble under the existing VTL lisence. >>> >>>My question is this: >>> >>>The c++ version of VTK uses length 3 arrays to represent a vector in 3 >>>space. >>>This is fine in c++ because you can create arrays on the stack. >>> >>>It is not possible to create a managed array in c# on the stack, they >>>are allways >>>heap allocated and garbage collected. So using a large number of managed >>>arrays, or >>>creating large numbers of transitory arrays is very inefficient. >>> >>>The use of a 'value type' or a 'struct' in other words is far more >>>effcient when >>>large numbers of objects are involved as they are created on the stack >>>and are not >>>garbage collected. >>> >>>I have thought about using a raw double pointer (double*) instead of an >>>managed array >>>for all functions that use a vector (double[3]). This has the advantage >>>of being very >>>fast, but on the other hand, it is highly error prone, and a user of one >>>of these functions >>>must declare thier method 'unsafe'. I would suspsct that this would >>>discourage many users. >>> >>>There are many good vector and matrix classes avaible for .net, such as >>>the standard vector and >>>matrix types that ship with directx 9. >>> >>>So my question to any perspective vtk.net users is would you prefer all >>>existing methods >>>that currently accept a c++ style array (double[3]) accept the following >>>in the new >>>c# port: >>> >>>1: managed array (new double[3]) >>> advantages: >>> 1.1 farmiliar syntax >>> 1.2 do not have to declare 'unsafe' code >>> disadvanteges: >>> 1.2 very ineffcient both in terms of size and performance >>> >>>2: unmanaged pointer (double*) >>> advanteges: >>> 2.1 very effecient >>> disadvantes: >>> 2.2 error prone >>> 2.3 need to pin a managed array or use 'stackalloc' >>> >>>3: use a 'Vector3' value type >>> advanteges >>> 3.1 very effcient >>> 3.2 very safe >>> 3.3 easy to convert to and from a 'double*' >>> disadvantes: >>> 3.3 introduces unfarmiliair syntax >>> >>>Any ides or oppinions would be greatly appcieated >>> >>>thanks >>> From endre-somogyi at comcast.net Mon Aug 2 20:56:00 2004 From: endre-somogyi at comcast.net (Andy Somogyi) Date: Mon, 02 Aug 2004 18:56:00 -0600 Subject: [vtkusers] c# port of VTK In-Reply-To: <410EC0DA.80909@nmr.mgh.harvard.edu> References: <080220042132.1787.410EB2D900042C5D000006FB22007374780797090103019CD30A9D0B020A@comcast.net> <410EC0DA.80909@nmr.mgh.harvard.edu> Message-ID: <410EE2A0.1060406@comcast.net> Originally, I thought of creating a wrapper. I investigated both managed c++ and c wrappers, but I determined that both approaches are unacceptable. 1: managed c++ is EXTREMLY ugly and very non-portable, it is a windows only solution. 2: A C wrapper is cross platform, and is a much better solution than managed c++. The problem with both approaches is virtuals, VTK has tons of them. In order to create a proper .net binding, every single derived most class must be inherited from (in c++ land), and every single virtual must be overriden to first check if a c# class has overridden the virtual, and if so call the c# method, otherwise, call the original c++ function. As you can imagine, performance would be absolutly abysmal, as the c++ / c# transition is VERY costly. Calling C functions from c# is cheap, it only takes an extra 2 instructions over calling a standard c# function, but the other way around, calling a c# function (it has be registered as a callback) from c or c++ is VERY expensive. Not to mention that the c# side of the wrapper would also be extremly ugly, as a callback (event in c#) must be created for every single virtual in c++, and this c# callback would then have to call a virtual on the c# side. Therefore, a 'wrapper' has been ruled out. > I am not C# savvy, but are you saying that you cannot just pass a good > old array of 3 doubles? Whatever you pass in (array[3] or 3 doubles), > the point coordinates are *copied* into the internal instance of > vtkDataArray. There is no need to be allocating a new array[3] each time > you call SetPoint. For example, you could implement the first version of > SetPoint using the second: Yes, you can pass an array of 3 doubles. c# can deal with 2 kinds of arrays, managed and un-managed. Managed arrays are native .net types, they are syntacally almost identical to c++ style arrays, except that they all have a 'Length' property indicating the length of the array, so you would write code like: for(int i = 0; i < myArray.Length; i++) { myArray[i] = something; } Managed arrays are allways allocated on the garbage collected heap, and they also contain an extra 12 bytes of data to store a garbage collection handle, run time type info, length and so forth. Unmanged arrays are simply pointers to a raw block or memory, they can be either stack or heap allocated, but if heap allocated, must be cleaned up. If they are stack allocated, they can be be kept around after the function finishes, other than by copying its contents. The big problem with unmanged arrays is that they are passed as a raw pointer (double*). In c++, you can give some hints as the size of the array, such as : void SetPoint(const double x[3]) Even though this is still passed as a pointer in c++, the array size x[3] is 'hinted' in the function declaration. Passing an unmanged array in c# looks like: void SetPoint(double* x) There is not even a hint that this is of length 3, therefore it is very error prone. It is true that the SetPoint just coppies the values into a memory block, I'm more concerned about getting values out, and not unnecessarily copying the values over and over again. > > void SetPoint(vtkIdType id, const double a[3]) > { this->SetPoint(id, a[0], a[1], a[2]); } > >> That is why I am considering changing the interface to use a Vector > > > struct instead of a managed array. A struct in c# is a value type, it > > is allways allocated on the stack, and has virtually no overhead. It > > behaves just like a good old C style struct. > >> >> So, using a Vector struct, the new method signatures would look like: >> public void SetPoint(IdType id, Vector3 x) ; >> public void SetPoint(IdType id, double x, double y, double z); >> >> The other advantage of useing a struct is that in time critical > > > sections, it can be cast as a double* and accessed just like a raw > > memory block. > >> >> The biggest disadvantage of using a Vector struct is that in > > > introduces an unfarmiliar syntax to current VTK users who are used to > > using a double x[3] array in c++. > >> > Well ... in the case that my assessment above is wrong *and* since you > are porting rather than wrapping VTK ... I suppose making API changes is > not out of the question. Just consider that the road that you are going > down is similar to that of the Mesa port of OpenGL. You may find that > this is more than a one man show. The point at which you port from C++ > will be a separate branch of development. This is what I mean by > difficult to maintain. > > I think that you really should consider an automated wrapping approach. > > -Sean > >>> Andy, >>> >>> I am sure that a C# port could be very popular. Are you using a >>> wrapping approach or are you parsing C++ code to generate C#? >>> >>> Also, I am unsure of where you are encountering the problem that >>> you describe in your message. Could you provide a few specific >>> instances? >>> >>> -Sean >>> >>> Andy Somogyi wrote: >>> >>>> Hello VTK users >>>> >>>> I am in the process of completly porting VTK (4.2) to c#. >>>> As this is c#, it can be used nativly from any .net language. >>>> >>>> When finished, it will be freely availble under the existing VTL >>>> lisence. >>>> >>>> My question is this: >>>> >>>> The c++ version of VTK uses length 3 arrays to represent a vector in >>>> 3 space. >>>> This is fine in c++ because you can create arrays on the stack. >>>> >>>> It is not possible to create a managed array in c# on the stack, >>>> they are allways >>>> heap allocated and garbage collected. So using a large number of >>>> managed arrays, or >>>> creating large numbers of transitory arrays is very inefficient. >>>> >>>> The use of a 'value type' or a 'struct' in other words is far more >>>> effcient when >>>> large numbers of objects are involved as they are created on the >>>> stack and are not >>>> garbage collected. >>>> >>>> I have thought about using a raw double pointer (double*) instead of >>>> an managed array >>>> for all functions that use a vector (double[3]). This has the >>>> advantage of being very >>>> fast, but on the other hand, it is highly error prone, and a user of >>>> one of these functions >>>> must declare thier method 'unsafe'. I would suspsct that this would >>>> discourage many users. >>>> >>>> There are many good vector and matrix classes avaible for .net, such >>>> as the standard vector and >>>> matrix types that ship with directx 9. >>>> >>>> So my question to any perspective vtk.net users is would you prefer >>>> all existing methods >>>> that currently accept a c++ style array (double[3]) accept the >>>> following in the new >>>> c# port: >>>> >>>> 1: managed array (new double[3]) >>>> advantages: >>>> 1.1 farmiliar syntax >>>> 1.2 do not have to declare 'unsafe' code >>>> disadvanteges: >>>> 1.2 very ineffcient both in terms of size and performance >>>> >>>> 2: unmanaged pointer (double*) >>>> advanteges: >>>> 2.1 very effecient >>>> disadvantes: >>>> 2.2 error prone >>>> 2.3 need to pin a managed array or use 'stackalloc' >>>> >>>> 3: use a 'Vector3' value type >>>> advanteges >>>> 3.1 very effcient >>>> 3.2 very safe >>>> 3.3 easy to convert to and from a 'double*' >>>> disadvantes: >>>> 3.3 introduces unfarmiliair syntax >>>> >>>> Any ides or oppinions would be greatly appcieated >>>> >>>> thanks >>>> > > From seanm at nmr.mgh.harvard.edu Mon Aug 2 21:13:41 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Mon, 02 Aug 2004 21:13:41 -0400 Subject: [vtkusers] c# port of VTK In-Reply-To: <410EE2A0.1060406@comcast.net> References: <080220042132.1787.410EB2D900042C5D000006FB22007374780797090103019CD30A9D0B020A@comcast.net> <410EC0DA.80909@nmr.mgh.harvard.edu> <410EE2A0.1060406@comcast.net> Message-ID: <410EE6C5.8060503@nmr.mgh.harvard.edu> Andy, I can only conclude that C# is evil. My advice is to forswear all things Microsoft and move to a mountain commune. Save your soul and use the Python wrappers if you want the advantages of a "managing" language. .Net is just another of many MS products designed to "cut off the air supply" of existing solutions. ;-) That said, a C# wrapper should experience only the most minor of performance hits like those of the Python and Tcl wrappers. All of the heavy lifting is done by compiled C/C++ code. You wouldn't be implementing in C#, only accessing the VTK interfaces. Unless you can convince Kitware (and all the users of VTK) to switch to C# for library implementation, you should really take another look at wrappers. -Sean Andy Somogyi wrote: > Originally, I thought of creating a wrapper. I investigated both > managed c++ and c wrappers, but I determined that both approaches are > unacceptable. > > 1: managed c++ is EXTREMLY ugly and very non-portable, it is a windows only > solution. > > 2: A C wrapper is cross platform, and is a much better solution than > managed > c++. > > The problem with both approaches is virtuals, VTK has tons of them. In > order to > create a proper .net binding, every single derived most class must be > inherited > from (in c++ land), and every single virtual must be overriden to first > check if > a c# class has overridden the virtual, and if so call the c# method, > otherwise, > call the original c++ function. > > As you can imagine, performance would be absolutly abysmal, as the c++ / c# > transition is VERY costly. Calling C functions from c# is cheap, it only > takes > an extra 2 instructions over calling a standard c# function, but the > other way > around, calling a c# function (it has be registered as a callback) from > c or c++ > is VERY expensive. Not to mention that the c# side of the wrapper would > also be > extremly ugly, as a callback (event in c#) must be created for every single > virtual in c++, and this c# callback would then have to call a virtual > on the c# > side. > > Therefore, a 'wrapper' has been ruled out. > >> I am not C# savvy, but are you saying that you cannot just pass a good >> old array of 3 doubles? Whatever you pass in (array[3] or 3 doubles), >> the point coordinates are *copied* into the internal instance of >> vtkDataArray. There is no need to be allocating a new array[3] each >> time you call SetPoint. For example, you could implement the first >> version of SetPoint using the second: > > > Yes, you can pass an array of 3 doubles. c# can deal with 2 kinds of > arrays, > managed and un-managed. Managed arrays are native .net types, they are > syntacally > almost identical to c++ style arrays, except that they all have a > 'Length' property > indicating the length of the array, so you would write code like: > > for(int i = 0; i < myArray.Length; i++) > { > myArray[i] = something; > } > > Managed arrays are allways allocated on the garbage collected heap, and > they also > contain an extra 12 bytes of data to store a garbage collection handle, > run time > type info, length and so forth. > > Unmanged arrays are simply pointers to a raw block or memory, they can > be either > stack or heap allocated, but if heap allocated, must be cleaned up. If > they are stack > allocated, they can be be kept around after the function finishes, other > than by copying > its contents. > > The big problem with unmanged arrays is that they are passed as a raw > pointer (double*). > In c++, you can give some hints as the size of the array, such as : > void SetPoint(const double x[3]) > Even though this is still passed as a pointer in c++, the array size > x[3] is 'hinted' in the > function declaration. > > Passing an unmanged array in c# looks like: > void SetPoint(double* x) > There is not even a hint that this is of length 3, therefore it is very > error prone. > > It is true that the SetPoint just coppies the values into a memory > block, I'm more > concerned about getting values out, and not unnecessarily copying the > values > over and over again. > >> >> void SetPoint(vtkIdType id, const double a[3]) >> { this->SetPoint(id, a[0], a[1], a[2]); } >> >>> That is why I am considering changing the interface to use a Vector >> >> >> > struct instead of a managed array. A struct in c# is a value type, it >> > is allways allocated on the stack, and has virtually no overhead. It >> > behaves just like a good old C style struct. >> >>> >>> So, using a Vector struct, the new method signatures would look like: >>> public void SetPoint(IdType id, Vector3 x) ; >>> public void SetPoint(IdType id, double x, double y, double z); >>> >>> The other advantage of useing a struct is that in time critical >> >> >> > sections, it can be cast as a double* and accessed just like a raw >> > memory block. >> >>> >>> The biggest disadvantage of using a Vector struct is that in >> >> >> > introduces an unfarmiliar syntax to current VTK users who are used to >> > using a double x[3] array in c++. >> >>> >> Well ... in the case that my assessment above is wrong *and* since you >> are porting rather than wrapping VTK ... I suppose making API changes >> is not out of the question. Just consider that the road that you are >> going down is similar to that of the Mesa port of OpenGL. You may find >> that this is more than a one man show. The point at which you port >> from C++ will be a separate branch of development. This is what I mean >> by difficult to maintain. >> >> I think that you really should consider an automated wrapping approach. >> >> -Sean >> >>>> Andy, >>>> >>>> I am sure that a C# port could be very popular. Are you using a >>>> wrapping approach or are you parsing C++ code to generate C#? >>>> >>>> Also, I am unsure of where you are encountering the problem that >>>> you describe in your message. Could you provide a few specific >>>> instances? >>>> >>>> -Sean >>>> >>>> Andy Somogyi wrote: >>>> >>>>> Hello VTK users >>>>> >>>>> I am in the process of completly porting VTK (4.2) to c#. >>>>> As this is c#, it can be used nativly from any .net language. >>>>> >>>>> When finished, it will be freely availble under the existing VTL >>>>> lisence. >>>>> >>>>> My question is this: >>>>> >>>>> The c++ version of VTK uses length 3 arrays to represent a vector >>>>> in 3 space. >>>>> This is fine in c++ because you can create arrays on the stack. >>>>> >>>>> It is not possible to create a managed array in c# on the stack, >>>>> they are allways >>>>> heap allocated and garbage collected. So using a large number of >>>>> managed arrays, or >>>>> creating large numbers of transitory arrays is very inefficient. >>>>> >>>>> The use of a 'value type' or a 'struct' in other words is far more >>>>> effcient when >>>>> large numbers of objects are involved as they are created on the >>>>> stack and are not >>>>> garbage collected. >>>>> >>>>> I have thought about using a raw double pointer (double*) instead >>>>> of an managed array >>>>> for all functions that use a vector (double[3]). This has the >>>>> advantage of being very >>>>> fast, but on the other hand, it is highly error prone, and a user >>>>> of one of these functions >>>>> must declare thier method 'unsafe'. I would suspsct that this would >>>>> discourage many users. >>>>> >>>>> There are many good vector and matrix classes avaible for .net, >>>>> such as the standard vector and >>>>> matrix types that ship with directx 9. >>>>> >>>>> So my question to any perspective vtk.net users is would you prefer >>>>> all existing methods >>>>> that currently accept a c++ style array (double[3]) accept the >>>>> following in the new >>>>> c# port: >>>>> >>>>> 1: managed array (new double[3]) >>>>> advantages: >>>>> 1.1 farmiliar syntax >>>>> 1.2 do not have to declare 'unsafe' code >>>>> disadvanteges: >>>>> 1.2 very ineffcient both in terms of size and performance >>>>> >>>>> 2: unmanaged pointer (double*) >>>>> advanteges: >>>>> 2.1 very effecient >>>>> disadvantes: >>>>> 2.2 error prone >>>>> 2.3 need to pin a managed array or use 'stackalloc' >>>>> >>>>> 3: use a 'Vector3' value type >>>>> advanteges >>>>> 3.1 very effcient >>>>> 3.2 very safe >>>>> 3.3 easy to convert to and from a 'double*' >>>>> disadvantes: >>>>> 3.3 introduces unfarmiliair syntax >>>>> >>>>> Any ides or oppinions would be greatly appcieated >>>>> >>>>> thanks >>>>> >> >> > > _______________________________________________ > 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 prabhu at aero.iitm.ernet.in Tue Aug 3 00:08:40 2004 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Tue, 3 Aug 2004 00:08:40 -0400 Subject: [vtkusers] c# port of VTK In-Reply-To: <410EE6C5.8060503@nmr.mgh.harvard.edu> References: <080220042132.1787.410EB2D900042C5D000006FB22007374780797090103019CD30A9D0B020A@comcast.net> <410EC0DA.80909@nmr.mgh.harvard.edu> <410EE2A0.1060406@comcast.net> <410EE6C5.8060503@nmr.mgh.harvard.edu> Message-ID: <16655.4040.177953.123698@enthought.hathway.com> >>>>> "SMI" == Sean McInerney writes: SMI> Andy, SMI> I can only conclude that C# is evil. My advice is to SMI> forswear all SMI> things Microsoft and move to a mountain commune. Save your SMI> soul and use the Python wrappers if you want the advantages SMI> of a "managing" language. .Net is just another of many MS SMI> products designed to "cut off the air supply" of existing SMI> solutions. He is right about the virtuals and the issue is much the same with Python or any wrapped language. Checking to see if a virtual function has been created in the target language can be expensive. How expensive depends but it can be significant in some cases. I don't know how it compares to the C# <-> C++ interface though. BTW, the VTK Python wrappers do not allow one to override virtuals in the target language and still be seen by the C++ side, i.e. if you override a virtual in Python and pass an instance of the class to a VTK object in C++, it cannot access the overridden function. Also, non-MS implementations of the .net environment are available in the form of DotGNU and Mono. Whether they are also nono's I am not sure about. :-D cheers, prabhu From luis.ibanez at kitware.com Tue Aug 3 00:13:23 2004 From: luis.ibanez at kitware.com (Luis Ibanez) Date: Tue, 03 Aug 2004 00:13:23 -0400 Subject: [vtkusers] about the conflict between the new IO and the old IO In-Reply-To: <000e01c47571$8642de60$1f64a8c0@YXLIU> References: <000e01c47571$8642de60$1f64a8c0@YXLIU> Message-ID: <410F10E3.6040701@kitware.com> Hi Yixun, You should simply enable the use of ANSI_STDLIB when configuring VTK. Chances are that you are mixing new and old #includes for header files in your application. Please identify a minimal piece of code where you observer this behavior and post the code to the list. Thanks Luis ---------------------- Yixun Liu wrote: > Hi ITKUsers and VTKusers, > > I need use ITK+VTK, so I build them both with the > "use_ansi_stdlib" ON. However, one of my programs which once worked fine > with the VTK(the parameter "use_ansi_lib" is Off) can not work. The > compile error is: > > C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ios.h(104) : error > C2371: 'ostream' : redefinition; different basic types > C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\iosfwd(257) : see > declaration of 'ostream' > > I think the reason is that the conflict between the new IO and the old > IO, so I add the #undef VTK_USE_ANSI_STDLIB in my program, but the > compiler report the same error. If I build the VTK with the > "use_ansi_lib" Off and add the #define VTK_USE_ANSI_STDLIB in my > programm, I think, I can resolve this problem. However, I need use the > VTK with the ITK, if I build the VTK with 'use_ansi_lib" Off, I have to > build the ITK with the same configuration. I do not want to do like > this. Can I have other choices to resolve the conflict between the old > IO and the new IO? > > Thank you in advance! > > Best regards, > > Yixun Liu > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 seanm at nmr.mgh.harvard.edu Tue Aug 3 00:11:20 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 03 Aug 2004 00:11:20 -0400 Subject: [vtkusers] c# port of VTK In-Reply-To: <16655.4040.177953.123698@enthought.hathway.com> References: <080220042132.1787.410EB2D900042C5D000006FB22007374780797090103019CD30A9D0B020A@comcast.net> <410EC0DA.80909@nmr.mgh.harvard.edu> <410EE2A0.1060406@comcast.net> <410EE6C5.8060503@nmr.mgh.harvard.edu> <16655.4040.177953.123698@enthought.hathway.com> Message-ID: <410F1068.2000508@nmr.mgh.harvard.edu> Hi Prabhu, I didn't address the issue of virtuals and inheritance within the wrapper language since I would most likely implement a subclass in C++ and then wrap the derived class. I would be willing to guess that this is not everyone's preference and that such users might prefer to extend VTK in their non-C++ language of choice. Am I understanding the problem? -Sean Prabhu Ramachandran wrote: >>>>>>"SMI" == Sean McInerney writes: > > > SMI> Andy, > SMI> I can only conclude that C# is evil. My advice is to > SMI> forswear all > SMI> things Microsoft and move to a mountain commune. Save your > SMI> soul and use the Python wrappers if you want the advantages > SMI> of a "managing" language. .Net is just another of many MS > SMI> products designed to "cut off the air supply" of existing > SMI> solutions. > > He is right about the virtuals and the issue is much the same with > Python or any wrapped language. Checking to see if a virtual function > has been created in the target language can be expensive. How > expensive depends but it can be significant in some cases. I don't > know how it compares to the C# <-> C++ interface though. > > BTW, the VTK Python wrappers do not allow one to override virtuals in > the target language and still be seen by the C++ side, i.e. if you > override a virtual in Python and pass an instance of the class to a > VTK object in C++, it cannot access the overridden function. > > Also, non-MS implementations of the .net environment are available in > the form of DotGNU and Mono. Whether they are also nono's I am not > sure about. :-D > > cheers, > prabhu From prabhu at aero.iitm.ernet.in Tue Aug 3 00:28:23 2004 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Tue, 3 Aug 2004 00:28:23 -0400 Subject: [vtkusers] c# port of VTK In-Reply-To: <410F1068.2000508@nmr.mgh.harvard.edu> References: <080220042132.1787.410EB2D900042C5D000006FB22007374780797090103019CD30A9D0B020A@comcast.net> <410EC0DA.80909@nmr.mgh.harvard.edu> <410EE2A0.1060406@comcast.net> <410EE6C5.8060503@nmr.mgh.harvard.edu> <16655.4040.177953.123698@enthought.hathway.com> <410F1068.2000508@nmr.mgh.harvard.edu> Message-ID: <16655.5223.154230.658166@enthought.hathway.com> >>>>> "SMI" == Sean McInerney writes: SMI> Hi Prabhu, SMI> I didn't address the issue of virtuals and inheritance SMI> within the SMI> wrapper language since I would most likely implement a SMI> subclass in C++ and then wrap the derived class. I would be SMI> willing to guess that this is not everyone's preference and SMI> that such users might prefer to extend VTK in their non-C++ SMI> language of choice. SMI> Am I understanding the problem? Yes, but from what I understand this (extending in the target language) is important when you want a complete port to the .net environment. The idea is that you can extend the library in any language of your choice and not merely write it in C++ and wrap it. I just wanted to mention that there are similar issues when generating the wrappers to any of the currently supported languages. cheers, prabhu From seanm at nmr.mgh.harvard.edu Tue Aug 3 00:34:37 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 03 Aug 2004 00:34:37 -0400 Subject: [vtkusers] c# port of VTK In-Reply-To: <16655.5223.154230.658166@enthought.hathway.com> References: <080220042132.1787.410EB2D900042C5D000006FB22007374780797090103019CD30A9D0B020A@comcast.net> <410EC0DA.80909@nmr.mgh.harvard.edu> <410EE2A0.1060406@comcast.net> <410EE6C5.8060503@nmr.mgh.harvard.edu> <16655.4040.177953.123698@enthought.hathway.com> <410F1068.2000508@nmr.mgh.harvard.edu> <16655.5223.154230.658166@enthought.hathway.com> Message-ID: <410F15DD.7030000@nmr.mgh.harvard.edu> A rewrite of VTK in C# just sounds like a real monster of project! It seems like a huge effort to go to initially and a huge nightmare to maintain in sync with the original VTK library. Wrappers have advantages and disadvantages ... though they would seem eminently more practical unless one's intent is to compete with the original VTK library. Prabhu Ramachandran wrote: >>>>>>"SMI" == Sean McInerney writes: > > > SMI> Hi Prabhu, > SMI> I didn't address the issue of virtuals and inheritance > SMI> within the > SMI> wrapper language since I would most likely implement a > SMI> subclass in C++ and then wrap the derived class. I would be > SMI> willing to guess that this is not everyone's preference and > SMI> that such users might prefer to extend VTK in their non-C++ > SMI> language of choice. > > SMI> Am I understanding the problem? > > Yes, but from what I understand this (extending in the target > language) is important when you want a complete port to the .net > environment. The idea is that you can extend the library in any > language of your choice and not merely write it in C++ and wrap it. > > I just wanted to mention that there are similar issues when generating > the wrappers to any of the currently supported languages. > > cheers, > prabhu From lov at mikrofyn.com Tue Aug 3 02:59:10 2004 From: lov at mikrofyn.com (Lars Overgaard) Date: Tue, 3 Aug 2004 08:59:10 +0200 Subject: SV: [vtkusers] c# port of VTK In-Reply-To: <410D9A5C.1010200@comcast.net> Message-ID: Hi Andy, I will stay out of the discussion of why you should do (or not do) your project and just answer your initial question. I have experienced the huge overhead introduced by garbage collection and managed code. I write embedded applications and need both speed and (close to) real-time response. My preference would definitely be choice no. 3: use a 'Vector3' value type. I wouldn't hardly notice the slightly changed syntax - and the alternative choices would simply kill my applications. So, Andy, I encourage you to continue your interesting project using a 'Vector3' value type. Good luck! Please let us know how your work is progressing. Best regards, Lars Overgaard Software Engineer, Ph.D. MIKROFYN A/S * E-mail: lov at mikrofyn.com : Web: www.mikrofyn.com ( Phone: +45 66170784 ( Direct: +45 63170510 h Fax: +45 66170785 -----Oprindelig meddelelse----- Fra: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] P? vegne af Andy Somogyi Sendt: 2. august 2004 02:35 Til: vtkusers at vtk.org Emne: [vtkusers] c# port of VTK Hello VTK users I am in the process of completly porting VTK (4.2) to c#. As this is c#, it can be used nativly from any .net language. When finished, it will be freely availble under the existing VTL lisence. My question is this: The c++ version of VTK uses length 3 arrays to represent a vector in 3 space. This is fine in c++ because you can create arrays on the stack. It is not possible to create a managed array in c# on the stack, they are allways heap allocated and garbage collected. So using a large number of managed arrays, or creating large numbers of transitory arrays is very inefficient. The use of a 'value type' or a 'struct' in other words is far more effcient when large numbers of objects are involved as they are created on the stack and are not garbage collected. I have thought about using a raw double pointer (double*) instead of an managed array for all functions that use a vector (double[3]). This has the advantage of being very fast, but on the other hand, it is highly error prone, and a user of one of these functions must declare thier method 'unsafe'. I would suspsct that this would discourage many users. There are many good vector and matrix classes avaible for .net, such as the standard vector and matrix types that ship with directx 9. So my question to any perspective vtk.net users is would you prefer all existing methods that currently accept a c++ style array (double[3]) accept the following in the new c# port: 1: managed array (new double[3]) advantages: 1.1 farmiliar syntax 1.2 do not have to declare 'unsafe' code disadvanteges: 1.2 very ineffcient both in terms of size and performance 2: unmanaged pointer (double*) advanteges: 2.1 very effecient disadvantes: 2.2 error prone 2.3 need to pin a managed array or use 'stackalloc' 3: use a 'Vector3' value type advanteges 3.1 very effcient 3.2 very safe 3.3 easy to convert to and from a 'double*' disadvantes: 3.3 introduces unfarmiliair syntax Any ides or oppinions would be greatly appcieated thanks _______________________________________________ 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 seanm at nmr.mgh.harvard.edu Tue Aug 3 03:01:26 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 03 Aug 2004 03:01:26 -0400 Subject: [vtkusers] c# port of VTK In-Reply-To: References: Message-ID: <410F3846.6090406@nmr.mgh.harvard.edu> Andy, My apologies if I came across as kind of a buzz kill. It sounds like an interesting project. I'm mostly a C++ and Unix guy ... so take my perspective with a grain of salt when it comes to C# and windows ;-) -Sean Lars Overgaard wrote: > Hi Andy, > > I will stay out of the discussion of why you should do (or not do) your > project and just answer your initial question. > > I have experienced the huge overhead introduced by garbage collection > and > managed code. I write embedded applications and need both speed and > (close to) > real-time response. > > My preference would definitely be choice no. 3: use a 'Vector3' value > type. > I wouldn't hardly notice the slightly changed syntax - and the > alternative > choices would simply kill my applications. > > So, Andy, I encourage you to continue your interesting project using a > 'Vector3' value type. > > Good luck! Please let us know how your work is progressing. > > Best regards, > > Lars Overgaard > Software Engineer, Ph.D. > MIKROFYN A/S > * E-mail: lov at mikrofyn.com > : Web: www.mikrofyn.com > ( Phone: +45 66170784 > ( Direct: +45 63170510 > h Fax: +45 66170785 > > > > -----Oprindelig meddelelse----- > Fra: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] P? vegne > af Andy Somogyi > Sendt: 2. august 2004 02:35 > Til: vtkusers at vtk.org > Emne: [vtkusers] c# port of VTK > > > Hello VTK users > > I am in the process of completly porting VTK (4.2) to c#. > As this is c#, it can be used nativly from any .net language. > > When finished, it will be freely availble under the existing VTL > lisence. > > My question is this: > > The c++ version of VTK uses length 3 arrays to represent a vector in 3 > space. This is fine in c++ because you can create arrays on the stack. > > It is not possible to create a managed array in c# on the stack, they > are allways heap allocated and garbage collected. So using a large > number of managed arrays, or creating large numbers of transitory arrays > is very inefficient. > > The use of a 'value type' or a 'struct' in other words is far more > effcient when large numbers of objects are involved as they are created > on the stack and are not garbage collected. > > I have thought about using a raw double pointer (double*) instead of an > managed array for all functions that use a vector (double[3]). This has > the advantage of being very fast, but on the other hand, it is highly > error prone, and a user of one of these functions must declare thier > method 'unsafe'. I would suspsct that this would discourage many users. > > There are many good vector and matrix classes avaible for .net, such as > the standard vector and matrix types that ship with directx 9. > > So my question to any perspective vtk.net users is would you prefer all > existing methods that currently accept a c++ style array (double[3]) > accept the following in the new c# port: > > 1: managed array (new double[3]) > advantages: > 1.1 farmiliar syntax > 1.2 do not have to declare 'unsafe' code > disadvanteges: > 1.2 very ineffcient both in terms of size and performance > > 2: unmanaged pointer (double*) > advanteges: > 2.1 very effecient > disadvantes: > 2.2 error prone > 2.3 need to pin a managed array or use 'stackalloc' > > 3: use a 'Vector3' value type > advanteges > 3.1 very effcient > 3.2 very safe > 3.3 easy to convert to and from a 'double*' > disadvantes: > 3.3 introduces unfarmiliair syntax > > Any ides or oppinions would be greatly appcieated > > thanks > From endre-somogyi at comcast.net Tue Aug 3 03:51:34 2004 From: endre-somogyi at comcast.net (Andy Somogyi) Date: Tue, 03 Aug 2004 01:51:34 -0600 Subject: [vtkusers] c# port of VTK In-Reply-To: <410F3846.6090406@nmr.mgh.harvard.edu> References: <410F3846.6090406@nmr.mgh.harvard.edu> Message-ID: <410F4406.2080502@comcast.net> Sean McInerney wrote: > Andy, > > My apologies if I came across as kind of a buzz kill. It sounds like > an interesting project. I'm mostly a C++ and Unix guy ... so take my > perspective with a grain of salt when it comes to C# and windows ;-) Thats OK, I'm really looking at what kind of ideas people have when it comes to a project like this. I've been doing c++ for a long time (too long) and IMO, the language has a lot of 'issues'. I'm a Linux / Java guy at work, and while I think Java has a great deal of improvments over c++, there are also a lot of issues with Java. IMO, c# addresses almost all of these issues. c# is also very cross platform, thanks to mono and gnu.net. I think the port is a fairly large project, but certainly not impossible, I've worked on much larger projects. Currently, I have almost enough classes ported over to compile and run the first tutorial project (the one with the cone source). So anyway, the direction I think I will go is that all methods that took a 'double x[3]' param on the c++ side will take a 'Vector3*' param on the c# port. Remeber that a 'Vector3' struct is just a group of 3 doubles, so an array can also be cast as a 'Vector3*'. Also, a 'Vector3' struct has the [] array index operator overloaded, so a user can treat it (syntacally) as an array of length 3. As soon as I get further along, I'll start checking stuff into CVS on sourceforge. > > -Sean > > Lars Overgaard wrote: > >> Hi Andy, >> >> I will stay out of the discussion of why you should do (or not do) your >> project and just answer your initial question. >> >> I have experienced the huge overhead introduced by garbage collection >> and >> managed code. I write embedded applications and need both speed and >> (close to) >> real-time response. >> >> My preference would definitely be choice no. 3: use a 'Vector3' value >> type. >> I wouldn't hardly notice the slightly changed syntax - and the >> alternative >> choices would simply kill my applications. >> >> So, Andy, I encourage you to continue your interesting project using a >> 'Vector3' value type. >> >> Good luck! Please let us know how your work is progressing. >> >> Best regards, >> >> Lars Overgaard >> Software Engineer, Ph.D. >> MIKROFYN A/S >> * E-mail: lov at mikrofyn.com >> : Web: www.mikrofyn.com >> ( Phone: +45 66170784 >> ( Direct: +45 63170510 >> h Fax: +45 66170785 >> >> >> >> -----Oprindelig meddelelse----- >> Fra: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] P? vegne >> af Andy Somogyi >> Sendt: 2. august 2004 02:35 >> Til: vtkusers at vtk.org >> Emne: [vtkusers] c# port of VTK >> >> >> Hello VTK users >> >> I am in the process of completly porting VTK (4.2) to c#. >> As this is c#, it can be used nativly from any .net language. >> >> When finished, it will be freely availble under the existing VTL >> lisence. >> >> My question is this: >> >> The c++ version of VTK uses length 3 arrays to represent a vector in 3 >> space. This is fine in c++ because you can create arrays on the stack. >> >> It is not possible to create a managed array in c# on the stack, they >> are allways heap allocated and garbage collected. So using a large >> number of managed arrays, or creating large numbers of transitory arrays >> is very inefficient. >> >> The use of a 'value type' or a 'struct' in other words is far more >> effcient when large numbers of objects are involved as they are created >> on the stack and are not garbage collected. >> >> I have thought about using a raw double pointer (double*) instead of an >> managed array for all functions that use a vector (double[3]). This has >> the advantage of being very fast, but on the other hand, it is highly >> error prone, and a user of one of these functions must declare thier >> method 'unsafe'. I would suspsct that this would discourage many users. >> >> There are many good vector and matrix classes avaible for .net, such as >> the standard vector and matrix types that ship with directx 9. >> >> So my question to any perspective vtk.net users is would you prefer all >> existing methods that currently accept a c++ style array (double[3]) >> accept the following in the new c# port: >> >> 1: managed array (new double[3]) >> advantages: >> 1.1 farmiliar syntax >> 1.2 do not have to declare 'unsafe' code >> disadvanteges: >> 1.2 very ineffcient both in terms of size and performance >> >> 2: unmanaged pointer (double*) >> advanteges: >> 2.1 very effecient >> disadvantes: >> 2.2 error prone >> 2.3 need to pin a managed array or use 'stackalloc' >> >> 3: use a 'Vector3' value type >> advanteges >> 3.1 very effcient >> 3.2 very safe >> 3.3 easy to convert to and from a 'double*' >> disadvantes: >> 3.3 introduces unfarmiliair syntax >> >> Any ides or oppinions would be greatly appcieated >> >> thanks >> > > From jxjx at sjtu.edu.cn Tue Aug 3 04:19:06 2004 From: jxjx at sjtu.edu.cn (jiang-gx) Date: Tue, 3 Aug 2004 16:19:06 +0800 Subject: [vtkusers] (no subject) Message-ID: <20040803081936.31B677B16E6@mx1.sjtu.edu.cn> hi everyone: i add two actors to a renderer(actor1 and actor2),then set the opacity of actor1 to 0.8 . but at the intersetant area of actor1 and actor2, the actor1 can not be see at all. why? what can i do to make the actor1 visible at th4 intersectant area? ????????jiang-gx ????????jxjx at sjtu.edu.cn ??????????2004-08-03 From sdcompengg at yahoo.com Tue Aug 3 04:41:57 2004 From: sdcompengg at yahoo.com (soumen dey) Date: Tue, 3 Aug 2004 01:41:57 -0700 (PDT) Subject: [vtkusers] import error in cone.py Message-ID: <20040803084157.24793.qmail@web53409.mail.yahoo.com> Hi!!!! I am trying to run the cone.py scripts as the first step to start using python with vtk. But when I run the script it crashes saying that " No module named vtk". I doono why this error comes. I have build all vtk*python.dlls (in c:\vtkbin\bin\debug) successfully. I have python-2.3.4 in c:\python\PCBuild. As stated in README i have added c:\vtkbin\bin\debug in PATH and set the PYTHONPATH variable to c:\vtkbin\bin\debug;c:\vtkbin\wrapping\python. I later tried to import sys and os in python command prompt ...which resulted in success for sys module but it couldnot import os module. Now plz let me know what is the problem.....is there any configuration left to be done? Thnx in advance. Soumen N.B: I am using win-xp (pro) and vc++ ( 6 ). --------------------------------- Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbiddiscombe at skippingmouse.co.uk Tue Aug 3 05:00:54 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Tue, 3 Aug 2004 10:00:54 +0100 Subject: [vtkusers] c# port of VTK References: <080220042132.1787.410EB2D900042C5D000006FB22007374780797090103019CD30A9D0B020A@comcast.net> <410EC0DA.80909@nmr.mgh.harvard.edu><410EE2A0.1060406@comcast.net> <410EE6C5.8060503@nmr.mgh.harvard.edu> <16655.4040.177953.123698@enthought.hathway.com> <410F1068.2000508@nmr.mgh.harvard.edu><16655.5223.154230.658166@enthought.hathway.com> <410F15DD.7030000@nmr.mgh.harvard.edu> Message-ID: <001e01c47938$6216fe20$2901460a@miradasolutions.com> > A rewrite of VTK in C# just sounds like a real monster of project! It > seems like a huge effort to go to initially and a huge nightmare to > maintain in sync with the original VTK library. Wrappers have advantages I quite agree. It would be a an act of great foolishness to do such a thing. It's relatively easy to create wrappers for vtk and the overhead is minimal in calling them. A lost microsecond when processing hundreds of MB of data is not worth saving. JB From yxliu at fudan.edu.cn Tue Aug 3 05:42:24 2004 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Tue, 03 Aug 2004 17:42:24 +0800 Subject: [vtkusers] about the conflict between the new IO and the old IO References: <000e01c47571$8642de60$1f64a8c0@YXLIU> <410F10E3.6040701@kitware.com> Message-ID: <001701c4793e$2e8221b0$1f64a8c0@YXLIU> Thank Luis, Like you said, I enable the VTK_USE_ANSI_LIB ON and remove the #include old IO header in my app. It is Ok now. At the beginnig, I am puzzled because I can use both the new and old IO in the same app(due to the std namespace), however, when I use the VTK and the old IO, the compiler alwayse report redefinition error. At last I look at the vtk header and I find that vtk define the "use std::ofstream" to make the same code to work with ansi and old-style streams. Just this definition cause the conflict between the old and the new IO in the same app. ----- Original Message ----- From: "Luis Ibanez" To: "Yixun Liu" Cc: ; Sent: Tuesday, August 03, 2004 12:13 PM Subject: Re: [vtkusers] about the conflict between the new IO and the old IO > > Hi Yixun, > > You should simply enable the use of ANSI_STDLIB > when configuring VTK. > > Chances are that you are mixing new and old > #includes for header files in your application. > > Please identify a minimal piece of code where > you observer this behavior and post the code > to the list. > > > Thanks > > > Luis > > > > ---------------------- > Yixun Liu wrote: > > > Hi ITKUsers and VTKusers, > > > > I need use ITK+VTK, so I build them both with the > > "use_ansi_stdlib" ON. However, one of my programs which once worked fine > > with the VTK(the parameter "use_ansi_lib" is Off) can not work. The > > compile error is: > > > > C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\ios.h(104) : error > > C2371: 'ostream' : redefinition; different basic types > > C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\iosfwd(257) : see > > declaration of 'ostream' > > > > I think the reason is that the conflict between the new IO and the old > > IO, so I add the #undef VTK_USE_ANSI_STDLIB in my program, but the > > compiler report the same error. If I build the VTK with the > > "use_ansi_lib" Off and add the #define VTK_USE_ANSI_STDLIB in my > > programm, I think, I can resolve this problem. However, I need use the > > VTK with the ITK, if I build the VTK with 'use_ansi_lib" Off, I have to > > build the ITK with the same configuration. I do not want to do like > > this. Can I have other choices to resolve the conflict between the old > > IO and the new IO? > > > > Thank you in advance! > > > > Best regards, > > > > Yixun Liu > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > 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 lov at mikrofyn.com Tue Aug 3 06:48:45 2004 From: lov at mikrofyn.com (Lars Overgaard) Date: Tue, 3 Aug 2004 12:48:45 +0200 Subject: [vtkusers] c# port of VTK In-Reply-To: <001e01c47938$6216fe20$2901460a@miradasolutions.com> Message-ID: In general, wrappers have advantages, no doubt about that. But C# is no just yet another programming language - a lot of things go with .net. > It's relatively easy to create wrappers for vtk and the overhead is minimal > in calling them. A lost microsecond when processing hundreds of MB of data > is not worth saving. I wonder if this comment comes out of real experience with C# and managed C++/C wrapping? I think that the overhead can actually become quite substancial. Great care must be taken to obtain an efficient C#-based VTK. Best regards, - Lars From gfourk at zeus.csd.auth.gr Tue Aug 3 07:03:58 2004 From: gfourk at zeus.csd.auth.gr (John Fourkiotis) Date: Tue, 03 Aug 2004 14:03:58 +0300 Subject: [vtkusers] Volumes & Surfaces Message-ID: I have a simple question: Is it possible to have volumetric and surface representation of an object with VTK, at the same time? thanx -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2 From denhuys at hotmail.com Tue Aug 3 08:04:01 2004 From: denhuys at hotmail.com (Toon Huysmans) Date: Tue, 3 Aug 2004 14:04:01 +0200 Subject: [vtkusers] c# port of VTK Message-ID: Hi, I'm not going to mix in this discussion because I am not experienced with these wrapping/porting issues. But, some time ago there was a thread on this list about wrapping vtk in .NET and the following site was referenced: http://herakles.zcu.cz/research/vtk.net/index.php Maybe it inspires you! Regards, Toon. ----- Original Message ----- > From: "Lars Overgaard" > Cc: > Sent: Tuesday, August 03, 2004 12:48 PM > Subject: Re: [vtkusers] c# port of VTK > > > > In general, wrappers have advantages, no doubt about that. > > But C# is no just yet another programming language - a lot > > of things go with .net. > > > > > It's relatively easy to create wrappers for vtk and the overhead is > > minimal > > > in calling them. A lost microsecond when processing hundreds of MB of > > data > > > is not worth saving. > > > > I wonder if this comment comes out of real experience with C# and > > managed C++/C wrapping? > > > > I think that the overhead can actually become quite substancial. > > Great care must be taken to obtain an efficient C#-based VTK. > > > > Best regards, > > - Lars > > > > > > _______________________________________________ > > 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 bryan.cole at teraview.com Tue Aug 3 09:24:22 2004 From: bryan.cole at teraview.com (bryan cole) Date: Tue, 03 Aug 2004 14:24:22 +0100 Subject: [vtkusers] Bug in vtkVolumeMappers Message-ID: <1091539461.2448.67.camel@bryan.teraviewhq.local> Hi All, First up, what's up with the Kitware bug-tracker? I tried to create a new account there and nothing happened. The create-new-account php-page just reloaded itself with no acknowledgement and I've not received any email to indicate I've now got a bug-tracker account. So here's my bug report: The vtkVolumeMappers do not position volumes correctly in world-space, when the lower limits of the Output Whole Extent are anything other than 0,0,0. Thus, any filters which modify the output whole extent, like vtkExtractVOI or vtkImageClip cause the volume to move with respect to any other geometry. I've attached a python script to illustrate the problem. (Even worse things happen for vtkExtractVOI, if you change the sample rate, but let's not get into that). An Alternative viewpoint is that the VolumeMapper is correct, but the calculation of the Origin for the Output of the vtkImageClip (or vtkExtractVOI or any other filter which alters the lower Whole-Extents) is in error. The ambiguity here (which would be the underlying cause of this problem) is that there's no formal design specification for how the position of a dataset is defined. Is it by the Origin (as returned by dataset.GetOrigin()), or is it the bounds, or is it the DataExtents (in the case of image-data)? This duplication of position-information has led to different vtkObjects taking the data positions from difference sources such that they are not consistent. We need a definitive design spec! What IS the fundamental definition of a dataset position in world space? I'm using VTK4.2 Bryan -- Bryan Cole Teraview Ltd., 302-304 Cambridge Science Park, Milton Road, Cambridge CB4 0WG, United Kingdom. tel: +44 (1223) 435380 / 435386 (direct-dial) fax: +44 (1223) 435382 -------------- next part -------------- A non-text attachment was scrubbed... Name: BrokenBoundsDemo.py Type: application/x-python Size: 1941 bytes Desc: not available URL: From vtk072404 at thinkpeak.com Tue Aug 3 11:12:06 2004 From: vtk072404 at thinkpeak.com (Chris Kennedy) Date: Tue, 03 Aug 2004 11:12:06 -0400 Subject: [vtkusers] polydata attributes Message-ID: <410FAB46.9070309@thinkpeak.com> hi, I have 2d polydata that contains numerous loops, and when I use LinearExtrude I'd like to be able to have unique attributes assigned to each cell and then write this 3d representation out in VTK format. I can see in the eleState.tcl example how to have each cell extruded a different dimension, but I don't see yet how to assign attributes, etc that are carried forward into a 3d vtk file representation. Ie, lets say I wanted to name each state and then export this from VTK for use in another program and I want the state's names to be available. Should I be looking at the XML based formats? Do I need to extend one of these so I can tag the info with the required attributes? thanks From vtk at scil.sinp.msu.ru Tue Aug 3 12:11:22 2004 From: vtk at scil.sinp.msu.ru (vtk at scil.sinp.msu.ru) Date: Tue, 3 Aug 2004 20:11:22 +0400 (MSD) Subject: [vtkusers] assembly, actors, add/remove and rendering Message-ID: Hi! So, we have several actors added to the assembly. (assembly->AddActor(actor1); etc) We have renderer, and: renderer->AddActor(assembly); one actor became inactive (actor0, for example). how can I delete it and render the scene without it? Thanx! From mattie_seier at hotmail.com Tue Aug 3 12:16:22 2004 From: mattie_seier at hotmail.com (Matthew Seier) Date: Tue, 03 Aug 2004 12:16:22 -0400 Subject: [vtkusers] centerline calculation Message-ID: Hey, Does anyone know how to calculate a centerline given a set of PolyData in C++? The data represents a tubelike object, and the line would need to pass through the center of the tube, which was obtained using vtkImageReader. Any help would be appreciated. Thanks, Matt _________________________________________________________________ Don?t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ From seanm at nmr.mgh.harvard.edu Tue Aug 3 12:06:53 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 03 Aug 2004 12:06:53 -0400 Subject: [vtkusers] c# port of VTK In-Reply-To: References: Message-ID: <410FB81D.60701@nmr.mgh.harvard.edu> >> It's relatively easy to create wrappers for vtk and the overhead is >> minimal in calling them. A lost microsecond when processing >> hundreds of MB of data is not worth saving. > > I wonder if this comment comes out of real experience with C# and > managed C++/C wrapping? > > I think that the overhead can actually become quite substancial. > Great care must be taken to obtain an efficient C#-based VTK. > > Best regards, > - Lars > I cannot speak for John, but I never took him to be referring to C#. Rather, he references the considerable experience of himself and others in using VTK via one of its current wrappers (Java, Python, and Tcl). His comment is pretty solid and should be applicable. Please see these projects for examples: MayaVi Slicer ParaView -Sean From mathieu.malaterre at kitware.com Tue Aug 3 12:18:53 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Tue, 3 Aug 2004 12:18:53 -0400 Subject: [vtkusers] Compiling VTK Java wrappers on MacOSX Panther Message-ID: <20040803161853.IGBZ16039.fep03.biz.rr.com@[127.0.0.1]> David, Thanks a lot for the bug report + patch. I have entered this as bug #1026 in our bug tracker: http://vtk.org/Bug/bug.php?op=show&bugid=1026 Are you trying VTK for the DICOM reader ? Mathieu > > Thanks for the various helpful suggestions. > > I made the following two changes and at least it compiles > now (whether or not it works is another matter, TBD). > > Also, one needs to use COCOA and not CARBON. > > This change allows it to compile the Objective C JAWT header: > > Index: Rendering/CMakeLists.txt > =================================================================== > RCS file: /cvsroot/VTK/VTK/Rendering/CMakeLists.txt,v > retrieving revision 1.185 > diff -r1.185 CMakeLists.txt > 461a462,465 > > > > IF(APPLE AND VTK_WRAP_JAVA) > > ADD_DEFINITIONS("-ObjC++") > > ENDIF(APPLE AND VTK_WRAP_JAVA) > > This change accounts for the change in Apple's jawt_md.h > for 1.4.2 whether the point is to a cocoaViewRef rather > than a cocoaWindowRef > > Index: Common/vtkJavaAwt.h > =================================================================== > RCS file: /cvsroot/VTK/VTK/Common/vtkJavaAwt.h,v > retrieving revision 1.22 > diff -r1.22 vtkJavaAwt.h > 111c111,112 > < temp0->SetWindowId((void *)dsi_mac->cocoaWindowRef); > --- > > //temp0->SetWindowId((void *)dsi_mac->cocoaWindowRef); > > temp0->SetWindowId((void *)dsi_mac->cocoaViewRef); // DAC. 20040731 for Panther and 1.4.2 (no such thing as cocoaWindowRef) > > david > > _______________________________________________ > 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 seanm at nmr.mgh.harvard.edu Tue Aug 3 12:20:20 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 03 Aug 2004 12:20:20 -0400 Subject: [vtkusers] assembly, actors, add/remove and rendering In-Reply-To: References: Message-ID: <410FBB44.7030009@nmr.mgh.harvard.edu> First, you'll probably add the Assembly to the Renderer via a call to AddProp() since it's not an Actor subclass (AddActor is really just a deprecated synonym). Second, you can use RemoveProp() to ... um ... remove it from the Renderer. Please don't take this as a RTFM comment, but I suggest having a look at the Doxygen-generated online documentation for VTK. It's difficult to write much VTK code without it! -Sean vtk at scil.sinp.msu.ru wrote: > > Hi! > So, we have several actors added to the assembly. > (assembly->AddActor(actor1); etc) > We have renderer, and: > renderer->AddActor(assembly); > > one actor became inactive (actor0, for example). > how can I delete it and render the scene without it? > > Thanx! > From vtk at scil.sinp.msu.ru Tue Aug 3 12:42:01 2004 From: vtk at scil.sinp.msu.ru (vtk at scil.sinp.msu.ru) Date: Tue, 3 Aug 2004 20:42:01 +0400 (MSD) Subject: [vtkusers] assembly, actors, add/remove and rendering In-Reply-To: <410FBB44.7030009@nmr.mgh.harvard.edu> References: <410FBB44.7030009@nmr.mgh.harvard.edu> Message-ID: On Tue, 3 Aug 2004, Sean McInerney wrote: > First, you'll probably add the Assembly to the Renderer via a call to > AddProp() since it's not an Actor subclass (AddActor is really just a > deprecated synonym). > Second, you can use RemoveProp() to ... um ... remove it from the Renderer. ok, but assembly is... assembly. I'm removing items in it, but nothing is reflected in the renderer (it shows the full picture). when I remove assembly - yes, there is no image, I see... From goodwin.lawlor at ucd.ie Tue Aug 3 12:44:27 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Tue, 3 Aug 2004 17:44:27 +0100 Subject: [vtkusers] Re: centerline calculation References: Message-ID: Hi Matt, The easiest way would be to use: void vtkOBBTree::ComputeOBB ( vtkDataSet * input, float corner[3], float max[3], float mid[3], float min[3], float size[3] ) If its a tube, then max[3] will be your center line vector. You can use the centroid as a point for the vector to pass through. Another more involved way is 1. Calculate some cross sections 2. Calculate the centroid of these (polygons) 3. Fit a 3d line to these centroid using some orthogonal regression algorithm. hth Goodwin "Matthew Seier" wrote in message news:BAY12-F20cGXWz8hb1C0004ccdf at hotmail.com... > Hey, > > Does anyone know how to calculate a centerline given a set of PolyData in > C++? The data represents a tubelike object, and the line would need to pass > through the center of the tube, which was obtained using vtkImageReader. > Any help would be appreciated. > > Thanks, > Matt > > _________________________________________________________________ > Don't just search. Find. Check out the new MSN Search! > http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > _______________________________________________ > 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 andresba at hotmail.com Tue Aug 3 12:53:28 2004 From: andresba at hotmail.com (Andres Barrera) Date: Tue, 03 Aug 2004 11:53:28 -0500 Subject: [vtkusers] assembly, actors, add/remove and rendering Message-ID: Hi, Try "( (vtkActor*) renderer->GetActors()->GetItemAsObject(actorNumber) )->VisibilityOff() ;" i.e. assembly->AddPart( ball ); assembly->AddPart( cube ); assembly->AddPart( cone ); renderer->AddActor( actor1); // 0 renderer->AddActor( actor2); // 1 renderer->AddActor( assembly); // 2-4 renderer->AddActor( actor3); // 5 then ( (vtkActor*) renderer->GetActors()->GetItemAsObject( 3 ) )->VisibilityOff() ; will hide "cube" Andres >On Tue, 3 Aug 2004, Sean McInerney wrote: > >>First, you'll probably add the Assembly to the Renderer via a call to >>AddProp() since it's not an Actor subclass (AddActor is really just a >>deprecated synonym). >>Second, you can use RemoveProp() to ... um ... remove it from the >>Renderer. >ok, but assembly is... assembly. >I'm removing items in it, but nothing is reflected in the renderer (it >shows the full picture). >when I remove assembly - yes, there is no image, I see... _________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfee? Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From prabhu at aero.iitm.ernet.in Tue Aug 3 12:55:38 2004 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Tue, 3 Aug 2004 12:55:38 -0400 Subject: [vtkusers] import error in cone.py In-Reply-To: <20040803084157.24793.qmail@web53409.mail.yahoo.com> References: <20040803084157.24793.qmail@web53409.mail.yahoo.com> Message-ID: <16655.50058.753785.338659@enthought.hathway.com> >>>>> "SD" == soumen dey writes: SD> Hi!!!! I am trying to run the cone.py scripts as the first SD> step to start using python with vtk. But when I run the SD> script it crashes saying that " No module named vtk". I doono SD> why this error comes. That means Python is unable to see the files in Wrapping\Python. Exactly why that happens is unclear to me. What happens if you try this on the Python interpreter (IDLE will do fine too): >>> import sys >>> print sys.path You might also want to run "python setup.py install". SD> As stated in README i have added c:\vtkbin\bin\debug in PATH SD> and set the PYTHONPATH variable to SD> c:\vtkbin\bin\debug;c:\vtkbin\wrapping\python. SD> I later tried to import sys and os in python command prompt SD> ...which resulted in success for sys module but it couldnot SD> import os module. Hmm, that seems to imply that your Python installation (not related to VTK) is somehow broken. If python is unable to import the os module something is seriously wrong. I'd recommend that you get that working first and then get to debugging the 'import vtk' problem. Also, giving us the exact error messages you get would be useful. cheers, prabhu From seanm at nmr.mgh.harvard.edu Tue Aug 3 12:47:36 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 03 Aug 2004 12:47:36 -0400 Subject: [vtkusers] assembly, actors, add/remove and rendering In-Reply-To: References: <410FBB44.7030009@nmr.mgh.harvard.edu> Message-ID: <410FC1A8.4020900@nmr.mgh.harvard.edu> Sorry! Now I see what you mean ... I assume this is what you're doing: assembly->RemovePart(actor); If it is, I'm mystified too. You could try calling Render() manually after making the call to RemovePart(). Are you using a vtkAssembly or vtkPropAssembly? If you want to merely toggle the Actor's visibility, use actor->SetVisibility(). -Sean vtk at scil.sinp.msu.ru wrote: > On Tue, 3 Aug 2004, Sean McInerney wrote: > >> First, you'll probably add the Assembly to the Renderer via a call to >> AddProp() since it's not an Actor subclass (AddActor is really just a >> deprecated synonym). >> Second, you can use RemoveProp() to ... um ... remove it from the >> Renderer. > > ok, but assembly is... assembly. > I'm removing items in it, but nothing is reflected in the renderer (it > shows the full picture). > when I remove assembly - yes, there is no image, I see... > From bobbydog102 at hotmail.com Tue Aug 3 16:05:22 2004 From: bobbydog102 at hotmail.com (Songbo Chen) Date: Tue, 3 Aug 2004 21:05:22 +0100 Subject: [vtkusers] How to create Sturctured Grid with vector data fields Message-ID: Hi, now I am working with the STF(simple text format) vector files. What I am going to do is read the vector data from stf files and then use vector algorithm to represent it. the question is:the stf vector data files only contain the vector data, like this: NAME fibres RANK 3 DIMENSIONS 229 159 150 BOUNDS -203 26 87 246 -149 1 VECTOR 3 INTERLACED DATA 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 But for creating a structured grid, from the example of the VTK book, it is said that I have to create points first, which is the dataset of vtkPoints and specify the geometry. How can I generate points from vector data of stf files? Thanks in advanced that if anyone who can help me. ----------------------------- Songbo Chen bobbydog102 at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From bobbydog102 at hotmail.com Tue Aug 3 17:06:52 2004 From: bobbydog102 at hotmail.com (Songbo Chen) Date: Tue, 3 Aug 2004 22:06:52 +0100 Subject: [vtkusers] extract the exact outline from struectured points Message-ID: Hi, everyone: Can anybody tell me that how I can extract the exact outline (the shape of dataset) from sturctured points? I have try to cast the structured points to structured grid using the vtkCastToConcrete class, but I got lots of strange errors. Thanks for anyone who can help me. ----------------------------- Songbo Chen bobbydog102 at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.robinson at kepler-systems.com Tue Aug 3 17:46:13 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Tue, 3 Aug 2004 22:46:13 +0100 Subject: [vtkusers] vtkCutter with quad hexes in v4.2 Message-ID: <20040803214627.DCD1B15BA8@public.kitware.com> Dear All, A while ago I sent some queries in regard trying to use vtkCutter with v4.2 and quad hexahedra type elements. I have two different programmes in which I have tried to get this to work. In both cases I get a rendering of the outer surface of my vtkUnstructuredGrid but the cut surface itself is invisible. The code for creating the cut surface is: void CSampleDoc::CreateCrossSectionActor() { vtkFloatingPointType bounds[6] ; vtkFloatingPointType center[3] ; GetView()->Renderer->ComputeVisiblePropBounds(bounds) ; center[0] = (bounds[0] + bounds[1])/2.0; center[1] = (bounds[2] + bounds[3])/2.0; center[2] = (bounds[4] + bounds[5])/2.0; // Middle of the object pPlane->SetOrigin(center[0],center[1],center[2]) ; pPlane->SetNormal(0.0,1.0,0.0) ; // The actual plane surface pCrossSection->SetCutFunction(pPlane) ; pCrossSection->SetInput(pUnstructuredGrid) ; // What is left after the cut is made pXSectionClipper->SetInput(pGeometry->GetOutput()) ; pXSectionClipper->SetClipFunction(pPlane) ; pCutMeshData->AddInput(pXSectionClipper->GetOutput()) ; pCutMeshData->AddInput(pCrossSection->GetOutput()) ; pXSectionMapper->SetInput(pCutMeshData->GetOutput()) ; pCrossSectionActor->SetMapper(pXSectionMapper); pCutWireFrame->SetInput(pCutMeshData->GetOutput()) ; pCutWireFrame->ManifoldEdgesOn() ; pCutWireFrameMapper->SetInput(pCutWireFrame->GetOutput()) ; pCutWireFrameMapper->ScalarVisibilityOff() ; pCutEdgeActor->SetMapper(pCutWireFrameMapper); (pCutEdgeActor->GetProperty())->SetColor(0.0,0.0,0.0) ; } Where: public: vtkPlane *pPlane ; protected: vtkGeometryFilter *pGeometry ; vtkCutter *pCrossSection ; vtkClipPolyData *pXSectionClipper ; vtkAppendPolyData *pCutMeshData ; vtkPolyDataMapper *pXSectionMapper; vtkActor *pCrossSectionActor ; vtkFeatureEdges *pCutWireFrame ; vtkPolyDataMapper *pCutWireFrameMapper; vtkActor *pCutEdgeActor; Note also that when I try to turn on the scalar visibility of the pXSectionMapper, it doesn't work (just shows up grey). NB: When I use the same program on a linear hexahedra type mesh (unstructured grid) it works. Has anyone else tried to do something like this and had better results? Have any bugs that might cause such behaviour been mended? Regards, Jim James C Robinson, PhD, Chartered Engineer, * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From raafat_amr at hotmail.com Tue Aug 3 18:12:06 2004 From: raafat_amr at hotmail.com (Amr Raafat) Date: Wed, 04 Aug 2004 01:12:06 +0300 Subject: [vtkusers] using atamai viewer Message-ID: An HTML attachment was scrubbed... URL: From j.robinson at kepler-systems.com Tue Aug 3 18:15:08 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Tue, 3 Aug 2004 23:15:08 +0100 Subject: [vtkusers] PlaneWidget Message-ID: <20040803222322.64ACE15D89@public.kitware.com> Dear all, I am trying to use the vtkPlaneWidget object to try control a vtkCutter object (see earlier query). The essential part of the code is: void vtkMyCallback::Execute(vtkObject *caller, unsigned long, void*) { CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd() ; if (pMainFrame==NULL) return ; CSampleView* pVTKView = (CSampleView*)(pMainFrame->MDIGetActive()->GetActiveView()) ; if (pVTKView == NULL) AfxMessageBox("NULL") ; ; if (pVTKView == NULL) return ; pVTKView->GetDocument()->UpdateXSection() ; // Part of what this does is update pPlane } In document class definition: vtkPlaneWidget *pPlaneWidget ; vtkMyCallback *pCallback ; IN document constructor: this->pPlaneWidget = vtkPlaneWidget::New() ; this->pCallback = vtkMyCallback::New(); In Open Document pPlaneWidget->SetInteractor(GetView()->Interactor); vtkFloatingPointType bounds[6] ; vtkFloatingPointType center[3] ; GetView()->Renderer->ComputeVisiblePropBounds(bounds) ; center[0] = (bounds[0] + bounds[1])/2.0; center[1] = (bounds[2] + bounds[3])/2.0; center[2] = (bounds[4] + bounds[5])/2.0; // Note pPlane is the pointer to the implicit function that is used by the vtkCutter pPlaneWidget->GetPlane(pPlane) ; pPlaneWidget->SetResolution(10) ; pPlaneWidget->PlaceWidget(); pPlaneWidget->NormalToYAxisOn() ; pPlaneWidget->AddObserver(vtkCommand::InteractionEvent, pCallback); The code doesn't crash, but the movement of the vtkPlaneWidget has no effect on the vtkPlane (pPlane). Any ideas?? Regards, Jim James C Robinson, PhD, Chartered Engineer, * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbiddiscombe at skippingmouse.co.uk Tue Aug 3 20:29:36 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Wed, 4 Aug 2004 01:29:36 +0100 Subject: [vtkusers] PlaneWidget References: <20040803222322.64ACE15D89@public.kitware.com> Message-ID: <003b01c479ba$1fc3f370$0201a8c0@tigger> Jim, difficult to tell from the snippet, but a good guess would be that initializing with this... // Note pPlane is the pointer to the implicit function that is used by the vtkCutter pPlaneWidget->GetPlane(pPlane) ; is not good enough, after InteractionEndEvent, do that every time, then on each end event, you call getplane and the implicit plane should be updated. Apologies if I've misunderstood. JB From: "James Robinson" To: "Vtk Users" Sent: Tuesday, August 03, 2004 11:15 PM Subject: [vtkusers] PlaneWidget > Dear all, > > > > I am trying to use the vtkPlaneWidget object to try control a vtkCutter > object (see earlier query). The essential part of the code is: > > > > void vtkMyCallback::Execute(vtkObject *caller, unsigned long, void*) > > { > > CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd() ; > > if (pMainFrame==NULL) return ; > > CSampleView* pVTKView = > (CSampleView*)(pMainFrame->MDIGetActive()->GetActiveView()) ; > > if (pVTKView == NULL) AfxMessageBox("NULL") ; ; > > if (pVTKView == NULL) return ; > > pVTKView->GetDocument()->UpdateXSection() ; // Part of what this does is > update pPlane > > } > > In document class definition: > > vtkPlaneWidget *pPlaneWidget ; > > vtkMyCallback *pCallback ; > > > > > > IN document constructor: > > this->pPlaneWidget = vtkPlaneWidget::New() ; > > this->pCallback = vtkMyCallback::New(); > > > > > > In Open Document > > pPlaneWidget->SetInteractor(GetView()->Interactor); > > vtkFloatingPointType bounds[6] ; > > vtkFloatingPointType center[3] ; > > GetView()->Renderer->ComputeVisiblePropBounds(bounds) ; > > center[0] = (bounds[0] + bounds[1])/2.0; > > center[1] = (bounds[2] + bounds[3])/2.0; > > center[2] = (bounds[4] + bounds[5])/2.0; > > // Note pPlane is the pointer to the implicit function that is used by the > vtkCutter > > pPlaneWidget->GetPlane(pPlane) ; > > pPlaneWidget->SetResolution(10) ; > > pPlaneWidget->PlaceWidget(); > > pPlaneWidget->NormalToYAxisOn() ; > > pPlaneWidget->AddObserver(vtkCommand::InteractionEvent, > pCallback); > > > > The code doesn't crash, but the movement of the vtkPlaneWidget has no effect > on the vtkPlane (pPlane). Any ideas?? > > > > Regards, > > > > Jim > > > > > > > > James C Robinson, PhD, Chartered Engineer, > > * 42 Rivergrove, > > Glanmire, > > Co. Cork, > > Eire > > ' +353 21 4822028 > > +353 87 2393010 > > 6 +353 21 4822028 > > * j.robinson at kepler-systems.com > > > > ---------------------------------------------------------------------------- ---- > _______________________________________________ > 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 joyoni at stanford.edu Tue Aug 3 20:35:11 2004 From: joyoni at stanford.edu (Joyoni Dey) Date: Tue, 03 Aug 2004 17:35:11 -0700 Subject: [vtkusers] Setting the vtkCamera perspective geometry In-Reply-To: <20040803222328.0507E15D99@public.kitware.com> Message-ID: <5.2.1.1.2.20040803173358.00b13428@joyoni.pobox.stanford.edu> hi Is there a way to set the perspective transform of the vtkCamera directly. I cannot see it from the list here: http://www.vtk.org/doc/release/4.0/html/classvtkCamera.html thanks for any help. Joyoni From j.robinson at kepler-systems.com Tue Aug 3 20:37:55 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Wed, 4 Aug 2004 01:37:55 +0100 Subject: [vtkusers] PlaneWidget In-Reply-To: <003b01c479ba$1fc3f370$0201a8c0@tigger> Message-ID: <20040804010227.4864515F64@public.kitware.com> John, As we say in this part of the world "You're a star!!". Well done. Pity the other issue (quad hex behaviour) isn't as clear cut. Getting late - I know I should be in bed at this hour. Surely you also have better things to be doing. Regards, Jim James C Robinson, PhD, Chartered Engineer, + 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 - j.robinson at kepler-systems.com -----Original Message----- From: John Biddiscombe [mailto:jbiddiscombe at skippingmouse.co.uk] Sent: 04 August 2004 01:30 To: j.robinson at kepler-systems.com; Vtk Users Subject: Re: [vtkusers] PlaneWidget Jim, difficult to tell from the snippet, but a good guess would be that initializing with this... // Note pPlane is the pointer to the implicit function that is used by the vtkCutter pPlaneWidget->GetPlane(pPlane) ; is not good enough, after InteractionEndEvent, do that every time, then on each end event, you call getplane and the implicit plane should be updated. Apologies if I've misunderstood. JB From: "James Robinson" To: "Vtk Users" Sent: Tuesday, August 03, 2004 11:15 PM Subject: [vtkusers] PlaneWidget > Dear all, > > > > I am trying to use the vtkPlaneWidget object to try control a vtkCutter > object (see earlier query). The essential part of the code is: > > > > void vtkMyCallback::Execute(vtkObject *caller, unsigned long, void*) > > { > > CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd() ; > > if (pMainFrame==NULL) return ; > > CSampleView* pVTKView = > (CSampleView*)(pMainFrame->MDIGetActive()->GetActiveView()) ; > > if (pVTKView == NULL) AfxMessageBox("NULL") ; ; > > if (pVTKView == NULL) return ; > > pVTKView->GetDocument()->UpdateXSection() ; // Part of what this does is > update pPlane > > } > > In document class definition: > > vtkPlaneWidget *pPlaneWidget ; > > vtkMyCallback *pCallback ; > > > > > > IN document constructor: > > this->pPlaneWidget = vtkPlaneWidget::New() ; > > this->pCallback = vtkMyCallback::New(); > > > > > > In Open Document > > pPlaneWidget->SetInteractor(GetView()->Interactor); > > vtkFloatingPointType bounds[6] ; > > vtkFloatingPointType center[3] ; > > GetView()->Renderer->ComputeVisiblePropBounds(bounds) ; > > center[0] = (bounds[0] + bounds[1])/2.0; > > center[1] = (bounds[2] + bounds[3])/2.0; > > center[2] = (bounds[4] + bounds[5])/2.0; > > // Note pPlane is the pointer to the implicit function that is used by the > vtkCutter > > pPlaneWidget->GetPlane(pPlane) ; > > pPlaneWidget->SetResolution(10) ; > > pPlaneWidget->PlaceWidget(); > > pPlaneWidget->NormalToYAxisOn() ; > > pPlaneWidget->AddObserver(vtkCommand::InteractionEvent, > pCallback); > > > > The code doesn't crash, but the movement of the vtkPlaneWidget has no effect > on the vtkPlane (pPlane). Any ideas?? > > > > Regards, > > > > Jim > > > > > > > > James C Robinson, PhD, Chartered Engineer, > > * 42 Rivergrove, > > Glanmire, > > Co. Cork, > > Eire > > ' +353 21 4822028 > > +353 87 2393010 > > 6 +353 21 4822028 > > * j.robinson at kepler-systems.com > > > > ---------------------------------------------------------------------------- ---- > _______________________________________________ > 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 heochy at hotmail.com Tue Aug 3 22:31:20 2004 From: heochy at hotmail.com (heochy) Date: Wed, 4 Aug 2004 11:31:20 +0900 Subject: [vtkusers] vtkPiecewiseFunction References: <20040730190735.0A17E13C19@public.kitware.com> Message-ID: hi vtkusers. One problem occurred. How to use 2 more vtkPiecewiseFunction in the vtkVolumeProperty?? Here's an example and nothing happened... The result was that only in Zero Index... volumeProperty-> SetColor(0, colorTransferFunction[0]); volumeProperty-> SetScalarOpacity(0, piecewiseFunction[0]); volumeProperty-> SetColor(1, colorTransferFunction[1]); volumeProperty-> SetScalarOpacity(1, piecewiseFunction[1]); volumeProperty-> SetColor(2, colorTransferFunction[2]); volumeProperty-> SetScalarOpacity(2, piecewiseFunction[2]); From jxjx at sjtu.edu.cn Tue Aug 3 23:11:00 2004 From: jxjx at sjtu.edu.cn (jiang-gx) Date: Wed, 4 Aug 2004 11:11:00 +0800 Subject: [vtkusers] help: rendering problem Message-ID: <20040804031127.E88037B0914@mx1.sjtu.edu.cn> hi everyone: i add two actors to a renderer(actor1 and actor2),then set the opacity of actor1 to 0.8 . but at the intersetant area of actor1 and actor2, the actor1 can not be see at all. why? what can i do to make the actor1 visible at th4 intersectant area? ????????jiang-gx ????????jxjx at sjtu.edu.cn ??????????2004-08-04 From dclunie at dclunie.com Tue Aug 3 23:25:15 2004 From: dclunie at dclunie.com (David Clunie) Date: Tue, 03 Aug 2004 23:25:15 -0400 Subject: [vtkusers] Compiling VTK Java wrappers on MacOSX Panther In-Reply-To: <20040803161853.IGBZ16039.fep03.biz.rr.com@[127.0.0.1]> References: <20040803161853.IGBZ16039.fep03.biz.rr.com@[127.0.0.1]> Message-ID: <4110571B.8020503@dclunie.com> Mathieu Malaterre wrote: > David, > > Thanks a lot for the bug report + patch. I have entered this as bug #1026 in our bug tracker: > > http://vtk.org/Bug/bug.php?op=show&bugid=1026 > > Are you trying VTK for the DICOM reader ? > > Mathieu Hi Mathieu Actually, I haven't got as far as trying the DICOM reader yet, and in all likelihood would probably use my own Java DICOM reader anyway, just because I am familiar with it, though I will try your reader just to see how it goes. However, despite being able to get the VTK to compile on Panther with 1.4.2, I can't actually get the Java wrappers to work this way, for example, getting: [helgray:Tutorial/Step1/Java] dclunie% javac -classpath ../../../../bin/vtk.jar Cone.java [helgray:Tutorial/Step1/Java] dclunie% java -classpath ../../../../bin/vtk.jar:. -Djava.library.path=../../../../bin Cone 2004-08-03 07:08:06.910 java[4319] *** _NSAutoreleaseNoPool(): Object 0xa2dc932c of class NSCFString autoreleased with no pool in place - just leaking 2004-08-03 07:08:06.916 java[4319] *** _NSAutoreleaseNoPool(): Object 0xa2dc91cc of class NSCFString autoreleased with no pool in place - just leaking ... 2004-08-03 07:08:07.245 java[4319] *** _NSAutoreleaseNoPool(): Object 0x344780 of class NSView autoreleased with no pool in place - just leaking Bus error [helgray:Tutorial/Step1/Java] dclunie% Interestingly enough, if instead of the changes I suggested, I just comment out the inclusion of vtkJavaAwt.h in vtkRenderWindowJava.cxx, the regression tests work, if and only if I choose Carbon rather than Cocoa, and I can compile and execute all of the tutorial exercises up until Step 5, which just hangs forever. david From Irene.Tedjo at gmx.de Wed Aug 4 03:17:44 2004 From: Irene.Tedjo at gmx.de (Irene Tedjo) Date: Wed, 4 Aug 2004 09:17:44 +0200 (MEST) Subject: [vtkusers] =?iso-8859-1?q?Re=3A_can=27t_find_function_vtkContour?= =?iso-8859-1?q?Filter=3A=3ASetInput=28vtkImageData*=29=0D=0A_=8CQ=FF=BF?= Message-ID: <30571.1091603864@www61.gmx.net> >Here is the relevent c++ code: (awData is the stick >figure) > > vtkImplicitModeller * imp = >vtkImplicitModeller::New(); > imp->SetInput( awData ); > imp->SetSampleDimensions( 80, 80, >256 ); //resolution > imp->SetMaximumDistance( 4 ); //perimiter of >calculation > imp->SetModelBounds( -15, 20, -5, 5, -1.0, >50.0 ); > > vtkContourFilter * contour = vtkContourFilter::New(); > contour->SetInput( imp->GetOutput() ); > contour->SetValue( 0, 1.0 ); > vtkPolyDataMapper * impMapper > >vtkPolyDataMapper::New(); > impMapper->SetInput( contour->GetOutput() ); > impMapper->ScalarVisibilityOff(); > > >However! I get this funky compile-time error: > > /imports/archive/u1/uaf/cowell/airway/airway.cxx:113: no >matching function > for > call to `vtkContourFilter::SetInput(vtkImageData*)' > /imports/projects/UAFINSP/vtk-src/Filtering/vtkDataSetToPolyDataFilter.h:44: > candidates > are: virtual void >vtkDataSetToPolyDataFilter::SetInput(vtkDataSet*) > Hi Mac, by c++ you should convert the data structure explicitly because vtkImageData is a subclass of vtkDataSet. Try to do this: vtkContourFilter * contour = vtkContourFilter::New(); contour->SetInput( (vtkDataSet*)imp->GetOutput() ); contour->SetValue( 0, 1.0 ); Good luck. Irene -- NEU: WLAN-Router f?r 0,- EUR* - auch f?r DSL-Wechsler! GMX DSL = superg?nstig & kabellos http://www.gmx.net/de/go/dsl From t.wolfanger at tlt.de Wed Aug 4 03:31:04 2004 From: t.wolfanger at tlt.de (Dr. Thomas Wolfanger) Date: Wed, 4 Aug 2004 09:31:04 +0200 (MEST) Subject: [vtkusers] Non uniform glyph scaling Message-ID: Hi all, there was a thread about 2 years ago on this topic, and I learned from this that using "SetScaleModeToScalingByVectorComponents()" (in python) for Glyph3D should do the trick (i.e. scaling one component of a glyph while leaving the others as they are.). So far so good. But... where do set I set the vector with the scaling for the components? If I set Glyph.SetScaleFactor, then only a scalar is accepted. Sorry that this may be a trivial question but I'm quiet new to vtk programming and totally lost at this point. Greetings, -Thomas From bobbydog102 at hotmail.com Wed Aug 4 03:51:23 2004 From: bobbydog102 at hotmail.com (Songbo Chen) Date: Wed, 4 Aug 2004 08:51:23 +0100 Subject: [vtkusers] extract the exact outline from struectured points References: <001501c479d5$ada3bac0$2d01a8c0@pf244> Message-ID: Hi, vidyadhar: thanks for helping. The result I want is like using the the vtkSturcturedGridOutlineFilter to extract the exact outline of data(any type of shape), when using vtkOutlineFilter, I can only get a cuboid or cube. I can not fine any class like "vtkStructuredPointsOutlineFilter" in VTK, is there another way to do this? ----- Original Message ----- From: vidyadhar To: Songbo Chen Sent: Wednesday, August 04, 2004 4:46 AM Subject: Re: [vtkusers] extract the exact outline from struectured points Hi, Structured points data set is always brick shaped. You can use vtkOutlineFilter which will output polydata outline. This outline can be viewed using vtkPolyDataMapper. Hope this will help you. Vidyadhar ----- Original Message ----- From: Songbo Chen To: vtkusers at vtk.org Sent: Wednesday, August 04, 2004 2:36 AM Subject: [vtkusers] extract the exact outline from struectured points Hi, everyone: Can anybody tell me that how I can extract the exact outline (the shape of dataset) from sturctured points? I have try to cast the structured points to structured grid using the vtkCastToConcrete class, but I got lots of strange errors. Thanks for anyone who can help me. ----------------------------- Songbo Chen bobbydog102 at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From seanm at nmr.mgh.harvard.edu Wed Aug 4 04:09:46 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Wed, 04 Aug 2004 04:09:46 -0400 Subject: =?windows-1252?Q?Re=3A_=5Bvtkusers=5D_Re=3A_can=27t_find?= =?windows-1252?Q?_function_vtkContourFilter=3A=3ASetInput=28vtkImage?= =?windows-1252?Q?Data*=29_=8CQ=FF=BF?= In-Reply-To: <30571.1091603864@www61.gmx.net> References: <30571.1091603864@www61.gmx.net> Message-ID: <411099CA.7090002@nmr.mgh.harvard.edu> Mac, Irene's on the right track ... the problem is lack of type information ... but casting is *NOT* the solution. All you need is a single line of code: #include "vtkImageData.h" -Sean Irene Tedjo wrote: >>Here is the relevent c++ code: (awData is the stick >>figure) >> >> vtkImplicitModeller * imp = >>vtkImplicitModeller::New(); >> imp->SetInput( awData ); >> imp->SetSampleDimensions( 80, 80, >>256 ); //resolution >> imp->SetMaximumDistance( 4 ); //perimiter of >>calculation >> imp->SetModelBounds( -15, 20, -5, 5, -1.0, >>50.0 ); >> >> vtkContourFilter * contour = vtkContourFilter::New(); >> contour->SetInput( imp->GetOutput() ); >> contour->SetValue( 0, 1.0 ); >> vtkPolyDataMapper * impMapper > >>vtkPolyDataMapper::New(); >> impMapper->SetInput( contour->GetOutput() ); >> impMapper->ScalarVisibilityOff(); >> >> >>However! I get this funky compile-time error: >> >>/imports/archive/u1/uaf/cowell/airway/airway.cxx:113: no >>matching function >>for >> call to `vtkContourFilter::SetInput(vtkImageData*)' >> > > /imports/projects/UAFINSP/vtk-src/Filtering/vtkDataSetToPolyDataFilter.h:44: > > >>candidates >> are: virtual void >>vtkDataSetToPolyDataFilter::SetInput(vtkDataSet*) >> > > > Hi Mac, > > by c++ you should convert the data structure explicitly > because vtkImageData is a subclass of vtkDataSet. Try to do > this: > > vtkContourFilter * contour = vtkContourFilter::New(); > contour->SetInput( (vtkDataSet*)imp->GetOutput() ); > contour->SetValue( 0, 1.0 ); > > Good luck. > > Irene > > > From ursula.goette at philips.com Wed Aug 4 07:25:38 2004 From: ursula.goette at philips.com (ursula.goette at philips.com) Date: Wed, 4 Aug 2004 13:25:38 +0200 Subject: [vtkusers] Re: vtkCutter with quad hexes in v4.2 Message-ID: Dear James, (dear all) I do have exactly the same problem with quad hexahedrons and the vtkCutter as you have. I do pretty much the same but it does not work either. I also tried using the quad tetrahedrons - in this case with the vtkProbeFilter - but this does not work either. I am also still on version 4.2. Some time ago I also asked the vtkusers if these problems will be fixed with the newest version (5.0 release is planned for the end of August 04 as far as I know) but I never got an answer. I do have the very bad feeling that the quad elements have not been tested on all filters available in vtk. I am sorry that I do not have any better news and that I cannot help you but maybe it's necessary to keep posting the same questions until someone reacts ?! Kind regards, Ursula G?tte From p.aussems at skynet.be Wed Aug 4 08:15:09 2004 From: p.aussems at skynet.be (Patrice Aussems) Date: Wed, 04 Aug 2004 14:15:09 +0200 Subject: [vtkusers] Rendering of 2 volumes. Message-ID: <1091621709.24409.13.camel@grafix.montefiore.ulg.ac.be> Hi, I want to render 2 different volume in a same window but when I try I just have the volume of the head (vtkPNGReader) and not the vtkSphere. Can Sb help me to solve my problem? thanks Patrice Aussems Here are a sample of my code: vtkSphereSource *sphere = vtkSphereSource::New(); sphere->SetThetaResolution(7); sphere->SetPhiResolution(7); vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New(); sphereMapper->SetInput(outlinesphere->GetOutput()); vtkActor * sphereActor = vtkActor::New(); sphereActor->SetMapper(sphereMapper); vtkPNGReader * readerMR = vtkPNGReader::New(); readerMR->SetFilePattern("MR/%d.png"); readerMR->SetDataExtent(1,256,1,256,0,126); readerMR->SetDataSpacing(1,1,1.5); readerMR->SetDataOrigin(0,0,0); readerMR->UpdateWholeExtent(); vtkImageData *imageDatal = vtkImageData::New(); imageDatal = readerMR->GetOutput(); vtkVolumeRayCastCompositeFunction *compositeFunctionMR = vtkVolumeRayCastCompositeFunction::New(); vtkVolumeRayCastMapper *volumeMapperMR = vtkVolumeRayCastMapper::New(); volumeMapperMR->SetInput(readerMR->GetOutput()); volumeMapperMR->SetVolumeRayCastFunction(compositeFunctionMR); vtkPiecewiseFunction *tfunMR = vtkPiecewiseFunction::New(); tfunMR->AddPoint(75, 0.0); tfunMR->AddPoint(76, 0.01); tfunMR->AddPoint(125, 0.01); tfunMR->AddPoint(126, 0.01); tfunMR->AddPoint(225, 0.01); tfunMR->AddPoint(226, 0); vtkVolumeProperty *volumePropertyMR = vtkVolumeProperty::New(); volumePropertyMR->SetScalarOpacity(tfunMR); volumePropertyMR->SetInterpolationTypeToLinear(); volumePropertyMR->ShadeOn(); newvolMR = vtkVolume::New(); newvolMR->SetMapper(volumeMapperMR); newvolMR->SetProperty(volumePropertyMR); vtkOutlineFilter *outlineMR = vtkOutlineFilter::New(); outlineMR->SetInput((vtkDataSet *)imageDatal); vtkPolyDataMapper *outlineMapperMR = vtkPolyDataMapper::New(); outlineMapperMR->SetInput(outlineMR->GetOutput()); vtkActor *outlineActorl = vtkActor::New(); outlineActorl->SetMapper(outlineMapperMR); outlineActorl->GetProperty()->SetColor(0,0,1); vtkCamera *Cameralost= vtkCamera::New(); Cameralost->SetViewUp (0, 0, 1); Cameralost->SetPosition(ren->GetActiveCamera()->GetPosition()); Cameralost->SetFocalPoint(ren->GetActiveCamera()->GetFocalPoint()); Cameralost->ComputeViewPlaneNormal(); Cameralost->Zoom (0.5); ren2->SetBackground(1,1,1); ren2->AddActor(sphereActor); ren2->AddActor(outlineActorl); ren2->AddVolume(newvolMR); ren2->SetActiveCamera(Cameralost); renwin2->Render(); From jbiddiscombe at skippingmouse.co.uk Wed Aug 4 09:09:04 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Wed, 4 Aug 2004 14:09:04 +0100 Subject: [vtkusers] Non uniform glyph scaling References: Message-ID: <002501c47a24$37ed81e0$2901460a@miradasolutions.com> Each fieldData object (pointdata or celldata) can have scalars associated with it. For colouring etc. You can also add an array of vectors, Dataset->getCellData()->setVectors(...my vector array) then these vectors will be used to scale the glyphs (apologies if syntax misleading, but you get the idea) JB ----- Original Message ----- From: "Dr. Thomas Wolfanger" To: ; Sent: Wednesday, August 04, 2004 8:31 AM Subject: [vtkusers] Non uniform glyph scaling Hi all, there was a thread about 2 years ago on this topic, and I learned from this that using "SetScaleModeToScalingByVectorComponents()" (in python) for Glyph3D should do the trick (i.e. scaling one component of a glyph while leaving the others as they are.). So far so good. But... where do set I set the vector with the scaling for the components? If I set Glyph.SetScaleFactor, then only a scalar is accepted. Sorry that this may be a trivial question but I'm quiet new to vtk programming and totally lost at this point. Greetings, -Thomas _______________________________________________ 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 jbiddiscombe at skippingmouse.co.uk Wed Aug 4 09:10:55 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Wed, 4 Aug 2004 14:10:55 +0100 Subject: [vtkusers] help: rendering problem References: <20040804031127.E88037B0914@mx1.sjtu.edu.cn> Message-ID: <004101c47a24$7a2c4730$2901460a@miradasolutions.com> Make sure you set the Culling backtofront for all renderers in the viewport something like vtkCuller *culler; for (ren1->GetCullers()->InitTraversal(); culler = ren1->GetCullers()->GetNextItem(); ) { if (culler->IsA("vtkFrustumCoverageCuller")) { ((vtkFrustumCoverageCuller*)culler)->SetSortingStyleToBackToFront(); } } to make sure actors are renderered back to front and opacity works well. Also see DepthSortPolyDAta for more advanced datasets where actors/data overlap badly etc JB ----- Original Message ----- From: "jiang-gx" To: "vtk" Sent: Wednesday, August 04, 2004 4:11 AM Subject: [vtkusers] help: rendering problem > hi everyone: > i add two actors to a renderer(actor1 and actor2),then set the opacity of actor1 to 0.8 . but at the intersetant area of actor1 and actor2, the actor1 can not be see at all. why? what can i do to make the actor1 visible at th4 intersectant area? > > > ????????jiang-gx > ????????jxjx at sjtu.edu.cn > ??????????2004-08-04 > ---------------------------------------------------------------------------- ---- > _______________________________________________ > 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 jbiddiscombe at skippingmouse.co.uk Wed Aug 4 09:33:26 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Wed, 4 Aug 2004 14:33:26 +0100 Subject: [vtkusers] Rendering of 2 volumes. References: <1091621709.24409.13.camel@grafix.montefiore.ulg.ac.be> Message-ID: <000d01c47a27$9ee94f20$2901460a@miradasolutions.com> You'll need to turn on IntermixGeometry on the volume so that it blends the polydata actors with it's own image. It's in the mapper somewhere I think JB ----- Original Message ----- From: "Patrice Aussems" To: Sent: Wednesday, August 04, 2004 1:15 PM Subject: [vtkusers] Rendering of 2 volumes. > Hi, > > I want to render 2 different volume in a same window but when I try I > just have the volume of the head (vtkPNGReader) and not the vtkSphere. > Can Sb help me to solve my problem? > > thanks > > Patrice Aussems > > Here are a sample of my code: > > > vtkSphereSource *sphere = vtkSphereSource::New(); > sphere->SetThetaResolution(7); > sphere->SetPhiResolution(7); > > > vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New(); > sphereMapper->SetInput(outlinesphere->GetOutput()); > > vtkActor * sphereActor = vtkActor::New(); > sphereActor->SetMapper(sphereMapper); > > > > vtkPNGReader * readerMR = vtkPNGReader::New(); > readerMR->SetFilePattern("MR/%d.png"); > readerMR->SetDataExtent(1,256,1,256,0,126); > readerMR->SetDataSpacing(1,1,1.5); > readerMR->SetDataOrigin(0,0,0); > readerMR->UpdateWholeExtent(); > > vtkImageData *imageDatal = vtkImageData::New(); > imageDatal = readerMR->GetOutput(); > > vtkVolumeRayCastCompositeFunction *compositeFunctionMR = > vtkVolumeRayCastCompositeFunction::New(); > > vtkVolumeRayCastMapper *volumeMapperMR = vtkVolumeRayCastMapper::New(); > volumeMapperMR->SetInput(readerMR->GetOutput()); > volumeMapperMR->SetVolumeRayCastFunction(compositeFunctionMR); > > > vtkPiecewiseFunction *tfunMR = vtkPiecewiseFunction::New(); > tfunMR->AddPoint(75, 0.0); > tfunMR->AddPoint(76, 0.01); > tfunMR->AddPoint(125, 0.01); > tfunMR->AddPoint(126, 0.01); > tfunMR->AddPoint(225, 0.01); > tfunMR->AddPoint(226, 0); > > > vtkVolumeProperty *volumePropertyMR = vtkVolumeProperty::New(); > volumePropertyMR->SetScalarOpacity(tfunMR); > volumePropertyMR->SetInterpolationTypeToLinear(); > volumePropertyMR->ShadeOn(); > > > newvolMR = vtkVolume::New(); > newvolMR->SetMapper(volumeMapperMR); > newvolMR->SetProperty(volumePropertyMR); > > > vtkOutlineFilter *outlineMR = vtkOutlineFilter::New(); > outlineMR->SetInput((vtkDataSet *)imageDatal); > > > vtkPolyDataMapper *outlineMapperMR = vtkPolyDataMapper::New(); > outlineMapperMR->SetInput(outlineMR->GetOutput()); > > vtkActor *outlineActorl = vtkActor::New(); > outlineActorl->SetMapper(outlineMapperMR); > outlineActorl->GetProperty()->SetColor(0,0,1); > > > vtkCamera *Cameralost= vtkCamera::New(); > Cameralost->SetViewUp (0, 0, 1); > Cameralost->SetPosition(ren->GetActiveCamera()->GetPosition()); > Cameralost->SetFocalPoint(ren->GetActiveCamera()->GetFocalPoint()); > Cameralost->ComputeViewPlaneNormal(); > Cameralost->Zoom (0.5); > > ren2->SetBackground(1,1,1); > ren2->AddActor(sphereActor); > ren2->AddActor(outlineActorl); > ren2->AddVolume(newvolMR); > ren2->SetActiveCamera(Cameralost); > > > renwin2->Render(); > > > > _______________________________________________ > 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 lov at mikrofyn.com Wed Aug 4 10:47:49 2004 From: lov at mikrofyn.com (Lars Overgaard) Date: Wed, 4 Aug 2004 16:47:49 +0200 Subject: SV: [vtkusers] c# port of VTK In-Reply-To: <410FB81D.60701@nmr.mgh.harvard.edu> Message-ID: Sorry, it was never my intention to question anybody's credibility. And I am not the one to say whether or not wrappers are the best solution for vtk-C#. Rather, my point is that C# is special - a beauty, and a real beast! .Net and managed code introduce a HUGE overhead on function calls and data referencing - and automatic garbage collection, not to mention. A C# port/wrap/what-ever that does not take this into account could end up with a computational performance that is a fraction of what was expected. In case of frequent C#->vtk interface calls, it could mean not just lost microseconds but rather lost hours. A vtk wrapper is much easier to maintain than a port, no doubt. On the other hand, wrapping reduces performance. It's a classical choice between maintenance and performance. Usually, the performance cost of a wrapper is quite small, and a wrapper is the obvious choice. In case of C#, the huge .Net overhead makes the choice less obvious. Best regards, - Lars >>> It's relatively easy to create wrappers for vtk and the overhead is >>> minimal in calling them. A lost microsecond when processing hundreds >>> of MB of data is not worth saving. >> In general, wrappers have advantages, no doubt about that. But C# is >> no just yet another programming language - a lot of things go with >> .net. I wonder if this comment comes out of real experience with C# >> and managed C++/C wrapping? I think that the overhead can actually >> become quite substantial. Great care must be taken to obtain an >> efficient C#-based VTK. > I cannot speak for John, but I never took him to be referring to > C#. Rather, he references the considerable experience of himself and > others in using VTK via one of its current wrappers (Java, Python, and > Tcl). His comment is pretty solid and should be applicable. From jbiddiscombe at skippingmouse.co.uk Wed Aug 4 11:18:43 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Wed, 4 Aug 2004 16:18:43 +0100 Subject: [vtkusers] c# port of VTK References: Message-ID: <001201c47a36$54a92390$2901460a@miradasolutions.com> Lars I think I misunderstood what the original poster is attempting, what are your views on the following... 1) A managed C++ wrapper around vtk, which could be called by C#, VB, other managed C++ stuff. Reasonable straightforward, only a speed hit when populating millions of points/vectors/scalars from .Net code. 2) A C# wrapper generated from vtk, as 1) but with lots of effort in the wrapper implemetation to ensure types are handled as efficiently a possible. Call vtk directly from C# (pinvoke or whatever etc) 3) Andy's actually rewritten the entire vtkCommon in C# - ie no back end vtk DLL's. In this case, I think that he's quite mad and clearly deserves a medal of some kind. I predict some trouble when he gets to vtkRendering etc. JB ----- Original Message ----- From: "Lars Overgaard" To: "'John Biddiscombe'" ; ; "'Andy Somogyi'" Cc: Sent: Wednesday, August 04, 2004 3:47 PM Subject: SV: [vtkusers] c# port of VTK > > Sorry, it was never my intention to question anybody's credibility. And > I am not the one to say whether or not wrappers are the best solution > for vtk-C#. > > Rather, my point is that C# is special - a beauty, and a real beast! > .Net and managed code introduce a HUGE overhead on function calls and > data referencing - and automatic garbage collection, not to mention. A > C# port/wrap/what-ever that does not take this into account could end up > with a computational performance that is a fraction of what was > expected. In case of frequent C#->vtk interface calls, it could mean not > just lost microseconds but rather lost hours. > > A vtk wrapper is much easier to maintain than a port, no doubt. On the > other hand, wrapping reduces performance. It's a classical choice > between maintenance and performance. Usually, the performance cost of a > wrapper is quite small, and a wrapper is the obvious choice. > > In case of C#, the huge .Net overhead makes the choice less obvious. > > Best regards, > - Lars > > > >>> It's relatively easy to create wrappers for vtk and the overhead is > >>> minimal in calling them. A lost microsecond when processing hundreds > > >>> of MB of data is not worth saving. > > >> In general, wrappers have advantages, no doubt about that. But C# is > >> no just yet another programming language - a lot of things go with > >> .net. I wonder if this comment comes out of real experience with C# > >> and managed C++/C wrapping? I think that the overhead can actually > >> become quite substantial. Great care must be taken to obtain an > >> efficient C#-based VTK. > > > I cannot speak for John, but I never took him to be referring to > > C#. Rather, he references the considerable experience of himself and > > others in using VTK via one of its current wrappers (Java, Python, and > > > Tcl). His comment is pretty solid and should be applicable. > > _______________________________________________ > 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 nvbutala at yahoo.com Wed Aug 4 11:24:12 2004 From: nvbutala at yahoo.com (nikhil butala) Date: Wed, 4 Aug 2004 08:24:12 -0700 (PDT) Subject: [vtkusers] LookupTable and ScalarBar Message-ID: <20040804152412.78669.qmail@web52103.mail.yahoo.com> Dear VTK users, I am trying to plot (pressure) values from 10^ -7 to 10^ +7 in VTK. But most of the values are centered around 10^ +5. I want the full range of colors in the scalar bar between 10^+4 and 10^ +6. Is there a way to do this in VTK?? I cannot set range between 10^ +4 and 10^+6, because I want to plot the other values as well. In other words, I want to map particular values(of pressure) to particular colors on the scalar bar. Can I build a lookuptable which can do this?? I tried using the log scale. But all it does is it converts the colors into logarthmic fashion keeping the values linear.I would have expected the labels to progress logorithmically over the range so that I can clearly see the colors in the map. Can I get this effect without having to write my own lookup table/scalar bar? Thanking you, Nikhil Butala -------------- next part -------------- An HTML attachment was scrubbed... URL: From rossetantoine at bluewin.ch Wed Aug 4 11:33:33 2004 From: rossetantoine at bluewin.ch (Antoine Rosset) Date: Wed, 4 Aug 2004 08:33:33 -0700 Subject: [vtkusers] Fwd: MAC Drivers for VolumePro 1000 and Software Development Kit Message-ID: A great news for MacOS X users! Begin forwarded message: > From: Kristen Veilleux > Date: August 4, 2004 7:21:06 AM PDT > To: Subject: MAC Drivers for VolumePro 1000 and Software Development > Kit > > Dear MAC VolumePro 1000 Prospect, > > ? > > I am excited to announce that Terarecon, Inc. will be providing > support for MacOSX!? > > ? > > Please call or email me today to discuss the details.? If you need a > quote quick-turn, please email me which memory configuration you would > like (512MB, 1GB, 2GB or 4GB Dual ASIC board) and I will send you your > quote today. > > ? > > I would like to ask for your help in forwarding this email to anyone > you know that is doing 3D Volume Rendering with MacOSX so more people > can take advantage of this great opportunity.? > > ? > > Also, our Engineering team has asked me for your feedback on equipment > and advice on building the drivers.? Any thoughts on a G4 vs. G5?? > What are the most common questions we should be considering when > writing these drivers?? Technical checklist?? Comments?? > > ? > > Thank you for your insights into the world of MAC to date, and I look > forward to working with you in the very near future. > > ? > > ? > > ? > > Best Regards, > > ? > > Kristen Veilleux, VolumePro Academic Sales > > Terarecon, Inc. > > 300 Baker Avenue, Ste 301 > > Concord, MA ?01742 > > 978-369-6500 x231 > > 978-369-7724 (fax) > > veilleux at terarecon.com > > www.terarecon.com > > ? From endre-somogyi at comcast.net Wed Aug 4 11:38:16 2004 From: endre-somogyi at comcast.net (Andy Somogyi) Date: Wed, 04 Aug 2004 09:38:16 -0600 Subject: SV: [vtkusers] c# port of VTK In-Reply-To: References: Message-ID: <411102E8.1090802@comcast.net> Lars Overgaard wrote: > Rather, my point is that C# is special - a beauty, and a real beast! > .Net and managed code introduce a HUGE overhead on function calls and > data referencing - and automatic garbage collection, not to mention. Actually, when c# first came out, I was sceptical, very sceptical, so I wrote TONS of benchmarks comparing c# and c++. Turns out that function calls (to other .net functions) are actually faster in c# than in c++. Calling a an external c function from c# is about .01% slower in c# than c++. Memory allocations are much faster in c# than c++ because an alloc simply moves the stack pointer down, then at a latter time, the garbage collector re-compacts the the global heap. The overhead of a 'managed' class is 12 bytes higher in c# than in c++. Thats why value types (or structs) are much better when TONS of objects are involved. Array access in certain cases is about 1% slower in c# because of array boundry checks, although in loop, if the loop index value is compared against the array 'Length' value, array index checks are eliminated. I ported a large n-body simulation from C to c#, run time took several hours, and the c# version was about 1% slower, in total run time of hours, the time difference was measured often less than a minute. There is a MASSIVE performance hit in c# however, that is when a native or C modules calls a callback function in a c# module. for example, using the C run time 'qsort' function from c# is about 30 times than calling it from c or c++. This is because a callback is registered with the qsort function, and c code in qsort needs to call back on this function. As a refference, calling something like 'memcpy' from c# is identical to calling it from C in terms of performance. > C# port/wrap/what-ever that does not take this into account could end up > with a computational performance that is a fraction of what was > expected. In case of frequent C#->vtk interface calls, it could mean not > just lost microseconds but rather lost hours. This depends on what type of 'wrapper' is used. A script style wrapper, like that used for python or tcl, where vtk clases are only called or used 'as is' and not extended would result in a very minimal performance hit. Vtk however is a library that is really designed to be used by 'extending' classes, overriding virtuals, and in this case, the performance of a wrapper that involved virtuals would be absulutly abysmal. Not to mention, writting this kind of a wrapper might be more dificult than than porting the whole library. > > A vtk wrapper is much easier to maintain than a port, no doubt. On the > other hand, wrapping reduces performance. It's a classical choice > between maintenance and performance. Usually, the performance cost of a > wrapper is quite small, and a wrapper is the obvious choice. > > In case of C#, the huge .Net overhead makes the choice less obvious. > > Best regards, > - Lars > > > >>>> It's relatively easy to create wrappers for vtk and the overhead is minimal in calling them. A lost microsecond when processing hundreds > > > >>>> of MB of data is not worth saving. > > > > >>> In general, wrappers have advantages, no doubt about that. But C# is no just yet another programming language - a lot of things go with .net. I wonder if this comment comes out of real experience with C# and managed C++/C wrapping? I think that the overhead can actually become quite substantial. Great care must be taken to obtain an efficient C#-based VTK. > > > >> I cannot speak for John, but I never took him to be referring to C#. Rather, he references the considerable experience of himself and others in using VTK via one of its current wrappers (Java, Python, and > > > >> Tcl). His comment is pretty solid and should be applicable. > > > > From endre-somogyi at comcast.net Wed Aug 4 11:41:20 2004 From: endre-somogyi at comcast.net (Andy Somogyi) Date: Wed, 04 Aug 2004 09:41:20 -0600 Subject: [vtkusers] c# port of VTK In-Reply-To: <001201c47a36$54a92390$2901460a@miradasolutions.com> References: <001201c47a36$54a92390$2901460a@miradasolutions.com> Message-ID: <411103A0.6090205@comcast.net> John Biddiscombe wrote: > 3) Andy's actually rewritten the entire vtkCommon in C# - ie no back end vtk > DLL's. In this case, I think that he's quite mad and clearly deserves a > medal of some kind. Quite mad indeed :) I have not re-written the 'entire' vtkCommon, just enough to compile the cone.cxx examle as a c# app. > I predict some trouble when he gets to vtkRendering etc. I just started to look at rendering, I ported a small amount here. I'm using Colin Fehey's c# open gl binding: http://www.colinfahey.com/opengl/csharp.htm Basically, he wrote a program to parse the open gl headers, and generate c# function defintions. So they are really called just like an external c function. Actually, the biggest problem (far and away the biggest problem )I ran into was how to deal with the macros. vtkRendering does make fairly extensive use of macros, but really, its only just adds time, as I have to manually expand the macro wherever it is used. From isaacgerg at psu.edu Wed Aug 4 12:00:09 2004 From: isaacgerg at psu.edu (Isaac Gerg) Date: Wed, 4 Aug 2004 12:00:09 -0400 Subject: [vtkusers] Moving a vtkWin32OpenGLRenderWindow In-Reply-To: <411103A0.6090205@comcast.net> Message-ID: <000501c47a3c$1e181e20$aae01cac@arl.psu.edu> Dear all, I have a vtkWin32OpenGLRenderWindow that is part of a dialog. However, I would like to have a button that launches the VTK window into a separate window as VTK does on default. This way, the user can resize it to their liking. In a nutshell, how do I detach the vtkWin32OpenGLRenderWindow from dialog into the default VTK window? Best Regards, Isaac From jbiddiscombe at skippingmouse.co.uk Wed Aug 4 12:19:26 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Wed, 4 Aug 2004 17:19:26 +0100 Subject: [vtkusers] c# port of VTK References: <001201c47a36$54a92390$2901460a@miradasolutions.com> <411103A0.6090205@comcast.net> Message-ID: <001201c47a3e$cfd6d320$2901460a@miradasolutions.com> > > 3) Andy's actually rewritten the entire vtkCommon in C# - ie no back end vtk > > DLL's. In this case, I think that he's quite mad and clearly deserves a > > medal of some kind. > > > Quite mad indeed :) > > I have not re-written the 'entire' vtkCommon, just enough to compile the > cone.cxx examle as a c# app. Hat's off to you. I've no idea why you would do such a thing when using C++ is an option and NOT rewriting the whole bloody lot is so much easier than rewriting it. You must want to use C# very badly indeed. I'll see what sort of medal I can arrange for you. JB From pallavi.joshi at vanderbilt.edu Wed Aug 4 14:12:42 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Wed, 4 Aug 2004 13:12:42 -0500 Subject: [vtkusers] marching cubes qeury References: <4EB6E1738CC2E940BAD2EFBFBF5A38F101C3B27B@OREADE.ipsn.fr> <4106694E.8050005@unizar.es> Message-ID: <000901c47a4e$a2aad940$da593b81@XIAOFENG> Hi All, I am using vtkMarchingCubes to get a mesh for my binary volume. Is there any way by which I can get the coordinates of this mesh ? I need the coordinates as the set of landmark points for that binary volume. Then I need to propogate these landmark points on another volume using rigid and non rigid registration. Is this possible ? Any help will be greatly appreciated. Thank You, Pallavi From profbalse at yahoo.co.in Wed Aug 4 15:11:44 2004 From: profbalse at yahoo.co.in (Sentil Balaji) Date: Wed, 4 Aug 2004 12:11:44 -0700 (PDT) Subject: [vtkusers] vtkFlRenderWindowInteractor problems... Message-ID: <20040804191144.1471.qmail@web8203.mail.in.yahoo.com> Hey, I am using vtkFlRenderWindowInteractor by C.P.Botha with FLTK and VTK4.4...I have the following linker errors[Whew!I got'em down from 25 errors to 3], I was'nt able to crack these up....Any suggestions is appreciated... ------------------------------------------------------ Cone3.obj : error LNK2001: unresolved external symbol "public: void __thiscall vtkFlRenderWindowInteractor::SetRenderWindow(class vtkRenderWindow *)" (?SetRenderWindow at vtkFlRenderWindowInteractor@@QAEXPAVvtkRenderWindow@@@Z) Cone3.obj : error LNK2001: unresolved external symbol "public: __thiscall vtkFlRenderWindowInteractor::vtkFlRenderWindowInteractor(int,int,int,int,char const *)" (??0vtkFlRenderWindowInteractor@@QAE at HHHHPBD@Z) Debug/Cone3.exe : fatal error LNK1120: 2 unresolved externals ------------------------------------------------------ The libraries included : /nodefaultlib:MSVCRT.lib glu32.lib fltkforms.lib fltkgld.lib fltkd.lib wsock32.lib comctl32.lib vtkCommon.lib vtkFiltering.lib vtkGraphics.lib vtkHybrid.lib vtkImaging.lib vtkIO.lib vtkParallel.lib vtkPatented.lib vtkRendering.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ----------- Yes, certainly you are feeling the usage of Windows and VC++.... Thanks for any assistance...... Cheers BeeJay __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail From hampdonald at yahoo.com Wed Aug 4 15:27:04 2004 From: hampdonald at yahoo.com (Hamp Donald) Date: Wed, 4 Aug 2004 12:27:04 -0700 (PDT) Subject: [vtkusers] ObjReader: Help Message-ID: <20040804192704.85330.qmail@web42001.mail.yahoo.com> Hi Friends Can somebody tell me what's wrong am I doing with the following program. It is giving a blank window. Help me please. Best Regards Donald int main( int argc, char *argv[] ) { //vtkRenderer *ren1=vtkRenderer::New(); //vtkRenderWindow *renWin =vtkRenderWindow::New(); //renWin->AddRenderer(ren1); vtkOBJReader *faceReader = vtkOBJReader::New(); faceReader->SetFileName("000.obj"); faceReader->Update(); if (faceReader == NULL) { cout << "Error in ....." << endl; exit(0); } vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); mapper->SetInput(faceReader->GetOutput()); mapper->ScalarVisibilityOff(); vtkBMPReader *imgReader = vtkBMPReader::New(); imgReader->SetFileName("0000.bmp"); vtkTexture *atext = vtkTexture::New(); atext->SetInput(imgReader->GetOutput()); atext->InterpolateOn(); vtkActor *faceActor = vtkActor::New(); faceActor->SetMapper(mapper); faceActor->SetTexture(atext); //faceActor->GetProperty()->SetAmbient(1.0); //faceActor->GetProperty()->SetColor(1.0, 1.0, 1.0); vtkRenderer *ren = vtkRenderer::New(); vtkRenderWindow *renWin= vtkRenderWindow::New(); vtkRenderWindowInteractor *iren=vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); renWin->AddRenderer(ren); ren->AddActor(faceActor); ren->SetBackground(0.1, 0.2, 0.4); renWin->SetSize(500,500); renWin->Render(); //getchar(); iren->Initialize(); iren->Start(); } __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From hampdonald at yahoo.com Wed Aug 4 15:27:04 2004 From: hampdonald at yahoo.com (Hamp Donald) Date: Wed, 4 Aug 2004 12:27:04 -0700 (PDT) Subject: [vtkusers] ObjReader: Help Message-ID: <20040804192704.85330.qmail@web42001.mail.yahoo.com> Hi Friends Can somebody tell me what's wrong am I doing with the following program. It is giving a blank window. Help me please. Best Regards Donald int main( int argc, char *argv[] ) { //vtkRenderer *ren1=vtkRenderer::New(); //vtkRenderWindow *renWin =vtkRenderWindow::New(); //renWin->AddRenderer(ren1); vtkOBJReader *faceReader = vtkOBJReader::New(); faceReader->SetFileName("000.obj"); faceReader->Update(); if (faceReader == NULL) { cout << "Error in ....." << endl; exit(0); } vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); mapper->SetInput(faceReader->GetOutput()); mapper->ScalarVisibilityOff(); vtkBMPReader *imgReader = vtkBMPReader::New(); imgReader->SetFileName("0000.bmp"); vtkTexture *atext = vtkTexture::New(); atext->SetInput(imgReader->GetOutput()); atext->InterpolateOn(); vtkActor *faceActor = vtkActor::New(); faceActor->SetMapper(mapper); faceActor->SetTexture(atext); //faceActor->GetProperty()->SetAmbient(1.0); //faceActor->GetProperty()->SetColor(1.0, 1.0, 1.0); vtkRenderer *ren = vtkRenderer::New(); vtkRenderWindow *renWin= vtkRenderWindow::New(); vtkRenderWindowInteractor *iren=vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); renWin->AddRenderer(ren); ren->AddActor(faceActor); ren->SetBackground(0.1, 0.2, 0.4); renWin->SetSize(500,500); renWin->Render(); //getchar(); iren->Initialize(); iren->Start(); } __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From seanm at nmr.mgh.harvard.edu Wed Aug 4 15:28:33 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Wed, 04 Aug 2004 15:28:33 -0400 Subject: [vtkusers] vtkFlRenderWindowInteractor problems... In-Reply-To: <20040804191144.1471.qmail@web8203.mail.in.yahoo.com> References: <20040804191144.1471.qmail@web8203.mail.in.yahoo.com> Message-ID: <411138E1.9030700@nmr.mgh.harvard.edu> Hi BeeJay, I think that you are neglecting to include vtkFlRenderWindowInteractor.o when you link. -Sean Sentil Balaji wrote: > Hey, > > I am using vtkFlRenderWindowInteractor by > C.P.Botha with FLTK and VTK4.4...I have the following > linker errors[Whew!I got'em down from 25 errors to 3], > I was'nt able to crack these up....Any suggestions is > appreciated... > ------------------------------------------------------ > Cone3.obj : error LNK2001: unresolved external symbol > "public: void __thiscall > vtkFlRenderWindowInteractor::SetRenderWindow(class > vtkRenderWindow *)" > (?SetRenderWindow at vtkFlRenderWindowInteractor@@QAEXPAVvtkRenderWindow@@@Z) > Cone3.obj : error LNK2001: unresolved external symbol > "public: __thiscall > vtkFlRenderWindowInteractor::vtkFlRenderWindowInteractor(int,int,int,int,char > const *)" > (??0vtkFlRenderWindowInteractor@@QAE at HHHHPBD@Z) > Debug/Cone3.exe : fatal error LNK1120: 2 unresolved > externals > ------------------------------------------------------ > > The libraries included : > /nodefaultlib:MSVCRT.lib glu32.lib fltkforms.lib > fltkgld.lib fltkd.lib wsock32.lib comctl32.lib > vtkCommon.lib vtkFiltering.lib vtkGraphics.lib > vtkHybrid.lib vtkImaging.lib vtkIO.lib vtkParallel.lib > vtkPatented.lib vtkRendering.lib kernel32.lib > user32.lib gdi32.lib winspool.lib comdlg32.lib > advapi32.lib shell32.lib ole32.lib oleaut32.lib > uuid.lib odbc32.lib odbccp32.lib > ----------- > > Yes, certainly you are feeling the usage of Windows > and VC++.... > > Thanks for any assistance...... > > Cheers > > BeeJay > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail is new and improved - Check it out! > http://promotions.yahoo.com/new_mail > _______________________________________________ > 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 rmilas at head.cfa.harvard.edu Wed Aug 4 15:40:34 2004 From: rmilas at head.cfa.harvard.edu (Robert Milaszewski) Date: Wed, 04 Aug 2004 15:40:34 -0400 Subject: [vtkusers] Support for 2D text that can be rotated Message-ID: <41113BB2.7030703@head.cfa.harvard.edu> Hello, I noticed that vtk currently does not support functionality to rotate 2D text using vtkTextActor, I wonder if there is a plan to introduce it to vtk at some point in time? vtkVectorText can be used to generate 3D data that can be rotated but it supports only one font, is there a way to introduce more fonts for 3D text without rewriting vtkVectorText class? thanks, Robert M Milaszewski Harvard Smithsonian Center for Astorphysics From c.p.botha at ewi.tudelft.nl Wed Aug 4 16:54:07 2004 From: c.p.botha at ewi.tudelft.nl (Charl P. Botha) Date: Wed, 04 Aug 2004 22:54:07 +0200 Subject: [vtkusers] vtkFlRenderWindowInteractor problems... In-Reply-To: <411138E1.9030700@nmr.mgh.harvard.edu> References: <20040804191144.1471.qmail@web8203.mail.in.yahoo.com> <411138E1.9030700@nmr.mgh.harvard.edu> Message-ID: <41114CEF.6080608@ewi.tudelft.nl> Sean McInerney wrote: > Hi BeeJay, > > I think that you are neglecting to include > vtkFlRenderWindowInteractor.o when you link. > > -Sean Sentil, Sean is probably right. Thanks Sean. :) You could also consider making use of the included CMakeLists.txt. cmake protects us all from the nastiness that is (cross-platform) build-system configuration... Good luck, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From seanm at nmr.mgh.harvard.edu Wed Aug 4 17:00:36 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Wed, 04 Aug 2004 17:00:36 -0400 Subject: [vtkusers] vtkFlRenderWindowInteractor problems... In-Reply-To: <41114CEF.6080608@ewi.tudelft.nl> References: <20040804191144.1471.qmail@web8203.mail.in.yahoo.com> <411138E1.9030700@nmr.mgh.harvard.edu> <41114CEF.6080608@ewi.tudelft.nl> Message-ID: <41114E74.80005@nmr.mgh.harvard.edu> Amen brother! Long live CMake! Charl P. Botha wrote: > Sean McInerney wrote: > >> Hi BeeJay, >> >> I think that you are neglecting to include >> vtkFlRenderWindowInteractor.o when you link. >> >> -Sean > > > Sentil, Sean is probably right. Thanks Sean. :) > > You could also consider making use of the included CMakeLists.txt. cmake > protects us all from the nastiness that is (cross-platform) build-system > configuration... > > Good luck, > Charl > From sanfrux at hotmail.com Wed Aug 4 17:12:15 2004 From: sanfrux at hotmail.com (Alfonso Fernandez) Date: Wed, 04 Aug 2004 21:12:15 +0000 Subject: [vtkusers] VTK graphical interface idea Message-ID: Hello VTK-users, hello Valerio. I read your message. I am developing a scientific visualizer using VTK , python languaje, and wxPython for the GUI, and linux (but it is cross platform). It uses a tree widget to make the VTK pipeline and when you finish configuring the visualization pipeline Graphically though different windows, you pharse it and generate python code into an editor, then it is interpreted and then appears the resulting image. When I finish this proyect (I will be ingeneer in computer science :D) , i will put it in this mailing list, so you can take a look if you want. I think it will be in 5 or 6 months. bye, Alfonso. _________________________________________________________________ Descarga gratis la Barra de Herramientas de MSN http://www.msn.es/usuario/busqueda/barra?XAPID=2031&DI=1055&SU=http%3A//www.hotmail.com&HL=LINKTAG1OPENINGTEXT_MSNBH From tfogal at apollo.sr.unh.edu Wed Aug 4 17:33:45 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Wed, 04 Aug 2004 17:33:45 -0400 Subject: [vtkusers] Cutting out a piece of a rectilinear grid Message-ID: <200408042133.i74LXjtg006668@apollo.sr.unh.edu> Hi all, I'm plotting streamlines using vtkStreamTracer from data in a vtkRectilinearGrid, and having an issue concerning a convention used in the dataset. Within a certain radius from (0,0,0), the data aren't very good and I would like to avoid tracing a stream line through it. So I was wondering if there was any way to cut out a portion of a rectilinear grid, or impose some sort of other artificial boundary on the data? Any ideas? Thanks, -tom From deignacio at gmail.com Wed Aug 4 17:39:36 2004 From: deignacio at gmail.com (david ignacio) Date: Wed, 4 Aug 2004 16:39:36 -0500 Subject: [vtkusers] Interested in a CameraPath Tool? Message-ID: <99b24d68040804143936d4bb65@mail.gmail.com> I've finally decided to stop working on it for a while, now I need some feedback from anyone that's interested. moviePlanner.py is an application aimed to give users a simple and intuitive method and tool for creating fly-by camera paths around arbitrary objects. These objects include but are not limited to vtkPython objects and VRML2.0 files. We are currently using it for previewing datasets and creating animations and camera paths easily. If anyone is interested, let me know and I can send the source. Dave Ignacio University of Chicago Argonne National Laboratory From David.Pont at ForestResearch.co.nz Wed Aug 4 17:45:27 2004 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Thu, 5 Aug 2004 09:45:27 +1200 Subject: [vtkusers] LookupTable and ScalarBar In-Reply-To: <20040804152412.78669.qmail@web52103.mail.yahoo.com> Message-ID: nikhil butala wrote on 05/08/2004 03:24:12: > Dear VTK users, > > > I am trying to plot (pressure) values from > 10^ -7 to 10^ +7 in VTK. But most of the values are centered around > 10^ +5. I want the full range of colors in the scalar bar between > 10^+4 and 10^ +6. Is there a way to do this in VTK?? I cannot set > range between 10^ +4 and 10^+6, because I want to plot the other > values as well. > > In other words, I want to map particular > values(of pressure) to particular colors on the scalar bar. Can I > build a lookuptable which can do this?? > > I tried using the log scale. But all it does is > it converts the colors into logarthmic fashion keeping the values > linear.I would have expected the labels to progress logorithmically > over the range so that I can clearly see the colors in the map. Can > I get this effect without having to write my own lookup table/scalar bar? > Thanking you, > Nikhil Butala_______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: kitware.com/cgi-bin/vtkfaq> > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers Hi Nikhil, There is an alternative way to create a lookuptable: use SetRange, SetNumberOfColors, SetTableValue (called 'NumberOfColors' times) and Build. If you want more colours in the middle of the range you could specify the same colour for several table entries at the ends... For example with classes of size 10^1 you would SetNumberOfColors=14 and then could call SetTableValue: 0 to 10 (scalar range 10^-7 to 10^4) with 1,0,0,1 (red) 11 (scalar range 10^4 to 10^5) with 1,1,0,1 (red+green) 12 (scalar range 10^5 to 10^6) with 0,1,0,1 (green) 13 (scalar range 10^6 to 10^7) with 0,0,1,1 (blue) finally call Build. You probably want more colours in the range of interest so use a smaller class size. A good way to get a nice colour range might be to construct a standard lookuptable (red-blue), specifiying the NumberOfColors to match what you want, call Build, then use GetTableValue to pull out the nicely graded set of colours and place them in your new lookuptable to create your non-linear transition from red to blue. A final tip, you can use the alpha value to make ranges of scalars 'fade out' or disappear completely, a powerful form of clipping based on scalar value, so you could use alpha<0 for the uninteresting parts of the range. Dave P From pallavi.joshi at vanderbilt.edu Wed Aug 4 19:35:50 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Wed, 4 Aug 2004 18:35:50 -0500 Subject: [vtkusers] please help....vtkMarchingCubes Message-ID: <012101c47a7b$c6a5feb0$da593b81@XIAOFENG> Hi All, I am using vtkMarchingCubes to get a mesh for my binary volume. Is there any way by which I can get the coordinates of this mesh ? I need the coordinates as the set of landmark points for that binary volume. Then I need to propogate these landmark points on another volume using rigid and non rigid registration. Is this possible ? Any help will be greatly appreciated. Thank You, Pallavi ------------------------------------------------------------------- Pallavi Joshi Graduate Student Medical Image Processing Lab Vanderbilt University Phone: 615-343-6259 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From glennpierce at connectfree.co.uk Thu Aug 5 06:37:49 2004 From: glennpierce at connectfree.co.uk (Glenn Pierce) Date: Thu, 05 Aug 2004 11:37:49 +0100 Subject: [vtkusers] vtkActor2D to vtkImageData* Possible ? Message-ID: <1091702269.26114.3.camel@salem> Hi I have written some code that exports some images with vtkImageShiftScale *scaler = vtkImageShiftScale::New(); scaler->SetInput(view->GetOutput()); scaler->SetOutputScalarTypeToUnsignedChar(); vtkPNGWriter* writer = vtkPNGWriter::New(); writer->SetInput(scaler->GetOutput()); writer->SetFileName((filename).c_str()); writer->Write(); writer->Delete(); However, what I really need to achieve is the export of a vtkXYPlotActor but I can not find anyway to convert a vtkActor2D to vtkImageData* that the vtkPNGWriter requires for input. I would be most grateful for any advice. Thanks Glenn From jeff at cdnorthamerica.com Thu Aug 5 07:33:38 2004 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Thu, 05 Aug 2004 07:33:38 -0400 Subject: [vtkusers] Cutting out a piece of a rectilinear grid In-Reply-To: <200408042133.i74LXjtg006668@apollo.sr.unh.edu> References: <200408042133.i74LXjtg006668@apollo.sr.unh.edu> Message-ID: <41121B12.8020406@cdnorthamerica.com> tom fogal wrote: >Hi all, I'm plotting streamlines using vtkStreamTracer from data in a >vtkRectilinearGrid, and having an issue concerning a convention used in >the dataset. > >Within a certain radius from (0,0,0), the data aren't very good and I >would like to avoid tracing a stream line through it. >So I was wondering if there was any way to cut out a portion of a >rectilinear grid, or impose some sort of other artificial boundary on >the data? > > mabey vtkThreshold? You could make a scalar field of radius and then threshold the dataset to extract cells greater than your min radius, and pass the output to vtkStreamTracer. Or mabey vtkClipDataSet with a sphere implcit function... then you could avoid calculating a field of radius. -J >Any ideas? > >Thanks, > >-tom >_______________________________________________ >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 denhuys at hotmail.com Thu Aug 5 07:48:29 2004 From: denhuys at hotmail.com (Toon Huysmans) Date: Thu, 5 Aug 2004 13:48:29 +0200 Subject: [vtkusers] vtkActor2D to vtkImageData* Possible ? Message-ID: Hi Glenn, You could use vtkWindowToImageFilter wich takes a window as input and generates a snapshot of the windows contents Toon. -------------------------------------------------------------------------------- >> Hi >> >> I have written some code that exports some images with >> >> vtkImageShiftScale *scaler = vtkImageShiftScale::New(); >> scaler->SetInput(view->GetOutput()); >> scaler->SetOutputScalarTypeToUnsignedChar(); >> >> vtkPNGWriter* writer = vtkPNGWriter::New(); >> writer->SetInput(scaler->GetOutput()); >> writer->SetFileName((filename).c_str()); >> writer->Write(); >> writer->Delete(); >> >> >> However, what I really need to achieve is the export of a vtkXYPlotActor >> but I can not find anyway to convert a vtkActor2D to vtkImageData* >> that the vtkPNGWriter requires for input. >> >> >> I would be most grateful for any advice. >> >> Thanks >> >> Glenn -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jonathan.Bailleul at greyc.ismra.fr Thu Aug 5 08:17:03 2004 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Thu, 05 Aug 2004 14:17:03 +0200 Subject: [vtkusers] please help....vtkMarchingCubes References: <012101c47a7b$c6a5feb0$da593b81@XIAOFENG> Message-ID: <4112253F.18EBD435@greyc.ismra.fr> It seems like an implementation of the method of Alessandro Frangi et al, maybe you could get a look on his publications. So yes, it is possible! Once your reference volume is transformed into a mesh, you might want to decimate it so as to consider the remaining points, supposedly representative of the shape geometry, as decent "landmarks" points, though the works of Davies et al. shows the limits of "easy" landmarking approaches. You can edit the vtk file at this stage to retrieve coordinates of the points/landmarks, but you actually needn't since VTK provides (probably) all functionalities required for a PCA analysis. So, you might now want to make a training set with the other volumes in propagating the landmarks from the reference... Maybe ITK or VTK can perform volume registration, but tools such as AIR (Roger Woods) do it also. At least, it can save volume to volume registration parameters in a file, and then apply it to a file of points, giving what you might want. But maybe you can tell us more details about what you actually want to do? -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From glennpierce at connectfree.co.uk Thu Aug 5 09:06:15 2004 From: glennpierce at connectfree.co.uk (Glenn Pierce) Date: Thu, 05 Aug 2004 14:06:15 +0100 Subject: [vtkusers] vtkActor2D to vtkImageData* Possible ? In-Reply-To: References: Message-ID: <1091711175.17476.4.camel@salem> I tried this before. However, if the window is obscured by a dialogue or menu from a GUI that is used to invoke the export an image with said menu and other screen dirt on is produced. Hope that made sense. Thanks Glenn On Thu, 2004-08-05 at 13:48 +0200, Toon Huysmans wrote: > vtkWindowToImageFilter From denhuys at hotmail.com Thu Aug 5 09:17:10 2004 From: denhuys at hotmail.com (Toon Huysmans) Date: Thu, 5 Aug 2004 15:17:10 +0200 Subject: [vtkusers] vtkActor2D to vtkImageData* Possible ? References: <1091711175.17476.4.camel@salem> Message-ID: Glenn, Maybe you could use the following class : vtkOpenGLOffscreenRenderWindow (http://infinite-entropy.lbl.gov/VTK/vtkOffScreen/) OR vtkWin32OffscreenRenderWindow (in the contrib directory) this will avoid the problem of overlapping windows, i think Greetings, Toon. ----- Original Message ----- From: "Glenn Pierce" To: "Toon Huysmans" Cc: "VtkUsers" Sent: Thursday, August 05, 2004 3:06 PM Subject: Re: [vtkusers] vtkActor2D to vtkImageData* Possible ? > I tried this before. > > However, if the window is obscured by a dialogue or menu from a GUI that > is used to invoke the export an image with said menu and other screen > dirt on is produced. > > Hope that made sense. > > Thanks > > Glenn > > On Thu, 2004-08-05 at 13:48 +0200, Toon Huysmans wrote: > > vtkWindowToImageFilter > > _______________________________________________ > 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 zacharoula.kavagiou at imperial.ac.uk Thu Aug 5 09:23:46 2004 From: zacharoula.kavagiou at imperial.ac.uk (Kavagiou, Zacharoula) Date: Thu, 5 Aug 2004 14:23:46 +0100 Subject: [vtkusers] moving points Message-ID: <9790429EC7745640A7AE6E5D7CF13E710D9D8F@icex32.ic.ac.uk> Hi I recently started working with VTK. I have a mesh that represents a face in 3D and my goal is to deform it by picking points (control points of the mesh) and moving with the mouse. I am not really sure if there is a class that will allow me to do that easily or if I have to use callbacks I implement myself to track the start and end positions...In general, the easiest way to implement a mouse listener is to go through the interactor, its observer and a callback function? Thanks for your time... Haroula -------------- next part -------------- An HTML attachment was scrubbed... URL: From glehmann at imaging.robarts.ca Thu Aug 5 09:56:38 2004 From: glehmann at imaging.robarts.ca (Glen Lehmann) Date: Thu, 5 Aug 2004 09:56:38 -0400 Subject: [vtkusers] vtkActor2D to vtkImageData* Possible ? In-Reply-To: References: <1091711175.17476.4.camel@salem> Message-ID: <459C5D0F-E6E7-11D8-8354-000A956FBE16@imaging.robarts.ca> Hi Glenn and Toon, A while back, I updated John Shalf's vtkOpenGLOffscreenRenderWindow for VTK > 4.3 and the X11 environment, as the last time I checked it was written for vtk3.2. It can be found here: http://www.imaging.robarts.ca/~glehmann/OffScreen/OffScreen.html Recently, others have reported that it still works fine, including Mac OS X via X11. Cheers, Glen On Aug 5, 2004, at 9:17 AM, Toon Huysmans wrote: > Glenn, > Maybe you could use the following class : > > vtkOpenGLOffscreenRenderWindow > (http://infinite-entropy.lbl.gov/VTK/vtkOffScreen/) > > OR > > vtkWin32OffscreenRenderWindow (in the contrib directory) > > this will avoid the problem of overlapping windows, i think > Greetings, > > Toon. > > ----- Original Message ----- > From: "Glenn Pierce" > To: "Toon Huysmans" > Cc: "VtkUsers" > Sent: Thursday, August 05, 2004 3:06 PM > Subject: Re: [vtkusers] vtkActor2D to vtkImageData* Possible ? > > >> I tried this before. >> >> However, if the window is obscured by a dialogue or menu from a GUI >> that >> is used to invoke the export an image with said menu and other screen >> dirt on is produced. >> >> Hope that made sense. >> >> Thanks >> >> Glenn >> >> On Thu, 2004-08-05 at 13:48 +0200, Toon Huysmans wrote: >>> vtkWindowToImageFilter >> >> _______________________________________________ >> 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: > > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From t.wolfanger at tlt.de Thu Aug 5 10:40:42 2004 From: t.wolfanger at tlt.de (Dr. Thomas Wolfanger) Date: Thu, 5 Aug 2004 16:40:42 +0200 (MEST) Subject: [vtkusers] Non uniform glyph scaling Message-ID: Hello John, I still was not able to solve my problem. Probably, there is some basic misunderstandig of what I want to achieve. So lets have a look at some code: MessWerte = vtk.vtkPolyData() # here I declare my PolyData # MessWerte.SetPoints(MessPunktKoordinaten) #Point Coordinates MessWerte.GetPointData().SetVectors(MessWertVelo) # Vectors i want to visualize. As one component of the vector is very large compared to the others, I would like to manipulate the display of the vectors such that the direction of the vectors can be seen. I achieved this by simply multiplying the small components by a factor of say 100., but this manipulates for exapmle the vector norm which is undesirable. It seems to be not possible to read in another vector field for scaling... MessWerte.GetPointData().SetScalars(MessWertPstat) # Scalar field read in # Arrow = vtk.vtkArrowSource() # Creation of the arrows for displaying the vectors # Cones = vtk.vtkGlyph3D() Cones.SetInput(MessWerte) Cones.SetSource(Arrow.GetOutput()) Cones.SetScaleFactor(1./150.) # this scales all components... Cones.OrientOn() Cones.SetVectorModeToUseVector() #Cones.SetScaleModeToScaleByVectorComponents() # this is the command which #probably solves my problem... But how to use it? Cones.SetColorModeToColorByVector() Cones.Update() Thanks for your input, Greetings -Thomas Each fieldData object (pointdata or celldata) can have scalars associated with it. For colouring etc. You can also add an array of vectors, Dataset->getCellData()->setVectors(...my vector array) then these vectors will be used to scale the glyphs (apologies if syntax misleading, but you get the idea) JB ----- Original Message ----- From: "Dr. Thomas Wolfanger" To: ; Sent: Wednesday, August 04, 2004 8:31 AM Subject: [vtkusers] Non uniform glyph scaling Hi all, there was a thread about 2 years ago on this topic, and I learned from this that using "SetScaleModeToScalingByVectorComponents()" (in python) for Glyph3D should do the trick (i.e. scaling one component of a glyph while leaving the others as they are.). So far so good. But... where do set I set the vector with the scaling for the components? If I set Glyph.SetScaleFactor, then only a scalar is accepted. Sorry that this may be a trivial question but I'm quiet new to vtk programming and totally lost at this point. Greetings, -Thomas _______________________________________________ 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 j.robinson at kepler-systems.com Thu Aug 5 11:13:22 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Thu, 5 Aug 2004 16:13:22 +0100 Subject: [vtkusers] vtkPlaneWidget Message-ID: <20040805151330.C6D2E16802@public.kitware.com> Dear All, Thanks to John (Biddiscombe) I am able to control my vtkCutter using the vtkPlaneWidget. However, I also want to be able to do the reverse - i.e. take the vtkPlane setup from the vtkCutter and apply them to the vtkPlaneWidget (as I have already other menu driven controls to manipulate the vtkPlane). My attempt at doing this is: void CSampleDoc::UpdatePlaneWidget() { // This method is to update the plane widget from the vtkPlane used as the // implicit function for the vtkCutter vtkFloatingPointType normal[3] ; vtkFloatingPointType origin[3] ; pPlane->GetOrigin(origin) ; pPlane->GetNormal(normal) ; CString message, dummy ; message.Format("Origin:- x %lf, y %lf, z %lf\n",origin[0],origin[1],origin[2]) ; dummy.Format("Normal:- x %lf, y %lf, z %lf\n",normal[0],normal[1],normal[2]) ; message += dummy ; AfxMessageBox(message) ; pPlaneWidget->SetOrigin(origin) ; pPlaneWidget->SetNormal(normal) ; pPlaneWidget->GetOrigin(origin) ; pPlaneWidget->GetNormal(normal) ; message.Format("Origin:- x %lf, y %lf, z %lf\n",origin[0],origin[1],origin[2]) ; dummy.Format("Normal:- x %lf, y %lf, z %lf\n",normal[0],normal[1],normal[2]) ; message += dummy ; AfxMessageBox(message) ; } This yields: Origin: x 100.000000, y 100.0000000, z 10.0000000 Normal: x 0.000000, y 1.0000000, z 0.0000000 For the vtkPlane - which is what I have set up. However, the output from the vtkPlaneWidget is: Origin: x 100.000000, y 10.0000000, z -100.0000000 Normal: x 0.000000, y 1.0000000, z 0.0000000 So the origin coordinates seem to have been mixed up. In addition, it doesn't show the vtkPLaneWidget in this position (rather the normal is 1,0,0 and the origin (center??) seems alright?? Any advice would be appreciated. Regards, Jim James C Robinson, PhD, Chartered Engineer, * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at cdnorthamerica.com Thu Aug 5 11:19:30 2004 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Thu, 05 Aug 2004 11:19:30 -0400 Subject: [vtkusers] vtkPlaneWidget In-Reply-To: <20040805151330.C6D2E16802@public.kitware.com> References: <20040805151330.C6D2E16802@public.kitware.com> Message-ID: <41125002.90701@cdnorthamerica.com> Did you try pPlaneWidget->UpdatePlacement() after SetOrigin and SetNormal -J James Robinson wrote: > Dear All, > > Thanks to John (Biddiscombe) I am able to control my vtkCutter using > the vtkPlaneWidget. However, I also want to be able to do the reverse > ? i.e. take the vtkPlane setup from the vtkCutter and apply them to > the vtkPlaneWidget (as I have already other menu driven controls to > manipulate the vtkPlane). My attempt at doing this is: > > void CSampleDoc::UpdatePlaneWidget() > > { > > // This method is to update the plane widget from the vtkPlane used as > the > > // implicit function for the vtkCutter > > vtkFloatingPointType normal[3] ; > > vtkFloatingPointType origin[3] ; > > pPlane->GetOrigin(origin) ; > > pPlane->GetNormal(normal) ; > > CString message, dummy ; > > message.Format("Origin:- x %lf, y %lf, z > %lf\n",origin[0],origin[1],origin[2]) ; > > dummy.Format("Normal:- x %lf, y %lf, z > %lf\n",normal[0],normal[1],normal[2]) ; > > message += dummy ; > > AfxMessageBox(message) ; > > pPlaneWidget->SetOrigin(origin) ; > > pPlaneWidget->SetNormal(normal) ; > > pPlaneWidget->GetOrigin(origin) ; > > pPlaneWidget->GetNormal(normal) ; > > message.Format("Origin:- x %lf, y %lf, z > %lf\n",origin[0],origin[1],origin[2]) ; > > dummy.Format("Normal:- x %lf, y %lf, z > %lf\n",normal[0],normal[1],normal[2]) ; > > message += dummy ; > > AfxMessageBox(message) ; > > } > > This yields: > > Origin: x 100.000000, y 100.0000000, z 10.0000000 > > Normal: x 0.000000, y 1.0000000, z 0.0000000 > > For the vtkPlane ? which is what I have set up. > > However, the output from the vtkPlaneWidget is: > > Origin: x 100.000000, y 10.0000000, z -100.0000000 > > Normal: x 0.000000, y 1.0000000, z 0.0000000 > > So the origin coordinates seem to have been mixed up. In addition, it > doesn?t show the vtkPLaneWidget in this position (rather the normal is > 1,0,0 and the origin (center??) seems alright?? > > Any advice would be appreciated. > > Regards, > > Jim > > *James C Robinson*, PhD, Chartered Engineer, > > + 42 Rivergrove, > > Glanmire, > > Co. Cork, > > Eire > > ' +353 21 4822028 > > +353 87 2393010 > > 6 +353 21 4822028 > > - j.robinson at kepler-systems.com > >------------------------------------------------------------------------ > >_______________________________________________ >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 j.robinson at kepler-systems.com Thu Aug 5 11:30:58 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Thu, 5 Aug 2004 16:30:58 +0100 Subject: [vtkusers] vtkPlaneWidget In-Reply-To: <41125002.90701@cdnorthamerica.com> Message-ID: <20040805153103.E1711160C7@public.kitware.com> Jeff, Many thanks. However, it doesn't seem to do anything (positive). I have put: pPlaneWidget->SetOrigin(origin) ; pPlaneWidget->UpdatePlacement() ; pPlaneWidget->SetNormal(normal) ; Into my code and now I get: Origin: x 95.249390, y 0.000002, z 105.012161 Normal: x 0.000000, y 1.0000000, z 0.0000000 The significance of the coordinates of the new origin I cannot see? In addition, if I change the order to: pPlaneWidget->SetOrigin(origin) ; pPlaneWidget->SetNormal(normal) ; pPlaneWidget->UpdatePlacement() ; I get a slightly different output (still not correct). Finally, regardless of these new (seemingly arbitrary values for the origin) it changes nothing in the window in terms of the actual widget placement. Any more advice welcomed. Jim James C Robinson, PhD, Chartered Engineer, CEO, Kepler Engineering Software Ltd., + 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 - j.robinson at kepler-systems.com -----Original Message----- From: Jeff Lee [mailto:jeff at cdnorthamerica.com] Sent: 05 August 2004 16:20 To: j.robinson at kepler-systems.com Cc: Vtk Users Subject: Re: [vtkusers] vtkPlaneWidget Did you try pPlaneWidget->UpdatePlacement() after SetOrigin and SetNormal -J James Robinson wrote: > Dear All, > > Thanks to John (Biddiscombe) I am able to control my vtkCutter using > the vtkPlaneWidget. However, I also want to be able to do the reverse > - i.e. take the vtkPlane setup from the vtkCutter and apply them to > the vtkPlaneWidget (as I have already other menu driven controls to > manipulate the vtkPlane). My attempt at doing this is: > > void CSampleDoc::UpdatePlaneWidget() > > { > > // This method is to update the plane widget from the vtkPlane used as > the > > // implicit function for the vtkCutter > > vtkFloatingPointType normal[3] ; > > vtkFloatingPointType origin[3] ; > > pPlane->GetOrigin(origin) ; > > pPlane->GetNormal(normal) ; > > CString message, dummy ; > > message.Format("Origin:- x %lf, y %lf, z > %lf\n",origin[0],origin[1],origin[2]) ; > > dummy.Format("Normal:- x %lf, y %lf, z > %lf\n",normal[0],normal[1],normal[2]) ; > > message += dummy ; > > AfxMessageBox(message) ; > > pPlaneWidget->SetOrigin(origin) ; > > pPlaneWidget->SetNormal(normal) ; > > pPlaneWidget->GetOrigin(origin) ; > > pPlaneWidget->GetNormal(normal) ; > > message.Format("Origin:- x %lf, y %lf, z > %lf\n",origin[0],origin[1],origin[2]) ; > > dummy.Format("Normal:- x %lf, y %lf, z > %lf\n",normal[0],normal[1],normal[2]) ; > > message += dummy ; > > AfxMessageBox(message) ; > > } > > This yields: > > Origin: x 100.000000, y 100.0000000, z 10.0000000 > > Normal: x 0.000000, y 1.0000000, z 0.0000000 > > For the vtkPlane - which is what I have set up. > > However, the output from the vtkPlaneWidget is: > > Origin: x 100.000000, y 10.0000000, z -100.0000000 > > Normal: x 0.000000, y 1.0000000, z 0.0000000 > > So the origin coordinates seem to have been mixed up. In addition, it > doesn't show the vtkPLaneWidget in this position (rather the normal is > 1,0,0 and the origin (center??) seems alright?? > > Any advice would be appreciated. > > Regards, > > Jim > > *James C Robinson*, PhD, Chartered Engineer, > > + 42 Rivergrove, > > Glanmire, > > Co. Cork, > > Eire > > ' +353 21 4822028 > > +353 87 2393010 > > 6 +353 21 4822028 > > - j.robinson at kepler-systems.com > >------------------------------------------------------------------------ > >_______________________________________________ >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 Steve.Joyce at sercoassurance.com Thu Aug 5 11:38:50 2004 From: Steve.Joyce at sercoassurance.com (Steve Joyce) Date: Thu, 05 Aug 2004 16:38:50 +0100 Subject: [vtkusers] Re: LookupTable and ScalarBar Message-ID: Hi, For a log scale to be displayed correctly in a scalar bar you need to use vtkLogLookupTable. The vtkScalarBarActor class does not treat this the same as vtkLookupTable with SetScaleToLog10(), even though it should. To create a custom scale you can use a vtkColorTransferFunction, which vtkScalarBarActor will also accept, although it doesn't always handle it very well. It might be nice to have a scalar bar class that you just passed a set of labels and a set of colours to and it just displayed them, perhaps with options to control the width of each colour band and the positioning of the labels. That would allow any type of non-linear scale to be displayed. Steve >>> vtkusers-request at vtk.org 04/08/2004 17:00:08 >>> I am trying to plot (pressure) values from 10^ -7 to 10^ +7 in VTK. But most of the values are centered around 10^ +5. I want the full range of colors in the scalar bar between 10^+4 and 10^ +6. Is there a way to do this in VTK?? I cannot set range between 10^ +4 and 10^+6, because I want to plot the other values as well. In other words, I want to map particular values(of pressure) to particular colors on the scalar bar. Can I build a lookuptable which can do this?? I tried using the log scale. But all it does is it converts the colors into logarthmic fashion keeping the values linear.I would have expected the labels to progress logorithmically over the range so that I can clearly see the colors in the map. Can I get this effect without having to write my own lookup table/scalar bar? Thanking you, Nikhil Butala - ****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 jeff at cdnorthamerica.com Thu Aug 5 11:41:30 2004 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Thu, 05 Aug 2004 11:41:30 -0400 Subject: [vtkusers] vtkPlaneWidget In-Reply-To: <20040805153103.E1711160C7@public.kitware.com> References: <20040805153103.E1711160C7@public.kitware.com> Message-ID: <4112552A.8010500@cdnorthamerica.com> James Robinson wrote: >Jeff, > >Many thanks. However, it doesn't seem to do anything (positive). > >I have put: > pPlaneWidget->SetOrigin(origin) ; > pPlaneWidget->UpdatePlacement() ; > pPlaneWidget->SetNormal(normal) ; > >Into my code and now I get: > >Origin: x 95.249390, y 0.000002, z 105.012161 >Normal: x 0.000000, y 1.0000000, z 0.0000000 > >The significance of the coordinates of the new origin I cannot see? In >addition, if I change the order to: > > pPlaneWidget->SetOrigin(origin) ; > pPlaneWidget->SetNormal(normal) ; > pPlaneWidget->UpdatePlacement() ; > >I get a slightly different output (still not correct). > > hmm, this is exactly what I do to update the plane - SetOrigin, SetNormal, UpdatePlacement, and then a Render() to refresh the screen. has the plane widget been EnabledOn()'ed and PlaceWidget()'ed when you try the above? Otherwise I'm stumped. Good luck, -Jeff >Finally, regardless of these new (seemingly arbitrary values for the origin) >it changes nothing in the window in terms of the actual widget placement. > >Any more advice welcomed. > > >Jim > > >James C Robinson, PhD, Chartered Engineer, >CEO, >Kepler Engineering Software Ltd., >+ 42 Rivergrove, > Glanmire, > Co. Cork, > Eire >' +353 21 4822028 > +353 87 2393010 >6 +353 21 4822028 >- j.robinson at kepler-systems.com > >-----Original Message----- >From: Jeff Lee [mailto:jeff at cdnorthamerica.com] >Sent: 05 August 2004 16:20 >To: j.robinson at kepler-systems.com >Cc: Vtk Users >Subject: Re: [vtkusers] vtkPlaneWidget > >Did you try >pPlaneWidget->UpdatePlacement() after SetOrigin and SetNormal >-J > >James Robinson wrote: > > > >>Dear All, >> >>Thanks to John (Biddiscombe) I am able to control my vtkCutter using >>the vtkPlaneWidget. However, I also want to be able to do the reverse >>- i.e. take the vtkPlane setup from the vtkCutter and apply them to >>the vtkPlaneWidget (as I have already other menu driven controls to >>manipulate the vtkPlane). My attempt at doing this is: >> >>void CSampleDoc::UpdatePlaneWidget() >> >>{ >> >>// This method is to update the plane widget from the vtkPlane used as >>the >> >>// implicit function for the vtkCutter >> >>vtkFloatingPointType normal[3] ; >> >>vtkFloatingPointType origin[3] ; >> >>pPlane->GetOrigin(origin) ; >> >>pPlane->GetNormal(normal) ; >> >>CString message, dummy ; >> >>message.Format("Origin:- x %lf, y %lf, z >>%lf\n",origin[0],origin[1],origin[2]) ; >> >>dummy.Format("Normal:- x %lf, y %lf, z >>%lf\n",normal[0],normal[1],normal[2]) ; >> >>message += dummy ; >> >>AfxMessageBox(message) ; >> >>pPlaneWidget->SetOrigin(origin) ; >> >>pPlaneWidget->SetNormal(normal) ; >> >>pPlaneWidget->GetOrigin(origin) ; >> >>pPlaneWidget->GetNormal(normal) ; >> >>message.Format("Origin:- x %lf, y %lf, z >>%lf\n",origin[0],origin[1],origin[2]) ; >> >>dummy.Format("Normal:- x %lf, y %lf, z >>%lf\n",normal[0],normal[1],normal[2]) ; >> >>message += dummy ; >> >>AfxMessageBox(message) ; >> >>} >> >>This yields: >> >>Origin: x 100.000000, y 100.0000000, z 10.0000000 >> >>Normal: x 0.000000, y 1.0000000, z 0.0000000 >> >>For the vtkPlane - which is what I have set up. >> >>However, the output from the vtkPlaneWidget is: >> >>Origin: x 100.000000, y 10.0000000, z -100.0000000 >> >>Normal: x 0.000000, y 1.0000000, z 0.0000000 >> >>So the origin coordinates seem to have been mixed up. In addition, it >>doesn't show the vtkPLaneWidget in this position (rather the normal is >>1,0,0 and the origin (center??) seems alright?? >> >>Any advice would be appreciated. >> >>Regards, >> >>Jim >> >>*James C Robinson*, PhD, Chartered Engineer, >> >>+ 42 Rivergrove, >> >>Glanmire, >> >>Co. Cork, >> >>Eire >> >>' +353 21 4822028 >> >>+353 87 2393010 >> >>6 +353 21 4822028 >> >>- j.robinson at kepler-systems.com >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>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: >Follow this link to subscribe/unsubscribe: >http://www.vtk.org/mailman/listinfo/vtkusers > > > > From goodwin.lawlor at ucd.ie Thu Aug 5 13:52:21 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Thu, 5 Aug 2004 18:52:21 +0100 Subject: [vtkusers] Re: vtkActor2D to vtkImageData* Possible ? References: <1091711175.17476.4.camel@salem> Message-ID: There's a method vtkRenderWindow::OffScreenRenderingOn() that I use successfully on windows xp for this. hth Goodwin "Toon Huysmans" wrote in message news:BAY14-DAV14cv8aSJlw00009fd9 at hotmail.com... > Glenn, > Maybe you could use the following class : > > vtkOpenGLOffscreenRenderWindow > (http://infinite-entropy.lbl.gov/VTK/vtkOffScreen/) > > OR > > vtkWin32OffscreenRenderWindow (in the contrib directory) > > this will avoid the problem of overlapping windows, i think > Greetings, > > Toon. > > ----- Original Message ----- > From: "Glenn Pierce" > To: "Toon Huysmans" > Cc: "VtkUsers" > Sent: Thursday, August 05, 2004 3:06 PM > Subject: Re: [vtkusers] vtkActor2D to vtkImageData* Possible ? > > > > I tried this before. > > > > However, if the window is obscured by a dialogue or menu from a GUI that > > is used to invoke the export an image with said menu and other screen > > dirt on is produced. > > > > Hope that made sense. > > > > Thanks > > > > Glenn > > > > On Thu, 2004-08-05 at 13:48 +0200, Toon Huysmans wrote: > > > vtkWindowToImageFilter > > > > _______________________________________________ > > 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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From kerekes at fastmail.fm Thu Aug 5 18:46:42 2004 From: kerekes at fastmail.fm (Kate Kerekes) Date: Thu, 5 Aug 2004 18:46:42 -0400 Subject: [vtkusers] monitor progress of vol16Reader Message-ID: <000001c47b3e$13dd5e40$0300a8c0@kerekeslaptop> Hello everyone, I have looked at the messages regarding progress and update methods, but I still can't answer my question. I am reading a large dataset (400 MB) and I need some sort of progress bar to update. I was using vtkImageReader and the SetProgressMethod. This worked as expected. Then I discovered that vtkVolume16Reader read in the data up to 5 times faster. So I want to read my data with vtkVolume16Reader, but I need a way to set the progress method. There are no "setProgress" methods in the vtkVolume16Reader class or any of its parents. Does anyone know a trick to find out the current progress of the Volume16Reader? Can someone explain why vtkImageReader is so much slower than vtkVolume16Reader? Is there anything I can do to make vtkImageReader faster? Thanks, Katherine Kerekes -------------- next part -------------- An HTML attachment was scrubbed... URL: From seanm at nmr.mgh.harvard.edu Thu Aug 5 18:52:14 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Thu, 05 Aug 2004 18:52:14 -0400 Subject: [vtkusers] monitor progress of vol16Reader In-Reply-To: <000001c47b3e$13dd5e40$0300a8c0@kerekeslaptop> References: <000001c47b3e$13dd5e40$0300a8c0@kerekeslaptop> Message-ID: <4112BA1E.90506@nmr.mgh.harvard.edu> Five times faster!?! A plausible reason is difficult to imagine ... except, perhaps ... If you run your vtkImageReader-based app first, all data is read from disk (slow). If you subsequently run an app reading the same data, it is likely that the data has been partially or fully cached by the OS and will be accessed dramatically faster. Otherwise ... what gives? I would not think that any two implementations of a volume reader could have a speed difference of this magnitude. There's not even a decompression scheme to consider. Can the rumors be true? ;-) -Sean Kate Kerekes wrote: > Hello everyone, > > I have looked at the messages regarding progress and update methods, but > I still can't answer my question. I am reading a large dataset (400 MB) > and I need some sort of progress bar to update. I was using > vtkImageReader and the SetProgressMethod. This worked as expected. > Then I discovered that vtkVolume16Reader read in the data up to 5 times > faster. So I want to read my data with vtkVolume16Reader, but I need a > way to set the progress method. There are no "setProgress" methods in > the vtkVolume16Reader class or any of its parents. Does anyone know a > trick to find out the current progress of the Volume16Reader? Can > someone explain why vtkImageReader is so much slower than > vtkVolume16Reader? Is there anything I can do to make vtkImageReader > faster? > > Thanks, > Katherine Kerekes > From goodwin.lawlor at ucd.ie Thu Aug 5 19:42:12 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Fri, 6 Aug 2004 00:42:12 +0100 Subject: [vtkusers] Re: monitor progress of vol16Reader References: <000001c47b3e$13dd5e40$0300a8c0@kerekeslaptop> Message-ID: Hi Katherine, The SetProgressMethod is a member function of the vtkProcessObject class which is a superclass of both vtkVolume16Reader and vtkImageReader... so they both should have the function. SetProgressMethod has been depreciated anyway. You should use (for example in tcl) reader AddObserver ProgressEvent {puts "Progress: [reader GetProgess]"} You could also use an instance of vtkTimerLog to time between the readers' StartEvent and EndEvent. I've no idea why vtkVolume16Reader would be quicker... the documentation says vtkImageReader is a replacement for vtkVolume16Reader and should be used instead. hth Goodwin "Kate Kerekes" wrote in message news:000001c47b3e$13dd5e40$0300a8c0 at kerekeslaptop... Hello everyone, I have looked at the messages regarding progress and update methods, but I still can't answer my question. I am reading a large dataset (400 MB) and I need some sort of progress bar to update. I was using vtkImageReader and the SetProgressMethod. This worked as expected. Then I discovered that vtkVolume16Reader read in the data up to 5 times faster. So I want to read my data with vtkVolume16Reader, but I need a way to set the progress method. There are no "setProgress" methods in the vtkVolume16Reader class or any of its parents. Does anyone know a trick to find out the current progress of the Volume16Reader? Can someone explain why vtkImageReader is so much slower than vtkVolume16Reader? Is there anything I can do to make vtkImageReader faster? Thanks, Katherine Kerekes _______________________________________________ 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 derong at lycos.co.uk Thu Aug 5 22:53:41 2004 From: derong at lycos.co.uk (derong) Date: Thu, 5 Aug 2004 19:53:41 -0700 Subject: [vtkusers] MFC MDI Examples Message-ID: <20040806025343.EF42FAB203@lmcodec03.st1.spray.net> Hi, Now, I'm trying to do some projects by using MFC and vtk. It seems the example for MFC MDI is some old. Is there any new VTK examples with MFC? I have tried to do event handling with MFC. There are some codes in the sample codes vtkMDIView.cpp as: LRESULT CVtkMDIView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { //case WM_PAINT: case WM_LBUTTONDOWN: case WM_LBUTTONUP: case WM_MBUTTONDOWN: case WM_MBUTTONUP: case WM_RBUTTONDOWN: case WM_RBUTTONUP: case WM_MOUSEMOVE: case WM_CHAR: case WM_TIMER: if (this->iren->GetInitialized()) { return vtkHandleMessage2(this->m_hWnd, message, wParam, lParam, this->iren); } break; } return CView::WindowProc(message, wParam, lParam); } if I don't add this kind of codes in my project, the mouse is still working. But the window can't get any charactor inputing from keyborad. Now i added these codes to my projects. If I just delete the message WM_LBUTTONDOWN,... WM_MOUSEMOVE. leave WM_CHAR, WM_TIMER. The window can get keyboard keydown event. Does it mean the mouse event writing there is redundant? Can any one explain clearly how vtkWin32RenderWindowInteractor handles the Windows Messages and events? any hints will be helpful, thanks! Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidmichell at rediffmail.com Fri Aug 6 00:52:38 2004 From: davidmichell at rediffmail.com (david michell) Date: 6 Aug 2004 04:52:38 -0000 Subject: [vtkusers] bug in vtkButterflySubdivisionFilter Message-ID: <20040806045238.23864.qmail@webmail17.rediffmail.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- Hi Everyone, There is a method in vtkButterflySubdivisionFilter.cxx , void vtkButterflySubdivisionFilter::GenerateLoopStencil(vtkIdType p1, vtkIdType p2, vtkPolyData *polys, vtkIdList *stencilIds,float *weights)? In this method there is a array int Shift[255]. Sometimes, when execution this array is acessed beyond its bounds and I get a runtime error saying "Stack around the variable Shift corrupted". The problem is the subscript goes beyond 255. The variable "processed" keeps incrementing even greater than 255. Somebody please tell me what should be done. Thank you, David Michell From jsnews at 126.com Fri Aug 6 03:00:19 2004 From: jsnews at 126.com (=?gb2312?B?anNuZXdz?=) Date: Fri, 6 Aug 2004 15:00:19 +0800 (CST) Subject: [vtkusers] greeting Message-ID: <41132C83.000067.05111@m57.126.com> HI vtkusers: I am a newcomer to vtk ,i meet a problem to view a 3D raw file.The file is write by following for(int i =0;i<256;i++) for(int j= 0;j<256;j++) for(int k = 0;k<256;k++) { //the color of every points , r,g,b are the red ,green,blue range (0,255) r; g; b; } that is all ,I do not know how to view or rend it ,Who can help me ?give me some explain or example? I search the mail list ,yet not know how to do. Thanks! a affliction guy ----------------------------------------------------------- ???http://www.126.com??260M????????! ???????????????, ????????! From I.deBoer at polytec.de Fri Aug 6 03:29:52 2004 From: I.deBoer at polytec.de (de Boer Ingo) Date: Fri, 6 Aug 2004 09:29:52 +0200 Subject: [vtkusers] MFC MDI Examples Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD90144FECB@02polywbr.waldbronn.polytec.de> Hi, I submitted some new samples to the bug list. But it is not in the CVS. http://www.vtk.org/Bug/bug.php?op=show&bugid=649&pos=0 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 i_matis at yahoo.de Fri Aug 6 03:59:04 2004 From: i_matis at yahoo.de (Istvan Matis) Date: Fri, 6 Aug 2004 10:59:04 +0300 Subject: [vtkusers] vtkImagePlaneWidget->GetResliceOutput () Problems!! Message-ID: <000e01c47b8b$6b2146b0$0b00a8c0@istvan> Hello, I have problems when getting the reslice output of 3 orthogonal IPWs in a volume. When I visualize the first volume with dimensions 256x256x30, the outputs are good. Then I visualize a volume with dimensions 512x512x30 and on the reslice outputs I see only one quarter of the image, sometimes only one tenth of the image it should be. Try it in the files: vtk/hybrid/testing/cxx/ImagePlaneWidget.cxx to rotate the axial (horizontal) plane with 90 degrees to be in a vertical direction, and you can see that the resclice output on right is only half of what it should be, it is not what you can see on the IPW in the volume (left). I want to see in the reslice output exactly what I see in the IPW in the volume, that is not only a part of it, but the whole image (and also not a bigger image than in the IPW). How can this be fixed? Thanks in advance! Below is a part of my code: for (int i=0;i<3;i++) //3=nrPlanes X Y Z { vImagePlaneWidget[i]->TextureInterpolateOn(); vImagePlaneWidget[i]->GetPlaneProperty()->SetColor(1,0,0); vImagePlaneWidget[i]->GetPlaneProperty()->SetOpacity(0.0); vImagePlaneWidget[i]->GetMarginProperty()->SetOpacity(0.0); vImagePlaneWidget[i]->SetTexturePlaneProperty(aProperty); vImagePlaneWidget[i]->SetResliceInterpolateToCubic(); vImagePlaneWidget[i]->SetInput(v16->GetOutput()); vImagePlaneWidget[i]->SetLookupTable(aWindowLevelLookupTable); vImagePlaneWidget[i]->UserControlledLookupTableOn(); vImagePlaneWidget[i]->DisplayTextOn(); if (m_bViewImagePlaneWidget) { vImagePlaneWidget[i]->InteractionOn(); }else { //vImagePlaneWidget[i]->Off(); vImagePlaneWidget[i]->InteractionOff(); } vImagePlaneWidget[i]->UpdatePlacement(); //reslice output size is not refreshed! } vImagePlaneWidget[0]->SetPlaneOrientationToXAxes(); vImagePlaneWidget[1]->SetPlaneOrientationToYAxes(); vImagePlaneWidget[2]->SetPlaneOrientationToZAxes(); for (i=0;i<3;i++) vImagePlaneWidget[i]->SetSlicePosition(orig[i]); -------------- next part -------------- An HTML attachment was scrubbed... URL: From m-valerio at onu.edu Fri Aug 6 08:21:18 2004 From: m-valerio at onu.edu (Matt Valerio) Date: Fri, 06 Aug 2004 08:21:18 -0400 Subject: [vtkusers] Compiling VTK in Cygwin with -mno-cygwin Message-ID: <411377BE.4030001@onu.edu> Hello all, I'm trying to get a mingw32 version of VTK compiled in Cygwin using the -wno-cygwin option. I can get both static and shared library files from the VTK-4.2-LatestRelease sources under normal Cygwin operations, but when I add the -wno-cygwin option to get mingw32 libraries, the build breaks. In ccmake I've changed the following options: BUILD_SHARED_LIBS=ON CMAKE_CXX_FLAGS=-mno-cygwin CMAKE_C_FLAGS=-mno-cygwin CMAKE_SHARED_LINKER_FLAGS=-mno-cygwin CMAKE_USE_PTHREADS=OFF CMAKE_USE_WIN32_THREADS=ON Any suggestions? If I turn off pthread usage and turn on win32 threads, should I still keep CMAKE_THREAD_LIBS=-lpthread? After I type make, it gets partway through the build and then gives me this, along with a lot of other errors: Building object file builds/unix/ftsystem.o... /home/cavale/VTK/Utilities/freetype/builds/unix/ftsystem.c:33:22: sys/mman.h: No such file or directory Any help would be greatly appreciated! Matt From manimag at hotmail.com Fri Aug 6 09:07:18 2004 From: manimag at hotmail.com (Emmanuel Guillot) Date: Fri, 06 Aug 2004 15:07:18 +0200 Subject: [vtkusers] Contribution on PLOT3DReader Message-ID: Hello, I have done some improvements to the vtkPLOT3DReader class and would like to contribute them. The improvements that I have made include the reading of the function file in addition to or instead of the Q file, the detection of the files properties (binary, formatted, multigrid, little/big endian...). I was constrained to modify some attributes from the class because of the properties that have been created for each of the three files. (ascii xyz file with binary Q file now works). So the backward compatibility is not ensured. Nevertheless, I would like to contribute this class but I don't know where to proceed. Emmanuel GUILLOT _________________________________________________________________ Trouvez l'?me soeur sur MSN Rencontres http://g.msn.fr/FR1000/9551 From mccdo at iastate.edu Fri Aug 6 09:10:52 2004 From: mccdo at iastate.edu (Doug McCorkle) Date: Fri, 6 Aug 2004 08:10:52 -0500 Subject: [vtkusers] vtkConfigure.h update to strstream header Message-ID: <000701c47bb6$ccdb1270$67c2ba81@ice1> Hello, I was wondering if in the near future the strstream header is going to be updated to the sstream header? It seems that the strstream header is an older header. Doug From billlist at nycap.rr.com Fri Aug 6 09:23:23 2004 From: billlist at nycap.rr.com (William A. Hoffman) Date: Fri, 06 Aug 2004 09:23:23 -0400 Subject: [vtkusers] Compiling VTK in Cygwin with -mno-cygwin In-Reply-To: <411377BE.4030001@onu.edu> References: <411377BE.4030001@onu.edu> Message-ID: <6.1.1.1.2.20040806092045.07a5c5e8@pop.nycap.rr.com> The problem is that cmake is reporting cygwin unix as the build environment. One thing you could try is to run the WINDOWS CMakeSetup and put the cygwin compilers in your PATH when you run it. Then select Unix Makefiles as the generator. Then add the -mno-cygwin flags. Then it would be closer to the mingw compiler, and stuff should work. -Bill At 08:21 AM 8/6/2004, Matt Valerio wrote: >Hello all, > >I'm trying to get a mingw32 version of VTK compiled in Cygwin using the -wno-cygwin option. I can get both static and shared library files from the VTK-4.2-LatestRelease sources under normal Cygwin operations, but when I add the -wno-cygwin option to get mingw32 libraries, the build breaks. > >In ccmake I've changed the following options: >BUILD_SHARED_LIBS=ON >CMAKE_CXX_FLAGS=-mno-cygwin >CMAKE_C_FLAGS=-mno-cygwin >CMAKE_SHARED_LINKER_FLAGS=-mno-cygwin >CMAKE_USE_PTHREADS=OFF >CMAKE_USE_WIN32_THREADS=ON > >Any suggestions? If I turn off pthread usage and turn on win32 threads, should I still keep CMAKE_THREAD_LIBS=-lpthread? > >After I type make, it gets partway through the build and then gives me this, along with a lot of other errors: >Building object file builds/unix/ftsystem.o... >/home/cavale/VTK/Utilities/freetype/builds/unix/ftsystem.c:33:22: sys/mman.h: No such file or directory > >Any help would be greatly appreciated! >Matt > > >_______________________________________________ >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 I.deBoer at polytec.de Fri Aug 6 09:29:52 2004 From: I.deBoer at polytec.de (de Boer Ingo) Date: Fri, 6 Aug 2004 15:29:52 +0200 Subject: [vtkusers] vtkAssembly bug or problem ?! Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD90144FEE4@02polywbr.waldbronn.polytec.de> Hi, I just discovered the world of vtkAssembly and I ran over some problems. I create an actor and disable the visibility. I add it to the assembly and enable the assembly. But the actor is still not visible. pvtkActor->VisibilityOff(); pvtkAssembly->AddPart(pvtkActorZeroGrid); pvtkAssembly->VisibilityOn(); I have to enable the visibility of the actor to make this work. But that is not the intention of the assembly, right ?! The assembly should act on all parts, right ? Any comments on this one ? Btw. I have the same trouble with PickableOn/Off... I am using 4.4.2 release code. 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 Fri Aug 6 10:54:18 2004 From: malcolm at geovision.co.za (Malcolm Drummond) Date: Fri, 6 Aug 2004 16:54:18 +0200 Subject: [vtkusers] vtkAssembly bug or problem ?! References: <1484AEC8AB498A4EB64D4A8137D23FD90144FEE4@02polywbr.waldbronn.polytec.de> Message-ID: <001401c47bc5$57298890$adf4fea9@bart> Hi I like the way it works right now - ie. visible ON enables the visibility as set individually for each part, OFF makes the whole assembly invisible. It seems logical to me, how else would we be able to control visibility of parts? Please, please don't change it, I have lots of code that depends on this behaviour ;) Malcolm ----- Original Message ----- From: "de Boer Ingo" To: Sent: Friday, August 06, 2004 3:29 PM Subject: [vtkusers] vtkAssembly bug or problem ?! Hi, I just discovered the world of vtkAssembly and I ran over some problems. I create an actor and disable the visibility. I add it to the assembly and enable the assembly. But the actor is still not visible. pvtkActor->VisibilityOff(); pvtkAssembly->AddPart(pvtkActorZeroGrid); pvtkAssembly->VisibilityOn(); I have to enable the visibility of the actor to make this work. But that is not the intention of the assembly, right ?! The assembly should act on all parts, right ? Any comments on this one ? Btw. I have the same trouble with PickableOn/Off... I am using 4.4.2 release code. 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: Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers From isaacgerg at psu.edu Fri Aug 6 11:03:51 2004 From: isaacgerg at psu.edu (Isaac Gerg) Date: Fri, 6 Aug 2004 11:03:51 -0400 Subject: [vtkusers] Problem with In-Reply-To: <1484AEC8AB498A4EB64D4A8137D23FD90144FEE4@02polywbr.waldbronn.polytec.de> Message-ID: <002d01c47bc6$9587c2e0$aae01cac@arl.psu.edu> -- Information Fusion Division Image Processing / GIS Penn State Applied Research Laboratory http://www.personal.psu.edu/idg101/ Hi all, I am attempting to render a volume created from grayscale bitmap images. I have created 5 images of the attached file number 1.bmp through 5.bmp. I use the code below to attempt to display them but get wacky results. The image is not centered correctly, and none of the coloring or opacity seems to work Correctly. Any help deeply appreciated. Best Regards, Isaac Gerg // Create the standard renderer, render window and interactor vtkRenderer* ren = vtkRenderer::New(); vtkRenderWindow* renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); vtkBMPReader* reader = vtkBMPReader::New(); reader->SetFilePrefix ("C:\\USData\\3d\\rgb\\"); reader->SetFilePattern("%s\\%d.bmp"); reader->SetDataExtent(0, 0, 0, 0, 1, 5); vtkPiecewiseFunction* opacityTransferFunction = vtkPiecewiseFunction::New(); opacityTransferFunction->AddPoint(60, 0.0); opacityTransferFunction->AddPoint(61, 1.0); opacityTransferFunction->AddPoint(70, 1.0); opacityTransferFunction->AddPoint(71, 0.0); opacityTransferFunction->AddPoint(250, 0.0); opacityTransferFunction->AddPoint(251, 0.2); vtkColorTransferFunction* colorTransferFunction = vtkColorTransferFunction::New(); colorTransferFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(60.0, 0.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(61.0, 1.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(70.0, 1.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(71.0, 0.0, 0.0, 0.0); // The property describes how the data will look vtkVolumeProperty* volumeProperty = vtkVolumeProperty::New(); volumeProperty->SetColor(colorTransferFunction); volumeProperty->SetScalarOpacity(opacityTransferFunction); vtkOutlineFilter *outlineData = vtkOutlineFilter::New(); outlineData->SetInput ( (vtkDataSet *) reader->GetOutput() ); vtkPolyDataMapper *mapOutline = vtkPolyDataMapper::New(); mapOutline->SetInput(outlineData->GetOutput()); // Draws bounding box. vtkActor *outline = vtkActor::New(); outline->SetMapper(mapOutline); outline->GetProperty()->SetColor(0,0,0); vtkVolumeRayCastCompositeFunction* compositeFunction = vtkVolumeRayCastCompositeFunction::New(); vtkVolumeRayCastMapper* volumeMapper = vtkVolumeRayCastMapper::New(); volumeMapper->SetVolumeRayCastFunction(compositeFunction); volumeMapper->SetInput(reader->GetOutput()); // The volume holds the mapper and the property and // can be used to position/orient the volume vtkVolume* volume = vtkVolume::New(); volume->SetMapper(volumeMapper); volume->SetProperty(volumeProperty); //ren->AddProp(volume); ren->AddVolume(volume); ren->AddActor(outline); ren->SetBackground(1, 1, 1); renWin->SetSize(640, 480); renWin->Render(); iren->Initialize(); renWin->Render(); iren->Start(); -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.ZIP Type: application/octet-stream Size: 1990 bytes Desc: not available URL: From dean.inglis at camris.ca Fri Aug 6 13:13:57 2004 From: dean.inglis at camris.ca (dean.inglis at camris.ca) Date: Fri, 6 Aug 2004 13:13:57 -0400 Subject: [vtkusers] vtkImagePlaneWidget->GetResliceOutput () Problems!! Message-ID: <20040806171357.ILPL5106.tomts14-srv.bellnexxia.net@mxmta.bellnexxia.net> Hi Istvan, it's not that anything is really "broken". You have to update and change things in the rendering pipeline: vtkImagePlaneWidget -> vtkImageMapToColors -> vtkImageActor If you were to modify /Hybrid/Testing/Cxx/ImagePlaneWidget.cxx: add the following callback class vtkIPWCallback : public vtkCommand { public: static vtkIPWCallback *New() { return new vtkIPWCallback; } virtual void Execute(vtkObject *caller, unsigned long, void*) { vtkImagePlaneWidget *widget = reinterpret_cast(caller); if(!widget) { return; } ColorMap->UpdateWholeExtent(); ImageActor->SetDisplayExtent(ImageActor->GetInput()->GetWholeExtent()); Renderer->ResetCamera(); Renderer->Render(); } vtkIPWCallback():Renderer(0),ImageActor(0),ColorMap(0){} vtkImageMapToColors* ColorMap; vtkImageActor* ImageActor; vtkRenderer *Renderer; }; and set it up as follows: vtkIPWCallback* cbk = vtkIPWCallback::New(); cbk->Renderer = ren2; cbk->ImageActor = imageActor; cbk->ColorMap = colorMap; planeWidgetZ->AddObserver(vtkCommand::InteractionEvent,cbk); cbk->Delete(); It isn't pretty, but it's a start and it works. Dean From tfogal at apollo.sr.unh.edu Fri Aug 6 13:49:39 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Fri, 06 Aug 2004 13:49:39 -0400 Subject: [vtkusers] vtkLookupTable not working for spheres? Message-ID: <200408061749.i76HndYK026289@apollo.sr.unh.edu> I'm trying to color a sphere a solid green without any success. I just build a simple 2-element table with the color I want it to be: Table->SetNumberOfTableValues(2); Table->SetTableValue(0, CL_EARTH_R, CL_EARTH_G, CL_EARTH_B); Table->SetTableValue(1, CL_EARTH_R, CL_EARTH_G, CL_EARTH_B); Table->Build(); Map->SetInput(Sphere->GetOutput()); Map->SetLookupTable(Table); where 'Table' is a vtkLookupTable*, 'Map' is a vtkPolyDataMapper, and 'Sphere' is a vtkSphereSource*. The sphere just stays white, as if I hadn't specified a lookup table at all. The most confusing part is that I used the same setup to color stream lines, and that is working fine. Any hints / glaringly obvious problems with the above setup? Thanks, -tom From derong at lycos.co.uk Fri Aug 6 14:15:44 2004 From: derong at lycos.co.uk (derong) Date: Fri, 6 Aug 2004 11:15:44 -0700 Subject: [vtkusers] MFC MDI Examples In-Reply-To: <1484AEC8AB498A4EB64D4A8137D23FD90144FECB@02polywbr.waldbronn.polytec.de> Message-ID: <20040806181547.22B2ACF901@lmcodec04.st1.spray.net> Thank u very much! I have tried the new codes against VTK4.21 and VC++6.0. vtkMDI and vtkSDI will be crash after I exit the appllication. I guess it uses SetParentId and SetWindowId instead of just using SetParentId in the old version. Maybe VTK4.4 has fixed it. I feel some confusion with SetWindowId and SetParentId. Sholud we use them both or just use SetParentId? What's difference between them? The other issue is about vtkDLg. The vtkRenderWindow can't get keyboard input anyway. (such as I try to press "W" to change to wireframe, it doesn't work). I guess it can't get focus by mouse picking hint. Can we find a simple way to add focus hint by mouse? (changing interact style is a big deal) For mouse double click issue, I think it just uses CEdit as the control to hold vtkRenderWindow. Can CEdit get double click event? Maybe we can define our custom control from scratch to hold vtkRenderWindow and enable double click in the windows style. Thanks Dennis -----Original Message----- From: de Boer Ingo [mailto:I.deBoer at polytec.de] Sent: Thursday, August 05, 2004 11:30 PM To: derong; vtkusers at vtk.org Subject: RE: [vtkusers] MFC MDI Examples Hi, I submitted some new samples to the bug list. But it is not in the CVS. http://www.vtk.org/Bug/bug.php?op=show&bugid=649&pos=0 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 isaacgerg at psu.edu Fri Aug 6 16:06:07 2004 From: isaacgerg at psu.edu (Isaac Gerg) Date: Fri, 6 Aug 2004 16:06:07 -0400 Subject: [vtkusers] Problem with In-Reply-To: <002d01c47bc6$9587c2e0$aae01cac@arl.psu.edu> Message-ID: <000501c47bf0$cf83def0$aae01cac@arl.psu.edu> I solved my own problem. The BMP files are 8-bit grayscale. Thus, Allow8bitBMPOn() must be invoked so that the data set is not as the default BMP type, 24bit. Thanks, Isaac Gerg -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Isaac Gerg Sent: Friday, August 06, 2004 11:04 AM To: vtkusers at vtk.org Subject: [vtkusers] Problem with -- Information Fusion Division Image Processing / GIS Penn State Applied Research Laboratory http://www.personal.psu.edu/idg101/ Hi all, I am attempting to render a volume created from grayscale bitmap images. I have created 5 images of the attached file number 1.bmp through 5.bmp. I use the code below to attempt to display them but get wacky results. The image is not centered correctly, and none of the coloring or opacity seems to work Correctly. Any help deeply appreciated. Best Regards, Isaac Gerg // Create the standard renderer, render window and interactor vtkRenderer* ren = vtkRenderer::New(); vtkRenderWindow* renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); vtkBMPReader* reader = vtkBMPReader::New(); reader->SetFilePrefix ("C:\\USData\\3d\\rgb\\"); reader->SetFilePattern("%s\\%d.bmp"); reader->SetDataExtent(0, 0, 0, 0, 1, 5); vtkPiecewiseFunction* opacityTransferFunction = vtkPiecewiseFunction::New(); opacityTransferFunction->AddPoint(60, 0.0); opacityTransferFunction->AddPoint(61, 1.0); opacityTransferFunction->AddPoint(70, 1.0); opacityTransferFunction->AddPoint(71, 0.0); opacityTransferFunction->AddPoint(250, 0.0); opacityTransferFunction->AddPoint(251, 0.2); vtkColorTransferFunction* colorTransferFunction = vtkColorTransferFunction::New(); colorTransferFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(60.0, 0.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(61.0, 1.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(70.0, 1.0, 0.0, 0.0); colorTransferFunction->AddRGBPoint(71.0, 0.0, 0.0, 0.0); // The property describes how the data will look vtkVolumeProperty* volumeProperty = vtkVolumeProperty::New(); volumeProperty->SetColor(colorTransferFunction); volumeProperty->SetScalarOpacity(opacityTransferFunction); vtkOutlineFilter *outlineData = vtkOutlineFilter::New(); outlineData->SetInput ( (vtkDataSet *) reader->GetOutput() ); vtkPolyDataMapper *mapOutline = vtkPolyDataMapper::New(); mapOutline->SetInput(outlineData->GetOutput()); // Draws bounding box. vtkActor *outline = vtkActor::New(); outline->SetMapper(mapOutline); outline->GetProperty()->SetColor(0,0,0); vtkVolumeRayCastCompositeFunction* compositeFunction = vtkVolumeRayCastCompositeFunction::New(); vtkVolumeRayCastMapper* volumeMapper = vtkVolumeRayCastMapper::New(); volumeMapper->SetVolumeRayCastFunction(compositeFunction); volumeMapper->SetInput(reader->GetOutput()); // The volume holds the mapper and the property and // can be used to position/orient the volume vtkVolume* volume = vtkVolume::New(); volume->SetMapper(volumeMapper); volume->SetProperty(volumeProperty); //ren->AddProp(volume); ren->AddVolume(volume); ren->AddActor(outline); ren->SetBackground(1, 1, 1); renWin->SetSize(640, 480); renWin->Render(); iren->Initialize(); renWin->Render(); iren->Start(); From mmalater at nycap.rr.com Sat Aug 7 14:10:21 2004 From: mmalater at nycap.rr.com (Mathieu Malaterre) Date: Sat, 07 Aug 2004 14:10:21 -0400 Subject: [vtkusers] Contribution on PLOT3DReader In-Reply-To: References: Message-ID: <41151B0D.1050705@nycap.rr.com> Emmanuel Guillot wrote: > Hello, > I have done some improvements to the vtkPLOT3DReader class and would > like to contribute them. The improvements that I have made include the > reading of the function file in addition to or instead of the Q file, > the detection of the files properties (binary, formatted, multigrid, > little/big endian...). > I was constrained to modify some attributes from the class because of > the properties that have been created for each of the three files. > (ascii xyz file with binary Q file now works). > So the backward compatibility is not ensured. > Nevertheless, I would like to contribute this class but I don't know > where to proceed. Emmanuel, Please register to our bugtracker: http://www.vtk.org/Bug Then create a feature request. After the bug is entered, you can edit it to add attachement. In your case, either attach a patch (cvs -z3 dif -u), or if you don't know how to use cvs just attach the whole class. Then assign the bug to me. Thanks Mathieu From naukudkar at yahoo.com Sat Aug 7 22:10:16 2004 From: naukudkar at yahoo.com (ROhan naukudkar) Date: Sat, 7 Aug 2004 19:10:16 -0700 (PDT) Subject: [vtkusers] Extremely Urgent ( VTK Analyze file format reader writer needed for JAVA) Message-ID: <20040808021016.84004.qmail@web40711.mail.yahoo.com> Hello, If anyone has the reader and the writer for the Analyze file format for the VTK in JAVA please send it to me. If you know the link where i can get the classes for it for JAVA please give me the link... Rohan --------------------------------- Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. -------------- next part -------------- An HTML attachment was scrubbed... URL: From prabhu at aero.iitm.ernet.in Sun Aug 8 10:24:00 2004 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Sun, 8 Aug 2004 10:24:00 -0400 Subject: [vtkusers] import error in cone.py In-Reply-To: <20040804085038.11440.qmail@web53410.mail.yahoo.com> References: <16655.50058.753785.338659@enthought.hathway.com> <20040804085038.11440.qmail@web53410.mail.yahoo.com> Message-ID: <16662.14208.941564.91506@enthought.hathway.com> >>>>> "SD" == soumen dey writes: SD> hi!!!! thnx for the reply. Please keep messages on the mailing list so others can help and the answers are archived. SD> Ok...i have build python-2.3.4 again now it can import os. I SD> have alrady executed python_d SD> c:\vtkbin\wrapping\python\setup.py.in install. I am not sure why you are using python_d and not python. Hmm, perhaps the setup.py does not work with python_d, I am not sure. What did the setup.py install do? Where did it put the DLL's and binaries? [...] SD> I have set SD> PYTHONPATH=c:\vtkbin\bin\debug;c:\vtkbin\wrapping\python and SD> PATH contains c:\vtkbin\bin\debug where c:\vtkbin\bin\debug I am not sure but are paths under Win2k/XP case sensitive or not? SD> contains all the dlls. Infact I have also copied all the dlls SD> and contents of c:\vtk\wrapping\python into c:\python\VTK and SD> created afile vtk.pth in c:\python which has the text "vtk". That won't work at all. I think the libraries should go into c:\python\lib\site-packages\VTK and vtk.pth should be inside the site-packages directory. Hope this helps. cheers, prabhu From yxliu at fudan.edu.cn Sun Aug 8 22:13:02 2004 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Mon, 09 Aug 2004 10:13:02 +0800 Subject: [vtkusers] about setup the project without the cmakesetup Message-ID: <000901c47db6$661a8370$1f64a8c0@YXLIU> Hi, I config the project setting by two methods(windowxp, MSVC6.0, VTK4.2). one is use the cmakesetup and it work fine. the other is : do not use the cmakesetup to setup the include and link path. I copy the additional include path(configed by the first method) and the addtitional link path to my new project. However, always have link error: msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::ios_base::Init::Init(void)" (??0Init at ios_base@std@@QAE at XZ) already defined in libcpd.lib(iostream.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::ios_base::Init::~Init(void)" (??1Init at ios_base@std@@QAE at XZ) already defined in libcpd.lib(iostream.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::_Winit::_Winit(void)" (??0_Winit at std@@QAE at XZ) already defined in libcpd.lib(wiostrea.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall std::_Winit::~_Winit(void)" (??1_Winit at std@@QAE at XZ) already defined in libcpd.lib(wiostrea.obj) msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class std::basic_ostream > & __thiscall std::basic_ostream >::operator<<(float)" (??6?$basic_ostream at DU?$char_traits at D@std@@@s td@@QAEAAV01 at M@Z) already defined in genDelaunay3DMeshActor.obj ... Anybody help me? Regards, Yixun Liu -------------- next part -------------- An HTML attachment was scrubbed... URL: From yhq at sjtu.edu.cn Mon Aug 9 01:06:28 2004 From: yhq at sjtu.edu.cn (=?gb2312?B?0e664g==?=) Date: Mon, 9 Aug 2004 13:06:28 +0800 Subject: [vtkusers] =?gb2312?b?tPC4tDogdnRrdXNlcnMgRGlnZXN0LCBWb2wgNCwg?= =?gb2312?b?SXNzdWUgMjE=?= In-Reply-To: <20040808160008.44DBD15AC9@public.kitware.com> Message-ID: <20040809050700.CB33F7B3526@mx1.sjtu.edu.cn> Hi, I use the scalar data(vtkImageData) as input for volumemapper,and now I want to change the scalar data(vtkImageData) into the rgba and then as the volumemapper's input ,can anyone tell me how to do this and whether my way is right? From Marek.Wasilewski at dnv.com Mon Aug 9 02:34:44 2004 From: Marek.Wasilewski at dnv.com (Marek.Wasilewski at dnv.com) Date: Mon, 9 Aug 2004 07:34:44 +0100 Subject: [vtkusers] VTK graphical interface idea Message-ID: Hi Matt Just to [maybe] complete the graphical pipeline editor software for VTK list, there is also www.data-visualization-software.com. Marek -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Matt Valerio Sent: 30 July 2004 15:47 To: vtkusers Subject: [vtkusers] VTK graphical interface idea Hello VTK Users, I've just recently started learning VTK and am _very_ impressed with its capabilities. I see how the classes can be assembled into a graphical pipeline that go from sources to data to actors to mappers to renderers to renderwindows. So, I have an idea. Take it for what it's worth, discuss it, ignore it, I don't care. Just throwing it out on the table for general consumption. How about a "Visual VTK" graphical programming interface? I've attached a picture of something I whipped up from the Examples/Tutorial/Step1/Cxx/Cone.cxx example (with a vtkRenderWindowInteractor tacked on.) The program could perform all type checking for the interconnecting arrows so that you don't do something silly like connect the output of the vtkConeSource directly to the vtkRenderWindowInteractor. Benefits of such a program: -Would make constructing the VTK pipeline a snap -Would reduce development time for simple applications -Would decrease the learning curve for VTK and increase the user base (similar to LabVIEW, which made instrumentation control programming easily more accessible to scientists and researchers without any coding experience) Possible feature ideas: -The program could load XML-based data about the member functions of each class. This XML data could be generated directly from the documentation. -The classes could be grouped into menus. To use a class just drag it onto the working area to create a block. The block would show the type of class and let you give it a name. -To add a member function to a block, just right-click and select one from a context menu. -Program would perform all type checking between blocks. -Program would output a .cpp code snippet. Then that code snipped would only need slight modifications to turn into a fully-functioning application -Program could show a preview window to show the output. -Program would check to make sure all required member functions have been accessed correctly. For example, the SetMapper() member function of a vtkActor would be added to the block as soon as it is dragged out of the menu. Again, this is just an idea. I taught myself how to use VTK over the last 2 weeks in my spare time, and am only a novice (so far). I don't know a whole lot about GUI programming (I'm trying to learn wxWindows too), otherwise I would start writing some code for such an application. If someone wants to take the idea and run with it, more power to you! -Matt ************************************************************** Neither the confidentiality nor the integrity of this message can be guaranteed following transmission on the Internet. All messages sent to a DNV email addressee are swept by Sybari Antigen for the presence of computer viruses. DNV acknowledges that SPAM 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 the Internet ************************************************************** From rubke at cs.huji.ac.il Mon Aug 9 05:49:56 2004 From: rubke at cs.huji.ac.il (Ruby Shamir) Date: Mon, 9 Aug 2004 11:49:56 +0200 Subject: [vtkusers] vtk 2D with MFC. Message-ID: <000001c47df6$3a587900$2d284184@cas05> Hello, We tried to display 2D image in a picture element with MFC. The image displayed fine when we did not changed the window's ID, what is the problem? Here is the code: bmpReader = vtkBMPReader::New(); bmpReader->SetFileName("D:\\vtkExp\\femur1.bmp"); vtkImageActor* act = vtkImageActor::New(); act->SetInput(bmpReader->GetOutput()); vtkRenderer* renderer = vtkRenderer::New(); renderer->AddActor(act); CWnd* wind = GetDlgItem(IDC_PIC); // this is the inner element which the image will display in vtkWin32OpenGLRenderWindow* renwin = vtkWin32OpenGLRenderWindow::New(); renwin->SetWindowId(wind->m_hWnd); // when deleting this line it displays good but in other window. renwin->AddRenderer(renderer); renwin->Render(); Best regards, Ruby From vincent.daanen at imag.fr Mon Aug 9 05:56:34 2004 From: vincent.daanen at imag.fr (Vincent Daanen) Date: Mon, 09 Aug 2004 11:56:34 +0200 Subject: [vtkusers] VtkImageClip : How to get it work ? Message-ID: <41174A52.40206@imag.fr> Hi all, I try to clip images interactivelly with a GUI (4 sliders). so : I get the extent limits I set the vtkImageClip SetOutputWholeExtent method parameters and I call the Update method a popup window raise with this error message : Update extent does not lie within whole extent a Google Search points out a threads in the vtkuser mailing list but no answers ! So why does vtkImageClip raise this error ? and what should I do to use it ? thanks Vince From Marek.Wasilewski at dnv.com Mon Aug 9 09:10:58 2004 From: Marek.Wasilewski at dnv.com (Marek.Wasilewski at dnv.com) Date: Mon, 9 Aug 2004 14:10:58 +0100 Subject: [vtkusers] vtk 2D with MFC. Message-ID: Hi Ruby Please find some code below - I think it does what you need. You'll need to free the allocated memory, most likely in ~CRubyDlg. I used a picture control of type "Frame" for IDC_PIC. Best regards, Marek CRubyDlg::CRubyDlg(CWnd* pParent /*=NULL*/) : CDialog(CRubyDlg::IDD, pParent), m_pvtkBMPReader(NULL), m_pvtkImageActor(NULL), m_pvtkRenderer(NULL), m_pvtkWin32OpenGLRenderWindow(NULL) { m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } In OnitDialog: vtkBMPReader* m_pvtkBMPReader = vtkBMPReader::New(); vtkImageActor* m_pvtkImageActor = vtkImageActor::New(); vtkRenderer* m_pvtkRenderer = vtkRenderer::New(); vtkWin32OpenGLRenderWindow* m_pvtkWin32OpenGLRenderWindow = vtkWin32OpenGLRenderWindow::New(); m_pvtkBMPReader = vtkBMPReader::New(); m_pvtkBMPReader->SetFileName("C:\\VTK\\VTKData-release-4-2\\Data\\masonr y.bmp"); m_pvtkBMPReader->Update(); m_pvtkImageActor->SetInput(m_pvtkBMPReader->GetOutput()); m_pvtkRenderer->AddActor(m_pvtkImageActor); CRect rect; CWnd* pWnd = GetDlgItem(IDC_PIC); pWnd->GetClientRect(&rect); m_pvtkWin32OpenGLRenderWindow->SetSize(rect.Width(), rect.Height()); m_pvtkWin32OpenGLRenderWindow->SetParentId(pWnd->m_hWnd); ::SetParent(m_pvtkWin32OpenGLRenderWindow->GetWindowId(), this->m_hWnd); m_pvtkWin32OpenGLRenderWindow->AddRenderer(m_pvtkRenderer); m_pvtkWin32OpenGLRenderWindow->Render(); -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Ruby Shamir Sent: 09 August 2004 10:50 To: vtkusers at vtk.org Subject: [vtkusers] vtk 2D with MFC. Hello, We tried to display 2D image in a picture element with MFC. The image displayed fine when we did not changed the window's ID, what is the problem? Here is the code: bmpReader = vtkBMPReader::New(); bmpReader->SetFileName("D:\\vtkExp\\femur1.bmp"); vtkImageActor* act = vtkImageActor::New(); act->SetInput(bmpReader->GetOutput()); vtkRenderer* renderer = vtkRenderer::New(); renderer->AddActor(act); CWnd* wind = GetDlgItem(IDC_PIC); // this is the inner element which the image will display in vtkWin32OpenGLRenderWindow* renwin = vtkWin32OpenGLRenderWindow::New(); renwin->SetWindowId(wind->m_hWnd); // when deleting this line it displays good but in other window. renwin->AddRenderer(renderer); renwin->Render(); Best regards, Ruby _______________________________________________ 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 ************************************************************** Neither the confidentiality nor the integrity of this message can be guaranteed following transmission on the Internet. All messages sent to a DNV email addressee are swept by Sybari Antigen for the presence of computer viruses. DNV acknowledges that SPAM 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 the Internet ************************************************************** From h.huisman at rad.umcn.nl Mon Aug 9 10:48:51 2004 From: h.huisman at rad.umcn.nl (Henkjan Huisman) Date: Mon, 09 Aug 2004 16:48:51 +0200 Subject: [vtkusers] PhD position medical imaging (Nijmegen, the Netherlands) Message-ID: <1092062930.18567.33.camel@rdhenkjan> Interested in a university hospital PhD position requiring ITK and VTK expertise? Please take a look at http://oase.uci.kun.nl/~henkjan/mrcad/ We have several projects using VTK and ITK that are in daily 'experimental' use in our university hospital. The direct feedback from the clinic is an essential ingredient in our research approach. H.J. Huisman, PhD, MSEE E : h.huisman at rad.umcn.nl Biomedical Physicist T : +31 24 3617536/14545 Dept. Radiology F : +31 24 3540866 UMC St. Radboud S : 430 Radiologie/POBox 9101/ 6500HB Nijmegen/Netherlands| -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rule-blue-right.png Type: image/png Size: 207 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: transparent.png Type: image/png Size: 144 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rule-blue-center.png Type: image/png Size: 160 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rule-blue-left.png Type: image/png Size: 207 bytes Desc: not available URL: From Jonathan.Bailleul at greyc.ismra.fr Mon Aug 9 11:08:34 2004 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Mon, 09 Aug 2004 17:08:34 +0200 Subject: [vtkusers] Extremely Urgent ( VTK Analyze file format reader writerneeded for JAVA) References: <20040808021016.84004.qmail@web40711.mail.yahoo.com> Message-ID: <41179372.D3743E2D@greyc.ismra.fr> ROhan naukudkar wrote: > > Hello, > If anyone has the reader and the writer for the Analyze file > format for the VTK in JAVA please send it to me. If you know the link > where i can get the classes for it for JAVA please give me the link... > > Rohan ITK features AIR support, though the native code is surely C++. Otherwise, I have C++ code of my own (upon AIR original C code), but nothing in native java. -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From awheat at imaging.robarts.ca Mon Aug 9 11:14:40 2004 From: awheat at imaging.robarts.ca (Andrew Wheatley) Date: Mon, 9 Aug 2004 11:14:40 -0400 (EDT) Subject: [vtkusers] interpolating vtktexture Message-ID: Hello: I have a vtkTexture. The input, of course, is a vtkImageData. In my case, the vtkImageData is 2D. A vtkTexture object has an option to SetInterpolation, which does a linear interpolation on the texture data. My question is: How can I get the interpolated data in the form of a vtkImageData? Regards, Andrew Wheatley From mhalle at bwh.harvard.edu Mon Aug 9 11:37:22 2004 From: mhalle at bwh.harvard.edu (Michael Halle) Date: Mon, 9 Aug 2004 11:37:22 -0400 Subject: [vtkusers] new stereo type "anaglyph" added to vtkRenderWindow Message-ID: <0161F150-EA1A-11D8-9C31-000A95C85CA2@bwh.harvard.edu> I've just added a new type of stereo rendering to vtk: anaglyph mode. Anaglyph is the formal name for using color to encode 3D left/right views. vtk has always had "red-blue" mode, which is a subset of anaglyphs, but the new anaglyph mode improves upon the existing (and still available) red-blue mode by including some object color and allowing the colors of the left/right views to be selected. By default, images rendered in anaglyph mode look much better than red-blue mode in both 2D and 3D. With anaglyph mode, you can retain at least some of the color of your original scene. There's a parameter called "AnaglyphColorSaturation" that controls how much of the original color is maintained in the output image: 0.0 contains none, 1.0 contains all. For most images, you can get by with including some color, but include too much and the image becomes difficult to view in 3D. The default is 0.65. Anaglyph mode also allows you to choose which color channels you want to use for stereo. By default, it uses red-cyan, which has become more popular than red-blue for on-line viewing because the images aren't strongly tinted. (The Mars rover pictures, for instance, are red-cyan). Red-cyan glasses are available widely (http://www.berezin.com/3d sells them in both paper and higher quality frames, and americanpaperoptics.com can do custom glasses in bulk). The stereo primary colors can be changed using the AnaglyphColorMask. This pair of values controls which input channels are output into which final image channels. Using this mechanism, you could use try red-blue or red-green (or even yellow-blue) instead of red-cyan. Not a highly-sought feature to be sure, but perhaps useful for some applications. I've checked in the changes to both VTK and VTK4 nightly releases. At some point, it might make sense to make the vtk default stereo mode be Anaglyph mode, since red-blue images just don't look all that good. Please send me any feedback you might have about this new change. Michael Halle mhalle @ bwh.harvard.edu From freiman at cs.huji.ac.il Mon Aug 9 12:00:09 2004 From: freiman at cs.huji.ac.il (Moti Freiman) Date: Mon, 09 Aug 2004 18:00:09 +0200 Subject: [vtkusers] vtk Hough Transform Message-ID: <41179F89.10400@cs.huji.ac.il> Hi! i tried to find some hough transform filter to find circles on image in vtk, someone know anything about. I'm intend to develop one by my own if there isn't such a filter at vtk. Moti From peng-cheng at uiowa.edu Mon Aug 9 13:04:26 2004 From: peng-cheng at uiowa.edu (Patrick (Peng) Cheng) Date: Mon, 9 Aug 2004 11:04:26 -0600 Subject: [vtkusers] vtk Hough Transform Message-ID: Hi Moti, You can try using ITK. it has HoughTransform2DCirclesImageFilter HoughTransform2DLinesImageFilter It's very easy to do all the job in ITK and then use a itkImageToVTKFilter to export image to VTK. Patrick --------------------------- Patrick (Peng) Cheng Biomedical Engineering University of Iowa Tel:(319) 400-7442 Email: peng-cheng at uiowa.edu ===========2004-08-09 10:00:09 You wrote in your letter:============== >Hi! > >i tried to find some hough transform filter to find circles on image in vtk, >someone know anything about. >I'm intend to develop one by my own if there isn't such a filter at vtk. > >Moti > >_______________________________________________ >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 mcoursolle at yahoo.ca Mon Aug 9 12:35:55 2004 From: mcoursolle at yahoo.ca (Mathieu Coursolle) Date: Mon, 9 Aug 2004 12:35:55 -0400 (EDT) Subject: [vtkusers] vtkTextActor alignment Message-ID: <20040809163555.18272.qmail@web60210.mail.yahoo.com> Hi, I have a vtkTextActor to display in a window. However, it must be align in the top-left corner of the window. I can set the position using the SetDisplayPosition method. However, the problem is that if I resize the window, the text is no longer visible is the window is smaller than the text position. Any idea and/or suggestions on how to align the text on the top-left corner? Thank you. Mathieu --------------------------------- Post your free ad now! Yahoo! Canada Personals -------------- next part -------------- An HTML attachment was scrubbed... URL: From mona at ncmir.ucsd.edu Mon Aug 9 13:09:46 2004 From: mona at ncmir.ucsd.edu (Mona Wong-Barnum) Date: Mon, 9 Aug 2004 10:09:46 -0700 (PDT) Subject: [vtkusers] Extremely Urgent ( VTK Analyze file format reader writer needed for JAVA) Message-ID: <200408091709.i79H9kfp008903@eggshell.ucsd.edu> Hi: Someone at my lab has written a Java Analyze file reader, you can see javadoc for it at http://ncmir.ucsd.edu:1520/doc/java/Analyze/. If you want it, please let me know and I'll check with my boss. cheers, Mona ================================================================== Mona Wong-Barnum National Center for Microscopy and Imaging Research University of California, San Diego http://ncmir.ucsd.edu/ "If you don't have time to do it right, will you have time to do it over?" -- unknown ================================================================== From tfogal at apollo.sr.unh.edu Mon Aug 9 14:41:10 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Mon, 09 Aug 2004 14:41:10 -0400 Subject: [vtkusers] tracing a single point Message-ID: <200408091841.i79IfAv7024027@apollo.sr.unh.edu> Hi all, I'd like to trace a single point through a vector field, and find out its location after a specified amount of time. It may sound like I want a stream line, but thats not exactly what I'm looking for. I have multiple vector fields affecting a dataset, and I would like to use one to trace streamlines, and another to affect the seed point of the stream lines. I'm not sure if vtkStreamTracer will do this for me. It seems like it might be conceivable to: activate the 'seed point moving' vector field set a short length of time for stream line termination trace a streamline beginning at "seed" "seed" = end of aforementioned stream line (somehow?) erase streamline activate vector field for 'stream line' tracing draw a stream line beginning at "seed" However I'm not sure I would be able to find the location of the endpoint for the stream line. 'Erasing' the streamline would probably entail destroying the renderer and creating a new one, meaning I would have to do this before all other drawing, but if someone has a better way or just doubts that approach I'd be glad to hear it. Finally, determining how long I should let the particle propagate through the vector field might be difficult, but I think this is a problem for me and not the VTK list =). Does anyone have any ideas or comments on how I might want to go about this? Thanks in advance for your advice! -tom From freiman at cs.huji.ac.il Mon Aug 9 14:44:30 2004 From: freiman at cs.huji.ac.il (Moti Freiman) Date: Mon, 09 Aug 2004 20:44:30 +0200 Subject: [vtkusers] vtk Hough Transform / itk with mfc In-Reply-To: References: Message-ID: <4117C60E.3050203@cs.huji.ac.il> Thank you! But in my computer (i686, win xp, visual studio .net 2003) i have many problems to run itk with mfc (i got exceptions on running). so if i have mfc project i can't use itk. if someone know how to configure the system to use itk with mfc, it will be great! moti Patrick (Peng) Cheng wrote: >Hi Moti, >You can try using ITK. >it has >HoughTransform2DCirclesImageFilter >HoughTransform2DLinesImageFilter >It's very easy to do all the job in ITK and then use a itkImageToVTKFilter to export image to VTK. >Patrick > >--------------------------- >Patrick (Peng) Cheng >Biomedical Engineering >University of Iowa >Tel:(319) 400-7442 >Email: peng-cheng at uiowa.edu > >===========2004-08-09 10:00:09 You wrote in your letter:============== > > > >>Hi! >> >>i tried to find some hough transform filter to find circles on image in vtk, >>someone know anything about. >>I'm intend to develop one by my own if there isn't such a filter at vtk. >> >>Moti >> >>_______________________________________________ >>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 eugene at salk.edu Mon Aug 9 16:59:28 2004 From: eugene at salk.edu (Eugene Kim) Date: Mon, 9 Aug 2004 13:59:28 -0700 (PDT) Subject: [vtkusers] Mac debugging Message-ID: <20040809135420.B68744@gauss.snl.salk.edu> Hi everyone, I've been putting some time in getting the mac build with java working, and i'm getting nowhere. At this point, I have a simple question: Does anyone know which classes call the objective-C files? That is, cocoaglview, cocoarenderwindow, etc... I ask this because references to these files from the vtkjavawt.h must be faulty in some way or another. Obviously, a non-java program will also call these files on the mac, and they work fine. I've tagged the constructors to confirm this, I just can't figure out where C++ or tcl/tk or whatever links itself with Cocoa. Anyone have any leads? Eugene Kim From yxliu at fudan.edu.cn Mon Aug 9 22:03:56 2004 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Tue, 10 Aug 2004 10:03:56 +0800 Subject: [vtkusers] about the run time lib of vtk(itk) Message-ID: <001201c47e7e$4b10d570$1f64a8c0@YXLIU> Hi, I need use two libs, one of them is VTK4.2. I build the VTK4.2 with the run time lib: Debug Multithread DLL. However, the other lib is build with the run time lib : Debug single thread. I can rebuild any one of them to make them have the same run time lib. However, if I only have the binary version of the two libs, namely, I can not rebuild them, how to config to make them use the same run time libs? Thank you in advances! Best regards, Yixun Liu -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.ibanez at kitware.com Mon Aug 9 23:05:17 2004 From: luis.ibanez at kitware.com (Luis Ibanez) Date: Mon, 09 Aug 2004 23:05:17 -0400 Subject: [vtkusers] about the run time lib of vtk(itk) In-Reply-To: <001201c47e7e$4b10d570$1f64a8c0@YXLIU> References: <001201c47e7e$4b10d570$1f64a8c0@YXLIU> Message-ID: <41183B6D.3030804@kitware.com> HI Yixun, If you have libraries A and B on MS-Windows and A is build for Debug Multithread DLL B is bulid for Debug Singlethread DLL You *cannot* use them together in an application. Note that you may *force* them to link by telling the linker to silence its warnings, but that will simply produce a dangerous executable that may crash at any time. (and of course, it will always choose the worst possible time :-/ ). You are lucky in this case, because one of the libraries (VTK) is open source and you can recompile it with the apropriate options. Isn't Open Source great ? :-) Regards, Luis ----------------- Yixun Liu wrote: > Hi, > > I need use two libs, one of them is VTK4.2. I build the VTK4.2 > with the run time lib: Debug Multithread DLL. However, the other lib is > build with the run time lib : Debug single thread. I can rebuild any > one of them to make them have the same run time lib. However, if I only > have the binary version of the two libs, namely, I can not rebuild them, > how to config to make them use the same run time libs? > > Thank you in advances! > > Best regards, > > Yixun Liu > > > ------------------------------------------------------------------------ > From liuzhiqiang_cnu at 163.com Mon Aug 9 23:29:20 2004 From: liuzhiqiang_cnu at 163.com (=?gb2312?B?bGl1emhpcWlhbmdfY251?=) Date: Tue, 10 Aug 2004 11:29:20 +0800 (CST) Subject: [vtkusers] ask for help,volume rendering!!!! Message-ID: <41184110.0000D0.16624@m178.163.com> hello: Now i am working on volume rending and i have a .RAW file(256*256*256).The class that is used by me is vtkImageData and vtkVolumeRayCastMapper.I see that the data are structeres points.how to render the volume with the colors read from .RAW at every position and how to understand the vtkColorTransferFunction::AddRGBPoint(),I am very eager to get your helps!! thanks,thanks!! ------------------------------------------------------------------------------------- 15??????,???II--D451?2466/D353?2399 http://design.163.com/aocmonitor/index.html From anand.shastry at ge.com Tue Aug 10 02:31:42 2004 From: anand.shastry at ge.com (Shastry, Anand C (Research)) Date: Tue, 10 Aug 2004 12:01:42 +0530 Subject: [vtkusers] Error using vtkVolumeShearWarpMapper Message-ID: <7D2EA86E0DEB6F46994CDE7BA21B9681052A53D5@BANMLVEM02.e2k.ad.ge.com> Hi.. I'm using VTK 4.0 on a Win 2000 machine and trying to get vtkVolumeShearWarpMapper to work. I've added vtkVolumeShearWarpMapper.cxx, .h, vtkOpenGLVolumeShearWarpMapper.cxx, .h files to the ./Rendering directory. In the CMakeLists, under SET( Rendering_SRCS I've added vtkVolumeShearWarpMapper.cxx. Under SET( RenderingOpenGL_SRCS I've added vtkOpenGLVolumeShearWarpMapper.cxx. CMake runs fine. I get a compile error in the TCL wrapper as shown here : Compiling... vtkVolumeShearWarpMapperTcl.cxx C:\Paraviewbin\VTK\Rendering\vtkVolumeShearWarpMapperTcl.cxx(79) : error C2440: '=' : cannot convert from 'class vtkVolumeShearWarpMapper *' to 'struct vtkShearWarpVoxelData *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Error executing cl.exe. I also followed instructions to get this class to work as shown in http://www.cg.tuwien.ac.at/courses/Visualisierung/2002-2003/Beispiel2/2-BrucknerSt-SeemannR/index2.htm I'm at a loss trying to debug this error as I am still new to VTK. Please help ! Thanks! From liuzhiqiang_cnu at 163.com Tue Aug 10 02:56:29 2004 From: liuzhiqiang_cnu at 163.com (=?gb2312?B?bGl1emhpcWlhbmdfY251?=) Date: Tue, 10 Aug 2004 14:56:29 +0800 (CST) Subject: [vtkusers] ask for help,volume rendering!!!! Message-ID: <4118719D.00003F.02131@m225.163.com> hello: Now i am working on volume rending and i have a .RAW file(256*256*256).The class that is used by me is vtkImageData and vtkVolumeRayCastMapper.I see that the data are structeres points.how to render the volume with the colors read from .RAW at every position and how to understand the vtkColorTransferFunction::AddRGBPoint(),I am very eager to get your helps!! thanks,thanks!! ------------------------------------------------------------------------------------- 15??????,???II--D451?2466/D353?2399 http://design.163.com/aocmonitor/index.html From liuzhiqiang_cnu at 163.com Tue Aug 10 02:57:01 2004 From: liuzhiqiang_cnu at 163.com (=?gb2312?B?bGl1emhpcWlhbmdfY251?=) Date: Tue, 10 Aug 2004 14:57:01 +0800 (CST) Subject: [vtkusers] ask for help,volume rendering!!!! Message-ID: <411871BD.000057.02131@m225.163.com> hello: Now i am working on volume rending and i have a .RAW file(256*256*256).The class that is used by me is vtkImageData and vtkVolumeRayCastMapper.I see that the data are structeres points.how to render the volume with the colors read from .RAW at every position and how to understand the vtkColorTransferFunction::AddRGBPoint(),I am very eager to get your helps!! thanks,thanks!! ------------------------------------------------------------------------------------- 15??????,???II--D451?2466/D353?2399 http://design.163.com/aocmonitor/index.html From goodwin.lawlor at ucd.ie Tue Aug 10 04:34:51 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Tue, 10 Aug 2004 09:34:51 +0100 Subject: [vtkusers] Text mapper / ATI Mobility Radeon bug Message-ID: Hi All, Just in case anyone else had this problem... the recent changes in CVS to the text mappers cleared up the crashes occuring in the opengl drivers when rendering some antialiased fonts with a ATI Mobility Radeon graphics card. Here's the original thread. I had thought is was a vtkActor2D problem but narrowed it down to antialiased font mapping. Goodwin From goodwin.lawlor at ucd.ie Tue Aug 10 04:48:37 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Tue, 10 Aug 2004 09:48:37 +0100 Subject: [vtkusers] Re: Text mapper / ATI Mobility Radeon bug Message-ID: > Here's the original thread http://public.kitware.com/pipermail/vtkusers/2004-June/074608.html From diaoxianfen at asisz.com Tue Aug 10 05:36:10 2004 From: diaoxianfen at asisz.com (diaoxianfen) Date: Tue, 10 Aug 2004 17:36:10 +0800 Subject: [vtkusers] how to get pixel coordinates of iso-surface Message-ID: <000801c47ebd$7875c7c0$9005a8c0@diaoxianfen> I use the ray casting volume rendering to visualize image datas.The procedure as follows, vtkVolumeRayCastIsosurfaceFunction *isosurfaceFunction = vtkVolumeRayCastIsosurfaceFunction::New(); isosurfaceFunction->SetIsoValue(800); raycastMapper->SetVolumeRayCastFunction( isosurfaceFunction ); Every thing is Ok. Now I want to get the pixel coordinates of the isosurface of 800 gray value.I know that the isosurface is connected by triangles,how can I get the pixel coordinates or nearby coordinates corresponding to the isosurface? thanks a lot! -------------- next part -------------- An HTML attachment was scrubbed... URL: From seanm at nmr.mgh.harvard.edu Tue Aug 10 07:14:09 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 10 Aug 2004 07:14:09 -0400 Subject: [vtkusers] how to get pixel coordinates of iso-surface In-Reply-To: <000801c47ebd$7875c7c0$9005a8c0@diaoxianfen> References: <000801c47ebd$7875c7c0$9005a8c0@diaoxianfen> Message-ID: <4118AE01.8030306@nmr.mgh.harvard.edu> Hi, The vtkVolumeRayCastIsosurfaceFunction in conjunction with a RayCastMapper does *NOT* generate triangles (as far as I know). It is a form of volume rendering that terminates ray traversal upon encountering the specified isovalue (800). By subclassing, you *may* be able to access the ray caster data in order to determine the terminal coordinate. Generating a PolyData isosurface via vtkContourFilter (or others), however, should give you what you need (with a lot less effort). -Sean diaoxianfen wrote: > I use the ray casting volume rendering to visualize image datas.The procedure as follows, > vtkVolumeRayCastIsosurfaceFunction *isosurfaceFunction = > vtkVolumeRayCastIsosurfaceFunction::New(); > isosurfaceFunction->SetIsoValue(800); > raycastMapper->SetVolumeRayCastFunction( isosurfaceFunction ); > Every thing is Ok. > Now I want to get the pixel coordinates of the isosurface of 800 gray value.I know that the isosurface > is connected by triangles,how can I get the pixel coordinates or nearby coordinates corresponding to > the isosurface? > thanks a lot! > From sebastien.barre at kitware.com Tue Aug 10 07:33:56 2004 From: sebastien.barre at kitware.com (Sebastien BARRE) Date: Tue, 10 Aug 2004 07:33:56 -0400 Subject: [vtkusers] Text mapper / ATI Mobility Radeon bug In-Reply-To: References: Message-ID: <6.1.2.0.2.20040810073313.04b79808@pop.fr.clara.net> At 8/10/2004 04:34 AM, Goodwin Lawlor wrote: >Hi All, > >Just in case anyone else had this problem... the recent changes in CVS to >the text mappers cleared up the crashes occuring in the opengl drivers when >rendering some antialiased fonts with a ATI Mobility Radeon graphics card. A good side effects then :) I'll introduce more features in a couple of weeks, then we will transition to new texture-based text actors. -- Sebastien Barre From j.robinson at kepler-systems.com Tue Aug 10 07:36:44 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Tue, 10 Aug 2004 12:36:44 +0100 Subject: [vtkusers] Wiki Contribution Message-ID: <20040810114352.274C71928E@public.kitware.com> Dear All, I am misunderstanding the Wiki, or has anybody made a contribution yet?? Anyway, I have just submitted a little article on vtkPlaneWidget (with which I was having difficulty for the last few days). All comments welcomed. Regards, Jim James C Robinson, PhD, Chartered Engineer, * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From yhq at sjtu.edu.cn Tue Aug 10 08:46:33 2004 From: yhq at sjtu.edu.cn (=?gb2312?B?0e664g==?=) Date: Tue, 10 Aug 2004 20:46:33 +0800 Subject: [vtkusers] =?gb2312?b?tPC4tDogdnRrdXNlcnMgRGlnZXN0LCBWb2wgNCwg?= =?gb2312?b?SXNzdWUgMjQ=?= In-Reply-To: <20040810065646.14A6419149@public.kitware.com> Message-ID: <20040810124704.953077B1900@mx1.sjtu.edu.cn> Hi all: I have a vtkimagedata and store the scalar data ,Now I want every scalar value produce a rgba and the store back to vtkimagedata , Would you please tell me whether we can do that and how to do it! From scharver at evl.uic.edu Tue Aug 10 09:35:49 2004 From: scharver at evl.uic.edu (Chris Scharver) Date: Tue, 10 Aug 2004 08:35:49 -0500 Subject: [vtkusers] Mac debugging In-Reply-To: <20040809135420.B68744@gauss.snl.salk.edu> References: <20040809135420.B68744@gauss.snl.salk.edu> Message-ID: <311C0841-EAD2-11D8-9FA0-000393A6EBAE@evl.uic.edu> On Aug 9, 2004, at 3:59 PM, Eugene Kim wrote: > Does anyone know which classes call the objective-C files? VTK is actually using Objective-C++. vtkCocoaGLView is a Cocoa class including some C++ calls in its implementation. On the other hand, the classes vtkCocoaRenderWindowInteractor, vtkCocoaRenderWindow, and vtkCocoaWindow are C++ classes which make some Objective-C calls (such as to vtkCocoaGLView) in their implementations. The C++ classes store void pointers which are then cast into the correct Objective-C classes as needed. Hope this helps, Chris -- Chris Scharver Electronic Visualization Laboratory The University of Illinois at Chicago Ph: 312-996-3002 FAX: 312-413-7585 From yxliu at fudan.edu.cn Tue Aug 10 09:38:12 2004 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Tue, 10 Aug 2004 21:38:12 +0800 Subject: [vtkusers] about VTK+GUI Message-ID: <001601c47edf$4b7f3090$1f64a8c0@YXLIU> Hi, I intend to use VTK to process the visualization, but I also need a fine GUI. I do not know which GUI tool is better, FLIK or MFC of MSVC? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmalater at nycap.rr.com Tue Aug 10 10:39:41 2004 From: mmalater at nycap.rr.com (Mathieu Malaterre) Date: Tue, 10 Aug 2004 10:39:41 -0400 Subject: [vtkusers] about VTK+GUI In-Reply-To: <001601c47edf$4b7f3090$1f64a8c0@YXLIU> References: <001601c47edf$4b7f3090$1f64a8c0@YXLIU> Message-ID: <4118DE2D.8090603@nycap.rr.com> Yixun Liu wrote: > Hi, > > I intend to use VTK to process the visualization, but I also need a fine > GUI. I do not know which GUI tool is better, FLIK or MFC of MSVC? Search in the mailing list archive there are a lot of thread about it. You could also used: - wxWindows / wxWidgets - Qt - GTK ... HTH Mathieu From lucepz at caramail.com Tue Aug 10 10:56:15 2004 From: lucepz at caramail.com (lucepz at caramail.com) Date: Tue, 10 Aug 2004 14:56:15 GMT Subject: [vtkusers] pb with vtkBMPReader Message-ID: <1092149775029459@lycos-europe.com> An HTML attachment was scrubbed... URL: From tfogal at apollo.sr.unh.edu Tue Aug 10 11:17:55 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Tue, 10 Aug 2004 11:17:55 -0400 Subject: [vtkusers] correct way to determine vtkStreamTracer ReasonForTermination? Message-ID: <200408101517.i7AFHtsp031001@apollo.sr.unh.edu> Hi all, I've been looking in to determining what causes my stream lines to end when they do, and vtkStreamTracer seems to have an enum specifically for this purpose -- ReasonForTermination. I am a little concerned because it seems to be very difficult to access, and so I'm starting to believe that I'm not accessing it in the right way. I would expect some sort of GetReasonForTermination() function that returns one of the valid values in the enum, but I can't seem to find one. From looking at the code, it seems like I need to get the output's cell data, and from that I can extract a vtkDataArray* which is really a vtkIntArray*. Then the first element (err, tuple) of that Array will be the ReasonForTermination. I feel like I'm doing things the wrong way, that I am missing some blatant interface. Has anyone used this information before? Could you clarify or redirect me towards what I should be doing to get this data? Thanks! -tom From goodwin.lawlor at ucd.ie Tue Aug 10 11:36:33 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Tue, 10 Aug 2004 16:36:33 +0100 Subject: [vtkusers] Re: Wiki Contribution References: <20040810114352.274C71928E@public.kitware.com> Message-ID: Hi All, Should people just use their "user" pages to contribute, find a place in a current page, or create their own pages? If I remember correctly, the idea of the wiki was to document how people were using vtk classes to accomplish specific tasks... like visualizing unstructured grids of hex's. It looks like the convention is that all VTK wiki pages begin with "VTK_" . Is that so? Are there any other conventions that contributors should know about? To create a new page, just add the article title onto the base url (with underscores for spaces). So to create a new article called "VTK Getting Started", type " http://www.vtk.org/Wiki/VTK_Getting_Started " into a browser and you'll be brought to a new, empty page that can be edited. There's never a dead link in a wiki... only pages that haven't been written yet (that sounds like an Irish proverb!?). These pages are helpful to start off: http://meta.wikimedia.org/wiki/Help:Starting_a_new_page http://meta.wikimedia.org/wiki/Help:Editing Anyway, thanks to kitware for setting the wiki up and Prabhu for the inital idea Goodwin "James Robinson" wrote in message news:20040810114352.274C71928E at public.kitware.com... Dear All, I am misunderstanding the Wiki, or has anybody made a contribution yet?? Anyway, I have just submitted a little article on vtkPlaneWidget (with which I was having difficulty for the last few days). All comments welcomed. Regards, Jim James C Robinson, PhD, Chartered Engineer, + 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 - j.robinson at kepler-systems.com _______________________________________________ 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 goodwin.lawlor at ucd.ie Tue Aug 10 11:54:30 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Tue, 10 Aug 2004 16:54:30 +0100 Subject: [vtkusers] Re: correct way to determine vtkStreamTracerReasonForTermination? References: <200408101517.i7AFHtsp031001@apollo.sr.unh.edu> Message-ID: Hi Tom, This came up on the list last April. Here's the last of the thread: http://public.kitware.com/pipermail/vtkusers/2004-April/073493.html The synopsis went something like: the Get****() fuctions are for accessing properties of a class not the outputs, which the ReasonForTermination array is. The output is accessed through GetOutput() so its updated correctly. There's new pipeline coming soon that should take care of the complexity of having more than just a data object in the ouput. hth Goodwin "tom fogal" wrote in message news:200408101517.i7AFHtsp031001 at apollo.sr.unh.edu... > Hi all, I've been looking in to determining what causes my stream lines > to end when they do, and vtkStreamTracer seems to have an enum > specifically for this purpose -- ReasonForTermination. I am a little > concerned because it seems to be very difficult to access, and so I'm > starting to believe that I'm not accessing it in the right way. > > I would expect some sort of GetReasonForTermination() function that > returns one of the valid values in the enum, but I can't seem to find > one. From looking at the code, it seems like I need to get the output's > cell data, and from that I can extract a vtkDataArray* which is really > a vtkIntArray*. Then the first element (err, tuple) of that Array will > be the ReasonForTermination. > > I feel like I'm doing things the wrong way, that I am missing some > blatant interface. Has anyone used this information before? Could you > clarify or redirect me towards what I should be doing to get this data? > > Thanks! > > -tom > _______________________________________________ > 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 goodwin.lawlor at ucd.ie Tue Aug 10 12:00:42 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Tue, 10 Aug 2004 17:00:42 +0100 Subject: [vtkusers] Re: pb with vtkBMPReader References: <1092149775029459@lycos-europe.com> Message-ID: What happens when you execute: viewer SetZSlice 5 viewer Render ? Goodwin wrote in message news:1092149775029459 at lycos-europe.com... Hi there, does anyone know how to use correctly the vtkBMPReader in Tcl/tk? Here is my code to read several bmp files and display them in my tk GUI: set dir [tk_chooseDirectory -initialdir "D:/Project/video/ " ] ... vtkBMPReader reader reader SetDataExtent 0 719 0 575 0 10 #720*576, 10 images from 0 to 10 reader SetFilePrefix "$dir/ " reader SetFilePattern "%s%d.bmp" # $dir/0.bmp to $dir/10.bmp reader Update vtkImageViewer viewer viewer SetColorWindow 256 viewer SetColorLevel 127.5 viewer SetInput [reader GetOutput] viewer Render ..... My viewer only displays the first image 0.bmp and doesn't update although I put the command "reader Update"...Any idea? Thanks in advance, L. Heart disease is Britains biggest killer. Join the British Heart Foundations Big Red Fightback: bhf.org.uk/fightback _______________________________________________ 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 arbvtk at yahoo.fr Tue Aug 10 11:52:45 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Tue, 10 Aug 2004 17:52:45 +0200 (CEST) Subject: [vtkusers] Why vtkAbstractTransform don't use vtkCriticalSection instead of vtkSimpleCriticalSection ? Message-ID: <20040810155245.68533.qmail@web25206.mail.ukl.yahoo.com> Hi, vtkSimpleCriticalSection is a "Critical Section object that is not a vtkObject". It is interesting when a static object is needed, like in vtkPolyData.cxx. But I don't understand why it is used in vtkAbstractTransform instead of vtkCriticalSection. Shouldn't this point be corrected ? Greets. Aur?lien REGAT-BARREL --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From eugene at salk.edu Tue Aug 10 13:44:46 2004 From: eugene at salk.edu (Eugene Kim) Date: Tue, 10 Aug 2004 10:44:46 -0700 (PDT) Subject: [vtkusers] Mac debugging In-Reply-To: <311C0841-EAD2-11D8-9FA0-000393A6EBAE@evl.uic.edu> References: <20040809135420.B68744@gauss.snl.salk.edu> <311C0841-EAD2-11D8-9FA0-000393A6EBAE@evl.uic.edu> Message-ID: Hi Chris, Right, I have seen the vtkCocoa---- files, and I know they are the ones which interact directly with the C++ code. What I can't determine is the other side of the problem... what is interacting with these files? Are these files the ones which are directly communicating with Cocoa to draw to the screen? Thanks, Eugene On Tue, 10 Aug 2004, Chris Scharver wrote: > On Aug 9, 2004, at 3:59 PM, Eugene Kim wrote: > > > Does anyone know which classes call the objective-C files? > > VTK is actually using Objective-C++. vtkCocoaGLView is a Cocoa class > including some C++ calls in its implementation. On the other hand, the > classes vtkCocoaRenderWindowInteractor, vtkCocoaRenderWindow, and > vtkCocoaWindow are C++ classes which make some Objective-C calls (such > as to vtkCocoaGLView) in their implementations. The C++ classes store > void pointers which are then cast into the correct Objective-C classes > as needed. > > Hope this helps, > Chris > -- > Chris Scharver > Electronic Visualization Laboratory > The University of Illinois at Chicago > Ph: 312-996-3002 FAX: 312-413-7585 > > > From dgobbi at imaging.robarts.ca Tue Aug 10 13:49:48 2004 From: dgobbi at imaging.robarts.ca (David Gobbi) Date: Tue, 10 Aug 2004 13:49:48 -0400 (EDT) Subject: [vtkusers] Why vtkAbstractTransform don't use vtkCriticalSection instead of vtkSimpleCriticalSection ? In-Reply-To: <20040810155245.68533.qmail@web25206.mail.ukl.yahoo.com> Message-ID: Hi Aur?lien, What is the advantage of using a vtkCriticalSection instead? I wrote the code with vtkSimpleCriticalSection to save a bit of memory. - David On Tue, 10 Aug 2004, [iso-8859-1] REGAT-BARREL Aur?lien wrote: > Hi, > vtkSimpleCriticalSection is a "Critical Section object that is not a vtkObject". It is interesting when a static object is needed, like in vtkPolyData.cxx. But I don't understand why it is used in vtkAbstractTransform instead of vtkCriticalSection. Shouldn't this point be corrected ? > Greets. > > > > Aur?lien REGAT-BARREL > > --------------------------------- > Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! > Cr?ez votre Yahoo! Mail > > Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! From ystarrev at uwo.ca Tue Aug 10 13:53:46 2004 From: ystarrev at uwo.ca (Yves Starreveld) Date: Tue, 10 Aug 2004 13:53:46 -0400 Subject: [vtkusers] Mac debugging In-Reply-To: References: <20040809135420.B68744@gauss.snl.salk.edu> <311C0841-EAD2-11D8-9FA0-000393A6EBAE@evl.uic.edu> Message-ID: <3A35DECC-EAF6-11D8-A2B5-000A95AC83DE@uwo.ca> By way of summary: vtkCocoaGLView.mm - takes care of allocating an NSOpenGLView which simply provides a rendering context vtkCocoaRenderWindow.mm - interacts with the OSX Window manager to display a window and create its vtkCocoaGLView. These were separated to allow applications to do their own window management and just use vtkCocoaGLViews themselves (see Osirix...) vtkCocoaRenderWindowInteractor.mm -interacts with the event stream, trapping appropriate events and turning them into vtk events. None of these classes do any drawing; once the context is set appropriately, the vtkOpenGLRenderer does it all. Yves On 10-Aug-04, at 1:44 PM, Eugene Kim wrote: > Hi Chris, > > Right, I have seen the vtkCocoa---- files, and I know they are the > ones > which interact directly with the C++ code. What I can't determine is > the > other side of the problem... what is interacting with these files? Are > these files the ones which are directly communicating with Cocoa to > draw > to the screen? > > Thanks, > Eugene > > On Tue, 10 Aug 2004, Chris Scharver wrote: > >> On Aug 9, 2004, at 3:59 PM, Eugene Kim wrote: >> >>> Does anyone know which classes call the objective-C files? >> >> VTK is actually using Objective-C++. vtkCocoaGLView is a Cocoa class >> including some C++ calls in its implementation. On the other hand, the >> classes vtkCocoaRenderWindowInteractor, vtkCocoaRenderWindow, and >> vtkCocoaWindow are C++ classes which make some Objective-C calls (such >> as to vtkCocoaGLView) in their implementations. The C++ classes store >> void pointers which are then cast into the correct Objective-C classes >> as needed. >> >> Hope this helps, >> Chris >> -- >> Chris Scharver >> Electronic Visualization Laboratory >> The University of Illinois at Chicago >> Ph: 312-996-3002 FAX: 312-413-7585 >> >> >> > _______________________________________________ > 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 pallavi.joshi at vanderbilt.edu Tue Aug 10 14:00:57 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Tue, 10 Aug 2004 13:00:57 -0500 Subject: [vtkusers] vtkPolyData mesh ? Message-ID: <001901c47f03$fd264670$da593b81@Pallavi> Hi, Can somebody tell me whether the mesh (created from vtkMarchingCubes) has its coordiantes in image or world cood system ? Thanks, Pallavi -------------- next part -------------- An HTML attachment was scrubbed... URL: From amy.henderson at kitware.com Tue Aug 10 14:07:24 2004 From: amy.henderson at kitware.com (Amy Henderson) Date: Tue, 10 Aug 2004 14:07:24 -0400 Subject: [vtkusers] vtkPolyData mesh ? In-Reply-To: <001901c47f03$fd264670$da593b81@Pallavi> References: <001901c47f03$fd264670$da593b81@Pallavi> Message-ID: <6.1.2.0.2.20040810140645.034303b0@pop.biz.rr.com> Hi Pallavi, The poly data output of vtkMarchingCubes would have coordinates in world-space, not image-space. - Amy At 02:00 PM 8/10/2004, Pallavi Joshi wrote: >Hi, >Can somebody tell me whether the mesh (created from vtkMarchingCubes) has >its coordiantes in image or world cood system ? >Thanks, >Pallavi > > >_______________________________________________ >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 dgobbi at imaging.robarts.ca Tue Aug 10 14:10:55 2004 From: dgobbi at imaging.robarts.ca (David Gobbi) Date: Tue, 10 Aug 2004 14:10:55 -0400 (EDT) Subject: [vtkusers] vtkPolyData mesh ? In-Reply-To: <001901c47f03$fd264670$da593b81@Pallavi> Message-ID: Hi Pallavi, The mesh is in VTK's "data" coords. An just to make sure there is no misunderstanding what this means: VTK's "structured" coords are the i,j,k indices into the image data. VTK's "data" coords are the x,y,z coordinates of the vtkPoints in a vtkPolyData (such as that generated by vtkMarchingCubes), or equivalently the x,y,z coords of the voxels in vtkImageData given by the formulas x = Origin[0] + Spacing[0]*i, y = Origin[1] + Spacing[1]*j, etc. Finally, "world" coords are the result of applying an actor's Matrix (i.e. the one you get by doing actor->GetMatrix()) to the "data" coords. If the matrix is the identity matrix (the default) then "data" and "world" coords are the same thing. Cheers, - David On Tue, 10 Aug 2004, Pallavi Joshi wrote: > Hi, > Can somebody tell me whether the mesh (created from vtkMarchingCubes) has its coordiantes in image or world cood system ? > Thanks, > Pallavi > > From tfogal at apollo.sr.unh.edu Tue Aug 10 14:52:52 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Tue, 10 Aug 2004 14:52:52 -0400 Subject: [vtkusers] Re: correct way to determine vtkStreamTracerReasonForTermination? In-Reply-To: Your message of "Tue, 10 Aug 2004 16:54:30 BST." References: <200408101517.i7AFHtsp031001@apollo.sr.unh.edu> Message-ID: <200408101852.i7AIqq3p032033@apollo.sr.unh.edu> Thank you, Goodwin, for the prompt reply. I got things working shortly after. I started a vtkStreamTracer entry on the wiki, currently its just a 'how to access ReasonForTermination' guide. I'd like to see another quick excerpt on migrating from vtkStreamLine to vtkStreamTracer eventually. I'll put it on the bottom of my ToDo list... It can be found at http://www.vtk.org/Wiki/VtkStreamTracer It is not currently linked to from anywhere. Finally I noted from the previous thread in april, "Brad Kind is working on a new pipeline architecture that will allow doing this much more easily." Whats the status of this? Is it a back burner dream or more like something that would show up in the 4.4 release? How will the new architecture be different? Just curious. Sorry to beat a dead horse / thread. -tom "Goodwin Lawlor" writes: >Hi Tom, > >This came up on the list last April. Here's the last of the thread: >http://public.kitware.com/pipermail/vtkusers/2004-April/073493.html > > >The synopsis went something like: the Get****() fuctions are for accessing >properties of a class not the outputs, which the ReasonForTermination array >is. The output is accessed through GetOutput() so its updated correctly. >There's new pipeline coming soon that should take care of the complexity of >having more than just a data object in the ouput. > > >hth > >Goodwin > > >"tom fogal" wrote in message >news:200408101517.i7AFHtsp031001 at apollo.sr.unh.edu... >> Hi all, I've been looking in to determining what causes my stream lines >> to end when they do, and vtkStreamTracer seems to have an enum >> specifically for this purpose -- ReasonForTermination. I am a little >> concerned because it seems to be very difficult to access, and so I'm >> starting to believe that I'm not accessing it in the right way. >> >> I would expect some sort of GetReasonForTermination() function that >> returns one of the valid values in the enum, but I can't seem to find >> one. From looking at the code, it seems like I need to get the output's >> cell data, and from that I can extract a vtkDataArray* which is really >> a vtkIntArray*. Then the first element (err, tuple) of that Array will >> be the ReasonForTermination. >> >> I feel like I'm doing things the wrong way, that I am missing some >> blatant interface. Has anyone used this information before? Could you >> clarify or redirect me towards what I should be doing to get this data? >> >> Thanks! >> >> -tom >> _______________________________________________ >> 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: >Follow this link to subscribe/unsubscribe: >http://www.vtk.org/mailman/listinfo/vtkusers From berklist at nycap.rr.com Tue Aug 10 15:08:10 2004 From: berklist at nycap.rr.com (Berk Geveci) Date: Tue, 10 Aug 2004 15:08:10 -0400 Subject: [vtkusers] Re: correct way to determine vtkStreamTracerReasonForTermination? In-Reply-To: <200408101852.i7AIqq3p032033@apollo.sr.unh.edu> References: <200408101517.i7AFHtsp031001@apollo.sr.unh.edu> <200408101852.i7AIqq3p032033@apollo.sr.unh.edu> Message-ID: <1092164889.29993.54.camel@silverymoon> > Finally I noted from the previous thread in april, > "Brad Kind is working on a new pipeline architecture that will allow > doing this much more easily." Whats the status of this? Is it a back > burner dream or more like something that would show up in the 4.4 > release? How will the new architecture be different? > Just curious. Sorry to beat a dead horse / thread. It won't show up in the 4.4 release since 4.4 has been out for quite a while now :-) It is not in the back burner. Brad and Ken are actively working on it. However, keep in mind that they are mainly working on the architecture not necessarily on implementing new functionality. From kerekes at fastmail.fm Tue Aug 10 17:43:30 2004 From: kerekes at fastmail.fm (Kate Kerekes) Date: Tue, 10 Aug 2004 17:43:30 -0400 Subject: [vtkusers] Re: monitor progress of vol16Reader In-Reply-To: Message-ID: <000001c47f23$144cb1d0$0300a8c0@kerekeslaptop> Thanks, I didn't know that the SetProgressMethod was deprecated. I did timings using vtkTimerLog with start/stop just around the "reader Update" line of code. For my vtkImageReader code it takes about 19 seconds to read a 512x512x300 block of shorts. For my vtkVolume16Reader the same data only takes 8.5 seconds. Does anyone know why this is? Why would vtkImageReader, the replacement class for vtkVolume16Reader be slower? Kate Kerekes -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Goodwin Lawlor Sent: Thursday, August 05, 2004 7:42 PM To: vtkusers at public.kitware.com Subject: [vtkusers] Re: monitor progress of vol16Reader Hi Katherine, The SetProgressMethod is a member function of the vtkProcessObject class which is a superclass of both vtkVolume16Reader and vtkImageReader... so they both should have the function. SetProgressMethod has been depreciated anyway. You should use (for example in tcl) reader AddObserver ProgressEvent {puts "Progress: [reader GetProgess]"} You could also use an instance of vtkTimerLog to time between the readers' StartEvent and EndEvent. I've no idea why vtkVolume16Reader would be quicker... the documentation says vtkImageReader is a replacement for vtkVolume16Reader and should be used instead. hth Goodwin "Kate Kerekes" wrote in message news:000001c47b3e$13dd5e40$0300a8c0 at kerekeslaptop... Hello everyone, I have looked at the messages regarding progress and update methods, but I still can't answer my question. I am reading a large dataset (400 MB) and I need some sort of progress bar to update. I was using vtkImageReader and the SetProgressMethod. This worked as expected. Then I discovered that vtkVolume16Reader read in the data up to 5 times faster. So I want to read my data with vtkVolume16Reader, but I need a way to set the progress method. There are no "setProgress" methods in the vtkVolume16Reader class or any of its parents. Does anyone know a trick to find out the current progress of the Volume16Reader? Can someone explain why vtkImageReader is so much slower than vtkVolume16Reader? Is there anything I can do to make vtkImageReader faster? Thanks, Katherine Kerekes _______________________________________________ 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: Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers From pallavi.joshi at vanderbilt.edu Tue Aug 10 17:56:10 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Tue, 10 Aug 2004 16:56:10 -0500 Subject: [vtkusers] vtkDecimate erros ? Message-ID: <000e01c47f24$d8f76a60$da593b81@Pallavi> Hi, I am trying to use vtkDecimate in my code. But it gives me the following error: Warning: Non-manifold geometry encountered. can anybody please tell me the probable reason for this error ? thanks in advance, Pallavi -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jared.Cohen at noaa.gov Tue Aug 10 17:56:12 2004 From: Jared.Cohen at noaa.gov (Jared Cohen) Date: Tue, 10 Aug 2004 17:56:12 -0400 Subject: [vtkusers] Please help: Is there a way to close gaps in PolyData? Message-ID: <4119447C.8090603@noaa.gov> I'm developing an application that reads a file containing longitude/latitude coordinates and scalar values at each point; it then maps those scalars onto a sphere in VTK. Some datasets don't encompass the entire globe, but just a part of it; hence, I needed a way to create a partial sphere when needed. I achieved this by building a vtkPlaneSource of the appropriate size, and used a SphericalTransform and TransformPolyDataFilter to warp the plane into a sphere. Here's the problem. I'm currently working with a dataset that stops just short of covering the entire globe; i.e., it contains longitude values that range from 1 to 359, instead of from 0 to 360. Hence, there's a gap in the sphere where no data exists, between the first and last longitude values. However, this gap is exactly the same width as the other polygons making up the sphere; i.e. each two points have distance X separating them, and the first and last longitudes ALSO have X distance separating them. This leads me to believe that whoever wrote the dataset intended for the points on the first and last longitudes to be "bridged" by one last row of polygons, thus closing the gap. My question is, how do I accomplish this?? Any thoughts? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kerekes at fastmail.fm Tue Aug 10 19:14:42 2004 From: kerekes at fastmail.fm (Kate Kerekes) Date: Tue, 10 Aug 2004 19:14:42 -0400 Subject: [vtkusers] Re: monitor progress of vol16Reader In-Reply-To: <000001c47f23$144cb1d0$0300a8c0@kerekeslaptop> Message-ID: <000001c47f2f$d20fae50$0300a8c0@kerekeslaptop> I apologise--I was testing, but forgot about what Sean said about memory caching. I ran two separate cases restarting the computer in between (BTW anyone know a quick and easy way to reset windows cached memory?) and the timings were very close. Thanks for all the help! Kate Kerekes -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Kate Kerekes Sent: Tuesday, August 10, 2004 5:44 PM To: vtkusers at public.kitware.com Subject: RE: [vtkusers] Re: monitor progress of vol16Reader Thanks, I didn't know that the SetProgressMethod was deprecated. I did timings using vtkTimerLog with start/stop just around the "reader Update" line of code. For my vtkImageReader code it takes about 19 seconds to read a 512x512x300 block of shorts. For my vtkVolume16Reader the same data only takes 8.5 seconds. Does anyone know why this is? Why would vtkImageReader, the replacement class for vtkVolume16Reader be slower? Kate Kerekes -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Goodwin Lawlor Sent: Thursday, August 05, 2004 7:42 PM To: vtkusers at public.kitware.com Subject: [vtkusers] Re: monitor progress of vol16Reader Hi Katherine, The SetProgressMethod is a member function of the vtkProcessObject class which is a superclass of both vtkVolume16Reader and vtkImageReader... so they both should have the function. SetProgressMethod has been depreciated anyway. You should use (for example in tcl) reader AddObserver ProgressEvent {puts "Progress: [reader GetProgess]"} You could also use an instance of vtkTimerLog to time between the readers' StartEvent and EndEvent. I've no idea why vtkVolume16Reader would be quicker... the documentation says vtkImageReader is a replacement for vtkVolume16Reader and should be used instead. hth Goodwin "Kate Kerekes" wrote in message news:000001c47b3e$13dd5e40$0300a8c0 at kerekeslaptop... Hello everyone, I have looked at the messages regarding progress and update methods, but I still can't answer my question. I am reading a large dataset (400 MB) and I need some sort of progress bar to update. I was using vtkImageReader and the SetProgressMethod. This worked as expected. Then I discovered that vtkVolume16Reader read in the data up to 5 times faster. So I want to read my data with vtkVolume16Reader, but I need a way to set the progress method. There are no "setProgress" methods in the vtkVolume16Reader class or any of its parents. Does anyone know a trick to find out the current progress of the Volume16Reader? Can someone explain why vtkImageReader is so much slower than vtkVolume16Reader? Is there anything I can do to make vtkImageReader faster? Thanks, Katherine Kerekes _______________________________________________ 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: 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: Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers From arbvtk at yahoo.fr Tue Aug 10 16:00:49 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Tue, 10 Aug 2004 22:00:49 +0200 (CEST) Subject: [vtkusers] Why vtkAbstractTransform don't use vtkCriticalSection instead of vtkSimpleCriticalSection ? In-Reply-To: Message-ID: <20040810200049.22109.qmail@web25206.mail.ukl.yahoo.com> Hi David, If the goal of vtkSimpleCriticalSection is to save memory, I don't understand the role of vtkCriticalSection since the only difference between them I can see is that vtkCriticalSection inherits from vtkObject. Why not replace vtkCriticalSection by vtkSimpleCriticalSection ? David Gobbi wrote: Hi Aur?lien, What is the advantage of using a vtkCriticalSection instead? I wrote the code with vtkSimpleCriticalSection to save a bit of memory. - David Aur?lien REGAT-BARREL --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From dgobbi at imaging.robarts.ca Tue Aug 10 21:03:54 2004 From: dgobbi at imaging.robarts.ca (David Gobbi) Date: Tue, 10 Aug 2004 21:03:54 -0400 (EDT) Subject: [vtkusers] Why vtkAbstractTransform don't use vtkCriticalSection instead of vtkSimpleCriticalSection ? In-Reply-To: <20040810200049.22109.qmail@web25206.mail.ukl.yahoo.com> Message-ID: On Tue, 10 Aug 2004, [iso-8859-1] REGAT-BARREL Aur?lien wrote: > Hi David, > If the goal of vtkSimpleCriticalSection is to save memory, I don't understand the role of vtkCriticalSection since the only difference between them I can see is that vtkCriticalSection inherits from vtkObject. > Why not replace vtkCriticalSection by vtkSimpleCriticalSection ? A vtkSimpleCriticalSection takes up a few bytes less (100 or so?) than a vtkCriticalSection, specifically because it is not a subclass of vtkObject. - David > David Gobbi wrote: > Hi Aur?lien, > > What is the advantage of using a vtkCriticalSection instead? I wrote > the code with vtkSimpleCriticalSection to save a bit of memory. > > - David > > > > Aur?lien REGAT-BARREL > > --------------------------------- > Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! > Cr?ez votre Yahoo! Mail > > Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! From liuzhiqiang_cnu at 163.com Tue Aug 10 21:28:52 2004 From: liuzhiqiang_cnu at 163.com (=?gb2312?B?bGl1emhpcWlhbmdfY251?=) Date: Wed, 11 Aug 2004 09:28:52 +0800 (CST) Subject: [vtkusers] help!!!!! Message-ID: <41197654.0000DE.23711@m225.163.com> hello: Now i am working on volume rending and i have a .RAW file(256*256*256).The class that is used by me is vtkImageData and vtkVolumeRayCastMapper.I see that the data are structeres points.how to render the volume with the colors read from .RAW at every position and how to understand the vtkColorTransferFunction::AddRGBPoint(),I am very eager to get your helps!! thanks,thanks!! ------------------------------------------------------------------------------------- 15??????,???II--D451?2466/D353?2399 http://design.163.com/aocmonitor/index.html From naukudkar at yahoo.com Wed Aug 11 01:36:50 2004 From: naukudkar at yahoo.com (ROhan naukudkar) Date: Tue, 10 Aug 2004 22:36:50 -0700 (PDT) Subject: [vtkusers] How to fit a renderwindow in a java frame or anothe window Message-ID: <20040811053650.96436.qmail@web40705.mail.yahoo.com> HI, Is anyone on the group is able to fit a renderWindow into a frame. What i want to do is that...When i choose a 3d PET image with the help of a fileDialog..that 3d PET image which is shown as a seperate window...i want to show it in the same frame where i have created the menubar for getting the filedialog.... please guide me if anyone has the solution.... regards, Rohan --------------------------------- Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramakrishna.prakash at quest-global.com Wed Aug 11 02:20:07 2004 From: ramakrishna.prakash at quest-global.com (R K Shyam Prakash) Date: Wed, 11 Aug 2004 11:50:07 +0530 Subject: [vtkusers] How to fit a renderwindow in a java frame or anothewindow In-Reply-To: <20040811053650.96436.qmail@web40705.mail.yahoo.com> Message-ID: <003f01c47f6b$3fc638c0$230aa8c0@questtw.questglobal.com> Rohan, There could be a couple of reasons for this. One may be, you are calling vtkCanvas.Render() before the canvas is realised. Can you send the code snippet where you are adding the render window to the frame and the action listener for your menu. May be it will help in analyzing the problem. --Shyam -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of ROhan naukudkar Sent: Wednesday, August 11, 2004 11:07 AM To: vtkusers at vtk.org Subject: [vtkusers] How to fit a renderwindow in a java frame or anothewindow HI, Is anyone on the group is able to fit a renderWindow into a frame. What i want to do is that...When i choose a 3d PET image with the help of a fileDialog..that 3d PET image which is shown as a seperate window...i want to show it in the same frame where i have created the menubar for getting the filedialog.... please guide me if anyone has the solution.... regards, Rohan _____ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lucepz at caramail.com Wed Aug 11 03:13:54 2004 From: lucepz at caramail.com (lucepz at caramail.com) Date: Wed, 11 Aug 2004 07:13:54 GMT Subject: [vtkusers] Re: pb with vtkBMPReader Message-ID: <1092208434021847@lycos-europe.com> I've tried to add the line but it only displays the last slice!! It seems that I missed something but I don't know what; my reader in C++ works well and I tried to program this one with tcl/tk but it's not successful. Thanks though, L. What happens when you execute: viewer SetZSlice 5 viewer Render ? Goodwin wrote in message news:1092149775029459 at lycos-europe.com... Hi there, does anyone know how to use correctly the vtkBMPReader in Tcl/tk? Here is my code to read several bmp files and display them in my tk GUI: set dir [tk_chooseDirectory -initialdir "D:/Project/video/ " ] .. vtkBMPReader reader reader SetDataExtent 0 719 0 575 0 10 #720*576, 10 images from 0 to 10 reader SetFilePrefix "$dir/ " reader SetFilePattern "%s%d.bmp" # $dir/0.bmp to $dir/10.bmp reader Update vtkImageViewer viewer viewer SetColorWindow 256 viewer SetColorLevel 127.5 viewer SetInput [reader GetOutput] viewer Render .... My viewer only displays the first image 0.bmp and doesn't update although I put the command "reader Update"...Any idea? Thanks in advance, L. From j.robinson at kepler-systems.com Wed Aug 11 06:24:22 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Wed, 11 Aug 2004 11:24:22 +0100 Subject: [vtkusers] Clipping Planes Message-ID: <20040811102433.E00451A455@public.kitware.com> Dear All, I am having trouble (again) with clipping planes. I am trying to create a viewer to view results of an FE analysis. Part of the results are the displacements at the nodes of the finite element mesh. I read in the FE mesh into a vtkUnstructuredGrid with the displacements as a vector field. I then create a displaced geometry by adding them to the vtkUnstructuredGrid geometry as follows: void CSampleDoc::AddDisplacement(float factor) { vtkFloatArray *pDisplacement = (vtkFloatArray*)this->pUnstructuredGrid->GetPointData()->GetVectors() ; vtkPoints* pNodalGeometry = this->pUnstructuredGrid->GetPoints() ; if (pDisplacement==NULL) { AfxMessageBox("No displacement set") ; return ; } float newcoords[3] ; float* x ; float* delta ; for (int i = 0; i < pNodalGeometry->GetNumberOfPoints(); i++) { x = pNodalGeometry->GetPoint(i) ; delta = pDisplacement->GetTuple(i) ; for (int j = 0; j < 3; j++) { newcoords[j] = x[j] + factor*delta[j] ; } pNodalGeometry->SetPoint(i,newcoords) ; } this->pUnstructuredGrid->Update() ; this->pGeometry->SetInput(pUnstructuredGrid) ; this->pMeshMapper->SetInput(pGeometry->GetOutput()); this->pMeshMapper->Update() ; this->pMeshActor->SetMapper(this->pMeshMapper) ; } This works (with some other quirky behaviour which I have circumvented). But a problem that I am having difficulty with is that the clipping planes remain as if the geometry hadn't been altered. Thus, as I rotate the object (in trackball camera mode) the displaced object disappears. I have checked the bounds of the viewable objects (using Renderer->ComputeVisiblePropBounds(bounds) ;) and they are unaltered - thus all the AutoClipping is thrown out of whack. It may very well be that (a) I am doing things that are not meant to be catered for in vtk or (b) there is a better (preferably simpler) way of achieving this effect. All suggestions gratefully welcomed. Jim James C Robinson, PhD, Chartered Engineer, * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbiddiscombe at skippingmouse.co.uk Wed Aug 11 07:19:34 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Wed, 11 Aug 2004 12:19:34 +0100 Subject: [vtkusers] Clipping Planes References: <20040811102433.E00451A455@public.kitware.com> Message-ID: <001e01c47f95$14b69060$2901460a@miradasolutions.com> After calling AddDisplacement(...) you are calling resetCameralippingRage() yes? If not. try it. JB ----- Original Message ----- From: James Robinson To: Vtk Users Sent: Wednesday, August 11, 2004 11:24 AM Subject: [vtkusers] Clipping Planes Dear All, I am having trouble (again) with clipping planes. I am trying to create a viewer to view results of an FE analysis. Part of the results are the displacements at the nodes of the finite element mesh. I read in the FE mesh into a vtkUnstructuredGrid with the displacements as a vector field. I then create a displaced geometry by adding them to the vtkUnstructuredGrid geometry as follows: void CSampleDoc::AddDisplacement(float factor) { vtkFloatArray *pDisplacement = (vtkFloatArray*)this->pUnstructuredGrid->GetPointData()->GetVectors() ; vtkPoints* pNodalGeometry = this->pUnstructuredGrid->GetPoints() ; if (pDisplacement==NULL) { AfxMessageBox("No displacement set") ; return ; } float newcoords[3] ; float* x ; float* delta ; for (int i = 0; i < pNodalGeometry->GetNumberOfPoints(); i++) { x = pNodalGeometry->GetPoint(i) ; delta = pDisplacement->GetTuple(i) ; for (int j = 0; j < 3; j++) { newcoords[j] = x[j] + factor*delta[j] ; } pNodalGeometry->SetPoint(i,newcoords) ; } this->pUnstructuredGrid->Update() ; this->pGeometry->SetInput(pUnstructuredGrid) ; this->pMeshMapper->SetInput(pGeometry->GetOutput()); this->pMeshMapper->Update() ; this->pMeshActor->SetMapper(this->pMeshMapper) ; } This works (with some other quirky behaviour which I have circumvented). But a problem that I am having difficulty with is that the clipping planes remain as if the geometry hadn't been altered. Thus, as I rotate the object (in trackball camera mode) the displaced object disappears. I have checked the bounds of the viewable objects (using Renderer->ComputeVisiblePropBounds(bounds) ;) and they are unaltered - thus all the AutoClipping is thrown out of whack. It may very well be that (a) I am doing things that are not meant to be catered for in vtk or (b) there is a better (preferably simpler) way of achieving this effect. All suggestions gratefully welcomed. Jim James C Robinson, PhD, Chartered Engineer, + 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 - j.robinson at kepler-systems.com ------------------------------------------------------------------------------ _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.robinson at kepler-systems.com Wed Aug 11 07:40:14 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Wed, 11 Aug 2004 12:40:14 +0100 Subject: [vtkusers] Clipping Planes In-Reply-To: <001e01c47f95$14b69060$2901460a@miradasolutions.com> Message-ID: <20040811114029.0BDB019FF9@public.kitware.com> John, Many thanks for replying. I have tried EVERYTHING. I have even tried reloading all the props into the renderer. I have checked the altered bounds on everything from the vtkUnstructuredGrid to the vtkPoints* pNodalGeometry. None of the bounds are altered after the change (which, I would imagine, is why the resetting of the clip planes has no effect). My workaround is: void CSampleView::ResetCameraClippingRange(BOOL ShowDisplacement) { // float bounds[6] ; // Renderer->ComputeVisiblePropBounds(bounds) ; // Renderer->ResetCameraClippingRange() ; // TODO: add construction code here vtkInteractorStyleSwitch* pStyle = (vtkInteractorStyleSwitch*)Interactor->GetInteractorStyle() ; if (ShowDisplacement) { pStyle->AutoAdjustCameraClippingRangeOff() ; vtkCamera* pCamera = Renderer->GetActiveCamera() ; pCamera->SetClippingRange(0.001, 1000.) ; // Arbitrary - this could be automated } else { pStyle->AutoAdjustCameraClippingRangeOn() ; } } which I call every time the displacement view option is chosen. Note that it was at this level that I tried to ResetCameraClippingRange (both with bounds computed and not), but to no avail. Any other suggestions welcomed. Regards, Jim James C Robinson, PhD, Chartered Engineer, * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com _____ From: John Biddiscombe [mailto:jbiddiscombe at skippingmouse.co.uk] Sent: 11 August 2004 12:20 To: j.robinson at kepler-systems.com; Vtk Users Subject: Re: [vtkusers] Clipping Planes After calling AddDisplacement(...) you are calling resetCameralippingRage() yes? If not. try it. JB ----- Original Message ----- From: James Robinson To: Vtk Users Sent: Wednesday, August 11, 2004 11:24 AM Subject: [vtkusers] Clipping Planes Dear All, I am having trouble (again) with clipping planes. I am trying to create a viewer to view results of an FE analysis. Part of the results are the displacements at the nodes of the finite element mesh. I read in the FE mesh into a vtkUnstructuredGrid with the displacements as a vector field. I then create a displaced geometry by adding them to the vtkUnstructuredGrid geometry as follows: void CSampleDoc::AddDisplacement(float factor) { vtkFloatArray *pDisplacement = (vtkFloatArray*)this->pUnstructuredGrid->GetPointData()->GetVectors() ; vtkPoints* pNodalGeometry = this->pUnstructuredGrid->GetPoints() ; if (pDisplacement==NULL) { AfxMessageBox("No displacement set") ; return ; } float newcoords[3] ; float* x ; float* delta ; for (int i = 0; i < pNodalGeometry->GetNumberOfPoints(); i++) { x = pNodalGeometry->GetPoint(i) ; delta = pDisplacement->GetTuple(i) ; for (int j = 0; j < 3; j++) { newcoords[j] = x[j] + factor*delta[j] ; } pNodalGeometry->SetPoint(i,newcoords) ; } this->pUnstructuredGrid->Update() ; this->pGeometry->SetInput(pUnstructuredGrid) ; this->pMeshMapper->SetInput(pGeometry->GetOutput()); this->pMeshMapper->Update() ; this->pMeshActor->SetMapper(this->pMeshMapper) ; } This works (with some other quirky behaviour which I have circumvented). But a problem that I am having difficulty with is that the clipping planes remain as if the geometry hadn't been altered. Thus, as I rotate the object (in trackball camera mode) the displaced object disappears. I have checked the bounds of the viewable objects (using Renderer->ComputeVisiblePropBounds(bounds) ;) and they are unaltered - thus all the AutoClipping is thrown out of whack. It may very well be that (a) I am doing things that are not meant to be catered for in vtk or (b) there is a better (preferably simpler) way of achieving this effect. All suggestions gratefully welcomed. Jim James C Robinson, PhD, Chartered Engineer, * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com _____ _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbiddiscombe at skippingmouse.co.uk Wed Aug 11 07:49:35 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Wed, 11 Aug 2004 12:49:35 +0100 Subject: [vtkusers] Clipping Planes References: <20040811114058.B77061F4785@mxes4.enta.net> Message-ID: <000001c47f99$51570dc0$2901460a@miradasolutions.com> I see Something... loop pNodalGeometry->SetPoint(i,newcoords) ; end loop now try pNodalGeometry->Modified() that might force the bounds change to be picked up. But between you and me you ought to be careful, if the pNodalGeometry data is being output from another filter, then it may get overwritten later. Maybe a deepcopy or a new dataset is in order. JB ----- Original Message ----- From: James Robinson To: 'John Biddiscombe' Cc: Vtk Users Sent: Wednesday, August 11, 2004 12:40 PM Subject: RE: [vtkusers] Clipping Planes John, Many thanks for replying. I have tried EVERYTHING. I have even tried reloading all the props into the renderer. I have checked the altered bounds on everything from the vtkUnstructuredGrid to the vtkPoints* pNodalGeometry. None of the bounds are altered after the change (which, I would imagine, is why the resetting of the clip planes has no effect). My workaround is: void CSampleView::ResetCameraClippingRange(BOOL ShowDisplacement) { // float bounds[6] ; // Renderer->ComputeVisiblePropBounds(bounds) ; // Renderer->ResetCameraClippingRange() ; // TODO: add construction code here vtkInteractorStyleSwitch* pStyle = (vtkInteractorStyleSwitch*)Interactor->GetInteractorStyle() ; if (ShowDisplacement) { pStyle->AutoAdjustCameraClippingRangeOff() ; vtkCamera* pCamera = Renderer->GetActiveCamera() ; pCamera->SetClippingRange(0.001, 1000.) ; // Arbitrary - this could be automated } else { pStyle->AutoAdjustCameraClippingRangeOn() ; } } which I call every time the displacement view option is chosen. Note that it was at this level that I tried to ResetCameraClippingRange (both with bounds computed and not), but to no avail. Any other suggestions welcomed. Regards, Jim James C Robinson, PhD, Chartered Engineer, + 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 - j.robinson at kepler-systems.com ------------------------------------------------------------------------------ From: John Biddiscombe [mailto:jbiddiscombe at skippingmouse.co.uk] Sent: 11 August 2004 12:20 To: j.robinson at kepler-systems.com; Vtk Users Subject: Re: [vtkusers] Clipping Planes After calling AddDisplacement(...) you are calling resetCameralippingRage() yes? If not. try it. JB ----- Original Message ----- From: James Robinson To: Vtk Users Sent: Wednesday, August 11, 2004 11:24 AM Subject: [vtkusers] Clipping Planes Dear All, I am having trouble (again) with clipping planes. I am trying to create a viewer to view results of an FE analysis. Part of the results are the displacements at the nodes of the finite element mesh. I read in the FE mesh into a vtkUnstructuredGrid with the displacements as a vector field. I then create a displaced geometry by adding them to the vtkUnstructuredGrid geometry as follows: void CSampleDoc::AddDisplacement(float factor) { vtkFloatArray *pDisplacement = (vtkFloatArray*)this->pUnstructuredGrid->GetPointData()->GetVectors() ; vtkPoints* pNodalGeometry = this->pUnstructuredGrid->GetPoints() ; if (pDisplacement==NULL) { AfxMessageBox("No displacement set") ; return ; } float newcoords[3] ; float* x ; float* delta ; for (int i = 0; i < pNodalGeometry->GetNumberOfPoints(); i++) { x = pNodalGeometry->GetPoint(i) ; delta = pDisplacement->GetTuple(i) ; for (int j = 0; j < 3; j++) { newcoords[j] = x[j] + factor*delta[j] ; } pNodalGeometry->SetPoint(i,newcoords) ; } this->pUnstructuredGrid->Update() ; this->pGeometry->SetInput(pUnstructuredGrid) ; this->pMeshMapper->SetInput(pGeometry->GetOutput()); this->pMeshMapper->Update() ; this->pMeshActor->SetMapper(this->pMeshMapper) ; } This works (with some other quirky behaviour which I have circumvented). But a problem that I am having difficulty with is that the clipping planes remain as if the geometry hadn't been altered. Thus, as I rotate the object (in trackball camera mode) the displaced object disappears. I have checked the bounds of the viewable objects (using Renderer->ComputeVisiblePropBounds(bounds) ;) and they are unaltered - thus all the AutoClipping is thrown out of whack. It may very well be that (a) I am doing things that are not meant to be catered for in vtk or (b) there is a better (preferably simpler) way of achieving this effect. All suggestions gratefully welcomed. Jim James C Robinson, PhD, Chartered Engineer, + 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 - j.robinson at kepler-systems.com ---------------------------------------------------------------------------- _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at cdnorthamerica.com Wed Aug 11 07:52:37 2004 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Wed, 11 Aug 2004 07:52:37 -0400 Subject: [vtkusers] Clipping Planes In-Reply-To: <20040811114029.0BDB019FF9@public.kitware.com> References: <20040811114029.0BDB019FF9@public.kitware.com> Message-ID: <411A0885.7030809@cdnorthamerica.com> Hi James. Have you tried vtkWarpVector instead of manually shifting your points? If you still have problems with the clipping range, it at least takes your code out of the loop. -Jeff James Robinson wrote: > John, > > Many thanks for replying. I have tried EVERYTHING. I have even tried > reloading all the props into the renderer. I have checked the altered > bounds on everything from the vtkUnstructuredGrid to the vtkPoints* > pNodalGeometry. None of the bounds are altered after the change > (which, I would imagine, is why the resetting of the clip planes has > no effect). My workaround is: > > void CSampleView::ResetCameraClippingRange(BOOL ShowDisplacement) > > { > > // float bounds[6] ; > > // Renderer->ComputeVisiblePropBounds(bounds) ; > > // Renderer->ResetCameraClippingRange() ; > > // TODO: add construction code here > > vtkInteractorStyleSwitch* pStyle = > (vtkInteractorStyleSwitch*)Interactor->GetInteractorStyle() ; > > if (ShowDisplacement) > > { > > pStyle->AutoAdjustCameraClippingRangeOff() ; > > vtkCamera* pCamera = Renderer->GetActiveCamera() ; > > pCamera->SetClippingRange(0.001, 1000.) ; // Arbitrary ? this could be > automated > > } else > > { > > pStyle->AutoAdjustCameraClippingRangeOn() ; > > } > > } > > which I call every time the displacement view option is chosen. Note > that it was at this level that I tried to ResetCameraClippingRange > (both with bounds computed and not), but to no avail. > > Any other suggestions welcomed. > > Regards, > > Jim > > *James C Robinson*, PhD, Chartered Engineer, > > + 42 Rivergrove, > > Glanmire, > > Co. Cork, > > Eire > > ' +353 21 4822028 > > +353 87 2393010 > > 6 +353 21 4822028 > > - j.robinson at kepler-systems.com > > ------------------------------------------------------------------------ > > *From:* John Biddiscombe [mailto:jbiddiscombe at skippingmouse.co.uk] > *Sent:* 11 August 2004 12:20 > *To:* j.robinson at kepler-systems.com; Vtk Users > *Subject:* Re: [vtkusers] Clipping Planes > > After calling AddDisplacement(...) you are calling > resetCameralippingRage() yes? If not. try it. > > JB > > ----- Original Message ----- > > *From:* James Robinson > > *To:* Vtk Users > > *Sent:* Wednesday, August 11, 2004 11:24 AM > > *Subject:* [vtkusers] Clipping Planes > > Dear All, > > I am having trouble (again) with clipping planes. I am trying to > create a viewer to view results of an FE analysis. Part of the > results are the displacements at the nodes of the finite element > mesh. I read in the FE mesh into a vtkUnstructuredGrid with the > displacements as a vector field. I then create a displaced > geometry by adding them to the vtkUnstructuredGrid geometry as > follows: > > void CSampleDoc::AddDisplacement(float factor) > > { vtkFloatArray *pDisplacement = > (vtkFloatArray*)this->pUnstructuredGrid->GetPointData()->GetVectors() > ; > > vtkPoints* pNodalGeometry = this->pUnstructuredGrid->GetPoints() ; > > if (pDisplacement==NULL) > > { AfxMessageBox("No displacement set") ; > > return ; > > } > > float newcoords[3] ; > > float* x ; > > float* delta ; > > for (int i = 0; i < pNodalGeometry->GetNumberOfPoints(); i++) > > { > > x = pNodalGeometry->GetPoint(i) ; > > delta = pDisplacement->GetTuple(i) ; > > for (int j = 0; j < 3; j++) > > { newcoords[j] = x[j] + factor*delta[j] ; > > } > > pNodalGeometry->SetPoint(i,newcoords) ; > > } > > this->pUnstructuredGrid->Update() ; > > this->pGeometry->SetInput(pUnstructuredGrid) ; > > this->pMeshMapper->SetInput(pGeometry->GetOutput()); > > this->pMeshMapper->Update() ; > > this->pMeshActor->SetMapper(this->pMeshMapper) ; > > } > > This works (with some other quirky behaviour which I have > circumvented). But a problem that I am having difficulty with is > that the clipping planes remain as if the geometry hadn?t been > altered. Thus, as I rotate the object (in trackball camera mode) > the displaced object disappears. I have checked the bounds of the > viewable objects (using Renderer->ComputeVisiblePropBounds(bounds) > ;) and they are unaltered ? thus all the AutoClipping is thrown > out of whack. It may very well be that (a) I am doing things that > are not meant to be catered for in vtk or (b) there is a better > (preferably simpler) way of achieving this effect. > > All suggestions gratefully welcomed. > > Jim > > *James C Robinson*, PhD, Chartered Engineer, > > + 42 Rivergrove, > > Glanmire, > > Co. Cork, > > Eire > > ' +353 21 4822028 > > +353 87 2393010 > > 6 +353 21 4822028 > > - j.robinson at kepler-systems.com > > ------------------------------------------------------------------------ > > _______________________________________________ > 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: >Follow this link to subscribe/unsubscribe: >http://www.vtk.org/mailman/listinfo/vtkusers > > From lisa.avila at kitware.com Wed Aug 11 09:11:32 2004 From: lisa.avila at kitware.com (Lisa Avila) Date: Wed, 11 Aug 2004 09:11:32 -0400 Subject: [vtkusers] Clipping Planes In-Reply-To: <20040811114029.0BDB019FF9@public.kitware.com> References: <001e01c47f95$14b69060$2901460a@miradasolutions.com> <20040811114029.0BDB019FF9@public.kitware.com> Message-ID: <6.1.1.1.2.20040811090925.02073ec0@pop.biz.rr.com> > >Many thanks for replying. I have tried EVERYTHING. I have even tried >reloading all the props into the renderer. I have checked the altered >bounds on everything from the vtkUnstructuredGrid to the vtkPoints* >pNodalGeometry. None of the bounds are altered after the change (which, I >would imagine, is why the resetting of the clip planes has no effect). My >workaround is: If your bounds are not being recomputed, then you are missing a call to Modified() somewhere - most likely down in your point data. Some of the set methods are "fast' in that they don't check bounds and they don't call Modified() - assuming that you will do this once at the end when you are done with your modifications. Lisa -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.robinson at kepler-systems.com Wed Aug 11 09:27:00 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Wed, 11 Aug 2004 14:27:00 +0100 Subject: [vtkusers] Clipping Planes In-Reply-To: <6.1.1.1.2.20040811090925.02073ec0@pop.biz.rr.com> Message-ID: <20040811132720.659E21A4E9@public.kitware.com> Dear All, Many thanks for the speed of reply. John, your point is well taken and I was aware of some strange behaviour when I did my direct altering of the vtkUnstructuredGrid geometry. Lisa, your point is in line with what John is suggesting. I had been using an Update on various things but didn't use (know of) Modified. Jeff, you hit the nail on the head. Most of my problems were because I was doing a circuitous fix to a problem that doesn't exist if I use vtkWarpVector. This is a purpose written filter that achieves essentially what I want. I implement it as follows: vtkWarpVector *pDisplacedGeometry ; vtkDataSetMapper *pDisplacedMeshMapper; vtkActor *pDisplacedMeshActor; void CSampleDoc::CreateDisplacedActor() { this->pDisplacedGeometry->SetInput(pUnstructuredGrid) ; this->pDisplacedMeshMapper->SetInput(pDisplacedGeometry->GetOutput()); // This doesn't seem to work // this->pDisplacedMeshMapper->ScalarVisibilityOn() ; this->pDisplacedMeshActor->SetMapper(this->pDisplacedMeshMapper); (this->pDisplacedMeshActor->GetProperty())->SetLineWidth(1.25) ; this->pDisplacedMeshActor->GetProperty()->SetRepresentationToWireframe() ; this->pDisplacedMeshActor->VisibilityOff(); } Note that I had wanted to display the scalar field on the wire frame displaced actor, but I can't seem to get it to work. Also, still slight strange clipping behaviour when I toggle between showing the displaced mesh and the original (even though I use a: GetView()->Renderer->ResetCameraClippingRange() ; GetView()->Invalidate() ; after changing the actor's visibility). Not the end of the world though. Regards, Jim James C Robinson, PhD, Chartered Engineer, * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com _____ From: Lisa Avila [mailto:lisa.avila at kitware.com] Sent: 11 August 2004 14:12 To: j.robinson at kepler-systems.com; 'John Biddiscombe' Cc: Vtk Users Subject: RE: [vtkusers] Clipping Planes Many thanks for replying. I have tried EVERYTHING. I have even tried reloading all the props into the renderer. I have checked the altered bounds on everything from the vtkUnstructuredGrid to the vtkPoints* pNodalGeometry. None of the bounds are altered after the change (which, I would imagine, is why the resetting of the clip planes has no effect). My workaround is: If your bounds are not being recomputed, then you are missing a call to Modified() somewhere - most likely down in your point data. Some of the set methods are "fast' in that they don't check bounds and they don't call Modified() - assuming that you will do this once at the end when you are done with your modifications. Lisa -------------- next part -------------- An HTML attachment was scrubbed... URL: From chouyiyu at hotmail.com Wed Aug 11 11:58:02 2004 From: chouyiyu at hotmail.com (Yi-Yu Chou) Date: Wed, 11 Aug 2004 15:58:02 +0000 Subject: [vtkusers] How to set four independent lookup functions for RGBA ? Message-ID: Hi vtk users : I am trying to build a lookup table with four independent lookup functions for RGBA components. I have tried vtkColorTransferFunction, but it seems not flexilble enough for me. Because it can't be used to build independent lookup functions for RGBA, and it only deal with RGB components. How should I do ? Any suggestions would be appreciated !!!!! Thanks in advance. Yi-Yu _________________________________________________________________ ???? MSN ??????????????? http://www.msn.com.tw/english/ From pallavi.joshi at vanderbilt.edu Wed Aug 11 12:21:49 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Wed, 11 Aug 2004 11:21:49 -0500 Subject: [vtkusers] vtkTransform rotation ? Message-ID: <001301c47fbf$4e2f4ba0$da593b81@Pallavi> Hi All, I was wondering whether the positive rotations are in clockwise or anti clockwise direction in vtkTransform ? Can anybody help me please ? thanks, Pallavi -------------- next part -------------- An HTML attachment was scrubbed... URL: From arbvtk at yahoo.fr Wed Aug 11 03:48:12 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Wed, 11 Aug 2004 09:48:12 +0200 (CEST) Subject: [vtkusers] Why vtkAbstractTransform don't use vtkCriticalSection instead of vtkSimpleCriticalSection ? In-Reply-To: Message-ID: <20040811074812.71630.qmail@web25201.mail.ukl.yahoo.com> David Gobbi wrote: A vtkSimpleCriticalSection takes up a few bytes less (100 or so?) than a vtkCriticalSection, specifically because it is not a subclass of vtkObject. My test shows that it saves 24 bytes (52 - 28). But my question is : what is vtkCriticalSection for ? Why don't use only vtkSimpleCriticalSection and remove / replace vtkCriticalSection ? When should we use vtkCriticalSection ? Aur?lien REGAT-BARREL --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtk at scil.sinp.msu.ru Wed Aug 11 12:40:05 2004 From: vtk at scil.sinp.msu.ru (vtk at scil.sinp.msu.ru) Date: Wed, 11 Aug 2004 20:40:05 +0400 (MSD) Subject: [vtkusers] Backface wireframe color In-Reply-To: <001301c47fbf$4e2f4ba0$da593b81@Pallavi> References: <001301c47fbf$4e2f4ba0$da593b81@Pallavi> Message-ID: Hi! Once again. Is it possible to set up a backface color in a wireframe mode for polygons? Thanx! From cvolpe at ara.com Wed Aug 11 12:47:38 2004 From: cvolpe at ara.com (Chris Volpe) Date: Wed, 11 Aug 2004 12:47:38 -0400 Subject: [vtkusers] Why vtkAbstractTransform don't use vtkCriticalSectioninstead of vtkSimpleCriticalSection ? Message-ID: One advantage of vtkCriticalSection is that it is accessible from the script level. However, since I intended it as a higher-performance alternative to vtkMutexLock, that's clearly a weak argument. As for why vtkSimpleCriticalSection is a separate non-vtkObject-derived class, I suppose I was mimicking the architecture of vtkMutexLock, which has a similar structure. It's been a few years, so that's the best explanation I can give right now. Chris -- Christopher R. Volpe, Ph.D. Senior Scientist Email: cvolpe at ara.com Applied Research Associates, Inc. Voice: 919-582-3380 8540 Colonnade Center Dr., Ste 301 Fax: 919-878-3672 Raleigh, NC 27615 Web: www.ara.com -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of REGAT-BARREL Aur?lien Sent: Wednesday, August 11, 2004 3:48 AM To: David Gobbi Cc: VTK Subject: Re: [vtkusers] Why vtkAbstractTransform don't use vtkCriticalSectioninstead of vtkSimpleCriticalSection ? David Gobbi wrote: A vtkSimpleCriticalSection takes up a few bytes less (100 or so?) than a vtkCriticalSection, specifically because it is not a subclass of vtkObject. My test shows that it saves 24 bytes (52 - 28). But my question is : what is vtkCriticalSection for ? Why don't use only vtkSimpleCriticalSection and remove / replace vtkCriticalSection ? When should we use vtkCriticalSection ? Aur?lien REGAT-BARREL _____ Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor at ucd.ie Wed Aug 11 14:22:18 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Wed, 11 Aug 2004 19:22:18 +0100 Subject: [vtkusers] Re: Backface wireframe color References: <001301c47fbf$4e2f4ba0$da593b81@Pallavi> Message-ID: It's possible but you'll have to modify vtkOpenGLProperty and vtkOpenGLPolyDataMapper so that in wireframe mode vtk renders polygons (not lines as it does now) and use glPolygonMode to change the representation. Rendering will be slower because you're rendering polys rather than lines. I've got some modified files for backface culling in wireframe mode. It used to allow backface color of wireframes but I changed it to improve the performance. I could change it back and mail it to you if you build vtk from source. hth Goodwin the link to the bug tracker for the mod code http://www.vtk.org/Bug/bug.php?op=show&bugid=644&pos=9 wrote in message news:Pine.LNX.4.60.0408112038580.3731 at scil.sinp.msu.ru... > > Hi! > > Once again. Is it possible to set up a backface color in a wireframe mode > for polygons? > > Thanx! > _______________________________________________ > 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 chouyiyu at hotmail.com Wed Aug 11 15:21:46 2004 From: chouyiyu at hotmail.com (Yi-Yu Chou) Date: Wed, 11 Aug 2004 19:21:46 +0000 Subject: [vtkusers] How to communicate between vtkPiecewiseFunction and vtkDataArray Message-ID: Dear vtk users, Is it possible to use vtkPiecewiseFunctions to build a vtkDataArray ? Please give me some ideas. Thanks a lot !!! Yi-Yu _________________________________________________________________ ??????? MSN Messenger??????????????????????! http://messenger.msn.com.tw/ From amy.henderson at kitware.com Wed Aug 11 15:27:12 2004 From: amy.henderson at kitware.com (Amy Henderson) Date: Wed, 11 Aug 2004 15:27:12 -0400 Subject: [vtkusers] How to communicate between vtkPiecewiseFunction and vtkDataArray In-Reply-To: References: Message-ID: <6.1.2.0.2.20040811152508.0342ece0@pop.biz.rr.com> Hi Yi-Yu, You can get the underlying double array from the vtkPiecewiseFunction using the GetDataPointer method. You can pass this array to a vtkDoubleArray using its SetArray method. (You will also need to fill in the size of the array and whether vtkDoubleArray is responsible for deleting the double array you passed in.) - Amy At 03:21 PM 8/11/2004, Yi-Yu Chou wrote: >Dear vtk users, > >Is it possible to use vtkPiecewiseFunctions to build a vtkDataArray ? >Please give me some ideas. >Thanks a lot !!! > >Yi-Yu > >_________________________________________________________________ >?U?????s?????? MSN Messenger?G?M?B???b?u?W?????A???????????????????F???N! >http://messenger.msn.com.tw/ >_______________________________________________ >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 chouyiyu at hotmail.com Wed Aug 11 16:58:52 2004 From: chouyiyu at hotmail.com (Yi-Yu Chou) Date: Wed, 11 Aug 2004 20:58:52 +0000 Subject: [vtkusers] How to communicate between vtkPiecewiseFunctionand vtkDataArray Message-ID: Dear Amy, Thanks for your replying, but I encountered a weired problem.... I can't use GetDataPointer method !!!!! In my code, I set : r_fun = vtkPiecewiseFunction() r_fun.AddPoint(0, 0) r_fun.AddPoint(255, 1) r_pt = r_fun.GetDataPointer() When I ran it under vtk4.2 with python 2.3, it appeared an error message : r_fun.GetDataPointer() AttributeError: GetDataPointer Do you now what's going wrong ????? >From: Amy Henderson >To: vtkusers at vtk.org >Subject: Re: [vtkusers] How to communicate between vtkPiecewiseFunctionand vtkDataArray >Date: Wed, 11 Aug 2004 15:27:12 -0400 > >Hi Yi-Yu, > >You can get the underlying double array from the >vtkPiecewiseFunction using the GetDataPointer method. You can pass >this array to a vtkDoubleArray using its SetArray method. (You will >also need to fill in the size of the array and whether >vtkDoubleArray is responsible for deleting the double array you >passed in.) > >- Amy > >At 03:21 PM 8/11/2004, Yi-Yu Chou wrote: >>Dear vtk users, >> >>Is it possible to use vtkPiecewiseFunctions to build a vtkDataArray >>? >>Please give me some ideas. >>Thanks a lot !!! >> >>Yi-Yu >> >>_________________________________________________________________ >>??????? MSN >>Messenger??????????????????????! >>http://messenger.msn.com.tw/ >>_______________________________________________ >>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: > >Follow this link to subscribe/unsubscribe: >http://www.vtk.org/mailman/listinfo/vtkusers _________________________________________________________________ ?? MSN ???????????????????? http://groups.msn.com?pgmarket=zh-tw From tuncay at ee.bilkent.edu.tr Thu Aug 12 00:04:15 2004 From: tuncay at ee.bilkent.edu.tr (tuncay at ee.bilkent.edu.tr) Date: Thu, 12 Aug 2004 00:04:15 EEST Subject: [vtkusers] vtkImplicitPolyData Message-ID: Hi everybody, Has anyone used vtkImplicitPolyData class(not part of vtk) to do boolean operations on polydata? When i tried to use it my compiler gave error saying that vtkImplicitPolyData is an abstract type and denied New() operator. But its examples use it. Have you encountered this error? Maybe i've found an older version. I'd be happy if someone could share the newest version? I couldn't find a download link at its page. Thanks very much. Tuncay From jcplatt at lineone.net Wed Aug 11 17:41:33 2004 From: jcplatt at lineone.net (John Platt) Date: Wed, 11 Aug 2004 22:41:33 +0100 Subject: [vtkusers] Fixed size vtkTensorGlyph with camera zoom Message-ID: <000001c47feb$f95b7860$204b2850@pacsys4> Hi Users, I am using vtkTensorGlyph to display axis sets at various points in an unstructured grid. Is there an easy way to stop the size of the glyphs changing as the camera is zoomed (like 2D text)? Many thanks. John. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.robinson at kepler-systems.com Wed Aug 11 19:24:50 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Thu, 12 Aug 2004 00:24:50 +0100 Subject: [vtkusers] quad hexes Message-ID: <20040811232457.2268A1A71E@public.kitware.com> Dear All, Is there a filter in the VTK library to transform a 20 noded (quadratic) hexahedron into eight linear (8 noded) hexahedra? I ask because I have never got some of the features (e.g. vtkCutter etc.) to work with the quad hexes, but they work perfectly with the linear hexes. I can do the transformation myself, but a ready made solution would be better. Regards, Jim James C Robinson, PhD, Chartered Engineer, * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From yxliu at fudan.edu.cn Wed Aug 11 22:15:41 2004 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Thu, 12 Aug 2004 10:15:41 +0800 Subject: [vtkusers] How to communicate between Message-ID: <001b01c48012$44839fe0$1f64a8c0@YXLIU> Hi, I test it in VC, float * r_pt = r_fun->GetDataPointer(); it's Ok. -------------- next part -------------- An HTML attachment was scrubbed... URL: From yxliu at fudan.edu.cn Wed Aug 11 23:47:57 2004 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Thu, 12 Aug 2004 11:47:57 +0800 Subject: [vtkusers] a very strange question about mesh visualization Message-ID: <000a01c4801f$2837e5f0$1f64a8c0@YXLIU> Hi, I intend to visualize a 3D tetrahedron mesh which is read from a file. The ID of the point in the poin set of the meh is from 1. It should begin from 0, but I do not change it. Firstly, I use the VTK4.2 setup version which use the debug single threaded run time lib to visualize it. it is OK. Because I want to use the debug multithreaded dll run time lib, I compile the source code of the Vtk4.2 and set the debug multithreaded dll run time lib in the project setting in MSVC6.0. However, when I want to visualize the same mesh, I see nothing. Only when I change the beginnig ID of the Point in the point set from 1 to 0, can I see the mesh in the render window. This make me very puzzeld. I only change the setup version to the recomiler version and change the run time lib. What is the different between them? Why a program running correctly in the setup version can not run in the other version? Hope your help! Best regards, Yixun Liu -------------- next part -------------- An HTML attachment was scrubbed... URL: From joeri_vtk at hotmail.com Wed Aug 11 06:54:08 2004 From: joeri_vtk at hotmail.com (Joeri Nicolaes) Date: Wed, 11 Aug 2004 12:54:08 +0200 Subject: [vtkusers] vtkImageDataToTkPhoto documentation Message-ID: Hi all, Does anyone know where to find some documentation on vtkImageDataToTkPhoto ?? I found an example (OrthogonalPlanesWithTkPhoto.tcl from C:\vtk42\Examples\GUI\Tcl) in Tcl but I want to manipulate it know. Does anyone know if there exists a possibility to put multiple (eg 3) "vtkImageViewer2 viewer" objects into a (Tk) grid in order to achieve the same result as with vtkImageDataToTkPhoto but to have more degrees of freedom? thx, Joeri Nicolaes -------------- next part -------------- An HTML attachment was scrubbed... URL: From I.deBoer at polytec.de Thu Aug 12 02:56:35 2004 From: I.deBoer at polytec.de (de Boer Ingo) Date: Thu, 12 Aug 2004 08:56:35 +0200 Subject: [vtkusers] MFC MDI Examples Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD90144FEEB@02polywbr.waldbronn.polytec.de> Hi, > I have tried the new codes against VTK4.21 and VC++6.0. > vtkMDI and vtkSDI will be crash after I exit the appllication. Which graphic card do you use ? > Maybe VTK4.4 has fixed it. I feel some confusion with SetWindowId and > SetParentId. Sholud we use them both or just use SetParentId? > What's difference between them? It depends... On a window you allready have or if it should be created by VTK. > Can we find a simple way to add focus hint by mouse? > (changing interact style is a big deal) Any suggestions are welcome. > hold vtkRenderWindow. Can CEdit get double click event? I think so > Maybe we can define our custom control from scratch to hold > vtkRenderWindow and enable double click in the windows style. I just wanted it to be as simple as it can be and give the most possibilities. 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 ursula.goette at philips.com Thu Aug 12 03:27:13 2004 From: ursula.goette at philips.com (ursula.goette at philips.com) Date: Thu, 12 Aug 2004 09:27:13 +0200 Subject: [vtkusers] Need help Message-ID: Hi everyone. I do have the following problem. I do have a file in vtk format that contains information about an unstructured grid. For the POINT_DATA I do have two scalar arrays defined in this file: SCALARS pressure float and SCALARS shearstress float I am trying to read this file in with the vtkDataSetReader but this always loses one of the two scalar arrays. What do I do wrong? How can I prevent this? I do really need both scalar arrays in the unstructured grid I am putting the output of the vtkDataSetReader to. Thanks for your help in advance, Ursula From seafloat11 at 163.com Thu Aug 12 04:18:12 2004 From: seafloat11 at 163.com (=?gb2312?B?SmF3Ymlu?=) Date: Thu, 12 Aug 2004 16:18:12 +0800 (CST) Subject: [vtkusers] help Message-ID: <411B27C4.000057.12541@m177.163.com> Dear all: I want to do a task parallelism program, which uses two tasks to render in a window respectively. But I don't konw how to composite the two image to let them in one render window. Can you help me. Thank you very much. ------------------------------------------------------------------------------------- 15??????,???II--D451?2466/D353?2399 http://design.163.com/aocmonitor/index.html From jamie.vicary at mansf.ox.ac.uk Thu Aug 12 08:42:41 2004 From: jamie.vicary at mansf.ox.ac.uk (Jamie Vicary) Date: Thu, 12 Aug 2004 13:42:41 +0100 Subject: [vtkusers] Viewing an arbitrary .vtk Message-ID: <411B65C1.6050907@mansf.ox.ac.uk> Dear all, I have a program which will need to create diverse kinds of output, and I would like to exploit the .vtk file format's flexibility to represent this data. The output will consist of two- or three-dimensional volumes, either structured or unstructured, with possibly boolean, integer or floating point values at each coordinate. I am having trouble finding a lightweight and flexible "vtk viewer" with which I can - preferably in an automatated (ie scriptable) fashion - render my output. I will want to be able to update the rendered image on-the-fly as updated data files become available, and will want to be able to produce lightweight .jpg (or similar) "snapshots" of my output. Does there exist anything that will do what I want? Many thanks, Jamie Vicary From morrison at cs.queensu.ca Thu Aug 12 08:58:03 2004 From: morrison at cs.queensu.ca (Melissa Morrison) Date: Thu, 12 Aug 2004 08:58:03 -0400 (EDT) Subject: [vtkusers] Getting normals from vtkPolyData and accessing coordinates Message-ID: I have been working on a problem for some time now, and was hoping that someone will be able to shed some light on the situation. My goal is to find the normals for some poly data, and pass the normals into an array so that I can access each x-coordinate, y-coordinate and z-coordinate for every normal for each vertex in the polydata. Can anyone help?? Thanks. From p.aussems at skynet.be Thu Aug 12 09:02:41 2004 From: p.aussems at skynet.be (Patrice Aussems) Date: Thu, 12 Aug 2004 15:02:41 +0200 Subject: [vtkusers] VTK, Qt,VtkQt and stereoRendering Message-ID: <1092315761.7607.8.camel@grafix.montefiore.ulg.ac.be> Hi, I'm using Qt, Vtk and the VtkQt-library of Denis Shamoni (I got the same problem when I use the Matthis Koenig version) to create an application that support stereo Rendering. When I exectute the renwin->StereoCapableWindowOn() method I got this following error : Warning: In /local/src/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 404 vtkXOpenGLRenderWindow (0x8286ff4): Requesting a StereoCapableWindow must be performed before the window is realized, i.e. before a render. I know that i have to execute this method before the window is rendered but i did not use render() in the source code before. here is a part of my source code : QApplication app( argc, argv ); QWidget *widg1 = new QWidget; widg1->resize(1000, 500); widg1->show(); ren2 = vtkRenderer::New(); ren2->AddActor(outlineActorl); ren2->AddVolume(newvollost); ren2->SetBackground(1,1,1); ren2->SetActiveCamera(Cameralost); renwin2 = new vtkQtRenderWindow(); renwin2->StereoCapableWindowOn(); renwin2->AddRenderer(ren2); renwin2->show(); Can anybody help me?? Regards, Patrice Aussems From andy.cedilnik at kitware.com Thu Aug 12 09:12:21 2004 From: andy.cedilnik at kitware.com (Andy Cedilnik) Date: Thu, 12 Aug 2004 09:12:21 -0400 Subject: [vtkusers] Re: Wiki Contribution In-Reply-To: References: <20040810114352.274C71928E@public.kitware.com> Message-ID: <1092316341.4169.137.camel@andoria> Hi Goodwin, On Tue, 2004-08-10 at 11:36, Goodwin Lawlor wrote: > Should people just use their "user" pages to contribute, find a place in a > current page, or create their own pages? I suspect if people want to describe something that does not really fit anywhere, they could use their User page. That said, adding information to other places is probably the way to go. Also, make sure not to post things that should really go to the list. > If I remember correctly, the idea of the wiki was to document how people > were using vtk classes to accomplish specific tasks... like visualizing > unstructured grids of hex's. ... > It looks like the convention is that all VTK wiki pages begin with "VTK_" . > Is that so? Are there any other conventions that contributors should know > about? Well, for now, all VTK pages should start with VTK_, avoid adding new pages if there is already page with related content, put summary next to the comments, etc. I guess I do not have to mention to first check faq, web pages, or the rest of the Wiki. Also, please no spam or any kind of offensive posts. > To create a new page, just add the article title onto the base url (with > underscores for spaces). So to create a new article called "VTK Getting > Started", type " http://www.vtk.org/Wiki/VTK_Getting_Started " into a > browser and you'll be brought to a new, empty page that can be edited. > There's never a dead link in a wiki... only pages that haven't been written > yet (that sounds like an Irish proverb!?). You are right. > These pages are helpful to start off: > http://meta.wikimedia.org/wiki/Help:Starting_a_new_page > http://meta.wikimedia.org/wiki/Help:Editing When editing a page, there is a link at the bottom called "Editing help". It actually points to: http://www.vtk.org/Wiki/KitwarePublic:How_does_one_edit_a_page I will add more info and convention things when they solidify. Please follow those guidelines. > Anyway, thanks to kitware for setting the wiki up and Prabhu for the inital > idea For any question about Wiki, please do not hesitate to ask. Andy Cedilnik Kitware Inc. From sean at millwood.ca Thu Aug 12 09:49:10 2004 From: sean at millwood.ca (Sean Richards) Date: Thu, 12 Aug 2004 09:49:10 -0400 (EDT) Subject: [vtkusers] ICP and Transforms Message-ID: <8777862.1092318550845.JavaMail.sean@millwood.ca> Hello all! :) I am trying to use vtkIterativeClosestPointTransform, but seem to be having a hard time getting used to it. I started by trying to use regular planes to test the algorithm, but can't seem to get it to work. Below is the code and output I get when I execute the code. Any help would be very much appreciated. Thanks in advance! Sean ******************************************** **** THE CODE **** ******************************************** vtkPlaneSource *plane0 = vtkPlaneSource::New(); plane0->SetResolution(25, 25); plane0->SetOrigin(-1,-1,0); plane0->SetPoint1(1,-1,0); plane0->SetPoint2(-1,1,0); vtkPlaneSource *plane1 = vtkPlaneSource::New(); plane1->SetResolution(25, 25); plane1->SetOrigin(-1,-1,1); plane1->SetPoint1(1,-1,1); plane1->SetPoint2(-1,1,1); vtkIterativeClosestPointTransform *icp = vtkIterativeClosestPointTransform::New(); icp->SetCheckMeanDistance(1); icp->SetMaximumMeanDistance(0.001); icp->SetMaximumNumberOfIterations(30); icp->SetMaximumNumberOfLandmarks(50); icp->SetSource((vtkDataSet *)plane0->GetOutput()); icp->SetTarget((vtkDataSet *)plane1->GetOutput()); // debug output cout << "Number of Source Points: " << icp->GetSource()->GetNumberOfPoints() << "\n"; cout << "Number of Target Points: " << icp->GetTarget()->GetNumberOfPoints() << "\n"; icp->Modified(); icp->Update(); cout << "\n\nOutput from icp->PrintSelf(cout, 0);\n\n"; icp->PrintSelf(cout, 0); vtkAbstractTransform *transform = icp->MakeTransform(); cout << "\n\nOutput from transform->Print(cout);\n\n"; transform->Print(cout); ******************************************** **** THE OUTPUT **** ******************************************** ******** This output is in the vtkOutputWindow ******** ERROR: In \thesisroot\Vtk\Hybrid\vtkIterativeClosestPointTransform.cxx, line 271 vtkIterativeClosestPointTransform (00336E00): Can't execute with NULL or empty input ******** This output is in the console window ******** Number of Source Points: 0 Number of Target Points: 0 Output from icp->PrintSelf(cout, 0); Debug: Off Modified Time: 50 Reference Count: 1 Registered Events: (none) Inverse: (00000000) Matrix: (00336F98) Debug: Off Modified Time: 41 Reference Count: 1 Registered Events: (none) Elements: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Source: 00336238 Target: 00336998 Locator: (none) MaximumNumberOfIterations: 30 CheckMeanDistance: 1 MeanDistanceMode: RMS MaximumMeanDistance: 0.001 MaximumNumberOfLandmarks: 50 StartByMatchingCentroids: 0 NumberOfIterations: 0 MeanDistance: 0 LandmarkTransform: Debug: Off Modified Time: 42 Reference Count: 1 Registered Events: (none) Inverse: (00000000) Matrix: (00337208) Debug: Off Modified Time: 43 Reference Count: 1 Registered Events: (none) Elements: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Mode: Similarity SourceLandmarks: 00000000 TargetLandmarks: 00000000 Output from transform->Print(cout); vtkIterativeClosestPointTransform (00337568) Debug: Off Modified Time: 55 Reference Count: 1 Registered Events: (none) Inverse: (00000000) Matrix: (00337770) Debug: Off Modified Time: 54 Reference Count: 1 Registered Events: (none) Elements: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Source: (none) Target: (none) Locator: (none) MaximumNumberOfIterations: 50 CheckMeanDistance: 0 MeanDistanceMode: RMS MaximumMeanDistance: 0.01 MaximumNumberOfLandmarks: 200 StartByMatchingCentroids: 0 NumberOfIterations: 0 MeanDistance: 0 LandmarkTransform: Debug: Off Modified Time: 55 Reference Count: 1 Registered Events: (none) Inverse: (00000000) Matrix: (003379E0) Debug: Off Modified Time: 56 Reference Count: 1 Registered Events: (none) Elements: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Mode: Similarity SourceLandmarks: 00000000 TargetLandmarks: 00000000 From chouyiyu at hotmail.com Thu Aug 12 10:43:33 2004 From: chouyiyu at hotmail.com (Yi-Yu Chou) Date: Thu, 12 Aug 2004 14:43:33 +0000 Subject: [vtkusers] GetDataPointer method not wrapped ???? Message-ID: Hi all vtk users, I tried to use GetDataPointer method under vtkPiecewiseFunction, but I found the method is not wrapped. Does anyone get the same problem before ? I am using vtk4.2 (compiled from the source code under Linux) with python 2.3. Thanks in advance !!!! Yi-Yu _________________________________________________________________ ???? MSN ??????????????? http://www.msn.com.tw/english/ From sean at millwood.ca Thu Aug 12 10:58:49 2004 From: sean at millwood.ca (Sean Richards) Date: Thu, 12 Aug 2004 10:58:49 -0400 (EDT) Subject: [vtkusers] ICP and Transforms Message-ID: <21595739.1092322729736.JavaMail.sean@millwood.ca> My problem is not that the transformation is not being applied, the problem is that the transformation is not being created. Even though I have added the planes as the source and target, the ICPTransform says that the inputs are null (due to the fact that they have no points). Do I actually have to create points from the surface of the planes in order to use vtkICPTransform? If this is the case, how would I create a point set from vtkPolyData? Thanks! Sean > vtkICPTransform only calculates the optimal > transform for mapping the > source onto the target. It doesn't actually > apply it to anything. > Once you've hooked vtkICPTransform into your > pipeline, you need to use > vtkTransformFilter to actually apply it to a > dataset (your source data > usually). Since vtkICPTransform is a subclass > of vtkTransform, you can > set it as the transform for > vtkTrnasformFilter. You don't need to call > 'MakeTransform'. > Attached is a demo (hit 'u' to iterate the > source points towards their > target). > HTH > Bryan > On Thu, 2004-08-12 at 14:49, Sean Richards > wrote: > > Hello all! :) > > > > I am trying to use > vtkIterativeClosestPointTransform, but seem to > be having a hard time getting used to it. I > started by trying to use regular planes to > test the algorithm, but can't seem to get it > to work. Below is the code and output I get > when I execute the code. Any help would be > very much appreciated. > > > > Thanks in advance! > > > > Sean > > > > ******************************************** > > **** THE CODE **** > > ******************************************** > > > > vtkPlaneSource *plane0 = > vtkPlaneSource::New(); > > plane0->SetResolution(25, 25); > > plane0->SetOrigin(-1,-1,0); > > plane0->SetPoint1(1,-1,0); > > plane0->SetPoint2(-1,1,0); > > > > vtkPlaneSource *plane1 = > vtkPlaneSource::New(); > > plane1->SetResolution(25, 25); > > plane1->SetOrigin(-1,-1,1); > > plane1->SetPoint1(1,-1,1); > > plane1->SetPoint2(-1,1,1); > > > > vtkIterativeClosestPointTransform *icp = > vtkIterativeClosestPointTransform::New(); > > > > icp->SetCheckMeanDistance(1); > > icp->SetMaximumMeanDistance(0.001); > > icp->SetMaximumNumberOfIterations(30); > > icp->SetMaximumNumberOfLandmarks(50); > > > > icp->SetSource((vtkDataSet > *)plane0->GetOutput()); > > icp->SetTarget((vtkDataSet > *)plane1->GetOutput()); > > > > // debug output > > cout << "Number of Source Points: " << > icp->GetSource()->GetNumberOfPoints() << "\n"; > > cout << "Number of Target Points: " << > icp->GetTarget()->GetNumberOfPoints() << "\n"; > > > > icp->Modified(); > > icp->Update(); > > > > cout << "\n\nOutput from > icp->PrintSelf(cout, 0);\n\n"; > > icp->PrintSelf(cout, 0); > > > > vtkAbstractTransform *transform = > icp->MakeTransform(); > > cout << "\n\nOutput from > transform->Print(cout);\n\n"; > > transform->Print(cout); > > > > ******************************************** > > **** THE OUTPUT **** > > ******************************************** > > > > ******** > > This output is in the vtkOutputWindow > > ******** > > > > ERROR: In > > > \thesisroot\Vtk\Hybrid\vtkIterativeClosestPointTransform.cxx, line 271 > > vtkIterativeClosestPointTransform > (00336E00): Can't execute with NULL or empty > input > > > > ******** > > This output is in the console window > > ******** > > > > Number of Source Points: 0 > > Number of Target Points: 0 > > > > > > Output from icp->PrintSelf(cout, 0); > > > > Debug: Off > > Modified Time: 50 > > Reference Count: 1 > > Registered Events: (none) > > Inverse: (00000000) > > Matrix: (00336F98) > > Debug: Off > > Modified Time: 41 > > Reference Count: 1 > > Registered Events: (none) > > Elements: > > 1 0 0 0 > > 0 1 0 0 > > 0 0 1 0 > > 0 0 0 1 > > Source: 00336238 > > Target: 00336998 > > Locator: (none) > > MaximumNumberOfIterations: 30 > > CheckMeanDistance: 1 > > MeanDistanceMode: RMS > > MaximumMeanDistance: 0.001 > > MaximumNumberOfLandmarks: 50 > > StartByMatchingCentroids: 0 > > NumberOfIterations: 0 > > MeanDistance: 0 > > LandmarkTransform: > > Debug: Off > > Modified Time: 42 > > Reference Count: 1 > > Registered Events: (none) > > Inverse: (00000000) > > Matrix: (00337208) > > Debug: Off > > Modified Time: 43 > > Reference Count: 1 > > Registered Events: (none) > > Elements: > > 1 0 0 0 > > 0 1 0 0 > > 0 0 1 0 > > 0 0 0 1 > > Mode: Similarity > > SourceLandmarks: 00000000 > > TargetLandmarks: 00000000 > > > > > > Output from transform->Print(cout); > > > > vtkIterativeClosestPointTransform (00337568) > > Debug: Off > > Modified Time: 55 > > Reference Count: 1 > > Registered Events: (none) > > Inverse: (00000000) > > Matrix: (00337770) > > Debug: Off > > Modified Time: 54 > > Reference Count: 1 > > Registered Events: (none) > > Elements: > > 1 0 0 0 > > 0 1 0 0 > > 0 0 1 0 > > 0 0 0 1 > > Source: (none) > > Target: (none) > > Locator: (none) > > MaximumNumberOfIterations: 50 > > CheckMeanDistance: 0 > > MeanDistanceMode: RMS > > MaximumMeanDistance: 0.01 > > MaximumNumberOfLandmarks: 200 > > StartByMatchingCentroids: 0 > > NumberOfIterations: 0 > > MeanDistance: 0 > > LandmarkTransform: > > Debug: Off > > Modified Time: 55 > > Reference Count: 1 > > Registered Events: (none) > > Inverse: (00000000) > > Matrix: (003379E0) > > Debug: Off > > Modified Time: 56 > > Reference Count: 1 > > Registered Events: (none) > > Elements: > > 1 0 0 0 > > 0 1 0 0 > > 0 0 1 0 > > 0 0 0 1 > > Mode: Similarity > > SourceLandmarks: 00000000 > > TargetLandmarks: 00000000 From tfogal at apollo.sr.unh.edu Thu Aug 12 11:00:28 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Thu, 12 Aug 2004 11:00:28 -0400 Subject: [vtkusers] Viewing an arbitrary .vtk In-Reply-To: Your message of "Thu, 12 Aug 2004 13:42:41 BST." <411B65C1.6050907@mansf.ox.ac.uk> References: <411B65C1.6050907@mansf.ox.ac.uk> Message-ID: <200408121500.i7CF0S8N004953@apollo.sr.unh.edu> Have you taken a look at mayavi? http://mayavi.sourceforge.net/ Sounds like exactly what you're looking for to me. Even better, the author reads this list so you can pester him with questions :P -tom <411B65C1.6050907 at mansf.ox.ac.uk>Jamie Vicary writes: >Dear all, > > I have a program which will need to create diverse kinds of output, >and I would like to exploit the .vtk file format's flexibility to >represent this data. The output will consist of two- or >three-dimensional volumes, either structured or unstructured, with >possibly boolean, integer or floating point values at each coordinate. > > I am having trouble finding a lightweight and flexible "vtk viewer" >with which I can - preferably in an automatated (ie scriptable) fashion >- render my output. I will want to be able to update the rendered image >on-the-fly as updated data files become available, and will want to be >able to produce lightweight .jpg (or similar) "snapshots" of my output. > > Does there exist anything that will do what I want? > > Many thanks, > > Jamie Vicary > >_______________________________________________ >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 arbvtk at yahoo.fr Thu Aug 12 11:37:01 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Thu, 12 Aug 2004 17:37:01 +0200 (CEST) Subject: [vtkusers] Re: Wiki Contribution In-Reply-To: <1092316341.4169.137.camel@andoria> Message-ID: <20040812153701.16673.qmail@web25206.mail.ukl.yahoo.com> Hi, Where can we get the list of all the pages ? And how the "discussion" page works ? Should we write out name before our text and append it to the previous one ? Greets. Aur?lien REGAT-BARREL My VTK blog --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From chouyiyu at hotmail.com Thu Aug 12 12:28:04 2004 From: chouyiyu at hotmail.com (Yi-Yu Chou) Date: Thu, 12 Aug 2004 16:28:04 +0000 Subject: [vtkusers] How to communicate between vtkPiecewiseFunctionand vtkDataArray Message-ID: Dear Amy, Because python doesn't support pointer, I can't use GetDataPointer method in my program.... In this situation I must setup a piecewise function for the data array without using vtkPiecewiseFunction. Do you have any idea about how to do it ? Thanks in advance !!!! Best, Yi-Yu >From: Amy Henderson >To: vtkusers at vtk.org >Subject: Re: [vtkusers] How to communicate between vtkPiecewiseFunctionand vtkDataArray >Date: Wed, 11 Aug 2004 15:27:12 -0400 > >Hi Yi-Yu, > >You can get the underlying double array from the >vtkPiecewiseFunction using the GetDataPointer method. You can pass >this array to a vtkDoubleArray using its SetArray method. (You will >also need to fill in the size of the array and whether >vtkDoubleArray is responsible for deleting the double array you >passed in.) > >- Amy > >At 03:21 PM 8/11/2004, Yi-Yu Chou wrote: >>Dear vtk users, >> >>Is it possible to use vtkPiecewiseFunctions to build a vtkDataArray >>? >>Please give me some ideas. >>Thanks a lot !!! >> >>Yi-Yu >> >>_________________________________________________________________ >>??????? MSN >>Messenger??????????????????????! >>http://messenger.msn.com.tw/ >>_______________________________________________ >>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: > >Follow this link to subscribe/unsubscribe: >http://www.vtk.org/mailman/listinfo/vtkusers _________________________________________________________________ ????????????? http://go.msnserver.com/HK/46164.asp From vtk at scil.sinp.msu.ru Thu Aug 12 12:29:36 2004 From: vtk at scil.sinp.msu.ru (vtk at scil.sinp.msu.ru) Date: Thu, 12 Aug 2004 20:29:36 +0400 (MSD) Subject: [vtkusers] Re: Backface wireframe color In-Reply-To: References: <001301c47fbf$4e2f4ba0$da593b81@Pallavi> Message-ID: On Wed, 11 Aug 2004, Goodwin Lawlor wrote: > It's possible but you'll have to modify vtkOpenGLProperty and > vtkOpenGLPolyDataMapper so that in wireframe mode vtk renders polygons (not > lines as it does now) and use glPolygonMode to change the representation. It is a solution of the problem, but not so nice. Combined mode (solid and wire) is used very often. The better way is to render poly as solid (usually, making gl list), then, call the list twice: for solid face and wireframe. Also, it solves the problem of outlined figures. For now, we have duplicated (TWO) sets of points, polys etc. Insted of ONE, rendered twice (that is 10-200 times faster, I think, that separate drawing). I do not know why not to make these feature available... From bryan.cole at teraview.com Thu Aug 12 13:15:22 2004 From: bryan.cole at teraview.com (bryan cole) Date: Thu, 12 Aug 2004 18:15:22 +0100 Subject: [vtkusers] ICP and Transforms In-Reply-To: <21595739.1092322729736.JavaMail.sean@millwood.ca> References: <21595739.1092322729736.JavaMail.sean@millwood.ca> Message-ID: <1092330922.2834.29.camel@bryan.teraviewhq.local> Sorry, I should have looked at your code more closely. Looks like there's something wierd about the pipeline execution between the vtkICPT and the vtkPlaneSources: the vtkPlaneSources are not getting executed properly. If you force the vtkPlaneSources to Update() before vtkICPT, things seems to work OK. Bryan On Thu, 2004-08-12 at 15:58, Sean Richards wrote: > My problem is not that the transformation is not being applied, the problem is that the transformation is not being created. Even though I have added the planes as the source and target, the ICPTransform says that the inputs are null (due to the fact that they have no points). Do I actually have to create points from the surface of the planes in order to use vtkICPTransform? If this is the case, how would I create a point set from vtkPolyData? > > Thanks! > > Sean > > > vtkICPTransform only calculates the optimal > > transform for mapping the > > source onto the target. It doesn't actually > > apply it to anything. > > Once you've hooked vtkICPTransform into your > > pipeline, you need to use > > vtkTransformFilter to actually apply it to a > > dataset (your source data > > usually). Since vtkICPTransform is a subclass > > of vtkTransform, you can > > set it as the transform for > > vtkTrnasformFilter. You don't need to call > > 'MakeTransform'. > > Attached is a demo (hit 'u' to iterate the > > source points towards their > > target). > > HTH > > Bryan > > On Thu, 2004-08-12 at 14:49, Sean Richards > > wrote: > > > Hello all! :) > > > > > > I am trying to use > > vtkIterativeClosestPointTransform, but seem to > > be having a hard time getting used to it. I > > started by trying to use regular planes to > > test the algorithm, but can't seem to get it > > to work. Below is the code and output I get > > when I execute the code. Any help would be > > very much appreciated. > > > > > > Thanks in advance! > > > > > > Sean > > > > > > ******************************************** > > > **** THE CODE **** > > > ******************************************** > > > > > > vtkPlaneSource *plane0 = > > vtkPlaneSource::New(); > > > plane0->SetResolution(25, 25); > > > plane0->SetOrigin(-1,-1,0); > > > plane0->SetPoint1(1,-1,0); > > > plane0->SetPoint2(-1,1,0); > > > > > > vtkPlaneSource *plane1 = > > vtkPlaneSource::New(); > > > plane1->SetResolution(25, 25); > > > plane1->SetOrigin(-1,-1,1); > > > plane1->SetPoint1(1,-1,1); > > > plane1->SetPoint2(-1,1,1); > > > > > > vtkIterativeClosestPointTransform *icp = > > vtkIterativeClosestPointTransform::New(); > > > > > > icp->SetCheckMeanDistance(1); > > > icp->SetMaximumMeanDistance(0.001); > > > icp->SetMaximumNumberOfIterations(30); > > > icp->SetMaximumNumberOfLandmarks(50); > > > > > > icp->SetSource((vtkDataSet > > *)plane0->GetOutput()); > > > icp->SetTarget((vtkDataSet > > *)plane1->GetOutput()); > > > > > > // debug output > > > cout << "Number of Source Points: " << > > icp->GetSource()->GetNumberOfPoints() << "\n"; > > > cout << "Number of Target Points: " << > > icp->GetTarget()->GetNumberOfPoints() << "\n"; > > > > > > icp->Modified(); > > > icp->Update(); > > > > > > cout << "\n\nOutput from > > icp->PrintSelf(cout, 0);\n\n"; > > > icp->PrintSelf(cout, 0); > > > > > > vtkAbstractTransform *transform = > > icp->MakeTransform(); > > > cout << "\n\nOutput from > > transform->Print(cout);\n\n"; > > > transform->Print(cout); > > > > > > ******************************************** > > > **** THE OUTPUT **** > > > ******************************************** > > > > > > ******** > > > This output is in the vtkOutputWindow > > > ******** > > > > > > ERROR: In > > > > > > \thesisroot\Vtk\Hybrid\vtkIterativeClosestPointTransform.cxx, line 271 > > > vtkIterativeClosestPointTransform > > (00336E00): Can't execute with NULL or empty > > input > > > > > > ******** > > > This output is in the console window > > > ******** > > > > > > Number of Source Points: 0 > > > Number of Target Points: 0 > > > > > > > > > Output from icp->PrintSelf(cout, 0); > > > > > > Debug: Off > > > Modified Time: 50 > > > Reference Count: 1 > > > Registered Events: (none) > > > Inverse: (00000000) > > > Matrix: (00336F98) > > > Debug: Off > > > Modified Time: 41 > > > Reference Count: 1 > > > Registered Events: (none) > > > Elements: > > > 1 0 0 0 > > > 0 1 0 0 > > > 0 0 1 0 > > > 0 0 0 1 > > > Source: 00336238 > > > Target: 00336998 > > > Locator: (none) > > > MaximumNumberOfIterations: 30 > > > CheckMeanDistance: 1 > > > MeanDistanceMode: RMS > > > MaximumMeanDistance: 0.001 > > > MaximumNumberOfLandmarks: 50 > > > StartByMatchingCentroids: 0 > > > NumberOfIterations: 0 > > > MeanDistance: 0 > > > LandmarkTransform: > > > Debug: Off > > > Modified Time: 42 > > > Reference Count: 1 > > > Registered Events: (none) > > > Inverse: (00000000) > > > Matrix: (00337208) > > > Debug: Off > > > Modified Time: 43 > > > Reference Count: 1 > > > Registered Events: (none) > > > Elements: > > > 1 0 0 0 > > > 0 1 0 0 > > > 0 0 1 0 > > > 0 0 0 1 > > > Mode: Similarity > > > SourceLandmarks: 00000000 > > > TargetLandmarks: 00000000 > > > > > > > > > Output from transform->Print(cout); > > > > > > vtkIterativeClosestPointTransform (00337568) > > > Debug: Off > > > Modified Time: 55 > > > Reference Count: 1 > > > Registered Events: (none) > > > Inverse: (00000000) > > > Matrix: (00337770) > > > Debug: Off > > > Modified Time: 54 > > > Reference Count: 1 > > > Registered Events: (none) > > > Elements: > > > 1 0 0 0 > > > 0 1 0 0 > > > 0 0 1 0 > > > 0 0 0 1 > > > Source: (none) > > > Target: (none) > > > Locator: (none) > > > MaximumNumberOfIterations: 50 > > > CheckMeanDistance: 0 > > > MeanDistanceMode: RMS > > > MaximumMeanDistance: 0.01 > > > MaximumNumberOfLandmarks: 200 > > > StartByMatchingCentroids: 0 > > > NumberOfIterations: 0 > > > MeanDistance: 0 > > > LandmarkTransform: > > > Debug: Off > > > Modified Time: 55 > > > Reference Count: 1 > > > Registered Events: (none) > > > Inverse: (00000000) > > > Matrix: (003379E0) > > > Debug: Off > > > Modified Time: 56 > > > Reference Count: 1 > > > Registered Events: (none) > > > Elements: > > > 1 0 0 0 > > > 0 1 0 0 > > > 0 0 1 0 > > > 0 0 0 1 > > > Mode: Similarity > > > SourceLandmarks: 00000000 > > > TargetLandmarks: 00000000 > > ______________________________________________________________________ > _______________________________________________ > 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 -- Bryan Cole Teraview Ltd., 302-304 Cambridge Science Park, Milton Road, Cambridge CB4 0WG, United Kingdom. tel: +44 (1223) 435380 / 435386 (direct-dial) fax: +44 (1223) 435382 From chouyiyu at hotmail.com Thu Aug 12 13:32:25 2004 From: chouyiyu at hotmail.com (Yi-Yu Chou) Date: Thu, 12 Aug 2004 17:32:25 +0000 Subject: [vtkusers] How to set four independent lookup functions for RGBA ? Message-ID: Hi vtk users : I am trying to build a lookup table with four independent lookup functions for RGBA components. I have tried vtkColorTransferFunction, but it seems not flexible enough for me. Because it can't be used to build independent lookup functions for RGBA, and it only deals with RGB components. I know there is a way to do it for volume rendering, and it's like : opa = vtkpiecewiseFunction() color = vtkColorTransferFunction() volumeProperty = vtkVolumePorperty() volumeProperty.SetColor(opa) volumeProperty.SetColor(color) volume = vtkVolume() volume.SetMapper(mapper) volume.SetProperty(volumeProperty) ........................................................................................................................................... However, I need to implement it by texture mapping. How should I do ? Any suggestions would be appreciated !!!!! Thanks in advance. Yi-Yu _________________________________________________________________ ???? MSN ??????????????????????? http://members.msn.com?pgmarket=zh-tw From pallavi.joshi at vanderbilt.edu Thu Aug 12 14:24:13 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Thu, 12 Aug 2004 13:24:13 -0500 Subject: [vtkusers] gridTransform Message-ID: <00ee01c48099$919be080$da593b81@Pallavi> Hi, I want to rotate my vtkImageData. This vtkImageData is actually dx,dy,dz displacement field vectors for non rigid deformation. Now I want to rotate the entire data so that it is aligned with the mesh which I finally want to deform with this deformation field. Can anybody tell me how to rotate the vtkImageData without being converted to a mesh. Thanks, Pallavi -------------- next part -------------- An HTML attachment was scrubbed... URL: From seanm at nmr.mgh.harvard.edu Thu Aug 12 14:17:14 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Thu, 12 Aug 2004 14:17:14 -0400 Subject: [vtkusers] VTK, Qt,VtkQt and stereoRendering In-Reply-To: <1092315761.7607.8.camel@grafix.montefiore.ulg.ac.be> References: <1092315761.7607.8.camel@grafix.montefiore.ulg.ac.be> Message-ID: <411BB42A.2060000@nmr.mgh.harvard.edu> Hi Patrice, You definitely need to call renwin->StereoCapableWindowOn() *before* calling show(), since this will obviously trigger a call to Render(). Also note that adding Props to a Renderer that has already been added to a RenderWindow will also trigger a call to Render() (and/or probably show()). -Sean Patrice Aussems wrote: > Hi, > > I'm using Qt, Vtk and the VtkQt-library of Denis Shamoni (I got the same > problem when I use the Matthis Koenig version) to create an application > that support stereo Rendering. > > When I exectute the > renwin->StereoCapableWindowOn() method I got this following error : > > Warning: In /local/src/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line > 404 > vtkXOpenGLRenderWindow (0x8286ff4): Requesting a StereoCapableWindow > must be performed before the window is realized, i.e. before a render. > > I know that i have to execute this method before the window is rendered > but i did not use render() in the source code before. > > > > here is a part of my source code : > > > QApplication app( argc, argv ); > QWidget *widg1 = new QWidget; > widg1->resize(1000, 500); > widg1->show(); > > ren2 = vtkRenderer::New(); > ren2->AddActor(outlineActorl); > ren2->AddVolume(newvollost); > ren2->SetBackground(1,1,1); > ren2->SetActiveCamera(Cameralost); > > renwin2 = new vtkQtRenderWindow(); > renwin2->StereoCapableWindowOn(); > renwin2->AddRenderer(ren2); > renwin2->show(); > > > Can anybody help me?? > > Regards, > > Patrice Aussems > > _______________________________________________ > 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 andy.cedilnik at kitware.com Thu Aug 12 14:35:32 2004 From: andy.cedilnik at kitware.com (Andy Cedilnik) Date: Thu, 12 Aug 2004 14:35:32 -0400 Subject: [vtkusers] Re: Wiki Contribution In-Reply-To: <20040812153701.16673.qmail@web25206.mail.ukl.yahoo.com> References: <20040812153701.16673.qmail@web25206.mail.ukl.yahoo.com> Message-ID: <1092335732.4169.151.camel@andoria> Hi Aur?lien, If you click on the side link on the "Special pages", you will see "All pages". You can also use search to find specific information. Andy Cedilnik Kitware Inc. On Thu, 2004-08-12 at 11:37, REGAT-BARREL Aur?lien wrote: > Hi, > Where can we get the list of all the pages ? And how the "discussion" > page works ? Should we write out name before our text and append it to > the previous one ? > Greets. From tabea.bendel at t-online.de Thu Aug 12 15:24:00 2004 From: tabea.bendel at t-online.de (Tabea Bendel) Date: 12 Aug 2004 19:24 GMT Subject: [vtkusers] VTKRenderingvtkWin32OpenGLRenderWindow.cxx (fwd) Message-ID: <1BvLBu-1OPCoS0@fwd05.sul.t-online.com> Hi, I implemented any programs with vtk and I didn't get errors. But suddenly I having problems with displaying vtk rendering windows in all of my applications. I get this error message: ERROR: In c:BuilderSourcesVTKRenderingvtkWin32OpenGLRenderWindow.cxx, line 734 vtkWin32OpenGLRenderWindow (115BA094): wglCreateContext failed in CreateAWindow(), error: 1114 What can I do? Thank you very much! Tabea Bendel ------ From glehmann at imaging.robarts.ca Thu Aug 12 15:53:10 2004 From: glehmann at imaging.robarts.ca (Glen Lehmann) Date: Thu, 12 Aug 2004 15:53:10 -0400 Subject: [vtkusers] gridTransform In-Reply-To: <00ee01c48099$919be080$da593b81@Pallavi> References: <00ee01c48099$919be080$da593b81@Pallavi> Message-ID: <3CC01C66-EC99-11D8-BC49-000A956FBE16@imaging.robarts.ca> Hi Pallavi, You can use vtkTransform to setup your rotation and then provide the transform to vtkImageReslice via vtkImageReslice->SetTransform. You may find it useful to use vtkImageChangeInformation->CenterImageOn() first so that you are rotating about the center of your image. Then, make sure you set each of the output whole extent, extent, and origin (probably to the same as the input) in vtkImageReslice before you Update. Cheers, Glen On Aug 12, 2004, at 2:24 PM, Pallavi Joshi wrote: > > Hi, > I want to rotate my vtkImageData. This vtkImageData is actually > dx,dy,dz displacement field vectors for non rigid?deformation. Now I > want to rotate the entire data so that it is aligned with the mesh > which I finally want to deform with this deformation field.? Can > anybody tell me how to rotate the vtkImageData without being converted > to a mesh. > Thanks, > Pallavi > ? > ? > > _______________________________________________ > 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1840 bytes Desc: not available URL: From pallavi.joshi at vanderbilt.edu Thu Aug 12 16:15:31 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Thu, 12 Aug 2004 15:15:31 -0500 Subject: [vtkusers] gridTransform References: <00ee01c48099$919be080$da593b81@Pallavi> <3CC01C66-EC99-11D8-BC49-000A956FBE16@imaging.robarts.ca> Message-ID: <013a01c480a9$1e233a30$da593b81@Pallavi> Hi, Thanks a lot ...it works !! --Pallavi ----- Original Message ----- From: Glen Lehmann To: Pallavi Joshi Cc: VtkUsers Sent: Thursday, August 12, 2004 2:53 PM Subject: Re: [vtkusers] gridTransform Hi Pallavi, You can use vtkTransform to setup your rotation and then provide the transform to vtkImageReslice via vtkImageReslice->SetTransform. You may find it useful to use vtkImageChangeInformation->CenterImageOn() first so that you are rotating about the center of your image. Then, make sure you set each of the output whole extent, extent, and origin (probably to the same as the input) in vtkImageReslice before you Update. Cheers, Glen On Aug 12, 2004, at 2:24 PM, Pallavi Joshi wrote: Hi, I want to rotate my vtkImageData. This vtkImageData is actually dx,dy,dz displacement field vectors for non rigid deformation. Now I want to rotate the entire data so that it is aligned with the mesh which I finally want to deform with this deformation field. Can anybody tell me how to rotate the vtkImageData without being converted to a mesh. Thanks, Pallavi _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yxliu at fudan.edu.cn Fri Aug 13 03:27:59 2004 From: yxliu at fudan.edu.cn (Yixun Liu) Date: Fri, 13 Aug 2004 15:27:59 +0800 Subject: [vtkusers] about run tcl example Message-ID: <000601c48107$0fb39cc0$1f64a8c0@YXLIU> Hi, I install the binary vtk version and the tcl script run correctly. When I use the source vtk and compiler it, the Tcl can not run. The error is : can not find the vtk package. I set the TCLLIBPATH to vtk destination path, however the error is same. Maybe I need set the other path, anybody tell me? Thank you in advance! Yixun Liu -------------- next part -------------- An HTML attachment was scrubbed... URL: From bobbydog102 at hotmail.com Fri Aug 13 04:14:30 2004 From: bobbydog102 at hotmail.com (Songbo Chen) Date: Fri, 13 Aug 2004 09:14:30 +0100 Subject: [vtkusers] about run tcl example References: <000601c48107$0fb39cc0$1f64a8c0@YXLIU> Message-ID: Hi, Liu: You should run the tcl examples by typing "vtk XXX.tcl". some of the tcl example are old versions when you install vtk 4.x, you can download the latest version from the repository. ----- Original Message ----- From: Yixun Liu To: vtkusers at vtk.org Sent: Friday, August 13, 2004 8:27 AM Subject: [vtkusers] about run tcl example Hi, I install the binary vtk version and the tcl script run correctly. When I use the source vtk and compiler it, the Tcl can not run. The error is : can not find the vtk package. I set the TCLLIBPATH to vtk destination path, however the error is same. Maybe I need set the other path, anybody tell me? Thank you in advance! Yixun Liu ------------------------------------------------------------------------------ _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtk_fan at yahoo.co.in Fri Aug 13 07:02:14 2004 From: vtk_fan at yahoo.co.in (=?iso-8859-1?q?VTK=20FAN?=) Date: Fri, 13 Aug 2004 12:02:14 +0100 (BST) Subject: [vtkusers] Interesting problam! Message-ID: <20040813110214.23979.qmail@web8303.mail.in.yahoo.com> Madam and Gentelman, pls provide some hlp to me. I wanna do this. Having some actors on screen, i wanna compute a rectangle on screen, and then get all actors who lie within that bounding box. how to do this pls? example code? it is a college project for me so hurry pls help! much in advance for help. VTK FAN!! ________________________________________________________________________ Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony From seanm at nmr.mgh.harvard.edu Fri Aug 13 07:41:25 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Fri, 13 Aug 2004 07:41:25 -0400 Subject: [vtkusers] Interesting problam! In-Reply-To: <20040813110214.23979.qmail@web8303.mail.in.yahoo.com> References: <20040813110214.23979.qmail@web8303.mail.in.yahoo.com> Message-ID: <411CA8E5.4010409@nmr.mgh.harvard.edu> Hint: View Frustum This problem is left as an exercise for the reader ;-) VTK FAN wrote: > Madam and Gentelman, pls provide some hlp to me. I > wanna do this. Having some actors on screen, i wanna > compute a rectangle on screen, and then get all actors > who lie within that bounding box. how to do this pls? > example code? it is a college project for me so hurry > pls help! much in advance for help. > > VTK FAN!! > From baghdadi at sickkids.ca Fri Aug 13 10:36:35 2004 From: baghdadi at sickkids.ca (Leila Baghdadi) Date: 13 Aug 2004 10:36:35 -0400 Subject: [vtkusers] cmake flag Message-ID: <1092407795.15399.30.camel@mouse18.phenogenomics.ca> Hi everyone just wondering if anyone knew what the following flag is for, I just did a cvs update this morning and not sure if I have seen this before VTK_USE_EXECUTIVES which says, Build VTK with the new pipeline Thanks Leila From billlist at nycap.rr.com Fri Aug 13 10:58:03 2004 From: billlist at nycap.rr.com (William A. Hoffman) Date: Fri, 13 Aug 2004 10:58:03 -0400 Subject: [vtkusers] VTKRenderingvtkWin32OpenGLRenderWindow.cxx (fwd) In-Reply-To: <1BvLBu-1OPCoS0@fwd05.sul.t-online.com> References: <1BvLBu-1OPCoS0@fwd05.sul.t-online.com> Message-ID: <6.1.1.1.2.20040813105722.09c63618@pop.nycap.rr.com> Have you recently updated your graphics driver, or changed the number of colors in your display, or any other settings with the graphics card? -Bill At 03:24 PM 8/12/2004, Tabea Bendel wrote: >Hi, > >I implemented any programs with vtk and I didn't get errors. But suddenly I having problems with displaying vtk rendering windows in all of my applications. I get this >error message: > > >ERROR: In c:BuilderSourcesVTKRenderingvtkWin32OpenGLRenderWindow.cxx, line 734 vtkWin32OpenGLRenderWindow (115BA094): wglCreateContext failed in CreateAWindow(), error: 1114 > >What can I do? > >Thank you very much! > >Tabea Bendel >------ > >_______________________________________________ >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 brylee at fumbo.com Fri Aug 13 12:51:52 2004 From: brylee at fumbo.com (brylee at fumbo.com) Date: Fri, 13 Aug 2004 18:51:52 +0200 Subject: [vtkusers] Help On java applets for IE Message-ID: <1092415912.411cf1a816491@ssl0.ovh.net> Hi, does anybody know where i can get some examples, cuz the one in the book is incomplete, and on the textbook examples there are no java ones, as applets to be run on a browser. thank you Bryan From msabati at ucalgary.ca Fri Aug 13 17:40:41 2004 From: msabati at ucalgary.ca (Mohammad Sabati) Date: Fri, 13 Aug 2004 15:40:41 -0600 Subject: [vtkusers] Clean Up A Window in VTK 3.2 Message-ID: <6C774A1A-ED71-11D8-BD0D-00039368F9C6@ucalgary.ca> Hi all, How can I clean up (clear) an opened window in VTK 3.2 ? vtkOutputWindowCleanup() exists in new versions but not in 3.2. Thanks, Mo From naukudkar at yahoo.com Sat Aug 14 02:27:54 2004 From: naukudkar at yahoo.com (ROhan naukudkar) Date: Fri, 13 Aug 2004 23:27:54 -0700 (PDT) Subject: [vtkusers] SimpleVTK.java errors ...please help Message-ID: <20040814062754.32589.qmail@web40701.mail.yahoo.com> Hi, I am trying to run this example simpleVTK.java which is present in the VTK\Wrapping\Java directory...when i run this example i see the output something like this. ------------------------------------- SimpleVTK --------------------------------------- | | | | | | | | | | | | | | EXIT | | | Button| | | | ---------------------------------------- and the errors that i get are as follows... java.lang.UnsatisfiedLinkError: RenderCreate at sample.vtkPanel.RenderCreate(Native Method) at sample.vtkPanel.Render(vtkPanel.java:136) at sample.vtkPanel.paint(vtkPanel.java:156) at sun.awt.RepaintArea.paint(Unknown Source) at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) can anyone tell me the solution for this.... regards, Rohan --------------------------------- Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bmclean at finlaylabs.net Sat Aug 14 05:45:30 2004 From: bmclean at finlaylabs.net (Ben McLean) Date: Sat, 14 Aug 2004 17:45:30 +0800 Subject: [vtkusers] data input by graphical interface Message-ID: <200408141745.30386.bmclean@finlaylabs.net> Hi all, I am doing a PhD in geophysics, which includes a program that reads in a floating-point array of data (maybe an ascii file). I want to be able to graphically adjust the values of this array before outputting to a file. I would like to be able to interactively and graphically modify this array of values, say by 'painting' with colours on a 2D representation that then maps to floating-point numbers. This would then output an ascii file of data suitable for reading in by other programs. This is the reverse direction from standard scientific plotting programs, where data arrays are mapped to colour and output to screen. I want to use screen interaction with a colour-mapped array in a paint-like manner, which will then output the corresponding array. Does VTI lend itself to doing this? Any examples? If not, have you any alternate suggestions? Thanks for your assistance, Ben. From hurlin.clement at wanadoo.fr Sat Aug 14 22:08:00 2004 From: hurlin.clement at wanadoo.fr (Hurlin =?iso-8859-1?q?Cl=E9ment?=) Date: Sun, 15 Aug 2004 04:08:00 +0200 Subject: [vtkusers] GetCenter() Message-ID: <200408150408.00675.hurlin.clement@wanadoo.fr> Hi, ????????How *float GetCenter() works ? I try to get the x coordinate by using blabla->GetCenter()[0], but i get a segfault and GetCenter()[1] doesn't give the good coordinate (in fact it gives the same that GetCenter()[2] which is false) Any idea? smelC From sscomp2004 at yahoo.com.au Sun Aug 15 07:23:43 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Sun, 15 Aug 2004 21:23:43 +1000 (EST) Subject: [vtkusers] Cannot run Tcl or Python examples... Message-ID: <20040815112343.22423.qmail@web61110.mail.yahoo.com> In Tcl I get error: "Cant find package vtk" in Python I get error "Import error: no module named vtk" I have simply installed the Vtk windows binaries, and tcl and Python, I think I have missed some step of the install process...? Help would be greatly appreciated Thanks __________________________________________________ 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: -------------- next part -------------- An embedded message was scrubbed... From: =?iso-8859-1?q?s=20comp?= Subject: Cannot run Tcl or Python examples... Date: Sun, 15 Aug 2004 21:13:23 +1000 (EST) Size: 1670 URL: From a.mittelstaedt at tu-bs.de Sun Aug 15 08:01:37 2004 From: a.mittelstaedt at tu-bs.de (Arne Mittelstaedt) Date: Sun, 15 Aug 2004 14:01:37 +0200 Subject: [vtkusers] isosurface plane through an vtkUnstructuredGrid Message-ID: <006501c482bf$9f3fcee0$0200a8c0@PAUL> Hi, I want to realize an isoSurface-plane through a vtkUnstructuredGrid with FlowData (points in space, vectors for direction and scalar-Values for velocity). Have anyone an example for that? I will describe it more specific: So far I have a solution with Glyph3D(cones), defining a vtkPlane and a vtkPlaneCut with Glyph Input (see source at bottom). It looks nice, but it remember to videogames from 1980. Which pipeline I have to build, so that the an isosurface plane represent the scalar values from my UnstructuredGrid? And coloring into a range (blue f?r small, red for high velocity)? Another way I was thinking over are Streamlines, but I have never found an Example for Streamlines that can take Data from an unstructuredGrid. How can I realize such plane/streamline? Does I have to convert the UnstructuredGridData into another Dataset? Thank you very much in advance Arne Mittelstaedt ---------------------------- vtkUnstructuredGrid ugrid = new vtkUnstructuredGrid(); for (int i = 0; i < nodes.length; i++) { (...) //Read Data from Flow Simulation points.InsertPoint(i, x1, x2, x3); //so far symmetrical values scalars.InsertValue(i, s); vectors.InsertTuple3(i, v1, v2, v3); } ugrid.setPoints(points); ugrid.setPointScalars(scalars); ugrid.setPointVectors(vectors); vtkConeSource cones = new vtkConeSource(); vtkGlyph3D glyph = new vtkGlyph3D(); glyph.SetInput(ugrid); //the unstructuredGrid glyph.SetSource(cones.GetOutput()); glyph.SetColorModeToColorByScalar(); vtkPlane plane = new vtkPlane(); plane.SetNormal(0.0, 0.0, 1.0); vtkCutter planeCut = new vtkCutter(); planeCut.SetInput(glyph.GetOutput()); planeCut.SetCutFunction(plane); vtkPolyDataMapper cutMapper = new vtkPolyDataMapper(); cutMapper.SetInput(planeCut.GetOutput()); From bobbydog102 at hotmail.com Sun Aug 15 09:00:50 2004 From: bobbydog102 at hotmail.com (Songbo Chen) Date: Sun, 15 Aug 2004 14:00:50 +0100 Subject: [vtkusers] Cannot run Tcl or Python examples... References: <20040815112343.22423.qmail@web61110.mail.yahoo.com> Message-ID: Hi, for running the TCL examples, you have to type in "vtk xxx.tcl". ----- Original Message ----- From: s comp To: vtkusers at vtk.org Sent: Sunday, August 15, 2004 12:23 PM Subject: [vtkusers] Cannot run Tcl or Python examples... In Tcl I get error: "Cant find package vtk" in Python I get error "Import error: no module named vtk" I have simply installed the Vtk windows binaries, and tcl and Python, I think I have missed some step of the install process...? Help would be greatly appreciated Thanks __________________________________________________ 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: Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From sscomp2004 at yahoo.com.au Sun Aug 15 09:08:53 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Sun, 15 Aug 2004 23:08:53 +1000 (EST) Subject: [vtkusers] Getting examples working....missing .dll file.... Message-ID: <20040815130853.53056.qmail@web61108.mail.yahoo.com> Ok I worked out that I had to set the paths for each interpreter (but couldn't find how to do this for tcl...), but now I get the following error when I try to run a python example: Traceback (most recent call last): File "C:\Program Files\vtk42\Examples\Rendering\Python\assembly.py", line 6, in -toplevel- import vtk File "C:\Program Files\vtk42\Wrapping\Python\vtk\__init__.py", line 7, in -toplevel- from common import * File "C:\Program Files\vtk42\Wrapping\Python\vtk\common.py", line 9, in -toplevel- from vtkCommonPython import * ImportError: DLL load failed: The specified module could not be found. It seems that the install is missing at least 1 .dll file, (this seems very dodgy to me, but I can't complain it is free software), but none the less I would like to use it, now how can I do this without compiling it myself? (borland's "free comand line tools" doesn't seem to do the job) thanks Tahwwhat --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sscomp2004 at yahoo.com.au Sun Aug 15 09:12:52 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Sun, 15 Aug 2004 23:12:52 +1000 (EST) Subject: [vtkusers] Also python21.dll is missing Message-ID: <20040815131252.76912.qmail@web61107.mail.yahoo.com> So I cannot usee the inbuilt Python with all the paths already configured Is there a comprehensive guide sonewhere that tells one about all the things one has to do to get this software working since I am having a most frustrating time...? --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sscomp2004 at yahoo.com.au Sun Aug 15 09:31:18 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Sun, 15 Aug 2004 23:31:18 +1000 (EST) Subject: [vtkusers] Cannot run Tcl or Python examples... In-Reply-To: Message-ID: <20040815133118.86129.qmail@web61102.mail.yahoo.com> Thankyou so much! That has given me some long needed confirmation that VTK really does work, now to get the python examples working.... Songbo Chen wrote: Hi, for running the TCL examples, you have to type in "vtk xxx.tcl". ----- Original Message ----- From: s comp To: vtkusers at vtk.org Sent: Sunday, August 15, 2004 12:23 PM Subject: [vtkusers] Cannot run Tcl or Python examples... In Tcl I get error: "Cant find package vtk" in Python I get error "Import error: no module named vtk" I have simply installed the Vtk windows binaries, and tcl and Python, I think I have missed some step of the install process...? Help would be greatly appreciated Thanks __________________________________________________ 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: Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhou_huiqun at hotmail.com Sun Aug 15 10:01:47 2004 From: zhou_huiqun at hotmail.com (Huiqun Zhou) Date: Sun, 15 Aug 2004 22:01:47 +0800 Subject: [vtkusers] cmake flag References: <1092407795.15399.30.camel@mouse18.phenogenomics.ca> Message-ID: Leila, I think this should be a new mechanism for execution of visualization network, and it might be similar to those in IBM OpenDX or AVS. ========================== Huiqun Zhou, Doctor of Science Nanjing University 22 Hankou Road, Gulou Nanjing, 210093 China e-mail: hqzhou at nju.edu.cn Tel.: 86(25)8359-4664 =========================== ----- Original Message ----- From: "Leila Baghdadi" To: Sent: Friday, August 13, 2004 10:36 PM Subject: [vtkusers] cmake flag > Hi everyone > > just wondering if anyone knew what the following flag is for, I just did > a cvs update this morning and not sure if I have seen this before > > VTK_USE_EXECUTIVES > > which says, Build VTK with the new pipeline > > Thanks > > Leila > > _______________________________________________ > 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 yhq at sjtu.edu.cn Mon Aug 16 02:13:15 2004 From: yhq at sjtu.edu.cn (=?gb2312?B?0e664g==?=) Date: Mon, 16 Aug 2004 14:13:15 +0800 Subject: [vtkusers] vtklookuptable In-Reply-To: <20040815140606.3557E1F49D@public.kitware.com> Message-ID: <20040816061350.94FD47B1280@mx1.sjtu.edu.cn> Hi,all I have used the vtkColorTransferFunction to map the scalar to rgba and the effect is good .By using addpoint(int ,r,g,b), I clearly map the int to rgb. But , now I need use vtklookuptable and I have scalars from 0 to 3000 .I try to use the following code: table=vtkLookupTable::New(); table->SetRange( 0,3000); table->Allocate(3001); while ( p->next) { p=p->next; ctfun->AddRGBPoint(floor(p->point/10.0), p->r/255.0 , p->g/255.0, p->b/255.0);/////when use vtkColorTransferFunction table->SetTableValue(floor(p->point/10.0), p->r/255.0 , p->g/255.0, p->b/255.0,p->opc/100.0);/////use vtklookuptable } Table->build(); But the result pic is not what I want ? Can you tell me why and how to deal with it using vtklookuptable. Thanks! } From noadi at cs.huji.ac.il Mon Aug 16 05:09:13 2004 From: noadi at cs.huji.ac.il (noadi at cs.huji.ac.il) Date: Mon, 16 Aug 2004 05:09:13 -0400 Subject: [vtkusers] (no subject) Message-ID: <112760-2200481169913934@M2W073.mail2web.com> Hi. I want to pan (without having to use the middle button of the mouse, since I want to use outer button that I will create in a MFC dialog) a 2D picture and to change its brightness and contrast. How can I do this without using an imageViewer? My code now is: bmpReader = vtkBMPReader::New(); bmpReader->SetFileName("D:\\vtkExp\\femur1.bmp"); bmpReader->Update(); vtkImageActor* act = vtkImageActor::New(); act->SetInput(bmpReader->GetOutput()); vtkRenderer* renderer = vtkRenderer::New(); renderer->AddActor(act); CRect rect; CWnd* wind = GetDlgItem(IDC_PIC); renwin = vtkWin32OpenGLRenderWindow::New(); wind->GetClientRect(&rect); renwin->SetSize(rect.Width(), rect.Height()); renwin->SetParentId(wind->m_hWnd); ::SetParent(renwin->GetWindowId(), this->m_hWnd); renwin->AddRenderer(renderer); renwin->Render(); vtkRenderWindowInteractor* renwinint = vtkRenderWindowInteractor::New(); renwinint->SetRenderWindow(renwin); renwinint->Initialize(); camera = vtkCamera::New(); renderer->SetActiveCamera(camera); renderer->ResetCamera(); renderer->SetBackground(1,1,1); -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From v.varadhan at gmail.com Mon Aug 16 05:31:50 2004 From: v.varadhan at gmail.com (Veerapuram Varadhan) Date: Mon, 16 Aug 2004 15:01:50 +0530 Subject: [vtkusers] Re: hi In-Reply-To: <00fb01c473fb$3ed5c8c0$085a1e0a@Istvan> References: <027701c47282$face1020$da593b81@XIAOFENG><9DB0C7D4-DE77-11D8-90EC-000A956FBE16@imaging.robarts.ca><02da01c4728d$a34aa5b0$da593b81@XIAOFENG> <21925574040726000162028b5b@mail.gmail.com> <00fb01c473fb$3ed5c8c0$085a1e0a@Istvan> Message-ID: <2192557404081602316de8f60a@mail.gmail.com> Hi, Sorry I was on a vacation. You can subscribe to the vtkusers mailing list and post your questions there. Best Regards, V. Varadhan. ---------- Forwarded message ---------- From: Toth Istvan Date: Tue, 27 Jul 2004 10:00:38 -0700 Subject: hi To: Veerapuram Varadhan Hello ! Have You any docs or papers about programing vtk in C++?? or an example to view an vtk files(ex a.vtk) Please reply Best regards from Istvan From hampdonald at yahoo.com Mon Aug 16 07:32:30 2004 From: hampdonald at yahoo.com (Hamp Donald) Date: Mon, 16 Aug 2004 04:32:30 -0700 (PDT) Subject: [vtkusers] Insert a Point in a triangulated Sphere Message-ID: <20040816113230.87726.qmail@web42001.mail.yahoo.com> Hi I have a triangulated Sphere and I want to insert a point at the center of mass of a triangle on the sphere so that there are more triangles generated with respect to the inserted point. Most probably, there is a method "Triangulate" in vtkCell class. Can anybody explain me how to use this method. Triangulate ( int index, vtkIdList * ptIds, vtkPoints * pts ) [pure virtual] Help is appreciated. Best Regards Donald __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From hampdonald at yahoo.com Mon Aug 16 07:32:30 2004 From: hampdonald at yahoo.com (Hamp Donald) Date: Mon, 16 Aug 2004 04:32:30 -0700 (PDT) Subject: [vtkusers] Insert a Point in a triangulated Sphere Message-ID: <20040816113230.87726.qmail@web42001.mail.yahoo.com> Hi I have a triangulated Sphere and I want to insert a point at the center of mass of a triangle on the sphere so that there are more triangles generated with respect to the inserted point. Most probably, there is a method "Triangulate" in vtkCell class. Can anybody explain me how to use this method. Triangulate ( int index, vtkIdList * ptIds, vtkPoints * pts ) [pure virtual] Help is appreciated. Best Regards Donald __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From tfogal at apollo.sr.unh.edu Mon Aug 16 10:25:07 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Mon, 16 Aug 2004 10:25:07 -0400 Subject: [vtkusers] isosurface plane through an vtkUnstructuredGrid In-Reply-To: Your message of "Sun, 15 Aug 2004 14:01:37 +0200." <006501c482bf$9f3fcee0$0200a8c0@PAUL> References: <006501c482bf$9f3fcee0$0200a8c0@PAUL> Message-ID: <200408161425.i7GEP71b001740@apollo.sr.unh.edu> <006501c482bf$9f3fcee0$0200a8c0 at PAUL>"Arne Mittelstaedt" writes: >I want to realize an isoSurface-plane through a vtkUnstructuredGrid with >FlowData (points in space, vectors for direction and scalar-Values for >velocity). Have anyone an example for that? I will describe it more I believe the object you are looking for is vtkContourFilter. Contour-something at least. I'm not quite sure how it works yet, thats actually one of my projects for the week =) >Another way I was thinking over are Streamlines, but I have never found an >Example for Streamlines that can take Data from an unstructuredGrid. vtkStreamTracer takes input from any vtkDataSet*. I have successfully plotted streamlines from both a Rectilinear and Unstructured grid. Something like: StreamTracer->SetInput(some_grid); StreamTracer->SetStartPosition(3-component float array); StreamTracer->SetMaximumPropagationUnitToLenghUnit(); StreamTracer->SetMaximumPropagation(9E8); StreamTracer->SetIntegrationDirectionToBoth(); and then attach its output to a vtkTubeFilter, which outputs to a PolyDataMapper, to an Actor, which gets attached to a renderer... you probably know that routine. One 'gotcha' for me was setting the maximum propagation. Before I did that my streamline was nothing but a tiny dot. >How can I realize such plane/streamline? Does I have to convert the >UnstructuredGridData into another Dataset? Sorry I can't help you with the plane, but the above should work for the streamline... >Thank you very much in advance You are very welcome. -tom From hampdonald at yahoo.com Mon Aug 16 11:55:09 2004 From: hampdonald at yahoo.com (Hamp Donald) Date: Mon, 16 Aug 2004 08:55:09 -0700 (PDT) Subject: [vtkusers] World Coordinates to pixel coordinates Message-ID: <20040816155509.43583.qmail@web42004.mail.yahoo.com> Hi Given a point with 3-D coodinates, how can I get its pixel coordinates for a given camera position and orientation? Please show me which method(s) I have to use ? Best Regards Donald __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail From hampdonald at yahoo.com Mon Aug 16 11:55:33 2004 From: hampdonald at yahoo.com (Hamp Donald) Date: Mon, 16 Aug 2004 08:55:33 -0700 (PDT) Subject: [vtkusers] World Coordinates to pixel coordinates Message-ID: <20040816155533.53170.qmail@web42001.mail.yahoo.com> Hi Given a point with 3-D coodinates, how can I get its pixel coordinates for a given camera position and orientation? Please show me which method(s) I have to use ? Best Regards Donald __________________________________ Do you Yahoo!? Y! Messenger - Communicate in real time. Download now. http://messenger.yahoo.com From j.robinson at kepler-systems.com Mon Aug 16 12:52:28 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Mon, 16 Aug 2004 17:52:28 +0100 Subject: [vtkusers] Merging of points Message-ID: <20040816165237.60D161F907@public.kitware.com> Dear All, I am creating an instance of vtkCutter *pCrossSection ; from vtkUnstructuredGridReader *pMeshReader and vtkClipPolyData *pXSectionClipper ; from vtkGeometryFilter *pGeometry ; and merging them into vtkAppendPolyData *pCutMeshData ; The problem is that, when I do a colour plot of the scalar I get a bad effect at an internal boundary (where the boundary is formed by having coincident "nodes" in a finite element mesh that are in congruent elements - this forms a no flow boundary in the mesh). The rendering of the colour contouring works perfectly when the vtkUnstructuredGrid is put through the vtkGeometryFilter, but the coincident nodes are merged (I think) when the mesh is cut (using the object listed above) and the colour mapping is fuzzy along the boundary (whereas it should be a sheer change in colour). My questions are: would merging explain the phenomenon described above? is there a way to turn off point merging in vtkCutter & vtkClipPolyData? Regards, Jim James C Robinson, PhD, Chartered Engineer, * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From isaacgerg at psu.edu Mon Aug 16 13:31:47 2004 From: isaacgerg at psu.edu (Isaac Gerg) Date: Mon, 16 Aug 2004 13:31:47 -0400 Subject: [vtkusers] Estimating Render Time In-Reply-To: <20040816155533.53170.qmail@web42001.mail.yahoo.com> Message-ID: <001601c483b6$e8eb5580$aae01cac@arl.psu.edu> Is it possible to get information from vtk that tells how close a render is to being finished? Like a percentage or estimated time? Any help appreciated. Isaac Gerg From goodwin.lawlor at ucd.ie Mon Aug 16 15:06:08 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Mon, 16 Aug 2004 20:06:08 +0100 Subject: [vtkusers] Re: Clean Up A Window in VTK 3.2 References: <6C774A1A-ED71-11D8-BD0D-00039368F9C6@ucalgary.ca> Message-ID: vtkOpenGLRenderer::Clear() is in vtk4.*, probably in vtk3.2 too. "Mohammad Sabati" wrote in message news:6C774A1A-ED71-11D8-BD0D-00039368F9C6 at ucalgary.ca... > Hi all, > > How can I clean up (clear) an opened window in VTK 3.2 ? > > vtkOutputWindowCleanup() exists in new versions but not in 3.2. > > Thanks, > Mo > > _______________________________________________ > 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 pallavi.joshi at vanderbilt.edu Mon Aug 16 16:38:09 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Mon, 16 Aug 2004 15:38:09 -0500 Subject: [vtkusers] dcmtk info Message-ID: <000c01c483d0$f0fb3e10$da593b81@Pallavi> Hi All, Has anybody used dicom tool kit here ? I want to read values from a dicom file. DOes anybody have any idea how that shud be done using dicom toolkit. Please help me.... Thanks, Pallavi ------------------------------------------------------------------- Pallavi Joshi Graduate Student Medical Image Processing Lab Vanderbilt University Phone: 615-343-6259 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.malaterre at kitware.com Mon Aug 16 16:56:15 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 16 Aug 2004 16:56:15 -0400 Subject: [vtkusers] dcmtk info In-Reply-To: <000c01c483d0$f0fb3e10$da593b81@Pallavi> References: <000c01c483d0$f0fb3e10$da593b81@Pallavi> Message-ID: <41211F6F.6050009@kitware.com> Pallavi Joshi wrote: > Hi All, > Has anybody used dicom tool kit here ? I want to read values from a > dicom file. DOes anybody have any idea how that shud be done using dicom > toolkit. > Please help me.... Pallavi, If you want you can either give a try to: - itkGDCMImageIO - or go directly to : http://creatis-www.insa-lyon.fr/Public/Gdcm/ the lib comes with a vtkGdcmReader. gdcm handles pretty much all possible /buggy/ DICOM files. And if you are using 4.4 you have access to vtkDICOMImageReader HTH Mathieu From bant1708 at yahoo.com.br Mon Aug 16 17:24:48 2004 From: bant1708 at yahoo.com.br (=?ISO-8859-1?Q?Bruno_Traven=E7olo?=) Date: Mon, 16 Aug 2004 18:24:48 -0300 Subject: [vtkusers] vector field Message-ID: <41212620.5020507@yahoo.com.br> Hi all, I'm trying to plot a vector field using the class vtkGlyph3D. The problem that I'm having is that this class doesn't plot vectors whose coordinates values are out of the range of the float type (i.e, 1.18*10^-38 < |X| <3.40*10^38). My vectors are stored in the class vtkDoubleArray and I'm not using any scaling factor to plot the vectors. So, I think that the class vtkGlyph3D only works with float data. Am I right? thanks, Bruno. From avmccormick at yahoo.com Mon Aug 16 17:49:28 2004 From: avmccormick at yahoo.com (Anthony McCormick) Date: Mon, 16 Aug 2004 17:49:28 -0400 Subject: [vtkusers] Help Compiling VTK on Mac OSX Message-ID: <26153B7E-EFCE-11D8-86FF-000A958F47BA@yahoo.com> Hello, I need help with make errors I am receiving when attempting to build VTK. I am using cmake Ver 2.0.3 and VTK Ver 4.2. I am using a PowerMac dual 2Ghz G5. Mac OSX 10.3.5 with gcc version [Anthony-McCormicks-G5:~] anthonym% gcc -v Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs Thread model: posix gcc version 3.3 20030304 (Apple Computer, Inc. build 1666) I followed the install instruction, however I receive the following message: Issuing the cmake command yields [Anthony-McCormicks-G5:/Develop/osxBin] anthonym% cmake ../VTK -- Check for working C compiler: gcc -- works -- Check for working CXX compiler: c++ -- works -- Compiling VTK CMake commands -- Compiling VTK CMake commands - done -- Loading VTK CMake commands -- Loading VTK CMake commands - done -- Using Buildname: Darwin-c++ -- Configuring done -- Generating done -- Build files have been written to: /Develop/osxBin Now issuing the make command I have [Anthony-McCormicks-G5:/Develop/osxBin] anthonym% make cmake.depends is up-to-date /Develop/osxBin/Wrapping: building default_target cmake.depends is up-to-date /Develop/osxBin/Utilities: building default_target cmake.depends is up-to-date /Develop/osxBin/Utilities/zlib: building default_target /Develop/osxBin/Utilities/jpeg: building default_target /Develop/osxBin/Utilities/png: building default_target /Develop/osxBin/Utilities/tiff: building default_target /Develop/osxBin/Utilities/expat: building default_target /Develop/osxBin/Utilities/Doxygen: building default_target cmake.depends is up-to-date /Develop/osxBin/Utilities/freetype: building default_target /Develop/osxBin/Utilities/ftgl: building default_target /Develop/osxBin/Common: building default_target /Develop/osxBin/Filtering: building default_target /Develop/osxBin/Imaging: building default_target /Develop/osxBin/Graphics: building default_target /Develop/osxBin/IO: building default_target /Develop/osxBin/Rendering: building default_target Building object file vtkCarbonRenderWindowInteractor.o... /Develop/VTK/Rendering/vtkCarbonRenderWindowInteractor.cxx: In function ` OSStatus myWinEvtHndlr(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)': /Develop/VTK/Rendering/vtkCarbonRenderWindowInteractor.cxx:188: error: non-lvalue in unary `&' /Develop/VTK/Rendering/vtkCarbonRenderWindowInteractor.cxx:196: error: non-lvalue in unary `&' /Develop/VTK/Rendering/vtkCarbonRenderWindowInteractor.cxx:204: error: non-lvalue in unary `&' make[3]: *** [vtkCarbonRenderWindowInteractor.o] Error 1 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_Rendering] Error 2 make: *** [default_target] Error 2 [Anthony-McCormicks-G5:/Develop/osxBin] anthonym% I seem to be having some problems with /Rendering/vtkCarbonRenderWindowInteractor.cxx Any help would be greatly appreciated. Thank you, Dynamic Sciences, Inc. Anthony V McCormick 1944 Rocky Branch Drive Forest, Va. 24551 434-525-4060 (phone) 434-525-4060 (fax) avmccormick at yahoo.com (email) From lucas at cvrti.utah.edu Mon Aug 16 19:35:25 2004 From: lucas at cvrti.utah.edu (Lucas Lorenzo) Date: Mon, 16 Aug 2004 17:35:25 -0600 Subject: [vtkusers] problems building vtk 4.4 on MacOSX Message-ID: Hi all, I'm trying to build vtk 4.4 on my mac but I'm having the following problem: Building executable /private/var/automount/scratch/lucas/bin/VTK-4.4/VTK-binary/bin/ GraphicsCxxTests... ld: multiple definitions of symbol _zError /usr/lib/libz.1.dylib(zutil.o) definition of _zError /private/var/automount/scratch/lucas/bin/VTK-4.4/VTK-binary/bin/ libvtkzlib.a(zutil.o) definition of _zError in section (__TEXT,__text) ld: multiple definitions of symbol _zlibVersion /usr/lib/libz.1.dylib(zutil.o) definition of _zlibVersion /private/var/automount/scratch/lucas/bin/VTK-4.4/VTK-binary/bin/ libvtkzlib.a(zutil.o) definition of _zlibVersion in section (__TEXT,__text) make[5]: *** [/private/var/automount/scratch/lucas/bin/VTK-4.4/VTK-binary/bin/ GraphicsCxxTests] Error 1 make[4]: *** [default_target] Error 2 make[3]: *** [default_target_Cxx] Error 2 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_Graphics_Testing] Error 2 make: *** [default_target] Error 2 Could anyone give me some help ? Thanks, Lucas Lorenzo University of Utah Nora Eccles Harrison CardioVascular Research and Training Institute Fellows Room 95 South 2000 East Salt Lake City, UT 84112-5000 e-mail: lucas at cvrti.utah.edu telephone: 801-587-9536 From ystarrev at uwo.ca Mon Aug 16 20:11:46 2004 From: ystarrev at uwo.ca (Yves Starreveld) Date: Mon, 16 Aug 2004 20:11:46 -0400 Subject: [vtkusers] Help Compiling VTK on Mac OSX In-Reply-To: <26153B7E-EFCE-11D8-86FF-000A958F47BA@yahoo.com> References: <26153B7E-EFCE-11D8-86FF-000A958F47BA@yahoo.com> Message-ID: <06E7016A-EFE2-11D8-8B00-000A95AC83DE@uwo.ca> Anthony, The following was posted by Mathieu Malaterre, in January. HTH Yves > Martin, > > You have threes options: > - you switch to VTK 4.4 > - you switch to VTK CVS > - or you apply theses changes only: > > http://vtk.org/cgi-bin/cvsweb.cgi/VTK/Rendering/ > vtkCarbonRenderWindowInteractor.cxx.diff?r1=1.6&r2=1.7 > > > > Their is currently no VTK 4.4 tarball, meanwhile you can go to: > > http://www.vtk.org/cgi-bin/viewcvs.cgi/? > cvsroot=VTK&only_with_tag=release-4-4 > Scroll down the page and click 'Download tarball' > > Sorry for the troubles, > Mathieu From lucas at cvrti.utah.edu Mon Aug 16 22:20:58 2004 From: lucas at cvrti.utah.edu (Lucas Lorenzo) Date: Mon, 16 Aug 2004 20:20:58 -0600 Subject: [vtkusers] problems building vtk 4.2 on MacOSX Message-ID: <1343D486-EFF4-11D8-B3D3-0003930AB93E@cvrti.utah.edu> Hi all, sorry for disturbing you again but this time I'm having problems building vtk 4.2 on my mac: Building object file vtkGraphicsFactory.o... In file included from /private/var/automount/scratch/lucas/bin/VTK-4.2/VTK/Rendering/ vtkXOpenGLRenderWindow.h:28, from /private/var/automount/scratch/lucas/bin/VTK-4.2/VTK/Rendering/ vtkGraphicsFactory.cxx:63: /private/var/automount/scratch/lucas/bin/VTK-4.2/VTK/Rendering/ vtkOpenGLRenderWindow.h:33:40: GL/gl.h: No such file or directory In file included from /private/var/automount/scratch/lucas/bin/VTK-4.2/VTK/Rendering/ vtkXOpenGLRenderWindow.h:28, from /private/var/automount/scratch/lucas/bin/VTK-4.2/VTK/Rendering/ vtkGraphicsFactory.cxx:63: /private/var/automount/scratch/lucas/bin/VTK-4.2/VTK/Rendering/ vtkOpenGLRenderWindow.h:107: error: ` GLuint' was not declared in this scope /private/var/automount/scratch/lucas/bin/VTK-4.2/VTK/Rendering/ vtkOpenGLRenderWindow.h:107: error: parse error before `)' token make[3]: *** [vtkGraphicsFactory.o] Error 1 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_Rendering] Error 2 make: *** [default_target] Error 2 Please, I'd appreciate some help. Thanks Lucas Lorenzo University of Utah Nora Eccles Harrison CardioVascular Research and Training Institute Fellows Room 95 South 2000 East Salt Lake City, UT 84112-5000 e-mail: lucas at cvrti.utah.edu telephone: 801-587-9536 From costabel at wanadoo.fr Tue Aug 17 01:49:29 2004 From: costabel at wanadoo.fr (Martin Costabel) Date: Tue, 17 Aug 2004 07:49:29 +0200 Subject: [vtkusers] Help Compiling VTK on Mac OSX In-Reply-To: <06E7016A-EFE2-11D8-8B00-000A95AC83DE@uwo.ca> References: <26153B7E-EFCE-11D8-86FF-000A958F47BA@yahoo.com> <06E7016A-EFE2-11D8-8B00-000A95AC83DE@uwo.ca> Message-ID: <41219C69.8050505@wanadoo.fr> Yves Starreveld wrote: > Anthony, > > The following was posted by Mathieu Malaterre, in January. [] >> Their is currently no VTK 4.4 tarball, meanwhile you can go to: Nowadays, there is a VTK 4.4 tarball, of course, in http://www.vtk.org/files/release/4.4/ -- Martin From costabel at wanadoo.fr Tue Aug 17 01:51:40 2004 From: costabel at wanadoo.fr (Martin Costabel) Date: Tue, 17 Aug 2004 07:51:40 +0200 Subject: [vtkusers] problems building vtk 4.4 on MacOSX In-Reply-To: References: Message-ID: <41219CEC.20401@wanadoo.fr> Lucas Lorenzo wrote: > Hi all, > > I'm trying to build vtk 4.4 on my mac but I'm having the following > problem: > > Building executable > /private/var/automount/scratch/lucas/bin/VTK-4.4/VTK-binary/bin/ > GraphicsCxxTests... > ld: multiple definitions of symbol _zError > /usr/lib/libz.1.dylib(zutil.o) definition of _zError > /private/var/automount/scratch/lucas/bin/VTK-4.4/VTK-binary/bin/ > libvtkzlib.a(zutil.o) definition of _zError in section (__TEXT,__text) Wouldn't this go away if you used the cmake option -DVTK_USE_SYSTEM_ZLIB:BOOL=ON ? -- Martin From seanm at nmr.mgh.harvard.edu Tue Aug 17 03:00:40 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 17 Aug 2004 03:00:40 -0400 Subject: [vtkusers] problems building vtk 4.4 on MacOSX In-Reply-To: <41219CEC.20401@wanadoo.fr> References: <41219CEC.20401@wanadoo.fr> Message-ID: <4121AD18.9060809@nmr.mgh.harvard.edu> Yes, Martin's right. Setting 'VTK_USE_SYSTEM_ZLIB' to 'ON' should eliminate this linker error. I have used this to successfully build on OSX (but had not been following this thread ... sorry). -Sean Martin Costabel wrote: > Lucas Lorenzo wrote: > >> Hi all, >> >> I'm trying to build vtk 4.4 on my mac but I'm having the following >> problem: >> >> Building executable >> /private/var/automount/scratch/lucas/bin/VTK-4.4/VTK-binary/bin/ >> GraphicsCxxTests... >> ld: multiple definitions of symbol _zError >> /usr/lib/libz.1.dylib(zutil.o) definition of _zError >> /private/var/automount/scratch/lucas/bin/VTK-4.4/VTK-binary/bin/ >> libvtkzlib.a(zutil.o) definition of _zError in section (__TEXT,__text) > > > Wouldn't this go away if you used the cmake option > -DVTK_USE_SYSTEM_ZLIB:BOOL=ON ? > From venkatgm at rediffmail.com Tue Aug 17 03:41:45 2004 From: venkatgm at rediffmail.com (G Venkataramana Reddy) Date: 17 Aug 2004 07:41:45 -0000 Subject: [vtkusers] please help me Message-ID: <20040817074145.32110.qmail@webmail7.rediffmail.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- Hi every one I want to unsubscribe to vtk users.I forget password.Can you anyone please help me. Thanks&Regards From Geir.A.Tangen at sintef.no Tue Aug 17 04:30:56 2004 From: Geir.A.Tangen at sintef.no (Geir Arne Tangen) Date: Tue, 17 Aug 2004 10:30:56 +0200 Subject: [vtkusers] Slow rendering in VTK 4.4 Message-ID: <4121C240.3050201@sintef.no> Hi all ! When switching from VTK 4.2 official release to VTK 4.4 interim release we are experiencing real slow rendering in our VTK based application. I have run Sebastien Barre?s "sphere-bench" application and the results show a huge difference in performance between the two VTK versions (see below). My system is Mac OSX ver. 10.3.5 "Panther". Have anyone else seen this loss of performance in VTK 4.4 ? Regards Geir Arne Tangen Sphere-bench results VTK 4.2 : ---------------------------------------- Best results, summary : - Power Macintosh running Darwin 7.5.0 - VTK 4.2.6 (rev: 1.1495, 2003/02/18 03:45:04) - CarbonOpenGL - Visual is 1280x1024, truecolor/truecolor/24 - Tcl/Tk 8.4.2 - window was 700 x 700 1) 256x256 : 26083.7 kpolys/s : [stripper] 2) 256x256 : 17038.3 kpolys/s : [small_sphere] 3) 256x256 : 17036.5 kpolys/s : [transparency] 4) 256x256 : 17033.8 kpolys/s : [] 5) 256x256 : 14840.9 kpolys/s : [texture, transparency] 6) 256x256 : 14831.3 kpolys/s : [texture] 7) 256x256 : 695.5 kpolys/s : [wireframe] ------- DONE (in 14 sec.) ------- Sphere-bench results VTK 4.4 : ----------------------------------------- Best results, summary : - Power Macintosh running Darwin 7.5.0 - VTK 4.4.2 (rev: 1.1782, 2003/12/17 02:45:35) - CarbonOpenGL - Visual is 1280x1024, truecolor/truecolor/24 - Tcl/Tk 8.4.2 - window was 700 x 700 1) 256x256 : 27365.3 kpolys/s : [stripper] 2) 256x256 : 721.8 kpolys/s : [texture, transparency] 3) 256x256 : 721.1 kpolys/s : [texture] 4) 256x256 : 696.4 kpolys/s : [] 5) 256x256 : 696.4 kpolys/s : [wireframe] 6) 256x256 : 696.3 kpolys/s : [transparency] 7) 256x256 : 696.0 kpolys/s : [small_sphere] ------- DONE (in 50 sec.) ------- From noadi at cs.huji.ac.il Tue Aug 17 06:20:08 2004 From: noadi at cs.huji.ac.il (noadi at cs.huji.ac.il) Date: Tue, 17 Aug 2004 06:20:08 -0400 Subject: [vtkusers] Pan, brightness & contrast (2D). Message-ID: <92350-2200482171020817@M2W076.mail2web.com> Hi. I want to pan (without having to use the middle button of the mouse, since I want to use outer button that I will create in a MFC dialog) a 2D picture and to change its brightness and contrast. How can I do this without using an imageViewer? My code now is: bmpReader = vtkBMPReader::New(); bmpReader->SetFileName("D:\\vtkExp\\femur1.bmp"); bmpReader->Update(); vtkImageActor* act = vtkImageActor::New(); act->SetInput(bmpReader->GetOutput()); vtkRenderer* renderer = vtkRenderer::New(); renderer->AddActor(act); CRect rect; CWnd* wind = GetDlgItem(IDC_PIC); renwin = vtkWin32OpenGLRenderWindow::New(); wind->GetClientRect(&rect); renwin->SetSize(rect.Width(), rect.Height()); renwin->SetParentId(wind->m_hWnd); ::SetParent(renwin->GetWindowId(), this->m_hWnd); renwin->AddRenderer(renderer); renwin->Render(); vtkRenderWindowInteractor* renwinint = vtkRenderWindowInteractor::New(); renwinint->SetRenderWindow(renwin); renwinint->Initialize(); camera = vtkCamera::New(); renderer->SetActiveCamera(camera); renderer->ResetCamera(); renderer->SetBackground(1,1,1); -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From I.deBoer at polytec.de Tue Aug 17 06:28:17 2004 From: I.deBoer at polytec.de (de Boer Ingo) Date: Tue, 17 Aug 2004 12:28:17 +0200 Subject: [vtkusers] Pan, brightness & contrast (2D). Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD984EF70@02polywbr.waldbronn.polytec.de> Hi, you can write your own vtkMyInteractorStyle based on eg. vtkInteractorStyleTrackballCamera Overwrite eg void OnLeftButtonDown(); void OnLeftButtonUp(); void OnMiddleButtonDown(); void OnMiddleButtonUp(); Than, like.. void vtkMyInteractorStyle::OnLeftButtonDown() { if (bPanMode) vtkInteractorStyleTrackballCamera::OnLeftButtonDown(); else vtkInteractorStyleTrackballCamera::OnMiddleButtonDown(); } In vtkMyInteractorStyle write a function for the bPanMode flag which toggles between rotation and panning. 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 want to pan (without having to use the middle button of the > mouse, since > I want to use outer button that I will create in a MFC > dialog) a 2D picture > and to change its brightness and contrast. How can I do this > without using > an imageViewer? > > My code now is: > bmpReader = vtkBMPReader::New(); > bmpReader->SetFileName("D:\\vtkExp\\femur1.bmp"); > bmpReader->Update(); > vtkImageActor* act = vtkImageActor::New(); > act->SetInput(bmpReader->GetOutput()); > vtkRenderer* renderer = vtkRenderer::New(); > renderer->AddActor(act); > > CRect rect; > > CWnd* wind = GetDlgItem(IDC_PIC); > renwin = vtkWin32OpenGLRenderWindow::New(); > wind->GetClientRect(&rect); > renwin->SetSize(rect.Width(), rect.Height()); > renwin->SetParentId(wind->m_hWnd); > ::SetParent(renwin->GetWindowId(), this->m_hWnd); > renwin->AddRenderer(renderer); > renwin->Render(); > > vtkRenderWindowInteractor* renwinint = > vtkRenderWindowInteractor::New(); > renwinint->SetRenderWindow(renwin); > renwinint->Initialize(); > > > camera = vtkCamera::New(); > renderer->SetActiveCamera(camera); > renderer->ResetCamera(); > renderer->SetBackground(1,1,1); From ricksen at natlab.research.philips.com Tue Aug 17 07:33:48 2004 From: ricksen at natlab.research.philips.com (Arjen Ricksen) Date: Tue, 17 Aug 2004 13:33:48 +0200 Subject: [vtkusers] including vtkPanel in vtk.jar Message-ID: <001201c4844e$10878950$498f9182@ddns.htc.nl.philips.com> Dear all, I'm trying to view a simple vtkRenderWindow inside a JFrame by using vtkPanel. When I run the application I get the same UnsatisfiedLinkError as Tarik Chowdhury, who posted his problem on Tue Mar 25 08:12:37 EST 2003. I tried the solution of Ramu Chandram, Tue Mar 25 08:29:05 EST 2003, but I don't know how to "compile with -d option" and how to include vtkPanel's class file into vtk.jar properly (all classes in vtk.jar seem to have class files with ".rule" extension, besides their normal class files). Can somebody explain me how to implement this solution? I'm working on a windows XP system, but I have an XTerm at my disposal. Kind regards, Arjen Ricksen WGP medewerker COS/SAVG Philips Research Laboratories Prof. Holstlaan 4 5656 AA Eindhoven, The Netherlands Building: WO P 46 Mailbox: WO 01 Tel : +31-40-27 44375 Fax: +31-40-27 44675 Mailto: ricksen at natlab.research.philips.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From manimag at hotmail.com Tue Aug 17 08:16:27 2004 From: manimag at hotmail.com (Emmanuel Guillot) Date: Tue, 17 Aug 2004 14:16:27 +0200 Subject: [vtkusers] what is vtkstd Message-ID: Hi everyone I'm still working with VTK 4.2 and I have some troubles with the Ensight6Reader. So I like to see if these troubles still exists in recent versions. But these files include and . I don't see where these files come from and I would like to know if I can just modify minor things to get it work normally Thanks Manu _________________________________________________________________ Recevez par e-mail des ?motic?nes pour MSN Messenger http://g.msn.fr/FR1001/2275?url=http://www.msn.fr/ilovemessenger/premium/Default.asp?Ath=f From venkatgm at rediffmail.com Tue Aug 17 08:39:46 2004 From: venkatgm at rediffmail.com (G Venkataramana Reddy) Date: 17 Aug 2004 12:39:46 -0000 Subject: [vtkusers] please help me Message-ID: <20040817123946.29902.qmail@webmail8.rediffmail.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- ? Note: Forwarded message attached -- Orignal Message -- From: "G Venkataramana Reddy" To: vtkusers at vtk.org Subject: [vtkusers] please help me -------------- next part -------------- An embedded message was scrubbed... From: "G Venkataramana Reddy" Subject: [vtkusers] please help me Date: no date Size: 1857 URL: From jdc at lnec.pt Tue Aug 17 08:47:18 2004 From: jdc at lnec.pt (=?iso-8859-1?Q?Jo=E3o?= Cunha) Date: Tue, 17 Aug 2004 13:47:18 +0100 Subject: [vtkusers] vtk crashes when dealing with Quadratic Hexahedrons Message-ID: <4121FE56.1E41C7D1@lnec.pt> I'm trying to visualize FEM data with cell type 25 (Quadratic_Hexahedron). Visualizing displacements with Hedgehogs works fine. However when trying WarpVector vtk crashed, and the same happens when running the attached tcl script e1.tcl, a much simplified version of the example in page 100 of vtk4.2 User's Guide. The code works fine with blow.vtk but a memory violation occurs with my data, Funcho_Desloc_vtk.vtk I include also the hedgehog code. I'm using vtk 4.2 with tcl 8.3.2. I can supply the data file (248kb) if anyone is interested, Regards Jo?o Cunha -- Jo?o Duarte Cunha Investigador-Coordenador Director do Centro da Qualidade na Constru??o jdc at lnec.pt -------------- next part -------------- A non-text attachment was scrubbed... Name: D_HHogs_S30.tcl Type: application/x-tcl Size: 1365 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: e1.tcl Type: application/x-tcl Size: 612 bytes Desc: not available URL: From mathieu.malaterre at kitware.com Tue Aug 17 08:50:20 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Tue, 17 Aug 2004 08:50:20 -0400 Subject: [vtkusers] please help me In-Reply-To: <20040817123946.29902.qmail@webmail8.rediffmail.com> References: <20040817123946.29902.qmail@webmail8.rediffmail.com> Message-ID: <4121FF0C.6000401@kitware.com> G Venkataramana Reddy, At the bottom of your email you can find the url to the ML webpage: http://www.vtk.org/mailman/listinfo/vtkusers Scroll down the page, enter your email adress, in your case this is: venkatgm at rediffmail.com Click 'Unsuscribe or edit options' then click 'Unsuscribe'. At no time you are asked for your password. HTH Mathieu G Venkataramana Reddy wrote: > > > > Note: Forwarded message attached > > -- Orignal Message -- > > From: "G Venkataramana Reddy" > To: vtkusers at vtk.org > Subject: [vtkusers] please help me > > > > ------------------------------------------------------------------------ > > Subject: > [vtkusers] please help me > From: > "G Venkataramana Reddy" > To: > vtkusers at vtk.org > > > Hi every one > > I want to unsubscribe to vtk users.I forget password.Can you anyone > please help me. > > Thanks&Regards > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From mathieu.malaterre at kitware.com Tue Aug 17 08:51:48 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Tue, 17 Aug 2004 08:51:48 -0400 Subject: [vtkusers] what is vtkstd In-Reply-To: References: Message-ID: <4121FF64.3040100@kitware.com> Emmanuel Guillot wrote: > Hi everyone > I'm still working with VTK 4.2 and I have some troubles with the > Ensight6Reader. So I like to see if these troubles still exists in > recent versions. But these files include and > . I don't see where these files come from and I would > like to know if I can just modify minor things to get it work normally > Thanks > Manu Manu, Could you instead send us the warnings/errors you are seeing, this is more helpfull. vtkstd is the approach we choose to support all possible stl configuration with /featured/ compilers. HTH Mathieu From manimag at hotmail.com Tue Aug 17 09:02:36 2004 From: manimag at hotmail.com (Emmanuel Guillot) Date: Tue, 17 Aug 2004 15:02:36 +0200 Subject: [vtkusers] what is vtkstd Message-ID: In fact, I only replace all the vtk*Ensight*.h and vtk*Ensight*.cxx files of my 4.2 release by their most recent version in the CVS. But these files include and that I don't have and the compilation crashes with the classical message : "VTK/IO/vtkGenericEnSightReader.cxx:28:25: vtkstd/string: No such file or directory" for each file. Manu >From: Mathieu Malaterre >To: Emmanuel Guillot >CC: vtkusers at vtk.org >Subject: Re: [vtkusers] what is vtkstd >Date: Tue, 17 Aug 2004 08:51:48 -0400 > >Emmanuel Guillot wrote: >>Hi everyone >>I'm still working with VTK 4.2 and I have some troubles with the >>Ensight6Reader. So I like to see if these troubles still exists in recent >>versions. But these files include and . I >>don't see where these files come from and I would like to know if I can >>just modify minor things to get it work normally >>Thanks >>Manu > >Manu, > > Could you instead send us the warnings/errors you are seeing, this is more >helpfull. > > vtkstd is the approach we choose to support all possible stl configuration >with /featured/ compilers. > > >HTH >Mathieu > > _________________________________________________________________ MSN Messenger http://g.msn.fr/FR1001/866 : dialoguez en direct et gratuitement avec vos amis ! From seanm at nmr.mgh.harvard.edu Tue Aug 17 09:13:40 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 17 Aug 2004 09:13:40 -0400 Subject: [vtkusers] what is vtkstd In-Reply-To: References: Message-ID: <41220484.8060104@nmr.mgh.harvard.edu> Emmanuel, You cannot expect to be able to mix and match VTK classes across versions. If you *really* need to stick with the 4.2 release while attempting to evaluate fixes to the EnSightReader made later, you could *attempt* simply removing the 'vtkstd/' prefix and adding '# define vtkstd std' in the implementation (.cxx) file (if your system's STL is good) ... but this is ugly hackery and I suggest moving to VTK 4.4. Mathieu, I may be incorrect since I cannot remember the source of this idea, but I thought having a path component in preprocessor inclusions was a portability no-no. The various ways of expressing path names among systems would seem to warrant some concern ... no? Does it test properly with all configurations supported by CMake / VTK? If so, rock on! -Sean P.S. What's the story with the related thread regarding a huge performance decline on OSX when moving from 4.2 to 4.4? Emmanuel Guillot wrote: > In fact, I only replace all the vtk*Ensight*.h and vtk*Ensight*.cxx > files of my 4.2 release by their most recent version in the CVS. But > these files include and that I don't > have and the compilation crashes with the classical message : > "VTK/IO/vtkGenericEnSightReader.cxx:28:25: vtkstd/string: No such file > or directory" > for each file. > Manu > >> From: Mathieu Malaterre >> To: Emmanuel Guillot >> CC: vtkusers at vtk.org >> Subject: Re: [vtkusers] what is vtkstd >> Date: Tue, 17 Aug 2004 08:51:48 -0400 >> >> Emmanuel Guillot wrote: >> >>> Hi everyone >>> I'm still working with VTK 4.2 and I have some troubles with the >>> Ensight6Reader. So I like to see if these troubles still exists in >>> recent versions. But these files include and >>> . I don't see where these files come from and I would >>> like to know if I can just modify minor things to get it work normally >>> Thanks >>> Manu >> >> >> Manu, >> >> Could you instead send us the warnings/errors you are seeing, this >> is more helpfull. >> >> vtkstd is the approach we choose to support all possible stl >> configuration with /featured/ compilers. >> >> >> HTH >> Mathieu >> >> > > _________________________________________________________________ > MSN Messenger http://g.msn.fr/FR1001/866 : dialoguez en direct et > gratuitement avec vos amis ! > > _______________________________________________ > 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 clinton at elemtech.com Tue Aug 17 09:36:19 2004 From: clinton at elemtech.com (Clinton Stimpson) Date: Tue, 17 Aug 2004 07:36:19 -0600 Subject: [vtkusers] Slow rendering in VTK 4.4 In-Reply-To: <20040817121656.2FBF720FC6@public.kitware.com> References: <20040817121656.2FBF720FC6@public.kitware.com> Message-ID: <1092749779.412209d3e79b9@webmail.xmission.com> And it feels like the drawing of labels has slowed down from 4.2 to CVS. I haven't measured it though. Clint > ------------------------------ > > Message: 7 > Date: Tue, 17 Aug 2004 10:30:56 +0200 > From: Geir Arne Tangen > Subject: [vtkusers] Slow rendering in VTK 4.4 > To: vtkusers at vtk.org > Message-ID: <4121C240.3050201 at sintef.no> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi all ! > > When switching from VTK 4.2 official release to VTK 4.4 interim release > we > are experiencing real slow rendering in our VTK based application. > > I have run Sebastien Barre?s "sphere-bench" application and the results > show a huge difference in performance between the two VTK versions (see > below). > > My system is Mac OSX ver. 10.3.5 "Panther". > > Have anyone else seen this loss of performance in VTK 4.4 ? > > Regards > Geir Arne Tangen > > Sphere-bench results VTK 4.2 : > ---------------------------------------- > Best results, summary : > - Power Macintosh running Darwin 7.5.0 > - VTK 4.2.6 (rev: 1.1495, 2003/02/18 03:45:04) > - CarbonOpenGL > - Visual is 1280x1024, truecolor/truecolor/24 > - Tcl/Tk 8.4.2 > - window was 700 x 700 > 1) 256x256 : 26083.7 kpolys/s : [stripper] > 2) 256x256 : 17038.3 kpolys/s : [small_sphere] > 3) 256x256 : 17036.5 kpolys/s : [transparency] > 4) 256x256 : 17033.8 kpolys/s : [] > 5) 256x256 : 14840.9 kpolys/s : [texture, transparency] > 6) 256x256 : 14831.3 kpolys/s : [texture] > 7) 256x256 : 695.5 kpolys/s : [wireframe] > > ------- DONE (in 14 sec.) ------- > > Sphere-bench results VTK 4.4 : > ----------------------------------------- > Best results, summary : > - Power Macintosh running Darwin 7.5.0 > - VTK 4.4.2 (rev: 1.1782, 2003/12/17 02:45:35) > - CarbonOpenGL > - Visual is 1280x1024, truecolor/truecolor/24 > - Tcl/Tk 8.4.2 > - window was 700 x 700 > 1) 256x256 : 27365.3 kpolys/s : [stripper] > 2) 256x256 : 721.8 kpolys/s : [texture, transparency] > 3) 256x256 : 721.1 kpolys/s : [texture] > 4) 256x256 : 696.4 kpolys/s : [] > 5) 256x256 : 696.4 kpolys/s : [wireframe] > 6) 256x256 : 696.3 kpolys/s : [transparency] > 7) 256x256 : 696.0 kpolys/s : [small_sphere] > > ------- DONE (in 50 sec.) ------- > > > > > ------------------------------ From semeraro at ncsa.uiuc.edu Tue Aug 17 10:21:12 2004 From: semeraro at ncsa.uiuc.edu (Dave Semeraro) Date: Tue, 17 Aug 2004 09:21:12 -0500 Subject: [vtkusers] new pipeline Message-ID: <5.1.0.14.2.20040817091645.013673e8@mail.ncsa.uiuc.edu> Hello, I just downloaded VTK from CVS and built it successfully. During the CMAKE configure I checked the option to "use the new pipeline". I searched the web for info on the new pipeline but came up empty. Is there any information about the new pipeline available? Does the update mechanism differ much from the old update mechanism described in the old user's guide ( 2000)? I expect for most uses the pipeline details would be transparent but sometimes it helps me debug stuff if I have an understanding of how the pipeline updates. Thanks for any pointers. Regards, Dave Dave Semeraro Ph.D. Visualization and Virtual Environments Group NCSA University of Illinois 605 E. Springfield Ave. Champaign, IL 61820 Semeraro at ncsa.uiuc.edu (217) 244-1852 From goodwin.lawlor at ucd.ie Tue Aug 17 10:56:26 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Tue, 17 Aug 2004 15:56:26 +0100 Subject: [vtkusers] Re: new pipeline References: <5.1.0.14.2.20040817091645.013673e8@mail.ncsa.uiuc.edu> Message-ID: Hi Dave, Here's a link from the faq http://www.vtk.org/Wiki/images/8/80/Pipeline.pdf You can also check out the vtk developers archives, there has been one or two posts there about the new pipeline architecture. hth Goodwin "Dave Semeraro" wrote in message news:5.1.0.14.2.20040817091645.013673e8 at mail.ncsa.uiuc.edu... > > Hello, > > I just downloaded VTK from CVS and built it successfully. During the CMAKE > configure I checked > the option to "use the new pipeline". I searched the web for info on the > new pipeline but came > up empty. Is there any information about the new pipeline available? Does > the update > mechanism differ much from the old update mechanism described in the old > user's guide ( 2000)? > I expect for most uses the pipeline details would be transparent but > sometimes it helps me > debug stuff if I have an understanding of how the pipeline updates. Thanks > for any pointers. > > Regards, > Dave > > Dave Semeraro Ph.D. > Visualization and Virtual Environments Group > NCSA University of Illinois > 605 E. Springfield Ave. > Champaign, IL 61820 > Semeraro at ncsa.uiuc.edu > (217) 244-1852 > > _______________________________________________ > 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 manimag at hotmail.com Tue Aug 17 11:07:07 2004 From: manimag at hotmail.com (Emmanuel Guillot) Date: Tue, 17 Aug 2004 17:07:07 +0200 Subject: [vtkusers] Bug in vtkEnSight6Reader? Message-ID: Hi everybody I've a segmentation fault using vtkEnSight6Reader. It's due to a scalars->Delete() in a loop. So, in the next execution of the loop, scalars isn't allocated anymore. That's bad... But I still trying to understand what the loop exactly does in order to determine how to change the function. If anyone once encountered this problem or thinks that I'm totally wrong, don't hesitate: that will save time ;-) Thanks Manu line 548 in the CVS: if (!measured) { for (i = 0; i < this->UnstructuredPartIds->GetNumberOfIds(); i++) { partId = this->UnstructuredPartIds->GetId(i); output = this->GetOutput(partId); if (component == 0) { scalars->SetName(description); output->GetPointData()->AddArray(scalars); if (!output->GetPointData()->GetScalars()) { output->GetPointData()->SetScalars(scalars); } >>>> scalars->Delete(); } else { output->GetPointData()->AddArray(scalars); } } } else { scalars->SetName(description); output = this->GetOutput(this->NumberOfGeometryParts); output->GetPointData()->AddArray(scalars); if (!output->GetPointData()->GetScalars()) { output->GetPointData()->SetScalars(scalars); } scalars->Delete(); } _________________________________________________________________ Bloquez les fen?tres pop-up, c'est gratuit ! http://toolbar.msn.fr From pro_thinker at yahoo.com Tue Aug 17 14:18:21 2004 From: pro_thinker at yahoo.com (Vijay) Date: Tue, 17 Aug 2004 11:18:21 -0700 (PDT) Subject: [vtkusers] curved surfaces - NURBS Message-ID: <20040817181821.85295.qmail@web40803.mail.yahoo.com> I have seen many postings regarding whether there is NURBS surface modeling capability using vtk but there has been no clear answer. I would be thankful if somebody could answer that. If so, is there any documentation available online? Thanks, Venkat From tk.sinha at vanderbilt.edu Tue Aug 17 15:26:43 2004 From: tk.sinha at vanderbilt.edu (Tuhin Sinha) Date: Tue, 17 Aug 2004 14:26:43 -0500 Subject: [vtkusers] curved surfaces - NURBS In-Reply-To: <20040817181821.85295.qmail@web40803.mail.yahoo.com> References: <20040817181821.85295.qmail@web40803.mail.yahoo.com> Message-ID: <1092770803.7177.11.camel@localhost> Venkat, As far as I know, there is no OpenGL/GLU NURBS support in VTK. I think one reason for this is because Windows doesn't support GLU 1.3 (which contains the NURBS tessalator API) out of the box. Having said that, I can't see why VTK won't support a home-grown NURBS implementation via vtkProgrammableSource. Hope this helps, Tuhin Sinha On Tue, 2004-08-17 at 13:18, Vijay wrote: > I have seen many postings regarding whether there is > NURBS surface modeling capability using vtk but there > has been no clear answer. I would be thankful if > somebody could answer that. If so, is there any > documentation available online? > Thanks, > Venkat > > _______________________________________________ > 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 matt at plasticflow.com Tue Aug 17 16:17:15 2004 From: matt at plasticflow.com (Matt Schmiermund) Date: Tue, 17 Aug 2004 13:17:15 -0700 (PDT) Subject: [vtkusers] displaying only visible elements of a grid Message-ID: <20040817201715.68313.qmail@web61010.mail.yahoo.com> I am using a vtkPolyDataSetReader to read unstructured grid information. Then a vtkPolyDataSetMapper to create an actor to display a mesh of an object. I am looking for a way to display only the parts of the mesh that would be actually visable ( just the front face of the object). I have looked through the docs and searched the archive, but I was unable to find anything. If anyone knows of a method to accomplish this I would appreciate the help. -Matt From seanm at nmr.mgh.harvard.edu Tue Aug 17 16:13:09 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 17 Aug 2004 16:13:09 -0400 Subject: [vtkusers] curved surfaces - NURBS In-Reply-To: <1092770803.7177.11.camel@localhost> References: <20040817181821.85295.qmail@web40803.mail.yahoo.com> <1092770803.7177.11.camel@localhost> Message-ID: <412266D5.1030309@nmr.mgh.harvard.edu> Anyone who implements a NURBS DataSet subclass and corresponding pipeline support is *supercool* in my book. Hint, hint ... curved surface support would be great for multiresolution rendering and such. I hope that it's on somebody's TODO list, even if it's not in the immediate future. Any takers, Kitware? -Sean Tuhin Sinha wrote: > Venkat, > > As far as I know, there is no OpenGL/GLU NURBS support in VTK. I > think one reason for this is because Windows doesn't support GLU 1.3 > (which contains the NURBS tessalator API) out of the box. Having said > that, I can't see why VTK won't support a home-grown NURBS > implementation via vtkProgrammableSource. > > Hope this helps, > > Tuhin Sinha > > On Tue, 2004-08-17 at 13:18, Vijay wrote: > >>I have seen many postings regarding whether there is >>NURBS surface modeling capability using vtk but there >>has been no clear answer. I would be thankful if >>somebody could answer that. If so, is there any >>documentation available online? >>Thanks, >>Venkat >> From pallavi.joshi at vanderbilt.edu Tue Aug 17 16:36:55 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Tue, 17 Aug 2004 15:36:55 -0500 Subject: [vtkusers] GetOrientation() Message-ID: <001001c48499$efa8db20$da593b81@Pallavi> Hi, Is it possible to get the orientation of a grid or a vtkImageData ? ------------------------------------------------------------------- Pallavi Joshi Graduate Student Medical Image Processing Lab -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor at ucd.ie Tue Aug 17 16:44:07 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Tue, 17 Aug 2004 21:44:07 +0100 Subject: [vtkusers] Re: curved surfaces - NURBS References: <20040817181821.85295.qmail@web40803.mail.yahoo.com> <1092770803.7177.11.camel@localhost> Message-ID: Hi Tuhin, What happened to vtkNURBSSurfaceSource ( http://public.kitware.com/pipermail/vtkusers/2002-December/064657.html )? There was a vtk class that used GLU to tesselate polygons so it is possible to wrap the library. What problem did you hit? Thanks, Goodwin ps If whoever writes the NURBS class gets bored, a vtkIGESWriter/Expoter would be useful and would pass the time for you nicely ;-) "Tuhin Sinha" wrote in message news:1092770803.7177.11.camel at localhost... > Venkat, > > As far as I know, there is no OpenGL/GLU NURBS support in VTK. I > think one reason for this is because Windows doesn't support GLU 1.3 > (which contains the NURBS tessalator API) out of the box. Having said > that, I can't see why VTK won't support a home-grown NURBS > implementation via vtkProgrammableSource. > > Hope this helps, > > Tuhin Sinha > > On Tue, 2004-08-17 at 13:18, Vijay wrote: > > I have seen many postings regarding whether there is > > NURBS surface modeling capability using vtk but there > > has been no clear answer. I would be thankful if > > somebody could answer that. If so, is there any > > documentation available online? > > Thanks, > > Venkat > > > > _______________________________________________ > > 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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From dgobbi at imaging.robarts.ca Tue Aug 17 16:51:03 2004 From: dgobbi at imaging.robarts.ca (David Gobbi) Date: Tue, 17 Aug 2004 16:51:03 -0400 (EDT) Subject: [vtkusers] GetOrientation() In-Reply-To: <001001c48499$efa8db20$da593b81@Pallavi> Message-ID: Hi Pallavi, There is no "orientation" for vtkImageData. The data is always arranged according to an x,y,z data coordinate grid: column number increases with x, row number increases with y, slice number increases with z. (Unless spacing is negative, in which case col number decreases with x etc) - David On Tue, 17 Aug 2004, Pallavi Joshi wrote: > Hi, > Is it possible to get the orientation of a grid or a vtkImageData ? > > ------------------------------------------------------------------- > Pallavi Joshi > Graduate Student > Medical Image Processing Lab > > From seanm at nmr.mgh.harvard.edu Tue Aug 17 16:44:35 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 17 Aug 2004 16:44:35 -0400 Subject: [vtkusers] Re: curved surfaces - NURBS In-Reply-To: References: <20040817181821.85295.qmail@web40803.mail.yahoo.com> <1092770803.7177.11.camel@localhost> Message-ID: <41226E33.7060107@nmr.mgh.harvard.edu> Wow Tuhin, I didn't know that you're already supercool ... or maybe you were previously supercool. I just want to know what an Expoter is ;-) Did you give up on your GLU wrapper class due to lack of interest or lack of Windows support? ... or maybe something more mysterious. -Sean Goodwin Lawlor wrote: > Hi Tuhin, > > What happened to vtkNURBSSurfaceSource ( > http://public.kitware.com/pipermail/vtkusers/2002-December/064657.html )? > There was a vtk class that used GLU to tesselate polygons so it is possible > to wrap the library. What problem did you hit? > > Thanks, > > Goodwin > > ps If whoever writes the NURBS class gets bored, a vtkIGESWriter/Expoter > would be useful and would pass the time for you nicely ;-) > > > > "Tuhin Sinha" wrote in message > news:1092770803.7177.11.camel at localhost... > >>Venkat, >> >> As far as I know, there is no OpenGL/GLU NURBS support in VTK. I >>think one reason for this is because Windows doesn't support GLU 1.3 >>(which contains the NURBS tessalator API) out of the box. Having said >>that, I can't see why VTK won't support a home-grown NURBS >>implementation via vtkProgrammableSource. >> >>Hope this helps, >> >>Tuhin Sinha >> >>On Tue, 2004-08-17 at 13:18, Vijay wrote: >> >>>I have seen many postings regarding whether there is >>>NURBS surface modeling capability using vtk but there >>>has been no clear answer. I would be thankful if >>>somebody could answer that. If so, is there any >>>documentation available online? >>>Thanks, >>>Venkat >>> >>>_______________________________________________ >>>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: > > > >>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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From David.Pont at ForestResearch.co.nz Tue Aug 17 16:59:28 2004 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Wed, 18 Aug 2004 08:59:28 +1200 Subject: [vtkusers] displaying only visible elements of a grid In-Reply-To: <20040817201715.68313.qmail@web61010.mail.yahoo.com> Message-ID: Hi Matt, I have used vtkGeometryFilter on an unstructured grid, this just extracts the outer surface... not quite the same as only the visible parts but could be useful, or a good start on what you want? Dave P vtkusers-bounces at vtk.org wrote on 18/08/2004 08:17:15: > I am using a vtkPolyDataSetReader to read unstructured > grid information. Then a vtkPolyDataSetMapper to > create an actor to display a mesh of an object. I am > looking for a way to display only the parts of the > mesh that would be actually visable ( just the front > face of the object). I have looked through the docs > and searched the archive, but I was unable to find > anything. > > If anyone knows of a method to accomplish this I would > appreciate the help. > > -Matt > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: kitware.com/cgi-bin/vtkfaq> > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From seanm at nmr.mgh.harvard.edu Tue Aug 17 16:56:12 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 17 Aug 2004 16:56:12 -0400 Subject: [vtkusers] GetOrientation() In-Reply-To: References: Message-ID: <412270EC.9040606@nmr.mgh.harvard.edu> It might be a nice extension to the vtkImageData or vtkStructuredPoints classes to include an RAS permutation matrix or, at least, to make some provision for axis labeling. This metadata could also be an extension to the VTK image file format(s). This should be easy to add without breaking backwards compatibility (except probably binary) and with minimal memory overhead. It seems like such a basic part of imaging work that it need not be application specific. Seems like a good candidate for a library API ... like VTK. Doing this right within the library would be a real boon. -Sean David Gobbi wrote: > Hi Pallavi, > > There is no "orientation" for vtkImageData. The data is always arranged > according to an x,y,z data coordinate grid: column number increases with > x, row number increases with y, slice number increases with z. (Unless > spacing is negative, in which case col number decreases with x etc) > > - David > > On Tue, 17 Aug 2004, Pallavi Joshi wrote: > > >>Hi, >>Is it possible to get the orientation of a grid or a vtkImageData ? >> >>------------------------------------------------------------------- >>Pallavi Joshi >>Graduate Student >>Medical Image Processing Lab >> From mathieu.malaterre at kitware.com Tue Aug 17 17:11:40 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Tue, 17 Aug 2004 17:11:40 -0400 Subject: [vtkusers] Re: curved surfaces - NURBS In-Reply-To: References: <20040817181821.85295.qmail@web40803.mail.yahoo.com> <1092770803.7177.11.camel@localhost> Message-ID: <4122748C.1000603@kitware.com> Goodwin Lawlor wrote: > Hi Tuhin, > > What happened to vtkNURBSSurfaceSource ( > http://public.kitware.com/pipermail/vtkusers/2002-December/064657.html )? > There was a vtk class that used GLU to tesselate polygons so it is possible > to wrap the library. What problem did you hit? > > Thanks, > > Goodwin > > ps If whoever writes the NURBS class gets bored, a vtkIGESWriter/Expoter > would be useful and would pass the time for you nicely ;-) I removed the vtkGLUTesselatorTriangleFilter class since it was too difficult to maintain. BTW, long time ago I wrote a very simple IGES importer: http://creatis-www.insa-lyon.fr/~malaterre/vtk/iges/ vtkOCCGeomReader.cxx / vtkOCCGeomReader.h You need OpenCascade installed on your system. It did work at a time on my computer but I never tried on windoze for example HTH, Mathieu From amy.henderson at kitware.com Tue Aug 17 17:13:16 2004 From: amy.henderson at kitware.com (Amy Henderson) Date: Tue, 17 Aug 2004 17:13:16 -0400 Subject: [vtkusers] GetOrientation() In-Reply-To: <412270EC.9040606@nmr.mgh.harvard.edu> References: <412270EC.9040606@nmr.mgh.harvard.edu> Message-ID: <6.1.2.0.2.20040817171130.03490ba0@pop.biz.rr.com> Hi Sean, vtkImageReslice does this already. It does require applying this filter to your image data (or structured points), but it means you don't have to extend these data set classes to get the results you're after. - Amy At 04:56 PM 8/17/2004, Sean McInerney wrote: >It might be a nice extension to the vtkImageData or vtkStructuredPoints >classes to include an RAS permutation matrix or, at least, to make some >provision for axis labeling. This metadata could also be an extension to >the VTK image file format(s). This should be easy to add without breaking >backwards compatibility (except probably binary) and with minimal memory >overhead. It seems like such a basic part of imaging work that it need not >be application specific. Seems like a good candidate for a library API ... >like VTK. Doing this right within the library would be a real boon. > >-Sean > >David Gobbi wrote: >>Hi Pallavi, >>There is no "orientation" for vtkImageData. The data is always arranged >>according to an x,y,z data coordinate grid: column number increases with >>x, row number increases with y, slice number increases with z. (Unless >>spacing is negative, in which case col number decreases with x etc) >> - David >>On Tue, 17 Aug 2004, Pallavi Joshi wrote: >> >>>Hi, >>>Is it possible to get the orientation of a grid or a vtkImageData ? >>> >>>------------------------------------------------------------------- >>>Pallavi Joshi >>>Graduate Student >>>Medical Image Processing Lab >_______________________________________________ >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 dgobbi at imaging.robarts.ca Tue Aug 17 17:22:40 2004 From: dgobbi at imaging.robarts.ca (David Gobbi) Date: Tue, 17 Aug 2004 17:22:40 -0400 (EDT) Subject: [vtkusers] GetOrientation() In-Reply-To: <412270EC.9040606@nmr.mgh.harvard.edu> Message-ID: Hi Sean, I agree with you 100%, but I would go even farther. The vtkDataObject supports a vtkFieldData that more-or-less allows you to put whatever data you want inside of the object. It would be great if there was an "InformationData" or some such associated with the object that carried information about how to interpret the data. A vtkFieldData object could be used to store the information. For example, if you wanted to associate an "Orientation" with a vtkImageData, you could add a 3x3 data array named "Orientation" to the InformationData that held the orientation. A filter would be able to read and modify the Orientation info as desired in the ExecuteInformation() method. This information would be exactly as you say: it would be "metadata" that could be stored in the files just like the image extent, spacing, etc. are currently stored in the files. - David On Tue, 17 Aug 2004, Sean McInerney wrote: > It might be a nice extension to the vtkImageData or vtkStructuredPoints > classes to include an RAS permutation matrix or, at least, to make some > provision for axis labeling. This metadata could also be an extension to > the VTK image file format(s). This should be easy to add without > breaking backwards compatibility (except probably binary) and with > minimal memory overhead. It seems like such a basic part of imaging work > that it need not be application specific. Seems like a good candidate > for a library API ... like VTK. Doing this right within the library > would be a real boon. > > -Sean > > David Gobbi wrote: > > Hi Pallavi, > > > > There is no "orientation" for vtkImageData. The data is always arranged > > according to an x,y,z data coordinate grid: column number increases with > > x, row number increases with y, slice number increases with z. (Unless > > spacing is negative, in which case col number decreases with x etc) > > > > - David > > > > On Tue, 17 Aug 2004, Pallavi Joshi wrote: > > > > > >>Hi, > >>Is it possible to get the orientation of a grid or a vtkImageData ? > >> > >>------------------------------------------------------------------- > >>Pallavi Joshi > >>Graduate Student > >>Medical Image Processing Lab > >> > From seanm at nmr.mgh.harvard.edu Tue Aug 17 17:14:16 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 17 Aug 2004 17:14:16 -0400 Subject: [vtkusers] GetOrientation() In-Reply-To: <6.1.2.0.2.20040817171130.03490ba0@pop.biz.rr.com> References: <412270EC.9040606@nmr.mgh.harvard.edu> <6.1.2.0.2.20040817171130.03490ba0@pop.biz.rr.com> Message-ID: <41227528.6010401@nmr.mgh.harvard.edu> Hi Amy, Right ... and it works great. But does it seem redundant to make a provision to pass along such important metadata? I admit that it might be an inelegant addition to the existing architecture. Maybe not generic enough to warrant it? -Sean Amy Henderson wrote: > Hi Sean, > > vtkImageReslice does this already. It does require applying this filter > to your image data (or structured points), but it means you don't have > to extend these data set classes to get the results you're after. > > - Amy > > At 04:56 PM 8/17/2004, Sean McInerney wrote: > >> It might be a nice extension to the vtkImageData or >> vtkStructuredPoints classes to include an RAS permutation matrix or, >> at least, to make some provision for axis labeling. This metadata >> could also be an extension to the VTK image file format(s). This >> should be easy to add without breaking backwards compatibility (except >> probably binary) and with minimal memory overhead. It seems like such >> a basic part of imaging work that it need not be application specific. >> Seems like a good candidate for a library API ... like VTK. Doing this >> right within the library would be a real boon. >> >> -Sean >> >> David Gobbi wrote: >> >>> Hi Pallavi, >>> There is no "orientation" for vtkImageData. The data is always arranged >>> according to an x,y,z data coordinate grid: column number increases with >>> x, row number increases with y, slice number increases with z. (Unless >>> spacing is negative, in which case col number decreases with x etc) >>> - David >>> On Tue, 17 Aug 2004, Pallavi Joshi wrote: >>> >>>> Hi, >>>> Is it possible to get the orientation of a grid or a vtkImageData ? >>>> >>>> ------------------------------------------------------------------- >>>> Pallavi Joshi >>>> Graduate Student >>>> Medical Image Processing Lab >> >> _______________________________________________ >> 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 seanm at nmr.mgh.harvard.edu Tue Aug 17 17:27:27 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 17 Aug 2004 17:27:27 -0400 Subject: [vtkusers] GetOrientation() In-Reply-To: References: Message-ID: <4122783F.5090803@nmr.mgh.harvard.edu> Hi David, A generic metadata API with some specific subclasses could be a useful addition to vtkDataSet's bag of tricks. Anything other than cell or point attributes could be subsumed by a "vtkMetaData" object. I wish that this idea dovetailed nicely into a vtkFieldData or vtkDataSetAttributes subclass, but it would probably need to handle more heterogeneous data than those seem to accommodate (not array-based). Maybe there's room for a new base class to vtkFieldData. If not for now, perhaps for VTK 6 ;-) -Sean David Gobbi wrote: > Hi Sean, > > I agree with you 100%, but I would go even farther. The vtkDataObject > supports a vtkFieldData that more-or-less allows you to put whatever data > you want inside of the object. It would be great if there was an > "InformationData" or some such associated with the object that > carried information about how to interpret the data. A vtkFieldData > object could be used to store the information. > > For example, if you wanted to associate an "Orientation" with a > vtkImageData, you could add a 3x3 data array named "Orientation" to the > InformationData that held the orientation. A filter would be able to > read and modify the Orientation info as desired in the > ExecuteInformation() method. > > This information would be exactly as you say: it would be "metadata" > that could be stored in the files just like the image extent, spacing, > etc. are currently stored in the files. > > - David > > > On Tue, 17 Aug 2004, Sean McInerney wrote: > > >>It might be a nice extension to the vtkImageData or vtkStructuredPoints >>classes to include an RAS permutation matrix or, at least, to make some >>provision for axis labeling. This metadata could also be an extension to >>the VTK image file format(s). This should be easy to add without >>breaking backwards compatibility (except probably binary) and with >>minimal memory overhead. It seems like such a basic part of imaging work >>that it need not be application specific. Seems like a good candidate >>for a library API ... like VTK. Doing this right within the library >>would be a real boon. >> >>-Sean >> >>David Gobbi wrote: >> >>>Hi Pallavi, >>> >>>There is no "orientation" for vtkImageData. The data is always arranged >>>according to an x,y,z data coordinate grid: column number increases with >>>x, row number increases with y, slice number increases with z. (Unless >>>spacing is negative, in which case col number decreases with x etc) >>> >>> - David >>> >>>On Tue, 17 Aug 2004, Pallavi Joshi wrote: >>> >>> >>> >>>>Hi, >>>>Is it possible to get the orientation of a grid or a vtkImageData ? >>>> >>>>------------------------------------------------------------------- >>>>Pallavi Joshi >>>>Graduate Student >>>>Medical Image Processing Lab >>>> >> > > From goodwin.lawlor at ucd.ie Tue Aug 17 17:57:52 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Tue, 17 Aug 2004 22:57:52 +0100 Subject: [vtkusers] Re: curved surfaces - NURBS References: <20040817181821.85295.qmail@web40803.mail.yahoo.com> <1092770803.7177.11.camel@localhost> <4122748C.1000603@kitware.com> Message-ID: <001401c484a5$3e81f0f0$0d01a8c0@Renasci> No expoters then? :-/ ----- Original Message ----- From: "Mathieu Malaterre" To: "Goodwin Lawlor" Cc: Sent: Tuesday, August 17, 2004 10:11 PM Subject: Re: [vtkusers] Re: curved surfaces - NURBS > Goodwin Lawlor wrote: > > Hi Tuhin, > > > > What happened to vtkNURBSSurfaceSource ( > > http://public.kitware.com/pipermail/vtkusers/2002-December/064657.html )? > > There was a vtk class that used GLU to tesselate polygons so it is possible > > to wrap the library. What problem did you hit? > > > > Thanks, > > > > Goodwin > > > > ps If whoever writes the NURBS class gets bored, a vtkIGESWriter/Expoter > > would be useful and would pass the time for you nicely ;-) > > I removed the vtkGLUTesselatorTriangleFilter class since it was too > difficult to maintain. > > > > > BTW, long time ago I wrote a very simple IGES importer: > http://creatis-www.insa-lyon.fr/~malaterre/vtk/iges/ > > vtkOCCGeomReader.cxx / vtkOCCGeomReader.h > > You need OpenCascade installed on your system. > > It did work at a time on my computer but I never tried on windoze for > example > > HTH, > Mathieu > > > From mathieu.malaterre at kitware.com Tue Aug 17 18:05:07 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Tue, 17 Aug 2004 18:05:07 -0400 Subject: [vtkusers] Re: curved surfaces - NURBS In-Reply-To: <001401c484a5$3e81f0f0$0d01a8c0@Renasci> References: <20040817181821.85295.qmail@web40803.mail.yahoo.com> <1092770803.7177.11.camel@localhost> <4122748C.1000603@kitware.com> <001401c484a5$3e81f0f0$0d01a8c0@Renasci> Message-ID: <41228113.6080500@kitware.com> You can ty to wite you own, based on my class :) Mathieu Goodwin Lawlor wrote: > No expoters then? :-/ > > ----- Original Message ----- > From: "Mathieu Malaterre" > To: "Goodwin Lawlor" > Cc: > Sent: Tuesday, August 17, 2004 10:11 PM > Subject: Re: [vtkusers] Re: curved surfaces - NURBS > > > >>Goodwin Lawlor wrote: >> >>>Hi Tuhin, >>> >>>What happened to vtkNURBSSurfaceSource ( >>> > > http://public.kitware.com/pipermail/vtkusers/2002-December/064657.html )? > >>>There was a vtk class that used GLU to tesselate polygons so it is > > possible > >>>to wrap the library. What problem did you hit? >>> >>>Thanks, >>> >>>Goodwin >>> >>>ps If whoever writes the NURBS class gets bored, a vtkIGESWriter/Expoter >>>would be useful and would pass the time for you nicely ;-) >> >>I removed the vtkGLUTesselatorTriangleFilter class since it was too >>difficult to maintain. >> >> >> >> >>BTW, long time ago I wrote a very simple IGES importer: >>http://creatis-www.insa-lyon.fr/~malaterre/vtk/iges/ >> >>vtkOCCGeomReader.cxx / vtkOCCGeomReader.h >> >>You need OpenCascade installed on your system. >> >>It did work at a time on my computer but I never tried on windoze for >>example >> >>HTH, >>Mathieu >> >> >> > > > From tk.sinha at vanderbilt.edu Tue Aug 17 18:37:46 2004 From: tk.sinha at vanderbilt.edu (Tuhin Sinha) Date: Tue, 17 Aug 2004 17:37:46 -0500 Subject: [vtkusers] Re: curved surfaces - NURBS In-Reply-To: References: <20040817181821.85295.qmail@web40803.mail.yahoo.com> <1092770803.7177.11.camel@localhost> Message-ID: <1092782266.7630.6.camel@localhost> Hey all, I implemented the vtkNURBSSurfaceSource class under Linux and managed to get things working. I sent off a copy of the class to Kitware for review, but I never heard from them regarding its incorporation in the the mainline tree. In the meantime, I found that the class doesn't compile under Windows due to a lacking support for GLU 1.3. So we have a flag in our vtkMy tree that selectively compiles vtkNURBSSurfaceSource under Linux only. I have thought about extracting the relevant GLU code from the XFree/Mesa tree and putting it in as a Utilities library so the class can be used cross-platform. I am currently happy with my *supercool* class working only under Linux. Hoever, if there is interest in this class for general purpose use... I can look into figuring out how to get the GLU stuff included with cross-platform issues in mind. Best regards, TKS On Tue, 2004-08-17 at 15:44, Goodwin Lawlor wrote: > Hi Tuhin, > > What happened to vtkNURBSSurfaceSource ( > http://public.kitware.com/pipermail/vtkusers/2002-December/064657.html )? > There was a vtk class that used GLU to tesselate polygons so it is possible > to wrap the library. What problem did you hit? > > Thanks, > > Goodwin > > ps If whoever writes the NURBS class gets bored, a vtkIGESWriter/Expoter > would be useful and would pass the time for you nicely ;-) > > > > "Tuhin Sinha" wrote in message > news:1092770803.7177.11.camel at localhost... > > Venkat, > > > > As far as I know, there is no OpenGL/GLU NURBS support in VTK. I > > think one reason for this is because Windows doesn't support GLU 1.3 > > (which contains the NURBS tessalator API) out of the box. Having said > > that, I can't see why VTK won't support a home-grown NURBS > > implementation via vtkProgrammableSource. > > > > Hope this helps, > > > > Tuhin Sinha > > > > On Tue, 2004-08-17 at 13:18, Vijay wrote: > > > I have seen many postings regarding whether there is > > > NURBS surface modeling capability using vtk but there > > > has been no clear answer. I would be thankful if > > > somebody could answer that. If so, is there any > > > documentation available online? > > > Thanks, > > > Venkat > > > > > > _______________________________________________ > > > 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: > > > 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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From mathieu.malaterre at kitware.com Tue Aug 17 18:41:07 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Tue, 17 Aug 2004 18:41:07 -0400 Subject: [vtkusers] Re: curved surfaces - NURBS In-Reply-To: <1092782266.7630.6.camel@localhost> References: <20040817181821.85295.qmail@web40803.mail.yahoo.com> <1092770803.7177.11.camel@localhost> <1092782266.7630.6.camel@localhost> Message-ID: <41228983.6010302@kitware.com> Hum, sorry about that. Could you please open a bug report for that. And enter a feature request. After you edit your bug, you can add attachement. Thanks Mathieu Tuhin Sinha wrote: > Hey all, > > I implemented the vtkNURBSSurfaceSource class under Linux and managed > to get things working. I sent off a copy of the class to Kitware for > review, but I never heard from them regarding its incorporation in the > the mainline tree. In the meantime, I found that the class doesn't > compile under Windows due to a lacking support for GLU 1.3. So we have > a flag in our vtkMy tree that selectively compiles vtkNURBSSurfaceSource > under Linux only. I have thought about extracting the relevant GLU code > from the XFree/Mesa tree and putting it in as a Utilities library so the > class can be used cross-platform. I am currently happy with my > *supercool* class working only under Linux. Hoever, if there is > interest in this class for general purpose use... I can look into > figuring out how to get the GLU stuff included with cross-platform > issues in mind. > > Best regards, > > TKS > > On Tue, 2004-08-17 at 15:44, Goodwin Lawlor wrote: > >>Hi Tuhin, >> >>What happened to vtkNURBSSurfaceSource ( >>http://public.kitware.com/pipermail/vtkusers/2002-December/064657.html )? >>There was a vtk class that used GLU to tesselate polygons so it is possible >>to wrap the library. What problem did you hit? >> >>Thanks, >> >>Goodwin >> >>ps If whoever writes the NURBS class gets bored, a vtkIGESWriter/Expoter >>would be useful and would pass the time for you nicely ;-) >> >> >> >>"Tuhin Sinha" wrote in message >>news:1092770803.7177.11.camel at localhost... >> >>>Venkat, >>> >>> As far as I know, there is no OpenGL/GLU NURBS support in VTK. I >>>think one reason for this is because Windows doesn't support GLU 1.3 >>>(which contains the NURBS tessalator API) out of the box. Having said >>>that, I can't see why VTK won't support a home-grown NURBS >>>implementation via vtkProgrammableSource. >>> >>>Hope this helps, >>> >>>Tuhin Sinha >>> >>>On Tue, 2004-08-17 at 13:18, Vijay wrote: >>> >>>>I have seen many postings regarding whether there is >>>>NURBS surface modeling capability using vtk but there >>>>has been no clear answer. I would be thankful if >>>>somebody could answer that. If so, is there any >>>>documentation available online? >>>>Thanks, >>>>Venkat >>>> >>>>_______________________________________________ >>>>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: >> >> >> >>>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: >>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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From lucas at cvrti.utah.edu Tue Aug 17 20:24:13 2004 From: lucas at cvrti.utah.edu (Lucas Lorenzo) Date: Tue, 17 Aug 2004 18:24:13 -0600 Subject: [vtkusers] problem compiling my application Message-ID: Hi all, I'm trying to compile a simple program that reads a volume in the form of vtkStructuredPoints and extracts a particular slice (using vtkImageReslice) in order to display it: #include "vtkStructuredPointsReader.h" #include "vtkLookupTable.h" #include "vtkImageReslice.h" #include "vtkRenderWindow.h" #include "vtkCamera.h" #include "vtkActor.h" #include "vtkRenderer.h" #include "vtkDataSetMapper.h" #include "vtkRenderWindowInteractor.h" int main( int argc, char *argv[] ) { vtkStructuredPointsReader *image_reader = vtkStructuredPointsReader::New(); image_reader->SetFileName("myfile.vtk"); unsigned short lowval = 0; unsigned short highval = 306; vtkLookupTable *lut = vtkLookupTable::New(); lut->SetNumberOfTableValues(1024); lut->SetTableRange(lowval,highval); lut->SetHueRange(1,1); lut->SetSaturationRange(0,0); lut->SetValueRange(0,1); lut->Build(); vtkImageReslice *get_slice = vtkImageReslice::New(); get_slice->SetInput(image_reader->GetOutput()); get_slice->SetOutputDimensionality(2); get_slice->SetResliceAxesOrigin(0,0,33); vtkDataSetMapper *im_mapper = vtkDataSetMapper::New(); im_mapper->SetInput(get_slice->GetOutput()); im_mapper->SetScalarRange(lowval,highval); im_mapper->SetColorModeToMapScalars(); im_mapper->SetLookupTable(lut); vtkActor *imActor = vtkActor::New(); imActor->SetMapper(im_mapper); // Create the RenderWindow, Renderer and both Actors vtkRenderer *ren1 = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren1); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); // Add the actors to the renderer, set the background and size ren1->AddActor(imActor); renWin->SetSize(640,640); // render the image vtkCamera *cam1 = ren1->GetActiveCamera(); cam1->Zoom(2.5); renWin->Render(); // deallocate memory: image_reader->Delete(); lut->Delete(); get_slice->Delete(); im_mapper->Delete(); imActor->Delete(); ren1->Delete(); renWin->Delete(); iren->Delete(); return 0; } When compiling I have the following error: Building dependencies. cmake.depends... -- Loading VTK CMake commands -- Loading VTK CMake commands - done Building object file ThresholdVTK.o... /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx: In function `int main(int, char**)': /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:30: error: no matching function for call to `vtkImageReslice::SetInput( vtkStructuredPoints*)' /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/ vtkImageToImageFilter.h:40: error: candidates are: virtual void vtkImageToImageFilter::SetInput(vtkImageData*) /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:36: error: no matching function for call to `vtkDataSetMapper::SetInput(vtkImageData*)' /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/vtkDataSetMapper.h: 56: error: candidates are: void vtkDataSetMapper::SetInput(vtkDataSet*) make[1]: *** [ThresholdVTK.o] Error 1 make: *** [default_target] Error 2 It is my understanding that vtkStructuredPoints inherits vtkImageData. But I must be missing something here. If you guys have any clue about this, please let me know. Thanks, Lucas Lorenzo PS: the CMakeList.txt file is only this: PROJECT (ThresholdVTK) INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake) IF (USE_VTK_FILE) INCLUDE(${USE_VTK_FILE}) ENDIF (USE_VTK_FILE) ADD_EXECUTABLE(ThresholdVTK ThresholdVTK.cxx) TARGET_LINK_LIBRARIES(ThresholdVTK vtkRendering vtkImaging vtkIO) University of Utah Nora Eccles Harrison CardioVascular Research and Training Institute Fellows Room 95 South 2000 East Salt Lake City, UT 84112-5000 e-mail: lucas at cvrti.utah.edu telephone: 801-587-9536 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 4377 bytes Desc: not available URL: From seanm at nmr.mgh.harvard.edu Tue Aug 17 20:19:19 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 17 Aug 2004 20:19:19 -0400 Subject: [vtkusers] problem compiling my application In-Reply-To: References: Message-ID: <4122A087.6000500@nmr.mgh.harvard.edu> Hi Lucas, You are missing: #include "vtkStructuredPoints.h" See -Sean Lucas Lorenzo wrote: > Hi all, > > I'm trying to compile a simple program that reads a volume in the form > of vtkStructuredPoints and extracts a particular slice (using > vtkImageReslice) in order to display it: > > > #include "vtkStructuredPointsReader.h" > #include "vtkLookupTable.h" > #include "vtkImageReslice.h" > #include "vtkRenderWindow.h" > #include "vtkCamera.h" > #include "vtkActor.h" > #include "vtkRenderer.h" > #include "vtkDataSetMapper.h" > #include "vtkRenderWindowInteractor.h" > > int main( int argc, char *argv[] ) > { > > vtkStructuredPointsReader *image_reader = > vtkStructuredPointsReader::New(); > image_reader->SetFileName("myfile.vtk"); > > > unsigned short lowval = 0; > unsigned short highval = 306; > vtkLookupTable *lut = vtkLookupTable::New(); > lut->SetNumberOfTableValues(1024); > lut->SetTableRange(lowval,highval); > lut->SetHueRange(1,1); > lut->SetSaturationRange(0,0); > lut->SetValueRange(0,1); > lut->Build(); > > > vtkImageReslice *get_slice = vtkImageReslice::New(); > get_slice->SetInput(image_reader->GetOutput()); > get_slice->SetOutputDimensionality(2); > get_slice->SetResliceAxesOrigin(0,0,33); > > > vtkDataSetMapper *im_mapper = vtkDataSetMapper::New(); > im_mapper->SetInput(get_slice->GetOutput()); > im_mapper->SetScalarRange(lowval,highval); > im_mapper->SetColorModeToMapScalars(); > im_mapper->SetLookupTable(lut); > > > vtkActor *imActor = vtkActor::New(); > imActor->SetMapper(im_mapper); > > > // Create the RenderWindow, Renderer and both Actors > vtkRenderer *ren1 = vtkRenderer::New(); > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->AddRenderer(ren1); > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > > > // Add the actors to the renderer, set the background and size > ren1->AddActor(imActor); > renWin->SetSize(640,640); > > > // render the image > vtkCamera *cam1 = ren1->GetActiveCamera(); > cam1->Zoom(2.5); > renWin->Render(); > > > // deallocate memory: > image_reader->Delete(); > lut->Delete(); > get_slice->Delete(); > im_mapper->Delete(); > imActor->Delete(); > ren1->Delete(); > renWin->Delete(); > iren->Delete(); > > > return 0; > } > > When compiling I have the following error: > > Building dependencies. cmake.depends... > -- Loading VTK CMake commands > -- Loading VTK CMake commands - done > Building object file ThresholdVTK.o... > /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx: In function > `int > main(int, char**)': > /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:30: error: no > matching function for call to `vtkImageReslice::SetInput( > vtkStructuredPoints*)' > /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/ > vtkImageToImageFilter.h:40: error: candidates > are: virtual void vtkImageToImageFilter::SetInput(vtkImageData*) > /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:36: error: no > matching function for call to > `vtkDataSetMapper::SetInput(vtkImageData*)' > /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/vtkDataSetMapper.h: > 56: error: candidates > are: void vtkDataSetMapper::SetInput(vtkDataSet*) > make[1]: *** [ThresholdVTK.o] Error 1 > make: *** [default_target] Error 2 > > It is my understanding that vtkStructuredPoints inherits vtkImageData. > But I must be missing something here. > If you guys have any clue about this, please let me know. > Thanks, > > Lucas Lorenzo > > PS: the CMakeList.txt file is only this: > > PROJECT (ThresholdVTK) > > INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake) > IF (USE_VTK_FILE) > INCLUDE(${USE_VTK_FILE}) > ENDIF (USE_VTK_FILE) > > ADD_EXECUTABLE(ThresholdVTK ThresholdVTK.cxx) > TARGET_LINK_LIBRARIES(ThresholdVTK vtkRendering vtkImaging vtkIO) > > University of Utah > Nora Eccles Harrison CardioVascular Research and Training Institute > Fellows Room > 95 South 2000 East > Salt Lake City, UT 84112-5000 > > e-mail: lucas at cvrti.utah.edu > telephone: 801-587-9536 > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 lucas at cvrti.utah.edu Tue Aug 17 20:37:00 2004 From: lucas at cvrti.utah.edu (Lucas Lorenzo) Date: Tue, 17 Aug 2004 18:37:00 -0600 Subject: [vtkusers] problem compiling my application In-Reply-To: <4122A087.6000500@nmr.mgh.harvard.edu> References: <4122A087.6000500@nmr.mgh.harvard.edu> Message-ID: Great ! Thanks Sean, Lucas On Aug 17, 2004, at 6:19 PM, Sean McInerney wrote: > Hi Lucas, > > You are missing: > > #include "vtkStructuredPoints.h" > > See > > -Sean > > Lucas Lorenzo wrote: >> Hi all, >> I'm trying to compile a simple program that reads a volume in the >> form of vtkStructuredPoints and extracts a particular slice (using >> vtkImageReslice) in order to display it: >> #include "vtkStructuredPointsReader.h" >> #include "vtkLookupTable.h" >> #include "vtkImageReslice.h" >> #include "vtkRenderWindow.h" >> #include "vtkCamera.h" >> #include "vtkActor.h" >> #include "vtkRenderer.h" >> #include "vtkDataSetMapper.h" >> #include "vtkRenderWindowInteractor.h" >> int main( int argc, char *argv[] ) >> { >> vtkStructuredPointsReader *image_reader = >> vtkStructuredPointsReader::New(); >> image_reader->SetFileName("myfile.vtk"); >> unsigned short lowval = 0; >> unsigned short highval = 306; >> vtkLookupTable *lut = vtkLookupTable::New(); >> lut->SetNumberOfTableValues(1024); >> lut->SetTableRange(lowval,highval); >> lut->SetHueRange(1,1); >> lut->SetSaturationRange(0,0); >> lut->SetValueRange(0,1); >> lut->Build(); >> vtkImageReslice *get_slice = vtkImageReslice::New(); >> get_slice->SetInput(image_reader->GetOutput()); >> get_slice->SetOutputDimensionality(2); >> get_slice->SetResliceAxesOrigin(0,0,33); >> vtkDataSetMapper *im_mapper = vtkDataSetMapper::New(); >> im_mapper->SetInput(get_slice->GetOutput()); >> im_mapper->SetScalarRange(lowval,highval); >> im_mapper->SetColorModeToMapScalars(); >> im_mapper->SetLookupTable(lut); >> vtkActor *imActor = vtkActor::New(); >> imActor->SetMapper(im_mapper); >> // Create the RenderWindow, Renderer and both Actors >> vtkRenderer *ren1 = vtkRenderer::New(); >> vtkRenderWindow *renWin = vtkRenderWindow::New(); >> renWin->AddRenderer(ren1); >> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); >> iren->SetRenderWindow(renWin); >> // Add the actors to the renderer, set the background and size >> ren1->AddActor(imActor); >> renWin->SetSize(640,640); >> // render the image >> vtkCamera *cam1 = ren1->GetActiveCamera(); >> cam1->Zoom(2.5); >> renWin->Render(); >> // deallocate memory: >> image_reader->Delete(); >> lut->Delete(); >> get_slice->Delete(); >> im_mapper->Delete(); >> imActor->Delete(); >> ren1->Delete(); >> renWin->Delete(); >> iren->Delete(); >> return 0; >> } >> When compiling I have the following error: >> Building dependencies. cmake.depends... >> -- Loading VTK CMake commands >> -- Loading VTK CMake commands - done >> Building object file ThresholdVTK.o... >> /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx: In >> function `int >> main(int, char**)': >> /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:30: error: >> no >> matching function for call to `vtkImageReslice::SetInput( >> vtkStructuredPoints*)' >> /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/ >> vtkImageToImageFilter.h:40: error: candidates >> are: virtual void vtkImageToImageFilter::SetInput(vtkImageData*) >> /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:36: error: >> no >> matching function for call to >> `vtkDataSetMapper::SetInput(vtkImageData*)' >> /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/vtkDataSetMapper.h: >> 56: error: candidates >> are: void vtkDataSetMapper::SetInput(vtkDataSet*) >> make[1]: *** [ThresholdVTK.o] Error 1 >> make: *** [default_target] Error 2 >> It is my understanding that vtkStructuredPoints inherits >> vtkImageData. But I must be missing something here. >> If you guys have any clue about this, please let me know. >> Thanks, >> Lucas Lorenzo >> PS: the CMakeList.txt file is only this: >> PROJECT (ThresholdVTK) >> INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake) >> IF (USE_VTK_FILE) >> INCLUDE(${USE_VTK_FILE}) >> ENDIF (USE_VTK_FILE) >> ADD_EXECUTABLE(ThresholdVTK ThresholdVTK.cxx) >> TARGET_LINK_LIBRARIES(ThresholdVTK vtkRendering vtkImaging vtkIO) >> University of Utah >> Nora Eccles Harrison CardioVascular Research and Training Institute >> Fellows Room >> 95 South 2000 East >> Salt Lake City, UT 84112-5000 >> e-mail: lucas at cvrti.utah.edu >> telephone: 801-587-9536 >> ---------------------------------------------------------------------- >> -- >> _______________________________________________ >> 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 >> Lucas Lorenzo University of Utah Nora Eccles Harrison CardioVascular Research and Training Institute Fellows Room 95 South 2000 East Salt Lake City, UT 84112-5000 e-mail: lucas at cvrti.utah.edu telephone: 801-587-9536 From raman_nagarajan at vsnl.net Wed Aug 18 01:16:00 2004 From: raman_nagarajan at vsnl.net (Nagarajan) Date: Wed, 18 Aug 2004 10:46:00 +0530 Subject: [vtkusers] Getting the time for rendering Message-ID: <000d01c484e2$731444c0$5a02a8c0@MAINDEV> Hello users, Lately I have been doing a 256 x 256 x 256 data rendering. It is for an application(medical imaging). From the time the rendering bagins till the image is shown, there is no clue as to how much time it is going to take. Is there a way to get it?. The window appears but the image appears several seconds later. I wish to do the following. From the time the window is shown, till the image is appearing I want to flash a message that the process is still going on. Can some one help me? Nagarajan -------------- next part -------------- An HTML attachment was scrubbed... URL: From joeri_vtk at hotmail.com Wed Aug 18 03:21:56 2004 From: joeri_vtk at hotmail.com (Joeri Nicolaes) Date: Wed, 18 Aug 2004 09:21:56 +0200 Subject: [vtkusers] remove renderwindow Message-ID: Hi all, I would like to couple a user interaction to showing an image in a new renderWindow and to removing again this window. But how to remove a renderWindow? The problem is that when you close the renderWindow (in Windows) with the cross in the right upper border of the window, the whole application exits. Joeri -------------- next part -------------- An HTML attachment was scrubbed... URL: From ricksen at natlab.research.philips.com Wed Aug 18 04:53:37 2004 From: ricksen at natlab.research.philips.com (Arjen Ricksen) Date: Wed, 18 Aug 2004 10:53:37 +0200 Subject: [vtkusers] including vtkPanel in vtk.jar References: <001201c4844e$10878950$498f9182@ddns.htc.nl.philips.com> Message-ID: <000e01c48500$da4a67a0$498f9182@ddns.htc.nl.philips.com> Hello Songbo, I did that in the first place. Then I got the errors, and read about including vtkPanel into vtk.jar. I'm using the Eclipse environment to compile and run my Java applications. Is there some special feature of Eclipse that lets you include class files into jar files? ----- Original Message ----- From: Songbo Chen To: Arjen Ricksen Sent: Tuesday 17 August 2004 16:12 Subject: Re: [vtkusers] including vtkPanel in vtk.jar Hi, vtkPanel is not coming with the preinstall version of vtk, you have to download it separatly from the VTK website. once you download it, just put it in your application directory. hope this can help you. ----- Original Message ----- From: Arjen Ricksen To: vtkusers at vtk.org Sent: Tuesday, August 17, 2004 12:33 PM Subject: [vtkusers] including vtkPanel in vtk.jar Dear all, I'm trying to view a simple vtkRenderWindow inside a JFrame by using vtkPanel. When I run the application I get the same UnsatisfiedLinkError as Tarik Chowdhury, who posted his problem on Tue Mar 25 08:12:37 EST 2003. I tried the solution of Ramu Chandram, Tue Mar 25 08:29:05 EST 2003, but I don't know how to "compile with -d option" and how to include vtkPanel's class file into vtk.jar properly (all classes in vtk.jar seem to have class files with ".rule" extension, besides their normal class files). Can somebody explain me how to implement this solution? I'm working on a windows XP system, but I have an XTerm at my disposal. Kind regards, Arjen Ricksen WGP medewerker COS/SAVG Philips Research Laboratories Prof. Holstlaan 4 5656 AA Eindhoven, The Netherlands Building: WO P 46 Mailbox: WO 01 Tel : +31-40-27 44375 Fax: +31-40-27 44675 Mailto: ricksen at natlab.research.philips.com ---------------------------------------------------------------------------- _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramakrishna.prakash at quest-global.com Wed Aug 18 05:12:23 2004 From: ramakrishna.prakash at quest-global.com (R K Shyam Prakash) Date: Wed, 18 Aug 2004 14:42:23 +0530 Subject: [vtkusers] including vtkPanel in vtk.jar In-Reply-To: <000e01c48500$da4a67a0$498f9182@ddns.htc.nl.philips.com> Message-ID: <000501c48503$7a573c30$230aa8c0@questtw.questglobal.com> Hi, Can you send the error stack . --Shyam -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Arjen Ricksen Sent: Wednesday, August 18, 2004 2:24 PM To: Songbo Chen; vtkusers at vtk.org Subject: Re: [vtkusers] including vtkPanel in vtk.jar Hello Songbo, I did that in the first place. Then I got the errors, and read about including vtkPanel into vtk.jar. I'm using the Eclipse environment to compile and run my Java applications. Is there some special feature of Eclipse that lets you include class files into jar files? ----- Original Message ----- From: Songbo Chen To: Arjen Ricksen Sent: Tuesday 17 August 2004 16:12 Subject: Re: [vtkusers] including vtkPanel in vtk.jar Hi, vtkPanel is not coming with the preinstall version of vtk, you have to download it separatly from the VTK website. once you download it, just put it in your application directory. hope this can help you. ----- Original Message ----- From: Arjen Ricksen To: vtkusers at vtk.org Sent: Tuesday, August 17, 2004 12:33 PM Subject: [vtkusers] including vtkPanel in vtk.jar Dear all, I'm trying to view a simple vtkRenderWindow inside a JFrame by using vtkPanel. When I run the application I get the same UnsatisfiedLinkError as Tarik Chowdhury, who posted his problem on Tue Mar 25 08:12:37 EST 2003. I tried the solution of Ramu Chandram, Tue Mar 25 08:29:05 EST 2003, but I don't know how to "compile with -d option" and how to include vtkPanel's class file into vtk.jar properly (all classes in vtk.jar seem to have class files with ".rule" extension, besides their normal class files). Can somebody explain me how to implement this solution? I'm working on a windows XP system, but I have an XTerm at my disposal. Kind regards, Arjen Ricksen WGP medewerker COS/SAVG Philips Research Laboratories Prof. Holstlaan 4 5656 AA Eindhoven, The Netherlands Building: WO P 46 Mailbox: WO 01 Tel : +31-40-27 44375 Fax: +31-40-27 44675 Mailto: ricksen at natlab.research.philips.com _____ _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From berninho1 at hotmail.com Wed Aug 18 06:39:17 2004 From: berninho1 at hotmail.com (Bernhard Mayrhofer) Date: Wed, 18 Aug 2004 12:39:17 +0200 Subject: [vtkusers] How to display colors? Message-ID: Hello, I have a 3 dim. polydata. I?m using 3 dim. vectors to store RGB color information in a polydata object. I have done this, because Ii did not know an other way and it is easy to acces them. But I don?t know how to visualize the color. That is my problem now. Is there a way to display the color or is there an other way to store the color to display the color? Thanks Bernhard -------------- next part -------------- An HTML attachment was scrubbed... URL: From seanm at nmr.mgh.harvard.edu Wed Aug 18 06:51:30 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Wed, 18 Aug 2004 06:51:30 -0400 Subject: [vtkusers] How to display colors? In-Reply-To: References: Message-ID: <412334B2.8030109@nmr.mgh.harvard.edu> Hi Bernhard, To be used as RGB colors by a Mapper, they'll have to be stored as unsigned chars (as in a vtkUnsignedCharArray). Next, on the Mapper, call ScalarVisibilityOn() and SetColorModeToDefault(). These colors can be associated with the PolyData as either PointData or CellData. PointData is the default, so you will have to call SetScalarModeToUseCellData() otherwise. That said, vtkLookupTable is a much more efficient way of coloring your PolyData with scalars being used to determine point or cell coloring. -Sean Bernhard Mayrhofer wrote: > Hello, > I have a 3 dim. polydata. I?m using 3 dim. vectors to store RGB color information in a polydata object. I have done this, because Ii did not know an other way and it is easy to acces them. But I don?t know how to visualize the color. That is my problem now. Is there a way to display the color or is there an other way to store the color to display the color? > > > Thanks > Bernhard > From j.robinson at kepler-systems.com Wed Aug 18 07:03:22 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Wed, 18 Aug 2004 12:03:22 +0100 Subject: [vtkusers] Try again - merging Message-ID: <20040818110339.D74AB233D7@public.kitware.com> Dear All, I am creating an instance of vtkCutter *pCrossSection ; from vtkUnstructuredGridReader *pMeshReader and vtkClipPolyData *pXSectionClipper ; from vtkGeometryFilter *pGeometry ; and merging them into vtkAppendPolyData *pCutMeshData ; The problem is that, when I do a colour plot of the scalar I get a bad effect at an internal boundary (where the boundary is formed by having coincident "nodes" in a finite element mesh that are in congruent elements - this forms a no flow boundary in the mesh). The rendering of the colour contouring works perfectly when the vtkUnstructuredGrid is put through the vtkGeometryFilter, but the coincident nodes are merged (I think) when the mesh is cut (using the object listed above) and the colour mapping is fuzzy along the boundary (whereas it should be a sheer change in colour). My questions are: would merging explain the phenomenon described above? is there a way to turn off point merging in vtkCutter & vtkClipPolyData? Regards, Jim James C Robinson, PhD, Chartered Engineer, CEO, Kepler Engineering Software Ltd., * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukan111 at yahoo.com Wed Aug 18 08:56:01 2004 From: lukan111 at yahoo.com (kan lu) Date: Wed, 18 Aug 2004 05:56:01 -0700 (PDT) Subject: [vtkusers] vtkview Message-ID: <20040818125601.44569.qmail@web61303.mail.yahoo.com> When I type vtkview x1.hdr x2.hdr, it displays the two images. Can you please tell me how to look through the images from slice to slice? Thanks __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From sean at millwood.ca Wed Aug 18 10:50:46 2004 From: sean at millwood.ca (Sean Richards) Date: Wed, 18 Aug 2004 10:50:46 -0400 (EDT) Subject: [vtkusers] ICP with vtkActors Message-ID: <6846198.1092840646236.JavaMail.sean@millwood.ca> Hello, I have created a test program for ICPTransform. I create 2 simple PlaneSource objects that are close to being aligned. When I use the PlaneSource objects with ICP the algorithm works fine. An example of this code is in the attached file called PlaneSource-ICP.cxx I then try to use almost the same code, except instead of putting the PlaneSource objects into the ICP algorithm, I use the actors instead. When I do this, vtk crashes. You can see the code in question in the attached file called Actor-ICP.cxx Ultimately, I want to be able to use actors as the input to ICP. Thanks!! Sean The debug output from Microsoft Visual C++ when I run Actor-ICP.cxx is: ***** Stack Trace ***** vtkmyEx1.exe!vtkMatrix4x4::DeepCopy(double * Elements=0x00000018, const double * newElements=0x00338278) Line 291 + 0xf C++ vtkmyEx1.exe!vtkMatrix4x4::DeepCopy(double * Elements=0x00000018, vtkMatrix4x4 * source=0x00338260) Line 57 + 0x13 C++ vtkmyEx1.exe!vtkProp3D::GetMatrix(double * result=0x00000018) Line 338 + 0x10 C++ vtkmyEx1.exe!vtkProp3D::GetMatrix(vtkMatrix4x4 * result=0x00000000) Line 331 + 0x17 C++ vtkmyEx1.exe!vtkIterativeClosestPointTransform::InternalUpdate() Line 368 + 0x1f C++ vtkmyEx1.exe!vtkAbstractTransform::Update() Line 300 + 0xd C++ vtkmyEx1.exe!main(int argc=1, char * * argv=0x00335d30) Line 159 C++ vtkmyEx1.exe!mainCRTStartup() Line 398 + 0x11 C kernel32.dll!77e814c7() ***** Autos ***** Elements 0x00000018 double * i 0 int newElements 0x00338278 const double * newElements[i] 1.0000000000000000 const double From sean at millwood.ca Wed Aug 18 11:00:58 2004 From: sean at millwood.ca (Sean Richards) Date: Wed, 18 Aug 2004 11:00:58 -0400 (EDT) Subject: [vtkusers] ICP and vtkActors Message-ID: <23429042.1092841258391.JavaMail.sean@millwood.ca> I am sending this message again because I forgot to add the attachments last time. Sorry! Hello, I have created a test program for ICPTransform. I create 2 simple PlaneSource objects that are close to being aligned. When I use the PlaneSource objects with ICP the algorithm works fine. An example of this code is in the attached file called PlaneSource-ICP.cxx I then try to use almost the same code, except instead of putting the PlaneSource objects into the ICP algorithm, I use the actors instead. When I do this, vtk crashes. You can see the code in question in the attached file called Actor-ICP.cxx Ultimately, I want to be able to use actors as the input to ICP. Thanks!! Sean The debug output from Microsoft Visual C++ when I run Actor-ICP.cxx is: ***** Stack Trace ***** vtkmyEx1.exe!vtkMatrix4x4::DeepCopy(double * Elements=0x00000018, const double * newElements=0x00338278) Line 291 + 0xf C++ vtkmyEx1.exe!vtkMatrix4x4::DeepCopy(double * Elements=0x00000018, vtkMatrix4x4 * source=0x00338260) Line 57 + 0x13 C++ vtkmyEx1.exe!vtkProp3D::GetMatrix(double * result=0x00000018) Line 338 + 0x10 C++ vtkmyEx1.exe!vtkProp3D::GetMatrix(vtkMatrix4x4 * result=0x00000000) Line 331 + 0x17 C++ vtkmyEx1.exe!vtkIterativeClosestPointTransform::InternalUpdate() Line 368 + 0x1f C++ vtkmyEx1.exe!vtkAbstractTransform::Update() Line 300 + 0xd C++ vtkmyEx1.exe!main(int argc=1, char * * argv=0x00335d30) Line 159 C++ vtkmyEx1.exe!mainCRTStartup() Line 398 + 0x11 C kernel32.dll!77e814c7() ***** Autos ***** Elements 0x00000018 double * i 0 int newElements 0x00338278 const double * newElements[i] 1.0000000000000000 const double -------------- next part -------------- A non-text attachment was scrubbed... Name: PlaneSource-ICP.cxx Type: application/octet-stream Size: 3255 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Actor-ICP.cxx Type: application/octet-stream Size: 2966 bytes Desc: not available URL: From mathieu.malaterre at kitware.com Wed Aug 18 11:05:01 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Wed, 18 Aug 2004 11:05:01 -0400 Subject: [vtkusers] vtk crashes when dealing with Quadratic Hexahedrons In-Reply-To: <4121FE56.1E41C7D1@lnec.pt> References: <4121FE56.1E41C7D1@lnec.pt> Message-ID: <4123701D.1020903@kitware.com> Thanks, I have added this in our bug tracker as bug #1079 Thanks for report Mathieu Jo?o Cunha wrote: > I'm trying to visualize FEM data with cell type 25 > (Quadratic_Hexahedron). > Visualizing displacements with Hedgehogs works fine. > However when trying WarpVector vtk crashed, and the same happens when > running > the attached tcl script e1.tcl, a much simplified version of the example > in page 100 > of vtk4.2 User's Guide. The code works fine with blow.vtk but a memory > violation > occurs with my data, Funcho_Desloc_vtk.vtk > I include also the hedgehog code. > I'm using vtk 4.2 with tcl 8.3.2. > I can supply the data file (248kb) if anyone is interested, > > Regards > Jo?o Cunha > > -- > Jo?o Duarte Cunha > Investigador-Coordenador > Director do Centro da Qualidade na Constru??o > jdc at lnec.pt > > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 julia.schnabel at kcl.ac.uk Wed Aug 18 12:10:25 2004 From: julia.schnabel at kcl.ac.uk (Julia Schnabel) Date: Wed, 18 Aug 2004 16:10:25 +0000 Subject: [vtkusers] Re: vtkview In-Reply-To: <20040818133838.DF78123BB5@public.kitware.com> References: <20040818133838.DF78123BB5@public.kitware.com> Message-ID: <41237F71.6000307@kcl.ac.uk> kan lu wrote: > Date: Wed, 18 Aug 2004 05:56:01 -0700 (PDT) > From: kan lu > Subject: [vtkusers] vtkview > To: vtkusers at vtk.org > Message-ID: <20040818125601.44569.qmail at web61303.mail.yahoo.com> > Content-Type: text/plain; charset=us-ascii > > > When I type vtkview x1.hdr x2.hdr, it displays the two > images. Can you please tell me how to look through the > images from slice to slice? > > Thanks Hello, I presume that you are talking about vtkview supplied by vtkCISG (available from http://www.image-registration.com). This package only adds on to vtk, and questions about it are probably better directed at vtkcisg at yahoogroups.com (see webpage on how to join that mailing list). Anyway, you can either navigate with the mouse through the images, which will resclice the data at the mouse position, or you can enter the image (voxel) coordinates in the "View" toolbox by hand (or use the +- buttons). Hope this helps, Julia -- Julia A. Schnabel, Ph.D. Computational Imaging Science Group Tel: +44 (0)20 718 85437 Division of Imaging Sciences Sec: +44 (0)20 718 85441 5th floor Thomas Guy House Fax: +44 (0)20 718 85442 Guy's Hospital, King's College London mailto:julia.schnabel at kcl.ac.uk London SE1 9RT, UK http://www-ipg.umds.ac.uk/j.schnabel From apopelar at enserg.fr Wed Aug 18 11:43:28 2004 From: apopelar at enserg.fr (Alexandre Popelard) Date: Wed, 18 Aug 2004 17:43:28 +0200 Subject: [vtkusers] animation loop and interaction Message-ID: <20040818154214.M79449@www.enserg.fr> Hi, I have developed a little volume animation under c++ using a simple loop. I would now want to be able to interact with the volume during the animation. But if I use vtkRenderWindowInteractor and start(), it stops the main animation loop. If you have any ideas or examples on how to do that, please let me know. Thanks, Alex From sthapit at yahoo.com Wed Aug 18 12:10:02 2004 From: sthapit at yahoo.com (Akshay Sthapit) Date: Wed, 18 Aug 2004 09:10:02 -0700 (PDT) Subject: [vtkusers] animation loop and interaction In-Reply-To: <20040818154214.M79449@www.enserg.fr> Message-ID: <20040818161002.8149.qmail@web60002.mail.yahoo.com> Hi Alex What I have done is to add an observer to renderer - renderer->AddObserver(vtkCommand::StartEvent, myVtkCB); That way it keeps updating the scene (via a "callback") at a rate which you can control, and all you have to do is manipulate ("interact") the actors in another thread, and tadaa you got animation. Here's my vtkCB class - class vtkCB : public vtkCommand {//Callback to update at every graphics loop public: static vtkCB *New() { return new vtkCB; } virtual void Execute(vtkObject *caller, unsigned long, void* callData) { graphicsInterface->refresh(); } void setup(GraphicsInterface *graphicsInterface) { this->graphicsInterface = graphicsInterface; } private: GraphicsInterface *graphicsInterface; }; Hope this helps. Akshay --- Alexandre Popelard wrote: > Hi, > > I have developed a little volume animation under c++ using a simple > loop. > I would now want to be able to interact with the volume during the > animation. But if I use vtkRenderWindowInteractor and start(), it > stops the > main animation loop. > If you have any ideas or examples on how to do that, please let me > know. > > Thanks, > Alex > _______________________________________________ > 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 > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From seanm at nmr.mgh.harvard.edu Wed Aug 18 12:03:30 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Wed, 18 Aug 2004 12:03:30 -0400 Subject: [vtkusers] animation loop and interaction In-Reply-To: <20040818161002.8149.qmail@web60002.mail.yahoo.com> References: <20040818161002.8149.qmail@web60002.mail.yahoo.com> Message-ID: <41237DD2.8090104@nmr.mgh.harvard.edu> If you use a repeating timout callback, you shouldn't need separate threads. -Sean Akshay Sthapit wrote: > Hi Alex > > What I have done is to add an observer to renderer - > > renderer->AddObserver(vtkCommand::StartEvent, myVtkCB); > > That way it keeps updating the scene (via a "callback") at a rate which > you can control, and all you have to do is manipulate ("interact") the > actors in another thread, and tadaa you got animation. > > Here's my vtkCB class - > > class vtkCB : public vtkCommand {//Callback to update at every graphics > loop > public: > static vtkCB *New() { > return new vtkCB; > } > virtual void Execute(vtkObject *caller, unsigned long, void* > callData) { > graphicsInterface->refresh(); > } > void setup(GraphicsInterface *graphicsInterface) { > this->graphicsInterface = graphicsInterface; > } > private: > GraphicsInterface *graphicsInterface; > }; > > Hope this helps. > > Akshay > > > --- Alexandre Popelard wrote: > > >>Hi, >> >>I have developed a little volume animation under c++ using a simple >>loop. >>I would now want to be able to interact with the volume during the >>animation. But if I use vtkRenderWindowInteractor and start(), it >>stops the >>main animation loop. >>If you have any ideas or examples on how to do that, please let me >>know. >> >>Thanks, >>Alex >>_______________________________________________ >>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 >> > > > > __________________________________________________ > 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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From Benjamin.BURRELL at Tenix.com Thu Aug 19 03:41:28 2004 From: Benjamin.BURRELL at Tenix.com (BURRELL Benjamin) Date: Thu, 19 Aug 2004 17:41:28 +1000 Subject: [vtkusers] Using VTK mixed with OpenGL in a MFC app Message-ID: <200408190741.i7J7fS1r016422@sprint1.tenix.com> Hi, I have searched the vtk mailing list for the solution and even though I have found some posts on this, none of them where very helpful and I have still no idea how to get this going. What I would like to do is use a pre-existing window in my MFC MDI app, assign a vtkWin32OpenGLRenderWindow to it and use it with VTK and OpenGL calls. Eg. I want to be able to have a visualisation of terrain using VTK, then have small textured 2D squares and primitives such as lines written in OpenGL moving around dictated by a socket connection. All this of course sharing the same window. At the moment I have had my project working all implemented in VTK and working fine (except slow after a lot of speed tuning, hence wanting to do the moving items in OpenGL), now I am trying to change to using OpenGL to draw the moving squares/primitives above a VTK drawn terrain. I would also like to keep the VTK mouse interaction as well as I have already got this going. My current app is a MFC MDI project which was created by using CMake. I then have set up my vtkWin32OpenGLRenderWindow using the following calls in the int CVtkMDIView::OnCreate(LPCREATESTRUCT lpCreateStruct) method. mp_renWin->SetParentId(GetParent()->GetSafeHwnd()); mp_renWin->SetWindowId(GetSafeHwnd()); mp_iren->SetRenderWindow(mp_renWin); This as far as I understand, this code tells my vtkWin32OpenGLRenderWindow to draw to my CView object which is this case is the class CVtkMDIView. Could someone please be able to tell me exactly the steps required to setup being able to call/draw OpenGL now? For example, if I wanted to draw a OpenGL circle on top of my VTK terrain I would use this OpenGL code somewhere: glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear The Screen And The Depth Buffer glLoadIdentity(); // Reset The matrix glColor3ub(255, 0, 0); glPushMatrix(); glTranslatef(x, y, 0); glBegin(GL_LINE_LOOP); for( float ang=0; ang <= 2*3.141; ang += 0.1) { glVertex2d( radius * cos(ang), radius * sin(ang)); } glEnd(); glPopMatrix(); What calls do I have to make to the vtkRenderWindow, vtkRenderer objects to allow this to work, where would I place the OpenGL code, had do I do refreshing properly etc. ? Regards, Benjamin Burrell From luca.picello at libero.it Thu Aug 19 04:15:56 2004 From: luca.picello at libero.it (Luca Picello) Date: Thu, 19 Aug 2004 10:15:56 +0200 Subject: [vtkusers] How to move an actor through a plane Message-ID: <412461BC.8040707@libero.it> Hi everybody, I have some actors ( spheres ) placed on a plane and I'd like to move them only through that plane. I'd like to disable all other interactions. Any idea how to do? Thank you Luca -------------- next part -------------- A non-text attachment was scrubbed... Name: spheres.bmp Type: image/bmp Size: 12062 bytes Desc: not available URL: From joeri_vtk at hotmail.com Thu Aug 19 06:01:30 2004 From: joeri_vtk at hotmail.com (Joeri Nicolaes) Date: Thu, 19 Aug 2004 12:01:30 +0200 Subject: [vtkusers] Removing RenderWindow with tcl/tk Message-ID: Hi, I have written an interface in tcl/tk showing the 3 orthogonal views of a medical image dataset. On clicking the appropriate checkbutton, the axial view eg is shown with vtkImageViewer2 with an interactor associated with it. Reslicing via a Tk button also applies to this vtkImageViewer2 object. I would like to remove this vtk window using a Tk checkbutton. Has anyone a clue how to realise this? Thanx, Joeri, Agfa Gevaert, R&D/TI + 32 (0) 3 444 6429, stajn at agfa.com joeri_vtk at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lfcong at nlpr.ia.ac.cn Thu Aug 19 06:56:39 2004 From: lfcong at nlpr.ia.ac.cn (Longfei Cong) Date: Thu, 19 Aug 2004 11:56:39 +0100 Subject: [vtkusers] Re: vtkusers Digest, Vol 4, Issue 47 References: <20040818085402.1F4D923055@public.kitware.com> Message-ID: <018b01c485db$353da160$9c05a992@win.doc.ic.ac.uk> ----- Original Message ----- From: To: Sent: Wednesday, August 18, 2004 9:54 AM Subject: vtkusers Digest, Vol 4, Issue 47 > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://www.vtk.org/mailman/listinfo/vtkusers > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of vtkusers digest..." > > > Today's Topics: > > 1. problem compiling my application (Lucas Lorenzo) > 2. Re: problem compiling my application (Sean McInerney) > 3. Re: problem compiling my application (Lucas Lorenzo) > 4. Getting the time for rendering (Nagarajan) > 5. remove renderwindow (Joeri Nicolaes) > 6. Re: including vtkPanel in vtk.jar (Arjen Ricksen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 17 Aug 2004 18:24:13 -0600 > From: Lucas Lorenzo > Subject: [vtkusers] problem compiling my application > To: vtkusers at vtk.org > Message-ID: > Content-Type: text/plain; charset="us-ascii" > > Hi all, > > I'm trying to compile a simple program that reads a volume in the form > of vtkStructuredPoints and extracts a particular slice (using > vtkImageReslice) in order to display it: > > > #include "vtkStructuredPointsReader.h" > #include "vtkLookupTable.h" > #include "vtkImageReslice.h" > #include "vtkRenderWindow.h" > #include "vtkCamera.h" > #include "vtkActor.h" > #include "vtkRenderer.h" > #include "vtkDataSetMapper.h" > #include "vtkRenderWindowInteractor.h" > > int main( int argc, char *argv[] ) > { > > vtkStructuredPointsReader *image_reader = > vtkStructuredPointsReader::New(); > image_reader->SetFileName("myfile.vtk"); > > > unsigned short lowval = 0; > unsigned short highval = 306; > vtkLookupTable *lut = vtkLookupTable::New(); > lut->SetNumberOfTableValues(1024); > lut->SetTableRange(lowval,highval); > lut->SetHueRange(1,1); > lut->SetSaturationRange(0,0); > lut->SetValueRange(0,1); > lut->Build(); > > > vtkImageReslice *get_slice = vtkImageReslice::New(); > get_slice->SetInput(image_reader->GetOutput()); > get_slice->SetOutputDimensionality(2); > get_slice->SetResliceAxesOrigin(0,0,33); > > > vtkDataSetMapper *im_mapper = vtkDataSetMapper::New(); > im_mapper->SetInput(get_slice->GetOutput()); > im_mapper->SetScalarRange(lowval,highval); > im_mapper->SetColorModeToMapScalars(); > im_mapper->SetLookupTable(lut); > > > vtkActor *imActor = vtkActor::New(); > imActor->SetMapper(im_mapper); > > > // Create the RenderWindow, Renderer and both Actors > vtkRenderer *ren1 = vtkRenderer::New(); > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->AddRenderer(ren1); > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > > > // Add the actors to the renderer, set the background and size > ren1->AddActor(imActor); > renWin->SetSize(640,640); > > > // render the image > vtkCamera *cam1 = ren1->GetActiveCamera(); > cam1->Zoom(2.5); > renWin->Render(); > > > // deallocate memory: > image_reader->Delete(); > lut->Delete(); > get_slice->Delete(); > im_mapper->Delete(); > imActor->Delete(); > ren1->Delete(); > renWin->Delete(); > iren->Delete(); > > > return 0; > } > > When compiling I have the following error: > > Building dependencies. cmake.depends... > -- Loading VTK CMake commands > -- Loading VTK CMake commands - done > Building object file ThresholdVTK.o... > /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx: In function > `int > main(int, char**)': > /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:30: error: no > matching function for call to `vtkImageReslice::SetInput( > vtkStructuredPoints*)' > /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/ > vtkImageToImageFilter.h:40: error: candidates > are: virtual void vtkImageToImageFilter::SetInput(vtkImageData*) > /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:36: error: no > matching function for call to > `vtkDataSetMapper::SetInput(vtkImageData*)' > /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/vtkDataSetMapper.h: > 56: error: candidates > are: void vtkDataSetMapper::SetInput(vtkDataSet*) > make[1]: *** [ThresholdVTK.o] Error 1 > make: *** [default_target] Error 2 > > It is my understanding that vtkStructuredPoints inherits vtkImageData. > But I must be missing something here. > If you guys have any clue about this, please let me know. > Thanks, > > Lucas Lorenzo > > PS: the CMakeList.txt file is only this: > > PROJECT (ThresholdVTK) > > INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake) > IF (USE_VTK_FILE) > INCLUDE(${USE_VTK_FILE}) > ENDIF (USE_VTK_FILE) > > ADD_EXECUTABLE(ThresholdVTK ThresholdVTK.cxx) > TARGET_LINK_LIBRARIES(ThresholdVTK vtkRendering vtkImaging vtkIO) > > University of Utah > Nora Eccles Harrison CardioVascular Research and Training Institute > Fellows Room > 95 South 2000 East > Salt Lake City, UT 84112-5000 > > e-mail: lucas at cvrti.utah.edu > telephone: 801-587-9536 > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: not available > Type: text/enriched > Size: 4377 bytes > Desc: not available > Url : http://public.kitware.com/pipermail/vtkusers/attachments/20040817/10364546/a ttachment-0001.bin > > ------------------------------ > > Message: 2 > Date: Tue, 17 Aug 2004 20:19:19 -0400 > From: Sean McInerney > Subject: Re: [vtkusers] problem compiling my application > To: Lucas Lorenzo > Cc: vtkusers at vtk.org > Message-ID: <4122A087.6000500 at nmr.mgh.harvard.edu> > Content-Type: text/plain; charset=us-ascii; format=flowed > > Hi Lucas, > > You are missing: > > #include "vtkStructuredPoints.h" > > See > > -Sean > > Lucas Lorenzo wrote: > > Hi all, > > > > I'm trying to compile a simple program that reads a volume in the form > > of vtkStructuredPoints and extracts a particular slice (using > > vtkImageReslice) in order to display it: > > > > > > #include "vtkStructuredPointsReader.h" > > #include "vtkLookupTable.h" > > #include "vtkImageReslice.h" > > #include "vtkRenderWindow.h" > > #include "vtkCamera.h" > > #include "vtkActor.h" > > #include "vtkRenderer.h" > > #include "vtkDataSetMapper.h" > > #include "vtkRenderWindowInteractor.h" > > > > int main( int argc, char *argv[] ) > > { > > > > vtkStructuredPointsReader *image_reader = > > vtkStructuredPointsReader::New(); > > image_reader->SetFileName("myfile.vtk"); > > > > > > unsigned short lowval = 0; > > unsigned short highval = 306; > > vtkLookupTable *lut = vtkLookupTable::New(); > > lut->SetNumberOfTableValues(1024); > > lut->SetTableRange(lowval,highval); > > lut->SetHueRange(1,1); > > lut->SetSaturationRange(0,0); > > lut->SetValueRange(0,1); > > lut->Build(); > > > > > > vtkImageReslice *get_slice = vtkImageReslice::New(); > > get_slice->SetInput(image_reader->GetOutput()); > > get_slice->SetOutputDimensionality(2); > > get_slice->SetResliceAxesOrigin(0,0,33); > > > > > > vtkDataSetMapper *im_mapper = vtkDataSetMapper::New(); > > im_mapper->SetInput(get_slice->GetOutput()); > > im_mapper->SetScalarRange(lowval,highval); > > im_mapper->SetColorModeToMapScalars(); > > im_mapper->SetLookupTable(lut); > > > > > > vtkActor *imActor = vtkActor::New(); > > imActor->SetMapper(im_mapper); > > > > > > // Create the RenderWindow, Renderer and both Actors > > vtkRenderer *ren1 = vtkRenderer::New(); > > vtkRenderWindow *renWin = vtkRenderWindow::New(); > > renWin->AddRenderer(ren1); > > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > > iren->SetRenderWindow(renWin); > > > > > > // Add the actors to the renderer, set the background and size > > ren1->AddActor(imActor); > > renWin->SetSize(640,640); > > > > > > // render the image > > vtkCamera *cam1 = ren1->GetActiveCamera(); > > cam1->Zoom(2.5); > > renWin->Render(); > > > > > > // deallocate memory: > > image_reader->Delete(); > > lut->Delete(); > > get_slice->Delete(); > > im_mapper->Delete(); > > imActor->Delete(); > > ren1->Delete(); > > renWin->Delete(); > > iren->Delete(); > > > > > > return 0; > > } > > > > When compiling I have the following error: > > > > Building dependencies. cmake.depends... > > -- Loading VTK CMake commands > > -- Loading VTK CMake commands - done > > Building object file ThresholdVTK.o... > > /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx: In function > > `int > > main(int, char**)': > > /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:30: error: no > > matching function for call to `vtkImageReslice::SetInput( > > vtkStructuredPoints*)' > > /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/ > > vtkImageToImageFilter.h:40: error: candidates > > are: virtual void vtkImageToImageFilter::SetInput(vtkImageData*) > > /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:36: error: no > > matching function for call to > > `vtkDataSetMapper::SetInput(vtkImageData*)' > > /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/vtkDataSetMapper.h: > > 56: error: candidates > > are: void vtkDataSetMapper::SetInput(vtkDataSet*) > > make[1]: *** [ThresholdVTK.o] Error 1 > > make: *** [default_target] Error 2 > > > > It is my understanding that vtkStructuredPoints inherits vtkImageData. > > But I must be missing something here. > > If you guys have any clue about this, please let me know. > > Thanks, > > > > Lucas Lorenzo > > > > PS: the CMakeList.txt file is only this: > > > > PROJECT (ThresholdVTK) > > > > INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake) > > IF (USE_VTK_FILE) > > INCLUDE(${USE_VTK_FILE}) > > ENDIF (USE_VTK_FILE) > > > > ADD_EXECUTABLE(ThresholdVTK ThresholdVTK.cxx) > > TARGET_LINK_LIBRARIES(ThresholdVTK vtkRendering vtkImaging vtkIO) > > > > University of Utah > > Nora Eccles Harrison CardioVascular Research and Training Institute > > Fellows Room > > 95 South 2000 East > > Salt Lake City, UT 84112-5000 > > > > e-mail: lucas at cvrti.utah.edu > > telephone: 801-587-9536 > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > 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 > > > ------------------------------ > > Message: 3 > Date: Tue, 17 Aug 2004 18:37:00 -0600 > From: Lucas Lorenzo > Subject: Re: [vtkusers] problem compiling my application > To: seanm at nmr.mgh.harvard.edu > Cc: vtkusers at vtk.org > Message-ID: > Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed > > Great ! > Thanks Sean, > > Lucas > > > On Aug 17, 2004, at 6:19 PM, Sean McInerney wrote: > > > Hi Lucas, > > > > You are missing: > > > > #include "vtkStructuredPoints.h" > > > > See > > > > -Sean > > > > Lucas Lorenzo wrote: > >> Hi all, > >> I'm trying to compile a simple program that reads a volume in the > >> form of vtkStructuredPoints and extracts a particular slice (using > >> vtkImageReslice) in order to display it: > >> #include "vtkStructuredPointsReader.h" > >> #include "vtkLookupTable.h" > >> #include "vtkImageReslice.h" > >> #include "vtkRenderWindow.h" > >> #include "vtkCamera.h" > >> #include "vtkActor.h" > >> #include "vtkRenderer.h" > >> #include "vtkDataSetMapper.h" > >> #include "vtkRenderWindowInteractor.h" > >> int main( int argc, char *argv[] ) > >> { > >> vtkStructuredPointsReader *image_reader = > >> vtkStructuredPointsReader::New(); > >> image_reader->SetFileName("myfile.vtk"); > >> unsigned short lowval = 0; > >> unsigned short highval = 306; > >> vtkLookupTable *lut = vtkLookupTable::New(); > >> lut->SetNumberOfTableValues(1024); > >> lut->SetTableRange(lowval,highval); > >> lut->SetHueRange(1,1); > >> lut->SetSaturationRange(0,0); > >> lut->SetValueRange(0,1); > >> lut->Build(); > >> vtkImageReslice *get_slice = vtkImageReslice::New(); > >> get_slice->SetInput(image_reader->GetOutput()); > >> get_slice->SetOutputDimensionality(2); > >> get_slice->SetResliceAxesOrigin(0,0,33); > >> vtkDataSetMapper *im_mapper = vtkDataSetMapper::New(); > >> im_mapper->SetInput(get_slice->GetOutput()); > >> im_mapper->SetScalarRange(lowval,highval); > >> im_mapper->SetColorModeToMapScalars(); > >> im_mapper->SetLookupTable(lut); > >> vtkActor *imActor = vtkActor::New(); > >> imActor->SetMapper(im_mapper); > >> // Create the RenderWindow, Renderer and both Actors > >> vtkRenderer *ren1 = vtkRenderer::New(); > >> vtkRenderWindow *renWin = vtkRenderWindow::New(); > >> renWin->AddRenderer(ren1); > >> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > >> iren->SetRenderWindow(renWin); > >> // Add the actors to the renderer, set the background and size > >> ren1->AddActor(imActor); > >> renWin->SetSize(640,640); > >> // render the image > >> vtkCamera *cam1 = ren1->GetActiveCamera(); > >> cam1->Zoom(2.5); > >> renWin->Render(); > >> // deallocate memory: > >> image_reader->Delete(); > >> lut->Delete(); > >> get_slice->Delete(); > >> im_mapper->Delete(); > >> imActor->Delete(); > >> ren1->Delete(); > >> renWin->Delete(); > >> iren->Delete(); > >> return 0; > >> } > >> When compiling I have the following error: > >> Building dependencies. cmake.depends... > >> -- Loading VTK CMake commands > >> -- Loading VTK CMake commands - done > >> Building object file ThresholdVTK.o... > >> /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx: In > >> function `int > >> main(int, char**)': > >> /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:30: error: > >> no > >> matching function for call to `vtkImageReslice::SetInput( > >> vtkStructuredPoints*)' > >> /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/ > >> vtkImageToImageFilter.h:40: error: candidates > >> are: virtual void vtkImageToImageFilter::SetInput(vtkImageData*) > >> /private/var/automount/mom/u/lucas/Borrar/ThresholdVTK.cxx:36: error: > >> no > >> matching function for call to > >> `vtkDataSetMapper::SetInput(vtkImageData*)' > >> /scratch/lucas/bin/VTK-4.4/VTK-binary/include/vtk/vtkDataSetMapper.h: > >> 56: error: candidates > >> are: void vtkDataSetMapper::SetInput(vtkDataSet*) > >> make[1]: *** [ThresholdVTK.o] Error 1 > >> make: *** [default_target] Error 2 > >> It is my understanding that vtkStructuredPoints inherits > >> vtkImageData. But I must be missing something here. > >> If you guys have any clue about this, please let me know. > >> Thanks, > >> Lucas Lorenzo > >> PS: the CMakeList.txt file is only this: > >> PROJECT (ThresholdVTK) > >> INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake) > >> IF (USE_VTK_FILE) > >> INCLUDE(${USE_VTK_FILE}) > >> ENDIF (USE_VTK_FILE) > >> ADD_EXECUTABLE(ThresholdVTK ThresholdVTK.cxx) > >> TARGET_LINK_LIBRARIES(ThresholdVTK vtkRendering vtkImaging vtkIO) > >> University of Utah > >> Nora Eccles Harrison CardioVascular Research and Training Institute > >> Fellows Room > >> 95 South 2000 East > >> Salt Lake City, UT 84112-5000 > >> e-mail: lucas at cvrti.utah.edu > >> telephone: 801-587-9536 > >> ---------------------------------------------------------------------- > >> -- > >> _______________________________________________ > >> 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 > >> > Lucas Lorenzo > > University of Utah > Nora Eccles Harrison CardioVascular Research and Training Institute > Fellows Room > 95 South 2000 East > Salt Lake City, UT 84112-5000 > > e-mail: lucas at cvrti.utah.edu > telephone: 801-587-9536 > > > > ------------------------------ > > Message: 4 > Date: Wed, 18 Aug 2004 10:46:00 +0530 > From: "Nagarajan" > Subject: [vtkusers] Getting the time for rendering > To: > Message-ID: <000d01c484e2$731444c0$5a02a8c0 at MAINDEV> > Content-Type: text/plain; charset="iso-8859-1" > > Hello users, > Lately I have been doing a 256 x 256 x 256 data rendering. It is for an application(medical imaging). From the time the rendering bagins till the image is shown, there is no clue as to how much time it is going to take. Is there a way to get it?. The window appears but the image appears several seconds later. I wish to do the following. From the time the window is shown, till the image is appearing I want to flash a message that the process is still going on. Can some one help me? > > Nagarajan > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://public.kitware.com/pipermail/vtkusers/attachments/20040818/9bae269c/a ttachment.html > > ------------------------------ > > Message: 5 > Date: Wed, 18 Aug 2004 09:21:56 +0200 > From: "Joeri Nicolaes" > Subject: [vtkusers] remove renderwindow > To: > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > I would like to couple a user interaction to showing an image in a new renderWindow and to removing again this window. But how to remove a renderWindow? The problem is that when you close the renderWindow (in Windows) with the cross in the right upper border of the window, the whole application exits. > > Joeri > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://public.kitware.com/pipermail/vtkusers/attachments/20040818/ce7b12f1/a ttachment.htm > > ------------------------------ > > Message: 6 > Date: Wed, 18 Aug 2004 10:53:37 +0200 > From: "Arjen Ricksen" > Subject: Re: [vtkusers] including vtkPanel in vtk.jar > To: "Songbo Chen" , > Message-ID: <000e01c48500$da4a67a0$498f9182 at ddns.htc.nl.philips.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hello Songbo, > > I did that in the first place. Then I got the errors, and read about including vtkPanel into vtk.jar. > I'm using the Eclipse environment to compile and run my Java applications. Is there some special feature of Eclipse that lets you include class files into jar files? > ----- Original Message ----- > From: Songbo Chen > To: Arjen Ricksen > Sent: Tuesday 17 August 2004 16:12 > Subject: Re: [vtkusers] including vtkPanel in vtk.jar > > > Hi, vtkPanel is not coming with the preinstall version of vtk, you have to download it separatly from the VTK website. once you download it, just put it in your application directory. hope this can help you. > > ----- Original Message ----- > From: Arjen Ricksen > To: vtkusers at vtk.org > Sent: Tuesday, August 17, 2004 12:33 PM > Subject: [vtkusers] including vtkPanel in vtk.jar > > > Dear all, > > I'm trying to view a simple vtkRenderWindow inside a JFrame by using vtkPanel. When I run the application I get the same UnsatisfiedLinkError as Tarik Chowdhury, who posted his problem on Tue Mar 25 08:12:37 EST 2003. > I tried the solution of Ramu Chandram, Tue Mar 25 08:29:05 EST 2003, but I don't know how to "compile with -d option" and how to include vtkPanel's class file into vtk.jar properly (all classes in vtk.jar seem to have class files with ".rule" extension, besides their normal class files). > > Can somebody explain me how to implement this solution? > > I'm working on a windows XP system, but I have an XTerm at my disposal. > > Kind regards, > > Arjen Ricksen > > WGP medewerker COS/SAVG > Philips Research Laboratories > Prof. Holstlaan 4 > 5656 AA Eindhoven, The Netherlands > Building: WO P 46 > Mailbox: WO 01 > Tel : +31-40-27 44375 > Fax: +31-40-27 44675 > Mailto: ricksen at natlab.research.philips.com > > > > > -------------------------------------------------------------------------- -- > > > _______________________________________________ > 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 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://public.kitware.com/pipermail/vtkusers/attachments/20040818/a6633ded/a ttachment.html > > ------------------------------ > > _______________________________________________ > vtkusers mailing list > vtkusers at vtk.org > http://www.vtk.org/mailman/listinfo/vtkusers > > > End of vtkusers Digest, Vol 4, Issue 47 > *************************************** From manimag at hotmail.com Thu Aug 19 07:42:59 2004 From: manimag at hotmail.com (Emmanuel Guillot) Date: Thu, 19 Aug 2004 13:42:59 +0200 Subject: [vtkusers] Bug in vtkGenericEnSightReader.cxx Message-ID: Hi everybody, This mail is a bug report (I didn't manage to log in in the "bug tracker") for vtkGenericEnSightReader.cxx. When we try to open the geometry file contained in the case file, if the FILE pointer is NULL, the fclose lead to a segmentation fault (see the code that follow). Moreover, why assuming the file is binary whereas it can simply be absent... Another problem - to my mind - is the return of vtkGenericEnSightReader::ENSIGHT_6_BINARY (returned 0=ENSIGHT_6 in VTK4.2) : the reading of the case file will continue with the reading of the variable files which is totally useless because we have no geometry. It should be intersting to use the VTK_OK and VTK_ERROR flags (as it is done in PLOT3DReader) to stop the update or the execute. Can someone report the bug for me or explain me how to login ? Thanks Manu in VTK4.4 line 466 this->IFile = fopen(sfilename.c_str(), "rb"); if (this->IFile == NULL) { vtkErrorMacro("Unable to open file: " << sfilename.c_str()); vtkWarningMacro("Assuming binary file."); fclose(this->IFile); this->IFile = NULL; delete [] fileName; return vtkGenericEnSightReader::ENSIGHT_6_BINARY; } // end if IFile == NULL _________________________________________________________________ Bloquez les fen?tres pop-up, c'est gratuit ! http://toolbar.msn.fr From brad.king at kitware.com Thu Aug 19 07:57:48 2004 From: brad.king at kitware.com (Brad King) Date: Thu, 19 Aug 2004 07:57:48 -0400 Subject: [vtkusers] Bug in vtkGenericEnSightReader.cxx In-Reply-To: References: Message-ID: <412495BC.2050907@kitware.com> Emmanuel Guillot wrote: > Can someone report the bug for me or explain me how to login ? To login go to http://www.vtk.org/Bug and select the "Create New Account" link at the top. It points here: http://www.vtk.org/Bug/newaccount.php -Brad From aselmann at gmx.de Thu Aug 19 09:27:28 2004 From: aselmann at gmx.de (Guido Aselmann) Date: Thu, 19 Aug 2004 15:27:28 +0200 (MEST) Subject: [vtkusers] How to Connect vtkUnstructuredGridReader with vtkUnstructuredGrid Message-ID: <28128.1092922048@www44.gmx.net> Hi, I want to get the GetNumberOfPoints of a file read with vtkUnstructuredGridReader I think vtkUnstructuredGrid.GetNumberOfPoints would do the job I try import vtk reader = vtk.vtkUnstructuredGridReader() reader.SetFileName("tracking.vtk") ugrid = vtk.vtkUnstructuredGrid() print ugrid.GetNumberOfPoints(reader) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) TypeError: function takes exactly 0 arguments (1 given) -- NEU: Bis zu 10 GB Speicher f?r e-mails & Dateien! 1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail From amy.henderson at kitware.com Thu Aug 19 09:33:15 2004 From: amy.henderson at kitware.com (Amy Henderson) Date: Thu, 19 Aug 2004 09:33:15 -0400 Subject: [vtkusers] How to Connect vtkUnstructuredGridReader with vtkUnstructuredGrid In-Reply-To: <28128.1092922048@www44.gmx.net> References: <28128.1092922048@www44.gmx.net> Message-ID: <6.1.2.0.2.20040819093028.033db880@pop.biz.rr.com> Hi Guido, The method GetNumberOfPoints does not take any arguments (as the error message you received points out). To get the number of points from the output of the reader, first call Update() on the reader; then get its output; and then ask the output for the number of points. The code to do this is shown below. reader.Update() ugrid = reader.GetOutput() print ugrid.GetNumberOfPoints() - Amy At 09:27 AM 8/19/2004, Guido Aselmann wrote: >Hi, > >I want to get the GetNumberOfPoints of a file read with >vtkUnstructuredGridReader > >I think vtkUnstructuredGrid.GetNumberOfPoints would do the job > >I try > >import vtk >reader = vtk.vtkUnstructuredGridReader() >reader.SetFileName("tracking.vtk") > >ugrid = vtk.vtkUnstructuredGrid() >print ugrid.GetNumberOfPoints(reader) >--------------------------------------------------------------------------- >TypeError Traceback (most recent call last) >TypeError: function takes exactly 0 arguments (1 given) > > > >-- >NEU: Bis zu 10 GB Speicher f?r e-mails & Dateien! >1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail > >_______________________________________________ >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 clinton at elemtech.com Thu Aug 19 10:02:33 2004 From: clinton at elemtech.com (Clinton Stimpson) Date: Thu, 19 Aug 2004 08:02:33 -0600 Subject: [vtkusers] Using VTK mixed with OpenGL in a MFC app In-Reply-To: <20040819103006.B051A2452D@public.kitware.com> References: <20040819103006.B051A2452D@public.kitware.com> Message-ID: <1092924153.4124b2f9ce431@webmail.xmission.com> > ------------------------------ > > Message: 3 > Date: Thu, 19 Aug 2004 17:41:28 +1000 > From: "BURRELL Benjamin" > Subject: [vtkusers] Using VTK mixed with OpenGL in a MFC app > To: > Message-ID: <200408190741.i7J7fS1r016422 at sprint1.tenix.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > I have searched the vtk mailing list for the solution and even though I > have found some posts on this, none of them where very helpful and I have > still no idea how to get this going. > > What I would like to do is use a pre-existing window in my MFC MDI app, > assign a vtkWin32OpenGLRenderWindow to it and use it with VTK and OpenGL > calls. > Eg. I want to be able to have a visualisation of terrain using VTK, then > have small textured 2D squares and primitives such as lines written in > OpenGL moving around dictated by a socket connection. All this of course > sharing the same window. > > At the moment I have had my project working all implemented in VTK and > working fine (except slow after a lot of speed tuning, hence wanting to > do the moving items in OpenGL), now I am trying to change to using OpenGL > to draw the moving squares/primitives above a VTK drawn terrain. I would > also like to keep the VTK mouse interaction as well as I have already got > this going. > > My current app is a MFC MDI project which was created by using CMake. I > then have set up my vtkWin32OpenGLRenderWindow using the following calls > in the int CVtkMDIView::OnCreate(LPCREATESTRUCT lpCreateStruct) method. > > mp_renWin->SetParentId(GetParent()->GetSafeHwnd()); > mp_renWin->SetWindowId(GetSafeHwnd()); > > mp_iren->SetRenderWindow(mp_renWin); > > > This as far as I understand, this code tells my > vtkWin32OpenGLRenderWindow to draw to my CView object which is this case > is the class CVtkMDIView. > > Could someone please be able to tell me exactly the steps required to > setup being able to call/draw OpenGL now? > For example, if I wanted to draw a OpenGL circle on top of my VTK terrain > I would use this OpenGL code somewhere: > > glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear The > Screen And The Depth Buffer > glLoadIdentity(); // Reset The matrix > > glColor3ub(255, 0, 0); > > glPushMatrix(); > glTranslatef(x, y, 0); > glBegin(GL_LINE_LOOP); > for( float ang=0; ang <= 2*3.141; ang += 0.1) > { > glVertex2d( radius * cos(ang), radius * sin(ang)); > } > glEnd(); > glPopMatrix(); > > > What calls do I have to make to the vtkRenderWindow, vtkRenderer objects > to allow this to work, where would I place the OpenGL code, had do I do > refreshing properly etc. ? Derive from vtkProp, vtkActor2D, vtkProp3D or vtkActor or whatever makes sense in your case and overload which functions (RenderOpaqueGeometry, RenderTranslucentGeometry or RenderOverlay - for 2d drawing) you need to overload. And you don't need to do the glClear as that would be done for you. Then add your new prop to the renderer. I do things like this for drawing that can't be efficiently handled using the vtk data set classes (e.g. dynamic data that has to be computed and drawn at render time and is dependent on camera orientation). Clint > > Regards, > Benjamin Burrell > > > > > ------------------------------ From lflong at doc.ic.ac.uk Thu Aug 19 10:45:13 2004 From: lflong at doc.ic.ac.uk (Longfei Cong) Date: Thu, 19 Aug 2004 15:45:13 +0100 Subject: [vtkusers] vector visual Message-ID: <002e01c485fb$2300b170$9c05a992@win.doc.ic.ac.uk> Hi everyone; i want to visual a surface with tangent vecotor on it. How can i do that? Thanks in advances. LF. C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lflong at doc.ic.ac.uk Thu Aug 19 10:45:43 2004 From: lflong at doc.ic.ac.uk (Longfei Cong) Date: Thu, 19 Aug 2004 15:45:43 +0100 Subject: [vtkusers] mouse position Message-ID: <003f01c485fb$34391c20$9c05a992@win.doc.ic.ac.uk> Hi everyone: I want to visualize a object , use the mouse to kick one point of the object and get the position of the point. Wish for anyone to help me!! Thanks in advance!!!!! Longfei -------------- next part -------------- An HTML attachment was scrubbed... URL: From I.deBoer at polytec.de Thu Aug 19 10:54:14 2004 From: I.deBoer at polytec.de (de Boer Ingo) Date: Thu, 19 Aug 2004 16:54:14 +0200 Subject: [vtkusers] mouse position Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD90144FF27@02polywbr.waldbronn.polytec.de> Hi, this might help http://public.kitware.com/pipermail/vtkusers/2004-April/023779.html 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 -----Original Message----- From: Longfei Cong [mailto:lflong at doc.ic.ac.uk] Sent: Thursday, August 19, 2004 4:46 PM To: vtkusers at vtk.org Subject: [vtkusers] mouse position Hi everyone: I want to visualize a object , use the mouse to kick one point of the object and get the position of the point. Wish for anyone to help me!! Thanks in advance!!!!! Longfei From tfogal at apollo.sr.unh.edu Thu Aug 19 11:19:09 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Thu, 19 Aug 2004 11:19:09 -0400 Subject: [vtkusers] segfault Delete()ing vtkInterpolateDataSetAttributes Message-ID: <200408191519.i7JFJ9ch013835@apollo.sr.unh.edu> I'm getting a weird segfault in libc when I try to delete an object of this type: (gdb) run --config jxr.cfg Starting program: /home/tfogal/ggcm/ggcm_anim/ggcm_animator --config jxr.cfg [Thread debugging using libthread_db enabled] [New Thread 182953122592 (LWP 17616)] rendering [4] streamlines rendering... 0% complete Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 182953122592 (LWP 17616)] 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 (gdb) bt #0 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 #1 0x0000002a958285b2 in vtkSource::UnRegister (this=0x52c980, o=0x0) at /home/tfogal/tarballs/VTK/Common/vtkSource.cxx:740 #2 0x0000002a957d704f in vtkObjectBase::Delete (this=0x52c980) at /home/tfogal/tarballs/VTK/Common/vtkObjectBase.cxx:86 #3 0x000000000040bebc in ~GGCMInterpolateDataSet (this=0x52c960) at GGCMInterpolateDataSet.cc:39 #4 0x000000000040aa8d in GGCMAnimator::Interpolate (this=0x7fbfffef70, time=0.02) at GGCMAnimator.cc:207 #5 0x000000000040a404 in GGCMAnimator::Run (this=0x7fbfffef70) at GGCMAnimator.cc:132 #6 0x000000000040ed15 in main (argc=3, argv=0x7fbffff368) at main.cc:58 The line in vtkSource::UnRegister is 740, or if (this->Outputs[idx]->GetNetReferenceCount() != 1) The 'o' is a NULL pointer, but I should think this is expected. In vtkObjectBase::Delete there is the single line: this->UnRegister((vtkObjectBase *)NULL); Should the NULL be a 'this' pointer? I don't understand how the above code would work for any object, but I have been using this version of vtk (4.2) for a while now. The stranger thing is that this is a rewrite of a poorly written program which performs the same task, and that app works (well...) fine. Any ideas? I'm lost... -tom From lflong at doc.ic.ac.uk Thu Aug 19 11:28:01 2004 From: lflong at doc.ic.ac.uk (Longfei Cong) Date: Thu, 19 Aug 2004 16:28:01 +0100 Subject: [vtkusers] visual a surface with vector Message-ID: <008401c48601$1d232bb0$9c05a992@win.doc.ic.ac.uk> Hi everyone; i want to visual a surface with tangent vecotor on it. How can i do that? Thanks in advances. LF. C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jared.Cohen at noaa.gov Thu Aug 19 12:33:21 2004 From: Jared.Cohen at noaa.gov (Jared Cohen) Date: Thu, 19 Aug 2004 12:33:21 -0400 Subject: [vtkusers] re: Try again - merging Message-ID: <4124D651.30205@noaa.gov> I think I may have a similar problem. I built a sphere by creating a PlaneSource and passing it through a TransformPolyDataFilter using a SphericalTransform. I ended up with a perfect sphere *except* for one missing strip of polys along the longitude=0 line. I closed this gap by appending points to one end of the plane, before warping it. I also tried to then pass the data into a CleanPolyData filter, to merge the coincident points; but I ended up with a really weird effect, and I couldn't fix it; I eventually had to give up on merging the points. Take a look at this screenshot; is this similar to what you're experiencing? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: screen.jpg Type: image/jpeg Size: 17941 bytes Desc: not available URL: From Jared.Cohen at noaa.gov Thu Aug 19 12:37:14 2004 From: Jared.Cohen at noaa.gov (Jared Cohen) Date: Thu, 19 Aug 2004 12:37:14 -0400 Subject: [vtkusers] re: Try again - merging Message-ID: <4124D73A.8020701@noaa.gov> Ooooookay, the image came out, but the text didn't. Lemme try this again, sans image. I think I may have a similar problem. I built a sphere by creating a PlaneSource and passing it through a TransformPolyDataFilter using a SphericalTransform. I ended up with a perfect sphere *except* for one missing strip of polys along the longitude=0 line. I closed this gap by appending points to one end of the plane, before warping it. I also tried to then pass the data into a CleanPolyData filter, to merge the coincident points; but I ended up with a really weird effect, and I couldn't fix it; I eventually had to give up on merging the points. Take a look at the screenshot in my previous post; is this similar to what you're experiencing? -------------- next part -------------- An HTML attachment was scrubbed... URL: From tk.sinha at vanderbilt.edu Thu Aug 19 12:46:29 2004 From: tk.sinha at vanderbilt.edu (Tuhin Sinha) Date: Thu, 19 Aug 2004 11:46:29 -0500 Subject: [vtkusers] GetVoidPointer() in Python... Message-ID: <1092933989.9682.17.camel@localhost> Hey all, What's the point of vtkDataArray::GetVoidPointer() in Python? How can I use the returned pointer address inside Python to get to the data. In a similar vein, why doesn't vtkDataArray have something like ExportToVoidPointer(void*). This would allow easy exporting of vtkDataArrays to Python. FYI, my end goal is to copy a substantial amount of data from a vtkFloatArray over to a python array without going through a for loop. Any help is appreciated. *Flame retardant* I am a Python newbie... take it easy on me. TKS From mathieu.malaterre at kitware.com Thu Aug 19 12:50:33 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Thu, 19 Aug 2004 12:50:33 -0400 Subject: [vtkusers] re: Try again - merging In-Reply-To: <4124D651.30205@noaa.gov> References: <4124D651.30205@noaa.gov> Message-ID: <4124DA59.4060508@kitware.com> Jared, Your code seems easy to reproduce. Is it possible you send us a cxx/tcl/python code to reproduce this ? Thanks Mathieu Jared Cohen wrote: > I think I may have a similar problem. I built a sphere by creating a > PlaneSource and passing it through a TransformPolyDataFilter using a > SphericalTransform. I ended up with a perfect sphere *except* for one > missing strip of polys along the longitude=0 line. I closed this gap by > appending points to one end of the plane, before warping it. I also > tried to then pass the data into a CleanPolyData filter, to merge the > coincident points; but I ended up with a really weird effect, and I > couldn't fix it; I eventually had to give up on merging the points. > > Take a look at this screenshot; is this similar to what you're experiencing? > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 seanm at nmr.mgh.harvard.edu Thu Aug 19 13:08:18 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Thu, 19 Aug 2004 13:08:18 -0400 Subject: [vtkusers] re: Try again - merging In-Reply-To: <4124D73A.8020701@noaa.gov> References: <4124D73A.8020701@noaa.gov> Message-ID: <4124DE82.2030508@nmr.mgh.harvard.edu> Hi Jared, I have some C++ code based on the spherical Tcl example that I think solves your problem. It avoids a singularity at the Z axis by offsetting the plane by a very small amount. I am attaching the source file 'spherical.cxx'. It takes any valid 2D vtkImageReader2 input and maps it to a sphere in the manner that you describe. The Cmake configuration stuff is as follows: ADD_EXECUTABLE (spherical spherical.cxx) TARGET_LINK_LIBRARIES (spherical vtkRendering vtkIO vtkGraphics) -Sean Jared Cohen wrote: > Ooooookay, the image came out, but the text didn't. Lemme try this > again, sans image. > > > I think I may have a similar problem. I built a sphere by creating a > PlaneSource and passing it through a TransformPolyDataFilter using a > SphericalTransform. I ended up with a perfect sphere *except* for one > missing strip of polys along the longitude=0 line. I closed this gap by > appending points to one end of the plane, before warping it. I also > tried to then pass the data into a CleanPolyData filter, to merge the > coincident points; but I ended up with a really weird effect, and I > couldn't fix it; I eventually had to give up on merging the points. > > Take a look at the screenshot in my previous post; is this similar to > what you're experiencing? > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: spherical.cxx URL: From j.robinson at kepler-systems.com Thu Aug 19 13:20:48 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Thu, 19 Aug 2004 18:20:48 +0100 Subject: [vtkusers] Merging In-Reply-To: <20040819160012.DB0CB246AD@public.kitware.com> Message-ID: <20040819172330.D666324636@public.kitware.com> Jared, The image was not attached. The list can't take anything but plain text. Anyway, in brief, the merging problem that I am having is not with geometry per se. It is simply that the vtkCutter filter is finding two points (either side of a congruent boundary) and because they have the same coordinates, it is merging them. In other objects/filters you can turn this off, but not in the vtkCutter. Regards, Jim James C Robinson, PhD, Chartered Engineer, CEO, Kepler Engineering Software Ltd., + 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 - j.robinson at kepler-systems.com -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of vtkusers-request at vtk.org Sent: 19 August 2004 17:00 To: vtkusers at vtk.org Subject: vtkusers Digest, Vol 4, Issue 52 Send vtkusers mailing list submissions to vtkusers at vtk.org To subscribe or unsubscribe via the World Wide Web, visit http://www.vtk.org/mailman/listinfo/vtkusers or, via email, send a message with subject or body 'help' to vtkusers-request at vtk.org You can reach the person managing the list at vtkusers-owner at vtk.org When replying, please edit your Subject line so it is more specific than "Re: Contents of vtkusers digest..." Today's Topics: 1. Re: Using VTK mixed with OpenGL in a MFC app (Clinton Stimpson) 2. vector visual (Longfei Cong) 3. mouse position (Longfei Cong) 4. RE: mouse position (de Boer Ingo) 5. segfault Delete()ing vtkInterpolateDataSetAttributes (tom fogal) 6. visual a surface with vector (Longfei Cong) ---------------------------------------------------------------------- Message: 1 Date: Thu, 19 Aug 2004 08:02:33 -0600 From: Clinton Stimpson Subject: Re: [vtkusers] Using VTK mixed with OpenGL in a MFC app To: vtkusers at vtk.org, Benjamin.BURRELL at Tenix.com Message-ID: <1092924153.4124b2f9ce431 at webmail.xmission.com> Content-Type: text/plain; charset=ISO-8859-1 > ------------------------------ > > Message: 3 > Date: Thu, 19 Aug 2004 17:41:28 +1000 > From: "BURRELL Benjamin" > Subject: [vtkusers] Using VTK mixed with OpenGL in a MFC app > To: > Message-ID: <200408190741.i7J7fS1r016422 at sprint1.tenix.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > I have searched the vtk mailing list for the solution and even though I > have found some posts on this, none of them where very helpful and I have > still no idea how to get this going. > > What I would like to do is use a pre-existing window in my MFC MDI app, > assign a vtkWin32OpenGLRenderWindow to it and use it with VTK and OpenGL > calls. > Eg. I want to be able to have a visualisation of terrain using VTK, then > have small textured 2D squares and primitives such as lines written in > OpenGL moving around dictated by a socket connection. All this of course > sharing the same window. > > At the moment I have had my project working all implemented in VTK and > working fine (except slow after a lot of speed tuning, hence wanting to > do the moving items in OpenGL), now I am trying to change to using OpenGL > to draw the moving squares/primitives above a VTK drawn terrain. I would > also like to keep the VTK mouse interaction as well as I have already got > this going. > > My current app is a MFC MDI project which was created by using CMake. I > then have set up my vtkWin32OpenGLRenderWindow using the following calls > in the int CVtkMDIView::OnCreate(LPCREATESTRUCT lpCreateStruct) method. > > mp_renWin->SetParentId(GetParent()->GetSafeHwnd()); > mp_renWin->SetWindowId(GetSafeHwnd()); > > mp_iren->SetRenderWindow(mp_renWin); > > > This as far as I understand, this code tells my > vtkWin32OpenGLRenderWindow to draw to my CView object which is this case > is the class CVtkMDIView. > > Could someone please be able to tell me exactly the steps required to > setup being able to call/draw OpenGL now? > For example, if I wanted to draw a OpenGL circle on top of my VTK terrain > I would use this OpenGL code somewhere: > > glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear The > Screen And The Depth Buffer > glLoadIdentity(); // Reset The matrix > > glColor3ub(255, 0, 0); > > glPushMatrix(); > glTranslatef(x, y, 0); > glBegin(GL_LINE_LOOP); > for( float ang=0; ang <= 2*3.141; ang += 0.1) > { > glVertex2d( radius * cos(ang), radius * sin(ang)); > } > glEnd(); > glPopMatrix(); > > > What calls do I have to make to the vtkRenderWindow, vtkRenderer objects > to allow this to work, where would I place the OpenGL code, had do I do > refreshing properly etc. ? Derive from vtkProp, vtkActor2D, vtkProp3D or vtkActor or whatever makes sense in your case and overload which functions (RenderOpaqueGeometry, RenderTranslucentGeometry or RenderOverlay - for 2d drawing) you need to overload. And you don't need to do the glClear as that would be done for you. Then add your new prop to the renderer. I do things like this for drawing that can't be efficiently handled using the vtk data set classes (e.g. dynamic data that has to be computed and drawn at render time and is dependent on camera orientation). Clint > > Regards, > Benjamin Burrell > > > > > ------------------------------ ------------------------------ Message: 2 Date: Thu, 19 Aug 2004 15:45:13 +0100 From: "Longfei Cong" Subject: [vtkusers] vector visual To: Message-ID: <002e01c485fb$2300b170$9c05a992 at win.doc.ic.ac.uk> Content-Type: text/plain; charset="iso-8859-1" Hi everyone; i want to visual a surface with tangent vecotor on it. How can i do that? Thanks in advances. LF. C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://public.kitware.com/pipermail/vtkusers/attachments/20040819/d648753e/a ttachment-0001.htm ------------------------------ Message: 3 Date: Thu, 19 Aug 2004 15:45:43 +0100 From: "Longfei Cong" Subject: [vtkusers] mouse position To: Message-ID: <003f01c485fb$34391c20$9c05a992 at win.doc.ic.ac.uk> Content-Type: text/plain; charset="iso-8859-1" Hi everyone: I want to visualize a object , use the mouse to kick one point of the object and get the position of the point. Wish for anyone to help me!! Thanks in advance!!!!! Longfei -------------- next part -------------- An HTML attachment was scrubbed... URL: http://public.kitware.com/pipermail/vtkusers/attachments/20040819/4b2ce46e/a ttachment-0001.html ------------------------------ Message: 4 Date: Thu, 19 Aug 2004 16:54:14 +0200 From: "de Boer Ingo" Subject: RE: [vtkusers] mouse position To: "Longfei Cong" , Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD90144FF27 at 02polywbr.waldbronn.polytec.de> Content-Type: text/plain; charset="iso-8859-1" Hi, this might help http://public.kitware.com/pipermail/vtkusers/2004-April/023779.html 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 -----Original Message----- From: Longfei Cong [mailto:lflong at doc.ic.ac.uk] Sent: Thursday, August 19, 2004 4:46 PM To: vtkusers at vtk.org Subject: [vtkusers] mouse position Hi everyone: I want to visualize a object , use the mouse to kick one point of the object and get the position of the point. Wish for anyone to help me!! Thanks in advance!!!!! Longfei ------------------------------ Message: 5 Date: Thu, 19 Aug 2004 11:19:09 -0400 From: tom fogal Subject: [vtkusers] segfault Delete()ing vtkInterpolateDataSetAttributes To: vtkusers at vtk.org Message-ID: <200408191519.i7JFJ9ch013835 at apollo.sr.unh.edu> I'm getting a weird segfault in libc when I try to delete an object of this type: (gdb) run --config jxr.cfg Starting program: /home/tfogal/ggcm/ggcm_anim/ggcm_animator --config jxr.cfg [Thread debugging using libthread_db enabled] [New Thread 182953122592 (LWP 17616)] rendering [4] streamlines rendering... 0% complete Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 182953122592 (LWP 17616)] 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 (gdb) bt #0 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 #1 0x0000002a958285b2 in vtkSource::UnRegister (this=0x52c980, o=0x0) at /home/tfogal/tarballs/VTK/Common/vtkSource.cxx:740 #2 0x0000002a957d704f in vtkObjectBase::Delete (this=0x52c980) at /home/tfogal/tarballs/VTK/Common/vtkObjectBase.cxx:86 #3 0x000000000040bebc in ~GGCMInterpolateDataSet (this=0x52c960) at GGCMInterpolateDataSet.cc:39 #4 0x000000000040aa8d in GGCMAnimator::Interpolate (this=0x7fbfffef70, time=0.02) at GGCMAnimator.cc:207 #5 0x000000000040a404 in GGCMAnimator::Run (this=0x7fbfffef70) at GGCMAnimator.cc:132 #6 0x000000000040ed15 in main (argc=3, argv=0x7fbffff368) at main.cc:58 The line in vtkSource::UnRegister is 740, or if (this->Outputs[idx]->GetNetReferenceCount() != 1) The 'o' is a NULL pointer, but I should think this is expected. In vtkObjectBase::Delete there is the single line: this->UnRegister((vtkObjectBase *)NULL); Should the NULL be a 'this' pointer? I don't understand how the above code would work for any object, but I have been using this version of vtk (4.2) for a while now. The stranger thing is that this is a rewrite of a poorly written program which performs the same task, and that app works (well...) fine. Any ideas? I'm lost... -tom ------------------------------ Message: 6 Date: Thu, 19 Aug 2004 16:28:01 +0100 From: "Longfei Cong" Subject: [vtkusers] visual a surface with vector To: Message-ID: <008401c48601$1d232bb0$9c05a992 at win.doc.ic.ac.uk> Content-Type: text/plain; charset="iso-8859-1" Hi everyone; i want to visual a surface with tangent vecotor on it. How can i do that? Thanks in advances. LF. C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://public.kitware.com/pipermail/vtkusers/attachments/20040819/1fc2e45f/a ttachment-0001.htm ------------------------------ _______________________________________________ vtkusers mailing list vtkusers at vtk.org http://www.vtk.org/mailman/listinfo/vtkusers End of vtkusers Digest, Vol 4, Issue 52 *************************************** From Jared.Cohen at noaa.gov Thu Aug 19 13:42:41 2004 From: Jared.Cohen at noaa.gov (Jared Cohen) Date: Thu, 19 Aug 2004 13:42:41 -0400 Subject: [vtkusers] re: Try again - merging Message-ID: <4124E691.5080000@noaa.gov> Thanks, but I don't think you understand the problem. I can close the gap just fine, but the two edges will overlap without being merged together. It's when I merge them using a CleanPolyData filter that I get the warping effect. >Hi Jared, > > I have some C++ code based on the spherical Tcl example that I think >solves your problem. It avoids a singularity at the Z axis by offsetting >the plane by a very small amount. I am attaching the source file >'spherical.cxx'. It takes any valid 2D vtkImageReader2 input and maps it >to a sphere in the manner that you describe. > >The Cmake configuration stuff is as follows: > >ADD_EXECUTABLE (spherical spherical.cxx) >TARGET_LINK_LIBRARIES (spherical vtkRendering vtkIO vtkGraphics) > >-Sean > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jared.Cohen at noaa.gov Thu Aug 19 13:47:51 2004 From: Jared.Cohen at noaa.gov (Jared Cohen) Date: Thu, 19 Aug 2004 13:47:51 -0400 Subject: [vtkusers] re: Try again - merging Message-ID: <4124E7C7.7010103@noaa.gov> > > >Jared, > > Your code seems easy to reproduce. Is it possible you send us a >cxx/tcl/python code to reproduce this ? > >Thanks >Mathieu > Sure thing, here you go (it's in Python) import Numeric as N import sys from vtk import * deg2rad = N.pi / 180.0 radius = 1.0 th_min, th_max = 0.0, 360.0 * deg2rad ph_min, ph_max = 0.0, 180.0 * deg2rad #create the plane plane = vtkPlaneSource() plane.SetOrigin(radius, ph_max, th_min) plane.SetPoint1(radius, ph_max, th_max) plane.SetPoint2(radius, ph_min, th_min) plane.SetXResolution(36) plane.SetYResolution(18) plane.Update() #warp it into a sphere transform = vtkSphericalTransform() transform.Update() tpoly = vtkTransformPolyDataFilter() tpoly.SetInput(plane.GetOutput()) tpoly.SetTransform(transform) tpoly.Update() #merge coincident points -- this is what causes #the distortion clean = vtkCleanPolyData() clean.SetInput(tpoly.GetOutput()) clean.PointMergingOn() clean.SetTolerance(0.000001) #setup standard VTK pipeline mapper = vtkPolyDataMapper() mapper.SetInput(clean.GetOutput()) mapper.ImmediateModeRenderingOn() mapper.Update() actor = vtkActor() actor.SetMapper(mapper) actor.PickableOn() actor.GetProperty().BackfaceCullingOn() reader = vtkPNMReader() reader.SetFileName("../../wrap/earth.ppm") texture = vtkTexture() texture.SetInput(reader.GetOutput()) texture.InterpolateOn() actor.SetTexture(texture) ren = vtkRenderer() ren.AddActor(actor) win = vtkRenderWindow() win.AddRenderer(ren) win.SetSize(500, 500) iren = vtkRenderWindowInteractor() iren.SetRenderWindow(win) style = vtkInteractorStyleTrackballCamera() iren.SetInteractorStyle(style) iren.Initialize() win.Render() iren.Start() -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.robinson at kepler-systems.com Thu Aug 19 13:53:12 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Thu, 19 Aug 2004 18:53:12 +0100 Subject: FW: [vtkusers] Merging Message-ID: <20040819180350.6B0C924626@public.kitware.com> Tim, Many thanks. I hadn't noticed that the list scrubs the attachment and sets up a link. I can show an example of my issue therefore. Regards, Jim Filtered FE mesh with scalar on. Note the clear boundary and shear discontinuity associated with the internal boundary. A cross section of the FE mesh (using vtkCutter abd vtkClipPolyData . The shear boundary has been blurred, probably due to conincident points being merged by these filters. James C Robinson, PhD, Chartered Engineer, CEO, Kepler Engineering Software Ltd., + 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 - j.robinson at kepler-systems.com -----Original Message----- From: jarv0075 [mailto:jarv0075 at umn.edu] Sent: 19 August 2004 18:40 To: j.robinson at kepler-systems.com Subject: Re: [vtkusers] Merging Just so you know, the list does take attachments... If you're not receiving them you may want to check the settings on your end. -Tim On 19 Aug 2004, James Robinson wrote: > Jared, > > The image was not attached. The list can't take anything but plain text. > > Anyway, in brief, the merging problem that I am having is not with geometry > per se. It is simply that the vtkCutter filter is finding two points (either > side of a congruent boundary) and because they have the same coordinates, it > is merging them. In other objects/filters you can turn this off, but not in > the vtkCutter. > > Regards, > > Jim > > James C Robinson, PhD, Chartered Engineer, > CEO, > Kepler Engineering Software Ltd., > + 42 Rivergrove, > Glanmire, > Co. Cork, > Eire > ' +353 21 4822028 > +353 87 2393010 > 6 +353 21 4822028 > - j.robinson at kepler-systems.com > > -----Original Message----- > From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf > Of vtkusers-request at vtk.org > Sent: 19 August 2004 17:00 > To: vtkusers at vtk.org > Subject: vtkusers Digest, Vol 4, Issue 52 > > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://www.vtk.org/mailman/listinfo/vtkusers > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of vtkusers digest..." > > > Today's Topics: > > 1. Re: Using VTK mixed with OpenGL in a MFC app (Clinton Stimpson) > 2. vector visual (Longfei Cong) > 3. mouse position (Longfei Cong) > 4. RE: mouse position (de Boer Ingo) > 5. segfault Delete()ing vtkInterpolateDataSetAttributes (tom fogal) > 6. visual a surface with vector (Longfei Cong) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 19 Aug 2004 08:02:33 -0600 > From: Clinton Stimpson > Subject: Re: [vtkusers] Using VTK mixed with OpenGL in a MFC app > To: vtkusers at vtk.org, Benjamin.BURRELL at Tenix.com > Message-ID: <1092924153.4124b2f9ce431 at webmail.xmission.com> > Content-Type: text/plain; charset=ISO-8859-1 > > > > ------------------------------ > > > > Message: 3 > > Date: Thu, 19 Aug 2004 17:41:28 +1000 > > From: "BURRELL Benjamin" > > Subject: [vtkusers] Using VTK mixed with OpenGL in a MFC app > > To: > > Message-ID: <200408190741.i7J7fS1r016422 at sprint1.tenix.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Hi, > > > > I have searched the vtk mailing list for the solution and even though I > > have found some posts on this, none of them where very helpful and I have > > still no idea how to get this going. > > > > What I would like to do is use a pre-existing window in my MFC MDI app, > > assign a vtkWin32OpenGLRenderWindow to it and use it with VTK and OpenGL > > calls. > > Eg. I want to be able to have a visualisation of terrain using VTK, then > > have small textured 2D squares and primitives such as lines written in > > OpenGL moving around dictated by a socket connection. All this of course > > sharing the same window. > > > > At the moment I have had my project working all implemented in VTK and > > working fine (except slow after a lot of speed tuning, hence wanting to > > do the moving items in OpenGL), now I am trying to change to using OpenGL > > to draw the moving squares/primitives above a VTK drawn terrain. I would > > also like to keep the VTK mouse interaction as well as I have already got > > this going. > > > > My current app is a MFC MDI project which was created by using CMake. I > > then have set up my vtkWin32OpenGLRenderWindow using the following calls > > in the int CVtkMDIView::OnCreate(LPCREATESTRUCT lpCreateStruct) method. > > > > mp_renWin->SetParentId(GetParent()->GetSafeHwnd()); > > mp_renWin->SetWindowId(GetSafeHwnd()); > > > > mp_iren->SetRenderWindow(mp_renWin); > > > > > > This as far as I understand, this code tells my > > vtkWin32OpenGLRenderWindow to draw to my CView object which is this case > > is the class CVtkMDIView. > > > > Could someone please be able to tell me exactly the steps required to > > setup being able to call/draw OpenGL now? > > For example, if I wanted to draw a OpenGL circle on top of my VTK terrain > > I would use this OpenGL code somewhere: > > > > glClear(GL_COLOR_BUFFER_BIT | > GL_DEPTH_BUFFER_BIT); // Clear The > > Screen And The Depth Buffer > > glLoadIdentity(); > // Reset The matrix > > > > glColor3ub(255, 0, 0); > > > > glPushMatrix(); > > glTranslatef(x, y, 0); > > glBegin(GL_LINE_LOOP); > > for( float ang=0; ang <= 2*3.141; > ang += 0.1) > > { > > glVertex2d( radius * > cos(ang), radius * sin(ang)); > > } > > glEnd(); > > glPopMatrix(); > > > > > > What calls do I have to make to the vtkRenderWindow, vtkRenderer objects > > to allow this to work, where would I place the OpenGL code, had do I do > > refreshing properly etc. ? > > Derive from vtkProp, vtkActor2D, vtkProp3D or vtkActor or whatever makes > sense in your case and overload which functions (RenderOpaqueGeometry, > RenderTranslucentGeometry or RenderOverlay - for 2d drawing) you need to > overload. > And you don't need to do the glClear as that would be done for you. > > Then add your new prop to the renderer. > > I do things like this for drawing that can't be efficiently handled using > the vtk data set classes (e.g. dynamic data that has to be computed and > drawn at render time and is dependent on camera orientation). > > Clint > > > > > Regards, > > Benjamin Burrell > > > > > > > > > > ------------------------------ > > > ------------------------------ > > Message: 2 > Date: Thu, 19 Aug 2004 15:45:13 +0100 > From: "Longfei Cong" > Subject: [vtkusers] vector visual > To: > Message-ID: <002e01c485fb$2300b170$9c05a992 at win.doc.ic.ac.uk> > Content-Type: text/plain; charset="iso-8859-1" > > Hi everyone; > i want to visual a surface with tangent vecotor on it. How can > i do that? Thanks in advances. > LF. C. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://public.kitware.com/pipermail/vtkusers/attachments/20040819/d648753e/ a > ttachment-0001.htm > > ------------------------------ > > Message: 3 > Date: Thu, 19 Aug 2004 15:45:43 +0100 > From: "Longfei Cong" > Subject: [vtkusers] mouse position > To: > Message-ID: <003f01c485fb$34391c20$9c05a992 at win.doc.ic.ac.uk> > Content-Type: text/plain; charset="iso-8859-1" > > Hi everyone: > I want to visualize a object , use the mouse to kick one point of > the object and get the position of the point. Wish for anyone to help me!! > Thanks in advance!!!!! > Longfei > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://public.kitware.com/pipermail/vtkusers/attachments/20040819/4b2ce46e/ a > ttachment-0001.html > > ------------------------------ > > Message: 4 > Date: Thu, 19 Aug 2004 16:54:14 +0200 > From: "de Boer Ingo" > Subject: RE: [vtkusers] mouse position > To: "Longfei Cong" , > Message-ID: > > <1484AEC8AB498A4EB64D4A8137D23FD90144FF27 at 02polywbr.waldbronn.polytec.de> > > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > this might help > > http://public.kitware.com/pipermail/vtkusers/2004-April/023779.html > > 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 > > -----Original Message----- > From: Longfei Cong [mailto:lflong at doc.ic.ac.uk] > Sent: Thursday, August 19, 2004 4:46 PM > To: vtkusers at vtk.org > Subject: [vtkusers] mouse position > > > Hi everyone: > I want to visualize a object , use the mouse to kick one point of > the object and get the position of the point. Wish for anyone to help me!! > Thanks in advance!!!!! > Longfei > > > ------------------------------ > > Message: 5 > Date: Thu, 19 Aug 2004 11:19:09 -0400 > From: tom fogal > Subject: [vtkusers] segfault Delete()ing > vtkInterpolateDataSetAttributes > To: vtkusers at vtk.org > Message-ID: <200408191519.i7JFJ9ch013835 at apollo.sr.unh.edu> > > I'm getting a weird segfault in libc when I try to delete an object of > this type: > > (gdb) run --config jxr.cfg > Starting program: /home/tfogal/ggcm/ggcm_anim/ggcm_animator --config > jxr.cfg > [Thread debugging using libthread_db enabled] > [New Thread 182953122592 (LWP 17616)] > rendering [4] streamlines > rendering... 0% complete > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 182953122592 (LWP 17616)] > 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 > (gdb) bt > #0 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 > #1 0x0000002a958285b2 in vtkSource::UnRegister (this=0x52c980, o=0x0) > at /home/tfogal/tarballs/VTK/Common/vtkSource.cxx:740 > #2 0x0000002a957d704f in vtkObjectBase::Delete (this=0x52c980) > at /home/tfogal/tarballs/VTK/Common/vtkObjectBase.cxx:86 > #3 0x000000000040bebc in ~GGCMInterpolateDataSet (this=0x52c960) > at GGCMInterpolateDataSet.cc:39 > #4 0x000000000040aa8d in GGCMAnimator::Interpolate (this=0x7fbfffef70, > time=0.02) at GGCMAnimator.cc:207 > #5 0x000000000040a404 in GGCMAnimator::Run (this=0x7fbfffef70) > at GGCMAnimator.cc:132 > #6 0x000000000040ed15 in main (argc=3, argv=0x7fbffff368) at > main.cc:58 > > The line in vtkSource::UnRegister is 740, or > > if (this->Outputs[idx]->GetNetReferenceCount() != 1) > > The 'o' is a NULL pointer, but I should think this is expected. In > vtkObjectBase::Delete there is the single line: > > this->UnRegister((vtkObjectBase *)NULL); > > Should the NULL be a 'this' pointer? I don't understand how the above > code would work for any object, but I have been using this version of > vtk (4.2) for a while now. > > The stranger thing is that this is a rewrite of a poorly written > program which performs the same task, and that app works (well...) > fine. > > Any ideas? I'm lost... > > -tom > > > ------------------------------ > > Message: 6 > Date: Thu, 19 Aug 2004 16:28:01 +0100 > From: "Longfei Cong" > Subject: [vtkusers] visual a surface with vector > To: > Message-ID: <008401c48601$1d232bb0$9c05a992 at win.doc.ic.ac.uk> > Content-Type: text/plain; charset="iso-8859-1" > > Hi everyone; > i want to visual a surface with tangent vecotor on it. How can > i do that? Thanks in advances. > LF. C. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://public.kitware.com/pipermail/vtkusers/attachments/20040819/1fc2e45f/ a > ttachment-0001.htm > > ------------------------------ > > _______________________________________________ > vtkusers mailing list > vtkusers at vtk.org > http://www.vtk.org/mailman/listinfo/vtkusers > > > End of vtkusers Digest, Vol 4, Issue 52 > *************************************** > > _______________________________________________ > 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 > --------------------------------------- Timothy R. Jarvis --------------------------------------- Graduate Research Assistant International Neuroimaging Consortium VA Medical Center 612-467-2619 http://www.neurovia.umn.edu --------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 2879 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 3060 bytes Desc: not available URL: From prabhu at aero.iitm.ernet.in Thu Aug 19 14:28:37 2004 From: prabhu at aero.iitm.ernet.in (Prabhu Ramachandran) Date: Thu, 19 Aug 2004 14:28:37 -0400 Subject: [vtkusers] GetVoidPointer() in Python... In-Reply-To: <1092933989.9682.17.camel@localhost> References: <1092933989.9682.17.camel@localhost> Message-ID: <16676.61781.542268.709836@enthought.hathway.com> >>>>> "TS" == Tuhin Sinha writes: TS> Hey all, TS> What's the point of vtkDataArray::GetVoidPointer() in TS> Python? How can TS> I use the returned pointer address inside Python to get to the TS> data. In a similar vein, why doesn't vtkDataArray have TS> something like ExportToVoidPointer(void*). This would allow TS> easy exporting of vtkDataArrays to Python. FYI, my end goal TS> is to copy a substantial amount of data from a vtkFloatArray TS> over to a python array without going through a for loop. Any TS> help is appreciated. Look at Wrapping/Python/vtk/util/vtkImage{ImportFrom,ExportTo}Array.py cheers, prabhu From seanm at nmr.mgh.harvard.edu Thu Aug 19 14:25:10 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Thu, 19 Aug 2004 14:25:10 -0400 Subject: [vtkusers] re: Try again - merging In-Reply-To: <4124E691.5080000@noaa.gov> References: <4124E691.5080000@noaa.gov> Message-ID: <4124F086.3000406@nmr.mgh.harvard.edu> Hi Jared, Actually, I think that I do understand your problem. If you merge the non-polar points along the edges of the plane mapped to the sphere, what are the texture coordinates of those points? Get it? Before the merge, they're zero (0) on one side, one (1) on the other. After the merge, you are getting an interpolation between 0 and 1 / thetaRes - 1 (i.e. some crap from the center of your image being placed along that border). Furthermore, by using the offsetting that I suggest, as well as going back and forth with the transform, you'll avoid having a black hole at the north pole (you'll see what I mean). The bottom line is that, for you, the only points worth merging are probably the poles. Even then, you'll end up with texture artifact that won't show up with merging. So, this doesn't solve the *grand* merging debate, but it may solve yours ;-) -Sean Jared Cohen wrote: > Thanks, but I don't think you understand the problem. I can close the > gap just fine, but the two edges will overlap without being merged > together. It's when I merge them using a CleanPolyData filter that I get > the warping effect. > > > >> Hi Jared, >> >> I have some C++ code based on the spherical Tcl example that I think >> solves your problem. It avoids a singularity at the Z axis by >> offsetting the plane by a very small amount. I am attaching the source >> file 'spherical.cxx'. It takes any valid 2D vtkImageReader2 input and >> maps it to a sphere in the manner that you describe. >> >> The Cmake configuration stuff is as follows: >> >> ADD_EXECUTABLE (spherical spherical.cxx) >> TARGET_LINK_LIBRARIES (spherical vtkRendering vtkIO vtkGraphics) >> >> -Sean >> From seanm at nmr.mgh.harvard.edu Thu Aug 19 14:27:44 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Thu, 19 Aug 2004 14:27:44 -0400 Subject: [vtkusers] re: Try again - merging In-Reply-To: <4124F086.3000406@nmr.mgh.harvard.edu> References: <4124E691.5080000@noaa.gov> <4124F086.3000406@nmr.mgh.harvard.edu> Message-ID: <4124F120.6020305@nmr.mgh.harvard.edu> Err ... I meant *without* merging. > you'll end up with texture artifact that won't show up with merging. > From lucas at cvrti.utah.edu Thu Aug 19 14:43:41 2004 From: lucas at cvrti.utah.edu (Lucas Lorenzo) Date: Thu, 19 Aug 2004 12:43:41 -0600 Subject: [vtkusers] problem running code with vtk 4.4 Message-ID: Hi all, I've compiled vtk 4.4 on Mac OSX I had problems because even though I could build my applications no window popped up (I'm using x11). This problem seems to be solved. But now, when running any program I have a bunch of messages of this kind: 2004-08-19 12:39:42.888 ThresholdVTK[10625] *** _NSAutoreleaseNoPool(): Object 0x1340eb0 of class NSImage autoreleased with no pool in place - just leaking 2004-08-19 12:39:42.913 ThresholdVTK[10625] *** _NSAutoreleaseNoPool(): Object 0x134b5d0 of class NSCFString autoreleased with no pool in place - just leaking 2004-08-19 12:39:42.914 ThresholdVTK[10625] *** _NSAutoreleaseNoPool(): Object 0x1341e30 of class NSCFArray autoreleased with no pool in place - just leaking 2004-08-19 12:39:42.914 ThresholdVTK[10625] *** _NSAutoreleaseNoPool(): Object 0x134b5f0 of class NSCFString autoreleased with no pool in place - just leaking 2004-08-19 12:39:42.915 ThresholdVTK[10625] *** _NSAutoreleaseNoPool(): Object 0x1340700 of class NSCFArray autoreleased with no pool in place - just leaking 2004-08-19 12:39:42.915 ThresholdVTK[10625] *** _NSAutoreleaseNoPool(): Object 0x134b610 of class NSPathStore2 autoreleased with no pool in place - just leaking 2004-08-19 12:39:42.915 ThresholdVTK[10625] *** _NSAutoreleaseNoPool(): Object 0x13405e0 of class NSPathStore2 autoreleased with no pool in place - just leaking 2004-08-19 12:39:42.915 ThresholdVTK[10625] *** _NSAutoreleaseNoPool(): Object 0x1340660 of class NSPathStore2 autoreleased with no pool in place - just leaking Could someone help me please ? Thanks Lucas Lorenzo University of Utah Nora Eccles Harrison CardioVascular Research and Training Institute Fellows Room 95 South 2000 East Salt Lake City, UT 84112-5000 e-mail: lucas at cvrti.utah.edu telephone: 801-587-9536 From seanm at nmr.mgh.harvard.edu Thu Aug 19 14:34:55 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Thu, 19 Aug 2004 14:34:55 -0400 Subject: [vtkusers] re: Try again - merging In-Reply-To: <4124F086.3000406@nmr.mgh.harvard.edu> References: <4124E691.5080000@noaa.gov> <4124F086.3000406@nmr.mgh.harvard.edu> Message-ID: <4124F2CF.1000003@nmr.mgh.harvard.edu> Jared, You'll notice that the band of crap on your sphere is actually your entire texture mirror mapped onto that single strip of polygons ... not just from the center as I said previously ... unless that strip is 1 pixel wide ;-) -Sean Sean McInerney wrote: > Hi Jared, > > Actually, I think that I do understand your problem. If you merge the > non-polar points along the edges of the plane mapped to the sphere, what > are the texture coordinates of those points? Get it? Before the merge, > they're zero (0) on one side, one (1) on the other. After the merge, you > are getting an interpolation between 0 and 1 / thetaRes - 1 (i.e. some > crap from the center of your image being placed along that border). > Furthermore, by using the offsetting that I suggest, as well as going > back and forth with the transform, you'll avoid having a black hole at > the north pole (you'll see what I mean). The bottom line is that, for > you, the only points worth merging are probably the poles. Even then, > you'll end up with texture artifact that won't show up with merging. > > So, this doesn't solve the *grand* merging debate, but it may solve > yours ;-) > > -Sean > > Jared Cohen wrote: > >> Thanks, but I don't think you understand the problem. I can close the >> gap just fine, but the two edges will overlap without being merged >> together. It's when I merge them using a CleanPolyData filter that I >> get the warping effect. >> >> >> >>> Hi Jared, >>> >>> I have some C++ code based on the spherical Tcl example that I >>> think solves your problem. It avoids a singularity at the Z axis by >>> offsetting the plane by a very small amount. I am attaching the >>> source file 'spherical.cxx'. It takes any valid 2D vtkImageReader2 >>> input and maps it to a sphere in the manner that you describe. >>> >>> The Cmake configuration stuff is as follows: >>> >>> ADD_EXECUTABLE (spherical spherical.cxx) >>> TARGET_LINK_LIBRARIES (spherical vtkRendering vtkIO vtkGraphics) >>> >>> -Sean >>> > _______________________________________________ > 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 Jared.Cohen at noaa.gov Thu Aug 19 14:49:03 2004 From: Jared.Cohen at noaa.gov (Jared Cohen) Date: Thu, 19 Aug 2004 14:49:03 -0400 Subject: [vtkusers] re: Try again - merging References: <4124E691.5080000@noaa.gov> <4124F086.3000406@nmr.mgh.harvard.edu> <4124F2CF.1000003@nmr.mgh.harvard.edu> Message-ID: <4124F61F.6050101@noaa.gov> Well, I tried using the offset, and the back-and-forth transform series. But once it passed through the CleanPolyData filter, it STILL gave me the band-o'-crap down the side. I'm starting to reach the same conclusion that I had reached the last time I tried this -- namely, that merging the points just isn't worth the headache. ;-) Sean McInerney wrote: > Jared, > > You'll notice that the band of crap on your sphere is actually your > entire texture mirror mapped onto that single strip of polygons ... > not just from the center as I said previously ... unless that strip is > 1 pixel wide ;-) > > -Sean > > Sean McInerney wrote: > >> Hi Jared, >> >> Actually, I think that I do understand your problem. If you merge >> the non-polar points along the edges of the plane mapped to the >> sphere, what are the texture coordinates of those points? Get it? >> Before the merge, they're zero (0) on one side, one (1) on the other. >> After the merge, you are getting an interpolation between 0 and 1 / >> thetaRes - 1 (i.e. some crap from the center of your image being >> placed along that border). Furthermore, by using the offsetting that >> I suggest, as well as going back and forth with the transform, you'll >> avoid having a black hole at the north pole (you'll see what I mean). >> The bottom line is that, for you, the only points worth merging are >> probably the poles. Even then, you'll end up with texture artifact >> that won't show up with merging. >> >> So, this doesn't solve the *grand* merging debate, but it may solve >> yours ;-) >> >> -Sean >> >> Jared Cohen wrote: >> >>> Thanks, but I don't think you understand the problem. I can close >>> the gap just fine, but the two edges will overlap without being >>> merged together. It's when I merge them using a CleanPolyData filter >>> that I get the warping effect. >>> >>> >>> >>>> Hi Jared, >>>> >>>> I have some C++ code based on the spherical Tcl example that I >>>> think solves your problem. It avoids a singularity at the Z axis by >>>> offsetting the plane by a very small amount. I am attaching the >>>> source file 'spherical.cxx'. It takes any valid 2D vtkImageReader2 >>>> input and maps it to a sphere in the manner that you describe. >>>> >>>> The Cmake configuration stuff is as follows: >>>> >>>> ADD_EXECUTABLE (spherical spherical.cxx) >>>> TARGET_LINK_LIBRARIES (spherical vtkRendering vtkIO vtkGraphics) >>>> >>>> -Sean >>>> >> _______________________________________________ >> 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 >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.robinson at kepler-systems.com Thu Aug 19 14:49:41 2004 From: j.robinson at kepler-systems.com (James Robinson) Date: Thu, 19 Aug 2004 19:49:41 +0100 Subject: [vtkusers] Missing captions Message-ID: <20040819184957.AB504246AE@public.kitware.com> Dear All, The system scrubbed the captions from the images that I posted: Image 1: Filtered FE mesh with scalar on. Note the clear boundary and shear discontinuity associated with the internal boundary. Image 2: A cross section of the FE mesh (using vtkCutter abd vtkClipPolyData . The shear boundary has been blurred, probably due to conincident points being merged by these filters. Regards, Jim James C Robinson, PhD, Chartered Engineer, * 42 Rivergrove, Glanmire, Co. Cork, Eire ' +353 21 4822028 +353 87 2393010 6 +353 21 4822028 * j.robinson at kepler-systems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From seanm at nmr.mgh.harvard.edu Thu Aug 19 14:48:51 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Thu, 19 Aug 2004 14:48:51 -0400 Subject: [vtkusers] re: Try again - merging In-Reply-To: <4124F61F.6050101@noaa.gov> References: <4124E691.5080000@noaa.gov> <4124F086.3000406@nmr.mgh.harvard.edu> <4124F2CF.1000003@nmr.mgh.harvard.edu> <4124F61F.6050101@noaa.gov> Message-ID: <4124F613.5050607@nmr.mgh.harvard.edu> Uhh ... yeah ... that was my point ... but perhaps I was too detailed. If you want to texture map to a sphere without artifact, you cannot merge ... period. BTW, you will still need to do the suggested offsetting to avoid a singularity at the north pole ... and the subsequent cataclysmic explosion ;-) I have attached your code minus merges and plus offsetting fixes. Rock on. -Sean Jared Cohen wrote: > Well, I tried using the offset, and the back-and-forth transform series. > But once it passed through the CleanPolyData filter, it STILL gave me > the band-o'-crap down the side. I'm starting to reach the same > conclusion that I had reached the last time I tried this -- namely, that > merging the points just isn't worth the headache. ;-) > > Sean McInerney wrote: > >> Jared, >> >> You'll notice that the band of crap on your sphere is actually your >> entire texture mirror mapped onto that single strip of polygons ... >> not just from the center as I said previously ... unless that strip is >> 1 pixel wide ;-) >> >> -Sean >> >> Sean McInerney wrote: >> >>> Hi Jared, >>> >>> Actually, I think that I do understand your problem. If you merge >>> the non-polar points along the edges of the plane mapped to the >>> sphere, what are the texture coordinates of those points? Get it? >>> Before the merge, they're zero (0) on one side, one (1) on the other. >>> After the merge, you are getting an interpolation between 0 and 1 / >>> thetaRes - 1 (i.e. some crap from the center of your image being >>> placed along that border). Furthermore, by using the offsetting that >>> I suggest, as well as going back and forth with the transform, you'll >>> avoid having a black hole at the north pole (you'll see what I mean). >>> The bottom line is that, for you, the only points worth merging are >>> probably the poles. Even then, you'll end up with texture artifact >>> that won't show up with merging. >>> >>> So, this doesn't solve the *grand* merging debate, but it may solve >>> yours ;-) >>> >>> -Sean >>> >>> Jared Cohen wrote: >>> >>>> Thanks, but I don't think you understand the problem. I can close >>>> the gap just fine, but the two edges will overlap without being >>>> merged together. It's when I merge them using a CleanPolyData filter >>>> that I get the warping effect. >>>> >>>> >>>> >>>>> Hi Jared, >>>>> >>>>> I have some C++ code based on the spherical Tcl example that I >>>>> think solves your problem. It avoids a singularity at the Z axis by >>>>> offsetting the plane by a very small amount. I am attaching the >>>>> source file 'spherical.cxx'. It takes any valid 2D vtkImageReader2 >>>>> input and maps it to a sphere in the manner that you describe. >>>>> >>>>> The Cmake configuration stuff is as follows: >>>>> >>>>> ADD_EXECUTABLE (spherical spherical.cxx) >>>>> TARGET_LINK_LIBRARIES (spherical vtkRendering vtkIO vtkGraphics) >>>>> >>>>> -Sean >>>>> >>> _______________________________________________ >>> 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 >>> > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: spherical.py URL: From tfogal at apollo.sr.unh.edu Thu Aug 19 15:23:55 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Thu, 19 Aug 2004 15:23:55 -0400 Subject: [vtkusers] segfault Delete()ing vtkInterpolateDataSetAttributes Message-ID: <200408191923.i7JJNtgd027556@apollo.sr.unh.edu> I believe I am closer to tracking this down. Below is a gdb backtrace where gdb gives an interesting message: warning: can't find linker symbol for virtual table for `vtkDataObject' value Also I believe this may be (very vaguely) related to bug 189, http://www.itk.org/Bug/bug.php?op=vote&bugid=189 due to the fact that they both crash in the same part of libc. >From what I gather through extensive googling, main_arena is apparently some type of flag telling glibc where a particular section of memory was malloc()d -- certain applications implement their own malloc() and that is not considered part of the 'main_arena', for example. Perhaps a linking error is causing vtkDataObject::GetNetReferenceCount() to not be found in this context? This is a little beyond my current C/C++ debugging knowledge. Any ideas would be GREATLY appreciated. Also, should I perhaps submit this as a bug or should we continue to blame glibc until more information is known? -tom ---- gdb trace ---- tfogal at thetis ggcm_anim $ gdb ggcm_animator GNU gdb 6.1 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-suse-linux"...Using host libthread_db library "/lib64/tls/libthread_db.so.1". (gdb) run --config jxr.cfg Starting program: /home/tfogal/ggcm/ggcm_anim/ggcm_animator --config jxr.cfg [Thread debugging using libthread_db enabled] [New Thread 182953122592 (LWP 31484)] rendering [4] streamlines rendering... 0% complete Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 182953122592 (LWP 31484)] 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 (gdb) bt #0 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 #1 0x0000002a958285b2 in vtkSource::UnRegister (this=0x52c980, o=0x0) at /home/tfogal/tarballs/VTK/Common/vtkSource.cxx:740 #2 0x0000002a957d704f in vtkObjectBase::Delete (this=0x52c980) at /home/tfogal/tarballs/VTK/Common/vtkObjectBase.cxx:86 #3 0x000000000040bebc in ~GGCMInterpolateDataSet (this=0x52c960) at GGCMInterpolateDataSet.cc:39 #4 0x000000000040aa8d in GGCMAnimator::Interpolate (this=0x7fbfffef70, time=0.02) at GGCMAnimator.cc:207 #5 0x000000000040a404 in GGCMAnimator::Run (this=0x7fbfffef70) at GGCMAnimator.cc:132 #6 0x000000000040ed59 in main (argc=3, argv=0x7fbffff368) at main.cc:58 (gdb) up #1 0x0000002a958285b2 in vtkSource::UnRegister (this=0x52c980, o=0x0) at /home/tfogal/tarballs/VTK/Common/vtkSource.cxx:740 740 if (this->Outputs[idx]->GetNetReferenceCount() != 1) (gdb) list 735 { 736 if (this->Outputs[idx] == o) 737 { 738 done = 0; 739 } 740 if (this->Outputs[idx]->GetNetReferenceCount() != 1) 741 { 742 done = 0; 743 } 744 } (gdb) print this $1 = (vtkSource * const) 0x52c980 (gdb) print idx $2 = 0 (gdb) print this->Outputs[0] $3 = (class vtkDataObject *) 0x5b380d0 (gdb) print this->Outputs[0]->GetNetReferenceCount() warning: can't find linker symbol for virtual table for `vtkDataObject' value Program received signal SIGSEGV, Segmentation fault. 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 The program being debugged was signaled while in a function called from GDB. GDB remains in the frame where the signal was received. To change this behavior use "set unwindonsignal on" Evaluation of the expression containing the function (main_arena) will be abandoned. ------- Forwarded Message Subject: [vtkusers] segfault Delete()ing vtkInterpolateDataSetAttributes I'm getting a weird segfault in libc when I try to delete an object of this type: (gdb) run --config jxr.cfg Starting program: /home/tfogal/ggcm/ggcm_anim/ggcm_animator --config jxr.cfg [Thread debugging using libthread_db enabled] [New Thread 182953122592 (LWP 17616)] rendering [4] streamlines rendering... 0% complete Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 182953122592 (LWP 17616)] 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 (gdb) bt #0 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 #1 0x0000002a958285b2 in vtkSource::UnRegister (this=0x52c980, o=0x0) at /home/tfogal/tarballs/VTK/Common/vtkSource.cxx:740 #2 0x0000002a957d704f in vtkObjectBase::Delete (this=0x52c980) at /home/tfogal/tarballs/VTK/Common/vtkObjectBase.cxx:86 #3 0x000000000040bebc in ~GGCMInterpolateDataSet (this=0x52c960) at GGCMInterpolateDataSet.cc:39 #4 0x000000000040aa8d in GGCMAnimator::Interpolate (this=0x7fbfffef70, time=0.02) at GGCMAnimator.cc:207 #5 0x000000000040a404 in GGCMAnimator::Run (this=0x7fbfffef70) at GGCMAnimator.cc:132 #6 0x000000000040ed15 in main (argc=3, argv=0x7fbffff368) at main.cc:58 The line in vtkSource::UnRegister is 740, or if (this->Outputs[idx]->GetNetReferenceCount() != 1) The 'o' is a NULL pointer, but I should think this is expected. In vtkObjectBase::Delete there is the single line: this->UnRegister((vtkObjectBase *)NULL); Should the NULL be a 'this' pointer? I don't understand how the above code would work for any object, but I have been using this version of vtk (4.2) for a while now. The stranger thing is that this is a rewrite of a poorly written program which performs the same task, and that app works (well...) fine. Any ideas? I'm lost... - -tom _______________________________________________ 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 ------- End of Forwarded Message From Jared.Cohen at noaa.gov Thu Aug 19 15:29:20 2004 From: Jared.Cohen at noaa.gov (Jared Cohen) Date: Thu, 19 Aug 2004 15:29:20 -0400 Subject: [vtkusers] re: Try again - merging References: <4124E691.5080000@noaa.gov> <4124F086.3000406@nmr.mgh.harvard.edu> <4124F2CF.1000003@nmr.mgh.harvard.edu> <4124F61F.6050101@noaa.gov> <4124F613.5050607@nmr.mgh.harvard.edu> Message-ID: <4124FF90.2040706@noaa.gov> Yep, so basically I was already as close as I could get. ;-) Well, thanx anyway :-) BTW, the code I posted was just a quick stub program, not the actual one I'm working on. In the real one, I already handle singularities at the poles :-) Sean McInerney wrote: > Uhh ... yeah ... that was my point ... but perhaps I was too detailed. > > If you want to texture map to a sphere without artifact, you cannot > merge ... period. BTW, you will still need to do the suggested > offsetting to avoid a singularity at the north pole ... and the > subsequent cataclysmic explosion ;-) > > I have attached your code minus merges and plus offsetting fixes. > > Rock on. > > -Sean > > Jared Cohen wrote: > >> Well, I tried using the offset, and the back-and-forth transform >> series. But once it passed through the CleanPolyData filter, it STILL >> gave me the band-o'-crap down the side. I'm starting to reach the >> same conclusion that I had reached the last time I tried this -- >> namely, that merging the points just isn't worth the headache. ;-) >> >> Sean McInerney wrote: >> >>> Jared, >>> >>> You'll notice that the band of crap on your sphere is actually >>> your entire texture mirror mapped onto that single strip of polygons >>> ... not just from the center as I said previously ... unless that >>> strip is 1 pixel wide ;-) >>> >>> -Sean >>> >>> Sean McInerney wrote: >>> >>>> Hi Jared, >>>> >>>> Actually, I think that I do understand your problem. If you merge >>>> the non-polar points along the edges of the plane mapped to the >>>> sphere, what are the texture coordinates of those points? Get it? >>>> Before the merge, they're zero (0) on one side, one (1) on the >>>> other. After the merge, you are getting an interpolation between 0 >>>> and 1 / thetaRes - 1 (i.e. some crap from the center of your image >>>> being placed along that border). Furthermore, by using the >>>> offsetting that I suggest, as well as going back and forth with the >>>> transform, you'll avoid having a black hole at the north pole >>>> (you'll see what I mean). The bottom line is that, for you, the >>>> only points worth merging are probably the poles. Even then, you'll >>>> end up with texture artifact that won't show up with merging. >>>> >>>> So, this doesn't solve the *grand* merging debate, but it may >>>> solve yours ;-) >>>> >>>> -Sean >>>> >>>> Jared Cohen wrote: >>>> >>>>> Thanks, but I don't think you understand the problem. I can close >>>>> the gap just fine, but the two edges will overlap without being >>>>> merged together. It's when I merge them using a CleanPolyData >>>>> filter that I get the warping effect. >>>>> >>>>> >>>>> >>>>>> Hi Jared, >>>>>> >>>>>> I have some C++ code based on the spherical Tcl example that I >>>>>> think solves your problem. It avoids a singularity at the Z axis >>>>>> by offsetting the plane by a very small amount. I am attaching >>>>>> the source file 'spherical.cxx'. It takes any valid 2D >>>>>> vtkImageReader2 input and maps it to a sphere in the manner that >>>>>> you describe. >>>>>> >>>>>> The Cmake configuration stuff is as follows: >>>>>> >>>>>> ADD_EXECUTABLE (spherical spherical.cxx) >>>>>> TARGET_LINK_LIBRARIES (spherical vtkRendering vtkIO vtkGraphics) >>>>>> >>>>>> -Sean >>>>>> >>>> _______________________________________________ >>>> 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 >>>> >> >------------------------------------------------------------------------ > >import sys >from vtk import * > >deg2rad = 3.14159265359 / 180.0 >radius = 1.0 >th_min, th_max = 0.0, 360.0 * deg2rad >ph_min, ph_max = 0.0, 180.0 * deg2rad > >#create the plane >plane = vtkPlaneSource() >plane.SetOrigin(radius, ph_max - 0.000001, th_min) >plane.SetPoint1(radius, ph_max - 0.000001, th_max) >plane.SetPoint2(radius, ph_min + 0.000001, th_min) >plane.SetXResolution(36) >plane.SetYResolution(18) >plane.Update() > >#warp it into a sphere >transform = vtkSphericalTransform() >transform.Update() > >tpoly = vtkTransformPolyDataFilter() >tpoly.SetInput(plane.GetOutput()) >tpoly.SetTransform(transform) >tpoly.Update() > >#setup standard VTK pipeline >mapper = vtkPolyDataMapper() >mapper.SetInput(tpoly.GetOutput()) >mapper.ImmediateModeRenderingOn() >mapper.Update() > >actor = vtkActor() >actor.SetMapper(mapper) >actor.PickableOn() >actor.GetProperty().BackfaceCullingOn() > >reader = vtkPNMReader() >reader.SetFileName("../../wrap/earth.ppm") > >texture = vtkTexture() >texture.SetInput(reader.GetOutput()) >texture.InterpolateOn() > >actor.SetTexture(texture) > >ren = vtkRenderer() >ren.AddActor(actor) > >win = vtkRenderWindow() >win.AddRenderer(ren) >win.SetSize(500, 500) > >iren = vtkRenderWindowInteractor() >iren.SetRenderWindow(win) > >style = vtkInteractorStyleTrackballCamera() >iren.SetInteractorStyle(style) > >iren.Initialize() >win.Render() >iren.Start() > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alear at cns.montana.edu Thu Aug 19 15:43:57 2004 From: alear at cns.montana.edu (Alex Lear) Date: Thu, 19 Aug 2004 13:43:57 -0600 Subject: [vtkusers] Vector values from structured points set Message-ID: <002601c48624$e13a3750$f4b25a99@x300> I currently have a structured points set with scalar values at each of the points that I use for volume rendering. I need to calculate a vector at each point based on the scalar values so I can make a vtkHedgeHog. How can I create these vector values for each point automatically? Or is there another way to make the hedgehog from my stuctured point data? Thanks, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From tk.sinha at vanderbilt.edu Thu Aug 19 16:04:37 2004 From: tk.sinha at vanderbilt.edu (Tuhin Sinha) Date: Thu, 19 Aug 2004 15:04:37 -0500 Subject: [Fwd: Re: [vtkusers] GetVoidPointer() in Python...] Message-ID: <1092945877.10526.1.camel@localhost> I meant to reply to the list, but managed to reply only to Prabhu on this... my apologies... Prabhu, I looked into those classes and found that the key piece that is missing is that vtkDataArray doesn't allow you to specify the void pointer to the array you want to export to. This problem is trivial with vtkImageData when you have vtkImageExport provide you a method to set the output void pointer (i.e. via vtkImageExport::SetExportVoidPointer(void*) or vtkImageExport::Export(void*)). But I feel like this should also be a capability in vtkDataArray and not exclusive to vtkImageExport. Something like: void vtkXXXArray::ExportToVoidPointer(void * out_ptr) { if(out_ptr && this->Array) { memcpy(out_ptr, this->Array, this->Size*sizeof(this->Array[0])); } } In the meantime, I tried the following in Python: npts = poly_data.GetNumberOfPoints() n_array = Numeric.array((npts*3,Numeric.Float32) in_floatarray = poly_data.GetPoints().GetData() sizeof_float = 4 out_floatarray = vtkFloatArray() out_floatarray.SetVoidArray(n_array,npts*sizeof_float*3,1) out_floatarray.DeepCopy(in_floatarray) Only to have my plans foiled by the following lines in vtkFloatArray::DeepCopy(): this->SaveUserArray = 0; this->Array = new float[this->Size]; I guess for my thought process to work, one would have to hack all of the vtkXXXArray::DeepCopy as follows: if(this->SaveUserArray == 1 && this->Size > in->GetSize()) { memcpy(this->Array, (X*)in->GetVoidPointer(0), in->GetSize()*sizeof(this->Array[0])); } else { delete [] this->Array; this->SaveUserArray = 0; this->Size = in->GetSize() this->Array = new X[this->Size]; memcpy(this->Array, (X*)in->GetVoidPointer(0), this->Size*sizeof(this->Array[0])); } I think either of these would work as a general solution for getting any data array in VTK out to external data containers, but I don't know if this is something the maintainers want or maybe I'm missing some other critical piece of information. As it stands I can't see how to do what I want to do without a slooooow 'for' loop in Python. I guess I could pad my arrays and put them in into a vtkImageData object and pump them out using vtkImageExport... but that seems silly. If you or anyone has more pointers for me, please let me know. Thanks, Tuhin On Thu, 2004-08-19 at 13:28, Prabhu Ramachandran wrote: > >>>>> "TS" == Tuhin Sinha writes: > > TS> Hey all, > TS> What's the point of vtkDataArray::GetVoidPointer() in > TS> Python? How can > TS> I use the returned pointer address inside Python to get to the > TS> data. In a similar vein, why doesn't vtkDataArray have > TS> something like ExportToVoidPointer(void*). This would allow > TS> easy exporting of vtkDataArrays to Python. FYI, my end goal > TS> is to copy a substantial amount of data from a vtkFloatArray > TS> over to a python array without going through a for loop. Any > TS> help is appreciated. > > Look at Wrapping/Python/vtk/util/vtkImage{ImportFrom,ExportTo}Array.py > > cheers, > prabhu From peng-cheng at uiowa.edu Thu Aug 19 17:02:21 2004 From: peng-cheng at uiowa.edu (Patrick (Peng) Cheng) Date: Thu, 19 Aug 2004 15:02:21 -0600 Subject: [vtkusers] How can I get flashing effects of an actor Message-ID: --------------------------- Patrick (Peng) Cheng Biomedical Engineering University of Iowa Tel:(319) 400-7442 Email: peng-cheng at uiowa.edu From jeff at cdnorthamerica.com Thu Aug 19 16:20:11 2004 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Thu, 19 Aug 2004 16:20:11 -0400 Subject: [vtkusers] How can I get flashing effects of an actor In-Reply-To: References: Message-ID: <41250B7B.6050302@cdnorthamerica.com> blink your eyes really fast :), or use a timer that toggles the actor's visibility. -J Patrick (Peng) Cheng wrote: >--------------------------- >Patrick (Peng) Cheng >Biomedical Engineering >University of Iowa >Tel:(319) 400-7442 >Email: peng-cheng at uiowa.edu > > > > >_______________________________________________ >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 seanm at nmr.mgh.harvard.edu Thu Aug 19 16:11:45 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Thu, 19 Aug 2004 16:11:45 -0400 Subject: [vtkusers] How can I get flashing effects of an actor In-Reply-To: References: Message-ID: <41250981.3000707@nmr.mgh.harvard.edu> Go to a Hollywood premier? Follow Drew Barrymore during Mardi Gras? Seriously though, what do you mean? -Sean Patrick (Peng) Cheng wrote: > --------------------------- > Patrick (Peng) Cheng > Biomedical Engineering > University of Iowa > Tel:(319) 400-7442 > Email: peng-cheng at uiowa.edu > From peng-cheng at uiowa.edu Thu Aug 19 17:57:53 2004 From: peng-cheng at uiowa.edu (Patrick (Peng) Cheng) Date: Thu, 19 Aug 2004 15:57:53 -0600 Subject: [vtkusers] How can I get flashing effects of an actor Message-ID: em.. I have several identical actors in my scene. they have different IDs. and I have a choice box to choose the actor ID. so I was thinking about when I choose an ID, the corresponding actor will blink. So I will know which actor was selected. Yea, I was just wondering, It's not necessary, just want to make the gui more fancier. hehe :) --------------------------- Patrick (Peng) Cheng Biomedical Engineering University of Iowa Tel:(319) 400-7442 Email: peng-cheng at uiowa.edu ===========2004-08-19 14:11:45 You wrote in your letter:============== >Go to a Hollywood premier? >Follow Drew Barrymore during Mardi Gras? > >Seriously though, what do you mean? > >-Sean > >Patrick (Peng) Cheng wrote: >> --------------------------- >> Patrick (Peng) Cheng >> Biomedical Engineering >> University of Iowa >> Tel:(319) 400-7442 >> Email: peng-cheng at uiowa.edu >> >. ================================================================ From seanm at nmr.mgh.harvard.edu Thu Aug 19 16:56:27 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Thu, 19 Aug 2004 16:56:27 -0400 Subject: [vtkusers] How can I get flashing effects of an actor In-Reply-To: References: Message-ID: <412513FB.10608@nmr.mgh.harvard.edu> Hi Patrick, You could do something akin to Jeff's suggestion, but I think only his second idea will produce the desired effect. Otherwise, why not just use a bounding box outline like default picking does in VTK? You could even set a timer to make it disappear after a certain length of time or when you resume interaction with your scene via an Observer of the Renderer's StartEvent. -Sean Patrick (Peng) Cheng wrote: > em.. I have several identical actors in my scene. they have different IDs. > and I have a choice box to choose the actor ID. so I was thinking about when I choose an ID, the corresponding actor will blink. > So I will know which actor was selected. > Yea, I was just wondering, It's not necessary, just want to make the gui more fancier. > hehe :) > --------------------------- > Patrick (Peng) Cheng > Biomedical Engineering > University of Iowa > Tel:(319) 400-7442 > Email: peng-cheng at uiowa.edu > > ===========2004-08-19 14:11:45 You wrote in your letter:============== > > >>Go to a Hollywood premier? >>Follow Drew Barrymore during Mardi Gras? >> >>Seriously though, what do you mean? >> >>-Sean >> >>Patrick (Peng) Cheng wrote: >> >>>--------------------------- >>>Patrick (Peng) Cheng >>>Biomedical Engineering >>>University of Iowa >>>Tel:(319) 400-7442 >>>Email: peng-cheng at uiowa.edu >>> >> >>. > > ================================================================ > > > From ming at ca.wai.com Thu Aug 19 17:39:28 2004 From: ming at ca.wai.com (Ming Xie) Date: Thu, 19 Aug 2004 14:39:28 -0700 Subject: [vtkusers] Save vtk objects in OpenFlight format Message-ID: <91F6A3963C4CCC4A90082F715E0B82F1078AF8@camail.ca.wai.com> Hi, Is there a way to save a vtk model to an OpenFlight file? Thanks, Ming -------------- next part -------------- An HTML attachment was scrubbed... URL: From mattie_seier at hotmail.com Thu Aug 19 18:43:56 2004 From: mattie_seier at hotmail.com (Matthew Seier) Date: Thu, 19 Aug 2004 18:43:56 -0400 Subject: [vtkusers] ICP on Image? Message-ID: Hey All, I have implemented an Iterative Closest Point Transform on a 2 sets of PolyData (2 isosurfaces) but am having difficulty applying that same transform to a set of VTK ImageData. I would like to take the transform that is generated by the ICP, and apply it to a set of vtkImage Data. The documentation says TransformPolyDataFilter must be used, but I don't think that will work, as I want to apply the transform to ImageData. I having been experimenting with different ways, but I keep getting "Empty or Null Source" error messages from the ICP. Does anyone know how to apply an ICP transform to a set of Image Data? Thanks, Matt _________________________________________________________________ Don?t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ From diaoxianfen at asisz.com Thu Aug 19 23:23:03 2004 From: diaoxianfen at asisz.com (diaoxianfen) Date: Fri, 20 Aug 2004 11:23:03 +0800 Subject: [vtkusers] how to add message processing function Message-ID: <000801c48665$0139a370$9005a8c0@diaoxianfen> I can display three orthogonal slices referring to the example.Now I want to choose some region on the axis image by mouse moving and set their pixel value to zero.How can I achieve this?Is there some examples suiting to my request? -------------- next part -------------- An HTML attachment was scrubbed... URL: From rohan_vtk at yahoo.com Fri Aug 20 00:20:47 2004 From: rohan_vtk at yahoo.com (Rohan Naukudkar) Date: Thu, 19 Aug 2004 21:20:47 -0700 (PDT) Subject: [vtkusers] vtkAnalyzeReader needed for java Message-ID: <20040820042047.78577.qmail@web61302.mail.yahoo.com> hi all, I urgently need a vtkAnalyzereader() for java... My purpose is to read a file in an analyze file format... regards, Rohan --------------------------------- Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.mittelstaedt at tu-bs.de Fri Aug 20 01:04:11 2004 From: a.mittelstaedt at tu-bs.de (Arne Mittelstaedt) Date: Fri, 20 Aug 2004 07:04:11 +0200 Subject: [vtkusers] Performance comparison Message-ID: <004901c48673$2d0c5340$0200a8c0@PAUL> Hi, how big is the loss of performance, when comparing the performance of vtk with OpenGL directly? And how much does the performance get worse if the vtk-core are additionally being wrapped by a Java-Interpreter? Are there any benchmarks about this? Thank you in advance Arne Mittelstaedt From sscomp2004 at yahoo.com.au Fri Aug 20 01:10:44 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Fri, 20 Aug 2004 15:10:44 +1000 (EST) Subject: [vtkusers] multiple datasets in same file? Message-ID: <20040820051045.85877.qmail@web61101.mail.yahoo.com> Is it possible to have more than one set of data of the same type stored in the same vtk data file, or should they be stored in separate files? eg. two sets of scalars whos point sets might or might not intersect. (If it is not possible with the vtk data format, is it possible with any other that vtk supports? By the way can someone point me to a list of all the data formats that vtk supports I saw one somewhere but dont think it had formats such as netcdf which I'm sure are supported? also good reference on any of the common data formats such as netcdf would be appreciated) ok that's a bit to much to ask for in one post I think, but thanks to all who reply Tahwwhat --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sscomp2004 at yahoo.com.au Fri Aug 20 01:37:30 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Fri, 20 Aug 2004 15:37:30 +1000 (EST) Subject: [vtkusers] can a vtk data file contain only points and no data? Message-ID: <20040820053730.84958.qmail@web61102.mail.yahoo.com> can a vtk data file contain only points, and no data associated with those points? could I then make glyphs at those points? --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sscomp2004 at yahoo.com.au Fri Aug 20 01:46:02 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Fri, 20 Aug 2004 15:46:02 +1000 (EST) Subject: [vtkusers] can I have two sets of scalars for the one set of points? Message-ID: <20040820054602.40376.qmail@web61107.mail.yahoo.com> can I have two sets of scalars for the one set of points? (in case I can't visualize just a set of points I would do it by assigning the same scalar value to all of them but then in other instances I would want to visualize data associated with the points. It would be nice to be able to do both of these things with just the point coords and a scaler field if possible?) thanks Tahwwhat (sorry probably I should have thought longer about what I wanted to ask and just send one message rather than 3, hope this doesn't perturb anyone) --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sthapit at yahoo.com Fri Aug 20 03:31:11 2004 From: sthapit at yahoo.com (Akshay Sthapit) Date: Fri, 20 Aug 2004 00:31:11 -0700 (PDT) Subject: [vtkusers] animation loop and interaction In-Reply-To: <41237DD2.8090104@nmr.mgh.harvard.edu> Message-ID: <20040820073111.80215.qmail@web60006.mail.yahoo.com> Hi Sean I have no idea how to implement a repeating timer? callback. Can you give some more details, or point me towards some literature/examples? This would be extremely helpful. Thanks! Akshay --- Sean McInerney wrote: > If you use a repeating timout callback, you shouldn't need separate > threads. > > -Sean > > Akshay Sthapit wrote: > > Hi Alex > > > > What I have done is to add an observer to renderer - > > > > renderer->AddObserver(vtkCommand::StartEvent, myVtkCB); > > > > That way it keeps updating the scene (via a "callback") at a rate > which > > you can control, and all you have to do is manipulate ("interact") > the > > actors in another thread, and tadaa you got animation. > > > > Here's my vtkCB class - > > > > class vtkCB : public vtkCommand {//Callback to update at every > graphics > > loop > > public: > > static vtkCB *New() { > > return new vtkCB; > > } > > virtual void Execute(vtkObject *caller, unsigned long, void* > > callData) { > > graphicsInterface->refresh(); > > } > > void setup(GraphicsInterface *graphicsInterface) { > > this->graphicsInterface = graphicsInterface; > > } > > private: > > GraphicsInterface *graphicsInterface; > > }; > > > > Hope this helps. > > > > Akshay > > > > > > --- Alexandre Popelard wrote: > > > > > >>Hi, > >> > >>I have developed a little volume animation under c++ using a simple > >>loop. > >>I would now want to be able to interact with the volume during the > >>animation. But if I use vtkRenderWindowInteractor and start(), it > >>stops the > >>main animation loop. > >>If you have any ideas or examples on how to do that, please let me > >>know. > >> > >>Thanks, > >>Alex > >>_______________________________________________ > >>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 > >> > > > > > > > > __________________________________________________ > > 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: > > > Follow this link to subscribe/unsubscribe: > > http://www.vtk.org/mailman/listinfo/vtkusers > > > __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail From serhatguneyli at yahoo.com Fri Aug 20 05:09:16 2004 From: serhatguneyli at yahoo.com (Serhat Guneyli) Date: Fri, 20 Aug 2004 02:09:16 -0700 (PDT) Subject: [vtkusers] mirror image w.r.t. x axis Message-ID: <20040820090916.42353.qmail@web11905.mail.yahoo.com> Hi, I have a 2D data of type vtkImageData. Before visualizing it via vtkViewer, I want to rotate it and visualize the mirror image of it (w.r.t. x axis). How can I do it? Thanks in advance, Serhat __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail From seafloat11 at 163.com Fri Aug 20 05:10:39 2004 From: seafloat11 at 163.com (=?gb2312?B?SmF3Ymlu?=) Date: Fri, 20 Aug 2004 17:10:39 +0800 (CST) Subject: [vtkusers] help Message-ID: <4125C00F.000072.06196@m138.163.com> Dear all: How to use the gradient opacity in volume rendering with vtk, Can anyone help me. Please give me some advice or examples. Thank you very much. My email : seafloat11 at 163.com ------------------------------------------------------------------------------------- ?????????,????? http://smspop.163.com/personal/wang/17/index.htm From lflong at doc.ic.ac.uk Fri Aug 20 06:59:02 2004 From: lflong at doc.ic.ac.uk (Longfei Cong) Date: Fri, 20 Aug 2004 11:59:02 +0100 Subject: [vtkusers] visual a surface with vectors Message-ID: <000e01c486a4$b4516c10$9c05a992@win.doc.ic.ac.uk> Hi : I am a little confused totay. i just try to visual a surface with vectors. Is that vtkGlyph3D should be used here? I compile one of its example Examples/GUI/Motif/Example2.cxx. But there are error as below. Compiling... Example2.cxx C:\vtk\VTK\Rendering\vtkXOpenGLRenderWindow.h(29) : fatal error C1083: Cannot open include file: 'X11/Xlib.h': No such file or directory Error executing cl.exe. ALL_BUILD - 1 error(s), 0 warning(s) Wish for help! LF. Long -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajh02 at doc.ic.ac.uk Fri Aug 20 10:00:05 2004 From: ajh02 at doc.ic.ac.uk (Andrew John Huff) Date: Fri, 20 Aug 2004 15:00:05 +0100 (BST) Subject: [vtkusers] vtkMultiProcessController usable from python? Message-ID: Hi, Does anyone know if I can use vtkMultiProcessController from python, and if so, how? http://public.kitware.com/pipermail/vtkusers/2000-July/053422.html says it isn't wrapped for python, but refers to an old version of vtk. Thanks, Andrew From jarv0075 at umn.edu Fri Aug 20 10:19:46 2004 From: jarv0075 at umn.edu (jarv0075) Date: Fri, 20 Aug 2004 09:19:46 CDT Subject: [vtkusers] can a vtk data file contain only points and no data? Message-ID: <200408201419.i7KEJk77013917@fantasy.software.umn.edu> You bet you can. Just use the standard file format but omit the POLYDATA On 20 Aug 2004, =?iso-8859-1?q?s=20comp?= wrote: > --0-796156328-1092980250=:83996 > Content-Type: text/plain; charset=iso-8859-1 > Content-Transfer-Encoding: 8bit > > can a vtk data file contain only points, and no data associated with those > points? > > could I then make glyphs at those points? > > > > --------------------------------- > Find local movie times and trailers on Yahoo! Movies. > > --0-796156328-1092980250=:83996 > Content-Type: text/html; charset=iso-8859-1 > Content-Transfer-Encoding: 8bit > >
can a vtk data file contain only points, and no data associated with > those points?
>
>
could I then make glyphs at those points?



> Find local movie times and trailers on href="http://au.rd.yahoo.com/mail/tagline/*http://au.movies.yahoo.com" > target=_blank>Yahoo! Movies.
> --0-796156328-1092980250=:83996-- > --------------------------------------- Timothy R. Jarvis --------------------------------------- Graduate Research Assistant International Neuroimaging Consortium VA Medical Center 612-467-2619 http://www.neurovia.umn.edu --------------------------------------- From pallavi.joshi at vanderbilt.edu Fri Aug 20 13:24:25 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Fri, 20 Aug 2004 12:24:25 -0500 Subject: [vtkusers] PCA in VTK Message-ID: <000c01c486da$8ae2ac00$da593b81@Pallavi> Hi All, Does VTK have any functions that carry PCA ? I want to apply PCA to the mesh points. Any help wud be greatly appreciated......... Thanks, Palllavi -------------- next part -------------- An HTML attachment was scrubbed... URL: From lucas at cvrti.utah.edu Fri Aug 20 13:26:03 2004 From: lucas at cvrti.utah.edu (Lucas Lorenzo) Date: Fri, 20 Aug 2004 11:26:03 -0600 Subject: [vtkusers] problem rendering Message-ID: <030B6A79-F2CE-11D8-AD62-0003930AB93E@cvrti.utah.edu> Hi all, I'm trying to run this simple code (I'm pasting only the important parts): . . . // Create the RenderWindow, Renderer and both Actors vtkRenderer *ren1 = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren1); // Add the actors to the renderer, set the background and size ren1->AddActor(imActor); renWin->SetSize(640,640); // render the image vtkCamera *cam1 = ren1->GetActiveCamera(); cam1->Zoom(2.5); renWin->Render(); // deallocate memory: image_reader->Delete(); lut->Delete(); get_slice->Delete(); im_mapper->Delete(); imActor->Delete(); ren1->Delete(); renWin->Delete(); return 0; } The problem I have is that the window pops up, shows the image I want to render but then immediately it closes. What am I missing so that the renderer window doesn't close ? Thanks, Lucas Lucas Lorenzo University of Utah Nora Eccles Harrison CardioVascular Research and Training Institute Fellows Room 95 South 2000 East Salt Lake City, UT 84112-5000 e-mail: lucas at cvrti.utah.edu telephone: 801-587-9536 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1235 bytes Desc: not available URL: From jdhunter at ace.bsd.uchicago.edu Fri Aug 20 13:05:22 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Fri, 20 Aug 2004 12:05:22 -0500 Subject: [vtkusers] ANN: postdoctoral position / EEG software with VTK Message-ID: Hi, I'm on the faculty in the Section of Pediatric Neurology and have spent the last two years developing an application for the analysis of intracranial EEG registered with the subdural electrode positions which makes heavy use of VTK. There are two integrated applications for the analysis of our data: - Loc3D Jr is an application for localizing electrodes from CT data http://nitace.bsd.uchicago.edu:8080/files/eegtools/Screenshot-Loc3djr.py-1.png - eegview is a program with a network data server for interacting with and analyzing EEG data and mapping it onto the spatial locations determined from Loc3D Jr. http://nitace.bsd.uchicago.edu:8080/files/eegtools/eeg_large.png http://nitace.bsd.uchicago.edu:8080/files/eegtools/planes_with_grids_app_window.png One nifty feature of the program is the ability to make spatial-temporal movies of EEG using VTK - http://nitace.bsd.uchicago.edu:8080/files/eegtools/coherence.mpg The programs are written in python using pygtk, VTK, Numeric python, scipy, and a 2D plotting library matplotlib for high quality 2D plotting with a matlab syntax in python: http://matplotlib.sourceforge.net. We would like to continue developing and utilizing these two programs, as well as release them to the open source community. However, matplotlib, the only component that has been released to date, has proven to be a popular project, and developing and supporting it is quite time consuming. Thus I have hesitated to release these other projects because I alone cannot support them, develop them and do research. We have, however, secured funding for a two year postdoctoral position here for a candidate who would be interested in continuing the development of this package, integrating it with existing tools, releasing this to the open source community, and most importantly, using the end result for original research in EEG and medical image analysis. Our research interests include, but aren't limited to, seizure localization using coherence analysis, nonlinear methods for seizure detection and prediction, large scale, distributed modeling of neuronal populations, and neural stimulators for epilepsy, Parkinson's and MS. The data we have access to is excellent: for example, our EEG monitoring unit produces about 100GB of data a week of chronically implanted, 128 channel EEG registered with MPEG for patient monitoring, as well as high resolution CT and MRI data. In addition, we perform electrophysiological recording, pathology and calcium imaging of excised tissue following epilepsy surgery. To that end, I'm posting the formal job announcement here. A two-year post-doctoral position is available to study the electrophysiological aspects of human epileptic seizures. The successful candidate will have an M.D. or Ph.D. with additional expertise or aptitude to develop software for the analysis of invasive subdural recordings from epilepsy patients. Research questions address prediction of the location and timing of seizures, the effects of medication withdrawal and seizures on cortical organization, and the biological substrates of language. The candidate would be expected to obtain subsequent support through submission of federal grants. Experience with time series analysis, spectral analysis, and open source software tools and development required. Other experience that would be especially favored: medical image data segmentation and registration, integration of electrophysiological data with imaging data, python, GTK and VTK. The appointment will be with the Dept of Surgery at The University of Chicago, which is an equal opportunity employer. Applications should be sent electronically to John D. Hunter, Ph.D with a cover letter and CV in plain text or PDF format, or by mail to John Hunter, Ph.D Pediatric Neurology MC 3055 The University of Chicago 5839 S Maryland Ave Chicago, IL 60615 Thanks! John Hunter From emiliano at veccsa.com Fri Aug 20 15:19:54 2004 From: emiliano at veccsa.com (Emiliano Beronich) Date: Fri, 20 Aug 2004 16:19:54 -0300 Subject: [vtkusers] problem rendering In-Reply-To: <030B6A79-F2CE-11D8-AD62-0003930AB93E@cvrti.utah.edu> References: <030B6A79-F2CE-11D8-AD62-0003930AB93E@cvrti.utah.edu> Message-ID: <41264EDA.1010201@veccsa.com> Hi Lucas! The problem seems to be related with the destroying of the vtkRenderWindow. You are creating and destroying the renderwindow (and its resources) inside the brackets so that's why the window dissapears at line renWin->Delete(); You can check this looking at the reference count of renWin. If you want to extend the life of the window, you have to delay the destruction of renWin. HTH Emiliano Lucas Lorenzo wrote: > Hi all, > > I'm trying to run this simple code (I'm pasting only the important parts): > > > . > . > . > > / // Create the RenderWindow, Renderer and both Actors > vtkRenderer *ren1 = vtkRenderer::New(); > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->AddRenderer(ren1); > > // Add the actors to the renderer, set the background and size > ren1->AddActor(imActor); > renWin->SetSize(640,640); > > // render the image > vtkCamera *cam1 = ren1->GetActiveCamera(); > cam1->Zoom(2.5); > renWin->Render(); > > // deallocate memory: > image_reader->Delete(); > lut->Delete(); > get_slice->Delete(); > im_mapper->Delete(); > imActor->Delete(); > ren1->Delete(); > renWin->Delete(); > > return 0; > } > / > The problem I have is that the window pops up, shows the image I want to > render but then immediately it closes. > What am I missing so that the renderer window doesn't close ? > Thanks, > > Lucas > > > Lucas Lorenzo > > University of Utah > Nora Eccles Harrison CardioVascular Research and Training Institute > Fellows Room > 95 South 2000 East > Salt Lake City, UT 84112-5000 > > e-mail: lucas at cvrti.utah.edu > telephone: 801-587-9536 > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 Aug 20 15:31:12 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Fri, 20 Aug 2004 15:31:12 -0400 Subject: [vtkusers] segfault Delete()ing vtkInterpolateDataSetAttributes In-Reply-To: <200408191923.i7JJNtgd027556@apollo.sr.unh.edu> References: <200408191923.i7JJNtgd027556@apollo.sr.unh.edu> Message-ID: <41265180.6090009@kitware.com> Tom, Do you have a simple script to reproduce the bug ? If so then yes open a bug and add your example. BTW, bug #189 is closed. Thanks Mathieu tom fogal wrote: > I believe I am closer to tracking this down. Below is a gdb backtrace > where gdb gives an interesting message: > > warning: can't find linker symbol for virtual table for `vtkDataObject' > value > > Also I believe this may be (very vaguely) related to bug 189, > > http://www.itk.org/Bug/bug.php?op=vote&bugid=189 > > due to the fact that they both crash in the same part of libc. > >>From what I gather through extensive googling, main_arena is apparently > some type of flag telling glibc where a particular section of memory > was malloc()d -- certain applications implement their own malloc() and > that is not considered part of the 'main_arena', for example. > > Perhaps a linking error is causing > vtkDataObject::GetNetReferenceCount() to not be found in this context? > This is a little beyond my current C/C++ debugging knowledge. > > Any ideas would be GREATLY appreciated. > Also, should I perhaps submit this as a bug or should we continue to > blame glibc until more information is known? > > -tom > > ---- gdb trace ---- > tfogal at thetis ggcm_anim $ gdb ggcm_animator > GNU gdb 6.1 > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and > you are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. > This GDB was configured as "x86_64-suse-linux"...Using host > libthread_db library "/lib64/tls/libthread_db.so.1". > > (gdb) run --config jxr.cfg > Starting program: /home/tfogal/ggcm/ggcm_anim/ggcm_animator --config > jxr.cfg > [Thread debugging using libthread_db enabled] > [New Thread 182953122592 (LWP 31484)] > rendering [4] streamlines > rendering... 0% complete > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 182953122592 (LWP 31484)] > 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 > (gdb) bt > #0 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 > #1 0x0000002a958285b2 in vtkSource::UnRegister (this=0x52c980, o=0x0) > at /home/tfogal/tarballs/VTK/Common/vtkSource.cxx:740 > #2 0x0000002a957d704f in vtkObjectBase::Delete (this=0x52c980) at > /home/tfogal/tarballs/VTK/Common/vtkObjectBase.cxx:86 > #3 0x000000000040bebc in ~GGCMInterpolateDataSet (this=0x52c960) at > GGCMInterpolateDataSet.cc:39 > #4 0x000000000040aa8d in GGCMAnimator::Interpolate (this=0x7fbfffef70, > time=0.02) at GGCMAnimator.cc:207 > #5 0x000000000040a404 in GGCMAnimator::Run (this=0x7fbfffef70) at > GGCMAnimator.cc:132 > #6 0x000000000040ed59 in main (argc=3, argv=0x7fbffff368) at > main.cc:58 > (gdb) up > #1 0x0000002a958285b2 in vtkSource::UnRegister (this=0x52c980, o=0x0) > at /home/tfogal/tarballs/VTK/Common/vtkSource.cxx:740 > 740 if (this->Outputs[idx]->GetNetReferenceCount() != 1) > (gdb) list > 735 { > 736 if (this->Outputs[idx] == o) > 737 { > 738 done = 0; > 739 } > 740 if (this->Outputs[idx]->GetNetReferenceCount() != 1) > 741 { > 742 done = 0; > 743 } > 744 } > (gdb) print this > $1 = (vtkSource * const) 0x52c980 > (gdb) print idx > $2 = 0 > (gdb) print this->Outputs[0] > $3 = (class vtkDataObject *) 0x5b380d0 > (gdb) print this->Outputs[0]->GetNetReferenceCount() > warning: can't find linker symbol for virtual table for `vtkDataObject' > value > > Program received signal SIGSEGV, Segmentation fault. > 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 > The program being debugged was signaled while in a function called from > GDB. > GDB remains in the frame where the signal was received. > To change this behavior use "set unwindonsignal on" > Evaluation of the expression containing the function (main_arena) will > be abandoned. > > ------- Forwarded Message > Subject: [vtkusers] segfault Delete()ing vtkInterpolateDataSetAttributes > > I'm getting a weird segfault in libc when I try to delete an object of > this type: > > (gdb) run --config jxr.cfg > Starting program: /home/tfogal/ggcm/ggcm_anim/ggcm_animator --config > jxr.cfg > [Thread debugging using libthread_db enabled] > [New Thread 182953122592 (LWP 17616)] > rendering [4] streamlines > rendering... 0% complete > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 182953122592 (LWP 17616)] > 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 > (gdb) bt > #0 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6 > #1 0x0000002a958285b2 in vtkSource::UnRegister (this=0x52c980, o=0x0) > at /home/tfogal/tarballs/VTK/Common/vtkSource.cxx:740 > #2 0x0000002a957d704f in vtkObjectBase::Delete (this=0x52c980) > at /home/tfogal/tarballs/VTK/Common/vtkObjectBase.cxx:86 > #3 0x000000000040bebc in ~GGCMInterpolateDataSet (this=0x52c960) > at GGCMInterpolateDataSet.cc:39 > #4 0x000000000040aa8d in GGCMAnimator::Interpolate (this=0x7fbfffef70, > time=0.02) at GGCMAnimator.cc:207 > #5 0x000000000040a404 in GGCMAnimator::Run (this=0x7fbfffef70) > at GGCMAnimator.cc:132 > #6 0x000000000040ed15 in main (argc=3, argv=0x7fbffff368) at > main.cc:58 > > The line in vtkSource::UnRegister is 740, or > > if (this->Outputs[idx]->GetNetReferenceCount() != 1) > > The 'o' is a NULL pointer, but I should think this is expected. In > vtkObjectBase::Delete there is the single line: > > this->UnRegister((vtkObjectBase *)NULL); > > Should the NULL be a 'this' pointer? I don't understand how the above > code would work for any object, but I have been using this version of > vtk (4.2) for a while now. > > The stranger thing is that this is a rewrite of a poorly written > program which performs the same task, and that app works (well...) > fine. > > Any ideas? I'm lost... > > - -tom > _______________________________________________ > 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 > > ------- End of Forwarded Message > > _______________________________________________ > 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 lucas at cvrti.utah.edu Fri Aug 20 17:00:51 2004 From: lucas at cvrti.utah.edu (Lucas Lorenzo) Date: Fri, 20 Aug 2004 15:00:51 -0600 Subject: [vtkusers] vtk + fltk (fluid) Message-ID: <04F8C49F-F2EC-11D8-AD62-0003930AB93E@cvrti.utah.edu> Hi all, could someone point me out where to find examples and/or tutorials one how to combine vtk with fltk (and particualrly using fluid) ? Thanks, Lucas Lucas Lorenzo University of Utah Nora Eccles Harrison CardioVascular Research and Training Institute Fellows Room 95 South 2000 East Salt Lake City, UT 84112-5000 e-mail: lucas at cvrti.utah.edu telephone: 801-587-9536 From pro_thinker at yahoo.com Fri Aug 20 19:00:56 2004 From: pro_thinker at yahoo.com (Vijay) Date: Fri, 20 Aug 2004 16:00:56 -0700 (PDT) Subject: [vtkusers] boolean primitives Message-ID: <20040820230056.54555.qmail@web40809.mail.yahoo.com> Hi, I am new to vtk. Can boolean operations on primitives which is CSG (constructive solid geometry) be done in vtk ? Is that possible using implicit boolean functions? Thanks, Venkat From seanm at nmr.mgh.harvard.edu Fri Aug 20 19:48:36 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Fri, 20 Aug 2004 19:48:36 -0400 Subject: [vtkusers] animation loop and interaction In-Reply-To: <20040820073111.80215.qmail@web60006.mail.yahoo.com> References: <20040820073111.80215.qmail@web60006.mail.yahoo.com> Message-ID: <41268DD4.3030405@nmr.mgh.harvard.edu> Hi Akshay, I don't know if you are familiar with FLTK, but I created a small library, vtkFLTK, for integrating VTK and FLTK. Within the vtkFLTK examples is an example called 'Cone4' that demonstrates a repeating timer callback. Even if you don't use vtkFLTK, the source code may help to illustrate the idea. The ViewCVS link is here: Basically, you have a callback function that updates your animation. You set a timer to call that function when it expires. The repeating part is that before the timer callback function returns, it sets a new timer to call itself ... and so on. Timers are generally platform dependent, but are implemented by most GUI toolkits. -Sean Akshay Sthapit wrote: > Hi Sean > > I have no idea how to implement a repeating timer? callback. Can you > give some more details, or point me towards some literature/examples? > This would be extremely helpful. > > Thanks! > Akshay > > --- Sean McInerney wrote: > > >>If you use a repeating timout callback, you shouldn't need separate >>threads. >> >>-Sean >> >>Akshay Sthapit wrote: >> >>>Hi Alex >>> >>>What I have done is to add an observer to renderer - >>> >>>renderer->AddObserver(vtkCommand::StartEvent, myVtkCB); >>> >>>That way it keeps updating the scene (via a "callback") at a rate >> >>which >> >>>you can control, and all you have to do is manipulate ("interact") >> >>the >> >>>actors in another thread, and tadaa you got animation. >>> >>>Here's my vtkCB class - >>> >>>class vtkCB : public vtkCommand {//Callback to update at every >> >>graphics >> >>>loop >>> public: >>> static vtkCB *New() { >>> return new vtkCB; >>> } >>> virtual void Execute(vtkObject *caller, unsigned long, void* >>>callData) { >>> graphicsInterface->refresh(); >>> } >>> void setup(GraphicsInterface *graphicsInterface) { >>> this->graphicsInterface = graphicsInterface; >>> } >>> private: >>> GraphicsInterface *graphicsInterface; >>>}; >>> >>>Hope this helps. >>> >>>Akshay >>> >>> >>>--- Alexandre Popelard wrote: >>> >>> >>> >>>>Hi, >>>> >>>>I have developed a little volume animation under c++ using a simple >>>>loop. >>>>I would now want to be able to interact with the volume during the >>>>animation. But if I use vtkRenderWindowInteractor and start(), it >>>>stops the >>>>main animation loop. >>>>If you have any ideas or examples on how to do that, please let me >>>>know. >>>> >>>>Thanks, >>>>Alex >>>>_______________________________________________ >>>>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 >>>> >>> >>> >>> >>>__________________________________________________ >>>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: >> >> >> >>>Follow this link to subscribe/unsubscribe: >>>http://www.vtk.org/mailman/listinfo/vtkusers >>> >> From seanm at nmr.mgh.harvard.edu Fri Aug 20 19:51:05 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Fri, 20 Aug 2004 19:51:05 -0400 Subject: [vtkusers] mirror image w.r.t. x axis In-Reply-To: <20040820090916.42353.qmail@web11905.mail.yahoo.com> References: <20040820090916.42353.qmail@web11905.mail.yahoo.com> Message-ID: <41268E69.4020106@nmr.mgh.harvard.edu> Hi Serhat, Just apply a zoom factor of -1 to whatever image you wish to flip. -Sean Serhat Guneyli wrote: > Hi, > > I have a 2D data of type vtkImageData. Before > visualizing it via vtkViewer, I want to rotate it and > visualize the mirror image of it (w.r.t. x axis). How > can I do it? > > Thanks in advance, > > Serhat > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > http://promotions.yahoo.com/new_mail > _______________________________________________ > 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 seanm at nmr.mgh.harvard.edu Fri Aug 20 19:57:17 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Fri, 20 Aug 2004 19:57:17 -0400 Subject: [vtkusers] vtk + fltk (fluid) In-Reply-To: <04F8C49F-F2EC-11D8-AD62-0003930AB93E@cvrti.utah.edu> References: <04F8C49F-F2EC-11D8-AD62-0003930AB93E@cvrti.utah.edu> Message-ID: <41268FDD.4050502@nmr.mgh.harvard.edu> Hi Lucas, vtkFLTK has many examples that combine VTK and FLTK using fluid to build the interface. Unfortunately, no tutorial yet :-/ -Sean Lucas Lorenzo wrote: > Hi all, > > could someone point me out where to find examples and/or tutorials one > how to combine vtk with fltk (and particualrly using fluid) ? > Thanks, > > Lucas > > > Lucas Lorenzo > > University of Utah > Nora Eccles Harrison CardioVascular Research and Training Institute > Fellows Room > 95 South 2000 East > Salt Lake City, UT 84112-5000 > > e-mail: lucas at cvrti.utah.edu > telephone: 801-587-9536 > From jimandr at hotmail.com Sat Aug 21 18:16:53 2004 From: jimandr at hotmail.com (Dimitrios Andritsos) Date: Sun, 22 Aug 2004 01:16:53 +0300 Subject: [vtkusers] Problems with picking and text annotation in vtk4.2 Message-ID: Hello All, I am writing to report a problem that I have when picking actors from a scene. I built vtk 4.2 today and rebuilt an application that I had designed with vtk 4.0. I am working in windows and I am using MSVC 6. Once my geometry has been rendered to the screen, I have a render window that contains multiple actors. The program is designed in such a way, so that when an actor is picked, it is highlighted by using a bounding box, it is made semi-transparent and some data related to it are displayed at the point where the pick has been made by using a vtkTextActor. This worked fine with vtk 4.0 but the not with 4.2. All actors in the render window appear at an incorrect depth order and a confusing image appears. Actors that are supposed to be in the back, covered by other actors, come in the front with the actor that has been picked coming completely in the front (although it should not). After I click on the screen again everything comes back to normal as the actor is deselected. Text display and actor transparency work correctly though, as they should. Has anyone ever had such a problem in the past? Is there a fix to that? Thanks in advance for any help provided. Dimitris -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhou_huiqun at hotmail.com Sat Aug 21 22:29:06 2004 From: zhou_huiqun at hotmail.com (Huiqun Zhou) Date: Sun, 22 Aug 2004 10:29:06 +0800 Subject: [vtkusers] visual a surface with vectors References: <000e01c486a4$b4516c10$9c05a992@win.doc.ic.ac.uk> Message-ID: There are other examples about vtkGlyph3D in Examples folder you can look at, but what you are trying is absolutely wrong one. It seems that you are using MS Windows while Motif works only under Unix or Linux. At least, Open Motif and Lesstif have no MS Windows version. ========================== Dr. Huiqun Zhou Nanjing University 22 Hankou Road, Gulou Nanjing, 210093 China e-mail: hqzhou at nju.edu.cn Tel.: 86(25)8359-4664 =========================== ----- Original Message ----- From: Longfei Cong To: vtkusers at vtk.org Sent: Friday, August 20, 2004 6:59 PM Subject: [vtkusers] visual a surface with vectors Hi : I am a little confused totay. i just try to visual a surface with vectors. Is that vtkGlyph3D should be used here? I compile one of its example Examples/GUI/Motif/Example2.cxx. But there are error as below. Compiling... Example2.cxx C:\vtk\VTK\Rendering\vtkXOpenGLRenderWindow.h(29) : fatal error C1083: Cannot open include file: 'X11/Xlib.h': No such file or directory Error executing cl.exe. ALL_BUILD - 1 error(s), 0 warning(s) Wish for help! LF. Long ------------------------------------------------------------------------------ _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From glennpierce at connectfree.co.uk Sun Aug 22 09:37:43 2004 From: glennpierce at connectfree.co.uk (Glenn Pierce) Date: Sun, 22 Aug 2004 14:37:43 +0100 Subject: [vtkusers] ColorLevel Operation? Message-ID: <1093181863.12085.10.camel@serenity> Hi I am having trouble understanding the ColorWindow and ColorLevel properties of mappers. I have read lecture 5 on vtk located at http://noodle.med.yale.edu/~papad/seminar/lecture5.ppt and that shows the graph of input intensity against output intensity. This also show the how the values of color level and colorwindow fit into the picture. However, I have a program where I can change the ColorLevel and ColorWindow interactively. When I lower the color level the image becomes brighter? >From looking at the graph in lecture 5, shouldn't lowering the colour level reduce the output intensity and so make the image darker ? I have attached two images that show this. If this is not how the colour window and level work is there somewhere that describes these two functions in detail ? Thanks very much for the help. Glenn -------------- next part -------------- A non-text attachment was scrubbed... Name: color_level1.jpg Type: image/jpeg Size: 33565 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: color_level2.jpg Type: image/jpeg Size: 39772 bytes Desc: not available URL: From David.Pont at ForestResearch.co.nz Sun Aug 22 16:53:28 2004 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Mon, 23 Aug 2004 08:53:28 +1200 Subject: [vtkusers] boolean primitives In-Reply-To: <20040820230056.54555.qmail@web40809.mail.yahoo.com> Message-ID: Venkat, take a look at descendants of vtkImplicitFunction for primitives, vtkImplicitBoolean for CSG operations, http://www.vtk.org/doc/release/4.0/html/classvtkImplicitBoolean.html has examples. Dave P Vijay wrote on 21/08/2004 11:00:56: > Hi, > I am new to vtk. Can boolean operations on primitives > which is CSG (constructive solid geometry) be done in > vtk ? Is that possible using implicit boolean > functions? > Thanks, > Venkat > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: kitware.com/cgi-bin/vtkfaq> > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From Jonathan.Bailleul at greyc.ismra.fr Sun Aug 22 17:11:40 2004 From: Jonathan.Bailleul at greyc.ismra.fr (Jonathan Bailleul) Date: Sun, 22 Aug 2004 23:11:40 +0200 Subject: [vtkusers] PCA in VTK References: <000c01c486da$8ae2ac00$da593b81@Pallavi> Message-ID: <41290C0C.D2D95949@greyc.ismra.fr> #include "vtkPCAAnalysisFilter.h" It is simple to use and features many things you might need... It takes in input polydatas and can generate shape instances with coefficients you provide, or estimate coefficients of an unknown polydata. (of course, polydata designate landmarked data). Here is old code playing around with it (not reference code ok?), just showing how to use some features... So, you managed to implement the Frangi method, didn't you? ;) #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkPolyData.h" #include "vtkPoints.h" #include "vtkCellArray.h" #include "vtkFloatArray.h" #include "vtkPolyDataMapper.h" #include "vtkActor.h" #include "vtkCamera.h" #include "vtkPolyDataNormals.h" #include "vtkPCAAnalysisFilter.h" #include "vtkProcrustesAlignmentFilter.h" #include "vtkPolyDataReader.h" #include "vtkPolyDataWriter.h" #include "vtkLandmarkTransform.h" #include "vtkPointSetToPointSetFilter.h" #include "vtkDataSetWriter.h" #include /* GLOS (Graphic Library in Open Source), an ANSI Common Lisp OpenGL subset. Copyright (C) 2001 the GLOS development team (http://glos.sourceforge.net) */ static void usage(int argc, char **argv) { if (argc - 1 <= 2) { printf("Displays PCA mode of given already procrustes-aligned vtk files\n"); printf("Usage: %s \n", argv[0]); printf("\ncreate shape files deviated from mean shape along selected mode. Instances number: e.g 1 means instances for phi = {-3.0, 0, -3.0}\n"); exit(1); } } /* mode: index of mode from 0*/ void CreateShapeInstance(vtkPCAAnalysisFilter *pca_filter, char* filename, int mode, float variance_fact, vtkPointSet *shape_container) { vtkFloatArray *params = vtkFloatArray::New(); params -> SetNumberOfComponents(1); // 1 per tuple params -> SetNumberOfTuples(1 + mode); // 1 instance // float val[1]; val[0] = variance_fact; params -> SetTuple(0, val); for (int i = 0; i < mode; i++) {params -> SetTuple1(i, 0.0);} params -> SetTuple1(mode, variance_fact); pca_filter -> GetParameterisedShape(params, shape_container); vtkDataSetWriter *writer = vtkDataSetWriter::New(); writer -> SetFileName(filename); writer -> SetInput(shape_container); writer -> Update(); } int main( int argc, char *argv[] ) { usage(argc, argv); char* filename_in; char* filename_out; int i; int inputs = argc - 3; int mode_number = atoi(argv[1]); int mode_instances = atoi(argv[2]); // shape instances in range ]0; +-3] // ---------------------------------------------------------------------- /* STEP 1: PCA computation */ // ---------------------------------------------------------------------- // allocate one reader per file since input pca filter source // are read in parallel when filter is executed vtkPolyDataReader **readers; assert(readers = (vtkPolyDataReader**)calloc(inputs, sizeof(vtkPolyDataReader*))); for (i = 0; i < inputs; i++) readers[i] = vtkPolyDataReader::New(); vtkPCAAnalysisFilter *pca = vtkPCAAnalysisFilter::New(); pca -> SetNumberOfInputs(inputs); cout << "Inputfiles: " << inputs << endl; // assign pca inputs with landmark file readers for (i = 0; i < inputs; i++) { filename_in = argv[i + 3]; cout << "infile: " << filename_in << endl; readers[i] -> SetFileName(filename_in); readers[i] -> Update(); pca -> SetInput(i, readers[i] -> GetOutput()); } // execute pca pca -> Update(); pca -> PrintSelf(cout, 0); // ---------------------------------------------------------------------- /* STEP 2 */ // ---------------------------------------------------------------------- // eigenmodes display cout << endl << "eigenvalues:"; inputs = pca -> GetEvals() -> GetNumberOfTuples(); for (i = 0; i < inputs; i++) cout << " " << pca -> GetEvals() -> GetValue(i); cout << endl; float fact_delta = 3.0 / mode_instances; float fact; char* outfile; assert(outfile = (char *) calloc (150, sizeof(char))); sprintf(outfile, "./file_out_meanshape.vtk");//, mode_number, 0.0); CreateShapeInstance(pca, outfile, mode_number, 0.0, readers[0] -> GetOutput()); for (i = 0, fact = fact_delta; i < mode_instances; i++, fact += fact_delta) { sprintf(outfile, "./file_out_mode_%d_varpos_%d.vtk", mode_number, i); CreateShapeInstance(pca, outfile, mode_number, fact, readers[0] -> GetOutput()); } for (i = 0, fact = -fact_delta; i < mode_instances; i++, fact -= fact_delta) { sprintf(outfile, "./file_out_mode_%d_varneg_%d.vtk", mode_number, i); CreateShapeInstance(pca, outfile, mode_number, fact, readers[0] -> GetOutput()); } cout << endl; return 0; } -- ----------------------------------- Jonathan BAILLEUL, Doctorant GREYC Image - Universit? de Caen http://www.greyc.ismra.fr/~bailleul From alletto at dei.unipd.it Sun Aug 22 17:24:49 2004 From: alletto at dei.unipd.it (alletto at dei.unipd.it) Date: Sun, 22 Aug 2004 23:24:49 +0200 Subject: [vtkusers] (no subject) Message-ID: <1093209889.41290f21de53b@mail.dei.unipd.it> Hi vtk users, here is my problem: I've written my application using MsVc++ and it works fine in Windows, but now I have to make it work in Linux. I'm new on Linux and I've just installed Fedora2. I can't install CMake. Can you please help me, or suggest any helpful website? Thanks in advance Bye Michele Alletto University of Padua ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From dhbernstein at earthlink.net Sun Aug 22 17:56:05 2004 From: dhbernstein at earthlink.net (David Bernstein) Date: Sun, 22 Aug 2004 14:56:05 -0700 Subject: [vtkusers] multiple xy plots? Message-ID: <10D4B732-F486-11D8-82B3-000A95BAA698@earthlink.net> Hi All, Can someone post a simple C++ example showing how to get two or more sets of data plotted in the same X-Y plot? I'm importing the data in the form of stl vectors. Thanks, Dave Bernstein From camilo.jimenez at spymac.com Sun Aug 22 15:59:12 2004 From: camilo.jimenez at spymac.com (camilo.jimenez at spymac.com) Date: Sun, 22 Aug 2004 11:59:12 -0800 Subject: [vtkusers] unusual SetInput() and GetOutput() methods Message-ID: <200408221159.12061.camilo.jimenez@spymac.com> Hi everybody I've been trying to translate the expCos.tcl example to Cxx, but I got errs in this part: TCL> vtkTransformPolyDataFilter transF transF SetInput [plane GetOutput] transF SetTransform transform vtkProgrammableFilter besselF besselF SetInput [transF GetOutput] besselF SetExecuteMethod bessel I translated this as vtkTransformPolyDataFilter *transF=vtkTransformPolyDataFilter::New(); transF->SetInput(plane->GetOutput()); transF->SetTransform(transform); vtkProgrammableFilter *besselF=vtkProgrammableFilter::New(); besselF->SetInput(transF->GetOutput()); besselF->SetExecuteMethod(bessel); then, in making, I get this err Building object file 3d.o... 3d.cc: In function `int main()': 3d.cc:25: no matching function for call to `vtkProgrammableFilter::SetInput( vtkPolyData*)' /usr/local/include/vtk/vtkDataSetToDataSetFilter.h:62: candidates are: void vtkDataSetToDataSetFilter::SetInput(vtkDataSet*) 3d.cc:29: no matching function for call to `vtkWarpScalar::SetInput( vtkPolyData*)' /usr/local/include/vtk/vtkPointSetToPointSetFilter.h:57: candidates are: void vtkPointSetToPointSetFilter::SetInput(vtkPointSet*) make: *** [3d.o] Error 1 I've included these headers: #include "vtkPlaneSource.h" #include "vtkTransform.h" #include "vtkTransformPolyDataFilter.h" #include "vtkProgrammableFilter.h" #include "vtkWarpScalar.h" #include "vtkPolyDataMapper.h" #include "vtkActor.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" Does somebody knows what is the problem?? ThanX LinX From mathieu.malaterre at kitware.com Sun Aug 22 21:09:27 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Sun, 22 Aug 2004 21:09:27 -0400 Subject: [vtkusers] unusual SetInput() and GetOutput() methods Message-ID: <20040823010927.NFWI16039.fep03.biz.rr.com@[127.0.0.1]> LinX, Usually this is a good idea to read the FAQ: http://vtk.org/Wiki/VTK_FAQ#Forward_declaration_in_VTK_4.x HTH Mathieu > > Hi everybody > > I've been trying to translate the expCos.tcl example to Cxx, but I got errs > in this part: > > TCL> > > vtkTransformPolyDataFilter transF > transF SetInput [plane GetOutput] > transF SetTransform transform > vtkProgrammableFilter besselF > besselF SetInput [transF GetOutput] > besselF SetExecuteMethod bessel > > > I translated this as > > > vtkTransformPolyDataFilter *transF=vtkTransformPolyDataFilter::New(); > transF->SetInput(plane->GetOutput()); > transF->SetTransform(transform); > > vtkProgrammableFilter *besselF=vtkProgrammableFilter::New(); > besselF->SetInput(transF->GetOutput()); > besselF->SetExecuteMethod(bessel); > > > then, in making, I get this err > > Building object file 3d.o... > 3d.cc: In function `int main()': > 3d.cc:25: no matching function for call to `vtkProgrammableFilter::SetInput( > vtkPolyData*)' > /usr/local/include/vtk/vtkDataSetToDataSetFilter.h:62: candidates are: void > vtkDataSetToDataSetFilter::SetInput(vtkDataSet*) > 3d.cc:29: no matching function for call to `vtkWarpScalar::SetInput( > vtkPolyData*)' > /usr/local/include/vtk/vtkPointSetToPointSetFilter.h:57: candidates are: void > vtkPointSetToPointSetFilter::SetInput(vtkPointSet*) > make: *** [3d.o] Error 1 > > > I've included these headers: > #include "vtkPlaneSource.h" > #include "vtkTransform.h" > #include "vtkTransformPolyDataFilter.h" > #include "vtkProgrammableFilter.h" > #include "vtkWarpScalar.h" > #include "vtkPolyDataMapper.h" > #include "vtkActor.h" > #include "vtkRenderer.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > > Does somebody knows what is the problem?? > ThanX > > > LinX > > _______________________________________________ > 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 diaoxianfen at asisz.com Sun Aug 22 21:38:20 2004 From: diaoxianfen at asisz.com (diaoxianfen) Date: Mon, 23 Aug 2004 09:38:20 +0800 Subject: [vtkusers] how to add user-defined message processing based on the \Examples\Medical\Cxx\Mecical3.c++ Message-ID: <000801c488b1$df6e1920$9005a8c0@diaoxianfen> There are four view port in the render window.I want to add user-defined message to one of them,for exampe add LeftBottonDown Message to the axial image.I want to achieve the aim that when I press the left button of the mouse ,in the according view port will display the coordinates.I use the vtkMFCRenderView to be the base class of my view class.And I add the OnLButtonDown() message as follows. void CMyView::OnLButtonDown(UINT nFlags, CPoint point) { // TODO: Add your message handler code here and/or call default //CView::OnLButtonDown(nFlags, point); vtkMFCRenderView::OnLButtonDown(nFlags,point); } But the result is not changed.What I get is still the vtkRenderWindowInteractor control style. I don't know what is the reason?Why it doesn't respond my defined message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ppau at risc.uni-linz.ac.at Mon Aug 23 02:43:55 2004 From: ppau at risc.uni-linz.ac.at (Petru Pau) Date: Mon, 23 Aug 2004 08:43:55 +0200 Subject: [vtkusers] How to insert edges? Message-ID: <4129922B.50502@risc.uni-linz.ac.at> After weeks of failures and bad results, I have discovered the reason: in the huge vtkPolyData that I read as input, some quads do not have coplanar vertrices. (Side question: Can it be that vtk avoids making planarity tests for quads and polygons?) The most immediate solution is to insert a few new edges: the diagonals of these quads. I tried to do that and failed. First, simply inserting next cell does not work, if the list of lines of the poly data is null. Second, if I take the lines of the poly data, add the new edge to it, and set it back as the lines of the poly data, the process fails in the subsequent BuildLinks. The question is now evident: How can I insert and edge in a vtkPolyData? Petru From ppau at risc.uni-linz.ac.at Mon Aug 23 02:56:09 2004 From: ppau at risc.uni-linz.ac.at (Petru Pau) Date: Mon, 23 Aug 2004 08:56:09 +0200 Subject: [vtkusers] streamlines: behavior at edges Message-ID: <41299509.5060003@risc.uni-linz.ac.at> I have studied the streamline generation implementations, both vtkStreamer and vtkStreamTracer. Here's a question for the experts: As the streamline goes closer to the edge of the cell, the influence of the distant vertices of the cell diminishes, until only the endpoints of the touched edge contribute with their vectors. Is this strategy correct? I doubt the correctness of this strategy from a very simple reason: If one has a quad, one can use it as is or one can triangulate it. The two situation generate completely different streamlines. Intuitively this should not happen, because the vector field and points geometry have not been altered. Petru From specht at ifi.unizh.ch Mon Aug 23 03:27:10 2004 From: specht at ifi.unizh.ch (matthias specht) Date: Mon, 23 Aug 2004 09:27:10 +0200 Subject: [vtkusers] Re: PCA in VTK In-Reply-To: <20040821000018.8D5B725F93@public.kitware.com> References: <20040821000018.8D5B725F93@public.kitware.com> Message-ID: <41299C4E.2060103@ifi.unizh.ch> hi joshi, below a piece of java code I wrote a while ago. it computes PCA on a set of registered landmarks. hope it helps. doesn't look like the most elegant piece of code - but it might be a starting point... hint: go to the kitwar site, vtk mnual, alphabetical class index, search for "PCA" :) matthias ... vtkUnstructuredGrid[] lmSet = new vtkUnstructuredGrid[nSamples]; vtkProcrustesAlignmentFilter gls = new vtkProcrustesAlignmentFilter(); // we want rigid body - don't we? gls.GetLandmarkTransform().SetModeToRigidBody(); gls.SetNumberOfInputs(nSamples); vtkPCAAnalysisFilter pca = new vtkPCAAnalysisFilter(); pca.SetNumberOfInputs(nSamples); for(int i=0; iMessage: 1 >Date: Fri, 20 Aug 2004 12:24:25 -0500 >From: "Pallavi Joshi" >Subject: [vtkusers] PCA in VTK >To: >Message-ID: <000c01c486da$8ae2ac00$da593b81 at Pallavi> >Content-Type: text/plain; charset="gb2312" > >Hi All, >Does VTK have any functions that carry PCA ? I want to apply PCA to the mesh points. >Any help wud be greatly appreciated......... > >Thanks, >Palllavi > > > From sbad at gl-group.com Mon Aug 23 04:15:03 2004 From: sbad at gl-group.com (Sebastian Bade) Date: Mon, 23 Aug 2004 10:15:03 +0200 Subject: [vtkusers] Q: Marking picked cells (quads) Message-ID: <9llov1-766.ln1@ID-156053.news.dfncis.de> Hi all The problem I have is related to the visualization of technical data. I would like to pick some cells (usually quads) from a grid structure for further processing. To be able to identify the picked cells I intend to change their color. This is no problem when I modify the data attributes associated to the picked cells. In that case I would have to keep trak of all attributes changed and re I would prefere to apply something like a marker, at best this would be a cell copied form the original with new color values. I could simply throw away the marker after use or do something else with that data. And I would never have to touch the original data. Is there somthing like a cell marker in vtk? Could someone point me to cell marker sources? How can I change rendering order from original to copied cell? How can I slightly move a copied cell normal to the original cell? Many thanx for your help Sebastian From I.deBoer at polytec.de Mon Aug 23 04:45:48 2004 From: I.deBoer at polytec.de (de Boer Ingo) Date: Mon, 23 Aug 2004 10:45:48 +0200 Subject: [vtkusers] Q: Marking picked cells (quads) Message-ID: <1484AEC8AB498A4EB64D4A8137D23FD90144FF5E@02polywbr.waldbronn.polytec.de> Hi, did you look at the vtkCellPicker class ? 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 sbad at gl-group.com Mon Aug 23 06:41:28 2004 From: sbad at gl-group.com (Sebastian Bade) Date: Mon, 23 Aug 2004 12:41:28 +0200 Subject: [vtkusers] Re: Q: Marking picked cells (quads) References: <1484AEC8AB498A4EB64D4A8137D23FD90144FF5E@02polywbr.waldbronn.polytec.de> Message-ID: Hi Ingo, hi all "de Boer Ingo" schrieb im Newsbeitrag news:1484AEC8AB498A4EB64D4A8137D23FD90144FF5E at 02polywbr.waldbronn.polytec.de ... Hi, did you look at the vtkCellPicker class ? greets Ingo yes, I am using pickers, cell and point allready. Also I have implemented a small marker object using a ball attached to the picked elemets for visualization. But when picking a larger areas from a geometry (aka multiple cells) I prefere to mark the whole area, colorize it, pick additional areas, colorize and finally do something with the cells/points picked underneath. Ergo, I want to extend my ball marker object, adding a cell marker object that is created by copying the original cell. This is actually working allready. Part of the problem is, that the original cell is masking the marker cell. Solution: I could move my marker normal to the original. This seams to be a bit too much and I belive there is something like that out there already :-) greetings Sebastian --- 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 vipul at sahajanandsoftware.com Mon Aug 23 08:26:16 2004 From: vipul at sahajanandsoftware.com (Vipul) Date: Mon, 23 Aug 2004 17:56:16 +0530 Subject: [vtkusers] Proble Regarding Quadric CLustering Message-ID: <002801c4890c$632e5450$060000c0@vipul> Vipul ChotaliyaHi VTK Users, I m new to VTK. I have main two problems; 1) I have one problem regarding quadric clustering; I am applying quadric clustering on my imagedata no. of times by coding . but each time I have to set UseInputPoints to ON. then I will get proper data after algorithm. if I am setting UseInputPoints to OFF then I was unable to get Image. 2) And after applying quadric clustering algo. I was unable to get new data directly. So I have to use vtkPolyDatawriter (which is write data to file) --> give vtkquadricclustering output to vtkPolyDatawriter --> then write it to file. -> after writing into file I am able to get data. suggest me short to way to get directly processed data.. for your reference my code is as below ************************************************* FOr reference my code is as below::: vtkQuadricClustering *vtkQClust = vtkQuadricClustering::New(); vtkPolyDataWriter *writer=vtkPolyDataWriter::New(); vtkQClust->SetInput(OutPut); vtkQClust->SetNumberOfXDivisions(nFactorX); vtkQClust->SetNumberOfYDivisions(nFactorY); vtkQClust->SetNumberOfZDivisions(nFactorZ); if(nNoOfTimes==1) { vtkQClust->UseFeatureEdgesOff (); vtkQClust->UseInputPointsOn(); //give me soluting in which way I can set this to ON vtkQClust->UseFeaturePointsOff(); vtkQClust->CopyCellDataOff(); } else { vtkQClust->UseFeatureEdgesOn (); vtkQClust->UseInputPointsOn(); vtkQClust->UseFeaturePointsOn(); vtkQClust->CopyCellDataOff(); } OutPut = vtkQClust->GetOutput(); //writer->GetInput(); writer->SetInput(OutPut); bProcessAhead=FALSE; writer->SetFileName(pst1); float fPtArray[5000][3]; //writer->SetInput(cube); //printf("i=%d %d\n",i+1,writer->Getput()->GetPolys()->GetNumberOfCells()); iData[1]=writer->GetInput()->GetNumberOfPolys(); writer->Write(); iData[1]=writer->GetInput()->GetNumberOfPolys(); OutPut = writer->GetInput(); ***************************************** "If you look at what you do not have in life, you don't have anything" "If you look at what you have in life, you have everything" ***************************************** Vipul Chotaliya (Software Engineer) Sahajanand Software Pvt. Ltd., Gandhinagar, Gujarat INDIA. Cell No :- +91-98980 95309 Mailto:- vipul at sahajanandsoftware.com Web:- www.sahajanandsoftware.com ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Vipul M. Chotaliya.vcf Type: text/x-vcard Size: 805 bytes Desc: not available URL: From ppau at risc.uni-linz.ac.at Mon Aug 23 08:32:41 2004 From: ppau at risc.uni-linz.ac.at (Petru Pau) Date: Mon, 23 Aug 2004 14:32:41 +0200 Subject: [vtkusers] what changes the coordinates? Message-ID: <4129E3E9.6030902@risc.uni-linz.ac.at> My program reads a vtkPolyData stored in a .vtk file and does some processing with it. During a debug session, I looked at a point of the poly data: its coordinates are not the ones read from the file! For instance, if the file has a value 1057.31, the point in the program's data structure has 1057.3100585937500. This slight modiffication occurs to most of the points. Why?... Petru From berk.geveci at kitware.com Mon Aug 23 08:52:27 2004 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 23 Aug 2004 08:52:27 -0400 Subject: [vtkusers] streamlines: behavior at edges In-Reply-To: <41299509.5060003@risc.uni-linz.ac.at> References: <41299509.5060003@risc.uni-linz.ac.at> Message-ID: <1093265547.4007.17.camel@silverymoon> > As the streamline goes closer to the edge of the cell, the influence of the > distant vertices of the cell diminishes, until only the endpoints of the > touched edge contribute with their vectors. Is this strategy correct? There is really no "correct" way :-) You should think of it in terms of the order of the interpolation. Currently, the velocity field is interpolated using the cell's local interpolation function. In most cases, this is linear or bi-linear (or tri-linear) and does not use any information from neighboring cells. A higher order or better interpolation is possible, the best probably being the same interpolation scheme used by the simulation (assuming we are not talking about measured flow field). In the case of uniform rectilinear or curvilinear grids, this is relatively easy. In case of unstructured grid, more information than what is passed to VTK through vtkUnstructuredGrid is needed. > I doubt the correctness of this strategy from a very simple reason: If one > has a quad, one can use it as is or one can triangulate it. The two > situation > generate completely different streamlines. Intuitively this should not > happen, > because the vector field and points geometry have not been altered. This is not correct. The vector field has been altered. Not the discrete field maybe but the interpolated continuous field. Quad uses a bi-linear interpolation whereas a triangle uses a linear interpolation producing different values inside the cells (same on edges). To produce the same result, you have to make both cell types use the same interpolation. vtkStreamTracer uses a class called vtkInterpolatedVelocityField to perform the interpolation of the velocity field at a point. I was asked a while ago to change the class so that a sub-class of this can be substituted. Somehow it slipped my mind and I am only getting to it now. Once I make this change, it will be possible to substitute a different interpolator in order to use a different interpolation scheme. -Berk From ppau at risc.uni-linz.ac.at Mon Aug 23 09:13:56 2004 From: ppau at risc.uni-linz.ac.at (Petru Pau) Date: Mon, 23 Aug 2004 15:13:56 +0200 Subject: [vtkusers] streamlines: behavior at edges References: <41299509.5060003@risc.uni-linz.ac.at> <1093265547.4007.17.camel@silverymoon> Message-ID: <4129ED94.1030707@risc.uni-linz.ac.at> Thanks for your prompt message. I can see things more clearly now. >... vtkInterpolatedVelocityField ... I was asked >a while ago to change the class so that a sub-class of this can be >substituted. > This would be nice, because I am struggling with generating streamlines constrained to the faces of a solid, and I could use such an interpolation which makes first a projection of the vectors and only then returns the interpolated... Regards, Petru From goodwin.lawlor at ucd.ie Mon Aug 23 09:21:35 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Mon, 23 Aug 2004 14:21:35 +0100 Subject: [vtkusers] Re: Marking picked cells (quads) References: <9llov1-766.ln1@ID-156053.news.dfncis.de> Message-ID: You can have a look at vtkRemoveCellsFilter/vtkSelectCellsFilter and its superclass vtkCellsFilter... you can pick and mark cells and then remove the (un)marked cells. Its here: http://www.bioengineering-research.com/vtk/vtkRemoveCellsFilter.htm Goodwin "Sebastian Bade" wrote in message news:9llov1-766.ln1 at ID-156053.news.dfncis.de... > Hi all > > The problem I have is related to the visualization of technical data. I > would like to pick some cells (usually quads) from a grid structure for > further processing. To be able to identify the picked cells I intend to > change their color. > This is no problem when I modify the data attributes associated to the > picked cells. In that case I would have to keep trak of all attributes > changed and re > > I would prefere to apply something like a marker, at best this would be a > cell copied form the original with new color values. I could simply throw > away the marker after use or do something else with that data. And I would > never have to touch the original data. > > Is there somthing like a cell marker in vtk? > Could someone point me to cell marker sources? > How can I change rendering order from original to copied cell? > How can I slightly move a copied cell normal to the original cell? > > Many thanx for your help > Sebastian > > > > _______________________________________________ > 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 rohan_vtk at yahoo.com Mon Aug 23 09:23:18 2004 From: rohan_vtk at yahoo.com (Rohan Naukudkar) Date: Mon, 23 Aug 2004 06:23:18 -0700 (PDT) Subject: [vtkusers] how to read a MRI or PET image in a vtk format (JAVA) Message-ID: <20040823132318.52386.qmail@web61302.mail.yahoo.com> Hi all, I have a MRI .hdr ( header file) and .img file(image).... I have read the header containing the information about the number of voxels and the image dimension. Can anybody tell me how to use this information to convert the .img file into a vtk format with respect to JAVA ,so that i can render the MRI image. Thanks in advance.. Cheers, Rohan --------------------------------- Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor at ucd.ie Mon Aug 23 09:26:17 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Mon, 23 Aug 2004 14:26:17 +0100 Subject: [vtkusers] Re: mouse position References: <003f01c485fb$34391c20$9c05a992@win.doc.ic.ac.uk> Message-ID: You can try this: http://www.vtk.org/Wiki/VTK_Mouse_Picking Goodwin "Longfei Cong" wrote in message news:003f01c485fb$34391c20$9c05a992 at win.doc.ic.ac.uk... Hi everyone: I want to visualize a object , use the mouse to kick one point of the object and get the position of the point. Wish for anyone to help me!! Thanks in advance!!!!! Longfei _______________________________________________ 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 pallavi.joshi at vanderbilt.edu Mon Aug 23 10:00:18 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Mon, 23 Aug 2004 09:00:18 -0500 Subject: [vtkusers] vtk Users guide Message-ID: <008201c48919$8687a200$da593b81@Pallavi> Hi All, I am planning to buy the vtk users guide. I want to know whether it is really useful or not. Is there any other book which is better than that ? I want to understand everything about Vtk. Is it a good book for that ? Please let me know. Thanks, Pallavi -------------- next part -------------- An HTML attachment was scrubbed... URL: From arbvtk at yahoo.fr Mon Aug 23 10:19:22 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Mon, 23 Aug 2004 16:19:22 +0200 (CEST) Subject: [vtkusers] multiple xy plots? In-Reply-To: <10D4B732-F486-11D8-82B3-000A95BAA698@earthlink.net> Message-ID: <20040823141922.3631.qmail@web25207.mail.ukl.yahoo.com> The following example : http://public.kitware.com/pipermail/vtkusers/2004-May/073938.html is taken from a function which accepts a vector param "R" and adds it to a vtkXYActor. David Bernstein wrote: Hi All, Can someone post a simple C++ example showing how to get two or more sets of data plotted in the same X-Y plot? I'm importing the data in the form of stl vectors. Thanks, Dave Bernstein _______________________________________________ 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 Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From emiliano at veccsa.com Mon Aug 23 10:56:24 2004 From: emiliano at veccsa.com (Emiliano Beronich) Date: Mon, 23 Aug 2004 11:56:24 -0300 Subject: [vtkusers] multiple xy plots? In-Reply-To: <10D4B732-F486-11D8-82B3-000A95BAA698@earthlink.net> References: <10D4B732-F486-11D8-82B3-000A95BAA698@earthlink.net> Message-ID: <412A0598.5050502@veccsa.com> Hi Davis, You can use vtkXYPlotActor to show two or more sets of data. You can add a set of data with the code shown below. This is the basic code to add only one set. You can adapt it to add two o more sets. Data = vtkPolyData::New(); vtkPoints *points = vtkPoints::New(); vtkFloatArray *scalars = vtkFloatArray::New(); int numberofpoints = 400; int MaxT = 1; int MinT = 0; for (int i = 0; i <= numberofpoints; i++ ) { float x[3] = {i, 0, 0}; float y = i; points->InsertPoint(i, x); scalars->InsertTuple1(i, y); } Data->SetPoints(points); Data->GetPointData()->SetScalars(scalars); points->Delete(); scalars->Delete(); XYPlot->AddInput(Data); Data->Delete(); But I have found troubles when I want to remove a curve. I have found a bug on vtkXYPlotActor class on the method RemoveInput that may need to be fixed. I attach the modified class that fix this problem. Regards, Emiliano David Bernstein wrote: > > Hi All, Can someone post a simple C++ example showing how to get two or > more > sets of data plotted in the same X-Y plot? I'm importing the data in > the form of > stl vectors. > > Thanks, > Dave Bernstein > > _______________________________________________ > 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 > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: vtkXYPlotActor.cxx URL: From mathieu.malaterre at kitware.com Mon Aug 23 11:24:31 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 23 Aug 2004 11:24:31 -0400 Subject: [vtkusers] multiple xy plots? In-Reply-To: <412A0598.5050502@veccsa.com> References: <10D4B732-F486-11D8-82B3-000A95BAA698@earthlink.net> <412A0598.5050502@veccsa.com> Message-ID: <412A0C2F.80509@kitware.com> Emiliano I have entered this as bug #1111 in our bug tracker: http://vtk.org/Bug/bug.php?op=show&bugid=1111 Is it possible you send us a simple tcl/python script that reprodue the bug. Thanks Mathieu > > But I have found troubles when I want to remove a curve. I have found a > bug on vtkXYPlotActor class on the method RemoveInput that may need to > be fixed. I attach the modified class that fix this problem. > > Regards, > Emiliano > > > > David Bernstein wrote: > >> >> Hi All, Can someone post a simple C++ example showing how to get two >> or more >> sets of data plotted in the same X-Y plot? I'm importing the data in >> the form of >> stl vectors. >> >> Thanks, >> Dave Bernstein >> >> _______________________________________________ >> 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 seanm at nmr.mgh.harvard.edu Mon Aug 23 11:31:11 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Mon, 23 Aug 2004 11:31:11 -0400 Subject: [vtkusers] How to insert edges? In-Reply-To: <4129922B.50502@risc.uni-linz.ac.at> References: <4129922B.50502@risc.uni-linz.ac.at> Message-ID: <412A0DBF.9000502@nmr.mgh.harvard.edu> Hi Petru, The VTK readers that I am familiar with make no checks WRT the planarity of quads or polygons ... or convexity for that matter. If you have degenerate data, then there may be some cleaning up to do. To break a given quad into two triangles, you will have to remove the cell entry for the quad as well as inserting the two cell entries for the triangles. Be careful which methods you use to insert; some will allocate additional memory while others assume a preallocated list size and make no checks. I am not sure that this fully addresses your woes, but hopefully it's a good start. -Sean Petru Pau wrote: > After weeks of failures and bad results, I have discovered the reason: > in the huge vtkPolyData that I read as input, some quads do not have > coplanar vertrices. (Side question: Can it be that vtk avoids making > planarity > tests for quads and polygons?) > > The most immediate solution is to insert a few new edges: the diagonals of > these quads. > > I tried to do that and failed. First, simply inserting next cell does > not work, > if the list of lines of the poly data is null. Second, if I take the > lines of > the poly data, add the new edge to it, and set it back as the lines of the > poly data, the process fails in the subsequent BuildLinks. > > The question is now evident: How can I insert and edge in a vtkPolyData? > > Petru > From ppau at risc.uni-linz.ac.at Mon Aug 23 11:55:08 2004 From: ppau at risc.uni-linz.ac.at (Petru Pau) Date: Mon, 23 Aug 2004 17:55:08 +0200 Subject: [vtkusers] How to insert edges? References: <4129922B.50502@risc.uni-linz.ac.at> <412A0DBF.9000502@nmr.mgh.harvard.edu> Message-ID: <412A135C.9050807@risc.uni-linz.ac.at> Thank you, Sean, and sorry to everybody: I should have checked the archives first. What you said, Sean, is the obvious thing to do; unfortunately, this occured to me only after reading your mail. :) I am most grateful for your answer. Regards, Petru Sean McInerney wrote: > Hi Petru, > > The VTK readers ... make no checks WRT the planarity of quads or > polygons ... > > To break a given quad into two triangles, you will have to remove > the cell entry for the quad as well as inserting the two cell entries > for the triangles. From jeff at cdnorthamerica.com Mon Aug 23 12:00:37 2004 From: jeff at cdnorthamerica.com (Jeff Lee) Date: Mon, 23 Aug 2004 12:00:37 -0400 Subject: [vtkusers] How to insert edges? In-Reply-To: <412A0DBF.9000502@nmr.mgh.harvard.edu> References: <4129922B.50502@risc.uni-linz.ac.at> <412A0DBF.9000502@nmr.mgh.harvard.edu> Message-ID: <412A14A5.9090306@cdnorthamerica.com> Hi All, Would not a vtkTriangleFilter be appropriate in this case? It does all the accounting for you... -J Sean McInerney wrote: > Hi Petru, > > The VTK readers that I am familiar with make no checks WRT the > planarity of quads or polygons ... or convexity for that matter. If > you have degenerate data, then there may be some cleaning up to do. > > To break a given quad into two triangles, you will have to remove > the cell entry for the quad as well as inserting the two cell entries > for the triangles. Be careful which methods you use to insert; some > will allocate additional memory while others assume a preallocated > list size and make no checks. > > I am not sure that this fully addresses your woes, but hopefully > it's a good start. > > -Sean > > Petru Pau wrote: > >> After weeks of failures and bad results, I have discovered the reason: >> in the huge vtkPolyData that I read as input, some quads do not have >> coplanar vertrices. (Side question: Can it be that vtk avoids making >> planarity >> tests for quads and polygons?) >> >> The most immediate solution is to insert a few new edges: the >> diagonals of >> these quads. >> >> I tried to do that and failed. First, simply inserting next cell does >> not work, >> if the list of lines of the poly data is null. Second, if I take the >> lines of >> the poly data, add the new edge to it, and set it back as the lines >> of the >> poly data, the process fails in the subsequent BuildLinks. >> >> The question is now evident: How can I insert and edge in a vtkPolyData? >> >> Petru >> > _______________________________________________ > 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 baghdadi at sickkids.ca Mon Aug 23 12:04:35 2004 From: baghdadi at sickkids.ca (Leila Baghdadi) Date: 23 Aug 2004 12:04:35 -0400 Subject: [vtkusers] vtk Users guide In-Reply-To: <008201c48919$8687a200$da593b81@Pallavi> References: <008201c48919$8687a200$da593b81@Pallavi> Message-ID: <1093277075.15802.78.camel@mouse18.phenogenomics.ca> Hi Pallavi, The books are good and give you an overview of what goes on VTK, and I think if you are someone who deals with VTK everyday, you should buy them but having said that, the Golden rule for understanding VTK is " look at source code of classes and try to understand how they work" that is the only way, Good luck Leila On Mon, 2004-08-23 at 10:00, Pallavi Joshi wrote: > Hi All, > I am planning to buy the vtk users guide. I want to know whether it is > really useful or not. Is there any other book which is better than > that ? I want to understand everything about Vtk. Is it a good book > for that ? > > Please let me know. > > Thanks, > Pallavi > > > > > > ______________________________________________________________________ > > _______________________________________________ > 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 Eric.Harlow at edwards.af.mil Mon Aug 23 12:32:02 2004 From: Eric.Harlow at edwards.af.mil (Harlow Eric D Contr 412 TW/ENR) Date: Mon, 23 Aug 2004 09:32:02 -0700 Subject: [vtkusers] Adding shapes to vtkXYPlotActor Message-ID: <7D4FEEC34EF66843830C74D10D651969021B832D@fsfspm38> Hello, Does anyone know of an example for overlaying shapes (lines, arrows, rectangles, and circles) on a vtkXYPlotActor plot. I would like to place them either in conjunction with data coordinates or absolute window coordinates. If there isn't an example could someone give some insight as to how I might do this? Also, I would like to insert a grid on the plot as well. Thanks, -Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 145 bytes Desc: not available URL: From seanm at nmr.mgh.harvard.edu Mon Aug 23 13:11:45 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Mon, 23 Aug 2004 13:11:45 -0400 Subject: [vtkusers] How to insert edges? In-Reply-To: <412A14A5.9090306@cdnorthamerica.com> References: <4129922B.50502@risc.uni-linz.ac.at> <412A0DBF.9000502@nmr.mgh.harvard.edu> <412A14A5.9090306@cdnorthamerica.com> Message-ID: <412A2551.9070901@nmr.mgh.harvard.edu> Oh yeah, sure Jeff ... always taking the easy way out ;-) vtkTriangleFilter is probably the best solution. -Sean Jeff Lee wrote: > Hi All, > Would not a vtkTriangleFilter be appropriate in this case? It does all > the accounting for you... > -J > > Sean McInerney wrote: > >> Hi Petru, >> >> The VTK readers that I am familiar with make no checks WRT the >> planarity of quads or polygons ... or convexity for that matter. If >> you have degenerate data, then there may be some cleaning up to do. >> >> To break a given quad into two triangles, you will have to remove >> the cell entry for the quad as well as inserting the two cell entries >> for the triangles. Be careful which methods you use to insert; some >> will allocate additional memory while others assume a preallocated >> list size and make no checks. >> >> I am not sure that this fully addresses your woes, but hopefully >> it's a good start. >> >> -Sean >> >> Petru Pau wrote: >> >>> After weeks of failures and bad results, I have discovered the reason: >>> in the huge vtkPolyData that I read as input, some quads do not have >>> coplanar vertrices. (Side question: Can it be that vtk avoids making >>> planarity >>> tests for quads and polygons?) >>> >>> The most immediate solution is to insert a few new edges: the >>> diagonals of >>> these quads. >>> >>> I tried to do that and failed. First, simply inserting next cell does >>> not work, >>> if the list of lines of the poly data is null. Second, if I take the >>> lines of >>> the poly data, add the new edge to it, and set it back as the lines >>> of the >>> poly data, the process fails in the subsequent BuildLinks. >>> >>> The question is now evident: How can I insert and edge in a vtkPolyData? >>> >>> Petru >>> >> _______________________________________________ >> 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 alexander.trum at teraport.de Mon Aug 23 13:24:09 2004 From: alexander.trum at teraport.de (Alexander Trum) Date: Mon, 23 Aug 2004 19:24:09 +0200 Subject: [vtkusers] memory allocation on HP-UX 11.00 Message-ID: <412A2839.2060506@teraport.de> Hello I have an application based on VTK on HP-UX 11.00 compiled with gcc3.2.1. It works very well. But if i tried to allocate more than round about 500 MB memory in one block, my applications says that there is no more memory. The machine has at this time 1.5 GB free memory!. So i wrote a little test program which tries to allocate more than 500 MB memory in one call to malloc and it failed too. So is there a compiler option (as on IBM AIX) or something like that to increase the size of memory which can be allocated in one malloc call? Thanks, Alex -- Alexander Trum Dipl.-Math. (FH) Senior Software Developer Engineering IT Consulting Teraport GmbH Phone +49 89 651086 721 Fax +49 89 651086 701 Mobile +49 173 38 25 490 mailto:alexander.trum at teraport.de http://www.teraport.de From alletto at dei.unipd.it Mon Aug 23 13:27:09 2004 From: alletto at dei.unipd.it (alletto at dei.unipd.it) Date: Mon, 23 Aug 2004 19:27:09 +0200 Subject: [vtkusers] Problems with CMake Message-ID: <1093282029.412a28ed7d570@mail.dei.unipd.it> Hi vtk users, here is my problem: I've written my application using MsVc++ and it works fine in Windows, but now I have to make it work in Linux. I'm new on Linux and I've just installed Fedora2. I can't install CMake. Can you please help me, or suggest any helpful website? Thanks in advance Bye Michele Alletto University of Padua ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From pallavi.joshi at vanderbilt.edu Mon Aug 23 13:35:20 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Mon, 23 Aug 2004 12:35:20 -0500 Subject: [vtkusers] invalid character problem on windows ?? Message-ID: <006f01c48939$c37dcfc0$da593b81@Pallavi> Hi, I have a program which converts vtk meshes into dicom RT files (using Vtk and dcmtk ). This code works fine on UNIX but when I run the same code on Windows it gives me invalid characters in the output files such as: ??A???A???A7??A? A I have no clue why this happens only on Windows and not on UNIX. Does anybody have any idea about the possible reasons for this wierd behaviour. Please help, Thanks, Pallavi -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From tfogal at apollo.sr.unh.edu Mon Aug 23 14:05:01 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Mon, 23 Aug 2004 14:05:01 -0400 Subject: [vtkusers] Proper Delete()ion of output? In-Reply-To: Your message of "Fri, 20 Aug 2004 15:31:12 EDT." <41265180.6090009@kitware.com> References: <200408191923.i7JJNtgd027556@apollo.sr.unh.edu> <41265180.6090009@kitware.com> Message-ID: <200408231805.i7NI51ac023223@apollo.sr.unh.edu> In tracking the segfault I'm getting while trying to delete an object, it occurred to me that maybe I was deleting things incorrectly. It was my understanding that if I GetOutput() from a filter/source and stored that pointer in wherever I was, that the reference count increased and that I would then have to Delete() the object myself. I guess my question is, exactly what operations will modify the reference count of an object? Thanks, -tom From clinton at elemtech.com Mon Aug 23 14:12:47 2004 From: clinton at elemtech.com (Clinton Stimpson) Date: Mon, 23 Aug 2004 12:12:47 -0600 Subject: [vtkusers] memory allocation on HP-UX 11.00 In-Reply-To: <20040823180532.B96C6277B5@public.kitware.com> References: <20040823180532.B96C6277B5@public.kitware.com> Message-ID: <412A339F.3050108@elemtech.com> Check your kernel settings. The kernel on HP-UX 11.0 can limit memory used by one process and it is adjustable. Clint > >------------------------------ > >Message: 5 >Date: Mon, 23 Aug 2004 19:24:09 +0200 >From: Alexander Trum >Subject: [vtkusers] memory allocation on HP-UX 11.00 >To: vtkusers at vtk.org >Message-ID: <412A2839.2060506 at teraport.de> >Content-Type: text/plain; charset=us-ascii; format=flowed > >Hello > >I have an application based on VTK on HP-UX 11.00 compiled with >gcc3.2.1. It works very well. But if i tried to allocate more than round >about 500 MB memory in one block, my applications says that there is no >more memory. The machine has at this time 1.5 GB free memory!. >So i wrote a little test program which tries to allocate more than 500 >MB memory in one call to malloc and it failed too. >So is there a compiler option (as on IBM AIX) or something like that to >increase the size of memory which can be allocated in one malloc call? > >Thanks, Alex > > > From emiliano at veccsa.com Mon Aug 23 14:13:20 2004 From: emiliano at veccsa.com (Emiliano Beronich) Date: Mon, 23 Aug 2004 15:13:20 -0300 Subject: [vtkusers] multiple xy plots? In-Reply-To: <412A0C2F.80509@kitware.com> References: <10D4B732-F486-11D8-82B3-000A95BAA698@earthlink.net> <412A0598.5050502@veccsa.com> <412A0C2F.80509@kitware.com> Message-ID: <412A33C0.1030506@veccsa.com> Hi Mathieu, These lines reproduce the problem on tcl. vtkRenderWindow rw vtkRenderer re vtkXYPlotActor pa vtkImageSinusoidSource cosSrc cosSrc SetWholeExtent 0 255 0 0 0 0 cosSrc SetPeriod 256 vtkImageSinusoidSource sinSrc sinSrc SetWholeExtent 0 255 0 0 0 0 sinSrc SetPeriod 256 sinSrc SetPhase 1.5708 pa AddInput [cosSrc GetOutput] pa AddInput [sinSrc GetOutput] #~ try uncommenting one of these lines #~ pa RemoveInput [sinSrc GetOutput] #~ pa RemoveInput [cosSrc GetOutput] re AddActor pa rw AddRenderer re rw Render Regards, Emiliano Mathieu Malaterre wrote: > Emiliano > > I have entered this as bug #1111 in our bug tracker: > > http://vtk.org/Bug/bug.php?op=show&bugid=1111 > > Is it possible you send us a simple tcl/python script that reprodue > the bug. > > Thanks > Mathieu > >> >> But I have found troubles when I want to remove a curve. I have found >> a bug on vtkXYPlotActor class on the method RemoveInput that may need >> to be fixed. I attach the modified class that fix this problem. >> >> Regards, >> Emiliano >> >> >> >> David Bernstein wrote: >> >>> >>> Hi All, Can someone post a simple C++ example showing how to get two >>> or more >>> sets of data plotted in the same X-Y plot? I'm importing the data in >>> the form of >>> stl vectors. >>> >>> Thanks, >>> Dave Bernstein >>> >>> _______________________________________________ >>> 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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > > From billlist at nycap.rr.com Mon Aug 23 14:31:11 2004 From: billlist at nycap.rr.com (William A. Hoffman) Date: Mon, 23 Aug 2004 14:31:11 -0400 Subject: [vtkusers] Problems with CMake In-Reply-To: <1093282029.412a28ed7d570@mail.dei.unipd.it> References: <1093282029.412a28ed7d570@mail.dei.unipd.it> Message-ID: <6.1.1.1.2.20040823143018.0805a498@pop.nycap.rr.com> You can use the x86-linux build of cmake from here: http://www.cmake.org/HTML/Download.html -Bill At 01:27 PM 8/23/2004, alletto at dei.unipd.it wrote: >Hi vtk users, >here is my problem: I've written my application using MsVc++ and it works fine >in Windows, but now I have to make it work in Linux. I'm new on Linux and I've >just installed Fedora2. I can't install CMake. Can you please help me, or >suggest any helpful website? >Thanks in advance >Bye > >Michele Alletto >University of Padua > >------------------------------------------------- >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: >Follow this link to subscribe/unsubscribe: >http://www.vtk.org/mailman/listinfo/vtkusers From Eric.Harlow at edwards.af.mil Mon Aug 23 14:44:44 2004 From: Eric.Harlow at edwards.af.mil (Harlow Eric D Contr 412 TW/ENR) Date: Mon, 23 Aug 2004 11:44:44 -0700 Subject: [vtkusers] Adding shapes to vtkXYPlotActor -Didn't make first post Message-ID: <7D4FEEC34EF66843830C74D10D651969021B8449@fsfspm38> ? Hello, Does anyone know of an example for overlaying shapes (lines, arrows, rectangles, and circles) on a vtkXYPlotActor plot. I would like to place them either in conjunction with data coordinates or absolute window coordinates. If there isn't an example could someone give some insight as to how I might do this? Also, I would like to insert a grid on the plot as well. Thanks, -Eric From misiones485_6300 at yahoo.com.ar Mon Aug 23 15:12:05 2004 From: misiones485_6300 at yahoo.com.ar (=?iso-8859-1?q?martin=20larrea?=) Date: Mon, 23 Aug 2004 16:12:05 -0300 (ART) Subject: [vtkusers] vtkObjects and arrays in c++.net Message-ID: <20040823191205.1169.qmail@web54005.mail.yahoo.com> Ok, im about to kill my computer... Im trying to define an array of vtkPolyDataMapper in c++.net in the main class... First i tried this. vtkPolyDataMapper* cubeMapper[]; but i get an error this. error C2697: 'cubeMapper' : se debe especificar expl?citamente __gc o __nogc para una matriz declarada dentro de un tipo administrado (English... "must explicit use __gc or __nogc for a matrix declare in an administrative type) Ok... second try... vtkPolyDataMapper* cubeMapper __gc[]; but again error C2691: 'vtkPolyDataMapper __gc *' : tipo no v?lido para el elemento de matriz __gc (English... "__gc *: type invalid por the matrix element __gc) I tried other conbinations but none of then work... Please, any ideas... thanxs a lot. Martin. 100mb gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo ?Tenelo ya! -------------- next part -------------- An HTML attachment was scrubbed... URL: From tfogal at apollo.sr.unh.edu Mon Aug 23 15:42:38 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Mon, 23 Aug 2004 15:42:38 -0400 Subject: [vtkusers] StreamTracer endpoints / streaklines Message-ID: <200408231942.i7NJgc9O023694@apollo.sr.unh.edu> I have two input datasets for which I want to generate streaklines for. My idea is to generate two interpolated data sets, and trace a streamline through the first. Then grab the endpoint of the streamline from it, delete the first dataset, and trace a streamline (that I would actually want to visualize) through the second dataset, using the endpoint I grabbed from the first. However I can't seem to figure out how to find the endpoint for a streamline generated by vtkStreamTracer. Does anyone have any ideas on how this might be possible? Should I grab the underlying FloatArrays from StreamTracer and get the last tuple? Alternatively, If anyone has started any work on generating streaklines within VTK, I would appreciate hearing about it. -tom From deignacio at gmail.com Mon Aug 23 16:14:02 2004 From: deignacio at gmail.com (david ignacio) Date: Mon, 23 Aug 2004 15:14:02 -0500 Subject: [vtkusers] Importing VRML into a vtkAssembly Message-ID: <99b24d6804082313147da21072@mail.gmail.com> Is it possible, or is there any clean way of importing a VRML file into a vtkAssembly? The current vtkVRMLImporter just dumps everything into the current vtkRenderer without allowing you to have any real control over it. The motivation behind this is that I have pretty large VRML files that I want to load into multiple vtkRenderers without having to have more than one copy in memory. I also want to be able to add and remove the vrml files from the Renderers dynamically. Does anyone have any ideas of how to solve this? Or is a re-write of the vtkImporter Classes required? Thanks Dave From tfogal at apollo.sr.unh.edu Mon Aug 23 17:00:12 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Mon, 23 Aug 2004 17:00:12 -0400 Subject: [vtkusers] texturing a sphere Message-ID: <200408232100.i7NL0CAO029743@apollo.sr.unh.edu> Hi all, I'm trying to texture a sphere with a PNG image. I do this with code similar to PNGReader->SetFileName("file.png"); Texture->SetInput(PNGReader->GetOutput()); Texture->InterpolateOn(); //also tried w/o setting this SphereSource->SetCenter(0,0,0); SphereSource->SetRadius(1); PolyDataMapper->SetInput(SphereSource->GetOutput()); Actor->SetMapper(PolyDataMapper); Actor->SetTexture(Texture); My sphere changes a deep blue when I enable the texture code, but I do not see the actual texture on it. The actual image is small and of even dimensions, earth.png: PNG image data, 32 x 32, 16-bit/color RGB, non-interlaced so I do not believe this to be a power-of-2 issue or problem loading a texture that is beyond what my opengl implementation can do. Perhaps most importantly, I tried running the 'TPlane.py' example and got some disappointing output (in addition to no visible texture on the plane): ERROR: In /home/tfogal/tarballs/VTK/Rendering/vtkOpenGLTexture.cxx, line 111 vtkOpenGLTexture (0x6640d0): No scalar values found for texture input! Any ideas? -tom From mathieu.malaterre at kitware.com Mon Aug 23 18:25:14 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Mon, 23 Aug 2004 18:25:14 -0400 Subject: [vtkusers] ATI Petition for Adequate Drivers in Linux Message-ID: <412A6ECA.7080104@kitware.com> You can go there to sign it: http://www.petitiononline.com/atipet/petition.html To: ATI Technologies Inc. We are the customers of ATI who use Linux to power our computers. We will no longer endure ATI?s poor driver support for Linux both in 32-bit and 64-bit computing. This petition is aimed at the designers at ATI who for whatever reason choose not to acknowledge our pleas and specifically at ATI as a company. The signers of this petition will no longer purchase ATI products until ATI make a workable 3D accelerated 64-bit driver for Linux and a 32-bit that utilizes the full potential of the Raedon chips. The products we include in this are as follows: 1. All desktop Raedon chips up through 9800 2. All mobile Raedon chips up through 9800 3. All X-series chips 4. All TV and Remote Wonders 5. All FireGL chips Also in this petition we ask ATI to change their current position on mobile drivers. With Linux, one of the major challenges to developers is to make it possible for any machine to run the operating system. To have every OEM develop their own drivers for each component of their machines and update them would be preposterous since they don???t even make the components. NVidia has learned this and has prospered since their drivers in general work with any and all notebook screens. They believe, and rightly so that it is the responsibility of the components manufacturer to create a driver that will work with every other component. Therefore the drivers that we ask to be created for Linux must also work for mobile chips. Specifically, since 64-bit computing is new to the world, we understand that a rough driver that might not work perfectly is unavoidable. This being said we need some kind of driver no matter how rough so that we can utilize the chip that we have already purchased from you. Your current 32-bit driver for Linux is so inadequate compared to the one released for Windows that it performs as slow ones many generations older. This must be rectified. In the event that ATI cannot handle the programming of these drivers, we require all modern ATI chips to be open sourced to the Linux community so that drivers can be made. This would include all schematics and technical information pertaining to the video cards produced by ATI. Again until we see these changes, the signers of this petition cannot support you by purchasing any more of your products. Sincerely, The Undersigned From goodwin.lawlor at ucd.ie Mon Aug 23 18:34:59 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Mon, 23 Aug 2004 23:34:59 +0100 Subject: [vtkusers] Re: vtkObjects and arrays in c++.net References: <20040823191205.1169.qmail@web54005.mail.yahoo.com> Message-ID: Hi Martin, Try this: int numMappers = 10; // for example // To create... // cubeMapper is a pointer to an array of vtkPolyDataMapper pointers vtkPolyDataMapper **cubeMapper = new vtkPolyDataMapper* [numMappers] //point each pointer in the array to a new vtkPolyDataMapper object for (int i =0; iDelete(); } // Delete the array or pointers delete [] cubeMapper; cubeMappers = NULL; hth, Goodwin "martin larrea" wrote in message news:20040823191205.1169.qmail at web54005.mail.yahoo.com... Ok, im about to kill my computer... Im trying to define an array of vtkPolyDataMapper in c++.net in the main class... First i tried this. vtkPolyDataMapper* cubeMapper[]; but i get an error this. error C2697: 'cubeMapper' : se debe especificar expl?citamente __gc o __nogc para una matriz declarada dentro de un tipo administrado (English... "must explicit use __gc or __nogc for a matrix declare in an administrative type) Ok... second try... vtkPolyDataMapper* cubeMapper __gc[]; but again error C2691: 'vtkPolyDataMapper __gc *' : tipo no v?lido para el elemento de matriz __gc (English... "__gc *: type invalid por the matrix element __gc) I tried other conbinations but none of then work... Please, any ideas... thanxs a lot. Martin. 100mb gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo ?Tenelo ya! _______________________________________________ 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 arbvtk at yahoo.fr Mon Aug 23 18:46:06 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Tue, 24 Aug 2004 00:46:06 +0200 (CEST) Subject: [vtkusers] multiple xy plots? In-Reply-To: <412A33C0.1030506@veccsa.com> Message-ID: <20040823224606.93493.qmail@web25207.mail.ukl.yahoo.com> Hi, I had the same problem with RemoveAllInputs(). I called GetDataObjectInputList()->RemoveAllItems(); to solve it. http://public.kitware.com/pipermail/vtkusers/2004-May/073938.html Emiliano Beronich wrote: Hi Mathieu, These lines reproduce the problem on tcl. vtkRenderWindow rw vtkRenderer re vtkXYPlotActor pa vtkImageSinusoidSource cosSrc cosSrc SetWholeExtent 0 255 0 0 0 0 cosSrc SetPeriod 256 vtkImageSinusoidSource sinSrc sinSrc SetWholeExtent 0 255 0 0 0 0 sinSrc SetPeriod 256 sinSrc SetPhase 1.5708 pa AddInput [cosSrc GetOutput] pa AddInput [sinSrc GetOutput] #~ try uncommenting one of these lines #~ pa RemoveInput [sinSrc GetOutput] #~ pa RemoveInput [cosSrc GetOutput] re AddActor pa rw AddRenderer re rw Render Regards, Emiliano Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From arbvtk at yahoo.fr Mon Aug 23 18:52:07 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Tue, 24 Aug 2004 00:52:07 +0200 (CEST) Subject: [vtkusers] ATI Petition for Adequate Drivers in Linux In-Reply-To: <412A6ECA.7080104@kitware.com> Message-ID: <20040823225207.84831.qmail@web25202.mail.ukl.yahoo.com> I personally boycott ATI for this reason since 5 years. Things doesn't seem to change much... :-( Mathieu Malaterre wrote: You can go there to sign it: http://www.petitiononline.com/atipet/petition.html To: ATI Technologies Inc. We are the customers of ATI who use Linux to power our computers. We will no longer endure ATI?s poor driver support for Linux both in 32-bit and 64-bit computing. This petition is aimed at the designers at ATI who for whatever reason choose not to acknowledge our pleas and specifically at ATI as a company. The signers of this petition will no longer purchase ATI products until ATI make a workable 3D accelerated 64-bit driver for Linux and a 32-bit that utilizes the full potential of the Raedon chips. The products we include in this are as follows: 1. All desktop Raedon chips up through 9800 2. All mobile Raedon chips up through 9800 3. All X-series chips 4. All TV and Remote Wonders 5. All FireGL chips Also in this petition we ask ATI to change their current position on mobile drivers. With Linux, one of the major challenges to developers is to make it possible for any machine to run the operating system. To have every OEM develop their own drivers for each component of their machines and update them would be preposterous since they don???t even make the components. NVidia has learned this and has prospered since their drivers in general work with any and all notebook screens. They believe, and rightly so that it is the responsibility of the components manufacturer to create a driver that will work with every other component. Therefore the drivers that we ask to be created for Linux must also work for mobile chips. Specifically, since 64-bit computing is new to the world, we understand that a rough driver that might not work perfectly is unavoidable. This being said we need some kind of driver no matter how rough so that we can utilize the chip that we have already purchased from you. Your current 32-bit driver for Linux is so inadequate compared to the one released for Windows that it performs as slow ones many generations older. This must be rectified. In the event that ATI cannot handle the programming of these drivers, we require all modern ATI chips to be open sourced to the Linux community so that drivers can be made. This would include all schematics and technical information pertaining to the video cards produced by ATI. Again until we see these changes, the signers of this petition cannot support you by purchasing any more of your products. Sincerely, The Undersigned _______________________________________________ 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 Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Charles.Boivin at rwdiwest.com Mon Aug 23 18:57:42 2004 From: Charles.Boivin at rwdiwest.com (Charles Boivin) Date: Mon, 23 Aug 2004 16:57:42 -0600 Subject: [vtkusers] Multiple scalars in vtkPolyData Message-ID: Hello all, I am writing a reader for my own data format; I am using a polygonal data set. I have been reading the various material in the VTK books (in particular, chapter 5 in "The Visualization Toolkit"), but I am missing some information here. I have no problems reading the geometry/topology from my files and displaying them properly. However, I am struggling a bit with loading point and cell data. In particular, the examples in chapter 5 always only deal with one scalar for the point or cell data. How do I load multiple scalars? And this also begs another question: how can I select which one I want to display once I have been able to load several ones? Similarly, can multiple vectors be loaded? It seems as if functions SetActiveScalars(name) and GetScalars(name) are to be used here... but in what order should I use them? Do I have to specify how many scalars I have before I start making calls to vtkPolyData::GetPointData()->SetScalars()? I am a bit confused here... I would have thought that something along the lines of: Loop over all scalars SetActiveScalars(ScalarName[i]) Set the values for the scalar for every point GetPointData()->SetScalars(...) end loop over scalars would work, but I can't get things to display quite properly. Could anyone confirm whether this approach makes sense, or point towards an example where multiple scalars are being defined? I guess I might also have errors elsewhere in the code... I apologize if things sound a bit unorganized, but I am a bit confused with this at the moment. Any help would be appreciated. Thank you, Charles Boivin From goodwin.lawlor at ucd.ie Mon Aug 23 19:21:07 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Tue, 24 Aug 2004 00:21:07 +0100 Subject: [vtkusers] Re: Multiple scalars in vtkPolyData References: Message-ID: Hi Charles, Have a look at the vtkFieldData class > How do I load multiple scalars? polydata->GetPointData->AddArray(vtkDataArray *array) polydata->GetCellData->AddArray(vtkDataArray *array) > And this also begs another question: how can I select which one I want > to display once I have been able to load several ones? polydata->GetPointData->SetActiveScalars ( const char * name ) polydata->GetCellData->SetActiveScalars ( const char * name ) make sure to give you vtkDataArray a name... hth Goodwin From pallavi.joshi at vanderbilt.edu Mon Aug 23 23:17:58 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Mon, 23 Aug 2004 22:17:58 -0500 Subject: [vtkusers] viewing contours on the actual CT/MR volume set Message-ID: <019401c48988$f4bc3870$da593b81@Pallavi> Hi, I have created contours using vtkCutter and vtkPlane classes. Now, I have to project these contours on the actual CT/MR volumes. Can anybody tell me how this is to be done ? Thanks for ur help, Pallavi -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.p.botha at ewi.tudelft.nl Tue Aug 24 03:10:27 2004 From: c.p.botha at ewi.tudelft.nl (Charl P. Botha) Date: Tue, 24 Aug 2004 09:10:27 +0200 Subject: [vtkusers] ATI Petition for Adequate Drivers in Linux In-Reply-To: <412A6ECA.7080104@kitware.com> References: <412A6ECA.7080104@kitware.com> Message-ID: <412AE9E3.9000106@ewi.tudelft.nl> Mathieu Malaterre wrote: > You can go there to sign it: > > http://www.petitiononline.com/atipet/petition.html > Raedon chips. I'm not sure ATI is going to take this too seriously. They have no products that go by the name of "Raedon" - this product (perhaps from another manufacturer?) is referred to throughout the whole petition. :) -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From ppau at risc.uni-linz.ac.at Tue Aug 24 04:24:51 2004 From: ppau at risc.uni-linz.ac.at (Petru Pau) Date: Tue, 24 Aug 2004 10:24:51 +0200 Subject: [vtkusers] what changes the coordinates? References: <4129E3E9.6030902@risc.uni-linz.ac.at> Message-ID: <412AFB53.5070209@risc.uni-linz.ac.at> I can give you a practical example. The two attached poly data files contain two faces each: a quadrilateral and a triangle. The points in testPolydata07.vtk have integer coordinates, and those from testPolydata08.vtk were obtained by multiplying each point with 3/25. The coordinates of the points in the vtkPolyData created by reading these files differ from those on files by more than 10^(-8). Due to this fact the volume of the tetrahedron is of order 10^(-9). The following code snippet allows you to see this, if you run it in debug mode and insert a breakpoint at the last sentence: vtkPolyDataReader* reader = vtkPolyDataReader::New(); polyData = vtkPolyData::New(); reader->SetFileName("testPolydata08.vtk"); vtkPolyData* readData = reader->GetOutput(); readData->Update(); vtkCell* cell = readData->GetCell(0); bool planar = true; if (cell->GetCellType()==VTK_QUAD) { vtkPoints *cellPoints = cell->GetPoints(); double vertices[4][3]; for (int i=0; i<4; i++) { double *aVert = cellPoints->GetPoint(i); memcpy(vertices[i], aVert, 3*sizeof(double)); } double vol = vtkTetra::ComputeVolume(vertices[0], vertices[1], vertices[2], vertices[3]); if (abs(vol)>1.0e-10) { planar = false; } } Of course, I am not urging you to try this out. My theory is that reading is done in float, and the vtkPolyData arithmetic is in double; when storing the read points to the vtkPolyData points, the latter are not initialized with 0 and some residual non-zero digits of small order are preserved. For some real-life examples, the errors are even bigger (10^(-6)); you can imagine the influence of these errors to precision-sensible computations... For the moment, I see no way to eliminate this effect. Petru -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: testPolydata07.vtk URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: testPolydata08.vtk URL: From powermech at hanmail.net Tue Aug 24 04:42:05 2004 From: powermech at hanmail.net (=?EUC-KR?B?wLq6+7+svu4=?=) Date: Tue, 24 Aug 2004 17:42:05 +0900 (KST) Subject: [vtkusers] Qt GUI + vtk Message-ID: <20040824174205.HM.000000000009uHN@wwl192.hanmail.net> An HTML attachment was scrubbed... URL: From arbvtk at yahoo.fr Tue Aug 24 04:57:42 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Tue, 24 Aug 2004 10:57:42 +0200 (CEST) Subject: [vtkusers] Qt GUI + vtk In-Reply-To: <20040824174205.HM.000000000009uHN@wwl192.hanmail.net> Message-ID: <20040824085742.66491.qmail@web25206.mail.ukl.yahoo.com> Hi, My preferred one is this one : http://www.matthias-koenig.net/vtkqt/ ???????? wrote: p {margin-top:0px;margin-bottom:0px;} Hi~ I wanna Qt GUI library with vtk. In vtk Examples directory, some GUI examples exists ( Motif, Python, Tcl, Win32 ) But I don't khow how I connect vtk with Qt. If someone know the answer, please reply it. "???? ??????, Daum" http://www.daum.net ?????????? ???? ?????????? ???????? ???? ??????????? ???? ????,?????? ?????? ?????? ?????? ???? ????!--> _______________________________________________ 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 Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From vipul at sahajanandsoftware.com Tue Aug 24 04:49:54 2004 From: vipul at sahajanandsoftware.com (Vipul) Date: Tue, 24 Aug 2004 14:19:54 +0530 Subject: [vtkusers] Problem in Quadric CLustering Message-ID: <001e01c489b7$612cc140$060000c0@vipul> Vipul ChotaliyaHi VTK Users, I m new to VTK. I have main two problems; 1) I have one problem regarding quadric clustering; I am applying quadric clustering on my imagedata no. of times by coding . but each time I have to set UseInputPoints to ON. then I will get proper data after algorithm. if I am setting UseInputPoints to OFF then I was unable to get Image. 2) And after applying quadric clustering algo. I was unable to get new data directly. So I have to use vtkPolyDatawriter (which is write data to file) --> give vtkquadricclustering output to vtkPolyDatawriter --> then write it to file. -> after writing into file I am able to get data. suggest me short to way to get directly processed data.. for your reference my code is as below ************************************************* FOr reference my code is as below::: vtkQuadricClustering *vtkQClust = vtkQuadricClustering::New(); vtkPolyDataWriter *writer=vtkPolyDataWriter::New(); vtkQClust->SetInput(OutPut); vtkQClust->SetNumberOfXDivisions(nFactorX); vtkQClust->SetNumberOfYDivisions(nFactorY); vtkQClust->SetNumberOfZDivisions(nFactorZ); if(nNoOfTimes==1) { vtkQClust->UseFeatureEdgesOff (); vtkQClust->UseInputPointsOn(); //give me soluting in which way I can set this to ON vtkQClust->UseFeaturePointsOff(); vtkQClust->CopyCellDataOff(); } else { vtkQClust->UseFeatureEdgesOn (); vtkQClust->UseInputPointsOn(); vtkQClust->UseFeaturePointsOn(); vtkQClust->CopyCellDataOff(); } OutPut = vtkQClust->GetOutput(); //writer->GetInput(); writer->SetInput(OutPut); bProcessAhead=FALSE; writer->SetFileName(pst1); float fPtArray[5000][3]; //writer->SetInput(cube); //printf("i=%d %d\n",i+1,writer->Getput()->GetPolys()->GetNumberOfCells()); iData[1]=writer->GetInput()->GetNumberOfPolys(); writer->Write(); iData[1]=writer->GetInput()->GetNumberOfPolys(); OutPut = writer->GetInput(); ***************************************** "If you look at what you do not have in life, you don't have anything" "If you look at what you have in life, you have everything" ***************************************** Vipul Chotaliya (Software Engineer) Sahajanand Software Pvt. Ltd., Gandhinagar, Gujarat INDIA. Cell No :- +91-98980 95309 Mailto:- vipul at sahajanandsoftware.com Web:- www.sahajanandsoftware.com ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From sscomp2004 at yahoo.com.au Tue Aug 24 07:32:10 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Tue, 24 Aug 2004 21:32:10 +1000 (EST) Subject: [vtkusers] Python wrapper...(how to use?, how to compile?, where is source code?) Message-ID: <20040824113210.16341.qmail@web61109.mail.yahoo.com> Python wrapping doesnt seem to work in the win32 binary distribution (Could someone tell me how to do this if they know how?) When I use cmake to create the make files it cannot find the source code for everything. particularly I want to use python to call vtk. Is there some collection of source code that contains everything that is needed to get everything working, if not where do I get the appropriate source code to at least do the above. Thanks Tahwwhat --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From berninho1 at hotmail.com Tue Aug 24 08:26:04 2004 From: berninho1 at hotmail.com (Bernhard Mayrhofer) Date: Tue, 24 Aug 2004 14:26:04 +0200 Subject: [vtkusers] 3dim -> 2dim image to register Message-ID: Hi, I have two 3D datasets and i want to register points using color information. I thought about finding points around an initial point usind vtkPointFinder, converting xyz to 2dim pixelvalues. I intend to pass this to a ITK image, which i can register using some ITK-classes. Now for me it is interesting if there exists somewhere methods which makes this procedure easier and faster. E.g. I used vtkPointLocator before, and found that it is slow with large data sets. I assume that my idea is very inefficient. In short words: I want to create images which I want to register (with ITK). Is there an easy and fast way to do this? Thanks Bernhard -------------- next part -------------- An HTML attachment was scrubbed... URL: From berklist at nycap.rr.com Tue Aug 24 08:48:03 2004 From: berklist at nycap.rr.com (Berk Geveci) Date: Tue, 24 Aug 2004 08:48:03 -0400 Subject: [vtkusers] Multiple scalars in vtkPolyData In-Reply-To: References: Message-ID: <1093351683.32223.9.camel@silverymoon> Here is what you do: * Create a sub-class of vtkDataArray for each scalar you have * (optional) Assign them names with SetName() * Add them to point or cell data with AddArray: output->GetPointData()->AddArray(array) * Set one of them to be the default scalars: output->GetPointData()->SetActiveScalars(array_name) Alternatively, you can add the default scalars with output->GetPointData()->SetScalars() which internally (sort of) does the following: output->GetPointData()->AddArray(array) output->GetPointData()->SetActiveScalars(array) vtkPLOT3DReader in IO does similar things. To later set the default scalars in a VTK pipeline, use vtkAssignAttribute. To set which scalar to color by, use one of the methods in the mapper: SetScalarModeToXXX() ColorByComponent() SelectColorArray() There are also special methods in the lookup table. -Berk On Mon, 2004-08-23 at 18:57, Charles Boivin wrote: > Hello all, > > I am writing a reader for my own data format; I am using a polygonal > data set. I have been reading the various material in the VTK books (in > particular, chapter 5 in "The Visualization Toolkit"), but I am missing > some information here. > > I have no problems reading the geometry/topology from my files and > displaying them properly. However, I am struggling a bit with loading > point and cell data. In particular, the examples in chapter 5 always > only deal with one scalar for the point or cell data. How do I load > multiple scalars? And this also begs another question: how can I select > which one I want to display once I have been able to load several ones? > > Similarly, can multiple vectors be loaded? > > It seems as if functions SetActiveScalars(name) and GetScalars(name) > are to be used here... but in what order should I use them? Do I have to > specify how many scalars I have before I start making calls to > vtkPolyData::GetPointData()->SetScalars()? I am a bit confused here... > > I would have thought that something along the lines of: > > Loop over all scalars > SetActiveScalars(ScalarName[i]) > Set the values for the scalar for every point > GetPointData()->SetScalars(...) > end loop over scalars > > would work, but I can't get things to display quite properly. Could > anyone confirm whether this approach makes sense, or point towards an > example where multiple scalars are being defined? I guess I might also > have errors elsewhere in the code... > > I apologize if things sound a bit unorganized, but I am a bit confused > with this at the moment. Any help would be appreciated. > > Thank you, > > Charles Boivin > _______________________________________________ > 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 -- Berk Geveci From arbvtk at yahoo.fr Tue Aug 24 08:52:13 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Tue, 24 Aug 2004 14:52:13 +0200 (CEST) Subject: [vtkusers] Python wrapper...(how to use?, how to compile?, where is source code?) In-Reply-To: <20040824113210.16341.qmail@web61109.mail.yahoo.com> Message-ID: <20040824125213.59365.qmail@web25203.mail.ukl.yahoo.com> Hi, Did you install Python C API ? What are the errors ? s comp wrote: Python wrapping doesnt seem to work in the win32 binary distribution (Could someone tell me how to do this if they know how?) When I use cmake to create the make files it cannot find the source code for everything. particularly I want to use python to call vtk. Is there some collection of source code that contains everything that is needed to get everything working, if not where do I get the appropriate source code to at least do the above. Thanks Tahwwhat --------------------------------- Find local movie times and trailers on Yahoo! Movies. _______________________________________________ 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 Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.malaterre at kitware.com Tue Aug 24 10:04:00 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Tue, 24 Aug 2004 10:04:00 -0400 Subject: [vtkusers] multiple xy plots? In-Reply-To: <412A33C0.1030506@veccsa.com> References: <10D4B732-F486-11D8-82B3-000A95BAA698@earthlink.net> <412A0598.5050502@veccsa.com> <412A0C2F.80509@kitware.com> <412A33C0.1030506@veccsa.com> Message-ID: <412B4AD0.6060106@kitware.com> Emiliano, This is fixed in CVS: $ cvs ci /opt/VTK/VTK/Hybrid Checking in vtkXYPlotActor.cxx; /cvsroot/VTK/VTK/Hybrid/vtkXYPlotActor.cxx,v <-- vtkXYPlotActor.cxx new revision: 1.54; previous revision: 1.53 done http://vtk.org/cgi-bin/viewcvs.cgi/Hybrid/vtkXYPlotActor.cxx?root=VTK Thanks again Mathieu Emiliano Beronich wrote: > Hi Mathieu, > > These lines reproduce the problem on tcl. > > vtkRenderWindow rw > vtkRenderer re > vtkXYPlotActor pa > > vtkImageSinusoidSource cosSrc > cosSrc SetWholeExtent 0 255 0 0 0 0 > cosSrc SetPeriod 256 > > vtkImageSinusoidSource sinSrc > sinSrc SetWholeExtent 0 255 0 0 0 0 > sinSrc SetPeriod 256 > sinSrc SetPhase 1.5708 > > pa AddInput [cosSrc GetOutput] > pa AddInput [sinSrc GetOutput] > > #~ try uncommenting one of these lines > #~ pa RemoveInput [sinSrc GetOutput] > #~ pa RemoveInput [cosSrc GetOutput] > > re AddActor pa > rw AddRenderer re > rw Render > > > Regards, > Emiliano > > > > Mathieu Malaterre wrote: > >> Emiliano >> >> I have entered this as bug #1111 in our bug tracker: >> >> http://vtk.org/Bug/bug.php?op=show&bugid=1111 >> >> Is it possible you send us a simple tcl/python script that >> reprodue the bug. >> >> Thanks >> Mathieu >> >>> >>> But I have found troubles when I want to remove a curve. I have found >>> a bug on vtkXYPlotActor class on the method RemoveInput that may need >>> to be fixed. I attach the modified class that fix this problem. >>> >>> Regards, >>> Emiliano >>> >>> >>> >>> David Bernstein wrote: >>> >>>> >>>> Hi All, Can someone post a simple C++ example showing how to get two >>>> or more >>>> sets of data plotted in the same X-Y plot? I'm importing the data >>>> in the form of >>>> stl vectors. >>>> >>>> Thanks, >>>> Dave Bernstein >>>> >>>> _______________________________________________ >>>> 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: >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers >> >> > From Jared.Cohen at noaa.gov Tue Aug 24 10:20:34 2004 From: Jared.Cohen at noaa.gov (Jared Cohen) Date: Tue, 24 Aug 2004 10:20:34 -0400 Subject: [vtkusers] texturing a sphere Message-ID: <412B4EB2.3010101@noaa.gov> I had this exact problem. It turns out that the regular vtkSphereSource class has no normals, so it can't be given a texture. And no, you can't just add normals using the vtkPolyDataNormals class; I tried that. In the end, there were only 2 ways to make this work: 1) Use a vtkTexturedSphereSource class instead of a regular SphereSource. This is the simplest way, but the downside is that you can only create full spheres, not partial spheres. 2) A more flexible, but more complex way, is to create a PLANE (using vtkPlaneSource), and then warp it into a spherical shape. This is done by passing it through a vtkTransformPolyDataFilter that uses a vtkSphericalTransform. The correct dimensions for the plane (if you're creating a full sphere) can be obtained like this: //--------------------------------------------------------------------- deg2rad = PI / 180 Radius = 1.0 (or whatever you want for it) Theta = Longitude angle min_theta = 0.0 * deg2rad = 0.0 max_theta = 360.0 * deg2rad = 2.0 * PI Phi = Latitude angle min_phi = 0.0 * deg2rad = 0.0 max_phi = 180.0 * deg2rad = PI plane = vtkPlaneSource() plane.SetOrigin(radius, max_phi, min_theta) plane.SetPoint1(radius, max_phi, max_theta) plane.SetPoint2(radius, min_phi, min_theta) plane.SetXResolution(36) //or whatever you want, but don't make it too low plane.SetYResolution(36) //ditto plane.Update() //--------------------------------------------------------------------- Now that you have your plane set to the correct size, you warp it into a sphere like this: //--------------------------------------------------------------------- transform = vtkSphericalTransform() tpoly = vtkTransformPolyDataFilter() tpoly.SetInput(plane.GetOutput()) tpoly.SetTransform(transform) tpoly.Update() mapper = vtkPolyDataMapper() mapper.SetInput(tpoly.GetOutput()) ...... //--------------------------------------------------------------------- And then just go from there as usual. Hope that helps :-) >Hi all, I'm trying to texture a sphere with a PNG image. I do this with >code similar to > >PNGReader->SetFileName("file.png"); >Texture->SetInput(PNGReader->GetOutput()); >Texture->InterpolateOn(); //also tried w/o setting this >SphereSource->SetCenter(0,0,0); >SphereSource->SetRadius(1); >PolyDataMapper->SetInput(SphereSource->GetOutput()); >Actor->SetMapper(PolyDataMapper); >Actor->SetTexture(Texture); > >My sphere changes a deep blue when I enable the texture code, but I do >not see the actual texture on it. The actual image is small and of even >dimensions, > >earth.png: PNG image data, 32 x 32, 16-bit/color RGB, non-interlaced > >so I do not believe this to be a power-of-2 issue or problem loading a >texture that is beyond what my opengl implementation can do. > >Perhaps most importantly, I tried running the 'TPlane.py' example and >got some disappointing output (in addition to no visible texture on the >plane): > >ERROR: In /home/tfogal/tarballs/VTK/Rendering/vtkOpenGLTexture.cxx, >line 111 >vtkOpenGLTexture (0x6640d0): No scalar values found for texture input! > >Any ideas? > >-tom > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Charles.Boivin at rwdiwest.com Tue Aug 24 11:35:53 2004 From: Charles.Boivin at rwdiwest.com (Charles Boivin) Date: Tue, 24 Aug 2004 09:35:53 -0600 Subject: [vtkusers] Re: Multiple scalars in vtkPolyData Message-ID: Hi Goodwin and Berk, Thanks a lot to the both of you for your answers. They both made things much clearer... and yes, it makes a lot more sense that way! :-) I will go ahead and work away on this... Should go a lot smoother now that I know how to do things! :-) Thanks again, Charles >>> "Goodwin Lawlor" 08/23/04 05:21pm >>> Hi Charles, Have a look at the vtkFieldData class > How do I load multiple scalars? polydata->GetPointData->AddArray(vtkDataArray *array) polydata->GetCellData->AddArray(vtkDataArray *array) > And this also begs another question: how can I select which one I want > to display once I have been able to load several ones? polydata->GetPointData->SetActiveScalars ( const char * name ) polydata->GetCellData->SetActiveScalars ( const char * name ) make sure to give you vtkDataArray a name... hth Goodwin >>> Berk Geveci 08/24/04 06:48am >>> Here is what you do: * Create a sub-class of vtkDataArray for each scalar you have * (optional) Assign them names with SetName() * Add them to point or cell data with AddArray: output->GetPointData()->AddArray(array) * Set one of them to be the default scalars: output->GetPointData()->SetActiveScalars(array_name) Alternatively, you can add the default scalars with output->GetPointData()->SetScalars() which internally (sort of) does the following: output->GetPointData()->AddArray(array) output->GetPointData()->SetActiveScalars(array) vtkPLOT3DReader in IO does similar things. To later set the default scalars in a VTK pipeline, use vtkAssignAttribute. To set which scalar to color by, use one of the methods in the mapper: SetScalarModeToXXX() ColorByComponent() SelectColorArray() There are also special methods in the lookup table. -Berk _______________________________________________ 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 kshivann at engineering.uiowa.edu Tue Aug 24 11:48:21 2004 From: kshivann at engineering.uiowa.edu (kshivann at engineering.uiowa.edu) Date: Tue, 24 Aug 2004 10:48:21 -0500 Subject: [vtkusers] create a stand alone executable in vtk and mfc Message-ID: <1093362501.412b6345eeedf@webmail.engineering.uiowa.edu> hi all, i am using vtk in mfc(vc++ 6.0). i want to create a stand alone executable. the default executable the vc++ creates requires dll from both vtk and mfc. is there a way to generate an executable without further need of anymore executable. thanks kiran From arbvtk at yahoo.fr Tue Aug 24 12:17:52 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Tue, 24 Aug 2004 18:17:52 +0200 (CEST) Subject: [vtkusers] create a stand alone executable in vtk and mfc In-Reply-To: <1093362501.412b6345eeedf@webmail.engineering.uiowa.edu> Message-ID: <20040824161752.69670.qmail@web25206.mail.ukl.yahoo.com> Hi, Compile VTK as a static linked library, then use this libs and the static version of the MFC lib in your project. kshivann at engineering.uiowa.edu wrote: hi all, i am using vtk in mfc(vc++ 6.0). i want to create a stand alone executable. the default executable the vc++ creates requires dll from both vtk and mfc. is there a way to generate an executable without further need of anymore executable. thanks kiran _______________________________________________ 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 Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From tfogal at apollo.sr.unh.edu Tue Aug 24 14:53:40 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Tue, 24 Aug 2004 14:53:40 -0400 Subject: [vtkusers] BGR -> RGB conversion Message-ID: <200408241853.i7OIre7a011976@apollo.sr.unh.edu> So I've gotten a textured sphere working (thanks, Jared!) but it looks as if vtk is assuming the image is in BGR format when it is actually in RGB format: tfogal at thetis data $ file earth.png earth.png: PNG image data, 512 x 256, 16-bit/color RGB, non-interlaced The pipeline is TexturedSphereSource -> PolyDataMapper -> Actor, and PNGReader -> Texture -> (aforementioned) Actor. Perhaps that type of image isn't supported? Maybe I should convert(1) to another format? Or is there just a function call I'm missing somewhere? -tom From Charles.Boivin at rwdiwest.com Tue Aug 24 17:24:27 2004 From: Charles.Boivin at rwdiwest.com (Charles Boivin) Date: Tue, 24 Aug 2004 15:24:27 -0600 Subject: [vtkusers] Question on vtkDataArray::GetRange() and doubles... Message-ID: Hello all! Still playing with my own data reader, and I have yet another question for you gurus. I have tried to see if this had been discussed before on this mailing list, but could not find a relevant question when reading through search results. I want to know what the range of the values that I have just read is. To do this, I use something like: pArray = pPointData->GetArray(iArrayNumber); (where pPointData is vtkPolyData::GetOutput()->GetPointData() ... ) and then using: float afRange[2]; pArray->GetRange(afRange, iComponentNumber); I can get the range in afRange[]. This works fine. My question has to do with the different data types... The array that I have stored in vtkPolyData is actually a double array (vtkDoubleArray). Yet, there does not seem to be a way to get the range returned as doubles. Am I missing something, or is the loss of accuracy not too important there when it comes to the range of scalar values? Thank you in advance for your answers... Charles Boivin From amy.henderson at kitware.com Tue Aug 24 17:30:10 2004 From: amy.henderson at kitware.com (Amy Henderson) Date: Tue, 24 Aug 2004 17:30:10 -0400 Subject: [vtkusers] Question on vtkDataArray::GetRange() and doubles... In-Reply-To: References: Message-ID: <6.1.2.0.2.20040824172619.03a6f1e0@pop.biz.rr.com> What version of VTK are you using? For the VTK 4.4 release, a lot of work was done to move from doing most computations in float to doing them with doubles (precisely for the reason you mentioned -- too much precision being lost). The GetRange method of vtkDataArray is an example of this change being exposed in the VTK API. - Amy At 05:24 PM 8/24/2004, Charles Boivin wrote: >Hello all! > >Still playing with my own data reader, and I have yet another question >for you gurus. I have tried to see if this had been discussed before on >this mailing list, but could not find a relevant question when reading >through search results. > >I want to know what the range of the values that I have just read is. >To do this, I use something like: > >pArray = pPointData->GetArray(iArrayNumber); > >(where pPointData is vtkPolyData::GetOutput()->GetPointData() ... ) > >and then using: > >float afRange[2]; >pArray->GetRange(afRange, iComponentNumber); > >I can get the range in afRange[]. This works fine. > >My question has to do with the different data types... The array that I >have stored in vtkPolyData is actually a double array (vtkDoubleArray). >Yet, there does not seem to be a way to get the range returned as >doubles. Am I missing something, or is the loss of accuracy not too >important there when it comes to the range of scalar values? > >Thank you in advance for your answers... > >Charles Boivin >_______________________________________________ >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 Charles.Boivin at rwdiwest.com Tue Aug 24 17:36:37 2004 From: Charles.Boivin at rwdiwest.com (Charles Boivin) Date: Tue, 24 Aug 2004 15:36:37 -0600 Subject: [vtkusers] Question on vtkDataArray::GetRange() anddoubles... Message-ID: Hello Amy, Thank you for your reply. I forgot to mention that I am using v4.2 ... So moving up to 4.4 will solve that particular aspect. That's good to know! Thank you for your time. And I guess it made sense that I could not find a function that returned doubles in the version I have.. :-) Charles >>> Amy Henderson 08/24/04 03:30pm >>> What version of VTK are you using? For the VTK 4.4 release, a lot of work was done to move from doing most computations in float to doing them with doubles (precisely for the reason you mentioned -- too much precision being lost). The GetRange method of vtkDataArray is an example of this change being exposed in the VTK API. - Amy _______________________________________________ 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 Eric.Harlow at edwards.af.mil Tue Aug 24 22:05:29 2004 From: Eric.Harlow at edwards.af.mil (Harlow Eric D Contr 412 TW/ENR) Date: Tue, 24 Aug 2004 19:05:29 -0700 Subject: [vtkusers] using vtkSmartPtrs Message-ID: <7D4FEEC34EF66843830C74D10D651969021B8CF1@fsfspm38> 1. How common is it to wrap vtk objects in vtkSmartPtrs? This is causing a memory leak in our code. vtkSmartPtr RenderWindow_; 2. We are placing all of the VTK functions in our VTK Application in a C++ dll library so that the end user doesn't have to be vtk expert. Are there some VTK developers out there that have had success in wrapping the VTK member functions/objects in a C++ MFC dll? It was easy enough when we were building our test Application by calling the vtk functions either from the MFC ViewClass or classes in the Application project space. Thanks -Eric From Robert.Day at health.wa.gov.au Tue Aug 24 22:11:56 2004 From: Robert.Day at health.wa.gov.au (Day, Robert) Date: Wed, 25 Aug 2004 10:11:56 +0800 Subject: [vtkusers] ATI Petition for Adequate Drivers in Linux Message-ID: <16D567C9D19AD6119ED80006293871517C6F93@nt001mesrp.rph.health.wa.gov.au> I suspect that was a typo for Radeon, which ATI do make in a bewildering variety of forms, see . That still doesn't excuse the typo, which would devalue any serious attempt to influence the company. personally, I'd be happy enough if they would fix the windows XP drivers for their laptop cards. In my case I have a Toshiba; ATI says Toshiba do the drivers, Toshiba hasn't released a new one in ages, the current one is broken for several mainstream apps (and vtk), although not terminally. I have to say nVidia does a much better job at this part of the customer satisfaction equation. Rob. Charl P. Botha wrote: > > Mathieu Malaterre wrote: > > You can go there to sign it: > > > > http://www.petitiononline.com/atipet/petition.html > > > Raedon chips. > > I'm not sure ATI is going to take this too seriously. They have no > products that go by the name of "Raedon" - this product (perhaps from > another manufacturer?) is referred to throughout the whole petition. > > :) > > -- > charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From seanm at nmr.mgh.harvard.edu Tue Aug 24 22:21:54 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Tue, 24 Aug 2004 22:21:54 -0400 Subject: [vtkusers] using vtkSmartPtrs In-Reply-To: <7D4FEEC34EF66843830C74D10D651969021B8CF1@fsfspm38> References: <7D4FEEC34EF66843830C74D10D651969021B8CF1@fsfspm38> Message-ID: <412BF7C2.5030009@nmr.mgh.harvard.edu> Eric, You may be overlooking *all* incrementing of your object's reference count. vtkSmartPtr increments its object's reference count on construction and decrements it on destruction, but you may be forgetting that a vtkObject sets its own reference count to 1 in its constructor. e.g. void f() { vtkSmartPtr ptr(vtkObject::New()); // Even though the smart pointer is destroyed when this function // goes out of scope and consequently decrements the reference count // of the object created above, the object itself is not destroyed. // Its reference count is still 1 and, therefore, a memory leak! } To avoid such a leak, the above function should be composed like this: void f() { vtkObject* object = vtkObject::New(); vtkSmartPtr ptr(object); object->Delete(); // The object's reference count is now 1 // The smart pointer as well as the object that it references will // be destroyed when this function goes out of scope. } Hopefully, your woes are a simple matter of book keeping. If you are already addressing the issue that I have outlined, something more sinister may be at work. -Sean Harlow Eric D Contr 412 TW/ENR wrote: > 1. How common is it to wrap vtk objects in vtkSmartPtrs? This is causing a > memory leak in our code. > > vtkSmartPtr RenderWindow_; > > > 2. We are placing all of the VTK functions in our VTK Application in a C++ > dll library so that the end user doesn't have to be vtk expert. Are there > some VTK developers out there that have had success in wrapping the VTK > member functions/objects in a C++ MFC dll? It was easy enough when we were > building our test Application by calling the vtk functions either from the > MFC ViewClass or classes in the Application project space. > > Thanks > > -Eric From raladie00 at yahoo.co.uk Tue Aug 24 23:03:20 2004 From: raladie00 at yahoo.co.uk (=?iso-8859-1?q?adi=20ralf?=) Date: Wed, 25 Aug 2004 04:03:20 +0100 (BST) Subject: [vtkusers] import data .dat into vtk Message-ID: <20040825030320.88063.qmail@web25003.mail.ukl.yahoo.com> hi all, i'm a new user of vtk which i never work with vtk before. i would like to import a list of data in .dat type into vtk. can vtk identify auto matically which dat is for x and y thanks for any help regards, ija ___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com From rohan_vtk at yahoo.com Wed Aug 25 00:06:39 2004 From: rohan_vtk at yahoo.com (Rohan Naukudkar) Date: Tue, 24 Aug 2004 21:06:39 -0700 (PDT) Subject: [vtkusers] Reader needed for reading the files in Analyze format. Message-ID: <20040825040639.84184.qmail@web61307.mail.yahoo.com> Hi all, I have a file in Analyze file format. please if any one has the reader for these formats please let me know. If anybody know some link about where i can get it....plz let me know...I am stuck at this point and i cant proceed further.. regards, Rohan --------------------------------- Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sscomp2004 at yahoo.com.au Wed Aug 25 02:39:30 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Wed, 25 Aug 2004 16:39:30 +1000 (EST) Subject: [vtkusers] Python wrapper...(how to use?, how to compile?, where is source code?) In-Reply-To: <20040824125213.59365.qmail@web25203.mail.ukl.yahoo.com> Message-ID: <20040825063930.54797.qmail@web61103.mail.yahoo.com> Ok I don't really know what I'm doing then. What is Python C API? Some errors include: pYTHON_DEBUG_LIBRARY-NOT FOUND PYTHON_EXECUTABLE NOT FOUND . . . sIMILARLY i CANNOT COMPILE TCL OR JAVA WRAPPERS Thanks, Tahwwhat REGAT-BARREL Aur?lien wrote: Hi, Did you install Python C API ? What are the errors ? s comp wrote: Python wrapping doesnt seem to work in the win32 binary distribution (Could someone tell me how to do this if they know how?) When I use cmake to create the make files it cannot find the source code for everything. particularly I want to use python to call vtk. Is there some collection of source code that contains everything that is needed to get everything working, if not where do I get the appropriate source code to at least do the above. Thanks Tahwwhat --------------------------------- Find local movie times and trailers on Yahoo! Movies. _______________________________________________ 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 Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. T?l?chargez GRATUITEMENT ici ! --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From diaoxianfen at asisz.com Wed Aug 25 04:13:35 2004 From: diaoxianfen at asisz.com (diaoxianfen) Date: Wed, 25 Aug 2004 16:13:35 +0800 Subject: [vtkusers] how to display image without zooming Message-ID: <000801c48a7b$6b7ab1b0$9005a8c0@diaoxianfen> Hello,every one I tried to display 3D image data slice by slice along z axial.The program is as follows. metaImageReader->SetFileName("E:/TempImage/0.1resolution/ConThreshSegDdicomSe3Edge.mhd");//e:/tempimage/sampledcochleaConThreshSeg.mhd metaImageReader->Update(); int xyzdim[3]; metaImageReader->GetOutput()->GetDimensions(xyzdim); int xd=xyzdim[0]-1; int yd=xyzdim[1]-1; int zd=xyzdim[2]-1; imageActor->SetInput(metaImageReader->GetOutput()); imageActor->VisibilityOn(); imageActor->SetDisplayExtent(0,xd,0,yd,120,120); imageActor->InterpolateOff(); Renderer->AddActor(imageActor); Renderer->SetBackground(0.0,0.1,0.2); Interactor->SetRenderWindow(RenderWindow); I really get what I want.But the image is zoomed.I want to remove the zooming function.But I don't know how to do.That is,how many pixel in the image slice,there are the same number pixel point on the screen. Moreover,I want to display the image from the (0,0)point on the screen.How can I get that? Any information will be appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From liuzhiqiang_cnu at 163.com Wed Aug 25 04:41:24 2004 From: liuzhiqiang_cnu at 163.com (=?gb2312?B?bGl1emhpcWlhbmdfY251?=) Date: Wed, 25 Aug 2004 16:41:24 +0800 (CST) Subject: [vtkusers] help!!! Message-ID: <412C50B4.00012D.07438@m225.163.com> Hello,vtkusers: I have many points got with a laser scanner.I?want to reconstruct a surface by them. I did that by using vtkDelaunay3D, but I see that the surface is not smoothing.So I use vtkSmoothPolyDataFilter to smooth it.Indeed, few changes happened and the surface is not smoothing still. who can tell me the reasons or how to realize that I desired? Any help are welcomed and thank you very much!! for(i=0;iInsertPoint(i,points_coord[i][0],points_coord[i][1],points_coord[i][2]); } vtkPolyData *profile=vtkPolyData::New(); profile->SetPoints(points); vtkDelaunay3D *delpts = vtkDelaunay3D::New(); delpts->SetInput(profile); //data: my points delpts->SetTolerance(0.1); delpts->SetAlpha(0.02); vtkGeometryFilter *gf=vtkGeometryFilter::New(); gf->SetInput(delpts->GetOutput()); vtkReverseSense *reverse = vtkReverseSense::New(); reverse->SetInput(gf->GetOutput()); reverse->ReverseCellsOn(); reverse->ReverseNormalsOn(); reverse->Update(); vtkDecimatePro *deci=vtkDecimatePro::New(); deci->SetInput(reverse->GetOutput()); deci->SetTargetReduction(0.1); deci->PreserveTopologyOn(); vtkSmoothPolyDataFilter *mooth=vtkSmoothPolyDataFilter::New(); mooth->SetInput(deci->GetOutput()); //mooth->SetConvergence(0.000001); mooth->SetNumberOfIterations(100); vtkPolyDataNormals *normals=vtkPolyDataNormals::New(); normals->SetInput(mooth->GetOutput()); normals->FlipNormalsOn(); vtkPolyDataMapper *cloudMapper = vtkPolyDataMapper::New(); cloudMapper->SetInput(normals->GetOutput()); ------------------------------------------------------------------------------------- ????"????"????? http://smspop.163.com/special/jay200408/index2.html From cpbotha at gmail.com Wed Aug 25 05:18:20 2004 From: cpbotha at gmail.com (Charl P. Botha) Date: Wed, 25 Aug 2004 11:18:20 +0200 Subject: [vtkusers] ATI Petition for Adequate Drivers in Linux In-Reply-To: <16D567C9D19AD6119ED80006293871517C6F93@nt001mesrp.rph.health.wa.gov.au> References: <16D567C9D19AD6119ED80006293871517C6F93@nt001mesrp.rph.health.wa.gov.au> Message-ID: <8e138ee404082502187917aa8e@mail.gmail.com> On Wed, 25 Aug 2004 10:11:56 +0800, Day, Robert wrote: > I suspect that was a typo for Radeon, which ATI do make in a bewildering variety of forms, see . > Ahem, I was joking, hence the smiley at the end of my mail. > That still doesn't excuse the typo, which would devalue any serious attempt to influence the company. personally, I'd be happy enough if they would fix the windows XP drivers for their laptop cards. In my case I have a Toshiba; ATI says Toshiba do the drivers, Toshiba hasn't released a new one in ages, the current one is broken for several mainstream apps (and vtk), although not terminally. I have to say nVidia does a much better job at this part of the customer satisfaction equation. > You can't really blame ATI: your vendor, Toshiba in this case, is technically supposed to update your drivers. If your vendor does not respond to your complaints, you can always try the Omega drivers (these are modified Catalyst drivers that also work on laptops). -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From serhatguneyli at yahoo.com Wed Aug 25 05:37:41 2004 From: serhatguneyli at yahoo.com (Serhat Guneyli) Date: Wed, 25 Aug 2004 02:37:41 -0700 (PDT) Subject: [vtkusers] vtkImageViewer --> SetColorWindow , SetColorLevel Message-ID: <20040825093741.52048.qmail@web11901.mail.yahoo.com> Hi all, i try to visualize 2D images via vtkImageViewer (without any change) but the output I obtain is different from the original source. I obtain mostly black screen. can anyone give me some information about SetColorWindow and SetColorLevel methodes. Which parameters should I give so that I visualise the original image?? Thanks in advance, Serhat __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From joeri_vtk at hotmail.com Wed Aug 25 06:28:00 2004 From: joeri_vtk at hotmail.com (Joeri Nicolaes) Date: Wed, 25 Aug 2004 12:28:00 +0200 Subject: [vtkusers] vtkVolume16Reader: change order of axial slices Message-ID: Hi all, I have an application to read in 3D medical image data with vtkVolume16Reader and to show the 3 orthogonal views (A,C,S). My problem is that the CT scanner scanned the body from top to bottom, but I want my z-axis to be oriented from bottom to top! How can I change this with vtkVolume16Reader? Here is my "read-in code": # read in the imagedata (in raw vtk format: converted with dicom2.exe) # image consists of 75 ,512x512 pixels using 16bpp, slices set deltaX 7.105113e-01 set deltaY 7.105113e-01 set deltaZ 5 vtkVolume16Reader reader reader SetDataDimensions 512 512 reader SetDataByteOrderToLittleEndian reader SetFilePrefix "d:/Image/DATARaw/ct" reader SetImageRange 1 75 reader SetDataSpacing $deltaX $deltaY $deltaZ reader Update Has anyone ever encountered the same problem? How to solve it quickly (as you see, I work in Tcl)? Thanks on advance, Joeri, Agfa Gevaert, R&D/TI + 32 (0) 3 444 6429, stajn at agfa.com joeri_vtk at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From arbvtk at yahoo.fr Wed Aug 25 07:34:44 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Wed, 25 Aug 2004 13:34:44 +0200 (CEST) Subject: [vtkusers] ATI Petition for Adequate Drivers in Linux In-Reply-To: <16D567C9D19AD6119ED80006293871517C6F93@nt001mesrp.rph.health.wa.gov.au> Message-ID: <20040825113444.39829.qmail@web25202.mail.ukl.yahoo.com> Hi, A friend could not use VTK on his laptop, Windows XP quickly crashed. After few research, we found that the ATI driver was guilty. As far as I know, there is still no update. Don'y buy ATI! "Day, Robert" wrote: I suspect that was a typo for Radeon, which ATI do make in a bewildering variety of forms, see . That still doesn't excuse the typo, which would devalue any serious attempt to influence the company. personally, I'd be happy enough if they would fix the windows XP drivers for their laptop cards. In my case I have a Toshiba; ATI says Toshiba do the drivers, Toshiba hasn't released a new one in ages, the current one is broken for several mainstream apps (and vtk), although not terminally. I have to say nVidia does a much better job at this part of the customer satisfaction equation. Rob. Charl P. Botha wrote: > > Mathieu Malaterre wrote: > > You can go there to sign it: > > > > http://www.petitiononline.com/atipet/petition.html > > > Raedon chips. > > I'm not sure ATI is going to take this too seriously. They have no > products that go by the name of "Raedon" - this product (perhaps from > another manufacturer?) is referred to throughout the whole petition. > > :) > > -- > charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ _______________________________________________ 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 Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From arbvtk at yahoo.fr Wed Aug 25 07:42:31 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Wed, 25 Aug 2004 13:42:31 +0200 (CEST) Subject: [vtkusers] Python wrapper...(how to use?, how to compile?, where is source code?) In-Reply-To: <20040825063930.54797.qmail@web61103.mail.yahoo.com> Message-ID: <20040825114231.33425.qmail@web25201.mail.ukl.yahoo.com> Hi, Python C API is the C API which is used to "talk" to the Python interpreter, and VTK needs it to create the Python wrapper. It is the same for Tcl (TCL C API), and I think for Java (maybe it needs JNI). Simply download and install Python for Windows. CMake should then automatically find the bin / libs. But it will not find the debug version of Python lib (because the installer doesn't ship it), so you will get a warning. Ignore it, and compile VTK in Release mode with VC++. It should work. s comp wrote: Ok I don't really know what I'm doing then. What is Python C API? Some errors include: pYTHON_DEBUG_LIBRARY-NOT FOUND PYTHON_EXECUTABLE NOT FOUND . . . sIMILARLY i CANNOT COMPILE TCL OR JAVA WRAPPERS Thanks, Tahwwhat Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From arbvtk at yahoo.fr Wed Aug 25 07:48:30 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Wed, 25 Aug 2004 13:48:30 +0200 (CEST) Subject: [vtkusers] using vtkSmartPtrs In-Reply-To: <7D4FEEC34EF66843830C74D10D651969021B8CF1@fsfspm38> Message-ID: <20040825114830.62079.qmail@web25205.mail.ukl.yahoo.com> Hi, You should use the static method vtkSmartPointer::New to initialize your smartptr. vtkSmartPtr RenderWindow_ = vtkSmartPtr::New(); http://www.vtk.org/pipermail/vtkusers/2004-April/073551.html Harlow Eric D Contr 412 TW/ENR wrote: 1. How common is it to wrap vtk objects in vtkSmartPtrs? This is causing a memory leak in our code. vtkSmartPtr RenderWindow_; 2. We are placing all of the VTK functions in our VTK Application in a C++ dll library so that the end user doesn't have to be vtk expert. Are there some VTK developers out there that have had success in wrapping the VTK member functions/objects in a C++ MFC dll? It was easy enough when we were building our test Application by calling the vtk functions either from the MFC ViewClass or classes in the Application project space. Thanks -Eric _______________________________________________ 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 Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor at ucd.ie Wed Aug 25 08:25:17 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Wed, 25 Aug 2004 13:25:17 +0100 Subject: [vtkusers] Re: ATI Petition for Adequate Drivers in Linux References: <16D567C9D19AD6119ED80006293871517C6F93@nt001mesrp.rph.health.wa.gov.au> <20040825113444.39829.qmail@web25202.mail.ukl.yahoo.com> Message-ID: VTK was crashing with my Raedon Mobility (tm) graphics card... I narrowed the problem down to rendering antialiased fonts. To get around the problem you can either switch off antialiasing or get a recent cvs version of VTK... Sebastien recently overhauled the textmappers. Goodwin "REGAT-BARREL Aur?lien" wrote in message news:20040825113444.39829.qmail at web25202.mail.ukl.yahoo.com... Hi, A friend could not use VTK on his laptop, Windows XP quickly crashed. After few research, we found that the ATI driver was guilty. As far as I know, there is still no update. Don'y buy ATI! "Day, Robert" wrote: I suspect that was a typo for Radeon, which ATI do make in a bewildering variety of forms, see . That still doesn't excuse the typo, which would devalue any serious attempt to influence the company. personally, I'd be happy enough if they would fix the windows XP drivers for their laptop cards. In my case I have a Toshiba; ATI says Toshiba do the drivers, Toshiba hasn't released a new one in ages, the current one is broken for several mainstream apps (and vtk), although not terminally. I have to say nVidia does a much better job at this part of the customer satisfaction equation. Rob. Charl P. Botha wrote: > > Mathieu Malaterre wrote: > > You can go there to sign it: > > > > http://www.petitiononline.com/atipet/petition.html > > > Raedon chips. > > I'm not sure ATI is going to take this too seriously. They have no > products that go by the name of "Raedon" - this product (perhaps from > another manufacturer?) is referred to throughout the whole petition. > > :) > > -- > charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ _______________________________________________ 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 Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis. T?l?chargez GRATUITEMENT ici ! _______________________________________________ This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers From ppau at risc.uni-linz.ac.at Wed Aug 25 09:11:27 2004 From: ppau at risc.uni-linz.ac.at (Petru Pau) Date: Wed, 25 Aug 2004 15:11:27 +0200 Subject: [vtkusers] vtk application ends with error References: Message-ID: <412C8FFF.5000600@risc.uni-linz.ac.at> After succesfully computing all it has to compute, when it's time for it to end, my application (which uses vtk heavily) issues a message: "Unhandled exception at 0x.... in streamlines.exe: 0XC000...05. Access violation reading location 0X00..0018." I am posting this problem here because it seems that some vtk classes are involved, as you can see from the call stack, in the second attached image. My application (streamlines.exe) is a windows application, debug version, built with runtime libraries "multithreaded debug dll". I would be very grateful for any help, hint or advice. Petru -------------- next part -------------- A non-text attachment was scrubbed... Name: stak_err.jpg Type: image/jpeg Size: 36114 bytes Desc: not available URL: From goodwin.lawlor at ucd.ie Wed Aug 25 09:14:40 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Wed, 25 Aug 2004 14:14:40 +0100 Subject: [vtkusers] Re: vtkVolume16Reader: change order of axial slices References: Message-ID: Hi Joeri, You need to set a permutation transform in the reader. The file SliceOrder.tcl will give you an idea of the one you need. You can apply the transformation either in the reader (as below) or with vtkTransformFilter after the reader. try something like this: source /vtk/graphics/testing/tcl/sliceorder.tcl reader SetTransform si hth Goodwin "Joeri Nicolaes" wrote in message news:BAY1-DAV7uIbK9qk3GR00037281 at hotmail.com... Hi all, I have an application to read in 3D medical image data with vtkVolume16Reader and to show the 3 orthogonal views (A,C,S). My problem is that the CT scanner scanned the body from top to bottom, but I want my z-axis to be oriented from bottom to top! How can I change this with vtkVolume16Reader? Here is my "read-in code": # read in the imagedata (in raw vtk format: converted with dicom2.exe) # image consists of 75 ,512x512 pixels using 16bpp, slices set deltaX 7.105113e-01 set deltaY 7.105113e-01 set deltaZ 5 vtkVolume16Reader reader reader SetDataDimensions 512 512 reader SetDataByteOrderToLittleEndian reader SetFilePrefix "d:/Image/DATARaw/ct" reader SetImageRange 1 75 reader SetDataSpacing $deltaX $deltaY $deltaZ reader Update Has anyone ever encountered the same problem? How to solve it quickly (as you see, I work in Tcl)? Thanks on advance, Joeri, Agfa Gevaert, R&D/TI + 32 (0) 3 444 6429, stajn at agfa.com joeri_vtk at hotmail.com _______________________________________________ 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 Wed Aug 25 10:34:25 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Wed, 25 Aug 2004 10:34:25 -0400 Subject: [vtkusers] Reader needed for reading the files in Analyze format. In-Reply-To: <20040825040639.84184.qmail@web61307.mail.yahoo.com> References: <20040825040639.84184.qmail@web61307.mail.yahoo.com> Message-ID: <412CA371.2020807@kitware.com> Rohan, Are you using also ITK(*)? If so you can use ITK's Analyze reader, and write out in VTK format. HTH Mathieu (*) http://itk.org Rohan Naukudkar wrote: > Hi all, > I have a file in Analyze file format. please if any one has the > reader for these formats please let me know. If anybody know some link > about where i can get it....plz let me know...I am stuck at this point > and i cant proceed further.. > > regards, > Rohan > > ------------------------------------------------------------------------ > Do you Yahoo!? > Win 1 of 4,000 free domain names from Yahoo! Enter now > . > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 arbvtk at yahoo.fr Wed Aug 25 11:20:10 2004 From: arbvtk at yahoo.fr (=?iso-8859-1?q?REGAT-BARREL=20Aur=E9lien?=) Date: Wed, 25 Aug 2004 17:20:10 +0200 (CEST) Subject: [vtkusers] vtk application ends with error In-Reply-To: <412C8FFF.5000600@risc.uni-linz.ac.at> Message-ID: <20040825152010.71906.qmail@web25208.mail.ukl.yahoo.com> Hi, vtk classes don't call exit, it is the C++ runtime lib linked in the VTK dlls which does it in response of the Access violation reading. It is certainly due to incorrect use of some VTK classes, in particular vtk arrays. You should compile VTK in debug mode, and run your app from the debugger. It will directly go to the line of VTK code which crashes. Petru Pau wrote: After succesfully computing all it has to compute, when it's time for it to end, my application (which uses vtk heavily) issues a message: "Unhandled exception at 0x.... in streamlines.exe: 0XC000...05. Access violation reading location 0X00..0018." I am posting this problem here because it seems that some vtk classes are involved, as you can see from the call stack, in the second attached image. My application (streamlines.exe) is a windows application, debug version, built with runtime libraries "multithreaded debug dll". I would be very grateful for any help, hint or advice. Petru > ATTACHMENT part 2 image/jpeg name=stak_err.jpg _______________________________________________ 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 Aur?lien REGAT-BARREL My VTK blog : http://aurelien_regat-barrel.blogspot.com --------------------------------- Cr?ez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Cr?ez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arriv? ! D?couvrez toutes les nouveaut?s pour dialoguer instantan?ment avec vos amis.T?l?chargez GRATUITEMENT ici ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From pallavi.joshi at vanderbilt.edu Wed Aug 25 11:57:39 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Wed, 25 Aug 2004 10:57:39 -0500 Subject: [vtkusers] vtk textbook......URGENT Message-ID: <000c01c48abc$3fb667e0$da593b81@Pallavi> Hi All, I want to order the 2 vtk books but I cannot buy them from Kitware....i donno it doesn't allow me to do it. I went to amazon and it shows out of order for 3rd edition. Shall I go ahead and buy the 2nd edition ? Is there a lot of difference between the 2nd and 3rd edition ? Please reply, Pallavi -------------- next part -------------- An HTML attachment was scrubbed... URL: From amy.henderson at kitware.com Wed Aug 25 12:09:51 2004 From: amy.henderson at kitware.com (Amy Henderson) Date: Wed, 25 Aug 2004 12:09:51 -0400 Subject: [vtkusers] vtk textbook......URGENT In-Reply-To: <000c01c48abc$3fb667e0$da593b81@Pallavi> References: <000c01c48abc$3fb667e0$da593b81@Pallavi> Message-ID: <6.1.2.0.2.20040825120520.01e43e68@pop.biz.rr.com> Hi Pallavi, The 3rd edition is much more up-to-date with the current state of VTK than the 2nd edition. The reason that you cannot buy the 3rd edition of the Visualization Toolkit textbook on-line either from Kitware's store or from Amazon is that the book is currently out of stock. We are expecting a new shipment shortly (hopefully by the end of this week), and the textbook will be made available on our store again as soon as we receive the shipment. This time the text book will be in soft cover, and there are a few minor changes to the text. The VTK user's guide is currently available from Kitware's e-store, but if you want to order both books together, you'll need to wait until the textbooks arrive here. - Amy At 11:57 AM 8/25/2004, Pallavi Joshi wrote: >Hi All, >I want to order the 2 vtk books but I cannot buy them from Kitware....i >donno it doesn't allow me to do it. I went to amazon and it shows out of >order for 3rd edition. Shall I go ahead and buy the 2nd edition ? Is there >a lot of difference between the 2nd and 3rd edition ? > >Please reply, >Pallavi > > > >_______________________________________________ >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 pallavi.joshi at vanderbilt.edu Wed Aug 25 12:42:57 2004 From: pallavi.joshi at vanderbilt.edu (Pallavi Joshi) Date: Wed, 25 Aug 2004 11:42:57 -0500 Subject: [vtkusers] vtk textbook......URGENT References: <000c01c48abc$3fb667e0$da593b81@Pallavi> <6.1.2.0.2.20040825120520.01e43e68@pop.biz.rr.com> Message-ID: <001001c48ac2$93ef2b70$da593b81@Pallavi> Hi, Is there a way to read the intensity values of an image voxel in VTK ? Does the vtkVolumeReader allow that ? Thanks, palalvi ----- Original Message ----- From: "Amy Henderson" To: Sent: Wednesday, August 25, 2004 11:09 AM Subject: Re: [vtkusers] vtk textbook......URGENT > Hi Pallavi, > > The 3rd edition is much more up-to-date with the current state of VTK than > the 2nd edition. The reason that you cannot buy the 3rd edition of the > Visualization Toolkit textbook on-line either from Kitware's store or from > Amazon is that the book is currently out of stock. We are expecting a new > shipment shortly (hopefully by the end of this week), and the textbook will > be made available on our store again as soon as we receive the shipment. > This time the text book will be in soft cover, and there are a few minor > changes to the text. The VTK user's guide is currently available from > Kitware's e-store, but if you want to order both books together, you'll > need to wait until the textbooks arrive here. > > - Amy > > At 11:57 AM 8/25/2004, Pallavi Joshi wrote: > >Hi All, > >I want to order the 2 vtk books but I cannot buy them from Kitware....i > >donno it doesn't allow me to do it. I went to amazon and it shows out of > >order for 3rd edition. Shall I go ahead and buy the 2nd edition ? Is there > >a lot of difference between the 2nd and 3rd edition ? > > > >Please reply, > >Pallavi > > > > > > > >_______________________________________________ > >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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From sridharyaddanapudi at yahoo.com Wed Aug 25 13:27:31 2004 From: sridharyaddanapudi at yahoo.com (Sridhar Yaddanapudi) Date: Wed, 25 Aug 2004 10:27:31 -0700 (PDT) Subject: [vtkusers] Help Needed!!! Message-ID: <20040825172731.14944.qmail@web51408.mail.yahoo.com> Hi, I am Sridhar. I just installed VTK on my PC which has the Windows XP Operating system. I followed the instruction given in the README file, and built it. In the end, I got ALL_BUILD - 0 error(s), 0 warning(s). Now I wanted to run a Example file Cone.cxx. I have not been able to do it. I opened the file in Microsoft Visual C++. Could you please guide me through of how I can execute programs in C++. It woul dbe very kind of you, if you could guide me through, of how to get started, and execute the programs. Thanks and Regards, Sridhar --------------------------------- Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Charles.Boivin at rwdiwest.com Wed Aug 25 13:44:33 2004 From: Charles.Boivin at rwdiwest.com (Charles Boivin) Date: Wed, 25 Aug 2004 11:44:33 -0600 Subject: [vtkusers] Help Needed!!! Message-ID: Hi Sridhar, Have you used CMake to create the project file for the example as well? You must have done this for the VTK library itself, but you then need to do it for the individual examples that you want to run too. (At least, that's what I have been doing; others might have different ways of doing things) You then want to make sure that the VTK library is in your path. In XP, you go to My Computer, Properties, Environment Variables. Furthermore, it is possible that you'll get some error message saying that it cannot find some of the include files (the .h files). If that is case, add the folders where these files are located in Project ->Properties -> C/C++ -> General -> Additional Include Directories I was able to succesfully compile the examples from VTK 4.2 and VTK 4.4 in Visual Studio 2003 doing just that. Good luck, Charles >>> Sridhar Yaddanapudi 08/25/04 11:27am >>> Hi, I am Sridhar. I just installed VTK on my PC which has the Windows XP Operating system. I followed the instruction given in the README file, and built it. In the end, I got ALL_BUILD - 0 error(s), 0 warning(s). Now I wanted to run a Example file Cone.cxx. I have not been able to do it. I opened the file in Microsoft Visual C++. Could you please guide me through of how I can execute programs in C++. It woul dbe very kind of you, if you could guide me through, of how to get started, and execute the programs. Thanks and Regards, Sridhar --------------------------------- Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. From Terry.Jordan at re.netl.doe.gov Wed Aug 25 14:18:54 2004 From: Terry.Jordan at re.netl.doe.gov (Terry Jordan) Date: Wed, 25 Aug 2004 14:18:54 -0400 Subject: [vtkusers] VTK OSG 2D problem : ScalarBar Scalar Bar Message-ID: I am trying to add a vtkscalarbaractor to my Open Scene Graph scene. I am using a package called osgvtk which is working with my 3D data but I cant get it to work with a scalarbar. Has anyone done this? Can someone provide me some assistance? Thanks in advance. Terry E. Jordan Jr. Computer Engineer/Computer Scientist REM Engineering Services Morgantown, WV 26505 From sscomp2004 at yahoo.com.au Wed Aug 25 19:09:21 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Thu, 26 Aug 2004 09:09:21 +1000 (EST) Subject: [vtkusers] vtk textbook......URGENT Message-ID: <20040825230921.64825.qmail@web61107.mail.yahoo.com> I asked kitware and they said it should be available by Friday, so if you can wait a few days then you might as well. --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joeri_vtk at hotmail.com Wed Aug 25 06:15:12 2004 From: joeri_vtk at hotmail.com (Joeri Nicolaes) Date: Wed, 25 Aug 2004 12:15:12 +0200 Subject: [vtkusers] vtkImageViewer --> SetColorWindow , SetColorLevel References: <20040825093741.52048.qmail@web11901.mail.yahoo.com> Message-ID: Hi Serhat, With the SetColorWindow and SetColorLevel methods you can perform a gray scale transformation. See attach (windowlevel.jpg) for a figure that shows the significance of window and level. If you read in medical images in DICOM format, the window and level configuration of the original image are mentioned in the DICOM header (tags (0028,1050) and (0028,1051) ). Greetz, Joeri ----- Original Message ----- From: "Serhat Guneyli" To: Sent: Wednesday, August 25, 2004 11:37 AM Subject: [vtkusers] vtkImageViewer --> SetColorWindow , SetColorLevel > Hi all, > > i try to visualize 2D images via vtkImageViewer > (without any change) but the output I obtain is > different from the original source. I obtain mostly > black screen. can anyone give me some information > about SetColorWindow and SetColorLevel methodes. Which > parameters should I give so that I visualise the > original image?? > > Thanks in advance, > > Serhat > > > > __________________________________ > Do you Yahoo!? > Take Yahoo! Mail with you! Get it on your mobile phone. > http://mobile.yahoo.com/maildemo > _______________________________________________ > 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 > -------------- next part -------------- A non-text attachment was scrubbed... Name: windowlevel.jpg Type: image/jpeg Size: 69070 bytes Desc: not available URL: From seanm at nmr.mgh.harvard.edu Wed Aug 25 19:53:27 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Wed, 25 Aug 2004 19:53:27 -0400 Subject: [vtkusers] HELP ... Pants on fire ... Send water fast!!! In-Reply-To: <20040825230921.64825.qmail@web61107.mail.yahoo.com> References: <20040825230921.64825.qmail@web61107.mail.yahoo.com> Message-ID: <412D2677.6060806@nmr.mgh.harvard.edu> All, Excuse me if I am out of line here, but ... Could we please tone down the urgency of many recent posts? First, many of these posts hardly qualify as dire (teething, Amazon purchases, etc.). Second, if you find that you have actual emergencies on a regular basis, you might need on site expertise or a support contract. Sorry to be such a grouch ... I am sure that the list members are happy to avert the occasional disaster ... just take a deep breath, or a Valium, before you post ... and I will too ;-) -Sean From mathieu.malaterre at kitware.com Wed Aug 25 20:12:11 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Wed, 25 Aug 2004 20:12:11 -0400 Subject: [vtkusers] vtkImageViewer --> SetColorWindow , SetColorLevel Message-ID: <20040826001212.IJXN12967.fep02.biz.rr.com@[127.0.0.1]> > Hi Serhat, > > With the SetColorWindow and SetColorLevel methods you can perform a gray > scale transformation. See attach (windowlevel.jpg) for a figure that shows > the significance of window and level. If you read in medical images in DICOM > format, the window and level configuration of the original image are > mentioned in the DICOM header (tags (0028,1050) and (0028,1051) ). DICOM does not always specify those fields. In that case you can easily compute some nice values using: GetScalarRange(min, max) SetColorWindow(max - min ) SetColorLevel((max+min)/2) HTH Mathieu -------------- next part -------------- A non-text attachment was scrubbed... Name: windowlevel.jpg Type: image/jpeg Size: 69070 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: replyAll URL: From juaja at hotmail.com Wed Aug 25 21:15:58 2004 From: juaja at hotmail.com (Juan Aja) Date: Thu, 26 Aug 2004 01:15:58 +0000 Subject: [vtkusers] VTK 4.2 on RedHat 9 Message-ID: Hi. I've been struggling with the vtk installation on RedHat 9. I downloaded the file VTK-4.2-LatestRelease.tar.gz from vtk.org, untared and basically followed the instructions on Readme.html. I ran cmake -i and answered the questions one by one (I'm trying to do a basic install, just the right things to work with vtk in C and C++), then as root I did make, everything went perfect. But when I tried to look for the vtk directory in /usr/local or in /us/lib I didn't found anything, somehow the installation was made in the VTK source directory (and I specifically told cmake to build it in /usr/local). Any ideas?. Also I can't manage to compile a simple example taken from: http://public.kitware.com/VTK/example-code.php #include "vtkSphereSource.h" #include "vtkPolyDataMapper.h" #include "vtkActor.h" #include "vtkRenderWindow.h" #include "vtkRenderer.h" #include "vtkRenderWindowInteractor.h" void main () { // create sphere geometry vtkSphereSource *sphere = vtkSphereSource::New(); sphere->SetRadius(1.0); sphere->SetThetaResolution(18); sphere->SetPhiResolution(18); // map to graphics library vtkPolyDataMapper *map = vtkPolyDataMapper::New(); map->SetInput(sphere->GetOutput()); // actor coordinates geometry, properties, transformation vtkActor *aSphere = vtkActor::New(); aSphere->SetMapper(map); aSphere->GetProperty()->SetColor(0,0,1); // sphere color blue // a renderer and render window vtkRenderer *ren1 = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(ren1); // an interactor vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); // add the actor to the scene ren1->AddActor(aSphere); ren1->SetBackground(1,1,1); // Background color white // render an image (lights and cameras are created automatically) renWin->Render(); // begin mouse interaction iren->Start(); } It appears that the libraries needed can't be found, so could you tell me how could I compile this simple example? Thanks a lot. _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From Robert.Day at health.wa.gov.au Wed Aug 25 22:43:22 2004 From: Robert.Day at health.wa.gov.au (Day, Robert) Date: Thu, 26 Aug 2004 10:43:22 +0800 Subject: [vtkusers] ATI Petition for Adequate Drivers in Linux Message-ID: <16D567C9D19AD6119ED80006293871517C6F97@nt001mesrp.rph.health.wa.gov.au> Sorry, I missed the smiley, so call me humour impaired :-). It still doesn't help them convince the company if they can't even spell one of their best selling products correctly... As to Toshiba being the culprit in my case, sure that's what ATI says on its web site, and it's probably even a reasonable position to take: Toshiba is the OEM, let them sort out the drivers. It doesn't help me much, 'though, and I find the idea of Toshiba responding to our complaints unlikely, based on previous experience with them. But we try. I am interested in the Omega drivers and will have a look. As I said before, the problems are annoying, but its just a development machine and I am used to rebooting a lot anyway ;-) Again, I must say my personal experience with nVidia's products has been better in this regard (ie timely driver fixes on all their platforms). But that's just my personal story. Rob. -- Robert Day ph +61 8 9224 3227 Project Bioengineer fax +61 8 9224 1138 Royal Perth Hospital robert.day at health.wa.gov.au Charl P. Botha [mailto:c.p.botha at ewi.tudelft.nl] wrote: > > Ahem, I was joking, hence the smiley at the end of my mail. > > > You can't really blame ATI: your vendor, Toshiba in this case, is > technically supposed to update your drivers. If your vendor does not > respond to your complaints, you can always try the Omega > drivers (these > are modified Catalyst drivers that also work on laptops). > > -- > charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ > From craig.scott at csiro.au Wed Aug 25 23:17:08 2004 From: craig.scott at csiro.au (Craig N. Scott) Date: Thu, 26 Aug 2004 13:17:08 +1000 Subject: [vtkusers] VTK 4.2 on RedHat 9 In-Reply-To: References: Message-ID: <1093490228.5508.92.camel@caulfield> You still need to do a "make install" after the "make". The "make install" step needs to be done as root if you are installing into /usr/local but the "make" step can be done as a regular user if you have write access to the build area. On Thu, 2004-08-26 at 11:15, Juan Aja wrote: > Hi. > I've been struggling with the vtk installation on RedHat 9. > I downloaded the file VTK-4.2-LatestRelease.tar.gz from vtk.org, untared and > basically followed the instructions on Readme.html. > I ran cmake -i and answered the questions one by one (I'm trying to do a > basic install, just the right things to work with vtk in C and C++), then as > root I did make, everything went perfect. > > But when I tried to look for the vtk directory in /usr/local or in /us/lib I > didn't found anything, somehow the installation was made in the VTK source > directory (and I specifically told cmake to build it in /usr/local). Any > ideas?. > > Also I can't manage to compile a simple example taken from: > http://public.kitware.com/VTK/example-code.php > > #include "vtkSphereSource.h" > #include "vtkPolyDataMapper.h" > #include "vtkActor.h" > #include "vtkRenderWindow.h" > #include "vtkRenderer.h" > #include "vtkRenderWindowInteractor.h" > > void main () > { > > // create sphere geometry > vtkSphereSource *sphere = vtkSphereSource::New(); > sphere->SetRadius(1.0); > sphere->SetThetaResolution(18); > sphere->SetPhiResolution(18); > > // map to graphics library > vtkPolyDataMapper *map = vtkPolyDataMapper::New(); > map->SetInput(sphere->GetOutput()); > > // actor coordinates geometry, properties, transformation > vtkActor *aSphere = vtkActor::New(); > aSphere->SetMapper(map); > aSphere->GetProperty()->SetColor(0,0,1); // sphere color blue > > // a renderer and render window > vtkRenderer *ren1 = vtkRenderer::New(); > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->AddRenderer(ren1); > > // an interactor > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > > // add the actor to the scene > ren1->AddActor(aSphere); > ren1->SetBackground(1,1,1); // Background color white > > // render an image (lights and cameras are created automatically) > renWin->Render(); > > // begin mouse interaction > iren->Start(); > } > > It appears that the libraries needed can't be found, so could you tell me > how could I compile this simple example? > > Thanks a lot. > > _________________________________________________________________ > Add photos to your messages with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > > _______________________________________________ > 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 -- Craig Scott, CSIRO (CMIS) Ph: +613 9545 8096 Computers are easy to reboot. Attitudes are much harder. From vipul at sahajanandsoftware.com Thu Aug 26 00:43:18 2004 From: vipul at sahajanandsoftware.com (Vipul) Date: Thu, 26 Aug 2004 10:13:18 +0530 Subject: [vtkusers] Problem in Quadric CLustering References: <001e01c489b7$612cc140$060000c0@vipul> Message-ID: <003501c48b27$355b5560$060000c0@vipul> Vipul ChotaliyaI m new to VTK. I have main two problems; 1) I have one problem regarding quadric clustering; I am applying quadric clustering on my imagedata no. of times by coding . but each time I have to set UseInputPoints to ON. then I will get proper data after algorithm. if I am setting UseInputPoints to OFF then I was unable to get Image. 2) And after applying quadric clustering algo. I was unable to get new data directly. So I have to use vtkPolyDatawriter (which is write data to file) --> give vtkquadricclustering output to vtkPolyDatawriter --> then write it to file. -> after writing into file I am able to get data. suggest me short to way to get directly processed data.. for your reference my code is as below ************************************************* FOr reference my code is as below::: vtkQuadricClustering *vtkQClust = vtkQuadricClustering::New(); vtkPolyDataWriter *writer=vtkPolyDataWriter::New(); vtkQClust->SetInput(OutPut); vtkQClust->SetNumberOfXDivisions(nFactorX); vtkQClust->SetNumberOfYDivisions(nFactorY); vtkQClust->SetNumberOfZDivisions(nFactorZ); if(nNoOfTimes==1) { vtkQClust->UseFeatureEdgesOff (); vtkQClust->UseInputPointsOn(); //give me soluting in which way I can set this to ON vtkQClust->UseFeaturePointsOff(); vtkQClust->CopyCellDataOff(); } else { vtkQClust->UseFeatureEdgesOn (); vtkQClust->UseInputPointsOn(); vtkQClust->UseFeaturePointsOn(); vtkQClust->CopyCellDataOff(); } OutPut = vtkQClust->GetOutput(); //writer->GetInput(); writer->SetInput(OutPut); bProcessAhead=FALSE; writer->SetFileName(pst1); float fPtArray[5000][3]; //writer->SetInput(cube); //printf("i=%d %d\n",i+1,writer->Getput()->GetPolys()->GetNumberOfCells()); iData[1]=writer->GetInput()->GetNumberOfPolys(); writer->Write(); iData[1]=writer->GetInput()->GetNumberOfPolys(); OutPut = writer->GetInput(); -------------- next part -------------- An HTML attachment was scrubbed... URL: From joeri_vtk at hotmail.com Thu Aug 26 04:23:35 2004 From: joeri_vtk at hotmail.com (Joeri Nicolaes) Date: Thu, 26 Aug 2004 10:23:35 +0200 Subject: [vtkusers] 3D volume rendering via ray casting Message-ID: Hi all, I tried to show a 3D volume with the ray casting approach, but I am struggling with the opacityTransferfunction. I have absolutely no clue how to "tune" this in order to show the right things. Af first, I have some head data and I used the transferfunction of an example in vtk showing a head. But now, I have some abdomenal data and I am stuck... Can anyone give me a tip? Perhaps a site or book with some figures to explain the effect of this opacityTransferfunction? Thanks in advance, Joeri, Agfa Gevaert, R&D/TI + 32 (0) 3 444 6429, stajn at agfa.com joeri_vtk at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ppau at risc.uni-linz.ac.at Thu Aug 26 08:27:31 2004 From: ppau at risc.uni-linz.ac.at (Petru Pau) Date: Thu, 26 Aug 2004 14:27:31 +0200 Subject: [vtkusers] vtk application ends with error References: <412C8FFF.5000600@risc.uni-linz.ac.at> Message-ID: <412DD733.7050507@risc.uni-linz.ac.at> Merci beaucoup, Aurelien! Indeed, I am only working with the Visual Studio debugger. It showed me some line of a C file that does not belong to VTK, but I did not know what to do with this information. Anyway, the call stak showed that the final function had been called from a VTK class, so the vtk mailing list was the logical place to ask the question. Actually every now and then, more often than not, my application ends with an error. If it is not the one that I've already reported, it's a "Run-Time Check Failure #0: The value of ESP was not properly saved across a function call." This apparently happens when I call a function declared with one calling convention with a function pointer declared with another pointer convention. This always happens _after_ I play with a render window (modify its size), and the debugger throws me in vtkopenglrenderer.cxx, namely in the code of "Clear" function of the vtkOpenGLRenderer class. The sentence is: glClearDepth( (GLclampd)( 1.0 ) ); so I reckon that the pointer that messes things up is GLclampd. Can I do anything about this? Petru From billlist at nycap.rr.com Thu Aug 26 09:09:02 2004 From: billlist at nycap.rr.com (William A. Hoffman) Date: Thu, 26 Aug 2004 09:09:02 -0400 Subject: [vtkusers] vtk application ends with error In-Reply-To: <412DD733.7050507@risc.uni-linz.ac.at> References: <412C8FFF.5000600@risc.uni-linz.ac.at> <412DD733.7050507@risc.uni-linz.ac.at> Message-ID: <6.1.1.1.2.20040826090651.09096f90@pop.nycap.rr.com> That ESP error is usually caused by out of date object files. I would recommend removing all of your compiled VTK and user code, and rebuilding everything from scratch. If that does not work, you may want to try a tool like bounds checker or purify, because the the problem is most likely a memory overrun in your code. The only other thing it could be is the OpenGL driver. You could also try updating the driver for your graphics card, but I doubt that is the problem. -Bill At 08:27 AM 8/26/2004, Petru Pau wrote: >Merci beaucoup, Aurelien! > >Indeed, I am only working with the Visual Studio debugger. >It showed me some line of a C file that does not belong to VTK, >but I did not know what to do with this information. Anyway, >the call stak showed that the final function had been called >from a VTK class, so the vtk mailing list was the logical place >to ask the question. > >Actually every now and then, more often than not, my application ends >with an error. If it is not the one that I've already reported, it's a "Run-Time >Check Failure #0: The value of ESP was not properly saved across a function call." >This apparently happens when I call a function declared with one calling convention >with a function pointer declared with another pointer convention. > >This always happens _after_ I play with a render window (modify >its size), and the debugger throws me in vtkopenglrenderer.cxx, >namely in the code of "Clear" function of the vtkOpenGLRenderer >class. The sentence is: > >glClearDepth( (GLclampd)( 1.0 ) ); > >so I reckon that the pointer that messes things up is GLclampd. Can >I do anything about this? > >Petru > >_______________________________________________ >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 mirelle_mellqvist at hotmail.com Thu Aug 26 10:31:35 2004 From: mirelle_mellqvist at hotmail.com (Mirelle Mellqvist) Date: Thu, 26 Aug 2004 14:31:35 +0000 Subject: [vtkusers] Read unstructured data from ASCII file Message-ID: Hi, Im currently working on a school project where I want to read in unstructureddata from a preprocessor app called Nastran. It?s in ASCII format. My first idea is to use vtkUnstructuredGridReader or does it only support *.vtk format, and in that case how do I convert it. If that is not possible I guess I`ll have to write a new reader on my own, any suggestions or any good guidance would be appriciated! thanks! /Mirelle _________________________________________________________________ Hitta r?tt p? n?tet med MSN S?k http://search.msn.se/ From tfogal at apollo.sr.unh.edu Thu Aug 26 10:56:20 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Thu, 26 Aug 2004 10:56:20 -0400 Subject: [vtkusers] Read unstructured data from ASCII file In-Reply-To: Your message of "Thu, 26 Aug 2004 14:31:35 -0000." References: Message-ID: <200408261456.i7QEuKBo005732@apollo.sr.unh.edu> Mirelle, You could write your own reader object, but this can be difficult. I think a less time-consuming task would be to write an external program that inputs Nastran ASCII files and outputs VTK XML files. Then you could read in the data with (say) a vtkXMLUnstructuredGridReader. HTH, -tom "Mirelle Mellqvist" writes: >Hi, > >Im currently working on a school project where I want to read in >unstructureddata from a preprocessor app called Nastran. It?s in ASCII >format. > >My first idea is to use vtkUnstructuredGridReader or does it only support >*.vtk format, and in that case how do I convert it. If that is not possible >I guess I`ll have to write a new reader on my own, any suggestions or any >good guidance would be appriciated! > >thanks! > >/Mirelle > >_________________________________________________________________ >Hitta r?tt p? n?tet med MSN S?k http://search.msn.se/ > >_______________________________________________ >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 tfogal at apollo.sr.unh.edu Thu Aug 26 11:12:24 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Thu, 26 Aug 2004 11:12:24 -0400 Subject: [vtkusers] interpolating using RungaKutta4 Message-ID: <200408261512.i7QFCOCP006030@apollo.sr.unh.edu> I'm trying to interpolate a point using RungaKutta4 and I'm not getting the results I would have expected. float seed[2][3]; float delT = 0.5; float unused; vtkInterpolateDataSetAttributes *IntDataSetAttr; vtkInterpolatedVelocityField *IntVelField; vtkRungaKutta4 *RG4; MyCustomReaderObject *src[2]; ... initialize data ... IntDataSetAttr->AddInput(src[0]->GetOutput()); IntDataSetAttr->AddInput(src[1]->GetOutput()); IntDataSetAttr->SetT(0.5); IntDataSetAttr->Update(); IntVelField->AddDataSet(IntDataSetAttr->GetOutput()); IntVelField->SelectVectors("V"); RG4->SetFunctionSet(IntVelField); seed[0][0] = 0.1; seed[0][1] = 0.2; seed[0][2] = 0.3; seed[1][0] = 0.5; seed[1][1] = 0.6; seed[1][2] = 0.7; // seed[1] is for return value RG4->ComputeNextStep(seed[0], seed[1], 0.0, delT, unused, unused); std::cout << "interpolated points (start \t finish):\n" << "\t x: " << seed[0][0] << '\t' << seed[1][0] << '\n' << "\t y: " << seed[0][1] << '\t' << seed[1][1] << '\n' << "\t z: " << seed[0][2] << '\t' << seed[1][2] << '\n'; I used to not set seed[1] but I was curious to see if it would use those values. ComputeNextStep seems to only copy seed[0] to seed[1]. Any ideas what I'm doing wrong here? How is one supposed to use RungaKutta4 ? TIA, -tom From jdc at lnec.pt Thu Aug 26 11:45:36 2004 From: jdc at lnec.pt (=?iso-8859-1?Q?Jo=E3o?= Cunha) Date: Thu, 26 Aug 2004 16:45:36 +0100 Subject: [vtkusers] Difficulties probing quadratic hexahedron cells Message-ID: <412E05A0.E1FCB4DC@lnec.pt> I'm visualizing data defined on an unstructured grid with type 25 cells (quadratic hexahedrons). Neither probing or cutting seems to work properly, however. Probing returns 0 everywhere. Does anyone had a similar problem ? Is there anything peculiar about the way to deal with non-linear cells ? Any hint is welcome. Jo?o Cunha -- Jo?o Duarte Cunha Investigador-Coordenador Director do Centro da Qualidade na Constru??o jdc at lnec.pt From berklist at nycap.rr.com Thu Aug 26 11:47:31 2004 From: berklist at nycap.rr.com (Berk Geveci) Date: Thu, 26 Aug 2004 11:47:31 -0400 Subject: [vtkusers] interpolating using RungaKutta4 In-Reply-To: <200408261512.i7QFCOCP006030@apollo.sr.unh.edu> References: <200408261512.i7QFCOCP006030@apollo.sr.unh.edu> Message-ID: <1093535251.4154.32.camel@silverymoon> What values does ComputeNextStep() return? The ComputeNextStep() is a very simple and short function. You can easily figure out what is going wrong by putting a break point in it and following the execution. I could tell you more if I had access to the datasets. -Berk On Thu, 2004-08-26 at 11:12, tom fogal wrote: > I'm trying to interpolate a point using RungaKutta4 and I'm not getting > the results I would have expected. > > float seed[2][3]; > float delT = 0.5; > float unused; > vtkInterpolateDataSetAttributes *IntDataSetAttr; > vtkInterpolatedVelocityField *IntVelField; > vtkRungaKutta4 *RG4; > MyCustomReaderObject *src[2]; > > ... initialize data ... > > IntDataSetAttr->AddInput(src[0]->GetOutput()); > IntDataSetAttr->AddInput(src[1]->GetOutput()); > IntDataSetAttr->SetT(0.5); > IntDataSetAttr->Update(); > IntVelField->AddDataSet(IntDataSetAttr->GetOutput()); > IntVelField->SelectVectors("V"); > RG4->SetFunctionSet(IntVelField); > > seed[0][0] = 0.1; > seed[0][1] = 0.2; > seed[0][2] = 0.3; > seed[1][0] = 0.5; > seed[1][1] = 0.6; > seed[1][2] = 0.7; > // seed[1] is for return value > RG4->ComputeNextStep(seed[0], seed[1], 0.0, delT, unused, unused); > > std::cout << "interpolated points (start \t finish):\n" > << "\t x: " << seed[0][0] << '\t' << seed[1][0] << '\n' > << "\t y: " << seed[0][1] << '\t' << seed[1][1] << '\n' > << "\t z: " << seed[0][2] << '\t' << seed[1][2] << '\n'; > > I used to not set seed[1] but I was curious to see if it would use > those values. ComputeNextStep seems to only copy seed[0] to seed[1]. > Any ideas what I'm doing wrong here? How is one supposed to use > RungaKutta4 ? > > TIA, > > -tom > _______________________________________________ > 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 -- Berk Geveci From mathieu.malaterre at kitware.com Thu Aug 26 11:48:07 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Thu, 26 Aug 2004 11:48:07 -0400 Subject: [vtkusers] Difficulties probing quadratic hexahedron cells In-Reply-To: <412E05A0.E1FCB4DC@lnec.pt> References: <412E05A0.E1FCB4DC@lnec.pt> Message-ID: <412E0637.2090307@kitware.com> Jo?o Cunha wrote: > I'm visualizing data defined on an unstructured grid with type 25 cells > (quadratic > hexahedrons). Neither probing or cutting seems to work properly, > however. > Probing returns 0 everywhere. > Does anyone had a similar problem ? Is there anything peculiar about the > way to > deal with non-linear cells ? > Any hint is welcome. > Jo?o Cunha Jo?o, You may need to use VTK from CVS in order to use quadratic hexahedrons. HTH, Mathieu From mathieu.malaterre at kitware.com Thu Aug 26 12:36:15 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Thu, 26 Aug 2004 12:36:15 -0400 Subject: [vtkusers] Read unstructured data from ASCII file In-Reply-To: References: Message-ID: <412E117F.2000100@kitware.com> Mirelle Mellqvist wrote: > Hi, > > Im currently working on a school project where I want to read in > unstructureddata from a preprocessor app called Nastran. It?s in ASCII > format. > > My first idea is to use vtkUnstructuredGridReader or does it only > support *.vtk format, and in that case how do I convert it. If that is > not possible I guess I`ll have to write a new reader on my own, any > suggestions or any good guidance would be appriciated! Mirelle, That looks like an excellent school project, I hope you will be able to contribute it to VTK. Anyway as a start, you could have a look at: http://www.vtk.org/doc/nightly/html/classvtkGAMBITReader.html or (but more complex) http://www.vtk.org/doc/nightly/html/classvtkAVSucdReader.html You're class needs do derive from vtkUnstructuredGridSource, then all you need to do is fill the Execute method with the proper NASTRAN parser. HTH Mathieu From tfogal at apollo.sr.unh.edu Thu Aug 26 13:18:26 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Thu, 26 Aug 2004 13:18:26 -0400 Subject: [vtkusers] interpolating using RungaKutta4 In-Reply-To: Your message of "Thu, 26 Aug 2004 11:47:31 EDT." <1093535251.4154.32.camel@silverymoon> References: <200408261512.i7QFCOCP006030@apollo.sr.unh.edu> <1093535251.4154.32.camel@silverymoon> Message-ID: <200408261718.i7QHIQB2007699@apollo.sr.unh.edu> Berk, Thanks for your reply. I added a switch on the return value of ComputeNextStep(), and it is coming back with 0. I tried stepping through the code as you suggested. It appears to be working fine, I am thinking that perhaps I am using too small a timestep to notice the difference? Lines 146 -> 149 read: xnext[i] = xprev[i] + delT*(this->Derivs[i]/6.0 + this->NextDerivs[0][i]/3.0 + this->NextDerivs[1][i]/3.0 + this->NextDerivs[2][i]/6.0); delT is reasonably large (0.5), but all of this->Derivs and this->NextDerivs are neglible: (-1.e-15 or so). So my guess is the reason I am not seeing much change is a combination of a weak field and a small timestep? Thanks again, -tom <1093535251.4154.32.camel at silverymoon>Berk Geveci writes: >What values does ComputeNextStep() return? The ComputeNextStep() >is a very simple and short function. You can easily figure out >what is going wrong by putting a break point in it and following >the execution. I could tell you more if I had access to the datasets. > >-Berk > > >On Thu, 2004-08-26 at 11:12, tom fogal wrote: >> I'm trying to interpolate a point using RungaKutta4 and I'm not getting >> the results I would have expected. >> >> float seed[2][3]; >> float delT = 0.5; >> float unused; >> vtkInterpolateDataSetAttributes *IntDataSetAttr; >> vtkInterpolatedVelocityField *IntVelField; >> vtkRungaKutta4 *RG4; >> MyCustomReaderObject *src[2]; >> >> ... initialize data ... >> >> IntDataSetAttr->AddInput(src[0]->GetOutput()); >> IntDataSetAttr->AddInput(src[1]->GetOutput()); >> IntDataSetAttr->SetT(0.5); >> IntDataSetAttr->Update(); >> IntVelField->AddDataSet(IntDataSetAttr->GetOutput()); >> IntVelField->SelectVectors("V"); >> RG4->SetFunctionSet(IntVelField); >> >> seed[0][0] = 0.1; >> seed[0][1] = 0.2; >> seed[0][2] = 0.3; >> seed[1][0] = 0.5; >> seed[1][1] = 0.6; >> seed[1][2] = 0.7; >> // seed[1] is for return value >> RG4->ComputeNextStep(seed[0], seed[1], 0.0, delT, unused, unused); >> >> std::cout << "interpolated points (start \t finish):\n" >> << "\t x: " << seed[0][0] << '\t' << seed[1][0] << '\n' >> << "\t y: " << seed[0][1] << '\t' << seed[1][1] << '\n' >> << "\t z: " << seed[0][2] << '\t' << seed[1][2] << '\n'; >> >> I used to not set seed[1] but I was curious to see if it would use >> those values. ComputeNextStep seems to only copy seed[0] to seed[1]. >> Any ideas what I'm doing wrong here? How is one supposed to use >> RungaKutta4 ? >> >> TIA, >> >> -tom From berklist at nycap.rr.com Thu Aug 26 13:35:06 2004 From: berklist at nycap.rr.com (Berk Geveci) Date: Thu, 26 Aug 2004 13:35:06 -0400 Subject: [vtkusers] interpolating using RungaKutta4 In-Reply-To: <200408261718.i7QHIQB2007699@apollo.sr.unh.edu> References: <200408261512.i7QFCOCP006030@apollo.sr.unh.edu> <1093535251.4154.32.camel@silverymoon> <200408261718.i7QHIQB2007699@apollo.sr.unh.edu> Message-ID: <1093541706.4153.37.camel@silverymoon> On Thu, 2004-08-26 at 13:18, tom fogal wrote: > Berk, > > Thanks for your reply. I added a switch on the return value of > ComputeNextStep(), and it is coming back with 0. > > I tried stepping through the code as you suggested. It appears to be > working fine, I am thinking that perhaps I am using too small a > timestep to notice the difference? Lines 146 -> 149 read: > > xnext[i] = xprev[i] + delT*(this->Derivs[i]/6.0 + > this->NextDerivs[0][i]/3.0 + > this->NextDerivs[1][i]/3.0 + > this->NextDerivs[2][i]/6.0); > > delT is reasonably large (0.5), but all of this->Derivs and > this->NextDerivs are neglible: (-1.e-15 or so). So my guess > is the reason I am not seeing much change is a combination of a weak > field and a small timestep? Possible. Look at the values this->FunctionSet->FunctionValues() returns (in the second argument) to get a feel for what the vector field is like. From lost_bits1110 at hotmail.com Thu Aug 26 14:16:04 2004 From: lost_bits1110 at hotmail.com (Louis Desjardins) Date: Thu, 26 Aug 2004 18:16:04 +0000 Subject: [vtkusers] help! wierd pthread error..? Message-ID: Hi Brad, I'm sorry for the very late response! I was wondering if there are any other tests I can perform before I send you part of my program, since my program is very large! So just to remind you, it crashes after just about 20 minutes every single time due to this pthread error.. I tried commenting out different parts of my code, and I still haven't been able to extract the cause... Do you know if you or anyone else has experienced this before, maybe with a particular class..?? Thanks very much.. Louis >Louis Desjardins wrote: >> >>Btw I made a mistake, i'm on Redhat 8 (not 9), >>but when I run it on a Redhat 9, I don't get the pthread errors displayed, >>however it still crashes after about 5 or 10 minutes of continuous running >> >>and the version of vtk is 4.1.1.... >> >>and I ran the test program you sent, and it didnt crash after even >>8,000,000 threads, so I dont think it will ever crash.. > >Okay, thanks for running that. Now I have no idea what the problem could >be. Please try to extract a minimal part of your application that causes >the problem and send it to me. > >Thanks, >-Brad ------------------ Louis Desjardins wrote: Hi Thanks for your response, Some of the filters include (not all for the same dataset though): vtkImageMapToColors vtkCutter vtkFeatureEdges vtkGeometryFilter vtkStripper vtkPolyDataMapper so do you mean that one of these filters then may be invoking one too many thread? ------------------ Brad King wrote: A return code of 11 is the EAGAIN error from pthread_create. It may mean that the maximum number of threads per process has been exceeded. VTK has many threaded filters, but they all clean up after themselves as far as we know. What filters is your program using? ------------------ Louis Desjardins wrote: Hi VTK Experts, My program will run perfectly - doing its thing, loop after loop (its in an infinite loop just rendering something over and over), but then after about 5 or 10 minutes of running, SUDDENLY out of the blue - it stops! And I get the following error: ERROR: In /usr/local/src/vtk/vtksrc/Common/vtkMultiThreader.cxx, line 353 vtkMultiThreader (0xe8ebb48): Unable to create a thread. pthread_create() returned 11 Does anyone know any general reason why this might occur? _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! hthttp://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ From Lichan.Hong at parc.com Thu Aug 26 15:09:16 2004 From: Lichan.Hong at parc.com (Lichan.Hong at parc.com) Date: Thu, 26 Aug 2004 12:09:16 PDT Subject: [vtkusers] problem encountered in moving from VTK4.2 to VTK4.4 Message-ID: <2A7BA50775B8F74B8BBF8576DD24DC12109766@goldeneye.ad.parc.com> Hi, I am trying to upgrade my code base from VTK4.2 to VTK4.4 and run into the following problem: I have a filter class (written in Java) which uses "SetStartMethods()", which has been removed from VTK4.4. As suggested by the VTK FAQ 6.3, I could replace this method using AddObserver(vtkCommand::StartEvent, myCommand). Unfortunately, vtkCommand (or any of its subclasses) seems not to be in the Java wrapper of VTK4.4. I have my code base written in Java under Windows and hope to stay this way. I am wondering if someone has encountered a similar issue or has any suggestions. Many thanks in advance. Lichan From kerekes at fastmail.fm Thu Aug 26 15:26:54 2004 From: kerekes at fastmail.fm (Kate Kerekes) Date: Thu, 26 Aug 2004 15:26:54 -0400 Subject: [vtkusers] example cutting planes in volume Message-ID: <005801c48ba2$a685b5c0$0300a8c0@kerekeslaptop> Hello all, I seem to have lost the file and the name of an example program (think it was part of vtk documentation, but I have skimmed through examples with my distribution and can't find it). As I recall, it did a volume rendering and then had 3 orthogonal planes that cut through the volume with texture maps. I do not remember what classes this used. I have looked at vtkImagePlaneWidget examples, but these are not what I want. Does anyone know the name of an example file (or more than one) that shows planes cutting through a volume? Kate Kerekes p.s. on the user's list I saw someone mentioned textureReslice.tcl. I tried to find this program and couldn't find a link that wasn't broken. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tfogal at apollo.sr.unh.edu Thu Aug 26 15:42:45 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Thu, 26 Aug 2004 15:42:45 -0400 Subject: [vtkusers] vtkInterpolateDataSetAttributes doesn't use InitialProblemSolver? Message-ID: <200408261942.i7QJgjde010984@apollo.sr.unh.edu> I was digging through vtkInterpolateDataSetAttributes to see how it was implemented, when I noticed it (eventually) implements its own interpolating functionality. Basically the call tree ends up in vtkDataSetAttributes::InterpolateTuple (well, its a vtkPointData object but it uses the parent function) which seems to do the actual interpolation. I'm wondering why it doesn't use a RungeKutta2, or any other vtkInitialProblemSolver? That would seem the natural way to implement it to me, and I imagine produce more accurate results? The current method seems to be a simple linear interpolation (correct me if I'm misinterpreting)... Perhaps RungeKutta* was developed after vtkInterpolateDataSetAttributes? Just curious. Sorry for the long email on a frivolous implementation detail... -tom From nvbutala at yahoo.com Thu Aug 26 16:00:34 2004 From: nvbutala at yahoo.com (nikhil butala) Date: Thu, 26 Aug 2004 13:00:34 -0700 (PDT) Subject: [vtkusers] problem using vtkGeometryFilter Message-ID: <20040826200034.59481.qmail@web52104.mail.yahoo.com> With reference to the messages below: I tried using the vtkGeometryFilter to extract just the outer surface of an unstructured grid. But this doesn't seem to be working. Can anyone tell me what needs to be changed in the code below? vtkDataSetReader *reader1 = vtkDataSetReader::New(); reader1->SetFileName ("C:/..../trial.vtk"); reader1->Update(); vtkConnectivityFilter *connect = vtkConnectivityFilter::New(); connect->SetInput(reader1->GetOutput() ); connect->SetExtractionModeToAllRegions(); vtkExtractUnstructuredGrid *extractGrid = vtkExtractUnstructuredGrid::New(); extractGrid->SetInput(connect->GetOutput()); vtkGeometryFilter *gFilter = vtkGeometryFilter::New(); gFilter->SetInput(extractGrid->GetOutput()); vtkPolyDataMapper *visMapper = vtkPolyDataMapper::New(); visMapper->SetInput(gFilter->GetOutput() ); visMapper->ScalarVisibilityOff(); vtkActor *actor = vtkActor::New(); actor->GetProperty()->SetColor(0,0.8,0); actor->GetProperty()->SetAmbient(0.8 ); actor->GetProperty()->SetRepresentationToWireframe(); actor->SetMapper( visMapper ); Thanks, Matt and Nikhil Hi Matt, I have used vtkGeometryFilter on an unstructured grid, this just extracts the outer surface... not quite the same as only the visible parts but could be useful, or a good start on what you want? Dave P vtkusers-bounces at vtk.org wrote on 18/08/2004 08:17:15: > I am using a vtkPolyDataSetReader to read unstructured > grid information. Then a vtkPolyDataSetMapper to > create an actor to display a mesh of an object. I am > looking for a way to display only the parts of the > mesh that would be actually visable ( just the front > face of the object). I have looked through the docs > and searched the archive, but I was unable to find > anything. > > If anyone knows of a method to accomplish this I would > appreciate the help. > > -Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From dicksonsp at ornl.gov Thu Aug 26 17:15:50 2004 From: dicksonsp at ornl.gov (Stewart Dickson) Date: Thu, 26 Aug 2004 17:15:50 -0400 Subject: [vtkusers] Streamlines Debugging tips? Message-ID: <412E5306.5000707@ornl.gov> Hello, List, I am attempting to compute streamlines through a vector-valued structured grid of data points. Following the example VTK/Examples/VisualizationAlgorithms/Tcl/officeTubes.tcl I find that for my data: vtkStructuredGridReader reader [[reader GetOutput] GetLength] = 3.720380 [[reader GetOutput] GetCenter] = 0.000349998 0 0 maxVelocity [[[[reader GetOutput] GetPointData] GetVectors] GetMaxNorm] = 160.003000 maxTime [expr 35.0 * $length / $maxVelocity] = 0.813818 I am (arbitrarily) scattering 60 (vtkPointSource) random seed points over a $length/2.0 radius from the center of my data set. When I run my scri[pt through Vtk, I get the following messages: ERROR: In /usr/local/src/VTK/Common/vtkPolyLine.cxx, line 101 vtkPolyLine (0x892cfa8): Coincident points in polyline...can't compute normals Warning: In /usr/local/src/VTK/Graphics/vtkTubeFilter.cxx, line 195 vtkTubeFilter (0x80ef9a0): No normals for line! (Repeated 4 times) And no geometry displayed in the vtkRenderWindow (OpenGL). I suspect that vtkStreamLine Set[Integration]StepLength [0.05]0.5 is/are wrong for the dimensions of my space and the velocity of my vector data. Will randomly-generated points landing in a region of zero velocity cause the streamline generator to puke? (Cannot generate normals on zero-length segments) Are there any published rules-of-thumb for setting integration parameters appropriate to the data fields under observation? Are there any resommended methods of debugging the integrator/streamline generator? Thanks, -Stewart Dickson, Visualization Researcher Computer Science and Mathematics Division Oak Ridge National Laboratory http://www.csm.ornl.gov/~dickson From David.Pont at ForestResearch.co.nz Thu Aug 26 17:30:03 2004 From: David.Pont at ForestResearch.co.nz (David.Pont at ForestResearch.co.nz) Date: Fri, 27 Aug 2004 09:30:03 +1200 Subject: [vtkusers] problem using vtkGeometryFilter In-Reply-To: <20040826200034.59481.qmail@web52104.mail.yahoo.com> Message-ID: Hi Matt and Nikhil, OK, on closer inspection my code worked on an unstructured grid that only contained 3D cells. I am not sure what your pipeline delivers, but if it has 0,1 or 2D cells they will be passed straight through vtkGeometryFilter. To get only the visible parts of a surface you will have to derive a new class (or use vtkProgrammableFilter?). Dot product of cell normal with view position could give foward facing cells, but wont distinguish cells occluded by others... you could use a second pass and test for intersection with a line between view position and cell... Dave P nikhil butala wrote on 27/08/2004 08:00:34: > With reference to the messages below: > > I tried using the vtkGeometryFilter to extract just the outer > surface of an unstructured grid. But this doesn't seem to be > working. Can anyone tell me what needs to be changed in the code below? > > > vtkDataSetReader *reader1 = vtkDataSetReader::New(); > reader1->SetFileName ("C:/..../trial.vtk"); > reader1->Update(); > > vtkConnectivityFilter *connect = vtkConnectivityFilter::New(); > connect->SetInput(reader1->GetOutput() ); > connect->SetExtractionModeToAllRegions(); > > vtkExtractUnstructuredGrid *extractGrid = vtkExtractUnstructuredGrid::New(); > extractGrid->SetInput(connect->GetOutput()); > > vtkGeometryFilter *gFilter = vtkGeometryFilter::New(); > gFilter->SetInput(extractGrid->GetOutput()); > > vtkPolyDataMapper *visMapper = vtkPolyDataMapper::New(); > visMapper->SetInput(gFilter->GetOutput() ); > visMapper->ScalarVisibilityOff(); > > vtkActor *actor = vtkActor::New(); > actor->GetProperty()->SetColor(0,0.8,0); > actor->GetProperty()->SetAmbient(0.8 ); > actor->GetProperty()->SetRepresentationToWireframe(); > actor->SetMapper( visMapper ); > > Thanks, > Matt and Nikhil > > > > Hi Matt, > I have used vtkGeometryFilter on an unstructured grid, this just extracts > the outer surface... not quite the same as only the visible parts but could > be useful, or a good start on what you want? > Dave P > > vtkusers-bounces at vtk.org wrote on 18/08/2004 08:17:15: > > > I am using a vtkPolyDataSetReader to read unstructured > > grid information. Then a vtkPolyDataSetMapper to > > create an actor to display a mesh of an object. I am > > looking for a way to display only the parts of the > > mesh that would be actually visable ( just the front > > face of the object). I have looked through the docs > > and searched the archive, but I was unable to find > > anything. > > > > If anyone knows of a method to accomplish this I would > > appreciate the help. > > > > -Matt_______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: kitware.com/cgi-bin/vtkfaq> > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From Charles.Boivin at rwdiwest.com Thu Aug 26 17:32:51 2004 From: Charles.Boivin at rwdiwest.com (Charles Boivin) Date: Thu, 26 Aug 2004 15:32:51 -0600 Subject: [vtkusers] Cell data in a vtkPolyData object Message-ID: Hello everyone, Well, I am still working on my custom reader, and thanks to everyone here, a lot of progress has been made. I am able to load my geometry and connectivity properly using various types of cells (vertices, lines, and polygons), and that works pretty well. I have also been able to load any kind of point data (i.e. combinations of scalars, vectors, etc..) successfully. I then turned my attention to cell data. Cells are stored in the vtkPolyData class using different containers for vertices, lines and polygons, i.e. there is a separate vtkCellArray array for vertices, lines, and polygons. Those are set in vtkPolyData using vtkPolyData::SetVertices(), SetLines() and SetPolys(). (I don't mean to lecture anyone here, but I figured I would explain how I understand things; that way it would be easy for you to point out a flaw in my reasoning). I store my cell data in a vtkDoubleArray, and later set the cell data to it using a call to vtkPolyData::GetCellData()->AddArray(myCellDataArray). This is pretty much the same process that I (successfully) use for node data. However, things to do not look right for cell data if I have different types of cells (i.e. verts, lines, and polys) in my geometry. When I set the data, I need to specify an index to the cell, and then the data. How do I know what the index of the different cells are when stored in vtkPolyData if they are not all in the same container? I know the vtkCellArray::InsertCell() function returns an index to its position, but, for example, the vertices array does not know about the line array, and vice-versa. When I then have only *one* array for my data, how do I arrange it properly so that it matches the cells? I hope I made myself clear... this is a bit puzzling to me! Thank you in advance, Charles Boivin From dicksonsp at ornl.gov Thu Aug 26 17:38:17 2004 From: dicksonsp at ornl.gov (Stewart Dickson) Date: Thu, 26 Aug 2004 17:38:17 -0400 Subject: [vtkusers] Multi-Input and Math on Data Message-ID: <412E5849.5050203@ornl.gov> Hello, I am looking at a dataset which is as follows: H360dD1373.hdf (Density[480][480][480]) and H360dP1373.hdf (Pressure[480][480][480]), HDF Version 4.1 files. They are 480x480x480 scalar data fields. I wish to visualize a derived 480x480x480 scalar data field: entropy = pressure / density ^ 1.33333 I have the vtkNetCDFHDFReader library which is distributed with ASPECT Therefore, I can read the data files into Vtk. Is there a library in Vtk to allow one to do exponentiation and division on the output of two vtkNetCDFHDFReaders? Thank you, -Stewart Dickson, Visualization Researcher Computer Science and Mathematics Division Oak Ridge National Laboratory http://www.csm.ornl.gov/~dickson The following are the results of ncdump -h: netcdf H360dD1373 { dimensions: fakeDim0 = 480 ; fakeDim1 = 480 ; fakeDim2 = 480 ; variables: float fakeDim0(fakeDim0) ; float fakeDim1(fakeDim1) ; float fakeDim2(fakeDim2) ; float Data-Set-2(fakeDim0, fakeDim1, fakeDim2) ; Data-Set-2:long_name = "Density" ; } netcdf H360dP1373 { dimensions: fakeDim0 = 480 ; fakeDim1 = 480 ; fakeDim2 = 480 ; variables: float fakeDim0(fakeDim0) ; float fakeDim1(fakeDim1) ; float fakeDim2(fakeDim2) ; float Data-Set-2(fakeDim0, fakeDim1, fakeDim2) ; Data-Set-2:long_name = "Pressure" ; } From tfogal at apollo.sr.unh.edu Thu Aug 26 17:56:47 2004 From: tfogal at apollo.sr.unh.edu (tom fogal) Date: Thu, 26 Aug 2004 17:56:47 -0400 Subject: [vtkusers] Streamlines Debugging tips? In-Reply-To: Your message of "Thu, 26 Aug 2004 17:15:50 EDT." <412E5306.5000707@ornl.gov> References: <412E5306.5000707@ornl.gov> Message-ID: <200408262156.i7QLuloB012474@apollo.sr.unh.edu> <412E5306.5000707 at ornl.gov>Stewart Dickson writes: >When I run my scri[pt through Vtk, I get the following messages: >ERROR: In /usr/local/src/VTK/Common/vtkPolyLine.cxx, line 101 >vtkPolyLine (0x892cfa8): Coincident points in polyline...can't compute >normals > >Warning: In /usr/local/src/VTK/Graphics/vtkTubeFilter.cxx, line 195 >vtkTubeFilter (0x80ef9a0): No normals for line! >(Repeated 4 times) >And no geometry displayed in the vtkRenderWindow (OpenGL). > >I suspect that vtkStreamLine Set[Integration]StepLength [0.05]0.5 >is/are wrong for the dimensions of my space and the velocity of my >vector data. StreamLine? vtkStreamLine is deprecated, you should be using vtkStreamTracer instead. This bit me as well, it seems the only place to find out currently is this mailing list =). Gotcha to note while you switch over: make sure to set the MaximumPropagation to something large. I'm using vtkStreamTracer with ridiculously small integration steps (like 1e-6) and having no troubles. >Will randomly-generated points landing in a region of zero velocity >cause the streamline generator to puke? (Cannot generate normals on >zero-length segments) Looking through the code, it appears this is correct. >Are there any published rules-of-thumb for setting integration >parameters appropriate to the data fields under observation? >Are there any resommended methods of debugging the integrator/streamline >generator? Hrm.. good question. Maybe someone smarter than me can answer =) Try switching to StreamTracer and see if that helps. Report back if it does not. -tom From cpbotha at gmail.com Thu Aug 26 18:02:51 2004 From: cpbotha at gmail.com (Charl P. Botha) Date: Fri, 27 Aug 2004 00:02:51 +0200 Subject: [vtkusers] Multi-Input and Math on Data In-Reply-To: <412E5849.5050203@ornl.gov> References: <412E5849.5050203@ornl.gov> Message-ID: <8e138ee404082615026d131cd6@mail.gmail.com> On Thu, 26 Aug 2004 17:38:17 -0400, Stewart Dickson wrote: > I wish to visualize a derived 480x480x480 scalar data field: > entropy = pressure / density ^ 1.33333 > > I have the vtkNetCDFHDFReader library which is distributed with ASPECT > Therefore, I can read the data files into Vtk. > > Is there a library in Vtk to allow one to do exponentiation and division > on the output of two vtkNetCDFHDFReaders? I'm assuming the vtkNetCDFHDFReaders output vtkImageData types. In that case, you can use vtkImageMathematics[1] to perform the division, but raising to a power is currently not directly supported (unless I'm overlooking something). The right way would be be to adapt the vtkImageMathematics class to support this - this would be straight-forward modification. A kludge would be to decompose your exponentiation into exp and log, both operations that are supported by vtkImageMathematics. -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From nacho at lncc.br Thu Aug 26 18:59:22 2004 From: nacho at lncc.br (Nacho Larrabide) Date: Thu, 26 Aug 2004 19:59:22 -0300 Subject: [vtkusers] Image series problem with vtkImageReader In-Reply-To: <20040826200056.0AC0E28E4D@public.kitware.com> References: <20040826200056.0AC0E28E4D@public.kitware.com> Message-ID: <611363580.20040826195922@lncc.br> Hi, I'm trying to read a series of images of diferente types (for example Raw, Bmp or Ppm). Here you have some example of the code that was working on Vtk 4.0, but now it's giving me lots of trowble to make it work. The problem is that this guy just reads the exact 3rd part of the total volume (in the Z axis). Any sugestion? if (f!=FORMAT_RAW){ if (f==FORMAT_BMP) imr=vtkBMPReader::New(); if (f==FORMAT_PPM) imr=vtkPNMReader::New(); if (rbSliceFile->value()){ imr->SetNumberOfScalarComponents(1); imr->SetDataExtent(0,0,0,0,0,sliceCount-1); imr->SetFilePattern(pattern); imr->SetFilePrefix(fname); imr->SetFileNameSliceOffset(firstSlice); imr->SetFileNameSliceSpacing(step); }else{ imr->SetFileName(filename.c_str()); } }else{ ... [Raw format reading, almost the same but specifying the size of every voxel and so on] ... } ThanX in advance for any suggestion/help/hint/tip... :) 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 cvsonline at gmail.com Thu Aug 26 19:04:39 2004 From: cvsonline at gmail.com (Vaidya Chandrasekhar) Date: Thu, 26 Aug 2004 18:04:39 -0500 Subject: [vtkusers] Polygon to Volume data Message-ID: hi I have a set of trianlges of a model ( a polygonal model) and I need to Voxelize it (convert it into 3dGrid) . If anyone can suggest me any approaches in VTK or point to sources on the web that will be great. Please let me know. -- Vaidya Chandrasekhar 1-312-925-6972 From nacho at lncc.br Thu Aug 26 19:14:03 2004 From: nacho at lncc.br (Nacho Larrabide) Date: Thu, 26 Aug 2004 20:14:03 -0300 Subject: [vtkusers] Selecting a triangle in a VTK object. In-Reply-To: <20040826200056.0AC0E28E4D@public.kitware.com> References: <20040826200056.0AC0E28E4D@public.kitware.com> Message-ID: <447787402.20040826201403@lncc.br> Hi again, I'm also trying to select (or at least identify) one triangle over a triangle mesh with the mouse. I'm working with FLTK to handle the interface. Does anybody have a sugestion or example for me to look after?. Also I'd like to show (over the object's boundingBox) a ruler to help the user knowing where he is. Also any example or sugestion would be very usefull!. ThanX again in advance. 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 Thu Aug 26 19:19:31 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Thu, 26 Aug 2004 19:19:31 -0400 Subject: [vtkusers] Multi-Input and Math on Data Message-ID: <20040826231931.MMVU12967.fep02.biz.rr.com@[127.0.0.1]> > On Thu, 26 Aug 2004 17:38:17 -0400, Stewart Dickson wrote: > > I wish to visualize a derived 480x480x480 scalar data field: > > entropy = pressure / density ^ 1.33333 > > > > I have the vtkNetCDFHDFReader library which is distributed with ASPECT > > Therefore, I can read the data files into Vtk. > > > > Is there a library in Vtk to allow one to do exponentiation and division > > on the output of two vtkNetCDFHDFReaders? > > I'm assuming the vtkNetCDFHDFReaders output vtkImageData types. In > that case, you can use vtkImageMathematics[1] to perform the division, > but raising to a power is currently not directly supported (unless I'm > overlooking something). The right way would be be to adapt the > vtkImageMathematics class to support this - this would be > straight-forward modification. A kludge would be to decompose your > exponentiation into exp and log, both operations that are supported by > vtkImageMathematics. You can also play with: http://www.vtk.org/doc/nightly/html/classvtkArrayCalculator.html It supports: standard operations: + - * / ^ . access vector components: iHat, jHat, kHat abs acos asin atan ceil cos cosh exp floor log mag min max norm sign sin sinh sqrt tan tanh HTH Mathieu From Eric.Harlow at edwards.af.mil Thu Aug 26 20:45:58 2004 From: Eric.Harlow at edwards.af.mil (Harlow Eric D Contr 412 TW/ENR) Date: Thu, 26 Aug 2004 17:45:58 -0700 Subject: [vtkusers] vtkWin32OpenGLRenderWindow vtkSmartPtr error Message-ID: <7D4FEEC34EF66843830C74D10D65196902237017@fsfspm38> Dear VTK Users: Does anyone know how to solve this? I have a renderWindow wrapped in a vtkSmartPtr and I get an compile error when I try to pass it the vtkWindowToImageFilter SetInput function. vtkSmartPtr RenderWindow_; implementation: vtkWindowToImageFilter *w2if = vtkWindowToImageFilter::New(); w2if->SetInput(RenderWindow_.get ); error: c:\MDV\DVL\dvlcanvas.cpp(169) : error C2664: 'vtkWindowToImageFilter::SetInput' : cannot convert parameter 1 from 'vtkWin32OpenGLRenderWindow *(void) const' to 'vtkWindow *' There is no context in which this conversion is possible Thanks, Eric From camilo.jimenez at spymac.com Fri Aug 27 01:08:50 2004 From: camilo.jimenez at spymac.com (camilo.jimenez at spymac.com) Date: Thu, 26 Aug 2004 21:08:50 -0800 Subject: [vtkusers] Use of SetExecuteMethod Message-ID: <200408262108.50235.camilo.jimenez@spymac.com> I am trying to use the vtkProgrammableFilter in c++ but I haven't come with the use of SetExecuteMethod. The Help says void vtkProgrammableFilter::SetExecuteMethod (void (*f)(void *), void*arg) so I tried void func(void){ } and filter->SetExecuteMethod(func) //like the tcl example and other things like that, but I couldn't compile it. Can somebody help me. ThanX From bhaveshpatel at sahajanandsoftware.com Fri Aug 27 01:07:50 2004 From: bhaveshpatel at sahajanandsoftware.com (Bhavesh Patel) Date: Fri, 27 Aug 2004 10:37:50 +0530 Subject: [vtkusers] problem with vtkGaussianSplatter Message-ID: <007601c48bf3$cd432520$210000c0@bip> Hi, I am new user for this group. I want to convert points in space to 3D image or triangles. I am starting with vtkGaussianSplatter. I found example (finance.cxx) from the net, I implement that code in my project but in this example code read "finance.txt" file but unfortunately i don't have this file. so pls help me, tell me where can i get this file or if any one have already it pls send me on bhaveshpatel at sahajanandsoftware.com . thanx in advance. ******************************************************* Regards, Bhavesh Patel (Software Engineer) Sahajanand Software Pvt. Ltd., Gandhinagar. Mobile : 9426415254 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Bhavesh Patel.vcf Type: text/x-vcard Size: 158 bytes Desc: not available URL: From bhaveshpatel at sahajanandsoftware.com Fri Aug 27 01:07:50 2004 From: bhaveshpatel at sahajanandsoftware.com (Bhavesh Patel) Date: Fri, 27 Aug 2004 10:37:50 +0530 Subject: [vtkusers] problem with vtkGaussianSplatter Message-ID: <007601c48bf3$cd432520$210000c0@bip> Hi, I am new user for this group. I want to convert points in space to 3D image or triangles. I am starting with vtkGaussianSplatter. I found example (finance.cxx) from the net, I implement that code in my project but in this example code read "finance.txt" file but unfortunately i don't have this file. so pls help me, tell me where can i get this file or if any one have already it pls send me on bhaveshpatel at sahajanandsoftware.com . thanx in advance. ******************************************************* Regards, Bhavesh Patel (Software Engineer) Sahajanand Software Pvt. Ltd., Gandhinagar. Mobile : 9426415254 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Bhavesh Patel.vcf Type: text/x-vcard Size: 158 bytes Desc: not available URL: From =?gb2312?q?=FFffffffffffc3=FFffffffffffcf=FFffffffffffe7=FFffffffffffe2?= Fri Aug 27 02:42:52 2004 From: =?gb2312?q?=FFffffffffffc3=FFffffffffffcf=FFffffffffffe7=FFffffffffffe2?= (=?gb2312?q?=FFffffffffffc3=FFffffffffffcf=FFffffffffffe7=FFffffffffffe2?=) Date: Fri, 27 Aug 2004 14:42:52 +0800 (CST) Subject: [vtkusers] Which directory can i find TkInteractor.tcl? Message-ID: <20040827064252.66881.qmail@web15810.mail.cnb.yahoo.com> Which directory can i find TkInteractor.tcl? --------------------------------- Do You Yahoo!? 150??MP3???????????? ??????????????????? 1G??1000??????????? -------------- next part -------------- An HTML attachment was scrubbed... URL: From joeri_vtk at hotmail.com Fri Aug 27 03:31:33 2004 From: joeri_vtk at hotmail.com (Joeri Nicolaes) Date: Fri, 27 Aug 2004 09:31:33 +0200 Subject: [vtkusers] reading your own XML format Message-ID: Hi all, I have written on XML file with my own specific tags. I would like to read in this XML file, parse it and work with its data. How can I do this using Tcl? My current idea is to define a vtkXMLDataElement object for each specific tag and then use vtkXMLReader to parse given the predefined tags. But in vtkXMLReader I only find a method ReadPrimaryElement (vtkXMLDataElement) where you can specify the tag to read in. But I am stuck there... Can anyone give me tips or perhaps some example code (in Tcl if possible)? Thx, Joeri, Agfa Gevaert, R&D/TI + 32 (0) 3 444 6429, stajn at agfa.com joeri_vtk at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mirelle_mellqvist at hotmail.com Fri Aug 27 05:50:08 2004 From: mirelle_mellqvist at hotmail.com (Mirelle Mellqvist) Date: Fri, 27 Aug 2004 09:50:08 +0000 Subject: [vtkusers] Convert Ascii to vtk Message-ID: Hi all I am a newbie at VTK. I am working on a project where I have FEM-elements in an ascii file and I want to use vtkUnstructuredGridReader. To do this (as I have understood it) I have to convert my ascii file to a vtk file. How is this done? When I look at the vtkUnstructuredGridReader "manual" it just says to look in the text for the files that are supported by vtkDataReader. My problem is that I can't find it in the text. Please help me!! Kind regards, Mirelle Mellqvist _________________________________________________________________ L?ttare att hitta dr?mresan med MSN Resor http://www.msn.se/resor/ From niemeijer at science-and-technology.nl Fri Aug 27 06:39:35 2004 From: niemeijer at science-and-technology.nl (Sander Niemeijer) Date: Fri, 27 Aug 2004 12:39:35 +0200 Subject: [vtkusers] Cell data in a vtkPolyData object In-Reply-To: Message-ID: <6344DBFE-F815-11D8-82AA-00039383F730@science-and-technology.nl> Hi Charles, It's no wonder that it's puzzling you. The fact is that there is something very wrong with the design of the vtkPolyData class. If you use a vtkPolyData object to store only one type of cells (i.e. only vertices, or only lines, etc.) then everything goes well. But once you start to mix different types of cells in a vtkPolyData object you will get into all kinds of trouble. See for instance my bug report: http://www.vtk.org/Bug/bug.php?op=show&bugid=564&pos=0 And the e-mail I send to the list about this: http://public.kitware.com/pipermail/vtkusers/2004-January/071326.html The only advice I can give you is to use a different vtkPolyData object for each cell type you have. Best regards, Sander On donderdag, aug 26, 2004, at 23:32 Europe/Amsterdam, Charles Boivin wrote: > Hello everyone, > > Well, I am still working on my custom reader, and thanks to everyone > here, a lot of progress has been made. I am able to load my geometry > and > connectivity properly using various types of cells (vertices, lines, > and > polygons), and that works pretty well. I have also been able to load > any > kind of point data (i.e. combinations of scalars, vectors, etc..) > successfully. > > I then turned my attention to cell data. Cells are stored in the > vtkPolyData class using different containers for vertices, lines and > polygons, i.e. there is a separate vtkCellArray array for vertices, > lines, and polygons. Those are set in vtkPolyData using > vtkPolyData::SetVertices(), SetLines() and SetPolys(). (I don't mean to > lecture anyone here, but I figured I would explain how I understand > things; that way it would be easy for you to point out a flaw in my > reasoning). > > I store my cell data in a vtkDoubleArray, and later set the cell data > to it using a call to > vtkPolyData::GetCellData()->AddArray(myCellDataArray). This is pretty > much the same process that I (successfully) use for node data. However, > things to do not look right for cell data if I have different types of > cells (i.e. verts, lines, and polys) in my geometry. > > When I set the data, I need to specify an index to the cell, and then > the data. How do I know what the index of the different cells are when > stored in vtkPolyData if they are not all in the same container? I know > the vtkCellArray::InsertCell() function returns an index to its > position, but, for example, the vertices array does not know about the > line array, and vice-versa. When I then have only *one* array for my > data, how do I arrange it properly so that it matches the cells? > > I hope I made myself clear... this is a bit puzzling to me! > > Thank you in advance, > > Charles Boivin > _______________________________________________ > 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 jbiddiscombe at skippingmouse.co.uk Fri Aug 27 07:12:16 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Fri, 27 Aug 2004 12:12:16 +0100 Subject: [vtkusers] Cell data in a vtkPolyData object References: <6344DBFE-F815-11D8-82AA-00039383F730@science-and-technology.nl> Message-ID: <000c01c48c26$b6103d60$5101460a@miradasolutions.com> It's not so much that that the design of the polydata is bad, (well, it is really), but you need to know that all filters operate on cells in order of verts/lines/polys/strips and so all cell data needs to be stored in this order. Its extremely annoying and everyone who's used vtk for some length of time will have been bitten by this one - however, once you know about it, you always write your filters/importers/etc to operate like this and all is well. JB ----- Original Message ----- From: "Sander Niemeijer" To: "Charles Boivin" Cc: Sent: Friday, August 27, 2004 11:39 AM Subject: Re: [vtkusers] Cell data in a vtkPolyData object > Hi Charles, > > It's no wonder that it's puzzling you. The fact is that there is > something very wrong with the design of the vtkPolyData class. > > If you use a vtkPolyData object to store only one type of cells (i.e. > only vertices, or only lines, etc.) then everything goes well. But once > you start to mix different types of cells in a vtkPolyData object you > will get into all kinds of trouble. > > See for instance my bug report: > http://www.vtk.org/Bug/bug.php?op=show&bugid=564&pos=0 > > And the e-mail I send to the list about this: > http://public.kitware.com/pipermail/vtkusers/2004-January/071326.html > > The only advice I can give you is to use a different vtkPolyData object > for each cell type you have. > > Best regards, > Sander > > On donderdag, aug 26, 2004, at 23:32 Europe/Amsterdam, Charles Boivin > wrote: > > > Hello everyone, > > > > Well, I am still working on my custom reader, and thanks to everyone > > here, a lot of progress has been made. I am able to load my geometry > > and > > connectivity properly using various types of cells (vertices, lines, > > and > > polygons), and that works pretty well. I have also been able to load > > any > > kind of point data (i.e. combinations of scalars, vectors, etc..) > > successfully. > > > > I then turned my attention to cell data. Cells are stored in the > > vtkPolyData class using different containers for vertices, lines and > > polygons, i.e. there is a separate vtkCellArray array for vertices, > > lines, and polygons. Those are set in vtkPolyData using > > vtkPolyData::SetVertices(), SetLines() and SetPolys(). (I don't mean to > > lecture anyone here, but I figured I would explain how I understand > > things; that way it would be easy for you to point out a flaw in my > > reasoning). > > > > I store my cell data in a vtkDoubleArray, and later set the cell data > > to it using a call to > > vtkPolyData::GetCellData()->AddArray(myCellDataArray). This is pretty > > much the same process that I (successfully) use for node data. However, > > things to do not look right for cell data if I have different types of > > cells (i.e. verts, lines, and polys) in my geometry. > > > > When I set the data, I need to specify an index to the cell, and then > > the data. How do I know what the index of the different cells are when > > stored in vtkPolyData if they are not all in the same container? I know > > the vtkCellArray::InsertCell() function returns an index to its > > position, but, for example, the vertices array does not know about the > > line array, and vice-versa. When I then have only *one* array for my > > data, how do I arrange it properly so that it matches the cells? > > > > I hope I made myself clear... this is a bit puzzling to me! > > > > Thank you in advance, > > > > Charles Boivin > > _______________________________________________ > > 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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers From bibin.lukose at wipro.com Fri Aug 27 06:55:15 2004 From: bibin.lukose at wipro.com (bibin.lukose at wipro.com) Date: Fri, 27 Aug 2004 16:25:15 +0530 Subject: [vtkusers] membership Message-ID: I want become a member in this group regards Bibin Mathew Lukose Project Engineer WIPRO TECHNOLOGIES Keonics Electronic City Bangalore -560 100.India Phone :51103070 ext:3372 Mobile :98861-83668 Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin at wipro.com immediately and destroy all copies of this message and any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 2835 bytes Desc: image001.gif URL: From malcolm at geovision.co.za Fri Aug 27 07:28:50 2004 From: malcolm at geovision.co.za (Malcolm Drummond) Date: Fri, 27 Aug 2004 13:28:50 +0200 Subject: [vtkusers] Cell data in a vtkPolyData object References: <6344DBFE-F815-11D8-82AA-00039383F730@science-and-technology.nl> Message-ID: <001601c48c29$1e0183a0$adf4fea9@bart> It's not too difficult to handle this. Store cell values separately for verts, lines and polys (ie. in separate arrays) as you add your cells - then load all the values from verts array, followed by all values from lines array, followed by all values from polys array ... you get the picture. This will correspond to the internal order of polydata. If you still have problems I can help you next week - totally snowed under right now. HTH Malcolm ----- Original Message ----- From: "Sander Niemeijer" To: "Charles Boivin" Cc: Sent: Friday, August 27, 2004 12:39 PM Subject: Re: [vtkusers] Cell data in a vtkPolyData object > Hi Charles, > > It's no wonder that it's puzzling you. The fact is that there is > something very wrong with the design of the vtkPolyData class. > > If you use a vtkPolyData object to store only one type of cells (i.e. > only vertices, or only lines, etc.) then everything goes well. But once > you start to mix different types of cells in a vtkPolyData object you > will get into all kinds of trouble. > > See for instance my bug report: > http://www.vtk.org/Bug/bug.php?op=show&bugid=564&pos=0 > > And the e-mail I send to the list about this: > http://public.kitware.com/pipermail/vtkusers/2004-January/071326.html > > The only advice I can give you is to use a different vtkPolyData object > for each cell type you have. > > Best regards, > Sander > > On donderdag, aug 26, 2004, at 23:32 Europe/Amsterdam, Charles Boivin > wrote: > > > Hello everyone, > > > > Well, I am still working on my custom reader, and thanks to everyone > > here, a lot of progress has been made. I am able to load my geometry > > and > > connectivity properly using various types of cells (vertices, lines, > > and > > polygons), and that works pretty well. I have also been able to load > > any > > kind of point data (i.e. combinations of scalars, vectors, etc..) > > successfully. > > > > I then turned my attention to cell data. Cells are stored in the > > vtkPolyData class using different containers for vertices, lines and > > polygons, i.e. there is a separate vtkCellArray array for vertices, > > lines, and polygons. Those are set in vtkPolyData using > > vtkPolyData::SetVertices(), SetLines() and SetPolys(). (I don't mean to > > lecture anyone here, but I figured I would explain how I understand > > things; that way it would be easy for you to point out a flaw in my > > reasoning). > > > > I store my cell data in a vtkDoubleArray, and later set the cell data > > to it using a call to > > vtkPolyData::GetCellData()->AddArray(myCellDataArray). This is pretty > > much the same process that I (successfully) use for node data. However, > > things to do not look right for cell data if I have different types of > > cells (i.e. verts, lines, and polys) in my geometry. > > > > When I set the data, I need to specify an index to the cell, and then > > the data. How do I know what the index of the different cells are when > > stored in vtkPolyData if they are not all in the same container? I know > > the vtkCellArray::InsertCell() function returns an index to its > > position, but, for example, the vertices array does not know about the > > line array, and vice-versa. When I then have only *one* array for my > > data, how do I arrange it properly so that it matches the cells? > > > > I hope I made myself clear... this is a bit puzzling to me! > > > > Thank you in advance, > > > > Charles Boivin > > _______________________________________________ > > 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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From niemeijer at science-and-technology.nl Fri Aug 27 07:46:55 2004 From: niemeijer at science-and-technology.nl (Sander Niemeijer) Date: Fri, 27 Aug 2004 13:46:55 +0200 Subject: [vtkusers] Cell data in a vtkPolyData object In-Reply-To: <000c01c48c26$b6103d60$5101460a@miradasolutions.com> Message-ID: Hi John, As far as I can see you will still get incorrect behavior if you mix cell types, even if you do it in the specific order you say. For instance, in the example of my bug report (which is the same as the one in my e-mail of January 2004), if I replace the order of the initialization by: --- points = vtk.vtkPoints() # points for line 1 (line) points.InsertNextPoint(0.5, 0.3, 0) points.InsertNextPoint(0.5, 0.8, 0) # points for triangle 1 (triangle) points.InsertNextPoint(0.2, 0.3, 0) points.InsertNextPoint(0.4, 0.55, 0) points.InsertNextPoint(0.2, 0.8, 0) # points for poly 2 (bar) points.InsertNextPoint(0.6, 0.3, 0) points.InsertNextPoint(0.8, 0.3, 0) points.InsertNextPoint(0.8, 0.8, 0) points.InsertNextPoint(0.6, 0.8, 0) polydata.SetPoints(points) # set scalar cell data colors = vtk.vtkFloatArray() polydata.GetCellData().SetScalars(colors) # create line 1 ids = vtk.vtkIdList() ids.InsertNextId(0) ids.InsertNextId(1) cell = polydata.InsertNextCell(VTK_LINE, ids) # line 1 should get the second color (green) colors.InsertTuple1(cell, 0.0) # create poly 1 ids.Reset() ids.InsertNextId(2) ids.InsertNextId(3) ids.InsertNextId(4) cell = polydata.InsertNextCell(VTK_POLYGON, ids) # poly 1 should get the first color (red) colors.InsertTuple1(cell, 1.0) # create poly 2 ids.Reset() ids.InsertNextId(5) ids.InsertNextId(6) ids.InsertNextId(7) ids.InsertNextId(8) cell = polydata.InsertNextCell(VTK_POLYGON, ids) # poly 2 should get the third color (blue) colors.InsertTuple1(cell, 2.0) --- So first the single line, and then the two polygons. I still get a problem with the coloring of my cells (both with the 2D and 3D mapper). If you know of a way to get this example showing proper colors using just a single vtkpolydata object I would be very interested! Best regards, Sander On vrijdag, aug 27, 2004, at 13:12 Europe/Amsterdam, John Biddiscombe wrote: > > It's not so much that that the design of the polydata is bad, (well, > it is > really), but you need to know that all filters operate on cells in > order of > verts/lines/polys/strips and so all cell data needs to be stored in > this > order. Its extremely annoying and everyone who's used vtk for some > length of > time will have been bitten by this one - however, once you know about > it, > you always write your filters/importers/etc to operate like this and > all is > well. > > JB > > ----- Original Message ----- > From: "Sander Niemeijer" > To: "Charles Boivin" > Cc: > Sent: Friday, August 27, 2004 11:39 AM > Subject: Re: [vtkusers] Cell data in a vtkPolyData object > > >> Hi Charles, >> >> It's no wonder that it's puzzling you. The fact is that there is >> something very wrong with the design of the vtkPolyData class. >> >> If you use a vtkPolyData object to store only one type of cells (i.e. >> only vertices, or only lines, etc.) then everything goes well. But >> once >> you start to mix different types of cells in a vtkPolyData object you >> will get into all kinds of trouble. >> >> See for instance my bug report: >> http://www.vtk.org/Bug/bug.php?op=show&bugid=564&pos=0 >> >> And the e-mail I send to the list about this: >> http://public.kitware.com/pipermail/vtkusers/2004-January/071326.html >> >> The only advice I can give you is to use a different vtkPolyData >> object >> for each cell type you have. >> >> Best regards, >> Sander >> >> On donderdag, aug 26, 2004, at 23:32 Europe/Amsterdam, Charles Boivin >> wrote: >> >>> Hello everyone, >>> >>> Well, I am still working on my custom reader, and thanks to everyone >>> here, a lot of progress has been made. I am able to load my geometry >>> and >>> connectivity properly using various types of cells (vertices, lines, >>> and >>> polygons), and that works pretty well. I have also been able to load >>> any >>> kind of point data (i.e. combinations of scalars, vectors, etc..) >>> successfully. >>> >>> I then turned my attention to cell data. Cells are stored in the >>> vtkPolyData class using different containers for vertices, lines and >>> polygons, i.e. there is a separate vtkCellArray array for vertices, >>> lines, and polygons. Those are set in vtkPolyData using >>> vtkPolyData::SetVertices(), SetLines() and SetPolys(). (I don't mean >>> to >>> lecture anyone here, but I figured I would explain how I understand >>> things; that way it would be easy for you to point out a flaw in my >>> reasoning). >>> >>> I store my cell data in a vtkDoubleArray, and later set the cell data >>> to it using a call to >>> vtkPolyData::GetCellData()->AddArray(myCellDataArray). This is pretty >>> much the same process that I (successfully) use for node data. >>> However, >>> things to do not look right for cell data if I have different types >>> of >>> cells (i.e. verts, lines, and polys) in my geometry. >>> >>> When I set the data, I need to specify an index to the cell, and then >>> the data. How do I know what the index of the different cells are >>> when >>> stored in vtkPolyData if they are not all in the same container? I >>> know >>> the vtkCellArray::InsertCell() function returns an index to its >>> position, but, for example, the vertices array does not know about >>> the >>> line array, and vice-versa. When I then have only *one* array for my >>> data, how do I arrange it properly so that it matches the cells? >>> >>> I hope I made myself clear... this is a bit puzzling to me! >>> >>> Thank you in advance, >>> >>> Charles Boivin >>> _______________________________________________ >>> 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: > >> Follow this link to subscribe/unsubscribe: >> http://www.vtk.org/mailman/listinfo/vtkusers > From jbiddiscombe at skippingmouse.co.uk Fri Aug 27 08:02:15 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Fri, 27 Aug 2004 13:02:15 +0100 Subject: [vtkusers] Cell data in a vtkPolyData object References: Message-ID: <001201c48c2d$b17a8470$5101460a@miradasolutions.com> Aha, well you must simply ignore the cell id what you've done is this... > cell = polydata.InsertNextCell(VTK_LINE, ids) > # line 1 should get the second color (green) > colors.InsertTuple1(cell, 0.0) ... > cell = polydata.InsertNextCell(VTK_POLYGON, ids) > # poly 1 should get the first color (red) > colors.InsertTuple1(cell, 1.0) ... > cell = polydata.InsertNextCell(VTK_POLYGON, ids) > # poly 2 should get the third color (blue) > colors.InsertTuple1(cell, 2.0) So the first line is ID 0, then the second and tird are ID 0,1 : clearly wrong just do this vtkIdType index = 0; > cell = polydata.InsertNextCell(VTK_LINE, ids) > # line 1 should get the second color (green) > colors.InsertTuple1(index++, 0.0) ... > cell = polydata.InsertNextCell(VTK_POLYGON, ids) > # poly 1 should get the first color (red) > colors.InsertTuple1(index++, 1.0) ... > cell = polydata.InsertNextCell(VTK_POLYGON, ids) > # poly 2 should get the third color (blue) > colors.InsertTuple1(index++, 2.0) index++ instead of cell, now you get 0,1,2 : who cares what the ID's in each cell araay are. they're irrelevant for your needs JB From niemeijer at science-and-technology.nl Fri Aug 27 08:04:33 2004 From: niemeijer at science-and-technology.nl (Sander Niemeijer) Date: Fri, 27 Aug 2004 14:04:33 +0200 Subject: [vtkusers] Cell data in a vtkPolyData object In-Reply-To: Message-ID: <423E1D34-F821-11D8-82AA-00039383F730@science-and-technology.nl> Ok. The reordering in my previous e-mail was not quite what it was supposed to be (the first two cells got the wrong colors assigned) :( Below the full example as I intended it to be (first the line, then the two polys, using the colors red/green/blue). In the reordered case the 3D Mapper indeed produces the correct color mapping. However, the 2D Mapper does not! And for the application we have written the 2D mapper is essential. Best regards, Sander --- import vtk VTK_LINE = 3 VTK_POLYGON = 7 # initialize polydata object polydata = vtk.vtkPolyData() polydata.SetLines(vtk.vtkCellArray()) polydata.SetPolys(vtk.vtkCellArray()) points = vtk.vtkPoints() # points for line 1 (line) points.InsertNextPoint(0.3, 0.3, 0) points.InsertNextPoint(0.3, 0.8, 0) # points for triangle 1 (triangle) points.InsertNextPoint(0.4, 0.3, 0) points.InsertNextPoint(0.6, 0.55, 0) points.InsertNextPoint(0.4, 0.8, 0) # points for poly 2 (bar) points.InsertNextPoint(0.6, 0.3, 0) points.InsertNextPoint(0.8, 0.3, 0) points.InsertNextPoint(0.8, 0.8, 0) points.InsertNextPoint(0.6, 0.8, 0) polydata.SetPoints(points) # set scalar cell data colors = vtk.vtkFloatArray() polydata.GetCellData().SetScalars(colors) # create line 1 ids = vtk.vtkIdList() ids.InsertNextId(0) ids.InsertNextId(1) cell = polydata.InsertNextCell(VTK_LINE, ids) # line 1 should get the first color (red) colors.InsertTuple1(cell, 0.0) # create poly 1 ids.Reset() ids.InsertNextId(2) ids.InsertNextId(3) ids.InsertNextId(4) cell = polydata.InsertNextCell(VTK_POLYGON, ids) # poly 1 should get the second color (green) colors.InsertTuple1(cell, 1.0) # create poly 2 ids.Reset() ids.InsertNextId(5) ids.InsertNextId(6) ids.InsertNextId(7) ids.InsertNextId(8) cell = polydata.InsertNextCell(VTK_POLYGON, ids) # poly 2 should get the third color (blue) colors.InsertTuple1(cell, 2.0) # create reference poly with colors as they should be refpoly = vtk.vtkPolyData() refpoly.SetLines(vtk.vtkCellArray()) refpoly.GetCellData().SetScalars(colors) scalars = refpoly.GetCellData().GetScalars() print scalars.GetNumberOfTuples() refpoints = vtk.vtkPoints() refpoints.InsertNextPoint(0.2, 0.2, 0) refpoints.InsertNextPoint(0.4, 0.2, 0) refpoints.InsertNextPoint(0.6, 0.2, 0) refpoints.InsertNextPoint(0.8, 0.2, 0) refpoly.SetPoints(refpoints) ids.Reset() ids.InsertNextId(0) ids.InsertNextId(1) cell = refpoly.InsertNextCell(VTK_LINE, ids) ids.Reset() ids.InsertNextId(1) ids.InsertNextId(2) cell = refpoly.InsertNextCell(VTK_LINE, ids) ids.Reset() ids.InsertNextId(2) ids.InsertNextId(3) cell = refpoly.InsertNextCell(VTK_LINE, ids) # define colors lut = vtk.vtkLookupTable() lut.SetNumberOfTableValues(3) lut.SetTableRange(0, 2) lut.SetTableValue(0, 1.0, 0.0, 0.0, 1.0) # red lut.SetTableValue(1, 0.0, 1.0, 0.0, 1.0) # green lut.SetTableValue(2, 0.0, 0.0, 1.0, 1.0) # blue lut.Build() # create mapper and assign colortable polyMapper = vtk.vtkPolyDataMapper() polyMapper.SetInput(polydata) polyMapper.SetScalarModeToUseCellData() polyMapper.UseLookupTableScalarRangeOn() polyMapper.SetLookupTable(lut) coordinate = vtk.vtkCoordinate() coordinate.SetCoordinateSystemToNormalizedViewport() polyMapper2D = vtk.vtkPolyDataMapper2D() polyMapper2D.SetTransformCoordinate(coordinate) polyMapper2D.SetInput(polydata) polyMapper2D.SetScalarModeToUseCellData() polyMapper2D.UseLookupTableScalarRangeOn() polyMapper2D.SetLookupTable(lut) # same for the refpoly refpolyMapper = vtk.vtkPolyDataMapper() refpolyMapper.SetInput(refpoly) refpolyMapper.SetScalarModeToUseCellData() refpolyMapper.UseLookupTableScalarRangeOn() refpolyMapper.SetLookupTable(lut) refpolyMapper2D = vtk.vtkPolyDataMapper2D() refpolyMapper2D.SetTransformCoordinate(coordinate) refpolyMapper2D.SetInput(refpoly) refpolyMapper2D.SetScalarModeToUseCellData() refpolyMapper2D.UseLookupTableScalarRangeOn() refpolyMapper.SetLookupTable(lut) refpolyMapper2D.SetLookupTable(lut) # create actors polyActor = vtk.vtkActor() polyActor.SetMapper(polyMapper) polyActor2D = vtk.vtkActor2D() polyActor2D.SetMapper(polyMapper2D) refpolyActor = vtk.vtkActor() refpolyActor.SetMapper(refpolyMapper) refpolyActor2D = vtk.vtkActor2D() refpolyActor2D.SetMapper(refpolyMapper2D) # create renderers renderer = vtk.vtkRenderer() renderer.SetViewport(0, 0, 0.5, 1.0) renderer.AddActor(polyActor) renderer.AddActor(refpolyActor) renderer2D = vtk.vtkRenderer() renderer2D.SetViewport(0.5, 0.0, 1.0, 1.0) renderer2D.AddActor(polyActor2D) renderer2D.AddActor(refpolyActor2D) # render it renderWindow = vtk.vtkRenderWindow() renderWindow.SetSize(600,300) renderWindow.AddRenderer(renderer) renderWindow.AddRenderer(renderer2D) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renderWindow) renderWindow.Render() iren.Start() From niemeijer at science-and-technology.nl Fri Aug 27 08:08:46 2004 From: niemeijer at science-and-technology.nl (Sander Niemeijer) Date: Fri, 27 Aug 2004 14:08:46 +0200 Subject: [vtkusers] Cell data in a vtkPolyData object In-Reply-To: <001201c48c2d$b17a8470$5101460a@miradasolutions.com> Message-ID: Hi John, The values of 'cell' are 0, 1, 2. So using 'index++' doesn't change a thing. Best regards, Sander On vrijdag, aug 27, 2004, at 14:02 Europe/Amsterdam, John Biddiscombe wrote: > Aha, well you must simply ignore the cell id > > what you've done is this... > >> cell = polydata.InsertNextCell(VTK_LINE, ids) >> # line 1 should get the second color (green) >> colors.InsertTuple1(cell, 0.0) > ... >> cell = polydata.InsertNextCell(VTK_POLYGON, ids) >> # poly 1 should get the first color (red) >> colors.InsertTuple1(cell, 1.0) > ... >> cell = polydata.InsertNextCell(VTK_POLYGON, ids) >> # poly 2 should get the third color (blue) >> colors.InsertTuple1(cell, 2.0) > > So the first line is ID 0, then the second and tird are ID 0,1 : > clearly > wrong > just do this > vtkIdType index = 0; > >> cell = polydata.InsertNextCell(VTK_LINE, ids) >> # line 1 should get the second color (green) >> colors.InsertTuple1(index++, 0.0) > ... >> cell = polydata.InsertNextCell(VTK_POLYGON, ids) >> # poly 1 should get the first color (red) >> colors.InsertTuple1(index++, 1.0) > ... >> cell = polydata.InsertNextCell(VTK_POLYGON, ids) >> # poly 2 should get the third color (blue) >> colors.InsertTuple1(index++, 2.0) > > index++ instead of cell, now you get 0,1,2 : who cares what the ID's > in each > cell araay are. they're irrelevant for your needs > > JB > > From jbiddiscombe at skippingmouse.co.uk Fri Aug 27 08:13:27 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Fri, 27 Aug 2004 13:13:27 +0100 Subject: [vtkusers] Cell data in a vtkPolyData object References: Message-ID: <004601c48c2f$4b1c8b90$5101460a@miradasolutions.com> > The values of 'cell' are 0, 1, 2. So using 'index++' doesn't change a > thing. Apologies, I was so busy writing the solution, that I didn't read the original properly. I see that you are calling > > cell = polydata.InsertNextCell(VTK_LINE, ids) and not lines.InsertNextCell(ids) (would give 0) polys.InsertNextCell(ids) (would give 0,1) etc etc It should work as before then JB From clinton at elemtech.com Fri Aug 27 08:42:32 2004 From: clinton at elemtech.com (Clinton Stimpson) Date: Fri, 27 Aug 2004 06:42:32 -0600 Subject: [vtkusers] Cell data in a vtkPolyData object In-Reply-To: <20040827111254.8022E29483@public.kitware.com> References: <20040827111254.8022E29483@public.kitware.com> Message-ID: <1093610552.412f2c384568f@webmail.xmission.com> Did you ever try calling vtkPolyData::BuildCells() after you modify the cells in the vtkCellArray's that a vtkPolyData references? Clint > ------------------------------ > > Message: 7 > Date: Fri, 27 Aug 2004 12:39:35 +0200 > From: Sander Niemeijer > Subject: Re: [vtkusers] Cell data in a vtkPolyData object > To: "Charles Boivin" > Cc: vtkusers at vtk.org > Message-ID: > <6344DBFE-F815-11D8-82AA-00039383F730 at science-and-technology.nl> > Content-Type: text/plain; charset=US-ASCII; format=flowed > > Hi Charles, > > It's no wonder that it's puzzling you. The fact is that there is > something very wrong with the design of the vtkPolyData class. > > If you use a vtkPolyData object to store only one type of cells (i.e. > only vertices, or only lines, etc.) then everything goes well. But once > you start to mix different types of cells in a vtkPolyData object you > will get into all kinds of trouble. > > See for instance my bug report: > http://www.vtk.org/Bug/bug.php?op=show&bugid=564&pos=0 > > And the e-mail I send to the list about this: > http://public.kitware.com/pipermail/vtkusers/2004-January/071326.html > > The only advice I can give you is to use a different vtkPolyData object > for each cell type you have. > > Best regards, > Sander > > On donderdag, aug 26, 2004, at 23:32 Europe/Amsterdam, Charles Boivin > wrote: > > > Hello everyone, > > > > Well, I am still working on my custom reader, and thanks to everyone > > here, a lot of progress has been made. I am able to load my geometry > > and > > connectivity properly using various types of cells (vertices, lines, > > and > > polygons), and that works pretty well. I have also been able to load > > any > > kind of point data (i.e. combinations of scalars, vectors, etc..) > > successfully. > > > > I then turned my attention to cell data. Cells are stored in the > > vtkPolyData class using different containers for vertices, lines and > > polygons, i.e. there is a separate vtkCellArray array for vertices, > > lines, and polygons. Those are set in vtkPolyData using > > vtkPolyData::SetVertices(), SetLines() and SetPolys(). (I don't mean to > > lecture anyone here, but I figured I would explain how I understand > > things; that way it would be easy for you to point out a flaw in my > > reasoning). > > > > I store my cell data in a vtkDoubleArray, and later set the cell data > > to it using a call to > > vtkPolyData::GetCellData()->AddArray(myCellDataArray). This is pretty > > much the same process that I (successfully) use for node data. However, > > things to do not look right for cell data if I have different types of > > cells (i.e. verts, lines, and polys) in my geometry. > > > > When I set the data, I need to specify an index to the cell, and then > > the data. How do I know what the index of the different cells are when > > stored in vtkPolyData if they are not all in the same container? I know > > the vtkCellArray::InsertCell() function returns an index to its > > position, but, for example, the vertices array does not know about the > > line array, and vice-versa. When I then have only *one* array for my > > data, how do I arrange it properly so that it matches the cells? > > > > I hope I made myself clear... this is a bit puzzling to me! > > > > Thank you in advance, > > > > Charles Boivin > > _______________________________________________ > > 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 goodwin.lawlor at ucd.ie Fri Aug 27 09:27:51 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Fri, 27 Aug 2004 14:27:51 +0100 Subject: [vtkusers] Re: Polygon to Volume data References: Message-ID: Have a look at this thread, starting with this post: http://public.kitware.com/pipermail/vtkusers/2004-July/075381.html hth Goodwin "Vaidya Chandrasekhar" wrote in message news:ae0c9ae404082616046c95c68 at mail.gmail.com... > hi > I have a set of trianlges of a model ( a polygonal model) and I need > to Voxelize it (convert it into 3dGrid) . > If anyone can suggest me any approaches in VTK or point to sources on > the web that will be great. > > Please let me know. > > -- > Vaidya Chandrasekhar > 1-312-925-6972 > _______________________________________________ > 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 niemeijer at science-and-technology.nl Fri Aug 27 09:54:02 2004 From: niemeijer at science-and-technology.nl (Sander Niemeijer) Date: Fri, 27 Aug 2004 15:54:02 +0200 Subject: [vtkusers] Cell data in a vtkPolyData object In-Reply-To: <1093610552.412f2c384568f@webmail.xmission.com> Message-ID: <8DE1E023-F830-11D8-82AA-00039383F730@science-and-technology.nl> Yes I have tried this. If you do this when you've added your mixed typed cells in random order you will end up with a reordered list of cells. And if you add your cells in the appropriate order (vertex/line/poly/strip) then a BuildCells() will have no apparent effect. If you look at the implementation of the vtkPolyData class you will see that vtkPolyData::InsertNextCell() performs the same this->Cells->InsertNextCell() calls that vtkPolyData::BuildCells() uses. So as long as you call your vtkPolyData::InsertNextCell() in the right order you will do the same as vtkPolyData::BuildCells(). Just for clarification, let me restate the problems I'm having: 1) Adding mixed typed cells in random order to a vtkPolyData object can have all kinds of nasty side effects because the ordering of cells can be changed while scalar data that you associate with these cells doesn't get reordered! According to John this is known behavior, but the fact that this kind of behavior is not documented anywhere, makes this a bug in my opinion (either the class documentation should make this behavior explicit, or the vtkPolyData class should allow adding cells in a mixed ordering and KEEP that ordering). 2) Even if you add cells in the right order to a vtkPolyData object you will still get problems when you use a scalar color lookup table with a vtkPolyDataMapper2D (see my other e-mail in this thread). As far as I can see this is due to the vtkOpenGLPolyDataMapper2D class handling the cell types in a different order. If this is indeed the case then even VTK internally does not keep to this fixed ordering of cell types in the vtkPolyData object. So as far as I can see, there IS a problem. And given the complexity, I think it will take quite some time before we can see this problem fixed properly. The easiest solution now would probably be to 'fix' the vtkOpenGLPolyDataMapper2D class and to add the behavior about the ordering to the vtkPolyData class documentation. Best regards, Sander On vrijdag, aug 27, 2004, at 14:42 Europe/Amsterdam, Clinton Stimpson wrote: > > Did you ever try calling vtkPolyData::BuildCells() after you modify the > cells in the vtkCellArray's that a vtkPolyData references? > > Clint From berklist at nycap.rr.com Fri Aug 27 10:12:40 2004 From: berklist at nycap.rr.com (Berk Geveci) Date: Fri, 27 Aug 2004 10:12:40 -0400 Subject: [vtkusers] Streamlines Debugging tips? In-Reply-To: <200408262156.i7QLuloB012474@apollo.sr.unh.edu> References: <412E5306.5000707@ornl.gov> <200408262156.i7QLuloB012474@apollo.sr.unh.edu> Message-ID: <1093615960.15179.16.camel@silverymoon> > StreamLine? vtkStreamLine is deprecated, you should be using > vtkStreamTracer instead. This bit me as well, it seems the only place > to find out currently is this mailing list =). I apologize for the poor documentation. I am afraid of removing vtkStreamer and sub-classes for two reasons: 1. it would break backwards compatibility 2. vtkStreamTracer does not support a few things the others support: dashed streamlines, controlling the size of the output lines independently (i.e. have different integration step and output step). Still, I recommend switching at least because you are likely to get more response from me and other developers on vtkStreamTracer :-) > >Will randomly-generated points landing in a region of zero velocity > >cause the streamline generator to puke? (Cannot generate normals on > >zero-length segments) > > Looking through the code, it appears this is correct. This sometimes happens (although it is less frequent with vtkStreamTracer) and is not necessarily a show stopper. > >Are there any published rules-of-thumb for setting integration > >parameters appropriate to the data fields under observation? vtkStreamTracer gives you much better control of the integration parameters. You can set the integration step based on absolute length, cell length or time (or more precisely the integration parameter s). The same thing is true for maximum propagation and similar parameters. Furthermore, you can use adaptive integration (with Runge Kutta 4-5), the advantage of which being that you only have to assign an initial step length and a maximum relative error. Unfortunately, it is mainly a matter of gaining experience through trial and error. > >Are there any resommended methods of debugging the integrator/streamline > >generator? One quick way of figuring out why a streamline terminated is to look at the ReasonForTermination array in the output. This is a cell based array (each streamline being a polyline cell) and will tell you why a streamline was terminated. The values are: OUT_OF_DOMAIN = 1, NOT_INITIALIZED = 2, UNEXPECTED_VALUE = 3, OUT_OF_TIME = 4, OUT_OF_STEPS = 5, STAGNATION = 6 I routinely use ParaView for streamline integration. It makes debugging very easy because you can place streamline seeds interactively, immediately see why a streamline terminated, quickly change parameters and re-try. Beyond that, it is reading the code, using a debugger and asking developers. From clinton at elemtech.com Fri Aug 27 10:25:38 2004 From: clinton at elemtech.com (Clinton Stimpson) Date: Fri, 27 Aug 2004 08:25:38 -0600 Subject: [vtkusers] Cell data in a vtkPolyData object In-Reply-To: <8DE1E023-F830-11D8-82AA-00039383F730@science-and-technology.nl> References: <8DE1E023-F830-11D8-82AA-00039383F730@science-and-technology.nl> Message-ID: <412F4462.6020905@elemtech.com> Ok, there was more to it than I thought. Thanks for the warning. Thanks, Clint Sander Niemeijer wrote: > Yes I have tried this. > > If you do this when you've added your mixed typed cells in random > order you will end up with a reordered list of cells. And if you add > your cells in the appropriate order (vertex/line/poly/strip) then a > BuildCells() will have no apparent effect. > > If you look at the implementation of the vtkPolyData class you will > see that vtkPolyData::InsertNextCell() performs the same > this->Cells->InsertNextCell() calls that vtkPolyData::BuildCells() > uses. So as long as you call your vtkPolyData::InsertNextCell() in the > right order you will do the same as vtkPolyData::BuildCells(). > > Just for clarification, let me restate the problems I'm having: > > 1) Adding mixed typed cells in random order to a vtkPolyData object > can have all kinds of nasty side effects because the ordering of cells > can be changed while scalar data that you associate with these cells > doesn't get reordered! According to John this is known behavior, but > the fact that this kind of behavior is not documented anywhere, makes > this a bug in my opinion (either the class documentation should make > this behavior explicit, or the vtkPolyData class should allow adding > cells in a mixed ordering and KEEP that ordering). > > 2) Even if you add cells in the right order to a vtkPolyData object > you will still get problems when you use a scalar color lookup table > with a vtkPolyDataMapper2D (see my other e-mail in this thread). As > far as I can see this is due to the vtkOpenGLPolyDataMapper2D class > handling the cell types in a different order. If this is indeed the > case then even VTK internally does not keep to this fixed ordering of > cell types in the vtkPolyData object. > > So as far as I can see, there IS a problem. And given the complexity, > I think it will take quite some time before we can see this problem > fixed properly. The easiest solution now would probably be to 'fix' > the vtkOpenGLPolyDataMapper2D class and to add the behavior about the > ordering to the vtkPolyData class documentation. > > Best regards, > Sander > > On vrijdag, aug 27, 2004, at 14:42 Europe/Amsterdam, Clinton Stimpson > wrote: > >> >> Did you ever try calling vtkPolyData::BuildCells() after you modify the >> cells in the vtkCellArray's that a vtkPolyData references? >> >> Clint > > > From jbiddiscombe at skippingmouse.co.uk Fri Aug 27 10:37:25 2004 From: jbiddiscombe at skippingmouse.co.uk (John Biddiscombe) Date: Fri, 27 Aug 2004 15:37:25 +0100 Subject: [vtkusers] Cell data in a vtkPolyData object References: <8DE1E023-F830-11D8-82AA-00039383F730@science-and-technology.nl> Message-ID: <001201c48c43$5ef6da30$5101460a@miradasolutions.com> > properly. The easiest solution now would probably be to 'fix' the > vtkOpenGLPolyDataMapper2D class and to add the behavior about the > ordering to the vtkPolyData class documentation. If you're sure there's a problem with the 2D mapper, then put a bug entry in the bugtracker. It should behave the same as the 3D mapper in respect of cell scalar mapping etc http://www.vtk.org/Bug/ JB From niemeijer at science-and-technology.nl Fri Aug 27 11:04:06 2004 From: niemeijer at science-and-technology.nl (Sander Niemeijer) Date: Fri, 27 Aug 2004 17:04:06 +0200 Subject: [vtkusers] Cell data in a vtkPolyData object In-Reply-To: <001201c48c43$5ef6da30$5101460a@miradasolutions.com> Message-ID: <57480783-F83A-11D8-82AA-00039383F730@science-and-technology.nl> As I mentioned in my first e-mail from this thread, I already added a bug report about this half a year ago: http://www.vtk.org/Bug/bug.php?op=show&bugid=564&pos=0 However, it doesn't seem to have gotten much attention since then :( This specific report shows both issues (that you can't use your own ordering for adding cells to a vtkPolyData object and the fact that vtkPolyDataMapper and vtkPolyDataMapper2D show different behavior in such cases), but I admit that it doesn't distinguish the two issues clearly (back then I wasn't even aware of the fact that the problem could be separated into two cases). Best regards, Sander On vrijdag, aug 27, 2004, at 16:37 Europe/Amsterdam, John Biddiscombe wrote: >> properly. The easiest solution now would probably be to 'fix' the >> vtkOpenGLPolyDataMapper2D class and to add the behavior about the >> ordering to the vtkPolyData class documentation. > > If you're sure there's a problem with the 2D mapper, then put a bug > entry in > the bugtracker. It should behave the same as the 3D mapper in respect > of > cell scalar mapping etc > > http://www.vtk.org/Bug/ > > JB > From a.umpleby at imperial.ac.uk Fri Aug 27 11:50:51 2004 From: a.umpleby at imperial.ac.uk (Adrian Umpleby) Date: Fri, 27 Aug 2004 16:50:51 +0100 Subject: [vtkusers] recent vtkClipDataSet can give non-tets? Message-ID: Hi all, I've been using vtkClipDataSet with version 4.2 of vtk to cut off a hexahedral mesh at a scalar value of zero. This gives all tets (though some of them are very thin slivers on the cut surface, which I have to deal with before continuing), just as the (latest) documentation says: "vtkClipDataSet will triangulate all types of 3D cells (i.e., create tetrahedra). This is true even if the cell is not actually cut. This is necessary to preserve compatibility across face neighbors..." However, I've recently been using it on some upgraded Linux boxes which have version 4.4 of vtk, and now I find a whole load of wedges coming out of vtkClipDataSet! Is this the way vtkClipDataSet is supposed to behave now? Is there a way to choose to switch it back to tets? (Couldn't see anything in member list.) Thanks, Adrian From seanm at nmr.mgh.harvard.edu Fri Aug 27 12:11:37 2004 From: seanm at nmr.mgh.harvard.edu (Sean McInerney) Date: Fri, 27 Aug 2004 12:11:37 -0400 Subject: [vtkusers] vtkWin32OpenGLRenderWindow vtkSmartPtr error In-Reply-To: <7D4FEEC34EF66843830C74D10D65196902237017@fsfspm38> References: <7D4FEEC34EF66843830C74D10D65196902237017@fsfspm38> Message-ID: <412F5D39.7000404@nmr.mgh.harvard.edu> Hi Eric, First off, unless you need access to some specialized methods of vtkWin32OpenGLRenderWindow, I would have the smart pointer hold a reference to a regular old vtkRenderWindow (i.e. vtkSmartPtr). This way you can simply call vtkRenderWindow::New() and rely on VTK to instantiate the appropriate subclass. Second, because VTK includes only the parent class header in each class's header file and relies on forward declarations for references to other types, you will have to include the header of the derived class in whatever file implements "w2if->SetInput(RenderWindow_.get );". In your case, either: #include "vtkWin32OpenGLRenderWindow.h" -OR- #include "vtkRenderWindow.h" // if you case use my first suggestion For more information, see: -Sean > > Does anyone know how to solve this? I have a renderWindow wrapped in a > vtkSmartPtr and I get an compile error when I try to pass it the > vtkWindowToImageFilter SetInput function. > > > vtkSmartPtr RenderWindow_; > > > implementation: > > vtkWindowToImageFilter *w2if = vtkWindowToImageFilter::New(); > > > w2if->SetInput(RenderWindow_.get ); > > error: > > c:\MDV\DVL\dvlcanvas.cpp(169) : error C2664: > 'vtkWindowToImageFilter::SetInput' : cannot convert parameter 1 from > 'vtkWin32OpenGLRenderWindow *(void) const' to 'vtkWindow *' > There is no context in which this conversion is possible > > Thanks, > > Eric > From alain.coron at lip.bhdc.jussieu.fr Fri Aug 27 13:07:55 2004 From: alain.coron at lip.bhdc.jussieu.fr (Alain CORON) Date: Fri, 27 Aug 2004 19:07:55 +0200 Subject: [vtkusers] Remark on vtkDataArrayTemplate::Allocate(...) Message-ID: <2nhdqo7bmc.fsf@venus.umr.lip.bhdc.jussieu.fr> Hello, I use VTK 4.4 and I was looking at the following piece of code which can be found in Common/vtkDataArrayTemplate.txx: //---------------------------------------------------------------------------- // Allocate memory for this array. Delete old storage only if necessary. template int vtkDataArrayTemplate::Allocate(vtkIdType sz, vtkIdType) { if(sz > this->Size) { if(this->Array && !this->SaveUserArray) { delete [] this->Array; } this->Size = ( sz > 0 ? sz : 1); this->Array = new T[this->Size]; if(!this->Array) { return 0; } this->SaveUserArray = 0; } this->MaxId = -1; return 1; } If the allocation fails, a bad_alloc exception is thrown or this->Array is equal to 0 depending on your compiler. Furthermore, - this->SaveUserArray might be different from 0; - this->MaxId is different from -1. - this->Size equals to sz and not 0. A segmentation fault will occur soon. If I am right, I suggest to replace this implementation by //---------------------------------------------------------------------------- // Allocate memory for this array. Delete old storage only if necessary. template int vtkDataArrayTemplate::Allocate(vtkIdType sz, vtkIdType) { this->MaxID = -1; if(sz > this->Size) { if(this->Array && !this->SaveUserArray) { delete [] this->Array; } this->Array = 0; this->Size = 0; this->SaveUserArray = 0; int newSize = (sz > 0 ? sz : 1); this->Array = new T[newSize]; if(!this->Array) { return 0; } this->Size = newSize; } return 1; } -- Alain CORON From mathieu.malaterre at kitware.com Fri Aug 27 13:40:14 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Fri, 27 Aug 2004 13:40:14 -0400 Subject: [vtkusers] recent vtkClipDataSet can give non-tets? In-Reply-To: References: Message-ID: <412F71FE.40807@kitware.com> Adrian Umpleby wrote: > Hi all, > > I've been using vtkClipDataSet with version 4.2 of vtk to cut off a > hexahedral mesh at a scalar value of zero. This gives all tets (though > some of them are very thin slivers on the cut surface, which I have to > deal with before continuing), just as the (latest) documentation says: > > "vtkClipDataSet will triangulate all types of 3D cells (i.e., create > tetrahedra). This is true even if the cell is not actually cut. This is > necessary to preserve compatibility across face neighbors..." > > > However, I've recently been using it on some upgraded Linux boxes which > have version 4.4 of vtk, and now I find a whole load of wedges coming > out of vtkClipDataSet! > > Is this the way vtkClipDataSet is supposed to behave now? Is there a way > to choose to switch it back to tets? (Couldn't see anything in member > list.) That's correct. Try to clip a tetra, you'll realize that there are a bunch of possibilties for the clip to return a wedge. So yes wedge is the general output of clip ( vtkClipDataSet even return wedges with two edges collapsed (=tetra), but vtkGeometryFilter handles those 'fake' tetras). What is your problem ? HTH Mathieu From a.umpleby at imperial.ac.uk Fri Aug 27 14:41:35 2004 From: a.umpleby at imperial.ac.uk (Adrian Umpleby) Date: Fri, 27 Aug 2004 19:41:35 +0100 Subject: [vtkusers] recent vtkClipDataSet can give non-tets? In-Reply-To: <412F71FE.40807@kitware.com> Message-ID: >> I've been using vtkClipDataSet with version 4.2 of vtk to cut off a >> hexahedral mesh at a scalar value of zero. This gives all tets... >> just as the (latest) documentation says... >> However, I've recently been using it on some upgraded Linux boxes >> which have version 4.4 of vtk, and now I find a whole load of wedges >> coming out of vtkClipDataSet! >> Is this the way vtkClipDataSet is supposed to behave now? Is there a >> way to choose to switch it back to tets? (Couldn't see anything in >> member list.) > > That's correct. Try to clip a tetra, you'll realize that there are a > bunch of possibilties for the clip to return a wedge. Note that I said I'm clipping hexahedra, so the possible polyhedra can be quite mind-boggling - vtkClipDataSet would have to return such polyhedra in a split up configuration just to get down to even mostly hexas again... (I'm guessing, though, that vtkClipDataSet first splits up the mesh into tets [using something like vtkDataSetTriangleFilter?] before clipping - so wedges make sense if nothing else is done to the clipped cells. Having said that, I'm curious what happens in the case of quadratic cells? - quad-tets can end up with more than one cut [strictly not even planar!] for a single scalar value... it's interesting to note that even cutting a linear hexa isn't necessarily planar - I'd expect the results from vtkClipDataSet can depend a lot on which way the original hexas are split. But I'm getting off the subject here...) > So yes wedge is the general output of clip ( vtkClipDataSet even > return wedges with two edges collapsed (=tetra), but vtkGeometryFilter > handles those 'fake' tetras). > > What is your problem ? Note that it's not actually a problem - I need tets at the end, so all I've done to get around it is put the clipped dataset through vtkDataSetTriangleFilter. However, the issue is that the latest documentation says vtkClipDataSet produces an all-tet mesh. This was correct under vtk 4.2, but appears to no longer be correct for vtk 4.4. I was simply wondering if this could be acknowledged as "the way it's supposed to be" now (i.e. the docs need updating), or maybe some sort of bizarre bug (resulting mesh appears to conform correctly, so I find this hard to believe), or an oversight after some recent change. Hope that makes it clearer! Adrian From Charles.Boivin at rwdiwest.com Fri Aug 27 15:31:57 2004 From: Charles.Boivin at rwdiwest.com (Charles Boivin) Date: Fri, 27 Aug 2004 13:31:57 -0600 Subject: [vtkusers] Cell data in a vtkPolyData object Message-ID: Thanks to everyone who answered my original question on cell data in a vtkPolyData object (Sander, John, and Clinton). I could not expect my question would generate such a thread but it has been very informative. I am glad to see that what I was basically coming to believe was happening is *really* happening. I must admit it is a bit of a let-down. I've seen this happen before -- it seems like cell data is very much an afterthought in visualization software. AVS, for example, has an awful support for it; most algorithms expect node data. Sure, node data is great for FE people, but when you're dealing with FV methods, what you are really interested in is cell data (at least I am!) However, there *is* a workaround, provided you know which mapper you are using, so I believe that that is the approach I will be taking. I will do some more bookkeeping as I am reading my data and will make sure I order things properly for the cell data. I still believe this should be happening "under the hood", but I'll just live with it for now... Thanks to everyone for your expertise, it has been really helpful. Charles Boivin From mathieu.malaterre at kitware.com Fri Aug 27 16:10:40 2004 From: mathieu.malaterre at kitware.com (Mathieu Malaterre) Date: Fri, 27 Aug 2004 16:10:40 -0400 Subject: [vtkusers] recent vtkClipDataSet can give non-tets? In-Reply-To: References: Message-ID: <412F9540.5020802@kitware.com> Adrian Umpleby wrote: >>> I've been using vtkClipDataSet with version 4.2 of vtk to cut off a >>> hexahedral mesh at a scalar value of zero. This gives all tets... >>> just as the (latest) documentation says... >>> However, I've recently been using it on some upgraded Linux boxes >>> which have version 4.4 of vtk, and now I find a whole load of wedges >>> coming out of vtkClipDataSet! >>> Is this the way vtkClipDataSet is supposed to behave now? Is there a >>> way to choose to switch it back to tets? (Couldn't see anything in >>> member list.) >> >> >> That's correct. Try to clip a tetra, you'll realize that there are a >> bunch of possibilties for the clip to return a wedge. > > > Note that I said I'm clipping hexahedra, so the possible polyhedra can > be quite mind-boggling - vtkClipDataSet would have to return such > polyhedra in a split up configuration just to get down to even mostly > hexas again... > > (I'm guessing, though, that vtkClipDataSet first splits up the mesh into > tets [using something like vtkDataSetTriangleFilter?] before clipping - > so wedges make sense if nothing else is done to the clipped cells. > Having said that, I'm curious what happens in the case of quadratic > cells? - quad-tets can end up with more than one cut [strictly not even > planar!] for a single scalar value... it's interesting to note that even > cutting a linear hexa isn't necessarily planar - I'd expect the results > from vtkClipDataSet can depend a lot on which way the original hexas are > split. But I'm getting off the subject here...) > >> So yes wedge is the general output of clip ( vtkClipDataSet even >> return wedges with two edges collapsed (=tetra), but vtkGeometryFilter >> handles those 'fake' tetras). >> >> What is your problem ? > > > Note that it's not actually a problem - I need tets at the end, so all > I've done to get around it is put the clipped dataset through > vtkDataSetTriangleFilter. > > However, the issue is that the latest documentation says vtkClipDataSet > produces an all-tet mesh. This was correct under vtk 4.2, but appears to > no longer be correct for vtk 4.4. > > I was simply wondering if this could be acknowledged as "the way it's > supposed to be" now (i.e. the docs need updating), or maybe some sort of > bizarre bug (resulting mesh appears to conform correctly, so I find this > hard to believe), or an oversight after some recent change. Adrian, vtkClipDataSet now returns wedges and tets. This is done because this way a case table can be used that is much faster than the previous method. In vtkClipVolume there is a flag, Mixed3DCellGeneration, that allows you to force the generation of tets. This flag is not found in vtkClipDataSet, I suspect it could be added. HTH Mathieu From eugene at salk.edu Fri Aug 27 16:35:20 2004 From: eugene at salk.edu (Eugene Kim) Date: Fri, 27 Aug 2004 13:35:20 -0700 (PDT) Subject: [vtkusers] Mac OSX fixes Message-ID: Hello everyone, After some tedious work, I think I got the MAC to work. Along with the previous fixes I suggested, which I believe David Clunie commited to CVS, VTK with Java on the Mac should now work. Here we are: 1) Memory issues: If you try running Cone examples, you might get to work 1/10 times. The problem is a pointer that hasn't been assigned yet. In vtkCocoaRenderWindow.mm, in the function WindowInitialize(), you will see a call to an object vtkCocoaGLView *glview, and later an intialization and allocation of it. We need to immediately set its other member variables as other functions ask for them very soon. After the intialization, write in: [glView setVTKRenderWindow:this]; [glview setVTKRenderWindowInteractor:0]; and delete these two calls which you'll see further down, (or likewise just move them up). This should solve 90% of your problems. 2) NS*** Leaks: If you add a autorelease pool around the entire function of WindowInitialize() in vtkCocoaRenderWindow.mm, you can get rid of those nasty messages popping up on your console. The way I did it was to add as the first line: NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; and as the last line: [pool release]; 3) If you need vtkPanel or vtkCanvas to work, you'll find you now cannot merge windows into a swing canvas. The fix I suggest here is only a partial one, as further problems keep coming up. Also, it will destroy the functionality of creating stand alone vtk windows, so make sure you note that change if you decide to make it. The following fix is lengthy and innefficent. This is simply a rough fix to get things working: At the end of WindowInitialize() in vtkCocoaRenderWindow.mm, you'll find a call this->OpenGLInit();. Just BEFORE that, add this rather large statment: if(!this->ContextId) { NSWindow *coreWin = [(NSView *)this->WindowId window]; glRect = [(NSView *)this->WindowId bounds]; glView = [[vtkCocoaGLVIew alloc] initWithFrame:glRect]; [glView setVTKRenderWindow:this]; [glView setVTKRenderWindowInteractor:0]; [(NSView *)this->WindowId addSubview:glView]; vtkCocoaWindow *window = [[vtkCocoaWindow alloc] init]; [window setFrame:ctRect display:NO]; [window setvtkCocoaGLView:glView]; [window setVTKRenderWindow:this]; [window setVTKRenderWindowInteractor:0]; [glView setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable]; [coreWin makeFirstResponder:coreWin]; [glView setNextResponder:(NSView *)this->WindowId]; [(NSView *)this->WindowId display]; [glView display]; this->WindowId = window; this->ContextId = [glView getOpenGLContext]; this->OwnWindow = 1; } I have to admit, the code is messy. Basically, I just played with the code until it worked, (I don't really know objective-C). I realize that much of the code is repeated up above, and it could be done WAY more efficiently as long as we know where a View is coming from. Basically, this is what i've done. When you want to paint a vtk window on top of a Java canvas or whatever, vtkJavaAwt assigns the WindowId variable in vtkCocoaRenderWindow.mm. This means that in that WindowInitialize() function, the chunk of code which intializes everything is bypassed, and specifically the OpenGl properties needed when we call OpenGLInit() are not there, and we crash. OpenGLContext is some sort of object (which i don't understand), that allows for these initializations, so the goal is to set it, as it hasn't been done by WindowInitialize(). We retrieve the pointer to the actual window(called a View) we want to paint on, and also retrieve its parent window (which happens to be your JFrame or whatever you use). After this, you create all the usual machinery as the normal code does. The trick is to fool the vtkCocoaWindow into not displaying, and to use its properties to link the system correctly. The most important part is to add you newly created glView as a subview of the actual Java view. After some other stuff, (which you may not even need, I just left it as was without doing much housekeeping), we set the ContextId variable. 4) If you plan on using being able to interact with these windows in a Swing application, you'll need to do a few more things. First off, comment out the parts in vtkCocoaWindow.mm which call: [self setContentView:myvtkCocoaGLView]; [self makeFirstResponder:thevtkCocoaGLView]; This is a dangerous move, as it will probably remove your ability to make stand alone vtk windows. I say probably, because I haven't actually tried it. Also, in vtkCocoaGLView.mm, in order to send events all the down to your Java canvas, you'll need to repropagate the event signal. All you have to do is for the given event you want sent, add as the first line in each function: [[self window] makeFirstResponder:[self superview]]; I have not yet gotten this to work well with mouseDragged events. The simple solution here is to add in the NSMouseDragged switch in the mouseDown function, and call to a function which we will define. First we add a new function to the very end: - (void)mouseDragged:(NSEvent *)theEvent { [[self superview] mouseDragged:theEvent]; } and in that switch case I mentioned, add a call like this: [self mouseDragged:theEvent]; For me, I decided not to use this functionality as I began to get some REALLY weird bus errors... but it does work to a degree, albiet a very small one. As these fixes are messy at best, I have not added them to CVS. I basically neglected cleaning up any unneeded code and such after it began to work, so I appolgize for any dumb code. It has been working quite well for me for about 1-2 weeks, and it is pretty stable though it still crashes every once in awhile. I'm very open to any improvements, (they're probably obvious), as I would like my mac to be just as good as my linux machine. (Also, since this message was long, there might be some typos in the code as I didn't bother to check!). Eugene Kim From alear at cns.montana.edu Fri Aug 27 17:15:18 2004 From: alear at cns.montana.edu (Alex Lear) Date: Fri, 27 Aug 2004 15:15:18 -0600 Subject: [vtkusers] Getting verts and lines from polydata source Message-ID: <001401c48c7a$f7c1aba0$f4b25a99@x300> I am using a vtkCubeSource to create a cube but I would like to get just the verts and lines from it to make a wireframe basically. So far I have tried to create a vtkPolyData and use the GetVerts() from the GetOutput() from the cube source and SetVerts() on the vtkPolyData. I do this for the lines as well. This didn't work for me so I tried a GetNumberOfVerts() and GetNumberOfLines() on the GetOutput() from the cube source and both resulted in zero. Can someone see what I'm doing wrong or how I can accomplish what I'm trying to do. If any of this is confusing I can include a code chunk. Thanks, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From cpbotha at gmail.com Fri Aug 27 17:40:41 2004 From: cpbotha at gmail.com (Charl P. Botha) Date: Fri, 27 Aug 2004 23:40:41 +0200 Subject: [vtkusers] Getting verts and lines from polydata source In-Reply-To: <001401c48c7a$f7c1aba0$f4b25a99@x300> References: <001401c48c7a$f7c1aba0$f4b25a99@x300> Message-ID: <8e138ee40408271440408bc321@mail.gmail.com> I really prefer not top-quoting, but your Outlook has embedded your message in such a way that gmail can't inline your message with little > thingies. Oh well. To answer your question: pass the output of the vtkCubeSource through a vtkExtractEdges. ----- Original Message ----- From: Alex Lear Date: Fri, 27 Aug 2004 15:15:18 -0600 Subject: [vtkusers] Getting verts and lines from polydata source To: vtkusers at vtk.org I am using a vtkCubeSource to create a cube but I would like to get just the verts and lines from it to make a wireframe basically. So far I have tried to create a vtkPolyData and use the GetVerts() from the GetOutput() from the cube source and SetVerts() on the vtkPolyData. I do this for the lines as well. This didn't work for me so I tried a GetNumberOfVerts() and GetNumberOfLines() on the GetOutput() from the cube source and both resulted in zero. Can someone see what I'm doing wrong or how I can accomplish what I'm trying to do. If any of this is confusing I can include a code chunk. Thanks, Alex _______________________________________________ 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 -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From vtk at scil.sinp.msu.ru Sat Aug 28 08:49:56 2004 From: vtk at scil.sinp.msu.ru (vtk at scil.sinp.msu.ru) Date: Sat, 28 Aug 2004 16:49:56 +0400 (MSD) Subject: [vtkusers] simple contouring Message-ID: Hi! Maybe, I'm super stupid, but can anybody give me an exaple of how to contour data? Very simple case, array (3d or 2d) with points and value in each point. Example without reading data from file, or using any functions inside toolkit ("quadric" or so) etc. Very simple example. Example of how to construct data for that and how to use vtkContourFilter for the data constructed. Thanx! From c.bert at gsi.de Sat Aug 28 13:19:56 2004 From: c.bert at gsi.de (Christoph Bert) Date: 28 Aug 2004 13:19:56 -0400 Subject: [vtkusers] Texture Message-ID: <1093713597.1855.8.camel@tesla> Hi, can somebody help me with texture display. I have an OBJ file with texture info, which I read in using vtkOBJReader. It result in vtkPolyData and the texture information is stored in vtkPolyData->GetPointData()->GetTCoords() The TCoords consist out of 2 Components. How can I use that information, meaning how do I tell mapper/actor/renderer that it is there so that it finally shows up in the render window? Thanks in advance for any help! Christoph From jcplatt at lineone.net Sat Aug 28 16:32:20 2004 From: jcplatt at lineone.net (John Platt) Date: Sat, 28 Aug 2004 21:32:20 +0100 Subject: [vtkusers] Cell data in a vtkPolyData object In-Reply-To: Message-ID: <000001c48d3e$1ec8c760$4c4b2850@pacsys4> Hi Charles, Could you use vtkUnstructuredGrid for your cells and convert to vtkPolyData when all data is ready for rendering? There are no separate cell arrays so you can always work with a cellId. Obviously there will be a hit on performance but it may be worth considering. Your query generated a great response and it would be a pity if this knowledge could not be harnessed to at least a point where a solution was formulated. You never know, someone may even attempt an implementation! A starting point could be - how could vtkUnstructuredGrid be specialized to polydata to give the required traversal speed of vtkPolyData? Even the FE users don't have it all their own way when it comes to data - we would like point values for each cell! John. -----Original Message----- From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Charles Boivin Sent: 27 August 2004 20:32 To: niemeijer at science-and-technology.nl; jbiddiscombe at skippingmouse.co.uk Cc: vtkusers at vtk.org; clinton at elemtech.com Subject: Re: [vtkusers] Cell data in a vtkPolyData object Thanks to everyone who answered my original question on cell data in a vtkPolyData object (Sander, John, and Clinton). I could not expect my question would generate such a thread but it has been very informative. I am glad to see that what I was basically coming to believe was happening is *really* happening. I must admit it is a bit of a let-down. I've seen this happen before -- it seems like cell data is very much an afterthought in visualization software. AVS, for example, has an awful support for it; most algorithms expect node data. Sure, node data is great for FE people, but when you're dealing with FV methods, what you are really interested in is cell data (at least I am!) However, there *is* a workaround, provided you know which mapper you are using, so I believe that that is the approach I will be taking. I will do some more bookkeeping as I am reading my data and will make sure I order things properly for the cell data. I still believe this should be happening "under the hood", but I'll just live with it for now... Thanks to everyone for your expertise, it has been really helpful. Charles Boivin _______________________________________________ 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 rubke at cs.huji.ac.il Sun Aug 29 04:18:35 2004 From: rubke at cs.huji.ac.il (Ruby Shamir) Date: Sun, 29 Aug 2004 10:18:35 +0200 Subject: [vtkusers] brightness and contrast Message-ID: <000601c48da0$c7553370$2d284184@cas05> Hello, How can I change the brightness and contrast of an image? Thank you Ruby -------------- next part -------------- An HTML attachment was scrubbed... URL: From freiman at cs.huji.ac.il Sun Aug 29 08:31:30 2004 From: freiman at cs.huji.ac.il (Moti Freiman) Date: Sun, 29 Aug 2004 14:31:30 +0200 Subject: [vtkusers] vtkMath::SolveLeastSquares Message-ID: <000001c48dc4$1c9e4f60$2a284184@cas02> Hello! I've matrix A with dimensions [j,3] (when j is at least 3, and change between different data), and vector Y with dimensions [j,1] (column vector)., also I have x vector with dimensions [1,3] (also column vector). I want to get the least square fitting to the equation Ax=y; I saw that the svd method implemented in vtk can used just for 3x3 matrix, and I have more equations. I find the SolveLeastSquares method, but did not understand what to do with it. Can someone send detailed explanation of how to use the SolveLeastSquares for my problem. what means the first argument: numberOfSamples, third argument: numberOfSamples by xOrder, and the fifth argument: numberOfSamples by yOrder?) Thank you! Moti Freiman From mediode at gmx.de Sun Aug 29 13:47:18 2004 From: mediode at gmx.de (medium) Date: Sun, 29 Aug 2004 19:47:18 +0200 Subject: [vtkusers] inside and outside of volume Message-ID: Hello, any ideas how I could distinct the inner and the outer of a volume, if it is not an ImlicitFunction? Michael -- -- Erstellt mit Operas revolution?rem E-Mail-Modul: http://www.opera.com/m2/ From kalyan.pushpala at wipro.com Mon Aug 30 03:33:41 2004 From: kalyan.pushpala at wipro.com (kalyan.pushpala at wipro.com) Date: Mon, 30 Aug 2004 13:03:41 +0530 Subject: [vtkusers] Volume Rendering Message-ID: Hai I constructed the volume of CT head data. How can I validate whether it is correct or not ( not through eyes) And it is not whowing up the perfect shape in case of MR brain. Some problem with opacity transfer function. How can we Tune the opacity function. Thanking you in adavance kalyan Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin at wipro.com immediately and destroy all copies of this message and any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joeri_vtk at hotmail.com Mon Aug 30 03:34:40 2004 From: joeri_vtk at hotmail.com (Joeri Nicolaes) Date: Mon, 30 Aug 2004 09:34:40 +0200 Subject: [vtkusers] extracting pointdata out of vtkXMLPolyDataReader Message-ID: I have written a vtk xml file (head.vtp see below) that consists of 2 points. I can read it in, but I can't extract the points out of the PolyData object. What am I doing wrong? # trying to read an vtk polydata xml file vtkXMLPolyDataReader reader reader SetFileName "C:/Documents and Settings/staJN/My Documents/XMLhead/head.vtp" # [reader GetOutput] is a polydata object! set poly [reader GetOutput] set points [$poly GetPoints] puts [$poly GetNumberOfPoints] OUTPUT: 0 Here is my xml file: 10 0 0 50 50 0 1 1 0 1 Joeri, Agfa Gevaert, R&D/TI + 32 (0) 3 444 6429, stajn at agfa.com joeri_vtk at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mirelle_mellqvist at hotmail.com Mon Aug 30 07:21:04 2004 From: mirelle_mellqvist at hotmail.com (Mirelle Mellqvist) Date: Mon, 30 Aug 2004 11:21:04 +0000 Subject: [vtkusers] How to get data out of a .vtk file?? Message-ID: Hi I am a newbie at Vtk. I am doing a project where I have FEM-elements. I have put in all of my data into a .vtk file. My problem now is that I don't know what I have to do to see the graphics. This is what my VTK-file looks like:# vtk DataFile Version 4.2 Test data ASCII DATASET UNSTRUCTURED_GRID POINTS 53 float 0. -500.000 0.0 0. -400.000 0.0 0. -300.000 0.0 0. -200.000 0.0 0. -99.9999 0.0 0. 0. 0.0 100.0 0. 0.0 200.0 0. 0.0 300.0 0. 0.0 400.0 0. 0.0 500.0 0. 0.0 500.0 -100.000 0.0 500.0 -200.000 0.0 500.0 -300.000 0.0 500.0 -400.000 0.0 500.0 -500.000 0.0 400.0 -500.000 0.0 300.0 -500.000 0.0 200.0 -500.000 0.0 99.99 -500.000 0.0 400.0 -300.000 0.0 300.0 -300.000 0.0 200.0 -300.000 0.0 100.0 -300.000 0.0 100.0 -200.000 0.0 200.0 -200.000 0.0 100.0 -100.000 0.0 200.0 -100.000 0.0 300.0 -200.000 0.0 300.0 -100.000 0.0 400.0 -200.000 0.0 400.0 -100.000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.99 -400.000 0.0 200.0 -400.000 0.0 300.0 -400.000 0.0 400.0 -400.000 0.0 CELLS 25 100 //(n ?r antal celler, size ?r styoleken av cellist) 3 4 25 24 4 5 27 25 23 24 25 26 22 23 26 29 26 25 27 28 5 6 7 27 29 26 28 30 7 8 28 27 21 22 29 31 13 14 21 31 8 9 30 28 30 32 31 29 9 10 32 30 12 13 31 32 10 11 12 32 20 1 2 50 19 20 50 51 3 24 50 2 18 19 51 52 24 23 51 50 23 22 52 51 17 18 52 53 15 16 17 53 22 21 53 52 21 14 15 53 //celltyp data ?r ett enda v?rde som specificerar celltypen CELL_TYPE 25 //(n ?r antalet celler, detta v?rde ska matcha det v?rde som specificeras av CELLS keyword ) 9 9 9 9 9 9 9 9 9 9 9 9 9 and I think that this should look ok. My c++ file looks like this: #include "vtkUnstructuredGridReader.h" #include "vtkDataSetMapper.h" #include "vtkActor.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" int main(){ vtkUnstructuredGridReader *reader = vtkUnstructuredGridReader::New(); reader->SetFileName("H:\filereader.vtk"); vtkDataSetMapper *dataMapper=vtkDataSetMapper::New(); dataMapper->SetInput(reader->GetOutput()); vtkActor *actor=vtkActor::New(); actor->SetMapper(dataMapper); vtkRenderer *ren=vtkRenderer::New(); ren->AddActor(actor); ren->SetBackground(0.1,0.2,0.4); vtkRenderWindow *renWin=vtkRenderWindow::New(); renWin->AddRenderer(ren); renWin->SetSize(500,500); dataMapper->Delete(); actor->Delete(); ren->Delete(); renWin->Delete(); return 0; } and I get an error that says: H:\Exjobb\20040830\test_20040830\test_20040830.cpp(14) : error C2664: 'SetInput' : cannot convert parameter 1 from 'class vtkUnstructuredGrid *' to 'class vtkDataSet *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Error executing cl.exe. What is wrong? How to a get the points out? And the celltypes? I guess I don't quite know how it is related. Looking forward to hear from you all! Kind regards, Mirelle _________________________________________________________________ Hitta r?tt p? n?tet med MSN S?k http://search.msn.se/ From brad.king at kitware.com Mon Aug 30 07:35:52 2004 From: brad.king at kitware.com (Brad King) Date: Mon, 30 Aug 2004 07:35:52 -0400 Subject: [vtkusers] How to get data out of a .vtk file?? In-Reply-To: References: Message-ID: <41331118.3020208@kitware.com> Mirelle Mellqvist wrote: > and I get an error that says: > H:\Exjobb\20040830\test_20040830\test_20040830.cpp(14) : error C2664: > 'SetInput' : cannot convert parameter 1 from 'class vtkUnstructuredGrid > *' to 'class vtkDataSet *' > Types pointed to are unrelated; conversion requires > reinterpret_cast, C-style cast or function-style cast > Error executing cl.exe. > > What is wrong? How to a get the points out? And the celltypes? I guess I > don't quite know how it is related. http://www.vtk.org/Wiki/VTK_FAQ#Forward_declaration_in_VTK_4.x -Brad From brad.king at kitware.com Mon Aug 30 07:36:43 2004 From: brad.king at kitware.com (Brad King) Date: Mon, 30 Aug 2004 07:36:43 -0400 Subject: [vtkusers] extracting pointdata out of vtkXMLPolyDataReader In-Reply-To: References: Message-ID: <4133114B.3010203@kitware.com> Joeri Nicolaes wrote: > I have written a vtk xml file (head.vtp see below) that consists of 2 > points. I can read it in, but I can't extract the points out of the > PolyData object. What am I doing wrong? > > # trying to read an vtk polydata xml file > vtkXMLPolyDataReader reader > reader SetFileName "C:/Documents and Settings/staJN/My > Documents/XMLhead/head.vtp" > # [reader GetOutput] is a polydata object! > set poly [reader GetOutput] > set points [$poly GetPoints] > puts [$poly GetNumberOfPoints] > OUTPUT: 0 You have to tell the reader to update its output before using it: reader Update puts [$poly GetNumberOfPoints] -Brad From wirz at ifht.rwth-aachen.de Mon Aug 30 08:39:46 2004 From: wirz at ifht.rwth-aachen.de (Torsten Wirz) Date: Mon, 30 Aug 2004 14:39:46 +0200 Subject: [vtkusers] alpha value Message-ID: <200408301439.46968.wirz@ifht.rwth-aachen.de> hi everybody, I?m making my first steps in programming vtk and have a question regarding the alpha transparency. I have a couple of iso-surfaces (vtkContourFilter) and defined the alpha range in the lookuptable as followed: lut->SetAlphaRange(0.1,0.9); looks pretty fine, but if I look from the other side, using the interactor or moving the camera, the transparency disapears and the outer surfaces have the wrong color. has it anything to do with lights, or do I missunderstand the alpha transparency? thanks in advance torsten -- ---------------------------------------------- Dipl.-Ing. Torsten Wirz Institute for High Voltage Technology University of Technology RWTH-Aachen Schinkelstrasse 2, SG 104 D-52056 Aachen wirz at ifht.rwth-aachen.de http://www.ifht.rwth-aachen.de Phone: ++49 241 80 94910 Fax: ++49 241 80 92135 ---------------------------------------------- From plowry at scotia-group.com Mon Aug 30 09:27:23 2004 From: plowry at scotia-group.com (Patrick Lowry) Date: Mon, 30 Aug 2004 08:27:23 -0500 Subject: [vtkusers] Texture Mapping Image Quality Message-ID: <6.1.2.0.2.20040830082205.02ff0cb8@mailhost.mavsys.com> To All: The texture mapping capabilities of VTK are amazing but I noticed image quality loss from the original TIFF. Texture mapping done by a commercial program I have does not suffer the same quality loss. The essence of the image part of the TCL script are shown below. Any ideas on preventing image quality loss? Thanks in advance. Patrick Lowry . . . vtkTIFFReader readTIFF readTIFF SetFileName "data/test1comp.TIF" readTIFF Update vtkTexture atext atext SetInput [readTIFF GetOutput] atext InterpolateOn . . . vtkTextureMapToPlane test test SetInput [normals GetOutput] test SetOrigin $xmin $ymin 0.0 test SetPoint1 $xmax $ymin 0.0 test SetPoint2 $xmin $ymax 0.0 From dgobbi at imaging.robarts.ca Mon Aug 30 09:36:38 2004 From: dgobbi at imaging.robarts.ca (David Gobbi) Date: Mon, 30 Aug 2004 09:36:38 -0400 (EDT) Subject: [vtkusers] Texture Mapping Image Quality In-Reply-To: <6.1.2.0.2.20040830082205.02ff0cb8@mailhost.mavsys.com> Message-ID: Hi Patrick, Some graphics cards default to 16-bit textures, be sure to force VTK to use 32-bit textures: atext SetQualityTo32Bit - David On Mon, 30 Aug 2004, Patrick Lowry wrote: > To All: > > The texture mapping capabilities of VTK are amazing but I noticed image > quality loss from the original TIFF. Texture mapping done by a commercial > program I have does not suffer the same quality loss. The essence of the > image part of the TCL script are shown below. Any ideas on preventing > image quality loss? > > Thanks in advance. > > Patrick Lowry > > . > . > . > vtkTIFFReader readTIFF > readTIFF SetFileName "data/test1comp.TIF" > readTIFF Update > vtkTexture atext > atext SetInput [readTIFF GetOutput] > atext InterpolateOn > . > . > . > vtkTextureMapToPlane test > test SetInput [normals GetOutput] > test SetOrigin $xmin $ymin 0.0 > test SetPoint1 $xmax $ymin 0.0 > test SetPoint2 $xmin $ymax 0.0 > > _______________________________________________ > This is the private VTK discussion list. > Please keep messages on-topic. Check the FAQ at: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From sean at millwood.ca Mon Aug 30 09:48:53 2004 From: sean at millwood.ca (Sean Richards) Date: Mon, 30 Aug 2004 09:48:53 -0400 (EDT) Subject: [vtkusers] Transformations Message-ID: <31922233.1093873733001.JavaMail.sean@millwood.ca> Hello all, I am trying to use ICP in my program and I have run into a little glitch. I create some polydata, then put it through a mapper and then into an actor. The user then manipulates the actor. At this point I want to be able to use ICP to register 2 actors with each other. In order to do this I need to actor->GetMapper()->GetInput() the problem is the original input does not move when I move the actor. Does anyone know how to propogate the transformation done with the actor into the original input? Sean From R.Fureder at exeter.ac.uk Mon Aug 30 10:00:54 2004 From: R.Fureder at exeter.ac.uk (=?iso-8859-1?Q?Reinhold_F=FCreder?=) Date: Mon, 30 Aug 2004 16:00:54 +0200 Subject: [vtkusers] Transformations In-Reply-To: <31922233.1093873733001.JavaMail.sean@millwood.ca> Message-ID: <001301c48e99$c4c853e0$0200a8c0@re> Dear Sean, I think you could use vtkProp3D::GetMatrix(vtkMatrix4x4 *m) -- vtkActor is inheriting from vtkProp3D -- and apply it on the original polydata by means of vtkTransformPolyDataFilter and vtkTransform. HTH Reinhold > -----Original Message----- > From: vtkusers-bounces at vtk.org > [mailto:vtkusers-bounces at vtk.org] On Behalf Of Sean Richards > Sent: Monday, August 30, 2004 3:49 PM > To: vtkusers at vtk.org > Subject: [vtkusers] Transformations > > > Hello all, > > I am trying to use ICP in my program and I have run into a > little glitch. > > I create some polydata, then put it through a mapper and then > into an actor. The user then manipulates the actor. At this > point I want to be able to use ICP to register 2 actors with > each other. In order to do this I need to > > actor->GetMapper()->GetInput() > > the problem is the original input does not move when I move > the actor. Does anyone know how to propogate the > transformation done with the actor into the original input? > > Sean > From chris.foley at imperial.ac.uk Mon Aug 30 10:21:06 2004 From: chris.foley at imperial.ac.uk (Foley, Christopher) Date: Mon, 30 Aug 2004 15:21:06 +0100 Subject: [vtkusers] problem running 'make' for VTK on Mac OS X Panther Message-ID: <9790429EC7745640A7AE6E5D7CF13E713392D3@icex32.ic.ac.uk> hi I seem to have messed up my installation of VTK somehow. I tried re-installing but I have the same errors popping up when I try to run make after cmake. Here is the last few lines and the make errors if anyone can help! Looks like the same problem here, but I didn't see the solution posted http://public.kitware.com/pipermail/vtkusers/2004-June/074356.html Building object file CellLocator.o... Building object file PointLocator.o... Building object file FrustumClip.o... Building object file RGrid.o... Building executable /Library/VTK/bin/GraphicsCxxTests... ld: multiple definitions of symbol _zError /usr/lib/libz.1.dylib(zutil.o) definition of _zError /Library/VTK/bin/libvtkzlib.a(zutil.o) definition of _zError in section (__TEXT,__text) ld: multiple definitions of symbol _zlibVersion /usr/lib/libz.1.dylib(zutil.o) definition of _zlibVersion /Library/VTK/bin/libvtkzlib.a(zutil.o) definition of _zlibVersion in section (__TEXT,__text) make[5]: *** [/Library/VTK/bin/GraphicsCxxTests] Error 1 make[4]: *** [default_target] Error 2 make[3]: *** [default_target_Cxx] Error 2 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_Graphics_Testing] Error 2 make: *** [default_target] Error 2 --------------------------------------------- Chris Foley PhD Research Student Dept. of Bioengineering, Imperial College London -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor at ucd.ie Mon Aug 30 11:45:04 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Mon, 30 Aug 2004 16:45:04 +0100 Subject: [vtkusers] Re: Transformations References: <31922233.1093873733001.JavaMail.sean@millwood.ca> Message-ID: Hi Sean, Try setting the vtkIterativeClosestPointTransform as a UserTransform of the source actor... if you just want the models registered in viewport. Beware this bug though: http://www.vtk.org/Bug/bug.php?op=show&bugid=1055&pos=4 Or try using vtkTransformPolyDataFilter with the vtkIterativeClosestPointTransform as the transform if you want to transform the actual model data. hth Goodwin "Sean Richards" wrote in message news:31922233.1093873733001.JavaMail.sean at millwood.ca... > Hello all, > > I am trying to use ICP in my program and I have run into a little glitch. > > I create some polydata, then put it through a mapper and then into an actor. The user then manipulates the actor. At this point I want to be able to use ICP to register 2 actors with each other. In order to do this I need to > > actor->GetMapper()->GetInput() > > the problem is the original input does not move when I move the actor. Does anyone know how to propogate the transformation done with the actor into the original input? > > Sean ---------------------------------------------------------------------------- ---- > _______________________________________________ > 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 joey at swri.edu Mon Aug 30 11:50:45 2004 From: joey at swri.edu (Joey Mukherjee) Date: Mon, 30 Aug 2004 10:50:45 -0500 Subject: [vtkusers] Use of SetExecuteMethod In-Reply-To: <200408262108.50235.camilo.jimenez@spymac.com> References: <200408262108.50235.camilo.jimenez@spymac.com> Message-ID: <5B34D8E0-FA9C-11D8-A438-00039386889C@swri.edu> I think you need: void func (void *obj) { } filter->SetExecuteMethod (func, (void *)this); // this can be whatever... If you are using C++ for the "func", it must be static. On Aug 27, 2004, at 12:08 AM, camilo.jimenez at spymac.com wrote: > I am trying to use the vtkProgrammableFilter in c++ but I haven't come > with > the use of SetExecuteMethod. > > The Help says > void vtkProgrammableFilter::SetExecuteMethod (void (*f)(void *), > > void*arg) > > so I tried > > void func(void){ > } > > and > > filter->SetExecuteMethod(func) //like the tcl example > > and other things like that, but I couldn't compile it. > > Can somebody help me. > ThanX > > _______________________________________________ > 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 > > Joey From isaacgerg at psu.edu Mon Aug 30 12:33:03 2004 From: isaacgerg at psu.edu (Isaac Gerg) Date: Mon, 30 Aug 2004 12:33:03 -0400 Subject: [vtkusers] Displaying surface from Surface map In-Reply-To: <001301c48e99$c4c853e0$0200a8c0@re> Message-ID: <000001c48eaf$05b3d8b0$aae01cac@arl.psu.edu> Hi, I have a matrix that represents the surface of an object. I would like to display this surface as an isosurface. How do I read in the data so that I can do this? I can use vtkstructureddataset because it wants individual points and not a surface map. Any ideas? Isaac From plowry at scotia-group.com Mon Aug 30 14:06:37 2004 From: plowry at scotia-group.com (Patrick Lowry) Date: Mon, 30 Aug 2004 13:06:37 -0500 Subject: [vtkusers] Texture Mapping Image Quality In-Reply-To: References: <6.1.2.0.2.20040830082205.02ff0cb8@mailhost.mavsys.com> Message-ID: <6.1.2.0.2.20040830125139.02de7a00@mailhost.mavsys.com> Hi David: Thanks for the quick reply. I tried your recommended setting and it didn't change the quality. Do image characteristics affect how they render? Patrick At 08:36 AM 8/30/2004, you wrote: >Hi Patrick, > >Some graphics cards default to 16-bit textures, be sure to force >VTK to use 32-bit textures: > >atext SetQualityTo32Bit > > - David > > >On Mon, 30 Aug 2004, Patrick Lowry wrote: > > > To All: > > > > The texture mapping capabilities of VTK are amazing but I noticed image > > quality loss from the original TIFF. Texture mapping done by a commercial > > program I have does not suffer the same quality loss. The essence of the > > image part of the TCL script are shown below. Any ideas on preventing > > image quality loss? > > > > Thanks in advance. > > > > Patrick Lowry > > > > . > > . > > . > > vtkTIFFReader readTIFF > > readTIFF SetFileName "data/test1comp.TIF" > > readTIFF Update > > vtkTexture atext > > atext SetInput [readTIFF GetOutput] > > atext InterpolateOn > > . > > . > > . > > vtkTextureMapToPlane test > > test SetInput [normals GetOutput] > > test SetOrigin $xmin $ymin 0.0 > > test SetPoint1 $xmax $ymin 0.0 > > test SetPoint2 $xmin $ymax 0.0 > > > > _______________________________________________ > > This is the private VTK discussion list. > > Please keep messages on-topic. Check the FAQ at: > > > 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: > >Follow this link to subscribe/unsubscribe: >http://www.vtk.org/mailman/listinfo/vtkusers From dgobbi at imaging.robarts.ca Mon Aug 30 14:17:24 2004 From: dgobbi at imaging.robarts.ca (David Gobbi) Date: Mon, 30 Aug 2004 14:17:24 -0400 (EDT) Subject: [vtkusers] Texture Mapping Image Quality In-Reply-To: <6.1.2.0.2.20040830125139.02de7a00@mailhost.mavsys.com> Message-ID: Hi Patrick, What do you mean by "image characteristics"? I'm guessing that your image is either 8-bit greyscale or 24-bit RGB if it is a TIFF. If this is the case, then VTK will use the data as a texture without any conversion, and the only things that should impact quality are the 32-bit flag I mentioned, and the actor's lighting properties. By "low quality" do you mean the image looks noisy, or do you mean that the contrast is poor? On Mon, 30 Aug 2004, Patrick Lowry wrote: > Hi David: > > Thanks for the quick reply. > > I tried your recommended setting and it didn't change the quality. > > Do image characteristics affect how they render? > > Patrick > > At 08:36 AM 8/30/2004, you wrote: > >Hi Patrick, > > > >Some graphics cards default to 16-bit textures, be sure to force > >VTK to use 32-bit textures: > > > >atext SetQualityTo32Bit > > > > - David > > > > > >On Mon, 30 Aug 2004, Patrick Lowry wrote: > > > > > To All: > > > > > > The texture mapping capabilities of VTK are amazing but I noticed image > > > quality loss from the original TIFF. Texture mapping done by a commercial > > > program I have does not suffer the same quality loss. The essence of the > > > image part of the TCL script are shown below. Any ideas on preventing > > > image quality loss? > > > > > > Thanks in advance. > > > > > > Patrick Lowry > > > > > > . > > > . > > > . > > > vtkTIFFReader readTIFF > > > readTIFF SetFileName "data/test1comp.TIF" > > > readTIFF Update > > > vtkTexture atext > > > atext SetInput [readTIFF GetOutput] > > > atext InterpolateOn > > > . > > > . > > > . > > > vtkTextureMapToPlane test > > > test SetInput [normals GetOutput] > > > test SetOrigin $xmin $ymin 0.0 > > > test SetPoint1 $xmax $ymin 0.0 > > > test SetPoint2 $xmin $ymax 0.0 > > > > > > _______________________________________________ > > > This is the private VTK discussion list. > > > Please keep messages on-topic. Check the FAQ at: > > > > > 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: > > > >Follow this link to subscribe/unsubscribe: > >http://www.vtk.org/mailman/listinfo/vtkusers > From isaacgerg at psu.edu Mon Aug 30 14:20:04 2004 From: isaacgerg at psu.edu (Isaac Gerg) Date: Mon, 30 Aug 2004 14:20:04 -0400 Subject: [vtkusers] Reading in height matrix In-Reply-To: <000001c48eaf$05b3d8b0$aae01cac@arl.psu.edu> Message-ID: <000001c48ebd$f90712d0$aae01cac@arl.psu.edu> I need to read in a matrix whose values represents heights. I would like to reconstruct this data and display as isosurface or volume. In matlab, my desire is to replicate the mesh function performed on a 2D matrix. mesh(2d_matrix) Isaac From scharver at evl.uic.edu Mon Aug 30 14:44:29 2004 From: scharver at evl.uic.edu (Chris Scharver) Date: Mon, 30 Aug 2004 13:44:29 -0500 Subject: [vtkusers] problem running 'make' for VTK on Mac OS X Panther In-Reply-To: <9790429EC7745640A7AE6E5D7CF13E713392D3@icex32.ic.ac.uk> References: <9790429EC7745640A7AE6E5D7CF13E713392D3@icex32.ic.ac.uk> Message-ID: On Aug 30, 2004, at 9:21 AM, Foley, Christopher wrote: > ?ld: multiple definitions of symbol _zError > ?/usr/lib/libz.1.dylib(zutil.o) definition of _zError > ?/Library/VTK/bin/libvtkzlib.a(zutil.o) definition of _zError in > ?section (__TEXT,__text) > ?ld: multiple definitions of symbol _zlibVersion > ?/usr/lib/libz.1.dylib(zutil.o) definition of _zlibVersion > ?/Library/VTK/bin/libvtkzlib.a(zutil.o) definition of _zlibVersion in > ?section (__TEXT,__text) Make sure that you set VTK_USE_SYSTEM_ZLIB to ON. Panther includes zlib as part of its system library, so when VTK builds its own zlib the result is multiple symbols. Chris -- Chris Scharver Electronic Visualization Laboratory The University of Illinois at Chicago Ph: 312-996-3002 FAX: 312-413-7585 From wej1 at yahoo.com Mon Aug 30 15:02:27 2004 From: wej1 at yahoo.com (Willie Johnson) Date: Mon, 30 Aug 2004 12:02:27 -0700 (PDT) Subject: [vtkusers] Point Sizes Message-ID: <20040830190227.47460.qmail@web60109.mail.yahoo.com> I am plotting a lot of points (vtkPoints), but I want them to be different sizes depending on an associated value (vtkFloatArray for now). What is the best way of going about doing that? Thanks in advance. --------------------------------- Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From goodwin.lawlor at ucd.ie Mon Aug 30 15:14:46 2004 From: goodwin.lawlor at ucd.ie (Goodwin Lawlor) Date: Mon, 30 Aug 2004 20:14:46 +0100 Subject: [vtkusers] Re: Point Sizes References: <20040830190227.47460.qmail@web60109.mail.yahoo.com> Message-ID: Have a look at vtkProgrammableGlyphFilter hth Goodwin "Willie Johnson" wrote in message news:20040830190227.47460.qmail at web60109.mail.yahoo.com... I am plotting a lot of points (vtkPoints), but I want them to be different sizes depending on an associated value (vtkFloatArray for now). What is the best way of going about doing that? Thanks in advance. Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. _______________________________________________ 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 isaacgerg at psu.edu Mon Aug 30 15:38:49 2004 From: isaacgerg at psu.edu (Isaac Gerg) Date: Mon, 30 Aug 2004 15:38:49 -0400 Subject: [vtkusers] Combining volumes In-Reply-To: <000001c48ebd$f90712d0$aae01cac@arl.psu.edu> Message-ID: <000001c48ec8$f903dd80$aae01cac@arl.psu.edu> Hi, I have 20 images of an object. 10 of them are a scan of the right side, and the other 10 a scan of the left side. I want to create a volume from all 20 images. Currently I can only create a volume for the left side or for the right, but not both simultanusous? How would I go about doing this? Any help greatly appreciated. Regards, Isaac From plowry at scotia-group.com Mon Aug 30 16:53:14 2004 From: plowry at scotia-group.com (Patrick Lowry) Date: Mon, 30 Aug 2004 15:53:14 -0500 Subject: [vtkusers] Texture Mapping Image Quality In-Reply-To: References: <6.1.2.0.2.20040830134205.02e35670@mailhost.mavsys.com> Message-ID: <6.1.2.0.2.20040830154519.02e376d8@mailhost.mavsys.com> David: VTK is subsampling the image. Even for an image of less than 1000x1000 pixels, it resamples to a power of two (as the documentation says). For larger images it must resample it much more. Are we stuck with this or are there additional settings that allow bigger image sizes? It seems that large memory capacity, both on the mother board and on the video card (128mb) would allow larger images. Thanks, Patrick At 02:10 PM 8/30/2004, you wrote: >Hi Patrick, > >VTK is subsampling the image before creating the texture, probably because >VTK thinks it is too large for your graphics card. > >Try using >atext DebugOn > >and see what kind of info it gives you. You might have to break the >image into patches in order to render it at full resolution. > > - David > > >On Mon, 30 Aug 2004, Patrick Lowry wrote: > > > David: > > > > The TIFF is 8-Bit Paletted. A comparitive image is shown below. The TIFF > > being loaded is on the left and a capture of the rendered texture map is on > > the right. The script has the 32-bit flag setting you suggested. It is a > > satellite image showing roads etc. > > > > Thanks for your help. > > > > Cheers, > > Patrick Lowry > > > > Comp.jpg > > > > > > At 01:17 PM 8/30/2004, you wrote: > > >Hi Patrick, > > > > > >What do you mean by "image characteristics"? I'm guessing that your > > >image is either 8-bit greyscale or 24-bit RGB if it is a TIFF. If > > >this is the case, then VTK will use the data as a texture without > > >any conversion, and the only things that should impact quality are > > >the 32-bit flag I mentioned, and the actor's lighting properties. > > > > > >By "low quality" do you mean the image looks noisy, or do you mean > > >that the contrast is poor? > > > > > >On Mon, 30 Aug 2004, Patrick Lowry wrote: > > > > > > > Hi David: > > > > > > > > Thanks for the quick reply. > > > > > > > > I tried your recommended setting and it didn't change the quality. > > > > > > > > Do image characteristics affect how they render? > > > > > > > > Patrick > > > > > > > > At 08:36 AM 8/30/2004, you wrote: > > > > >Hi Patrick, > > > > > > > > > >Some graphics cards default to 16-bit textures, be sure to force > > > > >VTK to use 32-bit textures: > > > > > > > > > >atext SetQualityTo32Bit > > > > > > > > > > - David > > > > > > > > > > > > > > >On Mon, 30 Aug 2004, Patrick Lowry wrote: > > > > > > > > > > > To All: > > > > > > > > > > > > The texture mapping capabilities of VTK are amazing but I > noticed image > > > > > > quality loss from the original TIFF. Texture mapping done by a > > > commercial > > > > > > program I have does not suffer the same quality loss. The essence > > > of the > > > > > > image part of the TCL script are shown below. Any ideas on > preventing > > > > > > image quality loss? > > > > > > > > > > > > Thanks in advance. > > > > > > > > > > > > Patrick Lowry > > > > > > > > > > > > . > > > > > > . > > > > > > . > > > > > > vtkTIFFReader readTIFF > > > > > > readTIFF SetFileName "data/test1comp.TIF" > > > > > > readTIFF Update > > > > > > vtkTexture atext > > > > > > atext SetInput [readTIFF GetOutput] > > > > > > atext InterpolateOn > > > > > > . > > > > > > . > > > > > > . > > > > > > vtkTextureMapToPlane test > > > > > > test SetInput [normals GetOutput] > > > > > > test SetOrigin $xmin $ymin 0.0 > > > > > > test SetPoint1 $xmax $ymin 0.0 > > > > > > test SetPoint2 $xmin $ymax 0.0 > > > > > > > > > > > > _______________________________________________ > > > > > > This is the private VTK discussion list. > > > > > > Please keep messages on-topic. Check the FAQ at: > > > > > > > > > > > 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: > > > > > > > > > >Follow this link to subscribe/unsubscribe: > > > > >http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > From dgobbi at imaging.robarts.ca Mon Aug 30 17:01:30 2004 From: dgobbi at imaging.robarts.ca (David Gobbi) Date: Mon, 30 Aug 2004 17:01:30 -0400 (EDT) Subject: [vtkusers] Texture Mapping Image Quality In-Reply-To: <6.1.2.0.2.20040830154519.02e376d8@mailhost.mavsys.com> Message-ID: Hi Patrick, You can try using vtkImageActor instead of vtkTexture and vtkActor, I checked the c++ code and it doesn't resample the image regardless of the size. The vtkImageActor doesn't offer as much flexibility as vtkTexture, but it will probably do what you need. - David On Mon, 30 Aug 2004, Patrick Lowry wrote: > David: > > VTK is subsampling the image. Even for an image of less than 1000x1000 > pixels, it resamples to a power of two (as the documentation says). For > larger images it must resample it much more. > > Are we stuck with this or are there additional settings that allow bigger > image sizes? It seems that large memory capacity, both on the mother board > and on the video card (128mb) would allow larger images. > > Thanks, > Patrick > > At 02:10 PM 8/30/2004, you wrote: > >Hi Patrick, > > > >VTK is subsampling the image before creating the texture, probably because > >VTK thinks it is too large for your graphics card. > > > >Try using > >atext DebugOn > > > >and see what kind of info it gives you. You might have to break the > >image into patches in order to render it at full resolution. > > > > - David > > > > > >On Mon, 30 Aug 2004, Patrick Lowry wrote: > > > > > David: > > > > > > The TIFF is 8-Bit Paletted. A comparitive image is shown below. The TIFF > > > being loaded is on the left and a capture of the rendered texture map is on > > > the right. The script has the 32-bit flag setting you suggested. It is a > > > satellite image showing roads etc. > > > > > > Thanks for your help. > > > > > > Cheers, > > > Patrick Lowry > > > > > > Comp.jpg > > > > > > > > > At 01:17 PM 8/30/2004, you wrote: > > > >Hi Patrick, > > > > > > > >What do you mean by "image characteristics"? I'm guessing that your > > > >image is either 8-bit greyscale or 24-bit RGB if it is a TIFF. If > > > >this is the case, then VTK will use the data as a texture without > > > >any conversion, and the only things that should impact quality are > > > >the 32-bit flag I mentioned, and the actor's lighting properties. > > > > > > > >By "low quality" do you mean the image looks noisy, or do you mean > > > >that the contrast is poor? > > > > > > > >On Mon, 30 Aug 2004, Patrick Lowry wrote: > > > > > > > > > Hi David: > > > > > > > > > > Thanks for the quick reply. > > > > > > > > > > I tried your recommended setting and it didn't change the quality. > > > > > > > > > > Do image characteristics affect how they render? > > > > > > > > > > Patrick > > > > > > > > > > At 08:36 AM 8/30/2004, you wrote: > > > > > >Hi Patrick, > > > > > > > > > > > >Some graphics cards default to 16-bit textures, be sure to force > > > > > >VTK to use 32-bit textures: > > > > > > > > > > > >atext SetQualityTo32Bit > > > > > > > > > > > > - David > > > > > > > > > > > > > > > > > >On Mon, 30 Aug 2004, Patrick Lowry wrote: > > > > > > > > > > > > > To All: > > > > > > > > > > > > > > The texture mapping capabilities of VTK are amazing but I > > noticed image > > > > > > > quality loss from the original TIFF. Texture mapping done by a > > > > commercial > > > > > > > program I have does not suffer the same quality loss. The essence > > > > of the > > > > > > > image part of the TCL script are shown below. Any ideas on > > preventing > > > > > > > image quality loss? > > > > > > > > > > > > > > Thanks in advance. > > > > > > > > > > > > > > Patrick Lowry > > > > > > > > > > > > > > . > > > > > > > . > > > > > > > . > > > > > > > vtkTIFFReader readTIFF > > > > > > > readTIFF SetFileName "data/test1comp.TIF" > > > > > > > readTIFF Update > > > > > > > vtkTexture atext > > > > > > > atext SetInput [readTIFF GetOutput] > > > > > > > atext InterpolateOn > > > > > > > . > > > > > > > . > > > > > > > . > > > > > > > vtkTextureMapToPlane test > > > > > > > test SetInput [normals GetOutput] > > > > > > > test SetOrigin $xmin $ymin 0.0 > > > > > > > test SetPoint1 $xmax $ymin 0.0 > > > > > > > test SetPoint2 $xmin $ymax 0.0 > > > > > > > > > > > > > > _______________________________________________ > > > > > > > This is the private VTK discussion list. > > > > > > > Please keep messages on-topic. Check the FAQ at: > > > > > > > > > > > > > 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: > > > > > > > > > > > >Follow this link to subscribe/unsubscribe: > > > > > >http://www.vtk.org/mailman/listinfo/vtkusers > > > > > > > > > From ming at ca.wai.com Mon Aug 30 18:37:16 2004 From: ming at ca.wai.com (Ming Xie) Date: Mon, 30 Aug 2004 15:37:16 -0700 Subject: [vtkusers] Which directory can i find TkInteractor.tcl? Message-ID: <91F6A3963C4CCC4A90082F715E0B82F1078B0B@camail.ca.wai.com> vtk\graphics\examplesTcl ________________________________ From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of ?ffffffffffc3?ffffffffffcf?ffffffffffe7?ffffffffffe2 ?ffffffffffd0?ffffffffffbb Sent: Thursday, August 26, 2004 11:43 PM To: vtkusers at vtk.org Subject: [vtkusers] Which directory can i find TkInteractor.tcl? Which directory can i find TkInteractor.tcl? ________________________________ Do You Yahoo!? 150??MP3???????????? ??????????????????? 1G??1000??????????? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sscomp2004 at yahoo.com.au Tue Aug 31 00:53:50 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Tue, 31 Aug 2004 14:53:50 +1000 (EST) Subject: [vtkusers] python examples that require data do not work for me Message-ID: <20040831045350.31195.qmail@web61105.mail.yahoo.com> The tcl examples work but the python examples that read data from a file can never find the file and give an error like:ERROR: In C:\martink\vtk42\VTK\IO\vtkSTLReader.cxx, line 99 vtkSTLReader (0x019AE798): File ../../../../VTKData/Data/42400-IDGH.stl not found This is strange because the tcl examples can read from the same files no problem. Does anyone know the fix for this? Thanks, Tahwwhat --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sscomp2004 at yahoo.com.au Tue Aug 31 00:56:46 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Tue, 31 Aug 2004 14:56:46 +1000 (EST) Subject: [vtkusers] Example CADPart.tcl does not work Message-ID: <20040831045646.56905.qmail@web61101.mail.yahoo.com> The renderwindow is displayed with blue background, but model is not shown, is this common? what might the cause of the problem be? (Other examples work) Thanks, Tahwwhat --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From srinivasan.poornima at wipro.com Tue Aug 31 03:47:33 2004 From: srinivasan.poornima at wipro.com (srinivasan.poornima at wipro.com) Date: Tue, 31 Aug 2004 13:17:33 +0530 Subject: [vtkusers] 2D Image Rotation Message-ID: Hi all, I have a 2D bmp image . I am using vtkBMPReader to read the image from the file . vtkImageData and vtkImageActor are also used. Finally I am displaying the image using vtkRenderWindow class. Please let me know as to how do I rotate this 2D image by 90 degrees. Any help in this regard will be greatly appreciated. Regards, Poornima. Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin at wipro.com immediately and destroy all copies of this message and any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.varadhan at gmail.com Tue Aug 31 04:27:13 2004 From: v.varadhan at gmail.com (Veerapuram Varadhan) Date: Tue, 31 Aug 2004 01:27:13 -0700 Subject: [vtkusers] 2D Image Rotation In-Reply-To: References: Message-ID: <2192557404083101273c79109@mail.gmail.com> Hi, You can use vtkCamera::Roll or vtkCamera::Azimuth. HTH, V. Varadhan. ----- Original Message ----- From: srinivasan.poornima at wipro.com Date: Tue, 31 Aug 2004 13:17:33 +0530 Subject: [vtkusers] 2D Image Rotation To: vtkusers at vtk.org Hi all, I have a 2D bmp image . I am using vtkBMPReader to read the image from the file . vtkImageData and vtkImageActor are also used. Finally I am displaying the image using vtkRenderWindow class. Please let me know as to how do I rotate this 2D image by 90 degrees. Any help in this regard will be greatly appreciated. Regards, Poornima. Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin at wipro.com immediately and destroy all copies of this message and any attachments. _______________________________________________ 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 v.varadhan at gmail.com Tue Aug 31 04:38:06 2004 From: v.varadhan at gmail.com (Veerapuram Varadhan) Date: Tue, 31 Aug 2004 01:38:06 -0700 Subject: [vtkusers] Combining volumes In-Reply-To: <000001c48ec8$f903dd80$aae01cac@arl.psu.edu> References: <000001c48ec8$f903dd80$aae01cac@arl.psu.edu> Message-ID: <2192557404083101385dd9c81@mail.gmail.com> Hi, What exactly do you mean by "creating a volume ...... both simultaneous"? Say you have 20 images with the following pattern: left0.bmp ..... left9.bmp and right0.bmp ..... right9.bmp. One possible way is: rename all right0.bmp through right9.bmp as left10.bmp and so on and if you read these 20 images, you can get all of them in a single volume. However, the volume will not look good and of least use. Kindly correct me if my understanding of your question is wrong. Regards, V. Varadhan. On Mon, 30 Aug 2004 15:38:49 -0400, Isaac Gerg wrote: > Hi, > > I have 20 images of an object. 10 of them are a scan of the right side, > and the other 10 a scan of the left side. I want to create a volume > from all 20 images. Currently I can only create a volume for the left > side or for the right, but not both simultanusous? How would I go about > doing this? > > Any help greatly appreciated. > > Regards, > Isaac > > _______________________________________________ > 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 bibin.lukose at wipro.com Tue Aug 31 04:56:49 2004 From: bibin.lukose at wipro.com (bibin.lukose at wipro.com) Date: Tue, 31 Aug 2004 14:26:49 +0530 Subject: [vtkusers] image negation Message-ID: Hi, I am using VTK for negating some image. I could negate the image drawn manually. This picture has bit depth 24.i used NOT operator to negate the image. If you try the same code on dump image with bit depth 8 it will not work properly. If any one gone through such a situation or have some idea, please reply Thanks in advance for any help! regards Bibin Mathew Lukose Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin at wipro.com immediately and destroy all copies of this message and any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joeri_vtk at hotmail.com Tue Aug 31 05:17:48 2004 From: joeri_vtk at hotmail.com (Joeri Nicolaes) Date: Tue, 31 Aug 2004 11:17:48 +0200 Subject: [vtkusers] oblique reslicing Message-ID: Hi, I read in medical CT data with vtkVolume16Reader and I would like to do some oblique reslicing. I currently use vtkImageReslice to extract the three orthogonal slices, but can anyone give me tips how to easily extract an oblique slice through for instance 2 points selected in an axial view?? I think the method SetResliceAxesDirectionCosines is the one to adjust, but how? I don't have a clue... Here is my reslicing code: # reslice origin: the resliced plane always goes through this point -> used to select the slices set reslice1OrX 0 set reslice1OrY 0 set reslice1OrZ 0 vtkImageReslice slicer1 slicer1 SetInput [resample GetOutput] slicer1 SetResliceAxesOrigin $reslice1OrX $reslice1OrY $reslice1OrZ slicer1 SetResliceAxesDirectionCosines 1 0 0 0 1 0 0 0 -1 slicer1 SetOutputDimensionality 2 # switch between nearest neighbour, linear and cubic slicer1 SetInterpolationModeToCubic Thx, Joeri, Agfa Gevaert, R&D/TI + 32 (0) 3 444 6429, stajn at agfa.com joeri_vtk at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From sbad at gl-group.com Tue Aug 31 05:35:33 2004 From: sbad at gl-group.com (Sebastian Bade) Date: Tue, 31 Aug 2004 11:35:33 +0200 Subject: [vtkusers] Q: Using center of cell with vtkExtractGeometry Message-ID: <7ctd02-p3k.ln1@ID-156053.news.dfncis.de> Hello all, instead of using the cell geometry (aka: the points defining the cells) I would like to use the centers of the cells as criterion to extract geometry. That is: all Cells with their center inside of a box (e.g.: vtkPlanes) shall be extracted. Are there any ideas how to relize that? Thanx Sebastian From marie_anderson_1 at hotmail.com Tue Aug 31 07:23:08 2004 From: marie_anderson_1 at hotmail.com (Marie Anderson) Date: Tue, 31 Aug 2004 13:23:08 +0200 Subject: [vtkusers] Reading vtk file format? Message-ID: Hello I am a newbie at VTK and I am having a bit of problems. I have made a VTK file where I have put some data. Se below: # vtk DataFile Version 4.2 Test data ASCII DATASET UNSTRUCTURED_GRID POINTS 53 float 0.0 -500.000 0.0 0.0 -400.000 0.0 0.0 -300.000 0.0 0.0 -200.000 0.0 0.0 -99.9999 0.0 0.0 0.0 0.0 100.0 0.0 0.0 200.0 0.0 0.0 300.0 0.0 0.0 400.0 0.0 0.0 500.0 0.0 0.0 500.0 -100.0 0.0 500.0 -200.0 0.0 500.0 -300.0 0.0 500.0 -400.0 0.0 500.0 -500.0 0.0 400.0 -500.0 0.0 300.0 -500.0 0.0 200.0 -500.0 0.0 99.99 -500.0 0.0 400.0 -300.0 0.0 300.0 -300.0 0.0 200.0 -300.0 0.0 100.0 -300.0 0.0 100.0 -200.0 0.0 200.0 -200.0 0.0 100.0 -100.0 0.0 200.0 -100.0 0.0 300.0 -200.0 0.0 300.0 -100.0 0.0 400.0 -200.0 0.0 400.0 -100.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 99.99 -400.0 0.0 200.0 -400.0 0.0 300.0 -400.0 0.0 400.0 -400.0 0.0 CELLS 25 100 3 4 25 24 4 5 27 25 23 24 25 26 22 23 26 29 26 25 27 28 5 6 7 27 29 26 28 30 7 8 28 27 21 22 29 31 13 14 21 31 8 9 30 28 30 32 31 29 9 10 32 30 12 13 31 32 10 11 12 32 20 1 2 50 19 20 50 51 3 24 50 2 18 19 51 52 24 23 51 50 23 22 52 51 17 18 52 53 15 16 17 53 22 21 53 52 21 14 15 53 CELL_TYPE 25 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 POINT_DATA 53 SCALARS scalars float 1 LOOKUP_TABLE default 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 31.0 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0 49.0 50.0 51.0 52.0 53.0 I think that it is the right format. Can anyone tell me how sensitive it is to whitespaces? I have looked in the VTK fileformat article and it doesn't say much about sensitivty to that. I just want to be able to see my data and I have made a C++ file that looks like this: #include "vtkUnstructuredGridReader.h" #include "vtkUnstructuredGrid.h" #include "vtkWarpVector.h" #include "vtkConnectivityFilter.h" #include "vtkDataSetMapper.h" #include "vtkActor.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkCamera.h" int main(){ vtkUnstructuredGridReader *reader = vtkUnstructuredGridReader::New(); reader->SetFileName("filereader.vtk"); reader->IsFileUnstructuredGrid(); vtkDataSetMapper *dataMapper=vtkDataSetMapper::New(); dataMapper->SetInput(reader->GetOutput()); /*vtkWarpVector *warp=vtkWarpVector::New(); warp->SetInput(reader->GetOutput()); vtkConnectivityFilter *connect=vtkConnectivityFilter::New(); connect->SetInput(warp-GetOutput()); */ vtkActor *actor=vtkActor::New(); actor->SetMapper(dataMapper); vtkRenderer *ren=vtkRenderer::New(); ren->AddActor(actor); ren->SetBackground(0.1,0.2,0.4); vtkRenderWindow *renWin=vtkRenderWindow::New(); renWin->AddRenderer(ren); renWin->SetSize(1000,1000); int i; for (i = 0; i < 360; ++i) { // render the image renWin->Render(); // rotate the active camera by one degree ren->GetActiveCamera()->Azimuth( 1 ); } reader->Delete(); dataMapper->Delete(); actor->Delete(); ren->Delete(); renWin->Delete(); system("PAUSE"); return 0; } When I try to run this file a renderWindow opens up but then I get warnings. The warning says this: "The instruction at "0x77fcc024" referenced memory at "0x0000000". The memory could not be written." Then after that I get another warning saying kind of the same thing. Does anybody know what might be wrong!! Thanks for all of your help!! Kind regards, Marie _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus From berninho1 at hotmail.com Tue Aug 31 07:40:24 2004 From: berninho1 at hotmail.com (Bernhard Mayrhofer) Date: Tue, 31 Aug 2004 13:40:24 +0200 Subject: [vtkusers] Image from 3d Data Message-ID: I habe a xyzrgb data. I have stored the color information in polydata scalars. Now i want to use only the color information in an image. I need the image around a specific points. I thought about find the points around them with vtkPointFinder, afterwards i can put a grid on them to obtain an image. I?m wondering, if there is another way. Can i use a renderer to get a image. A "screenshot" rendered image would be perfect for my purpose. Thanks Bernhard -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad.king at kitware.com Tue Aug 31 08:00:33 2004 From: brad.king at kitware.com (Brad King) Date: Tue, 31 Aug 2004 08:00:33 -0400 Subject: [vtkusers] Remark on vtkDataArrayTemplate::Allocate(...) In-Reply-To: <2nhdqo7bmc.fsf@venus.umr.lip.bhdc.jussieu.fr> References: <2nhdqo7bmc.fsf@venus.umr.lip.bhdc.jussieu.fr> Message-ID: <41346861.2020509@kitware.com> Alain CORON wrote: > I use VTK 4.4 and I was looking at the following piece of code which can be > found in Common/vtkDataArrayTemplate.txx: [snip] > If the allocation fails, a bad_alloc exception is thrown or this->Array is > equal to 0 depending on your compiler. Furthermore, > > - this->SaveUserArray might be different from 0; > - this->MaxId is different from -1. > - this->Size equals to sz and not 0. A segmentation fault will occur soon. > > If I am right, I suggest to replace this implementation by VTK was originally written before exceptions were around and therefore has never adopted exception-safe coding conventions. While there are many places that will fail similarly when memory allocation fails, the vtkDataArrayTemplate allocates alot more memory than most other places in VTK and therefore is most likely to fail. I see no reason not to start here. Your analysis is correct and your new implementation is much safer assuming that "~T()" does not throw when deleting the array. Since T is supposed to be a primitive type this will not be a problem. I've applied your changes to the CVS version of VTK with a commit log giving you credit: Checking in vtkDataArrayTemplate.txx; /cvsroot/ParaView/ParaView/VTK/Common/vtkDataArrayTemplate.txx,v <-- vtkDataArrayTemplate.txx new revision: 1.10; previous revision: 1.9 done If you want this merged to the 4.4 branch, please submit a bug report here: http://www.vtk.org/Bug reporting the problem. You will be notified automatically when the fix has been applied. Thanks, -Brad From joeri_vtk at hotmail.com Tue Aug 31 08:22:06 2004 From: joeri_vtk at hotmail.com (Joeri Nicolaes) Date: Tue, 31 Aug 2004 14:22:06 +0200 Subject: [vtkusers] reading in your own XML format in vtk Message-ID: Hi, I have a 3D medical application written in Tcl/Tk that consists of 3D measurements on multiple slices. The measurement is supposed to be driven by an XML scheme that I've written. For the moment I use vtkXMLPolyDataReader to read in a .vtp file (I've rewritten my XML file to the .vtp format), but this doesn't suffices for my application. Is there a way to add specific tags to the XML file and to the parser that vtkXMLPolyDataReader uses? Or is the only solution to write a subclass of vtkXMLParser in C for instance that parses these new tags? Has anyone ever encountered the same problem? How to solve it (quick)?? thx, Joeri, Agfa Gevaert, R&D/TI + 32 (0) 3 444 6429, stajn at agfa.com joeri_vtk at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.umpleby at imperial.ac.uk Tue Aug 31 09:41:28 2004 From: a.umpleby at imperial.ac.uk (Adrian Umpleby) Date: Tue, 31 Aug 2004 14:41:28 +0100 Subject: [vtkusers] recent vtkClipDataSet can give non-tets? In-Reply-To: <412F9540.5020802@kitware.com> Message-ID: <75BB45E7-FB53-11D8-985B-00039363A012@ic.ac.uk> >>>> ...I've recently been using it on some upgraded Linux boxes which >>>> have version 4.4 of vtk, and now I find a whole load of wedges >>>> coming out of vtkClipDataSet! > ... >> I was simply wondering if this could be acknowledged as "the way it's >> supposed to be" now (i.e. the docs need updating), or maybe some sort >> of bizarre bug (resulting mesh appears to conform correctly, so I >> find this hard to believe), or an oversight after some recent change. > > vtkClipDataSet now returns wedges and tets. This is done because this > way a case table can be used that is much faster than the previous > method. > > In vtkClipVolume there is a flag, Mixed3DCellGeneration, that allows > you to force the generation of tets. This flag is not found in > vtkClipDataSet, I suspect it could be added. Thanks Mathieu - that's useful to know. Adrian From maciekmrakowski at yahoo.com Tue Aug 31 09:53:41 2004 From: maciekmrakowski at yahoo.com (Maciek Rakowski) Date: Tue, 31 Aug 2004 06:53:41 -0700 (PDT) Subject: [vtkusers] how do you compile vtk in c++.NET Message-ID: <20040831135341.27880.qmail@web52810.mail.yahoo.com> Hi. I want to know how to compile a project using vtk classes in the .NET framework. I know how to compile vtk in mfc using c++.NET, but I want to compile vtk in a .NET project. How do you do that? - Maciek __________________________________________________ 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 marcelovtk at yahoo.com.br Tue Aug 31 10:08:46 2004 From: marcelovtk at yahoo.com.br (=?iso-8859-1?q?marcelo=20oliveira?=) Date: Tue, 31 Aug 2004 11:08:46 -0300 (ART) Subject: [vtkusers] Get Exceptions Message-ID: <20040831140846.39430.qmail@web61303.mail.yahoo.com> Hi user?s !!!! I?ve working in a project that have to select a lot of kind images and i would like to use: Try and Catch such in ITK. How can i get a Exception in VTK, for example; try { Read a DICOM image } catch ( vtk::Exception &err ) { Read JPG } --------------------------------- Yahoo! Acesso Gr?tis - navegue de gra?a com conex?o de qualidade! -------------- next part -------------- An HTML attachment was scrubbed... URL: From sergio at unizar.es Tue Aug 31 10:14:52 2004 From: sergio at unizar.es (Sergio Andres) Date: Tue, 31 Aug 2004 16:14:52 +0200 Subject: [vtkusers] How to display a 2D image?? Message-ID: <413487DC.6030306@unizar.es> Hi all, I just want to display a vtkImageData (2D image) in a render window, so that the image has the size of the window. I have been trying to do this using vtkImageViewer and vtkImageViewer2. The firts one seems to ignore the spacing of the image, since it displays the image as though the spacing is 1,1. The second one displays the image smaller because of the reset of the camera. How may I draw the image to take up all the window size..?? Thanks in advance. Sergio From mcoursolle at yahoo.ca Tue Aug 31 10:41:53 2004 From: mcoursolle at yahoo.ca (Mathieu Coursolle) Date: Tue, 31 Aug 2004 10:41:53 -0400 (EDT) Subject: [vtkusers] GetResliceOutput() problem with vtkImagePlaneWidget Message-ID: <20040831144153.48969.qmail@web60205.mail.yahoo.com> Hi, I am using a vtkImagePlaneWidget to display a volume. I want to display the content of the plane when an interraction occurs. However, the reslice image output is size is always a power of 2, so my image is bigger than it should be, filling the extra size with zeros. Is there a way to crop the image to the original size if I don't know it? Here is what I do: vtkImageData* image = widget->GetResliceOutput(); vtkImageMapToRGBA* image_map = vtkImageMapToRGBA::New(); image_map->SetInput(image); image_map->SetLookupTable(m_LookUpTable); imageActor->SetInput(image_map->GetOutput()); m_Renderer->AddProp(imageActor); Thanks a lot... MAthieu --------------------------------- Post your free ad now! Yahoo! Canada Personals -------------- next part -------------- An HTML attachment was scrubbed... URL: From alear at cns.montana.edu Tue Aug 31 11:17:01 2004 From: alear at cns.montana.edu (Alex Lear) Date: Tue, 31 Aug 2004 09:17:01 -0600 Subject: [vtkusers] Suggestions for a color wheel Message-ID: <002701c48f6d$93dd7d30$e8b25a99@x300> I need to create a color wheel to act as a legend for mapping color to angle. I'm not sure how I'd like to do this. I want to have a (semi)continuous color wheel to show the color around 360degrees rather than a scalar bar that can't wrap back to itself. Any suggestions? Thanks, Alex From v.varadhan at gmail.com Tue Aug 31 11:20:27 2004 From: v.varadhan at gmail.com (Veerapuram Varadhan) Date: Tue, 31 Aug 2004 08:20:27 -0700 Subject: [vtkusers] Combining volumes In-Reply-To: <003201c48f55$3c12be70$aae01cac@arl.psu.edu> References: <003201c48f55$3c12be70$aae01cac@arl.psu.edu> Message-ID: <2192557404083108205d456060@mail.gmail.com> You can use vtkImageAppend. vtkVolume16Reader* v16 = vtkVolume16Reader::New(); v16->SetDataDimensions( 64, 64); v16->SetDataByteOrderToLittleEndian(); v16->SetImageRange( 1, 93); v16->SetDataSpacing( 3.2, 3.2, 1.5); v16->SetFilePrefix( fname ); v16->SetDataMask( 0x7fff); v16->Update(); vtkVolume16Reader* v16_1 = vtkVolume16Reader::New(); v16_1->SetDataDimensions( 64, 64); v16_1->SetDataByteOrderToLittleEndian(); v16_1->SetImageRange( 1, 93); v16_1->SetDataSpacing( 3.2, 3.2, 1.5); v16_1->SetFilePrefix( fname_1 ); v16_1->SetDataMask( 0x7fff); v16_1->Update(); vtkImageAppend* imageAppend = vtkImageAppend::New(); imageAppend->AddInput (v16->GetOutput()); imageAppend->AddInput (v16_1->GetOutput()); imageAppend->SetAppendAxis (0); imageAppend->Update(); vtkImageData* pImageData = imageAppend->GetOutput(); pImageData should have the appended volume. P.S:- I am not sure whether this will work or not :), as I don't have vtk in the current box. Kindly let me know the correct way. :) V. Varadhan. On Tue, 31 Aug 2004 08:22:51 -0400, Isaac Gerg wrote: > I want to take the two halfs and form a whole volume. Not a volume with > the right half and then the left half appended to it. > > Isaac > > > > -----Original Message----- > From: Veerapuram Varadhan [mailto:v.varadhan at gmail.com] > Sent: Tuesday, August 31, 2004 4:38 AM > To: Isaac Gerg > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Combining volumes > > Hi, > > What exactly do you mean by "creating a volume ...... both > simultaneous"? > > Say you have 20 images with the following pattern: > left0.bmp ..... left9.bmp and > right0.bmp ..... right9.bmp. > > One possible way is: > rename all right0.bmp through right9.bmp as left10.bmp and so on and if > you read these 20 images, you can get all of them in a single volume. > However, the volume will not look good and of least use. > > Kindly correct me if my understanding of your question is wrong. > > Regards, > V. Varadhan. > > On Mon, 30 Aug 2004 15:38:49 -0400, Isaac Gerg > wrote: > > Hi, > > > > I have 20 images of an object. 10 of them are a scan of the right > > side, and the other 10 a scan of the left side. I want to create a > > volume from all 20 images. Currently I can only create a volume for > > the left side or for the right, but not both simultanusous? How would > > I go about doing this? > > > > Any help greatly appreciated. > > > > Regards, > > Isaac > > > > _______________________________________________ > > 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 andy.cedilnik at kitware.com Tue Aug 31 11:30:32 2004 From: andy.cedilnik at kitware.com (Andy Cedilnik) Date: Tue, 31 Aug 2004 11:30:32 -0400 Subject: [vtkusers] Mac OSX fixes In-Reply-To: References: Message-ID: <1093966232.1602.11.camel@andoria> Hi Eugene, Could you please submit bug report on the vtk bug tracker? What you can do is submit bug, then go to the bug page and attach the patch. Thank you. Andy On Fri, 2004-08-27 at 16:35, Eugene Kim wrote: > Hello everyone, > > After some tedious work, I think I got the MAC to work. Along > with the previous fixes I suggested, which I believe David Clunie commited > to CVS, VTK with Java on the Mac should now work. Here we are: > > 1) Memory issues: If you try running Cone examples, you might get > to work 1/10 times. The problem is a pointer that hasn't been > assigned yet. In vtkCocoaRenderWindow.mm, in the function > WindowInitialize(), you will see a call to an object > vtkCocoaGLView *glview, and later an intialization and > allocation of it. We need to immediately set its other member > variables as other functions ask for them very soon. After > the intialization, write in: > > [glView setVTKRenderWindow:this]; > [glview setVTKRenderWindowInteractor:0]; > > and delete these two calls which you'll see further down, (or > likewise just move them up). This should solve 90% of your > problems. > > 2) NS*** Leaks: If you add a autorelease pool around the entire > function of WindowInitialize() in vtkCocoaRenderWindow.mm, > you can get rid of those nasty messages popping up on your > console. The way I did it was to add as the first line: > > NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; > > and as the last line: > > [pool release]; > > 3) If you need vtkPanel or vtkCanvas to work, you'll find you now > cannot merge windows into a swing canvas. The fix I suggest > here is only a partial one, as further problems keep coming up. > Also, it will destroy the functionality of creating stand alone > vtk windows, so make sure you note that change if you decide to > make it. The following fix is lengthy and innefficent. This > is simply a rough fix to get things working: > > At the end of WindowInitialize() in vtkCocoaRenderWindow.mm, > you'll find a call this->OpenGLInit();. Just BEFORE that, add > this rather large statment: > > if(!this->ContextId) { > NSWindow *coreWin = [(NSView *)this->WindowId window]; > glRect = [(NSView *)this->WindowId bounds]; > > glView = [[vtkCocoaGLVIew alloc] initWithFrame:glRect]; > [glView setVTKRenderWindow:this]; > [glView setVTKRenderWindowInteractor:0]; > > [(NSView *)this->WindowId addSubview:glView]; > > vtkCocoaWindow *window = [[vtkCocoaWindow alloc] init]; > [window setFrame:ctRect display:NO]; > [window setvtkCocoaGLView:glView]; > [window setVTKRenderWindow:this]; > [window setVTKRenderWindowInteractor:0]; > > [glView > setAutoresizingMask:NSViewWidthSizable|NSViewHeightSizable]; > [coreWin makeFirstResponder:coreWin]; > [glView setNextResponder:(NSView *)this->WindowId]; > > [(NSView *)this->WindowId display]; > [glView display]; > this->WindowId = window; > this->ContextId = [glView getOpenGLContext]; > this->OwnWindow = 1; > } > > I have to admit, the code is messy. Basically, I just played > with the code until it worked, (I don't really know > objective-C). I realize that much of the code is repeated up > above, and it could be done WAY more efficiently as long as we > know where a View is coming from. Basically, this is what i've > done. When you want to paint a vtk window on top of a Java > canvas or whatever, vtkJavaAwt assigns the WindowId variable > in vtkCocoaRenderWindow.mm. This means that in that > WindowInitialize() function, the chunk of code which intializes > everything is bypassed, and specifically the OpenGl properties > needed when we call OpenGLInit() are not there, and we crash. > OpenGLContext is some sort of object (which i don't > understand), that allows for these initializations, so the goal > is to set it, as it hasn't been done by WindowInitialize(). We > retrieve the pointer to the actual window(called a View) we > want to paint on, and also retrieve its parent window (which > happens to be your JFrame or whatever you use). After this, > you create all the usual machinery as the normal code does. > The trick is to fool the vtkCocoaWindow into not displaying, > and to use its properties to link the system correctly. The > most important part is to add you newly created glView as a > subview of the actual Java view. After some other stuff, > (which you may not even need, I just left it as was without > doing much housekeeping), we set the ContextId variable. > > 4) If you plan on using being able to interact with these windows > in a Swing application, you'll need to do a few more things. > First off, comment out the parts in vtkCocoaWindow.mm which > call: > > [self setContentView:myvtkCocoaGLView]; > [self makeFirstResponder:thevtkCocoaGLView]; > > This is a dangerous move, as it will probably remove your > ability to make stand alone vtk windows. I say probably, > because I haven't actually tried it. > > Also, in vtkCocoaGLView.mm, in order to send events all the > down to your Java canvas, you'll need to repropagate the event > signal. All you have to do is for the given event you want > sent, add as the first line in each function: > > [[self window] makeFirstResponder:[self superview]]; > > I have not yet gotten this to work well with mouseDragged > events. The simple solution here is to add in the > NSMouseDragged switch in the mouseDown function, and call > to a function which we will define. First we add a new > function to the very end: > > - (void)mouseDragged:(NSEvent *)theEvent { > [[self superview] mouseDragged:theEvent]; > } > > and in that switch case I mentioned, add a call like this: > > [self mouseDragged:theEvent]; > > For me, I decided not to use this functionality as I began > to get some REALLY weird bus errors... but it does work to > a degree, albiet a very small one. > > As these fixes are messy at best, I have not added them to CVS. I > basically neglected cleaning up any unneeded code and such after it began > to work, so I appolgize for any dumb code. It has been working quite well > for me for about 1-2 weeks, and it is pretty stable though it still > crashes every once in awhile. I'm very open to any improvements, (they're > probably obvious), as I would like my mac to be just as good as my linux > machine. (Also, since this message was long, there might be some typos in > the code as I didn't bother to check!). > > Eugene Kim > _______________________________________________ > 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 -- Andy Cedilnik Kitware Inc. From Karl.Fritscher at umit.at Tue Aug 31 11:30:47 2004 From: Karl.Fritscher at umit.at (Karl Fritscher) Date: Tue, 31 Aug 2004 17:30:47 +0200 Subject: [vtkusers] Observer to vtkImagePlanewidget Message-ID: Hello vtkUsers, perhaps a stupid questeion, but can a add an observer to vtkImagePlaneWidget? I tired it and it worked with renderers, renderwindows,... but not with the ImagePlaneWidget. In fact I would just like to (partly) synchronize the movements of two imageplanewidgets in 2 different renderwindows with two different vtkFLRenderWindowInteractors. Is there any way to do this?? Thanks for your help Karl -------------- next part -------------- An HTML attachment was scrubbed... URL: From Rupert.Shute at awe.co.uk Tue Aug 31 11:54:00 2004 From: Rupert.Shute at awe.co.uk (Rupert Shute) Date: Tue, 31 Aug 2004 16:54:00 +0100 Subject: [vtkusers] RE: Multiple, time varying, unstructured grids. Message-ID: Hi, I'm writing a vtk translator for an FEA code, the ultimate aim of which is to visualise the results in Paraview. However, I've got a little stuck ... So as to isolate cells types and to handle discontinuous cell data I have opted to create a separate UGrid for each cell type (they range from 2 to 8 nodes). Currently each UGrid is written out as a separate vtk file. This isn't very efficient, I know, as it requires the points and point data to be replicated for each cell type. My real problem comes when try to handle multiple time steps. What I have is a collection of UGrid vtk files for each time step, when what I want is a single file for each time step, each containing a hierarchy of data. My initial thoughts were to write a parallel VTK file for each time step, but that doesn't appear to do what I want. Can anyone give me any pointers? Regards 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 eub at kablonet.com.tr Tue Aug 31 12:21:54 2004 From: eub at kablonet.com.tr (Ugur BOZKAYA) Date: Tue, 31 Aug 2004 19:21:54 +0300 Subject: [vtkusers] how to get a slice from the render window Message-ID: <20040831162018.6E6442B4B7@public.kitware.com> Hi, Is there a way to get the slice view of an arbitrary plane in a render window. There is a volume data and some other actors (glyphe, streamline...) in the render window. I want to get the slice view for a plane and see the intersecting areas. Thanks, Ugur BOZKAYA -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcoursolle at yahoo.ca Tue Aug 31 12:41:01 2004 From: mcoursolle at yahoo.ca (Mathieu Coursolle) Date: Tue, 31 Aug 2004 12:41:01 -0400 (EDT) Subject: [vtkusers] vtkImagePlaneWidget Message-ID: <20040831164101.94147.qmail@web60209.mail.yahoo.com> Hi, Does anyone knows how to disable the margins in a vtkImagePlaneWidget, I don't want the user to be able to rotate the plane. Thank you. MAthieu --------------------------------- Post your free ad now! Yahoo! Canada Personals -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtk at scil.sinp.msu.ru Tue Aug 31 13:15:00 2004 From: vtk at scil.sinp.msu.ru (vtk at scil.sinp.msu.ru) Date: Tue, 31 Aug 2004 21:15:00 +0400 (MSD) Subject: [vtkusers] rotation of 2D contour labels Message-ID: Hi! Does anybody know, how to make labels rotate like it is done in labeledContours.tcl? What really is on the air when I rotate the scene with the mouse? What functions are called to do that? I see, it differs from the rotation functions of normal 3D objects (Prop3D). But I cannot do something with labels in my prog: cannot change with/height and position by calling SetWidth etc. Thanks for help! From jpatel at cytokinetics.com Tue Aug 31 14:01:13 2004 From: jpatel at cytokinetics.com (Josh Patel) Date: Tue, 31 Aug 2004 11:01:13 -0700 Subject: [vtkusers] Frame Grabbing from a thread conflicts with OpenGL Message-ID: <52634975BCEE8045A83C512C8C1CFF86756120@elegans.ck.local> Hi all - Anyone have a solution to this... I'm having the same exact problem as Jean-Michel. I'm basically trying to grab frames from my render window using vtkWindowToImageFilter and vtkJPEGWriter using a separate thread in python. After the frame-grabber thread is started, the program crashes with "wglMakeCurrent" errors when I try to interact with my model. I'm a complete novice to VTK and OpenGL...but Ian's comments seem to imply that this can't be done. Thanks!! Josh Patel Cytokinetics, Inc. #################################################################### Jean-Michel, I don't have time to look at your code but perhaps you will be interested in my own recent experience with VTK and a multithreaded program under Win32. I inherited this program from another project in the office. It was horribly unstable. After a very close look at it I found that through its sharing of VTK objects - specifically, a vtkRenderer - between two threads it was implicitly using the same OpenGL graphics context in both of them. This is not allowed. From the MSDN "OpenGL 'wglMakeCurrent'" page: "A rendering context can be current to only one thread at a time." Once I had confined use of the single OpenGL graphics context to a single thread the program was much more stable. Does that help? Ian ----- Original Message ----- From: To: Sent: Tuesday, December 02, 2003 10:26 AM Subject: [vtkusers] Frame Grabbing from a thread conflicts with OpenGL > Hi all, > > I recently posted a message querying how to grab asynchronously some > renderWindow images while the renderWindowInteractor is running. > I told that the thread technique lead to problem (crash of wglMakeCurrent > somewhere in vtkWin32OpenGLRenderWindow.cxx) > > Here is a very short program that demonstrates the problem. > > Can anyone having experience with threads in Win32 and VTK try this out. > Maybe I did silly things while instanciating the threads... > > > <--- cut here ---> > // first include the required header files for the vtk classes we are > using > #include "vtkConeSource.h" > #include "vtkPolyDataMapper.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkCommand.h" > #include "vtkCamera.h" > #include "vtkActor.h" > #include "vtkRenderer.h" > #include "vtkMultiThreader.h" > #include "vtkMutexLock.h" > #include "vtkWindowToImageFilter.h" > #include "vtkBMPWriter.h" > > // The Thread responsible for grabbing images > static void *mythread(struct ThreadInfoStruct *data) > { > int activeFlag; > int i = 0; > char filename[512]; > > vtkRenderWindowInteractor *self = > (vtkRenderWindowInteractor*)(data->UserData); > vtkBMPWriter *bmpwriter = vtkBMPWriter::New(); > > cout << "starting thread " << data->ThreadID << endl; > > while (1) { > data->ActiveFlagLock->Lock(); > activeFlag = *(data->ActiveFlag); > data->ActiveFlagLock->Unlock(); > > if (activeFlag == 0) > { > cout << "Terminating thread " << data->ThreadID << endl; > return NULL; > } > > sprintf (filename, "e:/tmp/image_%03d.bmp", i); > cout << "Saving image " << filename << endl; > > // ******************************** ################ > ************************ > // if enabled, this part crashes into wglMakeCurrent() > if (1) { > vtkWindowToImageFilter *windowToimage = > vtkWindowToImageFilter::New(); > windowToimage->SetInput(self->GetRenderWindow()); > bmpwriter->SetInput(windowToimage->GetOutput()); > bmpwriter->SetFileName(filename); > bmpwriter->Write(); > windowToimage->Delete(); > } > // ******************************** ################ > ************************ > > Sleep(1000); > } > > bmpwriter->Delete(); > return NULL; > } > > // just a call back to launch or terminate the thread when a key is > pressed. > class vtkMyCallback : public vtkCommand > { > public: > static vtkMyCallback *New() > { return new vtkMyCallback; } > vtkMultiThreader *control; > > vtkMyCallback() { > control = vtkMultiThreader::New(); > control->SetNumberOfThreads(1); > threadId = -1; > } > ~vtkMyCallback() { > if (threadId != -1) > control->TerminateThread(threadId); > control->Delete(); > } > > virtual void Execute(vtkObject *caller, unsigned long, void*) > { > vtkRenderWindowInteractor *iren = > reinterpret_cast(caller); > > // now start a thread > if (threadId == -1) > threadId = > control->SpawnThread((vtkThreadFunctionType)&mythread, iren); > // stop the thread > else { > control->TerminateThread(threadId); > threadId = -1; > } > } > > private: > int threadId; > }; > > > int main( int argc, char *argv[] ) > { > vtkConeSource *cone = vtkConeSource::New(); > cone->SetHeight( 3.0 ); > cone->SetRadius( 1.0 ); > cone->SetResolution( 10 ); > > 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->AddRenderer( ren1 ); > renWin->SetSize( 300, 300 ); > > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > iren->Initialize(); > > // add an observer for keypress that will launch t > vtkMyCallback *mo1 = vtkMyCallback::New(); > iren->AddObserver(vtkCommand::KeyPressEvent,mo1); > mo1->Delete(); > > // start interaction > iren->Start(); > > // > // Free up any objects we created > // > cone->Delete(); > coneMapper->Delete(); > coneActor->Delete(); > ren1->Delete(); > renWin->Delete(); > > return 0; > } > <--- cut here ---> > > > _______________________________________________ > 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 berninho1 at hotmail.com Tue Aug 31 14:17:11 2004 From: berninho1 at hotmail.com (Bernhard Mayrhofer) Date: Tue, 31 Aug 2004 20:17:11 +0200 Subject: [vtkusers] Re: tried mayavi? Message-ID: Thanks for your answer, I need the image as a part of an C++ Code, i want to calculate some parameters, which i need for the furter ongoing of the programm. So mayavi would not help Bernhard > > Hi, > > tried mayavi, > it is a GUI for VTK, and might do what you need > > Dan > > Dr. Daniel James White BSc. (Hons.) PhD > Cell Biology > Department of biological and environmental science > PO Box 35 > University of Jyv?skyl? > Jyv?skyl? FIN 40014 > Finland > +358 14 260 4183 (work) > +358 468102840 (new mobile) > NEW PHONE NUMBER!!! > > http://www.chalkie.org.uk > dan at chalkie.org.uk > white at cc.jyu.fi > From clinton at elemtech.com Tue Aug 31 16:39:00 2004 From: clinton at elemtech.com (Clinton Stimpson) Date: Tue, 31 Aug 2004 14:39:00 -0600 Subject: [vtkusers] ati card on linux Message-ID: <4134E1E4.30203@elemtech.com> After some thoughts about the recent thread of ATI cards on Linux, I remembered that a few of our users had problems too. Their problems were solved by commenting out the 'load "dri"' from the xf86 config file. Some ATI cards don't support dri and Linux does that by default with the drivers that come with the OS. Maybe that'll work for some of you other people that are at least trying to get any opengl app to work. Clint From cpbotha at gmail.com Tue Aug 31 17:05:47 2004 From: cpbotha at gmail.com (Charl P. Botha) Date: Tue, 31 Aug 2004 23:05:47 +0200 Subject: [vtkusers] Observer to vtkImagePlanewidget In-Reply-To: References: Message-ID: <8e138ee404083114053cb6bf8b@mail.gmail.com> You can add at the very least observers for the StartInteractionEvent, InteractionEvent and EndInteractionEvent. Have a look at the source code of the vktImagePlaneWidget.cxx for calls to InvokeEvent() if you need more details on when exactly these observers are notified. ----- Original Message ----- From: Karl Fritscher Date: Tue, 31 Aug 2004 17:30:47 +0200 Subject: [vtkusers] Observer to vtkImagePlanewidget To: vtkusers at vtk.org Hello vtkUsers, perhaps a stupid questeion, but can a add an observer to vtkImagePlaneWidget? I tired it and it worked with renderers, renderwindows,... but not with the ImagePlaneWidget. In fact I would just like to (partly) synchronize the movements of two imageplanewidgets in 2 different renderwindows with two different vtkFLRenderWindowInteractors. Is there any way to do this?? Thanks for your help Karl _______________________________________________ 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 -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ From berninho1 at hotmail.com Tue Aug 31 18:58:42 2004 From: berninho1 at hotmail.com (Bernhard Mayrhofer) Date: Wed, 1 Sep 2004 00:58:42 +0200 Subject: [vtkusers] Re: tried mayavi? References: Message-ID: I found, that with vtkPolyDataMapper2D and vtkActor2D i can render a 2D represention. But i don?t know,how to save this image with a vtkImageWriter, and i also don?t know how i can influence which part of my PolyData is rendered. Bernhard > > > Thanks for your answer, > > I need the image as a part of an C++ Code, i want to calculate some > parameters, which i need for the furter ongoing of the programm. So mayavi > would not help > > Bernhard > > > > > > Hi, > > > > tried mayavi, > > it is a GUI for VTK, and might do what you need > > > > Dan > > > > Dr. Daniel James White BSc. (Hons.) PhD > > Cell Biology > > Department of biological and environmental science > > PO Box 35 > > University of Jyv?skyl? > > Jyv?skyl? FIN 40014 > > Finland > > +358 14 260 4183 (work) > > +358 468102840 (new mobile) > > NEW PHONE NUMBER!!! > > > > 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: > Follow this link to subscribe/unsubscribe: > http://www.vtk.org/mailman/listinfo/vtkusers > From sscomp2004 at yahoo.com.au Tue Aug 31 21:48:28 2004 From: sscomp2004 at yahoo.com.au (=?iso-8859-1?q?s=20comp?=) Date: Wed, 1 Sep 2004 11:48:28 +1000 (EST) Subject: [vtkusers] How to show unstructured grid mesh? Message-ID: <20040901014828.4307.qmail@web61101.mail.yahoo.com> I am importing octree's into vtk as a hexahedral mesh How do I display the mesh to ensure that the connectivity is all correct? Thanks, Tahwwhat --------------------------------- Find local movie times and trailers on Yahoo! Movies. -------------- next part -------------- An HTML attachment was scrubbed... URL: