From hessenthaler at mechbau.uni-stuttgart.de Sat Aug 1 06:21:32 2015 From: hessenthaler at mechbau.uni-stuttgart.de (Andreas Hessenthaler) Date: Sat, 1 Aug 2015 12:21:32 +0200 (CEST) Subject: [vtkusers] Speed up cell allocation In-Reply-To: <1438352299291-5733208.post@n5.nabble.com> References: <1438352299291-5733208.post@n5.nabble.com> Message-ID: I'm not sure if this answers your question, but I ran into a similar problem when I created cells for an unstructured grid. If I did it one-by-one, it was really slow. What helped was creating numpy arrays and use the SetCells method of the vtkUnstructuredGrid. Assume, you have a numpy array tempElemS, that contains the node numbers belonging to each hexahedron, e.g. [first element's node list] [second element's node list] [...] [last element's node list] Here's a python code snippet, that sets the cell data (similar to vtk.vtkPoints().SetData(...)): # unstructured grid ugridS = vtk.vtkUnstructuredGrid() # get cell type for tri-quadratic hexahedron cellTypesS = vtk.vtkTriQuadraticHexahedron().GetCellType() # obtain numpy arrays that contain # connectivity, cell types and cell locations (see below) tempElemLinS, cellstypesS, cellslocationsS = \ reshapeElementArray(tempElemS, cellTypesS) # create cell array from connectivity list cellsS = vtk.vtkCellArray() # set cells: # first argument is number of cells # second argument is connectivity list as 1D array cellsS.SetCells(int(tempElemLinS.shape[0]/28), \ numpy_to_vtk(tempElemLinS, deep=1, \ array_type=vtk.vtkIdTypeArray().GetDataType())) # set cells for unstructured grid sgridS.SetCells( \ numpy_to_vtk(cellstypesS, deep=1, \ array_type=vtk.vtkUnsignedCharArray().GetDataType()), \ numpy_to_vtk(cellslocationsS, deep = 1, \ array_type=vtk.vtkIdTypeArray().GetDataType()), cellsS) Now, the function reshapeElementArray returns the following: tempElemLinS - 1D array containing the connectivity list, e.g. for tri-quadratic hexahedra: tempElemLinS[0] = 27 # number of nodes of first element tempElemLinS[1] = n0 # first node number of first element ... tempElemLinS[27] = n26 # last node number of first element tempElemLinS[28] = 27 # number of nodes of first element tempElemLinS[29] = ... # first node number of second element ... tempElemLinS[55] = ... # last node number of second element ... cellstypesS - 1D array of size #elems with entries cellTypesS cellslocationsS - 1D array of size #elems with entries indicating the first index of each element in the 1D element array tempElemLinS, e.g. cellslocationsS[0] = 0 cellslocationsS[1] = 28 ... Hope that helps! On another note, in case you consider python. You can significantly speed up computations in the reshapeElementArray function by using numpy and cython without much programming overhead. Additionally, you might wanna consider writing tempElemLinS to a file and importing the file on start-up. I found this to be even faster in my case. Cheers Andreas On Fri, July 31, 2015 4:18 pm, quadprob wrote: Hi, My program is suffering from very noticeable start up times even though rendering itself is quite smooth. From profiling I've learnt that what's taking up most of the time is the vtkCell constructor calls. So what I'm essentially looking for is to speed up something like this: public static void main(String []args) { int numElems = 739872; vtkCell[] elems = new vtkCell[numElems]; long startTime = System.nanoTime(); for(int i = 0; i < numElems; ++i) { elems[i] = new vtkHexahedron(); } long stopTime = System.nanoTime(); System.out.printf("Took %dms\n", (stopTime-startTime)/1000000); } Do I have any options other than parallelizing the main loop? -- View this message in context: http://vtk.1045678.n5.nabble.com/Speed-up-cell-allocation-tp5733208.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From tr_jun-jiang.ee at vitrox.com Sat Aug 1 16:42:05 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Sat, 1 Aug 2015 13:42:05 -0700 (MST) Subject: [vtkusers] cant resize / move / rescale vtkBoxWidget Message-ID: <1438461725143-5733216.post@n5.nabble.com> Hi. I wan to clip volume in my Java program. I used boxWidget to control what volume will be rendered. However I cant resize, move or rescale the boxWidget at all. The following is my code snipplet. /protected void clipping() { renderWindowInteractor = new vtkRenderWindowInteractor(); renderWindowInteractor.SetRenderWindow(renWin.GetRenderWindow()); boxWidget = new vtkBoxWidget(); boxWidget.SetInteractor(renderWindowInteractor); boxWidget.SetPlaceFactor(1.25); boxWidget.SetProp3D(volume); boxWidget.InsideOutOn(); boxWidget.PlaceWidget(); boxWidget.On(); // press "i" to turn off / on boxWidget.AddObserver("InteractionEvent", this, "executeClipping"); boxWidget.EnabledOn(); renWin.Render(); Thread t2; t2 = new Thread("vtkRenderWindowInteractor for volume clipping") { public void run() { renderWindowInteractor.Start(); } }; t2.start(); } public void executeClipping(){ planes = new vtkPlanes(); boxWidget.GetPlanes(planes); volumeMapper.SetClippingPlanes(planes); planes.Delete(); }/ This might be a stupid but I've tried for hours and frustrated. Can anyone please point out my mistake ? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/cant-resize-move-rescale-vtkBoxWidget-tp5733216.html Sent from the VTK - Users mailing list archive at Nabble.com. From ram at centroidpic.com Sun Aug 2 19:12:24 2015 From: ram at centroidpic.com (Ram Sampath) Date: Sun, 2 Aug 2015 16:12:24 -0700 Subject: [vtkusers] VtkLookupTable and ScalarBar Message-ID: Hello Everyone: I was wondering if there's any sample code in which the lookup table is from blue to white to red. The SetHueRange and teh SetSatRange methods only provide two controls min and max and it would be great to be able to set the mid value of the lookup to white as I see in some VTK terrain visualization examples. I have attached a sample image of what I am thinking of. Thank you. Ram. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.png Type: image/png Size: 216586 bytes Desc: not available URL: From andrew.amaclean at gmail.com Sun Aug 2 19:38:42 2015 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Mon, 3 Aug 2015 09:38:42 +1000 Subject: [vtkusers] VtkLookupTable and ScalarBar Message-ID: You need the class vtkColorSeries: http://www.vtk.org/doc/nightly/html/classvtkColorSeries.html The tests should give you a good idea about usage. I would suggest starting with one of the Brewer Diverging enumerations and, if necessary, creating a custom one. This may also help: http://colorbrewer2.org/ For somewhat complex examples that use this class, see: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs and http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs This may also be of use: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/LUTUtilities There are also corresponding python versions of the same name in the VTK examples. Regards Andrew > ---------- Forwarded message ---------- > From: Ram Sampath > To: vtkusers > Cc: > Date: Sun, 2 Aug 2015 16:12:24 -0700 > Subject: [vtkusers] VtkLookupTable and ScalarBar > > Hello Everyone: > > I was wondering if there's any sample code in which the lookup table is > from blue to white to red. The SetHueRange and teh SetSatRange methods only > provide two controls min and max and it would be great to be able to set > the mid value of the lookup to white as I see in some VTK terrain > visualization examples. > > I have attached a sample image of what I am thinking of. > > > Thank you. > Ram. > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jason.cardinal at optimalcomputing.be Mon Aug 3 09:33:49 2015 From: jason.cardinal at optimalcomputing.be (jason@optimalcomputing) Date: Mon, 3 Aug 2015 06:33:49 -0700 (MST) Subject: [vtkusers] Integrating VTK into C# Excel AddIn Message-ID: <1438608829536-5733225.post@n5.nabble.com> Hi everyone ! I'm new to VTK and I can't manage to get it working in a WinForms control which is popping up from an Excel AddIn I developed... In fact, I already succeeded in integrating the VTK library in a Java application I am developing, even in a simple WinForm developed in C#. But it just won't work (with nearly the same code as in the C# form) in my Excel Ribbon AddIn. I always get that error: System.Exception: error: could not get registered type - mteIndex='1' classNameKey='' OR System.Exception: error: could not get registered type - mteIndex='2' classNameKey='' OR System.Exception: error: could not get registered type - mteIndex='4' classNameKey='' I already browse some threads about this exception but none of them helped me... Here is the code I'm running when a user's clicking a button I added on the Excel Addin's Ribbon: private void button1_Click(object sender, RibbonControlEventArgs e) { RenderWindowControl renderWindowControl = new RenderWindowControl(); renderWindowControl.Load += new System.EventHandler(renderWindowControl1_Load); renderWindowControl.Name = "renderWindowControl"; renderWindowControl.Location = new System.Drawing.Point(0, 0); renderWindowControl.Size = new System.Drawing.Size(900, 540); renderWindowControl.TabIndex = 0; renderWindowControl.TestText = null; renderWindowControl.AddTestActors = false; renderWindowControl.Dock = DockStyle.Fill; Panel pan = new Panel(); pan.Dock = DockStyle.Fill; pan.Controls.Add(renderWindowControl); Form frm1 = new Form(); frm1.Controls.Add(pan); frm1.Show(); } public void renderWindowControl1_Load(object sender, EventArgs args) { vtkSphereSource SphereSource = new vtkSphereSource(); SphereSource.SetRadius(0.5); vtkPolyDataMapper SphereMapper = vtkPolyDataMapper.New(); SphereMapper.SetInputConnection(SphereSource.GetOutputPort()); vtkActor SphereActor = vtkActor.New(); SphereActor.SetMapper(SphereMapper); vtkRenderWindow RenderWindow = renderWindowControl.RenderWindow; vtkRenderer Renderer = RenderWindow.GetRenderers().GetFirstRenderer(); Renderer.SetBackground(0.2, 0.3, 0.4); Renderer.AddActor(SphereActor); Renderer.ResetCamera(); } -- View this message in context: http://vtk.1045678.n5.nabble.com/Integrating-VTK-into-C-Excel-AddIn-tp5733225.html Sent from the VTK - Users mailing list archive at Nabble.com. From vaper at ukr.net Mon Aug 3 09:34:34 2015 From: vaper at ukr.net (Ievgen Petrashchuk) Date: Mon, 03 Aug 2015 16:34:34 +0300 Subject: [vtkusers] Exporting vtkVolume to STL/PLY In-Reply-To: References: <1438355606.807488125.efn0t1ip@frv40.fwdcdn.com> Message-ID: <1438608791.178830559.ofszvj16@frv40.fwdcdn.com> I think it is CT/MRT. Thank you for your answer. Do vtk has something better than marching cubes if you say it's not good enough? 31 July 2015, 18:45:38, by "Bill Lorensen" < bill.lorensen at gmail.com >: stl and ply store triangles and, for ply, polygons. Your example is rendering a volume directly. You would need to extract polygonal surfaces from your volume. This means you will need to perform some sort of segmentation to identify the structures to model with polygons. Marching Cubes is one technique that extracts surfaces based on a threshold. But most medical segmentation requires more sophisticated techniques. What is the modality of the dicom files/ CT, MRI, PET, ...? On Fri, Jul 31, 2015 at 11:16 AM, Ievgen Petrashchuk < vaper at ukr.net > wrote: Hello, I've been playing with VTK examples and got the tool that renders 3D mesh, based on DICOM files. How can I export the mesh to .ply or .stl file? My code: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char* argv[]) { ? ? // Verify input arguments ? ? if ( argc != 3 ) ? ? { ? ? ? ? std::cout << "Usage: " << argv[0] ? ? ? ? << " FolderName" << "Export.ply" << std::endl; ? ? ? ? return EXIT_FAILURE; ? ? } ? ? std::string folder = argv[1]; ? ? std::string output = argv[2]; ? ? // Read all the DICOM files in the specified directory. ? ? vtkSmartPointer reader = ? ? ? ? ? ? vtkSmartPointer::New(); ? ? reader->SetDirectoryName(folder.c_str()); ? ? reader->Update(); ? ? //Create vtkImageData ? ? vtkSmartPointer imageData = ? ? ? ? ? ? vtkSmartPointer::New(); ? ? imageData->ShallowCopy(reader->GetOutput()); ? ? //renderer ? ? vtkSmartPointer renWin = ? ? ? ? ? ? vtkSmartPointer::New(); ? ? vtkSmartPointer ren1 = ? ? ? ? ? ? vtkSmartPointer::New(); ? ? ren1->SetBackground(0,0,0); ? ? renWin->AddRenderer(ren1); ? ? renWin->SetSiz e(301,300); // intentional odd and NPOT ?width/height ? ? vtkSmartPointer iren = ? ? ? ? ? ? vtkSmartPointer::New(); ? ? iren->SetRenderWindow(renWin); ? ? renWin->Render(); // make sure we have an OpenGL context. ? ? vtkSmartPointer volumeMapper = ? ? ? ? ? ? vtkSmartPointer::New(); ? ? volumeMapper->SetBlendModeToComposite(); // composite first #if VTK_MAJOR_VERSION <= 5 ? ? volumeMapper->SetInputConnection(imageData->GetProducerPort()); #else ? volumeMapper->SetInputData(imageData); #endif ? ? vtkSmartPointer volumeProperty = ? ? ? ? ? ? vtkSmartPointer::New(); ? ? volumeProperty->ShadeOff(); ? ? volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION); ? ? vtkSmartPointer compositeOpacity = ? ? ? ? ? ? vtkSmartPointer::New(); ? ? compositeOpacity->AddPoint(-1000.0,0.0); ? ? compositeOpacity->AddPoint(0.0,0.0); ? ? compositeOpacity->AddPoint(1000.0,0.89); ? ? volumeProperty->SetScalarOpacity(compositeOpacity); // composite first. ? ? vtkSmartPointer color = ? ? ? ? ? ? vtkSmartPointer::New(); < /div> ? ? color->AddRGBPoint(0, ? ?0.0, 0.0, 0.0); ? ? color->AddRGBPoint(1000, ?1.0, 1, 1); ? ? color->AddRGBPoint(-1000, ? ?0.0, 0.0, 0.0); ? ? volumeProperty->SetColor(color); ? ? volumeProperty->SetInterpolationTypeToLinear(); ? ? volumeProperty->ShadeOff(); ? ? vtkSmartPointer volume = ? ? ? ? ? ? vtkSmartPointer::New(); ? ? volume->SetMapper(volumeMapper); ? ? volume->SetProperty(volumeProperty); ? ? ren1->AddViewProp(volume); ? ? ren1->ResetCamera(); ? ? // Render composite. In default mode. For coverage. ? ? renWin->R ender(); ? ? // 3D texture mode. For coverage. ? ? volumeMapper->SetRequestedRenderModeToDefault(); ? ? renWin->Render(); ? ? // Software mode, for coverage. It also makes sure we will get the same ? ? // regression image on all platforms. ? ? volumeMapper->SetRequestedRenderModeToRayCast(); ? ? renWin->Render(); ? ? iren->Start(); ? ? return EXIT_SUCCESS; } _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg.krivosheev at xcision.com Mon Aug 3 11:27:36 2015 From: oleg.krivosheev at xcision.com (Oleg Krivosheev) Date: Mon, 3 Aug 2015 11:27:36 -0400 Subject: [vtkusers] Speed up cell allocation In-Reply-To: <1438352299291-5733208.post@n5.nabble.com> References: <1438352299291-5733208.post@n5.nabble.com> Message-ID: Hi, > Do I have any options other than parallelizing the main loop? yes, you do, but it will complicate your resource (memory) management basically, separate allocation and initialization and use placement new somewhere along the line auto shex = sizeof(vtkHexahedron); auto elems_mem = new char [numElems * shex]; for(int i = 0; i < numElems; ++i) { elems[i] = new (elems_mem + i*shex) vtkHexahedron(); } but you have to keep pointer to memory, not to forget to deallocate it etc regards OK On Fri, Jul 31, 2015 at 10:18 AM, quadprob wrote: > Hi, > My program is suffering from very noticeable start up times even though > rendering itself is quite smooth. From profiling I've learnt that what's > taking up most of the time is the vtkCell constructor calls. So what I'm > essentially looking for is to speed up something like this: > > public static void main(String []args) { > int numElems = 739872; > vtkCell[] elems = new vtkCell[numElems]; > > long startTime = System.nanoTime(); > for(int i = 0; i < numElems; ++i) { > elems[i] = new vtkHexahedron(); > } > long stopTime = System.nanoTime(); > System.out.printf("Took %dms\n", (stopTime-startTime)/1000000); > } > > Do I have any options other than parallelizing the main loop? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Speed-up-cell-allocation-tp5733208.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ke.manjunath at gmail.com Mon Aug 3 13:43:38 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Mon, 3 Aug 2015 23:13:38 +0530 Subject: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04) Message-ID: Hi all I have installed VTK 6.2 along with vtk 6.2 python interface on ubuntu 14.04 manually. When I run vtkpython in interpreter mode, the import of vtk is successful. It doesn't have any problem and the same is shown below. =========================================================== manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ vtkpython vtk version 6.2.0 Python 2.7.2 (default, Feb 12 2015, 18:30:44) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from vtk import * >>> print vtk >>> =========================================================== But, If i run a python script then an error is obtained for this line "from vtk import *". The error is as shown below. =========================================================== manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ ./demo1.py Traceback (most recent call last): File "./demo1.py", line 6, in from vtk import * ImportError: No module named vtk =========================================================== Please help me in solving this issue. I appreciate your time and help. Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon Aug 3 14:03:30 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 03 Aug 2015 18:03:30 +0000 Subject: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04) In-Reply-To: References: Message-ID: Does "vtkpython demo1.py" work? vtkpython is a wrapper around python that includes the required VTK libraries. On Mon, Aug 3, 2015 at 1:44 PM Manjunath K E wrote: > Hi all > > I have installed VTK 6.2 along with vtk 6.2 python interface on ubuntu > 14.04 manually. > > When I run vtkpython in interpreter mode, the import of vtk is successful. > It doesn't have any problem and the same is shown below. > > =========================================================== > manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ > vtkpython > vtk version 6.2.0 > Python 2.7.2 (default, Feb 12 2015, 18:30:44) > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from vtk import * > >>> print vtk > '/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'> > >>> > =========================================================== > > But, If i run a python script then an error is obtained for this line > "from vtk import *". The error is as shown below. > =========================================================== > manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ > ./demo1.py > Traceback (most recent call last): > File "./demo1.py", line 6, in > from vtk import * > ImportError: No module named vtk > =========================================================== > > Please help me in solving this issue. I appreciate your time and help. > > Thanks and Regards, > > Manjunath K E > Help Ever Hurt Never > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Mon Aug 3 14:06:18 2015 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Mon, 3 Aug 2015 14:06:18 -0400 Subject: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04) In-Reply-To: References: Message-ID: Hi Manjunath, Please keep discussions on the list so that others can benefit later. I haven't used an install tree on Linux for a while but according to my notes you should need the following assuming it is installed to /usr/local: export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_PATH export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH HTH, Shawn On Mon, Aug 3, 2015 at 1:59 PM, Manjunath K E wrote: > Hi Shawn > > Thanks for the reply. > My python script is set up to use the system's python not vtkpython. > > I have set export > PYTHONPATH="/usr/local/lib/python2.7/site-packages/vtk/:$PYTHONPATH". > export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH > > I have installed vtk-6.2 to /usr/local. > > Is the should i change the values of PYTHONPATH and LD_LIBRARY_PATH to > something else. > > Thanks and Regards, > > Manjunath K E > Help Ever Hurt Never > > > On Mon, Aug 3, 2015 at 11:17 PM, Shawn Waldon > wrote: > >> Hi Manjunath, >> >> Is your python script set up to use vtkpython as the interpreter? Or is >> it using the system's python? If you are trying to import vtk from system >> python you have to set your LD_LIBRARY_PATH and PYTHONPATH environment >> variables. If you want to change the script to use vtkpython then change >> the first like to #!/path/to/vtkpython >> >> HTH, >> Shawn >> >> On Mon, Aug 3, 2015 at 1:43 PM, Manjunath K E >> wrote: >> >>> Hi all >>> >>> I have installed VTK 6.2 along with vtk 6.2 python interface on ubuntu >>> 14.04 manually. >>> >>> When I run vtkpython in interpreter mode, the import of vtk is >>> successful. >>> It doesn't have any problem and the same is shown below. >>> >>> =========================================================== >>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>> vtkpython >>> vtk version 6.2.0 >>> Python 2.7.2 (default, Feb 12 2015, 18:30:44) >>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>> Type "help", "copyright", "credits" or "license" for more information. >>> >>> from vtk import * >>> >>> print vtk >>> >> '/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'> >>> >>> >>> =========================================================== >>> >>> But, If i run a python script then an error is obtained for this line >>> "from vtk import *". The error is as shown below. >>> =========================================================== >>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>> ./demo1.py >>> Traceback (most recent call last): >>> File "./demo1.py", line 6, in >>> from vtk import * >>> ImportError: No module named vtk >>> =========================================================== >>> >>> Please help me in solving this issue. I appreciate your time and help. >>> >>> Thanks and Regards, >>> >>> Manjunath K E >>> Help Ever Hurt Never >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ke.manjunath at gmail.com Mon Aug 3 14:16:05 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Mon, 3 Aug 2015 23:46:05 +0530 Subject: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04) In-Reply-To: References: Message-ID: Hi Shawn, I followed your instructions, now the vtk importing problem is solved. But, following error is obtained ERROR: In /home/kitware/Desktop/vtkbuild/build/vtk/src/vtk/Rendering/OpenGL/vtkOpenGLTexture.cxx, line 200 vtkOpenGLTexture (0x2f2ac90): No scalar values found for texture input! The error is seen for every frame Thanks and Regards, Manjunath K E Help Ever Hurt Never On Mon, Aug 3, 2015 at 11:36 PM, Shawn Waldon wrote: > Hi Manjunath, > > Please keep discussions on the list so that others can benefit later. > > I haven't used an install tree on Linux for a while but according to my > notes you should need the following assuming it is installed to /usr/local: > > export > LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_PATH > > export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH > > HTH, > Shawn > > On Mon, Aug 3, 2015 at 1:59 PM, Manjunath K E > wrote: > >> Hi Shawn >> >> Thanks for the reply. >> My python script is set up to use the system's python not vtkpython. >> >> I have set export >> PYTHONPATH="/usr/local/lib/python2.7/site-packages/vtk/:$PYTHONPATH". >> export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH >> >> I have installed vtk-6.2 to /usr/local. >> >> Is the should i change the values of PYTHONPATH and LD_LIBRARY_PATH to >> something else. >> >> Thanks and Regards, >> >> Manjunath K E >> Help Ever Hurt Never >> >> >> On Mon, Aug 3, 2015 at 11:17 PM, Shawn Waldon >> wrote: >> >>> Hi Manjunath, >>> >>> Is your python script set up to use vtkpython as the interpreter? Or is >>> it using the system's python? If you are trying to import vtk from system >>> python you have to set your LD_LIBRARY_PATH and PYTHONPATH environment >>> variables. If you want to change the script to use vtkpython then change >>> the first like to #!/path/to/vtkpython >>> >>> HTH, >>> Shawn >>> >>> On Mon, Aug 3, 2015 at 1:43 PM, Manjunath K E >>> wrote: >>> >>>> Hi all >>>> >>>> I have installed VTK 6.2 along with vtk 6.2 python interface on ubuntu >>>> 14.04 manually. >>>> >>>> When I run vtkpython in interpreter mode, the import of vtk is >>>> successful. >>>> It doesn't have any problem and the same is shown below. >>>> >>>> =========================================================== >>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>> vtkpython >>>> vtk version 6.2.0 >>>> Python 2.7.2 (default, Feb 12 2015, 18:30:44) >>>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>>> Type "help", "copyright", "credits" or "license" for more information. >>>> >>> from vtk import * >>>> >>> print vtk >>>> >>> '/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'> >>>> >>> >>>> =========================================================== >>>> >>>> But, If i run a python script then an error is obtained for this line >>>> "from vtk import *". The error is as shown below. >>>> =========================================================== >>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>> ./demo1.py >>>> Traceback (most recent call last): >>>> File "./demo1.py", line 6, in >>>> from vtk import * >>>> ImportError: No module named vtk >>>> =========================================================== >>>> >>>> Please help me in solving this issue. I appreciate your time and help. >>>> >>>> Thanks and Regards, >>>> >>>> Manjunath K E >>>> Help Ever Hurt Never >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon Aug 3 15:01:00 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 03 Aug 2015 19:01:00 +0000 Subject: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04) In-Reply-To: References: Message-ID: Manjunath, Can you share the script you are trying to run? This seems like a problem with the script rather than an installation issue. On Mon, Aug 3, 2015 at 2:16 PM Manjunath K E wrote: > Hi Shawn, > > I followed your instructions, now the vtk importing problem is solved. > But, following error is obtained > > ERROR: In > /home/kitware/Desktop/vtkbuild/build/vtk/src/vtk/Rendering/OpenGL/vtkOpenGLTexture.cxx, > line 200 > vtkOpenGLTexture (0x2f2ac90): No scalar values found for texture input! > > The error is seen for every frame > > Thanks and Regards, > > Manjunath K E > Help Ever Hurt Never > > > On Mon, Aug 3, 2015 at 11:36 PM, Shawn Waldon > wrote: > >> Hi Manjunath, >> >> Please keep discussions on the list so that others can benefit later. >> >> I haven't used an install tree on Linux for a while but according to my >> notes you should need the following assuming it is installed to /usr/local: >> >> export >> LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_PATH >> >> export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH >> >> HTH, >> Shawn >> >> On Mon, Aug 3, 2015 at 1:59 PM, Manjunath K E >> wrote: >> >>> Hi Shawn >>> >>> Thanks for the reply. >>> My python script is set up to use the system's python not vtkpython. >>> >>> I have set export >>> PYTHONPATH="/usr/local/lib/python2.7/site-packages/vtk/:$PYTHONPATH". >>> export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH >>> >>> I have installed vtk-6.2 to /usr/local. >>> >>> Is the should i change the values of PYTHONPATH and LD_LIBRARY_PATH to >>> something else. >>> >>> Thanks and Regards, >>> >>> Manjunath K E >>> Help Ever Hurt Never >>> >>> >>> On Mon, Aug 3, 2015 at 11:17 PM, Shawn Waldon >>> wrote: >>> >>>> Hi Manjunath, >>>> >>>> Is your python script set up to use vtkpython as the interpreter? Or >>>> is it using the system's python? If you are trying to import vtk from >>>> system python you have to set your LD_LIBRARY_PATH and PYTHONPATH >>>> environment variables. If you want to change the script to use vtkpython >>>> then change the first like to #!/path/to/vtkpython >>>> >>>> HTH, >>>> Shawn >>>> >>>> On Mon, Aug 3, 2015 at 1:43 PM, Manjunath K E >>>> wrote: >>>> >>>>> Hi all >>>>> >>>>> I have installed VTK 6.2 along with vtk 6.2 python interface on >>>>> ubuntu 14.04 manually. >>>>> >>>>> When I run vtkpython in interpreter mode, the import of vtk is >>>>> successful. >>>>> It doesn't have any problem and the same is shown below. >>>>> >>>>> =========================================================== >>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>> vtkpython >>>>> vtk version 6.2.0 >>>>> Python 2.7.2 (default, Feb 12 2015, 18:30:44) >>>>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>>>> Type "help", "copyright", "credits" or "license" for more information. >>>>> >>> from vtk import * >>>>> >>> print vtk >>>>> >>>> '/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'> >>>>> >>> >>>>> =========================================================== >>>>> >>>>> But, If i run a python script then an error is obtained for this line >>>>> "from vtk import *". The error is as shown below. >>>>> =========================================================== >>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>> ./demo1.py >>>>> Traceback (most recent call last): >>>>> File "./demo1.py", line 6, in >>>>> from vtk import * >>>>> ImportError: No module named vtk >>>>> =========================================================== >>>>> >>>>> Please help me in solving this issue. I appreciate your time and help. >>>>> >>>>> Thanks and Regards, >>>>> >>>>> Manjunath K E >>>>> Help Ever Hurt Never >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>> >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tachim at cs.stanford.edu Mon Aug 3 15:43:00 2015 From: tachim at cs.stanford.edu (Tudor Achim) Date: Mon, 3 Aug 2015 15:43:00 -0400 Subject: [vtkusers] coloring PolyDataMappers in python Message-ID: Hi all, I have a quick question about coloring vtkPolyMappers. I have the following code: for cluster_ind in ...: threshold = vtk.vtkImageThreshold() threshold.SetInputConnection(importer.GetOutputPort()) threshold.ThresholdBetween(cluster_ind-0.1, cluster_ind+0.1) threshold.ReplaceInOn() threshold.SetInValue(0) threshold.ReplaceOutOn() threshold.SetOutValue(1) threshold.Update() dmc = vtk.vtkDiscreteMarchingCubes() dmc.SetInputConnection(threshold.GetOutputPort()) dmc.GenerateValues(1, 1, 1) dmc.Update() mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(dmc.GetOutputPort()) lut = vtk.vtkLookupTable() lut.SetNumberOfTableValues(2) lut.SetTableValue(0, 0, 0, 255) lut.SetTableValue(1, *rgb_cluster_mapping[cluster_ind]) lut.Build() mapper.SetLookupTable(lut) mapper.SetScalarModeToUseCellData() However, when I run it only one of the mappers is colored correctly; the other one is just rendered as black. I can tell that it's rendered black because when I spin around the clusters in my viewer I can see it obstructing the other clusters. The intended colors are (0, 255, 0) and (88, 86, 214) (that's what's in rgb_cluster_mapping for these clusters). Any ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: From chpradeep.ith at gmail.com Mon Aug 3 17:15:00 2015 From: chpradeep.ith at gmail.com (roobaru) Date: Mon, 3 Aug 2015 14:15:00 -0700 (MST) Subject: [vtkusers] Mapping nodal scalar values to graded color Message-ID: <1438636500160-5733238.post@n5.nabble.com> Hello, I am trying to display stress values on an FEM mesh as color grade using vtkColorTransferFunction. I am reading the nodal stress values from a file. I also added a scale widget on the right. The widget shows the colors correctly but the mesh doesn't display any graded color. I tried to achieve this using a single hexahedron mesh and it was displaying quite well. But the fileinput method somehow doesn't do anything. If anybody can see a glaring mistake and point it out, it will be a great help. I am attaching the code and the input file. Thanks for any help. #!/usr/bin/env python # This is a function, which takes a string parameter: file_path. This string is # the path of the geometry txt file from which vtk will grab and display data. import vtk def displayMesh(file_path): import vtk from vtk import vtkHexahedron VTK_HEXAHEDRON = vtkHexahedron().GetCellType() with open(file_path, 'r') as f: aMeshGrid = vtk.vtkUnstructuredGrid() aMeshGrid.Allocate(1, 1) # Get number of mesh points no_points = int(f.readline()) print no_points # Set number of points meshPoints = vtk.vtkPoints() meshPoints.SetNumberOfPoints(no_points) # Iterate through point data for i in range(no_points): #print i # Get coord info for each point point_info = f.readline().split() # I need to split, before I assign to point_coord # else the whole thing is split into single numbers point_ID = (int(point_info[0])-1) # -1 because the IDs need to start with 0. point_x = float(point_info[1]) point_y = float(point_info[2]) point_z = float(point_info[3]) # Set coord info in mesh meshPoints.InsertPoint(point_ID, point_x, point_y, point_z) # Get number of elements no_elements = int(f.readline()) # Set number of elements for i in range(no_elements): element_info = f.readline().split() element_ID = (int(element_info[0])-1) element_ID_list = vtk.vtkIdList() for j in range(8): node_no = int(element_info[j+1]) element_ID_list.InsertNextId(node_no -1) #print j, node_no cell_type = VTK_HEXAHEDRON aMeshGrid.InsertNextCell(cell_type, element_ID_list) stress = vtk.vtkFloatArray() for i in range(no_points): stress_value = f.readline() stress.InsertNextValue(float(stress_value)) aMeshGrid.GetPointData().GetScalars() aMeshMapper = vtk.vtkDataSetMapper() # # colorTransferFunction min=0.00001 max=0.035 avg=(min+max)/2.0 aMeshMapper.SetInputData(aMeshGrid) colorTransferFunction = vtk.vtkColorTransferFunction() colorTransferFunction.AddRGBPoint(min, 0.0, 0.0, 1.0) colorTransferFunction.AddRGBPoint(avg, 1.0, 1.0, 0.0) colorTransferFunction.AddRGBPoint(max, 1.0, 0.0, 0.0) aMeshMapper.SetLookupTable(colorTransferFunction) scalar_bar = vtk.vtkScalarBarActor() scalar_bar.SetOrientationToHorizontal() scalar_bar.SetLookupTable(colorTransferFunction) scalar_bar.SetTitle("Stress") scalar_bar.GetTitleTextProperty().SetColor(1.0,1.0,1.0) aMeshGrid.SetPoints(meshPoints) aMeshActor = vtk.vtkActor() aMeshActor.AddPosition(0,0,0) aMeshActor.SetMapper(aMeshMapper) aMeshActor.GetProperty().SetDiffuseColor(1, 1, 0) aMeshActor.GetProperty().SetEdgeVisibility(1) aMeshActor.GetProperty().SetEdgeColor(1, 0, 0) # Create the usual rendering stuff. ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) renWin.SetSize(1920, 1080) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) # create the scalar_bar_widget scalar_bar_widget = vtk.vtkScalarBarWidget() scalar_bar_widget.SetInteractor(iren) scalar_bar_widget.SetScalarBarActor(scalar_bar) scalar_bar_widget.On() # CompassWidget compassRepresentation = vtk.vtkCompassRepresentation() compassWidget = vtk.vtkCompassWidget() compassWidget.SetInteractor(iren) compassWidget.SetRepresentation(compassRepresentation) ren.AddActor(aMeshActor) ren.SetBackground(0.323,0.341,0.431) # Add Axes transform = vtk.vtkTransform() transform.Translate(0.0, 0.0, 0.0) axes = vtk.vtkAxesActor() # The axes are positioned with a user transform axes.SetUserTransform(transform) ren.AddActor(axes) ren.GetActiveCamera().SetPosition(-0.6,-0.6,-0.5) ren.ResetCamera() renWin.Render() compassWidget.EnabledOn() style = vtk.vtkInteractorStyleTrackballCamera() iren.SetInteractorStyle(style) ## Render the scene and start interaction. iren.Initialize() iren.Start() displayMesh('D:\VTK_Visualization\Beam_colorwidget.txt') file: https://drive.google.com/file/d/0B1TsQHxIsXV8NWRNNnRBTE5BaWs/view?usp=sharing -- View this message in context: http://vtk.1045678.n5.nabble.com/Mapping-nodal-scalar-values-to-graded-color-tp5733238.html Sent from the VTK - Users mailing list archive at Nabble.com. From alexmalvtk at gmail.com Tue Aug 4 00:03:33 2015 From: alexmalvtk at gmail.com (Alex Malyushytskyy) Date: Mon, 3 Aug 2015 21:03:33 -0700 Subject: [vtkusers] Mapping nodal scalar values to graded color In-Reply-To: <1438636500160-5733238.post@n5.nabble.com> References: <1438636500160-5733238.post@n5.nabble.com> Message-ID: I am not fluent with python, but should not you replace aMeshGrid.GetPointData().GetScalars() with something like aMeshGrid.GetPointData().SetScalars(stress) ? On Mon, Aug 3, 2015 at 2:15 PM, roobaru wrote: > Hello, > I am trying to display stress values on an FEM mesh as color grade using > vtkColorTransferFunction. I am reading the nodal stress values from a file. > I also added a scale widget on the right. The widget shows the colors > correctly but the mesh doesn't display any graded color. I tried to achieve > this using a single hexahedron mesh and it was displaying quite well. But > the fileinput method somehow doesn't do anything. If anybody can see a > glaring mistake and point it out, it will be a great help. I am attaching > the code and the input file. Thanks for any help. > > > #!/usr/bin/env python > # This is a function, which takes a string parameter: file_path. This > string > is > # the path of the geometry txt file from which vtk will grab and display > data. > import vtk > def displayMesh(file_path): > import vtk > from vtk import vtkHexahedron > VTK_HEXAHEDRON = vtkHexahedron().GetCellType() > with open(file_path, 'r') as f: > aMeshGrid = vtk.vtkUnstructuredGrid() > aMeshGrid.Allocate(1, 1) > # Get number of mesh points > no_points = int(f.readline()) > print no_points > # Set number of points > meshPoints = vtk.vtkPoints() > meshPoints.SetNumberOfPoints(no_points) > # Iterate through point data > for i in range(no_points): > #print i > # Get coord info for each point > point_info = f.readline().split() # I need to split, before I > assign to point_coord > # else the whole thing is split into single numbers > point_ID = (int(point_info[0])-1) # -1 because the IDs need to > start with 0. > point_x = float(point_info[1]) > point_y = float(point_info[2]) > point_z = float(point_info[3]) > # Set coord info in mesh > meshPoints.InsertPoint(point_ID, point_x, point_y, point_z) > # Get number of elements > no_elements = int(f.readline()) > # Set number of elements > for i in range(no_elements): > element_info = f.readline().split() > element_ID = (int(element_info[0])-1) > element_ID_list = vtk.vtkIdList() > for j in range(8): > node_no = int(element_info[j+1]) > element_ID_list.InsertNextId(node_no -1) > #print j, node_no > cell_type = VTK_HEXAHEDRON > aMeshGrid.InsertNextCell(cell_type, element_ID_list) > stress = vtk.vtkFloatArray() > for i in range(no_points): > stress_value = f.readline() > stress.InsertNextValue(float(stress_value)) > aMeshGrid.GetPointData().GetScalars() > aMeshMapper = vtk.vtkDataSetMapper() > > # # colorTransferFunction > min=0.00001 > max=0.035 > avg=(min+max)/2.0 > aMeshMapper.SetInputData(aMeshGrid) > colorTransferFunction = vtk.vtkColorTransferFunction() > colorTransferFunction.AddRGBPoint(min, 0.0, 0.0, 1.0) > colorTransferFunction.AddRGBPoint(avg, 1.0, 1.0, 0.0) > colorTransferFunction.AddRGBPoint(max, 1.0, 0.0, 0.0) > aMeshMapper.SetLookupTable(colorTransferFunction) > > scalar_bar = vtk.vtkScalarBarActor() > scalar_bar.SetOrientationToHorizontal() > scalar_bar.SetLookupTable(colorTransferFunction) > scalar_bar.SetTitle("Stress") > scalar_bar.GetTitleTextProperty().SetColor(1.0,1.0,1.0) > > aMeshGrid.SetPoints(meshPoints) > aMeshActor = vtk.vtkActor() > aMeshActor.AddPosition(0,0,0) > aMeshActor.SetMapper(aMeshMapper) > aMeshActor.GetProperty().SetDiffuseColor(1, 1, 0) > aMeshActor.GetProperty().SetEdgeVisibility(1) > aMeshActor.GetProperty().SetEdgeColor(1, 0, 0) > > # Create the usual rendering stuff. > ren = vtk.vtkRenderer() > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(ren) > renWin.SetSize(1920, 1080) > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > > # create the scalar_bar_widget > scalar_bar_widget = vtk.vtkScalarBarWidget() > scalar_bar_widget.SetInteractor(iren) > scalar_bar_widget.SetScalarBarActor(scalar_bar) > scalar_bar_widget.On() > > # CompassWidget > compassRepresentation = vtk.vtkCompassRepresentation() > compassWidget = vtk.vtkCompassWidget() > compassWidget.SetInteractor(iren) > compassWidget.SetRepresentation(compassRepresentation) > > ren.AddActor(aMeshActor) > ren.SetBackground(0.323,0.341,0.431) > # Add Axes > transform = vtk.vtkTransform() > transform.Translate(0.0, 0.0, 0.0) > axes = vtk.vtkAxesActor() > # The axes are positioned with a user transform > axes.SetUserTransform(transform) > ren.AddActor(axes) > ren.GetActiveCamera().SetPosition(-0.6,-0.6,-0.5) > ren.ResetCamera() > renWin.Render() > compassWidget.EnabledOn() > style = vtk.vtkInteractorStyleTrackballCamera() > iren.SetInteractorStyle(style) > ## Render the scene and start interaction. > iren.Initialize() > iren.Start() > displayMesh('D:\VTK_Visualization\Beam_colorwidget.txt') > > file: > > https://drive.google.com/file/d/0B1TsQHxIsXV8NWRNNnRBTE5BaWs/view?usp=sharing > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Mapping-nodal-scalar-values-to-graded-color-tp5733238.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim.geach at googlemail.com Tue Aug 4 00:06:53 2015 From: jim.geach at googlemail.com (James Geach) Date: Mon, 03 Aug 2015 21:06:53 -0700 Subject: [vtkusers] Saving images with greater than 8-bit depth Message-ID: <55C03A5D.9020808@gmail.com> Hi all - I'm volume rendering using a fixed point volume mapper and a scalar to color table with up to 65536 colours, rendering to a virtual frame buffer (initialized with Xvfb and 16-bit depth). I'm using window to image filter and then the standard PNG and TIFF image writers to save the frames, however these always seem to save as images with 8-bit depth. Is there a straightforward method to write images using the full colour depth of the frame buffer? Note - I am using VTK via python. Thanks in advance for any help. Jim From gilad.arnon at massivit.com Tue Aug 4 02:22:20 2015 From: gilad.arnon at massivit.com (Gilad Arnon) Date: Tue, 4 Aug 2015 09:22:20 +0300 Subject: [vtkusers] screen shot get clippet Message-ID: Hi all, I'm trying to get a png file out of my polydata. (I take several pictures from different angles.) but sometimes the outcome is clipped. this is my code vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(name); reader->Update(); inputPolyData = reader->GetOutput(); vtkSmartPointer inputPolyMapper = vtkSmartPointer::New(); inputPolyMapper->SetInputData(inputPolyData); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(inputPolyMapper); vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); vtkSmartPointer interactor = vtkSmartPointer::New(); interactor->SetRenderWindow(renderWindow); vtkSmartPointer axes = vtkSmartPointer::New(); vtkSmartPointer axisWidget = vtkSmartPointer::New(); axisWidget->SetOutlineColor(0.9300, 0.5700, 0.1300); axisWidget->SetOrientationMarker(axes); axisWidget->SetInteractor(interactor); renderWindow->AddRenderer(renderer); axisWidget->SetEnabled(1); axisWidget->InteractiveOff(); renderWindow->SetOffScreenRendering(1); renderer->AddActor(actor); vtkSmartPointer lightKit = vtkSmartPointer::New(); lightKit->AddLightsToRenderer(renderer); renderer->ResetCamera(); renderWindow->Render(); vtkSmartPointer windowToImageFilter = vtkSmartPointer::New(); windowToImageFilter->SetInput(renderWindow); windowToImageFilter->SetMagnification(3); windowToImageFilter->SetInputBufferTypeToRGBA(); windowToImageFilter->Update(); for example I receive this picture for a rectangle: [image: Inline image 1] Can someone assist? Thanks, Gilad. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rect.png Type: image/png Size: 13713 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rect.png Type: image/png Size: 13713 bytes Desc: not available URL: From tr_jun-jiang.ee at vitrox.com Tue Aug 4 02:30:45 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Mon, 3 Aug 2015 23:30:45 -0700 (MST) Subject: [vtkusers] VtkRenderWindowInteractor doesn't start and cause program freezes [java] Message-ID: <1438669845578-5733242.post@n5.nabble.com> I recently have implemented clipping in my VTK Java program. I used BoxWidget to control what should be clipped. However, i'm having an issue with vtkWindowInteractor that attached to BoxWidget. The program freezes at the renderWindowInteractor.Start() statement. This is my re-simulate code : or pastebin /import java.awt.BorderLayout; import java.awt.Dimension; import javax.swing.JPanel; import javax.swing.JFrame; import javax.swing.SwingUtilities; import vtk.*; public class VTKWindowInteractor extends JPanel { static { if (!vtkNativeLibrary.LoadAllNativeLibraries()) { for (vtkNativeLibrary lib : vtkNativeLibrary.values()) { if (!lib.IsLoaded()) { System.out.println(lib.GetLibraryName() + " not loaded"); } } System.out.println("Make sure the search path is correct: "); System.out.println(System.getProperty("java.library.path")); } vtkNativeLibrary.DisableOutputWindow(null); } private vtkPanel renWin; private vtkRenderWindowInteractor renderWindowInteractor; private vtkPolyDataMapper mapper; private vtkActor coneActor; private vtkPlanes planes; private vtkBoxWidget boxWidget; public VTKWindowInteractor() { setLayout(new BorderLayout()); renWin = new vtkPanel(); add(renWin, BorderLayout.CENTER); renWin.setMinimumSize(new Dimension(50, 50)); renWin.GetRenderer().SetBackground(0, 0, 0); // black renWin.GetRenderWindow().AddRenderer(renWin.GetRenderer()); } public void render() { mapper = new vtkPolyDataMapper(); vtkConeSource cone = new vtkConeSource(); cone.SetHeight(3.0); cone.SetRadius(1.0); cone.SetResolution(10); mapper.SetInputConnection(cone.GetOutputPort()); coneActor = new vtkActor(); coneActor.SetMapper(mapper); renWin.GetRenderer().AddActor(coneActor); planes = new vtkPlanes(); renderWindowInteractor = new vtkRenderWindowInteractor(); renderWindowInteractor.SetRenderWindow(renWin.GetRenderWindow()); boxWidget = new vtkBoxWidget(); boxWidget.SetInteractor(renderWindowInteractor); boxWidget.SetPlaceFactor(1.25); boxWidget.PlaceWidget(coneActor.GetBounds()); boxWidget.AddObserver("InteractionEvent", this, "executeClipping"); renderWindowInteractor.Initialize(); boxWidget.On(); renWin.Render(); renWin.resetCamera(); renderWindowInteractor.Start(); } public void executeClipping() { planes = new vtkPlanes(); boxWidget.GetPlanes(planes); mapper.SetClippingPlanes(planes); planes.Delete(); } public static final int WINDOW_WIDTH = 1000; public static final int WINDOW_HEIGHT = 500; public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { VTKWindowInteractor _vtkRendererPanel = new VTKWindowInteractor(); JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setTitle("......"); frame.setSize(WINDOW_WIDTH, WINDOW_HEIGHT); frame.setVisible(true); frame.setLayout(new BorderLayout()); frame.add(_vtkRendererPanel); _vtkRendererPanel.render(); } }); } }/ I have been finding my mistake for hours and hours and frustrated hence come here to seek for help. If anyone have experienced this or know what did I do wrong please correct me. Thanks ! *VTK version : 6.2.0* -- View this message in context: http://vtk.1045678.n5.nabble.com/VtkRenderWindowInteractor-doesn-t-start-and-cause-program-freezes-java-tp5733242.html Sent from the VTK - Users mailing list archive at Nabble.com. From marco.dev.open at gmail.com Tue Aug 4 08:04:33 2015 From: marco.dev.open at gmail.com (Marco Dev) Date: Tue, 4 Aug 2015 16:34:33 +0430 Subject: [vtkusers] converting metaimage format to nrrd Message-ID: Hi dears, Is way to convert metaimage (.mhd and .raw )format to .nrrd format ? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Aug 4 08:13:55 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 4 Aug 2015 08:13:55 -0400 Subject: [vtkusers] screen shot get clippet In-Reply-To: References: Message-ID: Before renderWindow->Render(); do renderer->ResetCameraClippingRange(); On Tue, Aug 4, 2015 at 2:22 AM, Gilad Arnon wrote: > Hi all, > > I'm trying to get a png file out of my polydata. > (I take several pictures from different angles.) > but sometimes the outcome is clipped. > > this is my code > > vtkSmartPointer reader = vtkSmartPointer::New(); > > reader->SetFileName(name); > > reader->Update(); > > inputPolyData = reader->GetOutput(); > > vtkSmartPointer inputPolyMapper = vtkSmartPointer::New(); > > inputPolyMapper->SetInputData(inputPolyData); > > vtkSmartPointer actor = vtkSmartPointer::New(); > > actor->SetMapper(inputPolyMapper); > > vtkSmartPointer renderer = vtkSmartPointer::New(); > > vtkSmartPointer renderWindow = vtkSmartPointer::New(); > > vtkSmartPointer interactor = vtkSmartPointer::New(); > > interactor->SetRenderWindow(renderWindow); > > vtkSmartPointer axes = > > vtkSmartPointer::New(); > > vtkSmartPointer axisWidget = vtkSmartPointer::New(); > > axisWidget->SetOutlineColor(0.9300, 0.5700, 0.1300); > > axisWidget->SetOrientationMarker(axes); > > axisWidget->SetInteractor(interactor); > > renderWindow->AddRenderer(renderer); > > axisWidget->SetEnabled(1); > > axisWidget->InteractiveOff(); > > renderWindow->SetOffScreenRendering(1); > > renderer->AddActor(actor); > > vtkSmartPointer lightKit = vtkSmartPointer::New(); > > lightKit->AddLightsToRenderer(renderer); > > renderer->ResetCamera(); > > renderWindow->Render(); > > vtkSmartPointer windowToImageFilter = > > vtkSmartPointer::New(); > > windowToImageFilter->SetInput(renderWindow); > > windowToImageFilter->SetMagnification(3); > > windowToImageFilter->SetInputBufferTypeToRGBA(); > > windowToImageFilter->Update(); > > > for example I receive this picture for a rectangle: > > > [image: Inline image 1] > > > Can someone assist? > > > Thanks, > > Gilad. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rect.png Type: image/png Size: 13713 bytes Desc: not available URL: From niels_dekker_address_until_2018 at xs4all.nl Tue Aug 4 08:23:15 2015 From: niels_dekker_address_until_2018 at xs4all.nl (Niels Dekker - address until 2018) Date: Tue, 04 Aug 2015 14:23:15 +0200 Subject: [vtkusers] Will VTK 6.3 support Visual Studio 2015? Message-ID: <55C0AEB3.7090209@xs4all.nl> I tried to build VTK 6.2, VTK 6.3 RC1, and the current version from gitlab.kitware.com/vtk/vtk.git on Microsoft Visual Studio 2015, but all of my attempts failed, apparently because of various issues (#0015529, #0015534, #0015535, #0015536), reported by David Kuegler. https://gitlab.kitware.com/dkuegler/vtk/commits/release-VS2015-compiler-errors Is there any chance that VTK 6.3 will compile on Visual Studio 2015? Kind regards, Niels -- Niels Dekker http://www.xs4all.nl/~nd/dekkerware Scientific programmer at LKEB, Leiden University Medical Center From gilad.arnon at massivit.com Tue Aug 4 09:06:23 2015 From: gilad.arnon at massivit.com (Gilad Arnon) Date: Tue, 4 Aug 2015 16:06:23 +0300 Subject: [vtkusers] screen shot get clippet In-Reply-To: References: Message-ID: Thanks Biil, It didn't help, but setting the range manually did. *Gilad Arnon* *SW team leader* M: +972-54-5226846 T: +972-8-6519486 gilad.arnon at massivit.com Massivit 3D Printing Technologies Ltd. 11 Pesakh Lev Lod 7129361, Israel www.massivit.com On Tue, Aug 4, 2015 at 3:13 PM, Bill Lorensen wrote: > Before > > renderWindow->Render(); > > do > > renderer->ResetCameraClippingRange(); > > > > On Tue, Aug 4, 2015 at 2:22 AM, Gilad Arnon > wrote: > >> Hi all, >> >> I'm trying to get a png file out of my polydata. >> (I take several pictures from different angles.) >> but sometimes the outcome is clipped. >> >> this is my code >> >> vtkSmartPointer reader = vtkSmartPointer::New(); >> >> reader->SetFileName(name); >> >> reader->Update(); >> >> inputPolyData = reader->GetOutput(); >> >> vtkSmartPointer inputPolyMapper = vtkSmartPointer::New(); >> >> inputPolyMapper->SetInputData(inputPolyData); >> >> vtkSmartPointer actor = vtkSmartPointer::New(); >> >> actor->SetMapper(inputPolyMapper); >> >> vtkSmartPointer renderer = vtkSmartPointer::New(); >> >> vtkSmartPointer renderWindow = vtkSmartPointer::New(); >> >> vtkSmartPointer interactor = vtkSmartPointer::New(); >> >> interactor->SetRenderWindow(renderWindow); >> >> vtkSmartPointer axes = >> >> vtkSmartPointer::New(); >> >> vtkSmartPointer axisWidget = vtkSmartPointer::New(); >> >> axisWidget->SetOutlineColor(0.9300, 0.5700, 0.1300); >> >> axisWidget->SetOrientationMarker(axes); >> >> axisWidget->SetInteractor(interactor); >> >> renderWindow->AddRenderer(renderer); >> >> axisWidget->SetEnabled(1); >> >> axisWidget->InteractiveOff(); >> >> renderWindow->SetOffScreenRendering(1); >> >> renderer->AddActor(actor); >> >> vtkSmartPointer lightKit = vtkSmartPointer::New(); >> >> lightKit->AddLightsToRenderer(renderer); >> >> renderer->ResetCamera(); >> >> renderWindow->Render(); >> >> vtkSmartPointer windowToImageFilter = >> >> vtkSmartPointer::New(); >> >> windowToImageFilter->SetInput(renderWindow); >> >> windowToImageFilter->SetMagnification(3); >> >> windowToImageFilter->SetInputBufferTypeToRGBA(); >> >> windowToImageFilter->Update(); >> >> >> for example I receive this picture for a rectangle: >> >> >> [image: Inline image 1] >> >> >> Can someone assist? >> >> >> Thanks, >> >> Gilad. >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: rect.png Type: image/png Size: 13713 bytes Desc: not available URL: From dave.demarle at kitware.com Tue Aug 4 10:12:11 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 4 Aug 2015 10:12:11 -0400 Subject: [vtkusers] Will VTK 6.3 support Visual Studio 2015? In-Reply-To: <55C0AEB3.7090209@xs4all.nl> References: <55C0AEB3.7090209@xs4all.nl> Message-ID: Thanks Neils and David, We expect 6.3.0.rc2 late this week or early next week. We'll try to get these resolved for rc2 but can't make any promises. Not until Ben and I take a hard look at the issues that is. Rest assured that even if it doesn't get fixed before 6.3.0 final, it will be in 6.3.1. We plan to support and maintain the 6.3 line for much longer than we did 5.10 so that we can collectively shake out the bugs in the major new features and platform requirements of 7.x and beyond. hope that helps, David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Aug 4, 2015 at 8:23 AM, Niels Dekker - address until 2018 < niels_dekker_address_until_2018 at xs4all.nl> wrote: > I tried to build VTK 6.2, VTK 6.3 RC1, and the current version from > gitlab.kitware.com/vtk/vtk.git on Microsoft Visual Studio 2015, but all > of my attempts failed, apparently because of various issues (#0015529, > #0015534, #0015535, #0015536), reported by David Kuegler. > https://gitlab.kitware.com/dkuegler/vtk/commits/release-VS2015-compiler-errors > > Is there any chance that VTK 6.3 will compile on Visual Studio 2015? > > Kind regards, Niels > -- > Niels Dekker > http://www.xs4all.nl/~nd/dekkerware > Scientific programmer at LKEB, Leiden University Medical Center > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.mccormick at kitware.com Tue Aug 4 10:21:21 2015 From: matt.mccormick at kitware.com (Matt McCormick) Date: Tue, 4 Aug 2015 10:21:21 -0400 Subject: [vtkusers] [ITK-dev] converting metaimage format to nrrd In-Reply-To: References: Message-ID: Hi Marco, This example may be useful: http://itk.org/ITKExamples/src/IO/ImageBase/ConvertFileFormats/Documentation.html HTH, Matt On Tue, Aug 4, 2015 at 8:04 AM, Marco Dev wrote: > Hi dears, > Is way to convert metaimage (.mhd and .raw )format to .nrrd format ? > Thanks in advance. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > From ben.boeckel at kitware.com Tue Aug 4 10:47:23 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 4 Aug 2015 10:47:23 -0400 Subject: [vtkusers] Will VTK 6.3 support Visual Studio 2015? In-Reply-To: <55C0AEB3.7090209@xs4all.nl> References: <55C0AEB3.7090209@xs4all.nl> Message-ID: <20150804144723.GA24906@megas.kitware.com> On Tue, Aug 04, 2015 at 14:23:15 +0200, Niels Dekker - address until 2018 wrote: > I tried to build VTK 6.2, VTK 6.3 RC1, and the current version from > gitlab.kitware.com/vtk/vtk.git on Microsoft Visual Studio 2015, but > all of my attempts failed, apparently because of various issues > (#0015529, #0015534, #0015535, #0015536), reported by David Kuegler. > https://gitlab.kitware.com/dkuegler/vtk/commits/release-VS2015-compiler-errors > > Is there any chance that VTK 6.3 will compile on Visual Studio 2015? Here's a branch I've been poking for a bit: https://gitlab.kitware.com/vtk/vtk/merge_requests/446 There's currently an experimental dashboard here: https://buildbot.kitware.com/builders/vtk-nemesis-windows-shared-release%2Bmpi%2Bmsvc2015%2Bopengl2%2Bpython VTK triggered an internal compiler error in MSVC2015, so the answer for master is "not if you want EnSight support" :) . The third party plugins have logic which assume "MSVC? must not have X." which is not (always) true for 2015 (It has snprintf! Without the underscore!). I'll try for the release (it might even make rc2); it's down to warnings right now. Harder testing encouraged (e.g., it isn't trying OpenGL1 right now). Thanks, --Ben From ke.manjunath at gmail.com Tue Aug 4 11:31:31 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Tue, 4 Aug 2015 21:01:31 +0530 Subject: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04) In-Reply-To: References: Message-ID: Hi Dan Lipsa, Thanks for the reply. The error is occurring during runtime. There was no error, when i ran it in interpreter. All the lines in the script executed smoothly. I have tested the same code using vtk 6.0.0 there was no error. Also, the output that i get is not proper. There is problem in the color map of the output produced. The scale bar is not displayed properly. ========================================== #!/usr/bin/env python from vtk import * reader = vtkNetCDFCFReader() reader.SetFileName("3d.nc") reader.SphericalCoordinatesOff() reader.SetOutputType(6) reader.SetReplaceFillValueWithNan(1) reader.Update() #Copy SAL Array to scalar value field of point data ..this makes point data to point to SAL array reader.GetOutput().GetPointData().SetScalars(reader.GetOutput().GetPointData().GetArray("SAL")) reader.UpdateMetaData() reader.Update() reader.UpdateInformation() output = reader.GetOutput() a,b = reader.GetOutput().GetPointData().GetScalars().GetRange() lut = vtk.vtkColorTransferFunction() lut.AddRGBPoint(a, 0.0, 0.0, 0.8) lut.AddRGBPoint(a+(b-a)/4, 0.0, 0.5, 0.5) lut.AddRGBPoint(a+(b-a)/2, 0.0, 1.0, 0.0) lut.AddRGBPoint(b-(b-a)/4, 0.5, 0.5, 0.0) lut.AddRGBPoint(b, 1.0, 0.0, 0.0) lut.SetNanColor(0,0,1) # the mapper that will use the lookup table mapper = vtkDataSetMapper() mapper.SetInputData(reader.GetOutput()) mapper.SetScalarModeToUsePointData() mapper.SetLookupTable(lut) mapper.SetScalarRange(a,b) # the actor gridActor = vtkActor() gridActor.SetMapper( mapper ) scaleBarActor = vtkScalarBarActor() scaleBarActor.SetLookupTable( mapper.GetLookupTable() ) scaleBarActor.SetTitle("Color Map for Point Data") scaleBarActor.SetOrientationToHorizontal() scaleBarActor.GetLabelTextProperty().SetColor(0,0,1) scaleBarActor.GetTitleTextProperty().SetColor(0,0,1) # position it in window coord = scaleBarActor.GetPositionCoordinate() coord.SetCoordinateSystemToNormalizedViewport() coord.SetValue(0.1,0.05) scaleBarActor.SetWidth(.5) scaleBarActor.SetHeight(.1) # renderer and render window renderer = vtkRenderer() renderer.SetBackground(1, 1, 1) renderer.SetGradientBackground(1) # Set background to white renWindow = vtk.vtkRenderWindow() renWindow.SetSize(512, 512) renWindow.AddRenderer( renderer ) # render window interactor renWinInteractor = vtkRenderWindowInteractor() renWinInteractor.SetRenderWindow( renWindow ) # add the actors to the renderer renderer.AddActor( gridActor ) renderer.AddActor( scaleBarActor ) #show axes axesActor = vtkAxesActor() widget = vtkOrientationMarkerWidget() widget.SetOrientationMarker( axesActor ) widget.SetInteractor( renWinInteractor ) widget.SetViewport( 0.0, 0.0, 0.4, 0.4 ) widget.SetEnabled( 1 ) widget.InteractiveOff() # render renderer.ResetCamera(); renWindow.Render() # initialize and start the interactor renWinInteractor.Initialize() renWinInteractor.Start() ================================================== Thanks and Regards, Manjunath K E Help Ever Hurt Never On Tue, Aug 4, 2015 at 12:31 AM, Dan Lipsa wrote: > Manjunath, > Can you share the script you are trying to run? This seems like a problem > with the script rather than an installation issue. > > On Mon, Aug 3, 2015 at 2:16 PM Manjunath K E > wrote: > >> Hi Shawn, >> >> I followed your instructions, now the vtk importing problem is solved. >> But, following error is obtained >> >> ERROR: In >> /home/kitware/Desktop/vtkbuild/build/vtk/src/vtk/Rendering/OpenGL/vtkOpenGLTexture.cxx, >> line 200 >> vtkOpenGLTexture (0x2f2ac90): No scalar values found for texture input! >> >> The error is seen for every frame >> >> Thanks and Regards, >> >> Manjunath K E >> Help Ever Hurt Never >> >> >> On Mon, Aug 3, 2015 at 11:36 PM, Shawn Waldon >> wrote: >> >>> Hi Manjunath, >>> >>> Please keep discussions on the list so that others can benefit later. >>> >>> I haven't used an install tree on Linux for a while but according to my >>> notes you should need the following assuming it is installed to /usr/local: >>> >>> export >>> LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_PATH >>> >>> export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH >>> >>> HTH, >>> Shawn >>> >>> On Mon, Aug 3, 2015 at 1:59 PM, Manjunath K E >>> wrote: >>> >>>> Hi Shawn >>>> >>>> Thanks for the reply. >>>> My python script is set up to use the system's python not vtkpython. >>>> >>>> I have set export >>>> PYTHONPATH="/usr/local/lib/python2.7/site-packages/vtk/:$PYTHONPATH". >>>> export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH >>>> >>>> I have installed vtk-6.2 to /usr/local. >>>> >>>> Is the should i change the values of PYTHONPATH and LD_LIBRARY_PATH to >>>> something else. >>>> >>>> Thanks and Regards, >>>> >>>> Manjunath K E >>>> Help Ever Hurt Never >>>> >>>> >>>> On Mon, Aug 3, 2015 at 11:17 PM, Shawn Waldon >>> > wrote: >>>> >>>>> Hi Manjunath, >>>>> >>>>> Is your python script set up to use vtkpython as the interpreter? Or >>>>> is it using the system's python? If you are trying to import vtk from >>>>> system python you have to set your LD_LIBRARY_PATH and PYTHONPATH >>>>> environment variables. If you want to change the script to use vtkpython >>>>> then change the first like to #!/path/to/vtkpython >>>>> >>>>> HTH, >>>>> Shawn >>>>> >>>>> On Mon, Aug 3, 2015 at 1:43 PM, Manjunath K E >>>>> wrote: >>>>> >>>>>> Hi all >>>>>> >>>>>> I have installed VTK 6.2 along with vtk 6.2 python interface on >>>>>> ubuntu 14.04 manually. >>>>>> >>>>>> When I run vtkpython in interpreter mode, the import of vtk is >>>>>> successful. >>>>>> It doesn't have any problem and the same is shown below. >>>>>> >>>>>> =========================================================== >>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>> vtkpython >>>>>> vtk version 6.2.0 >>>>>> Python 2.7.2 (default, Feb 12 2015, 18:30:44) >>>>>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>>>>> Type "help", "copyright", "credits" or "license" for more information. >>>>>> >>> from vtk import * >>>>>> >>> print vtk >>>>>> >>>>> '/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'> >>>>>> >>> >>>>>> =========================================================== >>>>>> >>>>>> But, If i run a python script then an error is obtained for this line >>>>>> "from vtk import *". The error is as shown below. >>>>>> =========================================================== >>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>> ./demo1.py >>>>>> Traceback (most recent call last): >>>>>> File "./demo1.py", line 6, in >>>>>> from vtk import * >>>>>> ImportError: No module named vtk >>>>>> =========================================================== >>>>>> >>>>>> Please help me in solving this issue. I appreciate your time and help. >>>>>> >>>>>> Thanks and Regards, >>>>>> >>>>>> Manjunath K E >>>>>> Help Ever Hurt Never >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>> >>>> >>> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From niels_dekker_address_until_2018 at xs4all.nl Tue Aug 4 11:55:38 2015 From: niels_dekker_address_until_2018 at xs4all.nl (Niels Dekker - address until 2018) Date: Tue, 04 Aug 2015 17:55:38 +0200 Subject: [vtkusers] Will VTK 6.3 support Visual Studio 2015? In-Reply-To: <20150804144723.GA24906@megas.kitware.com> References: <55C0AEB3.7090209@xs4all.nl> <20150804144723.GA24906@megas.kitware.com> Message-ID: <55C0E07A.2090406@xs4all.nl> Hi Ben, Thanks for your reply! Can you please be more specific on how to reproduce the internal compiler error in MSVC2015? Do I understand correctly that it occurs when building a source file from IO/EnSight? If so, which particular source file triggers the internal compiler error? My VTK CMakeCache.txt says: "Module_vtkIOEnSight:INTERNAL=OFF". So I guess that means that vtkIOEnSight is disabled by default. How can I enable vtkIOEnSight, in order to reproduce the compiler error? Kind regards, Niels On 2015-08-04 16:47, Ben Boeckel wrote: > On Tue, Aug 04, 2015 at 14:23:15 +0200, Niels Dekker wrote: >> I tried to build VTK 6.2, VTK 6.3 RC1, and the current version from >> gitlab.kitware.com/vtk/vtk.git on Microsoft Visual Studio 2015, but >> all of my attempts failed, apparently because of various issues >> (#0015529, #0015534, #0015535, #0015536), reported by David Kuegler. >> https://gitlab.kitware.com/dkuegler/vtk/commits/release-VS2015-compiler-errors >> >> Is there any chance that VTK 6.3 will compile on Visual Studio 2015? > > Here's a branch I've been poking for a bit: > > https://gitlab.kitware.com/vtk/vtk/merge_requests/446 > > There's currently an experimental dashboard here: > > https://buildbot.kitware.com/builders/vtk-nemesis-windows-shared-release%2Bmpi%2Bmsvc2015%2Bopengl2%2Bpython > > VTK triggered an internal compiler error in MSVC2015, so the answer for > master is "not if you want EnSight support" :) . The third party plugins > have logic which assume "MSVC? must not have X." which is not (always) > true for 2015 (It has snprintf! Without the underscore!). > > I'll try for the release (it might even make rc2); it's down to warnings > right now. Harder testing encouraged (e.g., it isn't trying OpenGL1 > right now). > > Thanks, > > --Ben > From chpradeep.ith at gmail.com Tue Aug 4 12:08:34 2015 From: chpradeep.ith at gmail.com (roobaru) Date: Tue, 4 Aug 2015 09:08:34 -0700 (MST) Subject: [vtkusers] Mapping nodal scalar values to graded color In-Reply-To: References: <1438636500160-5733238.post@n5.nabble.com> Message-ID: <1438704514871-5733254.post@n5.nabble.com> @Alex Thanks for the reply! Doing "aMeshGrid.GetPointData().GetScalars(stress)" gives me an error TypeError: GetScalars argument 1: string or None required -- View this message in context: http://vtk.1045678.n5.nabble.com/Mapping-nodal-scalar-values-to-graded-color-tp5733238p5733254.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Tue Aug 4 12:37:15 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 4 Aug 2015 12:37:15 -0400 Subject: [vtkusers] Saving images with greater than 8-bit depth In-Reply-To: <55C03A5D.9020808@gmail.com> References: <55C03A5D.9020808@gmail.com> Message-ID: Do you need save individual channels 16 bit or all four of them 16 bit? - Aashihs On Tue, Aug 4, 2015 at 12:06 AM, James Geach via vtkusers wrote: > Hi all - > > I'm volume rendering using a fixed point volume mapper and a scalar to > color table with up to 65536 colours, rendering to a virtual frame buffer > (initialized with Xvfb and 16-bit depth). > > I'm using window to image filter and then the standard PNG and TIFF image > writers to save the frames, however these always seem to save as images > with 8-bit depth. > > Is there a straightforward method to write images using the full colour > depth of the frame buffer? > > Note - I am using VTK via python. > > Thanks in advance for any help. > > Jim > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Tue Aug 4 12:45:48 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 04 Aug 2015 16:45:48 +0000 Subject: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04) In-Reply-To: References: Message-ID: It would be great if you could share your data as well so that I can check it with my installation. Thanks, Dan On Tue, Aug 4, 2015 at 11:31 AM Manjunath K E wrote: > Hi Dan Lipsa, > > Thanks for the reply. The error is occurring during runtime. There was no > error, when i ran it in interpreter. All the lines in the script executed > smoothly. > I have tested the same code using vtk 6.0.0 there was no error. > > Also, the output that i get is not proper. There is problem in the color > map of the output produced. The scale bar is not displayed properly. > ========================================== > #!/usr/bin/env python > from vtk import * > > reader = vtkNetCDFCFReader() > reader.SetFileName("3d.nc") > reader.SphericalCoordinatesOff() > reader.SetOutputType(6) > reader.SetReplaceFillValueWithNan(1) > reader.Update() > #Copy SAL Array to scalar value field of point data ..this makes point > data to point to SAL array > > reader.GetOutput().GetPointData().SetScalars(reader.GetOutput().GetPointData().GetArray("SAL")) > reader.UpdateMetaData() > reader.Update() > reader.UpdateInformation() > output = reader.GetOutput() > > a,b = reader.GetOutput().GetPointData().GetScalars().GetRange() > lut = vtk.vtkColorTransferFunction() > lut.AddRGBPoint(a, 0.0, 0.0, 0.8) > lut.AddRGBPoint(a+(b-a)/4, 0.0, 0.5, 0.5) > lut.AddRGBPoint(a+(b-a)/2, 0.0, 1.0, 0.0) > lut.AddRGBPoint(b-(b-a)/4, 0.5, 0.5, 0.0) > lut.AddRGBPoint(b, 1.0, 0.0, 0.0) > lut.SetNanColor(0,0,1) > > # the mapper that will use the lookup table > mapper = vtkDataSetMapper() > mapper.SetInputData(reader.GetOutput()) > mapper.SetScalarModeToUsePointData() > mapper.SetLookupTable(lut) > mapper.SetScalarRange(a,b) > # the actor > gridActor = vtkActor() > gridActor.SetMapper( mapper ) > scaleBarActor = vtkScalarBarActor() > scaleBarActor.SetLookupTable( mapper.GetLookupTable() ) > scaleBarActor.SetTitle("Color Map for Point Data") > scaleBarActor.SetOrientationToHorizontal() > scaleBarActor.GetLabelTextProperty().SetColor(0,0,1) > scaleBarActor.GetTitleTextProperty().SetColor(0,0,1) > > # position it in window > coord = scaleBarActor.GetPositionCoordinate() > coord.SetCoordinateSystemToNormalizedViewport() > coord.SetValue(0.1,0.05) > scaleBarActor.SetWidth(.5) > scaleBarActor.SetHeight(.1) > > # renderer and render window > renderer = vtkRenderer() > renderer.SetBackground(1, 1, 1) > renderer.SetGradientBackground(1) # Set background to white > renWindow = vtk.vtkRenderWindow() > renWindow.SetSize(512, 512) > renWindow.AddRenderer( renderer ) > > # render window interactor > renWinInteractor = vtkRenderWindowInteractor() > renWinInteractor.SetRenderWindow( renWindow ) > # add the actors to the renderer > renderer.AddActor( gridActor ) > renderer.AddActor( scaleBarActor ) > > #show axes > axesActor = vtkAxesActor() > widget = vtkOrientationMarkerWidget() > widget.SetOrientationMarker( axesActor ) > widget.SetInteractor( renWinInteractor ) > widget.SetViewport( 0.0, 0.0, 0.4, 0.4 ) > widget.SetEnabled( 1 ) > widget.InteractiveOff() > > # render > renderer.ResetCamera(); > renWindow.Render() > # initialize and start the interactor > renWinInteractor.Initialize() > renWinInteractor.Start() > ================================================== > > > Thanks and Regards, > > Manjunath K E > Help Ever Hurt Never > > > On Tue, Aug 4, 2015 at 12:31 AM, Dan Lipsa wrote: > >> Manjunath, >> Can you share the script you are trying to run? This seems like a problem >> with the script rather than an installation issue. >> >> On Mon, Aug 3, 2015 at 2:16 PM Manjunath K E >> wrote: >> >>> Hi Shawn, >>> >>> I followed your instructions, now the vtk importing problem is solved. >>> But, following error is obtained >>> >>> ERROR: In >>> /home/kitware/Desktop/vtkbuild/build/vtk/src/vtk/Rendering/OpenGL/vtkOpenGLTexture.cxx, >>> line 200 >>> vtkOpenGLTexture (0x2f2ac90): No scalar values found for texture input! >>> >>> The error is seen for every frame >>> >>> Thanks and Regards, >>> >>> Manjunath K E >>> Help Ever Hurt Never >>> >>> >>> On Mon, Aug 3, 2015 at 11:36 PM, Shawn Waldon >>> wrote: >>> >>>> Hi Manjunath, >>>> >>>> Please keep discussions on the list so that others can benefit later. >>>> >>>> I haven't used an install tree on Linux for a while but according to my >>>> notes you should need the following assuming it is installed to /usr/local: >>>> >>>> export >>>> LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_PATH >>>> >>>> export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH >>>> >>>> HTH, >>>> Shawn >>>> >>>> On Mon, Aug 3, 2015 at 1:59 PM, Manjunath K E >>>> wrote: >>>> >>>>> Hi Shawn >>>>> >>>>> Thanks for the reply. >>>>> My python script is set up to use the system's python not vtkpython. >>>>> >>>>> I have set export >>>>> PYTHONPATH="/usr/local/lib/python2.7/site-packages/vtk/:$PYTHONPATH". >>>>> export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH >>>>> >>>>> I have installed vtk-6.2 to /usr/local. >>>>> >>>>> Is the should i change the values of PYTHONPATH and LD_LIBRARY_PATH to >>>>> something else. >>>>> >>>>> Thanks and Regards, >>>>> >>>>> Manjunath K E >>>>> Help Ever Hurt Never >>>>> >>>>> >>>>> On Mon, Aug 3, 2015 at 11:17 PM, Shawn Waldon < >>>>> shawn.waldon at kitware.com> wrote: >>>>> >>>>>> Hi Manjunath, >>>>>> >>>>>> Is your python script set up to use vtkpython as the interpreter? Or >>>>>> is it using the system's python? If you are trying to import vtk from >>>>>> system python you have to set your LD_LIBRARY_PATH and PYTHONPATH >>>>>> environment variables. If you want to change the script to use vtkpython >>>>>> then change the first like to #!/path/to/vtkpython >>>>>> >>>>>> HTH, >>>>>> Shawn >>>>>> >>>>>> On Mon, Aug 3, 2015 at 1:43 PM, Manjunath K E >>>>> > wrote: >>>>>> >>>>>>> Hi all >>>>>>> >>>>>>> I have installed VTK 6.2 along with vtk 6.2 python interface on >>>>>>> ubuntu 14.04 manually. >>>>>>> >>>>>>> When I run vtkpython in interpreter mode, the import of vtk is >>>>>>> successful. >>>>>>> It doesn't have any problem and the same is shown below. >>>>>>> >>>>>>> =========================================================== >>>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>>> vtkpython >>>>>>> vtk version 6.2.0 >>>>>>> Python 2.7.2 (default, Feb 12 2015, 18:30:44) >>>>>>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>>>>>> Type "help", "copyright", "credits" or "license" for more >>>>>>> information. >>>>>>> >>> from vtk import * >>>>>>> >>> print vtk >>>>>>> >>>>>> '/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'> >>>>>>> >>> >>>>>>> =========================================================== >>>>>>> >>>>>>> But, If i run a python script then an error is obtained for this >>>>>>> line "from vtk import *". The error is as shown below. >>>>>>> =========================================================== >>>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>>> ./demo1.py >>>>>>> Traceback (most recent call last): >>>>>>> File "./demo1.py", line 6, in >>>>>>> from vtk import * >>>>>>> ImportError: No module named vtk >>>>>>> =========================================================== >>>>>>> >>>>>>> Please help me in solving this issue. I appreciate your time and >>>>>>> help. >>>>>>> >>>>>>> Thanks and Regards, >>>>>>> >>>>>>> Manjunath K E >>>>>>> Help Ever Hurt Never >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Tue Aug 4 12:58:31 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 4 Aug 2015 12:58:31 -0400 Subject: [vtkusers] Will VTK 6.3 support Visual Studio 2015? In-Reply-To: <55C0E07A.2090406@xs4all.nl> References: <55C0AEB3.7090209@xs4all.nl> <20150804144723.GA24906@megas.kitware.com> <55C0E07A.2090406@xs4all.nl> Message-ID: <20150804165831.GA14325@megas.kitware.com> On Tue, Aug 04, 2015 at 17:55:38 +0200, Niels Dekker - address until 2018 wrote: > Thanks for your reply! Can you please be more specific on how to > reproduce the internal compiler error in MSVC2015? Do I understand > correctly that it occurs when building a source file from IO/EnSight? > If so, which particular source file triggers the internal compiler error? Oh, I already fixed it: https://gitlab.kitware.com/ben.boeckel/vtk/commit/385e0e76931272f2402727412d100b1d35a5d0c4 If you would like to figure out a better reason *why* this fixes it, I'd be grateful :) . Basically, if either of the statements in the if () block were there, it ICE'd and if both were commented out, it was fine. Adding a "std::cerr << fileNum << std::endl;" also fixed the ICE, so I figured the optimizer is getting things screwed up somewhere. > My VTK CMakeCache.txt says: "Module_vtkIOEnSight:INTERNAL=OFF". So I > guess that means that vtkIOEnSight is disabled by default. How can I > enable vtkIOEnSight, in order to reproduce the compiler error? :INTERNAL means that it'd be off if it were't requested by some other reader. It only occurs in Release mode. Check the output of configure to see if it is already enabled and what is dragging it in. Thanks, --Ben From bill.lorensen at gmail.com Tue Aug 4 13:35:00 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 4 Aug 2015 13:35:00 -0400 Subject: [vtkusers] Mapping nodal scalar values to graded color In-Reply-To: <1438704514871-5733254.post@n5.nabble.com> References: <1438636500160-5733238.post@n5.nabble.com> <1438704514871-5733254.post@n5.nabble.com> Message-ID: Not aMeshGrid.GetPointData().GetScalars(stress) but aMeshGrid.GetPointData().SetScalars(stress) On Tue, Aug 4, 2015 at 12:08 PM, roobaru wrote: > @Alex Thanks for the reply! > Doing "aMeshGrid.GetPointData().GetScalars(stress)" gives me an error > TypeError: GetScalars argument 1: string or None required > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Mapping-nodal-scalar-values-to-graded-color-tp5733238p5733254.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From chpradeep.ith at gmail.com Tue Aug 4 13:44:45 2015 From: chpradeep.ith at gmail.com (roobaru) Date: Tue, 4 Aug 2015 10:44:45 -0700 (MST) Subject: [vtkusers] Mapping nodal scalar values to graded color In-Reply-To: References: <1438636500160-5733238.post@n5.nabble.com> <1438704514871-5733254.post@n5.nabble.com> Message-ID: <1438710285536-5733259.post@n5.nabble.com> @Bill Thank you so much. That works. I really feel stupid for not noticing set->get. -- View this message in context: http://vtk.1045678.n5.nabble.com/Mapping-nodal-scalar-values-to-graded-color-tp5733238p5733259.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Aug 4 14:04:47 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 4 Aug 2015 14:04:47 -0400 Subject: [vtkusers] coloring PolyDataMappers in python In-Reply-To: References: Message-ID: Are you trying to color map a particular data array in the contour? On Mon, Aug 3, 2015 at 3:43 PM, Tudor Achim wrote: > Hi all, > I have a quick question about coloring vtkPolyMappers. I have the > following code: > > for cluster_ind in ...: > threshold = vtk.vtkImageThreshold() > threshold.SetInputConnection(importer.GetOutputPort()) > threshold.ThresholdBetween(cluster_ind-0.1, cluster_ind+0.1) > threshold.ReplaceInOn() > threshold.SetInValue(0) > threshold.ReplaceOutOn() > threshold.SetOutValue(1) > threshold.Update() > > dmc = vtk.vtkDiscreteMarchingCubes() > dmc.SetInputConnection(threshold.GetOutputPort()) > dmc.GenerateValues(1, 1, 1) > dmc.Update() > > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputConnection(dmc.GetOutputPort()) > > lut = vtk.vtkLookupTable() > lut.SetNumberOfTableValues(2) > lut.SetTableValue(0, 0, 0, 255) > lut.SetTableValue(1, *rgb_cluster_mapping[cluster_ind]) > lut.Build() > mapper.SetLookupTable(lut) > mapper.SetScalarModeToUseCellData() > > However, when I run it only one of the mappers is colored correctly; the > other one is just rendered as black. I can tell that it's rendered black > because when I spin around the clusters in my viewer I can see it > obstructing the other clusters. The intended colors are (0, 255, 0) and > (88, 86, 214) (that's what's in rgb_cluster_mapping for these clusters). > > Any ideas? > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sur.chiranjib at gmail.com Tue Aug 4 14:15:11 2015 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Tue, 4 Aug 2015 23:45:11 +0530 Subject: [vtkusers] some queries with vtkcellarrays In-Reply-To: References: Message-ID: Hi Sankhesh, I am still struggling with this. By any chance do you have a code snippets which can. The reason I want to create these cells because I want to use the *vtkSelectEnclosedPoints *class in my program by which I can mark points as to whether they are inside a closed surface. This is the reason I need to construct the closed surface out pof the vtk points I have created. Any help will be really helpful at this stage to me. Thanks, Chiranjib On Thu, Jul 23, 2015 at 12:06 AM, Chiranjib Sur wrote: > Sankhesh, > Thank you very much for your suggestion. Let me try it out. Amazon is > showing the VTK books which are last updated on 2010. With the new versions > of VTK, are you guys planning to have an updated version of the VTK books. > > I will write back after trying your suggestions. > > Thanks again, > Chiranjib > > On Wed, Jul 22, 2015 at 6:46 PM, Sankhesh Jhaveri < > sankhesh.jhaveri at kitware.com> wrote: > >> Chiranjib, >> >> The code segment adds 'count' number of cells with one point per cell. >> >> This example >> >> creates a set of lines () with a bunch of points. That should give you some >> idea about the data structures. >> >> Some basic concepts are explained here: >> http://www.vtk.org/Wiki/VTK/Tutorials >> >> Other than that, you can refer to the VTK User's guide >> >> or the VTK Textbook >> >> for more details. >> >> You could also look at the API documentation >> . >> >> >> >> Warm Regards, >> >> Sankhesh Jhaveri >> Research & Development Engineer >> Kitware, Inc. >> *Phone*: (518) 881 4417 >> *Fax*: (518) 371 4573 >> >> >> >> On Tue, Jul 21, 2015 at 1:24 PM, Chiranjib Sur >> wrote: >> >>> Hi Sankesh, >>> Thanks for the pointers. If I change this to the following >>> >>> >>> >>> for (vtkIdType i= 0; i < count; i++) >>> { >>> cell->InsertNextCell( i ); >>> cell->InsertCellPoint(i); >>> } >>> will this mean the same what you are suggesting? In that case how the >>> points are getting distributed ? I have been learning VTK by going through >>> the examples. Indeed they are useful. >>> >>> I would really appreciate, if you can point me towards some >>> "description" of VTK cells / normals /Tcoords etc that will be very helpful >>> to understand the underlying concepts easily. >>> >>> Thanks, >>> Chiranjib >>> >>> On Tue, Jul 21, 2015 at 8:27 PM, Sankhesh Jhaveri < >>> sankhesh.jhaveri at kitware.com> wrote: >>> >>>> Hi Chiranjib, >>>> >>>> Your code calls InsertNextCell once and adds all points to that cell >>>> using InsertCellPoint. Thats why you just end up with one cell. >>>> >>>> You can add more cells by calling InsertNextCell as many times as the >>>> number of cells you want. You will have to distribute the points in the >>>> resultant cells accordingly. >>>> >>>> Take a look at examples here: http://www.vtk.org/Wiki/VTK/Examples/Cxx >>>> >>>> >>>> >>>> Warm Regards, >>>> >>>> Sankhesh Jhaveri >>>> Research & Development Engineer >>>> Kitware, Inc. >>>> *Phone*: (518) 881 4417 >>>> *Fax*: (518) 371 4573 >>>> >>>> >>>> >>>> On Mon, Jul 20, 2015 at 5:48 AM, Chiranjib Sur >>> > wrote: >>>> >>>>> Hi VTK experts, >>>>> I am not an expert vtk programmers like many others in the forum. I >>>>> have a confusion. >>>>> >>>>> I am creating a set of vtk points (and eventually a vtkpolydata) and >>>>> want to create vtkcells for the associated points. I was looking at the >>>>> examples and trying to implement this way ( >>>>> http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/VisualizationAlgorithms/Cxx/TubesWithVaryingRadiusAndColors.cxx >>>>> ) >>>>> >>>>> What I am observing is that when I create vtkcells, I only create ONE >>>>> cell. What is going wrong here and why not all vtkcells are created? >>>>> >>>>> Any suggestions ? >>>>> >>>>> Thanks in advance, >>>>> Chiranjib >>>>> >>>>> Here is my code snippet >>>>> >>>>> >>>>> >>>>> // VTK points are defined here >>>>> >>>>> vtkSmartPointer newPoints = >>>>> vtkSmartPointer::New(); >>>>> >>>>> // Set precision for the vtk points >>>>> newPoints->SetDataType( VTK_DOUBLE ); >>>>> >>>>> unsigned int count = 0; >>>>> double resolution = 0.1; >>>>> >>>>> // Create the points for the entire volume >>>>> for (unsigned int j = 0; j<10; j++) >>>>> { >>>>> for (unsigned int i = 0; i<10; i++) >>>>> { >>>>> for (unsigned int k = 0; k<10; k++) >>>>> { >>>>> newPoints->InsertNextPoint( x0[0]+ resolution*i, x0[1]+ >>>>> resolution*j, x0[2]+ resolution*k ); >>>>> count++; >>>>> } >>>>> } >>>>> } >>>>> >>>>> std::cout << "length of mycube = " << xl << ","<>>>> std::endl; >>>>> std::cout << "Number of points = " << count << std::endl; >>>>> >>>>> >>>>> >>>>> // Insert vtk cell arrays >>>>> vtkSmartPointer cell = >>>>> vtkSmartPointer::New(); >>>>> >>>>> cell->InsertNextCell( count); >>>>> >>>>> for (vtkIdType i= 0; i < count; i++) >>>>> { >>>>> cell->InsertCellPoint(i); >>>>> } >>>>> >>>>> // Define the polydata for the cube >>>>> vtkSmartPointer np = >>>>> vtkSmartPointer::New(); >>>>> np->SetPoints( newPoints ); >>>>> np->SetLines( cell); >>>>> >>>>> std::cout << "Number of cells "<< np->GetNumberOfCells() << ":" << >>>>> count << std::endl; >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tachim at cs.stanford.edu Tue Aug 4 14:15:50 2015 From: tachim at cs.stanford.edu (Tudor Achim) Date: Tue, 4 Aug 2015 14:15:50 -0400 Subject: [vtkusers] coloring PolyDataMappers in python In-Reply-To: References: Message-ID: No, I'd like the entire mesh to be one color (and opacity). On Tue, Aug 4, 2015 at 2:04 PM, Cory Quammen wrote: > Are you trying to color map a particular data array in the contour? > > On Mon, Aug 3, 2015 at 3:43 PM, Tudor Achim > wrote: > >> Hi all, >> I have a quick question about coloring vtkPolyMappers. I have the >> following code: >> >> for cluster_ind in ...: >> threshold = vtk.vtkImageThreshold() >> threshold.SetInputConnection(importer.GetOutputPort()) >> threshold.ThresholdBetween(cluster_ind-0.1, cluster_ind+0.1) >> threshold.ReplaceInOn() >> threshold.SetInValue(0) >> threshold.ReplaceOutOn() >> threshold.SetOutValue(1) >> threshold.Update() >> >> dmc = vtk.vtkDiscreteMarchingCubes() >> dmc.SetInputConnection(threshold.GetOutputPort()) >> dmc.GenerateValues(1, 1, 1) >> dmc.Update() >> >> mapper = vtk.vtkPolyDataMapper() >> mapper.SetInputConnection(dmc.GetOutputPort()) >> >> lut = vtk.vtkLookupTable() >> lut.SetNumberOfTableValues(2) >> lut.SetTableValue(0, 0, 0, 255) >> lut.SetTableValue(1, *rgb_cluster_mapping[cluster_ind]) >> lut.Build() >> mapper.SetLookupTable(lut) >> mapper.SetScalarModeToUseCellData() >> >> However, when I run it only one of the mappers is colored correctly; the >> other one is just rendered as black. I can tell that it's rendered black >> because when I spin around the clusters in my viewer I can see it >> obstructing the other clusters. The intended colors are (0, 255, 0) and >> (88, 86, 214) (that's what's in rgb_cluster_mapping for these clusters). >> >> Any ideas? >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Aug 4 14:24:57 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 4 Aug 2015 14:24:57 -0400 Subject: [vtkusers] coloring PolyDataMappers in python In-Reply-To: References: Message-ID: In that case, you can leave out the vtkLookupTable altogether and set the color in your actor instead actor = vtk.vtkActor() actor.SetMapper(mapper) property = actor.GetProperty() property.SetColor(*rgb_cluster_mapping[cluster_ind]) HTH, Cory On Tue, Aug 4, 2015 at 2:15 PM, Tudor Achim wrote: > No, I'd like the entire mesh to be one color (and opacity). > > On Tue, Aug 4, 2015 at 2:04 PM, Cory Quammen > wrote: > >> Are you trying to color map a particular data array in the contour? >> >> On Mon, Aug 3, 2015 at 3:43 PM, Tudor Achim >> wrote: >> >>> Hi all, >>> I have a quick question about coloring vtkPolyMappers. I have the >>> following code: >>> >>> for cluster_ind in ...: >>> threshold = vtk.vtkImageThreshold() >>> threshold.SetInputConnection(importer.GetOutputPort()) >>> threshold.ThresholdBetween(cluster_ind-0.1, cluster_ind+0.1) >>> threshold.ReplaceInOn() >>> threshold.SetInValue(0) >>> threshold.ReplaceOutOn() >>> threshold.SetOutValue(1) >>> threshold.Update() >>> >>> dmc = vtk.vtkDiscreteMarchingCubes() >>> dmc.SetInputConnection(threshold.GetOutputPort()) >>> dmc.GenerateValues(1, 1, 1) >>> dmc.Update() >>> >>> mapper = vtk.vtkPolyDataMapper() >>> mapper.SetInputConnection(dmc.GetOutputPort()) >>> >>> lut = vtk.vtkLookupTable() >>> lut.SetNumberOfTableValues(2) >>> lut.SetTableValue(0, 0, 0, 255) >>> lut.SetTableValue(1, *rgb_cluster_mapping[cluster_ind]) >>> lut.Build() >>> mapper.SetLookupTable(lut) >>> mapper.SetScalarModeToUseCellData() >>> >>> However, when I run it only one of the mappers is colored correctly; the >>> other one is just rendered as black. I can tell that it's rendered black >>> because when I spin around the clusters in my viewer I can see it >>> obstructing the other clusters. The intended colors are (0, 255, 0) and >>> (88, 86, 214) (that's what's in rgb_cluster_mapping for these clusters). >>> >>> Any ideas? >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. >> > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 4 14:29:35 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 4 Aug 2015 12:29:35 -0600 Subject: [vtkusers] coloring PolyDataMappers in python In-Reply-To: References: Message-ID: Don't forget that use of SetColor() often requires this: mapper.ScalarVisibilityOff() SetColor() is ignored if scalars are present and visible. - David On Tue, Aug 4, 2015 at 12:24 PM, Cory Quammen wrote: > In that case, you can leave out the vtkLookupTable altogether and set the > color in your actor instead > > actor = vtk.vtkActor() > actor.SetMapper(mapper) > property = actor.GetProperty() > property.SetColor(*rgb_cluster_mapping[cluster_ind]) > > HTH, > Cory > > On Tue, Aug 4, 2015 at 2:15 PM, Tudor Achim > wrote: > >> No, I'd like the entire mesh to be one color (and opacity). >> >> On Tue, Aug 4, 2015 at 2:04 PM, Cory Quammen >> wrote: >> >>> Are you trying to color map a particular data array in the contour? >>> >>> On Mon, Aug 3, 2015 at 3:43 PM, Tudor Achim >>> wrote: >>> >>>> Hi all, >>>> I have a quick question about coloring vtkPolyMappers. I have the >>>> following code: >>>> >>>> for cluster_ind in ...: >>>> threshold = vtk.vtkImageThreshold() >>>> threshold.SetInputConnection(importer.GetOutputPort()) >>>> threshold.ThresholdBetween(cluster_ind-0.1, cluster_ind+0.1) >>>> threshold.ReplaceInOn() >>>> threshold.SetInValue(0) >>>> threshold.ReplaceOutOn() >>>> threshold.SetOutValue(1) >>>> threshold.Update() >>>> >>>> dmc = vtk.vtkDiscreteMarchingCubes() >>>> dmc.SetInputConnection(threshold.GetOutputPort()) >>>> dmc.GenerateValues(1, 1, 1) >>>> dmc.Update() >>>> >>>> mapper = vtk.vtkPolyDataMapper() >>>> mapper.SetInputConnection(dmc.GetOutputPort()) >>>> >>>> lut = vtk.vtkLookupTable() >>>> lut.SetNumberOfTableValues(2) >>>> lut.SetTableValue(0, 0, 0, 255) >>>> lut.SetTableValue(1, *rgb_cluster_mapping[cluster_ind]) >>>> lut.Build() >>>> mapper.SetLookupTable(lut) >>>> mapper.SetScalarModeToUseCellData() >>>> >>>> However, when I run it only one of the mappers is colored correctly; >>>> the other one is just rendered as black. I can tell that it's rendered >>>> black because when I spin around the clusters in my viewer I can see it >>>> obstructing the other clusters. The intended colors are (0, 255, 0) and >>>> (88, 86, 214) (that's what's in rgb_cluster_mapping for these clusters). >>>> >>>> Any ideas? >>>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim.geach at googlemail.com Tue Aug 4 15:30:33 2015 From: jim.geach at googlemail.com (James Geach) Date: Tue, 04 Aug 2015 12:30:33 -0700 Subject: [vtkusers] Saving images with greater than 8-bit depth In-Reply-To: References: <55C03A5D.9020808@gmail.com> Message-ID: <55C112D9.5080201@gmail.com> It's all four of them - so, basically I want to end up with a 16-bit (or higher) RGBA image (TIFF). Thanks, Jim On 04/08/2015 09:37, Aashish Chaudhary wrote: > Do you need save individual channels 16 bit or all four of them 16 bit? > > - Aashihs > > On Tue, Aug 4, 2015 at 12:06 AM, James Geach via vtkusers > > wrote: > > Hi all - > > I'm volume rendering using a fixed point volume mapper and a > scalar to color table with up to 65536 colours, rendering to a > virtual frame buffer (initialized with Xvfb and 16-bit depth). > > I'm using window to image filter and then the standard PNG and > TIFF image writers to save the frames, however these always seem > to save as images with 8-bit depth. > > Is there a straightforward method to write images using the full > colour depth of the frame buffer? > > Note - I am using VTK via python. > > Thanks in advance for any help. > > Jim > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > /| Aashish Chaudhary > | Technical Leader > | Kitware Inc. > / > /| http://www.kitware.com/company/team/chaudhary.html/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From gustav.lundin at saabgroup.com Wed Aug 5 05:37:04 2015 From: gustav.lundin at saabgroup.com (quadprob) Date: Wed, 5 Aug 2015 02:37:04 -0700 (MST) Subject: [vtkusers] Speed up cell allocation In-Reply-To: References: <1438352299291-5733208.post@n5.nabble.com> Message-ID: <1438767424438-5733267.post@n5.nabble.com> Thanks a lot! Figuring out how exactly to do this in Java took me a while but now the loading times for my biggest mesh has gone down from 2 minutes to 4 seconds. -- View this message in context: http://vtk.1045678.n5.nabble.com/Speed-up-cell-allocation-tp5733208p5733267.html Sent from the VTK - Users mailing list archive at Nabble.com. From mightos at gmail.com Wed Aug 5 06:08:41 2015 From: mightos at gmail.com (mightos) Date: Wed, 5 Aug 2015 03:08:41 -0700 (MST) Subject: [vtkusers] How to properly use quadratic cell types ? Message-ID: <1438769321372-5733268.post@n5.nabble.com> Hello, I am using VTK to do some visualization of 3D meshes. The cells in my model are* quadratric quads*. Until now, I've cheated by using *simple quads* and by skipping the mid-edge nodes. I now need to display quadratric quads instead. By simply changing the type and adding mid-edge nodes in my script I was able to make it work. However, the quadratic quads looks somewhat "folded" and new edges appeared inside. *Is there a way to get a simple curvature and remove these edges inside ?* Here is what I get. (Quadratic quad on the left, Simple quad on the right) Thank you in advance for your kind help :) -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-properly-use-quadratic-cell-types-tp5733268.html Sent from the VTK - Users mailing list archive at Nabble.com. From marco.dev.open at gmail.com Wed Aug 5 06:11:59 2015 From: marco.dev.open at gmail.com (Marco Dev) Date: Wed, 5 Aug 2015 14:41:59 +0430 Subject: [vtkusers] [ITK-dev] converting metaimage format to nrrd In-Reply-To: References: Message-ID: Thanks about your help . On Tue, Aug 4, 2015 at 6:51 PM, Matt McCormick wrote: > Hi Marco, > > This example may be useful: > > > http://itk.org/ITKExamples/src/IO/ImageBase/ConvertFileFormats/Documentation.html > > HTH, > Matt > > On Tue, Aug 4, 2015 at 8:04 AM, Marco Dev > wrote: > > Hi dears, > > Is way to convert metaimage (.mhd and .raw )format to .nrrd format ? > > Thanks in advance. > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Kitware offers ITK Training Courses, for more information visit: > > http://kitware.com/products/protraining.php > > > > Please keep messages on-topic and check the ITK FAQ at: > > http://www.itk.org/Wiki/ITK_FAQ > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/insight-developers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From quentan at gmail.com Wed Aug 5 08:45:40 2015 From: quentan at gmail.com (Quentan Qi) Date: Wed, 5 Aug 2015 13:45:40 +0100 Subject: [vtkusers] Complex reslicing of vtkImagePlaneWidget Message-ID: <7FE3A933-AE01-4A5B-BA8F-9AC218E6D4D4@gmail.com> Hi there, I am now using vtkImagePlaneWidget to get some reslicing work, but failed to activate the complex reslicing capabilities with this test , which is described in its explanation . However, this example does the complex reslicing with right mouse dragging, and it is very shame that I did not find how to use it. Anybody knows how to manually control these behaviours? Cheers, Quentan -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Wed Aug 5 10:36:49 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 5 Aug 2015 10:36:49 -0400 Subject: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04) In-Reply-To: References: Message-ID: Manjunath, I get a range rather than NaN when I run it on my machine with the latest VTK from git master. Range of SAL: 28.04-36.88 I do have error complaining about missing sliceOn.jpg and sliceOff.jpg. Could you try your example on the latest VTK master (your have to build it) http://www.vtk.org/Wiki/VTK/Configure_and_Build or on VTK 6.3 rc1? http://www.vtk.org/download/ I am not sure what your other python error is, maybe related to http://stackoverflow.com/questions/15608236/eclipse-and-google-app-engine-importerror-no-module-named-sysconfigdata-nd-u On Wed, Aug 5, 2015 at 9:41 AM, Manjunath K E wrote: > Hi Dan Lipsa, > > Please find the required file "3d.nc" and the python code is attached > in "datareader.py1". > > The problem is that the *a,b = reader.GetOutput().* > *GetPointData().GetScalars().**GetRange() *is returning NaN value. > > one more thing I found was, when I start *"vtkpython**"* by keeping *"* > */usr/lib/python2.7**" *in *"PYTHONPATH**" *then following error will be > obtained. If I remove *"**/usr/lib/python2.7" *from *"PYTHONPATH**"*, I > wont get any error. > > export > PYTHONPATH=/usr/lib/python2.7:/usr/local/lib/python2.7/site-packages:$PYTHONPATH > > manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ > vtkpython > vtk version 6.2.0 > Traceback (most recent call last): > File "/usr/lib/python2.7/site.py", line 563, in > main() > File "/usr/lib/python2.7/site.py", line 545, in main > known_paths = addusersitepackages(known_paths) > File "/usr/lib/python2.7/site.py", line 272, in addusersitepackages > user_site = getusersitepackages() > File "/usr/lib/python2.7/site.py", line 247, in getusersitepackages > user_base = getuserbase() # this will also set USER_BASE > File "/usr/lib/python2.7/site.py", line 237, in getuserbase > USER_BASE = get_config_var('userbase') > File "/usr/lib/python2.7/sysconfig.py", line 578, in get_config_var > return get_config_vars().get(name) > File "/usr/lib/python2.7/sysconfig.py", line 524, in get_config_vars > _init_posix(_CONFIG_VARS) > File "/usr/lib/python2.7/sysconfig.py", line 408, in _init_posix > from _sysconfigdata import build_time_vars > File "/usr/lib/python2.7/_sysconfigdata.py", line 6, in > from _sysconfigdata_nd import * > ImportError: No module named _sysconfigdata_nd > > > Thanks and Regards, > > Manjunath K E > Help Ever Hurt Never > > > On Tue, Aug 4, 2015 at 10:15 PM, Dan Lipsa wrote: > >> It would be great if you could share your data as well so that I can >> check it with my installation. Thanks, >> Dan >> >> >> On Tue, Aug 4, 2015 at 11:31 AM Manjunath K E >> wrote: >> >>> Hi Dan Lipsa, >>> >>> Thanks for the reply. The error is occurring during runtime. There was >>> no error, when i ran it in interpreter. All the lines in the script >>> executed smoothly. >>> I have tested the same code using vtk 6.0.0 there was no error. >>> >>> Also, the output that i get is not proper. There is problem in the color >>> map of the output produced. The scale bar is not displayed properly. >>> ========================================== >>> #!/usr/bin/env python >>> from vtk import * >>> >>> reader = vtkNetCDFCFReader() >>> reader.SetFileName("3d.nc") >>> reader.SphericalCoordinatesOff() >>> reader.SetOutputType(6) >>> reader.SetReplaceFillValueWithNan(1) >>> reader.Update() >>> #Copy SAL Array to scalar value field of point data ..this makes point >>> data to point to SAL array >>> >>> reader.GetOutput().GetPointData().SetScalars(reader.GetOutput().GetPointData().GetArray("SAL")) >>> reader.UpdateMetaData() >>> reader.Update() >>> reader.UpdateInformation() >>> output = reader.GetOutput() >>> >>> a,b = reader.GetOutput().GetPointData().GetScalars().GetRange() >>> lut = vtk.vtkColorTransferFunction() >>> lut.AddRGBPoint(a, 0.0, 0.0, 0.8) >>> lut.AddRGBPoint(a+(b-a)/4, 0.0, 0.5, 0.5) >>> lut.AddRGBPoint(a+(b-a)/2, 0.0, 1.0, 0.0) >>> lut.AddRGBPoint(b-(b-a)/4, 0.5, 0.5, 0.0) >>> lut.AddRGBPoint(b, 1.0, 0.0, 0.0) >>> lut.SetNanColor(0,0,1) >>> >>> # the mapper that will use the lookup table >>> mapper = vtkDataSetMapper() >>> mapper.SetInputData(reader.GetOutput()) >>> mapper.SetScalarModeToUsePointData() >>> mapper.SetLookupTable(lut) >>> mapper.SetScalarRange(a,b) >>> # the actor >>> gridActor = vtkActor() >>> gridActor.SetMapper( mapper ) >>> scaleBarActor = vtkScalarBarActor() >>> scaleBarActor.SetLookupTable( mapper.GetLookupTable() ) >>> scaleBarActor.SetTitle("Color Map for Point Data") >>> scaleBarActor.SetOrientationToHorizontal() >>> scaleBarActor.GetLabelTextProperty().SetColor(0,0,1) >>> scaleBarActor.GetTitleTextProperty().SetColor(0,0,1) >>> >>> # position it in window >>> coord = scaleBarActor.GetPositionCoordinate() >>> coord.SetCoordinateSystemToNormalizedViewport() >>> coord.SetValue(0.1,0.05) >>> scaleBarActor.SetWidth(.5) >>> scaleBarActor.SetHeight(.1) >>> >>> # renderer and render window >>> renderer = vtkRenderer() >>> renderer.SetBackground(1, 1, 1) >>> renderer.SetGradientBackground(1) # Set background to white >>> renWindow = vtk.vtkRenderWindow() >>> renWindow.SetSize(512, 512) >>> renWindow.AddRenderer( renderer ) >>> >>> # render window interactor >>> renWinInteractor = vtkRenderWindowInteractor() >>> renWinInteractor.SetRenderWindow( renWindow ) >>> # add the actors to the renderer >>> renderer.AddActor( gridActor ) >>> renderer.AddActor( scaleBarActor ) >>> >>> #show axes >>> axesActor = vtkAxesActor() >>> widget = vtkOrientationMarkerWidget() >>> widget.SetOrientationMarker( axesActor ) >>> widget.SetInteractor( renWinInteractor ) >>> widget.SetViewport( 0.0, 0.0, 0.4, 0.4 ) >>> widget.SetEnabled( 1 ) >>> widget.InteractiveOff() >>> >>> # render >>> renderer.ResetCamera(); >>> renWindow.Render() >>> # initialize and start the interactor >>> renWinInteractor.Initialize() >>> renWinInteractor.Start() >>> ================================================== >>> >>> >>> Thanks and Regards, >>> >>> Manjunath K E >>> Help Ever Hurt Never >>> >>> >>> On Tue, Aug 4, 2015 at 12:31 AM, Dan Lipsa >>> wrote: >>> >>>> Manjunath, >>>> Can you share the script you are trying to run? This seems like a >>>> problem with the script rather than an installation issue. >>>> >>>> On Mon, Aug 3, 2015 at 2:16 PM Manjunath K E >>>> wrote: >>>> >>>>> Hi Shawn, >>>>> >>>>> I followed your instructions, now the vtk importing problem is solved. >>>>> But, following error is obtained >>>>> >>>>> ERROR: In >>>>> /home/kitware/Desktop/vtkbuild/build/vtk/src/vtk/Rendering/OpenGL/vtkOpenGLTexture.cxx, >>>>> line 200 >>>>> vtkOpenGLTexture (0x2f2ac90): No scalar values found for texture input! >>>>> >>>>> The error is seen for every frame >>>>> >>>>> Thanks and Regards, >>>>> >>>>> Manjunath K E >>>>> Help Ever Hurt Never >>>>> >>>>> >>>>> On Mon, Aug 3, 2015 at 11:36 PM, Shawn Waldon < >>>>> shawn.waldon at kitware.com> wrote: >>>>> >>>>>> Hi Manjunath, >>>>>> >>>>>> Please keep discussions on the list so that others can benefit later. >>>>>> >>>>>> I haven't used an install tree on Linux for a while but according to >>>>>> my notes you should need the following assuming it is installed to >>>>>> /usr/local: >>>>>> >>>>>> export >>>>>> LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_PATH >>>>>> >>>>>> export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH >>>>>> >>>>>> HTH, >>>>>> Shawn >>>>>> >>>>>> On Mon, Aug 3, 2015 at 1:59 PM, Manjunath K E >>>>> > wrote: >>>>>> >>>>>>> Hi Shawn >>>>>>> >>>>>>> Thanks for the reply. >>>>>>> My python script is set up to use the system's python not vtkpython. >>>>>>> >>>>>>> I have set export >>>>>>> PYTHONPATH="/usr/local/lib/python2.7/site-packages/vtk/:$PYTHONPATH". >>>>>>> export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH >>>>>>> >>>>>>> I have installed vtk-6.2 to /usr/local. >>>>>>> >>>>>>> Is the should i change the values of PYTHONPATH and LD_LIBRARY_PATH >>>>>>> to something else. >>>>>>> >>>>>>> Thanks and Regards, >>>>>>> >>>>>>> Manjunath K E >>>>>>> Help Ever Hurt Never >>>>>>> >>>>>>> >>>>>>> On Mon, Aug 3, 2015 at 11:17 PM, Shawn Waldon < >>>>>>> shawn.waldon at kitware.com> wrote: >>>>>>> >>>>>>>> Hi Manjunath, >>>>>>>> >>>>>>>> Is your python script set up to use vtkpython as the interpreter? >>>>>>>> Or is it using the system's python? If you are trying to import vtk from >>>>>>>> system python you have to set your LD_LIBRARY_PATH and PYTHONPATH >>>>>>>> environment variables. If you want to change the script to use vtkpython >>>>>>>> then change the first like to #!/path/to/vtkpython >>>>>>>> >>>>>>>> HTH, >>>>>>>> Shawn >>>>>>>> >>>>>>>> On Mon, Aug 3, 2015 at 1:43 PM, Manjunath K E < >>>>>>>> ke.manjunath at gmail.com> wrote: >>>>>>>> >>>>>>>>> Hi all >>>>>>>>> >>>>>>>>> I have installed VTK 6.2 along with vtk 6.2 python interface on >>>>>>>>> ubuntu 14.04 manually. >>>>>>>>> >>>>>>>>> When I run vtkpython in interpreter mode, the import of vtk is >>>>>>>>> successful. >>>>>>>>> It doesn't have any problem and the same is shown below. >>>>>>>>> >>>>>>>>> =========================================================== >>>>>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>>>>> vtkpython >>>>>>>>> vtk version 6.2.0 >>>>>>>>> Python 2.7.2 (default, Feb 12 2015, 18:30:44) >>>>>>>>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>>>>>>>> Type "help", "copyright", "credits" or "license" for more >>>>>>>>> information. >>>>>>>>> >>> from vtk import * >>>>>>>>> >>> print vtk >>>>>>>>> >>>>>>>> '/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'> >>>>>>>>> >>> >>>>>>>>> =========================================================== >>>>>>>>> >>>>>>>>> But, If i run a python script then an error is obtained for this >>>>>>>>> line "from vtk import *". The error is as shown below. >>>>>>>>> =========================================================== >>>>>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>>>>> ./demo1.py >>>>>>>>> Traceback (most recent call last): >>>>>>>>> File "./demo1.py", line 6, in >>>>>>>>> from vtk import * >>>>>>>>> ImportError: No module named vtk >>>>>>>>> =========================================================== >>>>>>>>> >>>>>>>>> Please help me in solving this issue. I appreciate your time and >>>>>>>>> help. >>>>>>>>> >>>>>>>>> Thanks and Regards, >>>>>>>>> >>>>>>>>> Manjunath K E >>>>>>>>> Help Ever Hurt Never >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.khojaste at sunnybrook.ca Wed Aug 5 11:58:46 2015 From: amir.khojaste at sunnybrook.ca (Khojaste, Amir) Date: Wed, 5 Aug 2015 15:58:46 +0000 Subject: [vtkusers] Can't see Module_vtkGUISupportQtOpenGL in Cmake Message-ID: <639C0C4CF854594E920361562A5266BB696E02C8@SBXNG01.sw.ca> Hey folks, I am trying to integrate Qt with VTK. It seems that when configuring in CMake, I should be able to see the module "Module_vtkGUISupportQtOpenGL". I can't see this module though. I have QT5OpenGL libraries installed. I am using the following: * Cmake 2.8.12 * VTK 6.2.0 * Visual Studio 2013 Professional Version * Debug Mode * X32 * Qt5 Any clue? Thanks, Amir This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.khojaste at sunnybrook.ca Wed Aug 5 11:41:32 2015 From: amir.khojaste at sunnybrook.ca (Khojaste, Amir) Date: Wed, 5 Aug 2015 15:41:32 +0000 Subject: [vtkusers] Can't see Module_vtkGUISupportQtOpenGL in Cmake Message-ID: <639C0C4CF854594E920361562A5266BB696E02BA@SBXNG01.sw.ca> Hey folks, I am trying to integrate Qt with VTK. It seems that when configuring in CMake, I should be able to see the module "Module_vtkGUISupportQtOpenGL". I can't see this module though. I have QT5OpenGL libraries installed. I am using the following: * Cmake 2.8.12 * VTK 6.2.0 * Visual Studio 2013 Professional Version * Debug Mode * X32 * Qt5 Any clue? Thanks, Amir This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.welch at gmail.com Wed Aug 5 12:51:12 2015 From: david.m.welch at gmail.com (David Welch) Date: Wed, 05 Aug 2015 11:51:12 -0500 Subject: [vtkusers] [ITK-dev] converting metaimage format to nrrd In-Reply-To: References: Message-ID: These pages are also a lot of help: http://www.cmake.org/Wiki/Getting_Started_with_the_NRRD_Format http://teem.sourceforge.net/nrrd/format.html Cheers, Dave From: Marco Dev Date: Wednesday, August 5, 2015 at 5:11 AM To: Matt McCormick Cc: "vtkusers at vtk.org", ITK Subject: Re: [ITK-dev] converting metaimage format to nrrd Thanks about your help . On Tue, Aug 4, 2015 at 6:51 PM, Matt McCormick wrote: Hi Marco, This example may be useful: http://itk.org/ITKExamples/src/IO/ImageBase/ConvertFileFormats/Documentation.html HTH, Matt On Tue, Aug 4, 2015 at 8:04 AM, Marco Dev wrote: > Hi dears, > Is way to convert metaimage (.mhd and .raw )format to .nrrd format ? > Thanks in advance. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/insight-developers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From niels_dekker_address_until_2018 at xs4all.nl Wed Aug 5 13:12:37 2015 From: niels_dekker_address_until_2018 at xs4all.nl (Niels Dekker - address until 2018) Date: Wed, 05 Aug 2015 19:12:37 +0200 Subject: [vtkusers] Will VTK 6.3 support Visual Studio 2015? In-Reply-To: <20150804165831.GA14325@megas.kitware.com> References: <55C0AEB3.7090209@xs4all.nl> <20150804144723.GA24906@megas.kitware.com> <55C0E07A.2090406@xs4all.nl> <20150804165831.GA14325@megas.kitware.com> Message-ID: <55C24405.9030205@xs4all.nl> Thanks, Ben! I reproduced your internal compiler error! Moreover, I still had the ICE after removing the VTK library dependencies and reducing the code to just the following few lines: ////////////////////////////////////////////////// // Test.cxx // Originally based upon IO\EnSight\vtkEnSightReader.cxx, // but without #include's, and without any library dependency. struct vtkIdList // Simplified version. { int GetId(const int i) { return this->Ids[i]; }; int *Ids; }; void ReadVectorsPerElement(int); void ReadVariableFiles(vtkIdList* numStepsList) { int timeStepInFile = 0; int numSteps = 1; for (int j = 1; j < 13; j++) { numSteps += numStepsList->GetId(j); if (numSteps > 0) { timeStepInFile -= numStepsList->GetId(j); } } ReadVectorsPerElement(timeStepInFile); } ////////////////////////////////////////////////// Command-line output: G:\>cl Test.cxx /O2 Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23026 for x86 Copyright (C) Microsoft Corporation. All rights reserved. Test.cxx g:\test.cxx(16) : fatal error C1001: An internal error has occurred in the compiler. (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246) To work around this problem, try simplifying or changing the program near the locations listed above. Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe' Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information I'm considering to report this to Microsoft, or did you do so already? https://connect.microsoft.com/VisualStudio Kind regards, Niels On 2015-08-04 18:58, Ben Boeckel wrote: > On Tue, Aug 04, 2015 at 17:55:38 +0200, Niels Dekker - address until 2018 wrote: >> Thanks for your reply! Can you please be more specific on how to >> reproduce the internal compiler error in MSVC2015? Do I understand >> correctly that it occurs when building a source file from IO/EnSight? >> If so, which particular source file triggers the internal compiler error? > > Oh, I already fixed it: > > https://gitlab.kitware.com/ben.boeckel/vtk/commit/385e0e76931272f2402727412d100b1d35a5d0c4 > > If you would like to figure out a better reason *why* this fixes it, I'd > be grateful :) . Basically, if either of the statements in the if () > block were there, it ICE'd and if both were commented out, it was fine. > Adding a "std::cerr << fileNum << std::endl;" also fixed the ICE, so I > figured the optimizer is getting things screwed up somewhere. > >> My VTK CMakeCache.txt says: "Module_vtkIOEnSight:INTERNAL=OFF". So I >> guess that means that vtkIOEnSight is disabled by default. How can I >> enable vtkIOEnSight, in order to reproduce the compiler error? > > :INTERNAL means that it'd be off if it were't requested by some other > reader. It only occurs in Release mode. Check the output of configure to > see if it is already enabled and what is dragging it in. > > Thanks, > > --Ben From ben.boeckel at kitware.com Wed Aug 5 13:16:15 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 5 Aug 2015 13:16:15 -0400 Subject: [vtkusers] Can't see Module_vtkGUISupportQtOpenGL in Cmake In-Reply-To: <639C0C4CF854594E920361562A5266BB696E02C8@SBXNG01.sw.ca> References: <639C0C4CF854594E920361562A5266BB696E02C8@SBXNG01.sw.ca> Message-ID: <20150805171615.GB7820@megas.kitware.com> On Wed, Aug 05, 2015 at 15:58:46 +0000, Khojaste, Amir wrote: > I am trying to integrate Qt with VTK. It seems that when configuring > in CMake, I should be able to see the module > "Module_vtkGUISupportQtOpenGL". I can't see this module though. I have > QT5OpenGL libraries installed. I am using the following: If the module is turned on by some other mechanism (e.g., required by another module or the group it is in is turned on), the variable is hidden and assumed to be "ON". If you open the CMakeCache.txt file, you should see it with the "INTERNAL" type and the user-specified value if it were not turned on. It should also be mentioned in the output when CMake is running if it is enabled (and the modules/groups requiring it). > * Cmake 2.8.12 > > * VTK 6.2.0 You need to use the OpenGL1 backend for this module to work in 6.2.0. In 6.3.0, it should also work with OpenGL2. > * Visual Studio 2013 Professional Version > > * Debug Mode > > * X32 > > * Qt5 FYI, Qt5 has a bug[1] which makes interaction with QVTKWidget2?erratic. All mouse events are delivered and the lag when reacting to mouse events makes interactions appear to last ~1.5x to 2x longer than the actual physical interaction. --Ben [1]https://codereview.qt-project.org/#/c/115531/ From ben.boeckel at kitware.com Wed Aug 5 13:49:36 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 5 Aug 2015 13:49:36 -0400 Subject: [vtkusers] Will VTK 6.3 support Visual Studio 2015? In-Reply-To: <55C24405.9030205@xs4all.nl> References: <55C0AEB3.7090209@xs4all.nl> <20150804144723.GA24906@megas.kitware.com> <55C0E07A.2090406@xs4all.nl> <20150804165831.GA14325@megas.kitware.com> <55C24405.9030205@xs4all.nl> Message-ID: <20150805174936.GA6989@megas.kitware.com> On Wed, Aug 05, 2015 at 19:12:37 +0200, Niels Dekker - address until 2018 wrote: > Thanks, Ben! I reproduced your internal compiler error! Moreover, I > still had the ICE after removing the VTK library dependencies and > reducing the code to just the following few lines: Cool, it isn't just me or my machine :) . Awesome! > I'm considering to report this to Microsoft, or did you do so already? > https://connect.microsoft.com/VisualStudio I have not since I never stripped it to a SSCCE. Feel free to file a bug and report back here. Robert (CC'd) is usually our compiler bug guy :) . --Ben [1]http://www.sscce.org/ From sean at rogue-research.com Wed Aug 5 14:04:05 2015 From: sean at rogue-research.com (Sean McBride) Date: Wed, 5 Aug 2015 14:04:05 -0400 Subject: [vtkusers] Will VTK 6.3 support Visual Studio 2015? In-Reply-To: <20150805174936.GA6989@megas.kitware.com> References: <55C0AEB3.7090209@xs4all.nl> <20150804144723.GA24906@megas.kitware.com> <55C0E07A.2090406@xs4all.nl> <20150804165831.GA14325@megas.kitware.com> <55C24405.9030205@xs4all.nl> <20150805174936.GA6989@megas.kitware.com> Message-ID: <20150805180405.19699595@mail.rogue-research.com> On Wed, 5 Aug 2015 13:49:36 -0400, Ben Boeckel said: >On Wed, Aug 05, 2015 at 19:12:37 +0200, Niels Dekker - address until >2018 wrote: >> Thanks, Ben! I reproduced your internal compiler error! Moreover, I >> still had the ICE after removing the VTK library dependencies and >> reducing the code to just the following few lines: > >Cool, it isn't just me or my machine :) . > > > >Awesome! If you want to squeeze it even further, you might try C-Reduce: Note sure if it supports Windows though... >> I'm considering to report this to Microsoft, or did you do so already? >> https://connect.microsoft.com/VisualStudio > >I have not since I never stripped it to a SSCCE. Feel free to file a bug >and report back here. Robert (CC'd) is usually our compiler bug guy :) . PS: I think you forgot to cc him... Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From will.schroeder at kitware.com Wed Aug 5 15:33:27 2015 From: will.schroeder at kitware.com (Will Schroeder) Date: Wed, 5 Aug 2015 15:33:27 -0400 Subject: [vtkusers] VTK Roadmap In-Reply-To: References: Message-ID: Berk let's not forget to add in interaction; e.g. multi-touch and more advanced interaction techniques. There are also related topics such as the impact on widgets, and potential changes to events/event processing There are also some community support infrastructure, along the lines that Bill is currently working on (remote modules) and other ways to contribute and test code. W On Tue, Jun 30, 2015 at 1:58 PM, Berk Geveci wrote: > Hi folks, > > As Dave DeMarle mentioned, we are gearing towards a VTK 6.3 release. VTK 7 > will follow very shortly (in weeks). I'd like to shed some light here on > our thinking and how we are planning to move forward. > > As was previously discussed in the VTK developers list [1] [2], we are > considering maintaining VTK 6.x for a long time (3-5 years) while moving > forward with VTK 7 and 8 in 2015 and 2016. There are some major changes > happening in the computing and C++ worlds and we would like evolve VTK more > quickly to stay up to date. Some of the major changes that we are > considering and/or working on are: > > * Major refactoring of rendering (OpenGL as well as ray tracing etc.) > * Multi/many-core support / SMP computing on CPUs and accelerators. VTK-m > integration [3]. > * Changes to data model to support zero copy interface to other data > layouts, more efficient APIs, more cell types, more dataset types etc. > * Better separation of a public, wrapped API and toolkit/C++ internal API > mainly to support efficiency > * Introduction of C++ 11 features > > Much of this will require introducing changes that break backwards > compatibility and also require newer compilers, graphics cards / drivers > etc. So the idea is that we will do our best to support as much as possible > a broad set of architectures and backwards compatibility but break things > when necessary in VTK 7 and beyond. We will maintain VTK 6.x so that folks > that are stuck on legacy systems or code bases can continue to benefit from > bug fixes. We have a way of continuing to maintain a broad set of > dashboards and also the same review process as VTK master so that we can > continue to ensure the quality of VTK 6.x as well as new releases. > > What do you guys think? Please provide feedback so that we can adjust our > plans to meet the needs of the community as much as possible. > > Best, > -berk > > [1] : http://bit.ly/1BUHFKT > [2] : http://bit.ly/1g7LSRG > [3] : http://m.vtk.org/ > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- William J. Schroeder, PhD Kitware, Inc. 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From niels_dekker_address_until_2018 at xs4all.nl Wed Aug 5 17:25:06 2015 From: niels_dekker_address_until_2018 at xs4all.nl (Niels Dekker - address until 2018) Date: Wed, 5 Aug 2015 23:25:06 +0200 Subject: [vtkusers] Will VTK 6.3 support Visual Studio 2015? In-Reply-To: <20150805180405.19699595@mail.rogue-research.com> References: <55C0AEB3.7090209@xs4all.nl> <20150804144723.GA24906@megas.kitware.com> <55C0E07A.2090406@xs4all.nl> <20150804165831.GA14325@megas.kitware.com> <55C24405.9030205@xs4all.nl> <20150805174936.GA6989@megas.kitware.com> <20150805180405.19699595@mail.rogue-research.com> Message-ID: <55C27F32.5000006@xs4all.nl> Thanks for your feedback, Ben, I'm glad you like my "SSCCE" -- Short, Self Contained, Correct Example. On 05 Aug 2015 8:04 PM, Sean McBride wrote: > If you want to squeeze it even further, you might try C-Reduce: > Thanks for the suggestion, Sean, I haven't tried it yet, but please let me know if you can significantly simplify the example code , while "preserving" the internal compiler error. The example code triggers an internal compiler error on both 32-bits and 64-bits optimized ("/O2") compilations. However, it appears to me that this compiler optimization bug does not (!) appear when Whole Program Optimization ("/GL") is switched on. Which sounds like a good idea anyway: https://msdn.microsoft.com/en-us/library/0zza0de8.aspx Ben, can you try out "/GL" on your VTK Release build, to see if that solves the problem for you as well? Note that you can also try out the example from http://public.kitware.com/pipermail/vtkusers/2015-August/091761.html at Microsoft's online compiler, by adding "/O2" to the Additional compiler flags: http://webcompiler.cloudapp.net/ It tells me (Compiler version: 19.00.23106.0(x86)): Compiled with /O2 /EHsc /nologo /W4 /c main.cpp e:\sitesroot\0\input\69b1f34e-a4da-4593-9fdf-66090596a884\main.cpp(21) : fatal error C1001: An internal error has occurred in the compiler. (compiler file 's:\dd\feature\wcfb01\src\vctools\compiler\utc\src\p2\main.c', line 246) To work around this problem, try simplifying or changing the program near the locations listed above. Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information c2!VECT_GenOpIntrinsic()+0x3c s:\dd\feature\wcfb01\src\vctools\compiler\utc\src\p2\vect_cg.cpp Line 107 ... c2!WorkerThreadMain()+0x11b s:\dd\feature\wcfb01\src\vctools\compiler\utc\src\p2\main.c Line 5039 INTERNAL COMPILER ERROR in 'c:\tools_root\cl\bin\i386\cl.exe' Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Kind regards, Niels From tr_jun-jiang.ee at vitrox.com Wed Aug 5 20:37:13 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Wed, 5 Aug 2015 17:37:13 -0700 (MST) Subject: [vtkusers] VtkRenderWindowInteractor doesn't start and cause program freezes [java] In-Reply-To: <1438669845578-5733242.post@n5.nabble.com> References: <1438669845578-5733242.post@n5.nabble.com> Message-ID: <1438821433801-5733293.post@n5.nabble.com> Use vtkCanvas instead of vtkPanel. I doubt that not one have experienced similar case. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/VtkRenderWindowInteractor-doesn-t-start-and-cause-program-freezes-java-tp5733242p5733293.html Sent from the VTK - Users mailing list archive at Nabble.com. From tr_jun-jiang.ee at vitrox.com Wed Aug 5 20:41:36 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Wed, 5 Aug 2015 17:41:36 -0700 (MST) Subject: [vtkusers] converting vtkCallBackCommand into java In-Reply-To: References: <1436239695444-5732734.post@n5.nabble.com> Message-ID: <1438821696853-5733294.post@n5.nabble.com> Hi David I know it's late but I wanna say thank you. That works ! :D -- View this message in context: http://vtk.1045678.n5.nabble.com/converting-vtkCallBackCommand-into-java-tp5732734p5733294.html Sent from the VTK - Users mailing list archive at Nabble.com. From sebastien.jourdain at kitware.com Wed Aug 5 21:08:15 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 5 Aug 2015 19:08:15 -0600 Subject: [vtkusers] VtkRenderWindowInteractor doesn't start and cause program freezes [java] In-Reply-To: <1438821433801-5733293.post@n5.nabble.com> References: <1438669845578-5733242.post@n5.nabble.com> <1438821433801-5733293.post@n5.nabble.com> Message-ID: Yes the vtkCanvas has the interactor initialized hence you should use the one that has been build by the vtkCanvas. vtkPanel drive the camera using Java mouse handling hence your issue. Sorry just saw your message just now. Seb On Wed, Aug 5, 2015 at 6:37 PM, James Potota wrote: > Use vtkCanvas instead of vtkPanel. I doubt that not one have experienced > similar case. Thanks. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/VtkRenderWindowInteractor-doesn-t-start-and-cause-program-freezes-java-tp5733242p5733293.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tr_jun-jiang.ee at vitrox.com Wed Aug 5 21:21:35 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Wed, 5 Aug 2015 18:21:35 -0700 (MST) Subject: [vtkusers] VtkRenderWindowInteractor doesn't start and cause program freezes [java] In-Reply-To: References: <1438669845578-5733242.post@n5.nabble.com> <1438821433801-5733293.post@n5.nabble.com> Message-ID: <1438824095533-5733298.post@n5.nabble.com> No problem Sebastien. Thank you so much. -- View this message in context: http://vtk.1045678.n5.nabble.com/VtkRenderWindowInteractor-doesn-t-start-and-cause-program-freezes-java-tp5733242p5733298.html Sent from the VTK - Users mailing list archive at Nabble.com. From totte at dunescientific.com Wed Aug 5 20:54:29 2015 From: totte at dunescientific.com (Totte Karlsson) Date: Wed, 5 Aug 2015 17:54:29 -0700 Subject: [vtkusers] Using a boxwidgets transform to rotate a non-vtk 3D model? Message-ID: <55C2B045.1080706@dunescientific.com> Hello, I'm using vtk to visualize 3D models of molecules. The actual molecular model is decoupled from vtk code, and visualization is implemented using a model-view kind of design. Currently I have the following challenge. If a user wants to manipulate the absolute orientation of the molecule, it is done by manipulating the underlying model using rotation functions, like RotateX, RotateY, RotateAboutVector, and translation functions TranslateX, Y etc. For now 3D rotations are simply done using two scrollbars, one horizontal and one vertical, causing the underlying model being rotated about the vtk viewUP vector and the vtk cameraPlane normal respectively. This works fine, but is not so intuitive for the user. Instead I believe allowing interaction with something like a box widget that encapsulates the molecule view, (with disabled handles), would be better. The challenge is how to figure out how to capture the boxwidgets orientation in a callback, and using this information in order to manipulate the underlying molecular model. For example, a boxwidget callback (from boxwidget example at http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget): class vtkMyCallback : public vtkCommand { public: static vtkMyCallback *New() { return new vtkMyCallback; } virtual void Execute(vtkObject *caller, unsigned long, void*) { vtkSmartPointer t = vtkSmartPointer::New(); vtkBoxWidget *widget = reinterpret_cast(caller); widget->GetTransform(t); double* angles?? = t->GetOrientation(); if(aMoleculeModel) { //Use some secret(!) code to manipulate orientation of a molecule to 'rotate' it together with the boxWidget aMoleculeModel->RotateZ(??); aMoleculeModel->RotateY(??); aMoleculeModel->RotateZ(??); } } Molecule* aMoleculeModel; Anyone seeing how to do this or have some pointers? Cheers, tk From Nigel.Mcfarlane at beds.ac.uk Thu Aug 6 09:04:56 2015 From: Nigel.Mcfarlane at beds.ac.uk (Nigel Mcfarlane) Date: Thu, 6 Aug 2015 13:04:56 +0000 Subject: [vtkusers] vtkAppendPolydata - wrong extents on multiple inputs Message-ID: Dear vtkusers, I am creating a visual pipe in vtk 6.2.0 and I am having problems connecting vtkAppendPolyData to multiple inputs which start from images of different dimensions. The visual pipe converts a set of input images into isosurfaces, adds scalars for colour and transparency, then merges them into one polydata mesh so they can be depth sorted before rendering. Its structure looks like this: // // image1 image2 image3 // | | | // DMCubes1 DMCubes2 DMCubes3 // | | | // AddScalars1 AddScalars2 AddScalars3 // \ | / // \ | / // \ | / // vtkAppendPolyData // | // vtkDepthSortPolyData // | // Mapper/Actor // | // Renderer // The images are produced by vtkMetaImageReader, the "DMCubes" filters are vtkDiscreteMarchingCubes, and the"AddScalars" filters are my own code. The problem is that this produces an image in which the dimensions/extents of two of the images have clearly been set incorrectly. I don't know much about the way the vtk pipeline works, but I suppose that an information request for the extents of the images travels up and back down the pipeline, so the extents get set to that of the last input, and then applied to all the inputs. The problem disappears if the input branches are first independently updated by calling a manual Update() on each of the AddScalars filters, but it returns if one of the DMCubes filters is modified, which triggers another general update cycle. Is there any way to set up this pipeline so that it does not require a manual update when the image inputs are modified? Nigel McFarlane University of Bedfordshire -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Aug 6 10:40:16 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 6 Aug 2015 10:40:16 -0400 Subject: [vtkusers] Using a boxwidgets transform to rotate a non-vtk 3D model? In-Reply-To: <55C2B045.1080706@dunescientific.com> References: <55C2B045.1080706@dunescientific.com> Message-ID: TK, You can get the orientation in angle-axis representation with double wxyz[4]; t->GetOrientationWXYZ(wxyz); >From the docs [1]: The angle (w) is in degrees and the axis (xyz) is a unit vector. You should be able to apply this rotation to your molecule model's RotateAboutVector function. HTH, Cory [1] http://www.vtk.org/doc/nightly/html/classvtkTransform.html#aa8244cbab95a2dbb20e94af6e7f16b7f On Wed, Aug 5, 2015 at 8:54 PM, Totte Karlsson wrote: > Hello, > I'm using vtk to visualize 3D models of molecules. > The actual molecular model is decoupled from vtk code, and visualization > is implemented using a model-view kind of design. > > Currently I have the following challenge. If a user wants to manipulate > the absolute orientation of the molecule, it is done by manipulating the > underlying model using rotation functions, like RotateX, RotateY, > RotateAboutVector, and translation functions TranslateX, Y etc. > > For now 3D rotations are simply done using two scrollbars, one horizontal > and one vertical, causing the underlying model being rotated about the vtk > viewUP vector and the vtk cameraPlane normal respectively. This works > fine, but is not so intuitive for the user. > > Instead I believe allowing interaction with something like a box widget > that encapsulates the molecule view, (with disabled handles), would be > better. > > The challenge is how to figure out how to capture the boxwidgets > orientation in a callback, and using this information in order to > manipulate the underlying molecular model. > > For example, a boxwidget callback (from boxwidget example at > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget): > > class vtkMyCallback : public vtkCommand > { > public: > static vtkMyCallback *New() { return new > vtkMyCallback; } > > virtual void Execute(vtkObject *caller, unsigned long, void*) > { > vtkSmartPointer t = > vtkSmartPointer::New(); > vtkBoxWidget *widget = reinterpret_cast(caller); > widget->GetTransform(t); > > double* angles?? = t->GetOrientation(); > if(aMoleculeModel) > { > //Use some secret(!) code to manipulate orientation of a > molecule to 'rotate' it together with the boxWidget > aMoleculeModel->RotateZ(??); > aMoleculeModel->RotateY(??); > aMoleculeModel->RotateZ(??); > } > } > Molecule* aMoleculeModel; > > Anyone seeing how to do this or have some pointers? > > Cheers, > tk > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From raphael.schubert at iwm.fraunhofer.de Thu Aug 6 11:07:03 2015 From: raphael.schubert at iwm.fraunhofer.de (Schubert, Raphael) Date: Thu, 6 Aug 2015 15:07:03 +0000 Subject: [vtkusers] (no subject) Message-ID: <13DD8C6B6309B94AA144319F72195FFD3731A238@IWMDAG2.iwm.fraunhofer.de> I use the following script to generate three vtk files containing different dataset types and an additional FIELD. import numpy as np import vtk from vtk.util.numpy_support import numpy_to_vtk for dataset in (vtk.vtkStructuredPoints, vtk.vtkRectilinearGrid, vtk.vtkPolyData): vtkData = dataset() if dataset is vtk.vtkStructuredPoints: vtkWriter = vtk.vtkStructuredPointsWriter() vtkData.SetOrigin(0.0, 0.0, 0.0) vtkData.SetSpacing(1.0, 1.0, 1.0) vtkData.SetExtent(0, 1, 0, 1, 0, 1) elif dataset is vtk.vtkPolyData: vtkWriter = vtk.vtkPolyDataWriter() vtkPoints = vtk.vtkPoints() vtkPoints.SetData(numpy_to_vtk(np.asarray( [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [1.0, 1.0, 0.0], [0.0, 0.0, 1.0], [1.0, 0.0, 1.0], [0.0, 1.0, 1.0], [1.0, 1.0, 1.0]]))) vtkData.SetPoints(vtkPoints) elif dataset is vtk.vtkRectilinearGrid: vtkWriter = vtk.vtkRectilinearGridWriter() vtkData.SetDimensions(2,2,2) vtkData.SetXCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) vtkData.SetYCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) vtkData.SetZCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) # file scope definition of Pi vtkArray = numpy_to_vtk(np.asarray(3.141).reshape(1,1),deep=1) vtkArray.SetName("Pi") vtkData.GetFieldData().AddArray(vtkArray) vtkWriter.SetFileName(str(dataset) + ".vtk") vtkWriter.SetHeader("") vtkWriter.SetFileTypeToASCII() vtkWriter.SetInput(vtkData) vtkWriter.Write() /endscript The files generated from this are # vtk DataFile Version 3.0 ASCII DATASET POLYDATA FIELD FieldData 1 Pi 1 1 double 3.141 POINTS 8 double 0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 1 1 # vtk DataFile Version 3.0 ASCII DATASET RECTILINEAR_GRID FIELD FieldData 1 Pi 1 1 double 3.141 DIMENSIONS 2 2 2 X_COORDINATES 2 double 0 1 Y_COORDINATES 2 double 0 1 Z_COORDINATES 2 double 0 1 # vtk DataFile Version 3.0 ASCII DATASET STRUCTURED_POINTS FIELD FieldData 1 Pi 1 1 double 3.141 DIMENSIONS 2 2 2 SPACING 1 1 1 ORIGIN 0 0 0 Note the FIELD preceding the dataset details. All files can be read back into python without problems, but when trying to view each file in using Paraview 4.3.1, things get interesting: - POLYDATA works. - RECTILINEAR_GRID produces an error (which, btw, contains a typo), refuses to render anything but displays everything correctly in the Information tab. ERROR: In /home/kitware/Dashboards/buildbot/paraview-debian4dash-linux-shared-release_qt4_superbuild/source-paraview/VTK/IO/Parallel/vtkPDataSetReader.cxx, line 701 vtkPDataSetReader (0x8874010): Expecting 'DIMENSIONS' insted of: FIELD - STRUCTURED_POINTS does not produce any errors, still refuses to render but displays everything correctly in the Information tab. If I now (manually) put the FIELDS definition after the dataset details, everything works fine. Is this problem with Paraview, or am I doing something with the vtk format that should not be possible at all? I got the idea from http://www.visitusers.org/index.php?title=Time_and_Cycle_in_VTK_files. Thanks Raphael Software versions: Paraview 4.3.1 Linux 64bit Python 2.7.8 |Anaconda 2.1.0 (64-bit)| (default, Aug 21 2014, 18:22:21) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2 vtk.vtkVersion().GetVTKVersion() '5.10.1' -------------- next part -------------- An HTML attachment was scrubbed... URL: From karhadras.of at gmail.com Thu Aug 6 11:30:40 2015 From: karhadras.of at gmail.com (ChristopheE) Date: Thu, 6 Aug 2015 08:30:40 -0700 (MST) Subject: [vtkusers] Building Cocoa example on OSX In-Reply-To: References: <20150310144304.688133837@mail.rogue-research.com> <2A9A165B-C8C6-410F-A425-10DE85880CC5@gmail.com> <20150310201759.1623585933@mail.rogue-research.com> <7C0B9529-E453-4941-8901-6CD2C994D976@gmail.com> <20150310202933.175945766@mail.rogue-research.com> Message-ID: <1438875040350-5733307.post@n5.nabble.com> Hi everyone, Does anyone were able to link CocoaSamples against VTK dynamic libraries without getting those missing symbols ? "_OBJC_CLASS_$_vtkCocoaGLView", referenced from: _OBJC_CLASS_$_BasicVTKView in BasicVTKView.o "_OBJC_METACLASS_$_vtkCocoaGLView", referenced from: _OBJC_METACLASS_$_BasicVTKView in BasicVTKView.o Building VTK on OS X with cocoa support is fine, but I am not able to link against dynamic libraries. Best regards, Christophe -- View this message in context: http://vtk.1045678.n5.nabble.com/Building-Cocoa-example-on-OSX-tp5730718p5733307.html Sent from the VTK - Users mailing list archive at Nabble.com. From sean at rogue-research.com Thu Aug 6 12:05:43 2015 From: sean at rogue-research.com (Sean McBride) Date: Thu, 6 Aug 2015 12:05:43 -0400 Subject: [vtkusers] Building Cocoa example on OSX In-Reply-To: <1438875040350-5733307.post@n5.nabble.com> References: <20150310144304.688133837@mail.rogue-research.com> <2A9A165B-C8C6-410F-A425-10DE85880CC5@gmail.com> <20150310201759.1623585933@mail.rogue-research.com> <7C0B9529-E453-4941-8901-6CD2C994D976@gmail.com> <20150310202933.175945766@mail.rogue-research.com> <1438875040350-5733307.post@n5.nabble.com> Message-ID: <20150806160543.819157746@mail.rogue-research.com> On Thu, 6 Aug 2015 08:30:40 -0700, ChristopheE said: >Does anyone were able to link CocoaSamples against VTK dynamic libraries >without getting those missing symbols ? > >"_OBJC_CLASS_$_vtkCocoaGLView", referenced from: > _OBJC_CLASS_$_BasicVTKView in BasicVTKView.o >"_OBJC_METACLASS_$_vtkCocoaGLView", referenced from: > _OBJC_METACLASS_$_BasicVTKView in BasicVTKView.o > >Building VTK on OS X with cocoa support is fine, but I am not able to link >against dynamic libraries. Are you using the example from within VTK itself? Which version of VTK? If 6.3rc1, the example is broken, you'll need to get it from git or wait for 6.3rc2. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From oleg.krivosheev at xcision.com Thu Aug 6 12:28:30 2015 From: oleg.krivosheev at xcision.com (Oleg Krivosheev) Date: Thu, 6 Aug 2015 12:28:30 -0400 Subject: [vtkusers] Speed up cell allocation In-Reply-To: <1438767424438-5733267.post@n5.nabble.com> References: <1438352299291-5733208.post@n5.nabble.com> <1438767424438-5733267.post@n5.nabble.com> Message-ID: Well, glad to hear It would be great if you share what you learned, so people with similar problem might just search and find the answer thank you OK On Wed, Aug 5, 2015 at 5:37 AM, quadprob wrote: > Thanks a lot! Figuring out how exactly to do this in Java took me a while > but > now the loading times for my biggest mesh has gone down from 2 minutes to 4 > seconds. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Speed-up-cell-allocation-tp5733208p5733267.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Aug 6 14:04:44 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 6 Aug 2015 12:04:44 -0600 Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing In-Reply-To: References: Message-ID: I'm planning to merge the py3k branch later today (around 4pm or so ET). This is going to cause some test failures on any dashboards that are still running python 2.5 (do any of these still exist?). Backwards compatibility for Python 2.6 and 2.7 should be excellent. They saw only to major changes: 1) The wrappers use new-style classes, i.e. every VTK class is wrapped as a type object. So type(vtkDataArray()) is vtkDataArray, unlike before when type(vtkDataArray()) was 'vtkobject'. 2) The wrappers support the new n-dimensional buffer interface, so numpy.asarray(vtk_array) creates a zero-copy numpy array from a VTK data array. Python 3.2 and higher should also work well, with some caveats: 1) VTK is still set up to use python 2 by default, so when configuring VTK with cmake, you must provide the paths to the python 3 executable, the python 3 include dir, and the python 3 library. 2) Most of the python tests and examples will only run with python 2. 3) Most of VTK's python utility modules (e.g. vtk.tk) will only run with python 2. 4) The wrappers will encode python strings to utf8 bytes before passing it to VTK. Obviously, converting the utility modules and tests to python 3 will be a lot of work. And keeping support for python 2 is a must ... all code must run with python 2.6, 2.7, and 3.2+. I'm particularly interested in hearing from people who are willing to help with these modules: vtk.wx, vtk.qt4, vtk.gtk Of course if anyone wants to convert some examples or tests, shoot an email to the list and I'll try to coordinate. If you want to update the wiki examples, then you can just log into the wiki and edit them. - David On Wed, Aug 5, 2015 at 6:51 PM, Andrew Maclean wrote: > Ok thanks. I'll check it out soon. Just testing my builds and various > scripts > > On Thu, Aug 6, 2015 at 10:45 AM, David Gobbi > wrote: > >> Thanks, Andrew. I just pushed the CommonCore test updates to the branch. >> >> - David >> >> >> On Wed, Aug 5, 2015 at 5:11 PM, Andrew Maclean > > wrote: >> >>> Hi David, >>> >>> Wonderful news. >>> >>> Definitely be glad to help. >>> Setting up a Python 3.4 environment in Windows 10 on my laptop now. >>> I'll be using Anaconda Python. >>> >>> Once this is done, I'll maintain both a python 2.7 and Python 3.4 build >>> and see how things go. >>> >>> Regards >>> Andrew >>> >>> >>> On Thu, Aug 6, 2015 at 1:44 AM, David Gobbi >>> wrote: >>> >>>> So, here's a brief update on python 3 status: >>>> >>>> The python-py3k merge branch compiles and runs with Python 3.2, 3.3, >>>> 3.4 and also Python 2.5, 2.6, 2.7 (I tried all six). So, yes, you can >>>> build VTK against Python 3, and you can run VTK programs with Python 3. >>>> I'll be doing a bit of cleanup of the next few days, but the current branch >>>> is very close to what I plan to merge. >>>> >>>> However: the test code in VTK is all written for Python 2, so right now >>>> the Python 3 buildbot that Ben has set up is showing all red for the >>>> testing. Converting the tests will be a lot of work, especially because >>>> the tests must continue to run with Python 2.6 and 2.7 (definitely not 2.5, >>>> though). Andrew, you mentioned that you might be able to provide some >>>> assistance, I would be very grateful for anything you have to offer. >>>> >>>> I've already begun converting the python tests in Common/Core, because >>>> these test the core features of the wrappers. >>>> >>>> - David >>>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Thu Aug 6 14:40:34 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 6 Aug 2015 14:40:34 -0400 Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing In-Reply-To: References: Message-ID: <20150806184034.GA11569@megas.kitware.com> On Thu, Aug 06, 2015 at 12:04:44 -0600, David Gobbi wrote: > I'm planning to merge the py3k branch later today (around 4pm or so ET). > This is going to cause some test failures on any dashboards that are still > running python 2.5 (do any of these still exist?). Not on buildbot at least :) . > Backwards compatibility for Python 2.6 and 2.7 should be excellent. They > saw only to major changes: > 1) The wrappers use new-style classes, i.e. every VTK class is wrapped as a > type object. So type(vtkDataArray()) is vtkDataArray, unlike before when > type(vtkDataArray()) was 'vtkobject'. > 2) The wrappers support the new n-dimensional buffer interface, so > numpy.asarray(vtk_array) creates a zero-copy numpy array from a VTK data > array. > > Python 3.2 and higher should also work well, with some caveats: When I set up Windows buildbots with Python3, I'll try to use 3.2 there since most of the Linux distributions are 3.3+ already. What is OS X using these days for Python3? > 1) VTK is still set up to use python 2 by default, so when configuring VTK > with cmake, you must provide the paths to the python 3 executable, the > python 3 include dir, and the python 3 library. > 2) Most of the python tests and examples will only run with python 2. > 3) Most of VTK's python utility modules (e.g. vtk.tk) will only run with > python 2. > 4) The wrappers will encode python strings to utf8 bytes before passing it > to VTK. Yay! > Obviously, converting the utility modules and tests to python 3 will be a > lot of work. And keeping support for python 2 is a must ... all code must > run with python 2.6, 2.7, and 3.2+. Note that the `six` module is already in ThirdParty. We will probably want to add dependencies where needed to ensure it is brought in properly (or just depend on it from vtkPythonCore). We will also need to find versions of: - Twisted - Autobahn - ZopeInterface - mpi4py which support both versions (or make a py3 variant) for ThirdParty. ParaView will need a usable of pygments as well, so while we're searching, that should be on the shopping list as well. Thanks for the Python3 goodness! :) --Ben From sean at rogue-research.com Thu Aug 6 14:43:41 2015 From: sean at rogue-research.com (Sean McBride) Date: Thu, 6 Aug 2015 14:43:41 -0400 Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing In-Reply-To: References: Message-ID: <20150806184341.867099609@mail.rogue-research.com> On Thu, 6 Aug 2015 12:04:44 -0600, David Gobbi said: >This is going to cause some test failures on any dashboards that are still >running python 2.5 (do any of these still exist?). OS X 10.5 uses 2.5. I just turned off my 10.5 VTK build the other day, I guess we'll see if there are any others... :) Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From david.gobbi at gmail.com Thu Aug 6 14:55:46 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 6 Aug 2015 12:55:46 -0600 Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing In-Reply-To: <20150806184034.GA11569@megas.kitware.com> References: <20150806184034.GA11569@megas.kitware.com> Message-ID: On Thu, Aug 6, 2015 at 12:40 PM, Ben Boeckel wrote: > > What is OS X using these days for Python3? > OS X uses whatever Python 3 package you install yourself ;-) The ones at python.org work fine, and pip is great for add-ons. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From totte at dunescientific.com Thu Aug 6 15:55:43 2015 From: totte at dunescientific.com (Totte Karlsson) Date: Thu, 6 Aug 2015 12:55:43 -0700 Subject: [vtkusers] Using a boxwidgets transform to rotate a non-vtk 3D model? In-Reply-To: References: <55C2B045.1080706@dunescientific.com> Message-ID: <55C3BBBF.9090004@dunescientific.com> On 8/6/2015 7:40 AM, Cory Quammen wrote: > TK, > > You can get the orientation in angle-axis representation with > > double wxyz[4]; > t->GetOrientationWXYZ(wxyz); > > From the docs [1]: > > The angle (w) is in degrees and the axis (xyz) is a unit vector. > > You should be able to apply this rotation to your molecule model's > RotateAboutVector function. > > Thanks for the response. I modified the boxwidget example in order to test your approach using a vtk actor, instead of my model, and what I believe I'm seeing is that the data from getOrientationWXYZ () is from the 'initial' orientation, instead of a progressive transformation. E.g using the following code in the callback function: virtual void Execute(vtkObject *caller, unsigned long, void*) { static int callCount = 0; vtkSmartPointer t = vtkSmartPointer::New(); vtkBoxWidget *widget = reinterpret_cast(caller); widget->GetTransform(t); //widget->GetProp3D()->SetUserTransform(t); double* wxyz = t->GetOrientationWXYZ(); if(anActor) { cout<<"CallCount: "<RotateWXYZ(wxyz[0], wxyz[1], wxyz[2],wxyz[3]); } callCount++; } Gives an angle output like this: CallCount: 0 Angle 0 CallCount: 1 Angle 0.848528 CallCount: 2 Angle 1.69706 CallCount: 3 Angle 2.54558 CallCount: 4 Angle 3.39411 CallCount: 5 Angle 5.9397 CallCount: 6 Angle 6.78823 CallCount: 7 Angle 7.63675 CallCount: 8 Angle 8.48528 CallCount: 9 Angle 8.48528 CallCount: 10 Angle 8.48528 when moving the widget slightly with the mouse. Each 'callcount' represent a movement using the mouse. Question is, how would one go about getting the 'latest' transformation, instead of the 'accumulated' one from the box widgets GetTransform()? I guess I could save the transformation each time and do a 'back transformation' before applying the new transformation. But that would be more work (I assume), than applying an incremental rotation. -tk > > [1] > http://www.vtk.org/doc/nightly/html/classvtkTransform.html#aa8244cbab95a2dbb20e94af6e7f16b7f > > > On Wed, Aug 5, 2015 at 8:54 PM, Totte Karlsson > > wrote: > > Hello, > I'm using vtk to visualize 3D models of molecules. > The actual molecular model is decoupled from vtk code, and > visualization is implemented using a model-view kind of design. > > Currently I have the following challenge. If a user wants to > manipulate the absolute orientation of the molecule, it is done by > manipulating the underlying model using rotation functions, like > RotateX, RotateY, RotateAboutVector, and translation functions > TranslateX, Y etc. > > For now 3D rotations are simply done using two scrollbars, one > horizontal and one vertical, causing the underlying model being > rotated about the vtk viewUP vector and the vtk cameraPlane normal > respectively. This works fine, but is not so intuitive for the user. > > Instead I believe allowing interaction with something like a box > widget that encapsulates the molecule view, (with disabled > handles), would be better. > > The challenge is how to figure out how to capture the boxwidgets > orientation in a callback, and using this information in order to > manipulate the underlying molecular model. > > For example, a boxwidget callback (from boxwidget example at > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget): > > class vtkMyCallback : public vtkCommand > { > public: > static vtkMyCallback *New() { return new > vtkMyCallback; } > > virtual void Execute(vtkObject *caller, unsigned long, void*) > { > vtkSmartPointer t = > vtkSmartPointer::New(); > vtkBoxWidget *widget = > reinterpret_cast(caller); > widget->GetTransform(t); > > double* angles?? = t->GetOrientation(); > if(aMoleculeModel) > { > //Use some secret(!) code to manipulate orientation of > a molecule to 'rotate' it together with the boxWidget > aMoleculeModel->RotateZ(??); > aMoleculeModel->RotateY(??); > aMoleculeModel->RotateZ(??); > } > } > Molecule* aMoleculeModel; > > Anyone seeing how to do this or have some pointers? > > Cheers, > tk > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. -- ------------------------------------------------------------------------ Totte Karlsson: totte at dunescientific.com or (425) 780-9648 http://www.dunescientific.com/ ? 2015 Dune Scientific, LLC. All rights reserved. -------------- next part -------------- An HTML attachment was scrubbed... URL: From totte at dunescientific.com Thu Aug 6 16:26:53 2015 From: totte at dunescientific.com (Totte Karlsson) Date: Thu, 6 Aug 2015 13:26:53 -0700 Subject: [vtkusers] Using a boxwidgets transform to rotate a non-vtk 3D model? In-Reply-To: References: <55C2B045.1080706@dunescientific.com> Message-ID: <55C3C30D.4000301@dunescientific.com> Hello Cory, I was able to use your suggestion and got some code to work, as follows: virtual void Execute(vtkObject *caller, unsigned long, void*) { static int callCount = 0; static double lastAngle = 0; static double lastVec[3] = {0,0,0}; vtkSmartPointer t = vtkSmartPointer::New(); static vtkSmartPointer lastTransform = vtkSmartPointer::New(); vtkBoxWidget *widget = reinterpret_cast(caller); widget->GetTransform(t); double* wxyz = t->GetOrientationWXYZ(); double* lastWXYZ = lastTransform->GetOrientationWXYZ(); if(anActor) { cout<<"CallCount: "<RotateWXYZ(-lastAngle, lastWXYZ[1], lastWXYZ[2], lastWXYZ[3]); anActor->RotateWXYZ(wxyz[0], wxyz[1], wxyz[2], wxyz[3]); } //Save transform data lastAngle = wxyz[0] ; lastVec[0] =wxyz[1]; lastVec[1] =wxyz[2]; lastVec[2] =wxyz[3]; lastTransform = t; callCount++; } In the above code, two transformations of the actor are done, in order to follow the orientation of the widget. 1) to rotate the actor to its initial position, and 2), applying current transformation. Although the above code works, is there a way to get the 'incremental' transform somehow? I'm a novice about these things so sorry if asking something obvious... tk On 8/6/2015 7:40 AM, Cory Quammen wrote: > TK, > > You can get the orientation in angle-axis representation with > > double wxyz[4]; > t->GetOrientationWXYZ(wxyz); > > From the docs [1]: > > The angle (w) is in degrees and the axis (xyz) is a unit vector. > > You should be able to apply this rotation to your molecule model's > RotateAboutVector function. > > HTH, > Cory > > [1] > http://www.vtk.org/doc/nightly/html/classvtkTransform.html#aa8244cbab95a2dbb20e94af6e7f16b7f > > > On Wed, Aug 5, 2015 at 8:54 PM, Totte Karlsson > > wrote: > > Hello, > I'm using vtk to visualize 3D models of molecules. > The actual molecular model is decoupled from vtk code, and > visualization is implemented using a model-view kind of design. > > Currently I have the following challenge. If a user wants to > manipulate the absolute orientation of the molecule, it is done by > manipulating the underlying model using rotation functions, like > RotateX, RotateY, RotateAboutVector, and translation functions > TranslateX, Y etc. > > For now 3D rotations are simply done using two scrollbars, one > horizontal and one vertical, causing the underlying model being > rotated about the vtk viewUP vector and the vtk cameraPlane normal > respectively. This works fine, but is not so intuitive for the user. > > Instead I believe allowing interaction with something like a box > widget that encapsulates the molecule view, (with disabled > handles), would be better. > > The challenge is how to figure out how to capture the boxwidgets > orientation in a callback, and using this information in order to > manipulate the underlying molecular model. > > For example, a boxwidget callback (from boxwidget example at > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget): > > class vtkMyCallback : public vtkCommand > { > public: > static vtkMyCallback *New() { return new > vtkMyCallback; } > > virtual void Execute(vtkObject *caller, unsigned long, void*) > { > vtkSmartPointer t = > vtkSmartPointer::New(); > vtkBoxWidget *widget = > reinterpret_cast(caller); > widget->GetTransform(t); > > double* angles?? = t->GetOrientation(); > if(aMoleculeModel) > { > //Use some secret(!) code to manipulate orientation of > a molecule to 'rotate' it together with the boxWidget > aMoleculeModel->RotateZ(??); > aMoleculeModel->RotateY(??); > aMoleculeModel->RotateZ(??); > } > } > Molecule* aMoleculeModel; > > Anyone seeing how to do this or have some pointers? > > Cheers, > tk > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. -- ------------------------------------------------------------------------ Totte Karlsson: totte at dunescientific.com or (425) 780-9648 http://www.dunescientific.com/ ? 2015 Dune Scientific, LLC. All rights reserved. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Aug 6 16:35:40 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 6 Aug 2015 16:35:40 -0400 Subject: [vtkusers] Using a boxwidgets transform to rotate a non-vtk 3D model? In-Reply-To: <55C3C30D.4000301@dunescientific.com> References: <55C2B045.1080706@dunescientific.com> <55C3C30D.4000301@dunescientific.com> Message-ID: Does your "anActor" have the ability to reset the rotation? If so, then you can just reset it and then apply the accumulated rotation as you are doing, e.g. anActor->SetOrientation(0, 0, 0); anActor->RotateWXYZ(wxyz[0], wxyz[1], wxyz[2], wxyz[3]); This would be nice because you wouldn't need to store the last rotation to undo it. On Thu, Aug 6, 2015 at 4:26 PM, Totte Karlsson wrote: > Hello Cory, > I was able to use your suggestion and got some code to work, as follows: > > virtual void Execute(vtkObject *caller, unsigned long, void*) > { > static int callCount = 0; > static double lastAngle = 0; > static double lastVec[3] = {0,0,0}; > vtkSmartPointer t = > vtkSmartPointer::New(); > static vtkSmartPointer lastTransform = > vtkSmartPointer::New(); > vtkBoxWidget *widget = reinterpret_cast(caller); > widget->GetTransform(t); > > double* wxyz = t->GetOrientationWXYZ(); > double* lastWXYZ = lastTransform->GetOrientationWXYZ(); > > if(anActor) > { > cout<<"CallCount: "< Effective angle:"<< wxyz[0] - lastAngle< > //Transform 'back' > anActor->RotateWXYZ(-lastAngle, lastWXYZ[1], lastWXYZ[2], > lastWXYZ[3]); > anActor->RotateWXYZ(wxyz[0], wxyz[1], wxyz[2], wxyz[3]); > } > > //Save transform data > lastAngle = wxyz[0] ; > lastVec[0] =wxyz[1]; > lastVec[1] =wxyz[2]; > lastVec[2] =wxyz[3]; > > lastTransform = t; > callCount++; > } > > In the above code, two transformations of the actor are done, in order to > follow the orientation of the widget. 1) to rotate the actor to its initial > position, and 2), applying current transformation. > > Although the above code works, is there a way to get the 'incremental' > transform somehow? I'm a novice about these things so sorry if asking > something obvious... > > tk > > > On 8/6/2015 7:40 AM, Cory Quammen wrote: > > TK, > > You can get the orientation in angle-axis representation with > > double wxyz[4]; > t->GetOrientationWXYZ(wxyz); > > From the docs [1]: > > The angle (w) is in degrees and the axis (xyz) is a unit vector. > > You should be able to apply this rotation to your molecule model's > RotateAboutVector function. > > HTH, > Cory > > [1] > > http://www.vtk.org/doc/nightly/html/classvtkTransform.html#aa8244cbab95a2dbb20e94af6e7f16b7f > > > On Wed, Aug 5, 2015 at 8:54 PM, Totte Karlsson > wrote: > >> Hello, >> I'm using vtk to visualize 3D models of molecules. >> The actual molecular model is decoupled from vtk code, and visualization >> is implemented using a model-view kind of design. >> >> Currently I have the following challenge. If a user wants to manipulate >> the absolute orientation of the molecule, it is done by manipulating the >> underlying model using rotation functions, like RotateX, RotateY, >> RotateAboutVector, and translation functions TranslateX, Y etc. >> >> For now 3D rotations are simply done using two scrollbars, one horizontal >> and one vertical, causing the underlying model being rotated about the vtk >> viewUP vector and the vtk cameraPlane normal respectively. This works >> fine, but is not so intuitive for the user. >> >> Instead I believe allowing interaction with something like a box widget >> that encapsulates the molecule view, (with disabled handles), would be >> better. >> >> The challenge is how to figure out how to capture the boxwidgets >> orientation in a callback, and using this information in order to >> manipulate the underlying molecular model. >> >> For example, a boxwidget callback (from boxwidget example at >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget): >> >> class vtkMyCallback : public vtkCommand >> { >> public: >> static vtkMyCallback *New() { return new >> vtkMyCallback; } >> >> virtual void Execute(vtkObject *caller, unsigned long, void*) >> { >> vtkSmartPointer t = >> vtkSmartPointer::New(); >> vtkBoxWidget *widget = reinterpret_cast(caller); >> widget->GetTransform(t); >> >> double* angles?? = t->GetOrientation(); >> if(aMoleculeModel) >> { >> //Use some secret(!) code to manipulate orientation of a >> molecule to 'rotate' it together with the boxWidget >> aMoleculeModel->RotateZ(??); >> aMoleculeModel->RotateY(??); >> aMoleculeModel->RotateZ(??); >> } >> } >> Molecule* aMoleculeModel; >> >> Anyone seeing how to do this or have some pointers? >> >> Cheers, >> tk >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > > -- > ------------------------------ > > Totte Karlsson: totte at dunescientific.com or (425) 780-9648 > <%20425%20%20780-9648> > http://www.dunescientific.com/ > ? 2015 Dune Scientific, LLC. All rights reserved. > > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From totte at dunescientific.com Thu Aug 6 16:43:02 2015 From: totte at dunescientific.com (Totte Karlsson) Date: Thu, 6 Aug 2015 13:43:02 -0700 Subject: [vtkusers] Using a boxwidgets transform to rotate a non-vtk 3D model? In-Reply-To: References: <55C2B045.1080706@dunescientific.com> <55C3C30D.4000301@dunescientific.com> Message-ID: <55C3C6D6.3080308@dunescientific.com> On 8/6/2015 1:35 PM, Cory Quammen wrote: > Does your "anActor" have the ability to reset the rotation? If so, > then you can just reset it and then apply the accumulated rotation as > you are doing, e.g. > > anActor->SetOrientation(0, 0, 0); > anActor->RotateWXYZ(wxyz[0], wxyz[1], wxyz[2], wxyz[3]); > > This would be nice because you wouldn't need to store the last > rotation to undo it. > The anActor is just a regular vtkActor (a cone) for now. The 'reset' is effectively the line of code: anActor->RotateWXYZ(-lastAngle, lastWXYZ[1], lastWXYZ[2], lastWXYZ[3]); One would need to store this input somewhere in order to do this, as it would be different each time. What I'm looking for is instead to perform incremental rotations, avoiding the "transforming back", i.e. (reset) part. tk > On Thu, Aug 6, 2015 at 4:26 PM, Totte Karlsson > > wrote: > > Hello Cory, > I was able to use your suggestion and got some code to work, as > follows: > > virtual void Execute(vtkObject *caller, unsigned long, void*) > { > static int callCount = 0; > static double lastAngle = 0; > static double lastVec[3] = {0,0,0}; > vtkSmartPointer t = > vtkSmartPointer::New(); > static vtkSmartPointer lastTransform = > vtkSmartPointer::New(); > vtkBoxWidget *widget = > reinterpret_cast(caller); > widget->GetTransform(t); > > double* wxyz = t->GetOrientationWXYZ(); > double* lastWXYZ = lastTransform->GetOrientationWXYZ(); > > if(anActor) > { > cout<<"CallCount: "< "< > //Transform 'back' > anActor->RotateWXYZ(-lastAngle, lastWXYZ[1], > lastWXYZ[2], lastWXYZ[3]); > anActor->RotateWXYZ(wxyz[0], wxyz[1], wxyz[2], wxyz[3]); > } > > //Save transform data > lastAngle = wxyz[0] ; > lastVec[0] =wxyz[1]; > lastVec[1] =wxyz[2]; > lastVec[2] =wxyz[3]; > > lastTransform = t; > callCount++; > } > > In the above code, two transformations of the actor are done, in > order to follow the orientation of the widget. 1) to rotate the > actor to its initial position, and 2), applying current > transformation. > > Although the above code works, is there a way to get the > 'incremental' transform somehow? I'm a novice about these things > so sorry if asking something obvious... > > tk > > > On 8/6/2015 7:40 AM, Cory Quammen wrote: >> TK, >> >> You can get the orientation in angle-axis representation with >> >> double wxyz[4]; >> t->GetOrientationWXYZ(wxyz); >> >> From the docs [1]: >> >> The angle (w) is in degrees and the axis (xyz) is a unit vector. >> >> You should be able to apply this rotation to your molecule >> model's RotateAboutVector function. >> >> HTH, >> Cory >> >> [1] >> http://www.vtk.org/doc/nightly/html/classvtkTransform.html#aa8244cbab95a2dbb20e94af6e7f16b7f >> >> >> On Wed, Aug 5, 2015 at 8:54 PM, Totte Karlsson >> > wrote: >> >> Hello, >> I'm using vtk to visualize 3D models of molecules. >> The actual molecular model is decoupled from vtk code, and >> visualization is implemented using a model-view kind of design. >> >> Currently I have the following challenge. If a user wants to >> manipulate the absolute orientation of the molecule, it is >> done by manipulating the underlying model using rotation >> functions, like RotateX, RotateY, RotateAboutVector, and >> translation functions TranslateX, Y etc. >> >> For now 3D rotations are simply done using two scrollbars, >> one horizontal and one vertical, causing the underlying model >> being rotated about the vtk viewUP vector and the vtk >> cameraPlane normal respectively. This works fine, but is not >> so intuitive for the user. >> >> Instead I believe allowing interaction with something like a >> box widget that encapsulates the molecule view, (with >> disabled handles), would be better. >> >> The challenge is how to figure out how to capture the >> boxwidgets orientation in a callback, and using this >> information in order to manipulate the underlying molecular >> model. >> >> For example, a boxwidget callback (from boxwidget example at >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget): >> >> class vtkMyCallback : public vtkCommand >> { >> public: >> static vtkMyCallback *New() { return >> new vtkMyCallback; } >> >> virtual void Execute(vtkObject *caller, unsigned long, void*) >> { >> vtkSmartPointer t = >> vtkSmartPointer::New(); >> vtkBoxWidget *widget = >> reinterpret_cast(caller); >> widget->GetTransform(t); >> >> double* angles?? = t->GetOrientation(); >> if(aMoleculeModel) >> { >> //Use some secret(!) code to manipulate >> orientation of a molecule to 'rotate' it together with the >> boxWidget >> aMoleculeModel->RotateZ(??); >> aMoleculeModel->RotateY(??); >> aMoleculeModel->RotateZ(??); >> } >> } >> Molecule* aMoleculeModel; >> >> Anyone seeing how to do this or have some pointers? >> >> Cheers, >> tk >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: >> http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. > > -- > ------------------------------------------------------------------------ > > Totte Karlsson: totte at dunescientific.com > or (425) 780-9648 > > http://www.dunescientific.com/ > ? 2015 Dune Scientific, LLC. All rights reserved. > > > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. -- ------------------------------------------------------------------------ Totte Karlsson: totte at dunescientific.com or (425) 780-9648 http://www.dunescientific.com/ ? 2015 Dune Scientific, LLC. All rights reserved. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Aug 6 16:52:45 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 6 Aug 2015 16:52:45 -0400 Subject: [vtkusers] Using a boxwidgets transform to rotate a non-vtk 3D model? In-Reply-To: <55C3C6D6.3080308@dunescientific.com> References: <55C2B045.1080706@dunescientific.com> <55C3C30D.4000301@dunescientific.com> <55C3C6D6.3080308@dunescientific.com> Message-ID: On Thu, Aug 6, 2015 at 4:43 PM, Totte Karlsson wrote: > > > On 8/6/2015 1:35 PM, Cory Quammen wrote: > > Does your "anActor" have the ability to reset the rotation? If so, then > you can just reset it and then apply the accumulated rotation as you are > doing, e.g. > > anActor->SetOrientation(0, 0, 0); > anActor->RotateWXYZ(wxyz[0], wxyz[1], wxyz[2], wxyz[3]); > > This would be nice because you wouldn't need to store the last rotation to > undo it. > > The anActor is just a regular vtkActor (a cone) for now. > > The 'reset' is effectively the line of code: > anActor->RotateWXYZ(-lastAngle, lastWXYZ[1], lastWXYZ[2], lastWXYZ[3]); > > One would need to store this input somewhere in order to do this, as it > would be different each time. > I guess I don't see the problem here. You have a reference to the actor here, and the actor has the orientation. Did you try this approach out and it didn't work? vtkActor::SetOrientation(0, 0, 0) will reset the rotation for you. > > What I'm looking for is instead to perform incremental rotations, avoiding > the "transforming back", i.e. (reset) part. > I don't know of a quick and easy way to get the incremental rotation you are looking for, hence my suggestion. Cory > > > tk > > On Thu, Aug 6, 2015 at 4:26 PM, Totte Karlsson > wrote: > >> Hello Cory, >> I was able to use your suggestion and got some code to work, as follows: >> >> virtual void Execute(vtkObject *caller, unsigned long, void*) >> { >> static int callCount = 0; >> static double lastAngle = 0; >> static double lastVec[3] = {0,0,0}; >> vtkSmartPointer t = >> vtkSmartPointer::New(); >> static vtkSmartPointer lastTransform = >> vtkSmartPointer::New(); >> vtkBoxWidget *widget = reinterpret_cast(caller); >> widget->GetTransform(t); >> >> double* wxyz = t->GetOrientationWXYZ(); >> double* lastWXYZ = lastTransform->GetOrientationWXYZ(); >> >> if(anActor) >> { >> cout<<"CallCount: "<> Effective angle:"<< wxyz[0] - lastAngle<> >> //Transform 'back' >> anActor->RotateWXYZ(-lastAngle, lastWXYZ[1], lastWXYZ[2], >> lastWXYZ[3]); >> anActor->RotateWXYZ(wxyz[0], wxyz[1], wxyz[2], wxyz[3]); >> } >> >> //Save transform data >> lastAngle = wxyz[0] ; >> lastVec[0] =wxyz[1]; >> lastVec[1] =wxyz[2]; >> lastVec[2] =wxyz[3]; >> >> lastTransform = t; >> callCount++; >> } >> >> In the above code, two transformations of the actor are done, in order to >> follow the orientation of the widget. 1) to rotate the actor to its initial >> position, and 2), applying current transformation. >> >> Although the above code works, is there a way to get the 'incremental' >> transform somehow? I'm a novice about these things so sorry if asking >> something obvious... >> >> tk >> >> >> On 8/6/2015 7:40 AM, Cory Quammen wrote: >> >> TK, >> >> You can get the orientation in angle-axis representation with >> >> double wxyz[4]; >> t->GetOrientationWXYZ(wxyz); >> >> From the docs [1]: >> >> The angle (w) is in degrees and the axis (xyz) is a unit vector. >> >> You should be able to apply this rotation to your molecule model's >> RotateAboutVector function. >> >> HTH, >> Cory >> >> [1] >> >> http://www.vtk.org/doc/nightly/html/classvtkTransform.html#aa8244cbab95a2dbb20e94af6e7f16b7f >> >> >> On Wed, Aug 5, 2015 at 8:54 PM, Totte Karlsson < >> totte at dunescientific.com> wrote: >> >>> Hello, >>> I'm using vtk to visualize 3D models of molecules. >>> The actual molecular model is decoupled from vtk code, and visualization >>> is implemented using a model-view kind of design. >>> >>> Currently I have the following challenge. If a user wants to manipulate >>> the absolute orientation of the molecule, it is done by manipulating the >>> underlying model using rotation functions, like RotateX, RotateY, >>> RotateAboutVector, and translation functions TranslateX, Y etc. >>> >>> For now 3D rotations are simply done using two scrollbars, one >>> horizontal and one vertical, causing the underlying model being rotated >>> about the vtk viewUP vector and the vtk cameraPlane normal respectively. >>> This works fine, but is not so intuitive for the user. >>> >>> Instead I believe allowing interaction with something like a box widget >>> that encapsulates the molecule view, (with disabled handles), would be >>> better. >>> >>> The challenge is how to figure out how to capture the boxwidgets >>> orientation in a callback, and using this information in order to >>> manipulate the underlying molecular model. >>> >>> For example, a boxwidget callback (from boxwidget example at >>> >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget): >>> >>> class vtkMyCallback : public vtkCommand >>> { >>> public: >>> static vtkMyCallback *New() { return new >>> vtkMyCallback; } >>> >>> virtual void Execute(vtkObject *caller, unsigned long, void*) >>> { >>> vtkSmartPointer t = >>> vtkSmartPointer::New(); >>> vtkBoxWidget *widget = reinterpret_cast(caller); >>> widget->GetTransform(t); >>> >>> double* angles?? = t->GetOrientation(); >>> if(aMoleculeModel) >>> { >>> //Use some secret(!) code to manipulate orientation of a >>> molecule to 'rotate' it together with the boxWidget >>> aMoleculeModel->RotateZ(??); >>> aMoleculeModel->RotateY(??); >>> aMoleculeModel->RotateZ(??); >>> } >>> } >>> Molecule* aMoleculeModel; >>> >>> Anyone seeing how to do this or have some pointers? >>> >>> Cheers, >>> tk >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: >>> http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. >> >> >> -- >> ------------------------------ >> >> Totte Karlsson: totte at dunescientific.com or (425) 780-9648 >> <%20425%20%20780-9648> >> http://www.dunescientific.com/ >> ? 2015 Dune Scientific, LLC. All rights reserved. >> >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > > -- > ------------------------------ > > Totte Karlsson: totte at dunescientific.com or (425) 780-9648 > <%20425%20%20780-9648> > http://www.dunescientific.com/ > ? 2015 Dune Scientific, LLC. All rights reserved. > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From totte at dunescientific.com Thu Aug 6 17:09:44 2015 From: totte at dunescientific.com (Totte Karlsson) Date: Thu, 6 Aug 2015 14:09:44 -0700 Subject: [vtkusers] Using a boxwidgets transform to rotate a non-vtk 3D model? In-Reply-To: References: <55C2B045.1080706@dunescientific.com> <55C3C30D.4000301@dunescientific.com> <55C3C6D6.3080308@dunescientific.com> Message-ID: <55C3CD18.1080204@dunescientific.com> On 8/6/2015 1:52 PM, Cory Quammen wrote: > > I guess I don't see the problem here. You have a reference to the > actor here, and the actor has the orientation. Did you try this > approach out and it didn't work? vtkActor::SetOrientation(0, 0, 0) > will reset the rotation for you. Tried SetOrientation(0,0,0) and as you say that works too. However, with my molecular model I can't do such a thing. > > > What I'm looking for is instead to perform incremental rotations, > avoiding the "transforming back", i.e. (reset) part. > > > I don't know of a quick and easy way to get the incremental rotation > you are looking for, hence my suggestion. Appreciate it! Your approach works fine. Now looking in to making it more efficient. Should be possible I think.. Thanks! tk Here is the full code in case. It is just the boxwidget example code modified. #include #include #include #include #include #include #include #include #include #include #include #include class vtkMyCallback : public vtkCommand { public: static vtkMyCallback *New() { return new vtkMyCallback; } virtual void Execute(vtkObject *caller, unsigned long, void*) { static int callCount = 0; static double lastAngle = 0; vtkSmartPointer t = vtkSmartPointer::New(); static vtkSmartPointer lastTransform = vtkSmartPointer::New(); vtkBoxWidget *widget = reinterpret_cast(caller); widget->GetTransform(t); double *pos = t->GetPosition(); double *lastPos = lastTransform->GetPosition(); double *wxyz = t->GetOrientationWXYZ(); double *lastWXYZ = lastTransform->GetOrientationWXYZ(); if(anActor) { cout<<"CallCount: "<RotateWXYZ(-lastAngle, lastWXYZ[1], lastWXYZ[2], lastWXYZ[3]); anActor->RotateWXYZ(wxyz[0], wxyz[1], wxyz[2], wxyz[3]); } //Save transform data lastAngle = wxyz[0] ; lastTransform = t; callCount++; } vtkActor* anActor; }; int main(int, char*[]) { vtkSmartPointer cone = vtkSmartPointer::New(); cone->SetHeight( 3.0 ); cone->SetRadius( 2.0 ); cone->SetResolution( 50 ); cone->Update(); vtkSmartPointer coneMapper = vtkSmartPointer::New(); coneMapper->SetInputConnection( cone->GetOutputPort() ); vtkSmartPointer coneActor = vtkSmartPointer::New(); coneActor->SetMapper( coneMapper ); vtkSmartPointer ren1= vtkSmartPointer::New(); ren1->AddActor( coneActor ); ren1->SetBackground( 0.1, 0.2, 0.4 ); coneActor->SetPosition(1,1,1); vtkSmartPointer renWin = vtkSmartPointer::New(); renWin->AddRenderer( ren1 ); renWin->SetSize( 300, 300 ); vtkSmartPointer iren = vtkSmartPointer::New(); iren->SetRenderWindow(renWin); vtkSmartPointer style = vtkSmartPointer::New(); iren->SetInteractorStyle(style); // The place factor // controls the initial size of the widget with respect to the bounding box // of the input to the widget. vtkSmartPointer boxWidget = vtkSmartPointer::New(); boxWidget->SetInteractor(iren); boxWidget->SetPlaceFactor(2.25); boxWidget->HandlesOff(); boxWidget->SetTranslationEnabled(0); boxWidget->SetScalingEnabled(0); //For placement boxWidget->SetProp3D(coneActor); boxWidget->PlaceWidget(); vtkSmartPointer callback = vtkSmartPointer::New(); boxWidget->AddObserver(vtkCommand::InteractionEvent, callback); boxWidget->On(); callback->anActor = coneActor; iren->Initialize(); iren->Start(); return EXIT_SUCCESS; } > > Cory > > > > tk > >> On Thu, Aug 6, 2015 at 4:26 PM, Totte Karlsson >> > wrote: >> >> Hello Cory, >> I was able to use your suggestion and got some code to work, >> as follows: >> >> virtual void Execute(vtkObject *caller, unsigned long, void*) >> { >> static int callCount = 0; >> static double lastAngle = 0; >> static double lastVec[3] = {0,0,0}; >> vtkSmartPointer t = >> vtkSmartPointer::New(); >> static vtkSmartPointer lastTransform = >> vtkSmartPointer::New(); >> vtkBoxWidget *widget = >> reinterpret_cast(caller); >> widget->GetTransform(t); >> >> double* wxyz = t->GetOrientationWXYZ(); >> double* lastWXYZ = lastTransform->GetOrientationWXYZ(); >> >> if(anActor) >> { >> cout<<"CallCount: "<> "<> >> //Transform 'back' >> anActor->RotateWXYZ(-lastAngle, lastWXYZ[1], lastWXYZ[2], >> lastWXYZ[3]); >> anActor->RotateWXYZ(wxyz[0], wxyz[1], wxyz[2], wxyz[3]); >> } >> >> //Save transform data >> lastAngle = wxyz[0] ; >> lastVec[0] =wxyz[1]; >> lastVec[1] =wxyz[2]; >> lastVec[2] =wxyz[3]; >> >> lastTransform = t; >> callCount++; >> } >> >> In the above code, two transformations of the actor are done, >> in order to follow the orientation of the widget. 1) to >> rotate the actor to its initial position, and 2), applying >> current transformation. >> >> Although the above code works, is there a way to get the >> 'incremental' transform somehow? I'm a novice about these >> things so sorry if asking something obvious... >> >> tk >> >> >> On 8/6/2015 7:40 AM, Cory Quammen wrote: >>> TK, >>> >>> You can get the orientation in angle-axis representation with >>> >>> double wxyz[4]; >>> t->GetOrientationWXYZ(wxyz); >>> >>> From the docs [1]: >>> >>> The angle (w) is in degrees and the axis (xyz) is a unit vector. >>> >>> You should be able to apply this rotation to your molecule >>> model's RotateAboutVector function. >>> >>> HTH, >>> Cory >>> >>> [1] >>> http://www.vtk.org/doc/nightly/html/classvtkTransform.html#aa8244cbab95a2dbb20e94af6e7f16b7f >>> >>> >>> On Wed, Aug 5, 2015 at 8:54 PM, Totte Karlsson >>> > >>> wrote: >>> >>> Hello, >>> I'm using vtk to visualize 3D models of molecules. >>> The actual molecular model is decoupled from vtk code, >>> and visualization is implemented using a model-view kind >>> of design. >>> >>> Currently I have the following challenge. If a user >>> wants to manipulate the absolute orientation of the >>> molecule, it is done by manipulating the underlying >>> model using rotation functions, like RotateX, RotateY, >>> RotateAboutVector, and translation functions TranslateX, >>> Y etc. >>> >>> For now 3D rotations are simply done using two >>> scrollbars, one horizontal and one vertical, causing the >>> underlying model being rotated about the vtk viewUP >>> vector and the vtk cameraPlane normal respectively. >>> This works fine, but is not so intuitive for the user. >>> >>> Instead I believe allowing interaction with something >>> like a box widget that encapsulates the molecule view, >>> (with disabled handles), would be better. >>> >>> The challenge is how to figure out how to capture the >>> boxwidgets orientation in a callback, and using this >>> information in order to manipulate the underlying >>> molecular model. >>> >>> For example, a boxwidget callback (from boxwidget >>> example at >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget): >>> >>> class vtkMyCallback : public vtkCommand >>> { >>> public: >>> static vtkMyCallback *New() { return new >>> vtkMyCallback; } >>> >>> virtual void Execute(vtkObject *caller, unsigned >>> long, void*) >>> { >>> vtkSmartPointer t = >>> vtkSmartPointer::New(); >>> vtkBoxWidget *widget = >>> reinterpret_cast(caller); >>> widget->GetTransform(t); >>> >>> double* angles?? = t->GetOrientation(); >>> if(aMoleculeModel) >>> { >>> //Use some secret(!) code to manipulate >>> orientation of a molecule to 'rotate' it together with >>> the boxWidget >>> aMoleculeModel->RotateZ(??); >>> aMoleculeModel->RotateY(??); >>> aMoleculeModel->RotateZ(??); >>> } >>> } >>> Molecule* aMoleculeModel; >>> >>> Anyone seeing how to do this or have some pointers? >>> >>> Cheers, >>> tk >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: >>> http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> >>> -- >>> Cory Quammen >>> R&D Engineer >>> Kitware, Inc. >> >> -- >> ------------------------------------------------------------------------ >> >> Totte Karlsson: totte at dunescientific.com >> or (425) 780-9648 >> >> http://www.dunescientific.com/ >> ? 2015 Dune Scientific, LLC. All rights reserved. >> >> >> >> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. > > -- > ------------------------------------------------------------------------ > > Totte Karlsson: totte at dunescientific.com > or (425) 780-9648 > > http://www.dunescientific.com/ > ? 2015 Dune Scientific, LLC. All rights reserved. > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. -- ------------------------------------------------------------------------ Totte Karlsson: totte at dunescientific.com or (425) 780-9648 http://www.dunescientific.com/ ? 2015 Dune Scientific, LLC. All rights reserved. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Aug 6 17:12:36 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 06 Aug 2015 21:12:36 +0000 Subject: [vtkusers] vtkAppendPolydata - wrong extents on multiple inputs In-Reply-To: References: Message-ID: Nigel, The pipeline executive compares the modification time (vtkObject::GetMTime()) for the output of a filter against each of its inputs. If any of the inputs is newer, the filter is updated. It may be that your filter does not update the time of its output properly. This request is propagated upstream and stops if a filter has its inputs older than its output. I would setup a breakpoint and look at the first update for your filters. On Thu, Aug 6, 2015 at 9:20 AM Nigel Mcfarlane wrote: > Dear vtkusers, > > > > I am creating a visual pipe in vtk 6.2.0 and I am having problems > connecting vtkAppendPolyData to multiple inputs which start from images of > different dimensions. The visual pipe converts a set of input images into > isosurfaces, adds scalars for colour and transparency, then merges them > into one polydata mesh so they can be depth sorted before rendering. Its > structure looks like this: > > > > // > > // image1 image2 image3 > > // | | | > > // DMCubes1 DMCubes2 DMCubes3 > > // | | | > > // AddScalars1 AddScalars2 AddScalars3 > > // \ | / > > // \ | / > > // \ | / > > // vtkAppendPolyData > > // | > > // vtkDepthSortPolyData > > // | > > // Mapper/Actor > > // | > > // Renderer > > // > > > > The images are produced by vtkMetaImageReader, the ?DMCubes? filters are > vtkDiscreteMarchingCubes, and the?AddScalars? filters are my own code. > > > > The problem is that this produces an image in which the dimensions/extents > of two of the images have clearly been set incorrectly. I don?t know much > about the way the vtk pipeline works, but I suppose that an information > request for the extents of the images travels up and back down the > pipeline, so the extents get set to that of the last input, and then > applied to all the inputs. The problem disappears if the input branches > are first independently updated by calling a manual Update() on each of the > AddScalars filters, but it returns if one of the DMCubes filters is > modified, which triggers another general update cycle. > > > > Is there any way to set up this pipeline so that it does not require a > manual update when the image inputs are modified? > > > > Nigel McFarlane > > University of Bedfordshire > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Aug 6 17:20:41 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 06 Aug 2015 21:20:41 +0000 Subject: [vtkusers] vtkAppendPolydata - wrong extents on multiple inputs In-Reply-To: References: Message-ID: > This request is propagated upstream and stops if a filter has its inputs older than its output. I meant downstream. It has to check all filters as their properties might change which will affect the final result. On Thu, Aug 6, 2015 at 5:12 PM Dan Lipsa wrote: > Nigel, > The pipeline executive compares the modification time ( > vtkObject::GetMTime()) for the output of a filter against each of its > inputs. If any of the inputs is newer, the filter is updated. It may be > that your filter does not update the time of its output properly. This > request is propagated upstream and stops if a filter has its inputs older > than its output. I would setup a breakpoint and look at the first update > for your filters. > > On Thu, Aug 6, 2015 at 9:20 AM Nigel Mcfarlane > wrote: > >> Dear vtkusers, >> >> >> >> I am creating a visual pipe in vtk 6.2.0 and I am having problems >> connecting vtkAppendPolyData to multiple inputs which start from images of >> different dimensions. The visual pipe converts a set of input images into >> isosurfaces, adds scalars for colour and transparency, then merges them >> into one polydata mesh so they can be depth sorted before rendering. Its >> structure looks like this: >> >> >> >> // >> >> // image1 image2 image3 >> >> // | | | >> >> // DMCubes1 DMCubes2 DMCubes3 >> >> // | | | >> >> // AddScalars1 AddScalars2 AddScalars3 >> >> // \ | / >> >> // \ | / >> >> // \ | / >> >> // vtkAppendPolyData >> >> // | >> >> // vtkDepthSortPolyData >> >> // | >> >> // Mapper/Actor >> >> // | >> >> // Renderer >> >> // >> >> >> >> The images are produced by vtkMetaImageReader, the ?DMCubes? filters are >> vtkDiscreteMarchingCubes, and the?AddScalars? filters are my own code. >> >> >> >> The problem is that this produces an image in which the >> dimensions/extents of two of the images have clearly been set incorrectly. >> I don?t know much about the way the vtk pipeline works, but I suppose that >> an information request for the extents of the images travels up and back >> down the pipeline, so the extents get set to that of the last input, and >> then applied to all the inputs. The problem disappears if the input >> branches are first independently updated by calling a manual Update() on >> each of the AddScalars filters, but it returns if one of the DMCubes >> filters is modified, which triggers another general update cycle. >> >> >> >> Is there any way to set up this pipeline so that it does not require a >> manual update when the image inputs are modified? >> >> >> >> Nigel McFarlane >> >> University of Bedfordshire >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From niels_dekker_address_until_2018 at xs4all.nl Thu Aug 6 17:25:25 2015 From: niels_dekker_address_until_2018 at xs4all.nl (Niels Dekker - address until 2018) Date: Thu, 6 Aug 2015 23:25:25 +0200 Subject: [vtkusers] Will VTK 6.3 support Visual Studio 2015? In-Reply-To: <55C27F32.5000006@xs4all.nl> References: <55C0AEB3.7090209@xs4all.nl> <20150804144723.GA24906@megas.kitware.com> <55C0E07A.2090406@xs4all.nl> <20150804165831.GA14325@megas.kitware.com> <55C24405.9030205@xs4all.nl> <20150805174936.GA6989@megas.kitware.com> <20150805180405.19699595@mail.rogue-research.com> <55C27F32.5000006@xs4all.nl> Message-ID: <55C3D0C5.3000808@xs4all.nl> Ben Boeckel wrote on 5 Aug 2015: > Feel free to file a bug and report back here. Here it is: Bug ID 1635947 - "[C & C++] INTERNAL COMPILER ERROR: fatal error C1001 (compiler file '...\vctools\compiler\utc\src\p2\main.c', line 246), having /O2 (Maximize Speed) and call to forward declared function" https://connect.microsoft.com/VisualStudio/feedbackdetail/view/1635947 Please check, and let me know if the bug report needs any adjustments! You may also consider indicating that you can reproduce this bug, or vote the bug as important! :-) Kind regards, Niels From 419655660 at qq.com Thu Aug 6 21:24:58 2015 From: 419655660 at qq.com (louiskoo) Date: Thu, 6 Aug 2015 18:24:58 -0700 (MST) Subject: [vtkusers] converting vtkCallBackCommand into java In-Reply-To: <1436239695444-5732734.post@n5.nabble.com> References: <1436239695444-5732734.post@n5.nabble.com> Message-ID: <1438910698472-5733335.post@n5.nabble.com> Is your vtk java 32 bit or 64 bit? -- View this message in context: http://vtk.1045678.n5.nabble.com/converting-vtkCallBackCommand-into-java-tp5732734p5733335.html Sent from the VTK - Users mailing list archive at Nabble.com. From 419655660 at qq.com Thu Aug 6 21:46:42 2015 From: 419655660 at qq.com (louiskoo) Date: Thu, 6 Aug 2015 18:46:42 -0700 (MST) Subject: [vtkusers] VTK + Java In-Reply-To: <707969.93719.qm@web30512.mail.mud.yahoo.com> References: <707969.93719.qm@web30512.mail.mud.yahoo.com> Message-ID: <1438912002916-5733336.post@n5.nabble.com> Is your vtk java 32 bit or 64 bit? -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Java-tp1234589p5733336.html Sent from the VTK - Users mailing list archive at Nabble.com. From tr_jun-jiang.ee at vitrox.com Thu Aug 6 21:53:05 2015 From: tr_jun-jiang.ee at vitrox.com (James Potota) Date: Thu, 6 Aug 2015 18:53:05 -0700 (MST) Subject: [vtkusers] VtkRenderWindowInteractor doesn't start and cause program freezes [java] In-Reply-To: <1438910436901-5733334.post@n5.nabble.com> References: <1438669845578-5733242.post@n5.nabble.com> <1438910436901-5733334.post@n5.nabble.com> Message-ID: <1438912385107-5733337.post@n5.nabble.com> Hi Louis. It was 64bit -- View this message in context: http://vtk.1045678.n5.nabble.com/VtkRenderWindowInteractor-doesn-t-start-and-cause-program-freezes-java-tp5733242p5733337.html Sent from the VTK - Users mailing list archive at Nabble.com. From 419655660 at qq.com Thu Aug 6 21:58:11 2015 From: 419655660 at qq.com (louiskoo) Date: Thu, 6 Aug 2015 18:58:11 -0700 (MST) Subject: [vtkusers] VtkRenderWindowInteractor doesn't start and cause program freezes [java] In-Reply-To: <1438912385107-5733337.post@n5.nabble.com> References: <1438669845578-5733242.post@n5.nabble.com> <1438910436901-5733334.post@n5.nabble.com> <1438912385107-5733337.post@n5.nabble.com> Message-ID: <1438912691945-5733338.post@n5.nabble.com> I hava compiled the vtk with 64 bit jdk on win7 64 but failed and I have destressed for days. Can you send me the 64 bit dll and vtk.jar? I will appreciate that if you can help me. -- View this message in context: http://vtk.1045678.n5.nabble.com/VtkRenderWindowInteractor-doesn-t-start-and-cause-program-freezes-java-tp5733242p5733338.html Sent from the VTK - Users mailing list archive at Nabble.com. From tr_jun-jiang.ee at vitrox.com Thu Aug 6 22:06:59 2015 From: tr_jun-jiang.ee at vitrox.com (Ee Jun Jiang) Date: Fri, 07 Aug 2015 02:06:59 +0000 Subject: [vtkusers] VtkRenderWindowInteractor doesn't start and cause program freezes [java] In-Reply-To: <1438912691945-5733338.post@n5.nabble.com> References: <1438669845578-5733242.post@n5.nabble.com> <1438910436901-5733334.post@n5.nabble.com> <1438912385107-5733337.post@n5.nabble.com> <1438912691945-5733338.post@n5.nabble.com> Message-ID: check your email. On Fri, Aug 7, 2015 at 9:58 AM louiskoo <419655660 at qq.com> wrote: > I hava compiled the vtk with 64 bit jdk on win7 64 but failed and I have > destressed for days. Can you send me the 64 bit dll and vtk.jar? > I will appreciate that if you can help me. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/VtkRenderWindowInteractor-doesn-t-start-and-cause-program-freezes-java-tp5733242p5733338.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 419655660 at qq.com Thu Aug 6 22:15:37 2015 From: 419655660 at qq.com (louiskoo) Date: Thu, 6 Aug 2015 19:15:37 -0700 (MST) Subject: [vtkusers] VtkRenderWindowInteractor doesn't start and cause program freezes [java] In-Reply-To: References: <1438669845578-5733242.post@n5.nabble.com> <1438910436901-5733334.post@n5.nabble.com> <1438912385107-5733337.post@n5.nabble.com> <1438912691945-5733338.post@n5.nabble.com> Message-ID: <1438913737805-5733340.post@n5.nabble.com> Sorry,I haven't received your email and hava you sended success? -- View this message in context: http://vtk.1045678.n5.nabble.com/VtkRenderWindowInteractor-doesn-t-start-and-cause-program-freezes-java-tp5733242p5733340.html Sent from the VTK - Users mailing list archive at Nabble.com. From dan.lipsa at kitware.com Thu Aug 6 23:11:43 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 07 Aug 2015 03:11:43 +0000 Subject: [vtkusers] [Paraview] (no subject) In-Reply-To: <13DD8C6B6309B94AA144319F72195FFD3731A238@IWMDAG2.iwm.fraunhofer.de> References: <13DD8C6B6309B94AA144319F72195FFD3731A238@IWMDAG2.iwm.fraunhofer.de> Message-ID: Raphael, Indeed, the FIELD definitions have to be after the dataset details according to: http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf On Thu, Aug 6, 2015 at 11:14 AM Schubert, Raphael < raphael.schubert at iwm.fraunhofer.de> wrote: > I use the following script to generate three vtk files containing > different dataset types and an additional FIELD. > > import numpy as np > import vtk > from vtk.util.numpy_support import numpy_to_vtk > > for dataset in (vtk.vtkStructuredPoints, > vtk.vtkRectilinearGrid, > vtk.vtkPolyData): > > vtkData = dataset() > > if dataset is vtk.vtkStructuredPoints: > vtkWriter = vtk.vtkStructuredPointsWriter() > > vtkData.SetOrigin(0.0, 0.0, 0.0) > vtkData.SetSpacing(1.0, 1.0, 1.0) > vtkData.SetExtent(0, 1, 0, 1, 0, 1) > > elif dataset is vtk.vtkPolyData: > vtkWriter = vtk.vtkPolyDataWriter() > > vtkPoints = vtk.vtkPoints() > vtkPoints.SetData(numpy_to_vtk(np.asarray( > [[0.0, 0.0, 0.0], > [1.0, 0.0, 0.0], > [0.0, 1.0, 0.0], > [1.0, 1.0, 0.0], > [0.0, 0.0, 1.0], > [1.0, 0.0, 1.0], > [0.0, 1.0, 1.0], > [1.0, 1.0, 1.0]]))) > vtkData.SetPoints(vtkPoints) > > elif dataset is vtk.vtkRectilinearGrid: > vtkWriter = vtk.vtkRectilinearGridWriter() > > vtkData.SetDimensions(2,2,2) > vtkData.SetXCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) > vtkData.SetYCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) > vtkData.SetZCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) > > # file scope definition of Pi > vtkArray = numpy_to_vtk(np.asarray(3.141).reshape(1,1),deep=1) > vtkArray.SetName("Pi") > vtkData.GetFieldData().AddArray(vtkArray) > > vtkWriter.SetFileName(str(dataset) + ".vtk") > vtkWriter.SetHeader("") > vtkWriter.SetFileTypeToASCII() > > vtkWriter.SetInput(vtkData) > vtkWriter.Write() > > /endscript > > The files generated from this are > # vtk DataFile Version 3.0 > > ASCII > DATASET POLYDATA > FIELD FieldData 1 > Pi 1 1 double > 3.141 > POINTS 8 double > 0 0 0 1 0 0 0 1 0 > 1 1 0 0 0 1 1 0 1 > 0 1 1 1 1 1 > > # vtk DataFile Version 3.0 > > ASCII > DATASET RECTILINEAR_GRID > FIELD FieldData 1 > Pi 1 1 double > 3.141 > DIMENSIONS 2 2 2 > X_COORDINATES 2 double > 0 1 > Y_COORDINATES 2 double > 0 1 > Z_COORDINATES 2 double > 0 1 > > # vtk DataFile Version 3.0 > > ASCII > DATASET STRUCTURED_POINTS > FIELD FieldData 1 > Pi 1 1 double > 3.141 > DIMENSIONS 2 2 2 > SPACING 1 1 1 > ORIGIN 0 0 0 > > Note the FIELD preceding the dataset details. All files can be read back > into python without problems, but when trying to view each file in using > Paraview 4.3.1, things get interesting: > > - POLYDATA works. > - RECTILINEAR_GRID produces an error (which, btw, contains a typo), > refuses to render anything but displays everything correctly in the > Information tab. > > ERROR: In > /home/kitware/Dashboards/buildbot/paraview-debian4dash-linux-shared-release_qt4_superbuild/source-paraview/VTK/IO/Parallel/vtkPDataSetReader.cxx, > line 701 > vtkPDataSetReader (0x8874010): Expecting 'DIMENSIONS' insted of: FIELD > > - STRUCTURED_POINTS does not produce any errors, still refuses to render > but displays everything correctly in the Information tab. > > If I now (manually) put the FIELDS definition after the dataset details, > everything works fine. > > Is this problem with Paraview, or am I doing something with the vtk > format that should not be possible at all? I got the idea from > http://www.visitusers.org/index.php?title=Time_and_Cycle_in_VTK_files. > > Thanks > Raphael > > Software versions: > > Paraview 4.3.1 Linux 64bit > > Python 2.7.8 |Anaconda 2.1.0 (64-bit)| (default, Aug 21 2014, 18:22:21) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2 > > vtk.vtkVersion().GetVTKVersion() > '5.10.1' > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the ParaView Wiki at: > http://paraview.org/Wiki/ParaView > > Search the list archives at: http://markmail.org/search/?q=ParaView > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/paraview > -------------- next part -------------- An HTML attachment was scrubbed... URL: From raphael.schubert at iwm.fraunhofer.de Fri Aug 7 05:01:57 2015 From: raphael.schubert at iwm.fraunhofer.de (Schubert, Raphael) Date: Fri, 7 Aug 2015 09:01:57 +0000 Subject: [vtkusers] [Paraview] (no subject) In-Reply-To: References: <13DD8C6B6309B94AA144319F72195FFD3731A238@IWMDAG2.iwm.fraunhofer.de>, Message-ID: <13DD8C6B6309B94AA144319F72195FFD3731A521@IWMDAG2.iwm.fraunhofer.de> The way I understand the file format specification it should be illegal to define a FIELD dataset in addition to, e.g, STRUCTURED_POINTS, as I can find it neither explicitly allowed (there is only mention of one dataset per file) nor presented in an example. It therefore seems like an accidental feature in vtk that I can actually read back the produced files. Am I missing something in the file format? Maybe I presented this poorly, please let me give another example with additional point data, also straight out of python. Here are two fields, one in the dataset section, and one in the point data section. By my reading of the file format spec, the field in the dataset section should not be permitted to be there, even after the details for the STRUCTURED_POINTS. # vtk DataFile Version 3.0 ASCII DATASET STRUCTURED_POINTS FIELD FieldData 1 Pi 1 1 double 3.141 DIMENSIONS 2 2 2 SPACING 1 1 1 ORIGIN 0 0 0 POINT_DATA 8 FIELD FieldData 1 Index 1 8 long 0 1 2 3 4 5 6 7 ________________________________ Von: Dan Lipsa [dan.lipsa at kitware.com] Gesendet: Freitag, 7. August 2015 05:11 Bis: Schubert, Raphael; paraview at paraview.org; vtkusers at vtk.org Betreff: Re: [Paraview] (no subject) Raphael, Indeed, the FIELD definitions have to be after the dataset details according to: http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf On Thu, Aug 6, 2015 at 11:14 AM Schubert, Raphael > wrote: I use the following script to generate three vtk files containing different dataset types and an additional FIELD. import numpy as np import vtk from vtk.util.numpy_support import numpy_to_vtk for dataset in (vtk.vtkStructuredPoints, vtk.vtkRectilinearGrid, vtk.vtkPolyData): vtkData = dataset() if dataset is vtk.vtkStructuredPoints: vtkWriter = vtk.vtkStructuredPointsWriter() vtkData.SetOrigin(0.0, 0.0, 0.0) vtkData.SetSpacing(1.0, 1.0, 1.0) vtkData.SetExtent(0, 1, 0, 1, 0, 1) elif dataset is vtk.vtkPolyData: vtkWriter = vtk.vtkPolyDataWriter() vtkPoints = vtk.vtkPoints() vtkPoints.SetData(numpy_to_vtk(np.asarray( [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [1.0, 1.0, 0.0], [0.0, 0.0, 1.0], [1.0, 0.0, 1.0], [0.0, 1.0, 1.0], [1.0, 1.0, 1.0]]))) vtkData.SetPoints(vtkPoints) elif dataset is vtk.vtkRectilinearGrid: vtkWriter = vtk.vtkRectilinearGridWriter() vtkData.SetDimensions(2,2,2) vtkData.SetXCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) vtkData.SetYCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) vtkData.SetZCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) # file scope definition of Pi vtkArray = numpy_to_vtk(np.asarray(3.141).reshape(1,1),deep=1) vtkArray.SetName("Pi") vtkData.GetFieldData().AddArray(vtkArray) vtkWriter.SetFileName(str(dataset) + ".vtk") vtkWriter.SetHeader("") vtkWriter.SetFileTypeToASCII() vtkWriter.SetInput(vtkData) vtkWriter.Write() /endscript The files generated from this are # vtk DataFile Version 3.0 ASCII DATASET POLYDATA FIELD FieldData 1 Pi 1 1 double 3.141 POINTS 8 double 0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 1 1 1 # vtk DataFile Version 3.0 ASCII DATASET RECTILINEAR_GRID FIELD FieldData 1 Pi 1 1 double 3.141 DIMENSIONS 2 2 2 X_COORDINATES 2 double 0 1 Y_COORDINATES 2 double 0 1 Z_COORDINATES 2 double 0 1 # vtk DataFile Version 3.0 ASCII DATASET STRUCTURED_POINTS FIELD FieldData 1 Pi 1 1 double 3.141 DIMENSIONS 2 2 2 SPACING 1 1 1 ORIGIN 0 0 0 Note the FIELD preceding the dataset details. All files can be read back into python without problems, but when trying to view each file in using Paraview 4.3.1, things get interesting: - POLYDATA works. - RECTILINEAR_GRID produces an error (which, btw, contains a typo), refuses to render anything but displays everything correctly in the Information tab. ERROR: In /home/kitware/Dashboards/buildbot/paraview-debian4dash-linux-shared-release_qt4_superbuild/source-paraview/VTK/IO/Parallel/vtkPDataSetReader.cxx, line 701 vtkPDataSetReader (0x8874010): Expecting 'DIMENSIONS' insted of: FIELD - STRUCTURED_POINTS does not produce any errors, still refuses to render but displays everything correctly in the Information tab. If I now (manually) put the FIELDS definition after the dataset details, everything works fine. Is this problem with Paraview, or am I doing something with the vtk format that should not be possible at all? I got the idea from http://www.visitusers.org/index.php?title=Time_and_Cycle_in_VTK_files. Thanks Raphael Software versions: Paraview 4.3.1 Linux 64bit Python 2.7.8 |Anaconda 2.1.0 (64-bit)| (default, Aug 21 2014, 18:22:21) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2 vtk.vtkVersion().GetVTKVersion() '5.10.1' _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nigel.Mcfarlane at beds.ac.uk Fri Aug 7 04:58:36 2015 From: Nigel.Mcfarlane at beds.ac.uk (Nigel Mcfarlane) Date: Fri, 7 Aug 2015 08:58:36 +0000 Subject: [vtkusers] vtkAppendPolydata - wrong extents on multiple inputs In-Reply-To: References: Message-ID: Dear Dan, You are right ? leaving my AddScalars filter out fixes the problem instantly. Thank you Regards Nigel From: Dan Lipsa [mailto:dan.lipsa at kitware.com] Sent: 06 August 2015 22:21 To: Nigel Mcfarlane ; vtkusers at vtk.org Subject: Re: [vtkusers] vtkAppendPolydata - wrong extents on multiple inputs > This request is propagated upstream and stops if a filter has its inputs older than its output. I meant downstream. It has to check all filters as their properties might change which will affect the final result. On Thu, Aug 6, 2015 at 5:12 PM Dan Lipsa > wrote: Nigel, The pipeline executive compares the modification time (vtkObject::GetMTime()) for the output of a filter against each of its inputs. If any of the inputs is newer, the filter is updated. It may be that your filter does not update the time of its output properly. This request is propagated upstream and stops if a filter has its inputs older than its output. I would setup a breakpoint and look at the first update for your filters. On Thu, Aug 6, 2015 at 9:20 AM Nigel Mcfarlane > wrote: Dear vtkusers, I am creating a visual pipe in vtk 6.2.0 and I am having problems connecting vtkAppendPolyData to multiple inputs which start from images of different dimensions. The visual pipe converts a set of input images into isosurfaces, adds scalars for colour and transparency, then merges them into one polydata mesh so they can be depth sorted before rendering. Its structure looks like this: // // image1 image2 image3 // | | | // DMCubes1 DMCubes2 DMCubes3 // | | | // AddScalars1 AddScalars2 AddScalars3 // \ | / // \ | / // \ | / // vtkAppendPolyData // | // vtkDepthSortPolyData // | // Mapper/Actor // | // Renderer // The images are produced by vtkMetaImageReader, the ?DMCubes? filters are vtkDiscreteMarchingCubes, and the?AddScalars? filters are my own code. The problem is that this produces an image in which the dimensions/extents of two of the images have clearly been set incorrectly. I don?t know much about the way the vtk pipeline works, but I suppose that an information request for the extents of the images travels up and back down the pipeline, so the extents get set to that of the last input, and then applied to all the inputs. The problem disappears if the input branches are first independently updated by calling a manual Update() on each of the AddScalars filters, but it returns if one of the DMCubes filters is modified, which triggers another general update cycle. Is there any way to set up this pipeline so that it does not require a manual update when the image inputs are modified? Nigel McFarlane University of Bedfordshire _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nigel.Mcfarlane at beds.ac.uk Fri Aug 7 07:48:13 2015 From: Nigel.Mcfarlane at beds.ac.uk (Nigel Mcfarlane) Date: Fri, 7 Aug 2015 11:48:13 +0000 Subject: [vtkusers] vtkAppendPolydata - wrong extents on multiple inputs In-Reply-To: References: Message-ID: Dear Dan, I?m sorry, but I was too hasty in declaring that my problem was fixed ? removing my AddScalars filter did not help after all, and neither did replacing it with vtkPolyDataNormals. I have now stripped down the code to its simplest configuration. The resulting scene has isosurfaces which are mispositioned and broken in a manner consistent with the images being read with the wrong dimensions. Furthermore, if the readers are not manually updated, the program crashes. There is also an error message: ERROR: In C:\VTK\VTK-6.2.0\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx, line 857 vtkCompositeDataPipeline (0132A818): The update extent specified in the information for output port 0 on algorithm vtkMetaImageReader(01321E58) is 0 67 0 72 0 9, which is outside the whole extent 0 69 0 58 0 10. The results are ok if only one image is fed to appendPD. If I update the dmcubes[i] manually, the results are also ok. It looks as if the base of the pipeline only remembers one set of extents, which it then demands incorrectly from all the inputs. Have I missed anything important in the code below? // Set filenames std::string dirname = CHICVIS"/ForthLungCropped20150703"; std::string fname[3]; fname[0] = dirname + "/2505ct/Tumor1Big/lesion2505-1mm.mhd"; fname[1] = dirname + "/3108ct/Tumor1Big/lesion3108-1mm.mhd"; fname[2] = dirname + "/170957ct/Tumor1Big/lesion1709-1mm.mhd"; // Create array of image readers vtkMetaImageReader **reader; reader = new (vtkMetaImageReader *[3]); for (int i = 0; i < 3; i++) reader[i] = vtkMetaImageReader::New(); for (int i = 0; i < 3; i++){ reader[i]->SetFileName(fname[i].c_str()); reader[i]->Update(); } // ----------------------- // Create the VTK pipeline // // image0 image1 image2 // dmcubes0 dmcubes1 dmcubes2 // \ | / // vtkAppendPolyData // mapper/actor // renderer // ----------------------- vtkDiscreteMarchingCubes **dmcubes; dmcubes = new (vtkDiscreteMarchingCubes *[3]); for (int i = 0; i < 3; i++){ dmcubes[i] = vtkDiscreteMarchingCubes::New(); dmcubes[i]->SetInputConnection(reader[i]->GetOutputPort()); dmcubes[i]->SetNumberOfContours(1); dmcubes[i]->SetComputeGradients(0); dmcubes[i]->SetComputeScalars(0); dmcubes[i]->SetComputeNormals(1); dmcubes[i]->SetValue(i, 255); } vtkAppendPolyData *appendPD = vtkAppendPolyData::New(); for (int i = 0; i < 3; i++) appendPD->AddInputConnection(dmcubes[i]->GetOutputPort()); vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); mapper = vtkPolyDataMapper::New(); mapper->SetInputConnection(appendPD->GetOutputPort()); vtkActor *actor = vtkActor::New(); actor->SetMapper(mapper); Renderer->AddActor(actor); // ------------------------------- // Reset the camera and initialize // ------------------------------- Renderer->ResetCamera(); RWI->Initialize(); RWI->Start(); Thank you Nigel McFarlane University of Bedfordshire UK From: Dan Lipsa [mailto:dan.lipsa at kitware.com] Sent: 06 August 2015 22:21 To: Nigel Mcfarlane ; vtkusers at vtk.org Subject: Re: [vtkusers] vtkAppendPolydata - wrong extents on multiple inputs > This request is propagated upstream and stops if a filter has its inputs older than its output. I meant downstream. It has to check all filters as their properties might change which will affect the final result. On Thu, Aug 6, 2015 at 5:12 PM Dan Lipsa > wrote: Nigel, The pipeline executive compares the modification time (vtkObject::GetMTime()) for the output of a filter against each of its inputs. If any of the inputs is newer, the filter is updated. It may be that your filter does not update the time of its output properly. This request is propagated upstream and stops if a filter has its inputs older than its output. I would setup a breakpoint and look at the first update for your filters. On Thu, Aug 6, 2015 at 9:20 AM Nigel Mcfarlane > wrote: Dear vtkusers, I am creating a visual pipe in vtk 6.2.0 and I am having problems connecting vtkAppendPolyData to multiple inputs which start from images of different dimensions. The visual pipe converts a set of input images into isosurfaces, adds scalars for colour and transparency, then merges them into one polydata mesh so they can be depth sorted before rendering. Its structure looks like this: // // image1 image2 image3 // | | | // DMCubes1 DMCubes2 DMCubes3 // | | | // AddScalars1 AddScalars2 AddScalars3 // \ | / // \ | / // \ | / // vtkAppendPolyData // | // vtkDepthSortPolyData // | // Mapper/Actor // | // Renderer // The images are produced by vtkMetaImageReader, the ?DMCubes? filters are vtkDiscreteMarchingCubes, and the?AddScalars? filters are my own code. The problem is that this produces an image in which the dimensions/extents of two of the images have clearly been set incorrectly. I don?t know much about the way the vtk pipeline works, but I suppose that an information request for the extents of the images travels up and back down the pipeline, so the extents get set to that of the last input, and then applied to all the inputs. The problem disappears if the input branches are first independently updated by calling a manual Update() on each of the AddScalars filters, but it returns if one of the DMCubes filters is modified, which triggers another general update cycle. Is there any way to set up this pipeline so that it does not require a manual update when the image inputs are modified? Nigel McFarlane University of Bedfordshire _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From rohithajare12 at gmail.com Fri Aug 7 08:24:31 2015 From: rohithajare12 at gmail.com (rohit hajare) Date: Fri, 7 Aug 2015 05:24:31 -0700 (MST) Subject: [vtkusers] How to add Seprator tag into VRML(.wrl) file for adding multiple Texture. Message-ID: <1438950271173-5733347.post@n5.nabble.com> I want to convert object(.obj) file (which has multiple textures) into wrl file. I used *vtkVRMLExporter *for it . It convert obj file into .wrl file but did not add ImageTexture tag, so i have to add manually each time but it is useful for applying only 1 texture. I try with seprator tag so i noticed we can apply two textures into .WRL file.But I don't know how to add seprator tag while converting obj to wrl using vtkVRMLExporter .If any one know please suggest me....thank you. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-add-Seprator-tag-into-VRML-wrl-file-for-adding-multiple-Texture-tp5733347.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Aug 7 10:04:50 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 7 Aug 2015 10:04:50 -0400 Subject: [vtkusers] [Paraview] (no subject) In-Reply-To: <13DD8C6B6309B94AA144319F72195FFD3731A521@IWMDAG2.iwm.fraunhofer.de> References: <13DD8C6B6309B94AA144319F72195FFD3731A238@IWMDAG2.iwm.fraunhofer.de> <13DD8C6B6309B94AA144319F72195FFD3731A521@IWMDAG2.iwm.fraunhofer.de> Message-ID: A single data set has three FIELDs, one the collection of arrays that are aligned with the geometry(ie points ie nodes) (vtkPointData), one the collection of arrays that are aligned with the connectivity (aka cells aka elements) (vtkCellData) and another the collection of arrays which are not aligned with anything other than the data set (vtkFieldData). You may have found a bug in the writer. Would you mind filing a bug report and referencing the email thread? cheers David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Aug 7, 2015 at 5:01 AM, Schubert, Raphael < raphael.schubert at iwm.fraunhofer.de> wrote: > The way I understand the file format specification it should be illegal to > define a FIELD dataset in addition to, e.g, STRUCTURED_POINTS, as I can > find it neither explicitly allowed (there is only mention of one dataset > per file) nor presented in an example. It therefore seems like an > accidental feature in vtk that I can actually read back the produced files. > > Am I missing something in the file format? > > Maybe I presented this poorly, please let me give another example with > additional point data, also straight out of python. Here are two fields, > one in the dataset section, and one in the point data section. By my > reading of the file format spec, the field in the dataset section should > not be permitted to be there, even after the details for the > STRUCTURED_POINTS. > > # vtk DataFile Version 3.0 > > ASCII > DATASET STRUCTURED_POINTS > FIELD FieldData 1 > Pi 1 1 double > 3.141 > DIMENSIONS 2 2 2 > SPACING 1 1 1 > ORIGIN 0 0 0 > POINT_DATA 8 > FIELD FieldData 1 > Index 1 8 long > 0 1 2 3 4 5 6 7 > ------------------------------ > *Von:* Dan Lipsa [dan.lipsa at kitware.com] > *Gesendet:* Freitag, 7. August 2015 05:11 > *Bis:* Schubert, Raphael; paraview at paraview.org; vtkusers at vtk.org > *Betreff:* Re: [Paraview] (no subject) > > Raphael, > Indeed, the FIELD definitions have to be after the dataset details > according to: > > http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf > > > > On Thu, Aug 6, 2015 at 11:14 AM Schubert, Raphael < > raphael.schubert at iwm.fraunhofer.de> wrote: > >> I use the following script to generate three vtk files containing >> different dataset types and an additional FIELD. >> >> import numpy as np >> import vtk >> from vtk.util.numpy_support import numpy_to_vtk >> >> for dataset in (vtk.vtkStructuredPoints, >> vtk.vtkRectilinearGrid, >> vtk.vtkPolyData): >> >> vtkData = dataset() >> >> if dataset is vtk.vtkStructuredPoints: >> vtkWriter = vtk.vtkStructuredPointsWriter() >> >> vtkData.SetOrigin(0.0, 0.0, 0.0) >> vtkData.SetSpacing(1.0, 1.0, 1.0) >> vtkData.SetExtent(0, 1, 0, 1, 0, 1) >> >> elif dataset is vtk.vtkPolyData: >> vtkWriter = vtk.vtkPolyDataWriter() >> >> vtkPoints = vtk.vtkPoints() >> vtkPoints.SetData(numpy_to_vtk(np.asarray( >> [[0.0, 0.0, 0.0], >> [1.0, 0.0, 0.0], >> [0.0, 1.0, 0.0], >> [1.0, 1.0, 0.0], >> [0.0, 0.0, 1.0], >> [1.0, 0.0, 1.0], >> [0.0, 1.0, 1.0], >> [1.0, 1.0, 1.0]]))) >> vtkData.SetPoints(vtkPoints) >> >> elif dataset is vtk.vtkRectilinearGrid: >> vtkWriter = vtk.vtkRectilinearGridWriter() >> >> vtkData.SetDimensions(2,2,2) >> vtkData.SetXCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) >> vtkData.SetYCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) >> vtkData.SetZCoordinates(numpy_to_vtk(np.asarray([0.0, 1.0]))) >> >> # file scope definition of Pi >> vtkArray = numpy_to_vtk(np.asarray(3.141).reshape(1,1),deep=1) >> vtkArray.SetName("Pi") >> vtkData.GetFieldData().AddArray(vtkArray) >> >> vtkWriter.SetFileName(str(dataset) + ".vtk") >> vtkWriter.SetHeader("") >> vtkWriter.SetFileTypeToASCII() >> >> vtkWriter.SetInput(vtkData) >> vtkWriter.Write() >> >> /endscript >> >> The files generated from this are >> # vtk DataFile Version 3.0 >> >> ASCII >> DATASET POLYDATA >> FIELD FieldData 1 >> Pi 1 1 double >> 3.141 >> POINTS 8 double >> 0 0 0 1 0 0 0 1 0 >> 1 1 0 0 0 1 1 0 1 >> 0 1 1 1 1 1 >> >> # vtk DataFile Version 3.0 >> >> ASCII >> DATASET RECTILINEAR_GRID >> FIELD FieldData 1 >> Pi 1 1 double >> 3.141 >> DIMENSIONS 2 2 2 >> X_COORDINATES 2 double >> 0 1 >> Y_COORDINATES 2 double >> 0 1 >> Z_COORDINATES 2 double >> 0 1 >> >> # vtk DataFile Version 3.0 >> >> ASCII >> DATASET STRUCTURED_POINTS >> FIELD FieldData 1 >> Pi 1 1 double >> 3.141 >> DIMENSIONS 2 2 2 >> SPACING 1 1 1 >> ORIGIN 0 0 0 >> >> Note the FIELD preceding the dataset details. All files can be read back >> into python without problems, but when trying to view each file in using >> Paraview 4.3.1, things get interesting: >> >> - POLYDATA works. >> - RECTILINEAR_GRID produces an error (which, btw, contains a typo), >> refuses to render anything but displays everything correctly in the >> Information tab. >> >> ERROR: In >> /home/kitware/Dashboards/buildbot/paraview-debian4dash-linux-shared-release_qt4_superbuild/source-paraview/VTK/IO/Parallel/vtkPDataSetReader.cxx, >> line 701 >> vtkPDataSetReader (0x8874010): Expecting 'DIMENSIONS' insted of: FIELD >> >> - STRUCTURED_POINTS does not produce any errors, still refuses to render >> but displays everything correctly in the Information tab. >> >> If I now (manually) put the FIELDS definition after the dataset details, >> everything works fine. >> >> Is this problem with Paraview, or am I doing something with the vtk >> format that should not be possible at all? I got the idea from >> http://www.visitusers.org/index.php?title=Time_and_Cycle_in_VTK_files. >> >> Thanks >> Raphael >> >> Software versions: >> >> Paraview 4.3.1 Linux 64bit >> >> Python 2.7.8 |Anaconda 2.1.0 (64-bit)| (default, Aug 21 2014, 18:22:21) >> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2 >> >> vtk.vtkVersion().GetVTKVersion() >> '5.10.1' >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the ParaView Wiki at: >> http://paraview.org/Wiki/ParaView >> >> Search the list archives at: http://markmail.org/search/?q=ParaView >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/paraview >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Fri Aug 7 10:16:31 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 07 Aug 2015 14:16:31 +0000 Subject: [vtkusers] [Paraview] (no subject) In-Reply-To: <13DD8C6B6309B94AA144319F72195FFD3731A521@IWMDAG2.iwm.fraunhofer.de> References: <13DD8C6B6309B94AA144319F72195FFD3731A238@IWMDAG2.iwm.fraunhofer.de> <13DD8C6B6309B94AA144319F72195FFD3731A521@IWMDAG2.iwm.fraunhofer.de> Message-ID: Hi Raphael, On Fri, Aug 7, 2015 at 5:02 AM Schubert, Raphael < raphael.schubert at iwm.fraunhofer.de> wrote: > The way I understand the file format specification it should be illegal to > define a FIELD dataset in addition to, e.g, STRUCTURED_POINTS, as I can > find it neither explicitly allowed (there is only mention of one dataset > per file) nor presented in an example. It therefore seems like an > accidental feature in vtk that I can actually read back the produced files. > A FIELD dataset is a way to specify data without topological or geometrical structure. One can also define FIELD arrays after CELL_DATA or POINT_DATA for a dataset. Look at the first example on page 7. In the CELL_DATA section there is a field arrays. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Fri Aug 7 12:39:28 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 07 Aug 2015 16:39:28 +0000 Subject: [vtkusers] [Paraview] (no subject) In-Reply-To: References: <13DD8C6B6309B94AA144319F72195FFD3731A238@IWMDAG2.iwm.fraunhofer.de> <13DD8C6B6309B94AA144319F72195FFD3731A521@IWMDAG2.iwm.fraunhofer.de> Message-ID: Raphael, In talking to Dave, it seems that indeed you have found a bug in the writer (and in the specification). It does not seem to be a way to save field data unless your dataset is of type FIELD (a collection of arrays). The arrays attached to POINT_DATA (or CELL_DATA) which are designated as FIELD have to have the same number of tuples as the points (or cells). The terminology is kind of confusing as well. Would you mind filing a bug report. Thanks, Dan On Fri, Aug 7, 2015 at 10:16 AM Dan Lipsa wrote: > Hi Raphael, > > On Fri, Aug 7, 2015 at 5:02 AM Schubert, Raphael < > raphael.schubert at iwm.fraunhofer.de> wrote: > >> The way I understand the file format specification it should be illegal >> to define a FIELD dataset in addition to, e.g, STRUCTURED_POINTS, as I can >> find it neither explicitly allowed (there is only mention of one dataset >> per file) nor presented in an example. It therefore seems like an >> accidental feature in vtk that I can actually read back the produced files. >> > > A FIELD dataset is a way to specify data without topological or > geometrical structure. One can also define FIELD arrays after CELL_DATA or > POINT_DATA for a dataset. Look at the first example on page 7. In the > CELL_DATA section there is a field arrays. > > > >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From serge at infolytica.com Fri Aug 7 13:49:28 2015 From: serge at infolytica.com (Serge Lalonde) Date: Fri, 7 Aug 2015 13:49:28 -0400 Subject: [vtkusers] Dynamic field probing? Message-ID: <55C4EFA8.3040308@infolytica.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jjgacegj.png Type: image/png Size: 5136 bytes Desc: not available URL: From dan.lipsa at kitware.com Fri Aug 7 14:14:42 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 07 Aug 2015 18:14:42 +0000 Subject: [vtkusers] vtkAppendPolydata - wrong extents on multiple inputs In-Reply-To: References: Message-ID: Nigel, I don't see anything wrong in your script. Do you mind sharing your data so that I can debug this? On Fri, Aug 7, 2015 at 7:48 AM Nigel Mcfarlane wrote: > Dear Dan, > > I?m sorry, but I was too hasty in declaring that my problem was fixed ? > removing my AddScalars filter did not help after all, and neither did > replacing it with vtkPolyDataNormals. I have now stripped down the code to > its simplest configuration. The resulting scene has isosurfaces which are > mispositioned and broken in a manner consistent with the images being read > with the wrong dimensions. Furthermore, if the readers are not manually > updated, the program crashes. > > > > There is also an error message: > > ERROR: In > C:\VTK\VTK-6.2.0\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx, > line 857 > > vtkCompositeDataPipeline (0132A818): The update extent specified in the > information for output port 0 on algorithm vtkMetaImageReader(01321E58) is > 0 67 0 72 0 9, which is outside the whole extent 0 69 0 58 0 10. > > > > The results are ok if only one image is fed to appendPD. If I update the > dmcubes[i] manually, the results are also ok. > > > > It looks as if the base of the pipeline only remembers one set of extents, > which it then demands incorrectly from all the inputs. Have I missed > anything important in the code below? > > > > // Set filenames > > *std*::*string* dirname = CHICVIS"/ForthLungCropped20150703"; > > *std*::*string* fname[3]; > > fname[0] = dirname + "/2505ct/Tumor1Big/lesion2505-1mm.mhd"; > > fname[1] = dirname + "/3108ct/Tumor1Big/lesion3108-1mm.mhd"; > > fname[2] = dirname + "/170957ct/Tumor1Big/lesion1709-1mm.mhd"; > > > > // Create array of image readers > > vtkMetaImageReader **reader; > > reader = new (vtkMetaImageReader *[3]); > > for (int i = 0; i < 3; i++) > > reader[i] = vtkMetaImageReader::New(); > > > > for (int i = 0; i < 3; i++){ > > reader[i]->SetFileName(fname[i].*c_str*()); > > reader[i]->Update(); > > } > > > > > > // ----------------------- > > // Create the VTK pipeline > > // > > // image0 image1 image2 > > // dmcubes0 dmcubes1 dmcubes2 > > // \ | / > > // vtkAppendPolyData > > // mapper/actor > > // renderer > > // ----------------------- > > vtkDiscreteMarchingCubes **dmcubes; > > dmcubes = new (vtkDiscreteMarchingCubes *[3]); > > for (int i = 0; i < 3; i++){ > > dmcubes[i] = vtkDiscreteMarchingCubes::New(); > > dmcubes[i]->SetInputConnection(reader[i]->GetOutputPort()); > > dmcubes[i]->SetNumberOfContours(1); > > dmcubes[i]->SetComputeGradients(0); > > dmcubes[i]->SetComputeScalars(0); > > dmcubes[i]->SetComputeNormals(1); > > dmcubes[i]->SetValue(i, 255); > > } > > > > vtkAppendPolyData *appendPD = vtkAppendPolyData::New(); > > for (int i = 0; i < 3; i++) > > appendPD->AddInputConnection(dmcubes[i]->GetOutputPort()); > > > > vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); > > mapper = vtkPolyDataMapper::New(); > > mapper->SetInputConnection(appendPD->GetOutputPort()); > > > > vtkActor *actor = vtkActor::New(); > > actor->SetMapper(mapper); > > > > Renderer->AddActor(actor); > > > > // ------------------------------- > > // Reset the camera and initialize > > // ------------------------------- > > Renderer->ResetCamera(); > > RWI->Initialize(); > > RWI->Start(); > > > > > > > > Thank you > > Nigel McFarlane > > University of Bedfordshire UK > > > > > > > > > > *From:* Dan Lipsa [mailto:dan.lipsa at kitware.com] > *Sent:* 06 August 2015 22:21 > *To:* Nigel Mcfarlane ; vtkusers at vtk.org > *Subject:* Re: [vtkusers] vtkAppendPolydata - wrong extents on multiple > inputs > > > > > This request is propagated upstream and stops if a filter has its inputs > older than its output. > > I meant downstream. It has to check all filters as their properties might > change which will affect the final result. > > > > On Thu, Aug 6, 2015 at 5:12 PM Dan Lipsa wrote: > > Nigel, > > The pipeline executive compares the modification time ( > vtkObject::GetMTime()) for the output of a filter against each of its > inputs. If any of the inputs is newer, the filter is updated. It may be > that your filter does not update the time of its output properly. This > request is propagated upstream and stops if a filter has its inputs older > than its output. I would setup a breakpoint and look at the first update > for your filters. > > > > On Thu, Aug 6, 2015 at 9:20 AM Nigel Mcfarlane > wrote: > > Dear vtkusers, > > > > I am creating a visual pipe in vtk 6.2.0 and I am having problems > connecting vtkAppendPolyData to multiple inputs which start from images of > different dimensions. The visual pipe converts a set of input images into > isosurfaces, adds scalars for colour and transparency, then merges them > into one polydata mesh so they can be depth sorted before rendering. Its > structure looks like this: > > > > // > > // image1 image2 image3 > > // | | | > > // DMCubes1 DMCubes2 DMCubes3 > > // | | | > > // AddScalars1 AddScalars2 AddScalars3 > > // \ | / > > // \ | / > > // \ | / > > // vtkAppendPolyData > > // | > > // vtkDepthSortPolyData > > // | > > // Mapper/Actor > > // | > > // Renderer > > // > > > > The images are produced by vtkMetaImageReader, the ?DMCubes? filters are > vtkDiscreteMarchingCubes, and the?AddScalars? filters are my own code. > > > > The problem is that this produces an image in which the dimensions/extents > of two of the images have clearly been set incorrectly. I don?t know much > about the way the vtk pipeline works, but I suppose that an information > request for the extents of the images travels up and back down the > pipeline, so the extents get set to that of the last input, and then > applied to all the inputs. The problem disappears if the input branches > are first independently updated by calling a manual Update() on each of the > AddScalars filters, but it returns if one of the DMCubes filters is > modified, which triggers another general update cycle. > > > > Is there any way to set up this pipeline so that it does not require a > manual update when the image inputs are modified? > > > > Nigel McFarlane > > University of Bedfordshire > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.khojaste at sunnybrook.ca Fri Aug 7 15:09:14 2015 From: amir.khojaste at sunnybrook.ca (Khojaste, Amir) Date: Fri, 7 Aug 2015 19:09:14 +0000 Subject: [vtkusers] Windows Form Application using VTK library Message-ID: <639C0C4CF854594E920361562A5266BB696E057D@SBXNG01.sw.ca> Hi guys, Is there any ways that we can integrate and use VTK libraries in Windows Form Applications developed in C#? I couldn't find any up-to-date tutorials online for doing this. Thanks, Amir This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From siavashk at ece.ubc.ca Fri Aug 7 15:25:05 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Fri, 7 Aug 2015 12:25:05 -0700 (MST) Subject: [vtkusers] Windows Form Application using VTK library In-Reply-To: <639C0C4CF854594E920361562A5266BB696E057D@SBXNG01.sw.ca> References: <639C0C4CF854594E920361562A5266BB696E057D@SBXNG01.sw.ca> Message-ID: <1438975505983-5733356.post@n5.nabble.com> Hello Amir, You might want to have a look at ActiViz.NET ActiViz.NET . Windows Form is an old technology and is being rapidly replaced by Windows Presentation Foundation (WPF). If you are just starting your development, you might want to try using WPF instead of Windows Forms. Siavash -- View this message in context: http://vtk.1045678.n5.nabble.com/Windows-Form-Application-using-VTK-library-tp5733354p5733356.html Sent from the VTK - Users mailing list archive at Nabble.com. From miptsu at gmail.com Fri Aug 7 19:41:51 2015 From: miptsu at gmail.com (Vit) Date: Fri, 7 Aug 2015 16:41:51 -0700 (MST) Subject: [vtkusers] Set axis label at vtkChartXY in C++ -- how? Message-ID: <1438990911967-5733358.post@n5.nabble.com> I am new in VTK (this is my 1st week of trying to use this lib for data visualization), and I started from the simplest thing -- 2D chart. It is ok with plotting and data updating but despite 3 days of googling I still have no answer: *how to change axis labels*. I found similar question with no answer. My problem with no access to is the same (code also shown on 2013 webinar charting with VTK at 15:30): and Also I found this example , but its description "the charts examples always seem to render slightly differently" looks not very attractive. Bottom picture here proofs that changing axis name ("arc_length") for vtkChartXY approach is possible. But please add example there (or here) -- how to change default "X Axis" in 2015 (not 2013)? My config is: Win 8.1, minGW64, Eclipse IDE, and last 6.2 *stable* src from vtk.org compiled by minGW64. -- View this message in context: http://vtk.1045678.n5.nabble.com/Set-axis-label-at-vtkChartXY-in-C-how-tp5733358.html Sent from the VTK - Users mailing list archive at Nabble.com. From miptsu at gmail.com Fri Aug 7 20:52:03 2015 From: miptsu at gmail.com (Vit) Date: Fri, 7 Aug 2015 17:52:03 -0700 (MST) Subject: [vtkusers] Set axis label at vtkChartXY in C++ -- how? In-Reply-To: <1438990911967-5733358.post@n5.nabble.com> References: <1438990911967-5733358.post@n5.nabble.com> Message-ID: <1438995123921-5733359.post@n5.nabble.com> I have found vtkAxis.cxx file and then added #include "vtkAxis.h" to my code -- and now problem is gone. This is first time when I see such kind of error message due to lack of right "include" command. Also I wander why IDE had no information about this class too although path "vtk\src\Charts\Core" to this header file was set correct. It is a pity there are no auto-include (like Java). -- View this message in context: http://vtk.1045678.n5.nabble.com/Set-axis-label-at-vtkChartXY-in-C-how-tp5733358p5733359.html Sent from the VTK - Users mailing list archive at Nabble.com. From 419655660 at qq.com Sat Aug 8 01:00:44 2015 From: 419655660 at qq.com (louiskoo) Date: Fri, 7 Aug 2015 22:00:44 -0700 (MST) Subject: [vtkusers] VtkRenderWindowInteractor doesn't start and cause program freezes [java] In-Reply-To: <1438913737805-5733340.post@n5.nabble.com> References: <1438669845578-5733242.post@n5.nabble.com> <1438910436901-5733334.post@n5.nabble.com> <1438912385107-5733337.post@n5.nabble.com> <1438912691945-5733338.post@n5.nabble.com> <1438913737805-5733340.post@n5.nabble.com> Message-ID: <1439010044616-5733361.post@n5.nabble.com> Sorry,I haven't received your email of vtk dlls and jar and can you send the files to louiskooliuxin at hotmail.com. Thanks a lot. -- View this message in context: http://vtk.1045678.n5.nabble.com/VtkRenderWindowInteractor-doesn-t-start-and-cause-program-freezes-java-tp5733242p5733361.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Sat Aug 8 08:30:04 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Sat, 8 Aug 2015 08:30:04 -0400 Subject: [vtkusers] Dynamic field probing? In-Reply-To: <55C4EFA8.3040308@infolytica.com> References: <55C4EFA8.3040308@infolytica.com> Message-ID: You might use vtkValuePasses. This is a new class in vtk6.2 and note it has not yet been ported to the OpenGL2 backend but I need to do that in the next two months or so. See the tests for examples of its use. It was developed for Cinema. What it does is render specific arrays into the color buffer. Then with a pixel color and the min and max values of the array you can recover the value behind the pixel - within conversion to/from 24bit representation tolerance that is. It is similar to the way selection works but with this you will be able to skip the step of looking up the particular node/element behind the pixel before recovering the value. I have not yet used it for the exact purpose you describe, but I've meant to since before I wrote it and should be able to assist. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Aug 7, 2015 at 1:49 PM, Serge Lalonde wrote: > Hello VTK Users, > > I'm looking for for some pointers on adding dynamic field probing in my > window as the mouse moves over (or hovers) over a field being displayed. I > could implement it myself from scratch, but somehow I feel that there must > be a "VTK-approved" method of doing it. > > Something like this: > > > I found the vtkBalloonWidget and vtkProbeFilter, but I'm unsure how to use > them separately or together to get what I want. > > Any suggestions are welcome. Thanks! > -- > www.infolytica.com > 300 Leo Pariseau, Suite 2222, Montreal, QC, Canada, H2X 4B3 > (514) 849-8752 x236, Fax: (514) 849-4239 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jjgacegj.png Type: image/png Size: 5136 bytes Desc: not available URL: From sharmaatul11 at gmail.com Sun Aug 9 09:18:50 2015 From: sharmaatul11 at gmail.com (Atul) Date: Sun, 9 Aug 2015 06:18:50 -0700 (MST) Subject: [vtkusers] Augmented reality: Ascension technology , NDI spectra and VTK Message-ID: <1439126330085-5733366.post@n5.nabble.com> Hi there, I have been trying to develop an augmented reality system using position sensors and VTK. This augmented reality system would combine endoscope image with the 3D VTK model. I could successfully make an AR system with Ascension EM tracker, which can run on a torso phantom and its 3D model. The tracking of the real and virtual scenes looks good. However, when I replace EM tracker with the NDI spectra optical tracker in the same AR system the tracking of the real and the virtual scene does not look good (please look into the images below). Do I need to do some tweak to replace EM tracker with NDI Spectra optical tracker. Any help will be highly appreciated. Thanks Atul -- View this message in context: http://vtk.1045678.n5.nabble.com/Augmented-reality-Ascension-technology-NDI-spectra-and-VTK-tp5733366.html Sent from the VTK - Users mailing list archive at Nabble.com. From siavashk at ece.ubc.ca Sun Aug 9 14:55:57 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Sun, 9 Aug 2015 11:55:57 -0700 Subject: [vtkusers] Augmented reality: Ascension technology , NDI spectra and VTK In-Reply-To: <1439126330085-5733366.post@n5.nabble.com> References: <1439126330085-5733366.post@n5.nabble.com> Message-ID: <174F36FE-ED87-4B55-AFFC-08E0408273E6@ece.ubc.ca> Hi Atul, You are trying to solve a complicated problem that has already been solved. Have a look at: https://www.assembla.com/spaces/plus/wiki Siavash Sent from my iPhone > On Aug 9, 2015, at 6:18 AM, Atul wrote: > > Hi there, > > I have been trying to develop an augmented reality system using position > sensors and VTK. This augmented reality system would combine endoscope image > with the 3D VTK model. > I could successfully make an AR system with Ascension EM tracker, which can > run on a torso phantom and its 3D model. The tracking of the real and > virtual scenes looks good. > However, when I replace EM tracker with the NDI spectra optical tracker in > the same AR system the tracking of the real and the virtual scene does not > look good (please look into the images below). > Do I need to do some tweak to replace EM tracker with NDI Spectra optical > tracker. > Any help will be highly appreciated. > > Thanks > Atul > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Augmented-reality-Ascension-technology-NDI-spectra-and-VTK-tp5733366.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From totte at dunescientific.com Sun Aug 9 19:17:28 2015 From: totte at dunescientific.com (Totte Karlsson) Date: Sun, 9 Aug 2015 16:17:28 -0700 Subject: [vtkusers] altering a widgets response to mouse clicks Message-ID: <55C7DF88.4040700@dunescientific.com> Hello, When using a boxwidget, pressing the left button and moving the mouse allow the user to rotate the widget, while pressing the middle button and moving the mouse translates the widget. How can I switch the behavior of those two buttons? I.e. having the left button doing the translation and the middle button the rotation? -tk From cory.quammen at kitware.com Sun Aug 9 22:05:41 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Sun, 9 Aug 2015 22:05:41 -0400 Subject: [vtkusers] altering a widgets response to mouse clicks In-Reply-To: <55C7DF88.4040700@dunescientific.com> References: <55C7DF88.4040700@dunescientific.com> Message-ID: Totte, The typical way to do this would be to subclass vtkInteractorStyle and override the member functions OnLeftButtonDown() OnLeftButtonUp() OnMiddleButtonDown() OnMiddleButtonUp() to swap the functionality of the two. My guess is that you are using the vtkInteractorStyleTrackballActor, so you could subclass it and swap the definitions of the above member functions. Then, set an instance of your new class as the interactor style in your vtkRenderWindowInteractor. Hope that helps, Cory On Sun, Aug 9, 2015 at 7:17 PM, Totte Karlsson wrote: > Hello, > When using a boxwidget, pressing the left button and moving the mouse > allow the user to rotate the widget, > while pressing the middle button and moving the mouse translates the > widget. > > How can I switch the behavior of those two buttons? > I.e. having the left button doing the translation and the middle button > the rotation? > > -tk > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sharmaatul11 at gmail.com Sun Aug 9 23:30:49 2015 From: sharmaatul11 at gmail.com (Atul) Date: Sun, 9 Aug 2015 20:30:49 -0700 (MST) Subject: [vtkusers] SynchroGrab4D, vtk Polaris tracking In-Reply-To: References: <1437029880754-5732927.post@n5.nabble.com> <1437195414794-5732969.post@n5.nabble.com> Message-ID: <1439177449931-5733374.post@n5.nabble.com> Dear David, In past, I could successfully make an augmented reality (AR) system with NDI Ascension EM tracker, which can run on a torso phantom and its 3D model. The tracking of the real and virtual scenes looks fine. However, when I replace EM tracker with the NDI spectra optical tracker in the same AR system, the tracking of the real and the virtual scene does not look good. The behavior of NDI spectra and Ascesion EM tracker does not seem same. I was unsuccessful in finding any correlation between their behavior which would make my tracking correct. Do I need to do some tweak before I replace EM tracker with NDI Spectra optical tracker ? Please help if you had similar experience with EM tracker and optical tracker. Thank you. Atul -- View this message in context: http://vtk.1045678.n5.nabble.com/SynchroGrab4D-vtk-Polaris-tracking-tp4600704p5733374.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Sun Aug 9 23:51:52 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 9 Aug 2015 21:51:52 -0600 Subject: [vtkusers] SynchroGrab4D, vtk Polaris tracking In-Reply-To: <1439177449931-5733374.post@n5.nabble.com> References: <1437029880754-5732927.post@n5.nabble.com> <1437195414794-5732969.post@n5.nabble.com> <1439177449931-5733374.post@n5.nabble.com> Message-ID: Hi Atul, The behaviour of the systems should be very similar, the only real difference is the frame of reference. I.e. the frame of reference for the FOB tool will be different from the frame of reference for the Polaris tool, and the frame of reference for the FOB transmitter will be different from the frame of reference for the Polaris camera. Moving from one system to the other, you have to re-calibrate. - David On Sun, Aug 9, 2015 at 9:30 PM, Atul wrote: > Dear David, > > In past, I could successfully make an augmented reality (AR) system with > NDI > Ascension EM tracker, which can run on a torso phantom and its 3D model. > The > tracking of the real and virtual scenes looks fine. > However, when I replace EM tracker with the NDI spectra optical tracker in > the same AR system, the tracking of the real and the virtual scene does not > look good. The behavior of NDI spectra and Ascesion EM tracker does not > seem > same. I was unsuccessful in finding any correlation between their behavior > which would make my tracking correct. > > Do I need to do some tweak before I replace EM tracker with NDI Spectra > optical tracker ? Please help if you had similar experience with EM tracker > and optical tracker. > > Thank you. > Atul -------------- next part -------------- An HTML attachment was scrubbed... URL: From srinivas at rsageventures.com Mon Aug 10 02:18:37 2015 From: srinivas at rsageventures.com (Srinivas Sunkara) Date: Mon, 10 Aug 2015 11:48:37 +0530 Subject: [vtkusers] vtktiffreader displaying black Message-ID: <58067551-562E-4513-93B7-A315FBA3A57A@rsageventures.com> Hi, Im trying to read attached tiff file with this example code http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadTIFF , Initially I?m getting black image, with some mouse drag its displaying proper image. Do I have to set any extra parameters to get it right on first attempt. In completely other scenario vtkTIFFReader is trying to read DICOM file And is giving CanReadFile() status 3. Kindly help me in this regards. Thanks, Regards, Srinivas. Links: TIFF File : https://drive.google.com/open?id=0B_V3gNNUngm_RW1sV3hWM3BOcWM DICOM File : https://drive.google.com/open?id=0B_V3gNNUngm_RTBfdTBtS2hkMFU Screenshots : https://drive.google.com/open?id=0B_V3gNNUngm_RmNBUUlqbXo3THM https://drive.google.com/open?id=0B_V3gNNUngm_elhSaEdlNmJHS1k -------------- next part -------------- An HTML attachment was scrubbed... URL: From 419655660 at qq.com Mon Aug 10 03:26:10 2015 From: 419655660 at qq.com (louiskoo) Date: Mon, 10 Aug 2015 00:26:10 -0700 (MST) Subject: [vtkusers] 64 bit VTK jar and dll for Java Message-ID: <1439191570637-5733377.post@n5.nabble.com> I hava compiled the vtk with 64 bit jdk on win7 64 but failed and I have destressed for days. Anyone can send me the 64 bit dll and vtk.jar to louiskooliuxin at hotmail.com? I will appreciate that if you can help me. -- View this message in context: http://vtk.1045678.n5.nabble.com/64-bit-VTK-jar-and-dll-for-Java-tp5733377.html Sent from the VTK - Users mailing list archive at Nabble.com. From sharmaatul11 at gmail.com Mon Aug 10 04:07:07 2015 From: sharmaatul11 at gmail.com (Atul) Date: Mon, 10 Aug 2015 01:07:07 -0700 (MST) Subject: [vtkusers] Augmented reality: Ascension technology , NDI spectra and VTK In-Reply-To: <174F36FE-ED87-4B55-AFFC-08E0408273E6@ece.ubc.ca> References: <1439126330085-5733366.post@n5.nabble.com> <174F36FE-ED87-4B55-AFFC-08E0408273E6@ece.ubc.ca> Message-ID: Hi Saivash, Thank you so much for response. I am looking into the link you sent. However, since I could make AR with EM tracker with VTK+OpenCV, I thought it would be easy to just replace EM tracker with optical tracker. I guess, we need to provide NDI tools local reference frame correctly to make proper real and virtual alignment. It would be great if you could provide some insight into that. Thanks for you help. Regards, Atul On Mon, Aug 10, 2015 at 2:56 AM, Siavash Khallaghi [via VTK] < ml-node+s1045678n5733368h59 at n5.nabble.com> wrote: > Hi Atul, > > You are trying to solve a complicated problem that has already been > solved. Have a look at: https://www.assembla.com/spaces/plus/wiki > > Siavash > > Sent from my iPhone > > > On Aug 9, 2015, at 6:18 AM, Atul <[hidden email] > > wrote: > > > > Hi there, > > > > I have been trying to develop an augmented reality system using position > > sensors and VTK. This augmented reality system would combine endoscope > image > > with the 3D VTK model. > > I could successfully make an AR system with Ascension EM tracker, which > can > > run on a torso phantom and its 3D model. The tracking of the real and > > virtual scenes looks good. > > However, when I replace EM tracker with the NDI spectra optical tracker > in > > the same AR system the tracking of the real and the virtual scene does > not > > look good (please look into the images below). > > Do I need to do some tweak to replace EM tracker with NDI Spectra > optical > > tracker. > > Any help will be highly appreciated. > > > > Thanks > > Atul > > > > > > > > > > > > -- > > View this message in context: > http://vtk.1045678.n5.nabble.com/Augmented-reality-Ascension-technology-NDI-spectra-and-VTK-tp5733366.html > > Sent from the VTK - Users mailing list archive at Nabble.com. > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://vtk.1045678.n5.nabble.com/Augmented-reality-Ascension-technology-NDI-spectra-and-VTK-tp5733366p5733368.html > To unsubscribe from Augmented reality: Ascension technology , NDI spectra > and VTK, click here > > . > NAML > > -- Atul Kumar MBBS MMST PhD Research Fellow IRCAD-Taiwan -- View this message in context: http://vtk.1045678.n5.nabble.com/Augmented-reality-Ascension-technology-NDI-spectra-and-VTK-tp5733366p5733378.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ke.manjunath at gmail.com Mon Aug 10 07:00:23 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Mon, 10 Aug 2015 16:30:23 +0530 Subject: [vtkusers] GetRange() not working properly with Python VTK 6.2 on ubuntu 14.04 Message-ID: Hi , I have executed the following code in VTKPYTHON interpreter. (6.2 version) ================================= >>> from vtk import * >>> obj=vtkFloatArray() >>> obj.SetNumberOfValues(5) >>> obj.SetValue(0,1) >>> obj.SetValue(1,2) >>> obj.SetValue(2,3) >>> obj.SetValue(3,4) >>> obj.SetValue(4,5) >>> obj.SetValue(5,6) >>> obj.GetRange() *(0.0, 0.0)* =========================== >From the above code, it can be seen that the GetRange() function is not working properly. Although, the range of "obj" is (1,6), it is printing incorrectly as (0,0). Could any1 pls help me in solving this. Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindeval.ufrr at gmail.com Mon Aug 10 07:47:44 2015 From: lindeval.ufrr at gmail.com (Lindeval Lima) Date: Mon, 10 Aug 2015 07:47:44 -0400 Subject: [vtkusers] GetRange() not working properly with Python VTK 6.2 on ubuntu 14.04 In-Reply-To: References: Message-ID: The obj array has five elements and you assigned 6. 2015-08-10 7:00 GMT-04:00 Manjunath K E : > Hi , > > I have executed the following code in VTKPYTHON interpreter. (6.2 version) > > ================================= > >>> from vtk import * > >>> obj=vtkFloatArray() > >>> obj.SetNumberOfValues(5) > >>> obj.SetValue(0,1) > >>> obj.SetValue(1,2) > >>> obj.SetValue(2,3) > >>> obj.SetValue(3,4) > >>> obj.SetValue(4,5) > >>> obj.SetValue(5,6) > >>> obj.GetRange() > *(0.0, 0.0)* > =========================== > > > From the above code, it can be seen that the GetRange() function is not > working properly. > Although, the range of "obj" is (1,6), it is printing incorrectly as (0,0). > > Could any1 pls help me in solving this. > > > Thanks and Regards, > > Manjunath K E > Help Ever Hurt Never > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *Prof. Lindeval Fernandes de Lima* *Telefones para contato*: Celular: (095) 81215424 Coordena??o EaD: (095) 3624 - 6426 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Aug 10 09:59:10 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 10 Aug 2015 09:59:10 -0400 Subject: [vtkusers] Change scalarbar labels In-Reply-To: <6715FAF3-07B0-42D2-83B6-32B1BA50E48D@gmail.com> References: <6715FAF3-07B0-42D2-83B6-32B1BA50E48D@gmail.com> Message-ID: VTK 5.4 is now 6 years old, and 5.6 is 4 years old. Can you update to a more recent version? On Tue, Aug 4, 2015 at 11:57 AM, Ich wrote: > Hi, Cory, > > Thank for replying. But I'm using vtk 5.4 now. There is no such a > SetAnnotation function in > ScalartoColor Class(I have seen that in vtk 6.x this is this function, > because what i have done is > in a project, so i just use vtk 5.6). > > I have tried to override SetLabelFormat() in Class vtkScalarBarActor(), > if it is just with (with > python) self.LabelFormat = '***(something else)', it will not change > Annotation, but LabelFormat > in this instance is actually changed. > > So I think, it must have something happened in function SetLabelFormat(), > not just with > self.LabelFormat = '*****'. > Perhaps if I could see content of this function, perhaps i can change > annotations freely. > > So question is, could you give me some advice in vtk 5.4 for changing > annotation in scalar bar,. > > Or could you give me the code of this function SetLabelFormat(char*),, in > vkt5.4 it should be SetMacroString(LabelFormat, char*). > > Thanks again for your help. > Jan > > Am 15.07.2015 um 15:51 schrieb Cory Quammen : > > Jan, > > Unless you can figure out the printf formatting string that gives you what > you want, you'll need to use annotations instead of the labels. You can set > annotated values with vtkScalarsToColors::SetAnnotation(vtkVariant, > vtkStdString), e.g. > > lookupTable->SetAnnotation(0.0, "0"); > lookupTable->SetAnnotation(0.2, "200e-03"); > etc. > > Then you'll need to display the annotations with > > vtkScalarBarActor::SetDrawAnnotations(1); > > Hope that helps, > Cory > > On Mon, Jul 13, 2015 at 5:31 AM, Jan wrote: > >> Hallo, everyone, >> >> Now I want to set new strings in position of scalarbar labels. >> For example, the range of value is 0 - 1, and with numberofLabels(6). But >> I >> want the display instead of 0 0.2 0.4 0.6 0.8 1.0 but with form of 0 >> 200e-03 >> 400e-03 600e-03 800e -03 1.0. The Problem is that FormatofLabels doesn't >> help >> support these strings. So what could I do perhaps with >> AllocateAndSizeLabels() in ScalarbarActor or with other methods to change >> the >> format of nummers in this way? >> >> Thanks alot. >> >> Jan >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sharmaatul11 at gmail.com Mon Aug 10 10:57:45 2015 From: sharmaatul11 at gmail.com (Atul) Date: Mon, 10 Aug 2015 07:57:45 -0700 (MST) Subject: [vtkusers] SynchroGrab4D, vtk Polaris tracking In-Reply-To: References: <1437029880754-5732927.post@n5.nabble.com> <1437195414794-5732969.post@n5.nabble.com> <1439177449931-5733374.post@n5.nabble.com> Message-ID: Thank you so much David. As you suggested in this email, I had already followed them in my code. There were some error in code besides one obvious error which was multiplication of tooltipcalibration matrix (we need to post-multiply the tooltipcalibration matrix to the tooltransform matrix, I was pre-multiplying it). I corrected all of them and now the system is working as with EM tracker. Your help played a great role in making this system. Our team appreciate your help a lot. Regards, Atul On Mon, Aug 10, 2015 at 11:52 AM, David Gobbi [via VTK] < ml-node+s1045678n5733375h76 at n5.nabble.com> wrote: > Hi Atul, > > The behaviour of the systems should be very similar, the only real > difference is the frame of reference. I.e. the frame of reference for the > FOB tool will be different from the frame of reference for the Polaris > tool, and the frame of reference for the FOB transmitter will be different > from the frame of reference for the Polaris camera. Moving from one system > to the other, you have to re-calibrate. > > - David > > On Sun, Aug 9, 2015 at 9:30 PM, Atul <[hidden email] > > wrote: > >> Dear David, >> >> In past, I could successfully make an augmented reality (AR) system with >> NDI >> Ascension EM tracker, which can run on a torso phantom and its 3D model. >> The >> tracking of the real and virtual scenes looks fine. >> However, when I replace EM tracker with the NDI spectra optical tracker >> in >> the same AR system, the tracking of the real and the virtual scene does >> not >> look good. The behavior of NDI spectra and Ascesion EM tracker does not >> seem >> same. I was unsuccessful in finding any correlation between their behavior >> which would make my tracking correct. >> >> Do I need to do some tweak before I replace EM tracker with NDI Spectra >> optical tracker ? Please help if you had similar experience with EM >> tracker >> and optical tracker. >> >> Thank you. >> Atul > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://vtk.1045678.n5.nabble.com/SynchroGrab4D-vtk-Polaris-tracking-tp4600704p5733375.html > To unsubscribe from SynchroGrab4D, vtk Polaris tracking, click here > > . > NAML > > -- Atul Kumar MBBS MMST PhD Research Fellow IRCAD-Taiwan -- View this message in context: http://vtk.1045678.n5.nabble.com/SynchroGrab4D-vtk-Polaris-tracking-tp4600704p5733387.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From serge at infolytica.com Mon Aug 10 11:10:49 2015 From: serge at infolytica.com (Serge Lalonde) Date: Mon, 10 Aug 2015 11:10:49 -0400 Subject: [vtkusers] Dynamic field probing? In-Reply-To: References: <55C4EFA8.3040308@infolytica.com> Message-ID: <55C8BEF9.4090701@infolytica.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 5136 bytes Desc: not available URL: From ke.manjunath at gmail.com Mon Aug 10 11:11:59 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Mon, 10 Aug 2015 20:41:59 +0530 Subject: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04) Message-ID: > > Hi Dan Lipsa, > > > I checked out vtk 6.2 as per the instructions in > https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/download.md > > I rebuilt VTK and when I try to run the following code, the problem of > GetRange() still persists. > > >>> from vtk import * > >>> reader = vtkNetCDFCFReader() > >>> reader.SetFileName("3d.nc") > >>> reader.SphericalCoordinatesOff() > >>> reader.SetReplaceFillValueWithNan(1) > >>> reader.Update() > >>> > reader.GetOutput().GetPointData().SetScalars(reader.GetOutput().GetPointData().GetArray("SAL")) > 0 > >>> reader.UpdateMetaData() > 1 > >>> reader.Update() > >>> reader.UpdateInformation() > >>> reader.GetOutput().GetPointData().GetScalars().GetRange() > (nan, nan) > > Although the range is (28.04-36.88), but I get (nan, nan). Please help me. > > Thanks and Regards, > Manjunath K E > > ---------- Forwarded message ---------- > From: Dan Lipsa > Date: Wed, Aug 5, 2015 at 8:06 PM > Subject: Re: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on > ubuntu 14.04) > To: Manjunath K E , VTK Users > > > Manjunath, > I get a range rather than NaN when I run it on my machine with the latest > VTK from git master. > > Range of SAL: 28.04-36.88 > > I do have error complaining about missing > sliceOn.jpg and sliceOff.jpg. > > Could you try your example on the latest VTK master (your have to build > it) > > > http://www.vtk.org/Wiki/VTK/Configure_and_Build > > or on VTK 6.3 rc1? > http://www.vtk.org/download/ > > I am not sure what your other python error is, maybe related to > > http://stackoverflow.com/questions/15608236/eclipse-and-google-app-engine-importerror-no-module-named-sysconfigdata-nd-u > > > On Wed, Aug 5, 2015 at 9:41 AM, Manjunath K E > wrote: > >> Hi Dan Lipsa, >> >> Please find the required file "3d.nc" and the python code is attached >> in "datareader.py1". >> >> The problem is that the *a,b = reader.GetOutput().* >> *GetPointData().GetScalars().**GetRange() *is returning NaN value. >> >> one more thing I found was, when I start *"vtkpython**"* by keeping *"* >> */usr/lib/python2.7**" *in *"PYTHONPATH**" *then following error will be >> obtained. If I remove *"**/usr/lib/python2.7" *from *"PYTHONPATH**"*, I >> wont get any error. >> >> export >> PYTHONPATH=/usr/lib/python2.7:/usr/local/lib/python2.7/site-packages:$PYTHONPATH >> >> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >> vtkpython >> vtk version 6.2.0 >> Traceback (most recent call last): >> File "/usr/lib/python2.7/site.py", line 563, in >> main() >> File "/usr/lib/python2.7/site.py", line 545, in main >> known_paths = addusersitepackages(known_paths) >> File "/usr/lib/python2.7/site.py", line 272, in addusersitepackages >> user_site = getusersitepackages() >> File "/usr/lib/python2.7/site.py", line 247, in getusersitepackages >> user_base = getuserbase() # this will also set USER_BASE >> File "/usr/lib/python2.7/site.py", line 237, in getuserbase >> USER_BASE = get_config_var('userbase') >> File "/usr/lib/python2.7/sysconfig.py", line 578, in get_config_var >> return get_config_vars().get(name) >> File "/usr/lib/python2.7/sysconfig.py", line 524, in get_config_vars >> _init_posix(_CONFIG_VARS) >> File "/usr/lib/python2.7/sysconfig.py", line 408, in _init_posix >> from _sysconfigdata import build_time_vars >> File "/usr/lib/python2.7/_sysconfigdata.py", line 6, in >> from _sysconfigdata_nd import * >> ImportError: No module named _sysconfigdata_nd >> >> >> Thanks and Regards, >> >> Manjunath K E >> Help Ever Hurt Never >> >> >> On Tue, Aug 4, 2015 at 10:15 PM, Dan Lipsa wrote: >> >>> It would be great if you could share your data as well so that I can >>> check it with my installation. Thanks, >>> Dan >>> >>> >>> On Tue, Aug 4, 2015 at 11:31 AM Manjunath K E >>> wrote: >>> >>>> Hi Dan Lipsa, >>>> >>>> Thanks for the reply. The error is occurring during runtime. There was >>>> no error, when i ran it in interpreter. All the lines in the script >>>> executed smoothly. >>>> I have tested the same code using vtk 6.0.0 there was no error. >>>> >>>> Also, the output that i get is not proper. There is problem in the >>>> color map of the output produced. The scale bar is not displayed properly. >>>> ========================================== >>>> #!/usr/bin/env python >>>> from vtk import * >>>> >>>> reader = vtkNetCDFCFReader() >>>> reader.SetFileName("3d.nc") >>>> reader.SphericalCoordinatesOff() >>>> reader.SetOutputType(6) >>>> reader.SetReplaceFillValueWithNan(1) >>>> reader.Update() >>>> #Copy SAL Array to scalar value field of point data ..this makes point >>>> data to point to SAL array >>>> >>>> reader.GetOutput().GetPointData().SetScalars(reader.GetOutput().GetPointData().GetArray("SAL")) >>>> reader.UpdateMetaData() >>>> reader.Update() >>>> reader.UpdateInformation() >>>> output = reader.GetOutput() >>>> >>>> a,b = reader.GetOutput().GetPointData().GetScalars().GetRange() >>>> lut = vtk.vtkColorTransferFunction() >>>> lut.AddRGBPoint(a, 0.0, 0.0, 0.8) >>>> lut.AddRGBPoint(a+(b-a)/4, 0.0, 0.5, 0.5) >>>> lut.AddRGBPoint(a+(b-a)/2, 0.0, 1.0, 0.0) >>>> lut.AddRGBPoint(b-(b-a)/4, 0.5, 0.5, 0.0) >>>> lut.AddRGBPoint(b, 1.0, 0.0, 0.0) >>>> lut.SetNanColor(0,0,1) >>>> >>>> # the mapper that will use the lookup table >>>> mapper = vtkDataSetMapper() >>>> mapper.SetInputData(reader.GetOutput()) >>>> mapper.SetScalarModeToUsePointData() >>>> mapper.SetLookupTable(lut) >>>> mapper.SetScalarRange(a,b) >>>> # the actor >>>> gridActor = vtkActor() >>>> gridActor.SetMapper( mapper ) >>>> scaleBarActor = vtkScalarBarActor() >>>> scaleBarActor.SetLookupTable( mapper.GetLookupTable() ) >>>> scaleBarActor.SetTitle("Color Map for Point Data") >>>> scaleBarActor.SetOrientationToHorizontal() >>>> scaleBarActor.GetLabelTextProperty().SetColor(0,0,1) >>>> scaleBarActor.GetTitleTextProperty().SetColor(0,0,1) >>>> >>>> # position it in window >>>> coord = scaleBarActor.GetPositionCoordinate() >>>> coord.SetCoordinateSystemToNormalizedViewport() >>>> coord.SetValue(0.1,0.05) >>>> scaleBarActor.SetWidth(.5) >>>> scaleBarActor.SetHeight(.1) >>>> >>>> # renderer and render window >>>> renderer = vtkRenderer() >>>> renderer.SetBackground(1, 1, 1) >>>> renderer.SetGradientBackground(1) # Set background to white >>>> renWindow = vtk.vtkRenderWindow() >>>> renWindow.SetSize(512, 512) >>>> renWindow.AddRenderer( renderer ) >>>> >>>> # render window interactor >>>> renWinInteractor = vtkRenderWindowInteractor() >>>> renWinInteractor.SetRenderWindow( renWindow ) >>>> # add the actors to the renderer >>>> renderer.AddActor( gridActor ) >>>> renderer.AddActor( scaleBarActor ) >>>> >>>> #show axes >>>> axesActor = vtkAxesActor() >>>> widget = vtkOrientationMarkerWidget() >>>> widget.SetOrientationMarker( axesActor ) >>>> widget.SetInteractor( renWinInteractor ) >>>> widget.SetViewport( 0.0, 0.0, 0.4, 0.4 ) >>>> widget.SetEnabled( 1 ) >>>> widget.InteractiveOff() >>>> >>>> # render >>>> renderer.ResetCamera(); >>>> renWindow.Render() >>>> # initialize and start the interactor >>>> renWinInteractor.Initialize() >>>> renWinInteractor.Start() >>>> ================================================== >>>> >>>> >>>> Thanks and Regards, >>>> >>>> Manjunath K E >>>> Help Ever Hurt Never >>>> >>>> >>>> On Tue, Aug 4, 2015 at 12:31 AM, Dan Lipsa >>>> wrote: >>>> >>>>> Manjunath, >>>>> Can you share the script you are trying to run? This seems like a >>>>> problem with the script rather than an installation issue. >>>>> >>>>> On Mon, Aug 3, 2015 at 2:16 PM Manjunath K E >>>>> wrote: >>>>> >>>>>> Hi Shawn, >>>>>> >>>>>> I followed your instructions, now the vtk importing problem is >>>>>> solved. >>>>>> But, following error is obtained >>>>>> >>>>>> ERROR: In >>>>>> /home/kitware/Desktop/vtkbuild/build/vtk/src/vtk/Rendering/OpenGL/vtkOpenGLTexture.cxx, >>>>>> line 200 >>>>>> vtkOpenGLTexture (0x2f2ac90): No scalar values found for texture >>>>>> input! >>>>>> >>>>>> The error is seen for every frame >>>>>> >>>>>> Thanks and Regards, >>>>>> >>>>>> Manjunath K E >>>>>> Help Ever Hurt Never >>>>>> >>>>>> >>>>>> On Mon, Aug 3, 2015 at 11:36 PM, Shawn Waldon < >>>>>> shawn.waldon at kitware.com> wrote: >>>>>> >>>>>>> Hi Manjunath, >>>>>>> >>>>>>> Please keep discussions on the list so that others can benefit later. >>>>>>> >>>>>>> I haven't used an install tree on Linux for a while but according to >>>>>>> my notes you should need the following assuming it is installed to >>>>>>> /usr/local: >>>>>>> >>>>>>> export >>>>>>> LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_PATH >>>>>>> >>>>>>> export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH >>>>>>> >>>>>>> HTH, >>>>>>> Shawn >>>>>>> >>>>>>> On Mon, Aug 3, 2015 at 1:59 PM, Manjunath K E < >>>>>>> ke.manjunath at gmail.com> wrote: >>>>>>> >>>>>>>> Hi Shawn >>>>>>>> >>>>>>>> Thanks for the reply. >>>>>>>> My python script is set up to use the system's python not vtkpython. >>>>>>>> >>>>>>>> I have set export >>>>>>>> PYTHONPATH="/usr/local/lib/python2.7/site-packages/vtk/:$PYTHONPATH". >>>>>>>> export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH >>>>>>>> >>>>>>>> I have installed vtk-6.2 to /usr/local. >>>>>>>> >>>>>>>> Is the should i change the values of PYTHONPATH and LD_LIBRARY_PATH >>>>>>>> to something else. >>>>>>>> >>>>>>>> Thanks and Regards, >>>>>>>> >>>>>>>> Manjunath K E >>>>>>>> Help Ever Hurt Never >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Aug 3, 2015 at 11:17 PM, Shawn Waldon < >>>>>>>> shawn.waldon at kitware.com> wrote: >>>>>>>> >>>>>>>>> Hi Manjunath, >>>>>>>>> >>>>>>>>> Is your python script set up to use vtkpython as the interpreter? >>>>>>>>> Or is it using the system's python? If you are trying to import vtk from >>>>>>>>> system python you have to set your LD_LIBRARY_PATH and PYTHONPATH >>>>>>>>> environment variables. If you want to change the script to use vtkpython >>>>>>>>> then change the first like to #!/path/to/vtkpython >>>>>>>>> >>>>>>>>> HTH, >>>>>>>>> Shawn >>>>>>>>> >>>>>>>>> On Mon, Aug 3, 2015 at 1:43 PM, Manjunath K E < >>>>>>>>> ke.manjunath at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Hi all >>>>>>>>>> >>>>>>>>>> I have installed VTK 6.2 along with vtk 6.2 python interface on >>>>>>>>>> ubuntu 14.04 manually. >>>>>>>>>> >>>>>>>>>> When I run vtkpython in interpreter mode, the import of vtk is >>>>>>>>>> successful. >>>>>>>>>> It doesn't have any problem and the same is shown below. >>>>>>>>>> >>>>>>>>>> =========================================================== >>>>>>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>>>>>> vtkpython >>>>>>>>>> vtk version 6.2.0 >>>>>>>>>> Python 2.7.2 (default, Feb 12 2015, 18:30:44) >>>>>>>>>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>>>>>>>>> Type "help", "copyright", "credits" or "license" for more >>>>>>>>>> information. >>>>>>>>>> >>> from vtk import * >>>>>>>>>> >>> print vtk >>>>>>>>>> >>>>>>>>> '/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'> >>>>>>>>>> >>> >>>>>>>>>> =========================================================== >>>>>>>>>> >>>>>>>>>> But, If i run a python script then an error is obtained for this >>>>>>>>>> line "from vtk import *". The error is as shown below. >>>>>>>>>> =========================================================== >>>>>>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>>>>>> ./demo1.py >>>>>>>>>> Traceback (most recent call last): >>>>>>>>>> File "./demo1.py", line 6, in >>>>>>>>>> from vtk import * >>>>>>>>>> ImportError: No module named vtk >>>>>>>>>> =========================================================== >>>>>>>>>> >>>>>>>>>> Please help me in solving this issue. I appreciate your time and >>>>>>>>>> help. >>>>>>>>>> >>>>>>>>>> Thanks and Regards, >>>>>>>>>> >>>>>>>>>> Manjunath K E >>>>>>>>>> Help Ever Hurt Never >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Powered by www.kitware.com >>>>>>>>>> >>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>> >>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>> >>>>>>>>>> Search the list archives at: >>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>> >>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>> >>>> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ke.manjunath at gmail.com Mon Aug 10 11:16:42 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Mon, 10 Aug 2015 20:46:42 +0530 Subject: [vtkusers] Intsall python vtk6.2 Message-ID: Hi all, I am trying to install vtk-python 6.2. I have downloaded "Python Interface" for linux ( vtkpython-6.2.0-Linux-64bit.tar.gz ) from http://www.vtk.org/download/. I have untarred it and copied the contents to "/usr/local" directory, where my vtk-6.2 is installed. Could anyone please confirm, whether the installation is correct or not. Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From sharmaatul11 at gmail.com Mon Aug 10 11:21:27 2015 From: sharmaatul11 at gmail.com (Atul) Date: Mon, 10 Aug 2015 08:21:27 -0700 (MST) Subject: [vtkusers] Augmented reality: Ascension technology , NDI spectra and VTK In-Reply-To: <174F36FE-ED87-4B55-AFFC-08E0408273E6@ece.ubc.ca> References: <1439126330085-5733366.post@n5.nabble.com> <174F36FE-ED87-4B55-AFFC-08E0408273E6@ece.ubc.ca> Message-ID: <46200216-F201-4DC7-A9FF-B4D57231E4E0@gmail.com> There were some error in my code. After correction I could make the system with optical tracker too. Thanks, Atul Sent from my iPhone > On Aug 10, 2015, at 4:06 PM, Atul Kumar wrote: > > Hi Saivash, > > Thank you so much for response. I am looking into the link you sent. > However, since I could make AR with EM tracker with VTK+OpenCV, I thought it would be easy to just replace EM tracker with optical tracker. > I guess, we need to provide NDI tools local reference frame correctly to make proper real and virtual alignment. > It would be great if you could provide some insight into that. > > Thanks for you help. > > Regards, > Atul > >> On Mon, Aug 10, 2015 at 2:56 AM, Siavash Khallaghi [via VTK] wrote: >> Hi Atul, >> >> You are trying to solve a complicated problem that has already been solved. Have a look at: https://www.assembla.com/spaces/plus/wiki >> >> Siavash >> >> Sent from my iPhone >> >> > On Aug 9, 2015, at 6:18 AM, Atul <[hidden email]> wrote: >> > >> > Hi there, >> > >> > I have been trying to develop an augmented reality system using position >> > sensors and VTK. This augmented reality system would combine endoscope image >> > with the 3D VTK model. >> > I could successfully make an AR system with Ascension EM tracker, which can >> > run on a torso phantom and its 3D model. The tracking of the real and >> > virtual scenes looks good. >> > However, when I replace EM tracker with the NDI spectra optical tracker in >> > the same AR system the tracking of the real and the virtual scene does not >> > look good (please look into the images below). >> > Do I need to do some tweak to replace EM tracker with NDI Spectra optical >> > tracker. >> > Any help will be highly appreciated. >> > >> > Thanks >> > Atul >> > >> > >> > >> > >> > >> > -- >> > View this message in context: http://vtk.1045678.n5.nabble.com/Augmented-reality-Ascension-technology-NDI-spectra-and-VTK-tp5733366.html >> > Sent from the VTK - Users mailing list archive at Nabble.com. >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> If you reply to this email, your message will be added to the discussion below: >> http://vtk.1045678.n5.nabble.com/Augmented-reality-Ascension-technology-NDI-spectra-and-VTK-tp5733366p5733368.html >> To unsubscribe from Augmented reality: Ascension technology , NDI spectra and VTK, click here. >> NAML > > > > -- > Atul Kumar > MBBS MMST PhD > Research Fellow > IRCAD-Taiwan -- View this message in context: http://vtk.1045678.n5.nabble.com/Augmented-reality-Ascension-technology-NDI-spectra-and-VTK-tp5733366p5733392.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Mon Aug 10 11:26:58 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 10 Aug 2015 09:26:58 -0600 Subject: [vtkusers] 64 bit VTK jar and dll for Java In-Reply-To: <1439191570637-5733377.post@n5.nabble.com> References: <1439191570637-5733377.post@n5.nabble.com> Message-ID: You should be able to get it from our nightly build here: VTK-6.3.0-Windows-64bit.zip The permanent link for all platforms is here: https://open.cdash.org/index.php?project=VTK&filtercount=1&field1=groupname/string&compare1=63&value1=super For now, you still have to unpack the native library part and make sure you setup your environment variable PATH/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH accordingly for Win/Linux/OSX. Good luck, Seb On Mon, Aug 10, 2015 at 1:26 AM, louiskoo <419655660 at qq.com> wrote: > I hava compiled the vtk with 64 bit jdk on win7 64 but failed and I have > destressed for days. Anyone can send me the 64 bit dll and vtk.jar to > louiskooliuxin at hotmail.com? > I will appreciate that if you can help me. > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/64-bit-VTK-jar-and-dll-for-Java-tp5733377.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From draktharrblorf at gmail.com Mon Aug 10 11:52:25 2015 From: draktharrblorf at gmail.com (Drak) Date: Mon, 10 Aug 2015 08:52:25 -0700 (MST) Subject: [vtkusers] Rotating a vtk actor using world coordinates Message-ID: <1439221945146-5733395.post@n5.nabble.com> Is there any way to rotate an actor using world coordinates while choosing the center of rotation? What I want is to be able to translate and rotate my actor using world coordinates, and not the coordinates of the actor. For example. If I use actor->RotateX(45); actor->RotateY(45); my actor will rotate around its center, but its second rotation in y will be applied using the axis of the actor. If I use this instead actor->RotateWXYZ(45, 1, 0, 0); actor->RotateWXYZ(45, 0, 1, 0); My actor will rotate using the world coordinates like I want for both rotation, but will only rotate around the center of the world, and not the center of the actor... Can I rotate around both the center of the actor and using the world axes coordinates? -- View this message in context: http://vtk.1045678.n5.nabble.com/Rotating-a-vtk-actor-using-world-coordinates-tp5733395.html Sent from the VTK - Users mailing list archive at Nabble.com. From audrius at tomographix.com Mon Aug 10 11:55:07 2015 From: audrius at tomographix.com (Audrius Stundzia) Date: Mon, 10 Aug 2015 11:55:07 -0400 Subject: [vtkusers] vtk 6.2.0 | CMake 3.3.0 crash report Message-ID: <1439222107.631988.352417049.7C4935C5@webmail.messagingengine.com> OS: Windows 10 x64 IDE: Visual Studio 2015 CMake: 3.3.0 VTK: 6.2.0 Crash during CMake "Configure" at line HDF5: Checking for appropriate format for 64 bit long: Pop up VS error message: Debug Assertion Failed Expression("Invalid integer length modifier", 0) Repeatedly hitting "Ignore" on the pop up window generates HDF5: Checking for appropriate format for 64 bit long: HDF5: Width with l64 failed with result: 3 HDF5: Width with l failed with result: 3 HDF5: Width with L failed with result: 3 HDF5: Width with q failed with result: 3 HDF5: Width with I64 failed with result: 3 HDF5: Width with ll failed with result: 3 HDF5: Checking for apropriate format for 64 bit long: not found Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Aug 10 12:42:52 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 10 Aug 2015 10:42:52 -0600 Subject: [vtkusers] SynchroGrab4D, vtk Polaris tracking In-Reply-To: References: <1437029880754-5732927.post@n5.nabble.com> <1437195414794-5732969.post@n5.nabble.com> <1439177449931-5733374.post@n5.nabble.com> Message-ID: Hi Atul, I'm glad to hear that you were successful. The pre-multiply versus post-multiply in vtkTransform is tricky. - David On Mon, Aug 10, 2015 at 8:57 AM, Atul wrote: > Thank you so much David. As you suggested in this email, I had already > followed them in my code. There were some error in code besides one obvious > error which was multiplication of tooltipcalibration matrix (we need to > post-multiply the tooltipcalibration matrix to the tooltransform matrix, I > was pre-multiplying it). I corrected all of them and now the system is > working as with EM tracker. > Your help played a great role in making this system. Our team appreciate > your help a lot. > > Regards, > Atul > > On Mon, Aug 10, 2015 at 11:52 AM, David Gobbi [via VTK] <[hidden email] > > wrote: > >> Hi Atul, >> >> The behaviour of the systems should be very similar, the only real >> difference is the frame of reference. I.e. the frame of reference for the >> FOB tool will be different from the frame of reference for the Polaris >> tool, and the frame of reference for the FOB transmitter will be different >> from the frame of reference for the Polaris camera. Moving from one system >> to the other, you have to re-calibrate. >> >> - David >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From draktharrblorf at gmail.com Mon Aug 10 12:53:33 2015 From: draktharrblorf at gmail.com (Drak) Date: Mon, 10 Aug 2015 09:53:33 -0700 (MST) Subject: [vtkusers] Rotating a vtk actor using world coordinates In-Reply-To: <1439221945146-5733395.post@n5.nabble.com> References: <1439221945146-5733395.post@n5.nabble.com> Message-ID: <1439225613355-5733398.post@n5.nabble.com> I should add that I'm using the vtkImageActor with a vtkImageData as a source. It seems that my point of rotation is the bottom left of my image -- View this message in context: http://vtk.1045678.n5.nabble.com/Rotating-a-vtk-actor-using-world-coordinates-tp5733395p5733398.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon Aug 10 13:08:22 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 10 Aug 2015 11:08:22 -0600 Subject: [vtkusers] Rotating a vtk actor using world coordinates In-Reply-To: <1439225613355-5733398.post@n5.nabble.com> References: <1439221945146-5733395.post@n5.nabble.com> <1439225613355-5733398.post@n5.nabble.com> Message-ID: Hi Drak, Generally it's better design to build a transform or matrix and then apply that to the actor via SetUserTransform() or SetUserMatrix(). That way, the transform or matrix is available to you if you have to move other points or actors between coordinate systems. To rotate around a point in space, you have to apply a translation to put that point at the origin, then do the rotation, and then translate back again. - David On Mon, Aug 10, 2015 at 10:53 AM, Drak wrote: > I should add that I'm using the vtkImageActor with a vtkImageData as a > source. It seems that my point of rotation is the bottom left of my image > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfavre at cscs.ch Mon Aug 10 13:33:57 2015 From: jfavre at cscs.ch (Favre Jean) Date: Mon, 10 Aug 2015 17:33:57 +0000 Subject: [vtkusers] SC '15 Scientific Visualization Showcase Message-ID: <0EB9B6375711A04B820E6B6F5CCA9F6841F24610@MBX211.d.ethz.ch> Folks, there has been several requests to push the deadline for submission of the Supercomputing`15 Scientific Visualization Showcase; A new and final deadline for submission has been set to 2015-08-21 23:59, AOE see details at; http://sc15.supercomputing.org/program/scientific-visualization-showcase We look forward to great visualizations and analytics showcases. ----------------- Jean M. Favre SC15 Scientific Visualization Showcase Chair -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon Aug 10 16:10:48 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 10 Aug 2015 20:10:48 +0000 Subject: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04) In-Reply-To: References: Message-ID: Manjunath, Can you try 6.3.0.rc1 rather than 6.2.0? As I said I tried your example on my build of VTK (which was a recent version from the git repository) and I did not get the error you are seeing. Dan On Mon, Aug 10, 2015 at 11:12 AM Manjunath K E wrote: > Hi Dan Lipsa, >> >> >> I checked out vtk 6.2 as per the instructions in >> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/download.md >> >> I rebuilt VTK and when I try to run the following code, the problem of >> GetRange() still persists. >> >> >>> from vtk import * >> >>> reader = vtkNetCDFCFReader() >> >>> reader.SetFileName("3d.nc") >> >>> reader.SphericalCoordinatesOff() >> >>> reader.SetReplaceFillValueWithNan(1) >> >>> reader.Update() >> >>> >> reader.GetOutput().GetPointData().SetScalars(reader.GetOutput().GetPointData().GetArray("SAL")) >> 0 >> >>> reader.UpdateMetaData() >> 1 >> >>> reader.Update() >> >>> reader.UpdateInformation() >> >>> reader.GetOutput().GetPointData().GetScalars().GetRange() >> (nan, nan) >> >> Although the range is (28.04-36.88), but I get (nan, nan). Please help me. >> >> Thanks and Regards, >> Manjunath K E >> >> ---------- Forwarded message ---------- >> From: Dan Lipsa >> Date: Wed, Aug 5, 2015 at 8:06 PM >> Subject: Re: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on >> ubuntu 14.04) >> To: Manjunath K E , VTK Users >> >> >> Manjunath, >> I get a range rather than NaN when I run it on my machine with the latest >> VTK from git master. >> >> Range of SAL: 28.04-36.88 >> >> I do have error complaining about missing >> sliceOn.jpg and sliceOff.jpg. >> >> Could you try your example on the latest VTK master (your have to build >> it) >> >> >> http://www.vtk.org/Wiki/VTK/Configure_and_Build >> >> or on VTK 6.3 rc1? >> http://www.vtk.org/download/ >> >> I am not sure what your other python error is, maybe related to >> >> http://stackoverflow.com/questions/15608236/eclipse-and-google-app-engine-importerror-no-module-named-sysconfigdata-nd-u >> >> >> On Wed, Aug 5, 2015 at 9:41 AM, Manjunath K E >> wrote: >> >>> Hi Dan Lipsa, >>> >>> Please find the required file "3d.nc" and the python code is >>> attached in "datareader.py1". >>> >>> The problem is that the *a,b = reader.GetOutput().* >>> *GetPointData().GetScalars().**GetRange() *is returning NaN value. >>> >>> one more thing I found was, when I start *"vtkpython**"* by keeping *"* >>> */usr/lib/python2.7**" *in *"PYTHONPATH**" *then following error will >>> be obtained. If I remove *"**/usr/lib/python2.7" *from *"PYTHONPATH**"*, >>> I wont get any error. >>> >>> export >>> PYTHONPATH=/usr/lib/python2.7:/usr/local/lib/python2.7/site-packages:$PYTHONPATH >>> >>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>> vtkpython >>> vtk version 6.2.0 >>> Traceback (most recent call last): >>> File "/usr/lib/python2.7/site.py", line 563, in >>> main() >>> File "/usr/lib/python2.7/site.py", line 545, in main >>> known_paths = addusersitepackages(known_paths) >>> File "/usr/lib/python2.7/site.py", line 272, in addusersitepackages >>> user_site = getusersitepackages() >>> File "/usr/lib/python2.7/site.py", line 247, in getusersitepackages >>> user_base = getuserbase() # this will also set USER_BASE >>> File "/usr/lib/python2.7/site.py", line 237, in getuserbase >>> USER_BASE = get_config_var('userbase') >>> File "/usr/lib/python2.7/sysconfig.py", line 578, in get_config_var >>> return get_config_vars().get(name) >>> File "/usr/lib/python2.7/sysconfig.py", line 524, in get_config_vars >>> _init_posix(_CONFIG_VARS) >>> File "/usr/lib/python2.7/sysconfig.py", line 408, in _init_posix >>> from _sysconfigdata import build_time_vars >>> File "/usr/lib/python2.7/_sysconfigdata.py", line 6, in >>> from _sysconfigdata_nd import * >>> ImportError: No module named _sysconfigdata_nd >>> >>> >>> Thanks and Regards, >>> >>> Manjunath K E >>> Help Ever Hurt Never >>> >>> >>> On Tue, Aug 4, 2015 at 10:15 PM, Dan Lipsa >>> wrote: >>> >>>> It would be great if you could share your data as well so that I can >>>> check it with my installation. Thanks, >>>> Dan >>>> >>>> >>>> On Tue, Aug 4, 2015 at 11:31 AM Manjunath K E >>>> wrote: >>>> >>>>> Hi Dan Lipsa, >>>>> >>>>> Thanks for the reply. The error is occurring during runtime. There was >>>>> no error, when i ran it in interpreter. All the lines in the script >>>>> executed smoothly. >>>>> I have tested the same code using vtk 6.0.0 there was no error. >>>>> >>>>> Also, the output that i get is not proper. There is problem in the >>>>> color map of the output produced. The scale bar is not displayed properly. >>>>> ========================================== >>>>> #!/usr/bin/env python >>>>> from vtk import * >>>>> >>>>> reader = vtkNetCDFCFReader() >>>>> reader.SetFileName("3d.nc") >>>>> reader.SphericalCoordinatesOff() >>>>> reader.SetOutputType(6) >>>>> reader.SetReplaceFillValueWithNan(1) >>>>> reader.Update() >>>>> #Copy SAL Array to scalar value field of point data ..this makes point >>>>> data to point to SAL array >>>>> >>>>> reader.GetOutput().GetPointData().SetScalars(reader.GetOutput().GetPointData().GetArray("SAL")) >>>>> reader.UpdateMetaData() >>>>> reader.Update() >>>>> reader.UpdateInformation() >>>>> output = reader.GetOutput() >>>>> >>>>> a,b = reader.GetOutput().GetPointData().GetScalars().GetRange() >>>>> lut = vtk.vtkColorTransferFunction() >>>>> lut.AddRGBPoint(a, 0.0, 0.0, 0.8) >>>>> lut.AddRGBPoint(a+(b-a)/4, 0.0, 0.5, 0.5) >>>>> lut.AddRGBPoint(a+(b-a)/2, 0.0, 1.0, 0.0) >>>>> lut.AddRGBPoint(b-(b-a)/4, 0.5, 0.5, 0.0) >>>>> lut.AddRGBPoint(b, 1.0, 0.0, 0.0) >>>>> lut.SetNanColor(0,0,1) >>>>> >>>>> # the mapper that will use the lookup table >>>>> mapper = vtkDataSetMapper() >>>>> mapper.SetInputData(reader.GetOutput()) >>>>> mapper.SetScalarModeToUsePointData() >>>>> mapper.SetLookupTable(lut) >>>>> mapper.SetScalarRange(a,b) >>>>> # the actor >>>>> gridActor = vtkActor() >>>>> gridActor.SetMapper( mapper ) >>>>> scaleBarActor = vtkScalarBarActor() >>>>> scaleBarActor.SetLookupTable( mapper.GetLookupTable() ) >>>>> scaleBarActor.SetTitle("Color Map for Point Data") >>>>> scaleBarActor.SetOrientationToHorizontal() >>>>> scaleBarActor.GetLabelTextProperty().SetColor(0,0,1) >>>>> scaleBarActor.GetTitleTextProperty().SetColor(0,0,1) >>>>> >>>>> # position it in window >>>>> coord = scaleBarActor.GetPositionCoordinate() >>>>> coord.SetCoordinateSystemToNormalizedViewport() >>>>> coord.SetValue(0.1,0.05) >>>>> scaleBarActor.SetWidth(.5) >>>>> scaleBarActor.SetHeight(.1) >>>>> >>>>> # renderer and render window >>>>> renderer = vtkRenderer() >>>>> renderer.SetBackground(1, 1, 1) >>>>> renderer.SetGradientBackground(1) # Set background to white >>>>> renWindow = vtk.vtkRenderWindow() >>>>> renWindow.SetSize(512, 512) >>>>> renWindow.AddRenderer( renderer ) >>>>> >>>>> # render window interactor >>>>> renWinInteractor = vtkRenderWindowInteractor() >>>>> renWinInteractor.SetRenderWindow( renWindow ) >>>>> # add the actors to the renderer >>>>> renderer.AddActor( gridActor ) >>>>> renderer.AddActor( scaleBarActor ) >>>>> >>>>> #show axes >>>>> axesActor = vtkAxesActor() >>>>> widget = vtkOrientationMarkerWidget() >>>>> widget.SetOrientationMarker( axesActor ) >>>>> widget.SetInteractor( renWinInteractor ) >>>>> widget.SetViewport( 0.0, 0.0, 0.4, 0.4 ) >>>>> widget.SetEnabled( 1 ) >>>>> widget.InteractiveOff() >>>>> >>>>> # render >>>>> renderer.ResetCamera(); >>>>> renWindow.Render() >>>>> # initialize and start the interactor >>>>> renWinInteractor.Initialize() >>>>> renWinInteractor.Start() >>>>> ================================================== >>>>> >>>>> >>>>> Thanks and Regards, >>>>> >>>>> Manjunath K E >>>>> Help Ever Hurt Never >>>>> >>>>> >>>>> On Tue, Aug 4, 2015 at 12:31 AM, Dan Lipsa >>>>> wrote: >>>>> >>>>>> Manjunath, >>>>>> Can you share the script you are trying to run? This seems like a >>>>>> problem with the script rather than an installation issue. >>>>>> >>>>>> On Mon, Aug 3, 2015 at 2:16 PM Manjunath K E >>>>>> wrote: >>>>>> >>>>>>> Hi Shawn, >>>>>>> >>>>>>> I followed your instructions, now the vtk importing problem is >>>>>>> solved. >>>>>>> But, following error is obtained >>>>>>> >>>>>>> ERROR: In >>>>>>> /home/kitware/Desktop/vtkbuild/build/vtk/src/vtk/Rendering/OpenGL/vtkOpenGLTexture.cxx, >>>>>>> line 200 >>>>>>> vtkOpenGLTexture (0x2f2ac90): No scalar values found for texture >>>>>>> input! >>>>>>> >>>>>>> The error is seen for every frame >>>>>>> >>>>>>> Thanks and Regards, >>>>>>> >>>>>>> Manjunath K E >>>>>>> Help Ever Hurt Never >>>>>>> >>>>>>> >>>>>>> On Mon, Aug 3, 2015 at 11:36 PM, Shawn Waldon < >>>>>>> shawn.waldon at kitware.com> wrote: >>>>>>> >>>>>>>> Hi Manjunath, >>>>>>>> >>>>>>>> Please keep discussions on the list so that others can benefit >>>>>>>> later. >>>>>>>> >>>>>>>> I haven't used an install tree on Linux for a while but according >>>>>>>> to my notes you should need the following assuming it is installed to >>>>>>>> /usr/local: >>>>>>>> >>>>>>>> export >>>>>>>> LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_PATH >>>>>>>> >>>>>>>> export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH >>>>>>>> >>>>>>>> HTH, >>>>>>>> Shawn >>>>>>>> >>>>>>>> On Mon, Aug 3, 2015 at 1:59 PM, Manjunath K E < >>>>>>>> ke.manjunath at gmail.com> wrote: >>>>>>>> >>>>>>>>> Hi Shawn >>>>>>>>> >>>>>>>>> Thanks for the reply. >>>>>>>>> My python script is set up to use the system's python not >>>>>>>>> vtkpython. >>>>>>>>> >>>>>>>>> I have set export >>>>>>>>> PYTHONPATH="/usr/local/lib/python2.7/site-packages/vtk/:$PYTHONPATH". >>>>>>>>> export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH >>>>>>>>> >>>>>>>>> I have installed vtk-6.2 to /usr/local. >>>>>>>>> >>>>>>>>> Is the should i change the values of PYTHONPATH and >>>>>>>>> LD_LIBRARY_PATH to something else. >>>>>>>>> >>>>>>>>> Thanks and Regards, >>>>>>>>> >>>>>>>>> Manjunath K E >>>>>>>>> Help Ever Hurt Never >>>>>>>>> >>>>>>>>> >>>>>>>>> On Mon, Aug 3, 2015 at 11:17 PM, Shawn Waldon < >>>>>>>>> shawn.waldon at kitware.com> wrote: >>>>>>>>> >>>>>>>>>> Hi Manjunath, >>>>>>>>>> >>>>>>>>>> Is your python script set up to use vtkpython as the >>>>>>>>>> interpreter? Or is it using the system's python? If you are trying to >>>>>>>>>> import vtk from system python you have to set your LD_LIBRARY_PATH and >>>>>>>>>> PYTHONPATH environment variables. If you want to change the script to use >>>>>>>>>> vtkpython then change the first like to #!/path/to/vtkpython >>>>>>>>>> >>>>>>>>>> HTH, >>>>>>>>>> Shawn >>>>>>>>>> >>>>>>>>>> On Mon, Aug 3, 2015 at 1:43 PM, Manjunath K E < >>>>>>>>>> ke.manjunath at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hi all >>>>>>>>>>> >>>>>>>>>>> I have installed VTK 6.2 along with vtk 6.2 python interface on >>>>>>>>>>> ubuntu 14.04 manually. >>>>>>>>>>> >>>>>>>>>>> When I run vtkpython in interpreter mode, the import of vtk is >>>>>>>>>>> successful. >>>>>>>>>>> It doesn't have any problem and the same is shown below. >>>>>>>>>>> >>>>>>>>>>> =========================================================== >>>>>>>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>>>>>>> vtkpython >>>>>>>>>>> vtk version 6.2.0 >>>>>>>>>>> Python 2.7.2 (default, Feb 12 2015, 18:30:44) >>>>>>>>>>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>>>>>>>>>> Type "help", "copyright", "credits" or "license" for more >>>>>>>>>>> information. >>>>>>>>>>> >>> from vtk import * >>>>>>>>>>> >>> print vtk >>>>>>>>>>> >>>>>>>>>> '/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'> >>>>>>>>>>> >>> >>>>>>>>>>> =========================================================== >>>>>>>>>>> >>>>>>>>>>> But, If i run a python script then an error is obtained for this >>>>>>>>>>> line "from vtk import *". The error is as shown below. >>>>>>>>>>> =========================================================== >>>>>>>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>>>>>>> ./demo1.py >>>>>>>>>>> Traceback (most recent call last): >>>>>>>>>>> File "./demo1.py", line 6, in >>>>>>>>>>> from vtk import * >>>>>>>>>>> ImportError: No module named vtk >>>>>>>>>>> =========================================================== >>>>>>>>>>> >>>>>>>>>>> Please help me in solving this issue. I appreciate your time and >>>>>>>>>>> help. >>>>>>>>>>> >>>>>>>>>>> Thanks and Regards, >>>>>>>>>>> >>>>>>>>>>> Manjunath K E >>>>>>>>>>> Help Ever Hurt Never >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>> >>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>> >>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>> >>>>>>>>>>> Search the list archives at: >>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>> >>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>> >>>>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon Aug 10 16:25:18 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 10 Aug 2015 20:25:18 +0000 Subject: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 on ubuntu 14.04) In-Reply-To: References: Message-ID: Indeed, I have tried 6.2.0 and I get NaNs as well. Unfortunately it seems to be something wrong with the binary version for VTK-6.3.0-RC1-Linux-64bit. For that I get: Traceback (most recent call last): File "dataReader.py1", line 3, in from vtk import * File "/home/danlipsa/Downloads/VTK-6.3.0-RC1-Linux-64bit/lib/python2.7/site-packages/vtk/__init__.py", line 98, in from vtkRenderingOpenGL import * File "/home/danlipsa/Downloads/VTK-6.3.0-RC1-Linux-64bit/lib/python2.7/site-packages/vtk/vtkRenderingOpenGL.py", line 1, in from vtkRenderingOpenGLPython import * ImportError: libvtkRenderingOpenGLPython27D-6.3.so.1: cannot open shared object file: No such file or directory We'll look into it. So you'll either build VTK from sources or wait until 6.3.0.rc2 Dan On Mon, Aug 10, 2015 at 4:10 PM Dan Lipsa wrote: > Manjunath, > Can you try 6.3.0.rc1 rather than 6.2.0? As I said I tried your example on > my build of VTK (which was a recent version from the git repository) and I > did not get the error you are seeing. > > Dan > > > On Mon, Aug 10, 2015 at 11:12 AM Manjunath K E > wrote: > >> Hi Dan Lipsa, >>> >>> >>> I checked out vtk 6.2 as per the instructions in >>> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/download.md >>> >>> I rebuilt VTK and when I try to run the following code, the problem of >>> GetRange() still persists. >>> >>> >>> from vtk import * >>> >>> reader = vtkNetCDFCFReader() >>> >>> reader.SetFileName("3d.nc") >>> >>> reader.SphericalCoordinatesOff() >>> >>> reader.SetReplaceFillValueWithNan(1) >>> >>> reader.Update() >>> >>> >>> reader.GetOutput().GetPointData().SetScalars(reader.GetOutput().GetPointData().GetArray("SAL")) >>> 0 >>> >>> reader.UpdateMetaData() >>> 1 >>> >>> reader.Update() >>> >>> reader.UpdateInformation() >>> >>> reader.GetOutput().GetPointData().GetScalars().GetRange() >>> (nan, nan) >>> >>> Although the range is (28.04-36.88), but I get (nan, nan). Please help >>> me. >>> >>> Thanks and Regards, >>> Manjunath K E >>> >>> ---------- Forwarded message ---------- >>> From: Dan Lipsa >>> Date: Wed, Aug 5, 2015 at 8:06 PM >>> Subject: Re: [vtkusers] from vtk import * ImportError: (Python VTK 6.2 >>> on ubuntu 14.04) >>> To: Manjunath K E , VTK Users >>> >>> >>> Manjunath, >>> I get a range rather than NaN when I run it on my machine with the >>> latest VTK from git master. >>> >>> Range of SAL: 28.04-36.88 >>> >>> I do have error complaining about missing >>> sliceOn.jpg and sliceOff.jpg. >>> >>> Could you try your example on the latest VTK master (your have to build >>> it) >>> >>> >>> http://www.vtk.org/Wiki/VTK/Configure_and_Build >>> >>> or on VTK 6.3 rc1? >>> http://www.vtk.org/download/ >>> >>> I am not sure what your other python error is, maybe related to >>> >>> http://stackoverflow.com/questions/15608236/eclipse-and-google-app-engine-importerror-no-module-named-sysconfigdata-nd-u >>> >>> >>> On Wed, Aug 5, 2015 at 9:41 AM, Manjunath K E >>> wrote: >>> >>>> Hi Dan Lipsa, >>>> >>>> Please find the required file "3d.nc" and the python code is >>>> attached in "datareader.py1". >>>> >>>> The problem is that the *a,b = reader.GetOutput().* >>>> *GetPointData().GetScalars().**GetRange() *is returning NaN value. >>>> >>>> one more thing I found was, when I start *"vtkpython**"* by keeping *"* >>>> */usr/lib/python2.7**" *in *"PYTHONPATH**" *then following error will >>>> be obtained. If I remove *"**/usr/lib/python2.7" *from *"PYTHONPATH**"*, >>>> I wont get any error. >>>> >>>> export >>>> PYTHONPATH=/usr/lib/python2.7:/usr/local/lib/python2.7/site-packages:$PYTHONPATH >>>> >>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>> vtkpython >>>> vtk version 6.2.0 >>>> Traceback (most recent call last): >>>> File "/usr/lib/python2.7/site.py", line 563, in >>>> main() >>>> File "/usr/lib/python2.7/site.py", line 545, in main >>>> known_paths = addusersitepackages(known_paths) >>>> File "/usr/lib/python2.7/site.py", line 272, in addusersitepackages >>>> user_site = getusersitepackages() >>>> File "/usr/lib/python2.7/site.py", line 247, in getusersitepackages >>>> user_base = getuserbase() # this will also set USER_BASE >>>> File "/usr/lib/python2.7/site.py", line 237, in getuserbase >>>> USER_BASE = get_config_var('userbase') >>>> File "/usr/lib/python2.7/sysconfig.py", line 578, in get_config_var >>>> return get_config_vars().get(name) >>>> File "/usr/lib/python2.7/sysconfig.py", line 524, in get_config_vars >>>> _init_posix(_CONFIG_VARS) >>>> File "/usr/lib/python2.7/sysconfig.py", line 408, in _init_posix >>>> from _sysconfigdata import build_time_vars >>>> File "/usr/lib/python2.7/_sysconfigdata.py", line 6, in >>>> from _sysconfigdata_nd import * >>>> ImportError: No module named _sysconfigdata_nd >>>> >>>> >>>> Thanks and Regards, >>>> >>>> Manjunath K E >>>> Help Ever Hurt Never >>>> >>>> >>>> On Tue, Aug 4, 2015 at 10:15 PM, Dan Lipsa >>>> wrote: >>>> >>>>> It would be great if you could share your data as well so that I can >>>>> check it with my installation. Thanks, >>>>> Dan >>>>> >>>>> >>>>> On Tue, Aug 4, 2015 at 11:31 AM Manjunath K E >>>>> wrote: >>>>> >>>>>> Hi Dan Lipsa, >>>>>> >>>>>> Thanks for the reply. The error is occurring during runtime. There >>>>>> was no error, when i ran it in interpreter. All the lines in the script >>>>>> executed smoothly. >>>>>> I have tested the same code using vtk 6.0.0 there was no error. >>>>>> >>>>>> Also, the output that i get is not proper. There is problem in the >>>>>> color map of the output produced. The scale bar is not displayed properly. >>>>>> ========================================== >>>>>> #!/usr/bin/env python >>>>>> from vtk import * >>>>>> >>>>>> reader = vtkNetCDFCFReader() >>>>>> reader.SetFileName("3d.nc") >>>>>> reader.SphericalCoordinatesOff() >>>>>> reader.SetOutputType(6) >>>>>> reader.SetReplaceFillValueWithNan(1) >>>>>> reader.Update() >>>>>> #Copy SAL Array to scalar value field of point data ..this makes >>>>>> point data to point to SAL array >>>>>> >>>>>> reader.GetOutput().GetPointData().SetScalars(reader.GetOutput().GetPointData().GetArray("SAL")) >>>>>> reader.UpdateMetaData() >>>>>> reader.Update() >>>>>> reader.UpdateInformation() >>>>>> output = reader.GetOutput() >>>>>> >>>>>> a,b = reader.GetOutput().GetPointData().GetScalars().GetRange() >>>>>> lut = vtk.vtkColorTransferFunction() >>>>>> lut.AddRGBPoint(a, 0.0, 0.0, 0.8) >>>>>> lut.AddRGBPoint(a+(b-a)/4, 0.0, 0.5, 0.5) >>>>>> lut.AddRGBPoint(a+(b-a)/2, 0.0, 1.0, 0.0) >>>>>> lut.AddRGBPoint(b-(b-a)/4, 0.5, 0.5, 0.0) >>>>>> lut.AddRGBPoint(b, 1.0, 0.0, 0.0) >>>>>> lut.SetNanColor(0,0,1) >>>>>> >>>>>> # the mapper that will use the lookup table >>>>>> mapper = vtkDataSetMapper() >>>>>> mapper.SetInputData(reader.GetOutput()) >>>>>> mapper.SetScalarModeToUsePointData() >>>>>> mapper.SetLookupTable(lut) >>>>>> mapper.SetScalarRange(a,b) >>>>>> # the actor >>>>>> gridActor = vtkActor() >>>>>> gridActor.SetMapper( mapper ) >>>>>> scaleBarActor = vtkScalarBarActor() >>>>>> scaleBarActor.SetLookupTable( mapper.GetLookupTable() ) >>>>>> scaleBarActor.SetTitle("Color Map for Point Data") >>>>>> scaleBarActor.SetOrientationToHorizontal() >>>>>> scaleBarActor.GetLabelTextProperty().SetColor(0,0,1) >>>>>> scaleBarActor.GetTitleTextProperty().SetColor(0,0,1) >>>>>> >>>>>> # position it in window >>>>>> coord = scaleBarActor.GetPositionCoordinate() >>>>>> coord.SetCoordinateSystemToNormalizedViewport() >>>>>> coord.SetValue(0.1,0.05) >>>>>> scaleBarActor.SetWidth(.5) >>>>>> scaleBarActor.SetHeight(.1) >>>>>> >>>>>> # renderer and render window >>>>>> renderer = vtkRenderer() >>>>>> renderer.SetBackground(1, 1, 1) >>>>>> renderer.SetGradientBackground(1) # Set background to white >>>>>> renWindow = vtk.vtkRenderWindow() >>>>>> renWindow.SetSize(512, 512) >>>>>> renWindow.AddRenderer( renderer ) >>>>>> >>>>>> # render window interactor >>>>>> renWinInteractor = vtkRenderWindowInteractor() >>>>>> renWinInteractor.SetRenderWindow( renWindow ) >>>>>> # add the actors to the renderer >>>>>> renderer.AddActor( gridActor ) >>>>>> renderer.AddActor( scaleBarActor ) >>>>>> >>>>>> #show axes >>>>>> axesActor = vtkAxesActor() >>>>>> widget = vtkOrientationMarkerWidget() >>>>>> widget.SetOrientationMarker( axesActor ) >>>>>> widget.SetInteractor( renWinInteractor ) >>>>>> widget.SetViewport( 0.0, 0.0, 0.4, 0.4 ) >>>>>> widget.SetEnabled( 1 ) >>>>>> widget.InteractiveOff() >>>>>> >>>>>> # render >>>>>> renderer.ResetCamera(); >>>>>> renWindow.Render() >>>>>> # initialize and start the interactor >>>>>> renWinInteractor.Initialize() >>>>>> renWinInteractor.Start() >>>>>> ================================================== >>>>>> >>>>>> >>>>>> Thanks and Regards, >>>>>> >>>>>> Manjunath K E >>>>>> Help Ever Hurt Never >>>>>> >>>>>> >>>>>> On Tue, Aug 4, 2015 at 12:31 AM, Dan Lipsa >>>>>> wrote: >>>>>> >>>>>>> Manjunath, >>>>>>> Can you share the script you are trying to run? This seems like a >>>>>>> problem with the script rather than an installation issue. >>>>>>> >>>>>>> On Mon, Aug 3, 2015 at 2:16 PM Manjunath K E >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Shawn, >>>>>>>> >>>>>>>> I followed your instructions, now the vtk importing problem is >>>>>>>> solved. >>>>>>>> But, following error is obtained >>>>>>>> >>>>>>>> ERROR: In >>>>>>>> /home/kitware/Desktop/vtkbuild/build/vtk/src/vtk/Rendering/OpenGL/vtkOpenGLTexture.cxx, >>>>>>>> line 200 >>>>>>>> vtkOpenGLTexture (0x2f2ac90): No scalar values found for texture >>>>>>>> input! >>>>>>>> >>>>>>>> The error is seen for every frame >>>>>>>> >>>>>>>> Thanks and Regards, >>>>>>>> >>>>>>>> Manjunath K E >>>>>>>> Help Ever Hurt Never >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Aug 3, 2015 at 11:36 PM, Shawn Waldon < >>>>>>>> shawn.waldon at kitware.com> wrote: >>>>>>>> >>>>>>>>> Hi Manjunath, >>>>>>>>> >>>>>>>>> Please keep discussions on the list so that others can benefit >>>>>>>>> later. >>>>>>>>> >>>>>>>>> I haven't used an install tree on Linux for a while but according >>>>>>>>> to my notes you should need the following assuming it is installed to >>>>>>>>> /usr/local: >>>>>>>>> >>>>>>>>> export >>>>>>>>> LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_PATH >>>>>>>>> >>>>>>>>> export >>>>>>>>> PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH >>>>>>>>> >>>>>>>>> HTH, >>>>>>>>> Shawn >>>>>>>>> >>>>>>>>> On Mon, Aug 3, 2015 at 1:59 PM, Manjunath K E < >>>>>>>>> ke.manjunath at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Hi Shawn >>>>>>>>>> >>>>>>>>>> Thanks for the reply. >>>>>>>>>> My python script is set up to use the system's python not >>>>>>>>>> vtkpython. >>>>>>>>>> >>>>>>>>>> I have set export >>>>>>>>>> PYTHONPATH="/usr/local/lib/python2.7/site-packages/vtk/:$PYTHONPATH". >>>>>>>>>> export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH >>>>>>>>>> >>>>>>>>>> I have installed vtk-6.2 to /usr/local. >>>>>>>>>> >>>>>>>>>> Is the should i change the values of PYTHONPATH and >>>>>>>>>> LD_LIBRARY_PATH to something else. >>>>>>>>>> >>>>>>>>>> Thanks and Regards, >>>>>>>>>> >>>>>>>>>> Manjunath K E >>>>>>>>>> Help Ever Hurt Never >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Mon, Aug 3, 2015 at 11:17 PM, Shawn Waldon < >>>>>>>>>> shawn.waldon at kitware.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Manjunath, >>>>>>>>>>> >>>>>>>>>>> Is your python script set up to use vtkpython as the >>>>>>>>>>> interpreter? Or is it using the system's python? If you are trying to >>>>>>>>>>> import vtk from system python you have to set your LD_LIBRARY_PATH and >>>>>>>>>>> PYTHONPATH environment variables. If you want to change the script to use >>>>>>>>>>> vtkpython then change the first like to #!/path/to/vtkpython >>>>>>>>>>> >>>>>>>>>>> HTH, >>>>>>>>>>> Shawn >>>>>>>>>>> >>>>>>>>>>> On Mon, Aug 3, 2015 at 1:43 PM, Manjunath K E < >>>>>>>>>>> ke.manjunath at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi all >>>>>>>>>>>> >>>>>>>>>>>> I have installed VTK 6.2 along with vtk 6.2 python interface >>>>>>>>>>>> on ubuntu 14.04 manually. >>>>>>>>>>>> >>>>>>>>>>>> When I run vtkpython in interpreter mode, the import of vtk is >>>>>>>>>>>> successful. >>>>>>>>>>>> It doesn't have any problem and the same is shown below. >>>>>>>>>>>> >>>>>>>>>>>> =========================================================== >>>>>>>>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>>>>>>>> vtkpython >>>>>>>>>>>> vtk version 6.2.0 >>>>>>>>>>>> Python 2.7.2 (default, Feb 12 2015, 18:30:44) >>>>>>>>>>>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>>>>>>>>>>> Type "help", "copyright", "credits" or "license" for more >>>>>>>>>>>> information. >>>>>>>>>>>> >>> from vtk import * >>>>>>>>>>>> >>> print vtk >>>>>>>>>>>> >>>>>>>>>>> '/usr/local/lib/python2.7/site-packages/vtk/__init__.pyc'> >>>>>>>>>>>> >>> >>>>>>>>>>>> =========================================================== >>>>>>>>>>>> >>>>>>>>>>>> But, If i run a python script then an error is obtained for >>>>>>>>>>>> this line "from vtk import *". The error is as shown below. >>>>>>>>>>>> =========================================================== >>>>>>>>>>>> manju at iiitb-gvcl-Z800:~/manju/academics/iiitb/project/codes/incois__laptp/src_vtk6$ >>>>>>>>>>>> ./demo1.py >>>>>>>>>>>> Traceback (most recent call last): >>>>>>>>>>>> File "./demo1.py", line 6, in >>>>>>>>>>>> from vtk import * >>>>>>>>>>>> ImportError: No module named vtk >>>>>>>>>>>> =========================================================== >>>>>>>>>>>> >>>>>>>>>>>> Please help me in solving this issue. I appreciate your time >>>>>>>>>>>> and help. >>>>>>>>>>>> >>>>>>>>>>>> Thanks and Regards, >>>>>>>>>>>> >>>>>>>>>>>> Manjunath K E >>>>>>>>>>>> Help Ever Hurt Never >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>> >>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>> >>>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>> >>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>> >>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>> >>>>>> >>>> >>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From audrius at tomographix.com Mon Aug 10 17:12:41 2015 From: audrius at tomographix.com (Audrius Stundzia) Date: Mon, 10 Aug 2015 17:12:41 -0400 Subject: [vtkusers] Bug fix notes for building VTK 6.2.0 with MS VS2015 on Windows 10 x64 Message-ID: <1439241161.1993575.352694577.23D6DA4A@webmail.messagingengine.com> VTK Users, Thought I'd share the bug fixes that were required to build VTK 6.2.0 to build with MS VS2015 on Windows 10 x64 in case anyone else is trying to do the same. 118>------ Build started: Project: ALL_BUILD, Configuration: Debug x64 ------ 118> Building Custom Rule E:/VTK/VTK-6.2.0/CMakeLists.txt 118> CMake does not need to re-run because E:\VTK\CMakeFiles\generate.stamp is up-to-date. ========== Build: 25 succeeded, 93 failed, 0 up-to-date, 0 skipped ========== ========== Wow. The following 4 bug fixes resulted in a successful build. 1/ Project: vtklibxml2 File: config.h /* Win32 Std C name mangling work-around */ /* MS VS2015: deprecated. snprintf is now the standard in VS2015.?*/ // #if defined(_MSC_VER) // # define snprintf _snprintf / #endif 2/ Project: vtktiff File: tiffiop.h // MS VS2015: added header # include // MS VS2015: deprecated /* #ifdef HAVE_SEARCH_H # include #else extern void *lfind(const void *, const void *, size_t *, size_t, int (*)(const void *, const void *)); #endif */ 3/ Project:?vtkhdf5 File: ?H5Omtime.c #elif defined(H5_HAVE_LNX_TIMEZONE) // Dummy argument for now? ? /* Linux libc-5 */? ? the_time -= timezone - (tm.tm_isdst?3600:0); #elif defined(H5_HAVE_TIMEZONE) && defined(_MSC_VER) && _MSC_VER >= 1900 // In Visual Studio prior to VS2015 'timezone' is a global variable declared // in time.h. That variable was deprecated and in VS2015 is removed, with // _get_timezone replacing it. long time_zone = 0; _get_timezone(&time_zone); the_time -= time_zone - (tm.tm_isdst ? 3600 : 0); Comment: Is this correct? Maybe, but frankly I don't care as I have less than zero interest in HDF5. 4/ Project: vtkCommonCore File:?vtkWin32ProcessOutputWindow.cxx Fix: add a space before and after PRIdword. // Construct the executable name from the process id, pointer to? // this output window instance, and a count. ?This should be unique. sprintf(exeName, "vtkWin32OWP_%" PRIdword "_%p_%u.exe", GetCurrentProcessId(), this, this->Count++); After the above 4 fixes, VTK 6.2.0 built and installed as it should. -------------- next part -------------- An HTML attachment was scrubbed... URL: From totte at dunescientific.com Mon Aug 10 18:51:02 2015 From: totte at dunescientific.com (Totte Karlsson) Date: Mon, 10 Aug 2015 15:51:02 -0700 Subject: [vtkusers] altering a widgets response to mouse clicks In-Reply-To: References: <55C7DF88.4040700@dunescientific.com> Message-ID: <55C92AD6.50303@dunescientific.com> On 8/9/2015 7:05 PM, Cory Quammen wrote: > Totte, > > The typical way to do this would be to subclass vtkInteractorStyle and > override the member functions > > OnLeftButtonDown() > OnLeftButtonUp() > OnMiddleButtonDown() > OnMiddleButtonUp() > > to swap the functionality of the two. My guess is that you are using > the vtkInteractorStyleTrackballActor, so you could subclass it and > swap the definitions of the above member functions. Then, set an > instance of your new class as the interactor style in your > vtkRenderWindowInteractor. > Thanks for the response, I have now a subclassed a TrackballActor interactor which I am passing to the widget. However, the subclassed interactors On*Button() functions are NOT called as the widget is visible and clicked on. Those overloaded functions are only called if clicking outside the widget. I have used the slider widget, and for that one, when clicked on, the interactors onMouse events are indeed called. The box widget seem to behave differently. In addition, as the widget is activated, and an associated callback Execute function is called, only one type of event is detected, even though I have added observers for other events. E.g. mWidget->AddObserver(vtkCommand::RightButtonPressEvent, mCallBack); //These are not passed on to the widgets callback?? mWidget->AddObserver(vtkCommand::RightButtonReleaseEvent, mCallBack); mWidget->AddObserver(vtkCommand::InteractionEvent, mCallBack); //Only this one seem to be relevant?? I am certainly getting something wrong? tk > Hope that helps, > Cory > > On Sun, Aug 9, 2015 at 7:17 PM, Totte Karlsson > > wrote: > > Hello, > When using a boxwidget, pressing the left button and moving the > mouse allow the user to rotate the widget, > while pressing the middle button and moving the mouse translates > the widget. > > How can I switch the behavior of those two buttons? > I.e. having the left button doing the translation and the middle > button the rotation? > > -tk > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. -- ------------------------------------------------------------------------ Totte Karlsson: totte at dunescientific.com or (425) 780-9648 http://www.dunescientific.com/ ? 2015 Dune Scientific, LLC. All rights reserved. -------------- next part -------------- An HTML attachment was scrubbed... URL: From totte at dunescientific.com Mon Aug 10 19:22:01 2015 From: totte at dunescientific.com (Totte Karlsson) Date: Mon, 10 Aug 2015 16:22:01 -0700 Subject: [vtkusers] how to detect a mouse click on boxwidget? Message-ID: <55C93219.8040501@dunescientific.com> Hello, I'm using a boxwidget to modify the position and orientation of some actors. The box widget become active and initialized as a certain actor is clicked on. Now, if a user clicks on the widget, e.g. leftmouse down, followed by a leftmouse up, in say < 100 ms I would want to hide the widget. However, I can't see how to detect a mouse click on the widget. The only event I seem to be able to 'catch' is the InteractionEvent, even though I are adding the other events too, e.g. vtkSmartPointer callback = vtkSmartPointer::New(); boxWidget->AddObserver(vtkCommand::InteractionEvent, callback); boxWidget->AddObserver(vtkCommand::LeftButtonPressEvent, callback); boxWidget->AddObserver(vtkCommand::LeftButtonReleaseEvent, callback); In the widgets associated callback, only the InterationEvent is executed. Any ideas? Seem puzzling to me. tk From ben.boeckel at kitware.com Mon Aug 10 21:59:43 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 10 Aug 2015 21:59:43 -0400 Subject: [vtkusers] vtk 6.2.0 | CMake 3.3.0 crash report In-Reply-To: <1439222107.631988.352417049.7C4935C5@webmail.messagingengine.com> References: <1439222107.631988.352417049.7C4935C5@webmail.messagingengine.com> Message-ID: <20150811015923.GA18026@bronto-burt.dev.benboeckel.net> On Mon, Aug 10, 2015 at 11:55:07 -0400, Audrius Stundzia wrote: > OS: Windows 10 x64 IDE: Visual Studio 2015 CMake: 3.3.0 VTK: 6.2.0 > > Crash during CMake "Configure" at line > > HDF5: Checking for appropriate format for 64 bit long: HDF5 does not support VS2015 in its try_run code. There is a branch for 2015 support here: https://gitlab.kitware.com/vtk/vtk/merge_requests/446 This specific problem is fixed here: https://gitlab.kitware.com/ben.boeckel/vtk/commit/718941125d967015e366172dd09793268f4c9eb5 with a fix to make long long format string detection actually work right after it: https://gitlab.kitware.com/ben.boeckel/vtk/commit/a4cf06de481eb2a354d10e7874928200be65c400 Thanks, --Ben From cory.quammen at kitware.com Mon Aug 10 22:39:12 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 10 Aug 2015 22:39:12 -0400 Subject: [vtkusers] altering a widgets response to mouse clicks In-Reply-To: <55C92AD6.50303@dunescientific.com> References: <55C7DF88.4040700@dunescientific.com> <55C92AD6.50303@dunescientific.com> Message-ID: > I have now a subclassed a TrackballActor interactor which I am passing to > the widget. > > However, the subclassed interactors On*Button() functions are NOT called > as the widget is visible and clicked on. Those overloaded functions are > only called if clicking outside the widget. > In that case, perhaps you need to subclass vtkBoxWidget and override the same member functions. It is likely processing the mouse button clicks and not passing the event on to your custom interactor. Sorry for sending you down that path. I have used the slider widget, and for that one, when clicked on, the > interactors onMouse events are indeed called. The box widget seem to behave > differently. > > In addition, as the widget is activated, and an associated callback > Execute function is called, only one type of event is detected, even though > I have added observers for other events. > E.g. > mWidget->AddObserver(vtkCommand::RightButtonPressEvent, mCallBack); > //These are not passed on to the widgets callback?? > mWidget->AddObserver(vtkCommand::RightButtonReleaseEvent, mCallBack); > mWidget->AddObserver(vtkCommand::InteractionEvent, mCallBack); > //Only this one seem to be relevant?? > > I am certainly getting something wrong? > > tk > > > > Hope that helps, > Cory > > On Sun, Aug 9, 2015 at 7:17 PM, Totte Karlsson > wrote: > >> Hello, >> When using a boxwidget, pressing the left button and moving the mouse >> allow the user to rotate the widget, >> while pressing the middle button and moving the mouse translates the >> widget. >> >> How can I switch the behavior of those two buttons? >> I.e. having the left button doing the translation and the middle button >> the rotation? >> >> -tk >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > > -- > ------------------------------ > > Totte Karlsson: totte at dunescientific.com or (425) 780-9648 > <%20425%20%20780-9648> > http://www.dunescientific.com/ > ? 2015 Dune Scientific, LLC. All rights reserved. > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Aug 10 22:43:55 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 10 Aug 2015 22:43:55 -0400 Subject: [vtkusers] Bug fix notes for building VTK 6.2.0 with MS VS2015 on Windows 10 x64 In-Reply-To: <1439241161.1993575.352694577.23D6DA4A@webmail.messagingengine.com> References: <1439241161.1993575.352694577.23D6DA4A@webmail.messagingengine.com> Message-ID: Thanks for reporting your progress, Audrius! This is great. Cory On Mon, Aug 10, 2015 at 5:12 PM, Audrius Stundzia wrote: > VTK Users, > > Thought I'd share the bug fixes that were required to build VTK 6.2.0 to > build with MS VS2015 on Windows 10 x64 > in case anyone else is trying to do the same. > > 118>------ Build started: Project: ALL_BUILD, Configuration: Debug x64 > ------ > 118> Building Custom Rule E:/VTK/VTK-6.2.0/CMakeLists.txt > 118> CMake does not need to re-run because > E:\VTK\CMakeFiles\generate.stamp is up-to-date. > ========== Build: 25 succeeded, 93 failed, 0 up-to-date, 0 skipped > ========== > > Wow. > > The following 4 bug fixes resulted in a successful build. > > 1/ Project: vtklibxml2 > > File: config.h > > /* Win32 Std C name mangling work-around */ > /* MS VS2015: deprecated. snprintf is now the standard in VS2015. */ > // #if defined(_MSC_VER) > // # define snprintf _snprintf > / #endif > > 2/ Project: vtktiff > > File: tiffiop.h > > // MS VS2015: added header > # include > > // MS VS2015: deprecated > /* #ifdef HAVE_SEARCH_H > # include > #else > extern void *lfind(const void *, const void *, size_t *, size_t, > int (*)(const void *, const void *)); > #endif */ > > 3/ Project: vtkhdf5 > > File: H5Omtime.c > > #elif defined(H5_HAVE_LNX_TIMEZONE) // Dummy argument for now > /* Linux libc-5 */ > the_time -= timezone - (tm.tm_isdst?3600:0); > #elif defined(H5_HAVE_TIMEZONE) && defined(_MSC_VER) && _MSC_VER >= 1900 > // In Visual Studio prior to VS2015 'timezone' is a global variable > declared > // in time.h. That variable was deprecated and in VS2015 is removed, with > // _get_timezone replacing it. > long time_zone = 0; > _get_timezone(&time_zone); > the_time -= time_zone - (tm.tm_isdst ? 3600 : 0); > > Comment: Is this correct? Maybe, but frankly I don't care as I have less > than zero interest in HDF5. > > 4/ Project: vtkCommonCore > > File: vtkWin32ProcessOutputWindow.cxx > > Fix: add a space before and after PRIdword. > > // Construct the executable name from the process id, pointer to > // this output window instance, and a count. This should be unique. > sprintf(exeName, "vtkWin32OWP_%" PRIdword "_%p_%u.exe", > GetCurrentProcessId(), this, this->Count++); > > After the above 4 fixes, VTK 6.2.0 built and installed as it should. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jason.cardinal at optimalcomputing.be Tue Aug 11 03:10:23 2015 From: jason.cardinal at optimalcomputing.be (jason@optimalcomputing) Date: Tue, 11 Aug 2015 00:10:23 -0700 (MST) Subject: [vtkusers] Build a surface plot from java (point by point) Message-ID: <1439277023596-5733413.post@n5.nabble.com> I would like to build a surface plot by manually adding points to my graphic (I'm developping in Java). This should be rendered to something like this : http://www.vtk.org/pipermail/vtkusers/attachments/20101029/63dfcd6c/attachment-0001.jpeg Could you please help me get a working code ? Here is what I tried (and that isn't actually working) ... // xResults, yResults and zResults are Double[][] parameters vtkPolyData datas = new vtkPolyData(); for(int i=0; i I have installed vtkpython 6.3.0.rc1 and pyQt5.2.1 manually. If I run a python script then it is working well without any error. But, if i run in "vtkpython" interpretor mode, i have following errors. I have set the *$PYTHONHOME *to contain *PyQt5 *but still problem exists. *export PYTHONPATH=/usr/lib/python2.7:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/:/usr/local/lib/python2.7/site-packages/usr/lib/python2.7/lib-dynload:$PYTHONPATH* manju at iiitb-gvcl-Z800:~/manju/qt$vtkpython vtk version 6.3.0 *Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:]*Python 2.7.2 (default, Feb 12 2015, 18:30:44) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> *>>> from PyQt5.QtWidgets import ** Traceback (most recent call last): File "", line 1, in ImportError: /usr/lib/python2.7/dist-packages/sip.so: undefined symbol: PyUnicodeUCS4_DecodeUTF8 *>>> from PyQt5.QtWidgets import QApplication, QDialog* Traceback (most recent call last): File "", line 1, in ImportError: cannot import name QApplication *No error for below code* >>> from PyQt5 import * >>> Please help. Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 11 08:20:57 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 11 Aug 2015 06:20:57 -0600 Subject: [vtkusers] Errors in "vtkpython" interpretor (vtkpython 6.3.0.rc1 and pyQt5.2.1 ) In-Reply-To: References: Message-ID: Hi Manjunath, Get a list of the paths within "python" and "vtkpython" to see what the differences are: import sys for p in sys.path: print p - David On Tue, Aug 11, 2015 at 5:40 AM, Manjunath K E wrote: > I have installed vtkpython 6.3.0.rc1 and pyQt5.2.1 manually. > > If I run a python script then it is working well without any error. > > But, if i run in "vtkpython" interpretor mode, i have following errors. > > I have set the *$PYTHONHOME *to contain *PyQt5 *but still problem exists. > > > *export > PYTHONPATH=/usr/lib/python2.7:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/:/usr/local/lib/python2.7/site-packages/usr/lib/python2.7/lib-dynload:$PYTHONPATH* > manju at iiitb-gvcl-Z800:~/manju/qt$vtkpython > vtk version 6.3.0 > > > > *Could not find platform independent libraries Could not find > platform dependent libraries Consider setting $PYTHONHOME to > [:]*Python 2.7.2 (default, Feb 12 2015, 18:30:44) > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> > *>>> from PyQt5.QtWidgets import ** > Traceback (most recent call last): > File "", line 1, in > ImportError: /usr/lib/python2.7/dist-packages/sip.so: undefined symbol: > PyUnicodeUCS4_DecodeUTF8 > *>>> from PyQt5.QtWidgets import QApplication, QDialog* > Traceback (most recent call last): > File "", line 1, in > ImportError: cannot import name QApplication > > *No error for below code* > >>> from PyQt5 import * > >>> > > Please help. > > Thanks and Regards, > Manjunath K E > Help Ever Hurt Never > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ke.manjunath at gmail.com Tue Aug 11 08:27:00 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Tue, 11 Aug 2015 17:57:00 +0530 Subject: [vtkusers] Errors in "vtkpython" interpretor (vtkpython 6.3.0.rc1 and pyQt5.2.1 ) In-Reply-To: References: Message-ID: Hi David Gobbi,, Thank you very much for the reply. The path obtained for *python* is ================================== /usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg /usr/lib/python2.7 /usr/lib/python2.7/dist-packages /usr/local/lib/python2.7/site-packages /usr/lib/python2.7/lib-dynload /home/manju/manju/academics/iiitb/project/codes/qt /usr/lib/python2.7/plat-x86_64-linux-gnu /usr/lib/python2.7/lib-tk /usr/lib/python2.7/lib-old /usr/local/lib/python2.7/dist-packages /usr/local/lib/python2.7/dist-packages/Numeric /usr/lib/python2.7/dist-packages/PILcompat /usr/lib/python2.7/dist-packages/gtk-2.0 /usr/lib/pymodules/python2.7 /usr/lib/python2.7/dist-packages/ubuntu-sso-client /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode ============================= The path obtained for *vtkpython* is ================================== /usr/lib/python2.7 /usr/lib/python2.7/dist-packages /usr/local/lib/python2.7/site-packages /usr/lib/python2.7/lib-dynload /home/manju/manju/academics/iiitb/project/codes/qt /home/kitware/Desktop/vtkbuild/build/install/lib/python27.zip /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7 /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/plat-linux2 /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/lib-tk /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/lib-old /home/kitware/Desktop/vtkbuild/build/install/lib/lib-dynload ============================================ How can, I make vtkpython to have same path as that of python. How can I remove the certain (kitware-related) paths from vtkpython. Thanks a lot. Thanks and Regards, Manjunath K E Help Ever Hurt Never On Tue, Aug 11, 2015 at 5:50 PM, David Gobbi wrote: > Hi Manjunath, > > Get a list of the paths within "python" and "vtkpython" to see what the > differences are: > > import sys > for p in sys.path: print p > > - David > > On Tue, Aug 11, 2015 at 5:40 AM, Manjunath K E > wrote: > >> I have installed vtkpython 6.3.0.rc1 and pyQt5.2.1 manually. >> >> If I run a python script then it is working well without any error. >> >> But, if i run in "vtkpython" interpretor mode, i have following errors. >> >> I have set the *$PYTHONHOME *to contain *PyQt5 *but still problem exists. >> >> >> *export >> PYTHONPATH=/usr/lib/python2.7:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/:/usr/local/lib/python2.7/site-packages/usr/lib/python2.7/lib-dynload:$PYTHONPATH* >> manju at iiitb-gvcl-Z800:~/manju/qt$vtkpython >> vtk version 6.3.0 >> >> >> >> *Could not find platform independent libraries Could not find >> platform dependent libraries Consider setting $PYTHONHOME to >> [:]*Python 2.7.2 (default, Feb 12 2015, 18:30:44) >> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> >> *>>> from PyQt5.QtWidgets import ** >> Traceback (most recent call last): >> File "", line 1, in >> ImportError: /usr/lib/python2.7/dist-packages/sip.so: undefined symbol: >> PyUnicodeUCS4_DecodeUTF8 >> *>>> from PyQt5.QtWidgets import QApplication, QDialog* >> Traceback (most recent call last): >> File "", line 1, in >> ImportError: cannot import name QApplication >> >> *No error for below code* >> >>> from PyQt5 import * >> >>> >> >> Please help. >> >> Thanks and Regards, >> Manjunath K E >> Help Ever Hurt Never >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 11 08:50:08 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 11 Aug 2015 06:50:08 -0600 Subject: [vtkusers] Errors in "vtkpython" interpretor (vtkpython 6.3.0.rc1 and pyQt5.2.1 ) In-Reply-To: References: Message-ID: Hi Manjunath, Unfortunately, you cannot remove paths from vtkpython. You're facing a problem that happens to many users: you have multiple copies of python on your computer, and the python you used to build VTK is not the same as the python that you usually run from the command line. First, you should make sure that you have the python-dev package installed: sudo apt-get install python-dev Then, in your VTK build, make sure that CMakeCache.txt points to the system python: PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python PYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 PYTHON_LIBRARY:FILEPATH=/usr/lib/libpython2.7.so Then, when you build VTK, your "vtkpython" will use all of the same paths as the system python. - David On Tue, Aug 11, 2015 at 6:27 AM, Manjunath K E wrote: > Hi David Gobbi,, > > Thank you very much for the reply. > > The path obtained for *python* is > ================================== > /usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg > /usr/lib/python2.7 > /usr/lib/python2.7/dist-packages > /usr/local/lib/python2.7/site-packages > /usr/lib/python2.7/lib-dynload > /home/manju/manju/academics/iiitb/project/codes/qt > /usr/lib/python2.7/plat-x86_64-linux-gnu > /usr/lib/python2.7/lib-tk > /usr/lib/python2.7/lib-old > /usr/local/lib/python2.7/dist-packages > /usr/local/lib/python2.7/dist-packages/Numeric > /usr/lib/python2.7/dist-packages/PILcompat > /usr/lib/python2.7/dist-packages/gtk-2.0 > /usr/lib/pymodules/python2.7 > /usr/lib/python2.7/dist-packages/ubuntu-sso-client > /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode > ============================= > The path obtained for *vtkpython* is > ================================== > /usr/lib/python2.7 > /usr/lib/python2.7/dist-packages > /usr/local/lib/python2.7/site-packages > /usr/lib/python2.7/lib-dynload > /home/manju/manju/academics/iiitb/project/codes/qt > /home/kitware/Desktop/vtkbuild/build/install/lib/python27.zip > /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7 > /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/plat-linux2 > /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/lib-tk > /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/lib-old > /home/kitware/Desktop/vtkbuild/build/install/lib/lib-dynload > ============================================ > > > How can, I make vtkpython to have same path as that of python. > How can I remove the certain (kitware-related) paths from vtkpython. > > Thanks a lot. > > Thanks and Regards, > > Manjunath K E > Help Ever Hurt Never > > > On Tue, Aug 11, 2015 at 5:50 PM, David Gobbi > wrote: > >> Hi Manjunath, >> >> Get a list of the paths within "python" and "vtkpython" to see what the >> differences are: >> >> import sys >> for p in sys.path: print p >> >> - David >> >> On Tue, Aug 11, 2015 at 5:40 AM, Manjunath K E >> wrote: >> >>> I have installed vtkpython 6.3.0.rc1 and pyQt5.2.1 manually. >>> >>> If I run a python script then it is working well without any error. >>> >>> But, if i run in "vtkpython" interpretor mode, i have following errors. >>> >>> I have set the *$PYTHONHOME *to contain *PyQt5 *but still problem >>> exists. >>> >>> >>> *export >>> PYTHONPATH=/usr/lib/python2.7:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/:/usr/local/lib/python2.7/site-packages/usr/lib/python2.7/lib-dynload:$PYTHONPATH* >>> manju at iiitb-gvcl-Z800:~/manju/qt$vtkpython >>> vtk version 6.3.0 >>> >>> >>> >>> *Could not find platform independent libraries Could not find >>> platform dependent libraries Consider setting $PYTHONHOME to >>> [:]*Python 2.7.2 (default, Feb 12 2015, 18:30:44) >>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>> Type "help", "copyright", "credits" or "license" for more information. >>> >>> >>> *>>> from PyQt5.QtWidgets import ** >>> Traceback (most recent call last): >>> File "", line 1, in >>> ImportError: /usr/lib/python2.7/dist-packages/sip.so: undefined symbol: >>> PyUnicodeUCS4_DecodeUTF8 >>> *>>> from PyQt5.QtWidgets import QApplication, QDialog* >>> Traceback (most recent call last): >>> File "", line 1, in >>> ImportError: cannot import name QApplication >>> >>> *No error for below code* >>> >>> from PyQt5 import * >>> >>> >>> >>> Please help. >>> >>> Thanks and Regards, >>> Manjunath K E >>> Help Ever Hurt Never >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 11 08:52:19 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 11 Aug 2015 06:52:19 -0600 Subject: [vtkusers] Errors in "vtkpython" interpretor (vtkpython 6.3.0.rc1 and pyQt5.2.1 ) In-Reply-To: References: Message-ID: Also, if you want to do a Debug build of VTK (and only in this case), you can install the python debug info: sudo apt-get install python-dbg On Tue, Aug 11, 2015 at 6:50 AM, David Gobbi wrote: > Hi Manjunath, > > Unfortunately, you cannot remove paths from vtkpython. > > You're facing a problem that happens to many users: you have multiple > copies of python on your computer, and the python you used to build VTK is > not the same as the python that you usually run from the command line. > > First, you should make sure that you have the python-dev package installed: > > sudo apt-get install python-dev > > Then, in your VTK build, make sure that CMakeCache.txt points to the > system python: > > PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python > PYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 > PYTHON_LIBRARY:FILEPATH=/usr/lib/libpython2.7.so > > Then, when you build VTK, your "vtkpython" will use all of the same paths > as the system python. > > - David > > > On Tue, Aug 11, 2015 at 6:27 AM, Manjunath K E > wrote: > >> Hi David Gobbi,, >> >> Thank you very much for the reply. >> >> The path obtained for *python* is >> ================================== >> /usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg >> /usr/lib/python2.7 >> /usr/lib/python2.7/dist-packages >> /usr/local/lib/python2.7/site-packages >> /usr/lib/python2.7/lib-dynload >> /home/manju/manju/academics/iiitb/project/codes/qt >> /usr/lib/python2.7/plat-x86_64-linux-gnu >> /usr/lib/python2.7/lib-tk >> /usr/lib/python2.7/lib-old >> /usr/local/lib/python2.7/dist-packages >> /usr/local/lib/python2.7/dist-packages/Numeric >> /usr/lib/python2.7/dist-packages/PILcompat >> /usr/lib/python2.7/dist-packages/gtk-2.0 >> /usr/lib/pymodules/python2.7 >> /usr/lib/python2.7/dist-packages/ubuntu-sso-client >> /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode >> ============================= >> The path obtained for *vtkpython* is >> ================================== >> /usr/lib/python2.7 >> /usr/lib/python2.7/dist-packages >> /usr/local/lib/python2.7/site-packages >> /usr/lib/python2.7/lib-dynload >> /home/manju/manju/academics/iiitb/project/codes/qt >> /home/kitware/Desktop/vtkbuild/build/install/lib/python27.zip >> /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7 >> /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/plat-linux2 >> /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/lib-tk >> /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/lib-old >> /home/kitware/Desktop/vtkbuild/build/install/lib/lib-dynload >> ============================================ >> >> >> How can, I make vtkpython to have same path as that of python. >> How can I remove the certain (kitware-related) paths from vtkpython. >> >> Thanks a lot. >> >> Thanks and Regards, >> >> Manjunath K E >> Help Ever Hurt Never >> >> >> On Tue, Aug 11, 2015 at 5:50 PM, David Gobbi >> wrote: >> >>> Hi Manjunath, >>> >>> Get a list of the paths within "python" and "vtkpython" to see what the >>> differences are: >>> >>> import sys >>> for p in sys.path: print p >>> >>> - David >>> >>> On Tue, Aug 11, 2015 at 5:40 AM, Manjunath K E >>> wrote: >>> >>>> I have installed vtkpython 6.3.0.rc1 and pyQt5.2.1 manually. >>>> >>>> If I run a python script then it is working well without any error. >>>> >>>> But, if i run in "vtkpython" interpretor mode, i have following errors. >>>> >>>> I have set the *$PYTHONHOME *to contain *PyQt5 *but still problem >>>> exists. >>>> >>>> >>>> *export >>>> PYTHONPATH=/usr/lib/python2.7:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/:/usr/local/lib/python2.7/site-packages/usr/lib/python2.7/lib-dynload:$PYTHONPATH* >>>> manju at iiitb-gvcl-Z800:~/manju/qt$vtkpython >>>> vtk version 6.3.0 >>>> >>>> >>>> >>>> *Could not find platform independent libraries Could not find >>>> platform dependent libraries Consider setting $PYTHONHOME to >>>> [:]*Python 2.7.2 (default, Feb 12 2015, 18:30:44) >>>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>>> Type "help", "copyright", "credits" or "license" for more information. >>>> >>> >>>> *>>> from PyQt5.QtWidgets import ** >>>> Traceback (most recent call last): >>>> File "", line 1, in >>>> ImportError: /usr/lib/python2.7/dist-packages/sip.so: undefined symbol: >>>> PyUnicodeUCS4_DecodeUTF8 >>>> *>>> from PyQt5.QtWidgets import QApplication, QDialog* >>>> Traceback (most recent call last): >>>> File "", line 1, in >>>> ImportError: cannot import name QApplication >>>> >>>> *No error for below code* >>>> >>> from PyQt5 import * >>>> >>> >>>> >>>> Please help. >>>> >>>> Thanks and Regards, >>>> Manjunath K E >>>> Help Ever Hurt Never >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Tue Aug 11 10:06:58 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 11 Aug 2015 14:06:58 +0000 Subject: [vtkusers] Build ActiViz 6.2 Message-ID: Hi, Has anyone been successful in building ActiViz 6.2? I can't find specific instructions in how to do it. I have VS2013 and the version of ActiViz I have is 5.8. The new version is paid so I would like to try building it on my own rather than paying. Thank you, Matias. -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Tue Aug 11 11:01:04 2015 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Tue, 11 Aug 2015 11:01:04 -0400 Subject: [vtkusers] Errors in "vtkpython" interpretor (vtkpython 6.3.0.rc1 and pyQt5.2.1 ) In-Reply-To: References: Message-ID: Hi Manjunath, I think it may be easier to just get your system python to import vtk. The paths in the vtkpython executable are compiled in and cannot be overridden. I think you just need to add $vtk_install/lib and $vtk_install/lib/python2.7/site-packages to your PYTHONPATH environment variable to import vtk from the system's python. HTH, Shawn On Tue, Aug 11, 2015 at 8:52 AM, David Gobbi wrote: > Also, if you want to do a Debug build of VTK (and only in this case), you > can install the python debug info: > > sudo apt-get install python-dbg > > On Tue, Aug 11, 2015 at 6:50 AM, David Gobbi > wrote: > >> Hi Manjunath, >> >> Unfortunately, you cannot remove paths from vtkpython. >> >> You're facing a problem that happens to many users: you have multiple >> copies of python on your computer, and the python you used to build VTK is >> not the same as the python that you usually run from the command line. >> >> First, you should make sure that you have the python-dev package >> installed: >> >> sudo apt-get install python-dev >> >> Then, in your VTK build, make sure that CMakeCache.txt points to the >> system python: >> >> PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python >> PYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 >> PYTHON_LIBRARY:FILEPATH=/usr/lib/libpython2.7.so >> >> Then, when you build VTK, your "vtkpython" will use all of the same paths >> as the system python. >> >> - David >> >> >> On Tue, Aug 11, 2015 at 6:27 AM, Manjunath K E >> wrote: >> >>> Hi David Gobbi,, >>> >>> Thank you very much for the reply. >>> >>> The path obtained for *python* is >>> ================================== >>> /usr/local/lib/python2.7/dist-packages/pip-7.1.0-py2.7.egg >>> /usr/lib/python2.7 >>> /usr/lib/python2.7/dist-packages >>> /usr/local/lib/python2.7/site-packages >>> /usr/lib/python2.7/lib-dynload >>> /home/manju/manju/academics/iiitb/project/codes/qt >>> /usr/lib/python2.7/plat-x86_64-linux-gnu >>> /usr/lib/python2.7/lib-tk >>> /usr/lib/python2.7/lib-old >>> /usr/local/lib/python2.7/dist-packages >>> /usr/local/lib/python2.7/dist-packages/Numeric >>> /usr/lib/python2.7/dist-packages/PILcompat >>> /usr/lib/python2.7/dist-packages/gtk-2.0 >>> /usr/lib/pymodules/python2.7 >>> /usr/lib/python2.7/dist-packages/ubuntu-sso-client >>> /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode >>> ============================= >>> The path obtained for *vtkpython* is >>> ================================== >>> /usr/lib/python2.7 >>> /usr/lib/python2.7/dist-packages >>> /usr/local/lib/python2.7/site-packages >>> /usr/lib/python2.7/lib-dynload >>> /home/manju/manju/academics/iiitb/project/codes/qt >>> /home/kitware/Desktop/vtkbuild/build/install/lib/python27.zip >>> /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7 >>> /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/plat-linux2 >>> /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/lib-tk >>> /home/kitware/Desktop/vtkbuild/build/install/lib/python2.7/lib-old >>> /home/kitware/Desktop/vtkbuild/build/install/lib/lib-dynload >>> ============================================ >>> >>> >>> How can, I make vtkpython to have same path as that of python. >>> How can I remove the certain (kitware-related) paths from vtkpython. >>> >>> Thanks a lot. >>> >>> Thanks and Regards, >>> >>> Manjunath K E >>> Help Ever Hurt Never >>> >>> >>> On Tue, Aug 11, 2015 at 5:50 PM, David Gobbi >>> wrote: >>> >>>> Hi Manjunath, >>>> >>>> Get a list of the paths within "python" and "vtkpython" to see what the >>>> differences are: >>>> >>>> import sys >>>> for p in sys.path: print p >>>> >>>> - David >>>> >>>> On Tue, Aug 11, 2015 at 5:40 AM, Manjunath K E >>>> wrote: >>>> >>>>> I have installed vtkpython 6.3.0.rc1 and pyQt5.2.1 manually. >>>>> >>>>> If I run a python script then it is working well without any error. >>>>> >>>>> But, if i run in "vtkpython" interpretor mode, i have following errors. >>>>> >>>>> I have set the *$PYTHONHOME *to contain *PyQt5 *but still problem >>>>> exists. >>>>> >>>>> >>>>> *export >>>>> PYTHONPATH=/usr/lib/python2.7:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/:/usr/local/lib/python2.7/site-packages/usr/lib/python2.7/lib-dynload:$PYTHONPATH* >>>>> manju at iiitb-gvcl-Z800:~/manju/qt$vtkpython >>>>> vtk version 6.3.0 >>>>> >>>>> >>>>> >>>>> *Could not find platform independent libraries Could not find >>>>> platform dependent libraries Consider setting $PYTHONHOME to >>>>> [:]*Python 2.7.2 (default, Feb 12 2015, >>>>> 18:30:44) >>>>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >>>>> Type "help", "copyright", "credits" or "license" for more information. >>>>> >>> >>>>> *>>> from PyQt5.QtWidgets import ** >>>>> Traceback (most recent call last): >>>>> File "", line 1, in >>>>> ImportError: /usr/lib/python2.7/dist-packages/sip.so: undefined >>>>> symbol: PyUnicodeUCS4_DecodeUTF8 >>>>> *>>> from PyQt5.QtWidgets import QApplication, QDialog* >>>>> Traceback (most recent call last): >>>>> File "", line 1, in >>>>> ImportError: cannot import name QApplication >>>>> >>>>> *No error for below code* >>>>> >>> from PyQt5 import * >>>>> >>> >>>>> >>>>> Please help. >>>>> >>>>> Thanks and Regards, >>>>> Manjunath K E >>>>> Help Ever Hurt Never >>>>> >>>>> >>>> >>> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From audrius at tomographix.com Tue Aug 11 11:03:43 2015 From: audrius at tomographix.com (Audrius Stundzia) Date: Tue, 11 Aug 2015 11:03:43 -0400 Subject: [vtkusers] Update 1 | Bug fix notes for building VTK 6.2.0 with MS VS2015 on Windows 10 x64 In-Reply-To: <1439241161.1993575.352694577.23D6DA4A@webmail.messagingengine.com> References: <1439241161.1993575.352694577.23D6DA4A@webmail.messagingengine.com> Message-ID: <1439305423.2255061.353409025.065C47BD@webmail.messagingengine.com> VTK Users, The previous reported fixes apply to both the?VTK 6.2.0 Debug and Release version builds. In building the VTK 6.2.0 Release version, specifically, encountered the following MS VS2015 RTM ?compiler bug [previously reported by?Yordan Kyosev with no resolution] Project:?vtkIOEnSight File:?vtkEnSightReader.cxx 1> vtkEnSightReader.cxx 1> Generating Code... 1>e:\vtk\vtk-6.2.0\io\ensight\vtkensightreader.cxx(1568): fatal error C1001: An internal error has occurred in the compiler. 1> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246) 1> To work around this problem, try simplifying or changing the program near the locations listed above. Experiments with updating the code in question did not fix the issue. As I do not use the vtkIOEnSight project, the Gordian Knot solution was to simply remove this project from the build. On Mon, Aug 10, 2015, at 17:12, Audrius Stundzia wrote: > VTK Users, > > Thought I'd share the bug fixes that were required to build VTK 6.2.0 > to build with MS VS2015 on Windows 10 x64 in case anyone else is > trying to do the same. > > 118>------ Build started: Project: ALL_BUILD, Configuration: Debug x64 > ------ > 118> Building Custom Rule E:/VTK/VTK-6.2.0/CMakeLists.txt > 118> CMake does not need to re-run because > E:\VTK\CMakeFiles\generate.stamp is up-to-date. > ========== Build: 25 succeeded, 93 failed, 0 up-to-date, 0 skipped > ========== ========== > > Wow. > > The following 4 bug fixes resulted in a successful build. > > 1/ Project: vtklibxml2 > > File: config.h > > /* Win32 Std C name mangling work-around */ /* MS VS2015: deprecated. > snprintf is now the standard in VS2015.?*/ // #if defined(_MSC_VER) // > # define snprintf _snprintf / #endif > > 2/ Project: vtktiff > > File: tiffiop.h > > // MS VS2015: added header > # include > > // MS VS2015: deprecated /* #ifdef HAVE_SEARCH_H > # include > #else extern void *lfind(const void *, const void *, size_t *, size_t, > int (*)(const void *, const void *)); #endif */ > > 3/ Project:?vtkhdf5 > > File: ?H5Omtime.c > > #elif defined(H5_HAVE_LNX_TIMEZONE) // Dummy argument for now? ? /* > Linux libc-5 */? ? the_time -= timezone - (tm.tm_isdst?3600:0); #elif > defined(H5_HAVE_TIMEZONE) && defined(_MSC_VER) && _MSC_VER >= 1900 // > In Visual Studio prior to VS2015 'timezone' is a global variable > declared // in time.h. That variable was deprecated and in VS2015 is > removed, with // _get_timezone replacing it. long time_zone = 0; > _get_timezone(&time_zone); the_time -= time_zone - (tm.tm_isdst ? > 3600 : 0); > > Comment: Is this correct? Maybe, but frankly I don't care as I have > less than zero interest in HDF5. > > 4/ Project: vtkCommonCore > > File:?vtkWin32ProcessOutputWindow.cxx > > Fix: add a space before and after PRIdword. > > // Construct the executable name from the process id, pointer to? // > this output window instance, and a count. ?This should be unique. > sprintf(exeName, "vtkWin32OWP_%" PRIdword "_%p_%u.exe", > GetCurrentProcessId(), this, this->Count++); > > After the above 4 fixes, VTK 6.2.0 built and installed as it should. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Tue Aug 11 11:36:26 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 11 Aug 2015 11:36:26 -0400 Subject: [vtkusers] Update 1 | Bug fix notes for building VTK 6.2.0 with MS VS2015 on Windows 10 x64 In-Reply-To: <1439305423.2255061.353409025.065C47BD@webmail.messagingengine.com> References: <1439241161.1993575.352694577.23D6DA4A@webmail.messagingengine.com> <1439305423.2255061.353409025.065C47BD@webmail.messagingengine.com> Message-ID: <20150811153626.GB27300@megas.kitware.com> On Tue, Aug 11, 2015 at 11:03:43 -0400, Audrius Stundzia wrote: > The previous reported fixes apply to both the?VTK 6.2.0 Debug and > Release version builds. > > In building the VTK 6.2.0 Release version, specifically, encountered the > following MS VS2015 RTM ?compiler bug [previously reported by?Yordan > Kyosev with no resolution] > > Project:?vtkIOEnSight > > File:?vtkEnSightReader.cxx > > 1> vtkEnSightReader.cxx > 1> Generating Code... > 1>e:\vtk\vtk-6.2.0\io\ensight\vtkensightreader.cxx(1568): fatal error > C1001: An internal error has occurred in the compiler. > 1> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246) > 1> To work around this problem, try simplifying or changing the program > near the locations listed above. > > Experiments with updating the code in question did not fix the issue. As > I do not use the vtkIOEnSight project, the Gordian Knot solution was to > simply remove this project from the build. Please see this branch for all of the changes for 2015 that I've seen so far: https://gitlab.kitware.com/vtk/vtk/merge_requests/446 It includes the fix for IOEnSight. Testing welcome (our 2015 buildbot is low priority in scheduling since it is known to not work, so it takes time to come back with results). --Ben From saeedbakhshmand at gmail.com Tue Aug 11 12:50:20 2015 From: saeedbakhshmand at gmail.com (Saeed Mahdizadeh Bakhshmand) Date: Tue, 11 Aug 2015 12:50:20 -0400 Subject: [vtkusers] Fwd: 3D graphs (node-link diagrams) in VTK In-Reply-To: References: Message-ID: Hello Experts, Before proceeding with my idea, I am wondering if VTK is able to generate 3D views of conventional node-link diagrams that can be rendered in 3D? And if yes, which command does that? Best, Saeed -------------- next part -------------- An HTML attachment was scrubbed... URL: From siavashk at ece.ubc.ca Tue Aug 11 12:54:41 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Tue, 11 Aug 2015 09:54:41 -0700 (MST) Subject: [vtkusers] Fwd: 3D graphs (node-link diagrams) in VTK In-Reply-To: References: Message-ID: <1439312081563-5733428.post@n5.nabble.com> Hi Saeed, Would something like this solve your problem? Siavash -- View this message in context: http://vtk.1045678.n5.nabble.com/Fwd-3D-graphs-node-link-diagrams-in-VTK-tp5733427p5733428.html Sent from the VTK - Users mailing list archive at Nabble.com. From totte at dunescientific.com Tue Aug 11 14:27:12 2015 From: totte at dunescientific.com (Totte Karlsson) Date: Tue, 11 Aug 2015 11:27:12 -0700 Subject: [vtkusers] altering a widgets response to mouse clicks In-Reply-To: References: <55C7DF88.4040700@dunescientific.com> <55C92AD6.50303@dunescientific.com> Message-ID: <55CA3E80.4060107@dunescientific.com> On 8/10/2015 7:39 PM, Cory Quammen wrote: > > However, the subclassed interactors On*Button() functions are NOT > called as the widget is visible and clicked on. Those overloaded > functions are only called if clicking outside the widget. > > > In that case, perhaps you need to subclass vtkBoxWidget and override > the same member functions. It is likely processing the mouse button > clicks and not passing the event on to your custom interactor. Sorry > for sending you down that path. > I believe I saw a post somewhere somebody having similar issue, with that solution, but now I can't seem to find it. Thanks for the suggestion! -tk -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Tue Aug 11 18:40:24 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 11 Aug 2015 18:40:24 -0400 Subject: [vtkusers] Announce: vtk 6.3.0 release candidate 2 is ready Message-ID: <20150811224024.GA30431@megas.kitware.com> The VTK developement team is happy to announce that VTK 6.3 is continuing along the release candidate stage! You can find the source, data, and new vtkpython binary packages here: http://www.vtk.org/VTK/resources/software.html#releasecandidate Please try this version of VTK and report any issues to the list or the bug tracker so that we can try to address them before VTK 6.3.0 final. Compared to rc1, this contains various bug and crash fixes. We hope you enjoy this release of VTK! As always, contact Kitware and the mailing lists for assistance. Thanks, --Ben -------------- next part -------------- Brad King (1): eaf0888 Revert "Remove forward boosts declarations" Cory Quammen (1): e5168a1 Fix crash where vtkColorTransferFunction has 0 nodes Dave DeMarle (1): bc11760 fix a bug where leftover color state would break value painter David Gobbi (1): fbcbad2 Fix normal computation in vtkContourTriangulator. Joachim Pouderoux (2): 0063d5d Fix crash in vtkPolygon::ParametrizePolygon for invalid polygons. 248d525 linking: default to not making warnings fatal errors Johan Andruejol (1): 50d2a98 Remove forward boosts declarations Sean McBride (1): 2ed04c9 Update SimpleCocoaVTK Xcode project to work with VTK 6.3 T.J. Corona (5): ffc25be Prevent str.begin() from being dereferenced if str is empty. 1f79d6b Removed double delete in vtkXdmfWriter destructor. c3a86fd XML data reader now throws an error when reading arrays with duplicate names. 5e5fb77 Force a lookup table reset after vtkAbstractArray::Reset() bce1530 Added a means to prevent private headers from being installed. From saeedbakhshmand at gmail.com Tue Aug 11 19:07:10 2015 From: saeedbakhshmand at gmail.com (Saeed Mahdizadeh Bakhshmand) Date: Tue, 11 Aug 2015 19:07:10 -0400 Subject: [vtkusers] Fwd: 3D graphs (node-link diagrams) in VTK In-Reply-To: References: <1439312081563-5733428.post@n5.nabble.com> Message-ID: And I found out that 3D graphs are feasible to be drawn in VTK. Have you ever tried to load a predefined graph (with node locations and vertices) to VTK? On Tue, Aug 11, 2015 at 12:58 PM, Saeed Mahdizadeh Bakhshmand < saeedbakhshmand at gmail.com> wrote: > Hi Siavash, > > No, something like this > > would be ideal, those graphs seem to be planar. > > Saeed > > On Tue, Aug 11, 2015 at 12:54 PM, Siavash Khallaghi > wrote: > >> Hi Saeed, >> >> Would something like this >> solve >> your problem? >> >> Siavash >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Fwd-3D-graphs-node-link-diagrams-in-VTK-tp5733427p5733428.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 419655660 at qq.com Wed Aug 12 01:46:46 2015 From: 419655660 at qq.com (louiskoo) Date: Tue, 11 Aug 2015 22:46:46 -0700 (MST) Subject: [vtkusers] Build a surface plot from java (point by point) In-Reply-To: <1439277023596-5733413.post@n5.nabble.com> References: <1439277023596-5733413.post@n5.nabble.com> Message-ID: <1439358406617-5733435.post@n5.nabble.com> do you use vtk 32bit or 64 bit? -- View this message in context: http://vtk.1045678.n5.nabble.com/Build-a-surface-plot-from-java-point-by-point-tp5733413p5733435.html Sent from the VTK - Users mailing list archive at Nabble.com. From xvysoc01 at stud.fit.vutbr.cz Wed Aug 12 10:05:40 2015 From: xvysoc01 at stud.fit.vutbr.cz (=?ISO-8859-2?Q?Ond=F8ej_Vysock=FD?=) Date: Wed, 12 Aug 2015 16:05:40 +0200 Subject: [vtkusers] Get IDs of selected cells in Python In-Reply-To: <55CB09D6.1010000@stud.fit.vutbr.cz> References: <55CB09D6.1010000@stud.fit.vutbr.cz> Message-ID: <55CB52B4.2040602@stud.fit.vutbr.cz> Hi everyone, I work on VTK/python script (paraview programmable filter) to change values of selected cells, however my problem is that I don't know how to get IDs of selected cells (http://stackoverflow.com/questions/31851749/how-to-get-ids-of-selected-cells-in-vtk-python). I would appreciate any advice. Thank you, Andrew From martin.klemm at hs-offenburg.de Wed Aug 12 10:24:37 2015 From: martin.klemm at hs-offenburg.de (Martin Klemm) Date: Wed, 12 Aug 2015 16:24:37 +0200 Subject: [vtkusers] Front and Back of Plane in different color Message-ID: <55CB5725.6010003@hs-offenburg.de> Hi everyone, is it possible to have a surface or to be more specific a plane with different colors on the front and the back side? I couldn't find any information about this. Thanks. Best Martin From jason.cardinal at optimalcomputing.be Wed Aug 12 11:05:27 2015 From: jason.cardinal at optimalcomputing.be (jason@optimalcomputing) Date: Wed, 12 Aug 2015 08:05:27 -0700 (MST) Subject: [vtkusers] Build a surface plot from java (point by point) In-Reply-To: <1439358406617-5733435.post@n5.nabble.com> References: <1439277023596-5733413.post@n5.nabble.com> <1439358406617-5733435.post@n5.nabble.com> Message-ID: <1439391927013-5733440.post@n5.nabble.com> vtk 32 bits -- View this message in context: http://vtk.1045678.n5.nabble.com/Build-a-surface-plot-from-java-point-by-point-tp5733413p5733440.html Sent from the VTK - Users mailing list archive at Nabble.com. From matimontg at gmail.com Wed Aug 12 11:19:04 2015 From: matimontg at gmail.com (Matias Montroull) Date: Wed, 12 Aug 2015 15:19:04 +0000 Subject: [vtkusers] Configure and build gccxml | ActiViz Message-ID: Hi, I'm going through the process of generating my own ActiViz DLLs and noticed the gccxml is transitioned to CastXML. I compiled CastXML succesfully last night and now I'm downloading SDK to continue with the next steps. Is there an updated instructions on how to generate the DLLs using CastXML? I'm looking at these for now: http://www.vtk.org/Wiki/VTK/CSharp/ActiViz/Build Thank you, Matias. -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From audrius at tomographix.com Wed Aug 12 13:03:34 2015 From: audrius at tomographix.com (Audrius Stundzia) Date: Wed, 12 Aug 2015 13:03:34 -0400 Subject: [vtkusers] Summary notes on successful VTK 6.3.0.rc2 Debug and Release x64 builds using MS VS2015 on Windows 10 x64 Message-ID: <1439399014.3839840.354504185.742652AD@webmail.messagingengine.com> VTK Users, A summary of the bug fixes required to successfully build?VTK 6.3.0.rc2 x64 Debug and Release versions using?MS VS2015 on Windows 10 x64. OS: Windows 10 x64 IDE: Visual Studio 2015 CMake: 3.3.0 VTK: 6.3.0.rc2 Build version: x64 1/ CMake bug during "Configure": Repeatedly hitting "Ignore" on the pop up window generates HDF5: Checking for appropriate format for 64 bit long: HDF5: Width with l64 failed with result: 3 HDF5: Width with l failed with result: 3 HDF5: Width with L failed with result: 3 HDF5: Width with q failed with result: 3 HDF5: Width with I64 failed with result: 3 HDF5: Width with ll failed with result: 3 HDF5: Checking for apropriate format for 64 bit long: not found The bug fix was provided by Ben Boeckel 10 August 2015 at 21:59: _____Ben Boeckel wrote: HDF5 does not support VS2015 in its try_run code. There is a branch for 2015 support here: https://gitlab.kitware.com/vtk/vtk/merge_requests/446 This specific problem is fixed here: https://gitlab.kitware.com/ben.boeckel/vtk/commit/718941125d967015e366172dd09793268f4c9eb5 [Comment: I had to manually implement this part of the fix] with a fix to make long long format string detection actually work right after it: https://gitlab.kitware.com/ben.boeckel/vtk/commit/a4cf06de481eb2a354d10e7874928200be65c400 _____End_____ 2/ The following 3 bug fixes resulted were required for both Debug and Release builds 2.1/ Project: vtklibxml2 File: config.h /* Win32 Std C name mangling work-around */ /* MS VS2015: deprecated. snprintf is now the standard in VS2015.?*/ // #if defined(_MSC_VER) // # define snprintf _snprintf / #endif 2.2/ Project: vtktiff File: tiffiop.h // MS VS2015: added header # include // MS VS2015: deprecated /* #ifdef HAVE_SEARCH_H # include #else extern void *lfind(const void *, const void *, size_t *, size_t, int (*)(const void *, const void *)); #endif */ 2.3/ Project:?vtkhdf5 File: ?H5Omtime.c #elif defined(H5_HAVE_LNX_TIMEZONE) // Dummy argument for now? ? /* Linux libc-5 */? ? the_time -= timezone - (tm.tm_isdst?3600:0); #elif defined(H5_HAVE_TIMEZONE) && defined(_MSC_VER) && _MSC_VER >= 1900 // In Visual Studio prior to VS2015 'timezone' is a global variable declared // in time.h. That variable was deprecated and in VS2015 is removed, with // _get_timezone replacing it. long time_zone = 0; _get_timezone(&time_zone); the_time -= time_zone - (tm.tm_isdst ? 3600 : 0); Comment: Is this correct? Maybe, but frankly I don't care as I have less than zero interest in HDF5. 2.4/ Fixed in VTK 6.3.0.rc2 Project: vtkCommonCore File:?vtkWin32ProcessOutputWindow.cxx Fix: add a space before and after PRIdword. // Construct the executable name from the process id, pointer to? // this output window instance, and a count. ?This should be unique. sprintf(exeName, "vtkWin32OWP_%" PRIdword "_%p_%u.exe", GetCurrentProcessId(), this, this->Count++); 3/VTK 6.3.0.rc2 Release x64 build specific MS VS2015 ICE (Internal Compiler Error) Project: vtkIOEnSight File:?vtkEnSightReader.cxx e:\vtk\vtk-6.3.0.rc2\io\ensight\vtkensightreader.cxx(1578): fatal error C1001: An internal error has occurred in the compiler. (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246) Temporary workaround: add?#pragma optimize before after the problem member function: ?int vtkEnSightReader::ReadVariableFiles // Start | MS VS2015 ICE workaround #pragma optimize( "ts", on ) #pragma optimize( "g", on ) int vtkEnSightReader::ReadVariableFiles(vtkMultiBlockDataSet *output) { ... } // End | MS VS2015 ICE workaround #pragma optimize( "ts", off ) #pragma optimize( "g", off ) 4/ Happy building. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Aug 12 15:27:00 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 12 Aug 2015 13:27:00 -0600 Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing In-Reply-To: References: <55C42302.2000607@aero.iitb.ac.in> Message-ID: More news about Python 3 support: This morning I merged in all of the fixes that Andrew did for the VTK tests so that they run under Python 3 (thanks to Ben for running and maintaining the dashboard machine). We're confident now that VTK will run properly with Python 3. None of the python examples have been converted to Python 3 yet, so there's still work to be done (and I'm on vacation until the middle of next week, so I won't be touching any of the code for a little while). - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From totte at dunescientific.com Wed Aug 12 15:51:16 2015 From: totte at dunescientific.com (Totte Karlsson) Date: Wed, 12 Aug 2015 12:51:16 -0700 Subject: [vtkusers] altering a widgets response to mouse clicks In-Reply-To: References: <55C7DF88.4040700@dunescientific.com> <55C92AD6.50303@dunescientific.com> Message-ID: <55CBA3B4.3050506@dunescientific.com> On 8/10/2015 7:39 PM, Cory Quammen wrote: > > In that case, perhaps you need to subclass vtkBoxWidget and override > the same member functions. It is likely processing the mouse button > clicks and not passing the event on to your custom interactor. Sorry > for sending you down that path. > That did the trick perfectly! For anyone needing to do the same, just re implement the On*Button functions, in a derived widget class, like this void MyDerivedWidget::OnLeftButtonDown() { BoxWidget::OnRightButtonDown(); } Thanks! -tk From cory.quammen at kitware.com Wed Aug 12 16:02:40 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 12 Aug 2015 16:02:40 -0400 Subject: [vtkusers] altering a widgets response to mouse clicks In-Reply-To: <55CBA3B4.3050506@dunescientific.com> References: <55C7DF88.4040700@dunescientific.com> <55C92AD6.50303@dunescientific.com> <55CBA3B4.3050506@dunescientific.com> Message-ID: Great, I'm glad its working for you. On Wed, Aug 12, 2015 at 3:51 PM, Totte Karlsson wrote: > > On 8/10/2015 7:39 PM, Cory Quammen wrote: > >> >> In that case, perhaps you need to subclass vtkBoxWidget and override the >> same member functions. It is likely processing the mouse button clicks and >> not passing the event on to your custom interactor. Sorry for sending you >> down that path. >> >> That did the trick perfectly! > For anyone needing to do the same, just re implement the On*Button > functions, in a derived widget class, like this > > void MyDerivedWidget::OnLeftButtonDown() > { > BoxWidget::OnRightButtonDown(); > } > > Thanks! > -tk > > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From siavashk at ece.ubc.ca Wed Aug 12 17:44:07 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Wed, 12 Aug 2015 14:44:07 -0700 (MST) Subject: [vtkusers] Fwd: 3D graphs (node-link diagrams) in VTK In-Reply-To: References: <1439312081563-5733428.post@n5.nabble.com> Message-ID: <1439415847278-5733454.post@n5.nabble.com> Please keep discussions on the users mailing list. I was researching your problem and I wonder if vtkPolyData is suitable in this case. I do not have a good answer for you yet. Siavash Saeed Mahdizadeh Bakhshmand wrote > Hello Siavash > Have you ever tried to load a predefined graph (with node locations and > vertices) to VTK? > Cheers, > Saeed > > On Tue, Aug 11, 2015 at 7:07 PM, Saeed Mahdizadeh Bakhshmand > < > saeedbakhshmand at gmail.com > > > wrote: > > And I found out that 3D graphs are feasible to be drawn in VTK. Have > you ever tried to load a predefined graph (with node locations and > vertices) to VTK? > > > On Tue, Aug 11, 2015 at 12:58 PM, Saeed Mahdizadeh Bakhshmand > < > saeedbakhshmand at gmail.com > > > wrote: > > Hi Siavash, > > No, something like this would be ideal, those graphs seem to be > planar. > > Saeed -- View this message in context: http://vtk.1045678.n5.nabble.com/Fwd-3D-graphs-node-link-diagrams-in-VTK-tp5733427p5733454.html Sent from the VTK - Users mailing list archive at Nabble.com. From 419655660 at qq.com Wed Aug 12 22:19:00 2015 From: 419655660 at qq.com (louiskoo) Date: Wed, 12 Aug 2015 19:19:00 -0700 (MST) Subject: [vtkusers] 64 bit VTK jar and dll for Java In-Reply-To: References: <1439191570637-5733377.post@n5.nabble.com> Message-ID: <1439432340663-5733459.post@n5.nabble.com> I have unpacked the native library part and do not know how to set environment variable PATH/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH with win7 64 bit.Can you tell me more about it ? -- View this message in context: http://vtk.1045678.n5.nabble.com/64-bit-VTK-jar-and-dll-for-Java-tp5733377p5733459.html Sent from the VTK - Users mailing list archive at Nabble.com. From 419655660 at qq.com Wed Aug 12 22:32:28 2015 From: 419655660 at qq.com (louiskoo) Date: Wed, 12 Aug 2015 19:32:28 -0700 (MST) Subject: [vtkusers] 64 bit VTK jar and dll for Java In-Reply-To: References: <1439191570637-5733377.post@n5.nabble.com> Message-ID: <1439433148848-5733460.post@n5.nabble.com> Thanks a lot .I have fixed it and just set envirement path and restart Myeclipse. Can you give me windows 32 vtk link? -- View this message in context: http://vtk.1045678.n5.nabble.com/64-bit-VTK-jar-and-dll-for-Java-tp5733377p5733460.html Sent from the VTK - Users mailing list archive at Nabble.com. From marco.dev.open at gmail.com Thu Aug 13 02:48:37 2015 From: marco.dev.open at gmail.com (Marco Dev) Date: Thu, 13 Aug 2015 11:18:37 +0430 Subject: [vtkusers] converting coordinate system Message-ID: Hi dears, I have some itk image filter for translating from image coordinate system to world coordinate system Means I want to convert Dicom image position and another tag information such as pixel spacing orientation to world coordinate for Itk coordinate these are difference in position How can do this convert Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From ke.manjunath at gmail.com Thu Aug 13 03:45:03 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Thu, 13 Aug 2015 13:15:03 +0530 Subject: [vtkusers] Pyqt5 : AttributeError: 'QWheelEvent' object has no attribute 'delta' (VTK 6.3.rc1, qt 5.2.1) Message-ID: Hi All, I have taken QVTKRenderWindowInteractor.py for PyQt5 from https://gitlab.kitware.com/alextsui05/vtk/tree/04485e81d6a31740a572f5ee8351289db0952f09/Wrapping/Python/vtk/qt5 When I run a sample program. I get the following error. ====================== Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/vtk/qt5/QVTKRenderWindowInteractor.py", line 369, in wheelEvent if ev.delta() >= 0: AttributeError: 'QWheelEvent' object has no attribute 'delta' Aborted (core dumped) =========================== >From http://doc.qt.io/qt-5/qwheelevent-obsolete.html , it can be seen that *delta *() function of QWheelEvent is obsolete. I am using QT 5.2.1. Could anyone help me on this. Is there is any other "QVTKRenderWindowInteractor.py" program or patch for the existing one is available. Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From gajo.ic at gmail.com Thu Aug 13 08:38:35 2015 From: gajo.ic at gmail.com (gajo) Date: Thu, 13 Aug 2015 05:38:35 -0700 (MST) Subject: [vtkusers] Configure and build gccxml | ActiViz In-Reply-To: References: Message-ID: <1439469515667-5733468.post@n5.nabble.com> Being that ActiViz compiling still takes VS2008, I doubt(ed) very much that gccxml was updated to CastXML in the process (I could be wrong there?) so I only used the latest gccxml repo source code to build gccxml and not CastXML tool...however after installing it I had more problems building mummy (which I only built partially - I had plenty of errors in projects like tests,carsEL,suvsEL,etc... - but it seems that mummy and Kitware.mummy.Runtime projects build just fine except they didn't copy those builds back to the build directory, possibly due to problems building those test projects maybe, I'm not sure?!)...unfortunately after those successes my build of ActiViz stopped one error short http://vtk.1045678.n5.nabble.com/Activiz-6-1-error-during-build-tp5733414.html and no matter what I tried it didn't work, causing more errors to appear http://vtk.1045678.n5.nabble.com/Build-ActiViz-6-2-td5733422.html ... if you manage to build it with CastXML (or otherwise) I'd appreciate to know just how? I'm unsure if those errors in ActiViz build were caused by the mummy not fully building (but I doubt it, mummy.exe builds fine, plus those mummy Runtime dlls). I've tried also to combine the previous pre-built 5.8.0 with VTK 6.2 but that seems not to work, although I think I did use it that way once, I'm guessing the code I used it with had same old references to dlls/libs which existed back in VTK 5.8 - which reminds me - is there any specific additions or omissions to ActiViz when building it with VTK 6.2 (or is everyhing in VTK 6.2 just wrapped all the same and added automatically, since I seem some examples missing in C#, and existing in CXX examples)? TIA -- View this message in context: http://vtk.1045678.n5.nabble.com/Configure-and-build-gccxml-ActiViz-tp5733442p5733468.html Sent from the VTK - Users mailing list archive at Nabble.com. From oscar.cainelli at smarthydrosol.com Thu Aug 13 09:59:30 2015 From: oscar.cainelli at smarthydrosol.com (oscarafone77) Date: Thu, 13 Aug 2015 06:59:30 -0700 (MST) Subject: [vtkusers] Configure and build gccxml | ActiViz In-Reply-To: <1439469515667-5733468.post@n5.nabble.com> References: <1439469515667-5733468.post@n5.nabble.com> Message-ID: <1439474370180-5733469.post@n5.nabble.com> Hi all, i also tried to compile activiz with VTK 6.1 with no luck. It throws an error on some expected double[] output from a function, and if I workaround this error more errors appear. One of these is about vtkcommon.dll not found, and if I go to the vtk6.1 build directory that dll is effectively missing, while in older vtk versions it is present. Could anybody compile it with no errors? Thank you Oscar -- View this message in context: http://vtk.1045678.n5.nabble.com/Configure-and-build-gccxml-ActiViz-tp5733442p5733469.html Sent from the VTK - Users mailing list archive at Nabble.com. From DLRdave at aol.com Thu Aug 13 10:10:57 2015 From: DLRdave at aol.com (David Cole) Date: Thu, 13 Aug 2015 10:10:57 -0400 Subject: [vtkusers] Configure and build gccxml | ActiViz In-Reply-To: <1439469515667-5733468.post@n5.nabble.com> References: <1439469515667-5733468.post@n5.nabble.com> Message-ID: The very **reason** ActiViz only worked with VS2008 was a gccxml restriction... If you can get it to work with CastXML instead (does it have the same output format as gccxml??), then it should work with up to date versions of Visual Studio as well. D On Thursday, August 13, 2015, gajo wrote: > Being that ActiViz compiling still takes VS2008, I doubt(ed) very much that > gccxml was updated to CastXML in the process (I could be wrong there?) so I > only used the latest gccxml repo source code to build gccxml and not > CastXML > tool...however after installing it I had more problems building mummy > (which > I only built partially - I had plenty of errors in projects like > tests,carsEL,suvsEL,etc... - but it seems that mummy and > Kitware.mummy.Runtime projects build just fine except they didn't copy > those > builds back to the build directory, possibly due to problems building those > test projects maybe, I'm not sure?!)...unfortunately after those successes > my build of ActiViz stopped one error short > > http://vtk.1045678.n5.nabble.com/Activiz-6-1-error-during-build-tp5733414.html > and no matter what I tried it didn't work, causing more errors to appear > http://vtk.1045678.n5.nabble.com/Build-ActiViz-6-2-td5733422.html ... if > you > manage to build it with CastXML (or otherwise) I'd appreciate to know just > how? > I'm unsure if those errors in ActiViz build were caused by the mummy not > fully building (but I doubt it, mummy.exe builds fine, plus those mummy > Runtime dlls). > I've tried also to combine the previous pre-built 5.8.0 with VTK 6.2 but > that seems not to work, although I think I did use it that way once, I'm > guessing the code I used it with had same old references to dlls/libs which > existed back in VTK 5.8 - which reminds me - is there any specific > additions > or omissions to ActiViz when building it with VTK 6.2 (or is everyhing in > VTK 6.2 just wrapped all the same and added automatically, since I seem > some > examples missing in C#, and existing in CXX examples)? > TIA > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Configure-and-build-gccxml-ActiViz-tp5733442p5733468.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chen_lin119 at 126.com Thu Aug 13 12:05:28 2015 From: chen_lin119 at 126.com (chen_lin119 at 126.com) Date: Fri, 14 Aug 2015 00:05:28 +0800 (CST) Subject: [vtkusers] vtkImageData->SetScalarType() Message-ID: <409f4290.e67f.14f27cf1a1a.Coremail.chen_lin119@126.com> who can help me ? vtk 6.2 vtkImageData class fuction "SetScalarType() " has changed from SetScalarType(int i) to SetScalarType(int i,vtkInformation* meta_data) what i should code instead of vtkInformation* meta_data!! it will be very good if you have some examples~ xidian university doomSmile 15109214276 chen_lin119 at 126.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Aug 13 12:23:00 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 13 Aug 2015 12:23:00 -0400 Subject: [vtkusers] vtkImageData->SetScalarType() In-Reply-To: <409f4290.e67f.14f27cf1a1a.Coremail.chen_lin119@126.com> References: <409f4290.e67f.14f27cf1a1a.Coremail.chen_lin119@126.com> Message-ID: http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Changes_to_Scalars_Manipulation_Functions David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Aug 13, 2015 at 12:05 PM, chen_lin119 at 126.com wrote: > who can help me ? > vtk 6.2 > vtkImageData class > fuction "SetScalarType() " has changed from SetScalarType(int i) to SetScalarType(int > i,vtkInformation* meta_data) > what i should code instead of vtkInformation* meta_data!! > it will be very good if you have some examples~ > > > ------------------------------ > xidian university > doomSmile > 15109214276 > chen_lin119 at 126.com > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sur.chiranjib at gmail.com Thu Aug 13 12:47:09 2015 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Thu, 13 Aug 2015 22:17:09 +0530 Subject: [vtkusers] Request to make some member function as virtual Message-ID: Hi, I am working on my own implementation of vtkXMLWriter and I start with inheriting the vtkXMLWriter class. While doing this, I realised that I can obtain my desired XML data format if I can overload the function vtkXMLWriter::WriteArrayFooter(...) vtkXMLWriter::WriteArrayInline(...), vtkXMLWriter::WriteInlineData(..). Currently they are not declared as virtual function and hence the overloading will not work. I can do that by modifying the original vtk class and build my VTK library based on the changes. But these hacks will be gone once I update my VTk source codes. My question is the following : Is it possible to make these function virtual in future releases? Except the vtkXMLWriter class there is no other implementation of those functions, but they are being used by vtkXMLPolydataWriter since the latter is inherited from the base class. I am curious to know what is the thought here. Thanks, Chiranjib -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Aug 13 13:00:58 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 13 Aug 2015 13:00:58 -0400 Subject: [vtkusers] Request to make some member function as virtual In-Reply-To: References: Message-ID: That is most likely fine. Please submit a merge request via gitlab. There developers will review your change and merge it to master. One merged it will appear in subsequent releases. Start at the following web page to learn how to contribute to VTK http://www.vtk.org/contributing-code/ David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Aug 13, 2015 at 12:47 PM, Chiranjib Sur wrote: > Hi, > I am working on my own implementation of vtkXMLWriter and I start with > inheriting the vtkXMLWriter class. While doing this, I realised that I can > obtain my desired XML data format if I can overload the function > vtkXMLWriter::WriteArrayFooter(...) > vtkXMLWriter::WriteArrayInline(...), > vtkXMLWriter::WriteInlineData(..). > > Currently they are not declared as virtual function and hence the > overloading will not work. I can do that by modifying the original vtk > class and build my VTK library based on the changes. But these hacks will > be gone once I update my VTk source codes. > > My question is the following : > Is it possible to make these function virtual in future releases? Except > the vtkXMLWriter class there is no other implementation of those functions, > but they are being used by vtkXMLPolydataWriter since the latter is > inherited from the base class. > > I am curious to know what is the thought here. > > Thanks, > Chiranjib > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sur.chiranjib at gmail.com Thu Aug 13 13:05:50 2015 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Thu, 13 Aug 2015 22:35:50 +0530 Subject: [vtkusers] Request to make some member function as virtual In-Reply-To: References: Message-ID: Hi David, Thank you very much. Assuming that after the submission and review when it will be part of the mainstream VTK codebase, will it be automatically available in ParaView sources too? I am building my own ParaView tree as well and the changs I have mentioned I need that to be part of VTK at ParaView. What are your thoughts and suggestions about this? Thanks, Chiranjib On Thu, Aug 13, 2015 at 10:30 PM, David E DeMarle wrote: > That is most likely fine. Please submit a merge request via gitlab. There > developers will review your change and merge it to master. One merged it > will appear in subsequent releases. > > Start at the following web page to learn how to contribute to VTK > http://www.vtk.org/contributing-code/ > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Aug 13, 2015 at 12:47 PM, Chiranjib Sur > wrote: > >> Hi, >> I am working on my own implementation of vtkXMLWriter and I start with >> inheriting the vtkXMLWriter class. While doing this, I realised that I can >> obtain my desired XML data format if I can overload the function >> vtkXMLWriter::WriteArrayFooter(...) >> vtkXMLWriter::WriteArrayInline(...), >> vtkXMLWriter::WriteInlineData(..). >> >> Currently they are not declared as virtual function and hence the >> overloading will not work. I can do that by modifying the original vtk >> class and build my VTK library based on the changes. But these hacks will >> be gone once I update my VTk source codes. >> >> My question is the following : >> Is it possible to make these function virtual in future releases? Except >> the vtkXMLWriter class there is no other implementation of those functions, >> but they are being used by vtkXMLPolydataWriter since the latter is >> inherited from the base class. >> >> I am curious to know what is the thought here. >> >> Thanks, >> Chiranjib >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Aug 13 13:10:10 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 13 Aug 2015 13:10:10 -0400 Subject: [vtkusers] Request to make some member function as virtual In-Reply-To: References: Message-ID: Yes, it will be automatically available in ParaView once someone updates ParaView's VTK submodule version. This happens fairly frequently, so you should expect that within a couple of weeks after your change is merged into VTK it should be available from within ParaView. Cory On Thu, Aug 13, 2015 at 1:05 PM, Chiranjib Sur wrote: > Hi David, > Thank you very much. Assuming that after the submission and review when it > will be part of the mainstream VTK codebase, will it be automatically > available in ParaView sources too? I am building my own ParaView tree as > well and the changs I have mentioned I need that to be part of VTK at ParaView. > > What are your thoughts and suggestions about this? > > Thanks, > Chiranjib > > On Thu, Aug 13, 2015 at 10:30 PM, David E DeMarle < > dave.demarle at kitware.com> wrote: > >> That is most likely fine. Please submit a merge request via gitlab. There >> developers will review your change and merge it to master. One merged it >> will appear in subsequent releases. >> >> Start at the following web page to learn how to contribute to VTK >> http://www.vtk.org/contributing-code/ >> >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Thu, Aug 13, 2015 at 12:47 PM, Chiranjib Sur >> wrote: >> >>> Hi, >>> I am working on my own implementation of vtkXMLWriter and I start with >>> inheriting the vtkXMLWriter class. While doing this, I realised that I can >>> obtain my desired XML data format if I can overload the function >>> vtkXMLWriter::WriteArrayFooter(...) >>> vtkXMLWriter::WriteArrayInline(...), >>> vtkXMLWriter::WriteInlineData(..). >>> >>> Currently they are not declared as virtual function and hence the >>> overloading will not work. I can do that by modifying the original vtk >>> class and build my VTK library based on the changes. But these hacks will >>> be gone once I update my VTk source codes. >>> >>> My question is the following : >>> Is it possible to make these function virtual in future releases? Except >>> the vtkXMLWriter class there is no other implementation of those functions, >>> but they are being used by vtkXMLPolydataWriter since the latter is >>> inherited from the base class. >>> >>> I am curious to know what is the thought here. >>> >>> Thanks, >>> Chiranjib >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sur.chiranjib at gmail.com Thu Aug 13 13:12:39 2015 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Thu, 13 Aug 2015 22:42:39 +0530 Subject: [vtkusers] Request to make some member function as virtual In-Reply-To: References: Message-ID: Great news! I will be uploading the patch soon. Thanks, Chiranjib On Thu, Aug 13, 2015 at 10:40 PM, Cory Quammen wrote: > Yes, it will be automatically available in ParaView once someone updates > ParaView's VTK submodule version. This happens fairly frequently, so you > should expect that within a couple of weeks after your change is merged > into VTK it should be available from within ParaView. > > Cory > > On Thu, Aug 13, 2015 at 1:05 PM, Chiranjib Sur > wrote: > >> Hi David, >> Thank you very much. Assuming that after the submission and review when >> it will be part of the mainstream VTK codebase, will it be automatically >> available in ParaView sources too? I am building my own ParaView tree as >> well and the changs I have mentioned I need that to be part of VTK at ParaView. >> >> What are your thoughts and suggestions about this? >> >> Thanks, >> Chiranjib >> >> On Thu, Aug 13, 2015 at 10:30 PM, David E DeMarle < >> dave.demarle at kitware.com> wrote: >> >>> That is most likely fine. Please submit a merge request via gitlab. >>> There developers will review your change and merge it to master. One merged >>> it will appear in subsequent releases. >>> >>> Start at the following web page to learn how to contribute to VTK >>> http://www.vtk.org/contributing-code/ >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Thu, Aug 13, 2015 at 12:47 PM, Chiranjib Sur >> > wrote: >>> >>>> Hi, >>>> I am working on my own implementation of vtkXMLWriter and I start with >>>> inheriting the vtkXMLWriter class. While doing this, I realised that I can >>>> obtain my desired XML data format if I can overload the function >>>> vtkXMLWriter::WriteArrayFooter(...) >>>> vtkXMLWriter::WriteArrayInline(...), >>>> vtkXMLWriter::WriteInlineData(..). >>>> >>>> Currently they are not declared as virtual function and hence the >>>> overloading will not work. I can do that by modifying the original vtk >>>> class and build my VTK library based on the changes. But these hacks will >>>> be gone once I update my VTk source codes. >>>> >>>> My question is the following : >>>> Is it possible to make these function virtual in future releases? >>>> Except the vtkXMLWriter class there is no other implementation of those >>>> functions, but they are being used by vtkXMLPolydataWriter since the latter >>>> is inherited from the base class. >>>> >>>> I am curious to know what is the thought here. >>>> >>>> Thanks, >>>> Chiranjib >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chen_lin119 at 126.com Thu Aug 13 22:13:20 2015 From: chen_lin119 at 126.com (=?GBK?B?s8LB1Q==?=) Date: Fri, 14 Aug 2015 10:13:20 +0800 (CST) Subject: [vtkusers] SetScalarType(int i,vtkInformation* meta_data) Message-ID: Thank you for your answer at David E DeMarle But i am sorry that your website cannot solve my problem. if you find that the function SetScalarType(int i,vtkInformation* meta_data) in VTK 6.2 is different from in VTK 6.0( SetScalarType(int i) ),it add a input parameter----" vtkInformation* meta_data "?? what can i use this function?? -- Thank you! doomSmile +86 15109214276 xidian university -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Aug 13 22:44:32 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 13 Aug 2015 22:44:32 -0400 Subject: [vtkusers] SetScalarType(int i,vtkInformation* meta_data) In-Reply-To: References: Message-ID: doomSmile, You can also use vtkImageData::AllocateScalars(int dataType, int numComponents) to specify the scalar type. Cory On Thu, Aug 13, 2015 at 10:13 PM, ?? wrote: > Thank you for your answer at David E DeMarle > > But i am sorry that your website cannot solve my problem. > if you find that the function SetScalarType(int i,vtkInformation* > meta_data) in VTK 6.2 is different from in VTK 6.0( SetScalarType(int i) > ),it add a input parameter----" vtkInformation* meta_data "?? > what can i use this function?? > > > > > -- > Thank you! > > doomSmile > +86 15109214276 > xidian university > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kmd1995 at sjtu.edu.cn Thu Aug 13 23:38:19 2015 From: kmd1995 at sjtu.edu.cn (kmd1995) Date: Thu, 13 Aug 2015 20:38:19 -0700 (MST) Subject: [vtkusers] Get imagedata from vtkcutter Message-ID: <1439523499813-5733485.post@n5.nabble.com> Hi all, I now get a 3D imagedata and I think I can use vtkcutter to cut it at any orientation and get 2D vtkimagedata to do further prossess .But how can I get the imagedata? here is how I do this. I can show it in a window but i can;t get imagedata. import vtk reader = vtk.vtkDICOMImageReader() reader.SetDirectoryName("F:\SE2") reader.Update() plane=vtk.vtkPlane() plane.SetOrigin(300,300,26) plane.SetNormal(0,1,0) #create cutter cutter=vtk.vtkCutter() cutter.SetCutFunction(plane) cutter.SetInputConnection(reader.GetOutputPort()) cutter.Update() cutterMapper=vtk.vtkPolyDataMapper() cutterMapper.SetInputConnection( cutter.GetOutputPort()) #create plane actor planeActor=vtk.vtkActor() planeActor.GetProperty().SetColor(0.0,1,0) planeActor.GetProperty().SetLineWidth(2) planeActor.SetMapper(cutterMapper) #create renderers and add actors of plane and cube ren = vtk.vtkRenderer() ren.AddActor(planeActor) #Add renderer to renderwindow and render renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) renWin.SetSize(600, 600) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) ren.SetBackground(0,0,0) renWin.Render() iren.Start() thanks all. Stillin -- View this message in context: http://vtk.1045678.n5.nabble.com/Get-imagedata-from-vtkcutter-tp5733485.html Sent from the VTK - Users mailing list archive at Nabble.com. From agatakrason at gmail.com Fri Aug 14 06:24:37 2015 From: agatakrason at gmail.com (agatte) Date: Fri, 14 Aug 2015 03:24:37 -0700 (MST) Subject: [vtkusers] question ? [hole in the mesh] Message-ID: <1439547877820-5733487.post@n5.nabble.com> Hi, I have a question concerning hole in the mesh. Is there any possibility to check if hole exists or not in the mesh ? I would appreciate for any help please. agatte -- View this message in context: http://vtk.1045678.n5.nabble.com/question-hole-in-the-mesh-tp5733487.html Sent from the VTK - Users mailing list archive at Nabble.com. From victorsv at gmail.com Fri Aug 14 06:27:04 2015 From: victorsv at gmail.com (victor sv) Date: Fri, 14 Aug 2015 12:27:04 +0200 Subject: [vtkusers] Fwd: XDMF and hyperslabs In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: victor sv Date: 2015-08-14 12:25 GMT+02:00 Subject: XDMF and hyperslabs To: vtkdev , vtk-users at vtk.org, " paraview at paraview.org" Hello all, I'm trying to create and visualize an XDMF/HDF5 file containing a partitioned mesh using hyperslabs. Is this supported by Paraview/VTK ?? The HDF5 (solution1.h5) looks as follows: GROUP "/" { GROUP "Grid" { DATASET "Connectivities" { DATATYPE H5T_STD_I32BE DATASPACE SIMPLE { ( 18 ) / ( 18 ) } DATA { (0): 0, 1, 2, 3, 2, 1, 4, 5, 6, 7, 6, 5, 6, 7, 8, 9, 8, 7 } } DATASET "Coordinates" { DATATYPE H5T_IEEE_F64BE DATASPACE SIMPLE { ( 20 ) / ( 20 ) } DATA { (0): 0, 0, 1, 0, 0, 0.5, 1, 0.5, 0, 0.5, 1, 0.5, 0, 1, 1, 1, 0, 1.5, (18): 1, 1.5 } } DATASET "Solution" { DATATYPE H5T_IEEE_F64BE DATASPACE SIMPLE { ( 10 ) / ( 10 ) } DATA { (0): 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 } } } } And the XDMF file to represent a 2-triangle (4 points) piece of the full mesh is: 0 1 6 solution1.h5:Grid/Connectivities 0 1 8 solution1.h5:Grid/Coordinates I'm trying to use the syntax explained at the XDMF webpage ( http://www.xdmf.org/index.php/XDMF_Model_and_Format ), but I'm feeling confused about the version of the documentation and current version of XDMF library included in VTK library. Can anyone give me some info about this? It is XDMFv3 already public ? Thanks in advance, V?ctor. -------------- next part -------------- An HTML attachment was scrubbed... URL: From josp.jorge at gmail.com Fri Aug 14 06:32:46 2015 From: josp.jorge at gmail.com (Jorge Perez) Date: Fri, 14 Aug 2015 12:32:46 +0200 Subject: [vtkusers] question ? [hole in the mesh] In-Reply-To: <1439547877820-5733487.post@n5.nabble.com> References: <1439547877820-5733487.post@n5.nabble.com> Message-ID: Hi, you can use vtkFeatureEdges, here there is an example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ClosedSurface HTH. 2015-08-14 12:24 GMT+02:00 agatte : > Hi, > > > I have a question concerning hole in the mesh. > Is there any possibility to check if hole exists or not in the mesh ? > > I would appreciate for any help please. > > > agatte > > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/question-hole-in-the-mesh-tp5733487.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sayasonawane11 at gmail.com Fri Aug 14 08:06:45 2015 From: sayasonawane11 at gmail.com (Sayali Sonawane) Date: Fri, 14 Aug 2015 13:06:45 +0100 Subject: [vtkusers] Reading and Mapping Netcdf file in VTK (Oceanographic Data) Message-ID: Hi Everyone, I am trying to read netcdf .nc file. It has 15 variables, each of different dimension. Can you please suggest me way of reading and mapping it in VTK. Best Regards, Sayali [image: photo] *Sayali Sonawane* Chevening Scholar, Jr. Software Engineer, Independent Researcher, The University of Manchester +91 7276521084 | +44 7448412896 | sayali.sonawane at postgrad.manchester.ac.uk | sayasonawane11 at gmail.com Get a signature like this: Click here! -------------- next part -------------- An HTML attachment was scrubbed... URL: From agatakrason at gmail.com Fri Aug 14 09:57:02 2015 From: agatakrason at gmail.com (agatte) Date: Fri, 14 Aug 2015 06:57:02 -0700 (MST) Subject: [vtkusers] question ? [hole in the mesh] In-Reply-To: References: <1439547877820-5733487.post@n5.nabble.com> Message-ID: <1439560622010-5733493.post@n5.nabble.com> Thanks a lot ! Yes, now it works well :) -- View this message in context: http://vtk.1045678.n5.nabble.com/question-hole-in-the-mesh-tp5733487p5733493.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Fri Aug 14 09:59:55 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 14 Aug 2015 09:59:55 -0400 Subject: [vtkusers] NetCDF file reading Message-ID: Hi Sayali, You'll have a better chance getting a useful answer if you email the whole VTK users list :-) Have you tried the vtkNetCDF*Reader classes? http://www.vtk.org/doc/nightly/html/classvtkNetCDFReader.html http://www.vtk.org/doc/nightly/html/classvtkNetCDFCFReader.html http://www.vtk.org/doc/nightly/html/classvtkNetCDFPOPReader.html http://www.vtk.org/doc/nightly/html/classvtkNetCDFCAMReader.html Cheers, Cory On Fri, Aug 14, 2015 at 8:05 AM, Sayali Sonawane wrote: > > Hi Cory, > > I am trying to read netcdf .nc file. It has 15 variables, each of > different dimension. Can you please suggest me way of reading and mapping > it in VTK. > > Best Regards, > Sayali > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Aug 14 10:01:19 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 14 Aug 2015 10:01:19 -0400 Subject: [vtkusers] NetCDF file reading In-Reply-To: References: Message-ID: Oops, looks like you took my suggestion before I made it. The dangers of processing email chronologically... Cory On Fri, Aug 14, 2015 at 9:59 AM, Cory Quammen wrote: > Hi Sayali, > > You'll have a better chance getting a useful answer if you email the whole > VTK users list :-) > > Have you tried the vtkNetCDF*Reader classes? > > http://www.vtk.org/doc/nightly/html/classvtkNetCDFReader.html > http://www.vtk.org/doc/nightly/html/classvtkNetCDFCFReader.html > http://www.vtk.org/doc/nightly/html/classvtkNetCDFPOPReader.html > http://www.vtk.org/doc/nightly/html/classvtkNetCDFCAMReader.html > > Cheers, > Cory > > On Fri, Aug 14, 2015 at 8:05 AM, Sayali Sonawane > wrote: > >> >> Hi Cory, >> >> I am trying to read netcdf .nc file. It has 15 variables, each of >> different dimension. Can you please suggest me way of reading and mapping >> it in VTK. >> >> Best Regards, >> Sayali >> > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Aug 14 10:10:30 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 14 Aug 2015 10:10:30 -0400 Subject: [vtkusers] NetCDF file reading In-Reply-To: References: Message-ID: Have you tried any other of the NetCDF readers? I'll admit I'm not that familiar with them. You might also try to load your data in ParaView (www.paraview.org). Thanks, Cory On Fri, Aug 14, 2015 at 10:04 AM, Sayali Sonawane wrote: > Hi Cory, > > I have tried vtknetcdfreader class. > > Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 > vtkNetCDFReader (0x8906a0): Variable depth dimensions (depth) are > different than the other variable dimensions (latitude longitude). Skipping > > Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 > vtkNetCDFReader (0x8906a0): Variable latitude dimensions (latitude) are > different than the other variable dimensions (latitude longitude). Skipping > > Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 > vtkNetCDFReader (0x8906a0): Variable longitude dimensions (longitude) are > different than the other variable dimensions (latitude longitude). Skipping > > Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 > vtkNetCDFReader (0x8906a0): Variable salinity dimensions (depth latitude > longitude) are different than the other variable dimensions (latitude > longitude). Skipping > > Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 > vtkNetCDFReader (0x8906a0): Variable temperature dimensions (depth > latitude longitude) are different than the other variable dimensions > (latitude longitude). Skipping > > Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 > vtkNetCDFReader (0x8906a0): Variable u dimensions (depth latitude > longitude) are different than the other variable dimensions (latitude > longitude). Skipping > > Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 > vtkNetCDFReader (0x8906a0): Variable v dimensions (depth latitude > longitude) are different than the other variable dimensions (latitude > longitude). Skipping > > I am getting this warning message. But I don't understand how to use these > variables. I want to plot salinity and temperature scatterplot. > > Best Regards, > Sayali > > > On Fri, Aug 14, 2015 at 2:59 PM, Cory Quammen > wrote: > >> Hi Sayali, >> >> You'll have a better chance getting a useful answer if you email the >> whole VTK users list :-) >> >> Have you tried the vtkNetCDF*Reader classes? >> >> http://www.vtk.org/doc/nightly/html/classvtkNetCDFReader.html >> http://www.vtk.org/doc/nightly/html/classvtkNetCDFCFReader.html >> http://www.vtk.org/doc/nightly/html/classvtkNetCDFPOPReader.html >> http://www.vtk.org/doc/nightly/html/classvtkNetCDFCAMReader.html >> >> Cheers, >> Cory >> >> On Fri, Aug 14, 2015 at 8:05 AM, Sayali Sonawane < >> sayasonawane11 at gmail.com> wrote: >> >>> >>> Hi Cory, >>> >>> I am trying to read netcdf .nc file. It has 15 variables, each of >>> different dimension. Can you please suggest me way of reading and mapping >>> it in VTK. >>> >>> Best Regards, >>> Sayali >>> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. >> > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Fri Aug 14 11:56:47 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 14 Aug 2015 11:56:47 -0400 Subject: [vtkusers] [Paraview] (no subject) In-Reply-To: References: <13DD8C6B6309B94AA144319F72195FFD3731A238@IWMDAG2.iwm.fraunhofer.de> <13DD8C6B6309B94AA144319F72195FFD3731A521@IWMDAG2.iwm.fraunhofer.de> Message-ID: Here is the bug I filed for this: http://www.vtk.org/Bug/view.php?id=15653 On Fri, Aug 7, 2015 at 12:39 PM, Dan Lipsa wrote: > Raphael, > In talking to Dave, it seems that indeed you have found a bug in the > writer (and in the specification). It does not seem to be a way to save > field data unless your dataset is of type FIELD (a collection of arrays). > The arrays attached to POINT_DATA (or CELL_DATA) which are designated as > FIELD have to have the same number of tuples as the points (or cells). The > terminology is kind of confusing as well. Would you mind filing a bug > report. Thanks, > Dan > > > On Fri, Aug 7, 2015 at 10:16 AM Dan Lipsa wrote: > >> Hi Raphael, >> >> On Fri, Aug 7, 2015 at 5:02 AM Schubert, Raphael < >> raphael.schubert at iwm.fraunhofer.de> wrote: >> >>> The way I understand the file format specification it should be illegal >>> to define a FIELD dataset in addition to, e.g, STRUCTURED_POINTS, as I can >>> find it neither explicitly allowed (there is only mention of one dataset >>> per file) nor presented in an example. It therefore seems like an >>> accidental feature in vtk that I can actually read back the produced files. >>> >> >> A FIELD dataset is a way to specify data without topological or >> geometrical structure. One can also define FIELD arrays after CELL_DATA or >> POINT_DATA for a dataset. Look at the first example on page 7. In the >> CELL_DATA section there is a field arrays. >> >> >> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From draktharrblorf at gmail.com Fri Aug 14 11:57:09 2015 From: draktharrblorf at gmail.com (Drak) Date: Fri, 14 Aug 2015 08:57:09 -0700 (MST) Subject: [vtkusers] vtkScalarBar with non linear labels Message-ID: <1439567829010-5733498.post@n5.nabble.com> Is there any way to get the scalar bar to not automatically set my labels to a linear value? I would like to access the labels table and change myself the value so it follows my own formula. // scalar bar _hueLut = vtkLookupTable::New(); _hueLut->SetNumberOfTableValues(100); _hueLut->SetTableRange(0, 100); _hueLut->SetTableValue(0, 0, 0, 1); _hueLut->SetTableValue(1, 0, 1, 0); //etc... _hueLut->Build(); _scalarBar = vtkScalarBarActor::New(); _scalarBar->SetLookupTable(_hueLut); _scalarBar->SetTitle("logarithm scalar bar"); _scalarBar->SetNumberOfLabels(5); _scalarBar->SetLabelFormat("%5.4g"); The problem is that my scalar bar labels seems to show the value 0, 25, 50, 75 and 100. I want to be able to change the labels value. For example: 0, 10, 25, 50, 100. Thank you. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkScalarBar-with-non-linear-labels-tp5733498.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Fri Aug 14 13:15:54 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 14 Aug 2015 13:15:54 -0400 Subject: [vtkusers] vtkScalarBar with non linear labels In-Reply-To: <1439567829010-5733498.post@n5.nabble.com> References: <1439567829010-5733498.post@n5.nabble.com> Message-ID: Drak, To add arbitrary labels, you can use the annotations mechanism. See, for example, http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Rendering/Annotation/Testing/Cxx/TestScalarBar.cxx Best, Cory On Fri, Aug 14, 2015 at 11:57 AM, Drak wrote: > > > Is there any way to get the scalar bar to not automatically set my labels > to > a linear value? > > I would like to access the labels table and change myself the value so it > follows my own formula. > > // scalar bar > _hueLut = vtkLookupTable::New(); > _hueLut->SetNumberOfTableValues(100); > _hueLut->SetTableRange(0, 100); > _hueLut->SetTableValue(0, 0, 0, 1); > _hueLut->SetTableValue(1, 0, 1, 0); > //etc... > _hueLut->Build(); > > > _scalarBar = vtkScalarBarActor::New(); > _scalarBar->SetLookupTable(_hueLut); > _scalarBar->SetTitle("logarithm scalar bar"); > _scalarBar->SetNumberOfLabels(5); > _scalarBar->SetLabelFormat("%5.4g"); > > The problem is that my scalar bar labels seems to show the value 0, 25, 50, > 75 and 100. I want to be able to change the labels value. For example: 0, > 10, 25, 50, 100. > > Thank you. > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkScalarBar-with-non-linear-labels-tp5733498.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Aug 14 14:31:32 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 14 Aug 2015 14:31:32 -0400 Subject: [vtkusers] NetCDF file reading In-Reply-To: References: Message-ID: Sayali, Our netcdf reader makes certain assumption about dimensions and it is likely that it will fail for your case. Is your data CF compliant? Just curious. Also, do you need to use C++ or you can use Python interface of VTK? Thanks, Aashish On Fri, Aug 14, 2015 at 10:10 AM, Cory Quammen wrote: > Have you tried any other of the NetCDF readers? I'll admit I'm not that > familiar with them. > > You might also try to load your data in ParaView (www.paraview.org). > > Thanks, > Cory > > On Fri, Aug 14, 2015 at 10:04 AM, Sayali Sonawane < > sayasonawane11 at gmail.com> wrote: > >> Hi Cory, >> >> I have tried vtknetcdfreader class. >> >> Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 >> vtkNetCDFReader (0x8906a0): Variable depth dimensions (depth) are >> different than the other variable dimensions (latitude longitude). Skipping >> >> Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 >> vtkNetCDFReader (0x8906a0): Variable latitude dimensions (latitude) are >> different than the other variable dimensions (latitude longitude). Skipping >> >> Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 >> vtkNetCDFReader (0x8906a0): Variable longitude dimensions (longitude) are >> different than the other variable dimensions (latitude longitude). Skipping >> >> Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 >> vtkNetCDFReader (0x8906a0): Variable salinity dimensions (depth latitude >> longitude) are different than the other variable dimensions (latitude >> longitude). Skipping >> >> Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 >> vtkNetCDFReader (0x8906a0): Variable temperature dimensions (depth >> latitude longitude) are different than the other variable dimensions >> (latitude longitude). Skipping >> >> Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 >> vtkNetCDFReader (0x8906a0): Variable u dimensions (depth latitude >> longitude) are different than the other variable dimensions (latitude >> longitude). Skipping >> >> Warning: In /home/sayali/src/IO/NetCDF/vtkNetCDFReader.cxx, line 782 >> vtkNetCDFReader (0x8906a0): Variable v dimensions (depth latitude >> longitude) are different than the other variable dimensions (latitude >> longitude). Skipping >> >> I am getting this warning message. But I don't understand how to use >> these variables. I want to plot salinity and temperature scatterplot. >> >> Best Regards, >> Sayali >> >> >> On Fri, Aug 14, 2015 at 2:59 PM, Cory Quammen >> wrote: >> >>> Hi Sayali, >>> >>> You'll have a better chance getting a useful answer if you email the >>> whole VTK users list :-) >>> >>> Have you tried the vtkNetCDF*Reader classes? >>> >>> http://www.vtk.org/doc/nightly/html/classvtkNetCDFReader.html >>> http://www.vtk.org/doc/nightly/html/classvtkNetCDFCFReader.html >>> http://www.vtk.org/doc/nightly/html/classvtkNetCDFPOPReader.html >>> http://www.vtk.org/doc/nightly/html/classvtkNetCDFCAMReader.html >>> >>> Cheers, >>> Cory >>> >>> On Fri, Aug 14, 2015 at 8:05 AM, Sayali Sonawane < >>> sayasonawane11 at gmail.com> wrote: >>> >>>> >>>> Hi Cory, >>>> >>>> I am trying to read netcdf .nc file. It has 15 variables, each of >>>> different dimension. Can you please suggest me way of reading and mapping >>>> it in VTK. >>>> >>>> Best Regards, >>>> Sayali >>>> >>> >>> -- >>> Cory Quammen >>> R&D Engineer >>> Kitware, Inc. >>> >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From draktharrblorf at gmail.com Fri Aug 14 15:14:51 2015 From: draktharrblorf at gmail.com (Drak) Date: Fri, 14 Aug 2015 12:14:51 -0700 (MST) Subject: [vtkusers] vtkScalarBar with non linear labels In-Reply-To: References: <1439567829010-5733498.post@n5.nabble.com> Message-ID: <1439579691405-5733507.post@n5.nabble.com> Thank you it works perfectly! -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkScalarBar-with-non-linear-labels-tp5733498p5733507.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Fri Aug 14 15:16:27 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 14 Aug 2015 15:16:27 -0400 Subject: [vtkusers] vtkScalarBar with non linear labels In-Reply-To: <1439579691405-5733507.post@n5.nabble.com> References: <1439567829010-5733498.post@n5.nabble.com> <1439579691405-5733507.post@n5.nabble.com> Message-ID: Great! On Fri, Aug 14, 2015 at 3:14 PM, Drak wrote: > Thank you it works perfectly! > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkScalarBar-with-non-linear-labels-tp5733498p5733507.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chen_lin119 at 126.com Fri Aug 14 21:32:51 2015 From: chen_lin119 at 126.com (chen_lin119 at 126.com) Date: Sat, 15 Aug 2015 09:32:51 +0800 Subject: [vtkusers] SetScalarType(int i,vtkInformation* meta_data) References: , Message-ID: <201508150932483112961@126.com> Thank you very much!the function works well~ doomSmilebest wishes~xidian University15109214276chen_lin119 at 126.com ?From:?Cory QuammenDate:?2015-08-14?10:44To:???CC:?vtkusers at vtk.orgSubject:?Re: [vtkusers] SetScalarType(int i,vtkInformation* meta_data)doomSmile, You can also use vtkImageData::AllocateScalars(int dataType, int numComponents) to specify the scalar type. Cory On Thu, Aug 13, 2015 at 10:13 PM, ?? wrote: Thank you for your answer at David E DeMarle But i am sorry that your website cannot solve my problem.if you find that the function?SetScalarType(int i,vtkInformation* meta_data)??in?VTK 6.2 is different from in VTK 6.0(?SetScalarType(int i) ),it add a input parameter----"?vtkInformation* meta_data "??what can i use this function?? -- Thank you! doomSmile+86 15109214276xidian university _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjjmarc at outlook.com Sat Aug 15 11:44:04 2015 From: mjjmarc at outlook.com (Marc Jaspar) Date: Sat, 15 Aug 2015 15:44:04 +0000 Subject: [vtkusers] Linker problem Message-ID: I have just upgraded to the new VTK version 6.2.0 and, I am getting an error which never happened previously. I am starting by creating the vtkCone example in a Microsoft Document/View application. The compile is fine with no errors however, I am getting a LNK 2019 error on the vtkRender::new call (static). VTK Basic AppView.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class vtkRenderer * __cdecl vtkRenderer::New(void)" (__imp_?New at vtkRenderer@@SAPAV1 at XZ) referenced in function "protected: __thiscall CVTKBasicAppView::CVTKBasicAppView(void)" (??0CVTKBasicAppView@@IAE at XZ) C:\Software Development\VTK Windows Development\VTK Basic App\Debug\VTK Basic App.exe : fatal error LNK1120: 1 unresolved externals Has anyone had the same experience and how was it resolved? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sat Aug 15 11:57:48 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 15 Aug 2015 11:57:48 -0400 Subject: [vtkusers] Linker problem In-Reply-To: References: Message-ID: What does your CMakeLists.txt file look like? On Sat, Aug 15, 2015 at 11:44 AM, Marc Jaspar wrote: > I have just upgraded to the new VTK version 6.2.0 and, I am getting an error > which never happened previously. > > I am starting by creating the vtkCone example in a Microsoft Document/View > application. > > > The compile is fine with no errors however, I am getting a LNK 2019 error on > the vtkRender::new call (static). > > > > VTK Basic AppView.obj : error LNK2019: unresolved external symbol > "__declspec(dllimport) public: static class vtkRenderer * __cdecl > vtkRenderer::New(void)" (__imp_?New at vtkRenderer@@SAPAV1 at XZ) referenced in > function "protected: __thiscall CVTKBasicAppView::CVTKBasicAppView(void)" > (??0CVTKBasicAppView@@IAE at XZ) > > > C:\Software Development\VTK Windows Development\VTK Basic App\Debug\VTK > Basic App.exe : fatal error LNK1120: 1 unresolved externals > > > Has anyone had the same experience and how was it resolved? > > > > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Sat Aug 15 12:42:56 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 15 Aug 2015 12:42:56 -0400 Subject: [vtkusers] Linker problem In-Reply-To: References: Message-ID: Please keep the list cc'ed. Are you building this example outside of the vtk source tree. To build a single example, you don't need such a complicated CMakeLists.txt Start simple with an example like this: http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone On Sat, Aug 15, 2015 at 12:03 PM, Marc Jaspar wrote: > Thanks for the response. It's extensive but here it is: > > set(Module_SRCS > vtkAbstractMapper3D.cxx > vtkAbstractMapper.cxx > vtkAbstractPicker.cxx > vtkAbstractVolumeMapper.cxx > vtkActor2DCollection.cxx > vtkActor2D.cxx > vtkActorCollection.cxx > vtkActor.cxx > vtkAssembly.cxx > vtkBackgroundColorMonitor.cxx > vtkCameraActor.cxx > vtkCamera.cxx > vtkCameraInterpolator.cxx > vtkCellCenterDepthSort.cxx > vtkColorTransferFunction.cxx > vtkCompositeDataDisplayAttributes.cxx > vtkCompositePolyDataMapper.cxx > vtkCoordinate.cxx > vtkCullerCollection.cxx > vtkCuller.cxx > vtkDataSetMapper.cxx > vtkDiscretizableColorTransferFunction.cxx > vtkDistanceToCamera.cxx > vtkFollower.cxx > vtkFrustumCoverageCuller.cxx > vtkGenericRenderWindowInteractor.cxx > vtkGenericVertexAttributeMapping.cxx > vtkGlyph3DMapper.cxx > vtkGPUInfo.cxx > vtkGPUInfoList.cxx > vtkGraphicsFactory.cxx > vtkGraphMapper.cxx > vtkGraphToGlyphs.cxx > vtkHardwareSelector.cxx > vtkHierarchicalPolyDataMapper.cxx > vtkImageActor.cxx > vtkImageMapper3D.cxx > vtkImageMapper.cxx > vtkImageProperty.cxx > vtkImageSlice.cxx > vtkImageSliceMapper.cxx > vtkInteractorEventRecorder.cxx > vtkInteractorObserver.cxx > vtkLabeledContourMapper.cxx > vtkLightActor.cxx > vtkLightCollection.cxx > vtkLight.cxx > vtkLightKit.cxx > vtkLogLookupTable.cxx > vtkLookupTableWithEnabling.cxx > vtkMapArrayValues.cxx > vtkMapper2D.cxx > vtkMapperCollection.cxx > vtkMapper.cxx > vtkObserverMediator.cxx > vtkPolyDataMapper2D.cxx > vtkPolyDataMapper.cxx > vtkProp3DCollection.cxx > vtkProp3D.cxx > vtkProp3DFollower.cxx > vtkPropAssembly.cxx > vtkPropCollection.cxx > vtkProp.cxx > vtkProperty2D.cxx > vtkProperty.cxx > vtkRendererCollection.cxx > vtkRenderer.cxx > vtkRendererDelegate.cxx > vtkRendererSource.cxx > vtkRenderWindowCollection.cxx > vtkRenderWindow.cxx > vtkRenderWindowInteractor.cxx > vtkSelectVisiblePoints.cxx > vtkShaderDeviceAdapter2.cxx > vtkTextActor.cxx > vtkTextActor3D.cxx > vtkTexture.cxx > vtkTexturedActor2D.cxx > vtkTransformCoordinateSystems.cxx > vtkTransformInterpolator.cxx > vtkTupleInterpolator.cxx > vtkViewDependentErrorMetric.cxx > vtkViewport.cxx > vtkVisibilitySort.cxx > vtkVolumeCollection.cxx > vtkVolume.cxx > vtkVolumeProperty.cxx > vtkWindowLevelLookupTable.cxx > vtkWindowToImageFilter.cxx > > vtkAssemblyNode.cxx # Needed by vtkAssembly > vtkAssemblyPath.cxx # Needed by vtkAssembly > vtkAssemblyPaths.cxx # Needed by vtkAssembly > > vtkAreaPicker.cxx # Needed by vtkRenderer > vtkPicker.cxx # Needed by vtkRenderer > vtkAbstractPropPicker.cxx # Needed by vtkAreaPicker > vtkPropPicker.cxx # Needed by vtkRenderWindowInteractor > vtkPickingManager.cxx # Needed by vtkRenderWindowInteractor > vtkLODProp3D.cxx # Needed by vtkAreaPicker > vtkWorldPointPicker.cxx # Needed by vtkPropPicker > > # Needed for the InteractorStyleSwitch... > vtkCellPicker.cxx > vtkPointPicker.cxx > vtkRenderedAreaPicker.cxx > vtkScenePicker.cxx > > # Needed by vtkRenderWindowInteractor, for the default interactor. > vtkInteractorStyle.cxx > vtkInteractorStyleSwitchBase.cxx > # vtkTDx stuff dragged in by vtkInteractorStyle > vtkTDxInteractorStyle.cxx > vtkTDxInteractorStyleCamera.cxx > vtkTDxInteractorStyleSettings.cxx > > vtkStringToImage.cxx > vtkTextMapper.cxx > vtkTextProperty.cxx > vtkTextPropertyCollection.cxx > vtkTextRenderer.cxx > > # Some of the new rendering code - may move around in the future. > vtkAbstractInteractionDevice.cxx > vtkAbstractRenderDevice.cxx > vtkRenderWidget.cxx > ) > > if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2") > set_source_files_properties( > vtkRenderWindow.cxx # dummy out painterdevice adapter > vtkHardwareSelector.cxx # dummy out painter device adapter > PROPERTIES COMPILE_FLAGS -DVTK_OPENGL2) > list(APPEND Module_SRCS > vtkPointGaussianMapper.cxx > ) > set_source_files_properties( > vtkPointGaussianMapper > ABSTRACT > ) > else() # Add painter device adapter when not OpenGL2 > list(APPEND Module_SRCS > vtkPainterDeviceAdapter.cxx > ) > endif() > > set(${vtk-module}_HDRS > vtkGPUInfoListArray.h > vtkNoise200x200.h > vtkPythagoreanQuadruples.h > vtkRayCastStructures.h > vtkRenderingCoreEnums.h > vtkTDxMotionEventInfo.h > ) > > set_source_files_properties( > vtkAbstractInteractionDevice > vtkAbstractMapper3D > vtkAbstractMapper > vtkAbstractRenderDevice > vtkAbstractVolumeMapper > vtkAbstractPicker > vtkAbstractPropPicker > vtkCuller > vtkGPUInfoList.cxx > vtkHardwareSelector > vtkImageMapper3D > vtkInteractorObserver > vtkMapper > vtkMapper2D > vtkProp > vtkProp3D > vtkRendererDelegate > vtkShader > vtkShaderDeviceAdapter > vtkShaderDeviceAdapter2 > vtkShaderProgram > vtkTextRenderer > vtkTDxInteractorStyle > vtkViewport > vtkVisibilitySort > vtkStringToImage > ABSTRACT > ) > > set_source_files_properties( > vtkAbstractInteractionDevice > vtkAbstractRenderDevice > vtkRenderWidget > WRAP_EXCLUDE > ) > > # On OS X, vtkRenderWindowJava must be compiled with Objective C++ > if(APPLE) > set_source_files_properties( > vtkRenderWindow.cxx > PROPERTIES WRAP_JAVA_OBJC 1 > ) > endif() > > vtk_module_library(vtkRenderingCore ${Module_SRCS}) > > > ________________________________________ > From: Bill Lorensen > Sent: August 15, 2015 11:57 AM > To: Marc Jaspar > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Linker problem > > What does your CMakeLists.txt file look like? > > > On Sat, Aug 15, 2015 at 11:44 AM, Marc Jaspar wrote: >> I have just upgraded to the new VTK version 6.2.0 and, I am getting an error >> which never happened previously. >> >> I am starting by creating the vtkCone example in a Microsoft Document/View >> application. >> >> >> The compile is fine with no errors however, I am getting a LNK 2019 error on >> the vtkRender::new call (static). >> >> >> >> VTK Basic AppView.obj : error LNK2019: unresolved external symbol >> "__declspec(dllimport) public: static class vtkRenderer * __cdecl >> vtkRenderer::New(void)" (__imp_?New at vtkRenderer@@SAPAV1 at XZ) referenced in >> function "protected: __thiscall CVTKBasicAppView::CVTKBasicAppView(void)" >> (??0CVTKBasicAppView@@IAE at XZ) >> >> >> C:\Software Development\VTK Windows Development\VTK Basic App\Debug\VTK >> Basic App.exe : fatal error LNK1120: 1 unresolved externals >> >> >> Has anyone had the same experience and how was it resolved? >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Sat Aug 15 14:04:06 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 15 Aug 2015 14:04:06 -0400 Subject: [vtkusers] Linker problem In-Reply-To: References: Message-ID: Please keep the list cc'ed. I do not recommend putting your code in the VTK source tree. That said, I recently added a Remote Module capability to VTK. If your code is not an app, but rather a new vtk module, this will be useful. 'm not sure what release will contain it, but the current vtk git repo has it. See http://www.vtk.org/Wiki/VTK/Remote_Modules Bill On Sat, Aug 15, 2015 at 1:18 PM, Marc Jaspar wrote: > Thanks again. > > No I am building the application in new VTK directories that I have created. > The raw data in a Source data directory and the compiled code into the VTK/Debug directory. > > Since your first instinct was the cmake, I am re-installing the complete VTK ensuring all the required flags are set. > > I will before compiling, use the mentioned example from your examples. > > Thanks for the help and, I really enjoyed both your publications. > > > Marc > > ________________________________________ > From: Bill Lorensen > Sent: August 15, 2015 12:42 PM > To: Marc Jaspar; VTK Users > Subject: Re: [vtkusers] Linker problem > > Please keep the list cc'ed. > > Are you building this example outside of the vtk source tree. To build > a single example, you don't need such a complicated CMakeLists.txt > > Start simple with an example like this: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone > > > > On Sat, Aug 15, 2015 at 12:03 PM, Marc Jaspar wrote: >> Thanks for the response. It's extensive but here it is: >> >> set(Module_SRCS >> vtkAbstractMapper3D.cxx >> vtkAbstractMapper.cxx >> vtkAbstractPicker.cxx >> vtkAbstractVolumeMapper.cxx >> vtkActor2DCollection.cxx >> vtkActor2D.cxx >> vtkActorCollection.cxx >> vtkActor.cxx >> vtkAssembly.cxx >> vtkBackgroundColorMonitor.cxx >> vtkCameraActor.cxx >> vtkCamera.cxx >> vtkCameraInterpolator.cxx >> vtkCellCenterDepthSort.cxx >> vtkColorTransferFunction.cxx >> vtkCompositeDataDisplayAttributes.cxx >> vtkCompositePolyDataMapper.cxx >> vtkCoordinate.cxx >> vtkCullerCollection.cxx >> vtkCuller.cxx >> vtkDataSetMapper.cxx >> vtkDiscretizableColorTransferFunction.cxx >> vtkDistanceToCamera.cxx >> vtkFollower.cxx >> vtkFrustumCoverageCuller.cxx >> vtkGenericRenderWindowInteractor.cxx >> vtkGenericVertexAttributeMapping.cxx >> vtkGlyph3DMapper.cxx >> vtkGPUInfo.cxx >> vtkGPUInfoList.cxx >> vtkGraphicsFactory.cxx >> vtkGraphMapper.cxx >> vtkGraphToGlyphs.cxx >> vtkHardwareSelector.cxx >> vtkHierarchicalPolyDataMapper.cxx >> vtkImageActor.cxx >> vtkImageMapper3D.cxx >> vtkImageMapper.cxx >> vtkImageProperty.cxx >> vtkImageSlice.cxx >> vtkImageSliceMapper.cxx >> vtkInteractorEventRecorder.cxx >> vtkInteractorObserver.cxx >> vtkLabeledContourMapper.cxx >> vtkLightActor.cxx >> vtkLightCollection.cxx >> vtkLight.cxx >> vtkLightKit.cxx >> vtkLogLookupTable.cxx >> vtkLookupTableWithEnabling.cxx >> vtkMapArrayValues.cxx >> vtkMapper2D.cxx >> vtkMapperCollection.cxx >> vtkMapper.cxx >> vtkObserverMediator.cxx >> vtkPolyDataMapper2D.cxx >> vtkPolyDataMapper.cxx >> vtkProp3DCollection.cxx >> vtkProp3D.cxx >> vtkProp3DFollower.cxx >> vtkPropAssembly.cxx >> vtkPropCollection.cxx >> vtkProp.cxx >> vtkProperty2D.cxx >> vtkProperty.cxx >> vtkRendererCollection.cxx >> vtkRenderer.cxx >> vtkRendererDelegate.cxx >> vtkRendererSource.cxx >> vtkRenderWindowCollection.cxx >> vtkRenderWindow.cxx >> vtkRenderWindowInteractor.cxx >> vtkSelectVisiblePoints.cxx >> vtkShaderDeviceAdapter2.cxx >> vtkTextActor.cxx >> vtkTextActor3D.cxx >> vtkTexture.cxx >> vtkTexturedActor2D.cxx >> vtkTransformCoordinateSystems.cxx >> vtkTransformInterpolator.cxx >> vtkTupleInterpolator.cxx >> vtkViewDependentErrorMetric.cxx >> vtkViewport.cxx >> vtkVisibilitySort.cxx >> vtkVolumeCollection.cxx >> vtkVolume.cxx >> vtkVolumeProperty.cxx >> vtkWindowLevelLookupTable.cxx >> vtkWindowToImageFilter.cxx >> >> vtkAssemblyNode.cxx # Needed by vtkAssembly >> vtkAssemblyPath.cxx # Needed by vtkAssembly >> vtkAssemblyPaths.cxx # Needed by vtkAssembly >> >> vtkAreaPicker.cxx # Needed by vtkRenderer >> vtkPicker.cxx # Needed by vtkRenderer >> vtkAbstractPropPicker.cxx # Needed by vtkAreaPicker >> vtkPropPicker.cxx # Needed by vtkRenderWindowInteractor >> vtkPickingManager.cxx # Needed by vtkRenderWindowInteractor >> vtkLODProp3D.cxx # Needed by vtkAreaPicker >> vtkWorldPointPicker.cxx # Needed by vtkPropPicker >> >> # Needed for the InteractorStyleSwitch... >> vtkCellPicker.cxx >> vtkPointPicker.cxx >> vtkRenderedAreaPicker.cxx >> vtkScenePicker.cxx >> >> # Needed by vtkRenderWindowInteractor, for the default interactor. >> vtkInteractorStyle.cxx >> vtkInteractorStyleSwitchBase.cxx >> # vtkTDx stuff dragged in by vtkInteractorStyle >> vtkTDxInteractorStyle.cxx >> vtkTDxInteractorStyleCamera.cxx >> vtkTDxInteractorStyleSettings.cxx >> >> vtkStringToImage.cxx >> vtkTextMapper.cxx >> vtkTextProperty.cxx >> vtkTextPropertyCollection.cxx >> vtkTextRenderer.cxx >> >> # Some of the new rendering code - may move around in the future. >> vtkAbstractInteractionDevice.cxx >> vtkAbstractRenderDevice.cxx >> vtkRenderWidget.cxx >> ) >> >> if(VTK_RENDERING_BACKEND STREQUAL "OpenGL2") >> set_source_files_properties( >> vtkRenderWindow.cxx # dummy out painterdevice adapter >> vtkHardwareSelector.cxx # dummy out painter device adapter >> PROPERTIES COMPILE_FLAGS -DVTK_OPENGL2) >> list(APPEND Module_SRCS >> vtkPointGaussianMapper.cxx >> ) >> set_source_files_properties( >> vtkPointGaussianMapper >> ABSTRACT >> ) >> else() # Add painter device adapter when not OpenGL2 >> list(APPEND Module_SRCS >> vtkPainterDeviceAdapter.cxx >> ) >> endif() >> >> set(${vtk-module}_HDRS >> vtkGPUInfoListArray.h >> vtkNoise200x200.h >> vtkPythagoreanQuadruples.h >> vtkRayCastStructures.h >> vtkRenderingCoreEnums.h >> vtkTDxMotionEventInfo.h >> ) >> >> set_source_files_properties( >> vtkAbstractInteractionDevice >> vtkAbstractMapper3D >> vtkAbstractMapper >> vtkAbstractRenderDevice >> vtkAbstractVolumeMapper >> vtkAbstractPicker >> vtkAbstractPropPicker >> vtkCuller >> vtkGPUInfoList.cxx >> vtkHardwareSelector >> vtkImageMapper3D >> vtkInteractorObserver >> vtkMapper >> vtkMapper2D >> vtkProp >> vtkProp3D >> vtkRendererDelegate >> vtkShader >> vtkShaderDeviceAdapter >> vtkShaderDeviceAdapter2 >> vtkShaderProgram >> vtkTextRenderer >> vtkTDxInteractorStyle >> vtkViewport >> vtkVisibilitySort >> vtkStringToImage >> ABSTRACT >> ) >> >> set_source_files_properties( >> vtkAbstractInteractionDevice >> vtkAbstractRenderDevice >> vtkRenderWidget >> WRAP_EXCLUDE >> ) >> >> # On OS X, vtkRenderWindowJava must be compiled with Objective C++ >> if(APPLE) >> set_source_files_properties( >> vtkRenderWindow.cxx >> PROPERTIES WRAP_JAVA_OBJC 1 >> ) >> endif() >> >> vtk_module_library(vtkRenderingCore ${Module_SRCS}) >> >> >> ________________________________________ >> From: Bill Lorensen >> Sent: August 15, 2015 11:57 AM >> To: Marc Jaspar >> Cc: vtkusers at vtk.org >> Subject: Re: [vtkusers] Linker problem >> >> What does your CMakeLists.txt file look like? >> >> >> On Sat, Aug 15, 2015 at 11:44 AM, Marc Jaspar wrote: >>> I have just upgraded to the new VTK version 6.2.0 and, I am getting an error >>> which never happened previously. >>> >>> I am starting by creating the vtkCone example in a Microsoft Document/View >>> application. >>> >>> >>> The compile is fine with no errors however, I am getting a LNK 2019 error on >>> the vtkRender::new call (static). >>> >>> >>> >>> VTK Basic AppView.obj : error LNK2019: unresolved external symbol >>> "__declspec(dllimport) public: static class vtkRenderer * __cdecl >>> vtkRenderer::New(void)" (__imp_?New at vtkRenderer@@SAPAV1 at XZ) referenced in >>> function "protected: __thiscall CVTKBasicAppView::CVTKBasicAppView(void)" >>> (??0CVTKBasicAppView@@IAE at XZ) >>> >>> >>> C:\Software Development\VTK Windows Development\VTK Basic App\Debug\VTK >>> Basic App.exe : fatal error LNK1120: 1 unresolved externals >>> >>> >>> Has anyone had the same experience and how was it resolved? >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From waldo.valenzuela at hotmail.com Sun Aug 16 05:30:52 2015 From: waldo.valenzuela at hotmail.com (Waldo Valenzuela) Date: Sun, 16 Aug 2015 11:30:52 +0200 Subject: [vtkusers] About vtkRenderWindowInteractor with Retina Resolution Message-ID: Hi Guys, I am testing VTK 6.2 in a Qt 5.5 application. Now the display of the render is good, covers the complete area of the qtwidget, but I was playing the vtkRenderWindowInteractor to retrieve the move position over the vtk render, and the mouse position in Y is wrong. I have a class deviated of vtkInteractorStyleImage. and when I want to read the mouse position I used: vtkRenderWindowInteractor *interactor = this->GetInteractor(); int pixel_x = interactor->GetEventPosition()[0]; int pixel_y = interactor->GetEventPosition()[1]; the pixel position in x is correct, means that is the twice the length without retina activated. the pixel position in y is incorrect. I was looking others values and I found that the size of the windows are the same. long w = interactor->GetSize()[0]; long h = interactor->GetSize()[1]; meaning that if the windows size without retina is for example width: 375, height: 261, with retina activated I retrieve the values: width: 756, height: 756. I think that this is why the computation of the mouse location in Y position is wrong. I was trying to follow the workflow of the QVTKWidget and vtkRenderWindowInteractor, but I didn't found any error. Someone knows where I could fix this problem. Where in vtk source code the retina resolution is detected? Thanks in advance for any help. Cheers, Waldo -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonid_dulman at yahoo.co.uk Sun Aug 16 11:09:49 2015 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Sun, 16 Aug 2015 15:09:49 +0000 (UTC) Subject: [vtkusers] VTK 6.3.0 rc2 and Qt 5.5.0 problems Message-ID: <327691865.5600701.1439737789975.JavaMail.yahoo@mail.yahoo.com> Hi to allI build a little application with VTK and QtIn windows I have no any problems, but in Linux I have got segmentation? fault? in setrenderWindow to VTKWidgetI have no this problem with VTK 6.2.0Any ideasThank you? Leonid -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrpani at louisville.edu Sun Aug 16 11:31:14 2015 From: jrpani at louisville.edu (jrpani at louisville.edu) Date: Sun, 16 Aug 2015 15:31:14 +0000 Subject: [vtkusers] About vtkRenderWindowInteractor with Retina Resolution In-Reply-To: References: Message-ID: <241A5A2885558545B5AACE36BCCB5DA1E99CDD67@EXMBX02.ad.louisville.edu> This won't help your immediate problem, but I want to mention it in case it helps lead to a general solution. I have a VTK 6.2 application running with Qt 4.8.6. On Apple computers with retina screens (test cases have been laptops), picking in the QVTK window is off in the Y direction if the user has hit the full screen button. The problem does not occur if the user manually resizes the window by dragging. John ________________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Waldo Valenzuela [waldo.valenzuela at hotmail.com] Sent: Sunday, August 16, 2015 5:30 AM To: VTK Users Subject: [vtkusers] About vtkRenderWindowInteractor with Retina Resolution Hi Guys, I am testing VTK 6.2 in a Qt 5.5 application. Now the display of the render is good, covers the complete area of the qtwidget, but I was playing the vtkRenderWindowInteractor to retrieve the move position over the vtk render, and the mouse position in Y is wrong. I have a class deviated of vtkInteractorStyleImage. and when I want to read the mouse position I used: vtkRenderWindowInteractor *interactor = this->GetInteractor(); int pixel_x = interactor->GetEventPosition()[0]; int pixel_y = interactor->GetEventPosition()[1]; the pixel position in x is correct, means that is the twice the length without retina activated. the pixel position in y is incorrect. I was looking others values and I found that the size of the windows are the same. long w = interactor->GetSize()[0]; long h = interactor->GetSize()[1]; meaning that if the windows size without retina is for example width: 375, height: 261, with retina activated I retrieve the values: width: 756, height: 756. I think that this is why the computation of the mouse location in Y position is wrong. I was trying to follow the workflow of the QVTKWidget and vtkRenderWindowInteractor, but I didn't found any error. Someone knows where I could fix this problem. Where in vtk source code the retina resolution is detected? Thanks in advance for any help. Cheers, Waldo From al221 at hotmail.it Sun Aug 16 17:57:32 2015 From: al221 at hotmail.it (erpupones) Date: Sun, 16 Aug 2015 14:57:32 -0700 (MST) Subject: [vtkusers] DICOM VIEWER Message-ID: <1439762252674-5733518.post@n5.nabble.com> Hello, I'm using Qt 5.2.1, Qt Creator 3.0.1, MSVC 2012, VTK-6.2.0, CMake 3.3. Someone can show me how to realize a DICOM viewer, maybe insert a working guide? Thanks and sorry for bad english. p.s. i have already compiled the vtk libraries -- View this message in context: http://vtk.1045678.n5.nabble.com/DICOM-VIEWER-tp5733518.html Sent from the VTK - Users mailing list archive at Nabble.com. From mightos at gmail.com Sun Aug 16 19:30:03 2015 From: mightos at gmail.com (mightos) Date: Sun, 16 Aug 2015 16:30:03 -0700 (MST) Subject: [vtkusers] How to properly use quadratic cell types ? In-Reply-To: <1438769321372-5733268.post@n5.nabble.com> References: <1438769321372-5733268.post@n5.nabble.com> Message-ID: <1439767803772-5733519.post@n5.nabble.com> After a week of searching, I still can't make it work. I've seen some posts talking about tesselate functions but I couldn't implement it. Can someone give me a small help here ? Thanks in advance :) -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-properly-use-quadratic-cell-types-tp5733268p5733519.html Sent from the VTK - Users mailing list archive at Nabble.com. From 15891495523 at 126.com Mon Aug 17 01:56:36 2015 From: 15891495523 at 126.com (zhq) Date: Sun, 16 Aug 2015 22:56:36 -0700 (MST) Subject: [vtkusers] How to generate MIP (maximum intensity projection) image from a 3D image ? Message-ID: <1439790996161-5733520.post@n5.nabble.com> Deal all: I have a 3D image, and I want to generate a 2D MIP image. Which VTK class can help me? I want to set the projection plane, the slab thickness. When I search for help from network, someone tell me vtkImageResliceMapper will help. And I find the class has some good function, for example SetSlicePlane, SetSlabTypeToMax, SetSlabThickness. It seems like the class is the one. But, I don't know how to use this class, and I can't find a example. Should this class satisfiy my need? How to use this usefulness class? Thanks in advance! ZhangQiang -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-generate-MIP-maximum-intensity-projection-image-from-a-3D-image-tp5733520.html Sent from the VTK - Users mailing list archive at Nabble.com. From waldo.valenzuela at hotmail.com Mon Aug 17 02:12:31 2015 From: waldo.valenzuela at hotmail.com (Waldo Valenzuela) Date: Mon, 17 Aug 2015 08:12:31 +0200 Subject: [vtkusers] DICOM VIEWER In-Reply-To: <1439762252674-5733518.post@n5.nabble.com> References: <1439762252674-5733518.post@n5.nabble.com> Message-ID: Hi ?, You should combine the following VTK examples to create a DICOM viewer: to read and display the DICOM, use: http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadDICOMSeries with vtkImageViewer2, you could change the orientation, read the class guide for that. for Qt integration with VTK: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/SideBySideRenderWindows Use Qt creator only to modify the qt GUI of the example. To compile use MSVC, but I will recommend use MSVC 2013 instead of 2012. Cheers, Waldo. On 16 Aug 2015, at 23:57, erpupones wrote: > Hello, > I'm using Qt 5.2.1, Qt Creator 3.0.1, MSVC 2012, VTK-6.2.0, CMake 3.3. > Someone can show me how to realize a DICOM viewer, maybe insert a working > guide? > Thanks and sorry for bad english. > p.s. i have already compiled the vtk libraries > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/DICOM-VIEWER-tp5733518.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From stephane.pierret at optimalcomputing.be Mon Aug 17 03:36:29 2015 From: stephane.pierret at optimalcomputing.be (Stephane Pierret) Date: Mon, 17 Aug 2015 09:36:29 +0200 Subject: [vtkusers] Using vtkStructuredGrid using the java API Message-ID: <9E9D4E7D-2F4A-4AFF-8DF1-0616ED1DDE71@optimalcomputing.be> Hi, I?m trying to use vtkStructuredGrid to display a structured grid using the java API. However, I do not succeed in getting the view of the grid. Here is the sample code I?m using. Could you let me know what is wrong or missing? BR, St?phane System.out.println("vtkPoints"); vtkPoints points = new vtkPoints(); points.InsertNextPoint(0.0, 0.0, 0.0); points.InsertNextPoint(1.0, 0.0, 0.0); points.InsertNextPoint(2.0, 0.0, 0.0); points.InsertNextPoint(0.0, 1.0, 0.0); points.InsertNextPoint(1.0, 1.0, 0.0); points.InsertNextPoint(2.0, 1.0, 0.0); points.InsertNextPoint(0.0, 0.0, 1.0); points.InsertNextPoint(1.0, 0.0, 1.0); points.InsertNextPoint(2.0, 0.0, 1.0); points.InsertNextPoint(0.0, 1.0, 1.0); points.InsertNextPoint(1.0, 1.0, 1.0); points.InsertNextPoint(2.0, 1.0, 1.0); System.out.println ("vtkStructuredGrid"); vtkStructuredGrid sGrid = new vtkStructuredGrid (); sGrid.SetDimensions(3,2,2); sGrid.SetPoints(points); int cellDims[] = new int[3]; sGrid.GetCellDims( cellDims ); System.out.println ("Cell dims = " + cellDims[0] + ", " + cellDims[1] + ", " + cellDims[2]); System.out.println ("sGrid.GetNumberOfPoints() = " + sGrid.GetNumberOfPoints()); System.out.println ("sGrid.GetNumberOfCells () = " + sGrid.GetNumberOfCells()); // outline vtkStructuredGridOutlineFilter of = new vtkStructuredGridOutlineFilter(); of.SetInputData(sGrid); vtkCompositeDataGeometryFilter geom1 = new vtkCompositeDataGeometryFilter(); geom1.SetInputConnection(0, of.GetOutputPort(0)); vtkPolyDataMapper sgridMapper = new vtkPolyDataMapper(); sgridMapper.SetInputConnection(0, geom1.GetOutputPort(0)); vtkActor actor = new vtkActor(); actor.SetMapper(sgridMapper); actor.GetProperty().SetColor(0,0,0); // Create a renderer, render window, and interactor vtkRenderWindow renderWindow = new vtkRenderWindow(); vtkRenderer renderer = new vtkRenderer(); renderer.SetBackground2(0,1,1); renderer.SetGradientBackground(true); renderer.AddActor(actor); renderWindow.AddRenderer(renderer); vtkRenderWindowInteractor renderWindowInteractor = new vtkRenderWindowInteractor(); renderWindowInteractor.SetRenderWindow(renderWindow); // Add the actor to the scene renderer.AddActor(actor); renderer.SetBackground(.1, .2, .3); // Render and interact renderWindow.Render(); renderWindowInteractor.Start(); From jason.cardinal at optimalcomputing.be Mon Aug 17 04:32:34 2015 From: jason.cardinal at optimalcomputing.be (jason@optimalcomputing) Date: Mon, 17 Aug 2015 01:32:34 -0700 (MST) Subject: [vtkusers] Rendering in a JPanel Message-ID: <1439800354752-5733524.post@n5.nabble.com> Hi everyone, I'm trying to integrate my vtk renderwindowpanel into a Java JPanel instead of a JFrame. I use the follwing tutorial as an example: http://www.vtk.org/Wiki/VTK/Examples/Java/SwingIntegration/JFrameRenderer But when I modify that code to render the graphics within a JPanel which is integrated in the JFrame, this doesn't work anymore... My guess is that the vtk renderwindowpanel can't be integrated in anything else than a JFrame. Do someone know an alternative way on integrating that renderwindowpanel in a JPanel ? -- View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-in-a-JPanel-tp5733524.html Sent from the VTK - Users mailing list archive at Nabble.com. From DLRdave at aol.com Mon Aug 17 06:42:08 2015 From: DLRdave at aol.com (David Cole) Date: Mon, 17 Aug 2015 06:42:08 -0400 Subject: [vtkusers] How to generate MIP (maximum intensity projection) image from a 3D image ? In-Reply-To: <1439790996161-5733520.post@n5.nabble.com> References: <1439790996161-5733520.post@n5.nabble.com> Message-ID: This example: https://github.com/Kitware/VTK/blob/master/Examples/GUI/Qt/FourPaneViewer/QtVTKRenderWindows.cxx uses a vtkResliceCursorWidget to interactively define slabs for MIP images on a loaded DICOM dataset. Perhaps you can use that code to figure out how to get a MIP image from your own data. HTH, David C. On Monday, August 17, 2015, zhq <15891495523 at 126.com> wrote: > Deal all: > > I have a 3D image, and I want to generate a 2D MIP image. Which VTK > class can help me? I want to set the projection plane, the slab thickness. > When I search for help from network, someone tell me > vtkImageResliceMapper will help. And I find the class has some good > function, for example SetSlicePlane, SetSlabTypeToMax, SetSlabThickness. It > seems like the class is the one. But, I don't know how to use this class, > and I can't find a example. > Should this class satisfiy my need? How to use this usefulness > class? > Thanks in advance! > > ZhangQiang > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-generate-MIP-maximum-intensity-projection-image-from-a-3D-image-tp5733520.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 15891495523 at 126.com Mon Aug 17 08:05:02 2015 From: 15891495523 at 126.com (zhq) Date: Mon, 17 Aug 2015 05:05:02 -0700 (MST) Subject: [vtkusers] How to generate MIP (maximum intensity projection) image from a 3D image ? In-Reply-To: References: <1439790996161-5733520.post@n5.nabble.com> Message-ID: <1439813102085-5733526.post@n5.nabble.com> Dear David Thank you for your reply. And I have finish the function using vtkImageResliceMapper. The code is : #include #include #include #include #include #include #include #include #include #include #include #include #include static void CreateColorImage(vtkImageData*); int main(int, char *[]) { vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetDirectoryName("G:\\Perfusion Project\\Perfusion_MIP\\MIP\\TimePhase\\Time2"); reader->SetDataByteOrderToBigEndian(); reader->Update(); /*vtkSmartPointer colorImage = vtkSmartPointer::New(); CreateColorImage(colorImage);*/ double center[3]; reader->GetOutput()->GetCenter(center); double spacing[3]; reader->GetOutput()->GetSpacing(spacing); vtkSmartPointer plane = vtkSmartPointer::New(); plane->SetOrigin(center); vtkSmartPointer imageResliceMapper = vtkSmartPointer::New(); imageResliceMapper->SetInputConnection(reader->GetOutputPort()); imageResliceMapper->SetSlicePlane(plane); imageResliceMapper->SetSlabThickness(20); imageResliceMapper->SetSlabTypeToMax(); double thickness = imageResliceMapper->GetSlabThickness(); //imageResliceMapper->SetInputData(colorImage); vtkSmartPointer imageSlice = vtkSmartPointer::New(); imageSlice->SetMapper(imageResliceMapper); imageSlice->GetProperty()->SetInterpolationTypeToNearest(); // Setup renderers vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddViewProp(imageSlice); renderer->ResetCamera(); // Setup render window vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->SetSize(300, 300); renderWindow->AddRenderer(renderer); // Setup render window interactor vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); vtkSmartPointer style = vtkSmartPointer::New(); renderWindowInteractor->SetInteractorStyle(style); // Render and start interaction renderWindowInteractor->SetRenderWindow(renderWindow); renderWindowInteractor->Initialize(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } ZhangQiang -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-generate-MIP-maximum-intensity-projection-image-from-a-3D-image-tp5733520p5733526.html Sent from the VTK - Users mailing list archive at Nabble.com. From nawijn at gmail.com Mon Aug 17 08:10:58 2015 From: nawijn at gmail.com (Marco Nawijn) Date: Mon, 17 Aug 2015 14:10:58 +0200 Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing In-Reply-To: References: <55C42302.2000607@aero.iitb.ac.in> Message-ID: Hello David, This is great news. I will try to checkout and build the Python 3 bindings and will inform you if anything unexpected pops up. If somebody can give me some instructions on what the process is for updating/adding the Python 3 version of the examples, I will be glad to take some of the workload on this. Kind regards, Marco On Wed, Aug 12, 2015 at 9:27 PM, David Gobbi wrote: > More news about Python 3 support: > > This morning I merged in all of the fixes that Andrew did for the VTK > tests so that they run under Python 3 (thanks to Ben for running and > maintaining the dashboard machine). We're confident now that VTK will run > properly with Python 3. > > None of the python examples have been converted to Python 3 yet, so > there's still work to be done (and I'm on vacation until the middle of next > week, so I won't be touching any of the code for a little while). > > - David > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nawijn at gmail.com Mon Aug 17 08:59:22 2015 From: nawijn at gmail.com (Marco Nawijn) Date: Mon, 17 Aug 2015 14:59:22 +0200 Subject: [vtkusers] How to properly use quadratic cell types ? In-Reply-To: <1439767803772-5733519.post@n5.nabble.com> References: <1438769321372-5733268.post@n5.nabble.com> <1439767803772-5733519.post@n5.nabble.com> Message-ID: Hi, Just for your information. I checked the visualization of a single quadratic cell in Paraview 4.2.0 (64 bit, Linux) and cannot reproduce your problem. I have visualized a single quadratic cell (screenshot and corresponding VTU file attached). Note that the thick blue lines are the edges visualized by Paraview. Marco On Mon, Aug 17, 2015 at 1:30 AM, mightos wrote: > After a week of searching, I still can't make it work. I've seen some posts > talking about tesselate functions but I couldn't implement it. Can someone > give me a small help here ? Thanks in advance :) > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-properly-use-quadratic-cell-types-tp5733268p5733519.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: demo-quadratic.vtu Type: application/x-paraview Size: 1023 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: quadratic_quad.png Type: image/png Size: 17369 bytes Desc: not available URL: From marco.dev.open at gmail.com Mon Aug 17 10:15:22 2015 From: marco.dev.open at gmail.com (Marco Dev) Date: Mon, 17 Aug 2015 07:15:22 -0700 Subject: [vtkusers] Fwd: vtk transform filter on .RAW In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Marco Dev Date: Mon, Aug 17, 2015 at 7:14 AM Subject: vtk transform filter on .RAW To: ITK Hi, why does not work vtk transform filter correctly on .RAW file I read the .raw file through ifstream then create a image type from this buffer as follow bellow: ifstream fin(filePath[0], ios::in | ios::binary); signed short iSample; cout << "Samples Output" << endl; while (fin.read((char *)&iSample, sizeof(signed short))) { m_Short.push_back(iSample); } cout << " size of short vector " << m_Short.size(); m_Aloc = (signed short*)malloc(m_Short.size() * 2); int counter = 0; for (std::vector::iterator it = m_Short.begin(); it != m_Short.end(); ++it, counter++){ m_Aloc[counter] = (*it); } . . // set nidex size orientation spacing ,,,,, to itk filter . . importFilter->SetImportPointer(m_Aloc,sizeX*sizeY*sizeZ, true); try { importFilter->Update(); pVol = importFilter->GetOutput(); } catch (itk::ExceptionObject & err) { return false; } pVol->Register(); typedef itk::ImageToVTKImageFilter itkVtkConverter; itkVtkConverter::Pointer conv = itkVtkConverter::New(); conv->SetInput(pVol); conv->Update(); vtkSmartPointer vtkImage = vtkSmartPointer::New(); vtkImage->ShallowCopy(conv->GetOutput()); //shallow copy is vtk's equivalent of disconnect pipeline volumeRayCatMapper = vtkSmartPointer::New(); volumeRayCatMapper->SetInputData(vtkImage); . . . . //Skin color->AddRGBPoint(-3024, 0, 0, 0, 0.5, 0.0); color->AddRGBPoint(-1000, .62, .36, .18, 0.5, 0.0); color->AddRGBPoint(-500, .88, .60, .29, 0.33, 0.45); color->AddRGBPoint(3071, .83, .66, 1, 0.5, 0.0); compositeOpacity->AddPoint(-3024, 0, 0.5, 0.0); compositeOpacity->AddPoint(-1000, 0, 0.5, 0.0); compositeOpacity->AddPoint(-500, 1.0, 0.33, 0.45); compositeOpacity->AddPoint(3071, 1.0, 0.5, 0.0); volumeRayCatMapper->SetBlendModeToComposite(); volumeProperty->ShadeOn(); volumeProperty->SetAmbient(0.1); volumeProperty->SetDiffuse(0.9); volumeProperty->SetSpecular(0.2); volumeProperty->SetSpecularPower(10.0); volumeProperty->SetScalarOpacityUnitDistance(0.8919); why does not work correctly on volume ? if I read the dicom series from itk reader it does work correctly Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Mon Aug 17 10:51:48 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 17 Aug 2015 08:51:48 -0600 Subject: [vtkusers] Rendering in a JPanel In-Reply-To: <1439800354752-5733524.post@n5.nabble.com> References: <1439800354752-5733524.post@n5.nabble.com> Message-ID: You should use the vtkPanel class instead. And if you need the VTK interaction to manage 3D widget, then you should use the vtkCanvas. You can look at that sample code: http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Wrapping/Java/vtk/sample/SimpleVTK.java;h=1d6efd2d80ecc30024d53eb07ef83514a3381784;hb=HEAD Seb On Mon, Aug 17, 2015 at 2:32 AM, jason at optimalcomputing < jason.cardinal at optimalcomputing.be> wrote: > Hi everyone, > > I'm trying to integrate my vtk renderwindowpanel into a Java JPanel instead > of a JFrame. > > I use the follwing tutorial as an example: > http://www.vtk.org/Wiki/VTK/Examples/Java/SwingIntegration/JFrameRenderer > > But when I modify that code to render the graphics within a JPanel which is > integrated in the JFrame, this doesn't work anymore... > > > My guess is that the vtk renderwindowpanel can't be integrated in anything > else than a JFrame. > Do someone know an alternative way on integrating that renderwindowpanel in > a JPanel ? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Rendering-in-a-JPanel-tp5733524.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Mon Aug 17 13:40:39 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Mon, 17 Aug 2015 10:40:39 -0700 (MST) Subject: [vtkusers] vtkDistanceWidget Message-ID: <1439833239001-5733532.post@n5.nabble.com> There is the option to change the default color of a vtkDistanceWidget (this set to green). A SetLineColor to vtkDistanceWidget? -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkDistanceWidget-tp5733532.html Sent from the VTK - Users mailing list archive at Nabble.com. From tachim at cs.stanford.edu Mon Aug 17 16:31:36 2015 From: tachim at cs.stanford.edu (Tudor Achim) Date: Mon, 17 Aug 2015 16:31:36 -0400 Subject: [vtkusers] coloring PolyDataMappers in python In-Reply-To: References: Message-ID: Thanks for the pointers - your suggestions worked. On a related note, is there some trick to getting shading to work? Right now the colors are super intense and it's tough to tell the contour of the solids. [image: Inline image 1] On Tue, Aug 4, 2015 at 2:29 PM, David Gobbi wrote: > Don't forget that use of SetColor() often requires this: > > mapper.ScalarVisibilityOff() > > SetColor() is ignored if scalars are present and visible. > > - David > > > On Tue, Aug 4, 2015 at 12:24 PM, Cory Quammen > wrote: > >> In that case, you can leave out the vtkLookupTable altogether and set the >> color in your actor instead >> >> actor = vtk.vtkActor() >> actor.SetMapper(mapper) >> property = actor.GetProperty() >> property.SetColor(*rgb_cluster_mapping[cluster_ind]) >> >> HTH, >> Cory >> >> On Tue, Aug 4, 2015 at 2:15 PM, Tudor Achim >> wrote: >> >>> No, I'd like the entire mesh to be one color (and opacity). >>> >>> On Tue, Aug 4, 2015 at 2:04 PM, Cory Quammen >>> wrote: >>> >>>> Are you trying to color map a particular data array in the contour? >>>> >>>> On Mon, Aug 3, 2015 at 3:43 PM, Tudor Achim >>>> wrote: >>>> >>>>> Hi all, >>>>> I have a quick question about coloring vtkPolyMappers. I have the >>>>> following code: >>>>> >>>>> for cluster_ind in ...: >>>>> threshold = vtk.vtkImageThreshold() >>>>> threshold.SetInputConnection(importer.GetOutputPort()) >>>>> threshold.ThresholdBetween(cluster_ind-0.1, cluster_ind+0.1) >>>>> threshold.ReplaceInOn() >>>>> threshold.SetInValue(0) >>>>> threshold.ReplaceOutOn() >>>>> threshold.SetOutValue(1) >>>>> threshold.Update() >>>>> >>>>> dmc = vtk.vtkDiscreteMarchingCubes() >>>>> dmc.SetInputConnection(threshold.GetOutputPort()) >>>>> dmc.GenerateValues(1, 1, 1) >>>>> dmc.Update() >>>>> >>>>> mapper = vtk.vtkPolyDataMapper() >>>>> mapper.SetInputConnection(dmc.GetOutputPort()) >>>>> >>>>> lut = vtk.vtkLookupTable() >>>>> lut.SetNumberOfTableValues(2) >>>>> lut.SetTableValue(0, 0, 0, 255) >>>>> lut.SetTableValue(1, *rgb_cluster_mapping[cluster_ind]) >>>>> lut.Build() >>>>> mapper.SetLookupTable(lut) >>>>> mapper.SetScalarModeToUseCellData() >>>>> >>>>> However, when I run it only one of the mappers is colored correctly; >>>>> the other one is just rendered as black. I can tell that it's rendered >>>>> black because when I spin around the clusters in my viewer I can see it >>>>> obstructing the other clusters. The intended colors are (0, 255, 0) and >>>>> (88, 86, 214) (that's what's in rgb_cluster_mapping for these clusters). >>>>> >>>>> Any ideas? >>>>> >>>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 45160 bytes Desc: not available URL: From dan.lipsa at kitware.com Mon Aug 17 22:09:11 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 17 Aug 2015 22:09:11 -0400 Subject: [vtkusers] Fwd: XDMF and hyperslabs In-Reply-To: References: Message-ID: There are (advanced) options to enable either xdmf2 or xdmf3 in VTK. On Fri, Aug 14, 2015 at 6:27 AM, victor sv wrote: > > ---------- Forwarded message ---------- > From: victor sv > Date: 2015-08-14 12:25 GMT+02:00 > Subject: XDMF and hyperslabs > To: vtkdev , vtk-users at vtk.org, " > paraview at paraview.org" > > > Hello all, > > I'm trying to create and visualize an XDMF/HDF5 file containing a > partitioned mesh using hyperslabs. > > Is this supported by Paraview/VTK ?? > > The HDF5 (solution1.h5) looks as follows: > > GROUP "/" { > GROUP "Grid" { > DATASET "Connectivities" { > DATATYPE H5T_STD_I32BE > DATASPACE SIMPLE { ( 18 ) / ( 18 ) } > DATA { > (0): 0, 1, 2, 3, 2, 1, 4, 5, 6, 7, 6, 5, 6, 7, 8, 9, 8, 7 > } > } > DATASET "Coordinates" { > DATATYPE H5T_IEEE_F64BE > DATASPACE SIMPLE { ( 20 ) / ( 20 ) } > DATA { > (0): 0, 0, 1, 0, 0, 0.5, 1, 0.5, 0, 0.5, 1, 0.5, 0, 1, 1, 1, 0, > 1.5, > (18): 1, 1.5 > } > } > DATASET "Solution" { > DATATYPE H5T_IEEE_F64BE > DATASPACE SIMPLE { ( 10 ) / ( 10 ) } > DATA { > (0): 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 > } > } > } > } > > And the XDMF file to represent a 2-triangle (4 points) piece of the full > mesh is: > > > > > > > > > 0 1 6 > Precision="4">solution1.h5:Grid/Connectivities > > > > > 0 1 8 > Precision="8">solution1.h5:Grid/Coordinates > > > > > > > > I'm trying to use the syntax explained at the XDMF webpage ( > http://www.xdmf.org/index.php/XDMF_Model_and_Format ), but I'm feeling > confused about the version of the documentation and current version of XDMF > library included in VTK library. > > Can anyone give me some info about this? > It is XDMFv3 already public ? > > > Thanks in advance, > V?ctor. > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gajo.ic at gmail.com Tue Aug 18 06:19:49 2015 From: gajo.ic at gmail.com (gajo) Date: Tue, 18 Aug 2015 03:19:49 -0700 (MST) Subject: [vtkusers] Pick points from polydata C# Message-ID: <1439893189388-5733536.post@n5.nabble.com> Hi, I'm just learning about how VTK/ActiViz works, so this might be the dumbest question, but I'd appreciate it very much if anyone could help (at least point me in the direction of some code or documentation). I'd like to do a dumbest thing ever on a polydata set I've loaded and that is to select/pick a couple of points (since it's multiple points I'm guessing I should have some button interfaces to let choose which point should be selected once the polydata model is left clicked)? But I'm having trouble even picking one point with this code and the solutions seem to smell: ... vtkInteractorStyleTrackballActor interactorStyle = vtkInteractorStyleTrackballActor.New(); interactorStyle.RightButtonPressEvt += new vtkObject.vtkObjectEventHandler(interactor_LeftButtonPressEvt); renderWindow.GetInteractor().SetInteractorStyle(interactorStyle); renderWindow.GetInteractor().SetRenderWindow(renderWindow); // seems too much? renderWindow.GetInteractor().Start(); ... private void interactor_LeftButtonPressEvt(vtkObject sender, vtkObjectEventArgs e) { vtkInteractorStyleTrackballActor interactor = sender as vtkInteractorStyleTrackballActor; int x = interactor.GetInteractor().GetEventPosition()[0]; // works int y = interactor.GetInteractor().GetEventPosition()[1]; // works interactor.FindPokedRenderer(x, y); // returns true var picker = vtkPointPicker.New(); // how to connect this picker from event handler to polydata picker.Pick(interactor.GetInteractor().GetEventPosition()[0], interactor.GetInteractor().GetEventPosition()[1], 0, // always zero. interactor.GetInteractor().GetRenderWindow().GetRenderers().GetFirstRenderer()); if (picker.GetPointId() >= 0) { int SelectedPoint = picker.GetPointId(); Console.WriteLine("Dragging point " + SelectedPoint); vtkPolyData Data = e as vtkPolyData; // not working, but I'd like there be a way like this IntPtr pP = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(double)) * 3); Data.GetPoint(SelectedPoint, pP); double[] p = new double[3]; Marshal.Copy(pP, p, 0, 3); Marshal.FreeHGlobal(pP); Console.WriteLine("p: " + p[0] + " " + p[1] + " " + p[2]); } } What I can't comprehend is that the various interactors seem quite oblivious to what they are being called upon to event handle (i.e. I can't reach the polyData I'm trying to pick and determine it's world coordinate points so I can later perform distance calculations from the EventArgs object in its event handler code)? I'm guessing this could be or has already been done with a widget, but I didn't see any C# code on how to use them, and I also tried to react to a pick event of a vtkPointPicker but that event is not occurring, I'm guessing it should be initiated by a interactor programmatically first (only I can't reach the polydata I'd like to pick points from within the event handler code - and making a standalone class for it and passing the polydata to it somehow or even worse making global variables for polydata seems kinda code smelly to me - at least compared to what I've come to be familiar when using WinForms). Could anyone please provide any C# code, even using widgets, which I can't figure out? TIA -- View this message in context: http://vtk.1045678.n5.nabble.com/Pick-points-from-polydata-C-tp5733536.html Sent from the VTK - Users mailing list archive at Nabble.com. From sur.chiranjib at gmail.com Tue Aug 18 07:23:05 2015 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Tue, 18 Aug 2015 16:53:05 +0530 Subject: [vtkusers] determine duplicate cells (lines) and clean them like vtkCleanPolydata Message-ID: Hi, I am constructing polydata for unstructured grid from randomly scattered points. Once I know the point IDs I am creating the connectivity between two points using a line (vtkline) and creating the cells around Something like this example : http://www.vtk.org/Wiki/VTK/Tutorials/TriangleGeometryLines The connectivity works this way //create a line between each pair of points vtkSmartPointer line0 = vtkSmartPointer::New(); line0->GetPointIds()->SetId ( 0,0 ); line0->GetPointIds()->SetId ( 1,1 ); The way I am doing it is to find nearest neighbours for each point and setting a line between those two points. In this, I am overdoing the creation of lines because when I search nearest neighbour for point I (say Id = 8) and find J (say Id = 10), I create a line between 8 and 10. The next time, I found the point I (Id = 10) for which one of the nearest neighbour is Id=8. At this stage I don't want to create a connectivity between 10 and 8 again, since I have already created it for 8-10. Any idea how to I do that. vtkCleanPolydata filter takes care of the duplicate points but not for duplicate lines (cells). Is there any classes/ filter available which I can use? Thanks much in advance. Chiranjib -------------- next part -------------- An HTML attachment was scrubbed... URL: From ysa0829 at gmail.com Tue Aug 18 09:09:22 2015 From: ysa0829 at gmail.com (Ang) Date: Tue, 18 Aug 2015 06:09:22 -0700 (MST) Subject: [vtkusers] QVTKWidget: How to free memory Message-ID: <1439903362126-5733539.post@n5.nabble.com> Hi all, I create a widget named "TestVTKWidget " and the widget takes almost 10MB of memory usage. I try to free some by setting attribute to "Qt::WA_DeleteOnClose" but it does not work. Any suggestion? here is how I do. //======TestVTKWidget .h=====// class TestVTKWidget : public QWidget { Q_OBJECT public: TestVTKWidget(QWidget *parent = 0); ~TestVTKWidget(); private: Ui::TestVTKWidget ui; }; //======TestVTKWidget .h=====// //======TestVTKWidget .cpp=====// TestVTKWidget::TestVTKWidget(QWidget *parent) : QWidget(parent) { ui.setupUi(this); setAttribute(Qt::WA_DeleteOnClose); } TestVTKWidget::~TestVTKWidget() { } //======TestVTKWidget .cpp=====// //==========mian.cpp======// #include "TestVTKWidget.h" int main(int argc, char *argv[]) { TestVTKWidget *test = new TestVTKWidget(); test->show(); } //==========mian.cpp======// thanks all. Ang. -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-How-to-free-memory-tp5733539.html Sent from the VTK - Users mailing list archive at Nabble.com. From emmasaunders123 at gmail.com Tue Aug 18 10:08:02 2015 From: emmasaunders123 at gmail.com (emmasaunders123) Date: Tue, 18 Aug 2015 07:08:02 -0700 (MST) Subject: [vtkusers] Rendering PET tumor texture advice Message-ID: <1439906882370-5733540.post@n5.nabble.com> Hi all I am using VTK to render PET tumors and looking at their texture, The results that I have at the moment when I use a slice to scroll through the rendered volume appear blocky Does anyone have any advice on how to implement modern rendering methods for my intended goal of visualizing texture through a volume? Thanks Emma -- View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-PET-tumor-texture-advice-tp5733540.html Sent from the VTK - Users mailing list archive at Nabble.com. From jpmverheggen at gmail.com Tue Aug 18 11:07:08 2015 From: jpmverheggen at gmail.com (Jaap Verheggen) Date: Tue, 18 Aug 2015 17:07:08 +0200 Subject: [vtkusers] Fwd: Transform polydata with double precision (vtk, python) In-Reply-To: <55D34815.8000306@gmail.com> References: <55D34815.8000306@gmail.com> Message-ID: <55D34A1C.6050806@gmail.com> Dear all, I am trying to transform polydata using double precision using python and vtk 5. I can set the datatype for the points via points.SetDataTypeToDouble() . I create a surface using Delaunay. Using delaunay.GetOutput().GetPoints().GetDataType() I can check that I still have double as datatype (11) After the transformation, the datatype is float, pgt.GetOutput().GetPoints().GetDataType() gives float (10) How can I transform the polydata keeping double precision? Thanks in advance for your answer Code: points = vtk.vtkPoints() points.SetDataTypeToDouble() vertices = vtk.vtkCellArray() ------ # Fill points and vertices with data # Create a polydata object point_pd = vtk.vtkPolyData() # Set the points and vertices as the geometry and topology of the polydata point_pd.SetPoints(points) point_pd.SetVerts(vertices) # make the delaunay mesh boundary = vtk.vtkPolyData() boundary.SetPoints(point_pd.GetPoints()) boundary.SetPolys(vertices) delaunay = vtk.vtkDelaunay2D() delaunay.SetInput(point_pd) delaunay.SetSource(boundary) delaunay.Update() # Rotate rotate = vtk.vtkTransform() rotate.RotateWXYZ(5.0, 0, 0, 1) pgt=vtk.vtkTransformPolyDataFilter() pgt.SetTransform(rotate) pgt.SetInput(delaunay.GetOutput()) pgt.Update() -- --------------------------- Jaap Verheggen -------------- next part -------------- An HTML attachment was scrubbed... URL: From jens.g.w.schmidt at gmx.de Tue Aug 18 12:55:27 2015 From: jens.g.w.schmidt at gmx.de (Jens Schmidt) Date: Tue, 18 Aug 2015 18:55:27 +0200 Subject: [vtkusers] Camera is not updated In-Reply-To: References: <55B66E62.8090305@gmx.de> <55B76A9D.405@gmx.de> Message-ID: <55D3637F.2070509@gmx.de> Dear Cory, thank you for your reply! It took some time to identify the problem further. Please find at the very bottom of this mail a test implementation (java) showing the problem. The code creates a simple view showing some spheres and two buttons. The first button uses the camera present, the second one creates a new camera. They should behave the same, but don't. I think it is the resetCamera() method. Maybe i use it wrong? The relevant code is in the selectionListeners for the buttons. Best regards Jens Am 29.07.2015 um 03:48 schrieb Cory Quammen: > Jens, > > Please remember to "reply-all" so that others on the list may benefit > from or contribute to the conversation. > > Do you have a small code sample that reproduces the issue? This kind > of camera manipulation followed by rendering is done all the time (see > [1], for example), so I'm not sure what is going on. > > Thanks, > Cory > > [1] > http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Tutorial/Step3/Java/Cone3.java;h=91e003825bca66e275c22658019b6c52ef1afb75;hb=HEAD > > On Tue, Jul 28, 2015 at 7:42 AM, Jens Schmidt > wrote: > > Cory, > > thx for your reply! Yep called render each time i changed the > camera. But the only time the camera did what i wanted was with > the new camera object and setActiveCamera. > > Best regards > Jens > > > > Am 27.07.2015 um 20:31 schrieb Cory Quammen: > > Jens, > > Did you try calling your render window's Render() member > function after > changing the camera properties? Rendering updates are not > performed > automatically when you change just camera properties. This is > actually good > because it prevents too many renderings when you update more > than one > camera property. > > HTH, > Cory > > On Mon, Jul 27, 2015 at 1:46 PM, Jens Schmidt > > > wrote: > > Hi Everyone! > > VTK rocks, but we knew that allready. ^^ What rocks less > is that the > camera ist not automatically updated when SetPosition or > SetFocalPoint are > called. > Btw i am using the java wrapping with SWT. > VtkAbstractComponent has a > reference to the active camera. > Using that had no effect, as was using the renderers > GetActiveCamera > method. > In fact i have to create a new vtkCamera, modify that an > then pass it to > the renderer as new active camera -> tada change on the > screen. > Did i do something wrong or is that how it is supposed to > work? > > Thank you > Jens > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: > http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. Code below here: ============== package CamTest; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.vtk.VTKLoader; import vtk.vtkActor; import vtk.vtkCamera; import vtk.vtkPolyDataMapper; import vtk.vtkSphereSource; import vtk.rendering.swt.vtkSwtComponent; public class CamTest { class vtkView extends vtkSwtComponent { public vtkView(Composite parentComposite) { super(parentComposite); renderer.SetBackground(0.1, 0.2, 0.4); renderer.SetBackground2(1, 1, 1); renderer.SetGradientBackground(true); vtkSwtComponent.attachOrientationAxes(this); update(); } void setCamera(vtkCamera camera) { this.camera = camera; renderer.SetActiveCamera(camera); } void addSpheres(int precision, int numberInX, int numberInY, int numberInZ) { vtkSphereSource source = new vtkSphereSource(); source.SetRadius(1.); source.SetPhiResolution(precision); source.SetThetaResolution(precision); vtkPolyDataMapper mapper = new vtkPolyDataMapper(); mapper.SetInputConnection(source.GetOutputPort()); mapper.Update(); for (int i = 0; i < numberInX; i++) { for (int j = 0; j < numberInY; j++) { for (int k = 0; k < numberInZ; k++) { vtkActor actor = new vtkActor(); actor.SetPosition(4 * i, 4 * j, 4 * k); actor.SetMapper(mapper); actor.GetProperty().BackfaceCullingOn(); renderer.AddActor(actor); } } } update(); resetCamera(); } } private vtkView vtkView; private CamTest() { VTKLoader loader = new VTKLoader(); loader.loadAll(); Display display = new Display(); Shell shell = new Shell(display); shell.setText("CamTest"); GridLayout layout = new GridLayout(2, false); shell.setLayout(layout); vtkView = new vtkView(shell); GridData data = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1); data.widthHint = 300; data.heightHint = 300; vtkView.getComponent().setLayoutData(data); vtkView.addSpheres(10, 10, 10, 10); Button isoButton = new Button(shell, SWT.PUSH); isoButton.setText("ISO VIEW"); isoButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { System.out.println("ISO"); vtkCamera camera = vtkView.getActiveCamera(); camera.SetPosition(new double[] { 1., 1., 1. }); camera.SetViewUp(new double[] { 0., 0., 1. }); vtkView.resetCamera();// <-- bad line vtkView.update(); } }); Button resetButton = new Button(shell, SWT.PUSH); resetButton.setText("RESET VIEW"); resetButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { System.out.println("RESET"); vtkCamera newCamera = new vtkCamera(); newCamera.SetPosition(new double[] { 1., 1., 1. }); newCamera.SetViewUp(new double[] { 0., 0., 1. }); vtkView.setCamera(newCamera); vtkView.resetCamera(); vtkView.update(); } }); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } public static void main(String[] args) { CamTest camTest = new CamTest(); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Tue Aug 18 13:15:40 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Tue, 18 Aug 2015 10:15:40 -0700 (MST) Subject: [vtkusers] vtkUnicodeString::from_utf8(): not a valid UTF-8 string. Message-ID: <1439918140298-5733543.post@n5.nabble.com> erro Generic Warning: In D:\Documentos XDICOM\VTK\source\Common\Core\vtkUnicodeString.cxx, line 183 vtkUnicodeString::from_utf8(): not a valid UTF-8 string. When passao a text that has emphasis (UTF8 format) to caption = vtkCaptionWidget::New(); //texto = "Testand?oo"; static_cast(caption ->GetRepresentation())->GetCaptionActor2D()->SetCaption(clXUteis::ConverterStringParaChar(form->texto)); can anyone help? -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkUnicodeString-from-utf8-not-a-valid-UTF-8-string-tp5733543.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Aug 18 13:17:07 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 18 Aug 2015 13:17:07 -0400 Subject: [vtkusers] Fwd: Transform polydata with double precision (vtk, python) In-Reply-To: <55D34A1C.6050806@gmail.com> References: <55D34815.8000306@gmail.com> <55D34A1C.6050806@gmail.com> Message-ID: pgt.SetOutputPointsPrecision(vtkAlgorithm::DOUBLE_PRECISION ) should work. Let us know if it doesn't. On Tue, Aug 18, 2015 at 11:07 AM, Jaap Verheggen wrote: > > > Dear all, > > I am trying to transform polydata using double precision using python and > vtk 5. > > I can set the datatype for the points via points.SetDataTypeToDouble() . > I create a surface using Delaunay. > Using delaunay.GetOutput().GetPoints().GetDataType() I can check that I > still have double as datatype (11) > After the transformation, the datatype is float, > pgt.GetOutput().GetPoints().GetDataType() gives float (10) > > How can I transform the polydata keeping double precision? > > Thanks in advance for your answer > > Code: > points = vtk.vtkPoints() > points.SetDataTypeToDouble() > vertices = vtk.vtkCellArray() > ------ # Fill points and vertices with data > # Create a polydata object > point_pd = vtk.vtkPolyData() > # Set the points and vertices as the geometry and topology of the > polydata > point_pd.SetPoints(points) > point_pd.SetVerts(vertices) > # make the delaunay mesh > boundary = vtk.vtkPolyData() > boundary.SetPoints(point_pd.GetPoints()) > boundary.SetPolys(vertices) > delaunay = vtk.vtkDelaunay2D() > delaunay.SetInput(point_pd) > delaunay.SetSource(boundary) > delaunay.Update() > > # Rotate > > rotate = vtk.vtkTransform() > > rotate.RotateWXYZ(5.0, 0, 0, 1) > > pgt=vtk.vtkTransformPolyDataFilter() > > pgt.SetTransform(rotate) > > pgt.SetInput(delaunay.GetOutput()) > > pgt.Update() > > > -- > --------------------------- > Jaap Verheggen > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Aug 18 13:19:50 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 18 Aug 2015 13:19:50 -0400 Subject: [vtkusers] Fwd: Transform polydata with double precision (vtk, python) In-Reply-To: References: <55D34815.8000306@gmail.com> <55D34A1C.6050806@gmail.com> Message-ID: Ooops, I gave you a not-fully-Python snippet. Try pgt.SetOutputPointsPrecision(vtk.vtkAlgorithm.DOUBLE_PRECISION ) instead. On Tue, Aug 18, 2015 at 1:17 PM, Cory Quammen wrote: > pgt.SetOutputPointsPrecision(vtkAlgorithm::DOUBLE_PRECISION ) > > should work. Let us know if it doesn't. > > On Tue, Aug 18, 2015 at 11:07 AM, Jaap Verheggen > wrote: > >> >> >> Dear all, >> >> I am trying to transform polydata using double precision using python and >> vtk 5. >> >> I can set the datatype for the points via points.SetDataTypeToDouble() . >> I create a surface using Delaunay. >> Using delaunay.GetOutput().GetPoints().GetDataType() I can check that I >> still have double as datatype (11) >> After the transformation, the datatype is float, >> pgt.GetOutput().GetPoints().GetDataType() gives float (10) >> >> How can I transform the polydata keeping double precision? >> >> Thanks in advance for your answer >> >> Code: >> points = vtk.vtkPoints() >> points.SetDataTypeToDouble() >> vertices = vtk.vtkCellArray() >> ------ # Fill points and vertices with data >> # Create a polydata object >> point_pd = vtk.vtkPolyData() >> # Set the points and vertices as the geometry and topology of the >> polydata >> point_pd.SetPoints(points) >> point_pd.SetVerts(vertices) >> # make the delaunay mesh >> boundary = vtk.vtkPolyData() >> boundary.SetPoints(point_pd.GetPoints()) >> boundary.SetPolys(vertices) >> delaunay = vtk.vtkDelaunay2D() >> delaunay.SetInput(point_pd) >> delaunay.SetSource(boundary) >> delaunay.Update() >> >> # Rotate >> >> rotate = vtk.vtkTransform() >> >> rotate.RotateWXYZ(5.0, 0, 0, 1) >> >> pgt=vtk.vtkTransformPolyDataFilter() >> >> pgt.SetTransform(rotate) >> >> pgt.SetInput(delaunay.GetOutput()) >> >> pgt.Update() >> >> >> -- >> --------------------------- >> Jaap Verheggen >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tachim at cs.stanford.edu Tue Aug 18 14:10:45 2015 From: tachim at cs.stanford.edu (Tudor Achim) Date: Tue, 18 Aug 2015 14:10:45 -0400 Subject: [vtkusers] coloring PolyDataMappers in python In-Reply-To: References: Message-ID: Nevermind - this was happening because I was using rgb scalars in [0, 256) instead of [0, 1]. On Mon, Aug 17, 2015 at 4:31 PM, Tudor Achim wrote: > Thanks for the pointers - your suggestions worked. On a related note, is > there some trick to getting shading to work? Right now the colors are super > intense and it's tough to tell the contour of the solids. > > [image: Inline image 1] > > On Tue, Aug 4, 2015 at 2:29 PM, David Gobbi wrote: > >> Don't forget that use of SetColor() often requires this: >> >> mapper.ScalarVisibilityOff() >> >> SetColor() is ignored if scalars are present and visible. >> >> - David >> >> >> On Tue, Aug 4, 2015 at 12:24 PM, Cory Quammen >> wrote: >> >>> In that case, you can leave out the vtkLookupTable altogether and set >>> the color in your actor instead >>> >>> actor = vtk.vtkActor() >>> actor.SetMapper(mapper) >>> property = actor.GetProperty() >>> property.SetColor(*rgb_cluster_mapping[cluster_ind]) >>> >>> HTH, >>> Cory >>> >>> On Tue, Aug 4, 2015 at 2:15 PM, Tudor Achim >>> wrote: >>> >>>> No, I'd like the entire mesh to be one color (and opacity). >>>> >>>> On Tue, Aug 4, 2015 at 2:04 PM, Cory Quammen >>>> wrote: >>>> >>>>> Are you trying to color map a particular data array in the contour? >>>>> >>>>> On Mon, Aug 3, 2015 at 3:43 PM, Tudor Achim >>>>> wrote: >>>>> >>>>>> Hi all, >>>>>> I have a quick question about coloring vtkPolyMappers. I have the >>>>>> following code: >>>>>> >>>>>> for cluster_ind in ...: >>>>>> threshold = vtk.vtkImageThreshold() >>>>>> threshold.SetInputConnection(importer.GetOutputPort()) >>>>>> threshold.ThresholdBetween(cluster_ind-0.1, cluster_ind+0.1) >>>>>> threshold.ReplaceInOn() >>>>>> threshold.SetInValue(0) >>>>>> threshold.ReplaceOutOn() >>>>>> threshold.SetOutValue(1) >>>>>> threshold.Update() >>>>>> >>>>>> dmc = vtk.vtkDiscreteMarchingCubes() >>>>>> dmc.SetInputConnection(threshold.GetOutputPort()) >>>>>> dmc.GenerateValues(1, 1, 1) >>>>>> dmc.Update() >>>>>> >>>>>> mapper = vtk.vtkPolyDataMapper() >>>>>> mapper.SetInputConnection(dmc.GetOutputPort()) >>>>>> >>>>>> lut = vtk.vtkLookupTable() >>>>>> lut.SetNumberOfTableValues(2) >>>>>> lut.SetTableValue(0, 0, 0, 255) >>>>>> lut.SetTableValue(1, *rgb_cluster_mapping[cluster_ind]) >>>>>> lut.Build() >>>>>> mapper.SetLookupTable(lut) >>>>>> mapper.SetScalarModeToUseCellData() >>>>>> >>>>>> However, when I run it only one of the mappers is colored correctly; >>>>>> the other one is just rendered as black. I can tell that it's rendered >>>>>> black because when I spin around the clusters in my viewer I can see it >>>>>> obstructing the other clusters. The intended colors are (0, 255, 0) and >>>>>> (88, 86, 214) (that's what's in rgb_cluster_mapping for these clusters). >>>>>> >>>>>> Any ideas? >>>>>> >>>>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 45160 bytes Desc: not available URL: From david.gobbi at gmail.com Tue Aug 18 17:02:32 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 18 Aug 2015 15:02:32 -0600 Subject: [vtkusers] vtkUnicodeString::from_utf8(): not a valid UTF-8 string. In-Reply-To: <1439918140298-5733543.post@n5.nabble.com> References: <1439918140298-5733543.post@n5.nabble.com> Message-ID: Hi Jose, Are you using Visual Studio? Its default encoding is not utf-8. Your source files probably use latin1 to encode the accents, because that is the default 8-bit encoding for Windows in western countries. - David On Tue, Aug 18, 2015 at 11:15 AM, Jose Barreto wrote: > erro Generic Warning: In D:\Documentos > XDICOM\VTK\source\Common\Core\vtkUnicodeString.cxx, line 183 > vtkUnicodeString::from_utf8(): not a valid UTF-8 string. > > > When passao a text that has emphasis (UTF8 format) to > > caption = vtkCaptionWidget::New(); > > //texto = "Testand?oo"; > static_cast(caption > > ->GetRepresentation())->GetCaptionActor2D()->SetCaption(clXUteis::ConverterStringParaChar(form->texto)); > > > can anyone help? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Tue Aug 18 17:18:00 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Tue, 18 Aug 2015 14:18:00 -0700 (MST) Subject: [vtkusers] vtkUnicodeString::from_utf8(): not a valid UTF-8 string. In-Reply-To: References: <1439918140298-5733543.post@n5.nabble.com> Message-ID: <1439932680666-5733548.post@n5.nabble.com> Hello David, I am using visual studio 2013, my location is Brazil, both my computer and the VS are in Portuguese. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkUnicodeString-from-utf8-not-a-valid-UTF-8-string-tp5733543p5733548.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue Aug 18 17:44:45 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 18 Aug 2015 15:44:45 -0600 Subject: [vtkusers] vtkUnicodeString::from_utf8(): not a valid UTF-8 string. In-Reply-To: <1439932680666-5733548.post@n5.nabble.com> References: <1439918140298-5733543.post@n5.nabble.com> <1439932680666-5733548.post@n5.nabble.com> Message-ID: You can use escape codes for the special characters: const char *texto = "Testand" "\xc3\xb3" "oo"; On Tue, Aug 18, 2015 at 3:18 PM, Jose Barreto wrote: > Hello David, I am using visual studio 2013, my location is Brazil, both my > computer and the VS are in Portuguese. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkUnicodeString-from-utf8-not-a-valid-UTF-8-string-tp5733543p5733548.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lilymagic2005 at yahoo.com.hk Tue Aug 18 23:18:44 2015 From: lilymagic2005 at yahoo.com.hk (lilymo) Date: Tue, 18 Aug 2015 20:18:44 -0700 (MST) Subject: [vtkusers] Create perfect holes on a 3D vtp file Message-ID: <1439954324452-5733550.post@n5.nabble.com> Are there any methods to create a perfect hole on a 3D .vtp file? (like punching hole on its surface) The closest solution I am able to find is the example "ExtractSelectionCells" ( http://www.cmake.org/Wiki/VTK/Examples/Cxx/PolyData/ExtractSelectionCells ) But seems that it still need some work to create perfect holes on it. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-perfect-holes-on-a-3D-vtp-file-tp5733550.html Sent from the VTK - Users mailing list archive at Nabble.com. From sur.chiranjib at gmail.com Wed Aug 19 02:01:23 2015 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Wed, 19 Aug 2015 11:31:23 +0530 Subject: [vtkusers] How to extract values of vtkpoint coordinates from vtkXMLPolyDataReader Message-ID: Hi, I want to extract the value of the XMl attributes (e.g. the coordinates of the VTk points, PointData/Points/DataArray). I am able to read the file using vtkXMLPolyDataReder and view it in ParaView but I want to extract values individually. How do I do that? Thanks, Chiranjib -------------- next part -------------- An HTML attachment was scrubbed... URL: From sur.chiranjib at gmail.com Wed Aug 19 02:05:06 2015 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Wed, 19 Aug 2015 11:35:06 +0530 Subject: [vtkusers] How to extract values of vtkpoint coordinates from vtkXMLPolyDataReader Message-ID: I think, I have sent this email too quickly. Other than the point coordinates, if I want to obtain the value of the point attributes, how do I do that. I can understand the point coordinates can be obtained by polydata->GetPoints(Id,desirtedpoint). What are the alternatives to know the point attributes (scaler/vector) for the points. Thanks again, Chiranjib ---------- Forwarded message ---------- From: Chiranjib Sur Date: Wed, Aug 19, 2015 at 11:31 AM Subject: How to extract values of vtkpoint coordinates from vtkXMLPolyDataReader To: VTK Users Hi, I want to extract the value of the XMl attributes (e.g. the coordinates of the VTk points, PointData/Points/DataArray). I am able to read the file using vtkXMLPolyDataReder and view it in ParaView but I want to extract values individually. How do I do that? Thanks, Chiranjib -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpmverheggen at gmail.com Wed Aug 19 02:55:28 2015 From: jpmverheggen at gmail.com (Jaap Verheggen) Date: Wed, 19 Aug 2015 08:55:28 +0200 Subject: [vtkusers] Fwd: Transform polydata with double precision (vtk, python) In-Reply-To: References: <55D34815.8000306@gmail.com> <55D34A1C.6050806@gmail.com> Message-ID: <55D42860.208@gmail.com> Hello, Using your code I get the following error code: >>> pgt = vtk.vtkTransformPolyDataFilter() >>> pgt.SetOutputPointsPrecision(vtk.vtkAlgorithm.DOUBLE_PRECISION) Traceback (most recent call last): File "", line 1, in AttributeError: SetOutputPointsPrecision >>> Using VTK version 5.8.0 On 18-08-15 19:19, Cory Quammen wrote: > pgt.SetOutputPointsPrecision(vtk.vtkAlgorithm.DOUBLE_PRECISION ) -- --------------------------- Jaap Verheggen Diepvoorde 2603 6605 GN Wijchen Nederland +31 630 639 268 -------------- next part -------------- An HTML attachment was scrubbed... URL: From 419655660 at qq.com Wed Aug 19 07:07:01 2015 From: 419655660 at qq.com (louiskoo) Date: Wed, 19 Aug 2015 04:07:01 -0700 (MST) Subject: [vtkusers] java vtkRenderWindow.GetPixelData Message-ID: <1439982421349-5733554.post@n5.nabble.com> I use the vtkRenderWindow.GetPixelData() to capture RenderWindow screen's image in C#: byte[] vtkScreenBuffer = null; int imgWidth = 0, imgHeight = 0; if (vtkScreenBuffer == null) { imgWidth = _renwin.GetSize()[0]; imgHeight = _renwin.GetSize()[1]; vtkUnsignedCharArray data = vtkUnsignedCharArray.New(); _renwin.GetPixelData(0, 0, imgWidth - 1, imgHeight - 1, 0, data); int s = 3 * (int)data.GetNumberOfTuples(); vtkScreenBuffer = new byte[s]; } IntPtr ptr = _renwin.GetPixelData(0, 0, imgWidth - 1, imgHeight - 1, 0); Marshal.Copy(ptr, vtkScreenBuffer, 0, vtkScreenBuffer.Length); However,I don't know how to realize it in Java. Anyone can give me a idea? -- View this message in context: http://vtk.1045678.n5.nabble.com/java-vtkRenderWindow-GetPixelData-tp5733554.html Sent from the VTK - Users mailing list archive at Nabble.com. From guillaume.jacquenot at gmail.com Wed Aug 19 08:03:06 2015 From: guillaume.jacquenot at gmail.com (Guillaume Jacquenot) Date: Wed, 19 Aug 2015 14:03:06 +0200 Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing Message-ID: Hi everyone, I was wondering if this merge will be available in VTK 6.3, for which two RC have been made. It would be great to benefit from this integration in VTK 6.3 This would allow to migrate to python 3 now! Best regards Guillaume Jacquenot Message: 9 Date: Mon, 17 Aug 2015 14:10:58 +0200 From: Marco Nawijn To: David Gobbi Cc: VTK Users Subject: Re: [vtkusers] [vtk-developers] VTK-py3k is ready for testing Message-ID: Content-Type: text/plain; charset="utf-8" Hello David, This is great news. I will try to checkout and build the Python 3 bindings and will inform you if anything unexpected pops up. If somebody can give me some instructions on what the process is for updating/adding the Python 3 version of the examples, I will be glad to take some of the workload on this. Kind regards, Marco On Wed, Aug 12, 2015 at 9:27 PM, David Gobbi wrote: > More news about Python 3 support: > > This morning I merged in all of the fixes that Andrew did for the VTK > tests so that they run under Python 3 (thanks to Ben for running and > maintaining the dashboard machine). We're confident now that VTK will run > properly with Python 3. > > None of the python examples have been converted to Python 3 yet, so > there's still work to be done (and I'm on vacation until the middle of next > week, so I won't be touching any of the code for a little while). > > - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Aug 19 08:47:14 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 19 Aug 2015 06:47:14 -0600 Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing In-Reply-To: References: Message-ID: If people are interested, I could maintain a branch for this (vtk-6.3+py3k), but the new wrapping is still too green to merge into the official release. As far as I know, it has only been dashboard-tested, no one has tried it out in a real application yet. - David On Wed, Aug 19, 2015 at 6:03 AM, Guillaume Jacquenot < guillaume.jacquenot at gmail.com> wrote: > Hi everyone, > > I was wondering if this merge will be available in VTK 6.3, for which two > RC have been made. > It would be great to benefit from this integration in VTK 6.3 > This would allow to migrate to python 3 now! > > Best regards > Guillaume Jacquenot > > Message: 9 > Date: Mon, 17 Aug 2015 14:10:58 +0200 > From: Marco Nawijn > To: David Gobbi > Cc: VTK Users > Subject: Re: [vtkusers] [vtk-developers] VTK-py3k is ready for testing > Message-ID: > 911H+VkxjLp+kseeb3wg at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello David, > > This is great news. I will try to checkout and build the Python 3 bindings > and will inform > you if anything unexpected pops up. If somebody can give me some > instructions on > what the process is for updating/adding the Python 3 version of the > examples, I will be > glad to take some of the workload on this. > > Kind regards, > > Marco > > > On Wed, Aug 12, 2015 at 9:27 PM, David Gobbi > wrote: > > > More news about Python 3 support: > > > > This morning I merged in all of the fixes that Andrew did for the VTK > > tests so that they run under Python 3 (thanks to Ben for running and > > maintaining the dashboard machine). We're confident now that VTK will > run > > properly with Python 3. > > > > None of the python examples have been converted to Python 3 yet, so > > there's still work to be done (and I'm on vacation until the middle of > next > > week, so I won't be touching any of the code for a little while). > > > > - David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Aug 19 08:49:27 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 19 Aug 2015 08:49:27 -0400 Subject: [vtkusers] Fwd: Transform polydata with double precision (vtk, python) In-Reply-To: <55D42860.208@gmail.com> References: <55D34815.8000306@gmail.com> <55D34A1C.6050806@gmail.com> <55D42860.208@gmail.com> Message-ID: Ah. Obviously, that feature is not in 5.8. I'm not sure how to get double point precision in 5.8. On Wed, Aug 19, 2015 at 2:55 AM, Jaap Verheggen wrote: > Hello, > > Using your code I get the following error code: > > >>> pgt = vtk.vtkTransformPolyDataFilter() > >>> pgt.SetOutputPointsPrecision(vtk.vtkAlgorithm.DOUBLE_PRECISION) > Traceback (most recent call last): > File "", line 1, in > AttributeError: SetOutputPointsPrecision > >>> > > Using VTK version 5.8.0 > > > On 18-08-15 19:19, Cory Quammen wrote: > > pgt.SetOutputPointsPrecision(vtk.vtkAlgorithm.DOUBLE_PRECISION ) > > > > -- > --------------------------- > Jaap Verheggen > Diepvoorde 2603 > 6605 GN Wijchen > Nederland > +31 630 639 268 > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Wed Aug 19 09:18:52 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Wed, 19 Aug 2015 06:18:52 -0700 (MST) Subject: [vtkusers] vtkUnicodeString::from_utf8(): not a valid UTF-8 string. In-Reply-To: References: <1439918140298-5733543.post@n5.nabble.com> <1439932680666-5733548.post@n5.nabble.com> Message-ID: <1439990332537-5733560.post@n5.nabble.com> Thank you David, It works here. I'm leaving two methods in a file if someone needs to use too. A String ^ converts to char * and other formats for UTF-8. maniputa??o_String_VTK.txt -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkUnicodeString-from-utf8-not-a-valid-UTF-8-string-tp5733543p5733560.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Aug 19 09:30:56 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 19 Aug 2015 07:30:56 -0600 Subject: [vtkusers] vtkUnicodeString::from_utf8(): not a valid UTF-8 string. In-Reply-To: <1439990332537-5733560.post@n5.nabble.com> References: <1439918140298-5733543.post@n5.nabble.com> <1439932680666-5733548.post@n5.nabble.com> <1439990332537-5733560.post@n5.nabble.com> Message-ID: Hi Jose, I have a function that efficiently converts latin1 to utf-8 (it's part of my DICOM code): std::string convertLatin1ToUTF8(const char *text) { // latin1, codepage is identity const char *cp = text; size_t m = l; // compute the size of the UTF-8 string for (size_t n = 0; n < l; n++) { m += static_cast(*cp++) >> 7; } cp = text; std::string s; s.resize(m); // encode as UTF-8 size_t i = 0; while (i < m) { while (i < m && (*cp & 0x80) == 0) { s[i++] = *cp++; } if (i < m) { int code = static_cast(*cp++); s[i++] = (0xC0 | (code >> 6)); s[i++] = (0x80 | (code & 0x3F)); } } return s; } On Wed, Aug 19, 2015 at 7:18 AM, Jose Barreto wrote: > Thank you David, > It works here. > I'm leaving two methods in a file if someone needs to use too. > A String ^ converts to char * and other formats for UTF-8. > > maniputa??o_String_VTK.txt > < > http://vtk.1045678.n5.nabble.com/file/n5733560/maniputa%C3%A7%C3%A3o_String_VTK.txt > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkUnicodeString-from-utf8-not-a-valid-UTF-8-string-tp5733543p5733560.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Aug 19 09:39:19 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 19 Aug 2015 07:39:19 -0600 Subject: [vtkusers] vtkUnicodeString::from_utf8(): not a valid UTF-8 string. In-Reply-To: References: <1439918140298-5733543.post@n5.nabble.com> <1439932680666-5733548.post@n5.nabble.com> <1439990332537-5733560.post@n5.nabble.com> Message-ID: Apologies, I missed a parameter when I did the cut-and-paste: std::string convertLatin1ToUTF8(const char *text, size_t l) { // latin1, codepage is identity const char *cp = text; size_t m = l; // compute the size of the UTF-8 string for (size_t n = 0; n < l; n++) { m += static_cast(*cp++) >> 7; } cp = text; std::string s; s.resize(m); // encode as UTF-8 size_t i = 0; while (i < m) { while (i < m && (*cp & 0x80) == 0) { s[i++] = *cp++; } if (i < m) { int code = static_cast(*cp++); s[i++] = (0xC0 | (code >> 6)); s[i++] = (0x80 | (code & 0x3F)); } } return s; On Wed, Aug 19, 2015 at 7:30 AM, David Gobbi wrote: > Hi Jose, > > I have a function that efficiently converts latin1 to utf-8 (it's part of > my DICOM code): > > std::string convertLatin1ToUTF8(const char *text) > { > // latin1, codepage is identity > const char *cp = text; > size_t m = l; > // compute the size of the UTF-8 string > for (size_t n = 0; n < l; n++) > { > m += static_cast(*cp++) >> 7; > } > cp = text; > std::string s; > s.resize(m); > // encode as UTF-8 > size_t i = 0; > while (i < m) > { > while (i < m && (*cp & 0x80) == 0) > { > s[i++] = *cp++; > } > if (i < m) > { > int code = static_cast(*cp++); > s[i++] = (0xC0 | (code >> 6)); > s[i++] = (0x80 | (code & 0x3F)); > } > } > return s; > } > > > On Wed, Aug 19, 2015 at 7:18 AM, Jose Barreto > wrote: > >> Thank you David, >> It works here. >> I'm leaving two methods in a file if someone needs to use too. >> A String ^ converts to char * and other formats for UTF-8. >> >> maniputa??o_String_VTK.txt >> < >> http://vtk.1045678.n5.nabble.com/file/n5733560/maniputa%C3%A7%C3%A3o_String_VTK.txt >> > >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/vtkUnicodeString-from-utf8-not-a-valid-UTF-8-string-tp5733543p5733560.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Aug 19 11:01:00 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 19 Aug 2015 09:01:00 -0600 Subject: [vtkusers] java vtkRenderWindow.GetPixelData In-Reply-To: <1439982421349-5733554.post@n5.nabble.com> References: <1439982421349-5733554.post@n5.nabble.com> Message-ID: You can use the VTK way, which will create a ImageData of the captured data. http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/Screenshot On Wed, Aug 19, 2015 at 5:07 AM, louiskoo <419655660 at qq.com> wrote: > I use the vtkRenderWindow.GetPixelData() to capture RenderWindow screen's > image in C#: > > byte[] vtkScreenBuffer = null; > int imgWidth = 0, imgHeight = 0; > if (vtkScreenBuffer == null) > { > imgWidth = _renwin.GetSize()[0]; > imgHeight = _renwin.GetSize()[1]; > > > vtkUnsignedCharArray data = vtkUnsignedCharArray.New(); > _renwin.GetPixelData(0, 0, imgWidth - 1, imgHeight - 1, 0, > data); > > int s = 3 * (int)data.GetNumberOfTuples(); > vtkScreenBuffer = new byte[s]; > } > IntPtr ptr = _renwin.GetPixelData(0, 0, imgWidth - 1, imgHeight > - 1, 0); > Marshal.Copy(ptr, vtkScreenBuffer, 0, vtkScreenBuffer.Length); > > > However,I don't know how to realize it in Java. Anyone can give me a idea? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/java-vtkRenderWindow-GetPixelData-tp5733554.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From al221 at hotmail.it Wed Aug 19 11:49:57 2015 From: al221 at hotmail.it (erpupones) Date: Wed, 19 Aug 2015 08:49:57 -0700 (MST) Subject: [vtkusers] DICOM VIEWER In-Reply-To: References: <1439762252674-5733518.post@n5.nabble.com> Message-ID: <1439999397699-5733564.post@n5.nabble.com> Thanks for the answer Waldo, I have another question: i have to use MSVC 2013 to compile the only examples or the vtk sources too? And which version of MVSC 2103 i have to install? -- View this message in context: http://vtk.1045678.n5.nabble.com/DICOM-VIEWER-tp5733518p5733564.html Sent from the VTK - Users mailing list archive at Nabble.com. From victorsv at gmail.com Wed Aug 19 12:03:12 2015 From: victorsv at gmail.com (victor sv) Date: Wed, 19 Aug 2015 18:03:12 +0200 Subject: [vtkusers] Fwd: XDMF and hyperslabs In-Reply-To: References: Message-ID: Thanks Dan, it was an error in the XDMF file and it seems that is a valid format for Xdmf2. I comment the error between lines below. In a post that I sent to XDMF mailing list they say me that Xdmf3 is not by default in Paraview and I have to compile the sources with the correct options enabling Xdmf3. My problem with the versions is that the XDMF documentation and library versions is not "synchronized". It seems that Kitware is who is developing Xdmf3, but there isn't an stand-alone library, it only exists inside VTK project. I'm right? Thanks again, V?ctor. 2015-08-18 4:09 GMT+02:00 Dan Lipsa : > There are (advanced) options to enable either xdmf2 or xdmf3 in VTK. > > On Fri, Aug 14, 2015 at 6:27 AM, victor sv wrote: > >> >> ---------- Forwarded message ---------- >> From: victor sv >> Date: 2015-08-14 12:25 GMT+02:00 >> Subject: XDMF and hyperslabs >> To: vtkdev , vtk-users at vtk.org, " >> paraview at paraview.org" >> >> >> Hello all, >> >> I'm trying to create and visualize an XDMF/HDF5 file containing a >> partitioned mesh using hyperslabs. >> >> Is this supported by Paraview/VTK ?? >> >> The HDF5 (solution1.h5) looks as follows: >> >> GROUP "/" { >> GROUP "Grid" { >> DATASET "Connectivities" { >> DATATYPE H5T_STD_I32BE >> DATASPACE SIMPLE { ( 18 ) / ( 18 ) } >> DATA { >> (0): 0, 1, 2, 3, 2, 1, 4, 5, 6, 7, 6, 5, 6, 7, 8, 9, 8, 7 >> } >> } >> DATASET "Coordinates" { >> DATATYPE H5T_IEEE_F64BE >> DATASPACE SIMPLE { ( 20 ) / ( 20 ) } >> DATA { >> (0): 0, 0, 1, 0, 0, 0.5, 1, 0.5, 0, 0.5, 1, 0.5, 0, 1, 1, 1, 0, >> 1.5, >> (18): 1, 1.5 >> } >> } >> DATASET "Solution" { >> DATATYPE H5T_IEEE_F64BE >> DATASPACE SIMPLE { ( 10 ) / ( 10 ) } >> DATA { >> (0): 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 >> } >> } >> } >> } >> >> And the XDMF file to represent a 2-triangle (4 points) piece of the full >> mesh is: >> >> >> >> >> >> >> >> >> > The problem is here, the correct dimensions are 2 (triangles) and not 6 (integers) 0 1 6 >> > Precision="4">solution1.h5:Grid/Connectivities >> >> >> >> >> 0 1 8 >> > Precision="8">solution1.h5:Grid/Coordinates >> >> >> >> >> >> >> >> I'm trying to use the syntax explained at the XDMF webpage ( >> http://www.xdmf.org/index.php/XDMF_Model_and_Format ), but I'm feeling >> confused about the version of the documentation and current version of XDMF >> library included in VTK library. >> >> Can anyone give me some info about this? >> It is XDMFv3 already public ? >> >> >> Thanks in advance, >> V?ctor. >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Wed Aug 19 12:46:43 2015 From: drescherjm at gmail.com (John Drescher) Date: Wed, 19 Aug 2015 12:46:43 -0400 Subject: [vtkusers] DICOM VIEWER In-Reply-To: <1439999397699-5733564.post@n5.nabble.com> References: <1439762252674-5733518.post@n5.nabble.com> <1439999397699-5733564.post@n5.nabble.com> Message-ID: > Thanks for the answer Waldo, > I have another question: i have to use MSVC 2013 to compile the only > examples or the vtk sources too? > And which version of MVSC 2103 i have to install? I did not have any problem compiling vtk-6.2 with Visual Studio 2013 Pro. I believed I used cmake-3.3.0 to generate the solution. John From draktharrblorf at gmail.com Wed Aug 19 16:56:15 2015 From: draktharrblorf at gmail.com (Drak) Date: Wed, 19 Aug 2015 13:56:15 -0700 (MST) Subject: [vtkusers] Segmentation fault with vtkBooleanOperationPolyDataFilter using 2 cylinders [HELP] Message-ID: <1440017775588-5733567.post@n5.nabble.com> I've noticed that by playing with the radius value and the resolution of the cylinder, the boolean operation filter may or may not crash Here is my code bellow. // The outer cylinder vtkCylinderSource * _cylinderSource1 = vtkCylinderSource::New(); _cylinderSource1->SetCenter(0, 0, 0); _cylinderSource1->SetHeight(width); _cylinderSource1->SetRadius(0.13); _cylinderSource1->SetResolution(10); _cylinderSource1->Update(); vtkTriangleFilter * _cylinder1Triangle = vtkTriangleFilter::New(); _cylinder1Triangle->SetInputData(_cylinderSource1->GetOutput()); _cylinder1Triangle->Update(); // The inner cylinder vtkCylinderSource * _cylinderSource2 = vtkCylinderSource::New(); _cylinderSource2->SetCenter(0, 0, 0); _cylinderSource2->SetHeight(width+0.01); _cylinderSource2->SetRadius(0.001); _cylinderSource2->SetResolution(20); _cylinderSource2->Update(); vtkTriangleFilter * _cylinder2Triangle = vtkTriangleFilter::New(); _cylinder2Triangle->SetInputData(_cylinderSource2->GetOutput()); _cylinder2Triangle->Update(); vtkBooleanOperationPolyDataFilter * _filter = vtkBooleanOperationPolyDataFilter::New(); _filter->SetOperationToDifference(); _filter->SetInputData(0, _cylinder1Triangle->GetOutput()); _filter->SetInputData(1, _cylinder2Triangle->GetOutput()); _filter->Update(); // CRASH What should I do to make it work 100 % of the time? I don't care if I have sometimes weird holes, but I cannot accept to have crashes in my program :\ . -- View this message in context: http://vtk.1045678.n5.nabble.com/Segmentation-fault-with-vtkBooleanOperationPolyDataFilter-using-2-cylinders-HELP-tp5733567.html Sent from the VTK - Users mailing list archive at Nabble.com. From andrew.amaclean at gmail.com Wed Aug 19 17:11:57 2015 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Thu, 20 Aug 2015 07:11:57 +1000 Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing (David Gobbi) Message-ID: Hi Guillaume, With respect to the examples, there is already a merge request for the examples, see: https://gitlab.kitware.com/vtk/vtk/merge_requests/543#note_28085 There are some that I haven't been able to test, these are listed there. Please feel free to test these. Regards Andrew > > ---------- Forwarded message ---------- > From: David Gobbi > To: Guillaume Jacquenot > Cc: VTK Users > Date: Wed, 19 Aug 2015 06:47:14 -0600 > Subject: Re: [vtkusers] [vtk-developers] VTK-py3k is ready for testing > If people are interested, I could maintain a branch for this > (vtk-6.3+py3k), but the new wrapping is still too green to merge into the > official release. As far as I know, it has only been dashboard-tested, no > one has tried it out in a real application yet. > > - David > > On Wed, Aug 19, 2015 at 6:03 AM, Guillaume Jacquenot < > guillaume.jacquenot at gmail.com> wrote: > >> Hi everyone, >> >> I was wondering if this merge will be available in VTK 6.3, for which two >> RC have been made. >> It would be great to benefit from this integration in VTK 6.3 >> This would allow to migrate to python 3 now! >> >> Best regards >> Guillaume Jacquenot >> >> Message: 9 >> Date: Mon, 17 Aug 2015 14:10:58 +0200 >> From: Marco Nawijn >> To: David Gobbi >> Cc: VTK Users >> Subject: Re: [vtkusers] [vtk-developers] VTK-py3k is ready for testing >> Message-ID: >> > 911H+VkxjLp+kseeb3wg at mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hello David, >> >> This is great news. I will try to checkout and build the Python 3 bindings >> and will inform >> you if anything unexpected pops up. If somebody can give me some >> instructions on >> what the process is for updating/adding the Python 3 version of the >> examples, I will be >> glad to take some of the workload on this. >> >> Kind regards, >> >> Marco >> >> >> On Wed, Aug 12, 2015 at 9:27 PM, David Gobbi >> wrote: >> >> > More news about Python 3 support: >> > >> > This morning I merged in all of the fixes that Andrew did for the VTK >> > tests so that they run under Python 3 (thanks to Ben for running and >> > maintaining the dashboard machine). We're confident now that VTK will >> run >> > properly with Python 3. >> > >> > None of the python examples have been converted to Python 3 yet, so >> > there's still work to be done (and I'm on vacation until the middle of >> next >> > week, so I won't be touching any of the code for a little while). >> > >> > - David >> > > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Wed Aug 19 21:04:56 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 19 Aug 2015 21:04:56 -0400 Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing In-Reply-To: References: Message-ID: <20150820010456.GC30023@bronto-burt.dev.benboeckel.net> On Wed, Aug 19, 2015 at 06:47:14 -0600, David Gobbi wrote: > If people are interested, I could maintain a branch for this > (vtk-6.3+py3k), but the new wrapping is still too green to merge into the > official release. As far as I know, it has only been dashboard-tested, no > one has tried it out in a real application yet. Keep an eye out here: https://github.com/enthought/mayavi/issues/84 There are other related issues it seems too. --Ben From ben.boeckel at kitware.com Wed Aug 19 21:06:29 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 19 Aug 2015 21:06:29 -0400 Subject: [vtkusers] DICOM VIEWER In-Reply-To: <1439999397699-5733564.post@n5.nabble.com> References: <1439762252674-5733518.post@n5.nabble.com> <1439999397699-5733564.post@n5.nabble.com> Message-ID: <20150820010629.GD30023@bronto-burt.dev.benboeckel.net> On Wed, Aug 19, 2015 at 08:49:57 -0700, erpupones wrote: > Thanks for the answer Waldo, > I have another question: i have to use MSVC 2013 to compile the only > examples or the vtk sources too? > And which version of MVSC 2103 i have to install? We test on our dashboards with VS 2013 Community Edition. We support/test back to VS 2008 (VS9). All of VTK needs to be built with the same version of the compiler. --Ben From dan.lipsa at kitware.com Wed Aug 19 22:43:37 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 19 Aug 2015 22:43:37 -0400 Subject: [vtkusers] vtkAppendPolydata - wrong extents on multiple inputs In-Reply-To: References: Message-ID: Hi Nigel, Indeed this is a bug in vtkAppendPolyData. I'll have a fix merged in soon: http://www.vtk.org/Bug/view.php?id=15662 Dan On Fri, Aug 7, 2015 at 2:14 PM, Dan Lipsa wrote: > Nigel, > I don't see anything wrong in your script. Do you mind sharing your data > so that I can debug this? > > On Fri, Aug 7, 2015 at 7:48 AM Nigel Mcfarlane > wrote: > >> Dear Dan, >> >> I?m sorry, but I was too hasty in declaring that my problem was fixed ? >> removing my AddScalars filter did not help after all, and neither did >> replacing it with vtkPolyDataNormals. I have now stripped down the code to >> its simplest configuration. The resulting scene has isosurfaces which are >> mispositioned and broken in a manner consistent with the images being read >> with the wrong dimensions. Furthermore, if the readers are not manually >> updated, the program crashes. >> >> >> >> There is also an error message: >> >> ERROR: In >> C:\VTK\VTK-6.2.0\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx, >> line 857 >> >> vtkCompositeDataPipeline (0132A818): The update extent specified in the >> information for output port 0 on algorithm vtkMetaImageReader(01321E58) is >> 0 67 0 72 0 9, which is outside the whole extent 0 69 0 58 0 10. >> >> >> >> The results are ok if only one image is fed to appendPD. If I update the >> dmcubes[i] manually, the results are also ok. >> >> >> >> It looks as if the base of the pipeline only remembers one set of >> extents, which it then demands incorrectly from all the inputs. Have I >> missed anything important in the code below? >> >> >> >> // Set filenames >> >> *std*::*string* dirname = CHICVIS"/ForthLungCropped20150703"; >> >> *std*::*string* fname[3]; >> >> fname[0] = dirname + "/2505ct/Tumor1Big/lesion2505-1mm.mhd"; >> >> fname[1] = dirname + "/3108ct/Tumor1Big/lesion3108-1mm.mhd"; >> >> fname[2] = dirname + "/170957ct/Tumor1Big/lesion1709-1mm.mhd"; >> >> >> >> // Create array of image readers >> >> vtkMetaImageReader **reader; >> >> reader = new (vtkMetaImageReader *[3]); >> >> for (int i = 0; i < 3; i++) >> >> reader[i] = vtkMetaImageReader::New(); >> >> >> >> for (int i = 0; i < 3; i++){ >> >> reader[i]->SetFileName(fname[i].*c_str*()); >> >> reader[i]->Update(); >> >> } >> >> >> >> >> >> // ----------------------- >> >> // Create the VTK pipeline >> >> // >> >> // image0 image1 image2 >> >> // dmcubes0 dmcubes1 dmcubes2 >> >> // \ | / >> >> // vtkAppendPolyData >> >> // mapper/actor >> >> // renderer >> >> // ----------------------- >> >> vtkDiscreteMarchingCubes **dmcubes; >> >> dmcubes = new (vtkDiscreteMarchingCubes *[3]); >> >> for (int i = 0; i < 3; i++){ >> >> dmcubes[i] = vtkDiscreteMarchingCubes::New(); >> >> dmcubes[i]->SetInputConnection(reader[i]->GetOutputPort()); >> >> dmcubes[i]->SetNumberOfContours(1); >> >> dmcubes[i]->SetComputeGradients(0); >> >> dmcubes[i]->SetComputeScalars(0); >> >> dmcubes[i]->SetComputeNormals(1); >> >> dmcubes[i]->SetValue(i, 255); >> >> } >> >> >> >> vtkAppendPolyData *appendPD = vtkAppendPolyData::New(); >> >> for (int i = 0; i < 3; i++) >> >> appendPD->AddInputConnection(dmcubes[i]->GetOutputPort()); >> >> >> >> vtkPolyDataMapper *mapper = vtkPolyDataMapper::New(); >> >> mapper = vtkPolyDataMapper::New(); >> >> mapper->SetInputConnection(appendPD->GetOutputPort()); >> >> >> >> vtkActor *actor = vtkActor::New(); >> >> actor->SetMapper(mapper); >> >> >> >> Renderer->AddActor(actor); >> >> >> >> // ------------------------------- >> >> // Reset the camera and initialize >> >> // ------------------------------- >> >> Renderer->ResetCamera(); >> >> RWI->Initialize(); >> >> RWI->Start(); >> >> >> >> >> >> >> >> Thank you >> >> Nigel McFarlane >> >> University of Bedfordshire UK >> >> >> >> >> >> >> >> >> >> *From:* Dan Lipsa [mailto:dan.lipsa at kitware.com] >> *Sent:* 06 August 2015 22:21 >> *To:* Nigel Mcfarlane ; vtkusers at vtk.org >> *Subject:* Re: [vtkusers] vtkAppendPolydata - wrong extents on multiple >> inputs >> >> >> >> > This request is propagated upstream and stops if a filter has its >> inputs older than its output. >> >> I meant downstream. It has to check all filters as their properties might >> change which will affect the final result. >> >> >> >> On Thu, Aug 6, 2015 at 5:12 PM Dan Lipsa wrote: >> >> Nigel, >> >> The pipeline executive compares the modification time ( >> vtkObject::GetMTime()) for the output of a filter against each of its >> inputs. If any of the inputs is newer, the filter is updated. It may be >> that your filter does not update the time of its output properly. This >> request is propagated upstream and stops if a filter has its inputs older >> than its output. I would setup a breakpoint and look at the first update >> for your filters. >> >> >> >> On Thu, Aug 6, 2015 at 9:20 AM Nigel Mcfarlane < >> Nigel.Mcfarlane at beds.ac.uk> wrote: >> >> Dear vtkusers, >> >> >> >> I am creating a visual pipe in vtk 6.2.0 and I am having problems >> connecting vtkAppendPolyData to multiple inputs which start from images of >> different dimensions. The visual pipe converts a set of input images into >> isosurfaces, adds scalars for colour and transparency, then merges them >> into one polydata mesh so they can be depth sorted before rendering. Its >> structure looks like this: >> >> >> >> // >> >> // image1 image2 image3 >> >> // | | | >> >> // DMCubes1 DMCubes2 DMCubes3 >> >> // | | | >> >> // AddScalars1 AddScalars2 AddScalars3 >> >> // \ | / >> >> // \ | / >> >> // \ | / >> >> // vtkAppendPolyData >> >> // | >> >> // vtkDepthSortPolyData >> >> // | >> >> // Mapper/Actor >> >> // | >> >> // Renderer >> >> // >> >> >> >> The images are produced by vtkMetaImageReader, the ?DMCubes? filters are >> vtkDiscreteMarchingCubes, and the?AddScalars? filters are my own code. >> >> >> >> The problem is that this produces an image in which the >> dimensions/extents of two of the images have clearly been set incorrectly. >> I don?t know much about the way the vtk pipeline works, but I suppose that >> an information request for the extents of the images travels up and back >> down the pipeline, so the extents get set to that of the last input, and >> then applied to all the inputs. The problem disappears if the input >> branches are first independently updated by calling a manual Update() on >> each of the AddScalars filters, but it returns if one of the DMCubes >> filters is modified, which triggers another general update cycle. >> >> >> >> Is there any way to set up this pipeline so that it does not require a >> manual update when the image inputs are modified? >> >> >> >> Nigel McFarlane >> >> University of Bedfordshire >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Thu Aug 20 06:28:48 2015 From: juch at zhaw.ch (normanius) Date: Thu, 20 Aug 2015 03:28:48 -0700 (MST) Subject: [vtkusers] How to filter poly data while preserving point data arrays? Message-ID: <1440066528287-5733572.post@n5.nabble.com> Hi everyone. I use vtkCurvatures to measure the average curvature of irregular dome-like surfaces (domeSurface). Because of numerical problems close to the edge of the dome, I would like to filter away the points close to the edge of the dome. See attached image: the edge is indicated by a red line, the blue color indicates the excessively high curvature values close to the edge, which I want to get rid of. The edge is created by a planar cut and I do have a triangulated representation of the "missing" face of the dome: cutFace. My approach is to use vtkBooleanOperationPolyDataFilter to calculate the difference between domeCurvature and cutFace - however, this way I loose the point data arrays that contain the curvature information of the surface. This is roughly the processing pipeline: domeSurface -> *curvatureFilter* -> domeCurvature -> *booleanOperationFilter*(intersect with cutFace) -> domeCurvatureWithoutPointsCloseToEdge The problem: while data1 exists, data2 does not exist after the boolean operation. data1 = curvatureFilter.GetOutput().GetPointData().GetArray("Mean_Cuvature") data2 = domeCurvatureWithoutPointsCloseToEdge.GetOutput().GetPointData().GetArray("Mean_Cuvature") *So here is my question*: How can I get rid of the points close to the edge while preserving the curvature data retrieved by the curvature filter? Thank you for any suggestions! -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-filter-poly-data-while-preserving-point-data-arrays-tp5733572.html Sent from the VTK - Users mailing list archive at Nabble.com. From jose.de.paula at live.com Thu Aug 20 08:21:14 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Thu, 20 Aug 2015 05:21:14 -0700 (MST) Subject: [vtkusers] vtkUnicodeString::from_utf8(): not a valid UTF-8 string. In-Reply-To: References: <1439918140298-5733543.post@n5.nabble.com> <1439932680666-5733548.post@n5.nabble.com> <1439990332537-5733560.post@n5.nabble.com> Message-ID: <1440073274904-5733573.post@n5.nabble.com> David, thank you for the method is really useful for me. You already have done something for the reverse? Takes back the latin and convert to utf-8? -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkUnicodeString-from-utf8-not-a-valid-UTF-8-string-tp5733543p5733573.html Sent from the VTK - Users mailing list archive at Nabble.com. From al221 at hotmail.it Thu Aug 20 08:48:23 2015 From: al221 at hotmail.it (erpupones) Date: Thu, 20 Aug 2015 05:48:23 -0700 (MST) Subject: [vtkusers] DICOM VIEWER In-Reply-To: References: <1439762252674-5733518.post@n5.nabble.com> Message-ID: <1440074903324-5733574.post@n5.nabble.com> Hello, I compiled both examples with VS 2013 Professional and i have installed qt 5.4.1 (for MSVC 2013, openGL). The first example doesn't work, the second yes. This is my build directory of ReadDICOMSeries: I have another question: how can i combine the 2 examples? Thank you very much for your availability, cheers, Alberto -- View this message in context: http://vtk.1045678.n5.nabble.com/DICOM-VIEWER-tp5733518p5733574.html Sent from the VTK - Users mailing list archive at Nabble.com. From naim.13 at gmail.com Thu Aug 20 09:47:54 2015 From: naim.13 at gmail.com (naimulkhan) Date: Thu, 20 Aug 2015 06:47:54 -0700 (MST) Subject: [vtkusers] Question on manual configuration of VTK camera In-Reply-To: References: <1323364639368-5059478.post@n5.nabble.com> <1323421666416-5061173.post@n5.nabble.com> Message-ID: <1440078474126-5733575.post@n5.nabble.com> hi David, I am in the same boat as the opener of this thread. I am trying to use an external tracker (NDI Aurora) to control the vtkCamera (basically "look through" the position and orientation of the tracker). I can set the position through vtkCamera::SetPosition() easily, but I am not sure what parameters SetViewUp() and SetFocusPoint() should be called with. Any help would be greatly appreciated, thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Question-on-manual-configuration-of-VTK-camera-tp5059478p5733575.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Aug 20 11:34:45 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 20 Aug 2015 09:34:45 -0600 Subject: [vtkusers] vtkUnicodeString::from_utf8(): not a valid UTF-8 string. In-Reply-To: <1440073274904-5733573.post@n5.nabble.com> References: <1439918140298-5733543.post@n5.nabble.com> <1439932680666-5733548.post@n5.nabble.com> <1439990332537-5733560.post@n5.nabble.com> <1440073274904-5733573.post@n5.nabble.com> Message-ID: Hi Jose, You might have mis-typed, the function that I provided already takes latin1 and converts to utf-8. I don't have a function that does the reverse, but the operation is straightforward: convert the utf-8 to unicode, and then truncate the unicode to 8 bits, throwing away or replacing any values that don't fit into 8 bits. - David On Thu, Aug 20, 2015 at 6:21 AM, Jose Barreto wrote: > David, thank you for the method is really useful for me. > You already have done something for the reverse? > Takes back the latin and convert to utf-8? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkUnicodeString-from-utf8-not-a-valid-UTF-8-string-tp5733543p5733573.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Aug 20 11:55:38 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 20 Aug 2015 09:55:38 -0600 Subject: [vtkusers] Question on manual configuration of VTK camera In-Reply-To: <1440078474126-5733575.post@n5.nabble.com> References: <1323364639368-5059478.post@n5.nabble.com> <1323421666416-5061173.post@n5.nabble.com> <1440078474126-5733575.post@n5.nabble.com> Message-ID: On Thu, Aug 20, 2015 at 7:47 AM, naimulkhan wrote: > hi David, > > I am in the same boat as the opener of this thread. I am trying to use an > external tracker (NDI Aurora) to control the vtkCamera (basically "look > through" the position and orientation of the tracker). I can set the > position through vtkCamera::SetPosition() easily, but I am not sure what > parameters SetViewUp() and SetFocusPoint() should be called with. Any help > would be greatly appreciated, thanks! > Consider: any frame of reference can be described by a point and two unit vectors. The "point" is easy, it's the camera's Position. The first unit vector that we will use is the camera's local Z axis, which points _away_ from the focal point, i.e. it points out the back of the camera. In other words, its direction is from the FocalPoint to the Position. The second unit vector that we will use is the camera's local Y axis. This is just the ViewUp direction. I advise taking a look at Figure 3.9 on this web page: http://www.glprogramming.com/red/chapter03.html So, let's say that you have a vtkTransform that describes where you want to place the camera. How can you get the position and the two vectors? Easy, just apply the transform to the origin, to a unit z vector, and to a unit y vector: double pos[3] = { 0.0, 0.0, 0.0 }; double zvec[3] = { 0.0, 0.0, 1.0 }; double yvec[3] = { 0.0, 1.0, 0.0 }; transform->TransformPoint(pos, pos); transform->TransformVector(zvec, zvec); transform->TransformVector(yvec, yvec); That's as far as I'll go, you should be able to figure out the math for computing the FocalPoint from the Position, the zvec, and the Distance from the camera to the object it is looking at. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From siavashk at ece.ubc.ca Thu Aug 20 13:34:30 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Thu, 20 Aug 2015 10:34:30 -0700 (MST) Subject: [vtkusers] Stitching two vtkImageData together Message-ID: <1440092070574-5733579.post@n5.nabble.com> Hello, I have two vtkImageData objects that I would like to stitch together efficiently in terms of computation time. The images look like this: Is there an easy way to this in VTK? I know that this is simple to do with itkResampleFilter and (possibly) vtkImageReslice. I would like to eventually stitch more complicated images, such as the following: Thanks, Siavash -- View this message in context: http://vtk.1045678.n5.nabble.com/Stitching-two-vtkImageData-together-tp5733579.html Sent from the VTK - Users mailing list archive at Nabble.com. From waldo.valenzuela at hotmail.com Thu Aug 20 13:39:45 2015 From: waldo.valenzuela at hotmail.com (Waldo Valenzuela) Date: Thu, 20 Aug 2015 19:39:45 +0200 Subject: [vtkusers] DICOM VIEWER In-Reply-To: References: <1439762252674-5733518.post@n5.nabble.com> <1439999397699-5733564.post@n5.nabble.com> Message-ID: Hi john, Good news, if you have other problem, just ask. Cheers, Waldo. On 19 Aug 2015, at 18:46, John Drescher wrote: >> Thanks for the answer Waldo, >> I have another question: i have to use MSVC 2013 to compile the only >> examples or the vtk sources too? >> And which version of MVSC 2103 i have to install? > > I did not have any problem compiling vtk-6.2 with Visual Studio 2013 > Pro. I believed I used cmake-3.3.0 to generate the solution. > > John > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From kimtran1208 at gmail.com Fri Aug 21 04:30:41 2015 From: kimtran1208 at gmail.com (KIM TRAN DONG) Date: Fri, 21 Aug 2015 10:30:41 +0200 Subject: [vtkusers] No module named vtk when installing mayavi Message-ID: Dear VTK users, I'm using Mac 10.9 Maverick on vmware 11, and I want to install VTK for Mayavi, so I download vtk from source and build with Cmake Gui with these options: BUILD_DOCUMENTATION:BOOL=OFF BUILD_EXAMPLES:BOOL=OFF BUILD_SHARED_LIBS:BOOL=ON BUILD_TESTING:BOOL=OFF Module_AutobahnPython:BOOL=ON Module_SixPythonMBOOL=ON Module_vtkPython:BOOL=ON Module_vtkPythonInterpreter:BOOL=ON VTK_WRAP_PYTHON:BOOL=ON VTK_WRAP_TCL:BOOL=ON I set path in .bash_profile like this: export LD_LIBRARY_PATH=/usr/local/VTKBuild/lib:${LD_LIBRARY_PATH} export DYLD_LIBRARY_PATH=/usr/local/VTKBuild/lib:${DYLD_LIBRARY_PATH} export PYTHONPATH=/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:$PYTHONPATH export PATH=/usr/local/VTKBuild/bin:$PATH Everything seems ok: $vtkpython vtk version 6.3.0 Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from vtk import * >>> vtk >>> But when I install mayavi-4.4.3, I get this error (entier message in attached file): .... File "tvtk/code_gen.py", line 10, in import vtk ImportError: No module named vtk I also get this message when typing 'import vtkpython' in python: $ python Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import vtkpython Traceback (most recent call last): File "", line 1, in ImportError: No module named vtkpython By the way, I have this lines when I open a terminal, I don't know if it has any effects on the bash?: -bash: Desktop: command not found -bash: Desktop: command not found -bash: Desktop: command not found -bash: Desktop: command not found -bash: Desktop: command not found I've searched in many forum but I didn't find the solution. Does anyone know how to fix it, any help would be greatly appreciated? Thank you very much, Kim -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- $ sudo python setup.py install running install Checking .pth file support in /Library/Python/2.7/site-packages /usr/bin/python -E -c pass TEST PASSED: /Library/Python/2.7/site-packages appears to support .pth files running bdist_egg running egg_info running build_src build_src building extension "tvtk.array_ext" sources building data_files sources build_src: building npy-pkg config files writing requirements to mayavi.egg-info/requires.txt writing mayavi.egg-info/PKG-INFO writing top-level names to mayavi.egg-info/top_level.txt writing dependency_links to mayavi.egg-info/dependency_links.txt writing entry points to mayavi.egg-info/entry_points.txt reading manifest file 'mayavi.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'docs/build' no previously-included directories found matching 'docs/pdf' writing manifest file 'mayavi.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.9-intel/egg running install_lib running build_py running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext running scons creating stub loader for tvtk/array_ext.so byte-compiling build/bdist.macosx-10.9-intel/egg/tvtk/array_ext.py to array_ext.pyc installing package data to build/bdist.macosx-10.9-intel/egg running install_data Traceback (most recent call last): File "setup.py", line 471, in **config File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/core.py", line 186, in setup return old_setup(**new_attr) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/command/install.py", line 57, in run r = self.setuptools_run() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/distutils/command/install.py", line 51, in setuptools_run self.do_egg_install() File "build/bdist.macosx-10.9-intel/egg/setuptools/command/install.py", line 109, in do_egg_install File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "build/bdist.macosx-10.9-intel/egg/setuptools/command/bdist_egg.py", line 180, in run File "build/bdist.macosx-10.9-intel/egg/setuptools/command/bdist_egg.py", line 132, in do_install_data File "build/bdist.macosx-10.9-intel/egg/setuptools/command/bdist_egg.py", line 146, in call_command File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 356, in run build_tvtk_classes_zip() File "setup.py", line 290, in build_tvtk_classes_zip gen_tvtk_classes_zip() File "tvtk/setup.py", line 46, in gen_tvtk_classes_zip from code_gen import TVTKGenerator File "tvtk/code_gen.py", line 10, in import vtk ImportError: No module named vtk From al221 at hotmail.it Fri Aug 21 08:49:56 2015 From: al221 at hotmail.it (erpupones) Date: Fri, 21 Aug 2015 05:49:56 -0700 (MST) Subject: [vtkusers] DICOM VIEWER In-Reply-To: References: <1439762252674-5733518.post@n5.nabble.com> <1439999397699-5733564.post@n5.nabble.com> Message-ID: <1440161396853-5733584.post@n5.nabble.com> Can you show me why the readDICOMSeries example doesn't work? I have illustrated details in the another post. Thank you. -- View this message in context: http://vtk.1045678.n5.nabble.com/DICOM-VIEWER-tp5733518p5733584.html Sent from the VTK - Users mailing list archive at Nabble.com. From laurajulia.pascal at gmail.com Fri Aug 21 10:04:05 2015 From: laurajulia.pascal at gmail.com (Laura Pascal) Date: Fri, 21 Aug 2015 10:04:05 -0400 Subject: [vtkusers] Problem with VTK and openGL Message-ID: Hello everyone, I have downloaded the module ShapePopulationViewer (in this github https://github.com/NIRALUser/ShapePopulationViewer). I'm using VTK-6.2.0 and a Mac OS X 10.9.5. When I load a .vtk file, I have this four errors repeated many times : 2015-08-20 15:15:32.215 ShapePopulationViewer[60946:507] invalid drawable 2015-08-20 15:15:32.216 ShapePopulationViewer[60946:507] invalid drawable ERROR: In /Users/lpascal/Applications/VTK/VTK-6.2.0/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 1202 vtkOpenGLRenderer (0x7fad1ae79800): failed after Clear 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /Users/lpascal/Applications/VTK/VTK-6.2.0/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0x7fad1ae5d8d0): failed after RenderInternal 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /Users/lpascal/Applications/VTK/VTK-6.2.0/Rendering/FreeTypeOpenGL/vtkOpenGLFreeTypeTextMapper.cxx, line 543 vtkOpenGLFreeTypeTextMapper (0x7fad1aeab110): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /Users/lpascal/Applications/VTK/VTK-6.2.0/Rendering/OpenGL/vtkOpenGLPolyDataMapper2D.cxx, line 442 vtkOpenGLPolyDataMapper2D (0x7fad1aebe6a0): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation I don't find the solution and I've searched in many forum but I didn't find nothing. Does anyone know how to fix it ? I would be very grateful for any help, Thank you very much in advance, Laura -------------- next part -------------- An HTML attachment was scrubbed... URL: From laurajulia.pascal at gmail.com Fri Aug 21 10:30:19 2015 From: laurajulia.pascal at gmail.com (Laura Pascal) Date: Fri, 21 Aug 2015 10:30:19 -0400 Subject: [vtkusers] Problem with VTK and openGL In-Reply-To: References: Message-ID: Hi again, To be more specific the error appears when I use the following VTK object: ' vtkCornerAnnotation' vtkSmartPointer fileName = vtkSmartPointer::New(); fileName->SetLinearFontScaleFactor( 2 ); fileName->SetNonlinearFontScaleFactor( 1 ); fileName->SetMaximumFontSize( 15 ); fileName->SetText( 2, Mesh->GetFileName().c_str()); fileName->GetTextProperty()->SetColor(m_labelColor); renderer->AddViewProp(fileName); In the console: ERROR: In /Users/lpascal/Applications/VTK/VTK-6.2.0/Rendering/ FreeTypeOpenGL/vtkOpenGLFreeTypeTextMapper.cxx, line 543 vtkOpenGLFreeTypeTextMapper (0x7fad1aeab110): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation Laura 2015-08-21 10:04 GMT-04:00 Laura Pascal : > Hello everyone, > > I have downloaded the module ShapePopulationViewer (in this github > https://github.com/NIRALUser/ShapePopulationViewer). I'm using VTK-6.2.0 > and a Mac OS X 10.9.5. > > When I load a .vtk file, I have this four errors repeated many times : > > > 2015-08-20 15:15:32.215 ShapePopulationViewer[60946:507] invalid drawable > > 2015-08-20 15:15:32.216 ShapePopulationViewer[60946:507] invalid drawable > > ERROR: In > /Users/lpascal/Applications/VTK/VTK-6.2.0/Rendering/OpenGL/vtkOpenGLRenderer.cxx, > line 1202 > > vtkOpenGLRenderer (0x7fad1ae79800): failed after Clear 1 OpenGL errors > detected > > 0 : (1286) Invalid framebuffer operation > > > ERROR: In > /Users/lpascal/Applications/VTK/VTK-6.2.0/Rendering/OpenGL/vtkOpenGLDisplayListPainter.cxx, > line 188 > > vtkOpenGLDisplayListPainter (0x7fad1ae5d8d0): failed after RenderInternal > 1 OpenGL errors detected > > 0 : (1286) Invalid framebuffer operation > > > ERROR: In > /Users/lpascal/Applications/VTK/VTK-6.2.0/Rendering/FreeTypeOpenGL/vtkOpenGLFreeTypeTextMapper.cxx, > line 543 > > vtkOpenGLFreeTypeTextMapper (0x7fad1aeab110): failed after RenderOverlay 1 > OpenGL errors detected > > 0 : (1286) Invalid framebuffer operation > > > ERROR: In > /Users/lpascal/Applications/VTK/VTK-6.2.0/Rendering/OpenGL/vtkOpenGLPolyDataMapper2D.cxx, > line 442 > > vtkOpenGLPolyDataMapper2D (0x7fad1aebe6a0): failed after RenderOverlay 1 > OpenGL errors detected > > 0 : (1286) Invalid framebuffer operation > > > > I don't find the solution and I've searched in many forum but I didn't > find nothing. Does anyone know how to fix it ? > > I would be very grateful for any help, > > Thank you very much in advance, > > Laura > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Fri Aug 21 11:45:55 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 21 Aug 2015 11:45:55 -0400 Subject: [vtkusers] No module named vtk when installing mayavi In-Reply-To: References: Message-ID: <20150821154555.GA16687@megas.kitware.com> On Fri, Aug 21, 2015 at 10:30:41 +0200, KIM TRAN DONG wrote: > I'm using Mac 10.9 Maverick on vmware 11, and I want to install VTK for ... > I set path in .bash_profile like this: > export LD_LIBRARY_PATH=/usr/local/VTKBuild/lib:${LD_LIBRARY_PATH} Only makes sense on Linux, so you don't need this. > export > PYTHONPATH=/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:$PYTHONPATH This looks wrong (or at least incomplete). The Wrapping/Python directory is where the sources for the wrappers get created. > export PATH=/usr/local/VTKBuild/bin:$PATH > > Everything seems ok: > > $vtkpython > vtk version 6.3.0 > Python 2.7.5 (default, Mar 9 2014, 22:15:05) > [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> from vtk import * > >>> vtk > > >>> Try inspecting sys.path from vtkpython. I suspect there is another directory you are missing in your PYTHONPATH. > But when I install mayavi-4.4.3, I get this error (entier message in > attached file): > .... > File "tvtk/code_gen.py", line 10, in > import vtk > ImportError: No module named vtk > > I also get this message when typing 'import vtkpython' in python: > > $ python > Python 2.7.5 (default, Mar 9 2014, 22:15:05) > [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import vtkpython > Traceback (most recent call last): > File "", line 1, in > ImportError: No module named vtkpython The module is 'vtk', not 'vtkpython'. > By the way, I have this lines when I open a terminal, I don't know if it > has any effects on the bash?: > -bash: Desktop: command not found > -bash: Desktop: command not found > -bash: Desktop: command not found > -bash: Desktop: command not found > -bash: Desktop: command not found You probably have a space in your path? Hard to tell where this is coming from. Try running `bash -x` to see what the command line causing this is. That should make it easier to find. --Ben From ben.boeckel at kitware.com Fri Aug 21 12:39:42 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 21 Aug 2015 12:39:42 -0400 Subject: [vtkusers] No module named vtk when installing mayavi In-Reply-To: References: <20150821154555.GA16687@megas.kitware.com> Message-ID: <20150821163942.GA12876@megas.kitware.com> [ Please keep the list CC'd. ] On Fri, Aug 21, 2015 at 18:29:19 +0200, KIM TRAN DONG wrote: > Thank you for your reply, but how can I inspect sys.path from vtkpython? I > tried changing the pythonpath into: import sys sys.path > I searched in .bash_profile, but didn't find space letter in the path. When > I called `bash -x`, the terminal returned just `bash-3.2$ `. Could you give > me any suggests? You could try putting `set -x` at the top of .bash_profile then. --Ben From ke.manjunath at gmail.com Fri Aug 21 13:09:41 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Fri, 21 Aug 2015 22:39:41 +0530 Subject: [vtkusers] QVTKWidget2(), vtkQtPython, QVTKPython import error Message-ID: Hi I am trying to install vtk, qt and python bindings for them. I have used the following commands for the same. sudo apt-get install libvtk5.8-qt4 libvtk5-qt4-dev libvtk5-dev libvtk5.8 python-qt4 python-vtk qt4-designer pyqt4-dev-tools python-qt4-gl libqt4-opengl libqt4-assistant But, When I run a program containing call to QVTKWidget2(), I get an error saying "AttributeError: 'module' object has no attribute 'QVTKWidget2'" Also, If I run "import vtk.qvtk", I get an error saying *vtkQtPython* and *QVTKPython* modules not found. Could, anyone send me a example for designing a PyQt4 program using qt designer (.ui file) and vtk embeddings into it. Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From ke.manjunath at gmail.com Fri Aug 21 13:19:24 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Fri, 21 Aug 2015 22:49:24 +0530 Subject: [vtkusers] Unable to see canvas of VTKRender window on a GUI designed using PyQt4 Message-ID: Hi I have installed vtk, at, pyqt, python vtk using below commands. sudo apt-get install libvtk5.8-qt4 libvtk5-qt4-dev libvtk5-dev libvtk5.8 python-qt4 python-vtk qt4-designer pyqt4-dev-tools python-qt4-gl libqt4-opengl libqt4-assistant I have a following program. The sample.py is generated from sample.ui (which is desinged using qt4designer) using pyuic4 command. =================sample.py=============== from PyQt4 import QtCore, QtGui from vtk.qt4 import * from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor from vtk import * try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(626, 320) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.toolButton = QtGui.QToolButton(self.centralwidget) self.toolButton.setGeometry(QtCore.QRect(30, 10, 51, 25)) self.toolButton.setObjectName(_fromUtf8("toolButton")) self.qvtkWidget = QVTKRenderWindowInteractor(self.centralwidget) self.qvtkWidget.setGeometry(QtCore.QRect(9, 60, 161, 181)) self.qvtkWidget.setObjectName(_fromUtf8("qvtkWidget")) self.radioButton = QtGui.QRadioButton(self.centralwidget) self.radioButton.setGeometry(QtCore.QRect(280, 20, 116, 22)) self.radioButton.setObjectName(_fromUtf8("radioButton")) self.toolButton_2 = QtGui.QToolButton(self.centralwidget) self.toolButton_2.setGeometry(QtCore.QRect(290, 80, 23, 25)) self.toolButton_2.setObjectName(_fromUtf8("toolButton_2")) self.pushButton = QtGui.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(290, 150, 98, 27)) self.pushButton.setObjectName(_fromUtf8("pushButton")) self.line = QtGui.QFrame(self.centralwidget) self.line.setGeometry(QtCore.QRect(300, 210, 281, 16)) self.line.setFrameShape(QtGui.QFrame.HLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setObjectName(_fromUtf8("line")) self.line_2 = QtGui.QFrame(self.centralwidget) self.line_2.setGeometry(QtCore.QRect(393, 80, 20, 121)) self.line_2.setFrameShape(QtGui.QFrame.VLine) self.line_2.setFrameShadow(QtGui.QFrame.Sunken) self.line_2.setObjectName(_fromUtf8("line_2")) self.horizontalLayoutWidget = QtGui.QWidget(self.centralwidget) self.horizontalLayoutWidget.setGeometry(QtCore.QRect(430, 50, 160, 80)) self.horizontalLayoutWidget.setObjectName(_fromUtf8("horizontalLayoutWidget")) self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget) self.horizontalLayout.setMargin(0) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 626, 25)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuFile = QtGui.QMenu(self.menubar) self.menuFile.setObjectName(_fromUtf8("menuFile")) self.menuEdit = QtGui.QMenu(self.menubar) self.menuHelp.setObjectName(_fromUtf8("menuHelp")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.actionOpen = QtGui.QAction(MainWindow) self.actionOpen.setObjectName(_fromUtf8("actionOpen")) self.actionAbout_IncoisVis = QtGui.QAction(MainWindow) self.actionAbout_IncoisVis.setObjectName(_fromUtf8("actionAbout_IncoisVis")) self.actionSave = QtGui.QAction(MainWindow) self.actionSave.setObjectName(_fromUtf8("actionSave")) self.actionSave_As = QtGui.QAction(MainWindow) self.actionSave_As.setObjectName(_fromUtf8("actionSave_As")) self.actionAnimate = QtGui.QAction(MainWindow) self.actionAnimate.setObjectName(_fromUtf8("actionAnimate")) self.menuFile.addAction(self.actionOpen) self.menuFile.addAction(self.actionSave) self.menuFile.addAction(self.actionSave_As) self.menuFile.addAction(self.actionAnimate) self.menuHelp.addAction(self.actionAbout_IncoisVis) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuEdit.menuAction()) self.menubar.addAction(self.menuHelp.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) self.toolButton.setText(QtGui.QApplication.translate("MainWindow", "...", None, QtGui.QApplication.UnicodeUTF8)) self.radioButton.setText(QtGui.QApplication.translate("MainWindow", "RadioButton", None, QtGui.QApplication.UnicodeUTF8)) self.toolButton_2.setText(QtGui.QApplication.translate("MainWindow", "...", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton.setText(QtGui.QApplication.translate("MainWindow", "PushButton", None, QtGui.QApplication.UnicodeUTF8)) self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8)) self.menuEdit.setTitle(QtGui.QApplication.translate("MainWindow", "Edit", None, QtGui.QApplication.UnicodeUTF8)) self.menuHelp.setTitle(QtGui.QApplication.translate("MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8)) self.actionOpen.setText(QtGui.QApplication.translate("MainWindow", "Open", None, QtGui.QApplication.UnicodeUTF8)) self.actionAbout_IncoisVis.setText(QtGui.QApplication.translate("MainWindow", "About IncoisVis", None, QtGui.QApplication.UnicodeUTF8)) self.actionSave.setText(QtGui.QApplication.translate("MainWindow", "Save", None, QtGui.QApplication.UnicodeUTF8)) self.actionSave_As.setText(QtGui.QApplication.translate("MainWindow", "Save As", None, QtGui.QApplication.UnicodeUTF8)) self.actionAnimate.setText(QtGui.QApplication.translate("MainWindow", "Animate", None, QtGui.QApplication.UnicodeUTF8)) ================================================== ================prog.py====================== import sys from PyQt4 import * import os import platform import stat import sys from PyQt4.QtCore import * from PyQt4.QtGui import * import sample class MainWindow(QMainWindow, sample.Ui_MainWindow): def __init__(self, parent=None): super(MainWindow, self).__init__(parent) self.setupUi(self) if __name__ == '__main__': app = QApplication(sys.argv) form = MainWindow() form.show() sys.exit(app.exec_()) ============================================== To Run : *python ./prog.py * I get the output gui, but in that GUI the canvas related to VTK render Window is not appearing. Could you please any1 help me. Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Fri Aug 21 16:26:36 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 21 Aug 2015 16:26:36 -0400 Subject: [vtkusers] Stitching two vtkImageData together In-Reply-To: <1440092070574-5733579.post@n5.nabble.com> References: <1440092070574-5733579.post@n5.nabble.com> Message-ID: vtkImageAppend seems to be what you need. On Thu, Aug 20, 2015 at 1:34 PM, Siavash Khallaghi wrote: > Hello, > > I have two vtkImageData objects that I would like to stitch together > efficiently in terms of computation time. The images look like this: > > Is there an easy way to this in VTK? I know that this is simple to do with > itkResampleFilter and (possibly) vtkImageReslice. I would like to > eventually > stitch more complicated images, such as the following: > > > Thanks, > > Siavash > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Stitching-two-vtkImageData-together-tp5733579.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From siavashk at ece.ubc.ca Fri Aug 21 18:28:27 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Fri, 21 Aug 2015 15:28:27 -0700 (MST) Subject: [vtkusers] Stitching two vtkImageData together In-Reply-To: References: <1440092070574-5733579.post@n5.nabble.com> Message-ID: <1440196107831-5733594.post@n5.nabble.com> Thanks, works like a charm. For anyone else who is interested, this is the relevant portion of the code: vtkSmartPointer append = vtkSmartPointer::New(); append->AddInputData(image1); // image1 is of type vtkSmartPointer append->AddInputData(image2); // image2 is of type vtkSmartPointer append->SetAppendAxis(0); //append along x axis append->Update(); -- View this message in context: http://vtk.1045678.n5.nabble.com/Stitching-two-vtkImageData-together-tp5733579p5733594.html Sent from the VTK - Users mailing list archive at Nabble.com. From ke.manjunath at gmail.com Sat Aug 22 13:36:44 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Sat, 22 Aug 2015 23:06:44 +0530 Subject: [vtkusers] ImportError: No module named vtkQtPython Message-ID: Hi All I tried executing "import vtk.qvtk", but I get an error "ImportError: No module named vtkQtPython" I have done installation using the command below : sudo apt-get install libvtk5.8-qt4 libvtk5-qt4-dev libvtk5-dev libvtk5.8 python-qt4 python-vtk qt4-designer pyqt4-dev-tools python-qt4-gl libqt4-opengl libqt4-assistant Could anyone please help me. Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From lilymagic2005 at yahoo.com.hk Sun Aug 23 22:40:45 2015 From: lilymagic2005 at yahoo.com.hk (lilymo) Date: Sun, 23 Aug 2015 19:40:45 -0700 (MST) Subject: [vtkusers] Planar contours to surface? Message-ID: <1440384045749-5733597.post@n5.nabble.com> After using the vtkCutter to create contours from a vtp file, I would like to generate the surface forming by the planes in vtkCutter.( http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/ContoursFromPolyData ) I found this example ( http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ContoursToSurface ), but seems that it only accept contour lines. How should I do? -- View this message in context: http://vtk.1045678.n5.nabble.com/Planar-contours-to-surface-tp5733597.html Sent from the VTK - Users mailing list archive at Nabble.com. From kimtran1208 at gmail.com Mon Aug 24 03:03:32 2015 From: kimtran1208 at gmail.com (KIM TRAN DONG) Date: Mon, 24 Aug 2015 09:03:32 +0200 Subject: [vtkusers] No module named vtk when installing mayavi In-Reply-To: <20150821163942.GA12876@megas.kitware.com> References: <20150821154555.GA16687@megas.kitware.com> <20150821163942.GA12876@megas.kitware.com> Message-ID: Dear Ben, 'sys.path' gives me this: ['', '/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg', '/Library/Python/2.7/site-packages/setuptools-18.1-py2.7.egg', '/Library/Python/2.7/site-packages/cvu-0.5-py2.7.egg', '/Library/Python/2.7/site-packages/traits-4.5.0-py2.7-macosx-10.9-intel.egg', '/Library/Python/2.7/site-packages/traitsui-4.5.1-py2.7.egg', '/Library/Python/2.7/site-packages/pyface-4.5.1-py2.7.egg', '/Library/Python/2.7/site-packages/port-0.3.1-py2.7.egg', '/Library/Python/2.7/site-packages/Whoosh-2.7.0-py2.7.egg', '/Library/Python/2.7/site-packages/PyYAML-3.11-py2.7-macosx-10.9-intel.egg', '/Library/Python/2.7/site-packages/py_gfm-0.1.1-py2.7.egg', '/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg', '/Library/Python/2.7/site-packages/click-4.1-py2.7.egg', '/Library/Python/2.7/site-packages/unittest2-1.1.0-py2.7.egg', '/Library/Python/2.7/site-packages/Markdown-2.6.2-py2.7.egg', '/Library/Python/2.7/site-packages/itsdangerous-0.24-py2.7.egg', '/Library/Python/2.7/site-packages/Jinja2-2.8-py2.7.egg', '/Library/Python/2.7/site-packages/Werkzeug-0.10.4-py2.7.egg', '/Library/Python/2.7/site-packages/traceback2-1.4.0-py2.7.egg', '/Library/Python/2.7/site-packages/six-1.9.0-py2.7.egg', '/Library/Python/2.7/site-packages/argparse-1.3.0-py2.7.egg', '/Library/Python/2.7/site-packages/MarkupSafe-0.23-py2.7-macosx-10.9-intel.egg', '/Library/Python/2.7/site-packages/linecache2-1.0.0-py2.7.egg', '/usr/local/VTKBuild/Wrapping/Python/vtk', '/usr/local/VTKBuild/Wrapping/Python', '/usr/local/VTKBuild/bin', '/usr/local/vtkpython/bin/vtk', '/usr/local/VTKBuild/lib', '/Users/kimtran/Downloads/mayavi-4.4.3', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages'] and for the 'set -x': + source /Users/kimtran/.bash_profile ++ set -x ++ FSLDIR=/usr/fsl ++ . /usr/fsl/etc/fslconf/fsl.sh +++ FSLOUTPUTTYPE=NIFTI_GZ +++ export FSLOUTPUTTYPE +++ FSLMULTIFILEQUIT=TRUE +++ export FSLMULTIFILEQUIT +++ FSLTCLSH=/usr/fsl/bin/fsltclsh +++ FSLWISH=/usr/fsl/bin/fslwish +++ export FSLTCLSH FSLWISH +++ FSLLOCKDIR= +++ FSLMACHINELIST= +++ FSLREMOTECALL= +++ export FSLLOCKDIR FSLMACHINELIST FSLREMOTECALL +++ FSLGECUDAQ=cuda.q +++ export FSLGECUDAQ +++ '[' -f /usr/local/etc/fslconf/fsl.sh ']' +++ '[' -f /etc/fslconf/fsl.sh ']' +++ '[' -f /Users/kimtran/.fslconf/fsl.sh ']' ++ PATH=/usr/fsl/bin:/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++ export FSLDIR PATH ++ export FREESURFER_HOME=/Applications/freesurfer ++ FREESURFER_HOME=/Applications/freesurfer ++ source /Applications/freesurfer/SetUpFreeSurfer.sh +++ '[' -z /Applications/freesurfer ']' +++ '[' -z /Applications/freesurfer/subjects ']' +++ '[' -z /Applications/freesurfer/sessions ']' +++ source /Applications/freesurfer/FreeSurferEnv.sh ++++ VERSION='$Id: FreeSurferEnv.sh,v 1.50.2.2 2011/03/29 22:06:48 greve Exp $' ++++ '[' 0 -gt 1 ']' +++++ uname -s ++++ os=Darwin ++++ export OS=Darwin ++++ OS=Darwin ++++ '[' -n '' ']' ++++ output=1 ++++ [[ -z kimtran ]] ++++ [[ -z \h:\W \u\$ ]] ++++ '[' -z /Applications/freesurfer ']' ++++ '[' '!' -d /Applications/freesurfer ']' ++++ [[ 1 == 1 ]] ++++ '[' -e /Applications/freesurfer/build-stamp.txt ']' +++++ cat /Applications/freesurfer/build-stamp.txt ++++ echo '-------- freesurfer-Darwin-lion-stable-pub-v5.3.0 --------' -------- freesurfer-Darwin-lion-stable-pub-v5.3.0 -------- ++++ echo 'Setting up environment for FreeSurfer/FS-FAST (and FSL)' Setting up environment for FreeSurfer/FS-FAST (and FSL) ++++ '[' 0 -gt 1 ']' ++++ '[' -z /usr/fsl/bin:/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ']' ++++ '[' -z 0 ']' ++++ [[ -z /Applications/freesurfer/fsfast ]] ++++ [[ 0 != 0 ]] ++++ [[ -z /Applications/freesurfer/subjects ]] ++++ [[ 0 != 0 ]] ++++ [[ -z '' ]] ++++ [[ -z /Applications/freesurfer/mni/bin ]] ++++ [[ 0 != 0 ]] ++++ [[ -z '' ]] ++++ [[ -z /Applications/freesurfer/mni/lib ]] ++++ [[ 0 != 0 ]] ++++ [[ -z '' ]] ++++ [[ -z /Applications/freesurfer/mni/data ]] ++++ [[ 0 != 0 ]] ++++ [[ -z /usr/fsl ]] ++++ [[ 0 != 0 ]] ++++ export FREESURFER_HOME=/Applications/freesurfer ++++ FREESURFER_HOME=/Applications/freesurfer ++++ export LOCAL_DIR=/Applications/freesurfer/local ++++ LOCAL_DIR=/Applications/freesurfer/local ++++ for d in '"$FSFAST_HOME"' '"$SUBJECTS_DIR"' ++++ '[' '!' -d /Applications/freesurfer/fsfast ']' ++++ for d in '"$FSFAST_HOME"' '"$SUBJECTS_DIR"' ++++ '[' '!' -d /Applications/freesurfer/subjects ']' ++++ [[ -z nii.gz ]] ++++ [[ 0 != 0 ]] ++++ [[ 1 == 1 ]] ++++ echo 'FREESURFER_HOME /Applications/freesurfer' FREESURFER_HOME /Applications/freesurfer ++++ echo 'FSFAST_HOME /Applications/freesurfer/fsfast' FSFAST_HOME /Applications/freesurfer/fsfast ++++ echo 'FSF_OUTPUT_FORMAT nii.gz' FSF_OUTPUT_FORMAT nii.gz ++++ echo 'SUBJECTS_DIR /Applications/freesurfer/subjects' SUBJECTS_DIR /Applications/freesurfer/subjects ++++ [[ -z '' ]] ++++ export FMRI_ANALYSIS_DIR=/Applications/freesurfer/fsfast ++++ FMRI_ANALYSIS_DIR=/Applications/freesurfer/fsfast ++++ SUF=/Users/kimtran/matlab/startup.m ++++ '[' '!' -e /Users/kimtran/matlab/startup.m ']' +++++ grep FSFAST_HOME /Users/kimtran/matlab/startup.m +++++ wc -l ++++ tmp1=' 1' +++++ grep FMRI_ANALYSIS_DIR /Users/kimtran/matlab/startup.m +++++ wc -l ++++ tmp2=' 0' +++++ grep FREESURFER_HOME /Users/kimtran/matlab/startup.m +++++ wc -l ++++ tmp3=' 1' ++++ [[ 1 == 0 ]] ++++ [[ 1 == 1 ]] ++++ [[ -n /Applications/freesurfer/mni ]] ++++ echo 'MNI_DIR /Applications/freesurfer/mni' MNI_DIR /Applications/freesurfer/mni ++++ '[' -z '' ']' ++++ '[' -n /Applications/freesurfer/mni/bin ']' ++++ '[' '!' -d /Applications/freesurfer/mni/bin ']' ++++ '[' -n /Applications/freesurfer/mni/lib ']' ++++ '[' '!' -d /Applications/freesurfer/mni/lib ']' ++++ '[' -z /Applications/freesurfer/mni/lib/../Library/Perl/Updates/5.10.0 ']' ++++ '[' -z /Applications/freesurfer/mni/lib/../Library/Perl/Updates/5.10.0 ']' ++++ '[' /Applications/freesurfer/mni/lib/../Library/Perl/Updates/5.10.0 '!=' /Applications/freesurfer/mni/lib/../Library/Perl/Updates/5.10.0 ']' ++++ '[' -z '' ']' ++++ '[' -n /Applications/freesurfer/mni/bin ']' ++++ PATH=/Applications/freesurfer/mni/bin:/usr/fsl/bin:/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++++ '[' -d /Applications/freesurfer/lib/misc/bin ']' ++++ '[' -d /Applications/freesurfer/lib/misc/lib ']' ++++ [[ 1 == 1 ]] ++++ [[ -n '' ]] ++++ '[' -d /Applications/freesurfer/bin/freeview.app ']' ++++ '[' -n '' ']' ++++ [[ 1 == 1 ]] ++++ [[ -n '' ]] ++++ '[' -n /usr/fsl ']' ++++ export FSLDIR=/usr/fsl ++++ FSLDIR=/usr/fsl ++++ export FSL_BIN=/usr/fsl/bin ++++ FSL_BIN=/usr/fsl/bin ++++ '[' '!' -d /usr/fsl/bin ']' ++++ '[' -e /usr/fsl/etc/fslconf/fsl.sh ']' ++++ source /usr/fsl/etc/fslconf/fsl.sh +++++ FSLOUTPUTTYPE=NIFTI_GZ +++++ export FSLOUTPUTTYPE +++++ FSLMULTIFILEQUIT=TRUE +++++ export FSLMULTIFILEQUIT +++++ FSLTCLSH=/usr/fsl/bin/fsltclsh +++++ FSLWISH=/usr/fsl/bin/fslwish +++++ export FSLTCLSH FSLWISH +++++ FSLLOCKDIR= +++++ FSLMACHINELIST= +++++ FSLREMOTECALL= +++++ export FSLLOCKDIR FSLMACHINELIST FSLREMOTECALL +++++ FSLGECUDAQ=cuda.q +++++ export FSLGECUDAQ +++++ '[' -f /usr/local/etc/fslconf/fsl.sh ']' +++++ '[' -f /etc/fslconf/fsl.sh ']' +++++ '[' -f /Users/kimtran/.fslconf/fsl.sh ']' ++++ export FSLOUTPUTTYPE=NIFTI_GZ ++++ FSLOUTPUTTYPE=NIFTI_GZ ++++ '[' -e /usr/bin/display ']' ++++ '[' -e /usr/bin/convert ']' ++++ '[' -n /usr/fsl/bin ']' ++++ PATH=/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin:/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++++ [[ 1 == 1 ]] ++++ [[ -n /usr/fsl ]] ++++ echo 'FSL_DIR /usr/fsl' FSL_DIR /usr/fsl ++++ '[' -d /Applications/freesurfer/tktools ']' ++++ PATH=/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin:/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++++ export PATH=/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin:/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++++ PATH=/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin:/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++++ export FIX_VERTEX_AREA= ++++ FIX_VERTEX_AREA= ++++ return 0 ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 stat.sh voxel_volume.txt -bash: Desktop: command not found ++ PERL_MB_OPT='--install_base "/Users/kimtran/perl5"' ++ export PERL_MB_OPT ++ PERL_MM_OPT=INSTALL_BASE=/Users/kimtran/perl5 ++ export PERL_MM_OPT ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 stat.sh voxel_volume.txt -bash: Desktop: command not found ++ export PATH=/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++ PATH=/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 stat.sh voxel_volume.txt -bash: Desktop: command not found ++ export PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++ PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 stat.sh voxel_volume.txt -bash: Desktop: command not found ++ export LD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7: ++ LD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7: ++ export DYLD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib: ++ DYLD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib: ++ export PYTHONPATH=/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib: ++ PYTHONPATH=/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib: ++ export PATH=/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++ PATH=/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 stat.sh voxel_volume.txt -bash: Desktop: command not found ++ update_terminal_cwd ++ local 'SEARCH= ' ++ local REPLACE=%20 ++ local PWD_URL=file://Kims-Mac-2.local/Users/kimtran ++ printf '\e]7;%s\a' file://Kims-Mac-2.local/Users/kimtran I'm sorry for this 'mess', could you please check this for me? Thank you very much, Kim 2015-08-21 18:39 GMT+02:00 Ben Boeckel : > [ Please keep the list CC'd. ] > > On Fri, Aug 21, 2015 at 18:29:19 +0200, KIM TRAN DONG wrote: > > Thank you for your reply, but how can I inspect sys.path from vtkpython? > I > > tried changing the pythonpath into: > > import sys > sys.path > > > I searched in .bash_profile, but didn't find space letter in the path. > When > > I called `bash -x`, the terminal returned just `bash-3.2$ `. Could you > give > > me any suggests? > > You could try putting `set -x` at the top of .bash_profile then. > > --Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jpmverheggen at gmail.com Mon Aug 24 03:05:50 2015 From: jpmverheggen at gmail.com (Jaap Verheggen) Date: Mon, 24 Aug 2015 09:05:50 +0200 Subject: [vtkusers] Fwd: Transform polydata with double precision (vtk, python) In-Reply-To: References: <55D34815.8000306@gmail.com> <55D34A1C.6050806@gmail.com> <55D42860.208@gmail.com> Message-ID: <55DAC24E.4000900@gmail.com> Better late than never, Upgrading to 6.2.0 Solved this problem. Thanks On 19-08-15 14:49, Cory Quammen wrote: > Ah. Obviously, that feature is not in 5.8. > > I'm not sure how to get double point precision in 5.8. > > On Wed, Aug 19, 2015 at 2:55 AM, Jaap Verheggen > > wrote: > > Hello, > > Using your code I get the following error code: > > >>> pgt = vtk.vtkTransformPolyDataFilter() > >>> pgt.SetOutputPointsPrecision(vtk.vtkAlgorithm.DOUBLE_PRECISION) > Traceback (most recent call last): > File "", line 1, in > AttributeError: SetOutputPointsPrecision > >>> > > Using VTK version 5.8.0 > > > On 18-08-15 19:19, Cory Quammen wrote: >> pgt.SetOutputPointsPrecision(vtk.vtkAlgorithm.DOUBLE_PRECISION ) > > > -- > --------------------------- > Jaap Verheggen > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. -- --------------------------- Jaap Verheggen -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Aug 24 09:22:54 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 24 Aug 2015 09:22:54 -0400 Subject: [vtkusers] Fwd: Transform polydata with double precision (vtk, python) In-Reply-To: <55DAC24E.4000900@gmail.com> References: <55D34815.8000306@gmail.com> <55D34A1C.6050806@gmail.com> <55D42860.208@gmail.com> <55DAC24E.4000900@gmail.com> Message-ID: Great! Thanks for the followup. On Mon, Aug 24, 2015 at 3:05 AM, Jaap Verheggen wrote: > Better late than never, > > Upgrading to 6.2.0 Solved this problem. > > Thanks > > On 19-08-15 14:49, Cory Quammen wrote: > > Ah. Obviously, that feature is not in 5.8. > > I'm not sure how to get double point precision in 5.8. > > On Wed, Aug 19, 2015 at 2:55 AM, Jaap Verheggen > wrote: > >> Hello, >> >> Using your code I get the following error code: >> >> >>> pgt = vtk.vtkTransformPolyDataFilter() >> >>> pgt.SetOutputPointsPrecision(vtk.vtkAlgorithm.DOUBLE_PRECISION) >> Traceback (most recent call last): >> File "", line 1, in >> AttributeError: SetOutputPointsPrecision >> >>> >> >> Using VTK version 5.8.0 >> >> >> On 18-08-15 19:19, Cory Quammen wrote: >> >> pgt.SetOutputPointsPrecision(vtk.vtkAlgorithm.DOUBLE_PRECISION ) >> >> >> >> -- >> --------------------------- >> Jaap Verheggen >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > > > -- > --------------------------- > Jaap Verheggen > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Aug 24 10:35:08 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 24 Aug 2015 08:35:08 -0600 Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing In-Reply-To: References: Message-ID: Hi Arnd, For now, if you want to use python 3, you must manually set PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR, and PYTHON_LIBRARY. Otherwise, cmake will search for python 2, regardless of how you set VTK_PYTHON_VERSION. - David On Mon, Aug 24, 2015 at 8:16 AM, Arnd Baecker wrote: > Hi David, > > first: this is really great news! > > However, I had some problems with the installation > and thus a few questions: > - I used current master > (git clone https://gitlab.kitware.com/vtk/vtk.git VTK) > - and a conda environment for python3 > - Using ccmake 2.8.12.2 (and also the current git version), > I set: > VTK_PYTHON_VERSION *3 > (Its actual value should be: > "Python version to use: 2, 2.x, or empty" > ) > I was hoping that this would pick up the right python3, > however, as a result I got: > PYTHON_EXECUTABLE /usr/bin/python2 > PYTHON_INCLUDE_DIR /usr/include/python2.7 > PYTHON_LIBRARY /usr/lib/x86_64-linux-gnu/ > libpython2.7.so > > Thus I manually changed the paths to point to the right python and > finally ended up with a vtk which could be imported in python3! > > Question: is the above (in principle) the right approach, > or is there some other/better way to get the configuration right? > (Or is it just because python3 is not yet supported by cmake/ccmake?). > > Best, Arnd > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnd.baecker at web.de Mon Aug 24 10:16:31 2015 From: arnd.baecker at web.de (Arnd Baecker) Date: Mon, 24 Aug 2015 16:16:31 +0200 (CEST) Subject: [vtkusers] [vtk-developers] VTK-py3k is ready for testing In-Reply-To: References: Message-ID: Hi David, first: this is really great news! However, I had some problems with the installation and thus a few questions: - I used current master (git clone https://gitlab.kitware.com/vtk/vtk.git VTK) - and a conda environment for python3 - Using ccmake 2.8.12.2 (and also the current git version), I set: VTK_PYTHON_VERSION *3 (Its actual value should be: "Python version to use: 2, 2.x, or empty" ) I was hoping that this would pick up the right python3, however, as a result I got: PYTHON_EXECUTABLE /usr/bin/python2 PYTHON_INCLUDE_DIR /usr/include/python2.7 PYTHON_LIBRARY /usr/lib/x86_64-linux-gnu/libpython2.7.so Thus I manually changed the paths to point to the right python and finally ended up with a vtk which could be imported in python3! Question: is the above (in principle) the right approach, or is there some other/better way to get the configuration right? (Or is it just because python3 is not yet supported by cmake/ccmake?). Best, Arnd From ben.boeckel at kitware.com Mon Aug 24 10:52:07 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 24 Aug 2015 10:52:07 -0400 Subject: [vtkusers] No module named vtk when installing mayavi In-Reply-To: References: <20150821154555.GA16687@megas.kitware.com> <20150821163942.GA12876@megas.kitware.com> Message-ID: <20150824145207.GA22341@megas.kitware.com> On Mon, Aug 24, 2015 at 09:03:32 +0200, KIM TRAN DONG wrote: > 'sys.path' gives me this: ... > '/usr/local/VTKBuild/Wrapping/Python/vtk', > '/usr/local/VTKBuild/Wrapping/Python', '/usr/local/VTKBuild/bin', > '/usr/local/vtkpython/bin/vtk', '/usr/local/VTKBuild/lib', ... These look to be the paths you need. > and for the 'set -x': > + source /Users/kimtran/.bash_profile This file seems to have the wrong commands (based on the '+' context used). > ++ set -x > ++ FSLDIR=/usr/fsl > ++ . /usr/fsl/etc/fslconf/fsl.sh > +++ FSLOUTPUTTYPE=NIFTI_GZ > +++ export FSLOUTPUTTYPE > +++ FSLMULTIFILEQUIT=TRUE > +++ export FSLMULTIFILEQUIT > +++ FSLTCLSH=/usr/fsl/bin/fsltclsh > +++ FSLWISH=/usr/fsl/bin/fslwish > +++ export FSLTCLSH FSLWISH > +++ FSLLOCKDIR= > +++ FSLMACHINELIST= > +++ FSLREMOTECALL= > +++ export FSLLOCKDIR FSLMACHINELIST FSLREMOTECALL > +++ FSLGECUDAQ=cuda.q > +++ export FSLGECUDAQ > +++ '[' -f /usr/local/etc/fslconf/fsl.sh ']' > +++ '[' -f /etc/fslconf/fsl.sh ']' > +++ '[' -f /Users/kimtran/.fslconf/fsl.sh ']' > ++ PATH=/usr/fsl/bin:/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > ++ export FSLDIR PATH > ++ export FREESURFER_HOME=/Applications/freesurfer > ++ FREESURFER_HOME=/Applications/freesurfer > ++ source /Applications/freesurfer/SetUpFreeSurfer.sh ...output from SetUpFreeSurfer.sh... > ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 stat.sh voxel_volume.txt > -bash: Desktop: command not found Here's one problem. > ++ PERL_MB_OPT='--install_base "/Users/kimtran/perl5"' > ++ export PERL_MB_OPT > ++ PERL_MM_OPT=INSTALL_BASE=/Users/kimtran/perl5 > ++ export PERL_MM_OPT > ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 stat.sh voxel_volume.txt > -bash: Desktop: command not found A second. > ++ export > PATH=/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > ++ > PATH=/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 stat.sh voxel_volume.txt > -bash: Desktop: command not found Third. > ++ export PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > ++ PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 stat.sh voxel_volume.txt > -bash: Desktop: command not found Fourth. > ++ export LD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7: > ++ LD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7: > ++ export DYLD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib: > ++ DYLD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib: > ++ export PYTHONPATH=/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib: > ++ PYTHONPATH=/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib: > ++ export PATH=/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > ++ PATH=/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 stat.sh voxel_volume.txt > -bash: Desktop: command not found Fifth. > ++ update_terminal_cwd > ++ local 'SEARCH= ' > ++ local REPLACE=%20 > ++ local PWD_URL=file://Kims-Mac-2.local/Users/kimtran > ++ printf '\e]7;%s\a' file://Kims-Mac-2.local/Users/kimtran It appears that some variable may contain a listing of your home directory and is being used as a command? I'd check what's around the SetUpFreeSurfer.sh line to see what variables are being used and see if the logs mention it being set or overridden inside that SetUpFreeSurfer.sh output section. --Ben From kimtran1208 at gmail.com Mon Aug 24 12:21:21 2015 From: kimtran1208 at gmail.com (KIM TRAN DONG) Date: Mon, 24 Aug 2015 18:21:21 +0200 Subject: [vtkusers] No module named vtk when installing mayavi In-Reply-To: <20150824145207.GA22341@megas.kitware.com> References: <20150821154555.GA16687@megas.kitware.com> <20150821163942.GA12876@megas.kitware.com> <20150824145207.GA22341@megas.kitware.com> Message-ID: Dear Ben, Thank you for your reply, but I get always the same error message for installing mayavi after setting PYTHONPATH as the sys.path: File "tvtk/code_gen.py", line 10, in import vtk ImportError: No module named vtk For the error of the terminal, I noticed that if I save .bash _profile with the terminal opened, the 'source ~/.bash_profile' will return the error "a listing of the *current **directory* and it is being used as a command", do you have any suggests about this? Thank you very much, Kim 2015-08-24 16:52 GMT+02:00 Ben Boeckel : > On Mon, Aug 24, 2015 at 09:03:32 +0200, KIM TRAN DONG wrote: > > 'sys.path' gives me this: > ... > > '/usr/local/VTKBuild/Wrapping/Python/vtk', > > '/usr/local/VTKBuild/Wrapping/Python', '/usr/local/VTKBuild/bin', > > '/usr/local/vtkpython/bin/vtk', '/usr/local/VTKBuild/lib', > ... > > These look to be the paths you need. > > > and for the 'set -x': > > + source /Users/kimtran/.bash_profile > > This file seems to have the wrong commands (based on the '+' context > used). > > > ++ set -x > > ++ FSLDIR=/usr/fsl > > ++ . /usr/fsl/etc/fslconf/fsl.sh > > +++ FSLOUTPUTTYPE=NIFTI_GZ > > +++ export FSLOUTPUTTYPE > > +++ FSLMULTIFILEQUIT=TRUE > > +++ export FSLMULTIFILEQUIT > > +++ FSLTCLSH=/usr/fsl/bin/fsltclsh > > +++ FSLWISH=/usr/fsl/bin/fslwish > > +++ export FSLTCLSH FSLWISH > > +++ FSLLOCKDIR= > > +++ FSLMACHINELIST= > > +++ FSLREMOTECALL= > > +++ export FSLLOCKDIR FSLMACHINELIST FSLREMOTECALL > > +++ FSLGECUDAQ=cuda.q > > +++ export FSLGECUDAQ > > +++ '[' -f /usr/local/etc/fslconf/fsl.sh ']' > > +++ '[' -f /etc/fslconf/fsl.sh ']' > > +++ '[' -f /Users/kimtran/.fslconf/fsl.sh ']' > > ++ > PATH=/usr/fsl/bin:/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > > ++ export FSLDIR PATH > > ++ export FREESURFER_HOME=/Applications/freesurfer > > ++ FREESURFER_HOME=/Applications/freesurfer > > ++ source /Applications/freesurfer/SetUpFreeSurfer.sh > ...output from SetUpFreeSurfer.sh... > > ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso > Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 > stat.sh voxel_volume.txt > > -bash: Desktop: command not found > > Here's one problem. > > > ++ PERL_MB_OPT='--install_base "/Users/kimtran/perl5"' > > ++ export PERL_MB_OPT > > ++ PERL_MM_OPT=INSTALL_BASE=/Users/kimtran/perl5 > > ++ export PERL_MM_OPT > > ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso > Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 > stat.sh voxel_volume.txt > > -bash: Desktop: command not found > > A second. > > > ++ export > > > PATH=/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > > ++ > > > PATH=/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > > ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso > Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 > stat.sh voxel_volume.txt > > -bash: Desktop: command not found > > Third. > > > ++ export > PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > > ++ > PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > > ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso > Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 > stat.sh voxel_volume.txt > > -bash: Desktop: command not found > > Fourth. > > > ++ export > LD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7: > > ++ > LD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7:/usr/local/VTKBuild/lib:/usr/lib/python2.7: > > ++ export > DYLD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib: > > ++ > DYLD_LIBRARY_PATH=/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/lib: > > ++ export > PYTHONPATH=/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib: > > ++ > PYTHONPATH=/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib:/usr/local/VTKBuild/Wrapping/Python/vtk:/usr/local/VTKBuild/Wrapping/Python:/usr/local/VTKBuild/bin:/usr/local/vtkpython/bin/vtk:/usr/local/VTKBuild/lib: > > ++ export > PATH=/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > > ++ > PATH=/usr/local/VTKBuild/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/fsl/bin:/Applications/freesurfer/mni/bin:/usr/fsl/bin > > ++ Desktop Documents Downloads Library Movies Music OSX-10.8.iso > Pictures Public Qt5.2.1 bootdisk.sh build.log license.txt matlab perl5 > stat.sh voxel_volume.txt > > -bash: Desktop: command not found > > Fifth. > > > ++ update_terminal_cwd > > ++ local 'SEARCH= ' > > ++ local REPLACE=%20 > > ++ local PWD_URL=file://Kims-Mac-2.local/Users/kimtran > > ++ printf '\e]7;%s\a' file://Kims-Mac-2.local/Users/kimtran > > It appears that some variable may contain a listing of your home > directory and is being used as a command? I'd check what's around the > SetUpFreeSurfer.sh line to see what variables are being used and see if > the logs mention it being set or overridden inside that > SetUpFreeSurfer.sh output section. > > --Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Mon Aug 24 20:12:29 2015 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Tue, 25 Aug 2015 10:12:29 +1000 Subject: [vtkusers] How to build VTK with Python3. Message-ID: For those who want to build VTK with Python 3 here are some instructions and scripts that I have written for both Windows and Linux. Please feel free to edit as appropriate and feed back any improvements to the list. It was a bit wordy so the instructions are in the file called "How to build VTK with Python 3.md" Edit the scripts changing paths to suit your particular environment, also for DevelopmenrEnvPy3k change the extension to cmd. Regards Andrew -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: How to build VTK with Python 3.md Type: application/octet-stream Size: 2863 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DevelopmentEnvPy3k.change_ext_to_cmd Type: application/octet-stream Size: 2451 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: py3k_dev_env.sh Type: application/x-sh Size: 1402 bytes Desc: not available URL: From ke.manjunath at gmail.com Tue Aug 25 01:03:05 2015 From: ke.manjunath at gmail.com (Manjunath K E) Date: Tue, 25 Aug 2015 10:33:05 +0530 Subject: [vtkusers] VTK-5.8.0-py2.7.egg is not generated after installing vtk 5.8 and qt 4.8.1 Message-ID: Hi All, I have installed vtk 5.8, qt 4.8 and their python wrappers using below commands : sudo apt-get install libvtk5.8-qt4 libvtk5-qt4-dev libvtk5-dev libvtk5.8 python-qt4 python-vtk qt4-designer pyqt4-dev-tools sudo apt-get install python-qt4-gl libqt4-opengl libqt4-assistant But, I did not see the "VTK-5.8.0-py2.7.egg" in either *site-packages or dist-packages* folder. Is my installation is correct or What could be the problem. Thanks and Regards, Manjunath K E Help Ever Hurt Never -------------- next part -------------- An HTML attachment was scrubbed... URL: From ymhung at itri.org.tw Tue Aug 25 01:45:22 2015 From: ymhung at itri.org.tw (jasonhym) Date: Mon, 24 Aug 2015 22:45:22 -0700 (MST) Subject: [vtkusers] How to convert 2D to 3D(DICOM images) with degrees (3, 6, 9, ..., 357) Message-ID: <1440481522083-5733616.post@n5.nabble.com> Dear Sir, I want to read a set of DICOM images and display(visualize) it as 3D image. Circle is 360 degrees Every 3 degrees placing 2D dicom So put 120 of 2D dicom How to Combined into 3D image ? Please help me how to do it or where I could find the tutorial of this problem(using C++). Thanks a lot Jason -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-convert-2D-to-3D-DICOM-images-with-degrees-3-6-9-357-tp5733616.html Sent from the VTK - Users mailing list archive at Nabble.com. From jpmverheggen at gmail.com Tue Aug 25 04:14:14 2015 From: jpmverheggen at gmail.com (Jaap Verheggen) Date: Tue, 25 Aug 2015 10:14:14 +0200 Subject: [vtkusers] Combine three single component arrays into one three component array (python) Message-ID: <55DC23D6.7060904@gmail.com> Hello, I am Looking for an easy way to create my point data with Python. I can make three single component arrays, but do not know how to combine that into one three component array which I can feed into a vtkpoints container. # Let's say I have an array of point data, large enough that a loop should be avoided Array = np.empty([235, 3]) #I can deconstruct the array in x, y and z VTK_datax = numpy_support.numpy_to_vtk(num_array=Array[:,0].ravel(), deep=True, array_type=vtk.VTK_DOUBLE) VTK_datay = numpy_support.numpy_to_vtk(num_array=Array[:,1].ravel(), deep=True, array_type=vtk.VTK_DOUBLE) VTK_dataz = numpy_support.numpy_to_vtk(num_array=Array[:,2].ravel(), deep=True, array_type=vtk.VTK_DOUBLE) # Maybe I will need a VTK ID array (0..235) Lets just make one VTK_ID = numpy_support.numpy_to_vtk(num_array=np.arange(shape(Array)[0]).ravel(), deep=True, array_type=vtk.VTK_ID_TYPE) # Now I would like to combine x, y and z data into a single array VTK_data = vtk.vtkDoubleArray() VTK_data.SetNumberOfComponents(3) VTK_data.SetNumberOfTuples(235) # However, I do not know how to do this, it could be something like this, VTK_data.SetTuple3(VTK_ID, VTK_datax, VTK_datay, VTK_dataz ) but that doesn't work with arrays. # Afterwards, I would like to fill the data array into a points container points = vtk.vtkPoints() points.SetData(pcoords) Is there a way to combine three single component arrays into a three component array? Thanks in advance, -- --------------------------- Jaap Verheggen -------------- next part -------------- An HTML attachment was scrubbed... URL: From jayalatn at gmail.com Tue Aug 25 15:18:48 2015 From: jayalatn at gmail.com (Nuwan Jayala) Date: Tue, 25 Aug 2015 21:18:48 +0200 Subject: [vtkusers] 3D polygon polygon intersection area Message-ID: Hi All, I have a situation where I have a 3d polygon (hexahedron) and a 3d quad. Can someone tell me if vtk provide functionality to calculate the area of the intersection? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From naim.13 at gmail.com Tue Aug 25 16:54:08 2015 From: naim.13 at gmail.com (Naimul Khan) Date: Tue, 25 Aug 2015 16:54:08 -0400 Subject: [vtkusers] Question on manual configuration of VTK camera In-Reply-To: References: <1323364639368-5059478.post@n5.nabble.com> <1323421666416-5061173.post@n5.nabble.com> <1440078474126-5733575.post@n5.nabble.com> Message-ID: That worked, thank you so much! For anyone looking at this thread, this is the right solution. To add to David, in my case, I wanted the focal point always at a certain distance along the camera's local Z axis. To compute that, just do the following in addition to what David did: camera.SetFocalPoint(pos[0] + d * zvec[0], pos[1] + d * zvec[1], pos[2] + d * zvec[2]); where d is the distance. Regards Naimul Mefraz Khan On Thu, Aug 20, 2015 at 11:55 AM, David Gobbi wrote: > On Thu, Aug 20, 2015 at 7:47 AM, naimulkhan wrote: > >> hi David, >> >> I am in the same boat as the opener of this thread. I am trying to use an >> external tracker (NDI Aurora) to control the vtkCamera (basically "look >> through" the position and orientation of the tracker). I can set the >> position through vtkCamera::SetPosition() easily, but I am not sure what >> parameters SetViewUp() and SetFocusPoint() should be called with. Any help >> would be greatly appreciated, thanks! >> > > Consider: any frame of reference can be described by a point and two unit > vectors. The "point" is easy, it's the camera's Position. > > The first unit vector that we will use is the camera's local Z axis, which > points _away_ from the focal point, i.e. it points out the back of the > camera. In other words, its direction is from the FocalPoint to the > Position. > > The second unit vector that we will use is the camera's local Y axis. > This is just the ViewUp direction. > > I advise taking a look at Figure 3.9 on this web page: > http://www.glprogramming.com/red/chapter03.html > > So, let's say that you have a vtkTransform that describes where you want > to place the camera. How can you get the position and the two vectors? > Easy, just apply the transform to the origin, to a unit z vector, and to a > unit y vector: > > double pos[3] = { 0.0, 0.0, 0.0 }; > double zvec[3] = { 0.0, 0.0, 1.0 }; > double yvec[3] = { 0.0, 1.0, 0.0 }; > > transform->TransformPoint(pos, pos); > transform->TransformVector(zvec, zvec); > transform->TransformVector(yvec, yvec); > > That's as far as I'll go, you should be able to figure out the math for > computing the FocalPoint from the Position, the zvec, and the Distance from > the camera to the object it is looking at. > > - David > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Aug 25 18:39:54 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 25 Aug 2015 16:39:54 -0600 Subject: [vtkusers] Question on manual configuration of VTK camera In-Reply-To: References: <1323364639368-5059478.post@n5.nabble.com> <1323421666416-5061173.post@n5.nabble.com> <1440078474126-5733575.post@n5.nabble.com> Message-ID: Hi Naimul, Be careful, you're not using the same definitions as one ones that I gave in my email. I defined the Z axis as pointing out the back of the camera, not out the front. That is the way the camera's local coordinate system is defined for VTK (and for OpenGL). So: 1) Given my definition of the zvec, the equation for the focal point should be the following: camera.SetFocalPoint(pos[0] - d * zvec[0], pos[1] - d * zvec[1], pos[2] - d * zvec[2]); 2) for the Aurora tool, if the tool's local Z axis is pointing out towards the "focal point", then you actually want to rotate the tool's coordinate system by 180 degrees around the tool's Y axis in order to generate local coordinate system for the camera. I know this is pedantic (since you end up with two 180 degree rotations that cancel each other out), but this can be important if you want to do any operations within the camera's coordinate system. - David On Tue, Aug 25, 2015 at 2:54 PM, Naimul Khan wrote: > That worked, thank you so much! For anyone looking at this thread, this is > the right solution. To add to David, in my case, I wanted the focal point > always at a certain distance along the camera's local Z axis. To compute > that, just do the following in addition to what David did: > > camera.SetFocalPoint(pos[0] + d * zvec[0], pos[1] + d * zvec[1], pos[2] + > d * zvec[2]); > > where d is the distance. > > > Regards > Naimul Mefraz Khan > > On Thu, Aug 20, 2015 at 11:55 AM, David Gobbi > wrote: > >> On Thu, Aug 20, 2015 at 7:47 AM, naimulkhan wrote: >> >>> hi David, >>> >>> I am in the same boat as the opener of this thread. I am trying to use an >>> external tracker (NDI Aurora) to control the vtkCamera (basically "look >>> through" the position and orientation of the tracker). I can set the >>> position through vtkCamera::SetPosition() easily, but I am not sure what >>> parameters SetViewUp() and SetFocusPoint() should be called with. Any >>> help >>> would be greatly appreciated, thanks! >>> >> >> Consider: any frame of reference can be described by a point and two unit >> vectors. The "point" is easy, it's the camera's Position. >> >> The first unit vector that we will use is the camera's local Z axis, >> which points _away_ from the focal point, i.e. it points out the back of >> the camera. In other words, its direction is from the FocalPoint to the >> Position. >> >> The second unit vector that we will use is the camera's local Y axis. >> This is just the ViewUp direction. >> >> I advise taking a look at Figure 3.9 on this web page: >> http://www.glprogramming.com/red/chapter03.html >> >> So, let's say that you have a vtkTransform that describes where you want >> to place the camera. How can you get the position and the two vectors? >> Easy, just apply the transform to the origin, to a unit z vector, and to a >> unit y vector: >> >> double pos[3] = { 0.0, 0.0, 0.0 }; >> double zvec[3] = { 0.0, 0.0, 1.0 }; >> double yvec[3] = { 0.0, 1.0, 0.0 }; >> >> transform->TransformPoint(pos, pos); >> transform->TransformVector(zvec, zvec); >> transform->TransformVector(yvec, yvec); >> >> That's as far as I'll go, you should be able to figure out the math for >> computing the FocalPoint from the Position, the zvec, and the Distance from >> the camera to the object it is looking at. >> >> - David >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Aug 25 23:38:49 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 25 Aug 2015 23:38:49 -0400 Subject: [vtkusers] Fwd: XDMF and hyperslabs In-Reply-To: References: Message-ID: Hi Victor, ARL and Kitware are the primary developers of Xdmf, but everyone is invited to contribute to the project. Yes xdmf3 has not yet replaced xdmf2 within ParaView. The binaries for the next ParaView release (the release candidate should have it) will have both turned on. Over the next few releases xdmf2 will be deprecated and then removed from ParaView. xdmf itself can be built apart from VTK. On the xdmf wiki there are links to the repositories that you can check out to build it standalone. What you see in VTK/Thirdparty is a clone of parts of that standalone library. The VTK interface to it is in VTK/IO. hth David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Aug 19, 2015 at 12:03 PM, victor sv wrote: > Thanks Dan, > > it was an error in the XDMF file and it seems that is a valid format for > Xdmf2. I comment the error between lines below. > > In a post that I sent to XDMF mailing list they say me that Xdmf3 is not > by default in Paraview and I have to compile the sources with the correct > options enabling Xdmf3. > > My problem with the versions is that the XDMF documentation and library > versions is not "synchronized". It seems that Kitware is who is developing > Xdmf3, but there isn't an stand-alone library, it only exists inside VTK > project. I'm right? > > Thanks again, > V?ctor. > > > 2015-08-18 4:09 GMT+02:00 Dan Lipsa : > >> There are (advanced) options to enable either xdmf2 or xdmf3 in VTK. >> >> On Fri, Aug 14, 2015 at 6:27 AM, victor sv wrote: >> >>> >>> ---------- Forwarded message ---------- >>> From: victor sv >>> Date: 2015-08-14 12:25 GMT+02:00 >>> Subject: XDMF and hyperslabs >>> To: vtkdev , vtk-users at vtk.org, " >>> paraview at paraview.org" >>> >>> >>> Hello all, >>> >>> I'm trying to create and visualize an XDMF/HDF5 file containing a >>> partitioned mesh using hyperslabs. >>> >>> Is this supported by Paraview/VTK ?? >>> >>> The HDF5 (solution1.h5) looks as follows: >>> >>> GROUP "/" { >>> GROUP "Grid" { >>> DATASET "Connectivities" { >>> DATATYPE H5T_STD_I32BE >>> DATASPACE SIMPLE { ( 18 ) / ( 18 ) } >>> DATA { >>> (0): 0, 1, 2, 3, 2, 1, 4, 5, 6, 7, 6, 5, 6, 7, 8, 9, 8, 7 >>> } >>> } >>> DATASET "Coordinates" { >>> DATATYPE H5T_IEEE_F64BE >>> DATASPACE SIMPLE { ( 20 ) / ( 20 ) } >>> DATA { >>> (0): 0, 0, 1, 0, 0, 0.5, 1, 0.5, 0, 0.5, 1, 0.5, 0, 1, 1, 1, 0, >>> 1.5, >>> (18): 1, 1.5 >>> } >>> } >>> DATASET "Solution" { >>> DATATYPE H5T_IEEE_F64BE >>> DATASPACE SIMPLE { ( 10 ) / ( 10 ) } >>> DATA { >>> (0): 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 >>> } >>> } >>> } >>> } >>> >>> And the XDMF file to represent a 2-triangle (4 points) piece of the >>> full mesh is: >>> >>> >>> >>> >>> >>> >>> >>> >>> >> > The problem is here, the correct dimensions are 2 (triangles) and not 6 > (integers) > > 0 1 6 >>> >> Precision="4">solution1.h5:Grid/Connectivities >>> >>> >>> >>> >>> 0 1 8 >>> >> Precision="8">solution1.h5:Grid/Coordinates >>> >>> >>> >>> >>> >>> >>> >>> I'm trying to use the syntax explained at the XDMF webpage ( >>> http://www.xdmf.org/index.php/XDMF_Model_and_Format ), but I'm feeling >>> confused about the version of the documentation and current version of XDMF >>> library included in VTK library. >>> >>> Can anyone give me some info about this? >>> It is XDMFv3 already public ? >>> >>> >>> Thanks in advance, >>> V?ctor. >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From agatakrason at gmail.com Wed Aug 26 02:27:18 2015 From: agatakrason at gmail.com (agatte) Date: Tue, 25 Aug 2015 23:27:18 -0700 (MST) Subject: [vtkusers] question ? [vtkContourFilter & vtkMarchingCubes] Message-ID: <1440570438796-5733626.post@n5.nabble.com> Hi, I want to extract surface from 3D binary volume. I found in vtk : two filter vtkContourFilter and vtkMarchningCubes. I have a doupt which is better ? What's the difference ? I would appreciate for any info. agatte -- View this message in context: http://vtk.1045678.n5.nabble.com/question-vtkContourFilter-vtkMarchingCubes-tp5733626.html Sent from the VTK - Users mailing list archive at Nabble.com. From hotsmileband at gmail.com Wed Aug 26 03:41:16 2015 From: hotsmileband at gmail.com (Andrew Zhilka) Date: Wed, 26 Aug 2015 10:41:16 +0300 Subject: [vtkusers] Plotting line segments with vtkChartXY Message-ID: Hi all, I am trying to create a line plot. I have already seen an example and my program works if I have continuous lines. Let's say I have the following table (continuous case): X values | Plot value 1 | 1 2 | 2 3 | 3 4 | 4 This case works perfectly but if I have the following one X values | Plot value 1 | 1 2 | (not set) 3 | (not set) 4 | 4 the plot behaves like if I set the second and the third plot values to 0. And I just would like to have a gap. Because of this very reason I can not draw 2 lines independently to achieve the gap like this: X values | Plot value 1| Plot value 2 1 | 1 | (not set) 2 | (not set) | (not set) 3 | (not set) | (not set) 4 | (not set) | 4 Please, advise on what can be done to solve the issue Regards, Andrey -------------- next part -------------- An HTML attachment was scrubbed... URL: From hotsmileband at gmail.com Wed Aug 26 03:48:17 2015 From: hotsmileband at gmail.com (Andrew Zhilka) Date: Wed, 26 Aug 2015 10:48:17 +0300 Subject: [vtkusers] Creating Manhattan plot with vtkChartXY Message-ID: Hi all, I need to create a plot using vtkChartXY in which there are many points with the same X coordinate (making some kind of columns). What is more even in one column there are points of different types (each type has its own color) so it appears to be quite non-trivial for me to create an appropriate model for such plot. The only idea I have is to create columns in vtkTable and vtkPlot-s for each point separately. However, here I face the problem from my another e-mail ("Plotting line segments with vtkChartXY"). So I wonder whether there is a way to have several charts in one view or several tables in one chart or anything else that may help to solve the problem? Regards, Andrey -------------- next part -------------- An HTML attachment was scrubbed... URL: From victorsv at gmail.com Wed Aug 26 06:31:22 2015 From: victorsv at gmail.com (victor sv) Date: Wed, 26 Aug 2015 12:31:22 +0200 Subject: [vtkusers] Fwd: XDMF and hyperslabs In-Reply-To: References: Message-ID: Hi David, it seems that if I go to the "Version 3" ( http://www.xdmf.org/index.php/Version_3) section of the XDMF web page it only has a link to XDMF version 2 git repository (git:// public.kitware.com/Xdmf2.git). I cannot find a public repo for XDMF v3, could you send me a link to the public git repo for XDMF v3? Thanks again, V?ctor. 2015-08-26 5:38 GMT+02:00 David E DeMarle : > Hi Victor, > > ARL and Kitware are the primary developers of Xdmf, but everyone is > invited to contribute to the project. > > Yes xdmf3 has not yet replaced xdmf2 within ParaView. The binaries for the > next ParaView release (the release candidate should have it) will have both > turned on. Over the next few releases xdmf2 will be deprecated and then > removed from ParaView. > > xdmf itself can be built apart from VTK. On the xdmf wiki there are links > to the repositories that you can check out to build it standalone. What you > see in VTK/Thirdparty is a clone of parts of that standalone library. The > VTK interface to it is in VTK/IO. > > hth > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Wed, Aug 19, 2015 at 12:03 PM, victor sv wrote: > >> Thanks Dan, >> >> it was an error in the XDMF file and it seems that is a valid format for >> Xdmf2. I comment the error between lines below. >> >> In a post that I sent to XDMF mailing list they say me that Xdmf3 is not >> by default in Paraview and I have to compile the sources with the correct >> options enabling Xdmf3. >> >> My problem with the versions is that the XDMF documentation and library >> versions is not "synchronized". It seems that Kitware is who is developing >> Xdmf3, but there isn't an stand-alone library, it only exists inside VTK >> project. I'm right? >> >> Thanks again, >> V?ctor. >> >> >> 2015-08-18 4:09 GMT+02:00 Dan Lipsa : >> >>> There are (advanced) options to enable either xdmf2 or xdmf3 in VTK. >>> >>> On Fri, Aug 14, 2015 at 6:27 AM, victor sv wrote: >>> >>>> >>>> ---------- Forwarded message ---------- >>>> From: victor sv >>>> Date: 2015-08-14 12:25 GMT+02:00 >>>> Subject: XDMF and hyperslabs >>>> To: vtkdev , vtk-users at vtk.org, " >>>> paraview at paraview.org" >>>> >>>> >>>> Hello all, >>>> >>>> I'm trying to create and visualize an XDMF/HDF5 file containing a >>>> partitioned mesh using hyperslabs. >>>> >>>> Is this supported by Paraview/VTK ?? >>>> >>>> The HDF5 (solution1.h5) looks as follows: >>>> >>>> GROUP "/" { >>>> GROUP "Grid" { >>>> DATASET "Connectivities" { >>>> DATATYPE H5T_STD_I32BE >>>> DATASPACE SIMPLE { ( 18 ) / ( 18 ) } >>>> DATA { >>>> (0): 0, 1, 2, 3, 2, 1, 4, 5, 6, 7, 6, 5, 6, 7, 8, 9, 8, 7 >>>> } >>>> } >>>> DATASET "Coordinates" { >>>> DATATYPE H5T_IEEE_F64BE >>>> DATASPACE SIMPLE { ( 20 ) / ( 20 ) } >>>> DATA { >>>> (0): 0, 0, 1, 0, 0, 0.5, 1, 0.5, 0, 0.5, 1, 0.5, 0, 1, 1, 1, >>>> 0, 1.5, >>>> (18): 1, 1.5 >>>> } >>>> } >>>> DATASET "Solution" { >>>> DATATYPE H5T_IEEE_F64BE >>>> DATASPACE SIMPLE { ( 10 ) / ( 10 ) } >>>> DATA { >>>> (0): 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 >>>> } >>>> } >>>> } >>>> } >>>> >>>> And the XDMF file to represent a 2-triangle (4 points) piece of the >>>> full mesh is: >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> Type="HyperSlab"> >>>> >>> >> The problem is here, the correct dimensions are 2 (triangles) and not 6 >> (integers) >> >> 0 1 6 >>>> >>> Precision="4">solution1.h5:Grid/Connectivities >>>> >>>> >>>> >>>> >>> Type="HyperSlab"> >>>> 0 1 8 >>>> >>> Precision="8">solution1.h5:Grid/Coordinates >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> I'm trying to use the syntax explained at the XDMF webpage ( >>>> http://www.xdmf.org/index.php/XDMF_Model_and_Format ), but I'm feeling >>>> confused about the version of the documentation and current version of XDMF >>>> library included in VTK library. >>>> >>>> Can anyone give me some info about this? >>>> It is XDMFv3 already public ? >>>> >>>> >>>> Thanks in advance, >>>> V?ctor. >>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Aug 26 09:13:45 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 26 Aug 2015 09:13:45 -0400 Subject: [vtkusers] question ? [vtkContourFilter & vtkMarchingCubes] In-Reply-To: <1440570438796-5733626.post@n5.nabble.com> References: <1440570438796-5733626.post@n5.nabble.com> Message-ID: vtkContourFilter is typically better to use IMHO. - it is multithreaded - it handles more kinds of input data volumes For a binary 3D image, you might prefer to use vtkDiscreteMarchingCubes ( http://www.vtk.org/doc/nightly/html/classvtkDiscreteMarchingCubes.html). HTH, Cory On Wed, Aug 26, 2015 at 2:27 AM, agatte wrote: > Hi, > > I want to extract surface from 3D binary volume. > I found in vtk : two filter vtkContourFilter and vtkMarchningCubes. > I have a doupt which is better ? What's the difference ? > > > I would appreciate for any info. > > > agatte > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/question-vtkContourFilter-vtkMarchingCubes-tp5733626.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Aug 26 09:35:08 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 26 Aug 2015 09:35:08 -0400 Subject: [vtkusers] Plotting line segments with vtkChartXY In-Reply-To: References: Message-ID: Andrew, How are you designating the plot values as (not set)? Are you just not setting them? I'm guessing that the plot is just using whatever the default value is for the array you are plotting, which may be 0. I don't know that vtkChartXY supports your use case. I think you will need to use separate plots for each section of you plot. Sorry if that isn't much help. Cory On Wed, Aug 26, 2015 at 3:41 AM, Andrew Zhilka wrote: > Hi all, > > I am trying to create a line plot. I have already seen an example and my > program works if I have continuous lines. > Let's say I have the following table (continuous case): > > X values | Plot value > 1 | 1 > 2 | 2 > 3 | 3 > 4 | 4 > > This case works perfectly but if I have the following one > > X values | Plot value > 1 | 1 > 2 | (not set) > 3 | (not set) > 4 | 4 > > the plot behaves like if I set the second and the third plot values to 0. > And I just would like to have a gap. Because of this very reason I can not > draw 2 lines independently to achieve the gap like this: > > X values | Plot value 1| Plot value 2 > 1 | 1 | (not set) > 2 | (not set) | (not set) > 3 | (not set) | (not set) > 4 | (not set) | 4 > > Please, advise on what can be done to solve the issue > > Regards, > Andrey > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Aug 26 10:14:16 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 26 Aug 2015 10:14:16 -0400 Subject: [vtkusers] Camera is not updated In-Reply-To: <55D3637F.2070509@gmx.de> References: <55B66E62.8090305@gmx.de> <55B76A9D.405@gmx.de> <55D3637F.2070509@gmx.de> Message-ID: Jens, The resetCamera() call is likely causing your problems. It resets the camera so that all visible objects in the renderer are displayed, so it will overwrite the position that you set. It's a bit of a mystery to me why the callback that creates a new camera doesn't behave the same as the one that uses the active camera. Perhaps the active camera returned by getActiveCamera() is not the same as the renderer's active camera. HTH, Cory On Tue, Aug 18, 2015 at 12:55 PM, Jens Schmidt wrote: > Dear Cory, > > thank you for your reply! It took some time to identify the problem > further. > Please find at the very bottom of this mail a test implementation (java) > showing the problem. The code creates a simple view showing some spheres > and two buttons. The first button uses the camera present, the second one > creates a new camera. > They should behave the same, but don't. I think it is the resetCamera() > method. Maybe i use it wrong? The relevant code is in the > selectionListeners for the buttons. > > Best regards > Jens > > > > Am 29.07.2015 um 03:48 schrieb Cory Quammen: > > Jens, > > Please remember to "reply-all" so that others on the list may benefit from > or contribute to the conversation. > > Do you have a small code sample that reproduces the issue? This kind of > camera manipulation followed by rendering is done all the time (see [1], > for example), so I'm not sure what is going on. > > Thanks, > Cory > > [1] > http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Tutorial/Step3/Java/Cone3.java;h=91e003825bca66e275c22658019b6c52ef1afb75;hb=HEAD > > On Tue, Jul 28, 2015 at 7:42 AM, Jens Schmidt > wrote: > >> Cory, >> >> thx for your reply! Yep called render each time i changed the camera. >> But the only time the camera did what i wanted was with the new camera >> object and setActiveCamera. >> >> Best regards >> Jens >> >> >> >> Am 27.07.2015 um 20:31 schrieb Cory Quammen: >> >>> Jens, >>> >>> Did you try calling your render window's Render() member function after >>> changing the camera properties? Rendering updates are not performed >>> automatically when you change just camera properties. This is actually >>> good >>> because it prevents too many renderings when you update more than one >>> camera property. >>> >>> HTH, >>> Cory >>> >>> On Mon, Jul 27, 2015 at 1:46 PM, Jens Schmidt >>> wrote: >>> >>> Hi Everyone! >>>> >>>> VTK rocks, but we knew that allready. ^^ What rocks less is that the >>>> camera ist not automatically updated when SetPosition or SetFocalPoint >>>> are >>>> called. >>>> Btw i am using the java wrapping with SWT. VtkAbstractComponent has a >>>> reference to the active camera. >>>> Using that had no effect, as was using the renderers GetActiveCamera >>>> method. >>>> In fact i have to create a new vtkCamera, modify that an then pass it to >>>> the renderer as new active camera -> tada change on the screen. >>>> Did i do something wrong or is that how it is supposed to work? >>>> >>>> Thank you >>>> Jens >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > > > Code below here: > ============== > > package CamTest; > > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Button; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Shell; > import org.vtk.VTKLoader; > > import vtk.vtkActor; > import vtk.vtkCamera; > import vtk.vtkPolyDataMapper; > import vtk.vtkSphereSource; > import vtk.rendering.swt.vtkSwtComponent; > > public class CamTest { > > class vtkView extends vtkSwtComponent { > > public vtkView(Composite parentComposite) { > super(parentComposite); > renderer.SetBackground(0.1, 0.2, 0.4); > renderer.SetBackground2(1, 1, 1); > renderer.SetGradientBackground(true); > vtkSwtComponent.attachOrientationAxes(this); > update(); > } > > void setCamera(vtkCamera camera) { > this.camera = camera; > renderer.SetActiveCamera(camera); > } > > void addSpheres(int precision, int numberInX, int numberInY, int > numberInZ) { > vtkSphereSource source = new vtkSphereSource(); > source.SetRadius(1.); > source.SetPhiResolution(precision); > source.SetThetaResolution(precision); > > vtkPolyDataMapper mapper = new vtkPolyDataMapper(); > mapper.SetInputConnection(source.GetOutputPort()); > mapper.Update(); > > for (int i = 0; i < numberInX; i++) { > for (int j = 0; j < numberInY; j++) { > for (int k = 0; k < numberInZ; k++) { > vtkActor actor = new vtkActor(); > actor.SetPosition(4 * i, 4 * j, 4 * k); > actor.SetMapper(mapper); > actor.GetProperty().BackfaceCullingOn(); > renderer.AddActor(actor); > } > } > } > update(); > resetCamera(); > } > } > > private vtkView vtkView; > > private CamTest() { > VTKLoader loader = new VTKLoader(); > loader.loadAll(); > > Display display = new Display(); > Shell shell = new Shell(display); > shell.setText("CamTest"); > GridLayout layout = new GridLayout(2, false); > shell.setLayout(layout); > > vtkView = new vtkView(shell); > GridData data = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1); > data.widthHint = 300; > data.heightHint = 300; > vtkView.getComponent().setLayoutData(data); > > vtkView.addSpheres(10, 10, 10, 10); > > Button isoButton = new Button(shell, SWT.PUSH); > isoButton.setText("ISO VIEW"); > isoButton.addSelectionListener(new SelectionAdapter() { > @Override > public void widgetSelected(SelectionEvent e) { > System.out.println("ISO"); > vtkCamera camera = vtkView.getActiveCamera(); > camera.SetPosition(new double[] { 1., 1., 1. }); > camera.SetViewUp(new double[] { 0., 0., 1. }); > vtkView.resetCamera();// <-- bad line > vtkView.update(); > } > }); > > Button resetButton = new Button(shell, SWT.PUSH); > resetButton.setText("RESET VIEW"); > resetButton.addSelectionListener(new SelectionAdapter() { > @Override > public void widgetSelected(SelectionEvent e) { > System.out.println("RESET"); > vtkCamera newCamera = new vtkCamera(); > newCamera.SetPosition(new double[] { 1., 1., 1. }); > newCamera.SetViewUp(new double[] { 0., 0., 1. }); > vtkView.setCamera(newCamera); > vtkView.resetCamera(); > vtkView.update(); > } > }); > > shell.pack(); > shell.open(); > > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) { > display.sleep(); > } > } > display.dispose(); > } > > public static void main(String[] args) { > CamTest camTest = new CamTest(); > } > > } > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Aug 26 10:19:04 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 26 Aug 2015 10:19:04 -0400 Subject: [vtkusers] How to extract values of vtkpoint coordinates from vtkXMLPolyDataReader In-Reply-To: References: Message-ID: Chiranjib, vtkDataArray * array = polydata->GetPointData()->GetArray(arrayname); A simple way to get individual components is with double * tuple = new double[array->GetNumberOfComponents()]; array->GetTuple(desiredpoint, tuple); delete[] tuple; HTH, Cory On Wed, Aug 19, 2015 at 2:05 AM, Chiranjib Sur wrote: > I think, I have sent this email too quickly. Other than the point > coordinates, if I want to obtain the value of the point attributes, how do > I do that. > > I can understand the point coordinates can be obtained by > > polydata->GetPoints(Id,desirtedpoint). > > What are the alternatives to know the point attributes (scaler/vector) for > the points. > > Thanks again, > Chiranjib > > > ---------- Forwarded message ---------- > From: Chiranjib Sur > Date: Wed, Aug 19, 2015 at 11:31 AM > Subject: How to extract values of vtkpoint coordinates from > vtkXMLPolyDataReader > To: VTK Users > > > Hi, > I want to extract the value of the XMl attributes (e.g. the coordinates of > the VTk points, PointData/Points/DataArray). > > I am able to read the file using vtkXMLPolyDataReder and view it in > ParaView but I want to extract values individually. > > How do I do that? > > Thanks, > Chiranjib > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Aug 26 10:30:30 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 26 Aug 2015 10:30:30 -0400 Subject: [vtkusers] How to filter poly data while preserving point data arrays? In-Reply-To: <1440066528287-5733572.post@n5.nabble.com> References: <1440066528287-5733572.post@n5.nabble.com> Message-ID: Hi normanius, I think the problem is that there is probably no point data array named "Mean_Curvature" in the poly data you are using to make the cut with the boolean operations filter. I think the boolean operations filter will pass on only data arrays that *both* input poly data objects have. A solution would be to add a point data array to your cutting object. Something like: vtkPolyData* cutPolyData = ...; vtkDoubleArray* dummyCurvature = vtkDoubleArray::New(); // maybe you need a vtkFloatArray? dummyCurvature->SetNumberOfComponents(1); dummyCurvature->SetNumberOfTuples(cutPolyData->GetNumberOfPoints()); dummyCurvature->SetName("Mean_Curvature"); // fill in values in dummyCurvature if needed cutPolyData->GetPointData().AddArray(dummyCurvature); // boolean operation filter... HTH, Cory On Thu, Aug 20, 2015 at 6:28 AM, normanius wrote: > Hi everyone. > > I use vtkCurvatures to measure the average curvature of irregular dome-like > surfaces (domeSurface). Because of numerical problems close to the edge of > the dome, I would like to filter away the points close to the edge of the > dome. See attached image: the edge is indicated by a red line, the blue > color indicates the excessively high curvature values close to the edge, > which I want to get rid of. > > < > http://vtk.1045678.n5.nabble.com/file/n5733572/Screen_Shot_2015-08-20_at_11.png > > > > The edge is created by a planar cut and I do have a triangulated > representation of the "missing" face of the dome: cutFace. > > My approach is to use vtkBooleanOperationPolyDataFilter to calculate the > difference between domeCurvature and cutFace - however, this way I loose > the > point data arrays that contain the curvature information of the surface. > This is roughly the processing pipeline: > > domeSurface -> *curvatureFilter* -> domeCurvature -> > *booleanOperationFilter*(intersect with cutFace) -> > domeCurvatureWithoutPointsCloseToEdge > > The problem: while data1 exists, data2 does not exist after the boolean > operation. > data1 = > curvatureFilter.GetOutput().GetPointData().GetArray("Mean_Cuvature") > data2 = > > domeCurvatureWithoutPointsCloseToEdge.GetOutput().GetPointData().GetArray("Mean_Cuvature") > > *So here is my question*: How can I get rid of the points close to the edge > while preserving the curvature data retrieved by the curvature filter? > > Thank you for any suggestions! > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-filter-poly-data-while-preserving-point-data-arrays-tp5733572.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed Aug 26 10:55:17 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 26 Aug 2015 10:55:17 -0400 Subject: [vtkusers] Fwd: XDMF and hyperslabs In-Reply-To: References: Message-ID: That is in fact the xdmf 3 repository. The lib's versioning scheme and ParaView's versioning scheme have disagreed since xdmf 1. lib: 1 1.5 2 pv: 1 2.0 3 Sorry for the confusion I introduced it back in xdmf2 as a workaround for technical issues with the old CVS repository. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Aug 26, 2015 at 6:31 AM, victor sv wrote: > Hi David, > > it seems that if I go to the "Version 3" ( > http://www.xdmf.org/index.php/Version_3) section of the XDMF web page it > only has a link to XDMF version 2 git repository (git:// > public.kitware.com/Xdmf2.git). > > I cannot find a public repo for XDMF v3, could you send me a link to the > public git repo for XDMF v3? > > Thanks again, > V?ctor. > > 2015-08-26 5:38 GMT+02:00 David E DeMarle : > >> Hi Victor, >> >> ARL and Kitware are the primary developers of Xdmf, but everyone is >> invited to contribute to the project. >> >> Yes xdmf3 has not yet replaced xdmf2 within ParaView. The binaries for >> the next ParaView release (the release candidate should have it) will have >> both turned on. Over the next few releases xdmf2 will be deprecated and >> then removed from ParaView. >> >> xdmf itself can be built apart from VTK. On the xdmf wiki there are links >> to the repositories that you can check out to build it standalone. What you >> see in VTK/Thirdparty is a clone of parts of that standalone library. The >> VTK interface to it is in VTK/IO. >> >> hth >> >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Wed, Aug 19, 2015 at 12:03 PM, victor sv wrote: >> >>> Thanks Dan, >>> >>> it was an error in the XDMF file and it seems that is a valid format for >>> Xdmf2. I comment the error between lines below. >>> >>> In a post that I sent to XDMF mailing list they say me that Xdmf3 is not >>> by default in Paraview and I have to compile the sources with the correct >>> options enabling Xdmf3. >>> >>> My problem with the versions is that the XDMF documentation and library >>> versions is not "synchronized". It seems that Kitware is who is developing >>> Xdmf3, but there isn't an stand-alone library, it only exists inside VTK >>> project. I'm right? >>> >>> Thanks again, >>> V?ctor. >>> >>> >>> 2015-08-18 4:09 GMT+02:00 Dan Lipsa : >>> >>>> There are (advanced) options to enable either xdmf2 or xdmf3 in VTK. >>>> >>>> On Fri, Aug 14, 2015 at 6:27 AM, victor sv wrote: >>>> >>>>> >>>>> ---------- Forwarded message ---------- >>>>> From: victor sv >>>>> Date: 2015-08-14 12:25 GMT+02:00 >>>>> Subject: XDMF and hyperslabs >>>>> To: vtkdev , vtk-users at vtk.org, " >>>>> paraview at paraview.org" >>>>> >>>>> >>>>> Hello all, >>>>> >>>>> I'm trying to create and visualize an XDMF/HDF5 file containing a >>>>> partitioned mesh using hyperslabs. >>>>> >>>>> Is this supported by Paraview/VTK ?? >>>>> >>>>> The HDF5 (solution1.h5) looks as follows: >>>>> >>>>> GROUP "/" { >>>>> GROUP "Grid" { >>>>> DATASET "Connectivities" { >>>>> DATATYPE H5T_STD_I32BE >>>>> DATASPACE SIMPLE { ( 18 ) / ( 18 ) } >>>>> DATA { >>>>> (0): 0, 1, 2, 3, 2, 1, 4, 5, 6, 7, 6, 5, 6, 7, 8, 9, 8, 7 >>>>> } >>>>> } >>>>> DATASET "Coordinates" { >>>>> DATATYPE H5T_IEEE_F64BE >>>>> DATASPACE SIMPLE { ( 20 ) / ( 20 ) } >>>>> DATA { >>>>> (0): 0, 0, 1, 0, 0, 0.5, 1, 0.5, 0, 0.5, 1, 0.5, 0, 1, 1, 1, >>>>> 0, 1.5, >>>>> (18): 1, 1.5 >>>>> } >>>>> } >>>>> DATASET "Solution" { >>>>> DATATYPE H5T_IEEE_F64BE >>>>> DATASPACE SIMPLE { ( 10 ) / ( 10 ) } >>>>> DATA { >>>>> (0): 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 >>>>> } >>>>> } >>>>> } >>>>> } >>>>> >>>>> And the XDMF file to represent a 2-triangle (4 points) piece of the >>>>> full mesh is: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> Type="HyperSlab"> >>>>> >>>> >>> The problem is here, the correct dimensions are 2 (triangles) and not 6 >>> (integers) >>> >>> 0 1 6 >>>>> >>>> Precision="4">solution1.h5:Grid/Connectivities >>>>> >>>>> >>>>> >>>>> >>>> Type="HyperSlab"> >>>>> 0 1 8 >>>>> >>>> Precision="8">solution1.h5:Grid/Coordinates >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> I'm trying to use the syntax explained at the XDMF webpage ( >>>>> http://www.xdmf.org/index.php/XDMF_Model_and_Format ), but I'm >>>>> feeling confused about the version of the documentation and current version >>>>> of XDMF library included in VTK library. >>>>> >>>>> Can anyone give me some info about this? >>>>> It is XDMFv3 already public ? >>>>> >>>>> >>>>> Thanks in advance, >>>>> V?ctor. >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Aug 26 11:26:27 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 26 Aug 2015 11:26:27 -0400 Subject: [vtkusers] Combine three single component arrays into one three component array (python) In-Reply-To: <55DC23D6.7060904@gmail.com> References: <55DC23D6.7060904@gmail.com> Message-ID: Jaap, There should be no need to append the different array components in this scenario. It should be handled directly by the numpy_support.numpy_to_vtk function. Try this: import vtk import vtk.util.numpy_support as ns import numpy as np Array = np.empty([235,3]) vtkarr = ns.numpy_to_vtk(num_array=Array, deep=True, array_type=vtk.VTK_DOUBLE) >>> vtkarr.GetNumberOfTuples() 235L >>> vtkarr.GetNumberOfComponents() 3 HTH, Cory On Tue, Aug 25, 2015 at 4:14 AM, Jaap Verheggen wrote: > Hello, > > I am Looking for an easy way to create my point data with Python. I can > make three single component arrays, but do not know how to combine that > into one three component array which I can feed into a vtkpoints container. > > # Let's say I have an array of point data, large enough that a loop should > be avoided > Array = np.empty([235, 3]) > #I can deconstruct the array in x, y and z > VTK_datax = numpy_support.numpy_to_vtk(num_array=Array[:,0].ravel(), > deep=True, array_type=vtk.VTK_DOUBLE) > VTK_datay = numpy_support.numpy_to_vtk(num_array=Array[:,1].ravel(), > deep=True, array_type=vtk.VTK_DOUBLE) > VTK_dataz = numpy_support.numpy_to_vtk(num_array=Array[:,2].ravel(), > deep=True, array_type=vtk.VTK_DOUBLE) > # Maybe I will need a VTK ID array (0..235) Lets just make one > VTK_ID = > numpy_support.numpy_to_vtk(num_array=np.arange(shape(Array)[0]).ravel(), > deep=True, array_type=vtk.VTK_ID_TYPE) > # Now I would like to combine x, y and z data into a single array > VTK_data = vtk.vtkDoubleArray() > VTK_data.SetNumberOfComponents(3) > VTK_data.SetNumberOfTuples(235) > # However, I do not know how to do this, it could be something like this, > VTK_data.SetTuple3(VTK_ID, VTK_datax, VTK_datay, VTK_dataz ) but that > doesn't work with arrays. > # Afterwards, I would like to fill the data array into a points container > points = vtk.vtkPoints() > points.SetData(pcoords) > > Is there a way to combine three single component arrays into a three > component array? > > Thanks in advance, > > > > > > > -- > --------------------------- > Jaap Verheggen > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ndfabia at sandia.gov Wed Aug 26 15:35:36 2015 From: ndfabia at sandia.gov (Fabian, Nathan) Date: Wed, 26 Aug 2015 19:35:36 +0000 Subject: [vtkusers] MPIImageReader limited to INT_MAX sizes Message-ID: Hi, I'm trying to read a ~3gig file into one process in MPIImageReader, but it's failing in ReadSlice because the length has to be an int (around 2gig). Is this expected as a limitation or could this be considered a bug? Thanks, Nathan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hotsmileband at gmail.com Wed Aug 26 16:50:18 2015 From: hotsmileband at gmail.com (Andrew Zhilka) Date: Wed, 26 Aug 2015 23:50:18 +0300 Subject: [vtkusers] Plotting line segments with vtkChartXY In-Reply-To: References: Message-ID: Hi Cory, Yes, I simply do not set values and there is vtkFloatArray underneath. I mentioned that creating new columns for new plots will cause the same behaviour. So I wonder if it is possible to combine several charts in one scene Regards, Andrew 26 ???. 2015 ?. 4:35 PM ???????????? "Cory Quammen" < cory.quammen at kitware.com> ???????: > Andrew, > > How are you designating the plot values as (not set)? Are you just not > setting them? I'm guessing that the plot is just using whatever the default > value is for the array you are plotting, which may be 0. > > I don't know that vtkChartXY supports your use case. I think you will need > to use separate plots for each section of you plot. > > Sorry if that isn't much help. > > Cory > > On Wed, Aug 26, 2015 at 3:41 AM, Andrew Zhilka > wrote: > >> Hi all, >> >> I am trying to create a line plot. I have already seen an example and my >> program works if I have continuous lines. >> Let's say I have the following table (continuous case): >> >> X values | Plot value >> 1 | 1 >> 2 | 2 >> 3 | 3 >> 4 | 4 >> >> This case works perfectly but if I have the following one >> >> X values | Plot value >> 1 | 1 >> 2 | (not set) >> 3 | (not set) >> 4 | 4 >> >> the plot behaves like if I set the second and the third plot values to 0. >> And I just would like to have a gap. Because of this very reason I can not >> draw 2 lines independently to achieve the gap like this: >> >> X values | Plot value 1| Plot value 2 >> 1 | 1 | (not set) >> 2 | (not set) | (not set) >> 3 | (not set) | (not set) >> 4 | (not set) | 4 >> >> Please, advise on what can be done to solve the issue >> >> Regards, >> Andrey >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From victorsv at gmail.com Thu Aug 27 05:04:20 2015 From: victorsv at gmail.com (victor sv) Date: Thu, 27 Aug 2015 11:04:20 +0200 Subject: [vtkusers] Fwd: XDMF and hyperslabs In-Reply-To: References: Message-ID: Ok, thanks David, I think that versioning number is not the only problem, I know that XDMF is under active development and the last commit of (git:// public.kitware.com/Xdmf2.git) repository is: commit 06d2b52b133772a8c3368135a8d31c0de3dc0a3c Author: Kenneth Leiter Date: Mon Jul 21 11:44:59 2014 -0400 This is my last questin, there isn't any new feature or commit since 2014? Thanks again for your patience, you are very kind. V?ctor. 2015-08-26 16:55 GMT+02:00 David E DeMarle : > That is in fact the xdmf 3 repository. > > The lib's versioning scheme and ParaView's versioning scheme have > disagreed since xdmf 1. > > lib: 1 1.5 2 > pv: 1 2.0 3 > > Sorry for the confusion I introduced it back in xdmf2 as a workaround for > technical issues with the old CVS repository. > > > > > > > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Wed, Aug 26, 2015 at 6:31 AM, victor sv wrote: > >> Hi David, >> >> it seems that if I go to the "Version 3" ( >> http://www.xdmf.org/index.php/Version_3) section of the XDMF web page it >> only has a link to XDMF version 2 git repository (git:// >> public.kitware.com/Xdmf2.git). >> >> I cannot find a public repo for XDMF v3, could you send me a link to the >> public git repo for XDMF v3? >> >> Thanks again, >> V?ctor. >> >> 2015-08-26 5:38 GMT+02:00 David E DeMarle : >> >>> Hi Victor, >>> >>> ARL and Kitware are the primary developers of Xdmf, but everyone is >>> invited to contribute to the project. >>> >>> Yes xdmf3 has not yet replaced xdmf2 within ParaView. The binaries for >>> the next ParaView release (the release candidate should have it) will have >>> both turned on. Over the next few releases xdmf2 will be deprecated and >>> then removed from ParaView. >>> >>> xdmf itself can be built apart from VTK. On the xdmf wiki there are >>> links to the repositories that you can check out to build it standalone. >>> What you see in VTK/Thirdparty is a clone of parts of that standalone >>> library. The VTK interface to it is in VTK/IO. >>> >>> hth >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Wed, Aug 19, 2015 at 12:03 PM, victor sv wrote: >>> >>>> Thanks Dan, >>>> >>>> it was an error in the XDMF file and it seems that is a valid format >>>> for Xdmf2. I comment the error between lines below. >>>> >>>> In a post that I sent to XDMF mailing list they say me that Xdmf3 is >>>> not by default in Paraview and I have to compile the sources with the >>>> correct options enabling Xdmf3. >>>> >>>> My problem with the versions is that the XDMF documentation and library >>>> versions is not "synchronized". It seems that Kitware is who is developing >>>> Xdmf3, but there isn't an stand-alone library, it only exists inside VTK >>>> project. I'm right? >>>> >>>> Thanks again, >>>> V?ctor. >>>> >>>> >>>> 2015-08-18 4:09 GMT+02:00 Dan Lipsa : >>>> >>>>> There are (advanced) options to enable either xdmf2 or xdmf3 in VTK. >>>>> >>>>> On Fri, Aug 14, 2015 at 6:27 AM, victor sv wrote: >>>>> >>>>>> >>>>>> ---------- Forwarded message ---------- >>>>>> From: victor sv >>>>>> Date: 2015-08-14 12:25 GMT+02:00 >>>>>> Subject: XDMF and hyperslabs >>>>>> To: vtkdev , vtk-users at vtk.org, " >>>>>> paraview at paraview.org" >>>>>> >>>>>> >>>>>> Hello all, >>>>>> >>>>>> I'm trying to create and visualize an XDMF/HDF5 file containing a >>>>>> partitioned mesh using hyperslabs. >>>>>> >>>>>> Is this supported by Paraview/VTK ?? >>>>>> >>>>>> The HDF5 (solution1.h5) looks as follows: >>>>>> >>>>>> GROUP "/" { >>>>>> GROUP "Grid" { >>>>>> DATASET "Connectivities" { >>>>>> DATATYPE H5T_STD_I32BE >>>>>> DATASPACE SIMPLE { ( 18 ) / ( 18 ) } >>>>>> DATA { >>>>>> (0): 0, 1, 2, 3, 2, 1, 4, 5, 6, 7, 6, 5, 6, 7, 8, 9, 8, 7 >>>>>> } >>>>>> } >>>>>> DATASET "Coordinates" { >>>>>> DATATYPE H5T_IEEE_F64BE >>>>>> DATASPACE SIMPLE { ( 20 ) / ( 20 ) } >>>>>> DATA { >>>>>> (0): 0, 0, 1, 0, 0, 0.5, 1, 0.5, 0, 0.5, 1, 0.5, 0, 1, 1, 1, >>>>>> 0, 1.5, >>>>>> (18): 1, 1.5 >>>>>> } >>>>>> } >>>>>> DATASET "Solution" { >>>>>> DATATYPE H5T_IEEE_F64BE >>>>>> DATASPACE SIMPLE { ( 10 ) / ( 10 ) } >>>>>> DATA { >>>>>> (0): 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 >>>>>> } >>>>>> } >>>>>> } >>>>>> } >>>>>> >>>>>> And the XDMF file to represent a 2-triangle (4 points) piece of the >>>>>> full mesh is: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> Type="HyperSlab"> >>>>>> >>>>> >>>> The problem is here, the correct dimensions are 2 (triangles) and not 6 >>>> (integers) >>>> >>>> 0 1 6 >>>>>> >>>>> Precision="4">solution1.h5:Grid/Connectivities >>>>>> >>>>>> >>>>>> >>>>>> >>>>> Type="HyperSlab"> >>>>>> 0 1 8 >>>>>> >>>>> Precision="8">solution1.h5:Grid/Coordinates >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> I'm trying to use the syntax explained at the XDMF webpage ( >>>>>> http://www.xdmf.org/index.php/XDMF_Model_and_Format ), but I'm >>>>>> feeling confused about the version of the documentation and current version >>>>>> of XDMF library included in VTK library. >>>>>> >>>>>> Can anyone give me some info about this? >>>>>> It is XDMFv3 already public ? >>>>>> >>>>>> >>>>>> Thanks in advance, >>>>>> V?ctor. >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Thu Aug 27 09:53:06 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Thu, 27 Aug 2015 06:53:06 -0700 (MST) Subject: [vtkusers] Use vtkImageSlice GPU. Message-ID: <1440683586387-5733641.post@n5.nabble.com> Use vtkImageSlice with vtkImageResliceMapper-> SetSlabThickness (images of the maximum file MHD), is around + - 100 images added. use to have this vision: the problem is that when utilizdo any camera movement (vtkInteractorStyleTrackballCamera) for this object, it is processed on the CPU rather than the GPU. I saw an old post that the interpolator Imageslice does not work with the GPU, but that in 2011 an old version of VTK. (http://www.vtk.org/Wiki/VTK/Image_Interpolators) nowadays it is already possible to pass this processing to the GPU? Has some way to ease the locking of this object when it is rendered? I am using a computer with the following settings: video card nvidia 730 intel i7 (3770) 3rd generation Memory 16gb and still move this object becomes unfeasible with active SetSlabThickness for me. -- View this message in context: http://vtk.1045678.n5.nabble.com/Use-vtkImageSlice-GPU-tp5733641.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Aug 27 10:51:22 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 27 Aug 2015 08:51:22 -0600 Subject: [vtkusers] Use vtkImageSlice GPU. In-Reply-To: <1440683586387-5733641.post@n5.nabble.com> References: <1440683586387-5733641.post@n5.nabble.com> Message-ID: Hi Jose, The slab mode of vtkImageResliceMapper uses the CPU. If you need really fast slabs, you should use VTK's GPU volume rendering. To make vtkImageResliceMapper's slab mode go a little faster, you can play with the SetSlabSampleFactor() method and SetImageSampleFactor() method. - David On Thu, Aug 27, 2015 at 7:53 AM, Jose Barreto wrote: > > Use vtkImageSlice with vtkImageResliceMapper-> SetSlabThickness (images of > the maximum file MHD), is around + - 100 images added. > > use to have this vision: > the problem is that when utilizdo any camera movement > (vtkInteractorStyleTrackballCamera) for this object, it is processed on the > CPU rather than the GPU. > > I saw an old post that the interpolator Imageslice does not work with the > GPU, but that in 2011 an old version of VTK. > (http://www.vtk.org/Wiki/VTK/Image_Interpolators) > > nowadays it is already possible to pass this processing to the GPU? > Has some way to ease the locking of this object when it is rendered? > > I am using a computer with the following settings: > video card nvidia 730 > intel i7 (3770) 3rd generation > Memory 16gb > > and still move this object becomes unfeasible with active SetSlabThickness > for me. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Aug 27 11:00:53 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 27 Aug 2015 11:00:53 -0400 Subject: [vtkusers] Plotting line segments with vtkChartXY In-Reply-To: References: Message-ID: Andrew, Do you have a picture illustrating what you are trying to do, as well as code sample of what you have tried? I'm not 100% sure I know what you are trying to accomplish. Thanks, Cory On Wed, Aug 26, 2015 at 4:50 PM, Andrew Zhilka wrote: > Hi Cory, > > Yes, I simply do not set values and there is vtkFloatArray underneath. > I mentioned that creating new columns for new plots will cause the same > behaviour. > So I wonder if it is possible to combine several charts in one scene > > Regards, > Andrew > 26 ???. 2015 ?. 4:35 PM ???????????? "Cory Quammen" < > cory.quammen at kitware.com> ???????: > > Andrew, >> >> How are you designating the plot values as (not set)? Are you just not >> setting them? I'm guessing that the plot is just using whatever the default >> value is for the array you are plotting, which may be 0. >> >> I don't know that vtkChartXY supports your use case. I think you will >> need to use separate plots for each section of you plot. >> >> Sorry if that isn't much help. >> >> Cory >> >> On Wed, Aug 26, 2015 at 3:41 AM, Andrew Zhilka >> wrote: >> >>> Hi all, >>> >>> I am trying to create a line plot. I have already seen an example and my >>> program works if I have continuous lines. >>> Let's say I have the following table (continuous case): >>> >>> X values | Plot value >>> 1 | 1 >>> 2 | 2 >>> 3 | 3 >>> 4 | 4 >>> >>> This case works perfectly but if I have the following one >>> >>> X values | Plot value >>> 1 | 1 >>> 2 | (not set) >>> 3 | (not set) >>> 4 | 4 >>> >>> the plot behaves like if I set the second and the third plot values to >>> 0. And I just would like to have a gap. Because of this very reason I can >>> not draw 2 lines independently to achieve the gap like this: >>> >>> X values | Plot value 1| Plot value 2 >>> 1 | 1 | (not set) >>> 2 | (not set) | (not set) >>> 3 | (not set) | (not set) >>> 4 | (not set) | 4 >>> >>> Please, advise on what can be done to solve the issue >>> >>> Regards, >>> Andrey >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. >> > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Thu Aug 27 12:26:30 2015 From: fotosentido at gmail.com (Marcos) Date: Thu, 27 Aug 2015 18:26:30 +0200 Subject: [vtkusers] vtkImageViewer2 and QVTKWidget Message-ID: I have an image loaded in vtkImageViewer2 (from itk::ImageToVTKImageFilter). The point is when I update the pipeline... a window appears and disappears instantly. I'm trying to connect these two buddies, but I'm unsure which render or renderWindow assign to who. I've tried different things reading examples (people try a lot of things!). Right now my code is this: vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputData(con->GetOutput()); imageViewer->Render(); //ui->qvtkwidget->SetRenderWindow(imageViewer->GetRenderWindow()); imageViewer->SetupInteractor(ui->qvtkwidget->GetRenderWindow()->GetInteractor()); //imageViewer->SetRenderWindow(ui->qvtkwidget->GetRenderWindow()); imageViewer->Render(); //renderer->ResetCamera(); //renderWindow->AddRenderer(renderer); //renderWindow->Render(); //vtkSmartPointer interactor = vtkSmartPointer::New(); //vtkSmartPointer style = vtkSmartPointer::New(); //interactor->SetInteractorStyle(style); //interactor->SetRenderWindow(renderWindow); //interactor->Initialize(); //renderWindow->Start(); //ui->qvtkwidget->GetRenderWindow()->GetInteractor()->Initialize(); ui->qvtkwidget->show(); The commented lines were uncommented sometimes, trying to find out the correct sequence, but unsuccessfully. Any idea? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Thu Aug 27 12:40:04 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Thu, 27 Aug 2015 12:40:04 -0400 Subject: [vtkusers] VTK and ParaView for HPCWire awards! Message-ID: VTK and ParaView have witnessed significant growth thanks to all of the members of the community. To recognize VTK and ParaView?s development, please nominate them for 2015 HPCwire Readers? and Editors? Choice Awards. Please nominate VTK and ParaView for ?Best HPC Visualization Product or Technology.? Nominations can be made at http://www.hpcwire.com/2015-hpcwire-readers-choice-awards/. Thank you for your support! -berk -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Thu Aug 27 14:23:59 2015 From: fotosentido at gmail.com (Marcos) Date: Thu, 27 Aug 2015 20:23:59 +0200 Subject: [vtkusers] vtkImageViewer2 and QVTKWidget In-Reply-To: References: Message-ID: Still having the problem, trying to simplify: con->SetInput(modelo->getImageToSave()); con->Update(); imageData->DeepCopy(con->GetOutput()); imageViewer->SetInputData(con->GetOutput()); imageViewer->GetRenderer()->ResetCamera(); imageViewer->Render(); ui->qvtkwidget->SetRenderWindow(imageViewer->GetRenderWindow()); ui->qvtkwidget->GetRenderWindow()->SetInteractor(imageViewer->GetRenderWindow()->GetInteractor()); ui->qvtkwidget->update(); I'll keep on trying. I would appreciate any help on this. 2015-08-27 18:26 GMT+02:00 Marcos : > I have an image loaded in vtkImageViewer2 (from > itk::ImageToVTKImageFilter). > > The point is when I update the pipeline... a window appears and disappears > instantly. > > I'm trying to connect these two buddies, but I'm unsure which render or > renderWindow assign to who. > > I've tried different things reading examples (people try a lot of > things!). Right now my code is this: > > vtkSmartPointer imageViewer = vtkSmartPointer::New(); > > imageViewer->SetInputData(con->GetOutput()); > > imageViewer->Render(); > > > //ui->qvtkwidget->SetRenderWindow(imageViewer->GetRenderWindow()); > > imageViewer->SetupInteractor(ui->qvtkwidget->GetRenderWindow()->GetInteractor()); > > > > //imageViewer->SetRenderWindow(ui->qvtkwidget->GetRenderWindow()); > > imageViewer->Render(); > > //renderer->ResetCamera(); > > > //renderWindow->AddRenderer(renderer); > > //renderWindow->Render(); > > > //vtkSmartPointer interactor = vtkSmartPointer::New(); > > //vtkSmartPointer style = vtkSmartPointer::New(); > > //interactor->SetInteractorStyle(style); > > //interactor->SetRenderWindow(renderWindow); > > //interactor->Initialize(); > > > //renderWindow->Start(); > > > //ui->qvtkwidget->GetRenderWindow()->GetInteractor()->Initialize(); > > > ui->qvtkwidget->show(); > > > The commented lines were uncommented sometimes, trying to find out the correct sequence, but unsuccessfully. > > > Any idea? > > Thank you. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From siavashk at ece.ubc.ca Thu Aug 27 14:30:51 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Thu, 27 Aug 2015 11:30:51 -0700 (MST) Subject: [vtkusers] vtkImageViewer2 and QVTKWidget In-Reply-To: References: Message-ID: <1440700251219-5733651.post@n5.nabble.com> Hi Marcos, What if you try adding the following line to your code ;) ui->qvtkwidget->GetRenderWindow()->GetInteractor()->Start(); Siavash -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageViewer2-and-QVTKWidget-tp5733647p5733651.html Sent from the VTK - Users mailing list archive at Nabble.com. From fotosentido at gmail.com Thu Aug 27 15:02:18 2015 From: fotosentido at gmail.com (Marcos) Date: Thu, 27 Aug 2015 21:02:18 +0200 Subject: [vtkusers] vtkImageViewer2 and QVTKWidget In-Reply-To: <1440700251219-5733651.post@n5.nabble.com> References: <1440700251219-5733651.post@n5.nabble.com> Message-ID: Hi Siavash, thank you for responding, I appreciate it. I added that line at the end, and I got a new window with the text: ERROR: In C:\VTK-6.2.0\GUISupport\Qt\QVTKInteractor.cxx, line 147 QVTKInteractor (08ECEE60): QVTKInteractor cannot control the event loop. On the other hand, I guess I know what the problem is. I didn't imagine it could be that. This code is inside a .cpp from a class named ViewerWidget. ViewerWidget is a QWidget class, with an associated .ui file where I designed the widget: just a QVTKWidget inside. So in my MainWindow form (Qt Designer) I put that ViewerWidget. >From this code, I could access my QVTKWidget, but maybe it's not correctly initiated. Why do I think this is the problem? Because I added a QVTKWidget to MainWindow form, and passed a pointer to my ViewerWidget class. And the image is loaded and I can see it. I've spent a lot of time trying different codes (as I said, I saw a lot of differents aproaches -renderers and interactors from one to another and viceversa, classes like VTKImageExport, setting to vtkActor, etc-) Maybe I shouldn't create the widget and just have the QVTKWidget where I know it works, not inside another custom widget. I just wanted to encapsulate things. I'll leave the QVTKWidget in the MainWindow. Thanks for your time. 2015-08-27 20:30 GMT+02:00 Siavash Khallaghi : > Hi Marcos, > > What if you try adding the following line to your code ;) > > ui->qvtkwidget->GetRenderWindow()->GetInteractor()->Start(); > > Siavash > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkImageViewer2-and-QVTKWidget-tp5733647p5733651.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From siavashk at ece.ubc.ca Thu Aug 27 19:25:47 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Thu, 27 Aug 2015 16:25:47 -0700 (MST) Subject: [vtkusers] vtkImageViewer2 and QVTKWidget In-Reply-To: References: <1440700251219-5733651.post@n5.nabble.com> Message-ID: <1440717947044-5733653.post@n5.nabble.com> This seems to be a known issue for QVTKWidget and ImageViewer2. See the following: https://www.google.ca/search?q=QVTKInteractor+cannot+control+the+event+loop&ie=utf-8&oe=utf-8&gws_rd=cr&ei=BpvfVYq4NpLdoAS83YXwBQ#q=QVTKInteractor+cannot+control+the+event+loop+site:public.kitware.com For the record, I am developing a Qt GUI with a QVTKWidget myself to display 2D images. I did not run into the same problem as you, but then again, I wrote my interactor from scratch to solve some specific issues. Can you try adding the following line and see if it works. This is referenced in: http://public.kitware.com/pipermail/vtkusers/2010-August/061832.html qvtkWidget->ProcessEventsOn(); Siavash -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageViewer2-and-QVTKWidget-tp5733647p5733653.html Sent from the VTK - Users mailing list archive at Nabble.com. From siavashk at ece.ubc.ca Thu Aug 27 20:00:26 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Thu, 27 Aug 2015 17:00:26 -0700 (MST) Subject: [vtkusers] Annotations for Medical Images Message-ID: <1440720026516-5733654.post@n5.nabble.com> Hello, I am developing my own medical image viewer (something like 3D Slicer or ITK-Snap ). I have written the GUI using Qt and I use a QVTKWidget to display images. I am using the vtkInteractorStyleUser to interact (zooming/panning) with my images. So far everything works fine. Now, I would like to add a new feature. If the user presses a keyboard shortcut or presses a button, he/she should be able to create annotations (e.g., draw basic shapes, contours or write text) on the images. I need a suitable container class for this. Does VTK come with this functionality? If there is something like this already within VTK, I would rather not reinvent the wheel. I would also rather steer away from commercial solutions, such as LeadTools . Thanks, Siavash -- View this message in context: http://vtk.1045678.n5.nabble.com/Annotations-for-Medical-Images-tp5733654.html Sent from the VTK - Users mailing list archive at Nabble.com. From berk.geveci at kitware.com Fri Aug 28 10:36:55 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Fri, 28 Aug 2015 10:36:55 -0400 Subject: [vtkusers] Removed Examples/SMP Message-ID: Hi folks, Just a quick to mention that we removed the Examples/SMP directory. This contained some half-baked examples that no longer represents well the direction the SMP work is going. The best examples are in Filters/SMP. These will also disappear in time as we integrate the SMP functionality more directly into core algorithms. Best, -berk -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Aug 28 10:41:05 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 28 Aug 2015 10:41:05 -0400 Subject: [vtkusers] New volume rendering feature Message-ID: Folks, We have a branch (https://gitlab.kitware.com/vtk/vtk/merge_requests/601) that enables uses to export Depth and Color texture from volume mapper. This is something useful if you are doing deferred rendering of some sort of remote rendering. Along with this, we have pushed some other bug fixes and few new features which we will report in a blog soon. Please let us know if you have any questions. Thanks -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Fri Aug 28 10:48:51 2015 From: fotosentido at gmail.com (Marcos) Date: Fri, 28 Aug 2015 16:48:51 +0200 Subject: [vtkusers] vtkImageViewer2 and QVTKWidget In-Reply-To: <1440717947044-5733653.post@n5.nabble.com> References: <1440700251219-5733651.post@n5.nabble.com> <1440717947044-5733653.post@n5.nabble.com> Message-ID: Hi, I've tried to include that line, but that method it's not available neither in QVTKWidget nor QVTKWidget2 (vtk version 6.2.0). I'm gonna keep with the easiest solution, keep the widget in MainWindow :) Thanks again. 2015-08-28 1:25 GMT+02:00 Siavash Khallaghi : > This seems to be a known issue for QVTKWidget and ImageViewer2. See the > following: > > > https://www.google.ca/search?q=QVTKInteractor+cannot+control+the+event+loop&ie=utf-8&oe=utf-8&gws_rd=cr&ei=BpvfVYq4NpLdoAS83YXwBQ#q=QVTKInteractor+cannot+control+the+event+loop+site:public.kitware.com > > For the record, I am developing a Qt GUI with a QVTKWidget myself to > display > 2D images. I did not run into the same problem as you, but then again, I > wrote my interactor from scratch to solve some specific issues. > > Can you try adding the following line and see if it works. This is > referenced in: > > http://public.kitware.com/pipermail/vtkusers/2010-August/061832.html > > qvtkWidget->ProcessEventsOn(); > > Siavash > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkImageViewer2-and-QVTKWidget-tp5733647p5733653.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From serge at infolytica.com Fri Aug 28 11:57:51 2015 From: serge at infolytica.com (Serge Lalonde) Date: Fri, 28 Aug 2015 11:57:51 -0400 Subject: [vtkusers] Scale ticks and labels based on zoom in vtkCubeAxesActor? Message-ID: <55E084FF.6010709@infolytica.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: R2015-2-14spr.png Type: image/png Size: 92711 bytes Desc: not available URL: From siavashk at ece.ubc.ca Fri Aug 28 13:38:29 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Fri, 28 Aug 2015 10:38:29 -0700 (MST) Subject: [vtkusers] vtkImageViewer2 and QVTKWidget In-Reply-To: References: <1440700251219-5733651.post@n5.nabble.com> <1440717947044-5733653.post@n5.nabble.com> Message-ID: <1440783509262-5733663.post@n5.nabble.com> Maybe you want to take a step back for a second and try to isolate the problem. There problem is either: 1. on the VTK side. or 2. with connecting VTK to Qt. I think that QVTKWidget is similar to a vtkRendererWindow class. If you instantiate a vtkRenderWindow and connect your pipeline to it, will you get the same error? If this happens, there is most likely a bug in your code. If not, we can explore the second option. Siavash -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageViewer2-and-QVTKWidget-tp5733647p5733663.html Sent from the VTK - Users mailing list archive at Nabble.com. From jose.de.paula at live.com Fri Aug 28 14:07:38 2015 From: jose.de.paula at live.com (Jose Barreto) Date: Fri, 28 Aug 2015 11:07:38 -0700 (MST) Subject: [vtkusers] vtkLineWidget2 changes in reference points Message-ID: <1440785258094-5733664.post@n5.nabble.com> it is possible to change the GetPoint1Representation () and GetPoint2Representation () from a vtkLineWidget2? I need to delete one of the points, and the next change its form, connecting for example a mapper http://www.paraview.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Arrow. What happens is that not only n I exchange this mapper, as well as the point does not erase, even me calling visibleOff -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkLineWidget2-changes-in-reference-points-tp5733664.html Sent from the VTK - Users mailing list archive at Nabble.com. From dan.lipsa at kitware.com Fri Aug 28 15:24:54 2015 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Fri, 28 Aug 2015 15:24:54 -0400 Subject: [vtkusers] Scale ticks and labels based on zoom in vtkCubeAxesActor? In-Reply-To: <55E084FF.6010709@infolytica.com> References: <55E084FF.6010709@infolytica.com> Message-ID: Serge, Take a look at the new AxesGrid in ParaView from git master. I think it does what you need. You may be able to use the classes that do that from ParaView. find . -name '*GridAxes*' You'll have to either upgrade to latest VTK or backport these classes to your VTK. Dan On Fri, Aug 28, 2015 at 11:57 AM, Serge Lalonde wrote: > Does anyone know how (or if it's even possible) to scale the tick marks > and labels based on the zoom factor. > That is, as we zoom in, more tick marks and labels are added and as we > zoom out, fewer tick marks are rendered since they get squeezed in the > pixels. > > Basically, I'd like to avoid this situation when I zoom in: > > > I'm currently using vtkCubeAxesActor with VTK 6.1. > > Thanks. > -- > www.infolytica.com > 300 Leo Pariseau, Suite 2222, Montreal, QC, Canada, H2X 4B3 > (514) 849-8752 x236, Fax: (514) 849-4239 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: R2015-2-14spr.png Type: image/png Size: 92711 bytes Desc: not available URL: From dzenanz at gmail.com Fri Aug 28 15:35:00 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 28 Aug 2015 15:35:00 -0400 Subject: [vtkusers] How to convert 2D to 3D(DICOM images) with degrees (3, 6, 9, ..., 357) In-Reply-To: <1440481522083-5733616.post@n5.nabble.com> References: <1440481522083-5733616.post@n5.nabble.com> Message-ID: This might be helpful: https://www.assembla.com/spaces/plus/subversion/source/HEAD/trunk/PlusLib/src/VolumeReconstruction/vtkPasteSliceIntoVolume.cxx You can also browse the rest of PLUS toolkit: https://www.assembla.com/spaces/plus/wiki On Tue, Aug 25, 2015 at 1:45 AM, jasonhym wrote: > Dear Sir, > > I want to read a set of DICOM images and display(visualize) it as 3D image. > Circle is 360 degrees > Every 3 degrees placing 2D dicom > So put 120 of 2D dicom > How to Combined into 3D image ? > Please help me how to do it or where I could find the tutorial of this > problem(using C++). > Thanks a lot > > Jason > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-convert-2D-to-3D-DICOM-images-with-degrees-3-6-9-357-tp5733616.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Aug 28 15:41:25 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 28 Aug 2015 15:41:25 -0400 Subject: [vtkusers] New volume rendering feature In-Reply-To: References: Message-ID: In addition to this work, there have been some exciting progress in the OpenGL2 GPU volume mapper. While we work on a blog demonstrating the new features, here is the high-level bulletin: - Support for multi-component datasets wherein each component can be represented independently or in a way such that all the component values are utilized to lookup the final color and opacity. - A major performance improvement (~300%) was achieved by optimizing the computation of the lighting model. - The new volume mapper now supports the OpenGL 3.2 core context and offloads most of the calculations including bias and scale computations to the GPU Please let us know if you have any questions or concerns. - Aashish On Fri, Aug 28, 2015 at 10:41 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Folks, > > We have a branch (https://gitlab.kitware.com/vtk/vtk/merge_requests/601) > that enables uses to export Depth and Color texture from volume mapper. > This is something useful if you are doing deferred rendering of some sort > of remote rendering. Along with this, we have pushed some other bug fixes > and few new features which we will report in a blog soon. > > Please let us know if you have any questions. > > Thanks > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Fri Aug 28 16:44:26 2015 From: matimontg at gmail.com (Matias Montroull) Date: Fri, 28 Aug 2015 20:44:26 +0000 Subject: [vtkusers] ActiViz Compile Errors Message-ID: Hi, I've downloaded Activiz 6.2 and was trying to compile (Using VS2008) and I get 151 errors. I was able to compile gccxml and mummy and now ActiViz throws errors like these (I only list some) Error 3658 fatal error LNK1104: cannot open file 'vtkRenderingFreeTypeOpenGL.lib' Kitware.VTK.vtkImagingCore.Unmanaged Error 3675 fatal error C1083: Cannot open source file: '.\export-layer\vtkGeoAlignedImageRepresentationEL.cxx': No such file or directory c1xx Error 3684 fatal error C1083: Cannot open source file: '.\export-layer\vtkGeoSourceEL.cxx': No such file or directory c1xx Error 3765 error PRJ0019: A tool returned an error code from "Building C# library 'Kitware.VTK'..." Kitware.VTK Error 3761 error PRJ0019: A tool returned an error code from "Generating bin/Debug/vtkzlib-6.2.dll" Kitware.VTK.CopyDLLs Error 3323 error: 'vtkViewUpdater' does not name a type C:/Users/montroul/Downloads/Programacion/ActiViz/activizdotnet_build/xml/vtkViewUpdater_gccxml.cxx:12 Any clues what could be causing these type of errors? May it be related to Mummy? *I saw there seems to be a different compile process for VTK6 *here: http://www.vtk.org/Wiki/VTK/CSharp/ActiViz/Build Current Status There is an updated version of the wrappers under review for VTK6 with new modular source base: http://www.vtk.org/Wiki/VTK/CSharp/ComingSoon Should I follow the regular process described in that web page or should I try the one listed under *Current Status*? Thank you, Matias. -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Fri Aug 28 19:29:48 2015 From: fotosentido at gmail.com (Marcos) Date: Sat, 29 Aug 2015 01:29:48 +0200 Subject: [vtkusers] ITK + VTK + multiframe dicom files: getMaxSlice() always 0 Message-ID: Hi, I'm using itk::ImageToVTKImageFilter to connect itk::ImageFileReader with vtkImageViewer2. I can visualize my image in QVTKWidget. I'd like to access every frame, but vtkImageViewer2::getMaxSlice() is returning 0 every time. I'm connecting the pipeline with: imageData->DeepCopy(connector->GetOutput()); imageViewer->SetInputData(imageData); I understand that in VTK 6 this is the way. Could I access to every frame from VTK? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fotosentido at gmail.com Fri Aug 28 20:31:59 2015 From: fotosentido at gmail.com (Marcos) Date: Sat, 29 Aug 2015 02:31:59 +0200 Subject: [vtkusers] ITK + VTK + multiframe dicom files: getMaxSlice() always 0 In-Reply-To: References: Message-ID: I finally found out that the problem was reading from itk. My itk::Image object had 2 dimensions, so I set it to 3 and now I can get the frames from vtk. Hope that this helps somebody too. 2015-08-29 1:29 GMT+02:00 Marcos : > Hi, > > I'm using itk::ImageToVTKImageFilter to connect itk::ImageFileReader with > vtkImageViewer2. > > I can visualize my image in QVTKWidget. > > I'd like to access every frame, but vtkImageViewer2::getMaxSlice() is > returning 0 every time. > > I'm connecting the pipeline with: > > imageData->DeepCopy(connector->GetOutput()); > > imageViewer->SetInputData(imageData); > > > I understand that in VTK 6 this is the way. > > Could I access to every frame from VTK? > > Thanks. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 2130220212 at email.szu.edu.cn Sat Aug 29 00:59:12 2015 From: 2130220212 at email.szu.edu.cn (Jason) Date: Fri, 28 Aug 2015 21:59:12 -0700 (MST) Subject: [vtkusers] How to save a sphere into image volume with a specific position Message-ID: <1440824352164-5733673.post@n5.nabble.com> Hi, I'm trying to insert a sphereSource object into an image volume in a specific position, and generate a new volume dataset which includes the sphereSource object. I have no idea how to generate a new vtkImageData which includes both image volume and spheresource object. Any idea would be help. Regards, Jason -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-save-a-sphere-into-image-volume-with-a-specific-position-tp5733673.html Sent from the VTK - Users mailing list archive at Nabble.com. From 2130220212 at email.szu.edu.cn Sat Aug 29 03:33:38 2015 From: 2130220212 at email.szu.edu.cn (Jason) Date: Sat, 29 Aug 2015 00:33:38 -0700 (MST) Subject: [vtkusers] How to save a sphere into image volume with a specific position In-Reply-To: <1440824352164-5733673.post@n5.nabble.com> References: <1440824352164-5733673.post@n5.nabble.com> Message-ID: <1440833618147-5733674.post@n5.nabble.com> I have looked into this post in 2010,and it seems it's what i exactly looking for, but the link is obsoleted. http://vtk.1045678.n5.nabble.com/Fill-ImageData-with-constant-value-in-aspherical-volume-td2806206.html#a2807562 Any idea could help! Jason -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-save-a-sphere-into-image-volume-with-a-specific-position-tp5733673p5733674.html Sent from the VTK - Users mailing list archive at Nabble.com. From marcin.krotkiewski at gmail.com Sat Aug 29 12:11:45 2015 From: marcin.krotkiewski at gmail.com (marcin.krotkiewski) Date: Sat, 29 Aug 2015 18:11:45 +0200 Subject: [vtkusers] vtkPropPicker _very_ slow Message-ID: <55E1D9C1.4020406@gmail.com> Hello, I have noticed that vtkPropPicker works much slower than, e.g., vtkCellPicker in my code (I use the Java bindings and add one surface actor to the scene). I have tested vtk-6.1, vtk-6.2 and vtk-6.3-rc2. The latter two versions I also tried with the OpenGL2 back-end (6.2 crashes in this case, but that seems to be a known issue, apparently fixed in 6.3). Here is example time it takes to pick on 1 surface with n points num. of points 4.5e3 1.5e6 vtkPropPicker 0.152258s 40s vtkCellPicker 0.005986s 1s This seems really weird, since vtkPropPicker is supposed to be the faster one. The difference is quite dramatic and consistent on all VTK releases I have checked. Am I doing sth. wrong? Is it my graphics card, or maybe the drivers, or is it VTK? I'd appreciate some hints. Thanks, Marcin Krotkiewski From marco.dev.open at gmail.com Sat Aug 29 12:18:52 2015 From: marco.dev.open at gmail.com (Marco Dev) Date: Sat, 29 Aug 2015 20:48:52 +0430 Subject: [vtkusers] compare between MITK.ORG AND 3D SLICER Message-ID: Hi, I want to choice between MITK and 3d slicer for working in medical features which one is powerful and going to improving in aspect code and example ... Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From siavashk at ece.ubc.ca Sat Aug 29 13:02:52 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Sat, 29 Aug 2015 10:02:52 -0700 Subject: [vtkusers] compare between MITK.ORG AND 3D SLICER In-Reply-To: References: Message-ID: I don't think this question has an answer without knowing what you are trying to do. For example, if you work with ultrasound, I would use 3D Slicer since it is supported by the Plus community. Siavash Sent from my iPhone > On Aug 29, 2015, at 9:18 AM, Marco Dev wrote: > > Hi, > I want to choice between MITK and 3d slicer for working in medical features which one is powerful and going to improving in aspect code and example ... > Thanks > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From fotosentido at gmail.com Sat Aug 29 17:52:12 2015 From: fotosentido at gmail.com (Marcos) Date: Sat, 29 Aug 2015 23:52:12 +0200 Subject: [vtkusers] Same multiframe image, same QVTKWidget, multiple renderers with each frame Message-ID: Hi, with a multiframe image accesible from a vtkimageviewer2, I'm trying to see all frames in one view. With these examples: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/MultipleViewports http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/SideBySideViewports So I understand I need: - One vtkimageviewer2 (I have the multiframe image there) - One QVTKWidget - One vtkrenderwindow - vtkrenderer, one for each frame - viewports, one for each frame But I think that, when I invoke the vtkimageviewer2::setslice() method, it will change all renderers. Maybe this is not the best approach to the problem. Maybe I could convert each frame into a QImage. I don't need to interact with those "thumbnails". On the other hand, I already have another QVTKWidget showing one slice at a time, and I would like to have both views available (sharing the same readed file). Any ideas? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonid_dulman at yahoo.co.uk Sun Aug 30 11:15:53 2015 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Sun, 30 Aug 2015 16:15:53 +0100 Subject: [vtkusers] GraphicsView example with VTK-6.3.0 and Qt-5.5.0 Message-ID: <1440947753.52514.YahooMailBasic@web173105.mail.ir2.yahoo.com> Hi to all I built GraphicsView example with VTK 6.3.0 and Qt 5.50 in windows, but it not works Leonid From fotosentido at gmail.com Sun Aug 30 12:29:40 2015 From: fotosentido at gmail.com (Marcos) Date: Sun, 30 Aug 2015 18:29:40 +0200 Subject: [vtkusers] Include vtkinteractor subclass in CMake: error compiling unresolved external symbol Message-ID: Hi, I did a vtkInteractorStyleImage subclass, just overriding a method: #ifndef dcmInteractorStyleImage_h #define dcmInteractorStyleImage_h #include "vtkInteractionStyleModule.h" // For export macro #include "vtkInteractorStyleImage.h" class VTKINTERACTIONSTYLE_EXPORT dcmInteractorStyle : public vtkInteractorStyleImage { public: static dcmInteractorStyle *New(); vtkTypeMacro(dcmInteractorStyle, vtkInteractorStyleImage); virtual void OnLeftButtonDown(); void PrintSelf(ostream& os, vtkIndent indent); }; #endif ---------------------------------------------------------------- The thing is I use it in a Qt class. So I include this in my CMakeLists.txt: set(GENERIC_VIEW_CPP View/UI/dcminteractorstyle.cpp ) SET(GENERIC_VIEW_H View/UI/dcminteractorstyle.h ) add_library(generic ${GENERIC_VIEW_CPP} ${GENERIC_VIEW_H}) ... add_library(ui_qt ${UI_QT_CXX} ${UI_FORM_HEADERS} ${UI_RESOURCES_RCC} ${MODEL_WRAPPED_HEADERS} ${GENERIC_VIEW_CPP} ${GENERIC_VIEW_H} #necesary here? ) qt5_use_modules(ui_qt Core Gui Widgets) ... set_source_files_properties(${UI_RESOURCES_RCC} PROPERTIES GENERATED ON) add_executable(UtilidadDICOM WIN32 main.cpp ${UI_RESOURCES_RCC}) target_link_libraries(UtilidadDICOM model ui_qt generic ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES} ) ------------------------------------------------------------------ The error trying to compile: ui_qt.lib(viewerwidget.cpp.obj):-1: error: LNK2019: unresolved external symbol "public: static class dcmInteractorStyle * __cdecl dcmInteractorStyle::New(void)" (?New at dcmInteractorStyle@@SAPAV1 at XZ) referenced in function "public: static class vtkSmartPointer __cdecl vtkSmartPointer::New(void)" (?New@?$vtkSmartPointer at VdcmInteractorStyle@@@@SA?AV1 at XZ) ui_qt is a library declared in CMake, as you can see above. Any ideas? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From agatakrason at gmail.com Sun Aug 30 13:16:35 2015 From: agatakrason at gmail.com (agatte) Date: Sun, 30 Aug 2015 10:16:35 -0700 (MST) Subject: [vtkusers] question ? [vtkContourFilter & vtkMarchingCubes] In-Reply-To: References: <1440570438796-5733626.post@n5.nabble.com> Message-ID: OK. Thank You for reply and advice. I am going to use vtkContourFilter. Kind regards, agatte 2015-08-26 15:13 GMT+02:00 Cory Quammen-2 [via VTK] < ml-node+s1045678n5733630h79 at n5.nabble.com>: > vtkContourFilter is typically better to use IMHO. > > - it is multithreaded > - it handles more kinds of input data volumes > > For a binary 3D image, you might prefer to use vtkDiscreteMarchingCubes ( > http://www.vtk.org/doc/nightly/html/classvtkDiscreteMarchingCubes.html). > > HTH, > Cory > > On Wed, Aug 26, 2015 at 2:27 AM, agatte <[hidden email] > > wrote: > >> Hi, >> >> I want to extract surface from 3D binary volume. >> I found in vtk : two filter vtkContourFilter and vtkMarchningCubes. >> I have a doupt which is better ? What's the difference ? >> >> >> I would appreciate for any info. >> >> >> agatte >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/question-vtkContourFilter-vtkMarchingCubes-tp5733626.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://vtk.1045678.n5.nabble.com/question-vtkContourFilter-vtkMarchingCubes-tp5733626p5733630.html > To unsubscribe from question ? [vtkContourFilter & vtkMarchingCubes], click > here > > . > NAML > > -- View this message in context: http://vtk.1045678.n5.nabble.com/question-vtkContourFilter-vtkMarchingCubes-tp5733626p5733685.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bwadd006 at odu.edu Sun Aug 30 22:01:10 2015 From: bwadd006 at odu.edu (Brandon Waddell) Date: Sun, 30 Aug 2015 22:01:10 -0400 Subject: [vtkusers] Including header file paths in visual studio Message-ID: Hello, I am running vtk through cmake to generate header files for another base program. The base program already has all the header files included, but I need to provide paths to the header files. Doing this individually isn't hard but I am having to include upwards of 50-60 paths to the header files. Also, when I switch machines I will then lose all my paths. Is there a way to give a path to a base directory and then have visual studio search through the base directory until it finds all the header files? Thank You. -------------- next part -------------- An HTML attachment was scrubbed... URL: From drescherjm at gmail.com Sun Aug 30 22:11:09 2015 From: drescherjm at gmail.com (John Drescher) Date: Sun, 30 Aug 2015 22:11:09 -0400 Subject: [vtkusers] Including header file paths in visual studio In-Reply-To: References: Message-ID: > I am running vtk through cmake to generate header files for another base > program. The base program already has all the header files included, but I > need to provide paths to the header files. Doing this individually isn't > hard but I am having to include upwards of 50-60 paths to the header files. > Also, when I switch machines I will then lose all my paths. Is there a way > to give a path to a base directory and then have visual studio search > through the base directory until it finds all the header files? > This is one reason why you should be using CMake to generate your Visual Studio projects. I have none of this pain with my CMake generated Visual Studio projects. John From bwadd006 at odu.edu Sun Aug 30 22:47:48 2015 From: bwadd006 at odu.edu (Brandon Waddell) Date: Sun, 30 Aug 2015 22:47:48 -0400 Subject: [vtkusers] Including header file paths in visual studio In-Reply-To: References: Message-ID: Oh, this project was given to me. Is there a way to take this project and run it through cmake to generate a new one? On Sun, Aug 30, 2015 at 10:11 PM, John Drescher wrote: > > I am running vtk through cmake to generate header files for another base > > program. The base program already has all the header files included, but > I > > need to provide paths to the header files. Doing this individually isn't > > hard but I am having to include upwards of 50-60 paths to the header > files. > > Also, when I switch machines I will then lose all my paths. Is there a > way > > to give a path to a base directory and then have visual studio search > > through the base directory until it finds all the header files? > > > > This is one reason why you should be using CMake to generate your > Visual Studio projects. I have none of this pain with my CMake > generated Visual Studio projects. > > John > > > -- > BEGIN-ANTISPAM-VOTING-LINKS > ------------------------------------------------------ > > NOTE: This message was trained as non-spam. If this is wrong, > please correct the training as soon as possible. > > Teach CanIt if this mail (ID 03Pben2za) is spam: > Spam: > https://www.spamtrap.odu.edu/canit/b.php?i=03Pben2za&m=43131a061092&t=20150830&c=s > Not spam: > https://www.spamtrap.odu.edu/canit/b.php?i=03Pben2za&m=43131a061092&t=20150830&c=n > Forget vote: > https://www.spamtrap.odu.edu/canit/b.php?i=03Pben2za&m=43131a061092&t=20150830&c=f > ------------------------------------------------------ > END-ANTISPAM-VOTING-LINKS > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lilymagic2005 at yahoo.com.hk Mon Aug 31 05:30:26 2015 From: lilymagic2005 at yahoo.com.hk (lilymo) Date: Mon, 31 Aug 2015 02:30:26 -0700 (MST) Subject: [vtkusers] WarpScalar - Problem about normal Message-ID: <1441013426187-5733689.post@n5.nabble.com> By referencing the example of WarpScalar ( http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/WarpScalar ), I use a .vtp file instead of the sphere in the example, and I have edited some parts of it, mainly for the normal part. However, it seems that the point only offset towards the same normal, which results in a translation only. If I use vtkSphereSource, the following code can offset the points by its own normal, but not the same normal for all the points at the same time. What should I do? Thanks! #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int, char *[]) { vtkSmartPointer sphereSource = vtkSmartPointer::New(); sphereSource->SetFileName("test.vtp"); // Create Scalars vtkSmartPointer scalars = vtkSmartPointer::New(); int numberOfPoints = sphereSource->GetOutput()->GetNumberOfPoints(); sphereSource->GetOutput()->GetPointData()->SetScalars(scalars); vtkSmartPointer warpScalar = vtkSmartPointer::New(); warpScalar->SetInputConnection(sphereSource->GetOutputPort()); warpScalar->SetScaleFactor(1); // use the scalars themselves scalars->SetNumberOfTuples(numberOfPoints); for(vtkIdType i = 0; i < numberOfPoints; ++i) { scalars->SetTuple1(i,20); } //??? warpScalar->GetUseNormal(); warpScalar->Update(); //-------------------------------------------------------------------- vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(warpScalar->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->GetProperty()->SetColor(1.0, 1.0, 0.0); actor->SetMapper(mapper); vtkSmartPointer smapper = vtkSmartPointer::New(); smapper->SetInputConnection(sphereSource->GetOutputPort()); vtkSmartPointer sactor = vtkSmartPointer::New(); sactor->GetProperty()->SetColor(1.0, 0.0, 1.0); sactor->SetMapper(smapper); //-------------------------------------------------------------------- // Visualize vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderer->AddActor(actor); renderer->AddActor(sactor); renderer->SetBackground(1,1,1); renderWindow->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } -- View this message in context: http://vtk.1045678.n5.nabble.com/WarpScalar-Problem-about-normal-tp5733689.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Mon Aug 31 09:27:14 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 31 Aug 2015 09:27:14 -0400 Subject: [vtkusers] WarpScalar - Problem about normal In-Reply-To: <1441013426187-5733689.post@n5.nabble.com> References: <1441013426187-5733689.post@n5.nabble.com> Message-ID: Does your VTP file have point Normals? Can you share the file? Thanks, Cory On Mon, Aug 31, 2015 at 5:30 AM, lilymo wrote: > By referencing the example of WarpScalar ( > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/WarpScalar > ), I use a > .vtp file instead of the sphere in the example, and I have edited some > parts > of it, mainly for the normal part. > > However, it seems that the point only offset towards the same normal, which > results in a translation only. > > If I use vtkSphereSource, the following code can offset the points by its > own normal, but not the same normal for all the points at the same time. > > What should I do? Thanks! > > > > > > > > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > #include > > #include > #include > #include > #include > #include > > > int main(int, char *[]) > { > vtkSmartPointer sphereSource = > vtkSmartPointer::New(); > sphereSource->SetFileName("test.vtp"); > > // Create Scalars > vtkSmartPointer scalars = > vtkSmartPointer::New(); > int numberOfPoints = > sphereSource->GetOutput()->GetNumberOfPoints(); > > sphereSource->GetOutput()->GetPointData()->SetScalars(scalars); > > vtkSmartPointer warpScalar = > vtkSmartPointer::New(); > warpScalar->SetInputConnection(sphereSource->GetOutputPort()); > warpScalar->SetScaleFactor(1); // use the scalars themselves > > scalars->SetNumberOfTuples(numberOfPoints); > > > for(vtkIdType i = 0; i < numberOfPoints; ++i) > { > scalars->SetTuple1(i,20); > } > > //??? > warpScalar->GetUseNormal(); > warpScalar->Update(); > > > > //-------------------------------------------------------------------- > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(warpScalar->GetOutputPort()); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->GetProperty()->SetColor(1.0, 1.0, 0.0); > actor->SetMapper(mapper); > > vtkSmartPointer smapper = > vtkSmartPointer::New(); > smapper->SetInputConnection(sphereSource->GetOutputPort()); > > vtkSmartPointer sactor = > vtkSmartPointer::New(); > sactor->GetProperty()->SetColor(1.0, 0.0, 1.0); > sactor->SetMapper(smapper); > > > //-------------------------------------------------------------------- > // Visualize > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > renderer->AddActor(actor); > renderer->AddActor(sactor); > renderer->SetBackground(1,1,1); > > renderWindow->Render(); > renderWindowInteractor->Start(); > > return EXIT_SUCCESS; > } > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/WarpScalar-Problem-about-normal-tp5733689.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Aug 31 09:35:10 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 31 Aug 2015 09:35:10 -0400 Subject: [vtkusers] Combine three single component arrays into one three component array (python) In-Reply-To: <55E04D08.1070305@gmail.com> References: <55DC23D6.7060904@gmail.com> <55E04D08.1070305@gmail.com> Message-ID: Great, I'm glad it worked! Cory On Fri, Aug 28, 2015 at 7:59 AM, Jaap Verheggen wrote: > You are absolutely right Cory. > > I read somewhere that you could only convert 1D or 2D data from numpy > array to vtk array. So I tried a workaround but it never crossed my mind to > test if a 3D numpy array would convert. It does. > > Thanks for the help! > > > > On 26-08-15 17:26, Cory Quammen wrote: > > Jaap, > > There should be no need to append the different array components in this > scenario. It should be handled directly by the numpy_support.numpy_to_vtk > function. > > Try this: > > import vtk > import vtk.util.numpy_support as ns > import numpy as np > > Array = np.empty([235,3]) > vtkarr = ns.numpy_to_vtk(num_array=Array, deep=True, > array_type=vtk.VTK_DOUBLE) > > >>> vtkarr.GetNumberOfTuples() > 235L > >>> vtkarr.GetNumberOfComponents() > 3 > > HTH, > Cory > > On Tue, Aug 25, 2015 at 4:14 AM, Jaap Verheggen > wrote: > >> Hello, >> >> I am Looking for an easy way to create my point data with Python. I can >> make three single component arrays, but do not know how to combine that >> into one three component array which I can feed into a vtkpoints container. >> >> # Let's say I have an array of point data, large enough that a loop >> should be avoided >> Array = np.empty([235, 3]) >> #I can deconstruct the array in x, y and z >> VTK_datax = numpy_support.numpy_to_vtk(num_array=Array[:,0].ravel(), >> deep=True, array_type=vtk.VTK_DOUBLE) >> VTK_datay = numpy_support.numpy_to_vtk(num_array=Array[:,1].ravel(), >> deep=True, array_type=vtk.VTK_DOUBLE) >> VTK_dataz = numpy_support.numpy_to_vtk(num_array=Array[:,2].ravel(), >> deep=True, array_type=vtk.VTK_DOUBLE) >> # Maybe I will need a VTK ID array (0..235) Lets just make one >> VTK_ID = >> numpy_support.numpy_to_vtk(num_array=np.arange(shape(Array)[0]).ravel(), >> deep=True, array_type=vtk.VTK_ID_TYPE) >> # Now I would like to combine x, y and z data into a single array >> VTK_data = vtk.vtkDoubleArray() >> VTK_data.SetNumberOfComponents(3) >> VTK_data.SetNumberOfTuples(235) >> # However, I do not know how to do this, it could be something like this, >> VTK_data.SetTuple3(VTK_ID, VTK_datax, VTK_datay, VTK_dataz ) but that >> doesn't work with arrays. >> # Afterwards, I would like to fill the data array into a points container >> points = vtk.vtkPoints() >> points.SetData(pcoords) >> >> Is there a way to combine three single component arrays into a three >> component array? >> >> Thanks in advance, >> >> >> >> >> >> >> -- >> --------------------------- >> Jaap Verheggen >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > > > -- > --------------------------- > Jaap Verheggen > Diepvoorde 2603 > 6605 GN Wijchen > Nederland > +31 630 639 268 > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at jslengineeringsoftware.com Mon Aug 31 09:51:17 2015 From: jim at jslengineeringsoftware.com (James Labiak) Date: Mon, 31 Aug 2015 09:51:17 -0400 Subject: [vtkusers] vtkLookUpTable negative scalars Message-ID: <55E45BD5.8080303@jslengineeringsoftware.com> (vtk 6.0, Java wrapper) When using a vtkLookUpTable to map scalar values to hue range, it appears that everything works correctly when the table range is entirely positive, but when the table range is entirely negative, the graphical output is blank. If this is intended behavior, then I would make my own LUT except for mapper.SetLookupTable(hueLut). Is this likely my error or a LUT issue? From cory.quammen at kitware.com Mon Aug 31 10:08:25 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 31 Aug 2015 10:08:25 -0400 Subject: [vtkusers] vtkLookUpTable negative scalars In-Reply-To: <55E45BD5.8080303@jslengineeringsoftware.com> References: <55E45BD5.8080303@jslengineeringsoftware.com> Message-ID: Hmm, that should work. Mind posting a code example showing the problem? Thanks, Cory On Mon, Aug 31, 2015 at 9:51 AM, James Labiak < jim at jslengineeringsoftware.com> wrote: > (vtk 6.0, Java wrapper) When using a vtkLookUpTable to map scalar values > to hue range, it appears that everything works correctly when the table > range is entirely positive, but when the table range is entirely negative, > the graphical output is blank. If this is intended behavior, then I would > make my own LUT except for mapper.SetLookupTable(hueLut). Is this likely my > error or a LUT issue? > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon Aug 31 10:14:36 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 31 Aug 2015 10:14:36 -0400 Subject: [vtkusers] Including header file paths in visual studio In-Reply-To: References: Message-ID: <20150831141436.GA22046@megas.kitware.com> On Sun, Aug 30, 2015 at 22:01:10 -0400, Brandon Waddell wrote: > I am running vtk through cmake to generate header files for another base > program. The base program already has all the header files included, but I > need to provide paths to the header files. Doing this individually isn't > hard but I am having to include upwards of 50-60 paths to the header files. > Also, when I switch machines I will then lose all my paths. Is there a way > to give a path to a base directory and then have visual studio search > through the base directory until it finds all the header files? If you install VTK from your current build, it will place all of the header files in one location. --Ben From jim at jslengineeringsoftware.com Mon Aug 31 11:23:06 2015 From: jim at jslengineeringsoftware.com (James Labiak) Date: Mon, 31 Aug 2015 11:23:06 -0400 Subject: [vtkusers] vtkLookUpTable negative scalars In-Reply-To: References: <55E45BD5.8080303@jslengineeringsoftware.com> Message-ID: <55E4715A.2040405@jslengineeringsoftware.com> Hi Cory, Here's a java example below. Also attached with some_points.txt file (warning: z, theta, dR and not x,y,z). Just comment the dRi sign change line in order to change the scalars from negative to positive. Thanks, Jim import java.awt.BorderLayout; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.SwingUtilities; import vtk.*; public class PlotSpheres extends JPanel { public static void main(String[] args) throws FileNotFoundException { SwingUtilities.invokeLater(new Runnable() { public void run() { JFrame frame = new JFrame("PlotSheres"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(new BorderLayout()); try { frame.getContentPane().add(new PlotSpheres(), BorderLayout.CENTER); } catch (FileNotFoundException e) { e.printStackTrace(); } frame.setSize(1000, 1000); frame.setVisible(true); } }); } // Load VTK libraries static { if (!vtkNativeLibrary.LoadAllNativeLibraries()) { for (vtkNativeLibrary lib : vtkNativeLibrary.values()) { if (!lib.IsLoaded()) System.out.println(lib.GetLibraryName() + " not loaded"); } System.out.println("Make sure the search path is correct: "); System.out.println(System.getProperty("java.library.path")); } vtkNativeLibrary.DisableOutputWindow(null); } // Variables private String dataFile; private String dataFilePathString; Double[] xValsArray = new Double[41]; Double[] yValsArray = new Double[721]; Double[][] zValsArray = new Double[41][721]; private vtkRenderWindowPanel renderWindowPanel = new vtkRenderWindowPanel(); private vtkPoints points; private int pointsNum; private vtkRenderWindowInteractor renderWindowInteractor; private vtkPolyData polyData = new vtkPolyData(); private vtkFloatArray colorsScalars; public PlotSpheres() throws FileNotFoundException { super(new BorderLayout()); dataFilePathString = "C:\\vtk123"; dataFile = "some_points.txt"; calcSheres(); System.out.println("calcSheres done"); } public void calcSheres() throws FileNotFoundException { try { renderWindowPanel.GetRenderer().RemoveAllViewProps(); } catch (Exception nullEx) { System.out.println("renderWindowPanel props are null."); } // Read the file // Count the lines in the file BufferedReader br_count = new BufferedReader(new FileReader( dataFilePathString + File.separator + dataFile)); String lineData = null; int lineNum = 0; try { lineData = br_count.readLine(); // The first data line has just been read while (lineData != null) { // Do nothing except increment the counter lineNum = lineNum + 1; // on iteration 1, lineNum = 1 // Read blank line lineData = br_count.readLine(); // Next action is in for the br_count.readLine() (the // next data line) lineData = br_count.readLine(); System.out.println("lineNum = " + lineNum + " " + lineData); } } catch (Exception e) { e.printStackTrace(); System.out.println("Datafile line counting error"); } try { br_count.close(); } catch (IOException e) { System.out.println("Error closing br_count"); e.printStackTrace(); } BufferedReader br = new BufferedReader(new FileReader( dataFilePathString + File.separator + dataFile)); // Set number of data point sets (x,y,z sets) pointsNum = lineNum; // Fill colorsScalars array with the actual scalar values // Initialize/reinitialize variables String linej; int indexNum = 0; points = new vtkPoints(); points.SetNumberOfPoints(pointsNum); Double ZPOSi; Double theta; Double dRi; Double tempx; Double tempy; Double tempz; // colorsScalars is the array of native (pos or neg) scalars // the sign is changed to meet the required application convention // the sign change line can be used to show difference between // plotting of positive and negative scalars colorsScalars = new vtkFloatArray(); colorsScalars.SetNumberOfTuples(pointsNum); String[] linejArray = {}; try { linej = br.readLine(); while (linej != null) { linejArray = linej.split("\\s+"); ZPOSi = Double.parseDouble(linejArray[1]); // Z position (m) theta = Double.parseDouble(linejArray[2]); // theta (deg) dRi = Double.parseDouble(linejArray[3]); // dRi (m) // dRi negative value means smaller than nominal radius // tempx = (r - dr) * cos(theta) // tempy = (r - dr) * sin(theta) // tempz = ZPOSi tempx = (.094629 - dRi) * Math.cos((3.14159 / 180) * theta); tempy = (.094629 - dRi) * Math.sin((3.14159 / 180) * theta); tempz = ZPOSi; points.SetPoint(indexNum, tempx, tempy, tempz); System.out.println(tempx + " " + tempy + " " + tempz); // Account for convention used in application // Change sign of dRi: dRi *= -1; colorsScalars.SetValue(indexNum, dRi); indexNum = indexNum + 1; System.out.println("indexNum = " + indexNum + "......... dRi = " + dRi); linej = br.readLine(); // (Account for blank line...) linej = br.readLine(); } } catch (Exception ex) { ex.printStackTrace(); System.out.println("Error reading datafile"); } try { br_count.close(); } catch (IOException e) { System.out.println("Error closing br_count"); e.printStackTrace(); } // populate the polyData this.polyData.SetPoints(points); // find min and max of colorsScalars array double[] tmpScalarRange = new double[2]; tmpScalarRange = this.colorsScalars.GetRange(); Double scalarMax = tmpScalarRange[1]; Double scalarMin = tmpScalarRange[0]; // populate the scalars this.polyData.GetPointData().SetScalars(this.colorsScalars); // create sphere source vtkSphereSource sphere = new vtkSphereSource(); sphere.Update(); // setup glyph3D vtkGlyph3D glyph3D = new vtkGlyph3D(); glyph3D.SetColorModeToColorByScalar(); glyph3D.SetSourceConnection(sphere.GetOutputPort()); glyph3D.SetInputData(polyData); glyph3D.Update(); // visualize vtkDataSetMapper mapper = new vtkDataSetMapper(); mapper.SetInputConnection(glyph3D.GetOutputPort()); mapper.SetScalarRange(scalarMin, scalarMax); mapper.Update(); vtkActor actor = new vtkActor(); actor.GetProperty().SetSpecularPower(1.0); actor.GetProperty().SetDiffuse(1.0); actor.GetProperty().SetOpacity(1.0); actor.SetMapper(mapper); vtkRenderer renderer = new vtkRenderer(); renderer = renderWindowPanel.GetRenderer(); renderer.AddActor(actor); renderer.SetBackground(0.0, 0.0, 0.0); renderer.ResetCameraClippingRange(); // Create a lookup table to share between the mapper and the scalarbar vtkLookupTable hueLut = new vtkLookupTable(); hueLut.SetTableRange(scalarMin, scalarMax); hueLut.SetHueRange(0.6667, 0.0000); // H from HSV red (top) to blue hueLut.SetSaturationRange(1.0, 1.0); hueLut.SetValueRange(1.0, 1.0); // V from HSV hueLut.Build(); mapper.SetLookupTable(hueLut); mapper.Update(); vtkScalarBarWidget sbWidget = new vtkScalarBarWidget(); sbWidget.RepositionableOn(); renderWindowInteractor = renderWindowPanel.getRenderWindowInteractor(); sbWidget.SetInteractor(renderWindowInteractor); sbWidget.GetScalarBarActor().SetTitle("dR (m)"); sbWidget.GetScalarBarActor().SetLookupTable(mapper.GetLookupTable()); vtkTextProperty SBtprop = new vtkTextProperty(); SBtprop.SetFontSize(1); SBtprop.SetBold(1); sbWidget.GetScalarBarActor().SetLabelTextProperty(SBtprop); sbWidget.GetScalarBarActor().SetBarRatio(.7); SBtprop.SetLineOffset(-10); renderer.ResetCameraClippingRange(); vtkCubeAxesActor2D axes = new vtkCubeAxesActor2D(); axes.SetCamera(renderer.GetActiveCamera()); axes.SetBounds(actor.GetBounds()); axes.SetFlyModeToOuterEdges(); renderer.AddActor(axes); renderer.ResetCamera(); sbWidget.EnabledOn(); System.out.println("B4 this.add"); this.add(renderWindowPanel, BorderLayout.CENTER); renderer.ResetCamera(); renderWindowInteractor.Start(); } } On 8/31/2015 10:08 AM, Cory Quammen wrote: > Hmm, that should work. Mind posting a code example showing the problem? > > Thanks, > Cory > > On Mon, Aug 31, 2015 at 9:51 AM, James Labiak > > wrote: > > (vtk 6.0, Java wrapper) When using a vtkLookUpTable to map scalar > values to hue range, it appears that everything works correctly > when the table range is entirely positive, but when the table > range is entirely negative, the graphical output is blank. If this > is intended behavior, then I would make my own LUT except for > mapper.SetLookupTable(hueLut). Is this likely my error or a LUT issue? > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. -- James Labiak JSL Engineering and Software Mobile: 231-638-3725 email: jim at jslengineeringsoftware.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- 5.0100000e-02 6.1352114e+01 3.8389000e-04 5.0100000e-02 1.4765338e+00 4.2621000e-04 5.0100000e-02 3.1397548e+00 4.2609000e-04 5.0100000e-02 4.8029527e+00 4.2586000e-04 5.0100000e-02 6.4661649e+00 4.2555000e-04 5.0100000e-02 8.1293677e+00 4.2515000e-04 5.0100000e-02 9.7925795e+00 4.2466000e-04 5.0100000e-02 1.1455794e+01 4.2408000e-04 5.0100000e-02 1.3118997e+01 4.2342000e-04 5.0100000e-02 1.4782203e+01 4.2267000e-04 5.0100000e-02 1.6445417e+01 4.2184000e-04 5.0100000e-02 1.8108634e+01 4.2094000e-04 5.0100000e-02 1.9771847e+01 4.1996000e-04 5.0100000e-02 2.1435058e+01 4.1890000e-04 5.0100000e-02 2.3098256e+01 4.1779000e-04 5.0100000e-02 2.4761466e+01 4.1660000e-04 5.0100000e-02 2.6424690e+01 4.1536000e-04 5.0100000e-02 2.8087884e+01 4.1406000e-04 5.0100000e-02 2.9751101e+01 4.1271000e-04 5.0100000e-02 3.1414318e+01 4.1131000e-04 5.0100000e-02 3.3077523e+01 4.0987000e-04 5.0100000e-02 3.4740731e+01 4.0839000e-04 5.0100000e-02 3.6403948e+01 4.0688000e-04 5.0100000e-02 3.8067158e+01 4.0534000e-04 5.0100000e-02 3.9730365e+01 4.0378000e-04 5.0100000e-02 4.1393579e+01 4.0220000e-04 5.0100000e-02 4.3056799e+01 4.0061000e-04 5.0100000e-02 4.4720004e+01 3.9902000e-04 5.0100000e-02 4.6383217e+01 3.9742000e-04 5.0100000e-02 4.8046426e+01 3.9583000e-04 5.0100000e-02 4.9709646e+01 3.9425000e-04 5.0100000e-02 5.1372843e+01 3.9268000e-04 5.0100000e-02 5.3036065e+01 3.9114000e-04 5.0100000e-02 5.4699269e+01 3.8962000e-04 5.0100000e-02 5.6362475e+01 3.8813000e-04 5.0100000e-02 5.8025687e+01 3.8667000e-04 5.0100000e-02 5.9688909e+01 3.8526000e-04 5.0100000e-02 9.0000000e+01 3.7125000e-04 5.0100000e-02 6.3037201e+01 3.8256000e-04 5.0100000e-02 6.4722379e+01 3.8128000e-04 5.0100000e-02 6.6407565e+01 3.8006000e-04 5.0100000e-02 6.8092729e+01 3.7891000e-04 5.0100000e-02 6.9777912e+01 3.7782000e-04 5.0100000e-02 7.1463087e+01 3.7681000e-04 5.0100000e-02 7.3148261e+01 3.7587000e-04 5.0100000e-02 7.4833440e+01 3.7501000e-04 5.0100000e-02 7.6518612e+01 3.7424000e-04 5.0100000e-02 7.8203787e+01 3.7355000e-04 5.0100000e-02 7.9888972e+01 3.7295000e-04 5.0100000e-02 8.1574151e+01 3.7243000e-04 5.0100000e-02 8.3259321e+01 3.7201000e-04 5.0100000e-02 8.4944507e+01 3.7168000e-04 5.0100000e-02 8.6629674e+01 3.7144000e-04 5.0100000e-02 8.8314858e+01 3.7130000e-04 4.5400000e-02 6.1351971e+01 3.2550000e-04 4.5400000e-02 2.5524152e-01 3.6786000e-04 4.5400000e-02 1.6434549e+00 3.6781000e-04 4.5400000e-02 3.0323277e+00 3.6770000e-04 4.5400000e-02 4.4211609e+00 3.6753000e-04 4.5400000e-02 5.8092789e+00 3.6729000e-04 4.5400000e-02 7.1977214e+00 3.6699000e-04 4.5400000e-02 8.5867874e+00 3.6663000e-04 4.5400000e-02 9.9751489e+00 3.6621000e-04 4.5400000e-02 1.1363378e+01 3.6572000e-04 4.5400000e-02 1.2752175e+01 3.6518000e-04 4.5400000e-02 1.4141006e+01 3.6457000e-04 4.5400000e-02 1.5529185e+01 3.6392000e-04 4.5400000e-02 1.6917687e+01 3.6320000e-04 4.5400000e-02 1.8306731e+01 3.6243000e-04 4.5400000e-02 1.9695115e+01 3.6161000e-04 4.5400000e-02 2.1083338e+01 3.6074000e-04 4.5400000e-02 2.2472207e+01 3.5982000e-04 4.5400000e-02 2.3860995e+01 3.5886000e-04 4.5400000e-02 2.5249189e+01 3.5785000e-04 4.5400000e-02 2.6637629e+01 3.5680000e-04 4.5400000e-02 2.8026703e+01 3.5571000e-04 4.5400000e-02 2.9415144e+01 3.5459000e-04 4.5400000e-02 3.0803308e+01 3.5343000e-04 4.5400000e-02 3.2192141e+01 3.5225000e-04 4.5400000e-02 3.3580957e+01 3.5103000e-04 4.5400000e-02 3.4969170e+01 3.4979000e-04 4.5400000e-02 3.6357576e+01 3.4853000e-04 4.5400000e-02 3.7746659e+01 3.4725000e-04 4.5400000e-02 3.9135074e+01 3.4595000e-04 4.5400000e-02 4.0523290e+01 3.4464000e-04 4.5400000e-02 4.1912104e+01 3.4332000e-04 4.5400000e-02 4.3300873e+01 3.4199000e-04 4.5400000e-02 4.4689134e+01 3.4066000e-04 4.5400000e-02 4.6077546e+01 3.3932000e-04 4.5400000e-02 4.7466620e+01 3.3799000e-04 4.5400000e-02 4.8855030e+01 3.3667000e-04 4.5400000e-02 5.0243225e+01 3.3535000e-04 4.5400000e-02 5.1632033e+01 3.3405000e-04 4.5400000e-02 5.3020850e+01 3.3276000e-04 4.5400000e-02 5.4409061e+01 3.3149000e-04 4.5400000e-02 5.5797462e+01 3.3024000e-04 4.5400000e-02 5.7186533e+01 3.2901000e-04 4.5400000e-02 5.8574936e+01 3.2781000e-04 4.5400000e-02 5.9963155e+01 3.2664000e-04 4.6340000e-02 6.1352114e+01 3.3691000e-04 4.7280000e-02 6.1352114e+01 3.4864000e-04 4.8220000e-02 6.1352114e+01 3.6039000e-04 4.9160000e-02 6.1352114e+01 3.7214000e-04 4.6225360e-02 9.8531399e-01 3.7786000e-04 4.6328620e-02 2.3421958e+00 3.7904000e-04 4.6326990e-02 3.7360960e+00 3.7888000e-04 4.6344990e-02 5.1186865e+00 3.7889000e-04 4.6349910e-02 6.5125205e+00 3.7868000e-04 4.6334860e-02 7.9247376e+00 3.7816000e-04 4.6371620e-02 9.3433824e+00 3.7821000e-04 4.6266200e-02 1.0711450e+01 3.7648000e-04 4.6419490e-02 1.2064832e+01 3.7784000e-04 4.6342980e-02 1.3451917e+01 3.7633000e-04 4.6350710e-02 1.4842978e+01 3.7579000e-04 4.6336180e-02 1.6253725e+01 3.7492000e-04 4.6371380e-02 1.7671085e+01 3.7458000e-04 4.6267040e-02 1.9041493e+01 3.7253000e-04 4.6418410e-02 2.0396159e+01 3.7355000e-04 4.6342350e-02 2.1783174e+01 3.7173000e-04 4.6350420e-02 2.3173765e+01 3.7088000e-04 4.6337390e-02 2.4583042e+01 3.6972000e-04 4.6371420e-02 2.5999432e+01 3.6908000e-04 4.6266430e-02 2.7371673e+01 3.6675000e-04 4.6417020e-02 2.8727786e+01 3.6751000e-04 4.6341020e-02 3.0115123e+01 3.6544000e-04 4.6348950e-02 3.1506351e+01 3.6436000e-04 4.6335820e-02 3.2918231e+01 3.6298000e-04 4.6371440e-02 3.4334720e+01 3.6216000e-04 4.6248990e-02 3.5703627e+01 3.5943000e-04 4.6408520e-02 3.7061973e+01 3.6013000e-04 4.6328450e-02 3.8449487e+01 3.5786000e-04 4.6337350e-02 3.9843804e+01 3.5666000e-04 4.6319830e-02 4.1263292e+01 3.5510000e-04 4.6417640e-02 4.2723030e+01 3.5490000e-04 4.6243140e-02 4.4037621e+01 3.5152000e-04 4.6341850e-02 4.5379599e+01 3.5143000e-04 4.6326930e-02 4.6782118e+01 3.4990000e-04 4.6334130e-02 4.8176450e+01 3.4866000e-04 4.6341740e-02 4.9578638e+01 3.4742000e-04 4.6228220e-02 5.0961380e+01 3.4473000e-04 4.6371970e-02 5.2350470e+01 3.4518000e-04 4.6299740e-02 5.3771912e+01 3.4299000e-04 4.6336680e-02 5.5161456e+01 3.4218000e-04 4.6339120e-02 5.6613419e+01 3.4092000e-04 4.6262460e-02 5.8180894e+01 3.3862000e-04 4.6443880e-02 5.9788417e+01 3.3947000e-04 4.7689320e-02 6.0292554e+01 3.5462000e-04 4.9130800e-02 6.0078675e+01 3.7282000e-04 4.9266680e-02 5.8759705e+01 3.7563000e-04 4.9167070e-02 5.7216558e+01 3.7571000e-04 4.9161020e-02 5.5516849e+01 3.7714000e-04 4.9063130e-02 5.3869684e+01 3.7741000e-04 4.9062890e-02 5.2204810e+01 3.7894000e-04 4.9063020e-02 5.0541532e+01 3.8050000e-04 4.9063020e-02 4.8878350e+01 3.8208000e-04 4.9063020e-02 4.7215144e+01 3.8366000e-04 4.9063020e-02 4.5551935e+01 3.8526000e-04 4.9063020e-02 4.3888720e+01 3.8685000e-04 4.9063020e-02 4.2225511e+01 3.8845000e-04 4.9063020e-02 4.0562293e+01 3.9003000e-04 4.9063020e-02 3.8899080e+01 3.9160000e-04 4.9063020e-02 3.7235874e+01 3.9315000e-04 4.9063020e-02 3.5572660e+01 3.9468000e-04 4.9063020e-02 3.3909445e+01 3.9617000e-04 4.9127650e-02 3.2243044e+01 3.9844000e-04 4.9063020e-02 3.0583026e+01 3.9905000e-04 4.9063020e-02 2.8919816e+01 4.0043000e-04 4.9063020e-02 2.7256603e+01 4.0175000e-04 4.9127000e-02 2.5600285e+01 4.0382000e-04 4.9063020e-02 2.3930189e+01 4.0424000e-04 4.9124130e-02 2.2265802e+01 4.0616000e-04 4.9063020e-02 2.0603762e+01 4.0648000e-04 4.9063020e-02 1.8940561e+01 4.0749000e-04 4.9063020e-02 1.7277345e+01 4.0844000e-04 4.9131130e-02 1.5610756e+01 4.1016000e-04 4.9063020e-02 1.3950919e+01 4.1009000e-04 4.9123090e-02 1.2287239e+01 4.1155000e-04 4.9063020e-02 1.0624509e+01 4.1142000e-04 4.9063020e-02 8.9612947e+00 4.1195000e-04 4.9131250e-02 7.2941087e+00 4.1325000e-04 4.9063020e-02 5.6348847e+00 4.1276000e-04 4.9123130e-02 3.9704752e+00 4.1378000e-04 4.9063020e-02 2.3084576e+00 4.1320000e-04 4.9063020e-02 6.4524089e-01 4.1328000e-04 4.7209320e-02 5.8953825e+01 3.4975000e-04 4.8241400e-02 5.9180094e+01 3.6245000e-04 4.8265700e-02 5.7899061e+01 3.6385000e-04 4.8229870e-02 5.6448194e+01 3.6467000e-04 4.8140040e-02 5.4948954e+01 3.6489000e-04 4.8095810e-02 5.3255047e+01 3.6588000e-04 4.8033330e-02 5.1551504e+01 3.6668000e-04 4.8062290e-02 4.9903539e+01 3.6859000e-04 4.8096090e-02 4.8200176e+01 3.7064000e-04 4.8085960e-02 4.6510634e+01 3.7213000e-04 4.8065250e-02 4.4839612e+01 3.7347000e-04 4.8087270e-02 4.3198729e+01 3.7532000e-04 4.8123430e-02 4.1509047e+01 3.7739000e-04 4.8103750e-02 3.9838744e+01 3.7872000e-04 4.8102720e-02 3.8166116e+01 3.8028000e-04 4.8091240e-02 3.6502224e+01 3.8168000e-04 4.8096570e-02 3.4855176e+01 3.8324000e-04 4.8130370e-02 3.3181106e+01 3.8516000e-04 4.8117460e-02 3.1516240e+01 3.8644000e-04 4.8114850e-02 2.9850548e+01 3.8781000e-04 4.8111500e-02 2.8190696e+01 3.8912000e-04 4.8109280e-02 2.6535229e+01 3.9039000e-04 4.8135030e-02 2.4867102e+01 3.9196000e-04 4.8121720e-02 2.3201386e+01 3.9299000e-04 4.8116740e-02 2.1535456e+01 3.9405000e-04 4.8113720e-02 1.9875687e+01 3.9506000e-04 4.8110140e-02 1.8218971e+01 3.9600000e-04 4.8136180e-02 1.6551531e+01 3.9724000e-04 4.8122110e-02 1.4885473e+01 3.9790000e-04 4.8116770e-02 1.3219681e+01 3.9858000e-04 4.8114560e-02 1.1559964e+01 3.9922000e-04 4.8110120e-02 9.9027806e+00 3.9975000e-04 4.8137700e-02 8.2360306e+00 4.0059000e-04 4.8121180e-02 6.5699815e+00 4.0079000e-04 4.8121490e-02 4.9045051e+00 4.0112000e-04 4.8116390e-02 3.2355769e+00 4.0128000e-04 4.8103610e-02 1.5782161e+00 4.0125000e-04 4.7203940e-02 5.7474970e+01 3.5095000e-04 4.7190610e-02 5.5948039e+01 3.5213000e-04 4.7277900e-02 5.4387240e+01 3.5462000e-04 4.7212260e-02 5.2814564e+01 3.5524000e-04 4.7174710e-02 5.1167067e+01 3.5631000e-04 4.7234770e-02 4.9448017e+01 3.5868000e-04 4.7249080e-02 4.7744673e+01 3.6048000e-04 4.7234800e-02 4.6064510e+01 3.6191000e-04 4.7214730e-02 4.4340983e+01 3.6332000e-04 4.7279450e-02 4.2600511e+01 3.6579000e-04 4.7256210e-02 4.0952653e+01 3.6708000e-04 4.7255620e-02 3.9319171e+01 3.6861000e-04 4.7238040e-02 3.7643758e+01 3.6996000e-04 4.7228110e-02 3.5938106e+01 3.7141000e-04 4.7278350e-02 3.4230504e+01 3.7358000e-04 4.7269560e-02 3.2583924e+01 3.7492000e-04 4.7268160e-02 3.0940472e+01 3.7631000e-04 4.7253180e-02 2.9270028e+01 3.7752000e-04 4.7253650e-02 2.7569318e+01 3.7889000e-04 4.7281230e-02 2.5875637e+01 3.8054000e-04 4.7273830e-02 2.4246507e+01 3.8165000e-04 4.7271320e-02 2.2609913e+01 3.8276000e-04 4.7255300e-02 2.0943215e+01 3.8366000e-04 4.7256540e-02 1.9242890e+01 3.8473000e-04 4.7281370e-02 1.7550287e+01 3.8602000e-04 4.7274090e-02 1.5925885e+01 3.8679000e-04 4.7271580e-02 1.4291373e+01 3.8754000e-04 4.7256120e-02 1.2623411e+01 3.8807000e-04 4.7257830e-02 1.0921415e+01 3.8875000e-04 4.7281860e-02 9.2289565e+00 3.8961000e-04 4.7274860e-02 7.6122912e+00 3.8997000e-04 4.7271800e-02 5.9877098e+00 3.9030000e-04 4.7269100e-02 4.3420769e+00 3.9055000e-04 4.7241100e-02 2.7199249e+00 3.9039000e-04 4.7242100e-02 1.0472032e+00 3.9051000e-04 4.5400000e-02 9.0000000e+01 3.1286000e-04 4.5400000e-02 8.8634620e+01 3.1289000e-04 4.5400000e-02 8.7271106e+01 3.1298000e-04 4.5400000e-02 8.5906656e+01 3.1314000e-04 4.5400000e-02 8.4542612e+01 3.1335000e-04 4.5400000e-02 8.3178661e+01 3.1363000e-04 4.5400000e-02 8.1814335e+01 3.1397000e-04 4.5400000e-02 8.0450586e+01 3.1437000e-04 4.5400000e-02 7.9086177e+01 3.1483000e-04 4.5400000e-02 7.7722252e+01 3.1534000e-04 4.5400000e-02 7.6358070e+01 3.1592000e-04 4.5400000e-02 7.4993926e+01 3.1654000e-04 4.5400000e-02 7.3629906e+01 3.1723000e-04 4.5400000e-02 7.2265770e+01 3.1796000e-04 4.5400000e-02 7.0901605e+01 3.1875000e-04 4.5400000e-02 6.9537687e+01 3.1958000e-04 4.5400000e-02 6.8173050e+01 3.2046000e-04 4.5400000e-02 6.6809609e+01 3.2139000e-04 4.5400000e-02 6.5444904e+01 3.2236000e-04 4.5400000e-02 6.4081406e+01 3.2337000e-04 4.5400000e-02 6.2717026e+01 3.2441000e-04 4.1600000e-02 6.1352114e+01 2.7439000e-04 4.1600000e-02 2.5589433e-01 3.5141000e-04 4.1600000e-02 1.6441078e+00 3.5133000e-04 4.1600000e-02 3.0329256e+00 3.5113000e-04 4.1600000e-02 4.4214816e+00 3.5081000e-04 4.1600000e-02 5.8100474e+00 3.5038000e-04 4.1600000e-02 7.1985897e+00 3.4984000e-04 4.1600000e-02 8.5871960e+00 3.4918000e-04 4.1600000e-02 9.9757403e+00 3.4841000e-04 4.1600000e-02 1.1363972e+01 3.4753000e-04 4.1600000e-02 1.2752802e+01 3.4654000e-04 4.1600000e-02 1.4141350e+01 3.4544000e-04 4.1600000e-02 1.5529893e+01 3.4424000e-04 4.1600000e-02 1.6918443e+01 3.4294000e-04 4.1600000e-02 1.8307065e+01 3.4154000e-04 4.1600000e-02 1.9695616e+01 3.4005000e-04 4.1600000e-02 2.1083826e+01 3.3847000e-04 4.1600000e-02 2.2472656e+01 3.3680000e-04 4.1600000e-02 2.3861207e+01 3.3505000e-04 4.1600000e-02 2.5249754e+01 3.3321000e-04 4.1600000e-02 2.6638312e+01 3.3131000e-04 4.1600000e-02 2.8026939e+01 3.2933000e-04 4.1600000e-02 2.9415480e+01 3.2729000e-04 4.1600000e-02 3.0803694e+01 3.2518000e-04 4.1600000e-02 3.2192515e+01 3.2303000e-04 4.1600000e-02 3.3581069e+01 3.2082000e-04 4.1600000e-02 3.4969617e+01 3.1856000e-04 4.1600000e-02 3.6358173e+01 3.1626000e-04 4.1600000e-02 3.7746809e+01 3.1393000e-04 4.1600000e-02 3.9135360e+01 3.1157000e-04 4.1600000e-02 4.0523566e+01 3.0919000e-04 4.1600000e-02 4.1912380e+01 3.0679000e-04 4.1600000e-02 4.3300932e+01 3.0437000e-04 4.1600000e-02 4.4689487e+01 3.0195000e-04 4.1600000e-02 4.6078047e+01 2.9953000e-04 4.1600000e-02 4.7466689e+01 2.9711000e-04 4.1600000e-02 4.8855237e+01 2.9470000e-04 4.1600000e-02 5.0243433e+01 2.9231000e-04 4.1600000e-02 5.1632497e+01 2.8994000e-04 4.1600000e-02 5.3021058e+01 2.8759000e-04 4.1600000e-02 5.4409100e+01 2.8528000e-04 4.1600000e-02 5.5797643e+01 2.8301000e-04 4.1600000e-02 5.7186552e+01 2.8078000e-04 4.1600000e-02 5.8575098e+01 2.7859000e-04 4.1600000e-02 5.9963298e+01 2.7646000e-04 4.1600000e-02 9.0000000e+01 2.5141000e-04 4.1600000e-02 6.2716219e+01 2.7242000e-04 4.1600000e-02 6.4080412e+01 2.7052000e-04 4.1600000e-02 6.5444599e+01 2.6868000e-04 4.1600000e-02 6.6808794e+01 2.6692000e-04 4.1600000e-02 6.8172981e+01 2.6523000e-04 4.1600000e-02 6.9537173e+01 2.6363000e-04 4.1600000e-02 7.0901359e+01 2.6211000e-04 4.1600000e-02 7.2265554e+01 2.6069000e-04 4.1600000e-02 7.3629735e+01 2.5935000e-04 4.1600000e-02 7.4993926e+01 2.5811000e-04 4.1600000e-02 7.6358124e+01 2.5697000e-04 4.1600000e-02 7.7722320e+01 2.5593000e-04 4.1600000e-02 7.9086510e+01 2.5499000e-04 4.1600000e-02 8.0450691e+01 2.5416000e-04 4.1600000e-02 8.1814889e+01 2.5344000e-04 4.1600000e-02 8.3179073e+01 2.5282000e-04 4.1600000e-02 8.4543277e+01 2.5231000e-04 4.1600000e-02 8.5907461e+01 2.5192000e-04 4.1600000e-02 8.7271647e+01 2.5164000e-04 4.1600000e-02 8.8635842e+01 2.5147000e-04 4.6340000e-02 9.0000000e+01 3.2427000e-04 4.7280000e-02 9.0000000e+01 3.3600000e-04 4.8220000e-02 9.0000000e+01 3.4775000e-04 4.9160000e-02 9.0000000e+01 3.5950000e-04 4.8961720e-02 6.2795238e+01 3.6852000e-04 4.7797110e-02 6.2348897e+01 3.5431000e-04 4.6509330e-02 6.2485999e+01 3.3810000e-04 4.6239450e-02 6.3614500e+01 3.3391000e-04 4.6318630e-02 6.4893959e+01 3.3391000e-04 4.6401200e-02 6.6257190e+01 3.3393000e-04 4.6277530e-02 6.7507137e+01 3.3156000e-04 4.6396270e-02 7.0210372e+01 3.3126000e-04 4.6346640e-02 7.1595297e+01 3.2983000e-04 4.6411960e-02 7.3011062e+01 3.2985000e-04 4.6223270e-02 7.4331046e+01 3.2687000e-04 4.6403790e-02 7.5663171e+01 3.2842000e-04 4.6306150e-02 7.7044000e+01 3.2663000e-04 4.6396870e-02 7.8423128e+01 3.2718000e-04 4.6339200e-02 7.9818841e+01 3.2598000e-04 4.5981770e-02 8.1073651e+01 3.2125000e-04 4.6336010e-02 8.2493698e+01 3.2516000e-04 4.6482030e-02 8.3802277e+01 3.2667000e-04 4.6575190e-02 8.4978404e+01 3.2761000e-04 4.6202940e-02 8.6415013e+01 3.2282000e-04 4.6186780e-02 8.8235663e+01 3.2246000e-04 4.6969820e-02 8.8685831e+01 3.3215000e-04 4.7851680e-02 8.8812954e+01 3.4317000e-04 4.9166400e-02 8.8706422e+01 3.5961000e-04 4.9358150e-02 8.7312446e+01 3.6210000e-04 4.9157420e-02 8.5495995e+01 3.5981000e-04 4.9055990e-02 8.4104453e+01 3.5878000e-04 4.8996880e-02 8.2572259e+01 3.5838000e-04 4.9142650e-02 8.0825389e+01 3.6068000e-04 4.9049320e-02 7.9046687e+01 3.6010000e-04 4.9049330e-02 7.7361537e+01 3.6075000e-04 4.9049320e-02 7.5676360e+01 3.6148000e-04 4.9049320e-02 7.3991175e+01 3.6230000e-04 4.9049320e-02 7.2306003e+01 3.6320000e-04 4.9049320e-02 7.0620826e+01 3.6417000e-04 4.9049320e-02 6.8935657e+01 3.6522000e-04 4.9082650e-02 6.7339125e+01 3.6670000e-04 4.9144970e-02 6.5669227e+01 3.6865000e-04 4.9252220e-02 6.4109585e+01 3.7114000e-04 4.7617390e-02 8.7224992e+01 3.4035000e-04 4.8420850e-02 8.7688442e+01 3.5035000e-04 4.6843670e-02 8.7261217e+01 3.3067000e-04 4.7257160e-02 8.5987165e+01 3.3598000e-04 4.8420010e-02 8.6286952e+01 3.5048000e-04 4.7968400e-02 8.5024082e+01 3.4502000e-04 4.7880650e-02 8.3780370e+01 3.4415000e-04 4.8305220e-02 8.1896298e+01 3.4991000e-04 4.8166630e-02 8.0103357e+01 3.4871000e-04 4.8080260e-02 7.8344980e+01 3.4825000e-04 4.8055420e-02 7.6604299e+01 3.4864000e-04 4.8085340e-02 7.4977117e+01 3.4976000e-04 4.8142200e-02 7.3301879e+01 3.5132000e-04 4.8110180e-02 7.1542255e+01 3.5189000e-04 4.8102800e-02 6.9881435e+01 3.5279000e-04 4.8082060e-02 6.8259395e+01 3.5357000e-04 4.8185280e-02 6.6682578e+01 3.5593000e-04 4.8288760e-02 6.5105685e+01 3.5836000e-04 4.8191890e-02 6.3670058e+01 3.5822000e-04 4.7473220e-02 8.1261194e+01 3.3969000e-04 4.7304320e-02 7.9605297e+01 3.3809000e-04 4.7212390e-02 7.7930275e+01 3.3756000e-04 4.7174570e-02 7.6253019e+01 3.3779000e-04 4.7241890e-02 7.4534193e+01 3.3943000e-04 4.7245560e-02 7.2810223e+01 3.4037000e-04 4.7222560e-02 7.1071001e+01 3.4107000e-04 4.7250660e-02 6.9358796e+01 3.4247000e-04 4.7259640e-02 6.7623075e+01 3.4372000e-04 4.7280900e-02 6.6035276e+01 3.4509000e-04 4.7349470e-02 6.4716508e+01 3.4690000e-04 4.7202530e-02 6.3414425e+01 3.4605000e-04 4.7341220e-02 8.2771400e+01 3.3764000e-04 4.6375560e-02 6.8807615e+01 3.3189000e-04 4.6712730e-02 8.1219385e+01 3.3019000e-04 3.8100000e-02 6.1351971e+01 2.3144000e-04 3.8100000e-02 2.5525541e-01 3.0845000e-04 3.8100000e-02 1.6434688e+00 3.0837000e-04 3.8100000e-02 3.0323415e+00 3.0817000e-04 3.8100000e-02 4.4211748e+00 3.0786000e-04 3.8100000e-02 5.8092789e+00 3.0743000e-04 3.8100000e-02 7.1977352e+00 3.0688000e-04 3.8100000e-02 8.5868011e+00 3.0623000e-04 3.8100000e-02 9.9751626e+00 3.0545000e-04 3.8100000e-02 1.1363378e+01 3.0457000e-04 3.8100000e-02 1.2752175e+01 3.0358000e-04 3.8100000e-02 1.4141006e+01 3.0249000e-04 3.8100000e-02 1.5529202e+01 3.0129000e-04 3.8100000e-02 1.6917701e+01 2.9999000e-04 3.8100000e-02 1.8306744e+01 2.9859000e-04 3.8100000e-02 1.9695115e+01 2.9710000e-04 3.8100000e-02 2.1083338e+01 2.9551000e-04 3.8100000e-02 2.2472207e+01 2.9384000e-04 3.8100000e-02 2.3860995e+01 2.9209000e-04 3.8100000e-02 2.5249189e+01 2.9026000e-04 3.8100000e-02 2.6637629e+01 2.8835000e-04 3.8100000e-02 2.8026703e+01 2.8638000e-04 3.8100000e-02 2.9415156e+01 2.8433000e-04 3.8100000e-02 3.0803320e+01 2.8223000e-04 3.8100000e-02 3.2192141e+01 2.8007000e-04 3.8100000e-02 3.3580957e+01 2.7786000e-04 3.8100000e-02 3.4969170e+01 2.7561000e-04 3.8100000e-02 3.6357576e+01 2.7331000e-04 3.8100000e-02 3.7746659e+01 2.7098000e-04 3.8100000e-02 3.9135083e+01 2.6862000e-04 3.8100000e-02 4.0523290e+01 2.6624000e-04 3.8100000e-02 4.1912104e+01 2.6383000e-04 3.8100000e-02 4.3300873e+01 2.6142000e-04 3.8100000e-02 4.4689134e+01 2.5900000e-04 3.8100000e-02 4.6077546e+01 2.5657000e-04 3.8100000e-02 4.7466620e+01 2.5415000e-04 3.8100000e-02 4.8855030e+01 2.5175000e-04 3.8100000e-02 5.0243225e+01 2.4935000e-04 3.8100000e-02 5.1632033e+01 2.4698000e-04 3.8100000e-02 5.3020850e+01 2.4464000e-04 3.8100000e-02 5.4409050e+01 2.4233000e-04 3.8100000e-02 5.5797462e+01 2.4005000e-04 3.8100000e-02 5.7186533e+01 2.3782000e-04 3.8100000e-02 5.8574936e+01 2.3564000e-04 3.8100000e-02 5.9963155e+01 2.3351000e-04 3.8975000e-02 6.1352114e+01 2.4218000e-04 3.9850000e-02 6.1352114e+01 2.5292000e-04 4.0725000e-02 6.1352114e+01 2.6366000e-04 3.8965560e-02 9.4927866e-01 3.1905000e-04 3.8965860e-02 2.3376641e+00 3.1891000e-04 3.8965910e-02 3.7268390e+00 3.1866000e-04 3.8965570e-02 5.1153390e+00 3.1828000e-04 3.8965650e-02 6.5032512e+00 3.1780000e-04 3.8965970e-02 7.8921609e+00 3.1720000e-04 3.8965730e-02 9.2811527e+00 3.1648000e-04 3.8965550e-02 1.0669197e+01 3.1565000e-04 3.8965830e-02 1.2057545e+01 3.1472000e-04 3.8965900e-02 1.3446647e+01 3.1367000e-04 3.8965610e-02 1.4835188e+01 3.1252000e-04 3.8965680e-02 1.6223225e+01 3.1127000e-04 3.8965960e-02 1.7612142e+01 3.0993000e-04 3.8965720e-02 1.9001090e+01 3.0848000e-04 3.8965570e-02 2.0389136e+01 3.0694000e-04 3.8965860e-02 2.1777551e+01 3.0532000e-04 3.8965900e-02 2.3166683e+01 3.0360000e-04 3.8965600e-02 2.4555202e+01 3.0181000e-04 3.8965660e-02 2.5943175e+01 2.9994000e-04 3.8965980e-02 2.7332044e+01 2.9800000e-04 3.8965760e-02 2.8721104e+01 2.9599000e-04 3.8965550e-02 3.0109167e+01 2.9391000e-04 3.8965830e-02 3.1497485e+01 2.9178000e-04 3.8965910e-02 3.2886600e+01 2.8960000e-04 3.8965610e-02 3.4275171e+01 2.8736000e-04 3.8965650e-02 3.5663149e+01 2.8509000e-04 3.8965970e-02 3.7052017e+01 2.8278000e-04 3.8965760e-02 3.8441044e+01 2.8043000e-04 3.8965560e-02 3.9829119e+01 2.7805000e-04 3.8965820e-02 4.1217483e+01 2.7566000e-04 3.8965890e-02 4.2606537e+01 2.7325000e-04 3.8965630e-02 4.3995107e+01 2.7083000e-04 3.8965660e-02 4.5383135e+01 2.6841000e-04 3.8965960e-02 4.6771977e+01 2.6599000e-04 3.8965750e-02 4.8160986e+01 2.6357000e-04 3.8965560e-02 4.9549060e+01 2.6117000e-04 3.8965830e-02 5.0937405e+01 2.5879000e-04 3.8965900e-02 5.2326494e+01 2.5643000e-04 3.8965610e-02 5.3715051e+01 2.5410000e-04 3.8984360e-02 5.5167644e+01 2.5193000e-04 3.8969150e-02 5.6616096e+01 2.4940000e-04 3.8894840e-02 5.8059118e+01 2.4620000e-04 3.9235920e-02 5.9835005e+01 2.4765000e-04 4.0409650e-02 5.9851610e+01 2.6203000e-04 4.0836070e-02 5.8069462e+01 2.7001000e-04 4.0740380e-02 5.6495054e+01 2.7133000e-04 4.0734030e-02 5.5105384e+01 2.7351000e-04 4.0733910e-02 5.3715160e+01 2.7580000e-04 4.0734310e-02 5.2326871e+01 2.7814000e-04 4.0734120e-02 5.0938125e+01 2.8049000e-04 4.0734320e-02 4.9549414e+01 2.8288000e-04 4.0734330e-02 4.8161193e+01 2.8528000e-04 4.0734210e-02 4.6772587e+01 2.8769000e-04 4.0734230e-02 4.5383921e+01 2.9011000e-04 4.0734260e-02 4.3995372e+01 2.9254000e-04 4.0734230e-02 4.2606910e+01 2.9496000e-04 4.0734170e-02 4.1218074e+01 2.9736000e-04 4.0734380e-02 3.9829573e+01 2.9976000e-04 4.0734320e-02 3.8441350e+01 3.0213000e-04 4.0734200e-02 3.7052711e+01 3.0448000e-04 4.0734230e-02 3.5664043e+01 3.0679000e-04 4.0734260e-02 3.4275510e+01 3.0907000e-04 4.0734230e-02 3.2887039e+01 3.1130000e-04 4.0734170e-02 3.1498209e+01 3.1349000e-04 4.0734370e-02 3.0109703e+01 3.1562000e-04 4.0734320e-02 2.8721458e+01 3.1769000e-04 4.0734200e-02 2.7332846e+01 3.1970000e-04 4.0734230e-02 2.5944182e+01 3.2164000e-04 4.0734260e-02 2.4555644e+01 3.2351000e-04 4.0734230e-02 2.3167181e+01 3.2531000e-04 4.0734170e-02 2.1778343e+01 3.2702000e-04 4.0734370e-02 2.0389830e+01 3.2865000e-04 4.0734320e-02 1.9001591e+01 3.3018000e-04 4.0734210e-02 1.7612986e+01 3.3163000e-04 4.0734230e-02 1.6224328e+01 3.3298000e-04 4.0734260e-02 1.4835778e+01 3.3423000e-04 4.0734230e-02 1.3447321e+01 3.3538000e-04 4.0734160e-02 1.2058498e+01 3.3642000e-04 4.0734360e-02 1.0669963e+01 3.3736000e-04 4.0734320e-02 9.2817167e+00 3.3818000e-04 4.0734210e-02 7.8931156e+00 3.3890000e-04 4.0734230e-02 6.5044813e+00 3.3950000e-04 4.0734260e-02 5.1159250e+00 3.3999000e-04 4.0734230e-02 3.7274516e+00 3.4036000e-04 4.0734170e-02 2.3386229e+00 3.4062000e-04 4.0734360e-02 9.5009828e-01 3.4076000e-04 3.9880300e-02 5.8870590e+01 2.5703000e-04 3.9907720e-02 5.7621059e+01 2.5932000e-04 3.9821280e-02 5.6264066e+01 2.6042000e-04 3.9839390e-02 5.4764421e+01 2.6309000e-04 3.9854020e-02 5.3289586e+01 2.6571000e-04 3.9857320e-02 5.1829948e+01 2.6821000e-04 3.9867940e-02 5.0381380e+01 2.7082000e-04 3.9816430e-02 4.8950866e+01 2.7265000e-04 3.9828320e-02 4.7538977e+01 2.7524000e-04 3.9837520e-02 4.6132636e+01 2.7780000e-04 3.9844790e-02 4.4730493e+01 2.8034000e-04 3.9850530e-02 4.3331638e+01 2.8285000e-04 3.9854920e-02 4.1935318e+01 2.8533000e-04 3.9858120e-02 4.0540827e+01 2.8778000e-04 3.9860910e-02 3.9147771e+01 2.9021000e-04 3.9862970e-02 3.7755936e+01 2.9260000e-04 3.9864280e-02 3.6364918e+01 2.9495000e-04 3.9865330e-02 3.4974465e+01 2.9726000e-04 3.9866220e-02 3.3584474e+01 2.9953000e-04 3.9866850e-02 3.2194881e+01 3.0175000e-04 3.9867160e-02 3.0805468e+01 3.0392000e-04 3.9867740e-02 2.9416257e+01 3.0603000e-04 3.9868130e-02 2.8027306e+01 3.0807000e-04 3.9868320e-02 2.6638642e+01 3.1005000e-04 3.9868390e-02 2.5250090e+01 3.1196000e-04 3.9868420e-02 2.3861604e+01 3.1379000e-04 3.9868320e-02 2.2473197e+01 3.1555000e-04 3.9868130e-02 2.1084362e+01 3.1721000e-04 3.9868420e-02 1.9695528e+01 3.1880000e-04 3.9868680e-02 1.8307359e+01 3.2029000e-04 3.9868460e-02 1.6919199e+01 3.2169000e-04 3.9868170e-02 1.5530513e+01 3.2299000e-04 3.9868200e-02 1.4141650e+01 3.2419000e-04 3.9868320e-02 1.2753102e+01 3.2528000e-04 3.9868260e-02 1.1364427e+01 3.2627000e-04 3.9868480e-02 9.9757540e+00 3.2716000e-04 3.9868650e-02 8.5875889e+00 3.2793000e-04 3.9868400e-02 7.1993443e+00 3.2859000e-04 3.9868160e-02 5.8106195e+00 3.2913000e-04 3.9868220e-02 4.4217745e+00 3.2956000e-04 3.9868320e-02 3.0332599e+00 3.2988000e-04 3.9868260e-02 1.6445664e+00 3.3007000e-04 3.9868480e-02 2.5589433e-01 3.3016000e-04 3.8100000e-02 9.0000000e+01 2.0845000e-04 3.8100000e-02 8.8634620e+01 2.0851000e-04 3.8100000e-02 8.7271106e+01 2.0868000e-04 3.8100000e-02 8.5906656e+01 2.0896000e-04 3.8100000e-02 8.4542612e+01 2.0936000e-04 3.8100000e-02 8.3178661e+01 2.0987000e-04 3.8100000e-02 8.1814321e+01 2.1048000e-04 3.8100000e-02 8.0450586e+01 2.1121000e-04 3.8100000e-02 7.9086177e+01 2.1204000e-04 3.8100000e-02 7.7722252e+01 2.1298000e-04 3.8100000e-02 7.6358070e+01 2.1402000e-04 3.8100000e-02 7.4993926e+01 2.1516000e-04 3.8100000e-02 7.3629906e+01 2.1640000e-04 3.8100000e-02 7.2265770e+01 2.1773000e-04 3.8100000e-02 7.0901605e+01 2.1916000e-04 3.8100000e-02 6.9537687e+01 2.2068000e-04 3.8100000e-02 6.8173050e+01 2.2228000e-04 3.8100000e-02 6.6809609e+01 2.2396000e-04 3.8100000e-02 6.5444910e+01 2.2572000e-04 3.8100000e-02 6.4081400e+01 2.2756000e-04 3.8100000e-02 6.2717014e+01 2.2947000e-04 3.6600000e-02 6.1352114e+01 2.1303000e-04 3.6600000e-02 2.5589433e-01 2.9004000e-04 3.6600000e-02 1.6441078e+00 2.8996000e-04 3.6600000e-02 3.0329256e+00 2.8977000e-04 3.6600000e-02 4.4214816e+00 2.8945000e-04 3.6600000e-02 5.8100474e+00 2.8902000e-04 3.6600000e-02 7.1985897e+00 2.8848000e-04 3.6600000e-02 8.5871960e+00 2.8782000e-04 3.6600000e-02 9.9757403e+00 2.8704000e-04 3.6600000e-02 1.1363972e+01 2.8616000e-04 3.6600000e-02 1.2752802e+01 2.8517000e-04 3.6600000e-02 1.4141350e+01 2.8408000e-04 3.6600000e-02 1.5529893e+01 2.8288000e-04 3.6600000e-02 1.6918443e+01 2.8158000e-04 3.6600000e-02 1.8307065e+01 2.8018000e-04 3.6600000e-02 1.9695616e+01 2.7869000e-04 3.6600000e-02 2.1083826e+01 2.7710000e-04 3.6600000e-02 2.2472656e+01 2.7543000e-04 3.6600000e-02 2.3861207e+01 2.7368000e-04 3.6600000e-02 2.5249754e+01 2.7185000e-04 3.6600000e-02 2.6638312e+01 2.6994000e-04 3.6600000e-02 2.8026939e+01 2.6797000e-04 3.6600000e-02 2.9415480e+01 2.6592000e-04 3.6600000e-02 3.0803694e+01 2.6382000e-04 3.6600000e-02 3.2192515e+01 2.6166000e-04 3.6600000e-02 3.3581069e+01 2.5945000e-04 3.6600000e-02 3.4969617e+01 2.5720000e-04 3.6600000e-02 3.6358173e+01 2.5490000e-04 3.6600000e-02 3.7746809e+01 2.5257000e-04 3.6600000e-02 3.9135360e+01 2.5021000e-04 3.6600000e-02 4.0523566e+01 2.4783000e-04 3.6600000e-02 4.1912380e+01 2.4542000e-04 3.6600000e-02 4.3300932e+01 2.4301000e-04 3.6600000e-02 4.4689487e+01 2.4059000e-04 3.6600000e-02 4.6078047e+01 2.3816000e-04 3.6600000e-02 4.7466689e+01 2.3575000e-04 3.6600000e-02 4.8855237e+01 2.3334000e-04 3.6600000e-02 5.0243433e+01 2.3095000e-04 3.6600000e-02 5.1632497e+01 2.2857000e-04 3.6600000e-02 5.3021058e+01 2.2623000e-04 3.6600000e-02 5.4409100e+01 2.2392000e-04 3.6600000e-02 5.5797643e+01 2.2164000e-04 3.6600000e-02 5.7186552e+01 2.1941000e-04 3.6600000e-02 5.8575098e+01 2.1723000e-04 3.6600000e-02 5.9963298e+01 2.1510000e-04 3.6600000e-02 9.0000000e+01 1.9005000e-04 3.6600000e-02 6.2716219e+01 2.1106000e-04 3.6600000e-02 6.4080412e+01 2.0915000e-04 3.6600000e-02 6.5444599e+01 2.0732000e-04 3.6600000e-02 6.6808794e+01 2.0555000e-04 3.6600000e-02 6.8172981e+01 2.0387000e-04 3.6600000e-02 6.9537173e+01 2.0227000e-04 3.6600000e-02 7.0901359e+01 2.0075000e-04 3.6600000e-02 7.2265554e+01 1.9932000e-04 3.6600000e-02 7.3629735e+01 1.9799000e-04 3.6600000e-02 7.4993926e+01 1.9675000e-04 3.6600000e-02 7.6358124e+01 1.9561000e-04 3.6600000e-02 7.7722320e+01 1.9457000e-04 3.6600000e-02 7.9086510e+01 1.9363000e-04 3.6600000e-02 8.0450691e+01 1.9280000e-04 3.6600000e-02 8.1814889e+01 1.9207000e-04 3.6600000e-02 8.3179073e+01 1.9146000e-04 3.6600000e-02 8.4543277e+01 1.9095000e-04 3.6600000e-02 8.5907461e+01 1.9055000e-04 3.6600000e-02 8.7271647e+01 1.9027000e-04 3.6600000e-02 8.8635842e+01 1.9010000e-04 3.4500000e-02 6.1351971e+01 1.8726000e-04 3.4500000e-02 2.5525541e-01 2.6427000e-04 3.4500000e-02 1.6434549e+00 2.6419000e-04 3.4500000e-02 3.0323415e+00 2.6399000e-04 3.4500000e-02 4.4211609e+00 2.6368000e-04 3.4500000e-02 5.8092789e+00 2.6325000e-04 3.4500000e-02 7.1977352e+00 2.6270000e-04 3.4500000e-02 8.5867874e+00 2.6204000e-04 3.4500000e-02 9.9751626e+00 2.6127000e-04 3.4500000e-02 1.1363378e+01 2.6039000e-04 3.4500000e-02 1.2752175e+01 2.5940000e-04 3.4500000e-02 1.4141006e+01 2.5830000e-04 3.4500000e-02 1.5529202e+01 2.5711000e-04 3.4500000e-02 1.6917687e+01 2.5580000e-04 3.4500000e-02 1.8306731e+01 2.5441000e-04 3.4500000e-02 1.9695115e+01 2.5292000e-04 3.4500000e-02 2.1083338e+01 2.5133000e-04 3.4500000e-02 2.2472207e+01 2.4966000e-04 3.4500000e-02 2.3860995e+01 2.4791000e-04 3.4500000e-02 2.5249189e+01 2.4608000e-04 3.4500000e-02 2.6637617e+01 2.4417000e-04 3.4500000e-02 2.8026703e+01 2.4219000e-04 3.4500000e-02 2.9415156e+01 2.4015000e-04 3.4500000e-02 3.0803308e+01 2.3805000e-04 3.4500000e-02 3.2192141e+01 2.3589000e-04 3.4500000e-02 3.3580957e+01 2.3368000e-04 3.4500000e-02 3.4969170e+01 2.3142000e-04 3.4500000e-02 3.6357576e+01 2.2913000e-04 3.4500000e-02 3.7746659e+01 2.2680000e-04 3.4500000e-02 3.9135074e+01 2.2444000e-04 3.4500000e-02 4.0523290e+01 2.2205000e-04 3.4500000e-02 4.1912104e+01 2.1965000e-04 3.4500000e-02 4.3300873e+01 2.1724000e-04 3.4500000e-02 4.4689134e+01 2.1482000e-04 3.4500000e-02 4.6077546e+01 2.1239000e-04 3.4500000e-02 4.7466620e+01 2.0997000e-04 3.4500000e-02 4.8855030e+01 2.0756000e-04 3.4500000e-02 5.0243225e+01 2.0517000e-04 3.4500000e-02 5.1632033e+01 2.0280000e-04 3.4500000e-02 5.3020850e+01 2.0046000e-04 3.4500000e-02 5.4409041e+01 1.9814000e-04 3.4500000e-02 5.5797462e+01 1.9587000e-04 3.4500000e-02 5.7186533e+01 1.9364000e-04 3.4500000e-02 5.8574936e+01 1.9146000e-04 3.4500000e-02 5.9963143e+01 1.8933000e-04 3.5550000e-02 6.1352114e+01 2.0014000e-04 3.5549960e-02 9.4969530e-01 2.7713000e-04 3.5550010e-02 2.3381505e+00 2.7699000e-04 3.5550070e-02 3.7271458e+00 2.7674000e-04 3.5549910e-02 5.1156320e+00 2.7636000e-04 3.5549940e-02 6.5038662e+00 2.7588000e-04 3.5550090e-02 7.8926383e+00 2.7527000e-04 3.5550030e-02 9.2814358e+00 2.7456000e-04 3.5549960e-02 1.0669581e+01 2.7373000e-04 3.5550000e-02 1.2058013e+01 2.7280000e-04 3.5550070e-02 1.3446978e+01 2.7175000e-04 3.5549940e-02 1.4835488e+01 2.7060000e-04 3.5549960e-02 1.6223778e+01 2.6935000e-04 3.5550080e-02 1.7612551e+01 2.6800000e-04 3.5550020e-02 1.9001341e+01 2.6656000e-04 3.5549960e-02 2.0389479e+01 2.6502000e-04 3.5550010e-02 2.1777951e+01 2.6339000e-04 3.5550060e-02 2.3166920e+01 2.6168000e-04 3.5549930e-02 2.4555414e+01 2.5989000e-04 3.5549950e-02 2.5943672e+01 2.5802000e-04 3.5550090e-02 2.7332442e+01 2.5608000e-04 3.5550040e-02 2.8721278e+01 2.5407000e-04 3.5549960e-02 3.0109429e+01 2.5199000e-04 3.5550000e-02 3.1497847e+01 2.4986000e-04 3.5550070e-02 3.2886820e+01 2.4768000e-04 3.5549940e-02 3.4275340e+01 2.4544000e-04 3.5549940e-02 3.5663596e+01 2.4317000e-04 3.5550080e-02 3.7052364e+01 2.4085000e-04 3.5550030e-02 3.8441192e+01 2.3851000e-04 3.5549970e-02 3.9829345e+01 2.3613000e-04 3.5550000e-02 4.1217779e+01 2.3374000e-04 3.5550060e-02 4.2606724e+01 2.3133000e-04 3.5549950e-02 4.3995244e+01 2.2891000e-04 3.5549950e-02 4.5383528e+01 2.2649000e-04 3.5550080e-02 4.6772282e+01 2.2407000e-04 3.5550040e-02 4.8161095e+01 2.2165000e-04 3.5549940e-02 4.9549227e+01 2.1925000e-04 3.5549950e-02 5.0937750e+01 2.1687000e-04 3.5550080e-02 5.2326772e+01 2.1451000e-04 3.5549890e-02 5.3715179e+01 2.1218000e-04 3.5550000e-02 5.5103758e+01 2.0989000e-04 3.5551380e-02 5.6573593e+01 2.0752000e-04 3.5544690e-02 5.8044268e+01 2.0511000e-04 3.5567100e-02 5.9609392e+01 2.0296000e-04 3.4500000e-02 9.0000000e+01 1.6427000e-04 3.4500000e-02 8.8634620e+01 1.6433000e-04 3.4500000e-02 8.7271106e+01 1.6450000e-04 3.4500000e-02 8.5906656e+01 1.6478000e-04 3.4500000e-02 8.4542612e+01 1.6518000e-04 3.4500000e-02 8.3178661e+01 1.6568000e-04 3.4500000e-02 8.1814321e+01 1.6630000e-04 3.4500000e-02 8.0450586e+01 1.6703000e-04 3.4500000e-02 7.9086177e+01 1.6786000e-04 3.4500000e-02 7.7722252e+01 1.6879000e-04 3.4500000e-02 7.6358070e+01 1.6984000e-04 3.4500000e-02 7.4993926e+01 1.7098000e-04 3.4500000e-02 7.3629906e+01 1.7222000e-04 3.4500000e-02 7.2265770e+01 1.7355000e-04 3.4500000e-02 7.0901605e+01 1.7498000e-04 3.4500000e-02 6.9537687e+01 1.7649000e-04 3.4500000e-02 6.8173050e+01 1.7810000e-04 3.4500000e-02 6.6809609e+01 1.7978000e-04 3.4500000e-02 6.5444910e+01 1.8154000e-04 3.4500000e-02 6.4081400e+01 1.8338000e-04 3.4500000e-02 6.2717014e+01 1.8528000e-04 3.2500000e-02 6.1352114e+01 2.1559000e-04 3.2500000e-02 2.5589433e-01 5.7689000e-04 3.2500000e-02 1.6441078e+00 5.7588000e-04 3.2500000e-02 3.0329256e+00 5.7419000e-04 3.2500000e-02 4.4214816e+00 5.7181000e-04 3.2500000e-02 5.8100335e+00 5.6877000e-04 3.2500000e-02 7.1985897e+00 5.6506000e-04 3.2500000e-02 8.5871960e+00 5.6071000e-04 3.2500000e-02 9.9757403e+00 5.5574000e-04 3.2500000e-02 1.1363972e+01 5.5016000e-04 3.2500000e-02 1.2752788e+01 5.4398000e-04 3.2500000e-02 1.4141333e+01 5.3725000e-04 3.2500000e-02 1.5529893e+01 5.2998000e-04 -------------- next part -------------- package com.profiles; import java.awt.BorderLayout; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.SwingUtilities; import vtk.*; public class PlotSpheres extends JPanel { public static void main(String[] args) throws FileNotFoundException { SwingUtilities.invokeLater(new Runnable() { public void run() { JFrame frame = new JFrame("PlotSheres"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(new BorderLayout()); try { frame.getContentPane().add(new PlotSpheres(), BorderLayout.CENTER); } catch (FileNotFoundException e) { e.printStackTrace(); } frame.setSize(1000, 1000); frame.setVisible(true); } }); } // Load VTK libraries static { if (!vtkNativeLibrary.LoadAllNativeLibraries()) { for (vtkNativeLibrary lib : vtkNativeLibrary.values()) { if (!lib.IsLoaded()) System.out.println(lib.GetLibraryName() + " not loaded"); } System.out.println("Make sure the search path is correct: "); System.out.println(System.getProperty("java.library.path")); } vtkNativeLibrary.DisableOutputWindow(null); } // Variables private String dataFile; private String dataFilePathString; Double[] xValsArray = new Double[41]; Double[] yValsArray = new Double[721]; Double[][] zValsArray = new Double[41][721]; private vtkRenderWindowPanel renderWindowPanel = new vtkRenderWindowPanel(); private vtkPoints points; private int pointsNum; private vtkRenderWindowInteractor renderWindowInteractor; private vtkPolyData polyData = new vtkPolyData(); private vtkFloatArray colorsScalars; public PlotSpheres() throws FileNotFoundException { super(new BorderLayout()); dataFilePathString = "C:\\vtk123"; dataFile = "some_points.txt"; calcSheres(); System.out.println("calcSheres done"); } public void calcSheres() throws FileNotFoundException { try { renderWindowPanel.GetRenderer().RemoveAllViewProps(); } catch (Exception nullEx) { System.out.println("renderWindowPanel props are null."); } // Read the file // Count the lines in the file BufferedReader br_count = new BufferedReader(new FileReader( dataFilePathString + File.separator + dataFile)); String lineData = null; int lineNum = 0; try { lineData = br_count.readLine(); // The first data line has just been read while (lineData != null) { // Do nothing except increment the counter lineNum = lineNum + 1; // on iteration 1, lineNum = 1 // Read blank line lineData = br_count.readLine(); // Next action is in for the br_count.readLine() (the // next data line) lineData = br_count.readLine(); System.out.println("lineNum = " + lineNum + " " + lineData); } } catch (Exception e) { e.printStackTrace(); System.out.println("Datafile line counting error"); } try { br_count.close(); } catch (IOException e) { System.out.println("Error closing br_count"); e.printStackTrace(); } BufferedReader br = new BufferedReader(new FileReader( dataFilePathString + File.separator + dataFile)); // Set number of data point sets (x,y,z sets) pointsNum = lineNum; // Fill colorsScalars array with the actual scalar values // Initialize/reinitialize variables String linej; int indexNum = 0; points = new vtkPoints(); points.SetNumberOfPoints(pointsNum); Double ZPOSi; Double theta; Double dRi; Double tempx; Double tempy; Double tempz; // colorsScalars is the array of native (pos or neg) scalars // the sign is changed to meet the required application convention // the sign change line can be used to show difference between // plotting of positive and negative scalars colorsScalars = new vtkFloatArray(); colorsScalars.SetNumberOfTuples(pointsNum); String[] linejArray = {}; try { linej = br.readLine(); while (linej != null) { linejArray = linej.split("\\s+"); ZPOSi = Double.parseDouble(linejArray[1]); // Z position (m) theta = Double.parseDouble(linejArray[2]); // theta (deg) dRi = Double.parseDouble(linejArray[3]); // dRi (m) // dRi negative value means smaller than nominal radius // tempx = (r - dr) * cos(theta) // tempy = (r - dr) * sin(theta) // tempz = ZPOSi tempx = (.094629 - dRi) * Math.cos((3.14159 / 180) * theta); tempy = (.094629 - dRi) * Math.sin((3.14159 / 180) * theta); tempz = ZPOSi; points.SetPoint(indexNum, tempx, tempy, tempz); System.out.println(tempx + " " + tempy + " " + tempz); // Account for convention used in application // Change sign of dRi: dRi *= -1; colorsScalars.SetValue(indexNum, dRi); indexNum = indexNum + 1; System.out.println("indexNum = " + indexNum + "......... dRi = " + dRi); linej = br.readLine(); // (Account for blank line...) linej = br.readLine(); } } catch (Exception ex) { ex.printStackTrace(); System.out.println("Error reading datafile"); } try { br_count.close(); } catch (IOException e) { System.out.println("Error closing br_count"); e.printStackTrace(); } // populate the polyData this.polyData.SetPoints(points); // find min and max of colorsScalars array double[] tmpScalarRange = new double[2]; tmpScalarRange = this.colorsScalars.GetRange(); Double scalarMax = tmpScalarRange[1]; Double scalarMin = tmpScalarRange[0]; // populate the scalars this.polyData.GetPointData().SetScalars(this.colorsScalars); // create sphere source vtkSphereSource sphere = new vtkSphereSource(); sphere.Update(); // setup glyph3D vtkGlyph3D glyph3D = new vtkGlyph3D(); glyph3D.SetColorModeToColorByScalar(); glyph3D.SetSourceConnection(sphere.GetOutputPort()); glyph3D.SetInputData(polyData); glyph3D.Update(); // visualize vtkDataSetMapper mapper = new vtkDataSetMapper(); mapper.SetInputConnection(glyph3D.GetOutputPort()); mapper.SetScalarRange(scalarMin, scalarMax); mapper.Update(); vtkActor actor = new vtkActor(); actor.GetProperty().SetSpecularPower(1.0); actor.GetProperty().SetDiffuse(1.0); actor.GetProperty().SetOpacity(1.0); actor.SetMapper(mapper); vtkRenderer renderer = new vtkRenderer(); renderer = renderWindowPanel.GetRenderer(); renderer.AddActor(actor); renderer.SetBackground(0.0, 0.0, 0.0); renderer.ResetCameraClippingRange(); // Create a lookup table to share between the mapper and the scalarbar vtkLookupTable hueLut = new vtkLookupTable(); hueLut.SetTableRange(scalarMin, scalarMax); hueLut.SetHueRange(0.6667, 0.0000); // H from HSV red (top) to blue hueLut.SetSaturationRange(1.0, 1.0); hueLut.SetValueRange(1.0, 1.0); // V from HSV hueLut.Build(); mapper.SetLookupTable(hueLut); mapper.Update(); vtkScalarBarWidget sbWidget = new vtkScalarBarWidget(); sbWidget.RepositionableOn(); renderWindowInteractor = renderWindowPanel.getRenderWindowInteractor(); sbWidget.SetInteractor(renderWindowInteractor); sbWidget.GetScalarBarActor().SetTitle("dR (m)"); sbWidget.GetScalarBarActor().SetLookupTable(mapper.GetLookupTable()); vtkTextProperty SBtprop = new vtkTextProperty(); SBtprop.SetFontSize(1); SBtprop.SetBold(1); sbWidget.GetScalarBarActor().SetLabelTextProperty(SBtprop); sbWidget.GetScalarBarActor().SetBarRatio(.7); SBtprop.SetLineOffset(-10); renderer.ResetCameraClippingRange(); vtkCubeAxesActor2D axes = new vtkCubeAxesActor2D(); axes.SetCamera(renderer.GetActiveCamera()); axes.SetBounds(actor.GetBounds()); axes.SetFlyModeToOuterEdges(); renderer.AddActor(axes); renderer.ResetCamera(); sbWidget.EnabledOn(); System.out.println("B4 this.add"); this.add(renderWindowPanel, BorderLayout.CENTER); renderer.ResetCamera(); renderWindowInteractor.Start(); } } From siavashk at ece.ubc.ca Mon Aug 31 17:51:28 2015 From: siavashk at ece.ubc.ca (Siavash Khallaghi) Date: Mon, 31 Aug 2015 14:51:28 -0700 (MST) Subject: [vtkusers] Annotations for Medical Images In-Reply-To: <1440749451108-5733656.post@n5.nabble.com> References: <1440720026516-5733654.post@n5.nabble.com> <1440748560315-5733655.post@n5.nabble.com> <1440749451108-5733656.post@n5.nabble.com> Message-ID: <1441057888745-5733698.post@n5.nabble.com> I see! Thank you Flaviu. It seems that Annotations are not handled as a category of objects, but rather as a collection of shapes (i.e. there is no difference between a rectangle and a rectangle used for annotations). Siavash -- View this message in context: http://vtk.1045678.n5.nabble.com/Annotations-for-Medical-Images-tp5733654p5733698.html Sent from the VTK - Users mailing list archive at Nabble.com. From lilymagic2005 at yahoo.com.hk Mon Aug 31 20:12:12 2015 From: lilymagic2005 at yahoo.com.hk (lilymo) Date: Mon, 31 Aug 2015 17:12:12 -0700 (MST) Subject: [vtkusers] WarpScalar - Problem about normal In-Reply-To: References: <1441013426187-5733689.post@n5.nabble.com> Message-ID: <1441066332697-5733699.post@n5.nabble.com> Here is the model.vtp file and some captures of the result. Thanks a lot! https://drive.google.com/folderview?id=0B5eJCooi6Sfafmx1ZDlqMVRQcFRHYmNBUzNJcXAwVWY5N3dPMFkzeWVSdlkyV0dteFFQSU0&usp=sharing -- View this message in context: http://vtk.1045678.n5.nabble.com/WarpScalar-Problem-about-normal-tp5733689p5733699.html Sent from the VTK - Users mailing list archive at Nabble.com. From lilymagic2005 at yahoo.com.hk Mon Aug 31 22:59:10 2015 From: lilymagic2005 at yahoo.com.hk (lilymo) Date: Mon, 31 Aug 2015 19:59:10 -0700 (MST) Subject: [vtkusers] WarpScalar - Problem about normal In-Reply-To: <1441066332697-5733699.post@n5.nabble.com> References: <1441013426187-5733689.post@n5.nabble.com> <1441066332697-5733699.post@n5.nabble.com> Message-ID: <1441076350095-5733700.post@n5.nabble.com> I ve got a new version of the code, as I debugged the code that the old version didn't get a valid number of points of the polydata. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void TestPointNormals(vtkPolyData* polydata); void TestCellNormals(vtkPolyData* polydata); bool GetPointNormals(vtkPolyData* polydata); bool GetCellNormals(vtkPolyData* polydata); int main(int argc, char *argv[]) { vtkSmartPointer polydata = vtkSmartPointer::New(); vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("model.vtp"); reader->Update(); polydata->DeepCopy(reader->GetOutput()); std::cout << "PolyData address: " << polydata << std::endl; std::cout << "In TestPointNormals: " << polydata->GetNumberOfPoints() << std::endl; vtkSmartPointer scalars = vtkSmartPointer::New(); reader->GetOutput()->GetPointData()->SetScalars(scalars); vtkSmartPointer warpScalar = vtkSmartPointer::New(); warpScalar->SetInputConnection(reader->GetOutputPort()); warpScalar->SetScaleFactor(1); // use the scalars themselves int numOfPoints = polydata->GetNumberOfPoints(); scalars->SetNumberOfTuples(numOfPoints); for(vtkIdType i = 0; i < (polydata->GetNumberOfPoints()); ++i) { scalars->SetTuple1(i,200); } //warpScalar->GetUseNormal(); warpScalar->Update(); // Create a mapper and actor vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(warpScalar->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->GetProperty()->SetColor(1.0, 1.0, 0.0); actor->SetMapper(mapper); // Create a mapper and actor vtkSmartPointer smapper = vtkSmartPointer::New(); smapper->SetInputConnection(reader->GetOutputPort()); vtkSmartPointer sactor = vtkSmartPointer::New(); sactor->GetProperty()->SetColor(1.0, 0.0, 1.0); sactor->SetMapper(smapper); // Visualize vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderer->AddActor(actor); renderer->AddActor(sactor); renderer->SetBackground(1,1,1); // Background color white renderWindow->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } -- View this message in context: http://vtk.1045678.n5.nabble.com/WarpScalar-Problem-about-normal-tp5733689p5733700.html Sent from the VTK - Users mailing list archive at Nabble.com.